Atmosphere

new CooWasm.Atmosphere(props, callback)

大气层。


大气层效果图
Name Type Default Description
props Object

包含如下属性的Object:

Name Type Default Description
bVisible Boolean true optional

大气层显隐状态。

callback CallbackBoolean null optional

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

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

Members

readonlyavatarUuid : String

大气层对象uuid。

bVisible : Boolean

大气层显隐状态。

Default Value: true

readonlycomponentUuid : String

大气层组件uuid。

Methods

destroy(callback)

从场景中销毁自身。

Name Type Default Description
callback CallbackBoolean null optional

销毁后触发的函数回调。

Returns:

null 空值。

Example:
atmosphere = atmosphere.destroy((state)=>{console.log("destroy status:" + state)})

getProperties()Boolean

获取大气层包含的属性。

Returns:

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

Example:
ato.getProperties()

update(props, callback)

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

Name Type Default Description
props Object optional

包含如下属性的Object。

Name Type Description
bVisible Boolean optional

大气层显隐状态。

callback CallbackBoolean null optional

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

Example:
atmosphere.update({
   bVisible:false
},(state)=>{console.log("update status:" + state)})