@esotericsoftware/spine-canvas 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.
|
@@ -4404,16 +4404,16 @@ var spine = (() => {
|
|
|
4404
4404
|
for (let i = 0; i < timelineCount; i++) {
|
|
4405
4405
|
const timeline = timelines[i];
|
|
4406
4406
|
const mode = timelineMode[i];
|
|
4407
|
+
const fromSetup = (mode & FIRST) !== 0;
|
|
4407
4408
|
let alpha = 0;
|
|
4408
4409
|
if ((mode & HOLD) !== 0) {
|
|
4409
4410
|
const holdMix = timelineHoldMix[i];
|
|
4410
4411
|
alpha = holdMix == null ? alphaHold : alphaHold * (1 - holdMix.mix());
|
|
4411
4412
|
} else {
|
|
4412
|
-
if (!drawOrder && timeline instanceof DrawOrderTimeline) continue;
|
|
4413
|
+
if (!drawOrder && timeline instanceof DrawOrderTimeline && !fromSetup) continue;
|
|
4413
4414
|
alpha = alphaMix;
|
|
4414
4415
|
}
|
|
4415
4416
|
from.totalAlpha += alpha;
|
|
4416
|
-
const fromSetup = (mode & FIRST) !== 0;
|
|
4417
4417
|
if (!shortestRotation && timeline instanceof RotateTimeline) {
|
|
4418
4418
|
this.applyRotateTimeline(timeline, skeleton, applyTime, alpha, fromSetup, timelinesRotation, i << 1, firstFrame);
|
|
4419
4419
|
} else if (timeline instanceof AttachmentTimeline)
|
|
@@ -4965,7 +4965,7 @@ var spine = (() => {
|
|
|
4965
4965
|
* properties keyed by the animation are set to the setup pose and the track is cleared.
|
|
4966
4966
|
*
|
|
4967
4967
|
* Usually you want to use {@link AnimationState.addEmptyAnimation} rather than have the animation
|
|
4968
|
-
* abruptly cease being applied. */
|
|
4968
|
+
* abruptly cease being applied, leaving the current pose. */
|
|
4969
4969
|
trackEnd = 0;
|
|
4970
4970
|
/** Multiplier for the delta time when this track entry is updated, causing time for this animation to pass slower or
|
|
4971
4971
|
* faster. Defaults to 1.
|
|
@@ -8297,7 +8297,7 @@ ${error}` : ""}`);
|
|
|
8297
8297
|
gravityGlobal = false;
|
|
8298
8298
|
/** True when this constraint's mix is controlled by global slider timelines. */
|
|
8299
8299
|
mixGlobal = false;
|
|
8300
|
-
/** Determines how the {@link BonePose.scaleY} changes when {@link
|
|
8300
|
+
/** Determines how the {@link BonePose.scaleY} changes when {@link BonePose.scaleX} sets
|
|
8301
8301
|
* {@link BonePose.scaleX}. */
|
|
8302
8302
|
_scaleYMode = 0 /* None */;
|
|
8303
8303
|
get scaleYMode() {
|
|
@@ -8427,6 +8427,9 @@ ${error}` : ""}`);
|
|
|
8427
8427
|
offset = 0;
|
|
8428
8428
|
/** When true and a bone is set, the bone's local transform property is read instead of its world transform. */
|
|
8429
8429
|
local = false;
|
|
8430
|
+
// Nonessential.
|
|
8431
|
+
/** When a bone is set, the maximum slider time for the bone property range, or 0 if nonessential data was not exported. */
|
|
8432
|
+
max = 0;
|
|
8430
8433
|
constructor(name) {
|
|
8431
8434
|
super(name, new SliderPose());
|
|
8432
8435
|
}
|
|
@@ -9109,7 +9112,7 @@ ${error}` : ""}`);
|
|
|
9109
9112
|
if (additive)
|
|
9110
9113
|
value -= MathUtils.PI / 2;
|
|
9111
9114
|
else {
|
|
9112
|
-
value -= by - Math.atan2(bone.c /
|
|
9115
|
+
value -= by - Math.atan2(bone.c / sy, bone.a / sx);
|
|
9113
9116
|
if (value > MathUtils.PI)
|
|
9114
9117
|
value -= MathUtils.PI2;
|
|
9115
9118
|
else if (value < -MathUtils.PI)
|
|
@@ -9117,8 +9120,8 @@ ${error}` : ""}`);
|
|
|
9117
9120
|
}
|
|
9118
9121
|
value = by + value * pose.mixShearY;
|
|
9119
9122
|
const s = Math.sqrt(b * b + d * d);
|
|
9120
|
-
bone.b = Math.cos(value) * s *
|
|
9121
|
-
bone.d = Math.sin(value) * s *
|
|
9123
|
+
bone.b = Math.cos(value) * s * sx;
|
|
9124
|
+
bone.d = Math.sin(value) * s * sy;
|
|
9122
9125
|
}
|
|
9123
9126
|
}
|
|
9124
9127
|
};
|
|
@@ -9398,7 +9401,13 @@ ${error}` : ""}`);
|
|
|
9398
9401
|
data.skinRequired = (flags & 1) !== 0;
|
|
9399
9402
|
data.loop = (flags & 2) !== 0;
|
|
9400
9403
|
data.additive = (flags & 4) !== 0;
|
|
9401
|
-
if ((flags & 8) !== 0)
|
|
9404
|
+
if ((flags & 8) !== 0) {
|
|
9405
|
+
const value = input.readFloat();
|
|
9406
|
+
if (nonessential && (flags & 64) !== 0)
|
|
9407
|
+
data.max = value;
|
|
9408
|
+
else
|
|
9409
|
+
data.setupPose.time = value;
|
|
9410
|
+
}
|
|
9402
9411
|
if ((flags & 16) !== 0) data.setupPose.mix = (flags & 32) !== 0 ? input.readFloat() : 1;
|
|
9403
9412
|
if ((flags & 64) !== 0) {
|
|
9404
9413
|
data.local = (flags & 128) !== 0;
|
|
@@ -11823,7 +11832,6 @@ ${error}` : ""}`);
|
|
|
11823
11832
|
data.skinRequired = skinRequired;
|
|
11824
11833
|
data.additive = getValue(constraintMap, "additive", false);
|
|
11825
11834
|
data.loop = getValue(constraintMap, "loop", false);
|
|
11826
|
-
data.setupPose.time = getValue(constraintMap, "time", 0);
|
|
11827
11835
|
data.setupPose.mix = getValue(constraintMap, "mix", 1);
|
|
11828
11836
|
const boneName = constraintMap.bone;
|
|
11829
11837
|
if (boneName) {
|
|
@@ -11835,8 +11843,10 @@ ${error}` : ""}`);
|
|
|
11835
11843
|
data.property.offset = getValue(constraintMap, "from", 0) * propertyScale;
|
|
11836
11844
|
data.offset = getValue(constraintMap, "to", 0);
|
|
11837
11845
|
data.scale = getValue(constraintMap, "scale", 1) / propertyScale;
|
|
11846
|
+
data.max = getValue(constraintMap, "max", 0);
|
|
11838
11847
|
data.local = getValue(constraintMap, "local", false);
|
|
11839
|
-
}
|
|
11848
|
+
} else
|
|
11849
|
+
data.setupPose.time = getValue(constraintMap, "time", 0);
|
|
11840
11850
|
skeletonData.constraints.push(data);
|
|
11841
11851
|
break;
|
|
11842
11852
|
}
|
|
@@ -12413,7 +12423,7 @@ ${error}` : ""}`);
|
|
|
12413
12423
|
let mixRotate = getValue(keyMap, "mixRotate", 1);
|
|
12414
12424
|
let mixX = getValue(keyMap, "mixX", 1), mixY = getValue(keyMap, "mixY", mixX);
|
|
12415
12425
|
let mixScaleX = getValue(keyMap, "mixScaleX", 1), mixScaleY = getValue(keyMap, "mixScaleY", 1);
|
|
12416
|
-
|
|
12426
|
+
let mixShearY = getValue(keyMap, "mixShearY", 1);
|
|
12417
12427
|
for (let frame = 0, bezier = 0; ; frame++) {
|
|
12418
12428
|
timeline.setFrame(frame, time, mixRotate, mixX, mixY, mixScaleX, mixScaleY, mixShearY);
|
|
12419
12429
|
const nextMap = timelineMap[frame + 1];
|
|
@@ -12441,7 +12451,7 @@ ${error}` : ""}`);
|
|
|
12441
12451
|
mixY = mixY2;
|
|
12442
12452
|
mixScaleX = mixScaleX2;
|
|
12443
12453
|
mixScaleY = mixScaleY2;
|
|
12444
|
-
|
|
12454
|
+
mixShearY = mixShearY2;
|
|
12445
12455
|
keyMap = nextMap;
|
|
12446
12456
|
}
|
|
12447
12457
|
timelines.push(timeline);
|