Spring
Apply spring physics to a target number, vector, or colour, producing smooth following and elastic motion.
What it does
Spring runs a mass-spring-damper simulation that chases the value fed into Target instead of jumping to it. It works on a Number, Vec2, Vec3 or Colour, and the Value and Velocity outputs always match the type of Target. State carries across frames: each frame the current position is nudged toward the target according to Stiffness, Damping and Mass, so the motion overshoots, settles or oscillates depending on those three. The Settled output reports when the spring has come to rest.
When to use it
A value, position, colour or size easing into a new target rather than snapping: smooth camera or object follow.
Bouncy, elastic, overshooting motion on a UI element or an animated parameter.
A settled signal that triggers something else once motion has stopped.
A parameter driven from an expression or another node's output that should read as physical rather than stepped.
| Parameter | Type | Default |
|---|---|---|
target | OneOf([Number, Vec2, Vec3, Color]) | — |
stiffness | Number | 150 |
damping | Number | 12 |
mass | Number | 1 |
precision | Number | 0.010 |
enabled | Boolean | true |
Gotchas
Spring is stateful, holding position and velocity between frames. If the Target value or the node's identity changes drastically, by being disconnected and rewired for example, the chase resumes from where it last was rather than jumping.
Precision sets the velocity threshold for the Settled output, not visual accuracy. A low Precision means the spring must nearly stop moving before Settled goes true, so bouncy setups with low Damping can take a while to settle.
Turning Enabled off does not pause the spring. Target passes straight through unchanged, so Value jumps immediately to match Target rather than holding its last simulated position.
Worked example
Add a Spring node and wire a moving value (a position, a colour, or a Number from an expression) into Target.
Raise Stiffness for a snappier chase, or lower it for a lazier follow.
Raise Damping to settle out oscillation, or lower it to let the motion bounce and overshoot.
Use the Value output wherever the raw target would have gone: a transform, a colour, a parameter.
Wire Settled into a trigger or condition to know when the motion has come to rest.