Force
Base class for defining forces.
Force
( vector, [opts]
)
src/forces/Force.js:18
-
vector
Array (Vec3) -
[opts]
ObjectOptions
type
Int (Enum)
applyForce
( ix, f0, p0, p1
)
protected
src/forces/Force.js:67
Apply force to one particle in system.
-
ix
IntParticle vector
x
index -
f0
Float32Array (Vec3)Reference to
ParticleSystem.accumulatedForces
-
p0
Float32Array (Vec3)Reference to
ParticleSystem.positions
-
p1
Float32Array (Vec3)Reference to
ParticleSystem.positionsPrev
type
Int (Enum)
src/forces/Force.js:43
Force type enum: Force.ATTRACTOR
, Force.REPULSOR
, Force.ATTRACTOR_REPULSOR
.
Default: Force.ATTRACTOR