class Reactive · Animation
RvgPointAnimator
Animator for reactive Point values.
Accessed via Animate.Point. Supports eased tweens, continuous follow, deferred set, and
immediate snap operations on reactive Point boxes.
Methods
eased
eased(refObj: Point, to: Point | VectorLike, duration: number, options?: RvgEasedOptions | null): RvgAnimationSmoothly interpolates the point from its current position to to over the given duration.
refObj- The reactive
Pointto animate. to- The target position.
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.
easedAll
easedAll(points: Point[], targets: Point[], duration: number, options?: RvgEasedOptions | null): RvgAnimationMoves many points at once, each to the target with the same index, as one animation.
All share the duration and easing; options.stagger delays the start of each point after the
first by that many milliseconds more. options.onComplete is called once, when the last
point has arrived. With different list lengths, the extra points or targets are left out.
points- The reactive points to animate.
targets- The target positions, one per point.
duration- The duration of each point's animation in milliseconds.
optionsoptional- Optional easing, tolerance, stagger and onComplete for the whole group.
Returns One animation for all points: to cancel them or to wait for the last one.
follow
follow(refObj: Point, to: Point | VectorLike, options?: RvgFollowOptions | null): RvgAnimationContinuously moves the point toward to each frame using an exponential decay, producing a
lag-based pursuit effect.
refObj- The reactive
Pointto animate. to- The target position to follow.
optionsoptional- Optional
RvgFollowOptionscontrolling the follow alpha and snap tolerance.
Returns The running animation: to cancel it or to wait for it.
followAll
followAll(points: Point[], targets: Point[], options?: RvgFollowOptions | null): RvgAnimationLets many points follow their targets at once (the target with the same index), as one animation.
options.onComplete is called once, when all points have caught up. Called again for the
same points (new targets), it continues without a jump; the earlier call counts as cancelled.
With different list lengths, the extra points or targets are left out.
points- The reactive points to animate.
targets- The points to follow, one per point.
optionsoptional- Optional alpha, tolerance and onComplete for the whole group.
Returns One animation for all points: to cancel them or to wait until all have caught up.
set
set(refObj: Point, value: Point | VectorLike, delay: number, options?: RvgSetOptions | null): RvgAnimationSchedules an assignment of value after the given delay, with no interpolation.
refObj- The reactive
Pointto animate. value- The position to assign when the delay elapses.
delay- Delay in milliseconds before the assignment occurs.
optionsoptional- Optional
RvgSetOptions— currently supports anonCompletecallback invoked after the assignment.
Returns The running animation: to cancel it or to wait for it.
snap
snap(refObj: Point, value: Point | VectorLike): voidImmediately cancels any active animation on the point and assigns the new position without delay.
The write is performed inside a reactive transaction to ensure that all dependent reactive values update atomically.
refObj- The reactive
Pointto update. value- The position to assign immediately.
