ParticleCurve class Particles
A scalar curve over normalized time [0, 1], authored as keyframes and
baked once into a lookup table so per-particle, per-frame sample calls are
a cheap clamped table lerp rather than a keyframe search.
Particle properties that vary over a particle's life (size, rotation,
alpha, drag) read a curve keyed on age / lifetime; system parameters that
vary over the emitter's run (emit rate) read one keyed on system age. The
curve is piecewise-linear between keyframes and clamped to the first/last
value outside their range.
Constructors
-
ParticleCurve(List<
ParticleKeyframe> keyframes, {int resolution = 64}) -
Builds a curve from
keyframes, baked into aresolution-entry table. - ParticleCurve.constant(double value)
-
A curve that is
valueeverywhere. - ParticleCurve.linear({double from = 0.0, double to = 1.0})
-
A straight ramp from
fromatt = 0totoatt = 1.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
keyframes
→ List<
ParticleKeyframe> -
The source control points, sorted by time, retained so the curve can be
serialized and edited (the sample path uses the baked table).
final
- resolution → int
-
The number of baked lookup-table entries.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
sample(
double t) → double -
Samples the curve at normalized time
t(clamped into[0, 1]). -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited