Skip to content

Tween

const Tween: object

Defined in: Tween.ts:11

Static factory for creating tween Processes.

custom(setter, from, to, duration, easing?): Process

Tween using a custom setter.

(value) => void

number

number

number

EasingFunction = easeLinear

Process

stagger<T>(items, factory, stepMs): Process[]

Map a Process factory over an array, staggering each item’s START by stepMs (item 0 starts immediately, item 1 after stepMs, and so on). Returns one Process per item — enqueue them all on a process queue (or useSplitText’s run) to play a staggered cascade across a split text’s chars / words / lines. The factory runs when each item’s turn begins, so a Tween.to built inside it reads its from value at start time, not build time.

T

readonly T[]

(item, index) => Process

number

Process[]

to(target, property, to, duration, easing?): Process

Tween a numeric property on a target object.

Record<string, number>

string

number

number

EasingFunction = easeLinear

Process

vec2(setter, from, to, duration, easing?): Process

Tween a Vec2 value.

(value) => void

Vec2Like

Vec2Like

number

EasingFunction = easeLinear

Process