Class: Emitter

SPE. Emitter

new Emitter(options)

The SPE.Emitter class.
Parameters:
Name Type Description
options EmitterOptions A map of options to configure the emitter.
Source:

Methods

disable() → {Emitter}

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.
Source:
Returns:
This emitter instance.
Type
Emitter

enable() → {Emitter}

Enables the emitter. If not already enabled, the emitter will start emitting particles.
Source:
Returns:
This emitter instance.
Type
Emitter

remove() → {Emitter}

Remove this emitter from it's parent group (if it has been added to one). Delgates to SPE.group.prototype.removeEmitter(). When called, all particle's belonging to this emitter will be instantly removed from the scene.
Source:
See:
  • SPE.Group.prototype.removeEmitter
Returns:
This emitter instance.
Type
Emitter

reset(forceopt) → {Emitter}

Resets all the emitter's particles to their start positions and marks the particles as dead if the `force` argument is true.
Parameters:
Name Type Attributes Description
force Boolean <optional>
If true, all particles will be marked as dead instantly.
Source:
Returns:
This emitter instance.
Type
Emitter

tick(dt)

Simulates one frame's 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:
Name Type Description
dt Number The number of seconds to simulate (deltaTime)
Source: