@esotericsoftware/spine-canvas 4.1.43 → 4.1.45

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.
@@ -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-canvas/src/index.ts
22
27
  var src_exports = {};
@@ -133,9 +138,7 @@ var spine = (() => {
133
138
 
134
139
  // spine-core/src/Utils.ts
135
140
  var IntSet = class {
136
- constructor() {
137
- this.array = new Array();
138
- }
141
+ array = new Array();
139
142
  add(value) {
140
143
  let contains = this.contains(value);
141
144
  this.array[value | 0] = value | 0;
@@ -152,10 +155,8 @@ var spine = (() => {
152
155
  }
153
156
  };
154
157
  var StringSet = class {
155
- constructor() {
156
- this.entries = {};
157
- this.size = 0;
158
- }
158
+ entries = {};
159
+ size = 0;
159
160
  add(value) {
160
161
  let contains = this.entries[value];
161
162
  this.entries[value] = true;
@@ -250,11 +251,11 @@ var spine = (() => {
250
251
  }
251
252
  };
252
253
  var Color = _Color;
253
- Color.WHITE = new _Color(1, 1, 1, 1);
254
- Color.RED = new _Color(1, 0, 0, 1);
255
- Color.GREEN = new _Color(0, 1, 0, 1);
256
- Color.BLUE = new _Color(0, 0, 1, 1);
257
- Color.MAGENTA = new _Color(1, 0, 1, 1);
254
+ __publicField(Color, "WHITE", new _Color(1, 1, 1, 1));
255
+ __publicField(Color, "RED", new _Color(1, 0, 0, 1));
256
+ __publicField(Color, "GREEN", new _Color(0, 1, 0, 1));
257
+ __publicField(Color, "BLUE", new _Color(0, 0, 1, 1));
258
+ __publicField(Color, "MAGENTA", new _Color(1, 0, 1, 1));
258
259
  var _MathUtils = class {
259
260
  static clamp(value, min, max) {
260
261
  if (value < min)
@@ -294,21 +295,21 @@ var spine = (() => {
294
295
  }
295
296
  };
296
297
  var MathUtils = _MathUtils;
297
- MathUtils.PI = 3.1415927;
298
- MathUtils.PI2 = _MathUtils.PI * 2;
299
- MathUtils.radiansToDegrees = 180 / _MathUtils.PI;
300
- MathUtils.radDeg = _MathUtils.radiansToDegrees;
301
- MathUtils.degreesToRadians = _MathUtils.PI / 180;
302
- MathUtils.degRad = _MathUtils.degreesToRadians;
298
+ __publicField(MathUtils, "PI", 3.1415927);
299
+ __publicField(MathUtils, "PI2", _MathUtils.PI * 2);
300
+ __publicField(MathUtils, "radiansToDegrees", 180 / _MathUtils.PI);
301
+ __publicField(MathUtils, "radDeg", _MathUtils.radiansToDegrees);
302
+ __publicField(MathUtils, "degreesToRadians", _MathUtils.PI / 180);
303
+ __publicField(MathUtils, "degRad", _MathUtils.degreesToRadians);
303
304
  var Interpolation = class {
304
305
  apply(start, end, a) {
305
306
  return start + (end - start) * this.applyInternal(a);
306
307
  }
307
308
  };
308
309
  var Pow = class extends Interpolation {
310
+ power = 2;
309
311
  constructor(power) {
310
312
  super();
311
- this.power = 2;
312
313
  this.power = power;
313
314
  }
314
315
  applyInternal(a) {
@@ -397,7 +398,7 @@ var spine = (() => {
397
398
  }
398
399
  };
399
400
  var Utils = _Utils;
400
- Utils.SUPPORTS_TYPED_ARRAYS = typeof Float32Array !== "undefined";
401
+ __publicField(Utils, "SUPPORTS_TYPED_ARRAYS", typeof Float32Array !== "undefined");
401
402
  var DebugUtils = class {
402
403
  static logBones(skeleton) {
403
404
  for (let i = 0; i < skeleton.bones.length; i++) {
@@ -407,8 +408,9 @@ var spine = (() => {
407
408
  }
408
409
  };
409
410
  var Pool = class {
411
+ items = new Array();
412
+ instantiator;
410
413
  constructor(instantiator) {
411
- this.items = new Array();
412
414
  this.instantiator = instantiator;
413
415
  }
414
416
  obtain() {
@@ -452,15 +454,13 @@ var spine = (() => {
452
454
  }
453
455
  };
454
456
  var TimeKeeper = class {
455
- constructor() {
456
- this.maxDelta = 0.064;
457
- this.framesPerSecond = 0;
458
- this.delta = 0;
459
- this.totalTime = 0;
460
- this.lastTime = Date.now() / 1e3;
461
- this.frameCount = 0;
462
- this.frameTime = 0;
463
- }
457
+ maxDelta = 0.064;
458
+ framesPerSecond = 0;
459
+ delta = 0;
460
+ totalTime = 0;
461
+ lastTime = Date.now() / 1e3;
462
+ frameCount = 0;
463
+ frameTime = 0;
464
464
  update() {
465
465
  let now = Date.now() / 1e3;
466
466
  this.delta = now - this.lastTime;
@@ -478,11 +478,12 @@ var spine = (() => {
478
478
  }
479
479
  };
480
480
  var WindowedMean = class {
481
+ values;
482
+ addedValues = 0;
483
+ lastValue = 0;
484
+ mean = 0;
485
+ dirty = true;
481
486
  constructor(windowSize = 32) {
482
- this.addedValues = 0;
483
- this.lastValue = 0;
484
- this.mean = 0;
485
- this.dirty = true;
486
487
  this.values = new Array(windowSize);
487
488
  }
488
489
  hasEnoughData() {
@@ -513,6 +514,7 @@ var spine = (() => {
513
514
 
514
515
  // spine-core/src/attachments/Attachment.ts
515
516
  var Attachment = class {
517
+ name;
516
518
  constructor(name) {
517
519
  if (!name)
518
520
  throw new Error("name cannot be null.");
@@ -520,24 +522,24 @@ var spine = (() => {
520
522
  }
521
523
  };
522
524
  var _VertexAttachment = class extends Attachment {
525
+ /** The unique ID for this attachment. */
526
+ id = _VertexAttachment.nextID++;
527
+ /** The bones which affect the {@link #getVertices()}. The array entries are, for each vertex, the number of bones affecting
528
+ * the vertex followed by that many bone indices, which is the index of the bone in {@link Skeleton#bones}. Will be null
529
+ * if this attachment has no weights. */
530
+ bones = null;
531
+ /** The vertex positions in the bone's coordinate system. For a non-weighted attachment, the values are `x,y`
532
+ * entries for each vertex. For a weighted attachment, the values are `x,y,weight` entries for each bone affecting
533
+ * each vertex. */
534
+ vertices = [];
535
+ /** The maximum number of world vertex values that can be output by
536
+ * {@link #computeWorldVertices()} using the `count` parameter. */
537
+ worldVerticesLength = 0;
538
+ /** Timelines for the timeline attachment are also applied to this attachment.
539
+ * May be null if no attachment-specific timelines should be applied. */
540
+ timelineAttachment = this;
523
541
  constructor(name) {
524
542
  super(name);
525
- /** The unique ID for this attachment. */
526
- this.id = _VertexAttachment.nextID++;
527
- /** The bones which affect the {@link #getVertices()}. The array entries are, for each vertex, the number of bones affecting
528
- * the vertex followed by that many bone indices, which is the index of the bone in {@link Skeleton#bones}. Will be null
529
- * if this attachment has no weights. */
530
- this.bones = null;
531
- /** The vertex positions in the bone's coordinate system. For a non-weighted attachment, the values are `x,y`
532
- * entries for each vertex. For a weighted attachment, the values are `x,y,weight` entries for each bone affecting
533
- * each vertex. */
534
- this.vertices = [];
535
- /** The maximum number of world vertex values that can be output by
536
- * {@link #computeWorldVertices()} using the `count` parameter. */
537
- this.worldVerticesLength = 0;
538
- /** Timelines for the timeline attachment are also applied to this attachment.
539
- * May be null if no attachment-specific timelines should be applied. */
540
- this.timelineAttachment = this;
541
543
  }
542
544
  /** Transforms the attachment's local {@link #vertices} to world coordinates. If the slot's {@link Slot#deform} is
543
545
  * not empty, it is used to deform the vertices.
@@ -624,16 +626,17 @@ var spine = (() => {
624
626
  }
625
627
  };
626
628
  var VertexAttachment = _VertexAttachment;
627
- VertexAttachment.nextID = 0;
629
+ __publicField(VertexAttachment, "nextID", 0);
628
630
 
629
631
  // spine-core/src/attachments/Sequence.ts
630
632
  var _Sequence = class {
633
+ id = _Sequence.nextID();
634
+ regions;
635
+ start = 0;
636
+ digits = 0;
637
+ /** The index of the region to show for the setup pose. */
638
+ setupIndex = 0;
631
639
  constructor(count) {
632
- this.id = _Sequence.nextID();
633
- this.start = 0;
634
- this.digits = 0;
635
- /** The index of the region to show for the setup pose. */
636
- this.setupIndex = 0;
637
640
  this.regions = new Array(count);
638
641
  }
639
642
  copy() {
@@ -669,7 +672,7 @@ var spine = (() => {
669
672
  }
670
673
  };
671
674
  var Sequence = _Sequence;
672
- Sequence._nextID = 0;
675
+ __publicField(Sequence, "_nextID", 0);
673
676
  var SequenceMode = /* @__PURE__ */ ((SequenceMode2) => {
674
677
  SequenceMode2[SequenceMode2["hold"] = 0] = "hold";
675
678
  SequenceMode2[SequenceMode2["once"] = 1] = "once";
@@ -692,9 +695,13 @@ var spine = (() => {
692
695
 
693
696
  // spine-core/src/Animation.ts
694
697
  var Animation = class {
698
+ /** The animation's name, which is unique across all animations in the skeleton. */
699
+ name;
700
+ timelines = [];
701
+ timelineIds = new StringSet();
702
+ /** The duration of the animation in seconds, which is the highest time of all keys in the timeline. */
703
+ duration;
695
704
  constructor(name, timelines, duration) {
696
- this.timelines = [];
697
- this.timelineIds = new StringSet();
698
705
  if (!name)
699
706
  throw new Error("name cannot be null.");
700
707
  this.name = name;
@@ -768,6 +775,8 @@ var spine = (() => {
768
775
  sequence: 19
769
776
  };
770
777
  var Timeline = class {
778
+ propertyIds;
779
+ frames;
771
780
  constructor(frameCount, propertyIds) {
772
781
  this.propertyIds = propertyIds;
773
782
  this.frames = Utils.newFloatArray(frameCount * this.getFrameEntries());
@@ -800,6 +809,7 @@ var spine = (() => {
800
809
  }
801
810
  };
802
811
  var CurveTimeline = class extends Timeline {
812
+ curves;
803
813
  // type, x, y, ...
804
814
  constructor(frameCount, bezierCount, propertyIds) {
805
815
  super(frameCount, propertyIds);
@@ -967,9 +977,9 @@ var spine = (() => {
967
977
  }
968
978
  };
969
979
  var RotateTimeline = class extends CurveTimeline1 {
980
+ boneIndex = 0;
970
981
  constructor(frameCount, bezierCount, boneIndex) {
971
982
  super(frameCount, bezierCount, Property.rotate + "|" + boneIndex);
972
- this.boneIndex = 0;
973
983
  this.boneIndex = boneIndex;
974
984
  }
975
985
  apply(skeleton, lastTime, time, events, alpha, blend, direction) {
@@ -1001,6 +1011,7 @@ var spine = (() => {
1001
1011
  }
1002
1012
  };
1003
1013
  var TranslateTimeline = class extends CurveTimeline2 {
1014
+ boneIndex = 0;
1004
1015
  constructor(frameCount, bezierCount, boneIndex) {
1005
1016
  super(
1006
1017
  frameCount,
@@ -1008,7 +1019,6 @@ var spine = (() => {
1008
1019
  Property.x + "|" + boneIndex,
1009
1020
  Property.y + "|" + boneIndex
1010
1021
  );
1011
- this.boneIndex = 0;
1012
1022
  this.boneIndex = boneIndex;
1013
1023
  }
1014
1024
  apply(skeleton, lastTime, time, events, alpha, blend, direction) {
@@ -1106,9 +1116,9 @@ var spine = (() => {
1106
1116
  }
1107
1117
  };
1108
1118
  var TranslateXTimeline = class extends CurveTimeline1 {
1119
+ boneIndex = 0;
1109
1120
  constructor(frameCount, bezierCount, boneIndex) {
1110
1121
  super(frameCount, bezierCount, Property.x + "|" + boneIndex);
1111
- this.boneIndex = 0;
1112
1122
  this.boneIndex = boneIndex;
1113
1123
  }
1114
1124
  apply(skeleton, lastTime, time, events, alpha, blend, direction) {
@@ -1141,9 +1151,9 @@ var spine = (() => {
1141
1151
  }
1142
1152
  };
1143
1153
  var TranslateYTimeline = class extends CurveTimeline1 {
1154
+ boneIndex = 0;
1144
1155
  constructor(frameCount, bezierCount, boneIndex) {
1145
1156
  super(frameCount, bezierCount, Property.y + "|" + boneIndex);
1146
- this.boneIndex = 0;
1147
1157
  this.boneIndex = boneIndex;
1148
1158
  }
1149
1159
  apply(skeleton, lastTime, time, events, alpha, blend, direction) {
@@ -1176,6 +1186,7 @@ var spine = (() => {
1176
1186
  }
1177
1187
  };
1178
1188
  var ScaleTimeline = class extends CurveTimeline2 {
1189
+ boneIndex = 0;
1179
1190
  constructor(frameCount, bezierCount, boneIndex) {
1180
1191
  super(
1181
1192
  frameCount,
@@ -1183,7 +1194,6 @@ var spine = (() => {
1183
1194
  Property.scaleX + "|" + boneIndex,
1184
1195
  Property.scaleY + "|" + boneIndex
1185
1196
  );
1186
- this.boneIndex = 0;
1187
1197
  this.boneIndex = boneIndex;
1188
1198
  }
1189
1199
  apply(skeleton, lastTime, time, events, alpha, blend, direction) {
@@ -1319,9 +1329,9 @@ var spine = (() => {
1319
1329
  }
1320
1330
  };
1321
1331
  var ScaleXTimeline = class extends CurveTimeline1 {
1332
+ boneIndex = 0;
1322
1333
  constructor(frameCount, bezierCount, boneIndex) {
1323
1334
  super(frameCount, bezierCount, Property.scaleX + "|" + boneIndex);
1324
- this.boneIndex = 0;
1325
1335
  this.boneIndex = boneIndex;
1326
1336
  }
1327
1337
  apply(skeleton, lastTime, time, events, alpha, blend, direction) {
@@ -1380,9 +1390,9 @@ var spine = (() => {
1380
1390
  }
1381
1391
  };
1382
1392
  var ScaleYTimeline = class extends CurveTimeline1 {
1393
+ boneIndex = 0;
1383
1394
  constructor(frameCount, bezierCount, boneIndex) {
1384
1395
  super(frameCount, bezierCount, Property.scaleY + "|" + boneIndex);
1385
- this.boneIndex = 0;
1386
1396
  this.boneIndex = boneIndex;
1387
1397
  }
1388
1398
  apply(skeleton, lastTime, time, events, alpha, blend, direction) {
@@ -1441,6 +1451,7 @@ var spine = (() => {
1441
1451
  }
1442
1452
  };
1443
1453
  var ShearTimeline = class extends CurveTimeline2 {
1454
+ boneIndex = 0;
1444
1455
  constructor(frameCount, bezierCount, boneIndex) {
1445
1456
  super(
1446
1457
  frameCount,
@@ -1448,7 +1459,6 @@ var spine = (() => {
1448
1459
  Property.shearX + "|" + boneIndex,
1449
1460
  Property.shearY + "|" + boneIndex
1450
1461
  );
1451
- this.boneIndex = 0;
1452
1462
  this.boneIndex = boneIndex;
1453
1463
  }
1454
1464
  apply(skeleton, lastTime, time, events, alpha, blend, direction) {
@@ -1546,9 +1556,9 @@ var spine = (() => {
1546
1556
  }
1547
1557
  };
1548
1558
  var ShearXTimeline = class extends CurveTimeline1 {
1559
+ boneIndex = 0;
1549
1560
  constructor(frameCount, bezierCount, boneIndex) {
1550
1561
  super(frameCount, bezierCount, Property.shearX + "|" + boneIndex);
1551
- this.boneIndex = 0;
1552
1562
  this.boneIndex = boneIndex;
1553
1563
  }
1554
1564
  apply(skeleton, lastTime, time, events, alpha, blend, direction) {
@@ -1581,9 +1591,9 @@ var spine = (() => {
1581
1591
  }
1582
1592
  };
1583
1593
  var ShearYTimeline = class extends CurveTimeline1 {
1594
+ boneIndex = 0;
1584
1595
  constructor(frameCount, bezierCount, boneIndex) {
1585
1596
  super(frameCount, bezierCount, Property.shearY + "|" + boneIndex);
1586
- this.boneIndex = 0;
1587
1597
  this.boneIndex = boneIndex;
1588
1598
  }
1589
1599
  apply(skeleton, lastTime, time, events, alpha, blend, direction) {
@@ -1616,12 +1626,12 @@ var spine = (() => {
1616
1626
  }
1617
1627
  };
1618
1628
  var RGBATimeline = class extends CurveTimeline {
1629
+ slotIndex = 0;
1619
1630
  constructor(frameCount, bezierCount, slotIndex) {
1620
1631
  super(frameCount, bezierCount, [
1621
1632
  Property.rgb + "|" + slotIndex,
1622
1633
  Property.alpha + "|" + slotIndex
1623
1634
  ]);
1624
- this.slotIndex = 0;
1625
1635
  this.slotIndex = slotIndex;
1626
1636
  }
1627
1637
  getFrameEntries() {
@@ -1779,11 +1789,11 @@ var spine = (() => {
1779
1789
  }
1780
1790
  };
1781
1791
  var RGBTimeline = class extends CurveTimeline {
1792
+ slotIndex = 0;
1782
1793
  constructor(frameCount, bezierCount, slotIndex) {
1783
1794
  super(frameCount, bezierCount, [
1784
1795
  Property.rgb + "|" + slotIndex
1785
1796
  ]);
1786
- this.slotIndex = 0;
1787
1797
  this.slotIndex = slotIndex;
1788
1798
  }
1789
1799
  getFrameEntries() {
@@ -1922,9 +1932,9 @@ var spine = (() => {
1922
1932
  }
1923
1933
  };
1924
1934
  var AlphaTimeline = class extends CurveTimeline1 {
1935
+ slotIndex = 0;
1925
1936
  constructor(frameCount, bezierCount, slotIndex) {
1926
1937
  super(frameCount, bezierCount, Property.alpha + "|" + slotIndex);
1927
- this.slotIndex = 0;
1928
1938
  this.slotIndex = slotIndex;
1929
1939
  }
1930
1940
  apply(skeleton, lastTime, time, events, alpha, blend, direction) {
@@ -1954,13 +1964,13 @@ var spine = (() => {
1954
1964
  }
1955
1965
  };
1956
1966
  var RGBA2Timeline = class extends CurveTimeline {
1967
+ slotIndex = 0;
1957
1968
  constructor(frameCount, bezierCount, slotIndex) {
1958
1969
  super(frameCount, bezierCount, [
1959
1970
  Property.rgb + "|" + slotIndex,
1960
1971
  Property.alpha + "|" + slotIndex,
1961
1972
  Property.rgb2 + "|" + slotIndex
1962
1973
  ]);
1963
- this.slotIndex = 0;
1964
1974
  this.slotIndex = slotIndex;
1965
1975
  }
1966
1976
  getFrameEntries() {
@@ -2201,12 +2211,12 @@ var spine = (() => {
2201
2211
  }
2202
2212
  };
2203
2213
  var RGB2Timeline = class extends CurveTimeline {
2214
+ slotIndex = 0;
2204
2215
  constructor(frameCount, bezierCount, slotIndex) {
2205
2216
  super(frameCount, bezierCount, [
2206
2217
  Property.rgb + "|" + slotIndex,
2207
2218
  Property.rgb2 + "|" + slotIndex
2208
2219
  ]);
2209
- this.slotIndex = 0;
2210
2220
  this.slotIndex = slotIndex;
2211
2221
  }
2212
2222
  getFrameEntries() {
@@ -2432,11 +2442,13 @@ var spine = (() => {
2432
2442
  }
2433
2443
  };
2434
2444
  var AttachmentTimeline = class extends Timeline {
2445
+ slotIndex = 0;
2446
+ /** The attachment name for each key frame. May contain null values to clear the attachment. */
2447
+ attachmentNames;
2435
2448
  constructor(frameCount, slotIndex) {
2436
2449
  super(frameCount, [
2437
2450
  Property.attachment + "|" + slotIndex
2438
2451
  ]);
2439
- this.slotIndex = 0;
2440
2452
  this.slotIndex = slotIndex;
2441
2453
  this.attachmentNames = new Array(frameCount);
2442
2454
  }
@@ -2469,11 +2481,15 @@ var spine = (() => {
2469
2481
  }
2470
2482
  };
2471
2483
  var DeformTimeline = class extends CurveTimeline {
2484
+ slotIndex = 0;
2485
+ /** The attachment that will be deformed. */
2486
+ attachment;
2487
+ /** The vertices for each key frame. */
2488
+ vertices;
2472
2489
  constructor(frameCount, bezierCount, slotIndex, attachment) {
2473
2490
  super(frameCount, bezierCount, [
2474
2491
  Property.deform + "|" + slotIndex + "|" + attachment.id
2475
2492
  ]);
2476
- this.slotIndex = 0;
2477
2493
  this.slotIndex = slotIndex;
2478
2494
  this.attachment = attachment;
2479
2495
  this.vertices = new Array(frameCount);
@@ -2694,6 +2710,8 @@ var spine = (() => {
2694
2710
  }
2695
2711
  };
2696
2712
  var _EventTimeline = class extends Timeline {
2713
+ /** The event for each key frame. */
2714
+ events;
2697
2715
  constructor(frameCount) {
2698
2716
  super(frameCount, _EventTimeline.propertyIds);
2699
2717
  this.events = new Array(frameCount);
@@ -2736,8 +2754,10 @@ var spine = (() => {
2736
2754
  }
2737
2755
  };
2738
2756
  var EventTimeline = _EventTimeline;
2739
- EventTimeline.propertyIds = ["" + Property.event];
2757
+ __publicField(EventTimeline, "propertyIds", ["" + Property.event]);
2740
2758
  var _DrawOrderTimeline = class extends Timeline {
2759
+ /** The draw order for each key frame. See {@link #setFrame(int, float, int[])}. */
2760
+ drawOrders;
2741
2761
  constructor(frameCount) {
2742
2762
  super(frameCount, _DrawOrderTimeline.propertyIds);
2743
2763
  this.drawOrders = new Array(frameCount);
@@ -2776,14 +2796,14 @@ var spine = (() => {
2776
2796
  }
2777
2797
  };
2778
2798
  var DrawOrderTimeline = _DrawOrderTimeline;
2779
- DrawOrderTimeline.propertyIds = ["" + Property.drawOrder];
2799
+ __publicField(DrawOrderTimeline, "propertyIds", ["" + Property.drawOrder]);
2780
2800
  var IkConstraintTimeline = class extends CurveTimeline {
2801
+ /** The index of the IK constraint slot in {@link Skeleton#ikConstraints} that will be changed. */
2802
+ ikConstraintIndex = 0;
2781
2803
  constructor(frameCount, bezierCount, ikConstraintIndex) {
2782
2804
  super(frameCount, bezierCount, [
2783
2805
  Property.ikConstraint + "|" + ikConstraintIndex
2784
2806
  ]);
2785
- /** The index of the IK constraint slot in {@link Skeleton#ikConstraints} that will be changed. */
2786
- this.ikConstraintIndex = 0;
2787
2807
  this.ikConstraintIndex = ikConstraintIndex;
2788
2808
  }
2789
2809
  getFrameEntries() {
@@ -2940,12 +2960,12 @@ var spine = (() => {
2940
2960
  }
2941
2961
  };
2942
2962
  var TransformConstraintTimeline = class extends CurveTimeline {
2963
+ /** The index of the transform constraint slot in {@link Skeleton#transformConstraints} that will be changed. */
2964
+ transformConstraintIndex = 0;
2943
2965
  constructor(frameCount, bezierCount, transformConstraintIndex) {
2944
2966
  super(frameCount, bezierCount, [
2945
2967
  Property.transformConstraint + "|" + transformConstraintIndex
2946
2968
  ]);
2947
- /** The index of the transform constraint slot in {@link Skeleton#transformConstraints} that will be changed. */
2948
- this.transformConstraintIndex = 0;
2949
2969
  this.transformConstraintIndex = transformConstraintIndex;
2950
2970
  }
2951
2971
  getFrameEntries() {
@@ -3163,10 +3183,10 @@ var spine = (() => {
3163
3183
  }
3164
3184
  };
3165
3185
  var PathConstraintPositionTimeline = class extends CurveTimeline1 {
3186
+ /** The index of the path constraint slot in {@link Skeleton#pathConstraints} that will be changed. */
3187
+ pathConstraintIndex = 0;
3166
3188
  constructor(frameCount, bezierCount, pathConstraintIndex) {
3167
3189
  super(frameCount, bezierCount, Property.pathConstraintPosition + "|" + pathConstraintIndex);
3168
- /** The index of the path constraint slot in {@link Skeleton#pathConstraints} that will be changed. */
3169
- this.pathConstraintIndex = 0;
3170
3190
  this.pathConstraintIndex = pathConstraintIndex;
3171
3191
  }
3172
3192
  apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {
@@ -3192,10 +3212,10 @@ var spine = (() => {
3192
3212
  }
3193
3213
  };
3194
3214
  var PathConstraintSpacingTimeline = class extends CurveTimeline1 {
3215
+ /** The index of the path constraint slot in {@link Skeleton#getPathConstraints()} that will be changed. */
3216
+ pathConstraintIndex = 0;
3195
3217
  constructor(frameCount, bezierCount, pathConstraintIndex) {
3196
3218
  super(frameCount, bezierCount, Property.pathConstraintSpacing + "|" + pathConstraintIndex);
3197
- /** The index of the path constraint slot in {@link Skeleton#getPathConstraints()} that will be changed. */
3198
- this.pathConstraintIndex = 0;
3199
3219
  this.pathConstraintIndex = pathConstraintIndex;
3200
3220
  }
3201
3221
  apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {
@@ -3221,12 +3241,12 @@ var spine = (() => {
3221
3241
  }
3222
3242
  };
3223
3243
  var PathConstraintMixTimeline = class extends CurveTimeline {
3244
+ /** The index of the path constraint slot in {@link Skeleton#getPathConstraints()} that will be changed. */
3245
+ pathConstraintIndex = 0;
3224
3246
  constructor(frameCount, bezierCount, pathConstraintIndex) {
3225
3247
  super(frameCount, bezierCount, [
3226
3248
  Property.pathConstraintMix + "|" + pathConstraintIndex
3227
3249
  ]);
3228
- /** The index of the path constraint slot in {@link Skeleton#getPathConstraints()} that will be changed. */
3229
- this.pathConstraintIndex = 0;
3230
3250
  this.pathConstraintIndex = pathConstraintIndex;
3231
3251
  }
3232
3252
  getFrameEntries() {
@@ -3358,6 +3378,8 @@ var spine = (() => {
3358
3378
  }
3359
3379
  };
3360
3380
  var _SequenceTimeline = class extends Timeline {
3381
+ slotIndex;
3382
+ attachment;
3361
3383
  constructor(frameCount, slotIndex, attachment) {
3362
3384
  super(frameCount, [
3363
3385
  Property.sequence + "|" + slotIndex + "|" + attachment.sequence.id
@@ -3442,32 +3464,34 @@ var spine = (() => {
3442
3464
  }
3443
3465
  };
3444
3466
  var SequenceTimeline = _SequenceTimeline;
3445
- SequenceTimeline.ENTRIES = 3;
3446
- SequenceTimeline.MODE = 1;
3447
- SequenceTimeline.DELAY = 2;
3467
+ __publicField(SequenceTimeline, "ENTRIES", 3);
3468
+ __publicField(SequenceTimeline, "MODE", 1);
3469
+ __publicField(SequenceTimeline, "DELAY", 2);
3448
3470
 
3449
3471
  // spine-core/src/AnimationState.ts
3450
3472
  var _AnimationState = class {
3451
- constructor(data) {
3452
- /** The list of tracks that currently have animations, which may contain null entries. */
3453
- this.tracks = new Array();
3454
- /** Multiplier for the delta time when the animation state is updated, causing time for all animations and mixes to play slower
3455
- * or faster. Defaults to 1.
3456
- *
3457
- * See TrackEntry {@link TrackEntry#timeScale} for affecting a single animation. */
3458
- this.timeScale = 1;
3459
- this.unkeyedState = 0;
3460
- this.events = new Array();
3461
- this.listeners = new Array();
3462
- this.queue = new EventQueue(this);
3463
- this.propertyIDs = new StringSet();
3464
- this.animationsChanged = false;
3465
- this.trackEntryPool = new Pool(() => new TrackEntry());
3466
- this.data = data;
3467
- }
3468
3473
  static emptyAnimation() {
3469
3474
  return _AnimationState._emptyAnimation;
3470
3475
  }
3476
+ /** The AnimationStateData to look up mix durations. */
3477
+ data;
3478
+ /** The list of tracks that currently have animations, which may contain null entries. */
3479
+ tracks = new Array();
3480
+ /** Multiplier for the delta time when the animation state is updated, causing time for all animations and mixes to play slower
3481
+ * or faster. Defaults to 1.
3482
+ *
3483
+ * See TrackEntry {@link TrackEntry#timeScale} for affecting a single animation. */
3484
+ timeScale = 1;
3485
+ unkeyedState = 0;
3486
+ events = new Array();
3487
+ listeners = new Array();
3488
+ queue = new EventQueue(this);
3489
+ propertyIDs = new StringSet();
3490
+ animationsChanged = false;
3491
+ trackEntryPool = new Pool(() => new TrackEntry());
3492
+ constructor(data) {
3493
+ this.data = data;
3494
+ }
3471
3495
  /** Increments each track entry {@link TrackEntry#trackTime()}, setting queued animations as current if needed. */
3472
3496
  update(delta) {
3473
3497
  delta *= this.timeScale;
@@ -4114,141 +4138,139 @@ var spine = (() => {
4114
4138
  }
4115
4139
  };
4116
4140
  var AnimationState = _AnimationState;
4117
- AnimationState._emptyAnimation = new Animation("<empty>", [], 0);
4141
+ __publicField(AnimationState, "_emptyAnimation", new Animation("<empty>", [], 0));
4118
4142
  var TrackEntry = class {
4119
- constructor() {
4120
- /** The animation to apply for this track entry. */
4121
- this.animation = null;
4122
- this.previous = null;
4123
- /** The animation queued to start after this animation, or null. `next` makes up a linked list. */
4124
- this.next = null;
4125
- /** The track entry for the previous animation when mixing from the previous animation to this animation, or null if no
4126
- * mixing is currently occuring. When mixing from multiple animations, `mixingFrom` makes up a linked list. */
4127
- this.mixingFrom = null;
4128
- /** The track entry for the next animation when mixing from this animation to the next animation, or null if no mixing is
4129
- * currently occuring. When mixing to multiple animations, `mixingTo` makes up a linked list. */
4130
- this.mixingTo = null;
4131
- /** The listener for events generated by this track entry, or null.
4132
- *
4133
- * A track entry returned from {@link AnimationState#setAnimation()} is already the current animation
4134
- * for the track, so the track entry listener {@link AnimationStateListener#start()} will not be called. */
4135
- this.listener = null;
4136
- /** The index of the track where this track entry is either current or queued.
4137
- *
4138
- * See {@link AnimationState#getCurrent()}. */
4139
- this.trackIndex = 0;
4140
- /** If true, the animation will repeat. If false it will not, instead its last frame is applied if played beyond its
4141
- * duration. */
4142
- this.loop = false;
4143
- /** If true, when mixing from the previous animation to this animation, the previous animation is applied as normal instead
4144
- * of being mixed out.
4145
- *
4146
- * When mixing between animations that key the same property, if a lower track also keys that property then the value will
4147
- * briefly dip toward the lower track value during the mix. This happens because the first animation mixes from 100% to 0%
4148
- * while the second animation mixes from 0% to 100%. Setting `holdPrevious` to true applies the first animation
4149
- * at 100% during the mix so the lower track value is overwritten. Such dipping does not occur on the lowest track which
4150
- * keys the property, only when a higher track also keys the property.
4151
- *
4152
- * Snapping will occur if `holdPrevious` is true and this animation does not key all the same properties as the
4153
- * previous animation. */
4154
- this.holdPrevious = false;
4155
- this.reverse = false;
4156
- this.shortestRotation = false;
4157
- /** When the mix percentage ({@link #mixTime} / {@link #mixDuration}) is less than the
4158
- * `eventThreshold`, event timelines are applied while this animation is being mixed out. Defaults to 0, so event
4159
- * timelines are not applied while this animation is being mixed out. */
4160
- this.eventThreshold = 0;
4161
- /** When the mix percentage ({@link #mixtime} / {@link #mixDuration}) is less than the
4162
- * `attachmentThreshold`, attachment timelines are applied while this animation is being mixed out. Defaults to
4163
- * 0, so attachment timelines are not applied while this animation is being mixed out. */
4164
- this.attachmentThreshold = 0;
4165
- /** When the mix percentage ({@link #mixTime} / {@link #mixDuration}) is less than the
4166
- * `drawOrderThreshold`, draw order timelines are applied while this animation is being mixed out. Defaults to 0,
4167
- * so draw order timelines are not applied while this animation is being mixed out. */
4168
- this.drawOrderThreshold = 0;
4169
- /** Seconds when this animation starts, both initially and after looping. Defaults to 0.
4170
- *
4171
- * When changing the `animationStart` time, it often makes sense to set {@link #animationLast} to the same
4172
- * value to prevent timeline keys before the start time from triggering. */
4173
- this.animationStart = 0;
4174
- /** Seconds for the last frame of this animation. Non-looping animations won't play past this time. Looping animations will
4175
- * loop back to {@link #animationStart} at this time. Defaults to the animation {@link Animation#duration}. */
4176
- this.animationEnd = 0;
4177
- /** The time in seconds this animation was last applied. Some timelines use this for one-time triggers. Eg, when this
4178
- * animation is applied, event timelines will fire all events between the `animationLast` time (exclusive) and
4179
- * `animationTime` (inclusive). Defaults to -1 to ensure triggers on frame 0 happen the first time this animation
4180
- * is applied. */
4181
- this.animationLast = 0;
4182
- this.nextAnimationLast = 0;
4183
- /** Seconds to postpone playing the animation. When this track entry is the current track entry, `delay`
4184
- * postpones incrementing the {@link #trackTime}. When this track entry is queued, `delay` is the time from
4185
- * the start of the previous animation to when this track entry will become the current track entry (ie when the previous
4186
- * track entry {@link TrackEntry#trackTime} >= this track entry's `delay`).
4187
- *
4188
- * {@link #timeScale} affects the delay. */
4189
- this.delay = 0;
4190
- /** Current time in seconds this track entry has been the current track entry. The track time determines
4191
- * {@link #animationTime}. The track time can be set to start the animation at a time other than 0, without affecting
4192
- * looping. */
4193
- this.trackTime = 0;
4194
- this.trackLast = 0;
4195
- this.nextTrackLast = 0;
4196
- /** The track time in seconds when this animation will be removed from the track. Defaults to the highest possible float
4197
- * value, meaning the animation will be applied until a new animation is set or the track is cleared. If the track end time
4198
- * is reached, no other animations are queued for playback, and mixing from any previous animations is complete, then the
4199
- * properties keyed by the animation are set to the setup pose and the track is cleared.
4200
- *
4201
- * It may be desired to use {@link AnimationState#addEmptyAnimation()} rather than have the animation
4202
- * abruptly cease being applied. */
4203
- this.trackEnd = 0;
4204
- /** Multiplier for the delta time when this track entry is updated, causing time for this animation to pass slower or
4205
- * faster. Defaults to 1.
4206
- *
4207
- * {@link #mixTime} is not affected by track entry time scale, so {@link #mixDuration} may need to be adjusted to
4208
- * match the animation speed.
4209
- *
4210
- * When using {@link AnimationState#addAnimation()} with a `delay` <= 0, note the
4211
- * {@link #delay} is set using the mix duration from the {@link AnimationStateData}, assuming time scale to be 1. If
4212
- * the time scale is not 1, the delay may need to be adjusted.
4213
- *
4214
- * See AnimationState {@link AnimationState#timeScale} for affecting all animations. */
4215
- this.timeScale = 0;
4216
- /** Values < 1 mix this animation with the skeleton's current pose (usually the pose resulting from lower tracks). Defaults
4217
- * to 1, which overwrites the skeleton's current pose with this animation.
4218
- *
4219
- * Typically track 0 is used to completely pose the skeleton, then alpha is used on higher tracks. It doesn't make sense to
4220
- * use alpha on track 0 if the skeleton pose is from the last frame render. */
4221
- this.alpha = 0;
4222
- /** Seconds from 0 to the {@link #getMixDuration()} when mixing from the previous animation to this animation. May be
4223
- * slightly more than `mixDuration` when the mix is complete. */
4224
- this.mixTime = 0;
4225
- /** Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData
4226
- * {@link AnimationStateData#getMix()} based on the animation before this animation (if any).
4227
- *
4228
- * A mix duration of 0 still mixes out over one frame to provide the track entry being mixed out a chance to revert the
4229
- * properties it was animating.
4230
- *
4231
- * The `mixDuration` can be set manually rather than use the value from
4232
- * {@link AnimationStateData#getMix()}. In that case, the `mixDuration` can be set for a new
4233
- * track entry only before {@link AnimationState#update(float)} is first called.
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}, not a mix duration set
4237
- * afterward. */
4238
- this.mixDuration = 0;
4239
- this.interruptAlpha = 0;
4240
- this.totalAlpha = 0;
4241
- /** Controls how properties keyed in the animation are mixed with lower tracks. Defaults to {@link MixBlend#replace}, which
4242
- * replaces the values from the lower tracks with the animation values. {@link MixBlend#add} adds the animation values to
4243
- * the values from the lower tracks.
4244
- *
4245
- * The `mixBlend` can be set for a new track entry only before {@link AnimationState#apply()} is first
4246
- * called. */
4247
- this.mixBlend = 2 /* replace */;
4248
- this.timelineMode = new Array();
4249
- this.timelineHoldMix = new Array();
4250
- this.timelinesRotation = new Array();
4251
- }
4143
+ /** The animation to apply for this track entry. */
4144
+ animation = null;
4145
+ previous = null;
4146
+ /** The animation queued to start after this animation, or null. `next` makes up a linked list. */
4147
+ next = null;
4148
+ /** The track entry for the previous animation when mixing from the previous animation to this animation, or null if no
4149
+ * mixing is currently occuring. When mixing from multiple animations, `mixingFrom` makes up a linked list. */
4150
+ mixingFrom = null;
4151
+ /** The track entry for the next animation when mixing from this animation to the next animation, or null if no mixing is
4152
+ * currently occuring. When mixing to multiple animations, `mixingTo` makes up a linked list. */
4153
+ mixingTo = null;
4154
+ /** The listener for events generated by this track entry, or null.
4155
+ *
4156
+ * A track entry returned from {@link AnimationState#setAnimation()} is already the current animation
4157
+ * for the track, so the track entry listener {@link AnimationStateListener#start()} will not be called. */
4158
+ listener = null;
4159
+ /** The index of the track where this track entry is either current or queued.
4160
+ *
4161
+ * See {@link AnimationState#getCurrent()}. */
4162
+ trackIndex = 0;
4163
+ /** If true, the animation will repeat. If false it will not, instead its last frame is applied if played beyond its
4164
+ * duration. */
4165
+ loop = false;
4166
+ /** If true, when mixing from the previous animation to this animation, the previous animation is applied as normal instead
4167
+ * of being mixed out.
4168
+ *
4169
+ * When mixing between animations that key the same property, if a lower track also keys that property then the value will
4170
+ * briefly dip toward the lower track value during the mix. This happens because the first animation mixes from 100% to 0%
4171
+ * while the second animation mixes from 0% to 100%. Setting `holdPrevious` to true applies the first animation
4172
+ * at 100% during the mix so the lower track value is overwritten. Such dipping does not occur on the lowest track which
4173
+ * keys the property, only when a higher track also keys the property.
4174
+ *
4175
+ * Snapping will occur if `holdPrevious` is true and this animation does not key all the same properties as the
4176
+ * previous animation. */
4177
+ holdPrevious = false;
4178
+ reverse = false;
4179
+ shortestRotation = false;
4180
+ /** When the mix percentage ({@link #mixTime} / {@link #mixDuration}) is less than the
4181
+ * `eventThreshold`, event timelines are applied while this animation is being mixed out. Defaults to 0, so event
4182
+ * timelines are not applied while this animation is being mixed out. */
4183
+ eventThreshold = 0;
4184
+ /** When the mix percentage ({@link #mixtime} / {@link #mixDuration}) is less than the
4185
+ * `attachmentThreshold`, attachment timelines are applied while this animation is being mixed out. Defaults to
4186
+ * 0, so attachment timelines are not applied while this animation is being mixed out. */
4187
+ attachmentThreshold = 0;
4188
+ /** When the mix percentage ({@link #mixTime} / {@link #mixDuration}) is less than the
4189
+ * `drawOrderThreshold`, draw order timelines are applied while this animation is being mixed out. Defaults to 0,
4190
+ * so draw order timelines are not applied while this animation is being mixed out. */
4191
+ drawOrderThreshold = 0;
4192
+ /** Seconds when this animation starts, both initially and after looping. Defaults to 0.
4193
+ *
4194
+ * When changing the `animationStart` time, it often makes sense to set {@link #animationLast} to the same
4195
+ * value to prevent timeline keys before the start time from triggering. */
4196
+ animationStart = 0;
4197
+ /** Seconds for the last frame of this animation. Non-looping animations won't play past this time. Looping animations will
4198
+ * loop back to {@link #animationStart} at this time. Defaults to the animation {@link Animation#duration}. */
4199
+ animationEnd = 0;
4200
+ /** The time in seconds this animation was last applied. Some timelines use this for one-time triggers. Eg, when this
4201
+ * animation is applied, event timelines will fire all events between the `animationLast` time (exclusive) and
4202
+ * `animationTime` (inclusive). Defaults to -1 to ensure triggers on frame 0 happen the first time this animation
4203
+ * is applied. */
4204
+ animationLast = 0;
4205
+ nextAnimationLast = 0;
4206
+ /** Seconds to postpone playing the animation. When this track entry is the current track entry, `delay`
4207
+ * postpones incrementing the {@link #trackTime}. When this track entry is queued, `delay` is the time from
4208
+ * the start of the previous animation to when this track entry will become the current track entry (ie when the previous
4209
+ * track entry {@link TrackEntry#trackTime} >= this track entry's `delay`).
4210
+ *
4211
+ * {@link #timeScale} affects the delay. */
4212
+ delay = 0;
4213
+ /** Current time in seconds this track entry has been the current track entry. The track time determines
4214
+ * {@link #animationTime}. The track time can be set to start the animation at a time other than 0, without affecting
4215
+ * looping. */
4216
+ trackTime = 0;
4217
+ trackLast = 0;
4218
+ nextTrackLast = 0;
4219
+ /** The track time in seconds when this animation will be removed from the track. Defaults to the highest possible float
4220
+ * value, meaning the animation will be applied until a new animation is set or the track is cleared. If the track end time
4221
+ * is reached, no other animations are queued for playback, and mixing from any previous animations is complete, then the
4222
+ * properties keyed by the animation are set to the setup pose and the track is cleared.
4223
+ *
4224
+ * It may be desired to use {@link AnimationState#addEmptyAnimation()} rather than have the animation
4225
+ * abruptly cease being applied. */
4226
+ trackEnd = 0;
4227
+ /** Multiplier for the delta time when this track entry is updated, causing time for this animation to pass slower or
4228
+ * faster. Defaults to 1.
4229
+ *
4230
+ * {@link #mixTime} is not affected by track entry time scale, so {@link #mixDuration} may need to be adjusted to
4231
+ * match the animation speed.
4232
+ *
4233
+ * When using {@link AnimationState#addAnimation()} with a `delay` <= 0, note the
4234
+ * {@link #delay} is set using the mix duration from the {@link AnimationStateData}, assuming time scale to be 1. If
4235
+ * the time scale is not 1, the delay may need to be adjusted.
4236
+ *
4237
+ * See AnimationState {@link AnimationState#timeScale} for affecting all animations. */
4238
+ timeScale = 0;
4239
+ /** Values < 1 mix this animation with the skeleton's current pose (usually the pose resulting from lower tracks). Defaults
4240
+ * to 1, which overwrites the skeleton's current pose with this animation.
4241
+ *
4242
+ * Typically track 0 is used to completely pose the skeleton, then alpha is used on higher tracks. It doesn't make sense to
4243
+ * use alpha on track 0 if the skeleton pose is from the last frame render. */
4244
+ alpha = 0;
4245
+ /** Seconds from 0 to the {@link #getMixDuration()} when mixing from the previous animation to this animation. May be
4246
+ * slightly more than `mixDuration` when the mix is complete. */
4247
+ mixTime = 0;
4248
+ /** Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData
4249
+ * {@link AnimationStateData#getMix()} based on the animation before this animation (if any).
4250
+ *
4251
+ * A mix duration of 0 still mixes out over one frame to provide the track entry being mixed out a chance to revert the
4252
+ * properties it was animating.
4253
+ *
4254
+ * The `mixDuration` can be set manually rather than use the value from
4255
+ * {@link AnimationStateData#getMix()}. In that case, the `mixDuration` can be set for a new
4256
+ * track entry only before {@link AnimationState#update(float)} is first called.
4257
+ *
4258
+ * When using {@link AnimationState#addAnimation()} with a `delay` <= 0, note the
4259
+ * {@link #delay} is set using the mix duration from the {@link AnimationStateData}, not a mix duration set
4260
+ * afterward. */
4261
+ mixDuration = 0;
4262
+ interruptAlpha = 0;
4263
+ totalAlpha = 0;
4264
+ /** Controls how properties keyed in the animation are mixed with lower tracks. Defaults to {@link MixBlend#replace}, which
4265
+ * replaces the values from the lower tracks with the animation values. {@link MixBlend#add} adds the animation values to
4266
+ * the values from the lower tracks.
4267
+ *
4268
+ * The `mixBlend` can be set for a new track entry only before {@link AnimationState#apply()} is first
4269
+ * called. */
4270
+ mixBlend = 2 /* replace */;
4271
+ timelineMode = new Array();
4272
+ timelineHoldMix = new Array();
4273
+ timelinesRotation = new Array();
4252
4274
  reset() {
4253
4275
  this.next = null;
4254
4276
  this.previous = null;
@@ -4304,9 +4326,10 @@ var spine = (() => {
4304
4326
  }
4305
4327
  };
4306
4328
  var EventQueue = class {
4329
+ objects = [];
4330
+ drainDisabled = false;
4331
+ animState;
4307
4332
  constructor(animState) {
4308
- this.objects = [];
4309
- this.drainDisabled = false;
4310
4333
  this.animState = animState;
4311
4334
  }
4312
4335
  start(entry) {
@@ -4443,10 +4466,12 @@ var spine = (() => {
4443
4466
 
4444
4467
  // spine-core/src/AnimationStateData.ts
4445
4468
  var AnimationStateData = class {
4469
+ /** The SkeletonData to look up animations when they are specified by name. */
4470
+ skeletonData;
4471
+ animationToMixTime = {};
4472
+ /** The mix duration to use when no mix duration has been defined between two animations. */
4473
+ defaultMix = 0;
4446
4474
  constructor(skeletonData) {
4447
- this.animationToMixTime = {};
4448
- /** The mix duration to use when no mix duration has been defined between two animations. */
4449
- this.defaultMix = 0;
4450
4475
  if (!skeletonData)
4451
4476
  throw new Error("skeletonData cannot be null.");
4452
4477
  this.skeletonData = skeletonData;
@@ -4485,9 +4510,9 @@ var spine = (() => {
4485
4510
 
4486
4511
  // spine-core/src/attachments/BoundingBoxAttachment.ts
4487
4512
  var BoundingBoxAttachment = class extends VertexAttachment {
4513
+ color = new Color(1, 1, 1, 1);
4488
4514
  constructor(name) {
4489
4515
  super(name);
4490
- this.color = new Color(1, 1, 1, 1);
4491
4516
  }
4492
4517
  copy() {
4493
4518
  let copy = new BoundingBoxAttachment(this.name);
@@ -4499,16 +4524,16 @@ var spine = (() => {
4499
4524
 
4500
4525
  // spine-core/src/attachments/ClippingAttachment.ts
4501
4526
  var ClippingAttachment = class extends VertexAttachment {
4527
+ /** Clipping is performed between the clipping polygon's slot and the end slot. Returns null if clipping is done until the end of
4528
+ * the skeleton's rendering. */
4529
+ endSlot = null;
4530
+ // Nonessential.
4531
+ /** The color of the clipping polygon as it was in Spine. Available only when nonessential data was exported. Clipping polygons
4532
+ * are not usually rendered at runtime. */
4533
+ color = new Color(0.2275, 0.2275, 0.8078, 1);
4502
4534
  // ce3a3aff
4503
4535
  constructor(name) {
4504
4536
  super(name);
4505
- /** Clipping is performed between the clipping polygon's slot and the end slot. Returns null if clipping is done until the end of
4506
- * the skeleton's rendering. */
4507
- this.endSlot = null;
4508
- // Nonessential.
4509
- /** The color of the clipping polygon as it was in Spine. Available only when nonessential data was exported. Clipping polygons
4510
- * are not usually rendered at runtime. */
4511
- this.color = new Color(0.2275, 0.2275, 0.8078, 1);
4512
4537
  }
4513
4538
  copy() {
4514
4539
  let copy = new ClippingAttachment(this.name);
@@ -4521,6 +4546,7 @@ var spine = (() => {
4521
4546
 
4522
4547
  // spine-core/src/Texture.ts
4523
4548
  var Texture = class {
4549
+ _image;
4524
4550
  constructor(image) {
4525
4551
  this._image = image;
4526
4552
  }
@@ -4545,19 +4571,18 @@ var spine = (() => {
4545
4571
  return TextureWrap3;
4546
4572
  })(TextureWrap || {});
4547
4573
  var TextureRegion = class {
4548
- constructor() {
4549
- this.u = 0;
4550
- this.v = 0;
4551
- this.u2 = 0;
4552
- this.v2 = 0;
4553
- this.width = 0;
4554
- this.height = 0;
4555
- this.degrees = 0;
4556
- this.offsetX = 0;
4557
- this.offsetY = 0;
4558
- this.originalWidth = 0;
4559
- this.originalHeight = 0;
4560
- }
4574
+ texture;
4575
+ u = 0;
4576
+ v = 0;
4577
+ u2 = 0;
4578
+ v2 = 0;
4579
+ width = 0;
4580
+ height = 0;
4581
+ degrees = 0;
4582
+ offsetX = 0;
4583
+ offsetY = 0;
4584
+ originalWidth = 0;
4585
+ originalHeight = 0;
4561
4586
  };
4562
4587
  var FakeTexture = class extends Texture {
4563
4588
  setFilters(minFilter, magFilter) {
@@ -4570,9 +4595,9 @@ var spine = (() => {
4570
4595
 
4571
4596
  // spine-core/src/TextureAtlas.ts
4572
4597
  var TextureAtlas = class {
4598
+ pages = new Array();
4599
+ regions = new Array();
4573
4600
  constructor(atlasText) {
4574
- this.pages = new Array();
4575
- this.regions = new Array();
4576
4601
  let reader = new TextureAtlasReader(atlasText);
4577
4602
  let entry = new Array(4);
4578
4603
  let pageFields = {};
@@ -4720,15 +4745,15 @@ var spine = (() => {
4720
4745
  page.setTexture(assetManager.get(pathPrefix + page.name));
4721
4746
  }
4722
4747
  dispose() {
4723
- var _a;
4724
4748
  for (let i = 0; i < this.pages.length; i++) {
4725
- (_a = this.pages[i].texture) == null ? void 0 : _a.dispose();
4749
+ this.pages[i].texture?.dispose();
4726
4750
  }
4727
4751
  }
4728
4752
  };
4729
4753
  var TextureAtlasReader = class {
4754
+ lines;
4755
+ index = 0;
4730
4756
  constructor(text) {
4731
- this.index = 0;
4732
4757
  this.lines = text.split(/\r\n|\r|\n/);
4733
4758
  }
4734
4759
  readLine() {
@@ -4760,16 +4785,17 @@ var spine = (() => {
4760
4785
  }
4761
4786
  };
4762
4787
  var TextureAtlasPage = class {
4788
+ name;
4789
+ minFilter = 9728 /* Nearest */;
4790
+ magFilter = 9728 /* Nearest */;
4791
+ uWrap = 33071 /* ClampToEdge */;
4792
+ vWrap = 33071 /* ClampToEdge */;
4793
+ texture = null;
4794
+ width = 0;
4795
+ height = 0;
4796
+ pma = false;
4797
+ regions = new Array();
4763
4798
  constructor(name) {
4764
- this.minFilter = 9728 /* Nearest */;
4765
- this.magFilter = 9728 /* Nearest */;
4766
- this.uWrap = 33071 /* ClampToEdge */;
4767
- this.vWrap = 33071 /* ClampToEdge */;
4768
- this.texture = null;
4769
- this.width = 0;
4770
- this.height = 0;
4771
- this.pma = false;
4772
- this.regions = new Array();
4773
4799
  this.name = name;
4774
4800
  }
4775
4801
  setTexture(texture) {
@@ -4781,18 +4807,20 @@ var spine = (() => {
4781
4807
  }
4782
4808
  };
4783
4809
  var TextureAtlasRegion = class extends TextureRegion {
4810
+ page;
4811
+ name;
4812
+ x = 0;
4813
+ y = 0;
4814
+ offsetX = 0;
4815
+ offsetY = 0;
4816
+ originalWidth = 0;
4817
+ originalHeight = 0;
4818
+ index = 0;
4819
+ degrees = 0;
4820
+ names = null;
4821
+ values = null;
4784
4822
  constructor(page, name) {
4785
4823
  super();
4786
- this.x = 0;
4787
- this.y = 0;
4788
- this.offsetX = 0;
4789
- this.offsetY = 0;
4790
- this.originalWidth = 0;
4791
- this.originalHeight = 0;
4792
- this.index = 0;
4793
- this.degrees = 0;
4794
- this.names = null;
4795
- this.values = null;
4796
4824
  this.page = page;
4797
4825
  this.name = name;
4798
4826
  page.regions.push(this);
@@ -4801,31 +4829,33 @@ var spine = (() => {
4801
4829
 
4802
4830
  // spine-core/src/attachments/MeshAttachment.ts
4803
4831
  var MeshAttachment = class extends VertexAttachment {
4832
+ region = null;
4833
+ /** The name of the texture region for this attachment. */
4834
+ path;
4835
+ /** The UV pair for each vertex, normalized within the texture region. */
4836
+ regionUVs = [];
4837
+ /** The UV pair for each vertex, normalized within the entire texture.
4838
+ *
4839
+ * See {@link #updateUVs}. */
4840
+ uvs = [];
4841
+ /** Triplets of vertex indices which describe the mesh's triangulation. */
4842
+ triangles = [];
4843
+ /** The color to tint the mesh. */
4844
+ color = new Color(1, 1, 1, 1);
4845
+ /** The width of the mesh's image. Available only when nonessential data was exported. */
4846
+ width = 0;
4847
+ /** The height of the mesh's image. Available only when nonessential data was exported. */
4848
+ height = 0;
4849
+ /** The number of entries at the beginning of {@link #vertices} that make up the mesh hull. */
4850
+ hullLength = 0;
4851
+ /** Vertex index pairs describing edges for controling triangulation. Mesh triangles will never cross edges. Only available if
4852
+ * nonessential data was exported. Triangulation is not performed at runtime. */
4853
+ edges = [];
4854
+ parentMesh = null;
4855
+ sequence = null;
4856
+ tempColor = new Color(0, 0, 0, 0);
4804
4857
  constructor(name, path) {
4805
4858
  super(name);
4806
- this.region = null;
4807
- /** The UV pair for each vertex, normalized within the texture region. */
4808
- this.regionUVs = [];
4809
- /** The UV pair for each vertex, normalized within the entire texture.
4810
- *
4811
- * See {@link #updateUVs}. */
4812
- this.uvs = [];
4813
- /** Triplets of vertex indices which describe the mesh's triangulation. */
4814
- this.triangles = [];
4815
- /** The color to tint the mesh. */
4816
- this.color = new Color(1, 1, 1, 1);
4817
- /** The width of the mesh's image. Available only when nonessential data was exported. */
4818
- this.width = 0;
4819
- /** The height of the mesh's image. Available only when nonessential data was exported. */
4820
- this.height = 0;
4821
- /** The number of entries at the beginning of {@link #vertices} that make up the mesh hull. */
4822
- this.hullLength = 0;
4823
- /** Vertex index pairs describing edges for controling triangulation. Mesh triangles will never cross edges. Only available if
4824
- * nonessential data was exported. Triangulation is not performed at runtime. */
4825
- this.edges = [];
4826
- this.parentMesh = null;
4827
- this.sequence = null;
4828
- this.tempColor = new Color(0, 0, 0, 0);
4829
4859
  this.path = path;
4830
4860
  }
4831
4861
  /** Calculates {@link #uvs} using the {@link #regionUVs} and region. Must be called if the region, the region's properties, or
@@ -4952,18 +4982,18 @@ var spine = (() => {
4952
4982
 
4953
4983
  // spine-core/src/attachments/PathAttachment.ts
4954
4984
  var PathAttachment = class extends VertexAttachment {
4985
+ /** The lengths along the path in the setup pose from the start of the path to the end of each Bezier curve. */
4986
+ lengths = [];
4987
+ /** If true, the start and end knots are connected. */
4988
+ closed = false;
4989
+ /** If true, additional calculations are performed to make calculating positions along the path more accurate. If false, fewer
4990
+ * calculations are performed but calculating positions along the path is less accurate. */
4991
+ constantSpeed = false;
4992
+ /** The color of the path as it was in Spine. Available only when nonessential data was exported. Paths are not usually
4993
+ * rendered at runtime. */
4994
+ color = new Color(1, 1, 1, 1);
4955
4995
  constructor(name) {
4956
4996
  super(name);
4957
- /** The lengths along the path in the setup pose from the start of the path to the end of each Bezier curve. */
4958
- this.lengths = [];
4959
- /** If true, the start and end knots are connected. */
4960
- this.closed = false;
4961
- /** If true, additional calculations are performed to make calculating positions along the path more accurate. If false, fewer
4962
- * calculations are performed but calculating positions along the path is less accurate. */
4963
- this.constantSpeed = false;
4964
- /** The color of the path as it was in Spine. Available only when nonessential data was exported. Paths are not usually
4965
- * rendered at runtime. */
4966
- this.color = new Color(1, 1, 1, 1);
4967
4997
  }
4968
4998
  copy() {
4969
4999
  let copy = new PathAttachment(this.name);
@@ -4979,14 +5009,14 @@ var spine = (() => {
4979
5009
 
4980
5010
  // spine-core/src/attachments/PointAttachment.ts
4981
5011
  var PointAttachment = class extends VertexAttachment {
5012
+ x = 0;
5013
+ y = 0;
5014
+ rotation = 0;
5015
+ /** The color of the point attachment as it was in Spine. Available only when nonessential data was exported. Point attachments
5016
+ * are not usually rendered at runtime. */
5017
+ color = new Color(0.38, 0.94, 0, 1);
4982
5018
  constructor(name) {
4983
5019
  super(name);
4984
- this.x = 0;
4985
- this.y = 0;
4986
- this.rotation = 0;
4987
- /** The color of the point attachment as it was in Spine. Available only when nonessential data was exported. Point attachments
4988
- * are not usually rendered at runtime. */
4989
- this.color = new Color(0.38, 0.94, 0, 1);
4990
5020
  }
4991
5021
  computeWorldPosition(bone, point) {
4992
5022
  point.x = this.x * bone.a + this.y * bone.b + bone.worldX;
@@ -5011,32 +5041,34 @@ var spine = (() => {
5011
5041
 
5012
5042
  // spine-core/src/attachments/RegionAttachment.ts
5013
5043
  var _RegionAttachment = class extends Attachment {
5044
+ /** The local x translation. */
5045
+ x = 0;
5046
+ /** The local y translation. */
5047
+ y = 0;
5048
+ /** The local scaleX. */
5049
+ scaleX = 1;
5050
+ /** The local scaleY. */
5051
+ scaleY = 1;
5052
+ /** The local rotation. */
5053
+ rotation = 0;
5054
+ /** The width of the region attachment in Spine. */
5055
+ width = 0;
5056
+ /** The height of the region attachment in Spine. */
5057
+ height = 0;
5058
+ /** The color to tint the region attachment. */
5059
+ color = new Color(1, 1, 1, 1);
5060
+ /** The name of the texture region for this attachment. */
5061
+ path;
5062
+ region = null;
5063
+ sequence = null;
5064
+ /** For each of the 4 vertices, a pair of <code>x,y</code> values that is the local position of the vertex.
5065
+ *
5066
+ * See {@link #updateOffset()}. */
5067
+ offset = Utils.newFloatArray(8);
5068
+ uvs = Utils.newFloatArray(8);
5069
+ tempColor = new Color(1, 1, 1, 1);
5014
5070
  constructor(name, path) {
5015
5071
  super(name);
5016
- /** The local x translation. */
5017
- this.x = 0;
5018
- /** The local y translation. */
5019
- this.y = 0;
5020
- /** The local scaleX. */
5021
- this.scaleX = 1;
5022
- /** The local scaleY. */
5023
- this.scaleY = 1;
5024
- /** The local rotation. */
5025
- this.rotation = 0;
5026
- /** The width of the region attachment in Spine. */
5027
- this.width = 0;
5028
- /** The height of the region attachment in Spine. */
5029
- this.height = 0;
5030
- /** The color to tint the region attachment. */
5031
- this.color = new Color(1, 1, 1, 1);
5032
- this.region = null;
5033
- this.sequence = null;
5034
- /** For each of the 4 vertices, a pair of <code>x,y</code> values that is the local position of the vertex.
5035
- *
5036
- * See {@link #updateOffset()}. */
5037
- this.offset = Utils.newFloatArray(8);
5038
- this.uvs = Utils.newFloatArray(8);
5039
- this.tempColor = new Color(1, 1, 1, 1);
5040
5072
  this.path = path;
5041
5073
  }
5042
5074
  /** Calculates the {@link #offset} using the region settings. Must be called after changing region settings. */
@@ -5157,41 +5189,42 @@ var spine = (() => {
5157
5189
  }
5158
5190
  };
5159
5191
  var RegionAttachment = _RegionAttachment;
5160
- RegionAttachment.X1 = 0;
5161
- RegionAttachment.Y1 = 1;
5162
- RegionAttachment.C1R = 2;
5163
- RegionAttachment.C1G = 3;
5164
- RegionAttachment.C1B = 4;
5165
- RegionAttachment.C1A = 5;
5166
- RegionAttachment.U1 = 6;
5167
- RegionAttachment.V1 = 7;
5168
- RegionAttachment.X2 = 8;
5169
- RegionAttachment.Y2 = 9;
5170
- RegionAttachment.C2R = 10;
5171
- RegionAttachment.C2G = 11;
5172
- RegionAttachment.C2B = 12;
5173
- RegionAttachment.C2A = 13;
5174
- RegionAttachment.U2 = 14;
5175
- RegionAttachment.V2 = 15;
5176
- RegionAttachment.X3 = 16;
5177
- RegionAttachment.Y3 = 17;
5178
- RegionAttachment.C3R = 18;
5179
- RegionAttachment.C3G = 19;
5180
- RegionAttachment.C3B = 20;
5181
- RegionAttachment.C3A = 21;
5182
- RegionAttachment.U3 = 22;
5183
- RegionAttachment.V3 = 23;
5184
- RegionAttachment.X4 = 24;
5185
- RegionAttachment.Y4 = 25;
5186
- RegionAttachment.C4R = 26;
5187
- RegionAttachment.C4G = 27;
5188
- RegionAttachment.C4B = 28;
5189
- RegionAttachment.C4A = 29;
5190
- RegionAttachment.U4 = 30;
5191
- RegionAttachment.V4 = 31;
5192
+ __publicField(RegionAttachment, "X1", 0);
5193
+ __publicField(RegionAttachment, "Y1", 1);
5194
+ __publicField(RegionAttachment, "C1R", 2);
5195
+ __publicField(RegionAttachment, "C1G", 3);
5196
+ __publicField(RegionAttachment, "C1B", 4);
5197
+ __publicField(RegionAttachment, "C1A", 5);
5198
+ __publicField(RegionAttachment, "U1", 6);
5199
+ __publicField(RegionAttachment, "V1", 7);
5200
+ __publicField(RegionAttachment, "X2", 8);
5201
+ __publicField(RegionAttachment, "Y2", 9);
5202
+ __publicField(RegionAttachment, "C2R", 10);
5203
+ __publicField(RegionAttachment, "C2G", 11);
5204
+ __publicField(RegionAttachment, "C2B", 12);
5205
+ __publicField(RegionAttachment, "C2A", 13);
5206
+ __publicField(RegionAttachment, "U2", 14);
5207
+ __publicField(RegionAttachment, "V2", 15);
5208
+ __publicField(RegionAttachment, "X3", 16);
5209
+ __publicField(RegionAttachment, "Y3", 17);
5210
+ __publicField(RegionAttachment, "C3R", 18);
5211
+ __publicField(RegionAttachment, "C3G", 19);
5212
+ __publicField(RegionAttachment, "C3B", 20);
5213
+ __publicField(RegionAttachment, "C3A", 21);
5214
+ __publicField(RegionAttachment, "U3", 22);
5215
+ __publicField(RegionAttachment, "V3", 23);
5216
+ __publicField(RegionAttachment, "X4", 24);
5217
+ __publicField(RegionAttachment, "Y4", 25);
5218
+ __publicField(RegionAttachment, "C4R", 26);
5219
+ __publicField(RegionAttachment, "C4G", 27);
5220
+ __publicField(RegionAttachment, "C4B", 28);
5221
+ __publicField(RegionAttachment, "C4A", 29);
5222
+ __publicField(RegionAttachment, "U4", 30);
5223
+ __publicField(RegionAttachment, "V4", 31);
5192
5224
 
5193
5225
  // spine-core/src/AtlasAttachmentLoader.ts
5194
5226
  var AtlasAttachmentLoader = class {
5227
+ atlas;
5195
5228
  constructor(atlas) {
5196
5229
  this.atlas = atlas;
5197
5230
  }
@@ -5245,36 +5278,38 @@ var spine = (() => {
5245
5278
 
5246
5279
  // spine-core/src/BoneData.ts
5247
5280
  var BoneData = class {
5281
+ /** The index of the bone in {@link Skeleton#getBones()}. */
5282
+ index = 0;
5283
+ /** The name of the bone, which is unique across all bones in the skeleton. */
5284
+ name;
5285
+ /** @returns May be null. */
5286
+ parent = null;
5287
+ /** The bone's length. */
5288
+ length = 0;
5289
+ /** The local x translation. */
5290
+ x = 0;
5291
+ /** The local y translation. */
5292
+ y = 0;
5293
+ /** The local rotation. */
5294
+ rotation = 0;
5295
+ /** The local scaleX. */
5296
+ scaleX = 1;
5297
+ /** The local scaleY. */
5298
+ scaleY = 1;
5299
+ /** The local shearX. */
5300
+ shearX = 0;
5301
+ /** The local shearX. */
5302
+ shearY = 0;
5303
+ /** The transform mode for how parent world transforms affect this bone. */
5304
+ transformMode = TransformMode.Normal;
5305
+ /** When true, {@link Skeleton#updateWorldTransform()} only updates this bone if the {@link Skeleton#skin} contains this
5306
+ * bone.
5307
+ * @see Skin#bones */
5308
+ skinRequired = false;
5309
+ /** The color of the bone as it was in Spine. Available only when nonessential data was exported. Bones are not usually
5310
+ * rendered at runtime. */
5311
+ color = new Color();
5248
5312
  constructor(index, name, parent) {
5249
- /** The index of the bone in {@link Skeleton#getBones()}. */
5250
- this.index = 0;
5251
- /** @returns May be null. */
5252
- this.parent = null;
5253
- /** The bone's length. */
5254
- this.length = 0;
5255
- /** The local x translation. */
5256
- this.x = 0;
5257
- /** The local y translation. */
5258
- this.y = 0;
5259
- /** The local rotation. */
5260
- this.rotation = 0;
5261
- /** The local scaleX. */
5262
- this.scaleX = 1;
5263
- /** The local scaleY. */
5264
- this.scaleY = 1;
5265
- /** The local shearX. */
5266
- this.shearX = 0;
5267
- /** The local shearX. */
5268
- this.shearY = 0;
5269
- /** The transform mode for how parent world transforms affect this bone. */
5270
- this.transformMode = TransformMode.Normal;
5271
- /** When true, {@link Skeleton#updateWorldTransform()} only updates this bone if the {@link Skeleton#skin} contains this
5272
- * bone.
5273
- * @see Skin#bones */
5274
- this.skinRequired = false;
5275
- /** The color of the bone as it was in Spine. Available only when nonessential data was exported. Bones are not usually
5276
- * rendered at runtime. */
5277
- this.color = new Color();
5278
5313
  if (index < 0)
5279
5314
  throw new Error("index must be >= 0.");
5280
5315
  if (!name)
@@ -5295,54 +5330,58 @@ var spine = (() => {
5295
5330
 
5296
5331
  // spine-core/src/Bone.ts
5297
5332
  var Bone = class {
5333
+ /** The bone's setup pose data. */
5334
+ data;
5335
+ /** The skeleton this bone belongs to. */
5336
+ skeleton;
5337
+ /** The parent bone, or null if this is the root bone. */
5338
+ parent = null;
5339
+ /** The immediate children of this bone. */
5340
+ children = new Array();
5341
+ /** The local x translation. */
5342
+ x = 0;
5343
+ /** The local y translation. */
5344
+ y = 0;
5345
+ /** The local rotation in degrees, counter clockwise. */
5346
+ rotation = 0;
5347
+ /** The local scaleX. */
5348
+ scaleX = 0;
5349
+ /** The local scaleY. */
5350
+ scaleY = 0;
5351
+ /** The local shearX. */
5352
+ shearX = 0;
5353
+ /** The local shearY. */
5354
+ shearY = 0;
5355
+ /** The applied local x translation. */
5356
+ ax = 0;
5357
+ /** The applied local y translation. */
5358
+ ay = 0;
5359
+ /** The applied local rotation in degrees, counter clockwise. */
5360
+ arotation = 0;
5361
+ /** The applied local scaleX. */
5362
+ ascaleX = 0;
5363
+ /** The applied local scaleY. */
5364
+ ascaleY = 0;
5365
+ /** The applied local shearX. */
5366
+ ashearX = 0;
5367
+ /** The applied local shearY. */
5368
+ ashearY = 0;
5369
+ /** Part of the world transform matrix for the X axis. If changed, {@link #updateAppliedTransform()} should be called. */
5370
+ a = 0;
5371
+ /** Part of the world transform matrix for the Y axis. If changed, {@link #updateAppliedTransform()} should be called. */
5372
+ b = 0;
5373
+ /** Part of the world transform matrix for the X axis. If changed, {@link #updateAppliedTransform()} should be called. */
5374
+ c = 0;
5375
+ /** Part of the world transform matrix for the Y axis. If changed, {@link #updateAppliedTransform()} should be called. */
5376
+ d = 0;
5377
+ /** The world X position. If changed, {@link #updateAppliedTransform()} should be called. */
5378
+ worldY = 0;
5379
+ /** The world Y position. If changed, {@link #updateAppliedTransform()} should be called. */
5380
+ worldX = 0;
5381
+ sorted = false;
5382
+ active = false;
5298
5383
  /** @param parent May be null. */
5299
5384
  constructor(data, skeleton, parent) {
5300
- /** The parent bone, or null if this is the root bone. */
5301
- this.parent = null;
5302
- /** The immediate children of this bone. */
5303
- this.children = new Array();
5304
- /** The local x translation. */
5305
- this.x = 0;
5306
- /** The local y translation. */
5307
- this.y = 0;
5308
- /** The local rotation in degrees, counter clockwise. */
5309
- this.rotation = 0;
5310
- /** The local scaleX. */
5311
- this.scaleX = 0;
5312
- /** The local scaleY. */
5313
- this.scaleY = 0;
5314
- /** The local shearX. */
5315
- this.shearX = 0;
5316
- /** The local shearY. */
5317
- this.shearY = 0;
5318
- /** The applied local x translation. */
5319
- this.ax = 0;
5320
- /** The applied local y translation. */
5321
- this.ay = 0;
5322
- /** The applied local rotation in degrees, counter clockwise. */
5323
- this.arotation = 0;
5324
- /** The applied local scaleX. */
5325
- this.ascaleX = 0;
5326
- /** The applied local scaleY. */
5327
- this.ascaleY = 0;
5328
- /** The applied local shearX. */
5329
- this.ashearX = 0;
5330
- /** The applied local shearY. */
5331
- this.ashearY = 0;
5332
- /** Part of the world transform matrix for the X axis. If changed, {@link #updateAppliedTransform()} should be called. */
5333
- this.a = 0;
5334
- /** Part of the world transform matrix for the Y axis. If changed, {@link #updateAppliedTransform()} should be called. */
5335
- this.b = 0;
5336
- /** Part of the world transform matrix for the X axis. If changed, {@link #updateAppliedTransform()} should be called. */
5337
- this.c = 0;
5338
- /** Part of the world transform matrix for the Y axis. If changed, {@link #updateAppliedTransform()} should be called. */
5339
- this.d = 0;
5340
- /** The world X position. If changed, {@link #updateAppliedTransform()} should be called. */
5341
- this.worldY = 0;
5342
- /** The world Y position. If changed, {@link #updateAppliedTransform()} should be called. */
5343
- this.worldX = 0;
5344
- this.sorted = false;
5345
- this.active = false;
5346
5385
  if (!data)
5347
5386
  throw new Error("data cannot be null.");
5348
5387
  if (!skeleton)
@@ -5603,12 +5642,14 @@ var spine = (() => {
5603
5642
 
5604
5643
  // spine-core/src/AssetManagerBase.ts
5605
5644
  var AssetManagerBase = class {
5645
+ pathPrefix = "";
5646
+ textureLoader;
5647
+ downloader;
5648
+ assets = {};
5649
+ errors = {};
5650
+ toLoad = 0;
5651
+ loaded = 0;
5606
5652
  constructor(textureLoader, pathPrefix = "", downloader = new Downloader()) {
5607
- this.pathPrefix = "";
5608
- this.assets = {};
5609
- this.errors = {};
5610
- this.toLoad = 0;
5611
- this.loaded = 0;
5612
5653
  this.textureLoader = textureLoader;
5613
5654
  this.pathPrefix = pathPrefix;
5614
5655
  this.downloader = downloader;
@@ -5793,10 +5834,8 @@ var spine = (() => {
5793
5834
  }
5794
5835
  };
5795
5836
  var Downloader = class {
5796
- constructor() {
5797
- this.callbacks = {};
5798
- this.rawDataUris = {};
5799
- }
5837
+ callbacks = {};
5838
+ rawDataUris = {};
5800
5839
  dataUriToString(dataUri) {
5801
5840
  if (!dataUri.startsWith("data:")) {
5802
5841
  throw new Error("Not a data URI.");
@@ -5903,13 +5942,14 @@ var spine = (() => {
5903
5942
 
5904
5943
  // spine-core/src/Event.ts
5905
5944
  var Event = class {
5945
+ data;
5946
+ intValue = 0;
5947
+ floatValue = 0;
5948
+ stringValue = null;
5949
+ time = 0;
5950
+ volume = 0;
5951
+ balance = 0;
5906
5952
  constructor(time, data) {
5907
- this.intValue = 0;
5908
- this.floatValue = 0;
5909
- this.stringValue = null;
5910
- this.time = 0;
5911
- this.volume = 0;
5912
- this.balance = 0;
5913
5953
  if (!data)
5914
5954
  throw new Error("data cannot be null.");
5915
5955
  this.time = time;
@@ -5919,32 +5959,39 @@ var spine = (() => {
5919
5959
 
5920
5960
  // spine-core/src/EventData.ts
5921
5961
  var EventData = class {
5962
+ name;
5963
+ intValue = 0;
5964
+ floatValue = 0;
5965
+ stringValue = null;
5966
+ audioPath = null;
5967
+ volume = 0;
5968
+ balance = 0;
5922
5969
  constructor(name) {
5923
- this.intValue = 0;
5924
- this.floatValue = 0;
5925
- this.stringValue = null;
5926
- this.audioPath = null;
5927
- this.volume = 0;
5928
- this.balance = 0;
5929
5970
  this.name = name;
5930
5971
  }
5931
5972
  };
5932
5973
 
5933
5974
  // spine-core/src/IkConstraint.ts
5934
5975
  var IkConstraint = class {
5976
+ /** The IK constraint's setup pose data. */
5977
+ data;
5978
+ /** The bones that will be modified by this IK constraint. */
5979
+ bones;
5980
+ /** The bone that is the IK target. */
5981
+ target;
5982
+ /** Controls the bend direction of the IK bones, either 1 or -1. */
5983
+ bendDirection = 0;
5984
+ /** When true and only a single bone is being constrained, if the target is too close, the bone is scaled to reach it. */
5985
+ compress = false;
5986
+ /** 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
5987
+ * and the parent bone has local nonuniform scale, stretch is not applied. */
5988
+ stretch = false;
5989
+ /** A percentage (0-1) that controls the mix between the constrained and unconstrained rotations. */
5990
+ mix = 1;
5991
+ /** For two bone IK, the distance from the maximum reach of the bones that rotation will slow. */
5992
+ softness = 0;
5993
+ active = false;
5935
5994
  constructor(data, skeleton) {
5936
- /** Controls the bend direction of the IK bones, either 1 or -1. */
5937
- this.bendDirection = 0;
5938
- /** When true and only a single bone is being constrained, if the target is too close, the bone is scaled to reach it. */
5939
- this.compress = false;
5940
- /** 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
5941
- * and the parent bone has local nonuniform scale, stretch is not applied. */
5942
- this.stretch = false;
5943
- /** A percentage (0-1) that controls the mix between the constrained and unconstrained rotations. */
5944
- this.mix = 1;
5945
- /** For two bone IK, the distance from the maximum reach of the bones that rotation will slow. */
5946
- this.softness = 0;
5947
- this.active = false;
5948
5995
  if (!data)
5949
5996
  throw new Error("data cannot be null.");
5950
5997
  if (!skeleton)
@@ -6202,27 +6249,10 @@ var spine = (() => {
6202
6249
 
6203
6250
  // spine-core/src/IkConstraintData.ts
6204
6251
  var IkConstraintData = class extends ConstraintData {
6205
- constructor(name) {
6206
- super(name, 0, false);
6207
- /** The bones that are constrained by this IK constraint. */
6208
- this.bones = new Array();
6209
- /** The bone that is the IK target. */
6210
- this._target = null;
6211
- /** Controls the bend direction of the IK bones, either 1 or -1. */
6212
- this.bendDirection = 1;
6213
- /** When true and only a single bone is being constrained, if the target is too close, the bone is scaled to reach it. */
6214
- this.compress = false;
6215
- /** 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
6216
- * and the parent bone has local nonuniform scale, stretch is not applied. */
6217
- this.stretch = false;
6218
- /** When true, only a single bone is being constrained, and {@link #getCompress()} or {@link #getStretch()} is used, the bone
6219
- * is scaled on both the X and Y axes. */
6220
- this.uniform = false;
6221
- /** A percentage (0-1) that controls the mix between the constrained and unconstrained rotations. */
6222
- this.mix = 1;
6223
- /** For two bone IK, the distance from the maximum reach of the bones that rotation will slow. */
6224
- this.softness = 0;
6225
- }
6252
+ /** The bones that are constrained by this IK constraint. */
6253
+ bones = new Array();
6254
+ /** The bone that is the IK target. */
6255
+ _target = null;
6226
6256
  set target(boneData) {
6227
6257
  this._target = boneData;
6228
6258
  }
@@ -6232,32 +6262,31 @@ var spine = (() => {
6232
6262
  else
6233
6263
  return this._target;
6234
6264
  }
6265
+ /** Controls the bend direction of the IK bones, either 1 or -1. */
6266
+ bendDirection = 1;
6267
+ /** When true and only a single bone is being constrained, if the target is too close, the bone is scaled to reach it. */
6268
+ compress = false;
6269
+ /** 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
6270
+ * and the parent bone has local nonuniform scale, stretch is not applied. */
6271
+ stretch = false;
6272
+ /** When true, only a single bone is being constrained, and {@link #getCompress()} or {@link #getStretch()} is used, the bone
6273
+ * is scaled on both the X and Y axes. */
6274
+ uniform = false;
6275
+ /** A percentage (0-1) that controls the mix between the constrained and unconstrained rotations. */
6276
+ mix = 1;
6277
+ /** For two bone IK, the distance from the maximum reach of the bones that rotation will slow. */
6278
+ softness = 0;
6279
+ constructor(name) {
6280
+ super(name, 0, false);
6281
+ }
6235
6282
  };
6236
6283
 
6237
6284
  // spine-core/src/PathConstraintData.ts
6238
6285
  var PathConstraintData = class extends ConstraintData {
6239
- constructor(name) {
6240
- super(name, 0, false);
6241
- /** The bones that will be modified by this path constraint. */
6242
- this.bones = new Array();
6243
- /** The slot whose path attachment will be used to constrained the bones. */
6244
- this._target = null;
6245
- /** The mode for positioning the first bone on the path. */
6246
- this.positionMode = PositionMode.Fixed;
6247
- /** The mode for positioning the bones after the first bone on the path. */
6248
- this.spacingMode = SpacingMode.Fixed;
6249
- /** The mode for adjusting the rotation of the bones. */
6250
- this.rotateMode = RotateMode.Chain;
6251
- /** An offset added to the constrained bone rotation. */
6252
- this.offsetRotation = 0;
6253
- /** The position along the path. */
6254
- this.position = 0;
6255
- /** The spacing between bones. */
6256
- this.spacing = 0;
6257
- this.mixRotate = 0;
6258
- this.mixX = 0;
6259
- this.mixY = 0;
6260
- }
6286
+ /** The bones that will be modified by this path constraint. */
6287
+ bones = new Array();
6288
+ /** The slot whose path attachment will be used to constrained the bones. */
6289
+ _target = null;
6261
6290
  set target(slotData) {
6262
6291
  this._target = slotData;
6263
6292
  }
@@ -6267,6 +6296,24 @@ var spine = (() => {
6267
6296
  else
6268
6297
  return this._target;
6269
6298
  }
6299
+ /** The mode for positioning the first bone on the path. */
6300
+ positionMode = PositionMode.Fixed;
6301
+ /** The mode for positioning the bones after the first bone on the path. */
6302
+ spacingMode = SpacingMode.Fixed;
6303
+ /** The mode for adjusting the rotation of the bones. */
6304
+ rotateMode = RotateMode.Chain;
6305
+ /** An offset added to the constrained bone rotation. */
6306
+ offsetRotation = 0;
6307
+ /** The position along the path. */
6308
+ position = 0;
6309
+ /** The spacing between bones. */
6310
+ spacing = 0;
6311
+ mixRotate = 0;
6312
+ mixX = 0;
6313
+ mixY = 0;
6314
+ constructor(name) {
6315
+ super(name, 0, false);
6316
+ }
6270
6317
  };
6271
6318
  var PositionMode = /* @__PURE__ */ ((PositionMode2) => {
6272
6319
  PositionMode2[PositionMode2["Fixed"] = 0] = "Fixed";
@@ -6289,21 +6336,27 @@ var spine = (() => {
6289
6336
 
6290
6337
  // spine-core/src/PathConstraint.ts
6291
6338
  var _PathConstraint = class {
6339
+ /** The path constraint's setup pose data. */
6340
+ data;
6341
+ /** The bones that will be modified by this path constraint. */
6342
+ bones;
6343
+ /** The slot whose path attachment will be used to constrained the bones. */
6344
+ target;
6345
+ /** The position along the path. */
6346
+ position = 0;
6347
+ /** The spacing between bones. */
6348
+ spacing = 0;
6349
+ mixRotate = 0;
6350
+ mixX = 0;
6351
+ mixY = 0;
6352
+ spaces = new Array();
6353
+ positions = new Array();
6354
+ world = new Array();
6355
+ curves = new Array();
6356
+ lengths = new Array();
6357
+ segments = new Array();
6358
+ active = false;
6292
6359
  constructor(data, skeleton) {
6293
- /** The position along the path. */
6294
- this.position = 0;
6295
- /** The spacing between bones. */
6296
- this.spacing = 0;
6297
- this.mixRotate = 0;
6298
- this.mixX = 0;
6299
- this.mixY = 0;
6300
- this.spaces = new Array();
6301
- this.positions = new Array();
6302
- this.world = new Array();
6303
- this.curves = new Array();
6304
- this.lengths = new Array();
6305
- this.segments = new Array();
6306
- this.active = false;
6307
6360
  if (!data)
6308
6361
  throw new Error("data cannot be null.");
6309
6362
  if (!skeleton)
@@ -6723,27 +6776,34 @@ var spine = (() => {
6723
6776
  }
6724
6777
  };
6725
6778
  var PathConstraint = _PathConstraint;
6726
- PathConstraint.NONE = -1;
6727
- PathConstraint.BEFORE = -2;
6728
- PathConstraint.AFTER = -3;
6729
- PathConstraint.epsilon = 1e-5;
6779
+ __publicField(PathConstraint, "NONE", -1);
6780
+ __publicField(PathConstraint, "BEFORE", -2);
6781
+ __publicField(PathConstraint, "AFTER", -3);
6782
+ __publicField(PathConstraint, "epsilon", 1e-5);
6730
6783
 
6731
6784
  // spine-core/src/Slot.ts
6732
6785
  var Slot = class {
6786
+ /** The slot's setup pose data. */
6787
+ data;
6788
+ /** The bone this slot belongs to. */
6789
+ bone;
6790
+ /** The color used to tint the slot's attachment. If {@link #getDarkColor()} is set, this is used as the light color for two
6791
+ * color tinting. */
6792
+ color;
6793
+ /** 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
6794
+ * color's alpha is not used. */
6795
+ darkColor = null;
6796
+ attachment = null;
6797
+ attachmentState = 0;
6798
+ /** The index of the texture region to display when the slot's attachment has a {@link Sequence}. -1 represents the
6799
+ * {@link Sequence#getSetupIndex()}. */
6800
+ sequenceIndex = -1;
6801
+ /** Values to deform the slot's attachment. For an unweighted mesh, the entries are local positions for each vertex. For a
6802
+ * weighted mesh, the entries are an offset for each vertex which will be added to the mesh's local vertex positions.
6803
+ *
6804
+ * See {@link VertexAttachment#computeWorldVertices()} and {@link DeformTimeline}. */
6805
+ deform = new Array();
6733
6806
  constructor(data, bone) {
6734
- /** 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
6735
- * color's alpha is not used. */
6736
- this.darkColor = null;
6737
- this.attachment = null;
6738
- this.attachmentState = 0;
6739
- /** The index of the texture region to display when the slot's attachment has a {@link Sequence}. -1 represents the
6740
- * {@link Sequence#getSetupIndex()}. */
6741
- this.sequenceIndex = -1;
6742
- /** Values to deform the slot's attachment. For an unweighted mesh, the entries are local positions for each vertex. For a
6743
- * weighted mesh, the entries are an offset for each vertex which will be added to the mesh's local vertex positions.
6744
- *
6745
- * See {@link VertexAttachment#computeWorldVertices()} and {@link DeformTimeline}. */
6746
- this.deform = new Array();
6747
6807
  if (!data)
6748
6808
  throw new Error("data cannot be null.");
6749
6809
  if (!bone)
@@ -6790,15 +6850,21 @@ var spine = (() => {
6790
6850
 
6791
6851
  // spine-core/src/TransformConstraint.ts
6792
6852
  var TransformConstraint = class {
6853
+ /** The transform constraint's setup pose data. */
6854
+ data;
6855
+ /** The bones that will be modified by this transform constraint. */
6856
+ bones;
6857
+ /** The target bone whose world transform will be copied to the constrained bones. */
6858
+ target;
6859
+ mixRotate = 0;
6860
+ mixX = 0;
6861
+ mixY = 0;
6862
+ mixScaleX = 0;
6863
+ mixScaleY = 0;
6864
+ mixShearY = 0;
6865
+ temp = new Vector2();
6866
+ active = false;
6793
6867
  constructor(data, skeleton) {
6794
- this.mixRotate = 0;
6795
- this.mixX = 0;
6796
- this.mixY = 0;
6797
- this.mixScaleX = 0;
6798
- this.mixScaleY = 0;
6799
- this.mixShearY = 0;
6800
- this.temp = new Vector2();
6801
- this.active = false;
6802
6868
  if (!data)
6803
6869
  throw new Error("data cannot be null.");
6804
6870
  if (!skeleton)
@@ -7004,21 +7070,43 @@ var spine = (() => {
7004
7070
 
7005
7071
  // spine-core/src/Skeleton.ts
7006
7072
  var _Skeleton = class {
7073
+ /** The skeleton's setup pose data. */
7074
+ data;
7075
+ /** The skeleton's bones, sorted parent first. The root bone is always the first bone. */
7076
+ bones;
7077
+ /** The skeleton's slots. */
7078
+ slots;
7079
+ /** The skeleton's slots in the order they should be drawn. The returned array may be modified to change the draw order. */
7080
+ drawOrder;
7081
+ /** The skeleton's IK constraints. */
7082
+ ikConstraints;
7083
+ /** The skeleton's transform constraints. */
7084
+ transformConstraints;
7085
+ /** The skeleton's path constraints. */
7086
+ pathConstraints;
7087
+ /** The list of bones and constraints, sorted in the order they should be updated, as computed by {@link #updateCache()}. */
7088
+ _updateCache = new Array();
7089
+ /** The skeleton's current skin. May be null. */
7090
+ skin = null;
7091
+ /** The color to tint all the skeleton's attachments. */
7092
+ color;
7093
+ /** Scales the entire skeleton on the X axis. This affects all bones, even if the bone's transform mode disallows scale
7094
+ * inheritance. */
7095
+ scaleX = 1;
7096
+ /** Scales the entire skeleton on the Y axis. This affects all bones, even if the bone's transform mode disallows scale
7097
+ * inheritance. */
7098
+ _scaleY = 1;
7099
+ get scaleY() {
7100
+ return _Skeleton.yDown ? -this._scaleY : this._scaleY;
7101
+ }
7102
+ set scaleY(scaleY) {
7103
+ this._scaleY = scaleY;
7104
+ }
7105
+ /** Sets the skeleton X position, which is added to the root bone worldX position. */
7106
+ x = 0;
7107
+ /** Sets the skeleton Y position, which is added to the root bone worldY position. */
7108
+ y = 0;
7007
7109
  constructor(data) {
7008
- /** The list of bones and constraints, sorted in the order they should be updated, as computed by {@link #updateCache()}. */
7009
- this._updateCache = new Array();
7010
- /** The skeleton's current skin. May be null. */
7011
- this.skin = null;
7012
- /** Scales the entire skeleton on the X axis. This affects all bones, even if the bone's transform mode disallows scale
7013
- * inheritance. */
7014
- this.scaleX = 1;
7015
- /** Scales the entire skeleton on the Y axis. This affects all bones, even if the bone's transform mode disallows scale
7016
- * inheritance. */
7017
- this._scaleY = 1;
7018
- /** Sets the skeleton X position, which is added to the root bone worldX position. */
7019
- this.x = 0;
7020
- /** Sets the skeleton Y position, which is added to the root bone worldY position. */
7021
- this.y = 0;
7022
7110
  if (!data)
7023
7111
  throw new Error("data cannot be null.");
7024
7112
  this.data = data;
@@ -7062,12 +7150,6 @@ var spine = (() => {
7062
7150
  this.color = new Color(1, 1, 1, 1);
7063
7151
  this.updateCache();
7064
7152
  }
7065
- get scaleY() {
7066
- return _Skeleton.yDown ? -this._scaleY : this._scaleY;
7067
- }
7068
- set scaleY(scaleY) {
7069
- this._scaleY = scaleY;
7070
- }
7071
7153
  /** Caches information about bones and constraints. Must be called if the {@link #getSkin()} is modified or if bones,
7072
7154
  * constraints, or weighted path attachments are added or removed. */
7073
7155
  updateCache() {
@@ -7544,55 +7626,53 @@ var spine = (() => {
7544
7626
  }
7545
7627
  };
7546
7628
  var Skeleton = _Skeleton;
7547
- Skeleton.yDown = false;
7629
+ __publicField(Skeleton, "yDown", false);
7548
7630
 
7549
7631
  // spine-core/src/SkeletonData.ts
7550
7632
  var SkeletonData = class {
7551
- constructor() {
7552
- /** The skeleton's name, which by default is the name of the skeleton data file, if possible. May be null. */
7553
- this.name = null;
7554
- /** The skeleton's bones, sorted parent first. The root bone is always the first bone. */
7555
- this.bones = new Array();
7556
- // Ordered parents first.
7557
- /** The skeleton's slots. */
7558
- this.slots = new Array();
7559
- // Setup pose draw order.
7560
- this.skins = new Array();
7561
- /** The skeleton's default skin. By default this skin contains all attachments that were not in a skin in Spine.
7562
- *
7563
- * See {@link Skeleton#getAttachmentByName()}.
7564
- * May be null. */
7565
- this.defaultSkin = null;
7566
- /** The skeleton's events. */
7567
- this.events = new Array();
7568
- /** The skeleton's animations. */
7569
- this.animations = new Array();
7570
- /** The skeleton's IK constraints. */
7571
- this.ikConstraints = new Array();
7572
- /** The skeleton's transform constraints. */
7573
- this.transformConstraints = new Array();
7574
- /** The skeleton's path constraints. */
7575
- this.pathConstraints = new Array();
7576
- /** The X coordinate of the skeleton's axis aligned bounding box in the setup pose. */
7577
- this.x = 0;
7578
- /** The Y coordinate of the skeleton's axis aligned bounding box in the setup pose. */
7579
- this.y = 0;
7580
- /** The width of the skeleton's axis aligned bounding box in the setup pose. */
7581
- this.width = 0;
7582
- /** The height of the skeleton's axis aligned bounding box in the setup pose. */
7583
- this.height = 0;
7584
- /** The Spine version used to export the skeleton data, or null. */
7585
- this.version = null;
7586
- /** The skeleton data hash. This value will change if any of the skeleton data has changed. May be null. */
7587
- this.hash = null;
7588
- // Nonessential
7589
- /** The dopesheet FPS in Spine. Available only when nonessential data was exported. */
7590
- this.fps = 0;
7591
- /** The path to the images directory as defined in Spine. Available only when nonessential data was exported. May be null. */
7592
- this.imagesPath = null;
7593
- /** The path to the audio directory as defined in Spine. Available only when nonessential data was exported. May be null. */
7594
- this.audioPath = null;
7595
- }
7633
+ /** The skeleton's name, which by default is the name of the skeleton data file, if possible. May be null. */
7634
+ name = null;
7635
+ /** The skeleton's bones, sorted parent first. The root bone is always the first bone. */
7636
+ bones = new Array();
7637
+ // Ordered parents first.
7638
+ /** The skeleton's slots. */
7639
+ slots = new Array();
7640
+ // Setup pose draw order.
7641
+ skins = new Array();
7642
+ /** The skeleton's default skin. By default this skin contains all attachments that were not in a skin in Spine.
7643
+ *
7644
+ * See {@link Skeleton#getAttachmentByName()}.
7645
+ * May be null. */
7646
+ defaultSkin = null;
7647
+ /** The skeleton's events. */
7648
+ events = new Array();
7649
+ /** The skeleton's animations. */
7650
+ animations = new Array();
7651
+ /** The skeleton's IK constraints. */
7652
+ ikConstraints = new Array();
7653
+ /** The skeleton's transform constraints. */
7654
+ transformConstraints = new Array();
7655
+ /** The skeleton's path constraints. */
7656
+ pathConstraints = new Array();
7657
+ /** The X coordinate of the skeleton's axis aligned bounding box in the setup pose. */
7658
+ x = 0;
7659
+ /** The Y coordinate of the skeleton's axis aligned bounding box in the setup pose. */
7660
+ y = 0;
7661
+ /** The width of the skeleton's axis aligned bounding box in the setup pose. */
7662
+ width = 0;
7663
+ /** The height of the skeleton's axis aligned bounding box in the setup pose. */
7664
+ height = 0;
7665
+ /** The Spine version used to export the skeleton data, or null. */
7666
+ version = null;
7667
+ /** The skeleton data hash. This value will change if any of the skeleton data has changed. May be null. */
7668
+ hash = null;
7669
+ // Nonessential
7670
+ /** The dopesheet FPS in Spine. Available only when nonessential data was exported. */
7671
+ fps = 0;
7672
+ /** The path to the images directory as defined in Spine. Available only when nonessential data was exported. May be null. */
7673
+ imagesPath = null;
7674
+ /** The path to the audio directory as defined in Spine. Available only when nonessential data was exported. May be null. */
7675
+ audioPath = null;
7596
7676
  /** Finds a bone by comparing each bone's name. It is more efficient to cache the results of this method than to call it
7597
7677
  * multiple times.
7598
7678
  * @returns May be null. */
@@ -7716,10 +7796,12 @@ var spine = (() => {
7716
7796
  }
7717
7797
  };
7718
7798
  var Skin = class {
7799
+ /** The skin's name, which is unique across all skins in the skeleton. */
7800
+ name;
7801
+ attachments = new Array();
7802
+ bones = Array();
7803
+ constraints = new Array();
7719
7804
  constructor(name) {
7720
- this.attachments = new Array();
7721
- this.bones = Array();
7722
- this.constraints = new Array();
7723
7805
  if (!name)
7724
7806
  throw new Error("name cannot be null.");
7725
7807
  this.name = name;
@@ -7876,19 +7958,23 @@ var spine = (() => {
7876
7958
 
7877
7959
  // spine-core/src/SlotData.ts
7878
7960
  var SlotData = class {
7961
+ /** The index of the slot in {@link Skeleton#getSlots()}. */
7962
+ index = 0;
7963
+ /** The name of the slot, which is unique across all slots in the skeleton. */
7964
+ name;
7965
+ /** The bone this slot belongs to. */
7966
+ boneData;
7967
+ /** The color used to tint the slot's attachment. If {@link #getDarkColor()} is set, this is used as the light color for two
7968
+ * color tinting. */
7969
+ color = new Color(1, 1, 1, 1);
7970
+ /** 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
7971
+ * color's alpha is not used. */
7972
+ darkColor = null;
7973
+ /** The name of the attachment that is visible for this slot in the setup pose, or null if no attachment is visible. */
7974
+ attachmentName = null;
7975
+ /** The blend mode for drawing the slot's attachment. */
7976
+ blendMode = BlendMode.Normal;
7879
7977
  constructor(index, name, boneData) {
7880
- /** The index of the slot in {@link Skeleton#getSlots()}. */
7881
- this.index = 0;
7882
- /** The color used to tint the slot's attachment. If {@link #getDarkColor()} is set, this is used as the light color for two
7883
- * color tinting. */
7884
- this.color = new Color(1, 1, 1, 1);
7885
- /** 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
7886
- * color's alpha is not used. */
7887
- this.darkColor = null;
7888
- /** The name of the attachment that is visible for this slot in the setup pose, or null if no attachment is visible. */
7889
- this.attachmentName = null;
7890
- /** The blend mode for drawing the slot's attachment. */
7891
- this.blendMode = BlendMode.Normal;
7892
7978
  if (index < 0)
7893
7979
  throw new Error("index must be >= 0.");
7894
7980
  if (!name)
@@ -7910,33 +7996,10 @@ var spine = (() => {
7910
7996
 
7911
7997
  // spine-core/src/TransformConstraintData.ts
7912
7998
  var TransformConstraintData = class extends ConstraintData {
7913
- constructor(name) {
7914
- super(name, 0, false);
7915
- /** The bones that will be modified by this transform constraint. */
7916
- this.bones = new Array();
7917
- /** The target bone whose world transform will be copied to the constrained bones. */
7918
- this._target = null;
7919
- this.mixRotate = 0;
7920
- this.mixX = 0;
7921
- this.mixY = 0;
7922
- this.mixScaleX = 0;
7923
- this.mixScaleY = 0;
7924
- this.mixShearY = 0;
7925
- /** An offset added to the constrained bone rotation. */
7926
- this.offsetRotation = 0;
7927
- /** An offset added to the constrained bone X translation. */
7928
- this.offsetX = 0;
7929
- /** An offset added to the constrained bone Y translation. */
7930
- this.offsetY = 0;
7931
- /** An offset added to the constrained bone scaleX. */
7932
- this.offsetScaleX = 0;
7933
- /** An offset added to the constrained bone scaleY. */
7934
- this.offsetScaleY = 0;
7935
- /** An offset added to the constrained bone shearY. */
7936
- this.offsetShearY = 0;
7937
- this.relative = false;
7938
- this.local = false;
7939
- }
7999
+ /** The bones that will be modified by this transform constraint. */
8000
+ bones = new Array();
8001
+ /** The target bone whose world transform will be copied to the constrained bones. */
8002
+ _target = null;
7940
8003
  set target(boneData) {
7941
8004
  this._target = boneData;
7942
8005
  }
@@ -7946,17 +8009,41 @@ var spine = (() => {
7946
8009
  else
7947
8010
  return this._target;
7948
8011
  }
8012
+ mixRotate = 0;
8013
+ mixX = 0;
8014
+ mixY = 0;
8015
+ mixScaleX = 0;
8016
+ mixScaleY = 0;
8017
+ mixShearY = 0;
8018
+ /** An offset added to the constrained bone rotation. */
8019
+ offsetRotation = 0;
8020
+ /** An offset added to the constrained bone X translation. */
8021
+ offsetX = 0;
8022
+ /** An offset added to the constrained bone Y translation. */
8023
+ offsetY = 0;
8024
+ /** An offset added to the constrained bone scaleX. */
8025
+ offsetScaleX = 0;
8026
+ /** An offset added to the constrained bone scaleY. */
8027
+ offsetScaleY = 0;
8028
+ /** An offset added to the constrained bone shearY. */
8029
+ offsetShearY = 0;
8030
+ relative = false;
8031
+ local = false;
8032
+ constructor(name) {
8033
+ super(name, 0, false);
8034
+ }
7949
8035
  };
7950
8036
 
7951
8037
  // spine-core/src/SkeletonBinary.ts
7952
8038
  var SkeletonBinary = class {
8039
+ /** Scales bone positions, image sizes, and translations as they are loaded. This allows different size images to be used at
8040
+ * runtime than were used in Spine.
8041
+ *
8042
+ * See [Scaling](http://esotericsoftware.com/spine-loading-skeleton-data#Scaling) in the Spine Runtimes Guide. */
8043
+ scale = 1;
8044
+ attachmentLoader;
8045
+ linkedMeshes = new Array();
7953
8046
  constructor(attachmentLoader) {
7954
- /** Scales bone positions, image sizes, and translations as they are loaded. This allows different size images to be used at
7955
- * runtime than were used in Spine.
7956
- *
7957
- * See [Scaling](http://esotericsoftware.com/spine-loading-skeleton-data#Scaling) in the Spine Runtimes Guide. */
7958
- this.scale = 1;
7959
- this.linkedMeshes = new Array();
7960
8047
  this.attachmentLoader = attachmentLoader;
7961
8048
  }
7962
8049
  readSkeletonData(binary) {
@@ -8970,6 +9057,11 @@ var spine = (() => {
8970
9057
  }
8971
9058
  };
8972
9059
  var LinkedMesh = class {
9060
+ parent;
9061
+ skin;
9062
+ slotIndex;
9063
+ mesh;
9064
+ inheritTimeline;
8973
9065
  constructor(mesh, skin, slotIndex, parent, inheritDeform) {
8974
9066
  this.mesh = mesh;
8975
9067
  this.skin = skin;
@@ -9063,23 +9155,21 @@ var spine = (() => {
9063
9155
 
9064
9156
  // spine-core/src/SkeletonBounds.ts
9065
9157
  var SkeletonBounds = class {
9066
- constructor() {
9067
- /** The left edge of the axis aligned bounding box. */
9068
- this.minX = 0;
9069
- /** The bottom edge of the axis aligned bounding box. */
9070
- this.minY = 0;
9071
- /** The right edge of the axis aligned bounding box. */
9072
- this.maxX = 0;
9073
- /** The top edge of the axis aligned bounding box. */
9074
- this.maxY = 0;
9075
- /** The visible bounding boxes. */
9076
- this.boundingBoxes = new Array();
9077
- /** The world vertices for the bounding box polygons. */
9078
- this.polygons = new Array();
9079
- this.polygonPool = new Pool(() => {
9080
- return Utils.newFloatArray(16);
9081
- });
9082
- }
9158
+ /** The left edge of the axis aligned bounding box. */
9159
+ minX = 0;
9160
+ /** The bottom edge of the axis aligned bounding box. */
9161
+ minY = 0;
9162
+ /** The right edge of the axis aligned bounding box. */
9163
+ maxX = 0;
9164
+ /** The top edge of the axis aligned bounding box. */
9165
+ maxY = 0;
9166
+ /** The visible bounding boxes. */
9167
+ boundingBoxes = new Array();
9168
+ /** The world vertices for the bounding box polygons. */
9169
+ polygons = new Array();
9170
+ polygonPool = new Pool(() => {
9171
+ return Utils.newFloatArray(16);
9172
+ });
9083
9173
  /** Clears any previous polygons, finds all visible bounding box attachments, and computes the world vertices for each bounding
9084
9174
  * box's polygon.
9085
9175
  * @param updateAabb If true, the axis aligned bounding box containing all the polygons is computed. If false, the
@@ -9250,19 +9340,17 @@ var spine = (() => {
9250
9340
 
9251
9341
  // spine-core/src/Triangulator.ts
9252
9342
  var Triangulator = class {
9253
- constructor() {
9254
- this.convexPolygons = new Array();
9255
- this.convexPolygonsIndices = new Array();
9256
- this.indicesArray = new Array();
9257
- this.isConcaveArray = new Array();
9258
- this.triangles = new Array();
9259
- this.polygonPool = new Pool(() => {
9260
- return new Array();
9261
- });
9262
- this.polygonIndicesPool = new Pool(() => {
9263
- return new Array();
9264
- });
9265
- }
9343
+ convexPolygons = new Array();
9344
+ convexPolygonsIndices = new Array();
9345
+ indicesArray = new Array();
9346
+ isConcaveArray = new Array();
9347
+ triangles = new Array();
9348
+ polygonPool = new Pool(() => {
9349
+ return new Array();
9350
+ });
9351
+ polygonIndicesPool = new Pool(() => {
9352
+ return new Array();
9353
+ });
9266
9354
  triangulate(verticesArray) {
9267
9355
  let vertices = verticesArray;
9268
9356
  let vertexCount = verticesArray.length >> 1;
@@ -9466,16 +9554,14 @@ var spine = (() => {
9466
9554
 
9467
9555
  // spine-core/src/SkeletonClipping.ts
9468
9556
  var SkeletonClipping = class {
9469
- constructor() {
9470
- this.triangulator = new Triangulator();
9471
- this.clippingPolygon = new Array();
9472
- this.clipOutput = new Array();
9473
- this.clippedVertices = new Array();
9474
- this.clippedTriangles = new Array();
9475
- this.scratch = new Array();
9476
- this.clipAttachment = null;
9477
- this.clippingPolygons = null;
9478
- }
9557
+ triangulator = new Triangulator();
9558
+ clippingPolygon = new Array();
9559
+ clipOutput = new Array();
9560
+ clippedVertices = new Array();
9561
+ clippedTriangles = new Array();
9562
+ scratch = new Array();
9563
+ clipAttachment = null;
9564
+ clippingPolygons = null;
9479
9565
  clipStart(slot, clip) {
9480
9566
  if (this.clipAttachment)
9481
9567
  return 0;
@@ -9755,13 +9841,14 @@ var spine = (() => {
9755
9841
 
9756
9842
  // spine-core/src/SkeletonJson.ts
9757
9843
  var SkeletonJson = class {
9844
+ attachmentLoader;
9845
+ /** Scales bone positions, image sizes, and translations as they are loaded. This allows different size images to be used at
9846
+ * runtime than were used in Spine.
9847
+ *
9848
+ * See [Scaling](http://esotericsoftware.com/spine-loading-skeleton-data#Scaling) in the Spine Runtimes Guide. */
9849
+ scale = 1;
9850
+ linkedMeshes = new Array();
9758
9851
  constructor(attachmentLoader) {
9759
- /** Scales bone positions, image sizes, and translations as they are loaded. This allows different size images to be used at
9760
- * runtime than were used in Spine.
9761
- *
9762
- * See [Scaling](http://esotericsoftware.com/spine-loading-skeleton-data#Scaling) in the Spine Runtimes Guide. */
9763
- this.scale = 1;
9764
- this.linkedMeshes = new Array();
9765
9852
  this.attachmentLoader = attachmentLoader;
9766
9853
  }
9767
9854
  readSkeletonData(json) {
@@ -10623,6 +10710,11 @@ var spine = (() => {
10623
10710
  }
10624
10711
  };
10625
10712
  var LinkedMesh2 = class {
10713
+ parent;
10714
+ skin;
10715
+ slotIndex;
10716
+ mesh;
10717
+ inheritTimeline;
10626
10718
  constructor(mesh, skin, slotIndex, parent, inheritDeform) {
10627
10719
  this.mesh = mesh;
10628
10720
  this.skin = skin;
@@ -10732,11 +10824,12 @@ var spine = (() => {
10732
10824
  // spine-canvas/src/SkeletonRenderer.ts
10733
10825
  var worldVertices = Utils.newFloatArray(8);
10734
10826
  var _SkeletonRenderer = class {
10827
+ ctx;
10828
+ triangleRendering = false;
10829
+ debugRendering = false;
10830
+ vertices = Utils.newFloatArray(8 * 1024);
10831
+ tempColor = new Color();
10735
10832
  constructor(context) {
10736
- this.triangleRendering = false;
10737
- this.debugRendering = false;
10738
- this.vertices = Utils.newFloatArray(8 * 1024);
10739
- this.tempColor = new Color();
10740
10833
  this.ctx = context;
10741
10834
  }
10742
10835
  draw(skeleton) {
@@ -10955,8 +11048,8 @@ var spine = (() => {
10955
11048
  }
10956
11049
  };
10957
11050
  var SkeletonRenderer = _SkeletonRenderer;
10958
- SkeletonRenderer.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];
10959
- SkeletonRenderer.VERTEX_SIZE = 2 + 2 + 4;
11051
+ __publicField(SkeletonRenderer, "QUAD_TRIANGLES", [0, 1, 2, 2, 3, 0]);
11052
+ __publicField(SkeletonRenderer, "VERTEX_SIZE", 2 + 2 + 4);
10960
11053
  return __toCommonJS(src_exports);
10961
11054
  })();
10962
11055
  //# sourceMappingURL=spine-canvas.js.map