Scene
Overview
Scene is a class in Aspose.3D FOSS for TypeScript.
Inherits from: SceneObject.
Scene.constructor creates an empty scene instance.
This class declares 19 methods for Scene objects in TypeScript programs.
Available methods include: clear, constructor, createAnimationClip, findProperty, fromFile, getAnimationClip, getProperty, open, openFromBuffer, removeProperty, render, save, and 3 additional methods.
Public members are accessible to any TypeScript application after installing the Aspose.3D FOSS for TypeScript package.
Properties: VERSION, animationClips, assetInfo, currentAnimationClip, library, name, and 5 more.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
VERSION | `` | Read | Gets the version. |
rootNode | Node | Read | Gets the root node. |
subScenes | Scene[] | Read | Gets the sub scenes. |
library | CustomObject[] | Read | Gets the library. |
assetInfo | AssetInfo | Read/Write | Gets the asset info. |
animationClips | AnimationClip[] | Read | Gets the animation clips. |
currentAnimationClip | AnimationClip | null | Read/Write | Gets the current animation clip. |
poses | any[] | Read | Gets the poses. |
scene | Scene | null | Read/Write | Gets the scene. |
name | string | Read/Write | Gets the name. |
properties | PropertyCollection | Read | Gets the properties. |
Methods
| Signature | Description |
|---|---|
constructor() | Creates a scene containing the specified entity |
constructor(entity: Entity) | Calls constructor(entity) on this Scene instance. |
constructor(parentScene: Scene, name: string) | Calls constructor(parentScene, name) on this Scene instance. |
constructor() | |
clear() | Removes all nodes, assets and animation data from the scene |
createAnimationClip(name: string) → AnimationClip | Creates a new animation clip with the given name |
getAnimationClip(name: string) → AnimationClip | null | Returns the animation clip with the specified name or null |
open(fileOrStream: any, options: any) | Loads scene data from a file path or stream using options |
openFromBuffer(buffer: Buffer | Uint8Array, options: any) | Loads scene data from a memory buffer with options |
save(fileOrStream: any, formatOrOptions: any, options: any) | Writes the scene to a file or stream |
saveToBuffer(format: string, _options: any) → Buffer | Returns a Buffer containing the scene in the given format |
render(_camera: any, _file_name_or_bitmap: any, _size: any, _format: any, _options: any) | Not implemented in the FOSS edition — throws at runtime. Renders the scene with the camera to an image |
fromFile(fileName: string) → Scene | Loads a scene from the specified file and returns the scene |
toString() → string | Calls toString on this Scene instance. |
constructor(name: string) | Calls constructor(name) on this Scene instance. |
findProperty(propertyName: string) → Property | null | Calls findProperty(propertyName) on this Scene instance. |
getProperty(property: string) → any | Calls getProperty(property) on this Scene instance. |
setProperty(property: string, value: any) | Sets the property value. |
removeProperty(property: string | Property) → boolean | Calls removeProperty(property) on this Scene instance. |