Skip to content

Commit db8cbaf

Browse files
committed
fix visualizer html
1 parent 49bfcb6 commit db8cbaf

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

viz/3dviewer.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,13 @@
165165

166166
function restartAnimationTimer() {
167167
clearInterval(animationTimer);
168+
169+
// If trying to play from the very end of a non-looping animation, reset to the beginning first.
170+
if (frames.length > 0 && frameIndex === frames.length - 1 && !loop) {
171+
frameIndex = 0;
172+
updateFrame(); // Immediately update visuals to show frame 0
173+
}
174+
168175
animationTimer = setInterval(() => {
169176
if (!playing || !frames.length) return;
170177
if (frameIndex < frames.length - 1) {

0 commit comments

Comments
 (0)