class Reactive · Animation
RvgRealArrayAnimator
Animator for reactive number arrays (values.realArray): all numbers at once, one update per
frame.
Accessed via Animate.realArray. Like Animate.shape, only the entries that the array and the
target both have are animated; a longer target leaves its extra numbers out, a shorter one leaves
the array's extra numbers unchanged.
Methods
eased
eased(array: Sequence<number>, to: Iterable<number>, duration: number, options?: RvgEasedOptions | null): RvgAnimationSmoothly interpolates every number from its current value to the one at the same index of
to over the given duration.
array- The reactive number array to animate (from
values.realArray). to- The target numbers.
duration- Animation duration in milliseconds.
optionsoptional- Optional
RvgEasedOptionscontrolling the easing curve, completion tolerance, and anonCompletecallback.
Returns The running animation: to cancel it or to wait for it.
follow
follow(array: Sequence<number>, to: Iterable<number>, options?: RvgFollowOptions | null): RvgAnimationContinuously moves every number toward the one at the same index of to each frame, using an
exponential decay (a lag-based pursuit).
array- The reactive number array to animate.
to- The target numbers to follow.
optionsoptional- Optional
RvgFollowOptionscontrolling the follow alpha and snap tolerance.
Returns The running animation: to cancel it or to wait for it.
set
set(array: Sequence<number>, values: Iterable<number>, delay: number, options?: RvgSetOptions | null): RvgAnimationSchedules writing values after the given delay, with no interpolation.
array- The reactive number array.
values- The numbers to write when the delay elapses.
delay- Delay in milliseconds before the write.
optionsoptional- Optional
RvgSetOptions: anonCompletecallback after the write.
Returns The running animation: to cancel it or to wait for it.
snap
snap(array: Sequence<number>, values: Iterable<number>): voidImmediately cancels any active animation on the array and writes the numbers without delay.
array- The reactive number array.
values- The numbers to write.
