Phaser API Documentation

  Version: 
Filter

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.

Constructor:

new EmitterColorOp(key)

Parameters:

name type description
key string

The name of the property.

Since: 3.60.0

Members

b: Array.<number>
Focus
Focus

Description:

An array containing the blue color values.

Populated during the setMethods method.

Type:
Array.<number>
Since: 3.60.0
Focus
Focus
g: Array.<number>
Focus
Focus

Description:

An array containing the green color values.

Populated during the setMethods method.

Type:
Array.<number>
Since: 3.60.0
Focus
Focus
r: Array.<number>
Focus
Focus

Description:

An array containing the red color values.

Populated during the setMethods method.

Type:
Array.<number>
Since: 3.60.0
Focus
Focus

Methods

easeValueUpdate(particle, key, t)
Focus
Focus

Description:

An onUpdate callback that returns an eased value between the Phaser.GameObjects.Particles.EmitterColorOp#start and Phaser.GameObjects.Particles.EmitterColorOp#end range.

Parameters:

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).

Returns:
Description:

The new value of the property.

Type:
  • number
Since: 3.60.0
Focus
Focus
easedValueEmit(particle, key)
Focus
Focus

Description:

An onEmit callback for an eased property.

It prepares the particle for easing by Phaser.GameObjects.Particles.EmitterColorOp#easeValueUpdate.

Parameters:

name type description
particle Phaser.GameObjects.Particles.Particle

The particle.

key string

The name of the property.

Returns:
Description:

{@link Phaser.GameObjects.Particles.EmitterColorOp#start}, as the new value of the property.

Type:
  • number
Since: 3.60.0
Focus
Focus
getMethod()
Focus
Focus

Description:

Checks the type of EmitterOp.propertyValue to determine which method is required in order to return values from this op function.

Returns:
Description:

A number between 0 and 9 which should be passed to setMethods.

Type:
  • number
Since: 3.60.0
Focus
Focus
setEase(ease)
Focus
Focus

Description:

Sets the Ease function to use for Color interpolation.

Parameters:

name type description
ease string

The string-based name of the Ease function to use.

Since: 3.60.0
Focus
Focus
setMethods()
Focus
Focus

Description:

Sets the EmitterColorOp method values, if in use.

Returns:
Description:

This Emitter Op object.

Since: 3.60.0
Focus
Focus