new ParticleSystem()
Creates a new ParticleSystem.
- Source:
Extends
Methods
-
<static> draw()
-
Updates the corresponding DOM element's style property.
- Source:
-
<static> getCSSText(props) → {string}
-
Concatenates a new cssText string.
Parameters:
Name Type Description propsObject A map of object properties. - Source:
Returns:
A string representing cssText.- Type
- string
-
init(world, opt_options=)
-
Initializes Particle.
Parameters:
Name Type Argument Default Description worldObject An instance of World. opt_options=Object <optional>
A map of initial properties. opt_options.widthnumber <optional>
0 Width opt_options.heightnumber <optional>
0 Height [opt_options.colorstring | Array = [255, 255, 255]] Color. opt_options.borderWidthnumber <optional>
0 Border width. opt_options.borderStylestring <optional>
'none' Border style. [opt_options.borderColorstring | Array = [255, 255, 255]] Border color. opt_options.borderRadiusnumber <optional>
0 Border radius. opt_options.isStaticboolean <optional>
true If set to true, particle system does not move. opt_options.lifespannumber <optional>
1000 The max life of the system. Set to -1 for infinite life. opt_options.lifenumber <optional>
0 The current life value. If greater than this.lifespan, system is destroyed. opt_options.burstnumber <optional>
1 The number of particles to create per burst. opt_options.burstRatenumber <optional>
1 The number of frames between bursts. Lower values = more particles. opt_options.emitRadiusnumber <optional>
3 The ParticleSystem adds this offset to the location of the Particles it creates. [opt_options.startColorArray = [255, 255, 255]] The starting color of the particle's palette range. [opt_options.endColorArray = [255, 0, 0]] The ending color of the particle's palette range. opt_options.particleOptionsObject <optional>
A map of options for particles created by system. - Source: