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.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Process(
options):Process
Defined in: Process.ts:82
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”Process
Properties
Section titled “Properties”
readonlytags: readonlystring[]
Defined in: Process.ts:66
Tags for filtering/grouping.
Accessors
Section titled “Accessors”completed
Section titled “completed”Get Signature
Section titled “Get Signature”get completed():
boolean
Defined in: Process.ts:91
Whether the process has completed.
Returns
Section titled “Returns”boolean
elapsed
Section titled “elapsed”Get Signature
Section titled “Get Signature”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.
Returns
Section titled “Returns”number
paused
Section titled “paused”Get Signature
Section titled “Get Signature”get paused():
boolean
Defined in: Process.ts:96
Whether the process is paused.
Returns
Section titled “Returns”boolean
Methods
Section titled “Methods”_reset()
Section titled “_reset()”_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.
Returns
Section titled “Returns”void
_update()
Section titled “_update()”_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.
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”unknown
cancel()
Section titled “cancel()”cancel():
void
Defined in: Process.ts:127
Cancel the process.
Returns
Section titled “Returns”void
pause()
Section titled “pause()”pause():
void
Defined in: Process.ts:117
Pause the process.
Returns
Section titled “Returns”void
resume()
Section titled “resume()”resume():
void
Defined in: Process.ts:122
Resume the process.
Returns
Section titled “Returns”void
toPromise()
Section titled “toPromise()”toPromise():
Promise<void>
Defined in: Process.ts:134
Returns a promise that resolves when the process completes or is cancelled.
Returns
Section titled “Returns”Promise<void>
delay()
Section titled “delay()”
staticdelay(duration,onComplete?,tags?):Process
Defined in: Process.ts:75
Create a timer that fires onComplete after duration seconds.
Parameters
Section titled “Parameters”duration
Section titled “duration”number
onComplete?
Section titled “onComplete?”() => void
string[]
Returns
Section titled “Returns”Process