ReferenceBehaviorsFunction
gravity()
Pulls particles down with a constant acceleration.
function gravity(strength: number): Behavior;Creates a behavior that continuously accelerates a particle downward by a constant amount, simulating gravity.
Parameters
Section titled “Parameters”strengthnumberThe downward acceleration, in px/s². A positive value pulls towards -y in particle space, which is down in screen space.