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.

Description

Scene is a class in the Aspose.3D FOSS library for TypeScript that exposes 10 methods and 8 properties for programmatic use. It extends SceneObject, inheriting shared functionality from its parent type.

Core capabilities include: node; scene[]; customobject[]. These operations enable developers to integrate scene functionality directly into TypeScript applications.

The class also provides the VERSION property (gets the version), the rootNode property (gets the root node), the subScenes property (gets the sub scenes).

The class offers 4 constructor overloads, allowing flexible initialization depending on the calling context.

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

 English