@esotericsoftware/spine-webgl 4.2.42 → 4.2.43
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
|
@@ -297,6 +297,10 @@ var spine = (() => {
|
|
|
297
297
|
color.g = ((value & 65280) >>> 8) / 255;
|
|
298
298
|
color.b = (value & 255) / 255;
|
|
299
299
|
}
|
|
300
|
+
toRgb888() {
|
|
301
|
+
const hex = (x) => ("0" + (x * 255).toString(16)).slice(-2);
|
|
302
|
+
return Number("0x" + hex(this.r) + hex(this.g) + hex(this.b));
|
|
303
|
+
}
|
|
300
304
|
static fromString(hex) {
|
|
301
305
|
return new _Color().setFromString(hex);
|
|
302
306
|
}
|
|
@@ -8594,8 +8598,6 @@ var spine = (() => {
|
|
|
8594
8598
|
blendMode = BlendMode.Normal;
|
|
8595
8599
|
/** False if the slot was hidden in Spine and nonessential data was exported. Does not affect runtime rendering. */
|
|
8596
8600
|
visible = true;
|
|
8597
|
-
/** The folders for this slot in the draw order, delimited by <code>/</code>, or null if nonessential data was not exported. */
|
|
8598
|
-
path = null;
|
|
8599
8601
|
constructor(index, name, boneData) {
|
|
8600
8602
|
if (index < 0)
|
|
8601
8603
|
throw new Error("index must be >= 0.");
|
|
@@ -8725,14 +8727,6 @@ var spine = (() => {
|
|
|
8725
8727
|
let slotName = input.readString();
|
|
8726
8728
|
if (!slotName)
|
|
8727
8729
|
throw new Error("Slot name must not be null.");
|
|
8728
|
-
let path = null;
|
|
8729
|
-
if (nonessential) {
|
|
8730
|
-
const slash = slotName.lastIndexOf("/");
|
|
8731
|
-
if (slash != -1) {
|
|
8732
|
-
path = slotName.substring(0, slash);
|
|
8733
|
-
slotName = slotName.substring(slash + 1);
|
|
8734
|
-
}
|
|
8735
|
-
}
|
|
8736
8730
|
let boneData = skeletonData.bones[input.readInt(true)];
|
|
8737
8731
|
let data = new SlotData(i, slotName, boneData);
|
|
8738
8732
|
Color.rgba8888ToColor(data.color, input.readInt32());
|
|
@@ -8741,10 +8735,8 @@ var spine = (() => {
|
|
|
8741
8735
|
Color.rgb888ToColor(data.darkColor = new Color(), darkColor);
|
|
8742
8736
|
data.attachmentName = input.readStringRef();
|
|
8743
8737
|
data.blendMode = input.readInt(true);
|
|
8744
|
-
if (nonessential)
|
|
8738
|
+
if (nonessential)
|
|
8745
8739
|
data.visible = input.readBoolean();
|
|
8746
|
-
data.path = path;
|
|
8747
|
-
}
|
|
8748
8740
|
skeletonData.slots.push(data);
|
|
8749
8741
|
}
|
|
8750
8742
|
n = input.readInt(true);
|
|
@@ -10720,13 +10712,7 @@ var spine = (() => {
|
|
|
10720
10712
|
if (root.slots) {
|
|
10721
10713
|
for (let i = 0; i < root.slots.length; i++) {
|
|
10722
10714
|
let slotMap = root.slots[i];
|
|
10723
|
-
let path = null;
|
|
10724
10715
|
let slotName = slotMap.name;
|
|
10725
|
-
const slash = slotName.lastIndexOf("/");
|
|
10726
|
-
if (slash != -1) {
|
|
10727
|
-
path = slotName.substring(0, slash);
|
|
10728
|
-
slotName = slotName.substring(slash + 1);
|
|
10729
|
-
}
|
|
10730
10716
|
let boneData = skeletonData.findBone(slotMap.bone);
|
|
10731
10717
|
if (!boneData)
|
|
10732
10718
|
throw new Error(`Couldn't find bone ${slotMap.bone} for slot ${slotName}`);
|
|
@@ -10740,7 +10726,6 @@ var spine = (() => {
|
|
|
10740
10726
|
data.attachmentName = getValue(slotMap, "attachment", null);
|
|
10741
10727
|
data.blendMode = Utils.enumValue(BlendMode, getValue(slotMap, "blend", "normal"));
|
|
10742
10728
|
data.visible = getValue(slotMap, "visible", true);
|
|
10743
|
-
data.path = path;
|
|
10744
10729
|
skeletonData.slots.push(data);
|
|
10745
10730
|
}
|
|
10746
10731
|
}
|
|
@@ -11478,7 +11463,7 @@ var spine = (() => {
|
|
|
11478
11463
|
continue;
|
|
11479
11464
|
let frames = timelineMap.length;
|
|
11480
11465
|
if (timelineName == "reset") {
|
|
11481
|
-
const timeline2 = new PhysicsConstraintResetTimeline(
|
|
11466
|
+
const timeline2 = new PhysicsConstraintResetTimeline(frames, constraintIndex);
|
|
11482
11467
|
for (let frame = 0; keyMap != null; keyMap = timelineMap[frame + 1], frame++)
|
|
11483
11468
|
timeline2.setFrame(frame, getValue(keyMap, "time", 0));
|
|
11484
11469
|
timelines.push(timeline2);
|