CircleParticleRenderer class
Renders each particle as a circle, batched into a single draw call.
A circle texture is rasterized once when the renderer loads; every
particle is then a transformed, tinted copy of it. The circle's color
comes from the emitter's colorOverLife ramp (white when unset).
- Inheritance
-
- Object
- ParticleRenderer
- TextureParticleRenderer
- CircleParticleRenderer
Constructors
- CircleParticleRenderer({double softness = 0, BlendMode? blendMode, Paint? paint})
- Creates a circle renderer.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- paint → Paint
-
The paint used for the batched draw call.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- softness → double
-
How much the circle fades out towards its edge, from 0 (crisp) to 1
(fully soft).
final
- srcRect → Rect
-
The region of texture to draw, in texture pixels.
no setteroverride
- texture → Image?
-
The texture to draw, or null while the renderer has not loaded yet.
no setteroverride
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onLoad(
) → Future< void> -
Called once when the owning component loads. Override to prepare
textures or other resources.
override
-
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.inherited -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited