DirectionalForce
Defines a directional force that affects all particles in the system.
var gravity = DirectionalForce.create([0.0, -0.1, 0.0])
applyForce
( ix, f0, p0, p1
)
protected
src/forces/Force.js:67
Apply force to one particle in system.
-
ix
IntParticle vectorx
index -
f0
Float32Array (Vec3)Reference toParticleSystem.accumulatedForces
-
p0
Float32Array (Vec3)Reference toParticleSystem.positions
-
p1
Float32Array (Vec3)Reference toParticleSystem.positionsPrev
type
Int (Enum)
src/forces/Force.js:43
Force type enum: Force.ATTRACTOR
, Force.REPULSOR
, Force.ATTRACTOR_REPULSOR
.
Default: Force.ATTRACTOR