new Debris(opt_options=)
Creates a new Debris.
Parameters:
Name | Type | Argument | Default | Description |
---|---|---|---|---|
opt_options= |
Object |
<optional> |
A map of initial properties. | |
opt_options.sizeMin |
number |
<optional> |
1 | Minimum particle size. |
opt_options.sizeMax |
number |
<optional> |
3 | Maximum particle size. |
opt_options.speedMin |
number |
<optional> |
1 | Minimum particle speed. |
opt_options.speedMax |
number |
<optional> |
20 | Maximum particle speed. |
opt_options.opacityMin |
number |
<optional> |
0.1 | Minimum opacity. |
opt_options.opacityMax |
number |
<optional> |
0.2 | Maximum opacity. |
opt_options.lifespanMin |
number |
<optional> |
70 | Minimum lifespan. |
opt_options.lifespanMax |
number |
<optional> |
120 | Maximum lifespan. |
opt_options.colorMin |
number |
<optional> |
100 | Minimum color. Valid values bw 0 - 255. |
opt_options.colorMax |
number |
<optional> |
200 | Maximum color. Valid values bw 0 - 255. |
Methods
-
<private> _beforeStep()
-
Called before each step function.
-
configure(opt_options=)
-
Configures an instance of Debris.
Parameters:
Name Type Argument Default Description opt_options=
Object <optional>
A map of options. opt_options.parent
Object <optional>
null The Debris' parent.