Presentation

演示系统对象。

new CooWasm.Presentation(props, callback)

Name Type Default Description
props Object

包含如下属性的Object:

Name Type Default Description
items Array.<PresentationItem> optional

演示子项数组。

status EnumPresentationStatus EnumPresentationStatus.PLAY optional

演示系统播放状态。

callback CallbackBoolean null optional

加载成功后触发的函数回调。

Example:
var presentation = new CooWasm.Presentation({},(state)=>{console.log("load status:" + state)});
Demo:

Members

readonlyavatarUuid : String

演示系统对象uuid。

readonlycomponentUuid : String

演示系统组件uuid。

items : Array.<PresentationItem>

演示子项数组。

演示系统播放状态。

Methods

destroy(callback)

从场景中销毁自身。

Name Type Default Description
callback CallbackBoolean null optional

销毁图层后触发的函数回调。

Returns:

null 空值。

Example:
// 销毁图层
layer = layer.destroy((state)=>{console.log("destroy status:" + state)});

getProperties()Boolean

获取对象包含的属性。

Returns:

是否获取成功。获取成功时,会自动赋值给属性。

Example:
presentation.getProperties();

next()

继续下一个演示子项。

Example:
presentation.next();

pause()

暂停演示子项。

Example:
presentation.pause();

play()

播放演示子项。

Example:
presentation.play();

stop()

停止播放演示子项。

Example:
presentation.stop();

update(props, callback)

更新单个或者多个对象属性,使之立即生效。

Name Type Default Description
props Object optional

包含如下属性的Object。

Name Type Description
items Array.<PresentationItem> optional

演示子项数组。

status EnumPresentationStatus optional

演示系统播放状态。

callback CallbackBoolean null optional

更新成功后触发的函数回调。

Example:
presentation.update({
   status:CooWasm.EnumPresentationStatus.PAUSE
},(state)=>{console.log("update status:" + state)});