Scene

Overview

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

Scene management features include creating a Scene, adding Node objects, and attaching Entity (e.g., Mesh) instances to nodes.

Properties

NameTypeAccessDescription
VERSION``ReadHolds the library version string for the Scene class
rootNodeNodeReadIs the top‑level Node that contains all child nodes of the scene
subScenesScene[]ReadIs an array of child Scene objects representing nested scenes
libraryCustomObject[]ReadStores custom objects associated with the scene
assetInfoAssetInfoReadProvides metadata about the assets contained in the scene
animationClipsAnimationClip[]ReadIs a collection of all AnimationClip objects in the scene
currentAnimationClipAnimationClip | nullReadReferences the AnimationClip currently active or null
posesany[]ReadHolds an array of pose data applied to the scene

Methods

SignatureDescription
constructor()Creates a sub‑scene of the specified parent with the provided name
constructor(entity: Entity)
constructor(parentScene: Scene, name: string)
constructor()
clear()Removes all nodes, assets and animation data from the scene
createAnimationClip(name: string)AnimationClipcreates a newAnimationClip` that can be added to the scene’s animation collection
getAnimationClip(name: string)AnimationClip | nullReturns the AnimationClip matching the name or null if not found
open(fileOrStream: any, options: any)` loads a 3D file (e.g., OBJ, STL, 3MF) into the scene using the provided load options
openFromBuffer(buffer: Buffer | Uint8Array, options: any)Loads a scene from a memory buffer with the given options
save(fileOrStream: any, formatOrOptions: any, options: any)Writes the scene to a file or stream using format or options and additional settings
saveToBuffer(format: string, _options: any)BufferReturns a Buffer containing the scene serialized in the specified format
render(_camera: any, _file_name_or_bitmap: any, _size: any, _format: any, _options: any)Renders the scene from the camera to a file, bitmap, or other target with size, format and options
fromFile(fileName: string)SceneCreates and returns a new Scene loaded from the specified file
_propagateScene()
toString()string