particles library

A data-oriented particle system: declarative ParticleEmitter presets, struct-of-arrays simulation, and batched single-draw-call rendering.

Classes

CallbackParticleRenderer
A renderer that delegates to a callback, for effects that need direct canvas access.
CircleEmitterShape
Spawns particles uniformly inside a circle, or on its edge when edgeOnly is true.
CircleParticleRenderer
Renders each particle as a circle, batched into a single draw call.
ColorRamp
A color gradient over a particle's lifetime.
EmitterBurst
A one-off release of count particles, time seconds after emission starts.
EmitterShape
The area, relative to the emitter's position, in which new particles spawn.
ParticleBuffer
Struct-of-arrays storage for the live particles of an emitter.
ParticleCurve
A scalar value that changes over a particle's lifetime.
ParticleEmitter
A declarative description of how particles are spawned and how they behave over their lifetime.
ParticleEmitterComponent
A component that spawns, simulates, and renders particles described by a ParticleEmitter.
ParticleRenderer
Draws the live particles of an emitter component.
PointEmitterShape
Spawns every particle exactly at the emitter's position.
RectangleEmitterShape
Spawns particles uniformly inside a rectangle centered on the emitter.
SpriteParticleRenderer
Renders each particle as a Sprite (a region of an image), batched into a single draw call.
TextureParticleRenderer
Base class for renderers that draw every particle as a transformed, tinted copy of a single texture region, batched into one Canvas.drawRawAtlas call.

Extensions

ParticleRangeExtension on ParticleRange
Sampling helper for ParticleRange.

Typedefs

ParticleRange = (double, double)
An inclusive range of doubles from which per-particle values are sampled.