ReferenceCustom effectsInterface
EmissionSchedule
When and how many particles an effect emits.
When and how many particles an effect emits.
A schedule runs for duration seconds, loops times in a row. During that time, particles are emitted
continuously at rate per second, and each burst fires at its set time once per loop. The effect ends once
all loops have run and the last particle has expired (i.e. died).
Example
Section titled “Example”// A single burst of 40 particles.const scheduleA = { bursts: [{ count: 40 }] };
// A steady stream of 20 particles per second, running forever.const scheduleB = { loops: Infinity, rate: 20 };Properties
Section titled “Properties”burstsoptionalEmissionBurst[]default[]Groups of particles emitted all at once, each fired once per loop.
durationoptionalnumberdefault1The length of one loop, in seconds. Must be positive and finite.
loopsoptionalnumberdefault1How many loops the schedule runs. Use
Infinityfor an effect that runs until it’s ended or stopped.rateoptionalLive<number>default0How many particles to emit per second, continuously. This is read on every simulation step, so a function can speed the stream up or slow it down, or (for example) make it dependent on the screen size. While it’s 0, the stream pauses, and it picks up at the same pace once the rate is raised again, without making up for the time in between.