web: fix animation stopped premature (#6630)

This commit is contained in:
mackong
2023-03-15 01:52:34 +08:00
committed by GitHub
parent 7e54bc8bcd
commit 122541eedc
2 changed files with 2 additions and 2 deletions

View File

@@ -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();
}

View File

@@ -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();
}