Particle Emitter
A Compose Multiplatform particle-effects library for Android, iOS, JVM desktop, and web (JS/Wasm). It ships two complementary rendering engines:
CanvasParticleEmitter —
Canvas-based, high-performance rendering tuned for 1 000+ lightweight particles (circles, images, text, paths).ParticlesEmitter — Compose layout-based, where every particle is an arbitrary
@Composable, so you can fling text, images, or whole UI elements.
Both engines share a physics model: directional gravity, configurable spread, initial force, rotation, scale/alpha animation, and per-engine edge handling.
Quick start
CanvasParticleEmitter(
modifier = Modifier.fillMaxSize(),
config = CanvasEmitterConfig(
particlePerSecond = 50,
emitterCenter = DpOffset(200.dp, 400.dp),
startRegionShape = CanvasEmitterConfig.Shape.POINT,
startRegionSize = DpSize(0.dp, 0.dp),
particleShapes = listOf(ParticleShape.Circle),
lifespanRange = 800..1200,
fadeOutTime = 600..1000,
scaleTime = 800..1200,
colors = listOf(Color.Cyan, Color.Magenta, Color.Yellow),
particleSizes = listOf(DpSize(8.dp, 8.dp), DpSize(12.dp, 12.dp)),
),
)See the project README for gravity, edge-behavior, and multi-emitter recipes, and PERFORMANCE.md for particle-count budgets per target frame rate.
Packages
Public API of the library: the two emitter composables (CanvasParticleEmitter, ParticlesEmitter), the MultiEmitter orchestrator, their configuration types (CanvasEmitterConfig, EmitterConfig), and the supporting value types ParticleShape and EdgeBehavior.