Skip to content

Documentation / scene / MSDFText

Class: MSDFText

Defined in: libs/scene/src/scene/msdftext.ts:19

Billboard MSDF text node.

Extends

Constructors

Constructor

new MSDFText(scene): MSDFText

Defined in: libs/scene/src/scene/msdftext.ts:32

Parameters

scene

Scene

Returns

MSDFText

Overrides

GraphNode.constructor

Properties

BBOXDRAW_INHERITED

readonly static BBOXDRAW_INHERITED: -1 = -1

Defined in: libs/scene/src/scene/scene_node.ts:166

Bounding-box draw mode inherited from nearest graph ancestor.

Inherited from

GraphNode.BBOXDRAW_INHERITED


BBOXDRAW_DISABLED

readonly static BBOXDRAW_DISABLED: 0 = 0

Defined in: libs/scene/src/scene/scene_node.ts:168

Disable bounding-box visualization.

Inherited from

GraphNode.BBOXDRAW_DISABLED


BBOXDRAW_LOCAL

readonly static BBOXDRAW_LOCAL: 1 = 1

Defined in: libs/scene/src/scene/scene_node.ts:170

Draw local-space bounding box.

Inherited from

GraphNode.BBOXDRAW_LOCAL


BBOXDRAW_WORLD

readonly static BBOXDRAW_WORLD: 2 = 2

Defined in: libs/scene/src/scene/scene_node.ts:172

Draw world-space bounding box.

Inherited from

GraphNode.BBOXDRAW_WORLD

Accessors

disposed

Get Signature

get disposed(): boolean

Defined in: libs/base/dist/index.d.ts:6065

Returns

boolean

Inherited from

GraphNode.disposed


castShadow

Get Signature

get castShadow(): boolean

Defined in: libs/scene/src/scene/msdftext.ts:48

Returns

boolean

Set Signature

set castShadow(value): void

Defined in: libs/scene/src/scene/msdftext.ts:51

Parameters
value

boolean

Returns

void


fontAsset

Get Signature

get fontAsset(): FontAsset

Defined in: libs/scene/src/scene/msdftext.ts:54

Returns

FontAsset

Set Signature

set fontAsset(font): void

Defined in: libs/scene/src/scene/msdftext.ts:57

Parameters
font

FontAsset

Returns

void


text

Get Signature

get text(): string

Defined in: libs/scene/src/scene/msdftext.ts:64

Returns

string

Set Signature

set text(value): void

Defined in: libs/scene/src/scene/msdftext.ts:67

Parameters
value

string

Returns

void


fontSize

Get Signature

get fontSize(): number

Defined in: libs/scene/src/scene/msdftext.ts:73

Returns

number

Set Signature

set fontSize(value): void

Defined in: libs/scene/src/scene/msdftext.ts:76

Parameters
value

number

Returns

void


maxWidth

Get Signature

get maxWidth(): number

Defined in: libs/scene/src/scene/msdftext.ts:82

Returns

number

Set Signature

set maxWidth(value): void

Defined in: libs/scene/src/scene/msdftext.ts:85

Parameters
value

number

Returns

void


textAlign

Get Signature

get textAlign(): TextAlign

Defined in: libs/scene/src/scene/msdftext.ts:91

Returns

TextAlign

Set Signature

set textAlign(value): void

Defined in: libs/scene/src/scene/msdftext.ts:94

Parameters
value

TextAlign

Returns

void


anchorX

Get Signature

get anchorX(): number

Defined in: libs/scene/src/scene/msdftext.ts:100

Returns

number

Set Signature

set anchorX(value): void

Defined in: libs/scene/src/scene/msdftext.ts:103

Parameters
value

number

Returns

void


anchorY

Get Signature

get anchorY(): number

Defined in: libs/scene/src/scene/msdftext.ts:110

Returns

number

Set Signature

set anchorY(value): void

Defined in: libs/scene/src/scene/msdftext.ts:113

Parameters
value

number

Returns

void


anchor

Get Signature

get anchor(): Immutable<Vector2>

Defined in: libs/scene/src/scene/msdftext.ts:120

Returns

Immutable<Vector2>

Set Signature

set anchor(value): void

Defined in: libs/scene/src/scene/msdftext.ts:123

Parameters
value

Immutable<Vector2>

Returns

void


textColor

Get Signature

get textColor(): Immutable<Vector3>

Defined in: libs/scene/src/scene/msdftext.ts:130

Returns

Immutable<Vector3>

Set Signature

set textColor(value): void

Defined in: libs/scene/src/scene/msdftext.ts:133

Parameters
value

Immutable<Vector3>

Returns

void


outlineWidth

Get Signature

get outlineWidth(): number

Defined in: libs/scene/src/scene/msdftext.ts:141

Returns

number

Set Signature

set outlineWidth(value): void

Defined in: libs/scene/src/scene/msdftext.ts:144

Parameters
value

number

Returns

void


outlineColor

Get Signature

get outlineColor(): Immutable<Vector3>

Defined in: libs/scene/src/scene/msdftext.ts:152

Returns

Immutable<Vector3>

Set Signature

set outlineColor(value): void

Defined in: libs/scene/src/scene/msdftext.ts:155

Parameters
value

Immutable<Vector3>

Returns

void


batches

Get Signature

get batches(): MeshDrawable<MSDFTextMaterial>[]

Defined in: libs/scene/src/scene/msdftext.ts:163

Returns

MeshDrawable<MSDFTextMaterial>[]


placeToOctree

Get Signature

get placeToOctree(): boolean

Defined in: libs/scene/src/scene/scene_node.ts:312

Whether the node should be inserted into the scene's spatial structure.

Remarks

Toggling this hints the scene to (re)place the node in octree/acceleration structures.

Returns

boolean

Set Signature

set placeToOctree(val): void

Defined in: libs/scene/src/scene/scene_node.ts:315

Parameters
val

boolean

Returns

void

Inherited from

GraphNode.placeToOctree


runtimeId

Get Signature

get runtimeId(): number

Defined in: libs/scene/src/scene/scene_node.ts:326

Node's runtime unique identifier

Returns

number

Inherited from

GraphNode.runtimeId


persistentId

Get Signature

get persistentId(): string

Defined in: libs/scene/src/scene/scene_node.ts:335

Node's persistent identifier.

Remarks

Changing this affects serialization and registry lookup; ensure uniqueness.

Returns

string

Set Signature

set persistentId(id): void

Defined in: libs/scene/src/scene/scene_node.ts:338

Parameters
id

string

Returns

void

Inherited from

GraphNode.persistentId


prefabId

Get Signature

get prefabId(): string

Defined in: libs/scene/src/scene/scene_node.ts:347

If not empty, this node was loaded from a prefab

Remarks

Internal used for serialization

Returns

string

Set Signature

set prefabId(id): void

Defined in: libs/scene/src/scene/scene_node.ts:350

Parameters
id

string

Returns

void

Inherited from

GraphNode.prefabId


jointTypeT

Get Signature

get jointTypeT(): "none" | "animated" | "static"

Defined in: libs/scene/src/scene/scene_node.ts:366

Translation type if this is a joint node of any skeleton

Remarks

Internal used for serialization

Returns

"none" | "animated" | "static"

Set Signature

set jointTypeT(val): void

Defined in: libs/scene/src/scene/scene_node.ts:369

Parameters
val

"none" | "animated" | "static"

Returns

void

Inherited from

GraphNode.jointTypeT


jointTypeS

Get Signature

get jointTypeS(): "none" | "animated" | "static"

Defined in: libs/scene/src/scene/scene_node.ts:378

Scale type if this is a joint node of any skeleton

Remarks

Internal used for serialization

Returns

"none" | "animated" | "static"

Set Signature

set jointTypeS(val): void

Defined in: libs/scene/src/scene/scene_node.ts:381

Parameters
val

"none" | "animated" | "static"

Returns

void

Inherited from

GraphNode.jointTypeS


jointTypeR

Get Signature

get jointTypeR(): "none" | "animated" | "static"

Defined in: libs/scene/src/scene/scene_node.ts:390

Rotation type if this is a joint node of any skeleton

Remarks

Internal used for serialization

Returns

"none" | "animated" | "static"

Set Signature

set jointTypeR(val): void

Defined in: libs/scene/src/scene/scene_node.ts:393

Parameters
val

"none" | "animated" | "static"

Returns

void

Inherited from

GraphNode.jointTypeR


metaData

Get Signature

get metaData(): Metadata

Defined in: libs/scene/src/scene/scene_node.ts:402

Arbitrary metadata associated with this node.

Remarks

Stored and transported with the node; format is application-defined.

Returns

Metadata

Set Signature

set metaData(val): void

Defined in: libs/scene/src/scene/scene_node.ts:405

Parameters
val

Metadata

Returns

void

Inherited from

GraphNode.metaData


script

Get Signature

get script(): string

Defined in: libs/scene/src/scene/scene_node.ts:414

Attached script filename or identifier (engine-specific).

Remarks

Integrates with the engine’s scripting system if available.

Returns

string

Set Signature

set script(fileName): void

Defined in: libs/scene/src/scene/scene_node.ts:417

Parameters
fileName

string

Returns

void

Inherited from

GraphNode.script


scriptConfig

Get Signature

get scriptConfig(): object | unknown[]

Defined in: libs/scene/src/scene/scene_node.ts:430

Script component configuration payload used by editor/runtime script components.

Returns

object | unknown[]

Set Signature

set scriptConfig(value): void

Defined in: libs/scene/src/scene/scene_node.ts:433

Parameters
value

object | unknown[]

Returns

void

Inherited from

GraphNode.scriptConfig


scripts

Get Signature

get scripts(): ScriptAttachment[]

Defined in: libs/scene/src/scene/scene_node.ts:447

All script attachments on this node.

Returns

ScriptAttachment[]

Set Signature

set scripts(value): void

Defined in: libs/scene/src/scene/scene_node.ts:450

Parameters
value

ScriptAttachment[]

Returns

void

Inherited from

GraphNode.scripts


scriptConfigs

Get Signature

get scriptConfigs(): unknown[]

Defined in: libs/scene/src/scene/scene_node.ts:456

Script configs for all script attachments.

Returns

unknown[]

Set Signature

set scriptConfigs(value): void

Defined in: libs/scene/src/scene/scene_node.ts:459

Parameters
value

unknown[]

Returns

void

Inherited from

GraphNode.scriptConfigs


name

Get Signature

get name(): string

Defined in: libs/scene/src/scene/scene_node.ts:474

Display name of the node (for UI/debugging).

Returns

string

Set Signature

set name(val): void

Defined in: libs/scene/src/scene/scene_node.ts:477

Parameters
val

string

Returns

void

Inherited from

GraphNode.name


scene

Get Signature

get scene(): Scene

Defined in: libs/scene/src/scene/scene_node.ts:481

The owning scene.

Returns

Scene

Inherited from

GraphNode.scene


attached

Get Signature

get attached(): boolean

Defined in: libs/scene/src/scene/scene_node.ts:487

Whether this node is currently attached under the scene's root.

Returns

boolean

Inherited from

GraphNode.attached


sealed

Get Signature

get sealed(): boolean

Defined in: libs/scene/src/scene/scene_node.ts:501

If true, the node is logically sealed; some operations (like cloning as child) may be restricted by engine policies.

Returns

boolean

Set Signature

set sealed(val): void

Defined in: libs/scene/src/scene/scene_node.ts:504

Parameters
val

boolean

Returns

void

Inherited from

GraphNode.sealed


animationSet

Get Signature

get animationSet(): AnimationSet

Defined in: libs/scene/src/scene/scene_node.ts:513

Lazily created animation set for this node.

Remarks

Accessing this schedules the node for update in the scene.

Returns

AnimationSet

Inherited from

GraphNode.animationSet


sharedModel

Get Signature

get sharedModel(): SharedModel

Defined in: libs/scene/src/scene/scene_node.ts:523

Shared model reference for instancing/streaming systems.

Returns

SharedModel

Set Signature

set sharedModel(model): void

Defined in: libs/scene/src/scene/scene_node.ts:526

Parameters
model

SharedModel

Returns

void

Inherited from

GraphNode.sharedModel


morphTargetGroups

Get Signature

get morphTargetGroups(): SceneMorphTargetGroup[]

Defined in: libs/scene/src/scene/scene_node.ts:530

Runtime morph target groups bound to this model instance.

Returns

SceneMorphTargetGroup[]

Set Signature

set morphTargetGroups(groups): void

Defined in: libs/scene/src/scene/scene_node.ts:533

Parameters
groups

SceneMorphTargetGroup[]

Returns

void

Inherited from

GraphNode.morphTargetGroups


clipTestEnabled

Get Signature

get clipTestEnabled(): boolean

Defined in: libs/scene/src/scene/scene_node.ts:774

Clip mode

Returns

boolean

Set Signature

set clipTestEnabled(val): void

Defined in: libs/scene/src/scene/scene_node.ts:777

Parameters
val

boolean

Returns

void

Inherited from

GraphNode.clipTestEnabled


hidden

Get Signature

get hidden(): boolean

Defined in: libs/scene/src/scene/scene_node.ts:781

Computed value of show state

Returns

boolean

Inherited from

GraphNode.hidden


showState

Get Signature

get showState(): SceneNodeVisible

Defined in: libs/scene/src/scene/scene_node.ts:789

Show state

Returns

SceneNodeVisible

Set Signature

set showState(val): void

Defined in: libs/scene/src/scene/scene_node.ts:792

Parameters
val

SceneNodeVisible

Returns

void

Inherited from

GraphNode.showState


pickable

Get Signature

get pickable(): boolean

Defined in: libs/scene/src/scene/scene_node.ts:810

Whether this node is enabled for CPU picking

Returns

boolean

Set Signature

set pickable(val): void

Defined in: libs/scene/src/scene/scene_node.ts:813

Parameters
val

boolean

Returns

void

Inherited from

GraphNode.pickable


gpuPickable

Get Signature

get gpuPickable(): boolean

Defined in: libs/scene/src/scene/scene_node.ts:817

Whether this node is enabled for GPU picking

Returns

boolean

Set Signature

set gpuPickable(val): void

Defined in: libs/scene/src/scene/scene_node.ts:820

Parameters
val

boolean

Returns

void

Inherited from

GraphNode.gpuPickable


computedBoundingBoxDrawMode

Get Signature

get computedBoundingBoxDrawMode(): number

Defined in: libs/scene/src/scene/scene_node.ts:902

Computed value for bounding box draw mode

Returns

number

Inherited from

GraphNode.computedBoundingBoxDrawMode


boundingBoxDrawMode

Get Signature

get boundingBoxDrawMode(): number

Defined in: libs/scene/src/scene/scene_node.ts:913

Bounding box draw mode

Returns

number

Set Signature

set boundingBoxDrawMode(mode): void

Defined in: libs/scene/src/scene/scene_node.ts:916

Parameters
mode

number

Returns

void

Inherited from

GraphNode.boundingBoxDrawMode


parent

Get Signature

get parent(): SceneNode

Defined in: libs/scene/src/scene/scene_node.ts:1204

Parent of the xform

Returns

SceneNode

Set Signature

set parent(p): void

Defined in: libs/scene/src/scene/scene_node.ts:1207

Parameters
p

SceneNode

Returns

void

Inherited from

GraphNode.parent


children

Get Signature

get children(): SceneNode[]

Defined in: libs/scene/src/scene/scene_node.ts:1213

Children of this xform

Returns

SceneNode[]

Inherited from

GraphNode.children


position

Get Signature

get position(): Vector3

Defined in: libs/scene/src/scene/scene_node.ts:1219

Position of the xform relative to it's parent

Returns

Vector3

Set Signature

set position(val): void

Defined in: libs/scene/src/scene/scene_node.ts:1222

Parameters
val

Vector3

Returns

void

Inherited from

GraphNode.position


scale

Get Signature

get scale(): Vector3

Defined in: libs/scene/src/scene/scene_node.ts:1228

Scaling of the xform

Returns

Vector3

Set Signature

set scale(val): void

Defined in: libs/scene/src/scene/scene_node.ts:1231

Parameters
val

Vector3

Returns

void

Inherited from

GraphNode.scale


rotation

Get Signature

get rotation(): Quaternion

Defined in: libs/scene/src/scene/scene_node.ts:1237

Rotation of the xform

Returns

Quaternion

Set Signature

set rotation(val): void

Defined in: libs/scene/src/scene/scene_node.ts:1240

Parameters
val

Quaternion

Returns

void

Inherited from

GraphNode.rotation


localMatrix

Get Signature

get localMatrix(): Immutable<Matrix4x4>

Defined in: libs/scene/src/scene/scene_node.ts:1346

Local transformation matrix of the xform

Returns

Immutable<Matrix4x4>

Set Signature

set localMatrix(matrix): void

Defined in: libs/scene/src/scene/scene_node.ts:1353

Parameters
matrix

Immutable<Matrix4x4>

Returns

void

Inherited from

GraphNode.localMatrix


worldMatrix

Get Signature

get worldMatrix(): Immutable<Matrix4x4>

Defined in: libs/scene/src/scene/scene_node.ts:1357

World transformation matrix of the xform

Returns

Immutable<Matrix4x4>

Inherited from

GraphNode.worldMatrix


worldMatrixDet

Get Signature

get worldMatrixDet(): number

Defined in: libs/scene/src/scene/scene_node.ts:1362

The determinant of world matrix

Returns

number

Inherited from

GraphNode.worldMatrixDet


invWorldMatrix

Get Signature

get invWorldMatrix(): Immutable<Matrix4x4>

Defined in: libs/scene/src/scene/scene_node.ts:1367

Inverse of the world transformation matrix of the xform

Returns

Immutable<Matrix4x4>

Inherited from

GraphNode.invWorldMatrix

Methods

on()

Call Signature

on<K>(type, listener, context?): void

Defined in: libs/base/dist/index.d.ts:635

IEventTarget.on

Type Parameters
K

K extends "dispose" | "nodeattached" | "noderemoved" | "visiblechanged" | "transformchanged" | "bvchanged"

Parameters
type

K

listener

EventListener<object & object, K>

context?

unknown

Returns

void

Inherited from

GraphNode.on

Call Signature

on<K>(type, listener, context?): void

Defined in: libs/base/dist/index.d.ts:594

IEventTarget.on

Type Parameters
K

K extends "dispose"

Parameters
type

K

listener

EventListener<{ dispose: []; }, K>

context?

unknown

Returns

void

Inherited from

GraphNode.on


once()

Call Signature

once<K>(type, listener, context?): void

Defined in: libs/base/dist/index.d.ts:639

IEventTarget.once

Type Parameters
K

K extends "dispose" | "nodeattached" | "noderemoved" | "visiblechanged" | "transformchanged" | "bvchanged"

Parameters
type

K

listener

EventListener<object & object, K>

context?

unknown

Returns

void

Inherited from

GraphNode.once

Call Signature

once<K>(type, listener, context?): void

Defined in: libs/base/dist/index.d.ts:598

IEventTarget.once

Type Parameters
K

K extends "dispose"

Parameters
type

K

listener

EventListener<{ dispose: []; }, K>

context?

unknown

Returns

void

Inherited from

GraphNode.once


off()

Call Signature

off<K>(type, listener, context?): void

Defined in: libs/base/dist/index.d.ts:643

IEventTarget.off

Type Parameters
K

K extends "dispose" | "nodeattached" | "noderemoved" | "visiblechanged" | "transformchanged" | "bvchanged"

Parameters
type

K

listener

EventListener<object & object, K>

context?

unknown

Returns

void

Inherited from

GraphNode.off

Call Signature

off<K>(type, listener?, context?): void

Defined in: libs/base/dist/index.d.ts:602

IEventTarget.off

Type Parameters
K

K extends "dispose"

Parameters
type

K

listener?

EventListener<{ dispose: []; }>

context?

unknown

Returns

void

Inherited from

GraphNode.off


dispatchEvent()

Call Signature

dispatchEvent<K>(type, ...args): void

Defined in: libs/base/dist/index.d.ts:647

IEventTarget.dispatchEvent

Type Parameters
K

K extends "dispose" | "nodeattached" | "noderemoved" | "visiblechanged" | "transformchanged" | "bvchanged"

Parameters
type

K

args

...object & object[K]

Returns

void

Inherited from

GraphNode.dispatchEvent

Call Signature

dispatchEvent<K>(type, ...args): void

Defined in: libs/base/dist/index.d.ts:606

IEventTarget.dispatchEvent

Type Parameters
K

K extends "dispose"

Parameters
type

K

args

...object[K]

Returns

void

Inherited from

GraphNode.dispatchEvent


dispose()

dispose(): void

Defined in: libs/base/dist/index.d.ts:6066

Returns

void

Inherited from

GraphNode.dispose


getName()

getName(): string

Defined in: libs/scene/src/scene/graph_node.ts:36

Gets the name

Returns

string

Inherited from

GraphNode.getName


isGraphNode()

isGraphNode(): this is GraphNode

Defined in: libs/scene/src/scene/graph_node.ts:43

Type guard: true if this node is a graph node.

Returns

this is GraphNode

Inherited from

GraphNode.isGraphNode


getNode()

getNode(): MSDFText

Defined in: libs/scene/src/scene/graph_node.ts:49

Returns the owning scene node (transform and hierarchy).

Returns

MSDFText

Inherited from

GraphNode.getNode


getBoneMatrices()

getBoneMatrices(): Texture2D<unknown>

Defined in: libs/scene/src/scene/graph_node.ts:55

Returns the texture containing bone matrices for skinned meshes.

Returns

Texture2D<unknown>

Inherited from

GraphNode.getBoneMatrices


getSortDistance()

getSortDistance(camera): number

Defined in: libs/scene/src/scene/graph_node.ts:61

Computes the distance used for sorting (e.g., transparent draw order).

Parameters

camera

Camera

Camera from which to compute distance (usually camera -> object).

Returns

number

Inherited from

GraphNode.getSortDistance


isBatchable()

isBatchable(): this is BatchDrawable

Defined in: libs/scene/src/scene/graph_node.ts:72

Returns true if the object supports instanced rendering.

When true, the object should also implement the BatchDrawable methods.

Returns

this is BatchDrawable

Inherited from

GraphNode.isBatchable


update()

update(): void

Defined in: libs/scene/src/scene/msdftext.ts:166

Update node state once per-frame

Returns

void

Overrides

GraphNode.update


isMSDFText()

isMSDFText(): this is MSDFText

Defined in: libs/scene/src/scene/msdftext.ts:199

Type guard: true if this node is a MSDF text sprite

Returns

this is MSDFText

Overrides

GraphNode.isMSDFText


onDispose()

protected onDispose(): void

Defined in: libs/scene/src/scene/msdftext.ts:202

Disposes the node

Returns

void

Overrides

GraphNode.onDispose


getPrefabNode()

getPrefabNode(): SceneNode

Defined in: libs/scene/src/scene/scene_node.ts:357

Get prefab node this node belongs to, or null if this node does not belongs to any prefab

Returns

SceneNode

prefab node this node belongs to

Inherited from

GraphNode.getPrefabNode


clone()

clone(): Promise<MSDFText>

Defined in: libs/scene/src/scene/scene_node.ts:547

Clone this node.

Returns

Promise<MSDFText>

New node instance

Remarks

If a shared model exists, it may create an instanced node. The clone is attached under the same parent; children are cloned based on method and recursive.

Inherited from

GraphNode.clone


hasChild()

hasChild(child): boolean

Defined in: libs/scene/src/scene/scene_node.ts:577

Whether the given node is a direct child of this node.

Parameters

child

SceneNode

The node to be checked

Returns

boolean

true if the given node is a direct child of this node, false otherwise

Inherited from

GraphNode.hasChild


removeChildren()

removeChildren(): void

Defined in: libs/scene/src/scene/scene_node.ts:583

Remove all children from this node.

Returns

void

Inherited from

GraphNode.removeChildren


isParentOf()

isParentOf(child): boolean

Defined in: libs/scene/src/scene/scene_node.ts:591

Whether this node is an ancestor (direct or indirect) of the given node.

Parameters

child

SceneNode

Returns

boolean

Inherited from

GraphNode.isParentOf


remove()

remove(): MSDFText

Defined in: libs/scene/src/scene/scene_node.ts:602

Detach this node from its parent.

Returns

MSDFText

this

Inherited from

GraphNode.remove


traverse()

traverse(v): void

Defined in: libs/scene/src/scene/scene_node.ts:611

Depth-first traversal of this node's subtree (pre-order).

Parameters

v

Visitor<SceneNode>

Visitor invoked on each node.

Returns

void

Inherited from

GraphNode.traverse


iterate()

iterate(callback): boolean

Defined in: libs/scene/src/scene/scene_node.ts:625

Iterate self and descendants in pre-order.

Warning: Do not remove children during this iteration. To allow removal, use iterateBottomToTop.

Parameters

callback

NodeIterateFunc

Called for each node; if returns true, iteration stops.

Returns

boolean

If returns true, the iteration will immediately stop.

Inherited from

GraphNode.iterate


iterateBottomToTop()

iterateBottomToTop(callback): boolean

Defined in: libs/scene/src/scene/scene_node.ts:644

Iterate self and descendants in reverse post-order (bottom-to-top).

Child nodes can be safely removed during this iteration.

Parameters

callback

NodeIterateFunc

Called for each node; if returns true, iteration stops.

Returns

boolean

If returns true, the iteration will immediately stop.

Inherited from

GraphNode.iterateBottomToTop


isLight()

isLight(): this is BaseLight

Defined in: libs/scene/src/scene/scene_node.ts:661

Type guard: true if this node is a light.

Returns

this is BaseLight

Inherited from

GraphNode.isLight


isMesh()

isMesh(): this is Mesh

Defined in: libs/scene/src/scene/scene_node.ts:665

Type guard: true if this node is a mesh.

Returns

this is Mesh

Inherited from

GraphNode.isMesh


isSprite()

isSprite(): this is Sprite

Defined in: libs/scene/src/scene/scene_node.ts:669

Type guard: true if this node is a sprite

Returns

this is Sprite

Inherited from

GraphNode.isSprite


isMSDFTextSprite()

isMSDFTextSprite(): this is MSDFTextSprite

Defined in: libs/scene/src/scene/scene_node.ts:673

Type guard: true if this node is a MSDF text sprite

Returns

this is MSDFTextSprite

Inherited from

GraphNode.isMSDFTextSprite


isWater()

isWater(): this is Water

Defined in: libs/scene/src/scene/scene_node.ts:681

Type guard: true if this node is a water node.

Returns

this is Water

Inherited from

GraphNode.isWater


isParticleSystem()

isParticleSystem(): this is ParticleSystem

Defined in: libs/scene/src/scene/scene_node.ts:685

Type guard: true if this node is a particle system.

Returns

this is ParticleSystem

Inherited from

GraphNode.isParticleSystem


isBatchGroup()

isBatchGroup(): this is BatchGroup

Defined in: libs/scene/src/scene/scene_node.ts:689

Type guard: true if this node is a batch group.

Returns

this is BatchGroup

Inherited from

GraphNode.isBatchGroup


isClipmapTerrain()

isClipmapTerrain(): this is ClipmapTerrain

Defined in: libs/scene/src/scene/scene_node.ts:693

Type guard: true if this node is a clipmap terrain.

Returns

this is ClipmapTerrain

Inherited from

GraphNode.isClipmapTerrain


isCamera()

isCamera(): this is Camera

Defined in: libs/scene/src/scene/scene_node.ts:697

true if this is a camera node, false otherwise

Returns

this is Camera

Inherited from

GraphNode.isCamera


isPunctualLight()

isPunctualLight(): this is PunctualLight

Defined in: libs/scene/src/scene/scene_node.ts:701

true if this is a punctual light node, false otherwise

Returns

this is PunctualLight

Inherited from

GraphNode.isPunctualLight


computeBoundingVolume()

computeBoundingVolume(): BoundingVolume

Defined in: libs/scene/src/scene/scene_node.ts:708

Computes the bounding volume of the node

Returns

BoundingVolume

The output bounding volume

Inherited from

GraphNode.computeBoundingVolume


getBoundingVolume()

getBoundingVolume(): BoundingVolume

Defined in: libs/scene/src/scene/scene_node.ts:715

Gets the bounding volume of the node

Returns

BoundingVolume

The bounding volume of the node

Inherited from

GraphNode.getBoundingVolume


setBoundingVolume()

setBoundingVolume(bv): void

Defined in: libs/scene/src/scene/scene_node.ts:726

Sets the bounding volume of the node

Parameters

bv

BoundingVolume

The bounding volume to set

Returns

void

Inherited from

GraphNode.setBoundingVolume


getWorldBoundingVolume()

getWorldBoundingVolume(): BoundingVolume

Defined in: libs/scene/src/scene/scene_node.ts:737

Gets the world space bounding volume of the node

Returns

BoundingVolume

The world space bounding volume of the node

Inherited from

GraphNode.getWorldBoundingVolume


computeWorldBoundingVolume()

computeWorldBoundingVolume(localBV): BoundingVolume

Defined in: libs/scene/src/scene/scene_node.ts:747

Computes the world space bounding volume of the node

Parameters

localBV

BoundingVolume

Returns

BoundingVolume

The output bounding volume

Inherited from

GraphNode.computeWorldBoundingVolume


invalidateBoundingVolume()

invalidateBoundingVolume(): void

Defined in: libs/scene/src/scene/scene_node.ts:753

Force the bounding volume to be recalculated

Returns

void

Inherited from

GraphNode.invalidateBoundingVolume


invalidateWorldBoundingVolume()

invalidateWorldBoundingVolume(transformChanged): void

Defined in: libs/scene/src/scene/scene_node.ts:758

Force the world space bounding volume to be recalculated

Parameters

transformChanged

boolean

Returns

void

Inherited from

GraphNode.invalidateWorldBoundingVolume


findNodeById()

findNodeById<T>(id): T

Defined in: libs/scene/src/scene/scene_node.ts:830

Finds a scene node by its persistent ID.

Type Parameters

T

T extends SceneNode

Expected node type.

Parameters

id

string

Persistent identifier to match against SceneNode.persistentId.

Returns

T

The first matching node, or null if not found.

Inherited from

GraphNode.findNodeById


findSkeletonById()

findSkeletonById(id): SkinBinding

Defined in: libs/scene/src/scene/scene_node.ts:845

Finds a skeleton object by its persistent ID.

Parameters

id

string

Persistent identifier to match against Skeleton.persistentId.

Returns

SkinBinding

The first matchign node, or null if not found.

Inherited from

GraphNode.findSkeletonById


findSkinBindingById()

findSkinBindingById(id): SkinBinding

Defined in: libs/scene/src/scene/scene_node.ts:853

Finds a skin binding by its persistent ID.

Parameters

id

string

Persistent identifier to match against SkinBinding.persistentId.

Returns

SkinBinding

The first matching binding, or null if not found.

Inherited from

GraphNode.findSkinBindingById


findSkeletonRigById()

findSkeletonRigById(id): SkeletonRig

Defined in: libs/scene/src/scene/scene_node.ts:868

Finds a shared skeleton rig by its persistent ID.

Parameters

id

string

Persistent identifier to match against SkeletonRig.persistentId.

Returns

SkeletonRig

The first matching rig, or null if not found.

Inherited from

GraphNode.findSkeletonRigById


findNodeByName()

findNodeByName<T>(name): T

Defined in: libs/scene/src/scene/scene_node.ts:890

Finds a scene node by name.

If multiple nodes share the same name, returns the first match encountered during traversal.

Type Parameters

T

T extends SceneNode

Expected node type.

Parameters

name

string

Node name to match.

Returns

T

The first matching node, or null if not found.

Remarks

Names are not guaranteed unique. Prefer IDs for stable references.

Inherited from

GraphNode.findNodeByName


getSerializedMorphTargetGroups()

getSerializedMorphTargetGroups(): SerializedMorphTargetGroup[]

Defined in: libs/scene/src/scene/scene_node.ts:973

Returns serialized morph target groups for this node.

Returns

SerializedMorphTargetGroup[]

Inherited from

GraphNode.getSerializedMorphTargetGroups


setSerializedMorphTargetGroups()

setSerializedMorphTargetGroups(groups): void

Defined in: libs/scene/src/scene/scene_node.ts:991

Restores serialized morph target groups for this node.

Parameters

groups

SerializedMorphTargetGroup[]

Returns

void

Inherited from

GraphNode.setSerializedMorphTargetGroups


invalidateTransform()

invalidateTransform(invalidateLocal?): void

Defined in: libs/scene/src/scene/scene_node.ts:1027

Force transform update and notify descendants.

Parameters

invalidateLocal?

boolean = true

If true, also invalidate local matrix; otherwise only invalidate world matrix.

Returns

void

Inherited from

GraphNode.invalidateTransform


setMorphTargetWeight()

setMorphTargetWeight(name, weight): void

Defined in: libs/scene/src/scene/scene_node.ts:1035

Set morph target weight by name for all meshes in the subtree.

Parameters

name

string

Morph target name

weight

number

Morph target weight

Returns

void

Inherited from

GraphNode.setMorphTargetWeight


setMorphTargetGroupWeight()

setMorphTargetGroupWeight(name, weight): void

Defined in: libs/scene/src/scene/scene_node.ts:1051

Set morph target group weight for the model instance.

Parameters

name

string

Morph target group name

weight

number

Group weight

Returns

void

Inherited from

GraphNode.setMorphTargetGroupWeight


getMorphTargetGroupWeight()

getMorphTargetGroupWeight(name): number

Defined in: libs/scene/src/scene/scene_node.ts:1073

Get morph target group weight.

Parameters

name

string

Morph target group name

Returns

number

The group weight, or 0 if no group was found

Inherited from

GraphNode.getMorphTargetGroupWeight


collectMorphTargetNames()

collectMorphTargetNames(): string[]

Defined in: libs/scene/src/scene/scene_node.ts:1081

Collect all morph target names from meshes in the subtree.

Returns

string[]

Array of unique morph target names

Inherited from

GraphNode.collectMorphTargetNames


collectMorphTargetGroupNames()

collectMorphTargetGroupNames(): string[]

Defined in: libs/scene/src/scene/scene_node.ts:1097

Collect all model-level morph target group names.

Returns

string[]

Array of morph target group names

Inherited from

GraphNode.collectMorphTargetGroupNames


onPostClone()

protected onPostClone(): void | Promise<void>

Defined in: libs/scene/src/scene/scene_node.ts:1106

Get called when the node was just created by cloning from other node

Returns

void | Promise<void>

Inherited from

GraphNode.onPostClone


_onAttached()

protected _onAttached(): void

Defined in: libs/scene/src/scene/scene_node.ts:1174

Get called when this node is attached to scene

Returns

void

Inherited from

GraphNode._onAttached


_onDetached()

protected _onDetached(): void

Defined in: libs/scene/src/scene/scene_node.ts:1178

Get called when this node is detached from scene

Returns

void

Inherited from

GraphNode._onDetached


worldToThis()

Call Signature

worldToThis(v, result?): Vector3

Defined in: libs/scene/src/scene/scene_node.ts:1249

Transform world coordinate to local space

Parameters
v

Vector3

point or vector in world space

result?

Vector3

The output result

Returns

Vector3

The transformed local space coordinate

Inherited from

GraphNode.worldToThis

Call Signature

worldToThis(v, result?): Vector4

Defined in: libs/scene/src/scene/scene_node.ts:1250

Transform world coordinate to local space

Parameters
v

Vector4

point or vector in world space

result?

Vector4

The output result

Returns

Vector4

The transformed local space coordinate

Inherited from

GraphNode.worldToThis


otherToThis()

Call Signature

otherToThis(other, v, result?): Vector3

Defined in: libs/scene/src/scene/scene_node.ts:1269

Transform coordinate in other coordinate space to local space

Parameters
other

SceneNode

The other coordinate space

v

Vector3

point or vector in other coordinate space

result?

Vector3

The output result

Returns

Vector3

The transformed local space coordinate

Inherited from

GraphNode.otherToThis

Call Signature

otherToThis(other, v, result?): Vector4

Defined in: libs/scene/src/scene/scene_node.ts:1270

Transform coordinate in other coordinate space to local space

Parameters
other

SceneNode

The other coordinate space

v

Vector4

point or vector in other coordinate space

result?

Vector4

The output result

Returns

Vector4

The transformed local space coordinate

Inherited from

GraphNode.otherToThis


thisToWorld()

Call Signature

thisToWorld(v, result?): Vector3

Defined in: libs/scene/src/scene/scene_node.ts:1280

Transform local coordinate to world space

Parameters
v

Vector3

point or vector in local space

result?

Vector3

The output result

Returns

Vector3

The transformed world space coordinate

Inherited from

GraphNode.thisToWorld

Call Signature

thisToWorld(v, result?): Vector4

Defined in: libs/scene/src/scene/scene_node.ts:1281

Transform local coordinate to world space

Parameters
v

Vector4

point or vector in local space

result?

Vector4

The output result

Returns

Vector4

The transformed world space coordinate

Inherited from

GraphNode.thisToWorld


thisToOther()

Call Signature

thisToOther(other, v, result?): Vector3

Defined in: libs/scene/src/scene/scene_node.ts:1300

Transform local space coordinate to other coordinate space

Parameters
other

SceneNode

The other coordinate space

v

Vector3

point or vector in localspace

result?

Vector3

The output result

Returns

Vector3

The transformed coordinate in other coordinate space

Inherited from

GraphNode.thisToOther

Call Signature

thisToOther(other, v, result?): Vector4

Defined in: libs/scene/src/scene/scene_node.ts:1301

Transform local space coordinate to other coordinate space

Parameters
other

SceneNode

The other coordinate space

v

Vector4

point or vector in localspace

result?

Vector4

The output result

Returns

Vector4

The transformed coordinate in other coordinate space

Inherited from

GraphNode.thisToOther


getWorldPosition()

getWorldPosition(outPos?): Vector3

Defined in: libs/scene/src/scene/scene_node.ts:1309

Gets the position of the xform in world space

Parameters

outPos?

Vector3

Returns

Vector3

position of the xform in world space

Inherited from

GraphNode.getWorldPosition


moveBy()

moveBy(delta): MSDFText

Defined in: libs/scene/src/scene/scene_node.ts:1320

Moves the xform by an offset vector

Parameters

delta

Vector3

The offset vector

Returns

MSDFText

self

Inherited from

GraphNode.moveBy


scaleBy()

scaleBy(factor): MSDFText

Defined in: libs/scene/src/scene/scene_node.ts:1329

Scales the xform by a given scale factor

Parameters

factor

Vector3

The scale factor

Returns

MSDFText

self

Inherited from

GraphNode.scaleBy


setLocalTransform()

setLocalTransform(matrix): MSDFText

Defined in: libs/scene/src/scene/scene_node.ts:1338

Sets the local transform matrix of the xform

Parameters

matrix

Matrix4x4

The transform matrix to set

Returns

MSDFText

self

Inherited from

GraphNode.setLocalTransform


calculateLocalTransform()

calculateLocalTransform(outMatrix): void

Defined in: libs/scene/src/scene/scene_node.ts:1375

Calculate local transform matrix

Parameters

outMatrix

Matrix4x4

Matrix object that holds the result of calculation

Returns

void

Inherited from

GraphNode.calculateLocalTransform


calculateWorldTransform()

calculateWorldTransform(outMatrix): void

Defined in: libs/scene/src/scene/scene_node.ts:1382

Calculate world transform matrix

Parameters

outMatrix

Matrix4x4

Matrix object that holds the result of calculation

Returns

void

Inherited from

GraphNode.calculateWorldTransform


lookAt()

lookAt(eye, target, up): MSDFText

Defined in: libs/scene/src/scene/scene_node.ts:1396

Sets the local tranformation matrix by a look-at matrix

Parameters

eye

Vector3

The eye position used to make the look-at matrix

target

Vector3

The target position used to make the look-at matrix

up

Vector3

The up vector used to make the look-at matrix

Returns

MSDFText

self

Inherited from

GraphNode.lookAt


updatePerCamera()

updatePerCamera(_camera, _elapsedInSeconds, _deltaInSeconds): void

Defined in: libs/scene/src/scene/scene_node.ts:1426

Update node state once per-camera

Parameters

_camera

Camera

Updates according to which camera

_elapsedInSeconds

number

Elapsed time from game start in seconds

_deltaInSeconds

number

Elapsed time since previous frame in seconds

Returns

void

Inherited from

GraphNode.updatePerCamera


reparent()

reparent(p?): MSDFText

Defined in: libs/scene/src/scene/scene_node.ts:1432

Removes this node from it's parent and add this node to another parent node if required

Parameters

p?

SceneNode

The new parent node that this node should be added to or null

Returns

MSDFText

self

Inherited from

GraphNode.reparent

Released under the MIT License.