Skip to content

Process

Defined in: Process.ts:59

A Process represents an ongoing action updated each frame. Used internally by Tween and Sequence, and directly for custom coroutines.

new Process(options): Process

Defined in: Process.ts:82

ProcessOptions

Process

readonly tags: readonly string[]

Defined in: Process.ts:66

Tags for filtering/grouping.

get completed(): boolean

Defined in: Process.ts:91

Whether the process has completed.

boolean


get elapsed(): number

Defined in: Process.ts:112

Seconds accumulated from the dt passed to _update, so it reflects any time scaling the caller applies (e.g. ProcessSystem’s global, per-scene, and per-entity timeScale stacking). Does not advance while paused.

On loop, resets to the remainder past duration for duration-based completion, or to 0 when the update callback returns true; otherwise holds its final value once the process completes.

This is process time only — unaffected by a keyframe track’s speed multiplier.

number


get paused(): boolean

Defined in: Process.ts:96

Whether the process is paused.

boolean

_reset(): void

Defined in: Process.ts:182

Internal

Reset the process to its initial state so it can be re-run. Used by Sequence for loop/repeat with direct instances.

void


_update(dt): unknown

Defined in: Process.ts:150

Internal

Advance the process by dt seconds. Returns whatever updateFn returned — boolean | void per its declared type, but nothing stops a caller from passing an async function anyway, so the caller-observed return can also be a thenable. Returning it lets tickProcessGuarded attach a rejection handler; the boolean | void typing means every existing caller that ignores the return value keeps compiling.

number

unknown


cancel(): void

Defined in: Process.ts:127

Cancel the process.

void


pause(): void

Defined in: Process.ts:117

Pause the process.

void


resume(): void

Defined in: Process.ts:122

Resume the process.

void


toPromise(): Promise<void>

Defined in: Process.ts:134

Returns a promise that resolves when the process completes or is cancelled.

Promise<void>


static delay(duration, onComplete?, tags?): Process

Defined in: Process.ts:75

Create a timer that fires onComplete after duration seconds.

number

() => void

string[]

Process