Gate WebGL book texture fonts
This commit is contained in:
@@ -1047,6 +1047,12 @@ class UIDisplayHandlerModule extends BaseModule {
|
||||
const bookPagination = this.getModule('book-pagination');
|
||||
const bookTextureRenderer = this.getModule('book-texture-renderer');
|
||||
if (!bookPagination || !bookTextureRenderer || sentence.blockId == null) return;
|
||||
const sentenceQueue = this.getModule('sentence-queue');
|
||||
if (!Array.isArray(sentence.animation?.wordTimings) || sentence.animation.wordTimings.length === 0) {
|
||||
const words = String(sentence.layoutText || sentence.text || '').match(/\S+/g) || [];
|
||||
sentence.animation = sentenceQueue?.calculateAnimationTiming?.(words, sentence.tts?.duration || 0, sentence.cueMarkers || [])
|
||||
|| { wordTimings: [], cueTimings: [], totalDuration: 0 };
|
||||
}
|
||||
|
||||
if (typeof bookPagination.preparePendingBlock === 'function') {
|
||||
await bookPagination.preparePendingBlock(sentence);
|
||||
|
||||
Reference in New Issue
Block a user