AnimatedSpriteParticleRenderer class

Renders particles as animated sprites, advancing through frames over the particle's lifetime.

frames is the ordered list of source rectangles from sheet that form the animation.

Inheritance

Constructors

AnimatedSpriteParticleRenderer({required Image sheet, required List<Rect> frames})
Draws each particle as one of frames (at least one, asserted) of sheet, stepping through them evenly over its lifetime, in a square as wide as the particle's size, tinted by its colour.

Properties

frames → List<Rect>
Ordered source rectangles for each animation frame.
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sheet → Image
The sprite sheet image.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
render(Canvas canvas, Particle particle) → void
Draw a single particle onto canvas.
override
renderBatch(Canvas canvas, List<Particle> particles) → void
Draw all particles onto canvas.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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