@esotericsoftware/spine-core 4.3.4 → 4.3.5
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/AnimationState.d.ts +1 -1
- package/dist/AnimationState.js +4 -4
- package/dist/PhysicsConstraintData.d.ts +1 -1
- package/dist/PhysicsConstraintData.js +2 -2
- package/dist/SkeletonBinary.js +8 -3
- package/dist/SkeletonJson.js +6 -4
- package/dist/SliderData.d.ts +2 -0
- package/dist/SliderData.js +4 -1
- package/dist/TransformConstraintData.js +4 -4
- package/dist/esm/spine-core.min.mjs +2 -2
- package/dist/esm/spine-core.mjs +22 -12
- package/dist/esm/spine-core.mjs.map +2 -2
- package/dist/iife/spine-core.js +22 -12
- package/dist/iife/spine-core.js.map +2 -2
- package/dist/iife/spine-core.min.js +2 -2
- package/package.json +1 -1
package/dist/iife/spine-core.js
CHANGED
|
@@ -4401,16 +4401,16 @@ var spine = (() => {
|
|
|
4401
4401
|
for (let i = 0; i < timelineCount; i++) {
|
|
4402
4402
|
const timeline = timelines[i];
|
|
4403
4403
|
const mode = timelineMode[i];
|
|
4404
|
+
const fromSetup = (mode & FIRST) !== 0;
|
|
4404
4405
|
let alpha = 0;
|
|
4405
4406
|
if ((mode & HOLD) !== 0) {
|
|
4406
4407
|
const holdMix = timelineHoldMix[i];
|
|
4407
4408
|
alpha = holdMix == null ? alphaHold : alphaHold * (1 - holdMix.mix());
|
|
4408
4409
|
} else {
|
|
4409
|
-
if (!drawOrder && timeline instanceof DrawOrderTimeline) continue;
|
|
4410
|
+
if (!drawOrder && timeline instanceof DrawOrderTimeline && !fromSetup) continue;
|
|
4410
4411
|
alpha = alphaMix;
|
|
4411
4412
|
}
|
|
4412
4413
|
from.totalAlpha += alpha;
|
|
4413
|
-
const fromSetup = (mode & FIRST) !== 0;
|
|
4414
4414
|
if (!shortestRotation && timeline instanceof RotateTimeline) {
|
|
4415
4415
|
this.applyRotateTimeline(timeline, skeleton, applyTime, alpha, fromSetup, timelinesRotation, i << 1, firstFrame);
|
|
4416
4416
|
} else if (timeline instanceof AttachmentTimeline)
|
|
@@ -4962,7 +4962,7 @@ var spine = (() => {
|
|
|
4962
4962
|
* properties keyed by the animation are set to the setup pose and the track is cleared.
|
|
4963
4963
|
*
|
|
4964
4964
|
* Usually you want to use {@link AnimationState.addEmptyAnimation} rather than have the animation
|
|
4965
|
-
* abruptly cease being applied. */
|
|
4965
|
+
* abruptly cease being applied, leaving the current pose. */
|
|
4966
4966
|
trackEnd = 0;
|
|
4967
4967
|
/** Multiplier for the delta time when this track entry is updated, causing time for this animation to pass slower or
|
|
4968
4968
|
* faster. Defaults to 1.
|
|
@@ -8294,7 +8294,7 @@ ${error}` : ""}`);
|
|
|
8294
8294
|
gravityGlobal = false;
|
|
8295
8295
|
/** True when this constraint's mix is controlled by global slider timelines. */
|
|
8296
8296
|
mixGlobal = false;
|
|
8297
|
-
/** Determines how the {@link BonePose.scaleY} changes when {@link
|
|
8297
|
+
/** Determines how the {@link BonePose.scaleY} changes when {@link BonePose.scaleX} sets
|
|
8298
8298
|
* {@link BonePose.scaleX}. */
|
|
8299
8299
|
_scaleYMode = 0 /* None */;
|
|
8300
8300
|
get scaleYMode() {
|
|
@@ -8424,6 +8424,9 @@ ${error}` : ""}`);
|
|
|
8424
8424
|
offset = 0;
|
|
8425
8425
|
/** When true and a bone is set, the bone's local transform property is read instead of its world transform. */
|
|
8426
8426
|
local = false;
|
|
8427
|
+
// Nonessential.
|
|
8428
|
+
/** When a bone is set, the maximum slider time for the bone property range, or 0 if nonessential data was not exported. */
|
|
8429
|
+
max = 0;
|
|
8427
8430
|
constructor(name) {
|
|
8428
8431
|
super(name, new SliderPose());
|
|
8429
8432
|
}
|
|
@@ -9106,7 +9109,7 @@ ${error}` : ""}`);
|
|
|
9106
9109
|
if (additive)
|
|
9107
9110
|
value -= MathUtils.PI / 2;
|
|
9108
9111
|
else {
|
|
9109
|
-
value -= by - Math.atan2(bone.c /
|
|
9112
|
+
value -= by - Math.atan2(bone.c / sy, bone.a / sx);
|
|
9110
9113
|
if (value > MathUtils.PI)
|
|
9111
9114
|
value -= MathUtils.PI2;
|
|
9112
9115
|
else if (value < -MathUtils.PI)
|
|
@@ -9114,8 +9117,8 @@ ${error}` : ""}`);
|
|
|
9114
9117
|
}
|
|
9115
9118
|
value = by + value * pose.mixShearY;
|
|
9116
9119
|
const s = Math.sqrt(b * b + d * d);
|
|
9117
|
-
bone.b = Math.cos(value) * s *
|
|
9118
|
-
bone.d = Math.sin(value) * s *
|
|
9120
|
+
bone.b = Math.cos(value) * s * sx;
|
|
9121
|
+
bone.d = Math.sin(value) * s * sy;
|
|
9119
9122
|
}
|
|
9120
9123
|
}
|
|
9121
9124
|
};
|
|
@@ -9395,7 +9398,13 @@ ${error}` : ""}`);
|
|
|
9395
9398
|
data.skinRequired = (flags & 1) !== 0;
|
|
9396
9399
|
data.loop = (flags & 2) !== 0;
|
|
9397
9400
|
data.additive = (flags & 4) !== 0;
|
|
9398
|
-
if ((flags & 8) !== 0)
|
|
9401
|
+
if ((flags & 8) !== 0) {
|
|
9402
|
+
const value = input.readFloat();
|
|
9403
|
+
if (nonessential && (flags & 64) !== 0)
|
|
9404
|
+
data.max = value;
|
|
9405
|
+
else
|
|
9406
|
+
data.setupPose.time = value;
|
|
9407
|
+
}
|
|
9399
9408
|
if ((flags & 16) !== 0) data.setupPose.mix = (flags & 32) !== 0 ? input.readFloat() : 1;
|
|
9400
9409
|
if ((flags & 64) !== 0) {
|
|
9401
9410
|
data.local = (flags & 128) !== 0;
|
|
@@ -11820,7 +11829,6 @@ ${error}` : ""}`);
|
|
|
11820
11829
|
data.skinRequired = skinRequired;
|
|
11821
11830
|
data.additive = getValue(constraintMap, "additive", false);
|
|
11822
11831
|
data.loop = getValue(constraintMap, "loop", false);
|
|
11823
|
-
data.setupPose.time = getValue(constraintMap, "time", 0);
|
|
11824
11832
|
data.setupPose.mix = getValue(constraintMap, "mix", 1);
|
|
11825
11833
|
const boneName = constraintMap.bone;
|
|
11826
11834
|
if (boneName) {
|
|
@@ -11832,8 +11840,10 @@ ${error}` : ""}`);
|
|
|
11832
11840
|
data.property.offset = getValue(constraintMap, "from", 0) * propertyScale;
|
|
11833
11841
|
data.offset = getValue(constraintMap, "to", 0);
|
|
11834
11842
|
data.scale = getValue(constraintMap, "scale", 1) / propertyScale;
|
|
11843
|
+
data.max = getValue(constraintMap, "max", 0);
|
|
11835
11844
|
data.local = getValue(constraintMap, "local", false);
|
|
11836
|
-
}
|
|
11845
|
+
} else
|
|
11846
|
+
data.setupPose.time = getValue(constraintMap, "time", 0);
|
|
11837
11847
|
skeletonData.constraints.push(data);
|
|
11838
11848
|
break;
|
|
11839
11849
|
}
|
|
@@ -12410,7 +12420,7 @@ ${error}` : ""}`);
|
|
|
12410
12420
|
let mixRotate = getValue(keyMap, "mixRotate", 1);
|
|
12411
12421
|
let mixX = getValue(keyMap, "mixX", 1), mixY = getValue(keyMap, "mixY", mixX);
|
|
12412
12422
|
let mixScaleX = getValue(keyMap, "mixScaleX", 1), mixScaleY = getValue(keyMap, "mixScaleY", 1);
|
|
12413
|
-
|
|
12423
|
+
let mixShearY = getValue(keyMap, "mixShearY", 1);
|
|
12414
12424
|
for (let frame = 0, bezier = 0; ; frame++) {
|
|
12415
12425
|
timeline.setFrame(frame, time, mixRotate, mixX, mixY, mixScaleX, mixScaleY, mixShearY);
|
|
12416
12426
|
const nextMap = timelineMap[frame + 1];
|
|
@@ -12438,7 +12448,7 @@ ${error}` : ""}`);
|
|
|
12438
12448
|
mixY = mixY2;
|
|
12439
12449
|
mixScaleX = mixScaleX2;
|
|
12440
12450
|
mixScaleY = mixScaleY2;
|
|
12441
|
-
|
|
12451
|
+
mixShearY = mixShearY2;
|
|
12442
12452
|
keyMap = nextMap;
|
|
12443
12453
|
}
|
|
12444
12454
|
timelines.push(timeline);
|