ColorRamp

ColorRamp

Particle modifier that blends a particle's color over time by interpolating through an arbitrary number of colors. Colors are distributed evenly along the timeline.

Constructor

new ColorRamp(configopt)

Description:
  • Initializes a color ramp modifier with evenly distributed color stops.
Source:
Parameters:
Name Type Attributes Default Description
config ColorRampConfig <optional>
{} ColorRampConfig configuration options.

Extends

Classes

ColorRamp

Members

id :string

Description:
  • Unique identifier. Defaults to a generated UUID.
Source:
Overrides:
Unique identifier. Defaults to a generated UUID.
Type:
  • string

Methods

update(particle, normalizedAge) → {void}

Description:
  • Blends a particle's color channels based on its normalized age.
Source:
Overrides:
Parameters:
Name Type Description
particle Particle Particle instance to affect.
normalizedAge number Normalized age of the particle (0.0 = emitted, 1.0 = dead).
Throws:
Error
Returns:
Type
void