Skip to content

Commit 88972e3

Browse files
committed
Fix animation endTime
1 parent 868229a commit 88972e3

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

docs/interactivity/GltfSVApp.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24679,8 +24679,9 @@ class gltfInterpolator {
2467924679
// Wrap t around, so the animation loops.
2468024680
// Make sure that t is never earlier than the first keyframe and never later then the last keyframe.
2468124681
const isNegative = t < 0;
24682+
const isZero = t === 0;
2468224683
t = t % maxTime;
24683-
if (isNegative) {
24684+
if (isNegative || (t === 0 && !isZero)) {
2468424685
t += maxTime;
2468524686
}
2468624687
t = clamp(t, input[0], input[input.length - 1]);
@@ -81762,6 +81763,11 @@ var main = async () => {
8176281763
redraw |= state.graphController.playing;
8176381764
redraw |= past.width != canvas.width || past.height != canvas.height;
8176481765

81766+
// Do not redraw when loading is in progress
81767+
if (app.loadingComponent !== undefined) {
81768+
redraw = false;
81769+
}
81770+
8176581771
// Refit view if canvas changes significantly
8176681772
if (
8176781773
canvas.width / past.width < 0.5 ||

docs/interactivity/GltfSVApp.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)