Skip to content

five-on-it / apps/tools/src/scene-doc / SceneNodeDoc

Interface: SceneNodeDoc ​

Defined in: apps/tools/src/scene-doc.ts:31

One node of a scene document.

Properties ​

geometry? ​

optional geometry?: GeometryDoc

Defined in: apps/tools/src/scene-doc.ts:55

A mesh's geometry, when the document carries it.


id ​

id: string

Defined in: apps/tools/src/scene-doc.ts:33

The node's id (a string the editor keeps stable).


kind ​

kind: "mesh" | "transform" | "instance"

Defined in: apps/tools/src/scene-doc.ts:39

A mesh with geometry, an instance of one, or a plain transform node (a group).


metadata? ​

optional metadata?: Record<string, unknown>

Defined in: apps/tools/src/scene-doc.ts:53

The node's metadata, where the editor keeps the attached scripts (and a kit piece says what it is).


name ​

name: string

Defined in: apps/tools/src/scene-doc.ts:37

The node's name, as shown in the editor's graph.


parentId? ​

optional parentId?: string | number

Defined in: apps/tools/src/scene-doc.ts:49

The parent's uniqueId (the editor's files) or id (hand-made files); none at the root.


position ​

position: Vec3

Defined in: apps/tools/src/scene-doc.ts:41

Local position.


rotation ​

rotation: Vec3

Defined in: apps/tools/src/scene-doc.ts:43

Local rotation as Euler angles [pitch, yaw, roll] (Babylon's rotation), unless a quaternion is given.


rotationQuaternion? ​

optional rotationQuaternion?: Vec4

Defined in: apps/tools/src/scene-doc.ts:45

Local rotation as a quaternion, when the node carries one.


scaling ​

scaling: Vec3

Defined in: apps/tools/src/scene-doc.ts:47

Local scaling.


sourceUniqueId? ​

optional sourceUniqueId?: number

Defined in: apps/tools/src/scene-doc.ts:51

For an instance, the uniqueId of its source mesh.


uniqueId ​

uniqueId: number

Defined in: apps/tools/src/scene-doc.ts:35

The node's uniqueId (a number; parents are referenced by it in the editor's files).