Skip to content

API Class NodeBuilder

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

Class: NodeBuilder

Defined in: src/engine/scene/sceneBuilder.ts:69

Constructors

Constructor

new NodeBuilder(name): NodeBuilder;

Defined in: src/engine/scene/sceneBuilder.ts:80

Parameters

name

string

Returns

NodeBuilder

Properties

name

readonly name: string;

Defined in: src/engine/scene/sceneBuilder.ts:80

Methods

active()

active(active): this;

Defined in: src/engine/scene/sceneBuilder.ts:87

Parameters

active

boolean

Returns

this


child()

child(name, build?): this;

Defined in: src/engine/scene/sceneBuilder.ts:114

Parameters

name

string

build?

(node) => unknown

Returns

this


component()

component(
   type, 
   data?, 
   options?
): this;

Defined in: src/engine/scene/sceneBuilder.ts:105

Parameters

type

string

data?

Record<string, unknown>

options?

NodeComponentOptions = {}

Returns

this


componentNode()

componentNode(): this;

Defined in: src/engine/scene/sceneBuilder.ts:96

Mark a component-only child node (componentNode).

Returns

this


id()

id(id): this;

Defined in: src/engine/scene/sceneBuilder.ts:83

Set a stable id instead of the generated slug.

Parameters

id

string

Returns

this


instanceOf()

instanceOf(path, options?): this;

Defined in: src/engine/scene/sceneBuilder.ts:121

Make this node an instance of a prefab (or scene) file, with optional overrides.

Parameters

path

string

options?

InstanceOptions = {}

Returns

this


noTransform()

noTransform(): this;

Defined in: src/engine/scene/sceneBuilder.ts:101

A pure logic or grouping node with no Transform.

Returns

this


tags()

tags(...tags): this;

Defined in: src/engine/scene/sceneBuilder.ts:91

Parameters

tags

...string[]

Returns

this

Clone this wiki locally