ReferenceSamplersInterface
SamplerContext
Information passed to a sampler function.
Information passed to a SamplerFn each time it is called.
Properties
Section titled “Properties”batchoptionalobjectWhen sampling particle properties, multiple particles spawned in one simulation step are batched, in which case this field contains information on the batch. Otherwise this field will be absent.
batch.indexnumberThe particle’s position in the batch, starting at 0.
batch.sizenumberHow many particles will be spawned at once.
indexnumberA running count. For a particle’s properties, it’s the number of particles the effect has spawned before this one. For a burst’s
count, it’s the current loop of the EmissionSchedule.rngRngThe effect’s random number generator. Use it instead of
Math.random()to keep seeded effects reproducible.