CallbackParticleRenderer class
A renderer that delegates to a callback, for effects that need direct canvas access.
Nothing is batched, so this is slower than the texture renderers; prefer those for large particle counts.
- Inheritance
-
- Object
- ParticleRenderer
- CallbackParticleRenderer
Constructors
- CallbackParticleRenderer(void renderCallback(Canvas canvas, ParticleBuffer particles))
-
Creates a renderer that calls
renderCallbackevery frame.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- renderCallback → void Function(Canvas canvas, ParticleBuffer particles)
-
Called every frame with the canvas, already transformed to the emitter
component's local coordinate system, and the live particles.
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
-
onLoad(
) → FutureOr< void> -
Called once when the owning component loads. Override to prepare
textures or other resources.
inherited
-
render(
Canvas canvas, ParticleBuffer particles) → void -
Renders all live particles in
particles. The canvas is already transformed to the emitter component's local coordinate system.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited