Skip to content

API Interface Tween

github-actions[bot] edited this page Nov 24, 2026 · 1 revision

Interface: Tween

Defined in: src/plugins/animation/runtime/types.ts:280

A running tween, sequence or parallel group (ADR 0371, 0372). Awaitable: it resolves with a reason when it ends. A tween starts at the next animation update after tween() returns; until then, passing it to sequence() or parallel() hands its timing to the group. A tween that has started can't join a group.

Extends

Properties

isPlaying

readonly isPlaying: boolean;

Defined in: src/plugins/animation/runtime/types.ts:282

True until it ends.

Methods

pause()

pause(): void;

Defined in: src/plugins/animation/runtime/types.ts:284

Hold it where it is.

Returns

void


resume()

resume(): void;

Defined in: src/plugins/animation/runtime/types.ts:286

Continue after pause().

Returns

void


stop()

stop(): void;

Defined in: src/plugins/animation/runtime/types.ts:288

End it now, leaving the field where it is; resolves with stopped.

Returns

void


then()

then<TResult1, TResult2>(onfulfilled?, onrejected?): PromiseLike<TResult1 | TResult2>;

Defined in: node_modules/typescript/lib/lib.es5.d.ts:1544

Attaches callbacks for the resolution and/or rejection of the Promise.

Type Parameters

TResult1

TResult1 = TweenResult

TResult2

TResult2 = never

Parameters

onfulfilled?

((value) => TResult1 | PromiseLike<TResult1>) | null

The callback to execute when the Promise is resolved.

onrejected?

((reason) => TResult2 | PromiseLike<TResult2>) | null

The callback to execute when the Promise is rejected.

Returns

PromiseLike<TResult1 | TResult2>

A Promise for the completion of which ever callback is executed.

Inherited from

PromiseLike.then

Clone this wiki locally