ParticleEmitterControl Class
The ParticleEmitterControl class.
Constructor
ParticleEmitterControl
-
options
Parameters:
-
options
ParticleEmitterControlOptionsA map of options to configure the emitter.
Methods
disable
()
ParticleEmitterControl
Disables th emitter, but does not instantly remove it's particles fromt the scene. When called, the emitter will be "switched off" and just stop emitting.
Any particle"s alive will be allowed to finish their lifecycle.
Returns:
This emitter instance.
enable
()
ParticleEmitterControl
Enables the emitter. If not already enabled, the emitter will start emitting particles.
Returns:
This emitter instance.
remove
()
ParticleEmitterControl
Remove this emitter from it's parent group (if it has been added to one).
Delgates to group.prototype.removeEmitter().
When called, all particle"s belonging to this emitter will be instantly removed from the scene.
Returns:
This emitter instance.
reset
-
[force=undefined]
Resets all the emitter"s particles to their start positions and marks the particles as dead if the force argument is true.
Parameters:
-
[force=undefined]
Boolean optionalIf true, all particles will be marked as dead instantly.
Returns:
This emitter instance.
tick
-
dt
Simulates one frame worth of particles, updating particles that are already alive, and marking ones that are currently dead but should be alive as alive.
If the emitter is marked as static, then this function will do nothing.
Parameters:
-
dt
NumberThe number of seconds to simulate (deltaTime)