Skip to content
party.js logoparty.js logo

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).

// 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 };
burstsoptionalEmissionBurst[]default[]

Groups of particles emitted all at once, each fired once per loop.

durationoptionalnumberdefault1

The length of one loop, in seconds. Must be positive and finite.

loopsoptionalnumberdefault1

How many loops the schedule runs. Use Infinity for an effect that runs until it’s ended or stopped.

rateoptionalLive<number>default0

How 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.