@eva/plugin-renderer-spine 2.0.0-beta.8 → 2.0.0

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.
@@ -6,13 +6,49 @@ var pixi_js = require('pixi.js');
6
6
  var spineBase = require('@eva/spine-base');
7
7
 
8
8
  var __defProp = Object.defineProperty;
9
+ var __defProps = Object.defineProperties;
10
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
11
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
12
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
13
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
9
14
  var __defNormalProp = (obj, key, value) =>
10
15
  key in obj
11
- ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value })
16
+ ? __defProp(obj, key, {
17
+ enumerable: true,
18
+ configurable: true,
19
+ writable: true,
20
+ value,
21
+ })
12
22
  : (obj[key] = value);
13
- var __publicField = (obj, key, value) => {
14
- __defNormalProp(obj, typeof key !== 'symbol' ? key + '' : key, value);
15
- return value;
23
+ var __spreadValues = (a, b) => {
24
+ if (!b) b = {};
25
+ for (var prop in b) if (__hasOwnProp.call(b, prop)) __defNormalProp(a, prop, b[prop]);
26
+ if (__getOwnPropSymbols)
27
+ for (var prop of __getOwnPropSymbols(b)) {
28
+ if (__propIsEnum.call(b, prop)) __defNormalProp(a, prop, b[prop]);
29
+ }
30
+ return a;
31
+ };
32
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
33
+ var __async = (__this, __arguments, generator) => {
34
+ return new Promise((resolve, reject) => {
35
+ var fulfilled = value => {
36
+ try {
37
+ step(generator.next(value));
38
+ } catch (e) {
39
+ reject(e);
40
+ }
41
+ };
42
+ var rejected = value => {
43
+ try {
44
+ step(generator.throw(value));
45
+ } catch (e) {
46
+ reject(e);
47
+ }
48
+ };
49
+ var step = x => (x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected));
50
+ step((generator = generator.apply(__this, __arguments)).next());
51
+ });
16
52
  };
17
53
 
18
54
  // spine-pixi-v8/src/require-shim.ts
@@ -26,7 +62,9 @@ if (typeof window !== 'undefined' && window.PIXI) {
26
62
 
27
63
  // spine-core/src/Utils.ts
28
64
  var IntSet = class {
29
- array = new Array();
65
+ constructor() {
66
+ this.array = new Array();
67
+ }
30
68
  add(value) {
31
69
  let contains = this.contains(value);
32
70
  this.array[value | 0] = value | 0;
@@ -43,8 +81,10 @@ var IntSet = class {
43
81
  }
44
82
  };
45
83
  var StringSet = class {
46
- entries = {};
47
- size = 0;
84
+ constructor() {
85
+ this.entries = {};
86
+ this.size = 0;
87
+ }
48
88
  add(value) {
49
89
  let contains = this.entries[value];
50
90
  this.entries[value] = true;
@@ -134,11 +174,11 @@ var _Color = class {
134
174
  }
135
175
  };
136
176
  var Color = _Color;
137
- __publicField(Color, 'WHITE', new _Color(1, 1, 1, 1));
138
- __publicField(Color, 'RED', new _Color(1, 0, 0, 1));
139
- __publicField(Color, 'GREEN', new _Color(0, 1, 0, 1));
140
- __publicField(Color, 'BLUE', new _Color(0, 0, 1, 1));
141
- __publicField(Color, 'MAGENTA', new _Color(1, 0, 1, 1));
177
+ Color.WHITE = new _Color(1, 1, 1, 1);
178
+ Color.RED = new _Color(1, 0, 0, 1);
179
+ Color.GREEN = new _Color(0, 1, 0, 1);
180
+ Color.BLUE = new _Color(0, 0, 1, 1);
181
+ Color.MAGENTA = new _Color(1, 0, 1, 1);
142
182
  var _MathUtils = class {
143
183
  static clamp(value, min, max) {
144
184
  if (value < min) return min;
@@ -178,22 +218,22 @@ var _MathUtils = class {
178
218
  }
179
219
  };
180
220
  var MathUtils = _MathUtils;
181
- __publicField(MathUtils, 'PI', 3.1415927);
182
- __publicField(MathUtils, 'PI2', _MathUtils.PI * 2);
183
- __publicField(MathUtils, 'invPI2', 1 / _MathUtils.PI2);
184
- __publicField(MathUtils, 'radiansToDegrees', 180 / _MathUtils.PI);
185
- __publicField(MathUtils, 'radDeg', _MathUtils.radiansToDegrees);
186
- __publicField(MathUtils, 'degreesToRadians', _MathUtils.PI / 180);
187
- __publicField(MathUtils, 'degRad', _MathUtils.degreesToRadians);
221
+ MathUtils.PI = 3.1415927;
222
+ MathUtils.PI2 = _MathUtils.PI * 2;
223
+ MathUtils.invPI2 = 1 / _MathUtils.PI2;
224
+ MathUtils.radiansToDegrees = 180 / _MathUtils.PI;
225
+ MathUtils.radDeg = _MathUtils.radiansToDegrees;
226
+ MathUtils.degreesToRadians = _MathUtils.PI / 180;
227
+ MathUtils.degRad = _MathUtils.degreesToRadians;
188
228
  var Interpolation = class {
189
229
  apply(start, end, a) {
190
230
  return start + (end - start) * this.applyInternal(a);
191
231
  }
192
232
  };
193
233
  var Pow = class extends Interpolation {
194
- power = 2;
195
234
  constructor(power) {
196
235
  super();
236
+ this.power = 2;
197
237
  this.power = power;
198
238
  }
199
239
  applyInternal(a) {
@@ -269,7 +309,7 @@ var _Utils = class {
269
309
  }
270
310
  };
271
311
  var Utils = _Utils;
272
- __publicField(Utils, 'SUPPORTS_TYPED_ARRAYS', typeof Float32Array !== 'undefined');
312
+ Utils.SUPPORTS_TYPED_ARRAYS = typeof Float32Array !== 'undefined';
273
313
  var DebugUtils = class {
274
314
  static logBones(skeleton) {
275
315
  for (let i = 0; i < skeleton.bones.length; i++) {
@@ -293,9 +333,8 @@ var DebugUtils = class {
293
333
  }
294
334
  };
295
335
  var Pool = class {
296
- items = new Array();
297
- instantiator;
298
336
  constructor(instantiator) {
337
+ this.items = new Array();
299
338
  this.instantiator = instantiator;
300
339
  }
301
340
  obtain() {
@@ -337,13 +376,15 @@ var Vector2 = class {
337
376
  }
338
377
  };
339
378
  var TimeKeeper = class {
340
- maxDelta = 0.064;
341
- framesPerSecond = 0;
342
- delta = 0;
343
- totalTime = 0;
344
- lastTime = Date.now() / 1e3;
345
- frameCount = 0;
346
- frameTime = 0;
379
+ constructor() {
380
+ this.maxDelta = 0.064;
381
+ this.framesPerSecond = 0;
382
+ this.delta = 0;
383
+ this.totalTime = 0;
384
+ this.lastTime = Date.now() / 1e3;
385
+ this.frameCount = 0;
386
+ this.frameTime = 0;
387
+ }
347
388
  update() {
348
389
  let now = Date.now() / 1e3;
349
390
  this.delta = now - this.lastTime;
@@ -360,12 +401,11 @@ var TimeKeeper = class {
360
401
  }
361
402
  };
362
403
  var WindowedMean = class {
363
- values;
364
- addedValues = 0;
365
- lastValue = 0;
366
- mean = 0;
367
- dirty = true;
368
404
  constructor(windowSize = 32) {
405
+ this.addedValues = 0;
406
+ this.lastValue = 0;
407
+ this.mean = 0;
408
+ this.dirty = true;
369
409
  this.values = new Array(windowSize);
370
410
  }
371
411
  hasEnoughData() {
@@ -393,31 +433,30 @@ var WindowedMean = class {
393
433
 
394
434
  // spine-core/src/attachments/Attachment.ts
395
435
  var Attachment = class {
396
- name;
397
436
  constructor(name) {
398
437
  if (!name) throw new Error('name cannot be null.');
399
438
  this.name = name;
400
439
  }
401
440
  };
402
441
  var _VertexAttachment = class extends Attachment {
403
- /** The unique ID for this attachment. */
404
- id = _VertexAttachment.nextID++;
405
- /** The bones which affect the {@link #getVertices()}. The array entries are, for each vertex, the number of bones affecting
406
- * the vertex followed by that many bone indices, which is the index of the bone in {@link Skeleton#bones}. Will be null
407
- * if this attachment has no weights. */
408
- bones = null;
409
- /** The vertex positions in the bone's coordinate system. For a non-weighted attachment, the values are `x,y`
410
- * entries for each vertex. For a weighted attachment, the values are `x,y,weight` entries for each bone affecting
411
- * each vertex. */
412
- vertices = [];
413
- /** The maximum number of world vertex values that can be output by
414
- * {@link #computeWorldVertices()} using the `count` parameter. */
415
- worldVerticesLength = 0;
416
- /** Timelines for the timeline attachment are also applied to this attachment.
417
- * May be null if no attachment-specific timelines should be applied. */
418
- timelineAttachment = this;
419
442
  constructor(name) {
420
443
  super(name);
444
+ /** The unique ID for this attachment. */
445
+ this.id = _VertexAttachment.nextID++;
446
+ /** The bones which affect the {@link #getVertices()}. The array entries are, for each vertex, the number of bones affecting
447
+ * the vertex followed by that many bone indices, which is the index of the bone in {@link Skeleton#bones}. Will be null
448
+ * if this attachment has no weights. */
449
+ this.bones = null;
450
+ /** The vertex positions in the bone's coordinate system. For a non-weighted attachment, the values are `x,y`
451
+ * entries for each vertex. For a weighted attachment, the values are `x,y,weight` entries for each bone affecting
452
+ * each vertex. */
453
+ this.vertices = [];
454
+ /** The maximum number of world vertex values that can be output by
455
+ * {@link #computeWorldVertices()} using the `count` parameter. */
456
+ this.worldVerticesLength = 0;
457
+ /** Timelines for the timeline attachment are also applied to this attachment.
458
+ * May be null if no attachment-specific timelines should be applied. */
459
+ this.timelineAttachment = this;
421
460
  }
422
461
  /** Transforms the attachment's local {@link #vertices} to world coordinates. If the slot's {@link Slot#deform} is
423
462
  * not empty, it is used to deform the vertices.
@@ -513,17 +552,16 @@ var _VertexAttachment = class extends Attachment {
513
552
  }
514
553
  };
515
554
  var VertexAttachment = _VertexAttachment;
516
- __publicField(VertexAttachment, 'nextID', 0);
555
+ VertexAttachment.nextID = 0;
517
556
 
518
557
  // spine-core/src/attachments/Sequence.ts
519
558
  var _Sequence = class {
520
- id = _Sequence.nextID();
521
- regions;
522
- start = 0;
523
- digits = 0;
524
- /** The index of the region to show for the setup pose. */
525
- setupIndex = 0;
526
559
  constructor(count) {
560
+ this.id = _Sequence.nextID();
561
+ this.start = 0;
562
+ this.digits = 0;
563
+ /** The index of the region to show for the setup pose. */
564
+ this.setupIndex = 0;
527
565
  this.regions = new Array(count);
528
566
  }
529
567
  copy() {
@@ -556,7 +594,7 @@ var _Sequence = class {
556
594
  }
557
595
  };
558
596
  var Sequence = _Sequence;
559
- __publicField(Sequence, '_nextID', 0);
597
+ Sequence._nextID = 0;
560
598
  var SequenceMode = /* @__PURE__ */ (SequenceMode2 => {
561
599
  SequenceMode2[(SequenceMode2['hold'] = 0)] = 'hold';
562
600
  SequenceMode2[(SequenceMode2['once'] = 1)] = 'once';
@@ -574,13 +612,9 @@ var SequenceModeValues = [
574
612
 
575
613
  // spine-core/src/Animation.ts
576
614
  var Animation = class {
577
- /** The animation's name, which is unique across all animations in the skeleton. */
578
- name;
579
- timelines = [];
580
- timelineIds = new StringSet();
581
- /** The duration of the animation in seconds, which is the highest time of all keys in the timeline. */
582
- duration;
583
615
  constructor(name, timelines, duration) {
616
+ this.timelines = [];
617
+ this.timelineIds = new StringSet();
584
618
  if (!name) throw new Error('name cannot be null.');
585
619
  this.name = name;
586
620
  this.setTimelines(timelines);
@@ -656,8 +690,6 @@ var Property = {
656
690
  sequence: 28,
657
691
  };
658
692
  var Timeline = class {
659
- propertyIds;
660
- frames;
661
693
  constructor(frameCount, propertyIds) {
662
694
  this.propertyIds = propertyIds;
663
695
  this.frames = Utils.newFloatArray(frameCount * this.getFrameEntries());
@@ -686,7 +718,6 @@ var Timeline = class {
686
718
  }
687
719
  };
688
720
  var CurveTimeline = class extends Timeline {
689
- curves;
690
721
  // type, x, y, ...
691
722
  constructor(frameCount, bezierCount, propertyIds) {
692
723
  super(frameCount, propertyIds);
@@ -955,9 +986,9 @@ var CurveTimeline2 = class extends CurveTimeline {
955
986
  }
956
987
  };
957
988
  var RotateTimeline = class extends CurveTimeline1 {
958
- boneIndex = 0;
959
989
  constructor(frameCount, bezierCount, boneIndex) {
960
990
  super(frameCount, bezierCount, Property.rotate + '|' + boneIndex);
991
+ this.boneIndex = 0;
961
992
  this.boneIndex = boneIndex;
962
993
  }
963
994
  apply(skeleton, lastTime, time, events, alpha, blend, direction) {
@@ -966,9 +997,9 @@ var RotateTimeline = class extends CurveTimeline1 {
966
997
  }
967
998
  };
968
999
  var TranslateTimeline = class extends CurveTimeline2 {
969
- boneIndex = 0;
970
1000
  constructor(frameCount, bezierCount, boneIndex) {
971
1001
  super(frameCount, bezierCount, Property.x + '|' + boneIndex, Property.y + '|' + boneIndex);
1002
+ this.boneIndex = 0;
972
1003
  this.boneIndex = boneIndex;
973
1004
  }
974
1005
  apply(skeleton, lastTime, time, events, alpha, blend, direction) {
@@ -1080,9 +1111,9 @@ var TranslateTimeline = class extends CurveTimeline2 {
1080
1111
  }
1081
1112
  };
1082
1113
  var TranslateXTimeline = class extends CurveTimeline1 {
1083
- boneIndex = 0;
1084
1114
  constructor(frameCount, bezierCount, boneIndex) {
1085
1115
  super(frameCount, bezierCount, Property.x + '|' + boneIndex);
1116
+ this.boneIndex = 0;
1086
1117
  this.boneIndex = boneIndex;
1087
1118
  }
1088
1119
  apply(skeleton, lastTime, time, events, alpha, blend, direction) {
@@ -1091,9 +1122,9 @@ var TranslateXTimeline = class extends CurveTimeline1 {
1091
1122
  }
1092
1123
  };
1093
1124
  var TranslateYTimeline = class extends CurveTimeline1 {
1094
- boneIndex = 0;
1095
1125
  constructor(frameCount, bezierCount, boneIndex) {
1096
1126
  super(frameCount, bezierCount, Property.y + '|' + boneIndex);
1127
+ this.boneIndex = 0;
1097
1128
  this.boneIndex = boneIndex;
1098
1129
  }
1099
1130
  apply(skeleton, lastTime, time, events, alpha, blend, direction) {
@@ -1102,9 +1133,9 @@ var TranslateYTimeline = class extends CurveTimeline1 {
1102
1133
  }
1103
1134
  };
1104
1135
  var ScaleTimeline = class extends CurveTimeline2 {
1105
- boneIndex = 0;
1106
1136
  constructor(frameCount, bezierCount, boneIndex) {
1107
1137
  super(frameCount, bezierCount, Property.scaleX + '|' + boneIndex, Property.scaleY + '|' + boneIndex);
1138
+ this.boneIndex = 0;
1108
1139
  this.boneIndex = boneIndex;
1109
1140
  }
1110
1141
  apply(skeleton, lastTime, time, events, alpha, blend, direction) {
@@ -1254,9 +1285,9 @@ var ScaleTimeline = class extends CurveTimeline2 {
1254
1285
  }
1255
1286
  };
1256
1287
  var ScaleXTimeline = class extends CurveTimeline1 {
1257
- boneIndex = 0;
1258
1288
  constructor(frameCount, bezierCount, boneIndex) {
1259
1289
  super(frameCount, bezierCount, Property.scaleX + '|' + boneIndex);
1290
+ this.boneIndex = 0;
1260
1291
  this.boneIndex = boneIndex;
1261
1292
  }
1262
1293
  apply(skeleton, lastTime, time, events, alpha, blend, direction) {
@@ -1265,9 +1296,9 @@ var ScaleXTimeline = class extends CurveTimeline1 {
1265
1296
  }
1266
1297
  };
1267
1298
  var ScaleYTimeline = class extends CurveTimeline1 {
1268
- boneIndex = 0;
1269
1299
  constructor(frameCount, bezierCount, boneIndex) {
1270
1300
  super(frameCount, bezierCount, Property.scaleY + '|' + boneIndex);
1301
+ this.boneIndex = 0;
1271
1302
  this.boneIndex = boneIndex;
1272
1303
  }
1273
1304
  apply(skeleton, lastTime, time, events, alpha, blend, direction) {
@@ -1276,9 +1307,9 @@ var ScaleYTimeline = class extends CurveTimeline1 {
1276
1307
  }
1277
1308
  };
1278
1309
  var ShearTimeline = class extends CurveTimeline2 {
1279
- boneIndex = 0;
1280
1310
  constructor(frameCount, bezierCount, boneIndex) {
1281
1311
  super(frameCount, bezierCount, Property.shearX + '|' + boneIndex, Property.shearY + '|' + boneIndex);
1312
+ this.boneIndex = 0;
1282
1313
  this.boneIndex = boneIndex;
1283
1314
  }
1284
1315
  apply(skeleton, lastTime, time, events, alpha, blend, direction) {
@@ -1390,9 +1421,9 @@ var ShearTimeline = class extends CurveTimeline2 {
1390
1421
  }
1391
1422
  };
1392
1423
  var ShearXTimeline = class extends CurveTimeline1 {
1393
- boneIndex = 0;
1394
1424
  constructor(frameCount, bezierCount, boneIndex) {
1395
1425
  super(frameCount, bezierCount, Property.shearX + '|' + boneIndex);
1426
+ this.boneIndex = 0;
1396
1427
  this.boneIndex = boneIndex;
1397
1428
  }
1398
1429
  apply(skeleton, lastTime, time, events, alpha, blend, direction) {
@@ -1401,9 +1432,9 @@ var ShearXTimeline = class extends CurveTimeline1 {
1401
1432
  }
1402
1433
  };
1403
1434
  var ShearYTimeline = class extends CurveTimeline1 {
1404
- boneIndex = 0;
1405
1435
  constructor(frameCount, bezierCount, boneIndex) {
1406
1436
  super(frameCount, bezierCount, Property.shearY + '|' + boneIndex);
1437
+ this.boneIndex = 0;
1407
1438
  this.boneIndex = boneIndex;
1408
1439
  }
1409
1440
  apply(skeleton, lastTime, time, events, alpha, blend, direction) {
@@ -1412,9 +1443,9 @@ var ShearYTimeline = class extends CurveTimeline1 {
1412
1443
  }
1413
1444
  };
1414
1445
  var InheritTimeline = class extends Timeline {
1415
- boneIndex = 0;
1416
1446
  constructor(frameCount, boneIndex) {
1417
1447
  super(frameCount, [Property.inherit + '|' + boneIndex]);
1448
+ this.boneIndex = 0;
1418
1449
  this.boneIndex = boneIndex;
1419
1450
  }
1420
1451
  getFrameEntries() {
@@ -1456,9 +1487,9 @@ var InheritTimeline = class extends Timeline {
1456
1487
  }
1457
1488
  };
1458
1489
  var RGBATimeline = class extends CurveTimeline {
1459
- slotIndex = 0;
1460
1490
  constructor(frameCount, bezierCount, slotIndex) {
1461
1491
  super(frameCount, bezierCount, [Property.rgb + '|' + slotIndex, Property.alpha + '|' + slotIndex]);
1492
+ this.slotIndex = 0;
1462
1493
  this.slotIndex = slotIndex;
1463
1494
  }
1464
1495
  getFrameEntries() {
@@ -1640,9 +1671,9 @@ var RGBATimeline = class extends CurveTimeline {
1640
1671
  }
1641
1672
  };
1642
1673
  var RGBTimeline = class extends CurveTimeline {
1643
- slotIndex = 0;
1644
1674
  constructor(frameCount, bezierCount, slotIndex) {
1645
1675
  super(frameCount, bezierCount, [Property.rgb + '|' + slotIndex]);
1676
+ this.slotIndex = 0;
1646
1677
  this.slotIndex = slotIndex;
1647
1678
  }
1648
1679
  getFrameEntries() {
@@ -1800,9 +1831,9 @@ var RGBTimeline = class extends CurveTimeline {
1800
1831
  }
1801
1832
  };
1802
1833
  var AlphaTimeline = class extends CurveTimeline1 {
1803
- slotIndex = 0;
1804
1834
  constructor(frameCount, bezierCount, slotIndex) {
1805
1835
  super(frameCount, bezierCount, Property.alpha + '|' + slotIndex);
1836
+ this.slotIndex = 0;
1806
1837
  this.slotIndex = slotIndex;
1807
1838
  }
1808
1839
  apply(skeleton, lastTime, time, events, alpha, blend, direction) {
@@ -1829,13 +1860,13 @@ var AlphaTimeline = class extends CurveTimeline1 {
1829
1860
  }
1830
1861
  };
1831
1862
  var RGBA2Timeline = class extends CurveTimeline {
1832
- slotIndex = 0;
1833
1863
  constructor(frameCount, bezierCount, slotIndex) {
1834
1864
  super(frameCount, bezierCount, [
1835
1865
  Property.rgb + '|' + slotIndex,
1836
1866
  Property.alpha + '|' + slotIndex,
1837
1867
  Property.rgb2 + '|' + slotIndex,
1838
1868
  ]);
1869
+ this.slotIndex = 0;
1839
1870
  this.slotIndex = slotIndex;
1840
1871
  }
1841
1872
  getFrameEntries() {
@@ -2121,9 +2152,9 @@ var RGBA2Timeline = class extends CurveTimeline {
2121
2152
  }
2122
2153
  };
2123
2154
  var RGB2Timeline = class extends CurveTimeline {
2124
- slotIndex = 0;
2125
2155
  constructor(frameCount, bezierCount, slotIndex) {
2126
2156
  super(frameCount, bezierCount, [Property.rgb + '|' + slotIndex, Property.rgb2 + '|' + slotIndex]);
2157
+ this.slotIndex = 0;
2127
2158
  this.slotIndex = slotIndex;
2128
2159
  }
2129
2160
  getFrameEntries() {
@@ -2390,11 +2421,9 @@ var RGB2Timeline = class extends CurveTimeline {
2390
2421
  }
2391
2422
  };
2392
2423
  var AttachmentTimeline = class extends Timeline {
2393
- slotIndex = 0;
2394
- /** The attachment name for each key frame. May contain null values to clear the attachment. */
2395
- attachmentNames;
2396
2424
  constructor(frameCount, slotIndex) {
2397
2425
  super(frameCount, [Property.attachment + '|' + slotIndex]);
2426
+ this.slotIndex = 0;
2398
2427
  this.slotIndex = slotIndex;
2399
2428
  this.attachmentNames = new Array(frameCount);
2400
2429
  }
@@ -2425,13 +2454,9 @@ var AttachmentTimeline = class extends Timeline {
2425
2454
  }
2426
2455
  };
2427
2456
  var DeformTimeline = class extends CurveTimeline {
2428
- slotIndex = 0;
2429
- /** The attachment that will be deformed. */
2430
- attachment;
2431
- /** The vertices for each key frame. */
2432
- vertices;
2433
2457
  constructor(frameCount, bezierCount, slotIndex, attachment) {
2434
2458
  super(frameCount, bezierCount, [Property.deform + '|' + slotIndex + '|' + attachment.id]);
2459
+ this.slotIndex = 0;
2435
2460
  this.slotIndex = slotIndex;
2436
2461
  this.attachment = attachment;
2437
2462
  this.vertices = new Array(frameCount);
@@ -2646,8 +2671,6 @@ var DeformTimeline = class extends CurveTimeline {
2646
2671
  }
2647
2672
  };
2648
2673
  var _EventTimeline = class extends Timeline {
2649
- /** The event for each key frame. */
2650
- events;
2651
2674
  constructor(frameCount) {
2652
2675
  super(frameCount, _EventTimeline.propertyIds);
2653
2676
  this.events = new Array(frameCount);
@@ -2684,10 +2707,8 @@ var _EventTimeline = class extends Timeline {
2684
2707
  }
2685
2708
  };
2686
2709
  var EventTimeline = _EventTimeline;
2687
- __publicField(EventTimeline, 'propertyIds', ['' + Property.event]);
2710
+ EventTimeline.propertyIds = ['' + Property.event];
2688
2711
  var _DrawOrderTimeline = class extends Timeline {
2689
- /** The draw order for each key frame. See {@link #setFrame(int, float, int[])}. */
2690
- drawOrders;
2691
2712
  constructor(frameCount) {
2692
2713
  super(frameCount, _DrawOrderTimeline.propertyIds);
2693
2714
  this.drawOrders = new Array(frameCount);
@@ -2723,12 +2744,12 @@ var _DrawOrderTimeline = class extends Timeline {
2723
2744
  }
2724
2745
  };
2725
2746
  var DrawOrderTimeline = _DrawOrderTimeline;
2726
- __publicField(DrawOrderTimeline, 'propertyIds', ['' + Property.drawOrder]);
2747
+ DrawOrderTimeline.propertyIds = ['' + Property.drawOrder];
2727
2748
  var IkConstraintTimeline = class extends CurveTimeline {
2728
- /** The index of the IK constraint in {@link Skeleton#getIkConstraints()} that will be changed when this timeline is applied */
2729
- constraintIndex = 0;
2730
2749
  constructor(frameCount, bezierCount, ikConstraintIndex) {
2731
2750
  super(frameCount, bezierCount, [Property.ikConstraint + '|' + ikConstraintIndex]);
2751
+ /** The index of the IK constraint in {@link Skeleton#getIkConstraints()} that will be changed when this timeline is applied */
2752
+ this.constraintIndex = 0;
2732
2753
  this.constraintIndex = ikConstraintIndex;
2733
2754
  }
2734
2755
  getFrameEntries() {
@@ -2905,10 +2926,10 @@ var IkConstraintTimeline = class extends CurveTimeline {
2905
2926
  }
2906
2927
  };
2907
2928
  var TransformConstraintTimeline = class extends CurveTimeline {
2908
- /** The index of the transform constraint slot in {@link Skeleton#transformConstraints} that will be changed. */
2909
- constraintIndex = 0;
2910
2929
  constructor(frameCount, bezierCount, transformConstraintIndex) {
2911
2930
  super(frameCount, bezierCount, [Property.transformConstraint + '|' + transformConstraintIndex]);
2931
+ /** The index of the transform constraint slot in {@link Skeleton#transformConstraints} that will be changed. */
2932
+ this.constraintIndex = 0;
2912
2933
  this.constraintIndex = transformConstraintIndex;
2913
2934
  }
2914
2935
  getFrameEntries() {
@@ -3159,11 +3180,11 @@ var TransformConstraintTimeline = class extends CurveTimeline {
3159
3180
  }
3160
3181
  };
3161
3182
  var PathConstraintPositionTimeline = class extends CurveTimeline1 {
3162
- /** The index of the path constraint in {@link Skeleton#getPathConstraints()} that will be changed when this timeline is
3163
- * applied. */
3164
- constraintIndex = 0;
3165
3183
  constructor(frameCount, bezierCount, pathConstraintIndex) {
3166
3184
  super(frameCount, bezierCount, Property.pathConstraintPosition + '|' + pathConstraintIndex);
3185
+ /** The index of the path constraint in {@link Skeleton#getPathConstraints()} that will be changed when this timeline is
3186
+ * applied. */
3187
+ this.constraintIndex = 0;
3167
3188
  this.constraintIndex = pathConstraintIndex;
3168
3189
  }
3169
3190
  apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {
@@ -3173,11 +3194,11 @@ var PathConstraintPositionTimeline = class extends CurveTimeline1 {
3173
3194
  }
3174
3195
  };
3175
3196
  var PathConstraintSpacingTimeline = class extends CurveTimeline1 {
3176
- /** The index of the path constraint in {@link Skeleton#getPathConstraints()} that will be changed when this timeline is
3177
- * applied. */
3178
- constraintIndex = 0;
3179
3197
  constructor(frameCount, bezierCount, pathConstraintIndex) {
3180
3198
  super(frameCount, bezierCount, Property.pathConstraintSpacing + '|' + pathConstraintIndex);
3199
+ /** The index of the path constraint in {@link Skeleton#getPathConstraints()} that will be changed when this timeline is
3200
+ * applied. */
3201
+ this.constraintIndex = 0;
3181
3202
  this.constraintIndex = pathConstraintIndex;
3182
3203
  }
3183
3204
  apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {
@@ -3187,11 +3208,11 @@ var PathConstraintSpacingTimeline = class extends CurveTimeline1 {
3187
3208
  }
3188
3209
  };
3189
3210
  var PathConstraintMixTimeline = class extends CurveTimeline {
3190
- /** The index of the path constraint in {@link Skeleton#getPathConstraints()} that will be changed when this timeline is
3191
- * applied. */
3192
- constraintIndex = 0;
3193
3211
  constructor(frameCount, bezierCount, pathConstraintIndex) {
3194
3212
  super(frameCount, bezierCount, [Property.pathConstraintMix + '|' + pathConstraintIndex]);
3213
+ /** The index of the path constraint in {@link Skeleton#getPathConstraints()} that will be changed when this timeline is
3214
+ * applied. */
3215
+ this.constraintIndex = 0;
3195
3216
  this.constraintIndex = pathConstraintIndex;
3196
3217
  }
3197
3218
  getFrameEntries() {
@@ -3340,12 +3361,12 @@ var PathConstraintMixTimeline = class extends CurveTimeline {
3340
3361
  }
3341
3362
  };
3342
3363
  var PhysicsConstraintTimeline = class extends CurveTimeline1 {
3343
- /** The index of the physics constraint in {@link Skeleton#getPhysicsConstraints()} that will be changed when this timeline
3344
- * is applied, or -1 if all physics constraints in the skeleton will be changed. */
3345
- constraintIndex = 0;
3346
3364
  /** @param physicsConstraintIndex -1 for all physics constraints in the skeleton. */
3347
3365
  constructor(frameCount, bezierCount, physicsConstraintIndex, property) {
3348
3366
  super(frameCount, bezierCount, property + '|' + physicsConstraintIndex);
3367
+ /** The index of the physics constraint in {@link Skeleton#getPhysicsConstraints()} that will be changed when this timeline
3368
+ * is applied, or -1 if all physics constraints in the skeleton will be changed. */
3369
+ this.constraintIndex = 0;
3349
3370
  this.constraintIndex = physicsConstraintIndex;
3350
3371
  }
3351
3372
  apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {
@@ -3486,9 +3507,6 @@ var PhysicsConstraintMixTimeline = class extends PhysicsConstraintTimeline {
3486
3507
  }
3487
3508
  };
3488
3509
  var _PhysicsConstraintResetTimeline = class extends Timeline {
3489
- /** The index of the physics constraint in {@link Skeleton#getPhysicsConstraints()} that will be reset when this timeline is
3490
- * applied, or -1 if all physics constraints in the skeleton will be reset. */
3491
- constraintIndex;
3492
3510
  /** @param physicsConstraintIndex -1 for all physics constraints in the skeleton. */
3493
3511
  constructor(frameCount, physicsConstraintIndex) {
3494
3512
  super(frameCount, _PhysicsConstraintResetTimeline.propertyIds);
@@ -3526,10 +3544,8 @@ var _PhysicsConstraintResetTimeline = class extends Timeline {
3526
3544
  }
3527
3545
  };
3528
3546
  var PhysicsConstraintResetTimeline = _PhysicsConstraintResetTimeline;
3529
- __publicField(PhysicsConstraintResetTimeline, 'propertyIds', [Property.physicsConstraintReset.toString()]);
3547
+ PhysicsConstraintResetTimeline.propertyIds = [Property.physicsConstraintReset.toString()];
3530
3548
  var _SequenceTimeline = class extends Timeline {
3531
- slotIndex;
3532
- attachment;
3533
3549
  constructor(frameCount, slotIndex, attachment) {
3534
3550
  super(frameCount, [Property.sequence + '|' + slotIndex + '|' + attachment.sequence.id]);
3535
3551
  this.slotIndex = slotIndex;
@@ -3611,34 +3627,32 @@ var _SequenceTimeline = class extends Timeline {
3611
3627
  }
3612
3628
  };
3613
3629
  var SequenceTimeline = _SequenceTimeline;
3614
- __publicField(SequenceTimeline, 'ENTRIES', 3);
3615
- __publicField(SequenceTimeline, 'MODE', 1);
3616
- __publicField(SequenceTimeline, 'DELAY', 2);
3630
+ SequenceTimeline.ENTRIES = 3;
3631
+ SequenceTimeline.MODE = 1;
3632
+ SequenceTimeline.DELAY = 2;
3617
3633
 
3618
3634
  // spine-core/src/AnimationState.ts
3619
3635
  var _AnimationState = class {
3620
- static emptyAnimation() {
3621
- return _AnimationState._emptyAnimation;
3622
- }
3623
- /** The AnimationStateData to look up mix durations. */
3624
- data;
3625
- /** The list of tracks that currently have animations, which may contain null entries. */
3626
- tracks = new Array();
3627
- /** Multiplier for the delta time when the animation state is updated, causing time for all animations and mixes to play slower
3628
- * or faster. Defaults to 1.
3629
- *
3630
- * See TrackEntry {@link TrackEntry#timeScale} for affecting a single animation. */
3631
- timeScale = 1;
3632
- unkeyedState = 0;
3633
- events = new Array();
3634
- listeners = new Array();
3635
- queue = new EventQueue(this);
3636
- propertyIDs = new StringSet();
3637
- animationsChanged = false;
3638
- trackEntryPool = new Pool(() => new TrackEntry());
3639
3636
  constructor(data) {
3637
+ /** The list of tracks that currently have animations, which may contain null entries. */
3638
+ this.tracks = new Array();
3639
+ /** Multiplier for the delta time when the animation state is updated, causing time for all animations and mixes to play slower
3640
+ * or faster. Defaults to 1.
3641
+ *
3642
+ * See TrackEntry {@link TrackEntry#timeScale} for affecting a single animation. */
3643
+ this.timeScale = 1;
3644
+ this.unkeyedState = 0;
3645
+ this.events = new Array();
3646
+ this.listeners = new Array();
3647
+ this.queue = new EventQueue(this);
3648
+ this.propertyIDs = new StringSet();
3649
+ this.animationsChanged = false;
3650
+ this.trackEntryPool = new Pool(() => new TrackEntry());
3640
3651
  this.data = data;
3641
3652
  }
3653
+ static emptyAnimation() {
3654
+ return _AnimationState._emptyAnimation;
3655
+ }
3642
3656
  /** Increments each track entry {@link TrackEntry#trackTime()}, setting queued animations as current if needed. */
3643
3657
  update(delta) {
3644
3658
  delta *= this.timeScale;
@@ -4289,132 +4303,144 @@ var _AnimationState = class {
4289
4303
  }
4290
4304
  };
4291
4305
  var AnimationState = _AnimationState;
4292
- __publicField(AnimationState, '_emptyAnimation', new Animation('<empty>', [], 0));
4306
+ AnimationState._emptyAnimation = new Animation('<empty>', [], 0);
4293
4307
  var TrackEntry = class {
4294
- /** The animation to apply for this track entry. */
4295
- animation = null;
4296
- previous = null;
4297
- /** The animation queued to start after this animation, or null. `next` makes up a linked list. */
4298
- next = null;
4299
- /** The track entry for the previous animation when mixing from the previous animation to this animation, or null if no
4300
- * mixing is currently occuring. When mixing from multiple animations, `mixingFrom` makes up a linked list. */
4301
- mixingFrom = null;
4302
- /** The track entry for the next animation when mixing from this animation to the next animation, or null if no mixing is
4303
- * currently occuring. When mixing to multiple animations, `mixingTo` makes up a linked list. */
4304
- mixingTo = null;
4305
- /** The listener for events generated by this track entry, or null.
4306
- *
4307
- * A track entry returned from {@link AnimationState#setAnimation()} is already the current animation
4308
- * for the track, so the track entry listener {@link AnimationStateListener#start()} will not be called. */
4309
- listener = null;
4310
- /** The index of the track where this track entry is either current or queued.
4311
- *
4312
- * See {@link AnimationState#getCurrent()}. */
4313
- trackIndex = 0;
4314
- /** If true, the animation will repeat. If false it will not, instead its last frame is applied if played beyond its
4315
- * duration. */
4316
- loop = false;
4317
- /** If true, when mixing from the previous animation to this animation, the previous animation is applied as normal instead
4318
- * of being mixed out.
4319
- *
4320
- * When mixing between animations that key the same property, if a lower track also keys that property then the value will
4321
- * briefly dip toward the lower track value during the mix. This happens because the first animation mixes from 100% to 0%
4322
- * while the second animation mixes from 0% to 100%. Setting `holdPrevious` to true applies the first animation
4323
- * at 100% during the mix so the lower track value is overwritten. Such dipping does not occur on the lowest track which
4324
- * keys the property, only when a higher track also keys the property.
4325
- *
4326
- * Snapping will occur if `holdPrevious` is true and this animation does not key all the same properties as the
4327
- * previous animation. */
4328
- holdPrevious = false;
4329
- reverse = false;
4330
- shortestRotation = false;
4331
- /** When the mix percentage ({@link #mixTime} / {@link #mixDuration}) is less than the
4332
- * `eventThreshold`, event timelines are applied while this animation is being mixed out. Defaults to 0, so event
4333
- * timelines are not applied while this animation is being mixed out. */
4334
- eventThreshold = 0;
4335
- /** When the mix percentage ({@link #mixtime} / {@link #mixDuration}) is less than the
4336
- * `attachmentThreshold`, attachment timelines are applied while this animation is being mixed out. Defaults to
4337
- * 0, so attachment timelines are not applied while this animation is being mixed out. */
4338
- mixAttachmentThreshold = 0;
4339
- /** When {@link #getAlpha()} is greater than <code>alphaAttachmentThreshold</code>, attachment timelines are applied.
4340
- * Defaults to 0, so attachment timelines are always applied. */
4341
- alphaAttachmentThreshold = 0;
4342
- /** When the mix percentage ({@link #getMixTime()} / {@link #getMixDuration()}) is less than the
4343
- * <code>mixDrawOrderThreshold</code>, draw order timelines are applied while this animation is being mixed out. Defaults to
4344
- * 0, so draw order timelines are not applied while this animation is being mixed out. */
4345
- mixDrawOrderThreshold = 0;
4346
- /** Seconds when this animation starts, both initially and after looping. Defaults to 0.
4347
- *
4348
- * When changing the `animationStart` time, it often makes sense to set {@link #animationLast} to the same
4349
- * value to prevent timeline keys before the start time from triggering. */
4350
- animationStart = 0;
4351
- /** Seconds for the last frame of this animation. Non-looping animations won't play past this time. Looping animations will
4352
- * loop back to {@link #animationStart} at this time. Defaults to the animation {@link Animation#duration}. */
4353
- animationEnd = 0;
4354
- /** The time in seconds this animation was last applied. Some timelines use this for one-time triggers. Eg, when this
4355
- * animation is applied, event timelines will fire all events between the `animationLast` time (exclusive) and
4356
- * `animationTime` (inclusive). Defaults to -1 to ensure triggers on frame 0 happen the first time this animation
4357
- * is applied. */
4358
- animationLast = 0;
4359
- nextAnimationLast = 0;
4360
- /** Seconds to postpone playing the animation. When this track entry is the current track entry, `delay`
4361
- * postpones incrementing the {@link #trackTime}. When this track entry is queued, `delay` is the time from
4362
- * the start of the previous animation to when this track entry will become the current track entry (ie when the previous
4363
- * track entry {@link TrackEntry#trackTime} >= this track entry's `delay`).
4364
- *
4365
- * {@link #timeScale} affects the delay. */
4366
- delay = 0;
4367
- /** Current time in seconds this track entry has been the current track entry. The track time determines
4368
- * {@link #animationTime}. The track time can be set to start the animation at a time other than 0, without affecting
4369
- * looping. */
4370
- trackTime = 0;
4371
- trackLast = 0;
4372
- nextTrackLast = 0;
4373
- /** The track time in seconds when this animation will be removed from the track. Defaults to the highest possible float
4374
- * value, meaning the animation will be applied until a new animation is set or the track is cleared. If the track end time
4375
- * is reached, no other animations are queued for playback, and mixing from any previous animations is complete, then the
4376
- * properties keyed by the animation are set to the setup pose and the track is cleared.
4377
- *
4378
- * It may be desired to use {@link AnimationState#addEmptyAnimation()} rather than have the animation
4379
- * abruptly cease being applied. */
4380
- trackEnd = 0;
4381
- /** Multiplier for the delta time when this track entry is updated, causing time for this animation to pass slower or
4382
- * faster. Defaults to 1.
4383
- *
4384
- * {@link #mixTime} is not affected by track entry time scale, so {@link #mixDuration} may need to be adjusted to
4385
- * match the animation speed.
4386
- *
4387
- * When using {@link AnimationState#addAnimation()} with a `delay` <= 0, note the
4388
- * {@link #delay} is set using the mix duration from the {@link AnimationStateData}, assuming time scale to be 1. If
4389
- * the time scale is not 1, the delay may need to be adjusted.
4390
- *
4391
- * See AnimationState {@link AnimationState#timeScale} for affecting all animations. */
4392
- timeScale = 0;
4393
- /** Values < 1 mix this animation with the skeleton's current pose (usually the pose resulting from lower tracks). Defaults
4394
- * to 1, which overwrites the skeleton's current pose with this animation.
4395
- *
4396
- * Typically track 0 is used to completely pose the skeleton, then alpha is used on higher tracks. It doesn't make sense to
4397
- * use alpha on track 0 if the skeleton pose is from the last frame render. */
4398
- alpha = 0;
4399
- /** Seconds from 0 to the {@link #getMixDuration()} when mixing from the previous animation to this animation. May be
4400
- * slightly more than `mixDuration` when the mix is complete. */
4401
- mixTime = 0;
4402
- /** Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData
4403
- * {@link AnimationStateData#getMix()} based on the animation before this animation (if any).
4404
- *
4405
- * A mix duration of 0 still mixes out over one frame to provide the track entry being mixed out a chance to revert the
4406
- * properties it was animating.
4407
- *
4408
- * The `mixDuration` can be set manually rather than use the value from
4409
- * {@link AnimationStateData#getMix()}. In that case, the `mixDuration` can be set for a new
4410
- * track entry only before {@link AnimationState#update(float)} is first called.
4411
- *
4412
- * When using {@link AnimationState#addAnimation()} with a `delay` <= 0, note the
4413
- * {@link #delay} is set using the mix duration from the {@link AnimationStateData}, not a mix duration set
4414
- * afterward. */
4415
- _mixDuration = 0;
4416
- interruptAlpha = 0;
4417
- totalAlpha = 0;
4308
+ constructor() {
4309
+ /** The animation to apply for this track entry. */
4310
+ this.animation = null;
4311
+ this.previous = null;
4312
+ /** The animation queued to start after this animation, or null. `next` makes up a linked list. */
4313
+ this.next = null;
4314
+ /** The track entry for the previous animation when mixing from the previous animation to this animation, or null if no
4315
+ * mixing is currently occuring. When mixing from multiple animations, `mixingFrom` makes up a linked list. */
4316
+ this.mixingFrom = null;
4317
+ /** The track entry for the next animation when mixing from this animation to the next animation, or null if no mixing is
4318
+ * currently occuring. When mixing to multiple animations, `mixingTo` makes up a linked list. */
4319
+ this.mixingTo = null;
4320
+ /** The listener for events generated by this track entry, or null.
4321
+ *
4322
+ * A track entry returned from {@link AnimationState#setAnimation()} is already the current animation
4323
+ * for the track, so the track entry listener {@link AnimationStateListener#start()} will not be called. */
4324
+ this.listener = null;
4325
+ /** The index of the track where this track entry is either current or queued.
4326
+ *
4327
+ * See {@link AnimationState#getCurrent()}. */
4328
+ this.trackIndex = 0;
4329
+ /** If true, the animation will repeat. If false it will not, instead its last frame is applied if played beyond its
4330
+ * duration. */
4331
+ this.loop = false;
4332
+ /** If true, when mixing from the previous animation to this animation, the previous animation is applied as normal instead
4333
+ * of being mixed out.
4334
+ *
4335
+ * When mixing between animations that key the same property, if a lower track also keys that property then the value will
4336
+ * briefly dip toward the lower track value during the mix. This happens because the first animation mixes from 100% to 0%
4337
+ * while the second animation mixes from 0% to 100%. Setting `holdPrevious` to true applies the first animation
4338
+ * at 100% during the mix so the lower track value is overwritten. Such dipping does not occur on the lowest track which
4339
+ * keys the property, only when a higher track also keys the property.
4340
+ *
4341
+ * Snapping will occur if `holdPrevious` is true and this animation does not key all the same properties as the
4342
+ * previous animation. */
4343
+ this.holdPrevious = false;
4344
+ this.reverse = false;
4345
+ this.shortestRotation = false;
4346
+ /** When the mix percentage ({@link #mixTime} / {@link #mixDuration}) is less than the
4347
+ * `eventThreshold`, event timelines are applied while this animation is being mixed out. Defaults to 0, so event
4348
+ * timelines are not applied while this animation is being mixed out. */
4349
+ this.eventThreshold = 0;
4350
+ /** When the mix percentage ({@link #mixtime} / {@link #mixDuration}) is less than the
4351
+ * `attachmentThreshold`, attachment timelines are applied while this animation is being mixed out. Defaults to
4352
+ * 0, so attachment timelines are not applied while this animation is being mixed out. */
4353
+ this.mixAttachmentThreshold = 0;
4354
+ /** When {@link #getAlpha()} is greater than <code>alphaAttachmentThreshold</code>, attachment timelines are applied.
4355
+ * Defaults to 0, so attachment timelines are always applied. */
4356
+ this.alphaAttachmentThreshold = 0;
4357
+ /** When the mix percentage ({@link #getMixTime()} / {@link #getMixDuration()}) is less than the
4358
+ * <code>mixDrawOrderThreshold</code>, draw order timelines are applied while this animation is being mixed out. Defaults to
4359
+ * 0, so draw order timelines are not applied while this animation is being mixed out. */
4360
+ this.mixDrawOrderThreshold = 0;
4361
+ /** Seconds when this animation starts, both initially and after looping. Defaults to 0.
4362
+ *
4363
+ * When changing the `animationStart` time, it often makes sense to set {@link #animationLast} to the same
4364
+ * value to prevent timeline keys before the start time from triggering. */
4365
+ this.animationStart = 0;
4366
+ /** Seconds for the last frame of this animation. Non-looping animations won't play past this time. Looping animations will
4367
+ * loop back to {@link #animationStart} at this time. Defaults to the animation {@link Animation#duration}. */
4368
+ this.animationEnd = 0;
4369
+ /** The time in seconds this animation was last applied. Some timelines use this for one-time triggers. Eg, when this
4370
+ * animation is applied, event timelines will fire all events between the `animationLast` time (exclusive) and
4371
+ * `animationTime` (inclusive). Defaults to -1 to ensure triggers on frame 0 happen the first time this animation
4372
+ * is applied. */
4373
+ this.animationLast = 0;
4374
+ this.nextAnimationLast = 0;
4375
+ /** Seconds to postpone playing the animation. When this track entry is the current track entry, `delay`
4376
+ * postpones incrementing the {@link #trackTime}. When this track entry is queued, `delay` is the time from
4377
+ * the start of the previous animation to when this track entry will become the current track entry (ie when the previous
4378
+ * track entry {@link TrackEntry#trackTime} >= this track entry's `delay`).
4379
+ *
4380
+ * {@link #timeScale} affects the delay. */
4381
+ this.delay = 0;
4382
+ /** Current time in seconds this track entry has been the current track entry. The track time determines
4383
+ * {@link #animationTime}. The track time can be set to start the animation at a time other than 0, without affecting
4384
+ * looping. */
4385
+ this.trackTime = 0;
4386
+ this.trackLast = 0;
4387
+ this.nextTrackLast = 0;
4388
+ /** The track time in seconds when this animation will be removed from the track. Defaults to the highest possible float
4389
+ * value, meaning the animation will be applied until a new animation is set or the track is cleared. If the track end time
4390
+ * is reached, no other animations are queued for playback, and mixing from any previous animations is complete, then the
4391
+ * properties keyed by the animation are set to the setup pose and the track is cleared.
4392
+ *
4393
+ * It may be desired to use {@link AnimationState#addEmptyAnimation()} rather than have the animation
4394
+ * abruptly cease being applied. */
4395
+ this.trackEnd = 0;
4396
+ /** Multiplier for the delta time when this track entry is updated, causing time for this animation to pass slower or
4397
+ * faster. Defaults to 1.
4398
+ *
4399
+ * {@link #mixTime} is not affected by track entry time scale, so {@link #mixDuration} may need to be adjusted to
4400
+ * match the animation speed.
4401
+ *
4402
+ * When using {@link AnimationState#addAnimation()} with a `delay` <= 0, note the
4403
+ * {@link #delay} is set using the mix duration from the {@link AnimationStateData}, assuming time scale to be 1. If
4404
+ * the time scale is not 1, the delay may need to be adjusted.
4405
+ *
4406
+ * See AnimationState {@link AnimationState#timeScale} for affecting all animations. */
4407
+ this.timeScale = 0;
4408
+ /** Values < 1 mix this animation with the skeleton's current pose (usually the pose resulting from lower tracks). Defaults
4409
+ * to 1, which overwrites the skeleton's current pose with this animation.
4410
+ *
4411
+ * Typically track 0 is used to completely pose the skeleton, then alpha is used on higher tracks. It doesn't make sense to
4412
+ * use alpha on track 0 if the skeleton pose is from the last frame render. */
4413
+ this.alpha = 0;
4414
+ /** Seconds from 0 to the {@link #getMixDuration()} when mixing from the previous animation to this animation. May be
4415
+ * slightly more than `mixDuration` when the mix is complete. */
4416
+ this.mixTime = 0;
4417
+ /** Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData
4418
+ * {@link AnimationStateData#getMix()} based on the animation before this animation (if any).
4419
+ *
4420
+ * A mix duration of 0 still mixes out over one frame to provide the track entry being mixed out a chance to revert the
4421
+ * properties it was animating.
4422
+ *
4423
+ * The `mixDuration` can be set manually rather than use the value from
4424
+ * {@link AnimationStateData#getMix()}. In that case, the `mixDuration` can be set for a new
4425
+ * track entry only before {@link AnimationState#update(float)} is first called.
4426
+ *
4427
+ * When using {@link AnimationState#addAnimation()} with a `delay` <= 0, note the
4428
+ * {@link #delay} is set using the mix duration from the {@link AnimationStateData}, not a mix duration set
4429
+ * afterward. */
4430
+ this._mixDuration = 0;
4431
+ this.interruptAlpha = 0;
4432
+ this.totalAlpha = 0;
4433
+ /** Controls how properties keyed in the animation are mixed with lower tracks. Defaults to {@link MixBlend#replace}, which
4434
+ * replaces the values from the lower tracks with the animation values. {@link MixBlend#add} adds the animation values to
4435
+ * the values from the lower tracks.
4436
+ *
4437
+ * The `mixBlend` can be set for a new track entry only before {@link AnimationState#apply()} is first
4438
+ * called. */
4439
+ this.mixBlend = 2 /* replace */;
4440
+ this.timelineMode = new Array();
4441
+ this.timelineHoldMix = new Array();
4442
+ this.timelinesRotation = new Array();
4443
+ }
4418
4444
  get mixDuration() {
4419
4445
  return this._mixDuration;
4420
4446
  }
@@ -4426,16 +4452,6 @@ var TrackEntry = class {
4426
4452
  if (this.previous != null && delay <= 0) delay += this.previous.getTrackComplete() - mixDuration;
4427
4453
  this.delay = delay;
4428
4454
  }
4429
- /** Controls how properties keyed in the animation are mixed with lower tracks. Defaults to {@link MixBlend#replace}, which
4430
- * replaces the values from the lower tracks with the animation values. {@link MixBlend#add} adds the animation values to
4431
- * the values from the lower tracks.
4432
- *
4433
- * The `mixBlend` can be set for a new track entry only before {@link AnimationState#apply()} is first
4434
- * called. */
4435
- mixBlend = 2 /* replace */;
4436
- timelineMode = new Array();
4437
- timelineHoldMix = new Array();
4438
- timelinesRotation = new Array();
4439
4455
  reset() {
4440
4456
  this.next = null;
4441
4457
  this.previous = null;
@@ -4499,10 +4515,9 @@ var TrackEntry = class {
4499
4515
  }
4500
4516
  };
4501
4517
  var EventQueue = class {
4502
- objects = [];
4503
- drainDisabled = false;
4504
- animState;
4505
4518
  constructor(animState) {
4519
+ this.objects = [];
4520
+ this.drainDisabled = false;
4506
4521
  this.animState = animState;
4507
4522
  }
4508
4523
  start(entry) {
@@ -4620,12 +4635,10 @@ var CURRENT = 2;
4620
4635
 
4621
4636
  // spine-core/src/AnimationStateData.ts
4622
4637
  var AnimationStateData = class {
4623
- /** The SkeletonData to look up animations when they are specified by name. */
4624
- skeletonData;
4625
- animationToMixTime = {};
4626
- /** The mix duration to use when no mix duration has been defined between two animations. */
4627
- defaultMix = 0;
4628
4638
  constructor(skeletonData) {
4639
+ this.animationToMixTime = {};
4640
+ /** The mix duration to use when no mix duration has been defined between two animations. */
4641
+ this.defaultMix = 0;
4629
4642
  if (!skeletonData) throw new Error('skeletonData cannot be null.');
4630
4643
  this.skeletonData = skeletonData;
4631
4644
  }
@@ -4659,9 +4672,9 @@ var AnimationStateData = class {
4659
4672
 
4660
4673
  // spine-core/src/attachments/BoundingBoxAttachment.ts
4661
4674
  var BoundingBoxAttachment = class extends VertexAttachment {
4662
- color = new Color(1, 1, 1, 1);
4663
4675
  constructor(name) {
4664
4676
  super(name);
4677
+ this.color = new Color(1, 1, 1, 1);
4665
4678
  }
4666
4679
  copy() {
4667
4680
  let copy = new BoundingBoxAttachment(this.name);
@@ -4673,16 +4686,16 @@ var BoundingBoxAttachment = class extends VertexAttachment {
4673
4686
 
4674
4687
  // spine-core/src/attachments/ClippingAttachment.ts
4675
4688
  var ClippingAttachment = class extends VertexAttachment {
4676
- /** Clipping is performed between the clipping polygon's slot and the end slot. Returns null if clipping is done until the end of
4677
- * the skeleton's rendering. */
4678
- endSlot = null;
4679
- // Nonessential.
4680
- /** The color of the clipping polygon as it was in Spine. Available only when nonessential data was exported. Clipping polygons
4681
- * are not usually rendered at runtime. */
4682
- color = new Color(0.2275, 0.2275, 0.8078, 1);
4683
4689
  // ce3a3aff
4684
4690
  constructor(name) {
4685
4691
  super(name);
4692
+ /** Clipping is performed between the clipping polygon's slot and the end slot. Returns null if clipping is done until the end of
4693
+ * the skeleton's rendering. */
4694
+ this.endSlot = null;
4695
+ // Nonessential.
4696
+ /** The color of the clipping polygon as it was in Spine. Available only when nonessential data was exported. Clipping polygons
4697
+ * are not usually rendered at runtime. */
4698
+ this.color = new Color(0.2275, 0.2275, 0.8078, 1);
4686
4699
  }
4687
4700
  copy() {
4688
4701
  let copy = new ClippingAttachment(this.name);
@@ -4695,7 +4708,6 @@ var ClippingAttachment = class extends VertexAttachment {
4695
4708
 
4696
4709
  // spine-core/src/Texture.ts
4697
4710
  var Texture = class {
4698
- _image;
4699
4711
  constructor(image) {
4700
4712
  this._image = image;
4701
4713
  }
@@ -4720,18 +4732,19 @@ var TextureWrap = /* @__PURE__ */ (TextureWrap2 => {
4720
4732
  return TextureWrap2;
4721
4733
  })(TextureWrap || {});
4722
4734
  var TextureRegion = class {
4723
- texture;
4724
- u = 0;
4725
- v = 0;
4726
- u2 = 0;
4727
- v2 = 0;
4728
- width = 0;
4729
- height = 0;
4730
- degrees = 0;
4731
- offsetX = 0;
4732
- offsetY = 0;
4733
- originalWidth = 0;
4734
- originalHeight = 0;
4735
+ constructor() {
4736
+ this.u = 0;
4737
+ this.v = 0;
4738
+ this.u2 = 0;
4739
+ this.v2 = 0;
4740
+ this.width = 0;
4741
+ this.height = 0;
4742
+ this.degrees = 0;
4743
+ this.offsetX = 0;
4744
+ this.offsetY = 0;
4745
+ this.originalWidth = 0;
4746
+ this.originalHeight = 0;
4747
+ }
4735
4748
  };
4736
4749
  var FakeTexture = class extends Texture {
4737
4750
  setFilters(minFilter, magFilter) {}
@@ -4741,9 +4754,9 @@ var FakeTexture = class extends Texture {
4741
4754
 
4742
4755
  // spine-core/src/TextureAtlas.ts
4743
4756
  var TextureAtlas = class {
4744
- pages = new Array();
4745
- regions = new Array();
4746
4757
  constructor(atlasText) {
4758
+ this.pages = new Array();
4759
+ this.regions = new Array();
4747
4760
  let reader = new TextureAtlasReader(atlasText);
4748
4761
  let entry = new Array(4);
4749
4762
  let pageFields = {};
@@ -4874,15 +4887,15 @@ var TextureAtlas = class {
4874
4887
  for (let page of this.pages) page.setTexture(assetManager.get(pathPrefix + page.name));
4875
4888
  }
4876
4889
  dispose() {
4890
+ var _a;
4877
4891
  for (let i = 0; i < this.pages.length; i++) {
4878
- this.pages[i].texture?.dispose();
4892
+ (_a = this.pages[i].texture) == null ? void 0 : _a.dispose();
4879
4893
  }
4880
4894
  }
4881
4895
  };
4882
4896
  var TextureAtlasReader = class {
4883
- lines;
4884
- index = 0;
4885
4897
  constructor(text) {
4898
+ this.index = 0;
4886
4899
  this.lines = text.split(/\r\n|\r|\n/);
4887
4900
  }
4888
4901
  readLine() {
@@ -4909,17 +4922,16 @@ var TextureAtlasReader = class {
4909
4922
  }
4910
4923
  };
4911
4924
  var TextureAtlasPage = class {
4912
- name;
4913
- minFilter = 9728 /* Nearest */;
4914
- magFilter = 9728 /* Nearest */;
4915
- uWrap = 33071 /* ClampToEdge */;
4916
- vWrap = 33071 /* ClampToEdge */;
4917
- texture = null;
4918
- width = 0;
4919
- height = 0;
4920
- pma = false;
4921
- regions = new Array();
4922
4925
  constructor(name) {
4926
+ this.minFilter = 9728 /* Nearest */;
4927
+ this.magFilter = 9728 /* Nearest */;
4928
+ this.uWrap = 33071 /* ClampToEdge */;
4929
+ this.vWrap = 33071 /* ClampToEdge */;
4930
+ this.texture = null;
4931
+ this.width = 0;
4932
+ this.height = 0;
4933
+ this.pma = false;
4934
+ this.regions = new Array();
4923
4935
  this.name = name;
4924
4936
  }
4925
4937
  setTexture(texture) {
@@ -4930,20 +4942,18 @@ var TextureAtlasPage = class {
4930
4942
  }
4931
4943
  };
4932
4944
  var TextureAtlasRegion = class extends TextureRegion {
4933
- page;
4934
- name;
4935
- x = 0;
4936
- y = 0;
4937
- offsetX = 0;
4938
- offsetY = 0;
4939
- originalWidth = 0;
4940
- originalHeight = 0;
4941
- index = 0;
4942
- degrees = 0;
4943
- names = null;
4944
- values = null;
4945
4945
  constructor(page, name) {
4946
4946
  super();
4947
+ this.x = 0;
4948
+ this.y = 0;
4949
+ this.offsetX = 0;
4950
+ this.offsetY = 0;
4951
+ this.originalWidth = 0;
4952
+ this.originalHeight = 0;
4953
+ this.index = 0;
4954
+ this.degrees = 0;
4955
+ this.names = null;
4956
+ this.values = null;
4947
4957
  this.page = page;
4948
4958
  this.name = name;
4949
4959
  page.regions.push(this);
@@ -4952,33 +4962,31 @@ var TextureAtlasRegion = class extends TextureRegion {
4952
4962
 
4953
4963
  // spine-core/src/attachments/MeshAttachment.ts
4954
4964
  var MeshAttachment = class extends VertexAttachment {
4955
- region = null;
4956
- /** The name of the texture region for this attachment. */
4957
- path;
4958
- /** The UV pair for each vertex, normalized within the texture region. */
4959
- regionUVs = [];
4960
- /** The UV pair for each vertex, normalized within the entire texture.
4961
- *
4962
- * See {@link #updateUVs}. */
4963
- uvs = [];
4964
- /** Triplets of vertex indices which describe the mesh's triangulation. */
4965
- triangles = [];
4966
- /** The color to tint the mesh. */
4967
- color = new Color(1, 1, 1, 1);
4968
- /** The width of the mesh's image. Available only when nonessential data was exported. */
4969
- width = 0;
4970
- /** The height of the mesh's image. Available only when nonessential data was exported. */
4971
- height = 0;
4972
- /** The number of entries at the beginning of {@link #vertices} that make up the mesh hull. */
4973
- hullLength = 0;
4974
- /** Vertex index pairs describing edges for controling triangulation. Mesh triangles will never cross edges. Only available if
4975
- * nonessential data was exported. Triangulation is not performed at runtime. */
4976
- edges = [];
4977
- parentMesh = null;
4978
- sequence = null;
4979
- tempColor = new Color(0, 0, 0, 0);
4980
4965
  constructor(name, path2) {
4981
4966
  super(name);
4967
+ this.region = null;
4968
+ /** The UV pair for each vertex, normalized within the texture region. */
4969
+ this.regionUVs = [];
4970
+ /** The UV pair for each vertex, normalized within the entire texture.
4971
+ *
4972
+ * See {@link #updateUVs}. */
4973
+ this.uvs = [];
4974
+ /** Triplets of vertex indices which describe the mesh's triangulation. */
4975
+ this.triangles = [];
4976
+ /** The color to tint the mesh. */
4977
+ this.color = new Color(1, 1, 1, 1);
4978
+ /** The width of the mesh's image. Available only when nonessential data was exported. */
4979
+ this.width = 0;
4980
+ /** The height of the mesh's image. Available only when nonessential data was exported. */
4981
+ this.height = 0;
4982
+ /** The number of entries at the beginning of {@link #vertices} that make up the mesh hull. */
4983
+ this.hullLength = 0;
4984
+ /** Vertex index pairs describing edges for controling triangulation. Mesh triangles will never cross edges. Only available if
4985
+ * nonessential data was exported. Triangulation is not performed at runtime. */
4986
+ this.edges = [];
4987
+ this.parentMesh = null;
4988
+ this.sequence = null;
4989
+ this.tempColor = new Color(0, 0, 0, 0);
4982
4990
  this.path = path2;
4983
4991
  }
4984
4992
  /** Calculates {@link #uvs} using the {@link #regionUVs} and region. Must be called if the region, the region's properties, or
@@ -5105,18 +5113,18 @@ var MeshAttachment = class extends VertexAttachment {
5105
5113
 
5106
5114
  // spine-core/src/attachments/PathAttachment.ts
5107
5115
  var PathAttachment = class extends VertexAttachment {
5108
- /** The lengths along the path in the setup pose from the start of the path to the end of each Bezier curve. */
5109
- lengths = [];
5110
- /** If true, the start and end knots are connected. */
5111
- closed = false;
5112
- /** If true, additional calculations are performed to make calculating positions along the path more accurate. If false, fewer
5113
- * calculations are performed but calculating positions along the path is less accurate. */
5114
- constantSpeed = false;
5115
- /** The color of the path as it was in Spine. Available only when nonessential data was exported. Paths are not usually
5116
- * rendered at runtime. */
5117
- color = new Color(1, 1, 1, 1);
5118
5116
  constructor(name) {
5119
5117
  super(name);
5118
+ /** The lengths along the path in the setup pose from the start of the path to the end of each Bezier curve. */
5119
+ this.lengths = [];
5120
+ /** If true, the start and end knots are connected. */
5121
+ this.closed = false;
5122
+ /** If true, additional calculations are performed to make calculating positions along the path more accurate. If false, fewer
5123
+ * calculations are performed but calculating positions along the path is less accurate. */
5124
+ this.constantSpeed = false;
5125
+ /** The color of the path as it was in Spine. Available only when nonessential data was exported. Paths are not usually
5126
+ * rendered at runtime. */
5127
+ this.color = new Color(1, 1, 1, 1);
5120
5128
  }
5121
5129
  copy() {
5122
5130
  let copy = new PathAttachment(this.name);
@@ -5132,14 +5140,14 @@ var PathAttachment = class extends VertexAttachment {
5132
5140
 
5133
5141
  // spine-core/src/attachments/PointAttachment.ts
5134
5142
  var PointAttachment = class extends VertexAttachment {
5135
- x = 0;
5136
- y = 0;
5137
- rotation = 0;
5138
- /** The color of the point attachment as it was in Spine. Available only when nonessential data was exported. Point attachments
5139
- * are not usually rendered at runtime. */
5140
- color = new Color(0.38, 0.94, 0, 1);
5141
5143
  constructor(name) {
5142
5144
  super(name);
5145
+ this.x = 0;
5146
+ this.y = 0;
5147
+ this.rotation = 0;
5148
+ /** The color of the point attachment as it was in Spine. Available only when nonessential data was exported. Point attachments
5149
+ * are not usually rendered at runtime. */
5150
+ this.color = new Color(0.38, 0.94, 0, 1);
5143
5151
  }
5144
5152
  computeWorldPosition(bone, point) {
5145
5153
  point.x = this.x * bone.a + this.y * bone.b + bone.worldX;
@@ -5166,34 +5174,32 @@ var PointAttachment = class extends VertexAttachment {
5166
5174
 
5167
5175
  // spine-core/src/attachments/RegionAttachment.ts
5168
5176
  var _RegionAttachment = class extends Attachment {
5169
- /** The local x translation. */
5170
- x = 0;
5171
- /** The local y translation. */
5172
- y = 0;
5173
- /** The local scaleX. */
5174
- scaleX = 1;
5175
- /** The local scaleY. */
5176
- scaleY = 1;
5177
- /** The local rotation. */
5178
- rotation = 0;
5179
- /** The width of the region attachment in Spine. */
5180
- width = 0;
5181
- /** The height of the region attachment in Spine. */
5182
- height = 0;
5183
- /** The color to tint the region attachment. */
5184
- color = new Color(1, 1, 1, 1);
5185
- /** The name of the texture region for this attachment. */
5186
- path;
5187
- region = null;
5188
- sequence = null;
5189
- /** For each of the 4 vertices, a pair of <code>x,y</code> values that is the local position of the vertex.
5190
- *
5191
- * See {@link #updateOffset()}. */
5192
- offset = Utils.newFloatArray(8);
5193
- uvs = Utils.newFloatArray(8);
5194
- tempColor = new Color(1, 1, 1, 1);
5195
5177
  constructor(name, path2) {
5196
5178
  super(name);
5179
+ /** The local x translation. */
5180
+ this.x = 0;
5181
+ /** The local y translation. */
5182
+ this.y = 0;
5183
+ /** The local scaleX. */
5184
+ this.scaleX = 1;
5185
+ /** The local scaleY. */
5186
+ this.scaleY = 1;
5187
+ /** The local rotation. */
5188
+ this.rotation = 0;
5189
+ /** The width of the region attachment in Spine. */
5190
+ this.width = 0;
5191
+ /** The height of the region attachment in Spine. */
5192
+ this.height = 0;
5193
+ /** The color to tint the region attachment. */
5194
+ this.color = new Color(1, 1, 1, 1);
5195
+ this.region = null;
5196
+ this.sequence = null;
5197
+ /** For each of the 4 vertices, a pair of <code>x,y</code> values that is the local position of the vertex.
5198
+ *
5199
+ * See {@link #updateOffset()}. */
5200
+ this.offset = Utils.newFloatArray(8);
5201
+ this.uvs = Utils.newFloatArray(8);
5202
+ this.tempColor = new Color(1, 1, 1, 1);
5197
5203
  this.path = path2;
5198
5204
  }
5199
5205
  /** Calculates the {@link #offset} using the region settings. Must be called after changing region settings. */
@@ -5318,42 +5324,41 @@ var _RegionAttachment = class extends Attachment {
5318
5324
  }
5319
5325
  };
5320
5326
  var RegionAttachment = _RegionAttachment;
5321
- __publicField(RegionAttachment, 'X1', 0);
5322
- __publicField(RegionAttachment, 'Y1', 1);
5323
- __publicField(RegionAttachment, 'C1R', 2);
5324
- __publicField(RegionAttachment, 'C1G', 3);
5325
- __publicField(RegionAttachment, 'C1B', 4);
5326
- __publicField(RegionAttachment, 'C1A', 5);
5327
- __publicField(RegionAttachment, 'U1', 6);
5328
- __publicField(RegionAttachment, 'V1', 7);
5329
- __publicField(RegionAttachment, 'X2', 8);
5330
- __publicField(RegionAttachment, 'Y2', 9);
5331
- __publicField(RegionAttachment, 'C2R', 10);
5332
- __publicField(RegionAttachment, 'C2G', 11);
5333
- __publicField(RegionAttachment, 'C2B', 12);
5334
- __publicField(RegionAttachment, 'C2A', 13);
5335
- __publicField(RegionAttachment, 'U2', 14);
5336
- __publicField(RegionAttachment, 'V2', 15);
5337
- __publicField(RegionAttachment, 'X3', 16);
5338
- __publicField(RegionAttachment, 'Y3', 17);
5339
- __publicField(RegionAttachment, 'C3R', 18);
5340
- __publicField(RegionAttachment, 'C3G', 19);
5341
- __publicField(RegionAttachment, 'C3B', 20);
5342
- __publicField(RegionAttachment, 'C3A', 21);
5343
- __publicField(RegionAttachment, 'U3', 22);
5344
- __publicField(RegionAttachment, 'V3', 23);
5345
- __publicField(RegionAttachment, 'X4', 24);
5346
- __publicField(RegionAttachment, 'Y4', 25);
5347
- __publicField(RegionAttachment, 'C4R', 26);
5348
- __publicField(RegionAttachment, 'C4G', 27);
5349
- __publicField(RegionAttachment, 'C4B', 28);
5350
- __publicField(RegionAttachment, 'C4A', 29);
5351
- __publicField(RegionAttachment, 'U4', 30);
5352
- __publicField(RegionAttachment, 'V4', 31);
5327
+ RegionAttachment.X1 = 0;
5328
+ RegionAttachment.Y1 = 1;
5329
+ RegionAttachment.C1R = 2;
5330
+ RegionAttachment.C1G = 3;
5331
+ RegionAttachment.C1B = 4;
5332
+ RegionAttachment.C1A = 5;
5333
+ RegionAttachment.U1 = 6;
5334
+ RegionAttachment.V1 = 7;
5335
+ RegionAttachment.X2 = 8;
5336
+ RegionAttachment.Y2 = 9;
5337
+ RegionAttachment.C2R = 10;
5338
+ RegionAttachment.C2G = 11;
5339
+ RegionAttachment.C2B = 12;
5340
+ RegionAttachment.C2A = 13;
5341
+ RegionAttachment.U2 = 14;
5342
+ RegionAttachment.V2 = 15;
5343
+ RegionAttachment.X3 = 16;
5344
+ RegionAttachment.Y3 = 17;
5345
+ RegionAttachment.C3R = 18;
5346
+ RegionAttachment.C3G = 19;
5347
+ RegionAttachment.C3B = 20;
5348
+ RegionAttachment.C3A = 21;
5349
+ RegionAttachment.U3 = 22;
5350
+ RegionAttachment.V3 = 23;
5351
+ RegionAttachment.X4 = 24;
5352
+ RegionAttachment.Y4 = 25;
5353
+ RegionAttachment.C4R = 26;
5354
+ RegionAttachment.C4G = 27;
5355
+ RegionAttachment.C4B = 28;
5356
+ RegionAttachment.C4A = 29;
5357
+ RegionAttachment.U4 = 30;
5358
+ RegionAttachment.V4 = 31;
5353
5359
 
5354
5360
  // spine-core/src/AtlasAttachmentLoader.ts
5355
5361
  var AtlasAttachmentLoader = class {
5356
- atlas;
5357
5362
  constructor(atlas) {
5358
5363
  this.atlas = atlas;
5359
5364
  }
@@ -5404,42 +5409,38 @@ var AtlasAttachmentLoader = class {
5404
5409
 
5405
5410
  // spine-core/src/BoneData.ts
5406
5411
  var BoneData = class {
5407
- /** The index of the bone in {@link Skeleton#getBones()}. */
5408
- index = 0;
5409
- /** The name of the bone, which is unique across all bones in the skeleton. */
5410
- name;
5411
- /** @returns May be null. */
5412
- parent = null;
5413
- /** The bone's length. */
5414
- length = 0;
5415
- /** The local x translation. */
5416
- x = 0;
5417
- /** The local y translation. */
5418
- y = 0;
5419
- /** The local rotation in degrees, counter clockwise. */
5420
- rotation = 0;
5421
- /** The local scaleX. */
5422
- scaleX = 1;
5423
- /** The local scaleY. */
5424
- scaleY = 1;
5425
- /** The local shearX. */
5426
- shearX = 0;
5427
- /** The local shearX. */
5428
- shearY = 0;
5429
- /** The transform mode for how parent world transforms affect this bone. */
5430
- inherit = Inherit.Normal;
5431
- /** When true, {@link Skeleton#updateWorldTransform()} only updates this bone if the {@link Skeleton#skin} contains this
5432
- * bone.
5433
- * @see Skin#bones */
5434
- skinRequired = false;
5435
- /** The color of the bone as it was in Spine. Available only when nonessential data was exported. Bones are not usually
5436
- * rendered at runtime. */
5437
- color = new Color();
5438
- /** The bone icon as it was in Spine, or null if nonessential data was not exported. */
5439
- icon;
5440
- /** False if the bone was hidden in Spine and nonessential data was exported. Does not affect runtime rendering. */
5441
- visible = false;
5442
5412
  constructor(index, name, parent) {
5413
+ /** The index of the bone in {@link Skeleton#getBones()}. */
5414
+ this.index = 0;
5415
+ /** @returns May be null. */
5416
+ this.parent = null;
5417
+ /** The bone's length. */
5418
+ this.length = 0;
5419
+ /** The local x translation. */
5420
+ this.x = 0;
5421
+ /** The local y translation. */
5422
+ this.y = 0;
5423
+ /** The local rotation in degrees, counter clockwise. */
5424
+ this.rotation = 0;
5425
+ /** The local scaleX. */
5426
+ this.scaleX = 1;
5427
+ /** The local scaleY. */
5428
+ this.scaleY = 1;
5429
+ /** The local shearX. */
5430
+ this.shearX = 0;
5431
+ /** The local shearX. */
5432
+ this.shearY = 0;
5433
+ /** The transform mode for how parent world transforms affect this bone. */
5434
+ this.inherit = Inherit.Normal;
5435
+ /** When true, {@link Skeleton#updateWorldTransform()} only updates this bone if the {@link Skeleton#skin} contains this
5436
+ * bone.
5437
+ * @see Skin#bones */
5438
+ this.skinRequired = false;
5439
+ /** The color of the bone as it was in Spine. Available only when nonessential data was exported. Bones are not usually
5440
+ * rendered at runtime. */
5441
+ this.color = new Color();
5442
+ /** False if the bone was hidden in Spine and nonessential data was exported. Does not affect runtime rendering. */
5443
+ this.visible = false;
5443
5444
  if (index < 0) throw new Error('index must be >= 0.');
5444
5445
  if (!name) throw new Error('name cannot be null.');
5445
5446
  this.index = index;
@@ -5458,59 +5459,55 @@ var Inherit = /* @__PURE__ */ (Inherit2 => {
5458
5459
 
5459
5460
  // spine-core/src/Bone.ts
5460
5461
  var Bone = class {
5461
- /** The bone's setup pose data. */
5462
- data;
5463
- /** The skeleton this bone belongs to. */
5464
- skeleton;
5465
- /** The parent bone, or null if this is the root bone. */
5466
- parent = null;
5467
- /** The immediate children of this bone. */
5468
- children = new Array();
5469
- /** The local x translation. */
5470
- x = 0;
5471
- /** The local y translation. */
5472
- y = 0;
5473
- /** The local rotation in degrees, counter clockwise. */
5474
- rotation = 0;
5475
- /** The local scaleX. */
5476
- scaleX = 0;
5477
- /** The local scaleY. */
5478
- scaleY = 0;
5479
- /** The local shearX. */
5480
- shearX = 0;
5481
- /** The local shearY. */
5482
- shearY = 0;
5483
- /** The applied local x translation. */
5484
- ax = 0;
5485
- /** The applied local y translation. */
5486
- ay = 0;
5487
- /** The applied local rotation in degrees, counter clockwise. */
5488
- arotation = 0;
5489
- /** The applied local scaleX. */
5490
- ascaleX = 0;
5491
- /** The applied local scaleY. */
5492
- ascaleY = 0;
5493
- /** The applied local shearX. */
5494
- ashearX = 0;
5495
- /** The applied local shearY. */
5496
- ashearY = 0;
5497
- /** Part of the world transform matrix for the X axis. If changed, {@link #updateAppliedTransform()} should be called. */
5498
- a = 0;
5499
- /** Part of the world transform matrix for the Y axis. If changed, {@link #updateAppliedTransform()} should be called. */
5500
- b = 0;
5501
- /** Part of the world transform matrix for the X axis. If changed, {@link #updateAppliedTransform()} should be called. */
5502
- c = 0;
5503
- /** Part of the world transform matrix for the Y axis. If changed, {@link #updateAppliedTransform()} should be called. */
5504
- d = 0;
5505
- /** The world X position. If changed, {@link #updateAppliedTransform()} should be called. */
5506
- worldY = 0;
5507
- /** The world Y position. If changed, {@link #updateAppliedTransform()} should be called. */
5508
- worldX = 0;
5509
- inherit = 0 /* Normal */;
5510
- sorted = false;
5511
- active = false;
5512
5462
  /** @param parent May be null. */
5513
5463
  constructor(data, skeleton, parent) {
5464
+ /** The parent bone, or null if this is the root bone. */
5465
+ this.parent = null;
5466
+ /** The immediate children of this bone. */
5467
+ this.children = new Array();
5468
+ /** The local x translation. */
5469
+ this.x = 0;
5470
+ /** The local y translation. */
5471
+ this.y = 0;
5472
+ /** The local rotation in degrees, counter clockwise. */
5473
+ this.rotation = 0;
5474
+ /** The local scaleX. */
5475
+ this.scaleX = 0;
5476
+ /** The local scaleY. */
5477
+ this.scaleY = 0;
5478
+ /** The local shearX. */
5479
+ this.shearX = 0;
5480
+ /** The local shearY. */
5481
+ this.shearY = 0;
5482
+ /** The applied local x translation. */
5483
+ this.ax = 0;
5484
+ /** The applied local y translation. */
5485
+ this.ay = 0;
5486
+ /** The applied local rotation in degrees, counter clockwise. */
5487
+ this.arotation = 0;
5488
+ /** The applied local scaleX. */
5489
+ this.ascaleX = 0;
5490
+ /** The applied local scaleY. */
5491
+ this.ascaleY = 0;
5492
+ /** The applied local shearX. */
5493
+ this.ashearX = 0;
5494
+ /** The applied local shearY. */
5495
+ this.ashearY = 0;
5496
+ /** Part of the world transform matrix for the X axis. If changed, {@link #updateAppliedTransform()} should be called. */
5497
+ this.a = 0;
5498
+ /** Part of the world transform matrix for the Y axis. If changed, {@link #updateAppliedTransform()} should be called. */
5499
+ this.b = 0;
5500
+ /** Part of the world transform matrix for the X axis. If changed, {@link #updateAppliedTransform()} should be called. */
5501
+ this.c = 0;
5502
+ /** Part of the world transform matrix for the Y axis. If changed, {@link #updateAppliedTransform()} should be called. */
5503
+ this.d = 0;
5504
+ /** The world X position. If changed, {@link #updateAppliedTransform()} should be called. */
5505
+ this.worldY = 0;
5506
+ /** The world Y position. If changed, {@link #updateAppliedTransform()} should be called. */
5507
+ this.worldX = 0;
5508
+ this.inherit = 0 /* Normal */;
5509
+ this.sorted = false;
5510
+ this.active = false;
5514
5511
  if (!data) throw new Error('data cannot be null.');
5515
5512
  if (!skeleton) throw new Error('skeleton cannot be null.');
5516
5513
  this.data = data;
@@ -5857,14 +5854,12 @@ var ConstraintData = class {
5857
5854
 
5858
5855
  // spine-core/src/AssetManagerBase.ts
5859
5856
  var AssetManagerBase = class {
5860
- pathPrefix = '';
5861
- textureLoader;
5862
- downloader;
5863
- assets = {};
5864
- errors = {};
5865
- toLoad = 0;
5866
- loaded = 0;
5867
5857
  constructor(textureLoader, pathPrefix = '', downloader = new Downloader()) {
5858
+ this.pathPrefix = '';
5859
+ this.assets = {};
5860
+ this.errors = {};
5861
+ this.toLoad = 0;
5862
+ this.loaded = 0;
5868
5863
  this.textureLoader = textureLoader;
5869
5864
  this.pathPrefix = pathPrefix;
5870
5865
  this.downloader = downloader;
@@ -5950,7 +5945,12 @@ var AssetManagerBase = class {
5950
5945
  return null;
5951
5946
  })
5952
5947
  .then(blob => {
5953
- return blob ? createImageBitmap(blob, { premultiplyAlpha: 'none', colorSpaceConversion: 'none' }) : null;
5948
+ return blob
5949
+ ? createImageBitmap(blob, {
5950
+ premultiplyAlpha: 'none',
5951
+ colorSpaceConversion: 'none',
5952
+ })
5953
+ : null;
5954
5954
  })
5955
5955
  .then(bitmap => {
5956
5956
  if (bitmap) this.success(success, path2, this.textureLoader(bitmap));
@@ -6047,8 +6047,10 @@ var AssetManagerBase = class {
6047
6047
  }
6048
6048
  };
6049
6049
  var Downloader = class {
6050
- callbacks = {};
6051
- rawDataUris = {};
6050
+ constructor() {
6051
+ this.callbacks = {};
6052
+ this.rawDataUris = {};
6053
+ }
6052
6054
  dataUriToString(dataUri) {
6053
6055
  if (!dataUri.startsWith('data:')) {
6054
6056
  throw new Error('Not a data URI.');
@@ -6152,14 +6154,13 @@ var Downloader = class {
6152
6154
 
6153
6155
  // spine-core/src/Event.ts
6154
6156
  var Event = class {
6155
- data;
6156
- intValue = 0;
6157
- floatValue = 0;
6158
- stringValue = null;
6159
- time = 0;
6160
- volume = 0;
6161
- balance = 0;
6162
6157
  constructor(time, data) {
6158
+ this.intValue = 0;
6159
+ this.floatValue = 0;
6160
+ this.stringValue = null;
6161
+ this.time = 0;
6162
+ this.volume = 0;
6163
+ this.balance = 0;
6163
6164
  if (!data) throw new Error('data cannot be null.');
6164
6165
  this.time = time;
6165
6166
  this.data = data;
@@ -6168,39 +6169,32 @@ var Event = class {
6168
6169
 
6169
6170
  // spine-core/src/EventData.ts
6170
6171
  var EventData = class {
6171
- name;
6172
- intValue = 0;
6173
- floatValue = 0;
6174
- stringValue = null;
6175
- audioPath = null;
6176
- volume = 0;
6177
- balance = 0;
6178
6172
  constructor(name) {
6173
+ this.intValue = 0;
6174
+ this.floatValue = 0;
6175
+ this.stringValue = null;
6176
+ this.audioPath = null;
6177
+ this.volume = 0;
6178
+ this.balance = 0;
6179
6179
  this.name = name;
6180
6180
  }
6181
6181
  };
6182
6182
 
6183
6183
  // spine-core/src/IkConstraint.ts
6184
6184
  var IkConstraint = class {
6185
- /** The IK constraint's setup pose data. */
6186
- data;
6187
- /** The bones that will be modified by this IK constraint. */
6188
- bones;
6189
- /** The bone that is the IK target. */
6190
- target;
6191
- /** Controls the bend direction of the IK bones, either 1 or -1. */
6192
- bendDirection = 0;
6193
- /** When true and only a single bone is being constrained, if the target is too close, the bone is scaled to reach it. */
6194
- compress = false;
6195
- /** 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
6196
- * and the parent bone has local nonuniform scale, stretch is not applied. */
6197
- stretch = false;
6198
- /** A percentage (0-1) that controls the mix between the constrained and unconstrained rotations. */
6199
- mix = 1;
6200
- /** For two bone IK, the distance from the maximum reach of the bones that rotation will slow. */
6201
- softness = 0;
6202
- active = false;
6203
6185
  constructor(data, skeleton) {
6186
+ /** Controls the bend direction of the IK bones, either 1 or -1. */
6187
+ this.bendDirection = 0;
6188
+ /** When true and only a single bone is being constrained, if the target is too close, the bone is scaled to reach it. */
6189
+ this.compress = false;
6190
+ /** 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
6191
+ * and the parent bone has local nonuniform scale, stretch is not applied. */
6192
+ this.stretch = false;
6193
+ /** A percentage (0-1) that controls the mix between the constrained and unconstrained rotations. */
6194
+ this.mix = 1;
6195
+ /** For two bone IK, the distance from the maximum reach of the bones that rotation will slow. */
6196
+ this.softness = 0;
6197
+ this.active = false;
6204
6198
  if (!data) throw new Error('data cannot be null.');
6205
6199
  if (!skeleton) throw new Error('skeleton cannot be null.');
6206
6200
  this.data = data;
@@ -6509,10 +6503,27 @@ var IkConstraint = class {
6509
6503
 
6510
6504
  // spine-core/src/IkConstraintData.ts
6511
6505
  var IkConstraintData = class extends ConstraintData {
6512
- /** The bones that are constrained by this IK constraint. */
6513
- bones = new Array();
6514
- /** The bone that is the IK target. */
6515
- _target = null;
6506
+ constructor(name) {
6507
+ super(name, 0, false);
6508
+ /** The bones that are constrained by this IK constraint. */
6509
+ this.bones = new Array();
6510
+ /** The bone that is the IK target. */
6511
+ this._target = null;
6512
+ /** Controls the bend direction of the IK bones, either 1 or -1. */
6513
+ this.bendDirection = 0;
6514
+ /** When true and only a single bone is being constrained, if the target is too close, the bone is scaled to reach it. */
6515
+ this.compress = false;
6516
+ /** 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
6517
+ * and the parent bone has local nonuniform scale, stretch is not applied. */
6518
+ this.stretch = false;
6519
+ /** When true, only a single bone is being constrained, and {@link #getCompress()} or {@link #getStretch()} is used, the bone
6520
+ * is scaled on both the X and Y axes. */
6521
+ this.uniform = false;
6522
+ /** A percentage (0-1) that controls the mix between the constrained and unconstrained rotations. */
6523
+ this.mix = 0;
6524
+ /** For two bone IK, the distance from the maximum reach of the bones that rotation will slow. */
6525
+ this.softness = 0;
6526
+ }
6516
6527
  set target(boneData) {
6517
6528
  this._target = boneData;
6518
6529
  }
@@ -6520,31 +6531,32 @@ var IkConstraintData = class extends ConstraintData {
6520
6531
  if (!this._target) throw new Error('BoneData not set.');
6521
6532
  else return this._target;
6522
6533
  }
6523
- /** Controls the bend direction of the IK bones, either 1 or -1. */
6524
- bendDirection = 0;
6525
- /** When true and only a single bone is being constrained, if the target is too close, the bone is scaled to reach it. */
6526
- compress = false;
6527
- /** 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
6528
- * and the parent bone has local nonuniform scale, stretch is not applied. */
6529
- stretch = false;
6530
- /** When true, only a single bone is being constrained, and {@link #getCompress()} or {@link #getStretch()} is used, the bone
6531
- * is scaled on both the X and Y axes. */
6532
- uniform = false;
6533
- /** A percentage (0-1) that controls the mix between the constrained and unconstrained rotations. */
6534
- mix = 0;
6535
- /** For two bone IK, the distance from the maximum reach of the bones that rotation will slow. */
6536
- softness = 0;
6537
- constructor(name) {
6538
- super(name, 0, false);
6539
- }
6540
6534
  };
6541
6535
 
6542
6536
  // spine-core/src/PathConstraintData.ts
6543
6537
  var PathConstraintData = class extends ConstraintData {
6544
- /** The bones that will be modified by this path constraint. */
6545
- bones = new Array();
6546
- /** The slot whose path attachment will be used to constrained the bones. */
6547
- _target = null;
6538
+ constructor(name) {
6539
+ super(name, 0, false);
6540
+ /** The bones that will be modified by this path constraint. */
6541
+ this.bones = new Array();
6542
+ /** The slot whose path attachment will be used to constrained the bones. */
6543
+ this._target = null;
6544
+ /** The mode for positioning the first bone on the path. */
6545
+ this.positionMode = PositionMode.Fixed;
6546
+ /** The mode for positioning the bones after the first bone on the path. */
6547
+ this.spacingMode = SpacingMode.Fixed;
6548
+ /** The mode for adjusting the rotation of the bones. */
6549
+ this.rotateMode = RotateMode.Chain;
6550
+ /** An offset added to the constrained bone rotation. */
6551
+ this.offsetRotation = 0;
6552
+ /** The position along the path. */
6553
+ this.position = 0;
6554
+ /** The spacing between bones. */
6555
+ this.spacing = 0;
6556
+ this.mixRotate = 0;
6557
+ this.mixX = 0;
6558
+ this.mixY = 0;
6559
+ }
6548
6560
  set target(slotData) {
6549
6561
  this._target = slotData;
6550
6562
  }
@@ -6552,24 +6564,6 @@ var PathConstraintData = class extends ConstraintData {
6552
6564
  if (!this._target) throw new Error('SlotData not set.');
6553
6565
  else return this._target;
6554
6566
  }
6555
- /** The mode for positioning the first bone on the path. */
6556
- positionMode = PositionMode.Fixed;
6557
- /** The mode for positioning the bones after the first bone on the path. */
6558
- spacingMode = SpacingMode.Fixed;
6559
- /** The mode for adjusting the rotation of the bones. */
6560
- rotateMode = RotateMode.Chain;
6561
- /** An offset added to the constrained bone rotation. */
6562
- offsetRotation = 0;
6563
- /** The position along the path. */
6564
- position = 0;
6565
- /** The spacing between bones. */
6566
- spacing = 0;
6567
- mixRotate = 0;
6568
- mixX = 0;
6569
- mixY = 0;
6570
- constructor(name) {
6571
- super(name, 0, false);
6572
- }
6573
6567
  };
6574
6568
  var PositionMode = /* @__PURE__ */ (PositionMode2 => {
6575
6569
  PositionMode2[(PositionMode2['Fixed'] = 0)] = 'Fixed';
@@ -6592,27 +6586,21 @@ var RotateMode = /* @__PURE__ */ (RotateMode2 => {
6592
6586
 
6593
6587
  // spine-core/src/PathConstraint.ts
6594
6588
  var _PathConstraint = class {
6595
- /** The path constraint's setup pose data. */
6596
- data;
6597
- /** The bones that will be modified by this path constraint. */
6598
- bones;
6599
- /** The slot whose path attachment will be used to constrained the bones. */
6600
- target;
6601
- /** The position along the path. */
6602
- position = 0;
6603
- /** The spacing between bones. */
6604
- spacing = 0;
6605
- mixRotate = 0;
6606
- mixX = 0;
6607
- mixY = 0;
6608
- spaces = new Array();
6609
- positions = new Array();
6610
- world = new Array();
6611
- curves = new Array();
6612
- lengths = new Array();
6613
- segments = new Array();
6614
- active = false;
6615
6589
  constructor(data, skeleton) {
6590
+ /** The position along the path. */
6591
+ this.position = 0;
6592
+ /** The spacing between bones. */
6593
+ this.spacing = 0;
6594
+ this.mixRotate = 0;
6595
+ this.mixX = 0;
6596
+ this.mixY = 0;
6597
+ this.spaces = new Array();
6598
+ this.positions = new Array();
6599
+ this.world = new Array();
6600
+ this.curves = new Array();
6601
+ this.lengths = new Array();
6602
+ this.segments = new Array();
6603
+ this.active = false;
6616
6604
  if (!data) throw new Error('data cannot be null.');
6617
6605
  if (!skeleton) throw new Error('skeleton cannot be null.');
6618
6606
  this.data = data;
@@ -7059,50 +7047,40 @@ var _PathConstraint = class {
7059
7047
  }
7060
7048
  };
7061
7049
  var PathConstraint = _PathConstraint;
7062
- __publicField(PathConstraint, 'NONE', -1);
7063
- __publicField(PathConstraint, 'BEFORE', -2);
7064
- __publicField(PathConstraint, 'AFTER', -3);
7065
- __publicField(PathConstraint, 'epsilon', 1e-5);
7050
+ PathConstraint.NONE = -1;
7051
+ PathConstraint.BEFORE = -2;
7052
+ PathConstraint.AFTER = -3;
7053
+ PathConstraint.epsilon = 1e-5;
7066
7054
 
7067
7055
  // spine-core/src/PhysicsConstraint.ts
7068
7056
  var PhysicsConstraint = class {
7069
- data;
7070
- _bone = null;
7071
- /** The bone constrained by this physics constraint. */
7072
- set bone(bone) {
7073
- this._bone = bone;
7074
- }
7075
- get bone() {
7076
- if (!this._bone) throw new Error('Bone not set.');
7077
- else return this._bone;
7078
- }
7079
- inertia = 0;
7080
- strength = 0;
7081
- damping = 0;
7082
- massInverse = 0;
7083
- wind = 0;
7084
- gravity = 0;
7085
- mix = 0;
7086
- _reset = true;
7087
- ux = 0;
7088
- uy = 0;
7089
- cx = 0;
7090
- cy = 0;
7091
- tx = 0;
7092
- ty = 0;
7093
- xOffset = 0;
7094
- xVelocity = 0;
7095
- yOffset = 0;
7096
- yVelocity = 0;
7097
- rotateOffset = 0;
7098
- rotateVelocity = 0;
7099
- scaleOffset = 0;
7100
- scaleVelocity = 0;
7101
- active = false;
7102
- skeleton;
7103
- remaining = 0;
7104
- lastTime = 0;
7105
7057
  constructor(data, skeleton) {
7058
+ this._bone = null;
7059
+ this.inertia = 0;
7060
+ this.strength = 0;
7061
+ this.damping = 0;
7062
+ this.massInverse = 0;
7063
+ this.wind = 0;
7064
+ this.gravity = 0;
7065
+ this.mix = 0;
7066
+ this._reset = true;
7067
+ this.ux = 0;
7068
+ this.uy = 0;
7069
+ this.cx = 0;
7070
+ this.cy = 0;
7071
+ this.tx = 0;
7072
+ this.ty = 0;
7073
+ this.xOffset = 0;
7074
+ this.xVelocity = 0;
7075
+ this.yOffset = 0;
7076
+ this.yVelocity = 0;
7077
+ this.rotateOffset = 0;
7078
+ this.rotateVelocity = 0;
7079
+ this.scaleOffset = 0;
7080
+ this.scaleVelocity = 0;
7081
+ this.active = false;
7082
+ this.remaining = 0;
7083
+ this.lastTime = 0;
7106
7084
  this.data = data;
7107
7085
  this.skeleton = skeleton;
7108
7086
  this.bone = skeleton.bones[data.bone.index];
@@ -7114,6 +7092,14 @@ var PhysicsConstraint = class {
7114
7092
  this.gravity = data.gravity;
7115
7093
  this.mix = data.mix;
7116
7094
  }
7095
+ /** The bone constrained by this physics constraint. */
7096
+ set bone(bone) {
7097
+ this._bone = bone;
7098
+ }
7099
+ get bone() {
7100
+ if (!this._bone) throw new Error('Bone not set.');
7101
+ else return this._bone;
7102
+ }
7117
7103
  reset() {
7118
7104
  this.remaining = 0;
7119
7105
  this.lastTime = this.skeleton.time;
@@ -7339,27 +7325,20 @@ var PhysicsConstraint = class {
7339
7325
 
7340
7326
  // spine-core/src/Slot.ts
7341
7327
  var Slot = class {
7342
- /** The slot's setup pose data. */
7343
- data;
7344
- /** The bone this slot belongs to. */
7345
- bone;
7346
- /** The color used to tint the slot's attachment. If {@link #getDarkColor()} is set, this is used as the light color for two
7347
- * color tinting. */
7348
- color;
7349
- /** 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
7350
- * color's alpha is not used. */
7351
- darkColor = null;
7352
- attachment = null;
7353
- attachmentState = 0;
7354
- /** The index of the texture region to display when the slot's attachment has a {@link Sequence}. -1 represents the
7355
- * {@link Sequence#getSetupIndex()}. */
7356
- sequenceIndex = -1;
7357
- /** Values to deform the slot's attachment. For an unweighted mesh, the entries are local positions for each vertex. For a
7358
- * weighted mesh, the entries are an offset for each vertex which will be added to the mesh's local vertex positions.
7359
- *
7360
- * See {@link VertexAttachment#computeWorldVertices()} and {@link DeformTimeline}. */
7361
- deform = new Array();
7362
7328
  constructor(data, bone) {
7329
+ /** 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
7330
+ * color's alpha is not used. */
7331
+ this.darkColor = null;
7332
+ this.attachment = null;
7333
+ this.attachmentState = 0;
7334
+ /** The index of the texture region to display when the slot's attachment has a {@link Sequence}. -1 represents the
7335
+ * {@link Sequence#getSetupIndex()}. */
7336
+ this.sequenceIndex = -1;
7337
+ /** Values to deform the slot's attachment. For an unweighted mesh, the entries are local positions for each vertex. For a
7338
+ * weighted mesh, the entries are an offset for each vertex which will be added to the mesh's local vertex positions.
7339
+ *
7340
+ * See {@link VertexAttachment#computeWorldVertices()} and {@link DeformTimeline}. */
7341
+ this.deform = new Array();
7363
7342
  if (!data) throw new Error('data cannot be null.');
7364
7343
  if (!bone) throw new Error('bone cannot be null.');
7365
7344
  this.data = data;
@@ -7405,21 +7384,15 @@ var Slot = class {
7405
7384
 
7406
7385
  // spine-core/src/TransformConstraint.ts
7407
7386
  var TransformConstraint = class {
7408
- /** The transform constraint's setup pose data. */
7409
- data;
7410
- /** The bones that will be modified by this transform constraint. */
7411
- bones;
7412
- /** The target bone whose world transform will be copied to the constrained bones. */
7413
- target;
7414
- mixRotate = 0;
7415
- mixX = 0;
7416
- mixY = 0;
7417
- mixScaleX = 0;
7418
- mixScaleY = 0;
7419
- mixShearY = 0;
7420
- temp = new Vector2();
7421
- active = false;
7422
7387
  constructor(data, skeleton) {
7388
+ this.mixRotate = 0;
7389
+ this.mixX = 0;
7390
+ this.mixY = 0;
7391
+ this.mixScaleX = 0;
7392
+ this.mixScaleY = 0;
7393
+ this.mixShearY = 0;
7394
+ this.temp = new Vector2();
7395
+ this.active = false;
7423
7396
  if (!data) throw new Error('data cannot be null.');
7424
7397
  if (!skeleton) throw new Error('skeleton cannot be null.');
7425
7398
  this.data = data;
@@ -7654,49 +7627,25 @@ var TransformConstraint = class {
7654
7627
 
7655
7628
  // spine-core/src/Skeleton.ts
7656
7629
  var _Skeleton = class {
7657
- /** The skeleton's setup pose data. */
7658
- data;
7659
- /** The skeleton's bones, sorted parent first. The root bone is always the first bone. */
7660
- bones;
7661
- /** The skeleton's slots in the setup pose draw order. */
7662
- slots;
7663
- /** The skeleton's slots in the order they should be drawn. The returned array may be modified to change the draw order. */
7664
- drawOrder;
7665
- /** The skeleton's IK constraints. */
7666
- ikConstraints;
7667
- /** The skeleton's transform constraints. */
7668
- transformConstraints;
7669
- /** The skeleton's path constraints. */
7670
- pathConstraints;
7671
- /** The skeleton's physics constraints. */
7672
- physicsConstraints;
7673
- /** The list of bones and constraints, sorted in the order they should be updated, as computed by {@link #updateCache()}. */
7674
- _updateCache = new Array();
7675
- /** The skeleton's current skin. May be null. */
7676
- skin = null;
7677
- /** The color to tint all the skeleton's attachments. */
7678
- color;
7679
- /** Scales the entire skeleton on the X axis. This affects all bones, even if the bone's transform mode disallows scale
7680
- * inheritance. */
7681
- scaleX = 1;
7682
- /** Scales the entire skeleton on the Y axis. This affects all bones, even if the bone's transform mode disallows scale
7683
- * inheritance. */
7684
- _scaleY = 1;
7685
- get scaleY() {
7686
- return _Skeleton.yDown ? -this._scaleY : this._scaleY;
7687
- }
7688
- set scaleY(scaleY) {
7689
- this._scaleY = scaleY;
7690
- }
7691
- /** Sets the skeleton X position, which is added to the root bone worldX position. */
7692
- x = 0;
7693
- /** Sets the skeleton Y position, which is added to the root bone worldY position. */
7694
- y = 0;
7695
- /** Returns the skeleton's time. This is used for time-based manipulations, such as {@link PhysicsConstraint}.
7696
- * <p>
7697
- * See {@link #update(float)}. */
7698
- time = 0;
7699
7630
  constructor(data) {
7631
+ /** The list of bones and constraints, sorted in the order they should be updated, as computed by {@link #updateCache()}. */
7632
+ this._updateCache = new Array();
7633
+ /** The skeleton's current skin. May be null. */
7634
+ this.skin = null;
7635
+ /** Scales the entire skeleton on the X axis. This affects all bones, even if the bone's transform mode disallows scale
7636
+ * inheritance. */
7637
+ this.scaleX = 1;
7638
+ /** Scales the entire skeleton on the Y axis. This affects all bones, even if the bone's transform mode disallows scale
7639
+ * inheritance. */
7640
+ this._scaleY = 1;
7641
+ /** Sets the skeleton X position, which is added to the root bone worldX position. */
7642
+ this.x = 0;
7643
+ /** Sets the skeleton Y position, which is added to the root bone worldY position. */
7644
+ this.y = 0;
7645
+ /** Returns the skeleton's time. This is used for time-based manipulations, such as {@link PhysicsConstraint}.
7646
+ * <p>
7647
+ * See {@link #update(float)}. */
7648
+ this.time = 0;
7700
7649
  if (!data) throw new Error('data cannot be null.');
7701
7650
  this.data = data;
7702
7651
  this.bones = new Array();
@@ -7743,6 +7692,12 @@ var _Skeleton = class {
7743
7692
  this.color = new Color(1, 1, 1, 1);
7744
7693
  this.updateCache();
7745
7694
  }
7695
+ get scaleY() {
7696
+ return _Skeleton.yDown ? -this._scaleY : this._scaleY;
7697
+ }
7698
+ set scaleY(scaleY) {
7699
+ this._scaleY = scaleY;
7700
+ }
7746
7701
  /** Caches information about bones and constraints. Must be called if the {@link #getSkin()} is modified or if bones,
7747
7702
  * constraints, or weighted path attachments are added or removed. */
7748
7703
  updateCache() {
@@ -8108,28 +8063,36 @@ var _Skeleton = class {
8108
8063
  * than to call it repeatedly.
8109
8064
  * @return May be null. */
8110
8065
  findIkConstraint(constraintName) {
8066
+ var _a;
8111
8067
  if (!constraintName) throw new Error('constraintName cannot be null.');
8112
- return this.ikConstraints.find(constraint => constraint.data.name == constraintName) ?? null;
8068
+ return (_a = this.ikConstraints.find(constraint => constraint.data.name == constraintName)) != null ? _a : null;
8113
8069
  }
8114
8070
  /** Finds a transform constraint by comparing each transform constraint's name. It is more efficient to cache the results of
8115
8071
  * this method than to call it repeatedly.
8116
8072
  * @return May be null. */
8117
8073
  findTransformConstraint(constraintName) {
8074
+ var _a;
8118
8075
  if (!constraintName) throw new Error('constraintName cannot be null.');
8119
- return this.transformConstraints.find(constraint => constraint.data.name == constraintName) ?? null;
8076
+ return (_a = this.transformConstraints.find(constraint => constraint.data.name == constraintName)) != null
8077
+ ? _a
8078
+ : null;
8120
8079
  }
8121
8080
  /** Finds a path constraint by comparing each path constraint's name. It is more efficient to cache the results of this method
8122
8081
  * than to call it repeatedly.
8123
8082
  * @return May be null. */
8124
8083
  findPathConstraint(constraintName) {
8084
+ var _a;
8125
8085
  if (!constraintName) throw new Error('constraintName cannot be null.');
8126
- return this.pathConstraints.find(constraint => constraint.data.name == constraintName) ?? null;
8086
+ return (_a = this.pathConstraints.find(constraint => constraint.data.name == constraintName)) != null ? _a : null;
8127
8087
  }
8128
8088
  /** Finds a physics constraint by comparing each physics constraint's name. It is more efficient to cache the results of this
8129
8089
  * method than to call it repeatedly. */
8130
8090
  findPhysicsConstraint(constraintName) {
8091
+ var _a;
8131
8092
  if (constraintName == null) throw new Error('constraintName cannot be null.');
8132
- return this.physicsConstraints.find(constraint => constraint.data.name == constraintName) ?? null;
8093
+ return (_a = this.physicsConstraints.find(constraint => constraint.data.name == constraintName)) != null
8094
+ ? _a
8095
+ : null;
8133
8096
  }
8134
8097
  /** Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose as `{ x: number, y: number, width: number, height: number }`.
8135
8098
  * Note that this method will create temporary objects which can add to garbage collection pressure. Use `getBounds()` if garbage collection is a concern. */
@@ -8210,8 +8173,8 @@ var _Skeleton = class {
8210
8173
  }
8211
8174
  };
8212
8175
  var Skeleton = _Skeleton;
8213
- __publicField(Skeleton, 'quadTriangles', [0, 1, 2, 2, 3, 0]);
8214
- __publicField(Skeleton, 'yDown', false);
8176
+ Skeleton.quadTriangles = [0, 1, 2, 2, 3, 0];
8177
+ Skeleton.yDown = false;
8215
8178
  var Physics = /* @__PURE__ */ (Physics2 => {
8216
8179
  Physics2[(Physics2['none'] = 0)] = 'none';
8217
8180
  Physics2[(Physics2['reset'] = 1)] = 'reset';
@@ -8222,7 +8185,32 @@ var Physics = /* @__PURE__ */ (Physics2 => {
8222
8185
 
8223
8186
  // spine-core/src/PhysicsConstraintData.ts
8224
8187
  var PhysicsConstraintData = class extends ConstraintData {
8225
- _bone = null;
8188
+ constructor(name) {
8189
+ super(name, 0, false);
8190
+ this._bone = null;
8191
+ this.x = 0;
8192
+ this.y = 0;
8193
+ this.rotate = 0;
8194
+ this.scaleX = 0;
8195
+ this.shearX = 0;
8196
+ this.limit = 0;
8197
+ this.step = 0;
8198
+ this.inertia = 0;
8199
+ this.strength = 0;
8200
+ this.damping = 0;
8201
+ this.massInverse = 0;
8202
+ this.wind = 0;
8203
+ this.gravity = 0;
8204
+ /** A percentage (0-1) that controls the mix between the constrained and unconstrained poses. */
8205
+ this.mix = 0;
8206
+ this.inertiaGlobal = false;
8207
+ this.strengthGlobal = false;
8208
+ this.dampingGlobal = false;
8209
+ this.massGlobal = false;
8210
+ this.windGlobal = false;
8211
+ this.gravityGlobal = false;
8212
+ this.mixGlobal = false;
8213
+ }
8226
8214
  /** The bone constrained by this physics constraint. */
8227
8215
  set bone(boneData) {
8228
8216
  this._bone = boneData;
@@ -8231,83 +8219,60 @@ var PhysicsConstraintData = class extends ConstraintData {
8231
8219
  if (!this._bone) throw new Error('BoneData not set.');
8232
8220
  else return this._bone;
8233
8221
  }
8234
- x = 0;
8235
- y = 0;
8236
- rotate = 0;
8237
- scaleX = 0;
8238
- shearX = 0;
8239
- limit = 0;
8240
- step = 0;
8241
- inertia = 0;
8242
- strength = 0;
8243
- damping = 0;
8244
- massInverse = 0;
8245
- wind = 0;
8246
- gravity = 0;
8247
- /** A percentage (0-1) that controls the mix between the constrained and unconstrained poses. */
8248
- mix = 0;
8249
- inertiaGlobal = false;
8250
- strengthGlobal = false;
8251
- dampingGlobal = false;
8252
- massGlobal = false;
8253
- windGlobal = false;
8254
- gravityGlobal = false;
8255
- mixGlobal = false;
8256
- constructor(name) {
8257
- super(name, 0, false);
8258
- }
8259
8222
  };
8260
8223
 
8261
8224
  // spine-core/src/SkeletonData.ts
8262
8225
  var SkeletonData = class {
8263
- /** The skeleton's name, which by default is the name of the skeleton data file, if possible. May be null. */
8264
- name = null;
8265
- /** The skeleton's bones, sorted parent first. The root bone is always the first bone. */
8266
- bones = new Array();
8267
- // Ordered parents first.
8268
- /** The skeleton's slots in the setup pose draw order. */
8269
- slots = new Array();
8270
- // Setup pose draw order.
8271
- skins = new Array();
8272
- /** The skeleton's default skin. By default this skin contains all attachments that were not in a skin in Spine.
8273
- *
8274
- * See {@link Skeleton#getAttachmentByName()}.
8275
- * May be null. */
8276
- defaultSkin = null;
8277
- /** The skeleton's events. */
8278
- events = new Array();
8279
- /** The skeleton's animations. */
8280
- animations = new Array();
8281
- /** The skeleton's IK constraints. */
8282
- ikConstraints = new Array();
8283
- /** The skeleton's transform constraints. */
8284
- transformConstraints = new Array();
8285
- /** The skeleton's path constraints. */
8286
- pathConstraints = new Array();
8287
- /** The skeleton's physics constraints. */
8288
- physicsConstraints = new Array();
8289
- /** The X coordinate of the skeleton's axis aligned bounding box in the setup pose. */
8290
- x = 0;
8291
- /** The Y coordinate of the skeleton's axis aligned bounding box in the setup pose. */
8292
- y = 0;
8293
- /** The width of the skeleton's axis aligned bounding box in the setup pose. */
8294
- width = 0;
8295
- /** The height of the skeleton's axis aligned bounding box in the setup pose. */
8296
- height = 0;
8297
- /** Baseline scale factor for applying distance-dependent effects on non-scalable properties, such as angle or scale. Default
8298
- * is 100. */
8299
- referenceScale = 100;
8300
- /** The Spine version used to export the skeleton data, or null. */
8301
- version = null;
8302
- /** The skeleton data hash. This value will change if any of the skeleton data has changed. May be null. */
8303
- hash = null;
8304
- // Nonessential
8305
- /** The dopesheet FPS in Spine. Available only when nonessential data was exported. */
8306
- fps = 0;
8307
- /** The path to the images directory as defined in Spine. Available only when nonessential data was exported. May be null. */
8308
- imagesPath = null;
8309
- /** The path to the audio directory as defined in Spine. Available only when nonessential data was exported. May be null. */
8310
- audioPath = null;
8226
+ constructor() {
8227
+ /** The skeleton's name, which by default is the name of the skeleton data file, if possible. May be null. */
8228
+ this.name = null;
8229
+ /** The skeleton's bones, sorted parent first. The root bone is always the first bone. */
8230
+ this.bones = new Array();
8231
+ // Ordered parents first.
8232
+ /** The skeleton's slots in the setup pose draw order. */
8233
+ this.slots = new Array();
8234
+ // Setup pose draw order.
8235
+ this.skins = new Array();
8236
+ /** The skeleton's default skin. By default this skin contains all attachments that were not in a skin in Spine.
8237
+ *
8238
+ * See {@link Skeleton#getAttachmentByName()}.
8239
+ * May be null. */
8240
+ this.defaultSkin = null;
8241
+ /** The skeleton's events. */
8242
+ this.events = new Array();
8243
+ /** The skeleton's animations. */
8244
+ this.animations = new Array();
8245
+ /** The skeleton's IK constraints. */
8246
+ this.ikConstraints = new Array();
8247
+ /** The skeleton's transform constraints. */
8248
+ this.transformConstraints = new Array();
8249
+ /** The skeleton's path constraints. */
8250
+ this.pathConstraints = new Array();
8251
+ /** The skeleton's physics constraints. */
8252
+ this.physicsConstraints = new Array();
8253
+ /** The X coordinate of the skeleton's axis aligned bounding box in the setup pose. */
8254
+ this.x = 0;
8255
+ /** The Y coordinate of the skeleton's axis aligned bounding box in the setup pose. */
8256
+ this.y = 0;
8257
+ /** The width of the skeleton's axis aligned bounding box in the setup pose. */
8258
+ this.width = 0;
8259
+ /** The height of the skeleton's axis aligned bounding box in the setup pose. */
8260
+ this.height = 0;
8261
+ /** Baseline scale factor for applying distance-dependent effects on non-scalable properties, such as angle or scale. Default
8262
+ * is 100. */
8263
+ this.referenceScale = 100;
8264
+ /** The Spine version used to export the skeleton data, or null. */
8265
+ this.version = null;
8266
+ /** The skeleton data hash. This value will change if any of the skeleton data has changed. May be null. */
8267
+ this.hash = null;
8268
+ // Nonessential
8269
+ /** The dopesheet FPS in Spine. Available only when nonessential data was exported. */
8270
+ this.fps = 0;
8271
+ /** The path to the images directory as defined in Spine. Available only when nonessential data was exported. May be null. */
8272
+ this.imagesPath = null;
8273
+ /** The path to the audio directory as defined in Spine. Available only when nonessential data was exported. May be null. */
8274
+ this.audioPath = null;
8275
+ }
8311
8276
  /** Finds a bone by comparing each bone's name. It is more efficient to cache the results of this method than to call it
8312
8277
  * multiple times.
8313
8278
  * @returns May be null. */
@@ -8427,15 +8392,13 @@ var SkinEntry = class {
8427
8392
  }
8428
8393
  };
8429
8394
  var Skin = class {
8430
- /** The skin's name, which is unique across all skins in the skeleton. */
8431
- name;
8432
- attachments = new Array();
8433
- bones = Array();
8434
- constraints = new Array();
8435
- /** The color of the skin as it was in Spine, or a default color if nonessential data was not exported. */
8436
- color = new Color(0.99607843, 0.61960787, 0.30980393, 1);
8437
8395
  // fe9e4fff
8438
8396
  constructor(name) {
8397
+ this.attachments = new Array();
8398
+ this.bones = Array();
8399
+ this.constraints = new Array();
8400
+ /** The color of the skin as it was in Spine, or a default color if nonessential data was not exported. */
8401
+ this.color = new Color(0.99607843, 0.61960787, 0.30980393, 1);
8439
8402
  if (!name) throw new Error('name cannot be null.');
8440
8403
  this.name = name;
8441
8404
  }
@@ -8579,25 +8542,21 @@ var Skin = class {
8579
8542
 
8580
8543
  // spine-core/src/SlotData.ts
8581
8544
  var SlotData = class {
8582
- /** The index of the slot in {@link Skeleton#getSlots()}. */
8583
- index = 0;
8584
- /** The name of the slot, which is unique across all slots in the skeleton. */
8585
- name;
8586
- /** The bone this slot belongs to. */
8587
- boneData;
8588
- /** The color used to tint the slot's attachment. If {@link #getDarkColor()} is set, this is used as the light color for two
8589
- * color tinting. */
8590
- color = new Color(1, 1, 1, 1);
8591
- /** 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
8592
- * color's alpha is not used. */
8593
- darkColor = null;
8594
- /** The name of the attachment that is visible for this slot in the setup pose, or null if no attachment is visible. */
8595
- attachmentName = null;
8596
- /** The blend mode for drawing the slot's attachment. */
8597
- blendMode = BlendMode.Normal;
8598
- /** False if the slot was hidden in Spine and nonessential data was exported. Does not affect runtime rendering. */
8599
- visible = true;
8600
8545
  constructor(index, name, boneData) {
8546
+ /** The index of the slot in {@link Skeleton#getSlots()}. */
8547
+ this.index = 0;
8548
+ /** The color used to tint the slot's attachment. If {@link #getDarkColor()} is set, this is used as the light color for two
8549
+ * color tinting. */
8550
+ this.color = new Color(1, 1, 1, 1);
8551
+ /** 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
8552
+ * color's alpha is not used. */
8553
+ this.darkColor = null;
8554
+ /** The name of the attachment that is visible for this slot in the setup pose, or null if no attachment is visible. */
8555
+ this.attachmentName = null;
8556
+ /** The blend mode for drawing the slot's attachment. */
8557
+ this.blendMode = BlendMode.Normal;
8558
+ /** False if the slot was hidden in Spine and nonessential data was exported. Does not affect runtime rendering. */
8559
+ this.visible = true;
8601
8560
  if (index < 0) throw new Error('index must be >= 0.');
8602
8561
  if (!name) throw new Error('name cannot be null.');
8603
8562
  if (!boneData) throw new Error('boneData cannot be null.');
@@ -8616,10 +8575,33 @@ var BlendMode = /* @__PURE__ */ (BlendMode2 => {
8616
8575
 
8617
8576
  // spine-core/src/TransformConstraintData.ts
8618
8577
  var TransformConstraintData = class extends ConstraintData {
8619
- /** The bones that will be modified by this transform constraint. */
8620
- bones = new Array();
8621
- /** The target bone whose world transform will be copied to the constrained bones. */
8622
- _target = null;
8578
+ constructor(name) {
8579
+ super(name, 0, false);
8580
+ /** The bones that will be modified by this transform constraint. */
8581
+ this.bones = new Array();
8582
+ /** The target bone whose world transform will be copied to the constrained bones. */
8583
+ this._target = null;
8584
+ this.mixRotate = 0;
8585
+ this.mixX = 0;
8586
+ this.mixY = 0;
8587
+ this.mixScaleX = 0;
8588
+ this.mixScaleY = 0;
8589
+ this.mixShearY = 0;
8590
+ /** An offset added to the constrained bone rotation. */
8591
+ this.offsetRotation = 0;
8592
+ /** An offset added to the constrained bone X translation. */
8593
+ this.offsetX = 0;
8594
+ /** An offset added to the constrained bone Y translation. */
8595
+ this.offsetY = 0;
8596
+ /** An offset added to the constrained bone scaleX. */
8597
+ this.offsetScaleX = 0;
8598
+ /** An offset added to the constrained bone scaleY. */
8599
+ this.offsetScaleY = 0;
8600
+ /** An offset added to the constrained bone shearY. */
8601
+ this.offsetShearY = 0;
8602
+ this.relative = false;
8603
+ this.local = false;
8604
+ }
8623
8605
  set target(boneData) {
8624
8606
  this._target = boneData;
8625
8607
  }
@@ -8627,44 +8609,21 @@ var TransformConstraintData = class extends ConstraintData {
8627
8609
  if (!this._target) throw new Error('BoneData not set.');
8628
8610
  else return this._target;
8629
8611
  }
8630
- mixRotate = 0;
8631
- mixX = 0;
8632
- mixY = 0;
8633
- mixScaleX = 0;
8634
- mixScaleY = 0;
8635
- mixShearY = 0;
8636
- /** An offset added to the constrained bone rotation. */
8637
- offsetRotation = 0;
8638
- /** An offset added to the constrained bone X translation. */
8639
- offsetX = 0;
8640
- /** An offset added to the constrained bone Y translation. */
8641
- offsetY = 0;
8642
- /** An offset added to the constrained bone scaleX. */
8643
- offsetScaleX = 0;
8644
- /** An offset added to the constrained bone scaleY. */
8645
- offsetScaleY = 0;
8646
- /** An offset added to the constrained bone shearY. */
8647
- offsetShearY = 0;
8648
- relative = false;
8649
- local = false;
8650
- constructor(name) {
8651
- super(name, 0, false);
8652
- }
8653
8612
  };
8654
8613
 
8655
8614
  // spine-core/src/SkeletonBinary.ts
8656
8615
  var SkeletonBinary = class {
8657
- /** Scales bone positions, image sizes, and translations as they are loaded. This allows different size images to be used at
8658
- * runtime than were used in Spine.
8659
- *
8660
- * See [Scaling](http://esotericsoftware.com/spine-loading-skeleton-data#Scaling) in the Spine Runtimes Guide. */
8661
- scale = 1;
8662
- attachmentLoader;
8663
- linkedMeshes = new Array();
8664
8616
  constructor(attachmentLoader) {
8617
+ /** Scales bone positions, image sizes, and translations as they are loaded. This allows different size images to be used at
8618
+ * runtime than were used in Spine.
8619
+ *
8620
+ * See [Scaling](http://esotericsoftware.com/spine-loading-skeleton-data#Scaling) in the Spine Runtimes Guide. */
8621
+ this.scale = 1;
8622
+ this.linkedMeshes = new Array();
8665
8623
  this.attachmentLoader = attachmentLoader;
8666
8624
  }
8667
8625
  readSkeletonData(binary) {
8626
+ var _a;
8668
8627
  let scale = this.scale;
8669
8628
  let skeletonData = new SkeletonData();
8670
8629
  skeletonData.name = '';
@@ -8709,7 +8668,7 @@ var SkeletonBinary = class {
8709
8668
  data.skinRequired = input.readBoolean();
8710
8669
  if (nonessential) {
8711
8670
  Color.rgba8888ToColor(data.color, input.readInt32());
8712
- data.icon = input.readString() ?? void 0;
8671
+ data.icon = (_a = input.readString()) != null ? _a : void 0;
8713
8672
  data.visible = input.readBoolean();
8714
8673
  }
8715
8674
  skeletonData.bones.push(data);
@@ -9744,11 +9703,6 @@ var BinaryInput = class {
9744
9703
  }
9745
9704
  };
9746
9705
  var LinkedMesh = class {
9747
- parent;
9748
- skinIndex;
9749
- slotIndex;
9750
- mesh;
9751
- inheritTimeline;
9752
9706
  constructor(mesh, skinIndex, slotIndex, parent, inheritDeform) {
9753
9707
  this.mesh = mesh;
9754
9708
  this.skinIndex = skinIndex;
@@ -9868,21 +9822,23 @@ var CURVE_BEZIER = 2;
9868
9822
 
9869
9823
  // spine-core/src/SkeletonBounds.ts
9870
9824
  var SkeletonBounds = class {
9871
- /** The left edge of the axis aligned bounding box. */
9872
- minX = 0;
9873
- /** The bottom edge of the axis aligned bounding box. */
9874
- minY = 0;
9875
- /** The right edge of the axis aligned bounding box. */
9876
- maxX = 0;
9877
- /** The top edge of the axis aligned bounding box. */
9878
- maxY = 0;
9879
- /** The visible bounding boxes. */
9880
- boundingBoxes = new Array();
9881
- /** The world vertices for the bounding box polygons. */
9882
- polygons = new Array();
9883
- polygonPool = new Pool(() => {
9884
- return Utils.newFloatArray(16);
9885
- });
9825
+ constructor() {
9826
+ /** The left edge of the axis aligned bounding box. */
9827
+ this.minX = 0;
9828
+ /** The bottom edge of the axis aligned bounding box. */
9829
+ this.minY = 0;
9830
+ /** The right edge of the axis aligned bounding box. */
9831
+ this.maxX = 0;
9832
+ /** The top edge of the axis aligned bounding box. */
9833
+ this.maxY = 0;
9834
+ /** The visible bounding boxes. */
9835
+ this.boundingBoxes = new Array();
9836
+ /** The world vertices for the bounding box polygons. */
9837
+ this.polygons = new Array();
9838
+ this.polygonPool = new Pool(() => {
9839
+ return Utils.newFloatArray(16);
9840
+ });
9841
+ }
9886
9842
  /** Clears any previous polygons, finds all visible bounding box attachments, and computes the world vertices for each bounding
9887
9843
  * box's polygon.
9888
9844
  * @param updateAabb If true, the axis aligned bounding box containing all the polygons is computed. If false, the
@@ -10055,17 +10011,19 @@ var SkeletonBounds = class {
10055
10011
 
10056
10012
  // spine-core/src/Triangulator.ts
10057
10013
  var Triangulator = class {
10058
- convexPolygons = new Array();
10059
- convexPolygonsIndices = new Array();
10060
- indicesArray = new Array();
10061
- isConcaveArray = new Array();
10062
- triangles = new Array();
10063
- polygonPool = new Pool(() => {
10064
- return new Array();
10065
- });
10066
- polygonIndicesPool = new Pool(() => {
10067
- return new Array();
10068
- });
10014
+ constructor() {
10015
+ this.convexPolygons = new Array();
10016
+ this.convexPolygonsIndices = new Array();
10017
+ this.indicesArray = new Array();
10018
+ this.isConcaveArray = new Array();
10019
+ this.triangles = new Array();
10020
+ this.polygonPool = new Pool(() => {
10021
+ return new Array();
10022
+ });
10023
+ this.polygonIndicesPool = new Pool(() => {
10024
+ return new Array();
10025
+ });
10026
+ }
10069
10027
  triangulate(verticesArray) {
10070
10028
  let vertices = verticesArray;
10071
10029
  let vertexCount = verticesArray.length >> 1;
@@ -10280,15 +10238,17 @@ var Triangulator = class {
10280
10238
 
10281
10239
  // spine-core/src/SkeletonClipping.ts
10282
10240
  var SkeletonClipping = class {
10283
- triangulator = new Triangulator();
10284
- clippingPolygon = new Array();
10285
- clipOutput = new Array();
10286
- clippedVertices = new Array();
10287
- clippedUVs = new Array();
10288
- clippedTriangles = new Array();
10289
- scratch = new Array();
10290
- clipAttachment = null;
10291
- clippingPolygons = null;
10241
+ constructor() {
10242
+ this.triangulator = new Triangulator();
10243
+ this.clippingPolygon = new Array();
10244
+ this.clipOutput = new Array();
10245
+ this.clippedVertices = new Array();
10246
+ this.clippedUVs = new Array();
10247
+ this.clippedTriangles = new Array();
10248
+ this.scratch = new Array();
10249
+ this.clipAttachment = null;
10250
+ this.clippingPolygons = null;
10251
+ }
10292
10252
  clipStart(slot, clip) {
10293
10253
  if (this.clipAttachment) return 0;
10294
10254
  this.clipAttachment = clip;
@@ -10768,17 +10728,17 @@ var SkeletonClipping = class {
10768
10728
 
10769
10729
  // spine-core/src/SkeletonJson.ts
10770
10730
  var SkeletonJson = class {
10771
- attachmentLoader;
10772
- /** Scales bone positions, image sizes, and translations as they are loaded. This allows different size images to be used at
10773
- * runtime than were used in Spine.
10774
- *
10775
- * See [Scaling](http://esotericsoftware.com/spine-loading-skeleton-data#Scaling) in the Spine Runtimes Guide. */
10776
- scale = 1;
10777
- linkedMeshes = new Array();
10778
10731
  constructor(attachmentLoader) {
10732
+ /** Scales bone positions, image sizes, and translations as they are loaded. This allows different size images to be used at
10733
+ * runtime than were used in Spine.
10734
+ *
10735
+ * See [Scaling](http://esotericsoftware.com/spine-loading-skeleton-data#Scaling) in the Spine Runtimes Guide. */
10736
+ this.scale = 1;
10737
+ this.linkedMeshes = new Array();
10779
10738
  this.attachmentLoader = attachmentLoader;
10780
10739
  }
10781
10740
  readSkeletonData(json) {
10741
+ var _a, _b;
10782
10742
  let scale = this.scale;
10783
10743
  let skeletonData = new SkeletonData();
10784
10744
  let root = typeof json === 'string' ? JSON.parse(json) : json;
@@ -10792,8 +10752,8 @@ var SkeletonJson = class {
10792
10752
  skeletonData.height = skeletonMap.height;
10793
10753
  skeletonData.referenceScale = getValue(skeletonMap, 'referenceScale', 100) * scale;
10794
10754
  skeletonData.fps = skeletonMap.fps;
10795
- skeletonData.imagesPath = skeletonMap.images ?? null;
10796
- skeletonData.audioPath = skeletonMap.audio ?? null;
10755
+ skeletonData.imagesPath = (_a = skeletonMap.images) != null ? _a : null;
10756
+ skeletonData.audioPath = (_b = skeletonMap.audio) != null ? _b : null;
10797
10757
  }
10798
10758
  if (root.bones) {
10799
10759
  for (let i = 0; i < root.bones.length; i++) {
@@ -11696,11 +11656,6 @@ var SkeletonJson = class {
11696
11656
  }
11697
11657
  };
11698
11658
  var LinkedMesh2 = class {
11699
- parent;
11700
- skin;
11701
- slotIndex;
11702
- mesh;
11703
- inheritTimeline;
11704
11659
  constructor(mesh, skin, slotIndex, parent, inheritDeform) {
11705
11660
  this.mesh = mesh;
11706
11661
  this.skin = skin;
@@ -11786,17 +11741,16 @@ function getValue(map, property, defaultValue) {
11786
11741
 
11787
11742
  // spine-pixi-v8/src/SpineTexture.ts
11788
11743
  var _SpineTexture = class extends Texture {
11744
+ constructor(image) {
11745
+ super(image.resource);
11746
+ this.texture = pixi_js.Texture.from(image);
11747
+ }
11789
11748
  static from(texture) {
11790
11749
  if (_SpineTexture.textureMap.has(texture)) {
11791
11750
  return _SpineTexture.textureMap.get(texture);
11792
11751
  }
11793
11752
  return new _SpineTexture(texture);
11794
11753
  }
11795
- texture;
11796
- constructor(image) {
11797
- super(image.resource);
11798
- this.texture = pixi_js.Texture.from(image);
11799
- }
11800
11754
  setFilters(minFilter, magFilter) {
11801
11755
  const style = this.texture.source.style;
11802
11756
  style.minFilter = _SpineTexture.toPixiTextureFilter(minFilter);
@@ -11868,7 +11822,7 @@ var _SpineTexture = class extends Texture {
11868
11822
  }
11869
11823
  };
11870
11824
  var SpineTexture = _SpineTexture;
11871
- __publicField(SpineTexture, 'textureMap', /* @__PURE__ */ new Map());
11825
+ SpineTexture.textureMap = /* @__PURE__ */ new Map();
11872
11826
 
11873
11827
  // spine-pixi-v8/src/assets/atlasLoader.ts
11874
11828
  var spineTextureAtlasLoader = {
@@ -11876,9 +11830,14 @@ var spineTextureAtlasLoader = {
11876
11830
  resolver: {
11877
11831
  test: value => pixi_js.checkExtension(value, '.atlas'),
11878
11832
  parse: value => {
11833
+ var _a, _b, _c;
11879
11834
  const split = value.split('.');
11880
11835
  return {
11881
- resolution: parseFloat(pixi_js.Resolver.RETINA_PREFIX?.exec(value)?.[1] ?? '1'),
11836
+ resolution: parseFloat(
11837
+ (_c = (_b = (_a = pixi_js.Resolver.RETINA_PREFIX) == null ? void 0 : _a.exec(value)) == null ? void 0 : _b[1]) != null
11838
+ ? _c
11839
+ : '1',
11840
+ ),
11882
11841
  format: split[split.length - 2],
11883
11842
  src: value,
11884
11843
  };
@@ -11893,10 +11852,12 @@ var spineTextureAtlasLoader = {
11893
11852
  test(url) {
11894
11853
  return pixi_js.checkExtension(url, '.atlas');
11895
11854
  },
11896
- async load(url) {
11897
- const response = await pixi_js.DOMAdapter.get().fetch(url);
11898
- const txt = await response.text();
11899
- return txt;
11855
+ load(url) {
11856
+ return __async(this, null, function* () {
11857
+ const response = yield pixi_js.DOMAdapter.get().fetch(url);
11858
+ const txt = yield response.text();
11859
+ return txt;
11860
+ });
11900
11861
  },
11901
11862
  testParse(asset, options) {
11902
11863
  const isExtensionRight = pixi_js.checkExtension(options.src, '.atlas');
@@ -11906,48 +11867,52 @@ var spineTextureAtlasLoader = {
11906
11867
  unload(atlas) {
11907
11868
  atlas.dispose();
11908
11869
  },
11909
- async parse(asset, options, loader) {
11910
- const metadata = options.data || {};
11911
- let basePath = pixi_js.path.dirname(options.src);
11912
- if (basePath && basePath.lastIndexOf('/') !== basePath.length - 1) {
11913
- basePath += '/';
11914
- }
11915
- const retval = new TextureAtlas(asset);
11916
- if (metadata.images instanceof pixi_js.TextureSource || typeof metadata.images === 'string') {
11917
- const pixiTexture = metadata.images;
11918
- metadata.images = {};
11919
- metadata.images[retval.pages[0].name] = pixiTexture;
11920
- }
11921
- const textureLoadingPromises = [];
11922
- for (const page of retval.pages) {
11923
- if (metadata.resolve) {
11924
- const resolvePromise = metadata.resolve().then(texture => {
11925
- page.setTexture(SpineTexture.from(texture.source));
11926
- });
11927
- textureLoadingPromises.push(resolvePromise);
11928
- continue;
11870
+ parse(asset, options, loader) {
11871
+ return __async(this, null, function* () {
11872
+ const metadata = options.data || {};
11873
+ let basePath = pixi_js.path.dirname(options.src);
11874
+ if (basePath && basePath.lastIndexOf('/') !== basePath.length - 1) {
11875
+ basePath += '/';
11929
11876
  }
11930
- const pageName = page.name;
11931
- const providedPage = metadata?.images ? metadata.images[pageName] : void 0;
11932
- if (providedPage instanceof pixi_js.TextureSource) {
11933
- page.setTexture(SpineTexture.from(providedPage));
11934
- } else {
11935
- const url = providedPage ?? pixi_js.path.normalize([...basePath.split(pixi_js.path.sep), pageName].join(pixi_js.path.sep));
11936
- const assetsToLoadIn = {
11937
- src: url,
11938
- data: {
11939
- ...metadata.imageMetadata,
11940
- alphaMode: page.pma ? 'premultiplied-alpha' : 'premultiply-alpha-on-upload',
11941
- },
11942
- };
11943
- const pixiPromise = loader.load(assetsToLoadIn).then(texture => {
11944
- page.setTexture(SpineTexture.from(texture.source));
11945
- });
11946
- textureLoadingPromises.push(pixiPromise);
11877
+ const retval = new TextureAtlas(asset);
11878
+ if (metadata.images instanceof pixi_js.TextureSource || typeof metadata.images === 'string') {
11879
+ const pixiTexture = metadata.images;
11880
+ metadata.images = {};
11881
+ metadata.images[retval.pages[0].name] = pixiTexture;
11947
11882
  }
11948
- }
11949
- await Promise.all(textureLoadingPromises);
11950
- return retval;
11883
+ const textureLoadingPromises = [];
11884
+ for (const page of retval.pages) {
11885
+ if (metadata.resolve) {
11886
+ const resolvePromise = metadata.resolve().then(texture => {
11887
+ page.setTexture(SpineTexture.from(texture.source));
11888
+ });
11889
+ textureLoadingPromises.push(resolvePromise);
11890
+ continue;
11891
+ }
11892
+ const pageName = page.name;
11893
+ const providedPage = (metadata == null ? void 0 : metadata.images) ? metadata.images[pageName] : void 0;
11894
+ if (providedPage instanceof pixi_js.TextureSource) {
11895
+ page.setTexture(SpineTexture.from(providedPage));
11896
+ } else {
11897
+ const url =
11898
+ providedPage != null
11899
+ ? providedPage
11900
+ : pixi_js.path.normalize([...basePath.split(pixi_js.path.sep), pageName].join(pixi_js.path.sep));
11901
+ const assetsToLoadIn = {
11902
+ src: url,
11903
+ data: __spreadProps(__spreadValues({}, metadata.imageMetadata), {
11904
+ alphaMode: page.pma ? 'premultiplied-alpha' : 'premultiply-alpha-on-upload',
11905
+ }),
11906
+ };
11907
+ const pixiPromise = loader.load(assetsToLoadIn).then(texture => {
11908
+ page.setTexture(SpineTexture.from(texture.source));
11909
+ });
11910
+ textureLoadingPromises.push(pixiPromise);
11911
+ }
11912
+ }
11913
+ yield Promise.all(textureLoadingPromises);
11914
+ return retval;
11915
+ });
11951
11916
  },
11952
11917
  },
11953
11918
  };
@@ -11969,10 +11934,12 @@ var spineLoaderExtension = {
11969
11934
  test(url) {
11970
11935
  return pixi_js.checkExtension(url, '.skel');
11971
11936
  },
11972
- async load(url) {
11973
- const response = await pixi_js.DOMAdapter.get().fetch(url);
11974
- const buffer = new Uint8Array(await response.arrayBuffer());
11975
- return buffer;
11937
+ load(url) {
11938
+ return __async(this, null, function* () {
11939
+ const response = yield pixi_js.DOMAdapter.get().fetch(url);
11940
+ const buffer = new Uint8Array(yield response.arrayBuffer());
11941
+ return buffer;
11942
+ });
11976
11943
  },
11977
11944
  testParse(asset, options) {
11978
11945
  const isJsonSpineModel = pixi_js.checkExtension(options.src, '.json') && isJson(asset);
@@ -12128,11 +12095,14 @@ var DarkTintShader = class extends pixi_js.Shader {
12128
12095
  // spine-pixi-v8/src/darktint/DarkTintBatcher.ts
12129
12096
  var defaultShader = null;
12130
12097
  var _DarkTintBatcher = class extends pixi_js.Batcher {
12131
- geometry = new DarkTintBatchGeometry();
12132
- shader = defaultShader || (defaultShader = new DarkTintShader(this.maxTextures));
12133
- name = _DarkTintBatcher.extension.name;
12134
- /** The size of one attribute. 1 = 32 bit. x, y, u, v, color, darkColor, textureIdAndRound -> total = 7 */
12135
- vertexSize = 7;
12098
+ constructor() {
12099
+ super(...arguments);
12100
+ this.geometry = new DarkTintBatchGeometry();
12101
+ this.shader = defaultShader || (defaultShader = new DarkTintShader(this.maxTextures));
12102
+ this.name = _DarkTintBatcher.extension.name;
12103
+ /** The size of one attribute. 1 = 32 bit. x, y, u, v, color, darkColor, textureIdAndRound -> total = 7 */
12104
+ this.vertexSize = 7;
12105
+ }
12136
12106
  packAttributes(element, float32View, uint32View, index, textureId) {
12137
12107
  const textureIdAndRound = (textureId << 16) | (element.roundPixels & 65535);
12138
12108
  const wt = element.transform;
@@ -12211,37 +12181,21 @@ var _DarkTintBatcher = class extends pixi_js.Batcher {
12211
12181
  };
12212
12182
  var DarkTintBatcher = _DarkTintBatcher;
12213
12183
  /** @ignore */
12214
- __publicField(DarkTintBatcher, 'extension', {
12184
+ DarkTintBatcher.extension = {
12215
12185
  type: [pixi_js.ExtensionType.Batcher],
12216
12186
  name: 'darkTint',
12217
- });
12187
+ };
12218
12188
  pixi_js.extensions.add(DarkTintBatcher);
12219
12189
 
12220
12190
  // spine-pixi-v8/src/BatchableSpineSlot.ts
12221
12191
  var BatchableSpineSlot = class {
12222
- indexOffset = 0;
12223
- attributeOffset = 0;
12224
- indexSize;
12225
- attributeSize;
12226
- batcherName = 'darkTint';
12227
- topology = 'triangle-list';
12228
- packAsQuad = false;
12229
- renderable;
12230
- positions;
12231
- indices;
12232
- uvs;
12233
- roundPixels;
12234
- data;
12235
- blendMode;
12236
- darkTint;
12237
- texture;
12238
- transform;
12239
- // used internally by batcher specific. Stored for efficient updating.
12240
- _textureId;
12241
- _attributeStart;
12242
- _indexStart;
12243
- _batcher;
12244
- _batch;
12192
+ constructor() {
12193
+ this.indexOffset = 0;
12194
+ this.attributeOffset = 0;
12195
+ this.batcherName = 'darkTint';
12196
+ this.topology = 'triangle-list';
12197
+ this.packAsQuad = false;
12198
+ }
12245
12199
  get color() {
12246
12200
  const slotColor = this.data.color;
12247
12201
  const parentColor = this.renderable.groupColor;
@@ -12301,10 +12255,9 @@ var spineBlendModeMap = {
12301
12255
  3: 'screen',
12302
12256
  };
12303
12257
  var SpinePipe = class {
12304
- renderer;
12305
- gpuSpineData = {};
12306
- _destroyRenderableBound = this.destroyRenderable.bind(this);
12307
12258
  constructor(renderer) {
12259
+ this.gpuSpineData = {};
12260
+ this._destroyRenderableBound = this.destroyRenderable.bind(this);
12308
12261
  this.renderer = renderer;
12309
12262
  }
12310
12263
  validateRenderable(spine) {
@@ -12332,6 +12285,7 @@ var SpinePipe = class {
12332
12285
  return false;
12333
12286
  }
12334
12287
  addRenderable(spine, instructionSet) {
12288
+ var _a, _b;
12335
12289
  const gpuSpine = this._getSpineData(spine);
12336
12290
  const batcher = this.renderer.renderPipes.batch;
12337
12291
  const drawOrder = spine.skeleton.drawOrder;
@@ -12343,7 +12297,8 @@ var SpinePipe = class {
12343
12297
  const blendMode = spineBlendModeMap[slot.data.blendMode];
12344
12298
  if (attachment instanceof RegionAttachment || attachment instanceof MeshAttachment) {
12345
12299
  const cacheData = spine._getCachedData(slot, attachment);
12346
- const batchableSpineSlot = (gpuSpine.slotBatches[cacheData.id] ||= new BatchableSpineSlot());
12300
+ const batchableSpineSlot =
12301
+ (_a = gpuSpine.slotBatches)[(_b = cacheData.id)] || (_a[_b] = new BatchableSpineSlot());
12347
12302
  batchableSpineSlot.setData(spine, cacheData, blendMode, roundPixels);
12348
12303
  if (!cacheData.skipRender) {
12349
12304
  batcher.addToBatch(batchableSpineSlot, instructionSet);
@@ -12359,6 +12314,7 @@ var SpinePipe = class {
12359
12314
  }
12360
12315
  }
12361
12316
  updateRenderable(spine) {
12317
+ var _a;
12362
12318
  const gpuSpine = this.gpuSpineData[spine.uid];
12363
12319
  spine._validateAndTransformAttachments();
12364
12320
  const drawOrder = spine.skeleton.drawOrder;
@@ -12369,7 +12325,7 @@ var SpinePipe = class {
12369
12325
  const cacheData = spine._getCachedData(slot, attachment);
12370
12326
  if (!cacheData.skipRender) {
12371
12327
  const batchableSpineSlot = gpuSpine.slotBatches[spine._getCachedData(slot, attachment).id];
12372
- batchableSpineSlot._batcher?.updateElement(batchableSpineSlot);
12328
+ (_a = batchableSpineSlot._batcher) == null ? void 0 : _a.updateElement(batchableSpineSlot);
12373
12329
  }
12374
12330
  }
12375
12331
  }
@@ -12392,33 +12348,57 @@ var SpinePipe = class {
12392
12348
  }
12393
12349
  };
12394
12350
  /** @ignore */
12395
- __publicField(SpinePipe, 'extension', {
12351
+ SpinePipe.extension = {
12396
12352
  type: [pixi_js.ExtensionType.WebGLPipes, pixi_js.ExtensionType.WebGPUPipes, pixi_js.ExtensionType.CanvasPipes],
12397
12353
  name: 'spine',
12398
- });
12354
+ };
12399
12355
  pixi_js.extensions.add(SpinePipe);
12400
12356
  var vectorAux = new Vector2();
12401
12357
  Skeleton.yDown = true;
12402
12358
  var clipper = new SkeletonClipping();
12403
12359
  var maskPool = new Pool(() => new pixi_js.Graphics());
12404
12360
  var Spine$1 = class extends pixi_js.ViewContainer {
12405
- // Pixi properties
12406
- batched = true;
12407
- buildId = 0;
12408
- renderPipeId = 'spine';
12409
- _didSpineUpdate = false;
12410
- beforeUpdateWorldTransforms = () => {};
12411
- afterUpdateWorldTransforms = () => {};
12412
- // Spine properties
12413
- /** The skeleton for this Spine game object. */
12414
- skeleton;
12415
- /** The animation state for this Spine game object. */
12416
- state;
12417
- skeletonBounds;
12418
- darkTint = false;
12419
- _debug = void 0;
12420
- _slotsObject = /* @__PURE__ */ Object.create(null);
12421
- clippingSlotToPixiMasks = /* @__PURE__ */ Object.create(null);
12361
+ constructor(options) {
12362
+ var _a;
12363
+ if (options instanceof SkeletonData) {
12364
+ options = {
12365
+ skeletonData: options,
12366
+ };
12367
+ }
12368
+ super();
12369
+ // Pixi properties
12370
+ this.batched = true;
12371
+ this.buildId = 0;
12372
+ this.renderPipeId = 'spine';
12373
+ this._didSpineUpdate = false;
12374
+ this.beforeUpdateWorldTransforms = () => {};
12375
+ this.afterUpdateWorldTransforms = () => {};
12376
+ this.darkTint = false;
12377
+ this._debug = void 0;
12378
+ this._slotsObject = /* @__PURE__ */ Object.create(null);
12379
+ this.clippingSlotToPixiMasks = /* @__PURE__ */ Object.create(null);
12380
+ this.spineAttachmentsDirty = true;
12381
+ this.spineTexturesDirty = true;
12382
+ this._lastAttachments = [];
12383
+ this._stateChanged = true;
12384
+ this.attachmentCacheData = [];
12385
+ this._autoUpdate = true;
12386
+ this.hasNeverUpdated = true;
12387
+ const skeletonData = options instanceof SkeletonData ? options : options.skeletonData;
12388
+ this.skeleton = new Skeleton(skeletonData);
12389
+ this.state = new AnimationState(new AnimationStateData(skeletonData));
12390
+ this.autoUpdate = (_a = options == null ? void 0 : options.autoUpdate) != null ? _a : true;
12391
+ this.darkTint =
12392
+ (options == null ? void 0 : options.darkTint) === void 0
12393
+ ? this.skeleton.slots.some(slot => !!slot.data.darkColor)
12394
+ : options == null
12395
+ ? void 0
12396
+ : options.darkTint;
12397
+ const slots = this.skeleton.slots;
12398
+ for (let i = 0; i < slots.length; i++) {
12399
+ this.attachmentCacheData[i] = /* @__PURE__ */ Object.create(null);
12400
+ }
12401
+ }
12422
12402
  getSlotFromRef(slotRef) {
12423
12403
  let slot;
12424
12404
  if (typeof slotRef === 'number') slot = this.skeleton.slots[slotRef];
@@ -12427,11 +12407,6 @@ var Spine$1 = class extends pixi_js.ViewContainer {
12427
12407
  if (!slot) throw new Error(`No slot found with the given slot reference: ${slotRef}`);
12428
12408
  return slot;
12429
12409
  }
12430
- spineAttachmentsDirty = true;
12431
- spineTexturesDirty = true;
12432
- _lastAttachments = [];
12433
- _stateChanged = true;
12434
- attachmentCacheData = [];
12435
12410
  get debug() {
12436
12411
  return this._debug;
12437
12412
  }
@@ -12447,7 +12422,6 @@ var Spine$1 = class extends pixi_js.ViewContainer {
12447
12422
  }
12448
12423
  this._debug = value;
12449
12424
  }
12450
- _autoUpdate = true;
12451
12425
  get autoUpdate() {
12452
12426
  return this._autoUpdate;
12453
12427
  }
@@ -12460,31 +12434,12 @@ var Spine$1 = class extends pixi_js.ViewContainer {
12460
12434
  }
12461
12435
  this._autoUpdate = value;
12462
12436
  }
12463
- hasNeverUpdated = true;
12464
- constructor(options) {
12465
- if (options instanceof SkeletonData) {
12466
- options = {
12467
- skeletonData: options,
12468
- };
12469
- }
12470
- super();
12471
- const skeletonData = options instanceof SkeletonData ? options : options.skeletonData;
12472
- this.skeleton = new Skeleton(skeletonData);
12473
- this.state = new AnimationState(new AnimationStateData(skeletonData));
12474
- this.autoUpdate = options?.autoUpdate ?? true;
12475
- this.darkTint =
12476
- options?.darkTint === void 0 ? this.skeleton.slots.some(slot => !!slot.data.darkColor) : options?.darkTint;
12477
- const slots = this.skeleton.slots;
12478
- for (let i = 0; i < slots.length; i++) {
12479
- this.attachmentCacheData[i] = /* @__PURE__ */ Object.create(null);
12480
- }
12481
- }
12482
12437
  /** If {@link Spine.autoUpdate} is `false`, this method allows to update the AnimationState and the Skeleton with the given delta. */
12483
12438
  update(dt) {
12484
12439
  this.internalUpdate(0, dt);
12485
12440
  }
12486
12441
  internalUpdate(_deltaFrame, deltaSeconds) {
12487
- this._updateAndApplyState(deltaSeconds ?? pixi_js.Ticker.shared.deltaMS / 1e3);
12442
+ this._updateAndApplyState(deltaSeconds != null ? deltaSeconds : pixi_js.Ticker.shared.deltaMS / 1e3);
12488
12443
  }
12489
12444
  get bounds() {
12490
12445
  if (this._boundsDirty) {
@@ -12590,9 +12545,15 @@ var Spine$1 = class extends pixi_js.ViewContainer {
12590
12545
  this.spineAttachmentsDirty = spineAttachmentsDirty;
12591
12546
  }
12592
12547
  updateAndSetPixiMask(slot, last) {
12548
+ var _a, _b;
12593
12549
  const attachment = slot.attachment;
12594
12550
  if (attachment && attachment instanceof ClippingAttachment) {
12595
- const clip = (this.clippingSlotToPixiMasks[slot.data.name] ||= { slot, vertices: new Array() });
12551
+ const clip =
12552
+ (_a = this.clippingSlotToPixiMasks)[(_b = slot.data.name)] ||
12553
+ (_a[_b] = {
12554
+ slot,
12555
+ vertices: new Array(),
12556
+ });
12596
12557
  clip.maskComputed = false;
12597
12558
  this.currentClippingSlot = this.clippingSlotToPixiMasks[slot.data.name];
12598
12559
  return;
@@ -12616,7 +12577,7 @@ var Spine$1 = class extends pixi_js.ViewContainer {
12616
12577
  mask.clear().poly(vertices).stroke({ width: 0 }).fill({ alpha: 0.25 });
12617
12578
  }
12618
12579
  slotObject.container.mask = mask;
12619
- } else if (slotObject?.container.mask) {
12580
+ } else if (slotObject == null ? void 0 : slotObject.container.mask) {
12620
12581
  slotObject.container.mask = null;
12621
12582
  }
12622
12583
  if (currentClippingSlot && currentClippingSlot.slot.attachment.endSlot == slot.data) {
@@ -12637,8 +12598,8 @@ var Spine$1 = class extends pixi_js.ViewContainer {
12637
12598
  }
12638
12599
  }
12639
12600
  }
12640
- currentClippingSlot;
12641
12601
  transformAttachments() {
12602
+ var _a;
12642
12603
  const currentDrawOrder = this.skeleton.drawOrder;
12643
12604
  for (let i = 0; i < currentDrawOrder.length; i++) {
12644
12605
  const slot = currentDrawOrder[i];
@@ -12670,7 +12631,7 @@ var Spine$1 = class extends pixi_js.ViewContainer {
12670
12631
  cacheData.darkColor.setFromColor(slot.darkColor);
12671
12632
  }
12672
12633
  cacheData.skipRender = cacheData.clipped = false;
12673
- const texture = attachment.region?.texture.texture || pixi_js.Texture.EMPTY;
12634
+ const texture = ((_a = attachment.region) == null ? void 0 : _a.texture.texture) || pixi_js.Texture.EMPTY;
12674
12635
  if (cacheData.texture !== texture) {
12675
12636
  cacheData.texture = texture;
12676
12637
  this.spineTexturesDirty = true;
@@ -12760,6 +12721,7 @@ var Spine$1 = class extends pixi_js.ViewContainer {
12760
12721
  return this.attachmentCacheData[slot.data.index][attachment.name] || this.initCachedData(slot, attachment);
12761
12722
  }
12762
12723
  initCachedData(slot, attachment) {
12724
+ var _a, _b;
12763
12725
  let vertices;
12764
12726
  if (attachment instanceof RegionAttachment) {
12765
12727
  vertices = new Float32Array(8);
@@ -12773,7 +12735,7 @@ var Spine$1 = class extends pixi_js.ViewContainer {
12773
12735
  darkColor: new Color(0, 0, 0, 0),
12774
12736
  darkTint: this.darkTint,
12775
12737
  skipRender: false,
12776
- texture: attachment.region?.texture.texture,
12738
+ texture: (_a = attachment.region) == null ? void 0 : _a.texture.texture,
12777
12739
  };
12778
12740
  } else {
12779
12741
  vertices = new Float32Array(attachment.worldVerticesLength);
@@ -12787,12 +12749,13 @@ var Spine$1 = class extends pixi_js.ViewContainer {
12787
12749
  darkColor: new Color(0, 0, 0, 0),
12788
12750
  darkTint: this.darkTint,
12789
12751
  skipRender: false,
12790
- texture: attachment.region?.texture.texture,
12752
+ texture: (_b = attachment.region) == null ? void 0 : _b.texture.texture,
12791
12753
  };
12792
12754
  }
12793
12755
  return this.attachmentCacheData[slot.data.index][attachment.name];
12794
12756
  }
12795
12757
  onViewUpdate() {
12758
+ var _a;
12796
12759
  this._didViewChangeTick++;
12797
12760
  this._boundsDirty = true;
12798
12761
  if (this.didViewUpdate) return;
@@ -12801,7 +12764,7 @@ var Spine$1 = class extends pixi_js.ViewContainer {
12801
12764
  if (renderGroup) {
12802
12765
  renderGroup.onChildViewUpdate(this);
12803
12766
  }
12804
- this.debug?.renderDebug(this);
12767
+ (_a = this.debug) == null ? void 0 : _a.renderDebug(this);
12805
12768
  }
12806
12769
  /**
12807
12770
  * Attaches a PixiJS container to a specified slot. This will map the world transform of the slots bone
@@ -12811,9 +12774,10 @@ var Spine$1 = class extends pixi_js.ViewContainer {
12811
12774
  * @param slotRef - The slot id or slot to attach to
12812
12775
  */
12813
12776
  addSlotObject(slot, container) {
12777
+ var _a;
12814
12778
  slot = this.getSlotFromRef(slot);
12815
12779
  for (const i in this._slotsObject) {
12816
- if (this._slotsObject[i]?.container === container) {
12780
+ if (((_a = this._slotsObject[i]) == null ? void 0 : _a.container) === container) {
12817
12781
  this.removeSlotObject(this._slotsObject[i].slot);
12818
12782
  }
12819
12783
  }
@@ -12831,10 +12795,11 @@ var Spine$1 = class extends pixi_js.ViewContainer {
12831
12795
  * @param slotOrContainer - The container, slot id or slot to detach from
12832
12796
  */
12833
12797
  removeSlotObject(slotOrContainer) {
12798
+ var _a, _b;
12834
12799
  let containerToRemove;
12835
12800
  if (slotOrContainer instanceof pixi_js.Container) {
12836
12801
  for (const i in this._slotsObject) {
12837
- if (this._slotsObject[i]?.container === slotOrContainer) {
12802
+ if (((_a = this._slotsObject[i]) == null ? void 0 : _a.container) === slotOrContainer) {
12838
12803
  this._slotsObject[i] = null;
12839
12804
  containerToRemove = slotOrContainer;
12840
12805
  break;
@@ -12842,7 +12807,7 @@ var Spine$1 = class extends pixi_js.ViewContainer {
12842
12807
  }
12843
12808
  } else {
12844
12809
  const slot = this.getSlotFromRef(slotOrContainer);
12845
- containerToRemove = this._slotsObject[slot.data.name]?.container;
12810
+ containerToRemove = (_b = this._slotsObject[slot.data.name]) == null ? void 0 : _b.container;
12846
12811
  this._slotsObject[slot.data.name] = null;
12847
12812
  }
12848
12813
  if (containerToRemove) {
@@ -12857,12 +12822,13 @@ var Spine$1 = class extends pixi_js.ViewContainer {
12857
12822
  * @returns - The container attached to the slot
12858
12823
  */
12859
12824
  getSlotObject(slot) {
12825
+ var _a;
12860
12826
  slot = this.getSlotFromRef(slot);
12861
- return this._slotsObject[slot.data.name]?.container;
12827
+ return (_a = this._slotsObject[slot.data.name]) == null ? void 0 : _a.container;
12862
12828
  }
12863
12829
  updateBounds() {
12864
12830
  this._boundsDirty = false;
12865
- this.skeletonBounds ||= new SkeletonBounds();
12831
+ this.skeletonBounds || (this.skeletonBounds = new SkeletonBounds());
12866
12832
  const skeletonBounds = this.skeletonBounds;
12867
12833
  skeletonBounds.update(this.skeleton, true);
12868
12834
  if (skeletonBounds.minX === Infinity) {
@@ -12954,6 +12920,7 @@ var Spine$1 = class extends pixi_js.ViewContainer {
12954
12920
  skeletonAsset instanceof Uint8Array ? new SkeletonBinary(attachmentLoader) : new SkeletonJson(attachmentLoader);
12955
12921
  parser.scale = scale;
12956
12922
  const skeletonData = parser.readSkeletonData(skeletonAsset);
12923
+ console.log('>>>skeletonData', skeletonData);
12957
12924
  pixi_js.Cache.set(cacheKey, skeletonData);
12958
12925
  return new Spine$1({
12959
12926
  skeletonData,
@@ -12963,29 +12930,31 @@ var Spine$1 = class extends pixi_js.ViewContainer {
12963
12930
  }
12964
12931
  };
12965
12932
  var SpineDebugRenderer = class {
12966
- registeredSpines = /* @__PURE__ */ new Map();
12967
- drawMeshHull = true;
12968
- drawMeshTriangles = true;
12969
- drawBones = true;
12970
- drawPaths = true;
12971
- drawBoundingBoxes = true;
12972
- drawClipping = true;
12973
- drawRegionAttachments = true;
12974
- drawEvents = true;
12975
- lineWidth = 1;
12976
- regionAttachmentsColor = 30975;
12977
- meshHullColor = 30975;
12978
- meshTrianglesColor = 16763904;
12979
- clippingPolygonColor = 16711935;
12980
- boundingBoxesRectColor = 65280;
12981
- boundingBoxesPolygonColor = 65280;
12982
- boundingBoxesCircleColor = 65280;
12983
- pathsCurveColor = 16711680;
12984
- pathsLineColor = 16711935;
12985
- skeletonXYColor = 16711680;
12986
- bonesColor = 61132;
12987
- eventFontSize = 24;
12988
- eventFontColor = 0;
12933
+ constructor() {
12934
+ this.registeredSpines = /* @__PURE__ */ new Map();
12935
+ this.drawMeshHull = true;
12936
+ this.drawMeshTriangles = true;
12937
+ this.drawBones = true;
12938
+ this.drawPaths = true;
12939
+ this.drawBoundingBoxes = true;
12940
+ this.drawClipping = true;
12941
+ this.drawRegionAttachments = true;
12942
+ this.drawEvents = true;
12943
+ this.lineWidth = 1;
12944
+ this.regionAttachmentsColor = 30975;
12945
+ this.meshHullColor = 30975;
12946
+ this.meshTrianglesColor = 16763904;
12947
+ this.clippingPolygonColor = 16711935;
12948
+ this.boundingBoxesRectColor = 65280;
12949
+ this.boundingBoxesPolygonColor = 65280;
12950
+ this.boundingBoxesCircleColor = 65280;
12951
+ this.pathsCurveColor = 16711680;
12952
+ this.pathsLineColor = 16711935;
12953
+ this.skeletonXYColor = 16711680;
12954
+ this.bonesColor = 61132;
12955
+ this.eventFontSize = 24;
12956
+ this.eventFontColor = 0;
12957
+ }
12989
12958
  /**
12990
12959
  * The debug is attached by force to each spine object.
12991
12960
  * So we need to create it inside the spine when we get the first update
@@ -13073,7 +13042,11 @@ var SpineDebugRenderer = class {
13073
13042
  debugDisplayObjects.pathsCurve.clear();
13074
13043
  debugDisplayObjects.pathsLine.clear();
13075
13044
  for (let len = debugDisplayObjects.bones.children.length; len > 0; len--) {
13076
- debugDisplayObjects.bones.children[len - 1].destroy({ children: true, texture: true, textureSource: true });
13045
+ debugDisplayObjects.bones.children[len - 1].destroy({
13046
+ children: true,
13047
+ texture: true,
13048
+ textureSource: true,
13049
+ });
13077
13050
  }
13078
13051
  const scale = Math.abs(spine.scale.x || spine.scale.y || 1);
13079
13052
  const lineWidth = this.lineWidth / scale;
@@ -13107,7 +13080,10 @@ var SpineDebugRenderer = class {
13107
13080
  const skeletonX = skeleton.x;
13108
13081
  const skeletonY = skeleton.y;
13109
13082
  const bones = skeleton.bones;
13110
- debugDisplayObjects.skeletonXY.strokeStyle = { width: lineWidth, color: this.skeletonXYColor };
13083
+ debugDisplayObjects.skeletonXY.strokeStyle = {
13084
+ width: lineWidth,
13085
+ color: this.skeletonXYColor,
13086
+ };
13111
13087
  for (let i = 0, len = bones.length; i < len; i++) {
13112
13088
  const bone = bones[i];
13113
13089
  const boneLen = bone.data.length;
@@ -13230,8 +13206,14 @@ var SpineDebugRenderer = class {
13230
13206
  }
13231
13207
  }
13232
13208
  }
13233
- debugDisplayObjects.meshHullLine.stroke({ width: lineWidth, color: this.meshHullColor });
13234
- debugDisplayObjects.meshTrianglesLine.stroke({ width: lineWidth, color: this.meshTrianglesColor });
13209
+ debugDisplayObjects.meshHullLine.stroke({
13210
+ width: lineWidth,
13211
+ color: this.meshHullColor,
13212
+ });
13213
+ debugDisplayObjects.meshTrianglesLine.stroke({
13214
+ width: lineWidth,
13215
+ color: this.meshTrianglesColor,
13216
+ });
13235
13217
  }
13236
13218
  drawClippingFunc(spine, debugDisplayObjects, lineWidth) {
13237
13219
  const skeleton = spine.skeleton;
@@ -13349,8 +13331,14 @@ var SpineDebugRenderer = class {
13349
13331
  y1 = y2;
13350
13332
  }
13351
13333
  }
13352
- debugDisplayObjects.pathsCurve.stroke({ width: lineWidth, color: this.pathsCurveColor });
13353
- debugDisplayObjects.pathsLine.stroke({ width: lineWidth, color: this.pathsLineColor });
13334
+ debugDisplayObjects.pathsCurve.stroke({
13335
+ width: lineWidth,
13336
+ color: this.pathsCurveColor,
13337
+ });
13338
+ debugDisplayObjects.pathsLine.stroke({
13339
+ width: lineWidth,
13340
+ color: this.pathsLineColor,
13341
+ });
13354
13342
  }
13355
13343
  unregisterSpine(spine) {
13356
13344
  if (!this.registeredSpines.has(spine)) {
@@ -13361,7 +13349,11 @@ var SpineDebugRenderer = class {
13361
13349
  return;
13362
13350
  }
13363
13351
  spine.state.removeListener(debugDisplayObjects.eventCallback);
13364
- debugDisplayObjects.parentDebugContainer.destroy({ textureSource: true, children: true, texture: true });
13352
+ debugDisplayObjects.parentDebugContainer.destroy({
13353
+ textureSource: true,
13354
+ children: true,
13355
+ texture: true,
13356
+ });
13365
13357
  this.registeredSpines.delete(spine);
13366
13358
  }
13367
13359
  };
@@ -13450,7 +13442,6 @@ var pixiSpine = {
13450
13442
  ShearXTimeline,
13451
13443
  ShearYTimeline,
13452
13444
  Skeleton,
13453
- SpineTexture,
13454
13445
  SkeletonBinary,
13455
13446
  SkeletonBounds,
13456
13447
  SkeletonClipping,