Fix WebGL line reveal renderer

This commit is contained in:
2026-06-09 09:02:54 +02:00
parent 419691000c
commit d665a0f237
4 changed files with 363 additions and 148 deletions
+12 -1
View File
@@ -981,15 +981,26 @@ class UIDisplayHandlerModule extends BaseModule {
const generation = this.displayGeneration;
const sentenceGameId = sentence.gameId || null;
const isCurrent = () => this.isDisplayGenerationCurrent(generation, sentenceGameId);
const useWebGLBookReveal = this.isWebGLMode() && (sentence.kind === 'paragraph' || sentence.kind === 'heading');
try {
if (useWebGLBookReveal) {
await this.prepareWebGLBookReveal(sentence);
if (!isCurrent()) return null;
await this.playbackCoordinator.play(sentence);
if (!isCurrent()) return null;
if (sentence.blockId != null) this.markBlockRendered(sentence.blockId);
this.dispatchDeferredTagsForBlock(sentence);
if (sentence.onComplete) sentence.onComplete();
return null;
}
await this.ensureLiveTailWindow();
if (!isCurrent()) return null;
await this.scrollTo(this.getLiveEndLine(), { mode: 'enter-live-tail', smooth: false });
if (!isCurrent()) return null;
this.rebuildLayoutExclusions(this.renderedItems);
this.layoutFlowLine = this.getFlowLineFromItems(this.renderedItems);
const useWebGLBookReveal = this.isWebGLMode() && (sentence.kind === 'paragraph' || sentence.kind === 'heading');
const element = await this.renderStoryBlock(sentence, {
animate: true,
playback: true,