@esotericsoftware/spine-canvas 4.2.8 → 4.2.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.
|
@@ -2823,13 +2823,18 @@ var spine = (() => {
|
|
|
2823
2823
|
lastTotal = timelinesRotation[i];
|
|
2824
2824
|
lastDiff = timelinesRotation[i + 1];
|
|
2825
2825
|
}
|
|
2826
|
-
let
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2826
|
+
let loops = lastTotal - lastTotal % 360;
|
|
2827
|
+
total = diff + loops;
|
|
2828
|
+
let current = diff >= 0, dir = lastTotal >= 0;
|
|
2829
|
+
if (Math.abs(lastDiff) <= 90 && MathUtils.signum(lastDiff) != MathUtils.signum(diff)) {
|
|
2830
|
+
if (Math.abs(lastTotal - loops) > 180) {
|
|
2831
|
+
total += 360 * MathUtils.signum(lastTotal);
|
|
2832
|
+
dir = current;
|
|
2833
|
+
} else if (loops != 0)
|
|
2834
|
+
total -= 360 * MathUtils.signum(lastTotal);
|
|
2835
|
+
else
|
|
2836
|
+
dir = current;
|
|
2831
2837
|
}
|
|
2832
|
-
total = diff + lastTotal - lastTotal % 360;
|
|
2833
2838
|
if (dir != current)
|
|
2834
2839
|
total += 360 * MathUtils.signum(lastTotal);
|
|
2835
2840
|
timelinesRotation[i] = total;
|