init(mass:stiffness:damping:allowOverDamping:)
Creates a spring with the specified mass, stiffness, and damping.
Declaration
init(mass: Double = 1.0, stiffness: Double, damping: Double, allowOverDamping: Bool = false)Parameters
- mass:
Specifies that property of the object attached to the end of the spring.
- stiffness:
The corresponding spring coefficient.
- damping:
Defines how the spring’s motion should be damped due to the forces of friction.