here is the implementation i used
var modelUrls = ["../../8c425d/AstoCT_01.glb", "../../8c425d/AstoCT_02.glb", "../../8c425d/AstoCT_03.glb","../../8c425d/AstoCT_04.glb"];
function CreateSceneMeshes(scene) {
modelUrls.forEach((e,i) => {
BABYLON.SceneLoader.AppendAsync(modelUrls[i]).then(function () {
BABYLON.Tools.Log(scene.meshes);
});
})
return Promise.resolve();
}
var engine = new BABYLON.NativeEngine();
var scene = new BABYLON.Scene(engine);
CreateSceneMeshes(scene).then(function () {
scene.createDefaultCamera(true, true, true);
scene.activeCamera.alpha += Math.PI;
if (ibl) {
scene.createDefaultEnvironment({ createGround: false, createSkybox: false });
}
else {
scene.createDefaultLight(true);
}
}, function (ex) {
console.log(ex.message, ex.stack);
});