Add WebGL FPS cap and texture word reveal
This commit is contained in:
@@ -241,6 +241,15 @@ class PlaybackCoordinatorModule extends BaseModule {
|
||||
};
|
||||
});
|
||||
}
|
||||
document.dispatchEvent(new CustomEvent('book-texture:reveal-block', {
|
||||
detail: {
|
||||
id: sentence.id,
|
||||
blockId: sentence.blockId ?? sentence.metadata?.blockId ?? null,
|
||||
wordTimings,
|
||||
cueTimings,
|
||||
totalDuration: sentence.animation.totalDuration || 0
|
||||
}
|
||||
}));
|
||||
|
||||
return new Promise((resolve) => {
|
||||
const totalDuration = wordTimings.length > 0
|
||||
@@ -350,6 +359,12 @@ class PlaybackCoordinatorModule extends BaseModule {
|
||||
|
||||
console.log('PlaybackCoordinator: Fast forwarding');
|
||||
this.accelerateActiveWordAnimations(this.currentSentence);
|
||||
document.dispatchEvent(new CustomEvent('book-texture:fast-forward', {
|
||||
detail: {
|
||||
id: this.currentSentence?.id,
|
||||
blockId: this.currentSentence?.blockId ?? this.currentSentence?.metadata?.blockId ?? null
|
||||
}
|
||||
}));
|
||||
|
||||
const animQueue = this.getModule('animation-queue');
|
||||
if (animQueue) {
|
||||
|
||||
Reference in New Issue
Block a user