PointForce
Defines a directional force that affects all particles in the system.
var repulsor = PointForce.create([0.0, 2.0, 3.0], {
type : Force.REPULSOR,
radius : 15.0,
intensity : 0.1
})
PointForce( position, [opts] )
src/forces/PointForce.js:14
-
positionArray (Vec3)Force position
-
[opts]ObjectOptions
typeInt (Enum)radiusFloatintensityFloat
applyForce( ix, f0, p0, p1 )
protected
src/forces/Force.js:67
Apply force to one particle in system.
-
ixIntParticle vector
xindex -
f0Float32Array (Vec3)Reference to
ParticleSystem.accumulatedForces -
p0Float32Array (Vec3)Reference to
ParticleSystem.positions -
p1Float32Array (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