My Babylon scene is no longer being rendered as of this morning. No changes have been made to the code base which rules out problems my end. This happens in all environments and on all browsers…
BABYLON.DefaultLoadingScreen.prototype.displayLoadingUI = function () {
if (document.getElementById(“custom-loading-screen-div”)) {
// Do not add a loading screen if there is already one
document.getElementById(“custom-loading-screen-div”).style.display = “initial”;
return;
}
this._loadingDiv = document.createElement(“div”);
this._loadingDiv.id = “custom-loading-screen-div”;
this._loadingDiv.innerHTML = @include('parts.renders.loading-screen-korniche');
this._resizeLoadingUI();
window.addEventListener(“resize”, this._resizeLoadingUI);
document.body.appendChild(this._loadingDiv);
};
BABYLON.DefaultLoadingScreen.prototype.hideLoadingUI = function(){
document.getElementById("custom-loading-screen-div").style.display = "none";
console.log("scene is now loaded");
}
var canvas = document.getElementById("renderCanvas");
var startRenderLoop = function (engine, canvas) {
engine.runRenderLoop(function () {
if (sceneToRender && sceneToRender.activeCamera) {
sceneToRender.render();
}
});
}
var engine = null;
var scene = null;
var sceneToRender = null;
var createDefaultEngine = function () {
return new BABYLON.Engine(canvas, true, {
preserveDrawingBuffer: true,
stencil: true,
disableWebGL2Support: false
});
};
I miss in your code where your scene is loaded “scene = createSzene();”
let engine = new BABYLON.Engine(canvas, true, {
preserveDrawingBuffer: true,
stencil: true
});
let scene = createScene();
engine.runRenderLoop(function () {
if (scene) {
scene.render();
}
});
You don’t. I don’t think we have access to previous versions (but I could be wrong, may be this has changed). I guess the easiest at this moment would be to download it and feed it from your server.
Yup we’d really like to understand what’s going on, I tried loading some test stls and they didn’t have any problem, but there might be something different with your files?