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
| Name | Type | Access | Description |
|---|---|---|---|
parentNode | Node | null | Read | Holds a reference to this node’s parent, or null if it is a root node |
childNodes | Node[] | Read | Is an array of this node’s direct child nodes |
entities | Entity[] | Read | Contains all entities attached to this node |
entity | Entity | undefined | Read | Provides the primary entity of the node, if any |
materials | Material[] | Read | Is a list of materials applied to the node’s geometry |
material | Material | null | Read | Holds the active material for the node, or null if none is set |
transform | Transform | Read | Represents the local transformation (position, rotation, scale) of the node |
globalTransform | GlobalTransform | Read | Provides the computed global transformation of the node in world space |
visible | boolean | Read | |
excluded | boolean | Read | Flags the node to be ignored during export or processing |
assetInfo | any | Read | Stores arbitrary user-defined data associated with the node |
metaDatas | any[] | Read | Holds an array of additional metadata objects attached to the node |
Methods
| Signature | Description |
|---|---|
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) → Node | Creates a new child node with name, entity and material, and returns it |
getChild(indexOrName: number | string) → Node | null | Returns 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) → Matrix4 | Computes the node’s global Matrix4, optionally including geometric transform |
getBoundingBox() → BoundingBox | Returns the axis-aligned bounding box that encloses the node’s geometry |
selectSingleObject(_path: string) → any | Selects 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 |