Spring Class
A spring, connecting two bodies. The Spring explicitly adds force and angularForce to the bodies and does therefore not put load on the constraint solver.
Constructor
Spring
(
-
bodyA
-
bodyB
-
[options]
Parameters:
-
bodyA
Body -
bodyB
Body -
[options]
Object optional-
[stiffness=100]
Number optionalSpring constant (see Hookes Law). A number >= 0.
-
[damping=1]
Number optionalA number >= 0. Default: 1
-
[localAnchorA]
Array optionalWhere to hook the spring to body A, in local body coordinates. Defaults to the body center.
-
[localAnchorB]
Array optional -
[worldAnchorA]
Array optionalWhere to hook the spring to body A, in world coordinates. Overrides the option "localAnchorA" if given.
-
[worldAnchorB]
Array optional
-