Scene

Overview

Scene is a class in Aspose.3D FOSS for Typescript. Inherits from: SceneObject.

Scene.constructor creates an empty scene instance.

This class provides 11 methods for working with Scene objects in Typescript programs. Available methods include: clear, constructor, createAnimationClip, fromFile, getAnimationClip, open, openFromBuffer, render, save, saveToBuffer, toString. All public members are accessible to any Typescript application after installing the Aspose.3D FOSS for Typescript package. Properties: VERSION, animationClips, assetInfo, currentAnimationClip, library, poses, and 2 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.

Methods

SignatureDescription
constructor()Creates a scene containing the specified entity
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 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()string

See Also