MultiEmitter

fun MultiEmitter(modifier: Modifier, emitterCount: Int, emitterDelay: Long, emitterConfig: EmitterConfig, onAnimationFinished: () -> Unit = {})(source)

Orchestrates several ParticlesEmitter runs from a shared EmitterConfig, launched one after another with a fixed delay between them.

Use it for staggered bursts — for example a confetti cannon that fires emitterCount waves emitterDelay milliseconds apart. Each wave is an independent ParticlesEmitter using a copy of emitterConfig; finished waves are removed automatically, and onAnimationFinished fires once the final wave completes.

Parameters

modifier

the Modifier applied to each emitter wave.

emitterCount

how many emitter waves to launch in total.

emitterDelay

delay, in milliseconds, between the start of consecutive waves.

emitterConfig

the EmitterConfig shared by every wave (its id is overridden per wave).

onAnimationFinished

invoked once after the last wave has finished its animation.