Skip to content

Documentation / scene / SpringParticle

Interface: SpringParticle ​

Defined in: libs/scene/src/animation/spring/spring_particle.ts:9

Represents a particle in the spring system

Properties ​

position ​

position: Vector3

Defined in: libs/scene/src/animation/spring/spring_particle.ts:11

Current position in world space


prevPosition ​

prevPosition: Vector3

Defined in: libs/scene/src/animation/spring/spring_particle.ts:13

Previous position for Verlet integration


originalPosition ​

originalPosition: Vector3

Defined in: libs/scene/src/animation/spring/spring_particle.ts:15

Original position for reset


animPosition ​

animPosition: Vector3

Defined in: libs/scene/src/animation/spring/spring_particle.ts:17

Animated (target) position for pose preservation


originalRotation ​

originalRotation: Quaternion

Defined in: libs/scene/src/animation/spring/spring_particle.ts:19

Original world rotation (for calculating rotation delta)


mass ​

mass: number

Defined in: libs/scene/src/animation/spring/spring_particle.ts:21

Mass of the particle (affects inertia)


damping ​

damping: number

Defined in: libs/scene/src/animation/spring/spring_particle.ts:23

Damping coefficient [0-1] (0 = no damping, 1 = full damping)


fixed ​

fixed: boolean

Defined in: libs/scene/src/animation/spring/spring_particle.ts:25

Whether this particle is fixed (anchor point)


node ​

node: SceneNode

Defined in: libs/scene/src/animation/spring/spring_particle.ts:27

Associated scene node (optional)


anchorNode? ​

optional anchorNode?: SceneNode

Defined in: libs/scene/src/animation/spring/spring_particle.ts:29

Optional alternate anchor node used as the fixed-position source


anchorOffset? ​

optional anchorOffset?: Vector3

Defined in: libs/scene/src/animation/spring/spring_particle.ts:31

Optional local-space offset evaluated from anchorNode


lastFramePosition ​

lastFramePosition: Vector3

Defined in: libs/scene/src/animation/spring/spring_particle.ts:33

Previous frame position (used to calculate velocity for inertial forces)


positionHistory? ​

optional positionHistory?: Vector3[]

Defined in: libs/scene/src/animation/spring/spring_particle.ts:35

Position history for rotation center estimation (for fixed particles)

Released under the MIT License.