@esotericsoftware/spine-webgl 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/iife/spine-webgl.js
CHANGED
|
@@ -4444,16 +4444,16 @@ var spine = (() => {
|
|
|
4444
4444
|
for (let i = 0; i < timelineCount; i++) {
|
|
4445
4445
|
const timeline = timelines[i];
|
|
4446
4446
|
const mode = timelineMode[i];
|
|
4447
|
+
const fromSetup = (mode & FIRST) !== 0;
|
|
4447
4448
|
let alpha = 0;
|
|
4448
4449
|
if ((mode & HOLD) !== 0) {
|
|
4449
4450
|
const holdMix = timelineHoldMix[i];
|
|
4450
4451
|
alpha = holdMix == null ? alphaHold : alphaHold * (1 - holdMix.mix());
|
|
4451
4452
|
} else {
|
|
4452
|
-
if (!drawOrder && timeline instanceof DrawOrderTimeline) continue;
|
|
4453
|
+
if (!drawOrder && timeline instanceof DrawOrderTimeline && !fromSetup) continue;
|
|
4453
4454
|
alpha = alphaMix;
|
|
4454
4455
|
}
|
|
4455
4456
|
from.totalAlpha += alpha;
|
|
4456
|
-
const fromSetup = (mode & FIRST) !== 0;
|
|
4457
4457
|
if (!shortestRotation && timeline instanceof RotateTimeline) {
|
|
4458
4458
|
this.applyRotateTimeline(timeline, skeleton, applyTime, alpha, fromSetup, timelinesRotation, i << 1, firstFrame);
|
|
4459
4459
|
} else if (timeline instanceof AttachmentTimeline)
|
|
@@ -5005,7 +5005,7 @@ var spine = (() => {
|
|
|
5005
5005
|
* properties keyed by the animation are set to the setup pose and the track is cleared.
|
|
5006
5006
|
*
|
|
5007
5007
|
* Usually you want to use {@link AnimationState.addEmptyAnimation} rather than have the animation
|
|
5008
|
-
* abruptly cease being applied. */
|
|
5008
|
+
* abruptly cease being applied, leaving the current pose. */
|
|
5009
5009
|
trackEnd = 0;
|
|
5010
5010
|
/** Multiplier for the delta time when this track entry is updated, causing time for this animation to pass slower or
|
|
5011
5011
|
* faster. Defaults to 1.
|
|
@@ -8337,7 +8337,7 @@ ${error}` : ""}`);
|
|
|
8337
8337
|
gravityGlobal = false;
|
|
8338
8338
|
/** True when this constraint's mix is controlled by global slider timelines. */
|
|
8339
8339
|
mixGlobal = false;
|
|
8340
|
-
/** Determines how the {@link BonePose.scaleY} changes when {@link
|
|
8340
|
+
/** Determines how the {@link BonePose.scaleY} changes when {@link BonePose.scaleX} sets
|
|
8341
8341
|
* {@link BonePose.scaleX}. */
|
|
8342
8342
|
_scaleYMode = 0 /* None */;
|
|
8343
8343
|
get scaleYMode() {
|
|
@@ -8467,6 +8467,9 @@ ${error}` : ""}`);
|
|
|
8467
8467
|
offset = 0;
|
|
8468
8468
|
/** When true and a bone is set, the bone's local transform property is read instead of its world transform. */
|
|
8469
8469
|
local = false;
|
|
8470
|
+
// Nonessential.
|
|
8471
|
+
/** When a bone is set, the maximum slider time for the bone property range, or 0 if nonessential data was not exported. */
|
|
8472
|
+
max = 0;
|
|
8470
8473
|
constructor(name) {
|
|
8471
8474
|
super(name, new SliderPose());
|
|
8472
8475
|
}
|
|
@@ -9149,7 +9152,7 @@ ${error}` : ""}`);
|
|
|
9149
9152
|
if (additive)
|
|
9150
9153
|
value -= MathUtils.PI / 2;
|
|
9151
9154
|
else {
|
|
9152
|
-
value -= by - Math.atan2(bone.c /
|
|
9155
|
+
value -= by - Math.atan2(bone.c / sy, bone.a / sx);
|
|
9153
9156
|
if (value > MathUtils.PI)
|
|
9154
9157
|
value -= MathUtils.PI2;
|
|
9155
9158
|
else if (value < -MathUtils.PI)
|
|
@@ -9157,8 +9160,8 @@ ${error}` : ""}`);
|
|
|
9157
9160
|
}
|
|
9158
9161
|
value = by + value * pose.mixShearY;
|
|
9159
9162
|
const s = Math.sqrt(b * b + d * d);
|
|
9160
|
-
bone.b = Math.cos(value) * s *
|
|
9161
|
-
bone.d = Math.sin(value) * s *
|
|
9163
|
+
bone.b = Math.cos(value) * s * sx;
|
|
9164
|
+
bone.d = Math.sin(value) * s * sy;
|
|
9162
9165
|
}
|
|
9163
9166
|
}
|
|
9164
9167
|
};
|
|
@@ -9438,7 +9441,13 @@ ${error}` : ""}`);
|
|
|
9438
9441
|
data.skinRequired = (flags & 1) !== 0;
|
|
9439
9442
|
data.loop = (flags & 2) !== 0;
|
|
9440
9443
|
data.additive = (flags & 4) !== 0;
|
|
9441
|
-
if ((flags & 8) !== 0)
|
|
9444
|
+
if ((flags & 8) !== 0) {
|
|
9445
|
+
const value = input.readFloat();
|
|
9446
|
+
if (nonessential && (flags & 64) !== 0)
|
|
9447
|
+
data.max = value;
|
|
9448
|
+
else
|
|
9449
|
+
data.setupPose.time = value;
|
|
9450
|
+
}
|
|
9442
9451
|
if ((flags & 16) !== 0) data.setupPose.mix = (flags & 32) !== 0 ? input.readFloat() : 1;
|
|
9443
9452
|
if ((flags & 64) !== 0) {
|
|
9444
9453
|
data.local = (flags & 128) !== 0;
|
|
@@ -11863,7 +11872,6 @@ ${error}` : ""}`);
|
|
|
11863
11872
|
data.skinRequired = skinRequired;
|
|
11864
11873
|
data.additive = getValue(constraintMap, "additive", false);
|
|
11865
11874
|
data.loop = getValue(constraintMap, "loop", false);
|
|
11866
|
-
data.setupPose.time = getValue(constraintMap, "time", 0);
|
|
11867
11875
|
data.setupPose.mix = getValue(constraintMap, "mix", 1);
|
|
11868
11876
|
const boneName = constraintMap.bone;
|
|
11869
11877
|
if (boneName) {
|
|
@@ -11875,8 +11883,10 @@ ${error}` : ""}`);
|
|
|
11875
11883
|
data.property.offset = getValue(constraintMap, "from", 0) * propertyScale;
|
|
11876
11884
|
data.offset = getValue(constraintMap, "to", 0);
|
|
11877
11885
|
data.scale = getValue(constraintMap, "scale", 1) / propertyScale;
|
|
11886
|
+
data.max = getValue(constraintMap, "max", 0);
|
|
11878
11887
|
data.local = getValue(constraintMap, "local", false);
|
|
11879
|
-
}
|
|
11888
|
+
} else
|
|
11889
|
+
data.setupPose.time = getValue(constraintMap, "time", 0);
|
|
11880
11890
|
skeletonData.constraints.push(data);
|
|
11881
11891
|
break;
|
|
11882
11892
|
}
|
|
@@ -12453,7 +12463,7 @@ ${error}` : ""}`);
|
|
|
12453
12463
|
let mixRotate = getValue(keyMap, "mixRotate", 1);
|
|
12454
12464
|
let mixX = getValue(keyMap, "mixX", 1), mixY = getValue(keyMap, "mixY", mixX);
|
|
12455
12465
|
let mixScaleX = getValue(keyMap, "mixScaleX", 1), mixScaleY = getValue(keyMap, "mixScaleY", 1);
|
|
12456
|
-
|
|
12466
|
+
let mixShearY = getValue(keyMap, "mixShearY", 1);
|
|
12457
12467
|
for (let frame = 0, bezier = 0; ; frame++) {
|
|
12458
12468
|
timeline.setFrame(frame, time, mixRotate, mixX, mixY, mixScaleX, mixScaleY, mixShearY);
|
|
12459
12469
|
const nextMap = timelineMap[frame + 1];
|
|
@@ -12481,7 +12491,7 @@ ${error}` : ""}`);
|
|
|
12481
12491
|
mixY = mixY2;
|
|
12482
12492
|
mixScaleX = mixScaleX2;
|
|
12483
12493
|
mixScaleY = mixScaleY2;
|
|
12484
|
-
|
|
12494
|
+
mixShearY = mixShearY2;
|
|
12485
12495
|
keyMap = nextMap;
|
|
12486
12496
|
}
|
|
12487
12497
|
timelines.push(timeline);
|