Class: SceneLevel
优质
小牛编辑
127浏览
2023-12-01
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()