Skip to content

API Interface Rows

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

Interface: Rows

Defined in: src/engine/core/rows.ts:11

A system query's rows. Iterate it row by row, or read column()s at indices for speed.

Extends

  • Iterable<Row>

Properties

count

readonly count: number;

Defined in: src/engine/core/rows.ts:18

How many rows matched.


indices

readonly indices: Int32Array;

Defined in: src/engine/core/rows.ts:16

The rows matched when the run started, as indices into this run's columns (each is the node's slot in the World). Valid during this run only: a slot is reused after its node is destroyed.

Methods

[iterator]()

[iterator](): Iterator<Row, any, any>;

Defined in: node_modules/typescript/lib/lib.es2015.iterable.d.ts:49

Returns

Iterator<Row, any, any>

Inherited from

Iterable.[iterator]


column()

column<S>(def): Columns<S>;

Defined in: src/engine/core/rows.ts:24

A data component's fields, as the typed arrays storing them, indexed by indices. Writes change the components. def must be one of the query's terms. Valid during this run: adding the component to more nodes, or creating nodes, can replace the arrays, so fetch it again after.

Type Parameters

S

S extends Schema

Parameters

def

DataComponentDef<S>

Returns

Columns<S>


node()

node(index): GameObject;

Defined in: src/engine/core/rows.ts:26

The node at an index.

Parameters

index

number

Returns

GameObject


transform()

transform(index): Transform;

Defined in: src/engine/core/rows.ts:28

The node's Transform at an index (the query must include Transform, or the node have one).

Parameters

index

number

Returns

Transform

Clone this wiki locally