Fix WebGL page readiness gating

This commit is contained in:
2026-06-10 10:46:01 +02:00
parent 623b42caf9
commit e3d66686b9
5 changed files with 45 additions and 20 deletions
+3 -3
View File
@@ -4,7 +4,7 @@ import { RenderPass } from 'https://esm.sh/three@0.165.0/examples/jsm/postproces
import { SSAOPass } from 'https://esm.sh/three@0.165.0/examples/jsm/postprocessing/SSAOPass.js';
import { SMAAPass } from 'https://esm.sh/three@0.165.0/examples/jsm/postprocessing/SMAAPass.js';
import { OutputPass } from 'https://esm.sh/three@0.165.0/examples/jsm/postprocessing/OutputPass.js';
import { PROCEDURAL_BOOK, createProceduralBookModel, snapProceduralPageCount } from './procedural-book-model.js?v=20260610-book-timeline-b';
import { PROCEDURAL_BOOK, createProceduralBookModel, snapProceduralPageCount } from './procedural-book-model.js?v=20260610-book-timeline-d';
const canvas = document.getElementById('scene');
canvas.style.cursor = 'grab';
@@ -2105,7 +2105,7 @@ function handlePageTextureRecords(event) {
source: 'book-texture-renderer'
});
markPageTextureTiming('handlePageTextureRecords:end');
prewarmNavigationTextureWindow('page-texture-records').catch((error) => {
prewarmNavigationTextureWindow('page-texture-records', { recordMiss: false }).catch((error) => {
pageTextureStore?.recordProblem?.({
type: 'navigation-window-prewarm-error',
message: error?.message || String(error)
@@ -2300,7 +2300,7 @@ async function prewarmNavigationTextureWindow(reason = 'navigation-window', opti
targetSpread: options.targetSpread,
endSpread,
getPageMetaForIndex: makePageMetaForCache,
recordMiss: options.recordMiss !== false
recordMiss: options.recordMiss === true
});
markPageTextureTiming('textureStorePrewarm:end', {
reason,