FlipbookModule class Particles

Animates each particle's flipbook ParticleStorage.frame through a frameCount-cell atlas.

With framesPerSecond unset the sequence plays exactly once over the particle's life (frame = normalized age * frameCount), the natural mode for baked erosion/dissolve sequences. With it set, frames advance at that fixed rate and wrap, for looping atlases. randomStartFrame offsets each particle by a stable random frame so simultaneous spawns do not animate in lockstep; leave it off for once-over-life erosion sequences, which must start at frame zero.

Inheritance

Constructors

FlipbookModule({required int frameCount, double? framesPerSecond, bool randomStartFrame = false})
Creates a flipbook animator over frameCount cells.
const

Properties

frameCount int
The number of cells in the atlas (columns * rows).
final
framesPerSecond double?
Fixed playback rate; null plays the sequence once over each particle's life instead.
final
hashCode int
The hash code for this object.
no setterinherited
randomStartFrame bool
Whether each particle starts at a stable random frame offset (wrapped).
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
spawn(ParticleStorage storage, int index) → void
Initializes the freshly spawned particle at index.
inherited
toString() String
A string representation of this object.
inherited
update(ParticleStorage storage, double dt) → void
Advances every live particle by dt seconds.
override

Operators

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