在线咨询
QQ交流群
微信公众号

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?)

切换场景层级

Parameters:
Name Type Description
object? THING.BaseObject

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

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

isChanged() → {Boolean}

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

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