home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1997 October / PCO1097.ISO / FilesBBS / FREI / ANJAVAPP.EXE / FIRE / fire.txt < prev    next >
Encoding:
Text File  |  1997-08-24  |  10.3 KB  |  241 lines

  1.  
  2.             AnfyFire 2.1 - Copyright (C) by Fabio Ciucci 1996/97
  3.  
  4.  
  5. This applet can generate and animate a realtime "fire" effect, well know
  6. in the "demo scene" contest.
  7. Remember that are needed both fire.class and Lware.class.
  8. You must upload these 2 .class files and insert the <applet> tag on your
  9. html document to add this applet to your page.
  10. This applet is fully parametrized, so you can generate all kinds of fire
  11. you want. Here an example of what you have to write in the html (the
  12. things anfter the ; are comments with min-max values acceptet):
  13.  
  14.  
  15. <applet code="fire.class" width=140 height=256>  ; Name, Width, Height
  16. <param name=fwidth value="70">            ; width (1-1024)
  17. <param name=fheigth value="64">           ; height (1-1024)
  18. <param name=resx value="2">               ; horizontal resolution (1-8)
  19. <param name=resy value="4">               ; vertical resolution (1-8)
  20. <param name=fcut value="7">               ; fire cut start (1-127)
  21. <param name=fsub value="4">               ; fire cut value (1-127)
  22. <param name=deflight value="30">          ; minimal lightning at base (0-127)
  23. <param name=fmode value="2">              ; fire mode (1=rectangle 2=convex)
  24. <param name=rndrep value="4">             ; random gen. repeating (1-9)
  25. <param name=paletteR value="5">           ; red value (0-8)
  26. <param name=paletteG value="3">           ; green value (0-8)
  27. <param name=paletteB value="1">           ; blue value (0-8)
  28. <param name=textscroll value="firescr.txt"> ; File for scrolltext or "NO"
  29. <param name=textoffset value="140">         ; Txtscroll y offset
  30. <param name=textspeed value="1">          ; Txtscroll speed
  31. <param name=textfont value="Arial">       ; Txtscroll font name
  32. <param name=textbold value="NO">          ; Txtscroll bold ("YES" or "NO")
  33. <param name=textsize value="24">          ; Txtscroll font size
  34. <param name=textshadow value="YES">       ; Txtscroll shadow ("YES" or "NO")
  35. <param name=TextColR value="200">         ; Txtscroll color (red component)
  36. <param name=TextColG value="255">         ; Txtscroll color (green component)
  37. <param name=TextColB value="190">         ; Txtscroll color (blue component)
  38. <param name=TextSColR value="20">         ; Txtscroll shadow col. (red c.)
  39. <param name=TextSColG value="20">         ; Txtscroll shadow col. (green c.)
  40. <param name=TextSColB value="50">         ; Txtscroll shadow col. (blue c.)
  41. <param name=TextJumpAmp value="0">        ; Txtscroll jump aplitude
  42. <param name=TextJumpSpd value="0">        ; Txtscroll jump speed
  43. <param name=memdelay value="1000">        ; Memory deallocation delay
  44. <param name=priority value="3">           ; Task priority (1..10)
  45. <param name=fixnetscape value="NO">       ; Fix Netscape 3.0 bug ("YES","NO")
  46. Sorry, your browser doesn't suppor Java.  ; Message for no java browsers.
  47. </applet>                                 ; End of applet tag
  48.  
  49.  
  50. NOTE: Don't place "; comments" on final HTML!!!
  51.  
  52. Copy and paste in your html document this cleared and correct tag:
  53.  
  54.  
  55. <applet code="fire.class" width=140 height=256>
  56. <param name=fwidth value="70">
  57. <param name=fheigth value="64">
  58. <param name=resx value="2">
  59. <param name=resy value="4">
  60. <param name=fcut value="7">
  61. <param name=fsub value="4">
  62. <param name=deflight value="30">
  63. <param name=fmode value="2">
  64. <param name=rndrep value="4">
  65. <param name=paletteR value="5">
  66. <param name=paletteG value="3">
  67. <param name=paletteB value="1">
  68. <param name=textscroll value="firescr.txt">
  69. <param name=textoffset value="1">
  70. <param name=textspeed value="1">
  71. <param name=textfont value="Arial">
  72. <param name=textbold value="NO">
  73. <param name=textsize value="18">
  74. <param name=textshadow value="NO">
  75. <param name=TextColR value="255">
  76. <param name=TextColG value="55">
  77. <param name=TextColB value="0">
  78. <param name=TextSColR value="20">
  79. <param name=TextSColG value="20">
  80. <param name=TextSColB value="50">
  81. <param name=TextJumpAmp value="0">
  82. <param name=TextJumpSpd value="0">
  83. <param name=memdelay value="1000">
  84. <param name=priority value="3">
  85. <param name=fixnetscape value="NO">
  86. Sorry, your browser doesn't suppor Java.
  87. </applet>
  88.  
  89.  
  90.                              ---------
  91.  
  92.  
  93. Here detailed instructions about how to change parameters:
  94.  
  95.  
  96. fwidth and fheight determine the "internal" width and heigth of the fire,
  97. but will be "real" size only is resx=1 and resy=1. In fact, resx and resy
  98. are a sort of "scalers" or "zoomers", or "stretchers", if you prefer: if
  99. fwidth and fheigth are set to 8 and 10, and resx=2 & resy=2, you will have
  100. a "real" size of 16 x 20. The real size is fwidth*resx X pheight*resy.
  101. This effect is better when resy is greater than resx.
  102.  
  103. About the fire cutting values fcut and fsub, consider fcut must be higher
  104. than fsub, and some values will generate wrong effects. Range is 1-127.
  105.  
  106. The deflight (0-127) determine the minimal light at the base of fire... so
  107. placing it to 0 the fire will have more black holes than placing it as 127.
  108.  
  109. If you like the fire as a rectangular block, set fmode=1, otherwise set it
  110. to 2, to have a convex (conical) flame.
  111.  
  112. You can decide the smoothing of random generator with rndrep (1-9)... with
  113. lower values you will have less smoothed flames, and vice-versa.
  114.  
  115. About the palette, there are 3 values for Red Green Blue (RGB), that can
  116. go from 0 (none) to 8 (full), and are named paletteR, paletteG, paletteB.
  117. So you can generate red (fire), green (magic), blue (gas) flames... there
  118. are 700 combinations possible, just select your preferred.
  119.  
  120.  
  121.                              ---------
  122.  
  123.  
  124. Optional Scrolltext parameters:
  125.  
  126.  
  127. You can optionally activate a scrolltext that will scroll over the applet.
  128. If you don't need the scrolltext, deactivate it placing "NO" at the
  129. "textscroll" parameter.
  130. Otherwise you must supply the name of an ASCII text file, where you must
  131. write the text that you want to be scrolled.
  132. Is supported one only line of text, that can be long as you want.
  133. Remember to upload the text file too, if you activate the scrolltext!
  134.  
  135. If activated, here are the parameters:
  136.  
  137. With "textoffset" you choose the Y offset from the top: placing it to 0 the
  138. scroll will be placed on the top, for example, and placing a value near the
  139. height of the applet it will scroll at the bottom.
  140.  
  141. With "textspeed" parameter you decide the scrolling speed.
  142.  
  143. With "textfont" you choose the font of text. Don't choose a strange or not
  144. standard font, not present in all systems.
  145. The most common fonts are "Arial", "TimesRoman" and "Courier".
  146. If the required font is not present, the most "near" will be used.
  147.  
  148. Setting "textbold" to "YES" you will enlarge a bit the font, otherwise set
  149. it to "NO" for normal contours.
  150.  
  151. With "textsize" you can change the size of text font.
  152. The most common sizes are: 8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72.
  153. Intermediate values will be scaled to nearest available size.
  154.  
  155. Setting "textshadow" to "YES", a shadow will be added to textscroll.
  156. Otherwise, setting it to "NO", any shadow will be "projected".
  157.  
  158. You can choose the color of text with:
  159.  
  160. TextColR = Red component of color (0-255)
  161. TextColG = Green component of color (0-255)
  162. TextColB = Blue component of color (0-255)
  163.  
  164. For example, 0,0,0 is black, 255,255,255 is white, 255,0,0 is red,
  165. 255,255,0 is yellow, 128,128,128 is grey.
  166. You can compose any color you want, do it trying manually or use any paint
  167. program's color selector to find Red Green Blue components of your desired
  168. colors.
  169.  
  170. With TextSColR,TextSColG,TextSColB you can select the color for text shadow.
  171.  
  172. If you like, you can activate the text jumping function.
  173. If "TextJumpAmp" is set to "0", any jumping will be shown.
  174. But increasing the value will result in text jumping: more aplitute, more
  175. high jumps.
  176.  
  177. With "TextJumpSpd" parameter you can select the jumping speed.
  178.  
  179.  
  180.                              ---------
  181.  
  182.  
  183. Compatibility parameters:
  184.  
  185.  
  186. The "memdelay" parameter is useful only to run the applets without problems
  187. on some bugged versions of Netscape 3, that don't deallocate correctly
  188. the memory allocated, resulting in filling all the memory after a minute
  189. the applet is running. This can cause also a system crash in some cases.
  190. Last versions of browsers have fixed this problem, but if you want to run
  191. the applets on old bugged browsers too, set "memdelay" to low values, like
  192. "10" or "16", for example.
  193. But this will slow down a lot the applet speed, so you have to choose
  194. between speed (memdelay set to 1000 or higher) or slow compatibility with
  195. old browsers (memdelay set to 20 or lower).
  196.  
  197. The "priority" parameter is useful mainly when you are running more than
  198. one applet in same page, and one slows down or hangs.
  199. If this applet run too slow or hangs because other one steal all the CPU
  200. power, try increasing the priority.
  201. Otherwise, if this applet runs well and others slows down, decrease the
  202. priority. Consider the min priority is 1, normal priority is 5, and the
  203. max priority is 10. Usually a priority of 3 is ok for single applets.
  204.  
  205. The "fixnetscape" parameter is useful only when the applet is visualized
  206. with Netscape 3, under Win95. In fact, Netscape has a bug displaying
  207. IndexColorModel, resulting in less colours than normal and dithering.
  208. Setting "fixnetscape" to "YES", the effect will run slower on all browsers,
  209. but will have correct colors on Netscape 3.0. Setting it to "NO", the effect
  210. will run faster on all browsers, except Netscape 3.0 that will display in
  211. worst way. Notice that Netscape 4 and Explorer haven't this problem.
  212.  
  213.  
  214.                              ---------
  215.  
  216.  
  217. Copyright and distribution notices
  218.  
  219.  
  220. Fabio Ciucci is the author and owner of this applet.
  221. You can use freely this applet to enhance your web pages. But since I am
  222. the author of the applet, I placed a secret window that will appear if the
  223. applet is clicked with mouse: it is external to the web browser, so it will
  224. not hit the design of your beautyful html page. This small window will
  225. simply show my name and ask for a link to my java applets page.. the user
  226. can connect to it or cancel, or hide the window and connect after visiting
  227. all your pages. I hope this credit part is not a problem for you...
  228. In any case, if link is accepted a new browser window will appear and your
  229. page will remain on the original window, so you will not lost the visitor.
  230. Consider you will use an effect programmed by me, without pay, for FREE!
  231.  
  232.  
  233.  
  234. Fabio Ciucci (Randy/Ram Jam)
  235.  
  236. fabioc@anfiteatro.it
  237.  
  238. http://www.anfiteatro.it/java.html
  239.  
  240.  
  241.