ParticleType enum

The shape and rendering method used for drawing particles.

Inheritance
Available extensions

Values

circle → const ParticleType

Renders particles by calling Canvas.drawCircle for each particle.

This rendering method is visually accurate but computationally more expensive than atlas.

atlas → const ParticleType

Renders particles from a prerasterized atlas scaled to the particle size.

This rendering method is faster than circle but it's not visually accurate. At low blur levels, large particle sizes, and certain BlendModes it may look different from circle. It is therefore not a drop-in replacement for circle. The plasma effect should be intentionally tuned for the atlas mode.

The atlas image is regenerated every time the value of PlasmaRenderer.blur changes. If the blur level is being animated, this method will fallback to circle on every frame and therefore not have any performance benefit.

Choose this method if:

  • PlasmaRenderer.blendMode produces the desired effect with atlases.
  • Blur is high enough or particle size is small enough to hide atlas pixelation, or if pixelation is not a concern.
  • Blur value does not change during the animation.

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
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
toString() String
A string representation of this object.
inherited

Operators

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

Constants

values → const List<ParticleType>
A constant List of the values in this enum, in order of their declaration.