This is a simple applet to generate animated rainbow horisontal bars like those you can see above.
It generates the rainbow image to animate on fly rather then to download it from server and currently supports two methods of image generation.
The parameters are:
There are also animation parameters supported. They are:
The overall description of class is following:
Class name: RunningRainbow.class;
Class type: Applet;
Example of implementation:
<applet code=RunningRainbow.class width=100% height=2>
<param name="delay" value="100">
<param name="shift" value="2">
<param name="direction" value="left">
<param name="method" value="gaussian">
<param name="sb" value="0.2">
<param name="sg" value=".3">
<param name="sr" value=".5">
<param name="ar" value="0.5">
<param name="ag" value="0.5">
<param name="ab" value="0.5">
You should see an applet here if your browser supports Java.
</applet>
Parameters:
Parameter | Type | Description | Possible Values | Default Value | Comments |
---|---|---|---|---|---|
delay | Integer | delay of animation | 10 - 1000 | 100 | |
shift | Integer | shift of animation | 0 - ... | 2 | |
direction | String | direction of animation | ["left" | "right"] | "left" | |
method | Integer | method of rainbow rendering | ["gaussian" | "trapezoid"] | "trapezoid" | |
ar | Double | mean value of red component | [0 - 1] | 0.0 | "gaussian" method only |
ag | Double | mean value of green component | [0 - 1] | 0.5 | "gaussian" method only |
ab | Double | mean value of blue component | [0 - 1] | 1.0 | "gaussian" method only |
sr | Double | dispersion of red component | [0 - 1] | 0.5 | "gaussian" method only |
sg | Double | dispersion of green component | [0 - 1] | 0.5 | "gaussian" method only |
sb | Double | dispersion of blue component | [0 - 1] | 0.5 | "gaussian" method only |
The source,
Get the whole package,
See another test,
Return to my Homepage.