mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
Keep globe renderers warm across live engine switches
This commit is contained in:
1 parent
f71c76c306
commit
5e658d8c9d
15 files changed
+343
-34
No files matched your search
@@ -16,7 +16,9 @@ export function startApplicationChrome({
|
||||
const minimumDelay = new Promise((resolve) => {
|
||||
resolveDelay = resolve;
|
||||
});
|
||||
const delayTimer = setTimeout(resolveDelay, 1000);
|
||||
const switching = loadingScreen.classList.contains?.('hidden');
|
||||
const delayTimer = switching ? null : setTimeout(resolveDelay, 1000);
|
||||
if (switching) resolveDelay();
|
||||
const revealFirstRun = () => {
|
||||
if (disposed || signal.aborted || firstRun) return;
|
||||
firstRun = initializeWelcome?.({ styleManager, dataManager });
|
||||
@@ -28,7 +30,7 @@ export function startApplicationChrome({
|
||||
/* Restoration reports its own outcome through the controls. */
|
||||
})
|
||||
.then(() => {
|
||||
if (disposed || signal.aborted) return;
|
||||
if (disposed || signal.aborted || switching) return;
|
||||
loadingScreen.classList.add('hidden');
|
||||
loadingScreen.addEventListener('transitionend', revealFirstRun, {
|
||||
once: true,
|
||||
|
||||
Reference in new issue
Block a user