@esotericsoftware/spine-phaser-v3 4.2.80 → 4.2.81
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/spine-phaser-v3.min.mjs +1 -1
- package/dist/esm/spine-phaser-v3.mjs +10 -4
- package/dist/esm/spine-phaser-v3.mjs.map +2 -2
- package/dist/iife/spine-phaser-v3.js +10 -4
- package/dist/iife/spine-phaser-v3.js.map +2 -2
- package/dist/iife/spine-phaser-v3.min.js +1 -1
- package/package.json +4 -4
|
@@ -3954,11 +3954,13 @@ var _AnimationState = class {
|
|
|
3954
3954
|
if (!last) {
|
|
3955
3955
|
this.setCurrent(trackIndex, entry, true);
|
|
3956
3956
|
this.queue.drain();
|
|
3957
|
+
if (delay < 0)
|
|
3958
|
+
delay = 0;
|
|
3957
3959
|
} else {
|
|
3958
3960
|
last.next = entry;
|
|
3959
3961
|
entry.previous = last;
|
|
3960
3962
|
if (delay <= 0)
|
|
3961
|
-
delay
|
|
3963
|
+
delay = Math.max(delay + last.getTrackComplete() - entry.mixDuration, 0);
|
|
3962
3964
|
}
|
|
3963
3965
|
entry.delay = delay;
|
|
3964
3966
|
return entry;
|
|
@@ -3997,7 +3999,7 @@ var _AnimationState = class {
|
|
|
3997
3999
|
addEmptyAnimation(trackIndex, mixDuration = 0, delay = 0) {
|
|
3998
4000
|
let entry = this.addAnimationWith(trackIndex, _AnimationState.emptyAnimation(), false, delay);
|
|
3999
4001
|
if (delay <= 0)
|
|
4000
|
-
entry.delay
|
|
4002
|
+
entry.delay = Math.max(entry.delay + entry.mixDuration - mixDuration, 0);
|
|
4001
4003
|
entry.mixDuration = mixDuration;
|
|
4002
4004
|
entry.trackEnd = mixDuration;
|
|
4003
4005
|
return entry;
|
|
@@ -4281,8 +4283,12 @@ var TrackEntry = class {
|
|
|
4281
4283
|
}
|
|
4282
4284
|
setMixDurationWithDelay(mixDuration, delay) {
|
|
4283
4285
|
this._mixDuration = mixDuration;
|
|
4284
|
-
if (
|
|
4285
|
-
|
|
4286
|
+
if (delay <= 0) {
|
|
4287
|
+
if (this.previous != null)
|
|
4288
|
+
delay = Math.max(delay + this.previous.getTrackComplete() - mixDuration, 0);
|
|
4289
|
+
else
|
|
4290
|
+
delay = 0;
|
|
4291
|
+
}
|
|
4286
4292
|
this.delay = delay;
|
|
4287
4293
|
}
|
|
4288
4294
|
/** Controls how properties keyed in the animation are mixed with lower tracks. Defaults to {@link MixBlend#replace}, which
|