Animate · Modules | Program

Modules · Interface · Animate

Drive a value smoothly over time. Animate turns a start and a target into a reactive value that moves between them over a duration in milliseconds, shaping the motion with the same easeIn / easeOut controls as Maths.Real.Ease . The core driver Animate.Real yields a Maths.Real progress that the other drivers build on to tween integers, colours and booleans, and there are timed helpers that flip a value's lock or error state after a delay.

Holds a start value, then switches to an end value once a delay elapses.

Returns ValueType — startValue until durationMs has passed, then endValue .

Switches from a start to a target boolean at the halfway point of a duration.

Returns Logic.Maybe — startValue until the eased progress passes one half, then targetValue .

Advances an integer state by one on a fixed interval.

Returns nothing — it increments counter once every intervalMs milliseconds.

Puts a value into an error state once a delay elapses.

Returns ValueType — the value until durationMs has passed, then an error carrying errorMessage .

Errors a value after a delay, offering a retry that restarts the timer.

Returns ValueType — the value until durationMs has passed, then an error carrying errorMessage with a retry that restarts the delay.

Drives a whole number from a start to a target over a duration, with easing.

Returns Maths.Integer — the eased progress interpolated between startValue and targetValue and rounded to a whole number.

Locks a value once a delay elapses.

Returns ValueType — the same value, unlocked until durationMs has passed and locked thereafter.

Blends a colour from a start to a target over a duration, with easing.

Returns Colour.RGBA — the colour eased from startColor to targetColor over durationMs .

Drives a real number from a start to a target over a duration, with easing.

Returns Maths.Real — a reactive value that eases from startValue to targetValue over durationMs .

Unlocks a value once a delay elapses.

Returns ValueType — the same value, locked until durationMs has passed and unlocked thereafter.

Recommended articles