@esotericsoftware/spine-webgl 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.
@@ -3708,15 +3708,18 @@ var spine = (() => {
3708
3708
  let finished = this.updateMixingFrom(from, delta);
3709
3709
  from.animationLast = from.nextAnimationLast;
3710
3710
  from.trackLast = from.nextTrackLast;
3711
- if (to.mixTime > 0 && to.mixTime >= to.mixDuration) {
3712
- if (from.totalAlpha == 0 || to.mixDuration == 0) {
3713
- to.mixingFrom = from.mixingFrom;
3714
- if (from.mixingFrom)
3715
- from.mixingFrom.mixingTo = to;
3716
- to.interruptAlpha = from.interruptAlpha;
3717
- this.queue.end(from);
3711
+ if (to.nextTrackLast != -1) {
3712
+ const discard = to.mixTime == 0 && from.mixTime == 0;
3713
+ if (to.mixTime >= to.mixDuration || discard) {
3714
+ if (from.totalAlpha == 0 || to.mixDuration == 0 || discard) {
3715
+ to.mixingFrom = from.mixingFrom;
3716
+ if (from.mixingFrom != null)
3717
+ from.mixingFrom.mixingTo = to;
3718
+ to.interruptAlpha = from.interruptAlpha;
3719
+ this.queue.end(from);
3720
+ }
3721
+ return finished;
3718
3722
  }
3719
- return finished;
3720
3723
  }
3721
3724
  from.trackTime += delta * from.timeScale;
3722
3725
  to.mixTime += delta;
@@ -7912,6 +7915,19 @@ var spine = (() => {
7912
7915
  updateCache[i].update(physics);
7913
7916
  }
7914
7917
  updateWorldTransformWith(physics, parent) {
7918
+ if (!parent)
7919
+ throw new Error("parent cannot be null.");
7920
+ let bones = this.bones;
7921
+ for (let i = 1, n = bones.length; i < n; i++) {
7922
+ let bone = bones[i];
7923
+ bone.ax = bone.x;
7924
+ bone.ay = bone.y;
7925
+ bone.arotation = bone.rotation;
7926
+ bone.ascaleX = bone.scaleX;
7927
+ bone.ascaleY = bone.scaleY;
7928
+ bone.ashearX = bone.shearX;
7929
+ bone.ashearY = bone.shearY;
7930
+ }
7915
7931
  let rootBone = this.getRootBone();
7916
7932
  if (!rootBone)
7917
7933
  throw new Error("Root bone must not be null.");