@esotericsoftware/spine-webgl 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.
package/dist/iife/spine-webgl.js
CHANGED
|
@@ -2864,13 +2864,18 @@ var spine = (() => {
|
|
|
2864
2864
|
lastTotal = timelinesRotation[i];
|
|
2865
2865
|
lastDiff = timelinesRotation[i + 1];
|
|
2866
2866
|
}
|
|
2867
|
-
let
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2867
|
+
let loops = lastTotal - lastTotal % 360;
|
|
2868
|
+
total = diff + loops;
|
|
2869
|
+
let current = diff >= 0, dir = lastTotal >= 0;
|
|
2870
|
+
if (Math.abs(lastDiff) <= 90 && MathUtils.signum(lastDiff) != MathUtils.signum(diff)) {
|
|
2871
|
+
if (Math.abs(lastTotal - loops) > 180) {
|
|
2872
|
+
total += 360 * MathUtils.signum(lastTotal);
|
|
2873
|
+
dir = current;
|
|
2874
|
+
} else if (loops != 0)
|
|
2875
|
+
total -= 360 * MathUtils.signum(lastTotal);
|
|
2876
|
+
else
|
|
2877
|
+
dir = current;
|
|
2872
2878
|
}
|
|
2873
|
-
total = diff + lastTotal - lastTotal % 360;
|
|
2874
2879
|
if (dir != current)
|
|
2875
2880
|
total += 360 * MathUtils.signum(lastTotal);
|
|
2876
2881
|
timelinesRotation[i] = total;
|