Skip to content

Documentation / scene / SpringSystemOptions

Interface: SpringSystemOptions

Defined in: libs/scene/src/animation/spring/spring_system.ts:20

Options for creating a SpringSystem

Properties

iterations?

optional iterations?: number

Defined in: libs/scene/src/animation/spring/spring_system.ts:22

Number of constraint solver iterations (default: 5)


gravity?

optional gravity?: Vector3

Defined in: libs/scene/src/animation/spring/spring_system.ts:24

Gravity force vector (default: (0, -9.8, 0))


wind?

optional wind?: Vector3

Defined in: libs/scene/src/animation/spring/spring_system.ts:26

Wind force vector (default: (0, 0, 0))


enableInertialForces?

optional enableInertialForces?: boolean

Defined in: libs/scene/src/animation/spring/spring_system.ts:28

Enable inertial forces (centrifugal/Coriolis) when root rotates (default: true)


centrifugalScale?

optional centrifugalScale?: number

Defined in: libs/scene/src/animation/spring/spring_system.ts:30

Centrifugal force multiplier (default: 1.0)


coriolisScale?

optional coriolisScale?: number

Defined in: libs/scene/src/animation/spring/spring_system.ts:32

Coriolis force multiplier (default: 1.0)


solver?

optional solver?: "verlet" | "xpbd"

Defined in: libs/scene/src/animation/spring/spring_system.ts:41

Constraint solver type (default: 'verlet').

  • 'verlet': Classic Verlet integration with iterative position correction. stiffness [0-1] controls correction strength per iteration.
  • 'xpbd': Extended Position-Based Dynamics (Müller et al. 2020). Uses compliance (inverse stiffness in m/N) for physically correct, iteration-count-independent constraint solving.

poseFollow?

optional poseFollow?: number

Defined in: libs/scene/src/animation/spring/spring_system.ts:47

How strongly particles are pulled toward current animated pose [0-1]. This preserves the authored hair shape while still allowing secondary motion. Higher values keep the original hairstyle better.


poseFollowRoot?

optional poseFollowRoot?: number

Defined in: libs/scene/src/animation/spring/spring_system.ts:52

Optional root-follow override [0-1]. If provided, pose follow is interpolated from root to tip.


poseFollowTip?

optional poseFollowTip?: number

Defined in: libs/scene/src/animation/spring/spring_system.ts:57

Optional tip-follow override [0-1]. If provided, pose follow is interpolated from root to tip.


poseFollowExponent?

optional poseFollowExponent?: number

Defined in: libs/scene/src/animation/spring/spring_system.ts:62

Exponent used when interpolating root-to-tip follow. 1 is linear; values \> 1 keep the root stiffer and the tip looser.


maxPoseOffset?

optional maxPoseOffset?: number

Defined in: libs/scene/src/animation/spring/spring_system.ts:67

Optional per-step limit for deviation from animated pose. 0 disables clamping. Useful to prevent extreme stretch under high acceleration.


maxPoseOffsetRoot?

optional maxPoseOffsetRoot?: number

Defined in: libs/scene/src/animation/spring/spring_system.ts:72

Optional root max-offset override. If provided, max offset is interpolated from root to tip.


maxPoseOffsetTip?

optional maxPoseOffsetTip?: number

Defined in: libs/scene/src/animation/spring/spring_system.ts:77

Optional tip max-offset override. If provided, max offset is interpolated from root to tip.

Released under the MIT License.