Stabilize WebGL reveal timing

This commit is contained in:
2026-06-07 16:42:09 +02:00
parent 9695d48368
commit 53c24e4fae
7 changed files with 217 additions and 22 deletions
-9
View File
@@ -58,12 +58,6 @@ class WebGLBookSceneModule extends BaseModule {
this.addEventListener(document, 'preference-updated', this.handlePreferenceUpdated);
this.addEventListener(document, 'localization:languageChanged', this.updateLocalizedText);
this.addEventListener(document, 'story:turn-start', this.triggerTextureRefresh);
this.addEventListener(document, 'story:turn-complete', this.triggerTextureRefresh);
this.addEventListener(document, 'story:history-updated', this.triggerTextureRefresh);
this.addEventListener(document, 'story:process-state', this.handleProcessState);
this.addEventListener(document, 'input', this.triggerTextureRefresh, true);
this.addEventListener(document, 'change', this.triggerTextureRefresh, true);
if (this.mode !== '3d') {
this.reportProgress(100, '2D book UI selected');
@@ -303,7 +297,6 @@ class WebGLBookSceneModule extends BaseModule {
await new Promise(resolve => requestAnimationFrame(resolve));
this.reportProgress(96, 'Binding WebGL page controls');
this.installTextureEventBridge();
this.triggerTextureRefresh();
return this.labImportPromise;
}
@@ -468,12 +461,10 @@ class WebGLBookSceneModule extends BaseModule {
if (this.mode === '3d') {
this.createLabHost();
this.installPreferenceBridge();
if (this.labImportPromise) this.triggerTextureRefresh();
}
const title = document.getElementById('game_title')?.textContent?.trim();
const label = document.getElementById('lab_title');
if (title && label) label.textContent = title;
this.triggerTextureRefresh();
}
refreshModalOverview() {