From 122541eedc615b7a2aaffc4f88c6593c3c6416a7 Mon Sep 17 00:00:00 2001 From: mackong Date: Wed, 15 Mar 2023 01:52:34 +0800 Subject: [PATCH] web: fix animation stopped premature (#6630) --- web/samples/animation.html | 2 +- web/samples/morphing.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/web/samples/animation.html b/web/samples/animation.html index 3c86f36481..c94e19c6f7 100644 --- a/web/samples/animation.html +++ b/web/samples/animation.html @@ -74,7 +74,7 @@ class App { render() { if (this.animator) { const ms = Date.now() - this.animationStartTime; - this.animator.applyAnimation(0, (ms / 1000) % 1.0); + this.animator.applyAnimation(0, ms / 1000); this.animator.updateBoneMatrices(); } diff --git a/web/samples/morphing.html b/web/samples/morphing.html index 2241b5df67..b557c15db9 100644 --- a/web/samples/morphing.html +++ b/web/samples/morphing.html @@ -68,7 +68,7 @@ class App { if (this.animator) { const ms = Date.now() - this.animationStartTime; - this.animator.applyAnimation(0, (ms / 1000) % 1.0); + this.animator.applyAnimation(0, ms / 1000); this.animator.updateBoneMatrices(); }