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.
-
ixIntParticle vectorxindex -
f0Float32Array (Vec3)Reference toParticleSystem.accumulatedForces -
p0Float32Array (Vec3)Reference toParticleSystem.positions -
p1Float32Array (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