| Name | Type | Default | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
props |
Object |
包含如下属性的Object:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
callback |
CallbackBoolean |
null
|
optional
创建成功后触发的函数回调。 |
Example:
var item = new CooWasm.PresentationItem({},(state)=>{console.log("load status:" + state)});
Demo:
Members
aimPosition : Vec3Obj
当EnumPresentationItemType为FOLLOW时,相机所朝向的目标经纬度点。
当EnumPresentationItemType为FOLLOW时,相机相对跟踪对象的水平旋转角。
camera : Camera
当EnumPresentationItemType为CAMERA时,所对应的Camera对象,如不传递,则自动根据当前视点信息记录。
condition : EnumConditionType
执行动作条件类型。
当EnumPresentationItemType为FOLLOW时,相机相对跟踪对象的距离。
当EnumPresentationItemType为FOLLOW时,所对应绑定对象的avatarId。必须对应某个对象。
当播放完成时触发的事件回调。
当EnumPresentationItemType为HIDE时,所对应绑定对象的avatarId的数组。不得为空数组。
当EnumPresentationItemType为FOLLOW时,相机相对跟踪对象的抬高高度。
子项名称。
当EnumPresentationItemType为FOLLOW时,相机相对跟踪对象的垂直俯仰角。
当EnumPresentationItemType为SHOW时,所对应绑定对象的avatarId的数组。不得为空数组。
type : EnumPresentationItemType
子项类型。
执行动作等待时间,单位:秒。
Methods
从场景中销毁自身。
Returns:
null 空值。
Example:
// 销毁对象
item = item.destroy();
将PresentationItem实例转换成json格式的字符串。
Returns:
json格式的字符串。
更新单个或者多个对象属性,使之立即生效。
| Name | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
props |
Object |
包含如下属性的Object:
|
Example:
item.update({
name:"test"
},(state)=>{console.log("update status:" + state)});