ParticleEmitterControl Class

Module: Lights

The ParticleEmitterControl class.

Constructor

ParticleEmitterControl

(
  • options
)

Parameters:

Item Index

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:

ParticleEmitterControl:

This emitter instance.

enable

() ParticleEmitterControl

Enables the emitter. If not already enabled, the emitter will start emitting particles.

Returns:

ParticleEmitterControl:

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:

ParticleEmitterControl:

This emitter instance.

reset

(
  • [force=undefined]
)
ParticleEmitterControl

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 optional

    If true, all particles will be marked as dead instantly.

Returns:

ParticleEmitterControl:

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 Number

    The number of seconds to simulate (deltaTime)