Skip to content

API Interface SystemState

github-actions[bot] edited this page Dec 3, 2026 · 1 revision

Interface: SystemState

Defined in: src/engine/core/systemTypes.ts:36

What a system gets, one per system per World, passed to every hook (ADR 0679).

Properties

dt

readonly dt: number;

Defined in: src/engine/core/systemTypes.ts:42

The group's step: fixedDeltaTime in the fixed-step group, unscaled in initialization, deltaTime otherwise.


enabled

enabled: boolean;

Defined in: src/engine/core/systemTypes.ts:51

A disabled system skips onUpdate (it stays created); a disabled group skips everything inside it.


id

readonly id: string;

Defined in: src/engine/core/systemTypes.ts:38

The system's id.


time

readonly time: TimeState;

Defined in: src/engine/core/systemTypes.ts:40


world

readonly world: World;

Defined in: src/engine/core/systemTypes.ts:39

Methods

query()

query(...terms): Query;

Defined in: src/engine/core/systemTypes.ts:47

A query over these terms, cached: the same terms (in the same order) give the same Query. Making queries in onCreate and keeping them allocates nothing per frame.

Parameters

terms

...QueryTerm[]

Returns

Query


single()

single<V>(def): V | null;

Defined in: src/engine/core/systemTypes.ts:49

The view of the first node that has def, or null: a singleton's state.

Type Parameters

V

V = Record<string, number>

Parameters

def

DataComponentDef

Returns

V | null

Clone this wiki locally