ParticleGroup Class
The ParticleGroup class. Creates a new group, containing a material, geometry, and mesh.
Constructor
ParticleGroup
-
options
Parameters:
-
options
ParticleGroupOptionsA map of options to configure the group instance.
Item Index
Methods
Attributes
Methods
addEmitter
-
emitter
Adds an ParticleEmitterControl instance to this group, creating particle values and assigning them to this group"s shader attributes.
Parameters:
-
emitter
ParticleEmitterControlThe emitter to add to this group.
addPool
-
numEmitters
-
emitterOptions
-
createNew
Add a pool of emitters to this particle group
Parameters:
-
numEmitters
NumberThe number of emitters to add to the pool.
-
emitterOptions
ParticleEmitterControlOptions | ArrayAn object, or array of objects, describing the options to pass to each emitter.
-
createNew
BooleanShould a new emitter be created if the pool runs out?
Returns:
This group instance.
dispose
()
ParticleGroup
Dipose the geometry and material for the group.
Returns:
ParticleGroup instance.
getFromPool
()
ParticleEmitterControl | Null
Fetch a single emitter instance from the pool.
If there are no objects in the pool, a new emitter will becreated if specified.
Returns:
getPool
()
Array
Get the pool array
Returns:
releaseIntoPool
-
emitter
Release an emitter into the pool.
Parameters:
-
emitter
ShaderParticleParticleEmitterControl
Returns:
This group instance.
removeEmitter
-
emitter
Removes an ParticleEmitterControl instance from this group.
When called, all particle"s belonging to the given emitter will be instantly removed from the scene.
Parameters:
-
emitter
ParticleEmitterControlThe emitter to add to this group.
tick
-
[dt=ParticleGroup"s fixedTimeStep value]
Simulate all the emitter"s belonging to this group, updating attribute values along the way.
Parameters:
-
[dt=ParticleGroup"s fixedTimeStep value]
Number optionalThe number of seconds to simulate the group"s emitters for(deltaTime)
triggerEmitter
-
numEmitters
-
[position=undefined]
Set a given number of emitters as alive, with an optional position vector3 to move them to.
Parameters:
-
numEmitters
NumberThe number of emitters to activate
-
[position=undefined]
Object optionalA Vector3 instance describing the position to activate the emitter(s) at.
Returns:
This group instance.