In my android mobile, firefox browser and the built-in browser of the system. the page2 can not work normal.
the two pages js code is all the same except the file url.
page1: https://issuebox.github.io/babylonjs/instance/index4.html
page2: https://issuebox.github.io/babylonjs/instance/index5.html
in page1, the glb file is small, it work ok! I can get the alert of “file loaded”!
in page2, the glb file is larger, it did not end! I can not wait the alert of “file loaded”!
the main js code:
var canvas = document.getElementById("canvas");
var engine = new BABYLON.Engine(canvas, true);
async function init() {
var scene = new BABYLON.Scene(engine);
await BABYLON.SceneLoader.ImportMeshAsync(
"",
"./assets/",
"ylw-thumb.glb",
scene
);
alert("file loaded!");
scene.createDefaultCameraOrLight(true, true, true);
engine.runRenderLoop(function () {
scene.render();
});
window.addEventListener("resize", function () {
engine.resize();
});
}
init();