This class is responsible for taking control over the color property in the Particle class and managing its emission and updating functions.
See the ParticleEmitter
class for more details on emitter op configuration.
new EmitterColorOp(key)
name | type | description |
---|---|---|
key | string |
The name of the property. |
An array containing the blue color values.
Populated during the setMethods
method.
An array containing the green color values.
Populated during the setMethods
method.
An array containing the red color values.
Populated during the setMethods
method.
An onUpdate
callback that returns an eased value between the
Phaser.GameObjects.Particles.EmitterColorOp#start and Phaser.GameObjects.Particles.EmitterColorOp#end
range.
name | type | description |
---|---|---|
particle | Phaser.GameObjects.Particles.Particle |
The particle. |
key | string |
The name of the property. |
t | number |
The current normalized lifetime of the particle, between 0 (birth) and 1 (death). |
The new value of the property.
An onEmit
callback for an eased property.
It prepares the particle for easing by Phaser.GameObjects.Particles.EmitterColorOp#easeValueUpdate.
name | type | description |
---|---|---|
particle | Phaser.GameObjects.Particles.Particle |
The particle. |
key | string |
The name of the property. |
{@link Phaser.GameObjects.Particles.EmitterColorOp#start}, as the new value of the property.
Checks the type of EmitterOp.propertyValue
to determine which
method is required in order to return values from this op function.
A number between 0 and 9 which should be passed to setMethods
.
Sets the Ease function to use for Color interpolation.
name | type | description |
---|---|---|
ease | string |
The string-based name of the Ease function to use. |
Sets the EmitterColorOp method values, if in use.
This Emitter Op object.