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

NameTypeAccessDescription
VERSION``ReadGets the version.
rootNodeNodeReadGets the root node.
subScenesScene[]ReadGets the sub scenes.
libraryCustomObject[]ReadGets the library.
assetInfoAssetInfoRead/WriteGets the asset info.
animationClipsAnimationClip[]ReadGets the animation clips.
currentAnimationClipAnimationClip | nullRead/WriteGets the current animation clip.
posesany[]ReadGets the poses.
sceneScene | nullRead/WriteGets the scene.
namestringRead/WriteGets the name.
propertiesPropertyCollectionReadGets the properties.

Methods

SignatureDescription
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)AnimationClipCreates a new animation clip with the given name
getAnimationClip(name: string)AnimationClip | nullReturns 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)BufferReturns 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)SceneLoads a scene from the specified file and returns the scene
toString()stringCalls toString on this Scene instance.
constructor(name: string)Calls constructor(name) on this Scene instance.
findProperty(propertyName: string)Property | nullCalls findProperty(propertyName) on this Scene instance.
getProperty(property: string)anyCalls getProperty(property) on this Scene instance.
setProperty(property: string, value: any)Sets the property value.
removeProperty(property: string | Property)booleanCalls removeProperty(property) on this Scene instance.

See Also

 English