[ts] Fix AnimationState complete event bad porting from 88b009c

This commit is contained in:
Davide Tantillo 2024-04-24 10:02:59 +02:00
parent a8a7ba878a
commit f0fbceb6f7
No known key found for this signature in database
GPG Key ID: 473ABA42CC0FDDC6

View File

@ -441,7 +441,7 @@ export class AnimationState {
complete = true; complete = true;
else { else {
const cycles = Math.floor(entry.trackTime / duration); const cycles = Math.floor(entry.trackTime / duration);
complete = cycles > 0 && cycles > Math.floor(entry.trackTime / duration); complete = cycles > 0 && cycles > Math.floor(entry.trackLast / duration);
} }
} else } else
complete = animationTime >= animationEnd && entry.animationLast < animationEnd; complete = animationTime >= animationEnd && entry.animationLast < animationEnd;