Ir al contenido

Animation

Defined in: animation/Animation.ts:18

A single animation that tweens a numeric property from start to end value.

new Animation(from, to, callback, options?): Animation

Defined in: animation/Animation.ts:32

Record<string, number>

Record<string, number>

(values) => void

AnimationOptions = {}

Animation

get duration(): number

Defined in: animation/Animation.ts:47

Duration in milliseconds.

number


get isFinished(): boolean

Defined in: animation/Animation.ts:52

Whether the animation has finished.

boolean

cancel(): void

Defined in: animation/Animation.ts:81

Cancel the animation.

void


finishImmediately(): void

Defined in: animation/Animation.ts:88

Jump directly to the final values and finish, without animating any frames.

void


onCancelCallback(callback): this

Defined in: animation/Animation.ts:63

Set a callback for when the animation is cancelled.

() => void

this


onDone(callback): this

Defined in: animation/Animation.ts:57

Set a callback for when the animation completes.

() => void

this


pause(): void

Defined in: animation/Animation.ts:69

Pause the animation.

void


resume(): void

Defined in: animation/Animation.ts:75

Resume a paused animation.

void


start(): void

Defined in: animation/Animation.ts:96

Start the animation. The start time is initialized on the first update call.

void


update(now): boolean

Defined in: animation/Animation.ts:105

Advance the animation. Called each frame.

number

Current timestamp in milliseconds.

boolean

True if the animation is still running.