@esotericsoftware/spine-webgl 4.1.6 → 4.1.9

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.
@@ -1144,8 +1144,8 @@ var spine = (() => {
1144
1144
  bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;
1145
1145
  break;
1146
1146
  case 3:
1147
- bone.scaleX = (x - bone.data.scaleX) * alpha;
1148
- bone.scaleY = (y - bone.data.scaleY) * alpha;
1147
+ bone.scaleX += (x - bone.data.scaleX) * alpha;
1148
+ bone.scaleY += (y - bone.data.scaleY) * alpha;
1149
1149
  }
1150
1150
  } else {
1151
1151
  switch (blend) {
@@ -1211,7 +1211,7 @@ var spine = (() => {
1211
1211
  bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;
1212
1212
  break;
1213
1213
  case 3:
1214
- bone.scaleX = (x - bone.data.scaleX) * alpha;
1214
+ bone.scaleX += (x - bone.data.scaleX) * alpha;
1215
1215
  }
1216
1216
  } else {
1217
1217
  switch (blend) {
@@ -1272,7 +1272,7 @@ var spine = (() => {
1272
1272
  bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;
1273
1273
  break;
1274
1274
  case 3:
1275
- bone.scaleY = (y - bone.data.scaleY) * alpha;
1275
+ bone.scaleY += (y - bone.data.scaleY) * alpha;
1276
1276
  }
1277
1277
  } else {
1278
1278
  switch (blend) {
@@ -2694,13 +2694,14 @@ var spine = (() => {
2694
2694
  }
2695
2695
  } else {
2696
2696
  let timelineMode = current.timelineMode;
2697
- let firstFrame = current.timelinesRotation.length != timelineCount << 1;
2697
+ let shortestRotation = current.shortestRotation;
2698
+ let firstFrame = !shortestRotation && current.timelinesRotation.length != timelineCount << 1;
2698
2699
  if (firstFrame)
2699
2700
  current.timelinesRotation.length = timelineCount << 1;
2700
2701
  for (let ii = 0; ii < timelineCount; ii++) {
2701
2702
  let timeline2 = timelines[ii];
2702
2703
  let timelineBlend = timelineMode[ii] == SUBSEQUENT ? blend : MixBlend.setup;
2703
- if (timeline2 instanceof RotateTimeline) {
2704
+ if (!shortestRotation && timeline2 instanceof RotateTimeline) {
2704
2705
  this.applyRotateTimeline(timeline2, skeleton, applyTime, mix, timelineBlend, current.timelinesRotation, ii << 1, firstFrame);
2705
2706
  } else if (timeline2 instanceof AttachmentTimeline) {
2706
2707
  this.applyAttachmentTimeline(timeline2, skeleton, applyTime, blend, true);
@@ -2760,7 +2761,8 @@ var spine = (() => {
2760
2761
  } else {
2761
2762
  let timelineMode = from.timelineMode;
2762
2763
  let timelineHoldMix = from.timelineHoldMix;
2763
- let firstFrame = from.timelinesRotation.length != timelineCount << 1;
2764
+ let shortestRotation = from.shortestRotation;
2765
+ let firstFrame = !shortestRotation && from.timelinesRotation.length != timelineCount << 1;
2764
2766
  if (firstFrame)
2765
2767
  from.timelinesRotation.length = timelineCount << 1;
2766
2768
  from.totalAlpha = 0;
@@ -2795,7 +2797,7 @@ var spine = (() => {
2795
2797
  break;
2796
2798
  }
2797
2799
  from.totalAlpha += alpha;
2798
- if (timeline instanceof RotateTimeline)
2800
+ if (!shortestRotation && timeline instanceof RotateTimeline)
2799
2801
  this.applyRotateTimeline(timeline, skeleton, applyTime, alpha, timelineBlend, from.timelinesRotation, i << 1, firstFrame);
2800
2802
  else if (timeline instanceof AttachmentTimeline)
2801
2803
  this.applyAttachmentTimeline(timeline, skeleton, applyTime, timelineBlend, attachments);
@@ -3051,6 +3053,8 @@ var spine = (() => {
3051
3053
  entry.animation = animation;
3052
3054
  entry.loop = loop;
3053
3055
  entry.holdPrevious = false;
3056
+ entry.reverse = false;
3057
+ entry.shortestRotation = false;
3054
3058
  entry.eventThreshold = 0;
3055
3059
  entry.attachmentThreshold = 0;
3056
3060
  entry.drawOrderThreshold = 0;
@@ -3065,9 +3069,10 @@ var spine = (() => {
3065
3069
  entry.trackEnd = Number.MAX_VALUE;
3066
3070
  entry.timeScale = 1;
3067
3071
  entry.alpha = 1;
3068
- entry.interruptAlpha = 1;
3069
3072
  entry.mixTime = 0;
3070
3073
  entry.mixDuration = !last ? 0 : this.data.getMix(last.animation, animation);
3074
+ entry.interruptAlpha = 1;
3075
+ entry.totalAlpha = 0;
3071
3076
  entry.mixBlend = MixBlend.replace;
3072
3077
  return entry;
3073
3078
  }
@@ -3167,6 +3172,7 @@ var spine = (() => {
3167
3172
  this.loop = false;
3168
3173
  this.holdPrevious = false;
3169
3174
  this.reverse = false;
3175
+ this.shortestRotation = false;
3170
3176
  this.eventThreshold = 0;
3171
3177
  this.attachmentThreshold = 0;
3172
3178
  this.drawOrderThreshold = 0;