Interface: SpringConfig
Configuration for a spring.
Properties
anchor
• anchor: Point
The anchor
is stored as a reference so it can be modified externally. Even though the
anchor can be any object with x
and y
properties, the common use case would be to pass
in a Position
aspect of another animated or static entity as the anchor so that the spring
would add an offset to that entity’s position.
dampingConstant
• dampingConstant: number
Damping constant, ie. how long does the spring oscillate.
impulseMultiplier
• impulseMultiplier: number
Multiplier applied to all addImpulse
calls.
springConstant
• springConstant: number
Spring constant, ie. the stiffness of the spring.