ReferenceScripting APIMotionParticles
MotionParticles
interfaceA particle layer's system (scene.particles): bursts, rates, pausing and clearing.
| Name | MotionParticles |
|---|---|
| Kind | interface |
| Script reaches it as | MotionScene.particles() |
| Since | 0.4 |
Syntax
interface MotionParticles { … }Properties
| Name | Type | Description |
|---|---|---|
aliveproperty | readonly number | How many particles are alive, as its last step counted. |
pausedproperty | readonly boolean | Whether its spawning is paused. |
Methods
| Signature | Description |
|---|---|
burst(count?: number, at?: { x: number; y: number } | [number, number], emitter?: string | number): voidmethod | Fires a burst of particles. |
setRate(perSecond: number, emitter?: string | number): voidmethod | Sets how many particles an emitter makes a second, in place of its own rate. |
resetRate(emitter?: string | number): voidmethod | Gives an emitter (or every one) its own rate back. |
pause(): voidmethod | Stops the system making particles; those alive live out their lives. |
resume(): voidmethod | Lets it make particles again. |
clear(): voidmethod | Takes every particle away at once, and the bursts waiting. |
Notes from the community
Written by creators and checked by the docs' editors. Not part of Motion's official reference.