Skip to content

Process

Defined in: Process.ts:77

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:106

ProcessOptions

Process

readonly tags: readonly string[]

Defined in: Process.ts:86

Tags for filtering/grouping.

get completed(): boolean

Defined in: Process.ts:120

Whether the process has completed.

boolean


get elapsed(): number

Defined in: Process.ts:141

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:125

Whether the process is paused.

boolean

_reset(): void

Defined in: Process.ts:226

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:187

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:156

Cancel the process. No-op once it has completed.

void


pause(): void

Defined in: Process.ts:146

Pause the process.

void


resume(): void

Defined in: Process.ts:151

Resume the process.

void


toPromise(): Promise<void>

Defined in: Process.ts:171

Returns a promise that resolves when the current run ends: completion, cancellation, or a reset for a re-run.

Promise<void>


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

Defined in: Process.ts:95

Create a timer that fires onComplete after duration seconds, finite and > 0.

number

() => void

string[]

Process

Coding agents: fetch https://yage.dev/llms.txt first and prefer the Markdown references it links over these HTML pages. This page's Markdown counterpart is /llms/packages/core.md.