Skip to content

Commit

Permalink
[ts] Fix TrackEntry.mixDuration, add TrackEntry.setMixDurationWithDel…
Browse files Browse the repository at this point in the history
…ay(), closes #2518
  • Loading branch information
badlogic committed May 6, 2024
1 parent 485de74 commit baf6ea0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion spine-ts/spine-core/src/AnimationState.ts
Expand Up @@ -951,7 +951,11 @@ export class TrackEntry {

set mixDuration (mixDuration: number) {
this._mixDuration = mixDuration;
if (this.previous != null && this.delay <= 0) this.delay += this.previous.getTrackComplete() - mixDuration;
}

setMixDurationWithDelta(mixDuration: number, delay: number) {
this._mixDuration = mixDuration;
if (this.previous != null && this.delay <= 0) this.delay += this.previous.getTrackComplete() - delay;
this.delay = this.delay;
}

Expand Down

0 comments on commit baf6ea0

Please sign in to comment.