Node
Overview
Node is a class in Aspose.3D FOSS for Typescript.
Inherits from: SceneObject.
Node.constructor creates a node with the specified name and initial entity.
This class provides 13 methods for working with Node objects in Typescript programs.
Available methods include: addChildNode, addEntity, clearEntities, constructor, createChildNode, evaluateGlobalTransform, getBoundingBox, getChild, merge, removeEntity, selectObjects, selectSingleObject, and 1 additional methods.
All public members are accessible to any Typescript application after installing the Aspose.3D FOSS for Typescript package.
Properties: assetInfo, childNodes, entities, entity, excluded, globalTransform, and 6 more.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
parentNode | Node | null | Read/Write | Gets the parent node. |
childNodes | Node[] | Read | Gets the child nodes. |
entities | Entity[] | Read | Gets the entities. |
entity | Entity | undefined | Read/Write | Gets the entity. |
materials | Material[] | Read | Gets the materials. |
material | Material | null | Read/Write | Gets the material. |
transform | Transform | Read | Gets the transform. |
globalTransform | GlobalTransform | Read | Gets the global transform. |
visible | boolean | Read/Write | Gets the visible. |
excluded | boolean | Read/Write | Gets the excluded. |
assetInfo | any | Read/Write | Gets the asset info. |
metaDatas | any[] | Read | Gets the meta datas. |
Methods
| Signature | Description |
|---|---|
constructor(name: string, entity: Entity) | Creates a node with the specified name and initial entity |
addEntity(entity: Entity) | Attaches the given entity to the node’s entity collection |
removeEntity(entity: Entity) | Detaches the specified entity from the node |
clearEntities() | Removes all entities from the node |
addChildNode(node: Node) | Adds an existing 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) | Incorporates the contents of another node into this node |
evaluateGlobalTransform(withGeometricTransform: boolean) → Matrix4 | Computes the node’s global transform matrix, optionally including geometric transform |
getBoundingBox() → BoundingBox | Returns the bounding box. |
selectSingleObject(_path: string) → any | Not implemented in the FOSS edition — throws at runtime. Selects a single object in the node hierarchy using the provided path |
selectObjects(_path: string) → any[] | Not implemented in the FOSS edition — throws at runtime. Selects all objects matching the given path and returns them as an array |
toString() → string |