class Reactive · Animation

RvgIntegerAnimator

Animator for reactive integer values.

Accessed via Animate.Int. Supports eased tweens, continuous follow, deferred set, and immediate snap operations on reactive Integer. Interpolation rounds to the nearest integer each frame, producing discrete stepping that is useful for counters, score tickers, page indices, and as the backbone of string animations.

Methods

eased

eased(refObj: Integer, to: number, duration: number, options?: RvgEasedOptions | null): RvgAnimation

Smoothly interpolates the value from its current state to to over the given duration, rounding to the nearest integer each frame.

refObj
The reactive Integer to animate.
to
The target integer value.
duration
Animation duration in milliseconds.
options optional
Optional RvgEasedOptions controlling the easing curve, completion tolerance, and an onComplete callback.

Returns The running animation: to cancel it or to wait for it.

follow

follow(refObj: Integer, to: number, options?: RvgFollowOptions | null): RvgAnimation

Continuously moves the value toward to each frame using an exponential decay, rounding to the nearest integer at each step.

refObj
The reactive Integer to animate.
to
The target integer value to follow.
options optional
Optional RvgFollowOptions controlling the follow alpha and snap tolerance.

Returns The running animation: to cancel it or to wait for it.

set

set(refObj: Integer, value: number, delay: number, options?: RvgSetOptions | null): RvgAnimation

Schedules an assignment of value after the given delay, with no interpolation.

refObj
The reactive Integer to animate.
value
The value to assign when the delay elapses.
delay
Delay in milliseconds before the assignment occurs.
options optional
Optional RvgSetOptions — currently supports an onComplete callback invoked after the assignment.

Returns The running animation: to cancel it or to wait for it.

snap

snap(refObj: Integer, value: number): void

Immediately cancels any active animation on the value and assigns the new value without delay.

refObj
The reactive Integer to update.
value
The value to assign immediately.