We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Issue with Preloading Page Reloading Upon Puzzle Debugging

Home Forums General Questions Issue with Preloading Page Reloading Upon Puzzle Debugging

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #70764
    qiangge
    Participant

    “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'); }
                   
              };
    
    
Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.