ColorRamp class

A color gradient over a particle's lifetime.

The gradient is baked into a lookup table when constructed, so evaluating it per particle per frame is a single array read.

Constructors

ColorRamp(List<Color> colors, {List<double>? stops})
Creates a ramp that interpolates through colors over the particle's lifetime.
ColorRamp.solid(Color color)
A ramp that keeps the same color over the whole lifetime.

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

colorAt(double t) → Color
The Color at life progress t, which is clamped to 0...1.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited
valueAt(double t) → int
The 32-bit ARGB value at life progress t, which is clamped to 0...1.

Operators

operator ==(Object other) → bool
The equality operator.
inherited