Fix WebGL line reveal renderer
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user