Skip to content

Tweens

The engine’s tweens (engine.tween): advanced on game time, so they stop on pause and breaks.

new Tweens(): Tweens

Tweens

get size(): number

Tweens running.

number

timeline(opts?): Timeline

A timeline played on the same clock (see Timeline).

TimelineOptions

Timeline


tween<T>(target, to, seconds, ease?): TweenHandle

Eases target’s numeric fields to to over seconds.

T extends object

T

Partial<Record<keyof T, number>>

number

Ease | TweenOptions | "linear" | "quadIn" | "quadOut" | "quadInOut" | "cubicOut" | "sineInOut" | "backOut" | "elasticOut" | "bounceOut"

TweenHandle


stopAll(target): void

Stops every tween of target (they resolve where they are).

object

void


update(dt): void

Advances every tween by dt seconds.

number

void


clear(): void

Stops every tween (they resolve where they are).

void