Skip to main content

Interface: LinearSpringOptions

Defined in: physics/components/linear-spring-component.ts:54

Options for addLinearSpringComponent.

Properties

anchorA?

optional anchorA?: Vector2

Defined in: physics/components/linear-spring-component.ts:61

Defaults to each body's center of mass.


anchorB?

optional anchorB?: Vector2

Defined in: physics/components/linear-spring-component.ts:66

Defaults to each body's center of mass.


bodyA

bodyA: RigidBody

Defined in: physics/components/linear-spring-component.ts:55


bodyB

bodyB: RigidBody

Defined in: physics/components/linear-spring-component.ts:56


restLength?

optional restLength?: number

Defined in: physics/components/linear-spring-component.ts:73

Defaults to the distance between the anchors at attach time, so a spring attached between two bodies already positioned where you want them to rest holds that distance without further tuning.


stiffness

stiffness: number

Defined in: physics/components/linear-spring-component.ts:75