Motion
Get Motion

ReferenceScripting APIMotionParticles

MotionParticles

interface

A particle layer's system (scene.particles): bursts, rates, pausing and clearing.

NameMotionParticles
Kindinterface
Script reaches it asMotionScene.particles()
Since0.4

Syntax

interface MotionParticles { … }

Properties

NameTypeDescription
alivepropertyreadonly numberHow many particles are alive, as its last step counted.
pausedpropertyreadonly booleanWhether its spawning is paused.

Methods

SignatureDescription
burst(count?: number, at?: { x: number; y: number } | [number, number], emitter?: string | number): voidmethodFires a burst of particles.
setRate(perSecond: number, emitter?: string | number): voidmethodSets how many particles an emitter makes a second, in place of its own rate.
resetRate(emitter?: string | number): voidmethodGives an emitter (or every one) its own rate back.
pause(): voidmethodStops the system making particles; those alive live out their lives.
resume(): voidmethodLets it make particles again.
clear(): voidmethodTakes every particle away at once, and the bursts waiting.