ParticleSystem

ParticleSystem()

实现粒子系统。继承自 BaseParticleSystem 类。 粒子通常用于实现火焰、烟雾、水等可视化效果。
See:

Methods

getCapacity()

Gets the maximum number of particles active at the same time.
Returns:
The max number of active particles.

isAlive()

Gets whether there are still active particles in the system.
Returns:
True if it is alive, otherwise false.

isReady()

Is this system ready to be used/rendered
Returns:
true if the system is ready

isStarted()

Gets if the system has been started. (Note: this will still be true after stop is called)
Returns:
True if it has been started, otherwise false.

isStopping()

Gets a boolean indicating that the system is stopping
Returns:
true if the system is currently stopping

reset()

Remove all active particles

start(delay)

Starts the particle system and begins to emit
Name Type Description
delay Number defines the delay in milliseconds before starting the system (this.startDelay by default)
Default Value: 0

stop(stopSubEmitters)

Stops the particle system.
Name Type Description
stopSubEmitters Boolean if true it will stop the current system and all created sub-Systems if false it will stop the current root system only, this param is used by the root particle system only. the default value is true.
Default Value: false