Node

Overview

Node is a class in Aspose.3d for Typescript. Inherits from: Node, SceneObject.

Node.constructor creates a node with the specified name and attached entity.

Properties

NameTypeAccessDescription
parentNodeNode | nullReadHolds a reference to this node’s parent, or null if it is a root node
childNodesNode[]ReadIs an array of this node’s direct child nodes
entitiesEntity[]ReadContains all entities attached to this node
entityEntity | undefinedReadProvides the primary entity of the node, if any
materialsMaterial[]ReadIs a list of materials applied to the node’s geometry
materialMaterial | nullReadHolds the active material for the node, or null if none is set
transformTransformReadRepresents the local transformation (position, rotation, scale) of the node
globalTransformGlobalTransformReadProvides the computed global transformation of the node in world space
visiblebooleanRead
excludedbooleanReadFlags the node to be ignored during export or processing
assetInfoanyReadStores arbitrary user-defined data associated with the node
metaDatasany[]ReadHolds an array of additional metadata objects attached to the node

Methods

SignatureDescription
constructor(name: string, entity: Entity)Creates a node with the specified name and attached entity
addEntity(entity: Entity)Adds the given entity to the node’s entity collection
removeEntity(entity: Entity)Removes the specified entity from the node’s entity collection
clearEntities()Removes all entities from the node
addChildNode(node: Node)Appends the given node as a child of this node
createChildNode(nodeName: string, entity: Entity, material: Material)NodeCreates a new child node with name, entity and material, and returns it
getChild(indexOrName: number | string)Node | nullReturns the child node at the given index or with the given name, or null
merge(node: Node)Merges the contents of another node into this node
evaluateGlobalTransform(withGeometricTransform: boolean)Matrix4Computes the node’s global Matrix4, optionally including geometric transform
getBoundingBox()BoundingBoxReturns the axis-aligned bounding box that encloses the node’s geometry
selectSingleObject(_path: string)anySelects a single object in the node hierarchy using the given path
selectObjects(_path: string)any[]Selects all objects matching the path and returns them as an array
_propagateScene(scene: Scene | null)
toString()string