Applet Author: <a href="http://dogfeathers.com/mark/index.html">Mark Newbold</a>On your page, this will appear as: Applet Author: Mark Newbold
Email me the URL of your page. I may want to set up a link to your page from my pages. Also I will notify you of any significant enhancements or fixes to the applet.
Your browser should allow you to save these files to your computer.
If your computer does not allow long file names, give them short names then
rename them back once you have uploaded them to your web server.
Note that the class filenames are case-sensitive.
<table border=6 width=400 align=left><tr><td> <applet codebase="http://dogfeathers.com/java/necker" code=NeckerCube.class width=400 height=400> <param name=BEAMOPT value=1> <param name=IMGH1 value="http://dogfeathers.com/java/necker/JACKFLY8.GIF"> <param name=IMGV1 value="http://dogfeathers.com/java/necker/MARKDIV4.GIF"> <img src="images/NECKER.GIF" width=400 height=400> </applet> </tr></table> Any text you put here will be positioned to the right of the table. <br clear=left>The <table> HTML tag is unnecessary -- it simply provides a nice border around the applet.
The "codebase" attribute specifies the directory on your web server where you have placed the three ".class" files. This should be a full absolute URL, beginning with "http://".
You can change the applet "width" and "height" attributes. This will change the size of the cube and beams but will not affect the sizes of the images. Making the applet too large will result in "jumpy" animation, particularly on less-powerful computers. If you are using the <table> tag, make sure its width attribute is the same as applet's width.
The applet parameters are all optional. Parameter names must be uppercase. Unrecognized parameter names are ignored.
The BEAMOPT parameter controls how the moving beams are displayed.
The following BEAMOPT values are allowed:
Horizontally-moving images are specified using parameters IMGH1, IMGH2, etc. There are no particular limit to how many images can be specified. Having too many images might overload a web browser that is viewing your page. The applet will keep checking for IMGH parameters sequentially until one is missing. The values must be full absolute URLs, beginning with "http://". The images files MUST be on the same web server as the java class files.
Vertically-moving images are specified using parameters IMGV1, IMGV2, etc.
|
|
Your final images must be sized appropriately for the cube. This is a matter of trial and error. I recommend that you work at a high resolution, and save your work at high resolution. At the end, you can copy the image to a different filename and play with the size until you get something that looks right in the cube.
The images should be made into "transparent GIF's" so that the irrelevant parts of the rectangular image are transparent. This is the really time-consuming part of the process.
I find it easiest to convert my image into 256-color indexed-color (palletized) mode before working with it. Pick a color (usually white) to represent the transparent background areas of the image. Use a good graphics program such as Adobe Photoshop or CorelDraw to change all "transparent" areas of the image to that background color. You will become very proficient at selecting areas of the image.
Make sure that none of the foreground areas of the image have that background color (change them to some slightly different color). Also get rid of any extra-light pixels on the perimeter of the image, since these give the image a cut-out appearance (change them to the background color).
Finally, use a utility such as LVIEW or Gif Construction Set to specify the background color in the GIF file.
"How-to" info about transparent GIF's can be found on the Web -- search for "transparent gif".