Skip to content

Commit acab83e

Browse files
committed
[ts] Fix TrackEntry getAnimationTime.
1 parent c48487a commit acab83e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spine-ts/spine-core/src/AnimationState.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1026,7 +1026,8 @@ export class TrackEntry {
10261026
if (duration === 0) return this.animationStart;
10271027
return (this.trackTime % duration) + this.animationStart;
10281028
}
1029-
return Math.min(this.trackTime + this.animationStart, this.animationEnd);
1029+
const animationTime = this.trackTime + this.animationStart;
1030+
return this.animationEnd >= this.animation!.duration ? animationTime : Math.min(animationTime, this.animationEnd);
10301031
}
10311032

10321033
setAnimationLast (animationLast: number) {

0 commit comments

Comments
 (0)