­TÃf 3d  - Copyright (C) by F. Ciucci & A. Fasce 1998


This applet can animate in realtime 3d ojects, even with shading and texture
mapping, transparency, motion blur, fog.
Some sample objects are provided: sphere, cone, waving sheet, labyrinth.

This applet is NOT capable of loading custom objects. If you want an applet
that display the rotating logo of your company, or any 3d object and scene
you want, we can build it under payment, using Anfy 3D Gold.
If you are interested, go to http://www.anfyjava.com/panfy3d.html

The following 3 ".class" files must be uploaded: anfy3d.class, Lware.class
and anfy.class.
In addition, you will have to upload anfy3ds0.class and anfy3ds1.class.
Plus, the extra .class files you will use, and the .GIF used as textures.

Insert the  tag in your html document as follows to add this applet
to your page (Comments after the ";" symbol are code explanations and
acceptable min/max values. They are not part of the applet language):

  ; Name, Width, Height

         ; Registration code (if you have it)
         ; Optional URL link when the applet
                                          is "clicked".
      ; Reglink opened in new frame?
  ; Name of new frame for reglink
 ; Statusbar message
         ; Internal calculation width
        ; Internal calculation height
   ; Texture 0 (GIF image 128x128)
      ; Texture 1 (GIF image 128x128)
  ; Texture 2 (GIF image 128x128)
    ; Phong light (GIF image 128x128)
     ; Gphong light (GIF image 128x128)
         ; Interactive mode ("YES", "NO")
             ; Script (0 .. 1) 0 = OFF
             ; Shadow (0 .. 2) 0 = OFF
             ; Mirror (0 .. 1) 0 = OFFa
         ; Light balls (0 .. 6)
         ; Main object (0 .. 2)
       ; Main render (0 .. 14)
      ; Main texture (0 .. 2)
           ; X rotation (0.0 .. 2.0)
          ; Y rotation (0.0 .. 2.0)
          ; Z rotation (0.0 .. 2.0)
         ; Sheet height
         ; Sheet width
       ; Sheet height faces subdivisions
       ; Sheet width faces subdivisions
       ; Sheet anim add (0 .. 3.14)
          ; Sheet waving amplitude
  ; Sheet period for height sine
  ; Sheet period for width sine
    ; Sheet waving function (0 .. 2)
        ; Anim light in script 1 ("YES", "NO")
        ; Child objects (0 .. 3)
      ; Child render (0 .. 14)
     ; Child texture (0 .. 2)
         ; Background type (0 .. 2)
       ; Background render (0 .. 14)
      ; Background texture (0 .. 2)
           ; Background color red component
           ; Background color green component
            ; Background color blue component
               ; Fog (0 .. 1)
        ; Fog distance start (0 .. 1000)
         ; Fog distance stop (0 .. 1000)
       ; Motion blur (0 .. 1)
           ; Optional image over applet
           ; Over image X offset
           ; Over image Y offset
         ; Memory de-allocation delay
            ; Task priority (1..10)
            ; Min. milliseconds/frame for sync
Sorry, your browser doesn't support Java.  ; Message for no java browsers.
                                  ; End of applet tag


                             ---------


The following instructions detail how to change parameters:

Attempting to change the credits parameter will disable the applet.

To activate the reg parameters read the shareware registration notes.
In the "regcode" parameter, place the registration code you
purchased from the author. If the code is correct and the applet is run from
the registered domain name, you can use "link" parameters to link to a URL
when the applet is "clicked".

If you set "regnewframe" to "YES", you can specify a specific frame location
for the reglink:

"_blank"  : To load the link in a new blank unnamed browser window.
"_self"   : To load the link into the same window the applet occupies.
"_parent" : To load the link into the immediate FRAMESET parent.
"_top"    : To load the link into the top body of the window.

You can also set a custom frame name, such as "myframe1".

With the "overimg" parameter you can specify the name of an image that will
be painted over the applet. The best options are transparent GIF images.
NOTE: Animated GIF images are supported, but will be displayed as animated
only on latest browsers (Netscape 4 and Explorer 4 or newer).
With "overimgX" and "overimgY" you can center the image over the applet area.

The size of the applet is determined by the "width" and "height" tags.

If you want to have highest pixel resolution, set the "real_width" and
"real_height" to same values of "width" and "height.
If the applet width and/or height are different from the real width and
height, the "internal" area will be zommed in or out to totally cover the
applet area.
For example, if you use an internal buffer half of the applet area, all the
pixels will appear doubled.

"texture0", "texture1", "texture2", "phongmap", "gaussmap" must address a
64x64 or 128x128 GIF image. No other sizes or image formats are accepted.

"texture0", "texture1", "texture2" are general use texture maps.
If you need only one texture, use "texture0" and delete parameters "texture1"
and "texture2", so these textures won't be loaded.
If you need 2 textures, use "texture0" and "texture1".
If you need 3 textures, use "texture0", "texture1" and "texture2".

"phongmap" is a special texture used to obtain realtime phong rendering.
If you don't use phong rendering, delete this parameter and the texture won't
be loaded.
Note: If you enable lightballs, this texture is required, even if phong
rendering isn't used.

"gaussmap" is a special texture used to obtain gaussian phong rendering.
If you don't use it, just delete this parameter.

If you set "interactive" parameter to "YES", the objects rotation can be
controlled with mouse movements.

Objects that uses gouraud shading can be fogged, and ONLY these.
To enable fog, set the "fog" parameter to "1". Use "0" to disable it.
The fog intensity can be changed using "fog_near" parameter (distance when it
starts to obfuscate objects... lower values make it start nearer), and
"fog_far", where object become totally obuscated by fog.

You can optionally enable a motion blur effect, just set "blur_motion"
parameter to "1". Use "0" to disable it.
Note: there will be blur_motion ONLY if background is disabled, in other
words, if "back_type" parameter is set to value "0".

Regarding background, you can disable it (black colour) placing a value of "0"
in "back_type" parameter. This is useful only if you want enable motion blur
effect or if you need a black background.
Otherwise, setting it to "1" you enable it, including the scene into a big
sphere, that become the background.
If you like to have a custom uniform colour as background, set "back_type" to
a value of "2", and then choose the desider colour with the "back_r", "back_g",
"back_b" parameters, specifying the Red, Green, Blue components (0 .. 255).

If you have set "back_type" to "1", you must choose the render technique used
in background object, and the relative texture to use.

To choose the render technique, use the "back_render" parameter, here the list
of available rendering techniques:

 0  Plain texture
 1  Gouraud shading
 2  Phong shading          ** NOTE: "phongmap" must be loaded
 3  Gaussian phong shading ** NOTE: "gaussmap" must be loaded
 4  Transparent (light)
 5  Transparent (medium)
 6  Liquid texture
 7  Liquid gouraud shading
 8  Liquid phong shading    ** NOTE: "phongmap" must be loaded
 9  Liquid transparent
 10 Reflects mirror view    ** NOTE: texture is ignored, a mirror must exists
 11 Particles               ** NOTE: texture is ignored
 12 Darker plain texture
 13 Metal shading           ** NOTE: "phongmap" must be loaded
 14 Environment mapping

Gouraud, Phong and Gaussian Phong are 3 ways to calculate the shading on
objects.
Liquid modes are like normal modes, except the fact that the texture is waving
like a liquid one.
The mode 10 is usable only with script=0, and mirror=1, in fact it maps on the
object what is "seen and reflected" by the mirror!

All the rendering techniques require a texture, except modes 10 and 11.

To specify the texture, use "back_texture" parameter, choosing a a number
from 0 to 2, to load respectively the textures loaded with "texture0",
"texture1" and "texture2" parameters.

The most important parameter is "script": with a value of "0" you choose the
script 0, with a value of "1" you choose the script 1.
Each script has his custom parameters:


------------------------------
- SCRIPT 0: ROTATING OBJECTS -
------------------------------

You can choose the main object with "main_type" parameter as follows:

main_type :

 0  sphere    (require sphere01.class)
 1  sheet
 2  cone      (require cone01.class)


Like background object, we have:

main_render:  render technique (0 .. 14)
main_texture: texture for main object (0 = texture0, 1 = texture1 etc.)


If you selected the sheet objects, here are the sheet parameters:

sheet_x	:       Height
sheet_y	:       Width
sheet_numx:     Number of height faces subdivisions
sheet_numy:     Number of width faces subdivisions
sheet_add:      Value to add for anim (0 .. 3.14)
sheet_h:        Aplitude of waving
sheet_period1:  Period for height sine, in radiants (3.14 = 1 period)
sheet_period2:  Period for width sine, in radiants (3.14 = 1 period)
sheet_function:	Function to use for waving (0 .. 2)


You can change the rotation speed of object with these parameters:

rot_x :	  rotation increment around x axis
rot_y :	  " " y axis
rot_z :	  " " z axis


You can optionally enable a child object, with "child_type" parameter:

child_type :

 0  Off
 1  Toroids
 2  Stretching spheres   (require sphere01.class)
 3  Cones                (require cone01.class)

Like main object, we have:

child_render:  render technique (0 .. 14)
child_texture: texture for child object (0 = texture0, 1 = texture1 etc.)


You can optionally enable projected shadows, but then the render will be
forced to plain texture mapping. The parameter is "shadow":

shadow :

 0  No projected shadows
 1  Hires projected shadows  ** Note: render forced to mode "0": Plain texture
 2  Lores projected shadows  ** Note: render forced to mode "0": Plain texture


You can enable a mirror on left side, that will reflect the scene, using the
"mirror" parameter:

mirror :

 0  no mirror
 1  mirror      (require box01.class)

Note: If shadows and mirror are enabled together, the mirror will not work as
mirror, but as normal box.


Another option is "lightballs". If you set it to "0", any lightball will be
displayes. But, placing on it a value from "1" to "6", the flying lightballs
will appear.
If lightballs are enabled, the "phongmap" is required, even if no phong
shading render is used.


-----------------------
- SCRIPT 1: LABYRINTH -
-----------------------

In the labyrinth the main object is the floor and the child object is the
walls, and that you can't modify them (main_type and child_type are disabled).
You can choose the rendering technique and texture:

main_render:  render technique (0 .. 14)
main_texture: texture for main object (0 = texture0, 1 = texture1 etc.)

child_render:  render technique (0 .. 14)
child_texture: texture for child object (0 = texture0, 1 = texture1 etc.)

Note: Not all the rendering techniques work well on this script.


For a metallic lightning effect, set the "animlight" effect to "YES", and the
lightsource will be moved continously.

    Source: geocities.com/tokyo/harbor/Harbor/7236

               ( geocities.com/tokyo/harbor/Harbor)                   ( geocities.com/tokyo/harbor)                   ( geocities.com/tokyo)