home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 April / CHIP_4_98.ISO / Java / applet / voxel / voxel.txt < prev   
Encoding:
Text File  |  1998-02-21  |  13.0 KB  |  316 lines

  1.  
  2.            AnfyVoxel 2.2 - Copyright (C) by Fabio Ciucci 1997/98
  3.  
  4.  
  5. This applet can generate a lightsourced voxel landscape in realtime.
  6. Thanks to 6502/FR.
  7. Remember that are needed both voxel.class , Lware.class and anfy.class.
  8. You must upload these 3 .class files and insert the <applet> tag on your
  9. html document to add this applet to your page.
  10. The applet is interactive, in fact you can control it with the mouse.
  11. This applet is fully parametrized, so you can generate all kinds of tunnels
  12. you want. Here an example of what you have to write in the html (the
  13. things anfter the ; are comments with min-max values acceptet):
  14.  
  15.  
  16. <applet code="voxel.class" width=320 height=180> ; Name, Width, Height
  17. <param name=credits value="Applet by Fabio Ciucci (www.anfiteatro.it/java.html)">
  18. <param name=regcode value="NO">         ; Register code (if you have it)
  19. <param name=reglink value="NO">         ; URL where go optionally when clicked
  20. <param name=regnewframe value="YES">    ; Reglink opened in new frame?
  21. <param name=regframename value="_blank"> ; Name of new frame for reglink
  22. <param name=statusmsg value="Voxel applet">  ; Statusbar message
  23. <param name=res value="1">             ; resolution (1-8)
  24. <param name=shadow value="4">          ; Shadow factor
  25. <param name=roughness value="130">     ; Ground roughness (50..200)
  26. <param name=numpal value="2">          ; Color palette (1..27)
  27. <param name=backr value="0">           ; RED comp. of backg. color (0-255)
  28. <param name=backg value="0">           ; GREEN comp. of backg. color (0-255)
  29. <param name=backb value="60">          ; BLUE comp. of backg. color (0-255)
  30. <param name=textscroll value="NO">     ; File for scrolltext or "NO"
  31. <param name=textoffset value="140">       ; Txtscroll y offset
  32. <param name=textspeed value="1">          ; Txtscroll speed
  33. <param name=textfont value="Arial">       ; Txtscroll font name
  34. <param name=textbold value="NO">          ; Txtscroll bold ("YES" or "NO")
  35. <param name=textsize value="24">          ; Txtscroll font size
  36. <param name=textshadow value="YES">       ; Txtscroll shadow ("YES" or "NO")
  37. <param name=TextColR value="200">         ; Txtscroll color (red component)
  38. <param name=TextColG value="255">         ; Txtscroll color (green component)
  39. <param name=TextColB value="190">         ; Txtscroll color (blue component)
  40. <param name=TextSColR value="20">         ; Txtscroll shadow col. (red c.)
  41. <param name=TextSColG value="20">         ; Txtscroll shadow col. (green c.)
  42. <param name=TextSColB value="50">         ; Txtscroll shadow col. (blue c.)
  43. <param name=TextJumpAmp value="0">        ; Txtscroll jump aplitude
  44. <param name=TextJumpSpd value="0">        ; Txtscroll jump speed
  45. <param name=TextSineAmp value="0">        ; Txtscroll sineshape amplitude        
  46. <param name=TextSineSpd value="0">        ; Txtscroll sineshape movement
  47. <param name=TextSineAngle value="0">      ; Txtscroll sineangle / pixel  
  48. <param name=memdelay value="1000">        ; Memory deallocation delay
  49. <param name=priority value="3">           ; Task priority (1..10)
  50. <param name=fixnetscape value="NO">       ; Fix Netscape 3.0 bug ("YES","NO")
  51. <param name=MinSYNC value="10">           ; Min. milliseconds/frame for sync
  52. Sorry, your browser doesn't suppor Java.  ; Message for no java browsers.
  53. </applet>                                 ; End of applet tag
  54.  
  55.  
  56. NOTE: Don't place "; comments" on final HTML!!!
  57.  
  58. Copy and paste in your html document this cleared and correct tag:
  59.  
  60.  
  61. <applet code="voxel.class" width=320 height=180>
  62. <param name=credits value="Applet by Fabio Ciucci (www.anfiteatro.it/java.html)">
  63. <param name=regcode value="NO">
  64. <param name=reglink value="NO">
  65. <param name=regnewframe value="YES">
  66. <param name=regframename value="_blank">
  67. <param name=statusmsg value="Voxel applet">
  68. <param name=res value="1">
  69. <param name=shadow value="4">
  70. <param name=roughness value="130">
  71. <param name=numpal value="2">
  72. <param name=backr value="0">
  73. <param name=backg value="0">
  74. <param name=backb value="0">
  75. <param name=textscroll value="NO">
  76. <param name=textoffset value="0">
  77. <param name=textspeed value="2">
  78. <param name=textfont value="Arial">
  79. <param name=textbold value="NO">
  80. <param name=textsize value="24">
  81. <param name=textshadow value="NO">
  82. <param name=TextColR value="250">
  83. <param name=TextColG value="130">
  84. <param name=TextColB value="240">
  85. <param name=TextSColR value="20">
  86. <param name=TextSColG value="20">
  87. <param name=TextSColB value="50">
  88. <param name=TextJumpAmp value="0">
  89. <param name=TextJumpSpd value="0">
  90. <param name=TextSineAmp value="0">
  91. <param name=TextSineSpd value="0">
  92. <param name=TextSineAngle value="0">
  93. <param name=memdelay value="1000">
  94. <param name=priority value="3">
  95. <param name=fixnetscape value="NO">
  96. <param name=MinSYNC value="10">
  97. Sorry, your browser doesn't suppor Java.
  98. </applet>
  99.  
  100.  
  101.                              ---------
  102.  
  103.  
  104. Here detailed instructions about how to change parameters:
  105.  
  106.  
  107. The credits parameter can't be changed otherwise the applet will not work.
  108.  
  109. To activate the reg parameters read the shareware registration notes.
  110. In the "regcode" parameter you have to place the registration code you
  111. purchase from the author. If it is correct and the applet is run from the
  112. registered domain name, you can use "reglink" parameter, where you can specify
  113. an URL where bring user when the applet is clicked.
  114. If you set to "YES" regnewframe, you can specify a frame where load the
  115. reglink:
  116.  
  117. "_blank"  : To load the link in a new blank unnamed browser window.
  118. "_self"   : To load the link into the same window the applet occupies.
  119. "_parent" : To load the link into the immediate FRAMESET parent.
  120. "_top"    : To load the link into the top body of the window.
  121.  
  122. Otherwise the frame name, for example "myframe1".
  123.  
  124. The applet can be of any size. The res parameter determine the resolution:
  125. with res=1 pixels are small, but effect is slow, with res=8 pixels are too
  126. great but effect is faster. I think the best choices are 1-3.
  127. In fact, res is a sort of zoomer.
  128.  
  129. With the "shadow" parameter you can calibrate the light intensity: low
  130. values mean less shadows, high values mean high contrasts ligh-shadow.
  131.  
  132. With "roughness" you can change the roughness of the ground: low values
  133. makes soft desert dunes, high values makes tall mountains.
  134.  
  135. You can select the color palette, with "numpal" parameter:
  136.  
  137.  
  138. 1) red     -> blue
  139. 2) orange  -> green
  140. 3) green   -> blue
  141. 4) blue    -> green
  142. 5) green   -> red
  143. 6) blue    -> red
  144. 7) yellow
  145. 8) yellow  -> blue
  146. 9) violet
  147. 10) red
  148. 11) violet -> green
  149. 12) pink   -> green
  150. 13) blue
  151. 14) blue2
  152. 15) azzure
  153. 16) green
  154. 17) green2
  155. 18) gray
  156. 19) blue    -> yellow
  157. 20) yellow
  158. 21) azzure  -> red
  159. 22) green   -> violet
  160. 23) red
  161. 24) violet
  162. 25) gray
  163. 26) gray2
  164. 27) gray3
  165.  
  166. As you can check, there are enough palettes to simulate the moon ground,
  167. the mars ground, and so on.
  168.  
  169.  
  170.                              ---------
  171.  
  172.  
  173. Optional Scrolltext parameters:
  174.  
  175.  
  176. You can optionally activate a scrolltext that will scroll over the applet.
  177. If you don't need the scrolltext, deactivate it placing "NO" at the
  178. "textscroll" parameter.
  179. Otherwise you must supply the name of an ASCII text file, where you must
  180. write the text that you want to be scrolled.
  181. Is supported one only line of text, that can be long as you want.
  182. Remember to upload the text file too, if you activate the scrolltext!
  183.  
  184. If activated, here are the parameters:
  185.  
  186. With "textoffset" you choose the Y offset from the top: placing it to 0 the
  187. scroll will be placed on the top, for example, and placing a value near the
  188. height of the applet it will scroll at the bottom.
  189.  
  190. With "textspeed" parameter you decide the scrolling speed.
  191.  
  192. With "textfont" you choose the font of text. Don't choose a strange or not
  193. standard font, not present in all systems.
  194. The most common fonts are "Arial", "TimesRoman" and "Courier".
  195. If the required font is not present, the most "near" will be used.
  196.  
  197. Setting "textbold" to "YES" you will enlarge a bit the font, otherwise set
  198. it to "NO" for normal contours.
  199.  
  200. With "textsize" you can change the size of text font.
  201. The most common sizes are: 8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72.
  202. Intermediate values will be scaled to nearest available size.
  203.  
  204. Setting "textshadow" to "YES", a shadow will be added to textscroll.
  205. Otherwise, setting it to "NO", any shadow will be "projected".
  206.  
  207. You can choose the color of text with:
  208.  
  209. TextColR = Red component of color (0-255)
  210. TextColG = Green component of color (0-255)
  211. TextColB = Blue component of color (0-255)
  212.  
  213. For example, 0,0,0 is black, 255,255,255 is white, 255,0,0 is red,
  214. 255,255,0 is yellow, 128,128,128 is grey.
  215. You can compose any color you want, do it trying manually or use any paint
  216. program's color selector to find Red Green Blue components of your desired
  217. colors.
  218.  
  219. With TextSColR,TextSColG,TextSColB you can select the color for text shadow.
  220.  
  221. If you like, you can activate the text jumping function.
  222. If "TextJumpAmp" is set to "0", any jumping will be shown.
  223. But increasing the value will result in text jumping: more aplitute, more
  224. high jumps.
  225.  
  226. With "TextJumpSpd" parameter you can select the jumping speed.
  227.  
  228. If you like, you can also activate the sine scroll function.
  229. If "TextSineAmp" is set to 0, no sine distortion will be generated.
  230. But increasing the value will result in the that the text is waving. The
  231. higher amplitude, the more waving.
  232.  
  233. With the "TextSineSpd" parameter you can select the speed of the wave.
  234.  
  235. With the "TextSineAngle" parameter you control how many degrees in a sinewave
  236. shape the text will be deformed for each pixel. A higher value gives more
  237. distortion.
  238.  
  239.                              ---------
  240.  
  241.  
  242. Compatibility parameters:
  243.  
  244.  
  245. The "memdelay" parameter is useful only to run the applets without problems
  246. on some bugged versions of Netscape 3, that don't deallocate correctly
  247. the memory allocated, resulting in filling all the memory after a minute
  248. the applet is running. This can cause also a system crash in some cases.
  249. Last versions of browsers have fixed this problem, but if you want to run
  250. the applets on old bugged browsers too, set "memdelay" to low values, like
  251. "10" or "16", for example.
  252. But this will slow down a lot the applet speed, so you have to choose
  253. between speed (memdelay set to 1000 or higher) or slow compatibility with
  254. old browsers (memdelay set to 20 or lower).
  255.  
  256. The "priority" parameter is useful mainly when you are running more than
  257. one applet in same page, and one slows down or hangs.
  258. If this applet run too slow or hangs because other one steal all the CPU
  259. power, try increasing the priority.
  260. Otherwise, if this applet runs well and others slows down, decrease the
  261. priority. Consider the min priority is 1, normal priority is 5, and the
  262. max priority is 10. Usually a priority of 3 is ok for single applets.
  263.  
  264. The "fixnetscape" parameter is useful only when the applet is visualized
  265. with Netscape 3, under Win95. In fact, Netscape has a bug displaying
  266. IndexColorModel, resulting in less colours than normal and dithering.
  267. Setting "fixnetscape" to "YES", the effect will run slower on all browsers,
  268. but will have correct colors on Netscape 3.0. Setting it to "NO", the effect
  269. will run faster on all browsers, except Netscape 3.0 that will display in
  270. worst way. Notice that Netscape 4 and Explorer haven't this problem.
  271.  
  272. The "MinSYNC" parameter must be set to a value between 8 and 16 to slow
  273. down animation in the case it runs too faster on faster computers or because
  274. the applet size is very small. The optimal value seems to be 10, but you can
  275. disable this feature placing a value of 0 if you see flickerings or excessive
  276. slow down.
  277. If the applets steal 100% of CPU power or slows down the browser and Operating
  278. System, try increasing MinSYNC until all runs ok.
  279. Usually values between 40 and 400 fixes all problems, even if applet slows
  280. down for compatibility.
  281.  
  282.                              ---------
  283.  
  284.  
  285. Copyright and distribution notices
  286.  
  287.  
  288. Fabio Ciucci is the author and owner of this applet.
  289. You can use freely this applet to enhance your web pages. But since I am
  290. the author of the applet, I placed a secret linkware window that will appear
  291. if the applet is clicked with mouse, only when the applet is online on a site:
  292. it is external to the web browser, so it will not hit the design of your
  293. beautyful html page.
  294. This small window will simply show my name and ask for a link to my java
  295. applets page.. the user can connect to it or cancel, or hide the window and
  296. connect after visiting all your pages.
  297. I hope this credit part is not a problem for you...
  298. In any case, if link is accepted a new browser window will appear and your
  299. page will remain on the original window, so you will not lost the visitor.
  300. Consider you will use an effect programmed by me, without pay, for FREE!
  301.  
  302. NOTE: You can include the applets archive on CD-ROMS or shareware collections
  303. and shareware sites without ask me, but only if you leave the archive(s)
  304. unchanged.
  305.  
  306.                              ---------
  307.  
  308.  
  309. Fabio Ciucci (Randy/Ram Jam)
  310.  
  311. fabioc@anfiteatro.it
  312.  
  313. http://www.anfiteatro.it/java.html
  314.  
  315.  
  316.