The name of the property.
The default value of the property.
OptionalemitOnly: booleanWhether the property can only be modified when a Particle is emitted. Default false.
Set to false to disable this EmitterOp.
The step counter for stepped easing, per emit.
The most recently calculated value. Updated every time an emission or update method is called. Treat as read-only.
The default value of this property.
This can be a simple value, an array, a function or an onEmit configuration object.
The counter direction. 0 for up and 1 for down.
The easing function to use for updating this property, if any.
Whether this property can only be modified when a Particle is emitted.
Set to true to allow only Phaser.GameObjects.Particles.EmitterOp#onEmit callbacks to be set and
affect this property.
Set to false to allow both Phaser.GameObjects.Particles.EmitterOp#onEmit and
Phaser.GameObjects.Particles.EmitterOp#onUpdate callbacks to be set and affect this property.
The end value for this property to ease between.
The interpolation function to use for updating this property, if any.
The onEmit method type of this EmitterOp.
Set as part of setMethod and cached here to avoid
re-setting when only the value changes.
The callback to run for Particles when they are emitted from the Particle Emitter.
The callback to run for Particles when they are updated.
The name of this property.
The current value of this property.
This can be a simple value, an array, a function or an onEmit configuration object.
The start value for this property to ease between.
If an interpolation this holds a reference to the number data array.
The number of steps for stepped easing between Phaser.GameObjects.Particles.EmitterOp#start and Phaser.GameObjects.Particles.EmitterOp#end values, per emit.
When the step counter reaches it's maximum, should it then yoyo back to the start again, or flip over to it?
The returned value sets what the property will be at the START of the particles life, on emit.
The returned value updates the property for the duration of the particles life.
The particle.
The name of the property.
The current normalized lifetime of the particle, between 0 (birth) and 1 (death).
The current value of the property.
Destroys this EmitterOp instance and all of its references.
Called automatically when the ParticleEmitter that owns this EmitterOp is destroyed.
An onEmit callback for an eased property.
It prepares the particle for easing by Phaser.GameObjects.Particles.EmitterOp#easeValueUpdate.
The particle.
The name of the property.
An onUpdate callback that returns an eased value between the
Phaser.GameObjects.Particles.EmitterOp#start and Phaser.GameObjects.Particles.EmitterOp#end
range.
The particle.
The name of the property.
The current normalized lifetime of the particle, between 0 (birth) and 1 (death).
Checks the type of EmitterOp.propertyValue to determine which
method is required in order to return values from this op function.
Check whether an object has the given property.
The object to check.
The key of the property to look for in the object.
Check whether an object has both of the given properties.
The object to check.
The key of the first property to check the object for.
The key of the second property to check the object for.
Check whether an object has at least one of the given properties.
The object to check.
The key of the first property to check the object for.
The key of the second property to check the object for.
Load the property from a Particle Emitter configuration object.
Optionally accepts a new property key to use, replacing the current one.
Optionalconfig: ParticleEmitterConfigSettings for the Particle Emitter that owns this property.
OptionalnewKey: stringThe new key to use for this property, if any.
Change the current value of the property and update its callback methods.
The new numeric value of this property.
The returned value sets what the property will be at the START of the particles life, on emit.
This method is only used when you have provided a custom emit callback.
The particle.
The name of the property.
Optionalvalue: numberThe current value of the property.
The returned value updates the property for the duration of the particles life.
This method is only used when you have provided a custom update callback.
The particle.
The name of the property.
The current normalized lifetime of the particle, between 0 (birth) and 1 (death).
The current value of the property.
An onEmit callback that returns a value between the Phaser.GameObjects.Particles.EmitterOp#start and
Phaser.GameObjects.Particles.EmitterOp#end range.
The particle.
The key of the property.
An onEmit callback that returns a value between the Phaser.GameObjects.Particles.EmitterOp#start and
Phaser.GameObjects.Particles.EmitterOp#end range.
The particle.
The key of the property.
An onEmit callback that returns a random value from the current value array.
Update the Phaser.GameObjects.Particles.EmitterOp#onEmit and
Phaser.GameObjects.Particles.EmitterOp#onUpdate callbacks based on the method returned
from getMethod. The method is stored in the EmitterOp.method property
and is a number between 0 and 9 inclusively.
An onEmit callback that returns the current value of the property.
An onUpdate callback that returns the current value of the property.
An onEmit callback that returns a stepped value between the
Phaser.GameObjects.Particles.EmitterOp#start and Phaser.GameObjects.Particles.EmitterOp#end
range.
Build a JSON representation of this Particle Emitter property.
This class is responsible for taking control over a single property in the Particle class and managing its emission and updating functions.
Particles properties such as
x,y,scaleX,lifespanand others all use EmitterOp instances to manage them, as they can be given in a variety of formats: from simple values, to functions, to dynamic callbacks.See the
ParticleEmitterclass for more details on emitter op configuration.