业务咨询
开发咨询
微信沟通

Class: SceneLevel

THING~ SceneLevel

SceneLevel 场景层级管理


SceneLevel()

Members


current :THING.BaseObject

获取当前层级

Type:
Example
var currentLevel = app.level.current;

previous :THING.BaseObject

获取之前的层级

Type:
Example
var previousLevel = app.level.previous;

Methods


back()

返回至上一层级(父层级)

Example
app.level.back()

change(object [, params])

切换场景层级

Parameters:
Name Type Argument Description
object THING.BaseObject

将要切换至的场景层级物体对象

params Object <optional>

(BETA) 参数列表

Properties
Name Type Description
complete function

(BETA) 完成回调函数

Example
// 开启场景层级控制
app.level.change();
// 将层级切换至某楼层
var floor=app.query('.Floor')[0];
app.level.change(floor);

isChanged() → {Boolean}

检测当前帧层级是否发生改变

Returns:
Type
Boolean
Example
app.level.isChanged()

quit(params)

结束层级管理

Parameters:
Name Type Description
params Object

参数列表