@esotericsoftware/spine-core 4.2.66 → 4.2.68

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.
@@ -3665,15 +3665,18 @@ var spine = (() => {
3665
3665
  let finished = this.updateMixingFrom(from, delta);
3666
3666
  from.animationLast = from.nextAnimationLast;
3667
3667
  from.trackLast = from.nextTrackLast;
3668
- if (to.mixTime > 0 && to.mixTime >= to.mixDuration) {
3669
- if (from.totalAlpha == 0 || to.mixDuration == 0) {
3670
- to.mixingFrom = from.mixingFrom;
3671
- if (from.mixingFrom)
3672
- from.mixingFrom.mixingTo = to;
3673
- to.interruptAlpha = from.interruptAlpha;
3674
- this.queue.end(from);
3668
+ if (to.nextTrackLast != -1) {
3669
+ const discard = to.mixTime == 0 && from.mixTime == 0;
3670
+ if (to.mixTime >= to.mixDuration || discard) {
3671
+ if (from.totalAlpha == 0 || to.mixDuration == 0 || discard) {
3672
+ to.mixingFrom = from.mixingFrom;
3673
+ if (from.mixingFrom != null)
3674
+ from.mixingFrom.mixingTo = to;
3675
+ to.interruptAlpha = from.interruptAlpha;
3676
+ this.queue.end(from);
3677
+ }
3678
+ return finished;
3675
3679
  }
3676
- return finished;
3677
3680
  }
3678
3681
  from.trackTime += delta * from.timeScale;
3679
3682
  to.mixTime += delta;
@@ -7869,6 +7872,19 @@ var spine = (() => {
7869
7872
  updateCache[i].update(physics);
7870
7873
  }
7871
7874
  updateWorldTransformWith(physics, parent) {
7875
+ if (!parent)
7876
+ throw new Error("parent cannot be null.");
7877
+ let bones = this.bones;
7878
+ for (let i = 1, n = bones.length; i < n; i++) {
7879
+ let bone = bones[i];
7880
+ bone.ax = bone.x;
7881
+ bone.ay = bone.y;
7882
+ bone.arotation = bone.rotation;
7883
+ bone.ascaleX = bone.scaleX;
7884
+ bone.ascaleY = bone.scaleY;
7885
+ bone.ashearX = bone.shearX;
7886
+ bone.ashearY = bone.shearY;
7887
+ }
7872
7888
  let rootBone = this.getRootBone();
7873
7889
  if (!rootBone)
7874
7890
  throw new Error("Root bone must not be null.");