#ThreeDisplayObject
继承自unknown
@example
const renderer = new THREE.WebGLRenderer({...});
const scene = new THREE.Scene();
const { width, height } = renderer.domElement.getBoundingClientRect();
const displayObject = new ThreeDisplayObject(renderer.getContext(), { width, height });

await displayObject.loadScene(json);
scene.add(displayObject);
总览

构造函数

#Cconstructor
签名
ThreeDisplayObject(context: WebGLRenderingContext | WebGL2RenderingContext, options: ThreeDisplayObjectOptions): ThreeDisplayObject
参数
context: WebGLRenderingContext | WebGL2RenderingContext
参数
options: ThreeDisplayObjectOptions
返回ThreeDisplayObject

访问器

#AcurrentComposition
签名
GETcurrentComposition(): ThreeComposition
描述

获取当前播放合成,如果是多个合成同时播放,返回第一个合成

返回ThreeComposition

方法

#MloadScene
签名
loadScene(scene: LoadType, options: SceneLoadOptions): Promise<Composition>
描述

加载动画资源

@returns
参数
scene: LoadType

一个或一组 URL 或者通过 URL 请求的 JSONObject 或者 Scene 对象

参数
options: SceneLoadOptions

加载可选参数

返回Promise<Composition>
签名
loadScene(scene: LoadType[], options: SceneLoadOptions): Promise<Composition[]>
描述

加载动画资源

@returns
参数
scene: LoadType[]

一个或一组 URL 或者通过 URL 请求的 JSONObject 或者 Scene 对象

参数
options: SceneLoadOptions

加载可选参数

返回Promise<Composition[]>
#Mupdate
签名
update(delta: number): void
参数
delta: number
返回void