Add WebGL book scene checkpoint
This commit is contained in:
@@ -11,7 +11,7 @@ class UIDisplayHandlerModule extends BaseModule {
|
||||
super('ui-display-handler', 'UI Display Handler');
|
||||
|
||||
// Module dependencies
|
||||
this.dependencies = ['layout-renderer', 'playback-coordinator', 'game-config', 'localization', 'story-history', 'sentence-queue', 'persistence-manager', 'markup-parser'];
|
||||
this.dependencies = ['layout-renderer', 'webgl-book-scene', 'playback-coordinator', 'game-config', 'localization', 'story-history', 'sentence-queue', 'persistence-manager', 'markup-parser'];
|
||||
|
||||
// DOM elements
|
||||
this.container = null;
|
||||
@@ -170,6 +170,7 @@ class UIDisplayHandlerModule extends BaseModule {
|
||||
|
||||
// Get references to required modules using parent's getModule method
|
||||
this.layoutRenderer = this.getModule('layout-renderer');
|
||||
this.webglBookScene = this.getModule('webgl-book-scene');
|
||||
this.playbackCoordinator = this.getModule('playback-coordinator');
|
||||
this.gameConfig = this.getModule('game-config');
|
||||
this.localization = this.getModule('localization');
|
||||
@@ -355,6 +356,8 @@ class UIDisplayHandlerModule extends BaseModule {
|
||||
* Initialize the UI containers
|
||||
*/
|
||||
initializeContainers() {
|
||||
this.webglBookScene?.ensureShell?.();
|
||||
|
||||
// Check if the book container already exists
|
||||
let bookContainer = document.getElementById('book');
|
||||
if (!bookContainer) {
|
||||
@@ -526,7 +529,10 @@ class UIDisplayHandlerModule extends BaseModule {
|
||||
this.createNotificationDialog();
|
||||
|
||||
console.log('UIDisplayHandler: All containers initialized');
|
||||
this.webglBookScene?.adoptPageContent?.();
|
||||
this.webglBookScene?.refreshModalOverview?.();
|
||||
this.applyGameConfig(this.gameConfig?.getConfig?.());
|
||||
this.webglBookScene?.adoptPageContent?.();
|
||||
this.applyTranslations();
|
||||
this.measureStoryLineHeight();
|
||||
this.setStoryOffset(0);
|
||||
|
||||
Reference in New Issue
Block a user