@esotericsoftware/spine-canvas 4.2.42 → 4.2.44

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.
@@ -257,6 +257,10 @@ var spine = (() => {
257
257
  color.g = ((value & 65280) >>> 8) / 255;
258
258
  color.b = (value & 255) / 255;
259
259
  }
260
+ toRgb888() {
261
+ const hex = (x) => ("0" + (x * 255).toString(16)).slice(-2);
262
+ return Number("0x" + hex(this.r) + hex(this.g) + hex(this.b));
263
+ }
260
264
  static fromString(hex) {
261
265
  return new _Color().setFromString(hex);
262
266
  }
@@ -8554,8 +8558,6 @@ var spine = (() => {
8554
8558
  blendMode = BlendMode.Normal;
8555
8559
  /** False if the slot was hidden in Spine and nonessential data was exported. Does not affect runtime rendering. */
8556
8560
  visible = true;
8557
- /** The folders for this slot in the draw order, delimited by <code>/</code>, or null if nonessential data was not exported. */
8558
- path = null;
8559
8561
  constructor(index, name, boneData) {
8560
8562
  if (index < 0)
8561
8563
  throw new Error("index must be >= 0.");
@@ -8685,14 +8687,6 @@ var spine = (() => {
8685
8687
  let slotName = input.readString();
8686
8688
  if (!slotName)
8687
8689
  throw new Error("Slot name must not be null.");
8688
- let path = null;
8689
- if (nonessential) {
8690
- const slash = slotName.lastIndexOf("/");
8691
- if (slash != -1) {
8692
- path = slotName.substring(0, slash);
8693
- slotName = slotName.substring(slash + 1);
8694
- }
8695
- }
8696
8690
  let boneData = skeletonData.bones[input.readInt(true)];
8697
8691
  let data = new SlotData(i, slotName, boneData);
8698
8692
  Color.rgba8888ToColor(data.color, input.readInt32());
@@ -8701,10 +8695,8 @@ var spine = (() => {
8701
8695
  Color.rgb888ToColor(data.darkColor = new Color(), darkColor);
8702
8696
  data.attachmentName = input.readStringRef();
8703
8697
  data.blendMode = input.readInt(true);
8704
- if (nonessential) {
8698
+ if (nonessential)
8705
8699
  data.visible = input.readBoolean();
8706
- data.path = path;
8707
- }
8708
8700
  skeletonData.slots.push(data);
8709
8701
  }
8710
8702
  n = input.readInt(true);
@@ -10680,13 +10672,7 @@ var spine = (() => {
10680
10672
  if (root.slots) {
10681
10673
  for (let i = 0; i < root.slots.length; i++) {
10682
10674
  let slotMap = root.slots[i];
10683
- let path = null;
10684
10675
  let slotName = slotMap.name;
10685
- const slash = slotName.lastIndexOf("/");
10686
- if (slash != -1) {
10687
- path = slotName.substring(0, slash);
10688
- slotName = slotName.substring(slash + 1);
10689
- }
10690
10676
  let boneData = skeletonData.findBone(slotMap.bone);
10691
10677
  if (!boneData)
10692
10678
  throw new Error(`Couldn't find bone ${slotMap.bone} for slot ${slotName}`);
@@ -10700,7 +10686,6 @@ var spine = (() => {
10700
10686
  data.attachmentName = getValue(slotMap, "attachment", null);
10701
10687
  data.blendMode = Utils.enumValue(BlendMode, getValue(slotMap, "blend", "normal"));
10702
10688
  data.visible = getValue(slotMap, "visible", true);
10703
- data.path = path;
10704
10689
  skeletonData.slots.push(data);
10705
10690
  }
10706
10691
  }
@@ -11438,7 +11423,7 @@ var spine = (() => {
11438
11423
  continue;
11439
11424
  let frames = timelineMap.length;
11440
11425
  if (timelineName == "reset") {
11441
- const timeline2 = new PhysicsConstraintResetTimeline(timelineMap.size, constraintIndex);
11426
+ const timeline2 = new PhysicsConstraintResetTimeline(frames, constraintIndex);
11442
11427
  for (let frame = 0; keyMap != null; keyMap = timelineMap[frame + 1], frame++)
11443
11428
  timeline2.setFrame(frame, getValue(keyMap, "time", 0));
11444
11429
  timelines.push(timeline2);