在app.onload之前使用ajax添加html文件
// ajax请求文件
$.ajax({
url: '/uploads/wechat/703071/file/启动界面/index.html', //启动界面地址
type: 'get',
dataType: 'text',
success: function (data) {
// 添加启动界面到页面中
$('.div2d').append(data);
// 查看当前场景加载进度
app.on(THING.EventType.Progress, function (ev) {
// 得到0-100的整数
var num = Math.trunc(ev.progress * 100)
})
}
})
在app.onload中给添加的页面设置隐藏
document.getElementById("loadingDiv").style.display = "none";