Skip to content

Commit

Permalink
fix a bug in the animation controllers update method (#3892)
Browse files Browse the repository at this point in the history
  • Loading branch information
ellthompson committed Jan 12, 2022
1 parent e91904d commit b90a09c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/anim/controller/anim-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ class AnimController {
if (this._isTransitioning) {
this._currTransitionTime += dt;
if (this._currTransitionTime <= this._totalTransitionTime) {
const interpolatedTime = this._totalTransitionTime === 0 ? this._currTransitionTime / this._totalTransitionTime : 1;
const interpolatedTime = this._totalTransitionTime !== 0 ? this._currTransitionTime / this._totalTransitionTime : 1;
// while transitioning, set all previous state animations to be weighted by (1.0 - interpolationTime).
for (let i = 0; i < this._transitionPreviousStates.length; i++) {
state = this._findState(this._transitionPreviousStates[i].name);
Expand Down

0 comments on commit b90a09c

Please sign in to comment.