A FENE (Finitely Extensible Nonlinear Elastic) spring force see: http://en.wikipedia.org/wiki/FENE
Parameters
dist
Number
current distance target is from source body
rMax
Number
maximum range of influence
Returns
Number
unscaled force
FENE(dist)
A Hookean spring force, linear in the displacement see: http://en.wikipedia.org/wiki/Hooke's_law
Parameters
dist
Number
current distance target is from source body
Returns
Number
unscaled force
Spring.DEFAULT_OPTIONS()ProtectedStatic
period()
The amount of time in milliseconds taken for one complete oscillation when there is no damping Range : [150, Infinity]
dampingRatio()
The damping of the spring. Range : [0, 1] 0 = no damping, and the spring will oscillate forever 1 = critically damped (the spring will never oscillate)
length()
The rest length of the spring Range : [0, Infinity]
length()
The maximum length of the spring (for a FENE spring) Range : [0, Infinity]
anchor()
The location of the spring's anchor, if not another physics body
forceFunction()
The type of spring force
setOptions(options)
Basic options setter
Parameters
options
Object
applyForce(targets)
Adds a spring force to a physics body's force accumulator.