@esotericsoftware/spine-core 4.2.24 → 4.2.26

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.
Files changed (81) hide show
  1. package/dist/Animation.d.ts +7 -7
  2. package/dist/Animation.js +57 -38
  3. package/dist/AnimationState.d.ts +6 -6
  4. package/dist/AnimationState.js +154 -153
  5. package/dist/AnimationStateData.d.ts +3 -3
  6. package/dist/AnimationStateData.js +6 -4
  7. package/dist/AssetManagerBase.d.ts +3 -3
  8. package/dist/AssetManagerBase.js +11 -11
  9. package/dist/AtlasAttachmentLoader.d.ts +9 -9
  10. package/dist/AtlasAttachmentLoader.js +8 -7
  11. package/dist/Bone.d.ts +4 -4
  12. package/dist/Bone.js +53 -49
  13. package/dist/BoneData.d.ts +1 -1
  14. package/dist/BoneData.js +33 -31
  15. package/dist/ConstraintData.js +4 -1
  16. package/dist/Event.d.ts +1 -1
  17. package/dist/Event.js +8 -7
  18. package/dist/EventData.js +8 -7
  19. package/dist/IkConstraint.d.ts +4 -4
  20. package/dist/IkConstraint.js +21 -15
  21. package/dist/IkConstraintData.d.ts +2 -2
  22. package/dist/IkConstraintData.js +20 -20
  23. package/dist/PathConstraint.d.ts +6 -6
  24. package/dist/PathConstraint.js +28 -22
  25. package/dist/PathConstraintData.d.ts +3 -3
  26. package/dist/PathConstraintData.js +21 -21
  27. package/dist/Skeleton.d.ts +10 -10
  28. package/dist/Skeleton.js +41 -25
  29. package/dist/SkeletonBinary.d.ts +2 -2
  30. package/dist/SkeletonBinary.js +30 -19
  31. package/dist/SkeletonBounds.d.ts +3 -3
  32. package/dist/SkeletonBounds.js +18 -20
  33. package/dist/SkeletonClipping.d.ts +3 -3
  34. package/dist/SkeletonClipping.js +11 -13
  35. package/dist/SkeletonData.d.ts +7 -7
  36. package/dist/SkeletonData.js +42 -44
  37. package/dist/SkeletonJson.d.ts +5 -5
  38. package/dist/SkeletonJson.js +26 -20
  39. package/dist/Skin.d.ts +5 -5
  40. package/dist/Skin.js +10 -5
  41. package/dist/Slot.d.ts +5 -5
  42. package/dist/Slot.js +23 -16
  43. package/dist/SlotData.d.ts +2 -2
  44. package/dist/SlotData.js +18 -14
  45. package/dist/Texture.js +14 -14
  46. package/dist/TextureAtlas.d.ts +3 -3
  47. package/dist/TextureAtlas.js +30 -27
  48. package/dist/TransformConstraint.d.ts +5 -5
  49. package/dist/TransformConstraint.js +16 -10
  50. package/dist/TransformConstraintData.d.ts +2 -2
  51. package/dist/TransformConstraintData.js +26 -26
  52. package/dist/Triangulator.d.ts +1 -1
  53. package/dist/Triangulator.js +13 -15
  54. package/dist/Utils.d.ts +2 -2
  55. package/dist/Utils.js +37 -35
  56. package/dist/attachments/Attachment.d.ts +2 -2
  57. package/dist/attachments/Attachment.js +20 -19
  58. package/dist/attachments/AttachmentLoader.d.ts +8 -8
  59. package/dist/attachments/BoundingBoxAttachment.d.ts +2 -2
  60. package/dist/attachments/BoundingBoxAttachment.js +4 -4
  61. package/dist/attachments/ClippingAttachment.d.ts +3 -3
  62. package/dist/attachments/ClippingAttachment.js +10 -10
  63. package/dist/attachments/HasTextureRegion.d.ts +3 -3
  64. package/dist/attachments/MeshAttachment.d.ts +6 -6
  65. package/dist/attachments/MeshAttachment.js +29 -27
  66. package/dist/attachments/PathAttachment.d.ts +2 -2
  67. package/dist/attachments/PathAttachment.js +13 -13
  68. package/dist/attachments/PointAttachment.d.ts +3 -3
  69. package/dist/attachments/PointAttachment.js +9 -9
  70. package/dist/attachments/RegionAttachment.d.ts +6 -6
  71. package/dist/attachments/RegionAttachment.js +61 -59
  72. package/dist/attachments/Sequence.d.ts +3 -3
  73. package/dist/attachments/Sequence.js +9 -8
  74. package/dist/attachments/index.d.ts +8 -8
  75. package/dist/attachments/index.js +9 -9
  76. package/dist/iife/spine-core.js +829 -737
  77. package/dist/iife/spine-core.js.map +2 -2
  78. package/dist/iife/spine-core.min.js +2 -2
  79. package/dist/index.d.ts +39 -39
  80. package/dist/index.js +40 -40
  81. package/package.json +3 -2
@@ -4,6 +4,7 @@ var spine = (() => {
4
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7
8
  var __export = (target, all) => {
8
9
  for (var name in all)
9
10
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -17,6 +18,10 @@ var spine = (() => {
17
18
  return to;
18
19
  };
19
20
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
+ var __publicField = (obj, key, value) => {
22
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
23
+ return value;
24
+ };
20
25
 
21
26
  // spine-core/src/index.ts
22
27
  var src_exports = {};
@@ -130,9 +135,7 @@ var spine = (() => {
130
135
 
131
136
  // spine-core/src/Utils.ts
132
137
  var IntSet = class {
133
- constructor() {
134
- this.array = new Array();
135
- }
138
+ array = new Array();
136
139
  add(value) {
137
140
  let contains = this.contains(value);
138
141
  this.array[value | 0] = value | 0;
@@ -149,10 +152,8 @@ var spine = (() => {
149
152
  }
150
153
  };
151
154
  var StringSet = class {
152
- constructor() {
153
- this.entries = {};
154
- this.size = 0;
155
- }
155
+ entries = {};
156
+ size = 0;
156
157
  add(value) {
157
158
  let contains = this.entries[value];
158
159
  this.entries[value] = true;
@@ -247,11 +248,11 @@ var spine = (() => {
247
248
  }
248
249
  };
249
250
  var Color = _Color;
250
- Color.WHITE = new _Color(1, 1, 1, 1);
251
- Color.RED = new _Color(1, 0, 0, 1);
252
- Color.GREEN = new _Color(0, 1, 0, 1);
253
- Color.BLUE = new _Color(0, 0, 1, 1);
254
- Color.MAGENTA = new _Color(1, 0, 1, 1);
251
+ __publicField(Color, "WHITE", new _Color(1, 1, 1, 1));
252
+ __publicField(Color, "RED", new _Color(1, 0, 0, 1));
253
+ __publicField(Color, "GREEN", new _Color(0, 1, 0, 1));
254
+ __publicField(Color, "BLUE", new _Color(0, 0, 1, 1));
255
+ __publicField(Color, "MAGENTA", new _Color(1, 0, 1, 1));
255
256
  var _MathUtils = class {
256
257
  static clamp(value, min, max) {
257
258
  if (value < min)
@@ -291,21 +292,21 @@ var spine = (() => {
291
292
  }
292
293
  };
293
294
  var MathUtils = _MathUtils;
294
- MathUtils.PI = 3.1415927;
295
- MathUtils.PI2 = _MathUtils.PI * 2;
296
- MathUtils.radiansToDegrees = 180 / _MathUtils.PI;
297
- MathUtils.radDeg = _MathUtils.radiansToDegrees;
298
- MathUtils.degreesToRadians = _MathUtils.PI / 180;
299
- MathUtils.degRad = _MathUtils.degreesToRadians;
295
+ __publicField(MathUtils, "PI", 3.1415927);
296
+ __publicField(MathUtils, "PI2", _MathUtils.PI * 2);
297
+ __publicField(MathUtils, "radiansToDegrees", 180 / _MathUtils.PI);
298
+ __publicField(MathUtils, "radDeg", _MathUtils.radiansToDegrees);
299
+ __publicField(MathUtils, "degreesToRadians", _MathUtils.PI / 180);
300
+ __publicField(MathUtils, "degRad", _MathUtils.degreesToRadians);
300
301
  var Interpolation = class {
301
302
  apply(start, end, a) {
302
303
  return start + (end - start) * this.applyInternal(a);
303
304
  }
304
305
  };
305
306
  var Pow = class extends Interpolation {
307
+ power = 2;
306
308
  constructor(power) {
307
309
  super();
308
- this.power = 2;
309
310
  this.power = power;
310
311
  }
311
312
  applyInternal(a) {
@@ -394,7 +395,7 @@ var spine = (() => {
394
395
  }
395
396
  };
396
397
  var Utils = _Utils;
397
- Utils.SUPPORTS_TYPED_ARRAYS = typeof Float32Array !== "undefined";
398
+ __publicField(Utils, "SUPPORTS_TYPED_ARRAYS", typeof Float32Array !== "undefined");
398
399
  var DebugUtils = class {
399
400
  static logBones(skeleton) {
400
401
  for (let i = 0; i < skeleton.bones.length; i++) {
@@ -404,8 +405,9 @@ var spine = (() => {
404
405
  }
405
406
  };
406
407
  var Pool = class {
408
+ items = new Array();
409
+ instantiator;
407
410
  constructor(instantiator) {
408
- this.items = new Array();
409
411
  this.instantiator = instantiator;
410
412
  }
411
413
  obtain() {
@@ -449,15 +451,13 @@ var spine = (() => {
449
451
  }
450
452
  };
451
453
  var TimeKeeper = class {
452
- constructor() {
453
- this.maxDelta = 0.064;
454
- this.framesPerSecond = 0;
455
- this.delta = 0;
456
- this.totalTime = 0;
457
- this.lastTime = Date.now() / 1e3;
458
- this.frameCount = 0;
459
- this.frameTime = 0;
460
- }
454
+ maxDelta = 0.064;
455
+ framesPerSecond = 0;
456
+ delta = 0;
457
+ totalTime = 0;
458
+ lastTime = Date.now() / 1e3;
459
+ frameCount = 0;
460
+ frameTime = 0;
461
461
  update() {
462
462
  let now = Date.now() / 1e3;
463
463
  this.delta = now - this.lastTime;
@@ -475,11 +475,12 @@ var spine = (() => {
475
475
  }
476
476
  };
477
477
  var WindowedMean = class {
478
+ values;
479
+ addedValues = 0;
480
+ lastValue = 0;
481
+ mean = 0;
482
+ dirty = true;
478
483
  constructor(windowSize = 32) {
479
- this.addedValues = 0;
480
- this.lastValue = 0;
481
- this.mean = 0;
482
- this.dirty = true;
483
484
  this.values = new Array(windowSize);
484
485
  }
485
486
  hasEnoughData() {
@@ -510,6 +511,7 @@ var spine = (() => {
510
511
 
511
512
  // spine-core/src/attachments/Attachment.ts
512
513
  var Attachment = class {
514
+ name;
513
515
  constructor(name) {
514
516
  if (!name)
515
517
  throw new Error("name cannot be null.");
@@ -517,24 +519,24 @@ var spine = (() => {
517
519
  }
518
520
  };
519
521
  var _VertexAttachment = class extends Attachment {
522
+ /** The unique ID for this attachment. */
523
+ id = _VertexAttachment.nextID++;
524
+ /** The bones which affect the {@link #getVertices()}. The array entries are, for each vertex, the number of bones affecting
525
+ * the vertex followed by that many bone indices, which is the index of the bone in {@link Skeleton#bones}. Will be null
526
+ * if this attachment has no weights. */
527
+ bones = null;
528
+ /** The vertex positions in the bone's coordinate system. For a non-weighted attachment, the values are `x,y`
529
+ * entries for each vertex. For a weighted attachment, the values are `x,y,weight` entries for each bone affecting
530
+ * each vertex. */
531
+ vertices = [];
532
+ /** The maximum number of world vertex values that can be output by
533
+ * {@link #computeWorldVertices()} using the `count` parameter. */
534
+ worldVerticesLength = 0;
535
+ /** Timelines for the timeline attachment are also applied to this attachment.
536
+ * May be null if no attachment-specific timelines should be applied. */
537
+ timelineAttachment = this;
520
538
  constructor(name) {
521
539
  super(name);
522
- /** The unique ID for this attachment. */
523
- this.id = _VertexAttachment.nextID++;
524
- /** The bones which affect the {@link #getVertices()}. The array entries are, for each vertex, the number of bones affecting
525
- * the vertex followed by that many bone indices, which is the index of the bone in {@link Skeleton#bones}. Will be null
526
- * if this attachment has no weights. */
527
- this.bones = null;
528
- /** The vertex positions in the bone's coordinate system. For a non-weighted attachment, the values are `x,y`
529
- * entries for each vertex. For a weighted attachment, the values are `x,y,weight` entries for each bone affecting
530
- * each vertex. */
531
- this.vertices = [];
532
- /** The maximum number of world vertex values that can be output by
533
- * {@link #computeWorldVertices()} using the `count` parameter. */
534
- this.worldVerticesLength = 0;
535
- /** Timelines for the timeline attachment are also applied to this attachment.
536
- * May be null if no attachment-specific timelines should be applied. */
537
- this.timelineAttachment = this;
538
540
  }
539
541
  /** Transforms the attachment's local {@link #vertices} to world coordinates. If the slot's {@link Slot#deform} is
540
542
  * not empty, it is used to deform the vertices.
@@ -621,16 +623,17 @@ var spine = (() => {
621
623
  }
622
624
  };
623
625
  var VertexAttachment = _VertexAttachment;
624
- VertexAttachment.nextID = 0;
626
+ __publicField(VertexAttachment, "nextID", 0);
625
627
 
626
628
  // spine-core/src/attachments/Sequence.ts
627
629
  var _Sequence = class {
630
+ id = _Sequence.nextID();
631
+ regions;
632
+ start = 0;
633
+ digits = 0;
634
+ /** The index of the region to show for the setup pose. */
635
+ setupIndex = 0;
628
636
  constructor(count) {
629
- this.id = _Sequence.nextID();
630
- this.start = 0;
631
- this.digits = 0;
632
- /** The index of the region to show for the setup pose. */
633
- this.setupIndex = 0;
634
637
  this.regions = new Array(count);
635
638
  }
636
639
  copy() {
@@ -666,7 +669,7 @@ var spine = (() => {
666
669
  }
667
670
  };
668
671
  var Sequence = _Sequence;
669
- Sequence._nextID = 0;
672
+ __publicField(Sequence, "_nextID", 0);
670
673
  var SequenceMode = /* @__PURE__ */ ((SequenceMode2) => {
671
674
  SequenceMode2[SequenceMode2["hold"] = 0] = "hold";
672
675
  SequenceMode2[SequenceMode2["once"] = 1] = "once";
@@ -689,9 +692,13 @@ var spine = (() => {
689
692
 
690
693
  // spine-core/src/Animation.ts
691
694
  var Animation = class {
695
+ /** The animation's name, which is unique across all animations in the skeleton. */
696
+ name;
697
+ timelines = [];
698
+ timelineIds = new StringSet();
699
+ /** The duration of the animation in seconds, which is the highest time of all keys in the timeline. */
700
+ duration;
692
701
  constructor(name, timelines, duration) {
693
- this.timelines = [];
694
- this.timelineIds = new StringSet();
695
702
  if (!name)
696
703
  throw new Error("name cannot be null.");
697
704
  this.name = name;
@@ -765,6 +772,8 @@ var spine = (() => {
765
772
  sequence: 19
766
773
  };
767
774
  var Timeline = class {
775
+ propertyIds;
776
+ frames;
768
777
  constructor(frameCount, propertyIds) {
769
778
  this.propertyIds = propertyIds;
770
779
  this.frames = Utils.newFloatArray(frameCount * this.getFrameEntries());
@@ -797,6 +806,7 @@ var spine = (() => {
797
806
  }
798
807
  };
799
808
  var CurveTimeline = class extends Timeline {
809
+ curves;
800
810
  // type, x, y, ...
801
811
  constructor(frameCount, bezierCount, propertyIds) {
802
812
  super(frameCount, propertyIds);
@@ -964,9 +974,9 @@ var spine = (() => {
964
974
  }
965
975
  };
966
976
  var RotateTimeline = class extends CurveTimeline1 {
977
+ boneIndex = 0;
967
978
  constructor(frameCount, bezierCount, boneIndex) {
968
979
  super(frameCount, bezierCount, Property.rotate + "|" + boneIndex);
969
- this.boneIndex = 0;
970
980
  this.boneIndex = boneIndex;
971
981
  }
972
982
  apply(skeleton, lastTime, time, events, alpha, blend, direction) {
@@ -998,6 +1008,7 @@ var spine = (() => {
998
1008
  }
999
1009
  };
1000
1010
  var TranslateTimeline = class extends CurveTimeline2 {
1011
+ boneIndex = 0;
1001
1012
  constructor(frameCount, bezierCount, boneIndex) {
1002
1013
  super(
1003
1014
  frameCount,
@@ -1005,7 +1016,6 @@ var spine = (() => {
1005
1016
  Property.x + "|" + boneIndex,
1006
1017
  Property.y + "|" + boneIndex
1007
1018
  );
1008
- this.boneIndex = 0;
1009
1019
  this.boneIndex = boneIndex;
1010
1020
  }
1011
1021
  apply(skeleton, lastTime, time, events, alpha, blend, direction) {
@@ -1103,9 +1113,9 @@ var spine = (() => {
1103
1113
  }
1104
1114
  };
1105
1115
  var TranslateXTimeline = class extends CurveTimeline1 {
1116
+ boneIndex = 0;
1106
1117
  constructor(frameCount, bezierCount, boneIndex) {
1107
1118
  super(frameCount, bezierCount, Property.x + "|" + boneIndex);
1108
- this.boneIndex = 0;
1109
1119
  this.boneIndex = boneIndex;
1110
1120
  }
1111
1121
  apply(skeleton, lastTime, time, events, alpha, blend, direction) {
@@ -1138,9 +1148,9 @@ var spine = (() => {
1138
1148
  }
1139
1149
  };
1140
1150
  var TranslateYTimeline = class extends CurveTimeline1 {
1151
+ boneIndex = 0;
1141
1152
  constructor(frameCount, bezierCount, boneIndex) {
1142
1153
  super(frameCount, bezierCount, Property.y + "|" + boneIndex);
1143
- this.boneIndex = 0;
1144
1154
  this.boneIndex = boneIndex;
1145
1155
  }
1146
1156
  apply(skeleton, lastTime, time, events, alpha, blend, direction) {
@@ -1173,6 +1183,7 @@ var spine = (() => {
1173
1183
  }
1174
1184
  };
1175
1185
  var ScaleTimeline = class extends CurveTimeline2 {
1186
+ boneIndex = 0;
1176
1187
  constructor(frameCount, bezierCount, boneIndex) {
1177
1188
  super(
1178
1189
  frameCount,
@@ -1180,7 +1191,6 @@ var spine = (() => {
1180
1191
  Property.scaleX + "|" + boneIndex,
1181
1192
  Property.scaleY + "|" + boneIndex
1182
1193
  );
1183
- this.boneIndex = 0;
1184
1194
  this.boneIndex = boneIndex;
1185
1195
  }
1186
1196
  apply(skeleton, lastTime, time, events, alpha, blend, direction) {
@@ -1316,9 +1326,9 @@ var spine = (() => {
1316
1326
  }
1317
1327
  };
1318
1328
  var ScaleXTimeline = class extends CurveTimeline1 {
1329
+ boneIndex = 0;
1319
1330
  constructor(frameCount, bezierCount, boneIndex) {
1320
1331
  super(frameCount, bezierCount, Property.scaleX + "|" + boneIndex);
1321
- this.boneIndex = 0;
1322
1332
  this.boneIndex = boneIndex;
1323
1333
  }
1324
1334
  apply(skeleton, lastTime, time, events, alpha, blend, direction) {
@@ -1377,9 +1387,9 @@ var spine = (() => {
1377
1387
  }
1378
1388
  };
1379
1389
  var ScaleYTimeline = class extends CurveTimeline1 {
1390
+ boneIndex = 0;
1380
1391
  constructor(frameCount, bezierCount, boneIndex) {
1381
1392
  super(frameCount, bezierCount, Property.scaleY + "|" + boneIndex);
1382
- this.boneIndex = 0;
1383
1393
  this.boneIndex = boneIndex;
1384
1394
  }
1385
1395
  apply(skeleton, lastTime, time, events, alpha, blend, direction) {
@@ -1438,6 +1448,7 @@ var spine = (() => {
1438
1448
  }
1439
1449
  };
1440
1450
  var ShearTimeline = class extends CurveTimeline2 {
1451
+ boneIndex = 0;
1441
1452
  constructor(frameCount, bezierCount, boneIndex) {
1442
1453
  super(
1443
1454
  frameCount,
@@ -1445,7 +1456,6 @@ var spine = (() => {
1445
1456
  Property.shearX + "|" + boneIndex,
1446
1457
  Property.shearY + "|" + boneIndex
1447
1458
  );
1448
- this.boneIndex = 0;
1449
1459
  this.boneIndex = boneIndex;
1450
1460
  }
1451
1461
  apply(skeleton, lastTime, time, events, alpha, blend, direction) {
@@ -1543,9 +1553,9 @@ var spine = (() => {
1543
1553
  }
1544
1554
  };
1545
1555
  var ShearXTimeline = class extends CurveTimeline1 {
1556
+ boneIndex = 0;
1546
1557
  constructor(frameCount, bezierCount, boneIndex) {
1547
1558
  super(frameCount, bezierCount, Property.shearX + "|" + boneIndex);
1548
- this.boneIndex = 0;
1549
1559
  this.boneIndex = boneIndex;
1550
1560
  }
1551
1561
  apply(skeleton, lastTime, time, events, alpha, blend, direction) {
@@ -1578,9 +1588,9 @@ var spine = (() => {
1578
1588
  }
1579
1589
  };
1580
1590
  var ShearYTimeline = class extends CurveTimeline1 {
1591
+ boneIndex = 0;
1581
1592
  constructor(frameCount, bezierCount, boneIndex) {
1582
1593
  super(frameCount, bezierCount, Property.shearY + "|" + boneIndex);
1583
- this.boneIndex = 0;
1584
1594
  this.boneIndex = boneIndex;
1585
1595
  }
1586
1596
  apply(skeleton, lastTime, time, events, alpha, blend, direction) {
@@ -1613,12 +1623,12 @@ var spine = (() => {
1613
1623
  }
1614
1624
  };
1615
1625
  var RGBATimeline = class extends CurveTimeline {
1626
+ slotIndex = 0;
1616
1627
  constructor(frameCount, bezierCount, slotIndex) {
1617
1628
  super(frameCount, bezierCount, [
1618
1629
  Property.rgb + "|" + slotIndex,
1619
1630
  Property.alpha + "|" + slotIndex
1620
1631
  ]);
1621
- this.slotIndex = 0;
1622
1632
  this.slotIndex = slotIndex;
1623
1633
  }
1624
1634
  getFrameEntries() {
@@ -1776,11 +1786,11 @@ var spine = (() => {
1776
1786
  }
1777
1787
  };
1778
1788
  var RGBTimeline = class extends CurveTimeline {
1789
+ slotIndex = 0;
1779
1790
  constructor(frameCount, bezierCount, slotIndex) {
1780
1791
  super(frameCount, bezierCount, [
1781
1792
  Property.rgb + "|" + slotIndex
1782
1793
  ]);
1783
- this.slotIndex = 0;
1784
1794
  this.slotIndex = slotIndex;
1785
1795
  }
1786
1796
  getFrameEntries() {
@@ -1919,9 +1929,9 @@ var spine = (() => {
1919
1929
  }
1920
1930
  };
1921
1931
  var AlphaTimeline = class extends CurveTimeline1 {
1932
+ slotIndex = 0;
1922
1933
  constructor(frameCount, bezierCount, slotIndex) {
1923
1934
  super(frameCount, bezierCount, Property.alpha + "|" + slotIndex);
1924
- this.slotIndex = 0;
1925
1935
  this.slotIndex = slotIndex;
1926
1936
  }
1927
1937
  apply(skeleton, lastTime, time, events, alpha, blend, direction) {
@@ -1951,13 +1961,13 @@ var spine = (() => {
1951
1961
  }
1952
1962
  };
1953
1963
  var RGBA2Timeline = class extends CurveTimeline {
1964
+ slotIndex = 0;
1954
1965
  constructor(frameCount, bezierCount, slotIndex) {
1955
1966
  super(frameCount, bezierCount, [
1956
1967
  Property.rgb + "|" + slotIndex,
1957
1968
  Property.alpha + "|" + slotIndex,
1958
1969
  Property.rgb2 + "|" + slotIndex
1959
1970
  ]);
1960
- this.slotIndex = 0;
1961
1971
  this.slotIndex = slotIndex;
1962
1972
  }
1963
1973
  getFrameEntries() {
@@ -2198,12 +2208,12 @@ var spine = (() => {
2198
2208
  }
2199
2209
  };
2200
2210
  var RGB2Timeline = class extends CurveTimeline {
2211
+ slotIndex = 0;
2201
2212
  constructor(frameCount, bezierCount, slotIndex) {
2202
2213
  super(frameCount, bezierCount, [
2203
2214
  Property.rgb + "|" + slotIndex,
2204
2215
  Property.rgb2 + "|" + slotIndex
2205
2216
  ]);
2206
- this.slotIndex = 0;
2207
2217
  this.slotIndex = slotIndex;
2208
2218
  }
2209
2219
  getFrameEntries() {
@@ -2429,11 +2439,13 @@ var spine = (() => {
2429
2439
  }
2430
2440
  };
2431
2441
  var AttachmentTimeline = class extends Timeline {
2442
+ slotIndex = 0;
2443
+ /** The attachment name for each key frame. May contain null values to clear the attachment. */
2444
+ attachmentNames;
2432
2445
  constructor(frameCount, slotIndex) {
2433
2446
  super(frameCount, [
2434
2447
  Property.attachment + "|" + slotIndex
2435
2448
  ]);
2436
- this.slotIndex = 0;
2437
2449
  this.slotIndex = slotIndex;
2438
2450
  this.attachmentNames = new Array(frameCount);
2439
2451
  }
@@ -2466,11 +2478,15 @@ var spine = (() => {
2466
2478
  }
2467
2479
  };
2468
2480
  var DeformTimeline = class extends CurveTimeline {
2481
+ slotIndex = 0;
2482
+ /** The attachment that will be deformed. */
2483
+ attachment;
2484
+ /** The vertices for each key frame. */
2485
+ vertices;
2469
2486
  constructor(frameCount, bezierCount, slotIndex, attachment) {
2470
2487
  super(frameCount, bezierCount, [
2471
2488
  Property.deform + "|" + slotIndex + "|" + attachment.id
2472
2489
  ]);
2473
- this.slotIndex = 0;
2474
2490
  this.slotIndex = slotIndex;
2475
2491
  this.attachment = attachment;
2476
2492
  this.vertices = new Array(frameCount);
@@ -2691,6 +2707,8 @@ var spine = (() => {
2691
2707
  }
2692
2708
  };
2693
2709
  var _EventTimeline = class extends Timeline {
2710
+ /** The event for each key frame. */
2711
+ events;
2694
2712
  constructor(frameCount) {
2695
2713
  super(frameCount, _EventTimeline.propertyIds);
2696
2714
  this.events = new Array(frameCount);
@@ -2733,8 +2751,10 @@ var spine = (() => {
2733
2751
  }
2734
2752
  };
2735
2753
  var EventTimeline = _EventTimeline;
2736
- EventTimeline.propertyIds = ["" + Property.event];
2754
+ __publicField(EventTimeline, "propertyIds", ["" + Property.event]);
2737
2755
  var _DrawOrderTimeline = class extends Timeline {
2756
+ /** The draw order for each key frame. See {@link #setFrame(int, float, int[])}. */
2757
+ drawOrders;
2738
2758
  constructor(frameCount) {
2739
2759
  super(frameCount, _DrawOrderTimeline.propertyIds);
2740
2760
  this.drawOrders = new Array(frameCount);
@@ -2773,14 +2793,14 @@ var spine = (() => {
2773
2793
  }
2774
2794
  };
2775
2795
  var DrawOrderTimeline = _DrawOrderTimeline;
2776
- DrawOrderTimeline.propertyIds = ["" + Property.drawOrder];
2796
+ __publicField(DrawOrderTimeline, "propertyIds", ["" + Property.drawOrder]);
2777
2797
  var IkConstraintTimeline = class extends CurveTimeline {
2798
+ /** The index of the IK constraint slot in {@link Skeleton#ikConstraints} that will be changed. */
2799
+ ikConstraintIndex = 0;
2778
2800
  constructor(frameCount, bezierCount, ikConstraintIndex) {
2779
2801
  super(frameCount, bezierCount, [
2780
2802
  Property.ikConstraint + "|" + ikConstraintIndex
2781
2803
  ]);
2782
- /** The index of the IK constraint slot in {@link Skeleton#ikConstraints} that will be changed. */
2783
- this.ikConstraintIndex = 0;
2784
2804
  this.ikConstraintIndex = ikConstraintIndex;
2785
2805
  }
2786
2806
  getFrameEntries() {
@@ -2937,12 +2957,12 @@ var spine = (() => {
2937
2957
  }
2938
2958
  };
2939
2959
  var TransformConstraintTimeline = class extends CurveTimeline {
2960
+ /** The index of the transform constraint slot in {@link Skeleton#transformConstraints} that will be changed. */
2961
+ transformConstraintIndex = 0;
2940
2962
  constructor(frameCount, bezierCount, transformConstraintIndex) {
2941
2963
  super(frameCount, bezierCount, [
2942
2964
  Property.transformConstraint + "|" + transformConstraintIndex
2943
2965
  ]);
2944
- /** The index of the transform constraint slot in {@link Skeleton#transformConstraints} that will be changed. */
2945
- this.transformConstraintIndex = 0;
2946
2966
  this.transformConstraintIndex = transformConstraintIndex;
2947
2967
  }
2948
2968
  getFrameEntries() {
@@ -3160,10 +3180,10 @@ var spine = (() => {
3160
3180
  }
3161
3181
  };
3162
3182
  var PathConstraintPositionTimeline = class extends CurveTimeline1 {
3183
+ /** The index of the path constraint slot in {@link Skeleton#pathConstraints} that will be changed. */
3184
+ pathConstraintIndex = 0;
3163
3185
  constructor(frameCount, bezierCount, pathConstraintIndex) {
3164
3186
  super(frameCount, bezierCount, Property.pathConstraintPosition + "|" + pathConstraintIndex);
3165
- /** The index of the path constraint slot in {@link Skeleton#pathConstraints} that will be changed. */
3166
- this.pathConstraintIndex = 0;
3167
3187
  this.pathConstraintIndex = pathConstraintIndex;
3168
3188
  }
3169
3189
  apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {
@@ -3189,10 +3209,10 @@ var spine = (() => {
3189
3209
  }
3190
3210
  };
3191
3211
  var PathConstraintSpacingTimeline = class extends CurveTimeline1 {
3212
+ /** The index of the path constraint slot in {@link Skeleton#getPathConstraints()} that will be changed. */
3213
+ pathConstraintIndex = 0;
3192
3214
  constructor(frameCount, bezierCount, pathConstraintIndex) {
3193
3215
  super(frameCount, bezierCount, Property.pathConstraintSpacing + "|" + pathConstraintIndex);
3194
- /** The index of the path constraint slot in {@link Skeleton#getPathConstraints()} that will be changed. */
3195
- this.pathConstraintIndex = 0;
3196
3216
  this.pathConstraintIndex = pathConstraintIndex;
3197
3217
  }
3198
3218
  apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {
@@ -3218,12 +3238,12 @@ var spine = (() => {
3218
3238
  }
3219
3239
  };
3220
3240
  var PathConstraintMixTimeline = class extends CurveTimeline {
3241
+ /** The index of the path constraint slot in {@link Skeleton#getPathConstraints()} that will be changed. */
3242
+ pathConstraintIndex = 0;
3221
3243
  constructor(frameCount, bezierCount, pathConstraintIndex) {
3222
3244
  super(frameCount, bezierCount, [
3223
3245
  Property.pathConstraintMix + "|" + pathConstraintIndex
3224
3246
  ]);
3225
- /** The index of the path constraint slot in {@link Skeleton#getPathConstraints()} that will be changed. */
3226
- this.pathConstraintIndex = 0;
3227
3247
  this.pathConstraintIndex = pathConstraintIndex;
3228
3248
  }
3229
3249
  getFrameEntries() {
@@ -3355,6 +3375,8 @@ var spine = (() => {
3355
3375
  }
3356
3376
  };
3357
3377
  var _SequenceTimeline = class extends Timeline {
3378
+ slotIndex;
3379
+ attachment;
3358
3380
  constructor(frameCount, slotIndex, attachment) {
3359
3381
  super(frameCount, [
3360
3382
  Property.sequence + "|" + slotIndex + "|" + attachment.sequence.id
@@ -3439,32 +3461,34 @@ var spine = (() => {
3439
3461
  }
3440
3462
  };
3441
3463
  var SequenceTimeline = _SequenceTimeline;
3442
- SequenceTimeline.ENTRIES = 3;
3443
- SequenceTimeline.MODE = 1;
3444
- SequenceTimeline.DELAY = 2;
3464
+ __publicField(SequenceTimeline, "ENTRIES", 3);
3465
+ __publicField(SequenceTimeline, "MODE", 1);
3466
+ __publicField(SequenceTimeline, "DELAY", 2);
3445
3467
 
3446
3468
  // spine-core/src/AnimationState.ts
3447
3469
  var _AnimationState = class {
3448
- constructor(data) {
3449
- /** The list of tracks that currently have animations, which may contain null entries. */
3450
- this.tracks = new Array();
3451
- /** Multiplier for the delta time when the animation state is updated, causing time for all animations and mixes to play slower
3452
- * or faster. Defaults to 1.
3453
- *
3454
- * See TrackEntry {@link TrackEntry#timeScale} for affecting a single animation. */
3455
- this.timeScale = 1;
3456
- this.unkeyedState = 0;
3457
- this.events = new Array();
3458
- this.listeners = new Array();
3459
- this.queue = new EventQueue(this);
3460
- this.propertyIDs = new StringSet();
3461
- this.animationsChanged = false;
3462
- this.trackEntryPool = new Pool(() => new TrackEntry());
3463
- this.data = data;
3464
- }
3465
3470
  static emptyAnimation() {
3466
3471
  return _AnimationState._emptyAnimation;
3467
3472
  }
3473
+ /** The AnimationStateData to look up mix durations. */
3474
+ data;
3475
+ /** The list of tracks that currently have animations, which may contain null entries. */
3476
+ tracks = new Array();
3477
+ /** Multiplier for the delta time when the animation state is updated, causing time for all animations and mixes to play slower
3478
+ * or faster. Defaults to 1.
3479
+ *
3480
+ * See TrackEntry {@link TrackEntry#timeScale} for affecting a single animation. */
3481
+ timeScale = 1;
3482
+ unkeyedState = 0;
3483
+ events = new Array();
3484
+ listeners = new Array();
3485
+ queue = new EventQueue(this);
3486
+ propertyIDs = new StringSet();
3487
+ animationsChanged = false;
3488
+ trackEntryPool = new Pool(() => new TrackEntry());
3489
+ constructor(data) {
3490
+ this.data = data;
3491
+ }
3468
3492
  /** Increments each track entry {@link TrackEntry#trackTime()}, setting queued animations as current if needed. */
3469
3493
  update(delta) {
3470
3494
  delta *= this.timeScale;
@@ -4116,141 +4140,139 @@ var spine = (() => {
4116
4140
  }
4117
4141
  };
4118
4142
  var AnimationState = _AnimationState;
4119
- AnimationState._emptyAnimation = new Animation("<empty>", [], 0);
4143
+ __publicField(AnimationState, "_emptyAnimation", new Animation("<empty>", [], 0));
4120
4144
  var TrackEntry = class {
4121
- constructor() {
4122
- /** The animation to apply for this track entry. */
4123
- this.animation = null;
4124
- this.previous = null;
4125
- /** The animation queued to start after this animation, or null. `next` makes up a linked list. */
4126
- this.next = null;
4127
- /** The track entry for the previous animation when mixing from the previous animation to this animation, or null if no
4128
- * mixing is currently occuring. When mixing from multiple animations, `mixingFrom` makes up a linked list. */
4129
- this.mixingFrom = null;
4130
- /** The track entry for the next animation when mixing from this animation to the next animation, or null if no mixing is
4131
- * currently occuring. When mixing to multiple animations, `mixingTo` makes up a linked list. */
4132
- this.mixingTo = null;
4133
- /** The listener for events generated by this track entry, or null.
4134
- *
4135
- * A track entry returned from {@link AnimationState#setAnimation()} is already the current animation
4136
- * for the track, so the track entry listener {@link AnimationStateListener#start()} will not be called. */
4137
- this.listener = null;
4138
- /** The index of the track where this track entry is either current or queued.
4139
- *
4140
- * See {@link AnimationState#getCurrent()}. */
4141
- this.trackIndex = 0;
4142
- /** If true, the animation will repeat. If false it will not, instead its last frame is applied if played beyond its
4143
- * duration. */
4144
- this.loop = false;
4145
- /** If true, when mixing from the previous animation to this animation, the previous animation is applied as normal instead
4146
- * of being mixed out.
4147
- *
4148
- * When mixing between animations that key the same property, if a lower track also keys that property then the value will
4149
- * briefly dip toward the lower track value during the mix. This happens because the first animation mixes from 100% to 0%
4150
- * while the second animation mixes from 0% to 100%. Setting `holdPrevious` to true applies the first animation
4151
- * at 100% during the mix so the lower track value is overwritten. Such dipping does not occur on the lowest track which
4152
- * keys the property, only when a higher track also keys the property.
4153
- *
4154
- * Snapping will occur if `holdPrevious` is true and this animation does not key all the same properties as the
4155
- * previous animation. */
4156
- this.holdPrevious = false;
4157
- this.reverse = false;
4158
- this.shortestRotation = false;
4159
- /** When the mix percentage ({@link #mixTime} / {@link #mixDuration}) is less than the
4160
- * `eventThreshold`, event timelines are applied while this animation is being mixed out. Defaults to 0, so event
4161
- * timelines are not applied while this animation is being mixed out. */
4162
- this.eventThreshold = 0;
4163
- /** When the mix percentage ({@link #mixtime} / {@link #mixDuration}) is less than the
4164
- * `attachmentThreshold`, attachment timelines are applied while this animation is being mixed out. Defaults to
4165
- * 0, so attachment timelines are not applied while this animation is being mixed out. */
4166
- this.attachmentThreshold = 0;
4167
- /** When the mix percentage ({@link #mixTime} / {@link #mixDuration}) is less than the
4168
- * `drawOrderThreshold`, draw order timelines are applied while this animation is being mixed out. Defaults to 0,
4169
- * so draw order timelines are not applied while this animation is being mixed out. */
4170
- this.drawOrderThreshold = 0;
4171
- /** Seconds when this animation starts, both initially and after looping. Defaults to 0.
4172
- *
4173
- * When changing the `animationStart` time, it often makes sense to set {@link #animationLast} to the same
4174
- * value to prevent timeline keys before the start time from triggering. */
4175
- this.animationStart = 0;
4176
- /** Seconds for the last frame of this animation. Non-looping animations won't play past this time. Looping animations will
4177
- * loop back to {@link #animationStart} at this time. Defaults to the animation {@link Animation#duration}. */
4178
- this.animationEnd = 0;
4179
- /** The time in seconds this animation was last applied. Some timelines use this for one-time triggers. Eg, when this
4180
- * animation is applied, event timelines will fire all events between the `animationLast` time (exclusive) and
4181
- * `animationTime` (inclusive). Defaults to -1 to ensure triggers on frame 0 happen the first time this animation
4182
- * is applied. */
4183
- this.animationLast = 0;
4184
- this.nextAnimationLast = 0;
4185
- /** Seconds to postpone playing the animation. When this track entry is the current track entry, `delay`
4186
- * postpones incrementing the {@link #trackTime}. When this track entry is queued, `delay` is the time from
4187
- * the start of the previous animation to when this track entry will become the current track entry (ie when the previous
4188
- * track entry {@link TrackEntry#trackTime} >= this track entry's `delay`).
4189
- *
4190
- * {@link #timeScale} affects the delay. */
4191
- this.delay = 0;
4192
- /** Current time in seconds this track entry has been the current track entry. The track time determines
4193
- * {@link #animationTime}. The track time can be set to start the animation at a time other than 0, without affecting
4194
- * looping. */
4195
- this.trackTime = 0;
4196
- this.trackLast = 0;
4197
- this.nextTrackLast = 0;
4198
- /** The track time in seconds when this animation will be removed from the track. Defaults to the highest possible float
4199
- * value, meaning the animation will be applied until a new animation is set or the track is cleared. If the track end time
4200
- * is reached, no other animations are queued for playback, and mixing from any previous animations is complete, then the
4201
- * properties keyed by the animation are set to the setup pose and the track is cleared.
4202
- *
4203
- * It may be desired to use {@link AnimationState#addEmptyAnimation()} rather than have the animation
4204
- * abruptly cease being applied. */
4205
- this.trackEnd = 0;
4206
- /** Multiplier for the delta time when this track entry is updated, causing time for this animation to pass slower or
4207
- * faster. Defaults to 1.
4208
- *
4209
- * {@link #mixTime} is not affected by track entry time scale, so {@link #mixDuration} may need to be adjusted to
4210
- * match the animation speed.
4211
- *
4212
- * When using {@link AnimationState#addAnimation()} with a `delay` <= 0, note the
4213
- * {@link #delay} is set using the mix duration from the {@link AnimationStateData}, assuming time scale to be 1. If
4214
- * the time scale is not 1, the delay may need to be adjusted.
4215
- *
4216
- * See AnimationState {@link AnimationState#timeScale} for affecting all animations. */
4217
- this.timeScale = 0;
4218
- /** Values < 1 mix this animation with the skeleton's current pose (usually the pose resulting from lower tracks). Defaults
4219
- * to 1, which overwrites the skeleton's current pose with this animation.
4220
- *
4221
- * Typically track 0 is used to completely pose the skeleton, then alpha is used on higher tracks. It doesn't make sense to
4222
- * use alpha on track 0 if the skeleton pose is from the last frame render. */
4223
- this.alpha = 0;
4224
- /** Seconds from 0 to the {@link #getMixDuration()} when mixing from the previous animation to this animation. May be
4225
- * slightly more than `mixDuration` when the mix is complete. */
4226
- this.mixTime = 0;
4227
- /** Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData
4228
- * {@link AnimationStateData#getMix()} based on the animation before this animation (if any).
4229
- *
4230
- * A mix duration of 0 still mixes out over one frame to provide the track entry being mixed out a chance to revert the
4231
- * properties it was animating.
4232
- *
4233
- * The `mixDuration` can be set manually rather than use the value from
4234
- * {@link AnimationStateData#getMix()}. In that case, the `mixDuration` can be set for a new
4235
- * track entry only before {@link AnimationState#update(float)} is first called.
4236
- *
4237
- * When using {@link AnimationState#addAnimation()} with a `delay` <= 0, note the
4238
- * {@link #delay} is set using the mix duration from the {@link AnimationStateData}, not a mix duration set
4239
- * afterward. */
4240
- this.mixDuration = 0;
4241
- this.interruptAlpha = 0;
4242
- this.totalAlpha = 0;
4243
- /** Controls how properties keyed in the animation are mixed with lower tracks. Defaults to {@link MixBlend#replace}, which
4244
- * replaces the values from the lower tracks with the animation values. {@link MixBlend#add} adds the animation values to
4245
- * the values from the lower tracks.
4246
- *
4247
- * The `mixBlend` can be set for a new track entry only before {@link AnimationState#apply()} is first
4248
- * called. */
4249
- this.mixBlend = 2 /* replace */;
4250
- this.timelineMode = new Array();
4251
- this.timelineHoldMix = new Array();
4252
- this.timelinesRotation = new Array();
4253
- }
4145
+ /** The animation to apply for this track entry. */
4146
+ animation = null;
4147
+ previous = null;
4148
+ /** The animation queued to start after this animation, or null. `next` makes up a linked list. */
4149
+ next = null;
4150
+ /** The track entry for the previous animation when mixing from the previous animation to this animation, or null if no
4151
+ * mixing is currently occuring. When mixing from multiple animations, `mixingFrom` makes up a linked list. */
4152
+ mixingFrom = null;
4153
+ /** The track entry for the next animation when mixing from this animation to the next animation, or null if no mixing is
4154
+ * currently occuring. When mixing to multiple animations, `mixingTo` makes up a linked list. */
4155
+ mixingTo = null;
4156
+ /** The listener for events generated by this track entry, or null.
4157
+ *
4158
+ * A track entry returned from {@link AnimationState#setAnimation()} is already the current animation
4159
+ * for the track, so the track entry listener {@link AnimationStateListener#start()} will not be called. */
4160
+ listener = null;
4161
+ /** The index of the track where this track entry is either current or queued.
4162
+ *
4163
+ * See {@link AnimationState#getCurrent()}. */
4164
+ trackIndex = 0;
4165
+ /** If true, the animation will repeat. If false it will not, instead its last frame is applied if played beyond its
4166
+ * duration. */
4167
+ loop = false;
4168
+ /** If true, when mixing from the previous animation to this animation, the previous animation is applied as normal instead
4169
+ * of being mixed out.
4170
+ *
4171
+ * When mixing between animations that key the same property, if a lower track also keys that property then the value will
4172
+ * briefly dip toward the lower track value during the mix. This happens because the first animation mixes from 100% to 0%
4173
+ * while the second animation mixes from 0% to 100%. Setting `holdPrevious` to true applies the first animation
4174
+ * at 100% during the mix so the lower track value is overwritten. Such dipping does not occur on the lowest track which
4175
+ * keys the property, only when a higher track also keys the property.
4176
+ *
4177
+ * Snapping will occur if `holdPrevious` is true and this animation does not key all the same properties as the
4178
+ * previous animation. */
4179
+ holdPrevious = false;
4180
+ reverse = false;
4181
+ shortestRotation = false;
4182
+ /** When the mix percentage ({@link #mixTime} / {@link #mixDuration}) is less than the
4183
+ * `eventThreshold`, event timelines are applied while this animation is being mixed out. Defaults to 0, so event
4184
+ * timelines are not applied while this animation is being mixed out. */
4185
+ eventThreshold = 0;
4186
+ /** When the mix percentage ({@link #mixtime} / {@link #mixDuration}) is less than the
4187
+ * `attachmentThreshold`, attachment timelines are applied while this animation is being mixed out. Defaults to
4188
+ * 0, so attachment timelines are not applied while this animation is being mixed out. */
4189
+ attachmentThreshold = 0;
4190
+ /** When the mix percentage ({@link #mixTime} / {@link #mixDuration}) is less than the
4191
+ * `drawOrderThreshold`, draw order timelines are applied while this animation is being mixed out. Defaults to 0,
4192
+ * so draw order timelines are not applied while this animation is being mixed out. */
4193
+ drawOrderThreshold = 0;
4194
+ /** Seconds when this animation starts, both initially and after looping. Defaults to 0.
4195
+ *
4196
+ * When changing the `animationStart` time, it often makes sense to set {@link #animationLast} to the same
4197
+ * value to prevent timeline keys before the start time from triggering. */
4198
+ animationStart = 0;
4199
+ /** Seconds for the last frame of this animation. Non-looping animations won't play past this time. Looping animations will
4200
+ * loop back to {@link #animationStart} at this time. Defaults to the animation {@link Animation#duration}. */
4201
+ animationEnd = 0;
4202
+ /** The time in seconds this animation was last applied. Some timelines use this for one-time triggers. Eg, when this
4203
+ * animation is applied, event timelines will fire all events between the `animationLast` time (exclusive) and
4204
+ * `animationTime` (inclusive). Defaults to -1 to ensure triggers on frame 0 happen the first time this animation
4205
+ * is applied. */
4206
+ animationLast = 0;
4207
+ nextAnimationLast = 0;
4208
+ /** Seconds to postpone playing the animation. When this track entry is the current track entry, `delay`
4209
+ * postpones incrementing the {@link #trackTime}. When this track entry is queued, `delay` is the time from
4210
+ * the start of the previous animation to when this track entry will become the current track entry (ie when the previous
4211
+ * track entry {@link TrackEntry#trackTime} >= this track entry's `delay`).
4212
+ *
4213
+ * {@link #timeScale} affects the delay. */
4214
+ delay = 0;
4215
+ /** Current time in seconds this track entry has been the current track entry. The track time determines
4216
+ * {@link #animationTime}. The track time can be set to start the animation at a time other than 0, without affecting
4217
+ * looping. */
4218
+ trackTime = 0;
4219
+ trackLast = 0;
4220
+ nextTrackLast = 0;
4221
+ /** The track time in seconds when this animation will be removed from the track. Defaults to the highest possible float
4222
+ * value, meaning the animation will be applied until a new animation is set or the track is cleared. If the track end time
4223
+ * is reached, no other animations are queued for playback, and mixing from any previous animations is complete, then the
4224
+ * properties keyed by the animation are set to the setup pose and the track is cleared.
4225
+ *
4226
+ * It may be desired to use {@link AnimationState#addEmptyAnimation()} rather than have the animation
4227
+ * abruptly cease being applied. */
4228
+ trackEnd = 0;
4229
+ /** Multiplier for the delta time when this track entry is updated, causing time for this animation to pass slower or
4230
+ * faster. Defaults to 1.
4231
+ *
4232
+ * {@link #mixTime} is not affected by track entry time scale, so {@link #mixDuration} may need to be adjusted to
4233
+ * match the animation speed.
4234
+ *
4235
+ * When using {@link AnimationState#addAnimation()} with a `delay` <= 0, note the
4236
+ * {@link #delay} is set using the mix duration from the {@link AnimationStateData}, assuming time scale to be 1. If
4237
+ * the time scale is not 1, the delay may need to be adjusted.
4238
+ *
4239
+ * See AnimationState {@link AnimationState#timeScale} for affecting all animations. */
4240
+ timeScale = 0;
4241
+ /** Values < 1 mix this animation with the skeleton's current pose (usually the pose resulting from lower tracks). Defaults
4242
+ * to 1, which overwrites the skeleton's current pose with this animation.
4243
+ *
4244
+ * Typically track 0 is used to completely pose the skeleton, then alpha is used on higher tracks. It doesn't make sense to
4245
+ * use alpha on track 0 if the skeleton pose is from the last frame render. */
4246
+ alpha = 0;
4247
+ /** Seconds from 0 to the {@link #getMixDuration()} when mixing from the previous animation to this animation. May be
4248
+ * slightly more than `mixDuration` when the mix is complete. */
4249
+ mixTime = 0;
4250
+ /** Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData
4251
+ * {@link AnimationStateData#getMix()} based on the animation before this animation (if any).
4252
+ *
4253
+ * A mix duration of 0 still mixes out over one frame to provide the track entry being mixed out a chance to revert the
4254
+ * properties it was animating.
4255
+ *
4256
+ * The `mixDuration` can be set manually rather than use the value from
4257
+ * {@link AnimationStateData#getMix()}. In that case, the `mixDuration` can be set for a new
4258
+ * track entry only before {@link AnimationState#update(float)} is first called.
4259
+ *
4260
+ * When using {@link AnimationState#addAnimation()} with a `delay` <= 0, note the
4261
+ * {@link #delay} is set using the mix duration from the {@link AnimationStateData}, not a mix duration set
4262
+ * afterward. */
4263
+ mixDuration = 0;
4264
+ interruptAlpha = 0;
4265
+ totalAlpha = 0;
4266
+ /** Controls how properties keyed in the animation are mixed with lower tracks. Defaults to {@link MixBlend#replace}, which
4267
+ * replaces the values from the lower tracks with the animation values. {@link MixBlend#add} adds the animation values to
4268
+ * the values from the lower tracks.
4269
+ *
4270
+ * The `mixBlend` can be set for a new track entry only before {@link AnimationState#apply()} is first
4271
+ * called. */
4272
+ mixBlend = 2 /* replace */;
4273
+ timelineMode = new Array();
4274
+ timelineHoldMix = new Array();
4275
+ timelinesRotation = new Array();
4254
4276
  reset() {
4255
4277
  this.next = null;
4256
4278
  this.previous = null;
@@ -4306,9 +4328,10 @@ var spine = (() => {
4306
4328
  }
4307
4329
  };
4308
4330
  var EventQueue = class {
4331
+ objects = [];
4332
+ drainDisabled = false;
4333
+ animState;
4309
4334
  constructor(animState) {
4310
- this.objects = [];
4311
- this.drainDisabled = false;
4312
4335
  this.animState = animState;
4313
4336
  }
4314
4337
  start(entry) {
@@ -4445,10 +4468,12 @@ var spine = (() => {
4445
4468
 
4446
4469
  // spine-core/src/AnimationStateData.ts
4447
4470
  var AnimationStateData = class {
4471
+ /** The SkeletonData to look up animations when they are specified by name. */
4472
+ skeletonData;
4473
+ animationToMixTime = {};
4474
+ /** The mix duration to use when no mix duration has been defined between two animations. */
4475
+ defaultMix = 0;
4448
4476
  constructor(skeletonData) {
4449
- this.animationToMixTime = {};
4450
- /** The mix duration to use when no mix duration has been defined between two animations. */
4451
- this.defaultMix = 0;
4452
4477
  if (!skeletonData)
4453
4478
  throw new Error("skeletonData cannot be null.");
4454
4479
  this.skeletonData = skeletonData;
@@ -4487,9 +4512,9 @@ var spine = (() => {
4487
4512
 
4488
4513
  // spine-core/src/attachments/BoundingBoxAttachment.ts
4489
4514
  var BoundingBoxAttachment = class extends VertexAttachment {
4515
+ color = new Color(1, 1, 1, 1);
4490
4516
  constructor(name) {
4491
4517
  super(name);
4492
- this.color = new Color(1, 1, 1, 1);
4493
4518
  }
4494
4519
  copy() {
4495
4520
  let copy = new BoundingBoxAttachment(this.name);
@@ -4501,16 +4526,16 @@ var spine = (() => {
4501
4526
 
4502
4527
  // spine-core/src/attachments/ClippingAttachment.ts
4503
4528
  var ClippingAttachment = class extends VertexAttachment {
4529
+ /** Clipping is performed between the clipping polygon's slot and the end slot. Returns null if clipping is done until the end of
4530
+ * the skeleton's rendering. */
4531
+ endSlot = null;
4532
+ // Nonessential.
4533
+ /** The color of the clipping polygon as it was in Spine. Available only when nonessential data was exported. Clipping polygons
4534
+ * are not usually rendered at runtime. */
4535
+ color = new Color(0.2275, 0.2275, 0.8078, 1);
4504
4536
  // ce3a3aff
4505
4537
  constructor(name) {
4506
4538
  super(name);
4507
- /** Clipping is performed between the clipping polygon's slot and the end slot. Returns null if clipping is done until the end of
4508
- * the skeleton's rendering. */
4509
- this.endSlot = null;
4510
- // Nonessential.
4511
- /** The color of the clipping polygon as it was in Spine. Available only when nonessential data was exported. Clipping polygons
4512
- * are not usually rendered at runtime. */
4513
- this.color = new Color(0.2275, 0.2275, 0.8078, 1);
4514
4539
  }
4515
4540
  copy() {
4516
4541
  let copy = new ClippingAttachment(this.name);
@@ -4523,6 +4548,7 @@ var spine = (() => {
4523
4548
 
4524
4549
  // spine-core/src/Texture.ts
4525
4550
  var Texture = class {
4551
+ _image;
4526
4552
  constructor(image) {
4527
4553
  this._image = image;
4528
4554
  }
@@ -4547,19 +4573,18 @@ var spine = (() => {
4547
4573
  return TextureWrap2;
4548
4574
  })(TextureWrap || {});
4549
4575
  var TextureRegion = class {
4550
- constructor() {
4551
- this.u = 0;
4552
- this.v = 0;
4553
- this.u2 = 0;
4554
- this.v2 = 0;
4555
- this.width = 0;
4556
- this.height = 0;
4557
- this.degrees = 0;
4558
- this.offsetX = 0;
4559
- this.offsetY = 0;
4560
- this.originalWidth = 0;
4561
- this.originalHeight = 0;
4562
- }
4576
+ texture;
4577
+ u = 0;
4578
+ v = 0;
4579
+ u2 = 0;
4580
+ v2 = 0;
4581
+ width = 0;
4582
+ height = 0;
4583
+ degrees = 0;
4584
+ offsetX = 0;
4585
+ offsetY = 0;
4586
+ originalWidth = 0;
4587
+ originalHeight = 0;
4563
4588
  };
4564
4589
  var FakeTexture = class extends Texture {
4565
4590
  setFilters(minFilter, magFilter) {
@@ -4572,9 +4597,9 @@ var spine = (() => {
4572
4597
 
4573
4598
  // spine-core/src/TextureAtlas.ts
4574
4599
  var TextureAtlas = class {
4600
+ pages = new Array();
4601
+ regions = new Array();
4575
4602
  constructor(atlasText) {
4576
- this.pages = new Array();
4577
- this.regions = new Array();
4578
4603
  let reader = new TextureAtlasReader(atlasText);
4579
4604
  let entry = new Array(4);
4580
4605
  let pageFields = {};
@@ -4722,15 +4747,15 @@ var spine = (() => {
4722
4747
  page.setTexture(assetManager.get(pathPrefix + page.name));
4723
4748
  }
4724
4749
  dispose() {
4725
- var _a;
4726
4750
  for (let i = 0; i < this.pages.length; i++) {
4727
- (_a = this.pages[i].texture) == null ? void 0 : _a.dispose();
4751
+ this.pages[i].texture?.dispose();
4728
4752
  }
4729
4753
  }
4730
4754
  };
4731
4755
  var TextureAtlasReader = class {
4756
+ lines;
4757
+ index = 0;
4732
4758
  constructor(text) {
4733
- this.index = 0;
4734
4759
  this.lines = text.split(/\r\n|\r|\n/);
4735
4760
  }
4736
4761
  readLine() {
@@ -4762,16 +4787,17 @@ var spine = (() => {
4762
4787
  }
4763
4788
  };
4764
4789
  var TextureAtlasPage = class {
4790
+ name;
4791
+ minFilter = 9728 /* Nearest */;
4792
+ magFilter = 9728 /* Nearest */;
4793
+ uWrap = 33071 /* ClampToEdge */;
4794
+ vWrap = 33071 /* ClampToEdge */;
4795
+ texture = null;
4796
+ width = 0;
4797
+ height = 0;
4798
+ pma = false;
4799
+ regions = new Array();
4765
4800
  constructor(name) {
4766
- this.minFilter = 9728 /* Nearest */;
4767
- this.magFilter = 9728 /* Nearest */;
4768
- this.uWrap = 33071 /* ClampToEdge */;
4769
- this.vWrap = 33071 /* ClampToEdge */;
4770
- this.texture = null;
4771
- this.width = 0;
4772
- this.height = 0;
4773
- this.pma = false;
4774
- this.regions = new Array();
4775
4801
  this.name = name;
4776
4802
  }
4777
4803
  setTexture(texture) {
@@ -4783,18 +4809,20 @@ var spine = (() => {
4783
4809
  }
4784
4810
  };
4785
4811
  var TextureAtlasRegion = class extends TextureRegion {
4812
+ page;
4813
+ name;
4814
+ x = 0;
4815
+ y = 0;
4816
+ offsetX = 0;
4817
+ offsetY = 0;
4818
+ originalWidth = 0;
4819
+ originalHeight = 0;
4820
+ index = 0;
4821
+ degrees = 0;
4822
+ names = null;
4823
+ values = null;
4786
4824
  constructor(page, name) {
4787
4825
  super();
4788
- this.x = 0;
4789
- this.y = 0;
4790
- this.offsetX = 0;
4791
- this.offsetY = 0;
4792
- this.originalWidth = 0;
4793
- this.originalHeight = 0;
4794
- this.index = 0;
4795
- this.degrees = 0;
4796
- this.names = null;
4797
- this.values = null;
4798
4826
  this.page = page;
4799
4827
  this.name = name;
4800
4828
  page.regions.push(this);
@@ -4803,31 +4831,33 @@ var spine = (() => {
4803
4831
 
4804
4832
  // spine-core/src/attachments/MeshAttachment.ts
4805
4833
  var MeshAttachment = class extends VertexAttachment {
4834
+ region = null;
4835
+ /** The name of the texture region for this attachment. */
4836
+ path;
4837
+ /** The UV pair for each vertex, normalized within the texture region. */
4838
+ regionUVs = [];
4839
+ /** The UV pair for each vertex, normalized within the entire texture.
4840
+ *
4841
+ * See {@link #updateUVs}. */
4842
+ uvs = [];
4843
+ /** Triplets of vertex indices which describe the mesh's triangulation. */
4844
+ triangles = [];
4845
+ /** The color to tint the mesh. */
4846
+ color = new Color(1, 1, 1, 1);
4847
+ /** The width of the mesh's image. Available only when nonessential data was exported. */
4848
+ width = 0;
4849
+ /** The height of the mesh's image. Available only when nonessential data was exported. */
4850
+ height = 0;
4851
+ /** The number of entries at the beginning of {@link #vertices} that make up the mesh hull. */
4852
+ hullLength = 0;
4853
+ /** Vertex index pairs describing edges for controling triangulation. Mesh triangles will never cross edges. Only available if
4854
+ * nonessential data was exported. Triangulation is not performed at runtime. */
4855
+ edges = [];
4856
+ parentMesh = null;
4857
+ sequence = null;
4858
+ tempColor = new Color(0, 0, 0, 0);
4806
4859
  constructor(name, path) {
4807
4860
  super(name);
4808
- this.region = null;
4809
- /** The UV pair for each vertex, normalized within the texture region. */
4810
- this.regionUVs = [];
4811
- /** The UV pair for each vertex, normalized within the entire texture.
4812
- *
4813
- * See {@link #updateUVs}. */
4814
- this.uvs = [];
4815
- /** Triplets of vertex indices which describe the mesh's triangulation. */
4816
- this.triangles = [];
4817
- /** The color to tint the mesh. */
4818
- this.color = new Color(1, 1, 1, 1);
4819
- /** The width of the mesh's image. Available only when nonessential data was exported. */
4820
- this.width = 0;
4821
- /** The height of the mesh's image. Available only when nonessential data was exported. */
4822
- this.height = 0;
4823
- /** The number of entries at the beginning of {@link #vertices} that make up the mesh hull. */
4824
- this.hullLength = 0;
4825
- /** Vertex index pairs describing edges for controling triangulation. Mesh triangles will never cross edges. Only available if
4826
- * nonessential data was exported. Triangulation is not performed at runtime. */
4827
- this.edges = [];
4828
- this.parentMesh = null;
4829
- this.sequence = null;
4830
- this.tempColor = new Color(0, 0, 0, 0);
4831
4861
  this.path = path;
4832
4862
  }
4833
4863
  /** Calculates {@link #uvs} using the {@link #regionUVs} and region. Must be called if the region, the region's properties, or
@@ -4954,18 +4984,18 @@ var spine = (() => {
4954
4984
 
4955
4985
  // spine-core/src/attachments/PathAttachment.ts
4956
4986
  var PathAttachment = class extends VertexAttachment {
4987
+ /** The lengths along the path in the setup pose from the start of the path to the end of each Bezier curve. */
4988
+ lengths = [];
4989
+ /** If true, the start and end knots are connected. */
4990
+ closed = false;
4991
+ /** If true, additional calculations are performed to make calculating positions along the path more accurate. If false, fewer
4992
+ * calculations are performed but calculating positions along the path is less accurate. */
4993
+ constantSpeed = false;
4994
+ /** The color of the path as it was in Spine. Available only when nonessential data was exported. Paths are not usually
4995
+ * rendered at runtime. */
4996
+ color = new Color(1, 1, 1, 1);
4957
4997
  constructor(name) {
4958
4998
  super(name);
4959
- /** The lengths along the path in the setup pose from the start of the path to the end of each Bezier curve. */
4960
- this.lengths = [];
4961
- /** If true, the start and end knots are connected. */
4962
- this.closed = false;
4963
- /** If true, additional calculations are performed to make calculating positions along the path more accurate. If false, fewer
4964
- * calculations are performed but calculating positions along the path is less accurate. */
4965
- this.constantSpeed = false;
4966
- /** The color of the path as it was in Spine. Available only when nonessential data was exported. Paths are not usually
4967
- * rendered at runtime. */
4968
- this.color = new Color(1, 1, 1, 1);
4969
4999
  }
4970
5000
  copy() {
4971
5001
  let copy = new PathAttachment(this.name);
@@ -4981,14 +5011,14 @@ var spine = (() => {
4981
5011
 
4982
5012
  // spine-core/src/attachments/PointAttachment.ts
4983
5013
  var PointAttachment = class extends VertexAttachment {
5014
+ x = 0;
5015
+ y = 0;
5016
+ rotation = 0;
5017
+ /** The color of the point attachment as it was in Spine. Available only when nonessential data was exported. Point attachments
5018
+ * are not usually rendered at runtime. */
5019
+ color = new Color(0.38, 0.94, 0, 1);
4984
5020
  constructor(name) {
4985
5021
  super(name);
4986
- this.x = 0;
4987
- this.y = 0;
4988
- this.rotation = 0;
4989
- /** The color of the point attachment as it was in Spine. Available only when nonessential data was exported. Point attachments
4990
- * are not usually rendered at runtime. */
4991
- this.color = new Color(0.38, 0.94, 0, 1);
4992
5022
  }
4993
5023
  computeWorldPosition(bone, point) {
4994
5024
  point.x = this.x * bone.a + this.y * bone.b + bone.worldX;
@@ -5013,32 +5043,34 @@ var spine = (() => {
5013
5043
 
5014
5044
  // spine-core/src/attachments/RegionAttachment.ts
5015
5045
  var _RegionAttachment = class extends Attachment {
5046
+ /** The local x translation. */
5047
+ x = 0;
5048
+ /** The local y translation. */
5049
+ y = 0;
5050
+ /** The local scaleX. */
5051
+ scaleX = 1;
5052
+ /** The local scaleY. */
5053
+ scaleY = 1;
5054
+ /** The local rotation. */
5055
+ rotation = 0;
5056
+ /** The width of the region attachment in Spine. */
5057
+ width = 0;
5058
+ /** The height of the region attachment in Spine. */
5059
+ height = 0;
5060
+ /** The color to tint the region attachment. */
5061
+ color = new Color(1, 1, 1, 1);
5062
+ /** The name of the texture region for this attachment. */
5063
+ path;
5064
+ region = null;
5065
+ sequence = null;
5066
+ /** For each of the 4 vertices, a pair of <code>x,y</code> values that is the local position of the vertex.
5067
+ *
5068
+ * See {@link #updateOffset()}. */
5069
+ offset = Utils.newFloatArray(8);
5070
+ uvs = Utils.newFloatArray(8);
5071
+ tempColor = new Color(1, 1, 1, 1);
5016
5072
  constructor(name, path) {
5017
5073
  super(name);
5018
- /** The local x translation. */
5019
- this.x = 0;
5020
- /** The local y translation. */
5021
- this.y = 0;
5022
- /** The local scaleX. */
5023
- this.scaleX = 1;
5024
- /** The local scaleY. */
5025
- this.scaleY = 1;
5026
- /** The local rotation. */
5027
- this.rotation = 0;
5028
- /** The width of the region attachment in Spine. */
5029
- this.width = 0;
5030
- /** The height of the region attachment in Spine. */
5031
- this.height = 0;
5032
- /** The color to tint the region attachment. */
5033
- this.color = new Color(1, 1, 1, 1);
5034
- this.region = null;
5035
- this.sequence = null;
5036
- /** For each of the 4 vertices, a pair of <code>x,y</code> values that is the local position of the vertex.
5037
- *
5038
- * See {@link #updateOffset()}. */
5039
- this.offset = Utils.newFloatArray(8);
5040
- this.uvs = Utils.newFloatArray(8);
5041
- this.tempColor = new Color(1, 1, 1, 1);
5042
5074
  this.path = path;
5043
5075
  }
5044
5076
  /** Calculates the {@link #offset} using the region settings. Must be called after changing region settings. */
@@ -5159,41 +5191,42 @@ var spine = (() => {
5159
5191
  }
5160
5192
  };
5161
5193
  var RegionAttachment = _RegionAttachment;
5162
- RegionAttachment.X1 = 0;
5163
- RegionAttachment.Y1 = 1;
5164
- RegionAttachment.C1R = 2;
5165
- RegionAttachment.C1G = 3;
5166
- RegionAttachment.C1B = 4;
5167
- RegionAttachment.C1A = 5;
5168
- RegionAttachment.U1 = 6;
5169
- RegionAttachment.V1 = 7;
5170
- RegionAttachment.X2 = 8;
5171
- RegionAttachment.Y2 = 9;
5172
- RegionAttachment.C2R = 10;
5173
- RegionAttachment.C2G = 11;
5174
- RegionAttachment.C2B = 12;
5175
- RegionAttachment.C2A = 13;
5176
- RegionAttachment.U2 = 14;
5177
- RegionAttachment.V2 = 15;
5178
- RegionAttachment.X3 = 16;
5179
- RegionAttachment.Y3 = 17;
5180
- RegionAttachment.C3R = 18;
5181
- RegionAttachment.C3G = 19;
5182
- RegionAttachment.C3B = 20;
5183
- RegionAttachment.C3A = 21;
5184
- RegionAttachment.U3 = 22;
5185
- RegionAttachment.V3 = 23;
5186
- RegionAttachment.X4 = 24;
5187
- RegionAttachment.Y4 = 25;
5188
- RegionAttachment.C4R = 26;
5189
- RegionAttachment.C4G = 27;
5190
- RegionAttachment.C4B = 28;
5191
- RegionAttachment.C4A = 29;
5192
- RegionAttachment.U4 = 30;
5193
- RegionAttachment.V4 = 31;
5194
+ __publicField(RegionAttachment, "X1", 0);
5195
+ __publicField(RegionAttachment, "Y1", 1);
5196
+ __publicField(RegionAttachment, "C1R", 2);
5197
+ __publicField(RegionAttachment, "C1G", 3);
5198
+ __publicField(RegionAttachment, "C1B", 4);
5199
+ __publicField(RegionAttachment, "C1A", 5);
5200
+ __publicField(RegionAttachment, "U1", 6);
5201
+ __publicField(RegionAttachment, "V1", 7);
5202
+ __publicField(RegionAttachment, "X2", 8);
5203
+ __publicField(RegionAttachment, "Y2", 9);
5204
+ __publicField(RegionAttachment, "C2R", 10);
5205
+ __publicField(RegionAttachment, "C2G", 11);
5206
+ __publicField(RegionAttachment, "C2B", 12);
5207
+ __publicField(RegionAttachment, "C2A", 13);
5208
+ __publicField(RegionAttachment, "U2", 14);
5209
+ __publicField(RegionAttachment, "V2", 15);
5210
+ __publicField(RegionAttachment, "X3", 16);
5211
+ __publicField(RegionAttachment, "Y3", 17);
5212
+ __publicField(RegionAttachment, "C3R", 18);
5213
+ __publicField(RegionAttachment, "C3G", 19);
5214
+ __publicField(RegionAttachment, "C3B", 20);
5215
+ __publicField(RegionAttachment, "C3A", 21);
5216
+ __publicField(RegionAttachment, "U3", 22);
5217
+ __publicField(RegionAttachment, "V3", 23);
5218
+ __publicField(RegionAttachment, "X4", 24);
5219
+ __publicField(RegionAttachment, "Y4", 25);
5220
+ __publicField(RegionAttachment, "C4R", 26);
5221
+ __publicField(RegionAttachment, "C4G", 27);
5222
+ __publicField(RegionAttachment, "C4B", 28);
5223
+ __publicField(RegionAttachment, "C4A", 29);
5224
+ __publicField(RegionAttachment, "U4", 30);
5225
+ __publicField(RegionAttachment, "V4", 31);
5194
5226
 
5195
5227
  // spine-core/src/AtlasAttachmentLoader.ts
5196
5228
  var AtlasAttachmentLoader = class {
5229
+ atlas;
5197
5230
  constructor(atlas) {
5198
5231
  this.atlas = atlas;
5199
5232
  }
@@ -5247,36 +5280,38 @@ var spine = (() => {
5247
5280
 
5248
5281
  // spine-core/src/BoneData.ts
5249
5282
  var BoneData = class {
5283
+ /** The index of the bone in {@link Skeleton#getBones()}. */
5284
+ index = 0;
5285
+ /** The name of the bone, which is unique across all bones in the skeleton. */
5286
+ name;
5287
+ /** @returns May be null. */
5288
+ parent = null;
5289
+ /** The bone's length. */
5290
+ length = 0;
5291
+ /** The local x translation. */
5292
+ x = 0;
5293
+ /** The local y translation. */
5294
+ y = 0;
5295
+ /** The local rotation. */
5296
+ rotation = 0;
5297
+ /** The local scaleX. */
5298
+ scaleX = 1;
5299
+ /** The local scaleY. */
5300
+ scaleY = 1;
5301
+ /** The local shearX. */
5302
+ shearX = 0;
5303
+ /** The local shearX. */
5304
+ shearY = 0;
5305
+ /** The transform mode for how parent world transforms affect this bone. */
5306
+ transformMode = TransformMode.Normal;
5307
+ /** When true, {@link Skeleton#updateWorldTransform()} only updates this bone if the {@link Skeleton#skin} contains this
5308
+ * bone.
5309
+ * @see Skin#bones */
5310
+ skinRequired = false;
5311
+ /** The color of the bone as it was in Spine. Available only when nonessential data was exported. Bones are not usually
5312
+ * rendered at runtime. */
5313
+ color = new Color();
5250
5314
  constructor(index, name, parent) {
5251
- /** The index of the bone in {@link Skeleton#getBones()}. */
5252
- this.index = 0;
5253
- /** @returns May be null. */
5254
- this.parent = null;
5255
- /** The bone's length. */
5256
- this.length = 0;
5257
- /** The local x translation. */
5258
- this.x = 0;
5259
- /** The local y translation. */
5260
- this.y = 0;
5261
- /** The local rotation. */
5262
- this.rotation = 0;
5263
- /** The local scaleX. */
5264
- this.scaleX = 1;
5265
- /** The local scaleY. */
5266
- this.scaleY = 1;
5267
- /** The local shearX. */
5268
- this.shearX = 0;
5269
- /** The local shearX. */
5270
- this.shearY = 0;
5271
- /** The transform mode for how parent world transforms affect this bone. */
5272
- this.transformMode = TransformMode.Normal;
5273
- /** When true, {@link Skeleton#updateWorldTransform()} only updates this bone if the {@link Skeleton#skin} contains this
5274
- * bone.
5275
- * @see Skin#bones */
5276
- this.skinRequired = false;
5277
- /** The color of the bone as it was in Spine. Available only when nonessential data was exported. Bones are not usually
5278
- * rendered at runtime. */
5279
- this.color = new Color();
5280
5315
  if (index < 0)
5281
5316
  throw new Error("index must be >= 0.");
5282
5317
  if (!name)
@@ -5297,54 +5332,58 @@ var spine = (() => {
5297
5332
 
5298
5333
  // spine-core/src/Bone.ts
5299
5334
  var Bone = class {
5335
+ /** The bone's setup pose data. */
5336
+ data;
5337
+ /** The skeleton this bone belongs to. */
5338
+ skeleton;
5339
+ /** The parent bone, or null if this is the root bone. */
5340
+ parent = null;
5341
+ /** The immediate children of this bone. */
5342
+ children = new Array();
5343
+ /** The local x translation. */
5344
+ x = 0;
5345
+ /** The local y translation. */
5346
+ y = 0;
5347
+ /** The local rotation in degrees, counter clockwise. */
5348
+ rotation = 0;
5349
+ /** The local scaleX. */
5350
+ scaleX = 0;
5351
+ /** The local scaleY. */
5352
+ scaleY = 0;
5353
+ /** The local shearX. */
5354
+ shearX = 0;
5355
+ /** The local shearY. */
5356
+ shearY = 0;
5357
+ /** The applied local x translation. */
5358
+ ax = 0;
5359
+ /** The applied local y translation. */
5360
+ ay = 0;
5361
+ /** The applied local rotation in degrees, counter clockwise. */
5362
+ arotation = 0;
5363
+ /** The applied local scaleX. */
5364
+ ascaleX = 0;
5365
+ /** The applied local scaleY. */
5366
+ ascaleY = 0;
5367
+ /** The applied local shearX. */
5368
+ ashearX = 0;
5369
+ /** The applied local shearY. */
5370
+ ashearY = 0;
5371
+ /** Part of the world transform matrix for the X axis. If changed, {@link #updateAppliedTransform()} should be called. */
5372
+ a = 0;
5373
+ /** Part of the world transform matrix for the Y axis. If changed, {@link #updateAppliedTransform()} should be called. */
5374
+ b = 0;
5375
+ /** Part of the world transform matrix for the X axis. If changed, {@link #updateAppliedTransform()} should be called. */
5376
+ c = 0;
5377
+ /** Part of the world transform matrix for the Y axis. If changed, {@link #updateAppliedTransform()} should be called. */
5378
+ d = 0;
5379
+ /** The world X position. If changed, {@link #updateAppliedTransform()} should be called. */
5380
+ worldY = 0;
5381
+ /** The world Y position. If changed, {@link #updateAppliedTransform()} should be called. */
5382
+ worldX = 0;
5383
+ sorted = false;
5384
+ active = false;
5300
5385
  /** @param parent May be null. */
5301
5386
  constructor(data, skeleton, parent) {
5302
- /** The parent bone, or null if this is the root bone. */
5303
- this.parent = null;
5304
- /** The immediate children of this bone. */
5305
- this.children = new Array();
5306
- /** The local x translation. */
5307
- this.x = 0;
5308
- /** The local y translation. */
5309
- this.y = 0;
5310
- /** The local rotation in degrees, counter clockwise. */
5311
- this.rotation = 0;
5312
- /** The local scaleX. */
5313
- this.scaleX = 0;
5314
- /** The local scaleY. */
5315
- this.scaleY = 0;
5316
- /** The local shearX. */
5317
- this.shearX = 0;
5318
- /** The local shearY. */
5319
- this.shearY = 0;
5320
- /** The applied local x translation. */
5321
- this.ax = 0;
5322
- /** The applied local y translation. */
5323
- this.ay = 0;
5324
- /** The applied local rotation in degrees, counter clockwise. */
5325
- this.arotation = 0;
5326
- /** The applied local scaleX. */
5327
- this.ascaleX = 0;
5328
- /** The applied local scaleY. */
5329
- this.ascaleY = 0;
5330
- /** The applied local shearX. */
5331
- this.ashearX = 0;
5332
- /** The applied local shearY. */
5333
- this.ashearY = 0;
5334
- /** Part of the world transform matrix for the X axis. If changed, {@link #updateAppliedTransform()} should be called. */
5335
- this.a = 0;
5336
- /** Part of the world transform matrix for the Y axis. If changed, {@link #updateAppliedTransform()} should be called. */
5337
- this.b = 0;
5338
- /** Part of the world transform matrix for the X axis. If changed, {@link #updateAppliedTransform()} should be called. */
5339
- this.c = 0;
5340
- /** Part of the world transform matrix for the Y axis. If changed, {@link #updateAppliedTransform()} should be called. */
5341
- this.d = 0;
5342
- /** The world X position. If changed, {@link #updateAppliedTransform()} should be called. */
5343
- this.worldY = 0;
5344
- /** The world Y position. If changed, {@link #updateAppliedTransform()} should be called. */
5345
- this.worldX = 0;
5346
- this.sorted = false;
5347
- this.active = false;
5348
5387
  if (!data)
5349
5388
  throw new Error("data cannot be null.");
5350
5389
  if (!skeleton)
@@ -5644,12 +5683,14 @@ var spine = (() => {
5644
5683
 
5645
5684
  // spine-core/src/AssetManagerBase.ts
5646
5685
  var AssetManagerBase = class {
5686
+ pathPrefix = "";
5687
+ textureLoader;
5688
+ downloader;
5689
+ assets = {};
5690
+ errors = {};
5691
+ toLoad = 0;
5692
+ loaded = 0;
5647
5693
  constructor(textureLoader, pathPrefix = "", downloader = new Downloader()) {
5648
- this.pathPrefix = "";
5649
- this.assets = {};
5650
- this.errors = {};
5651
- this.toLoad = 0;
5652
- this.loaded = 0;
5653
5694
  this.textureLoader = textureLoader;
5654
5695
  this.pathPrefix = pathPrefix;
5655
5696
  this.downloader = downloader;
@@ -5834,10 +5875,8 @@ var spine = (() => {
5834
5875
  }
5835
5876
  };
5836
5877
  var Downloader = class {
5837
- constructor() {
5838
- this.callbacks = {};
5839
- this.rawDataUris = {};
5840
- }
5878
+ callbacks = {};
5879
+ rawDataUris = {};
5841
5880
  dataUriToString(dataUri) {
5842
5881
  if (!dataUri.startsWith("data:")) {
5843
5882
  throw new Error("Not a data URI.");
@@ -5944,13 +5983,14 @@ var spine = (() => {
5944
5983
 
5945
5984
  // spine-core/src/Event.ts
5946
5985
  var Event = class {
5986
+ data;
5987
+ intValue = 0;
5988
+ floatValue = 0;
5989
+ stringValue = null;
5990
+ time = 0;
5991
+ volume = 0;
5992
+ balance = 0;
5947
5993
  constructor(time, data) {
5948
- this.intValue = 0;
5949
- this.floatValue = 0;
5950
- this.stringValue = null;
5951
- this.time = 0;
5952
- this.volume = 0;
5953
- this.balance = 0;
5954
5994
  if (!data)
5955
5995
  throw new Error("data cannot be null.");
5956
5996
  this.time = time;
@@ -5960,32 +6000,39 @@ var spine = (() => {
5960
6000
 
5961
6001
  // spine-core/src/EventData.ts
5962
6002
  var EventData = class {
6003
+ name;
6004
+ intValue = 0;
6005
+ floatValue = 0;
6006
+ stringValue = null;
6007
+ audioPath = null;
6008
+ volume = 0;
6009
+ balance = 0;
5963
6010
  constructor(name) {
5964
- this.intValue = 0;
5965
- this.floatValue = 0;
5966
- this.stringValue = null;
5967
- this.audioPath = null;
5968
- this.volume = 0;
5969
- this.balance = 0;
5970
6011
  this.name = name;
5971
6012
  }
5972
6013
  };
5973
6014
 
5974
6015
  // spine-core/src/IkConstraint.ts
5975
6016
  var IkConstraint = class {
6017
+ /** The IK constraint's setup pose data. */
6018
+ data;
6019
+ /** The bones that will be modified by this IK constraint. */
6020
+ bones;
6021
+ /** The bone that is the IK target. */
6022
+ target;
6023
+ /** Controls the bend direction of the IK bones, either 1 or -1. */
6024
+ bendDirection = 0;
6025
+ /** When true and only a single bone is being constrained, if the target is too close, the bone is scaled to reach it. */
6026
+ compress = false;
6027
+ /** When true, if the target is out of range, the parent bone is scaled to reach it. If more than one bone is being constrained
6028
+ * and the parent bone has local nonuniform scale, stretch is not applied. */
6029
+ stretch = false;
6030
+ /** A percentage (0-1) that controls the mix between the constrained and unconstrained rotations. */
6031
+ mix = 1;
6032
+ /** For two bone IK, the distance from the maximum reach of the bones that rotation will slow. */
6033
+ softness = 0;
6034
+ active = false;
5976
6035
  constructor(data, skeleton) {
5977
- /** Controls the bend direction of the IK bones, either 1 or -1. */
5978
- this.bendDirection = 0;
5979
- /** When true and only a single bone is being constrained, if the target is too close, the bone is scaled to reach it. */
5980
- this.compress = false;
5981
- /** When true, if the target is out of range, the parent bone is scaled to reach it. If more than one bone is being constrained
5982
- * and the parent bone has local nonuniform scale, stretch is not applied. */
5983
- this.stretch = false;
5984
- /** A percentage (0-1) that controls the mix between the constrained and unconstrained rotations. */
5985
- this.mix = 1;
5986
- /** For two bone IK, the distance from the maximum reach of the bones that rotation will slow. */
5987
- this.softness = 0;
5988
- this.active = false;
5989
6036
  if (!data)
5990
6037
  throw new Error("data cannot be null.");
5991
6038
  if (!skeleton)
@@ -6243,27 +6290,10 @@ var spine = (() => {
6243
6290
 
6244
6291
  // spine-core/src/IkConstraintData.ts
6245
6292
  var IkConstraintData = class extends ConstraintData {
6246
- constructor(name) {
6247
- super(name, 0, false);
6248
- /** The bones that are constrained by this IK constraint. */
6249
- this.bones = new Array();
6250
- /** The bone that is the IK target. */
6251
- this._target = null;
6252
- /** Controls the bend direction of the IK bones, either 1 or -1. */
6253
- this.bendDirection = 1;
6254
- /** When true and only a single bone is being constrained, if the target is too close, the bone is scaled to reach it. */
6255
- this.compress = false;
6256
- /** When true, if the target is out of range, the parent bone is scaled to reach it. If more than one bone is being constrained
6257
- * and the parent bone has local nonuniform scale, stretch is not applied. */
6258
- this.stretch = false;
6259
- /** When true, only a single bone is being constrained, and {@link #getCompress()} or {@link #getStretch()} is used, the bone
6260
- * is scaled on both the X and Y axes. */
6261
- this.uniform = false;
6262
- /** A percentage (0-1) that controls the mix between the constrained and unconstrained rotations. */
6263
- this.mix = 1;
6264
- /** For two bone IK, the distance from the maximum reach of the bones that rotation will slow. */
6265
- this.softness = 0;
6266
- }
6293
+ /** The bones that are constrained by this IK constraint. */
6294
+ bones = new Array();
6295
+ /** The bone that is the IK target. */
6296
+ _target = null;
6267
6297
  set target(boneData) {
6268
6298
  this._target = boneData;
6269
6299
  }
@@ -6273,32 +6303,31 @@ var spine = (() => {
6273
6303
  else
6274
6304
  return this._target;
6275
6305
  }
6306
+ /** Controls the bend direction of the IK bones, either 1 or -1. */
6307
+ bendDirection = 1;
6308
+ /** When true and only a single bone is being constrained, if the target is too close, the bone is scaled to reach it. */
6309
+ compress = false;
6310
+ /** When true, if the target is out of range, the parent bone is scaled to reach it. If more than one bone is being constrained
6311
+ * and the parent bone has local nonuniform scale, stretch is not applied. */
6312
+ stretch = false;
6313
+ /** When true, only a single bone is being constrained, and {@link #getCompress()} or {@link #getStretch()} is used, the bone
6314
+ * is scaled on both the X and Y axes. */
6315
+ uniform = false;
6316
+ /** A percentage (0-1) that controls the mix between the constrained and unconstrained rotations. */
6317
+ mix = 1;
6318
+ /** For two bone IK, the distance from the maximum reach of the bones that rotation will slow. */
6319
+ softness = 0;
6320
+ constructor(name) {
6321
+ super(name, 0, false);
6322
+ }
6276
6323
  };
6277
6324
 
6278
6325
  // spine-core/src/PathConstraintData.ts
6279
6326
  var PathConstraintData = class extends ConstraintData {
6280
- constructor(name) {
6281
- super(name, 0, false);
6282
- /** The bones that will be modified by this path constraint. */
6283
- this.bones = new Array();
6284
- /** The slot whose path attachment will be used to constrained the bones. */
6285
- this._target = null;
6286
- /** The mode for positioning the first bone on the path. */
6287
- this.positionMode = PositionMode.Fixed;
6288
- /** The mode for positioning the bones after the first bone on the path. */
6289
- this.spacingMode = SpacingMode.Fixed;
6290
- /** The mode for adjusting the rotation of the bones. */
6291
- this.rotateMode = RotateMode.Chain;
6292
- /** An offset added to the constrained bone rotation. */
6293
- this.offsetRotation = 0;
6294
- /** The position along the path. */
6295
- this.position = 0;
6296
- /** The spacing between bones. */
6297
- this.spacing = 0;
6298
- this.mixRotate = 0;
6299
- this.mixX = 0;
6300
- this.mixY = 0;
6301
- }
6327
+ /** The bones that will be modified by this path constraint. */
6328
+ bones = new Array();
6329
+ /** The slot whose path attachment will be used to constrained the bones. */
6330
+ _target = null;
6302
6331
  set target(slotData) {
6303
6332
  this._target = slotData;
6304
6333
  }
@@ -6308,6 +6337,24 @@ var spine = (() => {
6308
6337
  else
6309
6338
  return this._target;
6310
6339
  }
6340
+ /** The mode for positioning the first bone on the path. */
6341
+ positionMode = PositionMode.Fixed;
6342
+ /** The mode for positioning the bones after the first bone on the path. */
6343
+ spacingMode = SpacingMode.Fixed;
6344
+ /** The mode for adjusting the rotation of the bones. */
6345
+ rotateMode = RotateMode.Chain;
6346
+ /** An offset added to the constrained bone rotation. */
6347
+ offsetRotation = 0;
6348
+ /** The position along the path. */
6349
+ position = 0;
6350
+ /** The spacing between bones. */
6351
+ spacing = 0;
6352
+ mixRotate = 0;
6353
+ mixX = 0;
6354
+ mixY = 0;
6355
+ constructor(name) {
6356
+ super(name, 0, false);
6357
+ }
6311
6358
  };
6312
6359
  var PositionMode = /* @__PURE__ */ ((PositionMode2) => {
6313
6360
  PositionMode2[PositionMode2["Fixed"] = 0] = "Fixed";
@@ -6330,21 +6377,27 @@ var spine = (() => {
6330
6377
 
6331
6378
  // spine-core/src/PathConstraint.ts
6332
6379
  var _PathConstraint = class {
6380
+ /** The path constraint's setup pose data. */
6381
+ data;
6382
+ /** The bones that will be modified by this path constraint. */
6383
+ bones;
6384
+ /** The slot whose path attachment will be used to constrained the bones. */
6385
+ target;
6386
+ /** The position along the path. */
6387
+ position = 0;
6388
+ /** The spacing between bones. */
6389
+ spacing = 0;
6390
+ mixRotate = 0;
6391
+ mixX = 0;
6392
+ mixY = 0;
6393
+ spaces = new Array();
6394
+ positions = new Array();
6395
+ world = new Array();
6396
+ curves = new Array();
6397
+ lengths = new Array();
6398
+ segments = new Array();
6399
+ active = false;
6333
6400
  constructor(data, skeleton) {
6334
- /** The position along the path. */
6335
- this.position = 0;
6336
- /** The spacing between bones. */
6337
- this.spacing = 0;
6338
- this.mixRotate = 0;
6339
- this.mixX = 0;
6340
- this.mixY = 0;
6341
- this.spaces = new Array();
6342
- this.positions = new Array();
6343
- this.world = new Array();
6344
- this.curves = new Array();
6345
- this.lengths = new Array();
6346
- this.segments = new Array();
6347
- this.active = false;
6348
6401
  if (!data)
6349
6402
  throw new Error("data cannot be null.");
6350
6403
  if (!skeleton)
@@ -6764,27 +6817,34 @@ var spine = (() => {
6764
6817
  }
6765
6818
  };
6766
6819
  var PathConstraint = _PathConstraint;
6767
- PathConstraint.NONE = -1;
6768
- PathConstraint.BEFORE = -2;
6769
- PathConstraint.AFTER = -3;
6770
- PathConstraint.epsilon = 1e-5;
6820
+ __publicField(PathConstraint, "NONE", -1);
6821
+ __publicField(PathConstraint, "BEFORE", -2);
6822
+ __publicField(PathConstraint, "AFTER", -3);
6823
+ __publicField(PathConstraint, "epsilon", 1e-5);
6771
6824
 
6772
6825
  // spine-core/src/Slot.ts
6773
6826
  var Slot = class {
6827
+ /** The slot's setup pose data. */
6828
+ data;
6829
+ /** The bone this slot belongs to. */
6830
+ bone;
6831
+ /** The color used to tint the slot's attachment. If {@link #getDarkColor()} is set, this is used as the light color for two
6832
+ * color tinting. */
6833
+ color;
6834
+ /** The dark color used to tint the slot's attachment for two color tinting, or null if two color tinting is not used. The dark
6835
+ * color's alpha is not used. */
6836
+ darkColor = null;
6837
+ attachment = null;
6838
+ attachmentState = 0;
6839
+ /** The index of the texture region to display when the slot's attachment has a {@link Sequence}. -1 represents the
6840
+ * {@link Sequence#getSetupIndex()}. */
6841
+ sequenceIndex = -1;
6842
+ /** Values to deform the slot's attachment. For an unweighted mesh, the entries are local positions for each vertex. For a
6843
+ * weighted mesh, the entries are an offset for each vertex which will be added to the mesh's local vertex positions.
6844
+ *
6845
+ * See {@link VertexAttachment#computeWorldVertices()} and {@link DeformTimeline}. */
6846
+ deform = new Array();
6774
6847
  constructor(data, bone) {
6775
- /** The dark color used to tint the slot's attachment for two color tinting, or null if two color tinting is not used. The dark
6776
- * color's alpha is not used. */
6777
- this.darkColor = null;
6778
- this.attachment = null;
6779
- this.attachmentState = 0;
6780
- /** The index of the texture region to display when the slot's attachment has a {@link Sequence}. -1 represents the
6781
- * {@link Sequence#getSetupIndex()}. */
6782
- this.sequenceIndex = -1;
6783
- /** Values to deform the slot's attachment. For an unweighted mesh, the entries are local positions for each vertex. For a
6784
- * weighted mesh, the entries are an offset for each vertex which will be added to the mesh's local vertex positions.
6785
- *
6786
- * See {@link VertexAttachment#computeWorldVertices()} and {@link DeformTimeline}. */
6787
- this.deform = new Array();
6788
6848
  if (!data)
6789
6849
  throw new Error("data cannot be null.");
6790
6850
  if (!bone)
@@ -6831,15 +6891,21 @@ var spine = (() => {
6831
6891
 
6832
6892
  // spine-core/src/TransformConstraint.ts
6833
6893
  var TransformConstraint = class {
6894
+ /** The transform constraint's setup pose data. */
6895
+ data;
6896
+ /** The bones that will be modified by this transform constraint. */
6897
+ bones;
6898
+ /** The target bone whose world transform will be copied to the constrained bones. */
6899
+ target;
6900
+ mixRotate = 0;
6901
+ mixX = 0;
6902
+ mixY = 0;
6903
+ mixScaleX = 0;
6904
+ mixScaleY = 0;
6905
+ mixShearY = 0;
6906
+ temp = new Vector2();
6907
+ active = false;
6834
6908
  constructor(data, skeleton) {
6835
- this.mixRotate = 0;
6836
- this.mixX = 0;
6837
- this.mixY = 0;
6838
- this.mixScaleX = 0;
6839
- this.mixScaleY = 0;
6840
- this.mixShearY = 0;
6841
- this.temp = new Vector2();
6842
- this.active = false;
6843
6909
  if (!data)
6844
6910
  throw new Error("data cannot be null.");
6845
6911
  if (!skeleton)
@@ -7045,21 +7111,43 @@ var spine = (() => {
7045
7111
 
7046
7112
  // spine-core/src/Skeleton.ts
7047
7113
  var _Skeleton = class {
7114
+ /** The skeleton's setup pose data. */
7115
+ data;
7116
+ /** The skeleton's bones, sorted parent first. The root bone is always the first bone. */
7117
+ bones;
7118
+ /** The skeleton's slots. */
7119
+ slots;
7120
+ /** The skeleton's slots in the order they should be drawn. The returned array may be modified to change the draw order. */
7121
+ drawOrder;
7122
+ /** The skeleton's IK constraints. */
7123
+ ikConstraints;
7124
+ /** The skeleton's transform constraints. */
7125
+ transformConstraints;
7126
+ /** The skeleton's path constraints. */
7127
+ pathConstraints;
7128
+ /** The list of bones and constraints, sorted in the order they should be updated, as computed by {@link #updateCache()}. */
7129
+ _updateCache = new Array();
7130
+ /** The skeleton's current skin. May be null. */
7131
+ skin = null;
7132
+ /** The color to tint all the skeleton's attachments. */
7133
+ color;
7134
+ /** Scales the entire skeleton on the X axis. This affects all bones, even if the bone's transform mode disallows scale
7135
+ * inheritance. */
7136
+ scaleX = 1;
7137
+ /** Scales the entire skeleton on the Y axis. This affects all bones, even if the bone's transform mode disallows scale
7138
+ * inheritance. */
7139
+ _scaleY = 1;
7140
+ get scaleY() {
7141
+ return _Skeleton.yDown ? -this._scaleY : this._scaleY;
7142
+ }
7143
+ set scaleY(scaleY) {
7144
+ this._scaleY = scaleY;
7145
+ }
7146
+ /** Sets the skeleton X position, which is added to the root bone worldX position. */
7147
+ x = 0;
7148
+ /** Sets the skeleton Y position, which is added to the root bone worldY position. */
7149
+ y = 0;
7048
7150
  constructor(data) {
7049
- /** The list of bones and constraints, sorted in the order they should be updated, as computed by {@link #updateCache()}. */
7050
- this._updateCache = new Array();
7051
- /** The skeleton's current skin. May be null. */
7052
- this.skin = null;
7053
- /** Scales the entire skeleton on the X axis. This affects all bones, even if the bone's transform mode disallows scale
7054
- * inheritance. */
7055
- this.scaleX = 1;
7056
- /** Scales the entire skeleton on the Y axis. This affects all bones, even if the bone's transform mode disallows scale
7057
- * inheritance. */
7058
- this._scaleY = 1;
7059
- /** Sets the skeleton X position, which is added to the root bone worldX position. */
7060
- this.x = 0;
7061
- /** Sets the skeleton Y position, which is added to the root bone worldY position. */
7062
- this.y = 0;
7063
7151
  if (!data)
7064
7152
  throw new Error("data cannot be null.");
7065
7153
  this.data = data;
@@ -7103,12 +7191,6 @@ var spine = (() => {
7103
7191
  this.color = new Color(1, 1, 1, 1);
7104
7192
  this.updateCache();
7105
7193
  }
7106
- get scaleY() {
7107
- return _Skeleton.yDown ? -this._scaleY : this._scaleY;
7108
- }
7109
- set scaleY(scaleY) {
7110
- this._scaleY = scaleY;
7111
- }
7112
7194
  /** Caches information about bones and constraints. Must be called if the {@link #getSkin()} is modified or if bones,
7113
7195
  * constraints, or weighted path attachments are added or removed. */
7114
7196
  updateCache() {
@@ -7585,55 +7667,53 @@ var spine = (() => {
7585
7667
  }
7586
7668
  };
7587
7669
  var Skeleton = _Skeleton;
7588
- Skeleton.yDown = false;
7670
+ __publicField(Skeleton, "yDown", false);
7589
7671
 
7590
7672
  // spine-core/src/SkeletonData.ts
7591
7673
  var SkeletonData = class {
7592
- constructor() {
7593
- /** The skeleton's name, which by default is the name of the skeleton data file, if possible. May be null. */
7594
- this.name = null;
7595
- /** The skeleton's bones, sorted parent first. The root bone is always the first bone. */
7596
- this.bones = new Array();
7597
- // Ordered parents first.
7598
- /** The skeleton's slots. */
7599
- this.slots = new Array();
7600
- // Setup pose draw order.
7601
- this.skins = new Array();
7602
- /** The skeleton's default skin. By default this skin contains all attachments that were not in a skin in Spine.
7603
- *
7604
- * See {@link Skeleton#getAttachmentByName()}.
7605
- * May be null. */
7606
- this.defaultSkin = null;
7607
- /** The skeleton's events. */
7608
- this.events = new Array();
7609
- /** The skeleton's animations. */
7610
- this.animations = new Array();
7611
- /** The skeleton's IK constraints. */
7612
- this.ikConstraints = new Array();
7613
- /** The skeleton's transform constraints. */
7614
- this.transformConstraints = new Array();
7615
- /** The skeleton's path constraints. */
7616
- this.pathConstraints = new Array();
7617
- /** The X coordinate of the skeleton's axis aligned bounding box in the setup pose. */
7618
- this.x = 0;
7619
- /** The Y coordinate of the skeleton's axis aligned bounding box in the setup pose. */
7620
- this.y = 0;
7621
- /** The width of the skeleton's axis aligned bounding box in the setup pose. */
7622
- this.width = 0;
7623
- /** The height of the skeleton's axis aligned bounding box in the setup pose. */
7624
- this.height = 0;
7625
- /** The Spine version used to export the skeleton data, or null. */
7626
- this.version = null;
7627
- /** The skeleton data hash. This value will change if any of the skeleton data has changed. May be null. */
7628
- this.hash = null;
7629
- // Nonessential
7630
- /** The dopesheet FPS in Spine. Available only when nonessential data was exported. */
7631
- this.fps = 0;
7632
- /** The path to the images directory as defined in Spine. Available only when nonessential data was exported. May be null. */
7633
- this.imagesPath = null;
7634
- /** The path to the audio directory as defined in Spine. Available only when nonessential data was exported. May be null. */
7635
- this.audioPath = null;
7636
- }
7674
+ /** The skeleton's name, which by default is the name of the skeleton data file, if possible. May be null. */
7675
+ name = null;
7676
+ /** The skeleton's bones, sorted parent first. The root bone is always the first bone. */
7677
+ bones = new Array();
7678
+ // Ordered parents first.
7679
+ /** The skeleton's slots. */
7680
+ slots = new Array();
7681
+ // Setup pose draw order.
7682
+ skins = new Array();
7683
+ /** The skeleton's default skin. By default this skin contains all attachments that were not in a skin in Spine.
7684
+ *
7685
+ * See {@link Skeleton#getAttachmentByName()}.
7686
+ * May be null. */
7687
+ defaultSkin = null;
7688
+ /** The skeleton's events. */
7689
+ events = new Array();
7690
+ /** The skeleton's animations. */
7691
+ animations = new Array();
7692
+ /** The skeleton's IK constraints. */
7693
+ ikConstraints = new Array();
7694
+ /** The skeleton's transform constraints. */
7695
+ transformConstraints = new Array();
7696
+ /** The skeleton's path constraints. */
7697
+ pathConstraints = new Array();
7698
+ /** The X coordinate of the skeleton's axis aligned bounding box in the setup pose. */
7699
+ x = 0;
7700
+ /** The Y coordinate of the skeleton's axis aligned bounding box in the setup pose. */
7701
+ y = 0;
7702
+ /** The width of the skeleton's axis aligned bounding box in the setup pose. */
7703
+ width = 0;
7704
+ /** The height of the skeleton's axis aligned bounding box in the setup pose. */
7705
+ height = 0;
7706
+ /** The Spine version used to export the skeleton data, or null. */
7707
+ version = null;
7708
+ /** The skeleton data hash. This value will change if any of the skeleton data has changed. May be null. */
7709
+ hash = null;
7710
+ // Nonessential
7711
+ /** The dopesheet FPS in Spine. Available only when nonessential data was exported. */
7712
+ fps = 0;
7713
+ /** The path to the images directory as defined in Spine. Available only when nonessential data was exported. May be null. */
7714
+ imagesPath = null;
7715
+ /** The path to the audio directory as defined in Spine. Available only when nonessential data was exported. May be null. */
7716
+ audioPath = null;
7637
7717
  /** Finds a bone by comparing each bone's name. It is more efficient to cache the results of this method than to call it
7638
7718
  * multiple times.
7639
7719
  * @returns May be null. */
@@ -7757,10 +7837,12 @@ var spine = (() => {
7757
7837
  }
7758
7838
  };
7759
7839
  var Skin = class {
7840
+ /** The skin's name, which is unique across all skins in the skeleton. */
7841
+ name;
7842
+ attachments = new Array();
7843
+ bones = Array();
7844
+ constraints = new Array();
7760
7845
  constructor(name) {
7761
- this.attachments = new Array();
7762
- this.bones = Array();
7763
- this.constraints = new Array();
7764
7846
  if (!name)
7765
7847
  throw new Error("name cannot be null.");
7766
7848
  this.name = name;
@@ -7917,19 +7999,23 @@ var spine = (() => {
7917
7999
 
7918
8000
  // spine-core/src/SlotData.ts
7919
8001
  var SlotData = class {
8002
+ /** The index of the slot in {@link Skeleton#getSlots()}. */
8003
+ index = 0;
8004
+ /** The name of the slot, which is unique across all slots in the skeleton. */
8005
+ name;
8006
+ /** The bone this slot belongs to. */
8007
+ boneData;
8008
+ /** The color used to tint the slot's attachment. If {@link #getDarkColor()} is set, this is used as the light color for two
8009
+ * color tinting. */
8010
+ color = new Color(1, 1, 1, 1);
8011
+ /** The dark color used to tint the slot's attachment for two color tinting, or null if two color tinting is not used. The dark
8012
+ * color's alpha is not used. */
8013
+ darkColor = null;
8014
+ /** The name of the attachment that is visible for this slot in the setup pose, or null if no attachment is visible. */
8015
+ attachmentName = null;
8016
+ /** The blend mode for drawing the slot's attachment. */
8017
+ blendMode = BlendMode.Normal;
7920
8018
  constructor(index, name, boneData) {
7921
- /** The index of the slot in {@link Skeleton#getSlots()}. */
7922
- this.index = 0;
7923
- /** The color used to tint the slot's attachment. If {@link #getDarkColor()} is set, this is used as the light color for two
7924
- * color tinting. */
7925
- this.color = new Color(1, 1, 1, 1);
7926
- /** The dark color used to tint the slot's attachment for two color tinting, or null if two color tinting is not used. The dark
7927
- * color's alpha is not used. */
7928
- this.darkColor = null;
7929
- /** The name of the attachment that is visible for this slot in the setup pose, or null if no attachment is visible. */
7930
- this.attachmentName = null;
7931
- /** The blend mode for drawing the slot's attachment. */
7932
- this.blendMode = BlendMode.Normal;
7933
8019
  if (index < 0)
7934
8020
  throw new Error("index must be >= 0.");
7935
8021
  if (!name)
@@ -7951,33 +8037,10 @@ var spine = (() => {
7951
8037
 
7952
8038
  // spine-core/src/TransformConstraintData.ts
7953
8039
  var TransformConstraintData = class extends ConstraintData {
7954
- constructor(name) {
7955
- super(name, 0, false);
7956
- /** The bones that will be modified by this transform constraint. */
7957
- this.bones = new Array();
7958
- /** The target bone whose world transform will be copied to the constrained bones. */
7959
- this._target = null;
7960
- this.mixRotate = 0;
7961
- this.mixX = 0;
7962
- this.mixY = 0;
7963
- this.mixScaleX = 0;
7964
- this.mixScaleY = 0;
7965
- this.mixShearY = 0;
7966
- /** An offset added to the constrained bone rotation. */
7967
- this.offsetRotation = 0;
7968
- /** An offset added to the constrained bone X translation. */
7969
- this.offsetX = 0;
7970
- /** An offset added to the constrained bone Y translation. */
7971
- this.offsetY = 0;
7972
- /** An offset added to the constrained bone scaleX. */
7973
- this.offsetScaleX = 0;
7974
- /** An offset added to the constrained bone scaleY. */
7975
- this.offsetScaleY = 0;
7976
- /** An offset added to the constrained bone shearY. */
7977
- this.offsetShearY = 0;
7978
- this.relative = false;
7979
- this.local = false;
7980
- }
8040
+ /** The bones that will be modified by this transform constraint. */
8041
+ bones = new Array();
8042
+ /** The target bone whose world transform will be copied to the constrained bones. */
8043
+ _target = null;
7981
8044
  set target(boneData) {
7982
8045
  this._target = boneData;
7983
8046
  }
@@ -7987,17 +8050,41 @@ var spine = (() => {
7987
8050
  else
7988
8051
  return this._target;
7989
8052
  }
8053
+ mixRotate = 0;
8054
+ mixX = 0;
8055
+ mixY = 0;
8056
+ mixScaleX = 0;
8057
+ mixScaleY = 0;
8058
+ mixShearY = 0;
8059
+ /** An offset added to the constrained bone rotation. */
8060
+ offsetRotation = 0;
8061
+ /** An offset added to the constrained bone X translation. */
8062
+ offsetX = 0;
8063
+ /** An offset added to the constrained bone Y translation. */
8064
+ offsetY = 0;
8065
+ /** An offset added to the constrained bone scaleX. */
8066
+ offsetScaleX = 0;
8067
+ /** An offset added to the constrained bone scaleY. */
8068
+ offsetScaleY = 0;
8069
+ /** An offset added to the constrained bone shearY. */
8070
+ offsetShearY = 0;
8071
+ relative = false;
8072
+ local = false;
8073
+ constructor(name) {
8074
+ super(name, 0, false);
8075
+ }
7990
8076
  };
7991
8077
 
7992
8078
  // spine-core/src/SkeletonBinary.ts
7993
8079
  var SkeletonBinary = class {
8080
+ /** Scales bone positions, image sizes, and translations as they are loaded. This allows different size images to be used at
8081
+ * runtime than were used in Spine.
8082
+ *
8083
+ * See [Scaling](http://esotericsoftware.com/spine-loading-skeleton-data#Scaling) in the Spine Runtimes Guide. */
8084
+ scale = 1;
8085
+ attachmentLoader;
8086
+ linkedMeshes = new Array();
7994
8087
  constructor(attachmentLoader) {
7995
- /** Scales bone positions, image sizes, and translations as they are loaded. This allows different size images to be used at
7996
- * runtime than were used in Spine.
7997
- *
7998
- * See [Scaling](http://esotericsoftware.com/spine-loading-skeleton-data#Scaling) in the Spine Runtimes Guide. */
7999
- this.scale = 1;
8000
- this.linkedMeshes = new Array();
8001
8088
  this.attachmentLoader = attachmentLoader;
8002
8089
  }
8003
8090
  readSkeletonData(binary) {
@@ -9011,6 +9098,11 @@ var spine = (() => {
9011
9098
  }
9012
9099
  };
9013
9100
  var LinkedMesh = class {
9101
+ parent;
9102
+ skin;
9103
+ slotIndex;
9104
+ mesh;
9105
+ inheritTimeline;
9014
9106
  constructor(mesh, skin, slotIndex, parent, inheritDeform) {
9015
9107
  this.mesh = mesh;
9016
9108
  this.skin = skin;
@@ -9104,23 +9196,21 @@ var spine = (() => {
9104
9196
 
9105
9197
  // spine-core/src/SkeletonBounds.ts
9106
9198
  var SkeletonBounds = class {
9107
- constructor() {
9108
- /** The left edge of the axis aligned bounding box. */
9109
- this.minX = 0;
9110
- /** The bottom edge of the axis aligned bounding box. */
9111
- this.minY = 0;
9112
- /** The right edge of the axis aligned bounding box. */
9113
- this.maxX = 0;
9114
- /** The top edge of the axis aligned bounding box. */
9115
- this.maxY = 0;
9116
- /** The visible bounding boxes. */
9117
- this.boundingBoxes = new Array();
9118
- /** The world vertices for the bounding box polygons. */
9119
- this.polygons = new Array();
9120
- this.polygonPool = new Pool(() => {
9121
- return Utils.newFloatArray(16);
9122
- });
9123
- }
9199
+ /** The left edge of the axis aligned bounding box. */
9200
+ minX = 0;
9201
+ /** The bottom edge of the axis aligned bounding box. */
9202
+ minY = 0;
9203
+ /** The right edge of the axis aligned bounding box. */
9204
+ maxX = 0;
9205
+ /** The top edge of the axis aligned bounding box. */
9206
+ maxY = 0;
9207
+ /** The visible bounding boxes. */
9208
+ boundingBoxes = new Array();
9209
+ /** The world vertices for the bounding box polygons. */
9210
+ polygons = new Array();
9211
+ polygonPool = new Pool(() => {
9212
+ return Utils.newFloatArray(16);
9213
+ });
9124
9214
  /** Clears any previous polygons, finds all visible bounding box attachments, and computes the world vertices for each bounding
9125
9215
  * box's polygon.
9126
9216
  * @param updateAabb If true, the axis aligned bounding box containing all the polygons is computed. If false, the
@@ -9291,19 +9381,17 @@ var spine = (() => {
9291
9381
 
9292
9382
  // spine-core/src/Triangulator.ts
9293
9383
  var Triangulator = class {
9294
- constructor() {
9295
- this.convexPolygons = new Array();
9296
- this.convexPolygonsIndices = new Array();
9297
- this.indicesArray = new Array();
9298
- this.isConcaveArray = new Array();
9299
- this.triangles = new Array();
9300
- this.polygonPool = new Pool(() => {
9301
- return new Array();
9302
- });
9303
- this.polygonIndicesPool = new Pool(() => {
9304
- return new Array();
9305
- });
9306
- }
9384
+ convexPolygons = new Array();
9385
+ convexPolygonsIndices = new Array();
9386
+ indicesArray = new Array();
9387
+ isConcaveArray = new Array();
9388
+ triangles = new Array();
9389
+ polygonPool = new Pool(() => {
9390
+ return new Array();
9391
+ });
9392
+ polygonIndicesPool = new Pool(() => {
9393
+ return new Array();
9394
+ });
9307
9395
  triangulate(verticesArray) {
9308
9396
  let vertices = verticesArray;
9309
9397
  let vertexCount = verticesArray.length >> 1;
@@ -9507,16 +9595,14 @@ var spine = (() => {
9507
9595
 
9508
9596
  // spine-core/src/SkeletonClipping.ts
9509
9597
  var SkeletonClipping = class {
9510
- constructor() {
9511
- this.triangulator = new Triangulator();
9512
- this.clippingPolygon = new Array();
9513
- this.clipOutput = new Array();
9514
- this.clippedVertices = new Array();
9515
- this.clippedTriangles = new Array();
9516
- this.scratch = new Array();
9517
- this.clipAttachment = null;
9518
- this.clippingPolygons = null;
9519
- }
9598
+ triangulator = new Triangulator();
9599
+ clippingPolygon = new Array();
9600
+ clipOutput = new Array();
9601
+ clippedVertices = new Array();
9602
+ clippedTriangles = new Array();
9603
+ scratch = new Array();
9604
+ clipAttachment = null;
9605
+ clippingPolygons = null;
9520
9606
  clipStart(slot, clip) {
9521
9607
  if (this.clipAttachment)
9522
9608
  return 0;
@@ -9796,13 +9882,14 @@ var spine = (() => {
9796
9882
 
9797
9883
  // spine-core/src/SkeletonJson.ts
9798
9884
  var SkeletonJson = class {
9885
+ attachmentLoader;
9886
+ /** Scales bone positions, image sizes, and translations as they are loaded. This allows different size images to be used at
9887
+ * runtime than were used in Spine.
9888
+ *
9889
+ * See [Scaling](http://esotericsoftware.com/spine-loading-skeleton-data#Scaling) in the Spine Runtimes Guide. */
9890
+ scale = 1;
9891
+ linkedMeshes = new Array();
9799
9892
  constructor(attachmentLoader) {
9800
- /** Scales bone positions, image sizes, and translations as they are loaded. This allows different size images to be used at
9801
- * runtime than were used in Spine.
9802
- *
9803
- * See [Scaling](http://esotericsoftware.com/spine-loading-skeleton-data#Scaling) in the Spine Runtimes Guide. */
9804
- this.scale = 1;
9805
- this.linkedMeshes = new Array();
9806
9893
  this.attachmentLoader = attachmentLoader;
9807
9894
  }
9808
9895
  readSkeletonData(json) {
@@ -10664,6 +10751,11 @@ var spine = (() => {
10664
10751
  }
10665
10752
  };
10666
10753
  var LinkedMesh2 = class {
10754
+ parent;
10755
+ skin;
10756
+ slotIndex;
10757
+ mesh;
10758
+ inheritTimeline;
10667
10759
  constructor(mesh, skin, slotIndex, parent, inheritDeform) {
10668
10760
  this.mesh = mesh;
10669
10761
  this.skin = skin;