class Reactive · Animation

RvgBoolAnimator

Animator for reactive boolean values.

Accessed via Animate.Bool. Provides deferred assignment and immediate snapping for reactive bools. Boolean values cannot be interpolated, so there is no Eased or Follow method.

Methods

set

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

Schedules a boolean value to be assigned after the given delay.

refObj
The reactive bool 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: Bool, value: boolean): void

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

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