Stabilize WebGL flip reveal handoff
This commit is contained in:
+7
-7
@@ -24,7 +24,7 @@ const ModuleState = {
|
||||
ERROR: 'ERROR'
|
||||
};
|
||||
|
||||
const MODULE_CACHE_BUSTER = '20260610-book-timeline-j';
|
||||
const MODULE_CACHE_BUSTER = '20260610-book-timeline-l';
|
||||
window.MODULE_CACHE_BUSTER = MODULE_CACHE_BUSTER;
|
||||
|
||||
/**
|
||||
@@ -830,17 +830,17 @@ const ModuleLoader = (function() {
|
||||
async function completeFinalization() {
|
||||
isLoadingComplete = true;
|
||||
|
||||
// Call the start method on the game loop module directly
|
||||
// Ensure the game loop module was found during initialization
|
||||
// Call the start method on the game loop module directly.
|
||||
// Starting before hiding the overlay lets socket connection and
|
||||
// save/resume state settle as part of the loader handoff.
|
||||
if (gameLoopModule && typeof gameLoopModule.start === 'function') {
|
||||
// Hide the overlay first, then start the game loop
|
||||
await hideOverlay();
|
||||
console.log("Loader: Overlay hidden, starting Game Loop.");
|
||||
try {
|
||||
gameLoopModule.start();
|
||||
console.log("Loader: Starting Game Loop before hiding overlay.");
|
||||
await gameLoopModule.start();
|
||||
} catch (error) {
|
||||
console.error("Error starting Game Loop:", error);
|
||||
}
|
||||
await hideOverlay();
|
||||
} else {
|
||||
console.error("Loader: Game Loop module not found or start method missing.");
|
||||
// Hide overlay anyway, but log error
|
||||
|
||||
Reference in New Issue
Block a user