“Happy New Year, everyone! I have customized a preloading page, and everything runs fine. However, after loading the scene, every time I debug the puzzle and click the ‘Run Puzzle’ button, this preloading page reloads instead of behaving like the default loader, which stays hidden. Below is the code for the loaded completion part. Do I need to add a global variable as a completion flag? This variable should be able to retain its value when clicking on the puzzle and reset when refreshing the webpage. Any suggestions? Thank you!”
_initGlob.output.initOptions.preloaderEndCb = function () {
_initGlob.percentage = 100;
//todo GlobSceneLoaded = true
let loadingElement = document.getElementById('preloader');
let percentElem = document.getElementById('progress_bar');
let percentElem2 = document.getElementById('progress_pc');
if (loadingElement) { loadingElement.classList.add('hidden'); }
if (percentElem) { percentElem.classList.add('hidden'); }
if (percentElem2) { percentElem2.classList.add('hidden'); }
};