@eva/plugin-renderer-spine 2.0.0-beta.2 → 2.0.0-beta.20

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.
@@ -1,14 +1,50 @@
1
+ import { ExtensionType, checkExtension, Resolver, LoaderParserPriority, extensions, collectAllRenderables, Graphics, ViewContainer, Ticker, fastCopy, Texture as Texture$1, DEG_TO_RAD, Container, Cache, Assets, Text, DOMAdapter, path, TextureSource, Batcher, Color as Color$1, Geometry, Buffer, BufferUsage, Shader, compileHighShaderGlProgram, colorBitGl, generateTextureBatchBitGl, roundPixelsBitGl, compileHighShaderGpuProgram, colorBit, generateTextureBatchBit, roundPixelsBit, getBatchSamplersUniformGroup } from 'pixi.js';
1
2
  import { SpineSystem as SpineSystem$1, Spine as Spine$2 } from '@eva/spine-base';
2
- import { ExtensionType, checkExtension, Resolver, LoaderParserPriority, DOMAdapter, path, TextureSource, extensions, collectAllRenderables, Graphics, ViewContainer, Ticker, fastCopy, Texture as Texture$1, DEG_TO_RAD, Container, Cache, Assets, Text, Batcher, Color as Color$1, Geometry, Buffer, BufferUsage, Shader, compileHighShaderGlProgram, colorBitGl, generateTextureBatchBitGl, roundPixelsBitGl, compileHighShaderGpuProgram, colorBit, generateTextureBatchBit, roundPixelsBit, getBatchSamplersUniformGroup } from 'pixi.js';
3
3
 
4
4
  var __defProp = Object.defineProperty;
5
+ var __defProps = Object.defineProperties;
6
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
7
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
5
10
  var __defNormalProp = (obj, key, value) =>
6
11
  key in obj
7
- ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value })
12
+ ? __defProp(obj, key, {
13
+ enumerable: true,
14
+ configurable: true,
15
+ writable: true,
16
+ value,
17
+ })
8
18
  : (obj[key] = value);
9
- var __publicField = (obj, key, value) => {
10
- __defNormalProp(obj, typeof key !== 'symbol' ? key + '' : key, value);
11
- return value;
19
+ var __spreadValues = (a, b) => {
20
+ if (!b) b = {};
21
+ for (var prop in b) if (__hasOwnProp.call(b, prop)) __defNormalProp(a, prop, b[prop]);
22
+ if (__getOwnPropSymbols)
23
+ for (var prop of __getOwnPropSymbols(b)) {
24
+ if (__propIsEnum.call(b, prop)) __defNormalProp(a, prop, b[prop]);
25
+ }
26
+ return a;
27
+ };
28
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
29
+ var __async = (__this, __arguments, generator) => {
30
+ return new Promise((resolve, reject) => {
31
+ var fulfilled = value => {
32
+ try {
33
+ step(generator.next(value));
34
+ } catch (e) {
35
+ reject(e);
36
+ }
37
+ };
38
+ var rejected = value => {
39
+ try {
40
+ step(generator.throw(value));
41
+ } catch (e) {
42
+ reject(e);
43
+ }
44
+ };
45
+ var step = x => (x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected));
46
+ step((generator = generator.apply(__this, __arguments)).next());
47
+ });
12
48
  };
13
49
 
14
50
  // spine-pixi-v8/src/require-shim.ts
@@ -22,7 +58,9 @@ if (typeof window !== 'undefined' && window.PIXI) {
22
58
 
23
59
  // spine-core/src/Utils.ts
24
60
  var IntSet = class {
25
- array = new Array();
61
+ constructor() {
62
+ this.array = new Array();
63
+ }
26
64
  add(value) {
27
65
  let contains = this.contains(value);
28
66
  this.array[value | 0] = value | 0;
@@ -39,8 +77,10 @@ var IntSet = class {
39
77
  }
40
78
  };
41
79
  var StringSet = class {
42
- entries = {};
43
- size = 0;
80
+ constructor() {
81
+ this.entries = {};
82
+ this.size = 0;
83
+ }
44
84
  add(value) {
45
85
  let contains = this.entries[value];
46
86
  this.entries[value] = true;
@@ -130,11 +170,11 @@ var _Color = class {
130
170
  }
131
171
  };
132
172
  var Color = _Color;
133
- __publicField(Color, 'WHITE', new _Color(1, 1, 1, 1));
134
- __publicField(Color, 'RED', new _Color(1, 0, 0, 1));
135
- __publicField(Color, 'GREEN', new _Color(0, 1, 0, 1));
136
- __publicField(Color, 'BLUE', new _Color(0, 0, 1, 1));
137
- __publicField(Color, 'MAGENTA', new _Color(1, 0, 1, 1));
173
+ Color.WHITE = new _Color(1, 1, 1, 1);
174
+ Color.RED = new _Color(1, 0, 0, 1);
175
+ Color.GREEN = new _Color(0, 1, 0, 1);
176
+ Color.BLUE = new _Color(0, 0, 1, 1);
177
+ Color.MAGENTA = new _Color(1, 0, 1, 1);
138
178
  var _MathUtils = class {
139
179
  static clamp(value, min, max) {
140
180
  if (value < min) return min;
@@ -174,22 +214,22 @@ var _MathUtils = class {
174
214
  }
175
215
  };
176
216
  var MathUtils = _MathUtils;
177
- __publicField(MathUtils, 'PI', 3.1415927);
178
- __publicField(MathUtils, 'PI2', _MathUtils.PI * 2);
179
- __publicField(MathUtils, 'invPI2', 1 / _MathUtils.PI2);
180
- __publicField(MathUtils, 'radiansToDegrees', 180 / _MathUtils.PI);
181
- __publicField(MathUtils, 'radDeg', _MathUtils.radiansToDegrees);
182
- __publicField(MathUtils, 'degreesToRadians', _MathUtils.PI / 180);
183
- __publicField(MathUtils, 'degRad', _MathUtils.degreesToRadians);
217
+ MathUtils.PI = 3.1415927;
218
+ MathUtils.PI2 = _MathUtils.PI * 2;
219
+ MathUtils.invPI2 = 1 / _MathUtils.PI2;
220
+ MathUtils.radiansToDegrees = 180 / _MathUtils.PI;
221
+ MathUtils.radDeg = _MathUtils.radiansToDegrees;
222
+ MathUtils.degreesToRadians = _MathUtils.PI / 180;
223
+ MathUtils.degRad = _MathUtils.degreesToRadians;
184
224
  var Interpolation = class {
185
225
  apply(start, end, a) {
186
226
  return start + (end - start) * this.applyInternal(a);
187
227
  }
188
228
  };
189
229
  var Pow = class extends Interpolation {
190
- power = 2;
191
230
  constructor(power) {
192
231
  super();
232
+ this.power = 2;
193
233
  this.power = power;
194
234
  }
195
235
  applyInternal(a) {
@@ -265,7 +305,7 @@ var _Utils = class {
265
305
  }
266
306
  };
267
307
  var Utils = _Utils;
268
- __publicField(Utils, 'SUPPORTS_TYPED_ARRAYS', typeof Float32Array !== 'undefined');
308
+ Utils.SUPPORTS_TYPED_ARRAYS = typeof Float32Array !== 'undefined';
269
309
  var DebugUtils = class {
270
310
  static logBones(skeleton) {
271
311
  for (let i = 0; i < skeleton.bones.length; i++) {
@@ -289,9 +329,8 @@ var DebugUtils = class {
289
329
  }
290
330
  };
291
331
  var Pool = class {
292
- items = new Array();
293
- instantiator;
294
332
  constructor(instantiator) {
333
+ this.items = new Array();
295
334
  this.instantiator = instantiator;
296
335
  }
297
336
  obtain() {
@@ -333,13 +372,15 @@ var Vector2 = class {
333
372
  }
334
373
  };
335
374
  var TimeKeeper = class {
336
- maxDelta = 0.064;
337
- framesPerSecond = 0;
338
- delta = 0;
339
- totalTime = 0;
340
- lastTime = Date.now() / 1e3;
341
- frameCount = 0;
342
- frameTime = 0;
375
+ constructor() {
376
+ this.maxDelta = 0.064;
377
+ this.framesPerSecond = 0;
378
+ this.delta = 0;
379
+ this.totalTime = 0;
380
+ this.lastTime = Date.now() / 1e3;
381
+ this.frameCount = 0;
382
+ this.frameTime = 0;
383
+ }
343
384
  update() {
344
385
  let now = Date.now() / 1e3;
345
386
  this.delta = now - this.lastTime;
@@ -356,12 +397,11 @@ var TimeKeeper = class {
356
397
  }
357
398
  };
358
399
  var WindowedMean = class {
359
- values;
360
- addedValues = 0;
361
- lastValue = 0;
362
- mean = 0;
363
- dirty = true;
364
400
  constructor(windowSize = 32) {
401
+ this.addedValues = 0;
402
+ this.lastValue = 0;
403
+ this.mean = 0;
404
+ this.dirty = true;
365
405
  this.values = new Array(windowSize);
366
406
  }
367
407
  hasEnoughData() {
@@ -389,31 +429,30 @@ var WindowedMean = class {
389
429
 
390
430
  // spine-core/src/attachments/Attachment.ts
391
431
  var Attachment = class {
392
- name;
393
432
  constructor(name) {
394
433
  if (!name) throw new Error('name cannot be null.');
395
434
  this.name = name;
396
435
  }
397
436
  };
398
437
  var _VertexAttachment = class extends Attachment {
399
- /** The unique ID for this attachment. */
400
- id = _VertexAttachment.nextID++;
401
- /** The bones which affect the {@link #getVertices()}. The array entries are, for each vertex, the number of bones affecting
402
- * the vertex followed by that many bone indices, which is the index of the bone in {@link Skeleton#bones}. Will be null
403
- * if this attachment has no weights. */
404
- bones = null;
405
- /** The vertex positions in the bone's coordinate system. For a non-weighted attachment, the values are `x,y`
406
- * entries for each vertex. For a weighted attachment, the values are `x,y,weight` entries for each bone affecting
407
- * each vertex. */
408
- vertices = [];
409
- /** The maximum number of world vertex values that can be output by
410
- * {@link #computeWorldVertices()} using the `count` parameter. */
411
- worldVerticesLength = 0;
412
- /** Timelines for the timeline attachment are also applied to this attachment.
413
- * May be null if no attachment-specific timelines should be applied. */
414
- timelineAttachment = this;
415
438
  constructor(name) {
416
439
  super(name);
440
+ /** The unique ID for this attachment. */
441
+ this.id = _VertexAttachment.nextID++;
442
+ /** The bones which affect the {@link #getVertices()}. The array entries are, for each vertex, the number of bones affecting
443
+ * the vertex followed by that many bone indices, which is the index of the bone in {@link Skeleton#bones}. Will be null
444
+ * if this attachment has no weights. */
445
+ this.bones = null;
446
+ /** The vertex positions in the bone's coordinate system. For a non-weighted attachment, the values are `x,y`
447
+ * entries for each vertex. For a weighted attachment, the values are `x,y,weight` entries for each bone affecting
448
+ * each vertex. */
449
+ this.vertices = [];
450
+ /** The maximum number of world vertex values that can be output by
451
+ * {@link #computeWorldVertices()} using the `count` parameter. */
452
+ this.worldVerticesLength = 0;
453
+ /** Timelines for the timeline attachment are also applied to this attachment.
454
+ * May be null if no attachment-specific timelines should be applied. */
455
+ this.timelineAttachment = this;
417
456
  }
418
457
  /** Transforms the attachment's local {@link #vertices} to world coordinates. If the slot's {@link Slot#deform} is
419
458
  * not empty, it is used to deform the vertices.
@@ -509,17 +548,16 @@ var _VertexAttachment = class extends Attachment {
509
548
  }
510
549
  };
511
550
  var VertexAttachment = _VertexAttachment;
512
- __publicField(VertexAttachment, 'nextID', 0);
551
+ VertexAttachment.nextID = 0;
513
552
 
514
553
  // spine-core/src/attachments/Sequence.ts
515
554
  var _Sequence = class {
516
- id = _Sequence.nextID();
517
- regions;
518
- start = 0;
519
- digits = 0;
520
- /** The index of the region to show for the setup pose. */
521
- setupIndex = 0;
522
555
  constructor(count) {
556
+ this.id = _Sequence.nextID();
557
+ this.start = 0;
558
+ this.digits = 0;
559
+ /** The index of the region to show for the setup pose. */
560
+ this.setupIndex = 0;
523
561
  this.regions = new Array(count);
524
562
  }
525
563
  copy() {
@@ -552,7 +590,7 @@ var _Sequence = class {
552
590
  }
553
591
  };
554
592
  var Sequence = _Sequence;
555
- __publicField(Sequence, '_nextID', 0);
593
+ Sequence._nextID = 0;
556
594
  var SequenceMode = /* @__PURE__ */ (SequenceMode2 => {
557
595
  SequenceMode2[(SequenceMode2['hold'] = 0)] = 'hold';
558
596
  SequenceMode2[(SequenceMode2['once'] = 1)] = 'once';
@@ -570,13 +608,9 @@ var SequenceModeValues = [
570
608
 
571
609
  // spine-core/src/Animation.ts
572
610
  var Animation = class {
573
- /** The animation's name, which is unique across all animations in the skeleton. */
574
- name;
575
- timelines = [];
576
- timelineIds = new StringSet();
577
- /** The duration of the animation in seconds, which is the highest time of all keys in the timeline. */
578
- duration;
579
611
  constructor(name, timelines, duration) {
612
+ this.timelines = [];
613
+ this.timelineIds = new StringSet();
580
614
  if (!name) throw new Error('name cannot be null.');
581
615
  this.name = name;
582
616
  this.setTimelines(timelines);
@@ -652,8 +686,6 @@ var Property = {
652
686
  sequence: 28,
653
687
  };
654
688
  var Timeline = class {
655
- propertyIds;
656
- frames;
657
689
  constructor(frameCount, propertyIds) {
658
690
  this.propertyIds = propertyIds;
659
691
  this.frames = Utils.newFloatArray(frameCount * this.getFrameEntries());
@@ -682,7 +714,6 @@ var Timeline = class {
682
714
  }
683
715
  };
684
716
  var CurveTimeline = class extends Timeline {
685
- curves;
686
717
  // type, x, y, ...
687
718
  constructor(frameCount, bezierCount, propertyIds) {
688
719
  super(frameCount, propertyIds);
@@ -951,9 +982,9 @@ var CurveTimeline2 = class extends CurveTimeline {
951
982
  }
952
983
  };
953
984
  var RotateTimeline = class extends CurveTimeline1 {
954
- boneIndex = 0;
955
985
  constructor(frameCount, bezierCount, boneIndex) {
956
986
  super(frameCount, bezierCount, Property.rotate + '|' + boneIndex);
987
+ this.boneIndex = 0;
957
988
  this.boneIndex = boneIndex;
958
989
  }
959
990
  apply(skeleton, lastTime, time, events, alpha, blend, direction) {
@@ -962,9 +993,9 @@ var RotateTimeline = class extends CurveTimeline1 {
962
993
  }
963
994
  };
964
995
  var TranslateTimeline = class extends CurveTimeline2 {
965
- boneIndex = 0;
966
996
  constructor(frameCount, bezierCount, boneIndex) {
967
997
  super(frameCount, bezierCount, Property.x + '|' + boneIndex, Property.y + '|' + boneIndex);
998
+ this.boneIndex = 0;
968
999
  this.boneIndex = boneIndex;
969
1000
  }
970
1001
  apply(skeleton, lastTime, time, events, alpha, blend, direction) {
@@ -1076,9 +1107,9 @@ var TranslateTimeline = class extends CurveTimeline2 {
1076
1107
  }
1077
1108
  };
1078
1109
  var TranslateXTimeline = class extends CurveTimeline1 {
1079
- boneIndex = 0;
1080
1110
  constructor(frameCount, bezierCount, boneIndex) {
1081
1111
  super(frameCount, bezierCount, Property.x + '|' + boneIndex);
1112
+ this.boneIndex = 0;
1082
1113
  this.boneIndex = boneIndex;
1083
1114
  }
1084
1115
  apply(skeleton, lastTime, time, events, alpha, blend, direction) {
@@ -1087,9 +1118,9 @@ var TranslateXTimeline = class extends CurveTimeline1 {
1087
1118
  }
1088
1119
  };
1089
1120
  var TranslateYTimeline = class extends CurveTimeline1 {
1090
- boneIndex = 0;
1091
1121
  constructor(frameCount, bezierCount, boneIndex) {
1092
1122
  super(frameCount, bezierCount, Property.y + '|' + boneIndex);
1123
+ this.boneIndex = 0;
1093
1124
  this.boneIndex = boneIndex;
1094
1125
  }
1095
1126
  apply(skeleton, lastTime, time, events, alpha, blend, direction) {
@@ -1098,9 +1129,9 @@ var TranslateYTimeline = class extends CurveTimeline1 {
1098
1129
  }
1099
1130
  };
1100
1131
  var ScaleTimeline = class extends CurveTimeline2 {
1101
- boneIndex = 0;
1102
1132
  constructor(frameCount, bezierCount, boneIndex) {
1103
1133
  super(frameCount, bezierCount, Property.scaleX + '|' + boneIndex, Property.scaleY + '|' + boneIndex);
1134
+ this.boneIndex = 0;
1104
1135
  this.boneIndex = boneIndex;
1105
1136
  }
1106
1137
  apply(skeleton, lastTime, time, events, alpha, blend, direction) {
@@ -1250,9 +1281,9 @@ var ScaleTimeline = class extends CurveTimeline2 {
1250
1281
  }
1251
1282
  };
1252
1283
  var ScaleXTimeline = class extends CurveTimeline1 {
1253
- boneIndex = 0;
1254
1284
  constructor(frameCount, bezierCount, boneIndex) {
1255
1285
  super(frameCount, bezierCount, Property.scaleX + '|' + boneIndex);
1286
+ this.boneIndex = 0;
1256
1287
  this.boneIndex = boneIndex;
1257
1288
  }
1258
1289
  apply(skeleton, lastTime, time, events, alpha, blend, direction) {
@@ -1261,9 +1292,9 @@ var ScaleXTimeline = class extends CurveTimeline1 {
1261
1292
  }
1262
1293
  };
1263
1294
  var ScaleYTimeline = class extends CurveTimeline1 {
1264
- boneIndex = 0;
1265
1295
  constructor(frameCount, bezierCount, boneIndex) {
1266
1296
  super(frameCount, bezierCount, Property.scaleY + '|' + boneIndex);
1297
+ this.boneIndex = 0;
1267
1298
  this.boneIndex = boneIndex;
1268
1299
  }
1269
1300
  apply(skeleton, lastTime, time, events, alpha, blend, direction) {
@@ -1272,9 +1303,9 @@ var ScaleYTimeline = class extends CurveTimeline1 {
1272
1303
  }
1273
1304
  };
1274
1305
  var ShearTimeline = class extends CurveTimeline2 {
1275
- boneIndex = 0;
1276
1306
  constructor(frameCount, bezierCount, boneIndex) {
1277
1307
  super(frameCount, bezierCount, Property.shearX + '|' + boneIndex, Property.shearY + '|' + boneIndex);
1308
+ this.boneIndex = 0;
1278
1309
  this.boneIndex = boneIndex;
1279
1310
  }
1280
1311
  apply(skeleton, lastTime, time, events, alpha, blend, direction) {
@@ -1386,9 +1417,9 @@ var ShearTimeline = class extends CurveTimeline2 {
1386
1417
  }
1387
1418
  };
1388
1419
  var ShearXTimeline = class extends CurveTimeline1 {
1389
- boneIndex = 0;
1390
1420
  constructor(frameCount, bezierCount, boneIndex) {
1391
1421
  super(frameCount, bezierCount, Property.shearX + '|' + boneIndex);
1422
+ this.boneIndex = 0;
1392
1423
  this.boneIndex = boneIndex;
1393
1424
  }
1394
1425
  apply(skeleton, lastTime, time, events, alpha, blend, direction) {
@@ -1397,9 +1428,9 @@ var ShearXTimeline = class extends CurveTimeline1 {
1397
1428
  }
1398
1429
  };
1399
1430
  var ShearYTimeline = class extends CurveTimeline1 {
1400
- boneIndex = 0;
1401
1431
  constructor(frameCount, bezierCount, boneIndex) {
1402
1432
  super(frameCount, bezierCount, Property.shearY + '|' + boneIndex);
1433
+ this.boneIndex = 0;
1403
1434
  this.boneIndex = boneIndex;
1404
1435
  }
1405
1436
  apply(skeleton, lastTime, time, events, alpha, blend, direction) {
@@ -1408,9 +1439,9 @@ var ShearYTimeline = class extends CurveTimeline1 {
1408
1439
  }
1409
1440
  };
1410
1441
  var InheritTimeline = class extends Timeline {
1411
- boneIndex = 0;
1412
1442
  constructor(frameCount, boneIndex) {
1413
1443
  super(frameCount, [Property.inherit + '|' + boneIndex]);
1444
+ this.boneIndex = 0;
1414
1445
  this.boneIndex = boneIndex;
1415
1446
  }
1416
1447
  getFrameEntries() {
@@ -1452,9 +1483,9 @@ var InheritTimeline = class extends Timeline {
1452
1483
  }
1453
1484
  };
1454
1485
  var RGBATimeline = class extends CurveTimeline {
1455
- slotIndex = 0;
1456
1486
  constructor(frameCount, bezierCount, slotIndex) {
1457
1487
  super(frameCount, bezierCount, [Property.rgb + '|' + slotIndex, Property.alpha + '|' + slotIndex]);
1488
+ this.slotIndex = 0;
1458
1489
  this.slotIndex = slotIndex;
1459
1490
  }
1460
1491
  getFrameEntries() {
@@ -1636,9 +1667,9 @@ var RGBATimeline = class extends CurveTimeline {
1636
1667
  }
1637
1668
  };
1638
1669
  var RGBTimeline = class extends CurveTimeline {
1639
- slotIndex = 0;
1640
1670
  constructor(frameCount, bezierCount, slotIndex) {
1641
1671
  super(frameCount, bezierCount, [Property.rgb + '|' + slotIndex]);
1672
+ this.slotIndex = 0;
1642
1673
  this.slotIndex = slotIndex;
1643
1674
  }
1644
1675
  getFrameEntries() {
@@ -1796,9 +1827,9 @@ var RGBTimeline = class extends CurveTimeline {
1796
1827
  }
1797
1828
  };
1798
1829
  var AlphaTimeline = class extends CurveTimeline1 {
1799
- slotIndex = 0;
1800
1830
  constructor(frameCount, bezierCount, slotIndex) {
1801
1831
  super(frameCount, bezierCount, Property.alpha + '|' + slotIndex);
1832
+ this.slotIndex = 0;
1802
1833
  this.slotIndex = slotIndex;
1803
1834
  }
1804
1835
  apply(skeleton, lastTime, time, events, alpha, blend, direction) {
@@ -1825,13 +1856,13 @@ var AlphaTimeline = class extends CurveTimeline1 {
1825
1856
  }
1826
1857
  };
1827
1858
  var RGBA2Timeline = class extends CurveTimeline {
1828
- slotIndex = 0;
1829
1859
  constructor(frameCount, bezierCount, slotIndex) {
1830
1860
  super(frameCount, bezierCount, [
1831
1861
  Property.rgb + '|' + slotIndex,
1832
1862
  Property.alpha + '|' + slotIndex,
1833
1863
  Property.rgb2 + '|' + slotIndex,
1834
1864
  ]);
1865
+ this.slotIndex = 0;
1835
1866
  this.slotIndex = slotIndex;
1836
1867
  }
1837
1868
  getFrameEntries() {
@@ -2117,9 +2148,9 @@ var RGBA2Timeline = class extends CurveTimeline {
2117
2148
  }
2118
2149
  };
2119
2150
  var RGB2Timeline = class extends CurveTimeline {
2120
- slotIndex = 0;
2121
2151
  constructor(frameCount, bezierCount, slotIndex) {
2122
2152
  super(frameCount, bezierCount, [Property.rgb + '|' + slotIndex, Property.rgb2 + '|' + slotIndex]);
2153
+ this.slotIndex = 0;
2123
2154
  this.slotIndex = slotIndex;
2124
2155
  }
2125
2156
  getFrameEntries() {
@@ -2386,11 +2417,9 @@ var RGB2Timeline = class extends CurveTimeline {
2386
2417
  }
2387
2418
  };
2388
2419
  var AttachmentTimeline = class extends Timeline {
2389
- slotIndex = 0;
2390
- /** The attachment name for each key frame. May contain null values to clear the attachment. */
2391
- attachmentNames;
2392
2420
  constructor(frameCount, slotIndex) {
2393
2421
  super(frameCount, [Property.attachment + '|' + slotIndex]);
2422
+ this.slotIndex = 0;
2394
2423
  this.slotIndex = slotIndex;
2395
2424
  this.attachmentNames = new Array(frameCount);
2396
2425
  }
@@ -2421,13 +2450,9 @@ var AttachmentTimeline = class extends Timeline {
2421
2450
  }
2422
2451
  };
2423
2452
  var DeformTimeline = class extends CurveTimeline {
2424
- slotIndex = 0;
2425
- /** The attachment that will be deformed. */
2426
- attachment;
2427
- /** The vertices for each key frame. */
2428
- vertices;
2429
2453
  constructor(frameCount, bezierCount, slotIndex, attachment) {
2430
2454
  super(frameCount, bezierCount, [Property.deform + '|' + slotIndex + '|' + attachment.id]);
2455
+ this.slotIndex = 0;
2431
2456
  this.slotIndex = slotIndex;
2432
2457
  this.attachment = attachment;
2433
2458
  this.vertices = new Array(frameCount);
@@ -2642,8 +2667,6 @@ var DeformTimeline = class extends CurveTimeline {
2642
2667
  }
2643
2668
  };
2644
2669
  var _EventTimeline = class extends Timeline {
2645
- /** The event for each key frame. */
2646
- events;
2647
2670
  constructor(frameCount) {
2648
2671
  super(frameCount, _EventTimeline.propertyIds);
2649
2672
  this.events = new Array(frameCount);
@@ -2680,10 +2703,8 @@ var _EventTimeline = class extends Timeline {
2680
2703
  }
2681
2704
  };
2682
2705
  var EventTimeline = _EventTimeline;
2683
- __publicField(EventTimeline, 'propertyIds', ['' + Property.event]);
2706
+ EventTimeline.propertyIds = ['' + Property.event];
2684
2707
  var _DrawOrderTimeline = class extends Timeline {
2685
- /** The draw order for each key frame. See {@link #setFrame(int, float, int[])}. */
2686
- drawOrders;
2687
2708
  constructor(frameCount) {
2688
2709
  super(frameCount, _DrawOrderTimeline.propertyIds);
2689
2710
  this.drawOrders = new Array(frameCount);
@@ -2719,12 +2740,12 @@ var _DrawOrderTimeline = class extends Timeline {
2719
2740
  }
2720
2741
  };
2721
2742
  var DrawOrderTimeline = _DrawOrderTimeline;
2722
- __publicField(DrawOrderTimeline, 'propertyIds', ['' + Property.drawOrder]);
2743
+ DrawOrderTimeline.propertyIds = ['' + Property.drawOrder];
2723
2744
  var IkConstraintTimeline = class extends CurveTimeline {
2724
- /** The index of the IK constraint in {@link Skeleton#getIkConstraints()} that will be changed when this timeline is applied */
2725
- constraintIndex = 0;
2726
2745
  constructor(frameCount, bezierCount, ikConstraintIndex) {
2727
2746
  super(frameCount, bezierCount, [Property.ikConstraint + '|' + ikConstraintIndex]);
2747
+ /** The index of the IK constraint in {@link Skeleton#getIkConstraints()} that will be changed when this timeline is applied */
2748
+ this.constraintIndex = 0;
2728
2749
  this.constraintIndex = ikConstraintIndex;
2729
2750
  }
2730
2751
  getFrameEntries() {
@@ -2901,10 +2922,10 @@ var IkConstraintTimeline = class extends CurveTimeline {
2901
2922
  }
2902
2923
  };
2903
2924
  var TransformConstraintTimeline = class extends CurveTimeline {
2904
- /** The index of the transform constraint slot in {@link Skeleton#transformConstraints} that will be changed. */
2905
- constraintIndex = 0;
2906
2925
  constructor(frameCount, bezierCount, transformConstraintIndex) {
2907
2926
  super(frameCount, bezierCount, [Property.transformConstraint + '|' + transformConstraintIndex]);
2927
+ /** The index of the transform constraint slot in {@link Skeleton#transformConstraints} that will be changed. */
2928
+ this.constraintIndex = 0;
2908
2929
  this.constraintIndex = transformConstraintIndex;
2909
2930
  }
2910
2931
  getFrameEntries() {
@@ -3155,11 +3176,11 @@ var TransformConstraintTimeline = class extends CurveTimeline {
3155
3176
  }
3156
3177
  };
3157
3178
  var PathConstraintPositionTimeline = class extends CurveTimeline1 {
3158
- /** The index of the path constraint in {@link Skeleton#getPathConstraints()} that will be changed when this timeline is
3159
- * applied. */
3160
- constraintIndex = 0;
3161
3179
  constructor(frameCount, bezierCount, pathConstraintIndex) {
3162
3180
  super(frameCount, bezierCount, Property.pathConstraintPosition + '|' + pathConstraintIndex);
3181
+ /** The index of the path constraint in {@link Skeleton#getPathConstraints()} that will be changed when this timeline is
3182
+ * applied. */
3183
+ this.constraintIndex = 0;
3163
3184
  this.constraintIndex = pathConstraintIndex;
3164
3185
  }
3165
3186
  apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {
@@ -3169,11 +3190,11 @@ var PathConstraintPositionTimeline = class extends CurveTimeline1 {
3169
3190
  }
3170
3191
  };
3171
3192
  var PathConstraintSpacingTimeline = class extends CurveTimeline1 {
3172
- /** The index of the path constraint in {@link Skeleton#getPathConstraints()} that will be changed when this timeline is
3173
- * applied. */
3174
- constraintIndex = 0;
3175
3193
  constructor(frameCount, bezierCount, pathConstraintIndex) {
3176
3194
  super(frameCount, bezierCount, Property.pathConstraintSpacing + '|' + pathConstraintIndex);
3195
+ /** The index of the path constraint in {@link Skeleton#getPathConstraints()} that will be changed when this timeline is
3196
+ * applied. */
3197
+ this.constraintIndex = 0;
3177
3198
  this.constraintIndex = pathConstraintIndex;
3178
3199
  }
3179
3200
  apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {
@@ -3183,11 +3204,11 @@ var PathConstraintSpacingTimeline = class extends CurveTimeline1 {
3183
3204
  }
3184
3205
  };
3185
3206
  var PathConstraintMixTimeline = class extends CurveTimeline {
3186
- /** The index of the path constraint in {@link Skeleton#getPathConstraints()} that will be changed when this timeline is
3187
- * applied. */
3188
- constraintIndex = 0;
3189
3207
  constructor(frameCount, bezierCount, pathConstraintIndex) {
3190
3208
  super(frameCount, bezierCount, [Property.pathConstraintMix + '|' + pathConstraintIndex]);
3209
+ /** The index of the path constraint in {@link Skeleton#getPathConstraints()} that will be changed when this timeline is
3210
+ * applied. */
3211
+ this.constraintIndex = 0;
3191
3212
  this.constraintIndex = pathConstraintIndex;
3192
3213
  }
3193
3214
  getFrameEntries() {
@@ -3336,12 +3357,12 @@ var PathConstraintMixTimeline = class extends CurveTimeline {
3336
3357
  }
3337
3358
  };
3338
3359
  var PhysicsConstraintTimeline = class extends CurveTimeline1 {
3339
- /** The index of the physics constraint in {@link Skeleton#getPhysicsConstraints()} that will be changed when this timeline
3340
- * is applied, or -1 if all physics constraints in the skeleton will be changed. */
3341
- constraintIndex = 0;
3342
3360
  /** @param physicsConstraintIndex -1 for all physics constraints in the skeleton. */
3343
3361
  constructor(frameCount, bezierCount, physicsConstraintIndex, property) {
3344
3362
  super(frameCount, bezierCount, property + '|' + physicsConstraintIndex);
3363
+ /** The index of the physics constraint in {@link Skeleton#getPhysicsConstraints()} that will be changed when this timeline
3364
+ * is applied, or -1 if all physics constraints in the skeleton will be changed. */
3365
+ this.constraintIndex = 0;
3345
3366
  this.constraintIndex = physicsConstraintIndex;
3346
3367
  }
3347
3368
  apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {
@@ -3482,9 +3503,6 @@ var PhysicsConstraintMixTimeline = class extends PhysicsConstraintTimeline {
3482
3503
  }
3483
3504
  };
3484
3505
  var _PhysicsConstraintResetTimeline = class extends Timeline {
3485
- /** The index of the physics constraint in {@link Skeleton#getPhysicsConstraints()} that will be reset when this timeline is
3486
- * applied, or -1 if all physics constraints in the skeleton will be reset. */
3487
- constraintIndex;
3488
3506
  /** @param physicsConstraintIndex -1 for all physics constraints in the skeleton. */
3489
3507
  constructor(frameCount, physicsConstraintIndex) {
3490
3508
  super(frameCount, _PhysicsConstraintResetTimeline.propertyIds);
@@ -3522,10 +3540,8 @@ var _PhysicsConstraintResetTimeline = class extends Timeline {
3522
3540
  }
3523
3541
  };
3524
3542
  var PhysicsConstraintResetTimeline = _PhysicsConstraintResetTimeline;
3525
- __publicField(PhysicsConstraintResetTimeline, 'propertyIds', [Property.physicsConstraintReset.toString()]);
3543
+ PhysicsConstraintResetTimeline.propertyIds = [Property.physicsConstraintReset.toString()];
3526
3544
  var _SequenceTimeline = class extends Timeline {
3527
- slotIndex;
3528
- attachment;
3529
3545
  constructor(frameCount, slotIndex, attachment) {
3530
3546
  super(frameCount, [Property.sequence + '|' + slotIndex + '|' + attachment.sequence.id]);
3531
3547
  this.slotIndex = slotIndex;
@@ -3607,34 +3623,32 @@ var _SequenceTimeline = class extends Timeline {
3607
3623
  }
3608
3624
  };
3609
3625
  var SequenceTimeline = _SequenceTimeline;
3610
- __publicField(SequenceTimeline, 'ENTRIES', 3);
3611
- __publicField(SequenceTimeline, 'MODE', 1);
3612
- __publicField(SequenceTimeline, 'DELAY', 2);
3626
+ SequenceTimeline.ENTRIES = 3;
3627
+ SequenceTimeline.MODE = 1;
3628
+ SequenceTimeline.DELAY = 2;
3613
3629
 
3614
3630
  // spine-core/src/AnimationState.ts
3615
3631
  var _AnimationState = class {
3616
- static emptyAnimation() {
3617
- return _AnimationState._emptyAnimation;
3618
- }
3619
- /** The AnimationStateData to look up mix durations. */
3620
- data;
3621
- /** The list of tracks that currently have animations, which may contain null entries. */
3622
- tracks = new Array();
3623
- /** Multiplier for the delta time when the animation state is updated, causing time for all animations and mixes to play slower
3624
- * or faster. Defaults to 1.
3625
- *
3626
- * See TrackEntry {@link TrackEntry#timeScale} for affecting a single animation. */
3627
- timeScale = 1;
3628
- unkeyedState = 0;
3629
- events = new Array();
3630
- listeners = new Array();
3631
- queue = new EventQueue(this);
3632
- propertyIDs = new StringSet();
3633
- animationsChanged = false;
3634
- trackEntryPool = new Pool(() => new TrackEntry());
3635
3632
  constructor(data) {
3633
+ /** The list of tracks that currently have animations, which may contain null entries. */
3634
+ this.tracks = new Array();
3635
+ /** Multiplier for the delta time when the animation state is updated, causing time for all animations and mixes to play slower
3636
+ * or faster. Defaults to 1.
3637
+ *
3638
+ * See TrackEntry {@link TrackEntry#timeScale} for affecting a single animation. */
3639
+ this.timeScale = 1;
3640
+ this.unkeyedState = 0;
3641
+ this.events = new Array();
3642
+ this.listeners = new Array();
3643
+ this.queue = new EventQueue(this);
3644
+ this.propertyIDs = new StringSet();
3645
+ this.animationsChanged = false;
3646
+ this.trackEntryPool = new Pool(() => new TrackEntry());
3636
3647
  this.data = data;
3637
3648
  }
3649
+ static emptyAnimation() {
3650
+ return _AnimationState._emptyAnimation;
3651
+ }
3638
3652
  /** Increments each track entry {@link TrackEntry#trackTime()}, setting queued animations as current if needed. */
3639
3653
  update(delta) {
3640
3654
  delta *= this.timeScale;
@@ -3691,14 +3705,17 @@ var _AnimationState = class {
3691
3705
  let finished = this.updateMixingFrom(from, delta);
3692
3706
  from.animationLast = from.nextAnimationLast;
3693
3707
  from.trackLast = from.nextTrackLast;
3694
- if (to.mixTime > 0 && to.mixTime >= to.mixDuration) {
3695
- if (from.totalAlpha == 0 || to.mixDuration == 0) {
3696
- to.mixingFrom = from.mixingFrom;
3697
- if (from.mixingFrom) from.mixingFrom.mixingTo = to;
3698
- to.interruptAlpha = from.interruptAlpha;
3699
- this.queue.end(from);
3708
+ if (to.nextTrackLast != -1) {
3709
+ const discard = to.mixTime == 0 && from.mixTime == 0;
3710
+ if (to.mixTime >= to.mixDuration || discard) {
3711
+ if (from.totalAlpha == 0 || to.mixDuration == 0 || discard) {
3712
+ to.mixingFrom = from.mixingFrom;
3713
+ if (from.mixingFrom != null) from.mixingFrom.mixingTo = to;
3714
+ to.interruptAlpha = from.interruptAlpha;
3715
+ this.queue.end(from);
3716
+ }
3717
+ return finished;
3700
3718
  }
3701
- return finished;
3702
3719
  }
3703
3720
  from.trackTime += delta * from.timeScale;
3704
3721
  to.mixTime += delta;
@@ -4282,132 +4299,144 @@ var _AnimationState = class {
4282
4299
  }
4283
4300
  };
4284
4301
  var AnimationState = _AnimationState;
4285
- __publicField(AnimationState, '_emptyAnimation', new Animation('<empty>', [], 0));
4302
+ AnimationState._emptyAnimation = new Animation('<empty>', [], 0);
4286
4303
  var TrackEntry = class {
4287
- /** The animation to apply for this track entry. */
4288
- animation = null;
4289
- previous = null;
4290
- /** The animation queued to start after this animation, or null. `next` makes up a linked list. */
4291
- next = null;
4292
- /** The track entry for the previous animation when mixing from the previous animation to this animation, or null if no
4293
- * mixing is currently occuring. When mixing from multiple animations, `mixingFrom` makes up a linked list. */
4294
- mixingFrom = null;
4295
- /** The track entry for the next animation when mixing from this animation to the next animation, or null if no mixing is
4296
- * currently occuring. When mixing to multiple animations, `mixingTo` makes up a linked list. */
4297
- mixingTo = null;
4298
- /** The listener for events generated by this track entry, or null.
4299
- *
4300
- * A track entry returned from {@link AnimationState#setAnimation()} is already the current animation
4301
- * for the track, so the track entry listener {@link AnimationStateListener#start()} will not be called. */
4302
- listener = null;
4303
- /** The index of the track where this track entry is either current or queued.
4304
- *
4305
- * See {@link AnimationState#getCurrent()}. */
4306
- trackIndex = 0;
4307
- /** If true, the animation will repeat. If false it will not, instead its last frame is applied if played beyond its
4308
- * duration. */
4309
- loop = false;
4310
- /** If true, when mixing from the previous animation to this animation, the previous animation is applied as normal instead
4311
- * of being mixed out.
4312
- *
4313
- * When mixing between animations that key the same property, if a lower track also keys that property then the value will
4314
- * briefly dip toward the lower track value during the mix. This happens because the first animation mixes from 100% to 0%
4315
- * while the second animation mixes from 0% to 100%. Setting `holdPrevious` to true applies the first animation
4316
- * at 100% during the mix so the lower track value is overwritten. Such dipping does not occur on the lowest track which
4317
- * keys the property, only when a higher track also keys the property.
4318
- *
4319
- * Snapping will occur if `holdPrevious` is true and this animation does not key all the same properties as the
4320
- * previous animation. */
4321
- holdPrevious = false;
4322
- reverse = false;
4323
- shortestRotation = false;
4324
- /** When the mix percentage ({@link #mixTime} / {@link #mixDuration}) is less than the
4325
- * `eventThreshold`, event timelines are applied while this animation is being mixed out. Defaults to 0, so event
4326
- * timelines are not applied while this animation is being mixed out. */
4327
- eventThreshold = 0;
4328
- /** When the mix percentage ({@link #mixtime} / {@link #mixDuration}) is less than the
4329
- * `attachmentThreshold`, attachment timelines are applied while this animation is being mixed out. Defaults to
4330
- * 0, so attachment timelines are not applied while this animation is being mixed out. */
4331
- mixAttachmentThreshold = 0;
4332
- /** When {@link #getAlpha()} is greater than <code>alphaAttachmentThreshold</code>, attachment timelines are applied.
4333
- * Defaults to 0, so attachment timelines are always applied. */
4334
- alphaAttachmentThreshold = 0;
4335
- /** When the mix percentage ({@link #getMixTime()} / {@link #getMixDuration()}) is less than the
4336
- * <code>mixDrawOrderThreshold</code>, draw order timelines are applied while this animation is being mixed out. Defaults to
4337
- * 0, so draw order timelines are not applied while this animation is being mixed out. */
4338
- mixDrawOrderThreshold = 0;
4339
- /** Seconds when this animation starts, both initially and after looping. Defaults to 0.
4340
- *
4341
- * When changing the `animationStart` time, it often makes sense to set {@link #animationLast} to the same
4342
- * value to prevent timeline keys before the start time from triggering. */
4343
- animationStart = 0;
4344
- /** Seconds for the last frame of this animation. Non-looping animations won't play past this time. Looping animations will
4345
- * loop back to {@link #animationStart} at this time. Defaults to the animation {@link Animation#duration}. */
4346
- animationEnd = 0;
4347
- /** The time in seconds this animation was last applied. Some timelines use this for one-time triggers. Eg, when this
4348
- * animation is applied, event timelines will fire all events between the `animationLast` time (exclusive) and
4349
- * `animationTime` (inclusive). Defaults to -1 to ensure triggers on frame 0 happen the first time this animation
4350
- * is applied. */
4351
- animationLast = 0;
4352
- nextAnimationLast = 0;
4353
- /** Seconds to postpone playing the animation. When this track entry is the current track entry, `delay`
4354
- * postpones incrementing the {@link #trackTime}. When this track entry is queued, `delay` is the time from
4355
- * the start of the previous animation to when this track entry will become the current track entry (ie when the previous
4356
- * track entry {@link TrackEntry#trackTime} >= this track entry's `delay`).
4357
- *
4358
- * {@link #timeScale} affects the delay. */
4359
- delay = 0;
4360
- /** Current time in seconds this track entry has been the current track entry. The track time determines
4361
- * {@link #animationTime}. The track time can be set to start the animation at a time other than 0, without affecting
4362
- * looping. */
4363
- trackTime = 0;
4364
- trackLast = 0;
4365
- nextTrackLast = 0;
4366
- /** The track time in seconds when this animation will be removed from the track. Defaults to the highest possible float
4367
- * value, meaning the animation will be applied until a new animation is set or the track is cleared. If the track end time
4368
- * is reached, no other animations are queued for playback, and mixing from any previous animations is complete, then the
4369
- * properties keyed by the animation are set to the setup pose and the track is cleared.
4370
- *
4371
- * It may be desired to use {@link AnimationState#addEmptyAnimation()} rather than have the animation
4372
- * abruptly cease being applied. */
4373
- trackEnd = 0;
4374
- /** Multiplier for the delta time when this track entry is updated, causing time for this animation to pass slower or
4375
- * faster. Defaults to 1.
4376
- *
4377
- * {@link #mixTime} is not affected by track entry time scale, so {@link #mixDuration} may need to be adjusted to
4378
- * match the animation speed.
4379
- *
4380
- * When using {@link AnimationState#addAnimation()} with a `delay` <= 0, note the
4381
- * {@link #delay} is set using the mix duration from the {@link AnimationStateData}, assuming time scale to be 1. If
4382
- * the time scale is not 1, the delay may need to be adjusted.
4383
- *
4384
- * See AnimationState {@link AnimationState#timeScale} for affecting all animations. */
4385
- timeScale = 0;
4386
- /** Values < 1 mix this animation with the skeleton's current pose (usually the pose resulting from lower tracks). Defaults
4387
- * to 1, which overwrites the skeleton's current pose with this animation.
4388
- *
4389
- * Typically track 0 is used to completely pose the skeleton, then alpha is used on higher tracks. It doesn't make sense to
4390
- * use alpha on track 0 if the skeleton pose is from the last frame render. */
4391
- alpha = 0;
4392
- /** Seconds from 0 to the {@link #getMixDuration()} when mixing from the previous animation to this animation. May be
4393
- * slightly more than `mixDuration` when the mix is complete. */
4394
- mixTime = 0;
4395
- /** Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData
4396
- * {@link AnimationStateData#getMix()} based on the animation before this animation (if any).
4397
- *
4398
- * A mix duration of 0 still mixes out over one frame to provide the track entry being mixed out a chance to revert the
4399
- * properties it was animating.
4400
- *
4401
- * The `mixDuration` can be set manually rather than use the value from
4402
- * {@link AnimationStateData#getMix()}. In that case, the `mixDuration` can be set for a new
4403
- * track entry only before {@link AnimationState#update(float)} is first called.
4404
- *
4405
- * When using {@link AnimationState#addAnimation()} with a `delay` <= 0, note the
4406
- * {@link #delay} is set using the mix duration from the {@link AnimationStateData}, not a mix duration set
4407
- * afterward. */
4408
- _mixDuration = 0;
4409
- interruptAlpha = 0;
4410
- totalAlpha = 0;
4304
+ constructor() {
4305
+ /** The animation to apply for this track entry. */
4306
+ this.animation = null;
4307
+ this.previous = null;
4308
+ /** The animation queued to start after this animation, or null. `next` makes up a linked list. */
4309
+ this.next = null;
4310
+ /** The track entry for the previous animation when mixing from the previous animation to this animation, or null if no
4311
+ * mixing is currently occuring. When mixing from multiple animations, `mixingFrom` makes up a linked list. */
4312
+ this.mixingFrom = null;
4313
+ /** The track entry for the next animation when mixing from this animation to the next animation, or null if no mixing is
4314
+ * currently occuring. When mixing to multiple animations, `mixingTo` makes up a linked list. */
4315
+ this.mixingTo = null;
4316
+ /** The listener for events generated by this track entry, or null.
4317
+ *
4318
+ * A track entry returned from {@link AnimationState#setAnimation()} is already the current animation
4319
+ * for the track, so the track entry listener {@link AnimationStateListener#start()} will not be called. */
4320
+ this.listener = null;
4321
+ /** The index of the track where this track entry is either current or queued.
4322
+ *
4323
+ * See {@link AnimationState#getCurrent()}. */
4324
+ this.trackIndex = 0;
4325
+ /** If true, the animation will repeat. If false it will not, instead its last frame is applied if played beyond its
4326
+ * duration. */
4327
+ this.loop = false;
4328
+ /** If true, when mixing from the previous animation to this animation, the previous animation is applied as normal instead
4329
+ * of being mixed out.
4330
+ *
4331
+ * When mixing between animations that key the same property, if a lower track also keys that property then the value will
4332
+ * briefly dip toward the lower track value during the mix. This happens because the first animation mixes from 100% to 0%
4333
+ * while the second animation mixes from 0% to 100%. Setting `holdPrevious` to true applies the first animation
4334
+ * at 100% during the mix so the lower track value is overwritten. Such dipping does not occur on the lowest track which
4335
+ * keys the property, only when a higher track also keys the property.
4336
+ *
4337
+ * Snapping will occur if `holdPrevious` is true and this animation does not key all the same properties as the
4338
+ * previous animation. */
4339
+ this.holdPrevious = false;
4340
+ this.reverse = false;
4341
+ this.shortestRotation = false;
4342
+ /** When the mix percentage ({@link #mixTime} / {@link #mixDuration}) is less than the
4343
+ * `eventThreshold`, event timelines are applied while this animation is being mixed out. Defaults to 0, so event
4344
+ * timelines are not applied while this animation is being mixed out. */
4345
+ this.eventThreshold = 0;
4346
+ /** When the mix percentage ({@link #mixtime} / {@link #mixDuration}) is less than the
4347
+ * `attachmentThreshold`, attachment timelines are applied while this animation is being mixed out. Defaults to
4348
+ * 0, so attachment timelines are not applied while this animation is being mixed out. */
4349
+ this.mixAttachmentThreshold = 0;
4350
+ /** When {@link #getAlpha()} is greater than <code>alphaAttachmentThreshold</code>, attachment timelines are applied.
4351
+ * Defaults to 0, so attachment timelines are always applied. */
4352
+ this.alphaAttachmentThreshold = 0;
4353
+ /** When the mix percentage ({@link #getMixTime()} / {@link #getMixDuration()}) is less than the
4354
+ * <code>mixDrawOrderThreshold</code>, draw order timelines are applied while this animation is being mixed out. Defaults to
4355
+ * 0, so draw order timelines are not applied while this animation is being mixed out. */
4356
+ this.mixDrawOrderThreshold = 0;
4357
+ /** Seconds when this animation starts, both initially and after looping. Defaults to 0.
4358
+ *
4359
+ * When changing the `animationStart` time, it often makes sense to set {@link #animationLast} to the same
4360
+ * value to prevent timeline keys before the start time from triggering. */
4361
+ this.animationStart = 0;
4362
+ /** Seconds for the last frame of this animation. Non-looping animations won't play past this time. Looping animations will
4363
+ * loop back to {@link #animationStart} at this time. Defaults to the animation {@link Animation#duration}. */
4364
+ this.animationEnd = 0;
4365
+ /** The time in seconds this animation was last applied. Some timelines use this for one-time triggers. Eg, when this
4366
+ * animation is applied, event timelines will fire all events between the `animationLast` time (exclusive) and
4367
+ * `animationTime` (inclusive). Defaults to -1 to ensure triggers on frame 0 happen the first time this animation
4368
+ * is applied. */
4369
+ this.animationLast = 0;
4370
+ this.nextAnimationLast = 0;
4371
+ /** Seconds to postpone playing the animation. When this track entry is the current track entry, `delay`
4372
+ * postpones incrementing the {@link #trackTime}. When this track entry is queued, `delay` is the time from
4373
+ * the start of the previous animation to when this track entry will become the current track entry (ie when the previous
4374
+ * track entry {@link TrackEntry#trackTime} >= this track entry's `delay`).
4375
+ *
4376
+ * {@link #timeScale} affects the delay. */
4377
+ this.delay = 0;
4378
+ /** Current time in seconds this track entry has been the current track entry. The track time determines
4379
+ * {@link #animationTime}. The track time can be set to start the animation at a time other than 0, without affecting
4380
+ * looping. */
4381
+ this.trackTime = 0;
4382
+ this.trackLast = 0;
4383
+ this.nextTrackLast = 0;
4384
+ /** The track time in seconds when this animation will be removed from the track. Defaults to the highest possible float
4385
+ * value, meaning the animation will be applied until a new animation is set or the track is cleared. If the track end time
4386
+ * is reached, no other animations are queued for playback, and mixing from any previous animations is complete, then the
4387
+ * properties keyed by the animation are set to the setup pose and the track is cleared.
4388
+ *
4389
+ * It may be desired to use {@link AnimationState#addEmptyAnimation()} rather than have the animation
4390
+ * abruptly cease being applied. */
4391
+ this.trackEnd = 0;
4392
+ /** Multiplier for the delta time when this track entry is updated, causing time for this animation to pass slower or
4393
+ * faster. Defaults to 1.
4394
+ *
4395
+ * {@link #mixTime} is not affected by track entry time scale, so {@link #mixDuration} may need to be adjusted to
4396
+ * match the animation speed.
4397
+ *
4398
+ * When using {@link AnimationState#addAnimation()} with a `delay` <= 0, note the
4399
+ * {@link #delay} is set using the mix duration from the {@link AnimationStateData}, assuming time scale to be 1. If
4400
+ * the time scale is not 1, the delay may need to be adjusted.
4401
+ *
4402
+ * See AnimationState {@link AnimationState#timeScale} for affecting all animations. */
4403
+ this.timeScale = 0;
4404
+ /** Values < 1 mix this animation with the skeleton's current pose (usually the pose resulting from lower tracks). Defaults
4405
+ * to 1, which overwrites the skeleton's current pose with this animation.
4406
+ *
4407
+ * Typically track 0 is used to completely pose the skeleton, then alpha is used on higher tracks. It doesn't make sense to
4408
+ * use alpha on track 0 if the skeleton pose is from the last frame render. */
4409
+ this.alpha = 0;
4410
+ /** Seconds from 0 to the {@link #getMixDuration()} when mixing from the previous animation to this animation. May be
4411
+ * slightly more than `mixDuration` when the mix is complete. */
4412
+ this.mixTime = 0;
4413
+ /** Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData
4414
+ * {@link AnimationStateData#getMix()} based on the animation before this animation (if any).
4415
+ *
4416
+ * A mix duration of 0 still mixes out over one frame to provide the track entry being mixed out a chance to revert the
4417
+ * properties it was animating.
4418
+ *
4419
+ * The `mixDuration` can be set manually rather than use the value from
4420
+ * {@link AnimationStateData#getMix()}. In that case, the `mixDuration` can be set for a new
4421
+ * track entry only before {@link AnimationState#update(float)} is first called.
4422
+ *
4423
+ * When using {@link AnimationState#addAnimation()} with a `delay` <= 0, note the
4424
+ * {@link #delay} is set using the mix duration from the {@link AnimationStateData}, not a mix duration set
4425
+ * afterward. */
4426
+ this._mixDuration = 0;
4427
+ this.interruptAlpha = 0;
4428
+ this.totalAlpha = 0;
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
+ this.mixBlend = 2 /* replace */;
4436
+ this.timelineMode = new Array();
4437
+ this.timelineHoldMix = new Array();
4438
+ this.timelinesRotation = new Array();
4439
+ }
4411
4440
  get mixDuration() {
4412
4441
  return this._mixDuration;
4413
4442
  }
@@ -4419,16 +4448,6 @@ var TrackEntry = class {
4419
4448
  if (this.previous != null && delay <= 0) delay += this.previous.getTrackComplete() - mixDuration;
4420
4449
  this.delay = delay;
4421
4450
  }
4422
- /** Controls how properties keyed in the animation are mixed with lower tracks. Defaults to {@link MixBlend#replace}, which
4423
- * replaces the values from the lower tracks with the animation values. {@link MixBlend#add} adds the animation values to
4424
- * the values from the lower tracks.
4425
- *
4426
- * The `mixBlend` can be set for a new track entry only before {@link AnimationState#apply()} is first
4427
- * called. */
4428
- mixBlend = 2 /* replace */;
4429
- timelineMode = new Array();
4430
- timelineHoldMix = new Array();
4431
- timelinesRotation = new Array();
4432
4451
  reset() {
4433
4452
  this.next = null;
4434
4453
  this.previous = null;
@@ -4492,10 +4511,9 @@ var TrackEntry = class {
4492
4511
  }
4493
4512
  };
4494
4513
  var EventQueue = class {
4495
- objects = [];
4496
- drainDisabled = false;
4497
- animState;
4498
4514
  constructor(animState) {
4515
+ this.objects = [];
4516
+ this.drainDisabled = false;
4499
4517
  this.animState = animState;
4500
4518
  }
4501
4519
  start(entry) {
@@ -4613,12 +4631,10 @@ var CURRENT = 2;
4613
4631
 
4614
4632
  // spine-core/src/AnimationStateData.ts
4615
4633
  var AnimationStateData = class {
4616
- /** The SkeletonData to look up animations when they are specified by name. */
4617
- skeletonData;
4618
- animationToMixTime = {};
4619
- /** The mix duration to use when no mix duration has been defined between two animations. */
4620
- defaultMix = 0;
4621
4634
  constructor(skeletonData) {
4635
+ this.animationToMixTime = {};
4636
+ /** The mix duration to use when no mix duration has been defined between two animations. */
4637
+ this.defaultMix = 0;
4622
4638
  if (!skeletonData) throw new Error('skeletonData cannot be null.');
4623
4639
  this.skeletonData = skeletonData;
4624
4640
  }
@@ -4652,9 +4668,9 @@ var AnimationStateData = class {
4652
4668
 
4653
4669
  // spine-core/src/attachments/BoundingBoxAttachment.ts
4654
4670
  var BoundingBoxAttachment = class extends VertexAttachment {
4655
- color = new Color(1, 1, 1, 1);
4656
4671
  constructor(name) {
4657
4672
  super(name);
4673
+ this.color = new Color(1, 1, 1, 1);
4658
4674
  }
4659
4675
  copy() {
4660
4676
  let copy = new BoundingBoxAttachment(this.name);
@@ -4666,16 +4682,16 @@ var BoundingBoxAttachment = class extends VertexAttachment {
4666
4682
 
4667
4683
  // spine-core/src/attachments/ClippingAttachment.ts
4668
4684
  var ClippingAttachment = class extends VertexAttachment {
4669
- /** Clipping is performed between the clipping polygon's slot and the end slot. Returns null if clipping is done until the end of
4670
- * the skeleton's rendering. */
4671
- endSlot = null;
4672
- // Nonessential.
4673
- /** The color of the clipping polygon as it was in Spine. Available only when nonessential data was exported. Clipping polygons
4674
- * are not usually rendered at runtime. */
4675
- color = new Color(0.2275, 0.2275, 0.8078, 1);
4676
4685
  // ce3a3aff
4677
4686
  constructor(name) {
4678
4687
  super(name);
4688
+ /** Clipping is performed between the clipping polygon's slot and the end slot. Returns null if clipping is done until the end of
4689
+ * the skeleton's rendering. */
4690
+ this.endSlot = null;
4691
+ // Nonessential.
4692
+ /** The color of the clipping polygon as it was in Spine. Available only when nonessential data was exported. Clipping polygons
4693
+ * are not usually rendered at runtime. */
4694
+ this.color = new Color(0.2275, 0.2275, 0.8078, 1);
4679
4695
  }
4680
4696
  copy() {
4681
4697
  let copy = new ClippingAttachment(this.name);
@@ -4688,7 +4704,6 @@ var ClippingAttachment = class extends VertexAttachment {
4688
4704
 
4689
4705
  // spine-core/src/Texture.ts
4690
4706
  var Texture = class {
4691
- _image;
4692
4707
  constructor(image) {
4693
4708
  this._image = image;
4694
4709
  }
@@ -4713,18 +4728,19 @@ var TextureWrap = /* @__PURE__ */ (TextureWrap2 => {
4713
4728
  return TextureWrap2;
4714
4729
  })(TextureWrap || {});
4715
4730
  var TextureRegion = class {
4716
- texture;
4717
- u = 0;
4718
- v = 0;
4719
- u2 = 0;
4720
- v2 = 0;
4721
- width = 0;
4722
- height = 0;
4723
- degrees = 0;
4724
- offsetX = 0;
4725
- offsetY = 0;
4726
- originalWidth = 0;
4727
- originalHeight = 0;
4731
+ constructor() {
4732
+ this.u = 0;
4733
+ this.v = 0;
4734
+ this.u2 = 0;
4735
+ this.v2 = 0;
4736
+ this.width = 0;
4737
+ this.height = 0;
4738
+ this.degrees = 0;
4739
+ this.offsetX = 0;
4740
+ this.offsetY = 0;
4741
+ this.originalWidth = 0;
4742
+ this.originalHeight = 0;
4743
+ }
4728
4744
  };
4729
4745
  var FakeTexture = class extends Texture {
4730
4746
  setFilters(minFilter, magFilter) {}
@@ -4734,9 +4750,9 @@ var FakeTexture = class extends Texture {
4734
4750
 
4735
4751
  // spine-core/src/TextureAtlas.ts
4736
4752
  var TextureAtlas = class {
4737
- pages = new Array();
4738
- regions = new Array();
4739
4753
  constructor(atlasText) {
4754
+ this.pages = new Array();
4755
+ this.regions = new Array();
4740
4756
  let reader = new TextureAtlasReader(atlasText);
4741
4757
  let entry = new Array(4);
4742
4758
  let pageFields = {};
@@ -4867,15 +4883,15 @@ var TextureAtlas = class {
4867
4883
  for (let page of this.pages) page.setTexture(assetManager.get(pathPrefix + page.name));
4868
4884
  }
4869
4885
  dispose() {
4886
+ var _a;
4870
4887
  for (let i = 0; i < this.pages.length; i++) {
4871
- this.pages[i].texture?.dispose();
4888
+ (_a = this.pages[i].texture) == null ? void 0 : _a.dispose();
4872
4889
  }
4873
4890
  }
4874
4891
  };
4875
4892
  var TextureAtlasReader = class {
4876
- lines;
4877
- index = 0;
4878
4893
  constructor(text) {
4894
+ this.index = 0;
4879
4895
  this.lines = text.split(/\r\n|\r|\n/);
4880
4896
  }
4881
4897
  readLine() {
@@ -4902,17 +4918,16 @@ var TextureAtlasReader = class {
4902
4918
  }
4903
4919
  };
4904
4920
  var TextureAtlasPage = class {
4905
- name;
4906
- minFilter = 9728 /* Nearest */;
4907
- magFilter = 9728 /* Nearest */;
4908
- uWrap = 33071 /* ClampToEdge */;
4909
- vWrap = 33071 /* ClampToEdge */;
4910
- texture = null;
4911
- width = 0;
4912
- height = 0;
4913
- pma = false;
4914
- regions = new Array();
4915
4921
  constructor(name) {
4922
+ this.minFilter = 9728 /* Nearest */;
4923
+ this.magFilter = 9728 /* Nearest */;
4924
+ this.uWrap = 33071 /* ClampToEdge */;
4925
+ this.vWrap = 33071 /* ClampToEdge */;
4926
+ this.texture = null;
4927
+ this.width = 0;
4928
+ this.height = 0;
4929
+ this.pma = false;
4930
+ this.regions = new Array();
4916
4931
  this.name = name;
4917
4932
  }
4918
4933
  setTexture(texture) {
@@ -4923,20 +4938,18 @@ var TextureAtlasPage = class {
4923
4938
  }
4924
4939
  };
4925
4940
  var TextureAtlasRegion = class extends TextureRegion {
4926
- page;
4927
- name;
4928
- x = 0;
4929
- y = 0;
4930
- offsetX = 0;
4931
- offsetY = 0;
4932
- originalWidth = 0;
4933
- originalHeight = 0;
4934
- index = 0;
4935
- degrees = 0;
4936
- names = null;
4937
- values = null;
4938
4941
  constructor(page, name) {
4939
4942
  super();
4943
+ this.x = 0;
4944
+ this.y = 0;
4945
+ this.offsetX = 0;
4946
+ this.offsetY = 0;
4947
+ this.originalWidth = 0;
4948
+ this.originalHeight = 0;
4949
+ this.index = 0;
4950
+ this.degrees = 0;
4951
+ this.names = null;
4952
+ this.values = null;
4940
4953
  this.page = page;
4941
4954
  this.name = name;
4942
4955
  page.regions.push(this);
@@ -4945,33 +4958,31 @@ var TextureAtlasRegion = class extends TextureRegion {
4945
4958
 
4946
4959
  // spine-core/src/attachments/MeshAttachment.ts
4947
4960
  var MeshAttachment = class extends VertexAttachment {
4948
- region = null;
4949
- /** The name of the texture region for this attachment. */
4950
- path;
4951
- /** The UV pair for each vertex, normalized within the texture region. */
4952
- regionUVs = [];
4953
- /** The UV pair for each vertex, normalized within the entire texture.
4954
- *
4955
- * See {@link #updateUVs}. */
4956
- uvs = [];
4957
- /** Triplets of vertex indices which describe the mesh's triangulation. */
4958
- triangles = [];
4959
- /** The color to tint the mesh. */
4960
- color = new Color(1, 1, 1, 1);
4961
- /** The width of the mesh's image. Available only when nonessential data was exported. */
4962
- width = 0;
4963
- /** The height of the mesh's image. Available only when nonessential data was exported. */
4964
- height = 0;
4965
- /** The number of entries at the beginning of {@link #vertices} that make up the mesh hull. */
4966
- hullLength = 0;
4967
- /** Vertex index pairs describing edges for controling triangulation. Mesh triangles will never cross edges. Only available if
4968
- * nonessential data was exported. Triangulation is not performed at runtime. */
4969
- edges = [];
4970
- parentMesh = null;
4971
- sequence = null;
4972
- tempColor = new Color(0, 0, 0, 0);
4973
4961
  constructor(name, path2) {
4974
4962
  super(name);
4963
+ this.region = null;
4964
+ /** The UV pair for each vertex, normalized within the texture region. */
4965
+ this.regionUVs = [];
4966
+ /** The UV pair for each vertex, normalized within the entire texture.
4967
+ *
4968
+ * See {@link #updateUVs}. */
4969
+ this.uvs = [];
4970
+ /** Triplets of vertex indices which describe the mesh's triangulation. */
4971
+ this.triangles = [];
4972
+ /** The color to tint the mesh. */
4973
+ this.color = new Color(1, 1, 1, 1);
4974
+ /** The width of the mesh's image. Available only when nonessential data was exported. */
4975
+ this.width = 0;
4976
+ /** The height of the mesh's image. Available only when nonessential data was exported. */
4977
+ this.height = 0;
4978
+ /** The number of entries at the beginning of {@link #vertices} that make up the mesh hull. */
4979
+ this.hullLength = 0;
4980
+ /** Vertex index pairs describing edges for controling triangulation. Mesh triangles will never cross edges. Only available if
4981
+ * nonessential data was exported. Triangulation is not performed at runtime. */
4982
+ this.edges = [];
4983
+ this.parentMesh = null;
4984
+ this.sequence = null;
4985
+ this.tempColor = new Color(0, 0, 0, 0);
4975
4986
  this.path = path2;
4976
4987
  }
4977
4988
  /** Calculates {@link #uvs} using the {@link #regionUVs} and region. Must be called if the region, the region's properties, or
@@ -5098,18 +5109,18 @@ var MeshAttachment = class extends VertexAttachment {
5098
5109
 
5099
5110
  // spine-core/src/attachments/PathAttachment.ts
5100
5111
  var PathAttachment = class extends VertexAttachment {
5101
- /** The lengths along the path in the setup pose from the start of the path to the end of each Bezier curve. */
5102
- lengths = [];
5103
- /** If true, the start and end knots are connected. */
5104
- closed = false;
5105
- /** If true, additional calculations are performed to make calculating positions along the path more accurate. If false, fewer
5106
- * calculations are performed but calculating positions along the path is less accurate. */
5107
- constantSpeed = false;
5108
- /** The color of the path as it was in Spine. Available only when nonessential data was exported. Paths are not usually
5109
- * rendered at runtime. */
5110
- color = new Color(1, 1, 1, 1);
5111
5112
  constructor(name) {
5112
5113
  super(name);
5114
+ /** The lengths along the path in the setup pose from the start of the path to the end of each Bezier curve. */
5115
+ this.lengths = [];
5116
+ /** If true, the start and end knots are connected. */
5117
+ this.closed = false;
5118
+ /** If true, additional calculations are performed to make calculating positions along the path more accurate. If false, fewer
5119
+ * calculations are performed but calculating positions along the path is less accurate. */
5120
+ this.constantSpeed = false;
5121
+ /** The color of the path as it was in Spine. Available only when nonessential data was exported. Paths are not usually
5122
+ * rendered at runtime. */
5123
+ this.color = new Color(1, 1, 1, 1);
5113
5124
  }
5114
5125
  copy() {
5115
5126
  let copy = new PathAttachment(this.name);
@@ -5125,14 +5136,14 @@ var PathAttachment = class extends VertexAttachment {
5125
5136
 
5126
5137
  // spine-core/src/attachments/PointAttachment.ts
5127
5138
  var PointAttachment = class extends VertexAttachment {
5128
- x = 0;
5129
- y = 0;
5130
- rotation = 0;
5131
- /** The color of the point attachment as it was in Spine. Available only when nonessential data was exported. Point attachments
5132
- * are not usually rendered at runtime. */
5133
- color = new Color(0.38, 0.94, 0, 1);
5134
5139
  constructor(name) {
5135
5140
  super(name);
5141
+ this.x = 0;
5142
+ this.y = 0;
5143
+ this.rotation = 0;
5144
+ /** The color of the point attachment as it was in Spine. Available only when nonessential data was exported. Point attachments
5145
+ * are not usually rendered at runtime. */
5146
+ this.color = new Color(0.38, 0.94, 0, 1);
5136
5147
  }
5137
5148
  computeWorldPosition(bone, point) {
5138
5149
  point.x = this.x * bone.a + this.y * bone.b + bone.worldX;
@@ -5159,34 +5170,32 @@ var PointAttachment = class extends VertexAttachment {
5159
5170
 
5160
5171
  // spine-core/src/attachments/RegionAttachment.ts
5161
5172
  var _RegionAttachment = class extends Attachment {
5162
- /** The local x translation. */
5163
- x = 0;
5164
- /** The local y translation. */
5165
- y = 0;
5166
- /** The local scaleX. */
5167
- scaleX = 1;
5168
- /** The local scaleY. */
5169
- scaleY = 1;
5170
- /** The local rotation. */
5171
- rotation = 0;
5172
- /** The width of the region attachment in Spine. */
5173
- width = 0;
5174
- /** The height of the region attachment in Spine. */
5175
- height = 0;
5176
- /** The color to tint the region attachment. */
5177
- color = new Color(1, 1, 1, 1);
5178
- /** The name of the texture region for this attachment. */
5179
- path;
5180
- region = null;
5181
- sequence = null;
5182
- /** For each of the 4 vertices, a pair of <code>x,y</code> values that is the local position of the vertex.
5183
- *
5184
- * See {@link #updateOffset()}. */
5185
- offset = Utils.newFloatArray(8);
5186
- uvs = Utils.newFloatArray(8);
5187
- tempColor = new Color(1, 1, 1, 1);
5188
5173
  constructor(name, path2) {
5189
5174
  super(name);
5175
+ /** The local x translation. */
5176
+ this.x = 0;
5177
+ /** The local y translation. */
5178
+ this.y = 0;
5179
+ /** The local scaleX. */
5180
+ this.scaleX = 1;
5181
+ /** The local scaleY. */
5182
+ this.scaleY = 1;
5183
+ /** The local rotation. */
5184
+ this.rotation = 0;
5185
+ /** The width of the region attachment in Spine. */
5186
+ this.width = 0;
5187
+ /** The height of the region attachment in Spine. */
5188
+ this.height = 0;
5189
+ /** The color to tint the region attachment. */
5190
+ this.color = new Color(1, 1, 1, 1);
5191
+ this.region = null;
5192
+ this.sequence = null;
5193
+ /** For each of the 4 vertices, a pair of <code>x,y</code> values that is the local position of the vertex.
5194
+ *
5195
+ * See {@link #updateOffset()}. */
5196
+ this.offset = Utils.newFloatArray(8);
5197
+ this.uvs = Utils.newFloatArray(8);
5198
+ this.tempColor = new Color(1, 1, 1, 1);
5190
5199
  this.path = path2;
5191
5200
  }
5192
5201
  /** Calculates the {@link #offset} using the region settings. Must be called after changing region settings. */
@@ -5311,42 +5320,41 @@ var _RegionAttachment = class extends Attachment {
5311
5320
  }
5312
5321
  };
5313
5322
  var RegionAttachment = _RegionAttachment;
5314
- __publicField(RegionAttachment, 'X1', 0);
5315
- __publicField(RegionAttachment, 'Y1', 1);
5316
- __publicField(RegionAttachment, 'C1R', 2);
5317
- __publicField(RegionAttachment, 'C1G', 3);
5318
- __publicField(RegionAttachment, 'C1B', 4);
5319
- __publicField(RegionAttachment, 'C1A', 5);
5320
- __publicField(RegionAttachment, 'U1', 6);
5321
- __publicField(RegionAttachment, 'V1', 7);
5322
- __publicField(RegionAttachment, 'X2', 8);
5323
- __publicField(RegionAttachment, 'Y2', 9);
5324
- __publicField(RegionAttachment, 'C2R', 10);
5325
- __publicField(RegionAttachment, 'C2G', 11);
5326
- __publicField(RegionAttachment, 'C2B', 12);
5327
- __publicField(RegionAttachment, 'C2A', 13);
5328
- __publicField(RegionAttachment, 'U2', 14);
5329
- __publicField(RegionAttachment, 'V2', 15);
5330
- __publicField(RegionAttachment, 'X3', 16);
5331
- __publicField(RegionAttachment, 'Y3', 17);
5332
- __publicField(RegionAttachment, 'C3R', 18);
5333
- __publicField(RegionAttachment, 'C3G', 19);
5334
- __publicField(RegionAttachment, 'C3B', 20);
5335
- __publicField(RegionAttachment, 'C3A', 21);
5336
- __publicField(RegionAttachment, 'U3', 22);
5337
- __publicField(RegionAttachment, 'V3', 23);
5338
- __publicField(RegionAttachment, 'X4', 24);
5339
- __publicField(RegionAttachment, 'Y4', 25);
5340
- __publicField(RegionAttachment, 'C4R', 26);
5341
- __publicField(RegionAttachment, 'C4G', 27);
5342
- __publicField(RegionAttachment, 'C4B', 28);
5343
- __publicField(RegionAttachment, 'C4A', 29);
5344
- __publicField(RegionAttachment, 'U4', 30);
5345
- __publicField(RegionAttachment, 'V4', 31);
5323
+ RegionAttachment.X1 = 0;
5324
+ RegionAttachment.Y1 = 1;
5325
+ RegionAttachment.C1R = 2;
5326
+ RegionAttachment.C1G = 3;
5327
+ RegionAttachment.C1B = 4;
5328
+ RegionAttachment.C1A = 5;
5329
+ RegionAttachment.U1 = 6;
5330
+ RegionAttachment.V1 = 7;
5331
+ RegionAttachment.X2 = 8;
5332
+ RegionAttachment.Y2 = 9;
5333
+ RegionAttachment.C2R = 10;
5334
+ RegionAttachment.C2G = 11;
5335
+ RegionAttachment.C2B = 12;
5336
+ RegionAttachment.C2A = 13;
5337
+ RegionAttachment.U2 = 14;
5338
+ RegionAttachment.V2 = 15;
5339
+ RegionAttachment.X3 = 16;
5340
+ RegionAttachment.Y3 = 17;
5341
+ RegionAttachment.C3R = 18;
5342
+ RegionAttachment.C3G = 19;
5343
+ RegionAttachment.C3B = 20;
5344
+ RegionAttachment.C3A = 21;
5345
+ RegionAttachment.U3 = 22;
5346
+ RegionAttachment.V3 = 23;
5347
+ RegionAttachment.X4 = 24;
5348
+ RegionAttachment.Y4 = 25;
5349
+ RegionAttachment.C4R = 26;
5350
+ RegionAttachment.C4G = 27;
5351
+ RegionAttachment.C4B = 28;
5352
+ RegionAttachment.C4A = 29;
5353
+ RegionAttachment.U4 = 30;
5354
+ RegionAttachment.V4 = 31;
5346
5355
 
5347
5356
  // spine-core/src/AtlasAttachmentLoader.ts
5348
5357
  var AtlasAttachmentLoader = class {
5349
- atlas;
5350
5358
  constructor(atlas) {
5351
5359
  this.atlas = atlas;
5352
5360
  }
@@ -5397,42 +5405,38 @@ var AtlasAttachmentLoader = class {
5397
5405
 
5398
5406
  // spine-core/src/BoneData.ts
5399
5407
  var BoneData = class {
5400
- /** The index of the bone in {@link Skeleton#getBones()}. */
5401
- index = 0;
5402
- /** The name of the bone, which is unique across all bones in the skeleton. */
5403
- name;
5404
- /** @returns May be null. */
5405
- parent = null;
5406
- /** The bone's length. */
5407
- length = 0;
5408
- /** The local x translation. */
5409
- x = 0;
5410
- /** The local y translation. */
5411
- y = 0;
5412
- /** The local rotation in degrees, counter clockwise. */
5413
- rotation = 0;
5414
- /** The local scaleX. */
5415
- scaleX = 1;
5416
- /** The local scaleY. */
5417
- scaleY = 1;
5418
- /** The local shearX. */
5419
- shearX = 0;
5420
- /** The local shearX. */
5421
- shearY = 0;
5422
- /** The transform mode for how parent world transforms affect this bone. */
5423
- inherit = Inherit.Normal;
5424
- /** When true, {@link Skeleton#updateWorldTransform()} only updates this bone if the {@link Skeleton#skin} contains this
5425
- * bone.
5426
- * @see Skin#bones */
5427
- skinRequired = false;
5428
- /** The color of the bone as it was in Spine. Available only when nonessential data was exported. Bones are not usually
5429
- * rendered at runtime. */
5430
- color = new Color();
5431
- /** The bone icon as it was in Spine, or null if nonessential data was not exported. */
5432
- icon;
5433
- /** False if the bone was hidden in Spine and nonessential data was exported. Does not affect runtime rendering. */
5434
- visible = false;
5435
5408
  constructor(index, name, parent) {
5409
+ /** The index of the bone in {@link Skeleton#getBones()}. */
5410
+ this.index = 0;
5411
+ /** @returns May be null. */
5412
+ this.parent = null;
5413
+ /** The bone's length. */
5414
+ this.length = 0;
5415
+ /** The local x translation. */
5416
+ this.x = 0;
5417
+ /** The local y translation. */
5418
+ this.y = 0;
5419
+ /** The local rotation in degrees, counter clockwise. */
5420
+ this.rotation = 0;
5421
+ /** The local scaleX. */
5422
+ this.scaleX = 1;
5423
+ /** The local scaleY. */
5424
+ this.scaleY = 1;
5425
+ /** The local shearX. */
5426
+ this.shearX = 0;
5427
+ /** The local shearX. */
5428
+ this.shearY = 0;
5429
+ /** The transform mode for how parent world transforms affect this bone. */
5430
+ this.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
+ this.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
+ this.color = new Color();
5438
+ /** False if the bone was hidden in Spine and nonessential data was exported. Does not affect runtime rendering. */
5439
+ this.visible = false;
5436
5440
  if (index < 0) throw new Error('index must be >= 0.');
5437
5441
  if (!name) throw new Error('name cannot be null.');
5438
5442
  this.index = index;
@@ -5451,59 +5455,55 @@ var Inherit = /* @__PURE__ */ (Inherit2 => {
5451
5455
 
5452
5456
  // spine-core/src/Bone.ts
5453
5457
  var Bone = class {
5454
- /** The bone's setup pose data. */
5455
- data;
5456
- /** The skeleton this bone belongs to. */
5457
- skeleton;
5458
- /** The parent bone, or null if this is the root bone. */
5459
- parent = null;
5460
- /** The immediate children of this bone. */
5461
- children = new Array();
5462
- /** The local x translation. */
5463
- x = 0;
5464
- /** The local y translation. */
5465
- y = 0;
5466
- /** The local rotation in degrees, counter clockwise. */
5467
- rotation = 0;
5468
- /** The local scaleX. */
5469
- scaleX = 0;
5470
- /** The local scaleY. */
5471
- scaleY = 0;
5472
- /** The local shearX. */
5473
- shearX = 0;
5474
- /** The local shearY. */
5475
- shearY = 0;
5476
- /** The applied local x translation. */
5477
- ax = 0;
5478
- /** The applied local y translation. */
5479
- ay = 0;
5480
- /** The applied local rotation in degrees, counter clockwise. */
5481
- arotation = 0;
5482
- /** The applied local scaleX. */
5483
- ascaleX = 0;
5484
- /** The applied local scaleY. */
5485
- ascaleY = 0;
5486
- /** The applied local shearX. */
5487
- ashearX = 0;
5488
- /** The applied local shearY. */
5489
- ashearY = 0;
5490
- /** Part of the world transform matrix for the X axis. If changed, {@link #updateAppliedTransform()} should be called. */
5491
- a = 0;
5492
- /** Part of the world transform matrix for the Y axis. If changed, {@link #updateAppliedTransform()} should be called. */
5493
- b = 0;
5494
- /** Part of the world transform matrix for the X axis. If changed, {@link #updateAppliedTransform()} should be called. */
5495
- c = 0;
5496
- /** Part of the world transform matrix for the Y axis. If changed, {@link #updateAppliedTransform()} should be called. */
5497
- d = 0;
5498
- /** The world X position. If changed, {@link #updateAppliedTransform()} should be called. */
5499
- worldY = 0;
5500
- /** The world Y position. If changed, {@link #updateAppliedTransform()} should be called. */
5501
- worldX = 0;
5502
- inherit = 0 /* Normal */;
5503
- sorted = false;
5504
- active = false;
5505
5458
  /** @param parent May be null. */
5506
5459
  constructor(data, skeleton, parent) {
5460
+ /** The parent bone, or null if this is the root bone. */
5461
+ this.parent = null;
5462
+ /** The immediate children of this bone. */
5463
+ this.children = new Array();
5464
+ /** The local x translation. */
5465
+ this.x = 0;
5466
+ /** The local y translation. */
5467
+ this.y = 0;
5468
+ /** The local rotation in degrees, counter clockwise. */
5469
+ this.rotation = 0;
5470
+ /** The local scaleX. */
5471
+ this.scaleX = 0;
5472
+ /** The local scaleY. */
5473
+ this.scaleY = 0;
5474
+ /** The local shearX. */
5475
+ this.shearX = 0;
5476
+ /** The local shearY. */
5477
+ this.shearY = 0;
5478
+ /** The applied local x translation. */
5479
+ this.ax = 0;
5480
+ /** The applied local y translation. */
5481
+ this.ay = 0;
5482
+ /** The applied local rotation in degrees, counter clockwise. */
5483
+ this.arotation = 0;
5484
+ /** The applied local scaleX. */
5485
+ this.ascaleX = 0;
5486
+ /** The applied local scaleY. */
5487
+ this.ascaleY = 0;
5488
+ /** The applied local shearX. */
5489
+ this.ashearX = 0;
5490
+ /** The applied local shearY. */
5491
+ this.ashearY = 0;
5492
+ /** Part of the world transform matrix for the X axis. If changed, {@link #updateAppliedTransform()} should be called. */
5493
+ this.a = 0;
5494
+ /** Part of the world transform matrix for the Y axis. If changed, {@link #updateAppliedTransform()} should be called. */
5495
+ this.b = 0;
5496
+ /** Part of the world transform matrix for the X axis. If changed, {@link #updateAppliedTransform()} should be called. */
5497
+ this.c = 0;
5498
+ /** Part of the world transform matrix for the Y axis. If changed, {@link #updateAppliedTransform()} should be called. */
5499
+ this.d = 0;
5500
+ /** The world X position. If changed, {@link #updateAppliedTransform()} should be called. */
5501
+ this.worldY = 0;
5502
+ /** The world Y position. If changed, {@link #updateAppliedTransform()} should be called. */
5503
+ this.worldX = 0;
5504
+ this.inherit = 0 /* Normal */;
5505
+ this.sorted = false;
5506
+ this.active = false;
5507
5507
  if (!data) throw new Error('data cannot be null.');
5508
5508
  if (!skeleton) throw new Error('skeleton cannot be null.');
5509
5509
  this.data = data;
@@ -5850,14 +5850,12 @@ var ConstraintData = class {
5850
5850
 
5851
5851
  // spine-core/src/AssetManagerBase.ts
5852
5852
  var AssetManagerBase = class {
5853
- pathPrefix = '';
5854
- textureLoader;
5855
- downloader;
5856
- assets = {};
5857
- errors = {};
5858
- toLoad = 0;
5859
- loaded = 0;
5860
5853
  constructor(textureLoader, pathPrefix = '', downloader = new Downloader()) {
5854
+ this.pathPrefix = '';
5855
+ this.assets = {};
5856
+ this.errors = {};
5857
+ this.toLoad = 0;
5858
+ this.loaded = 0;
5861
5859
  this.textureLoader = textureLoader;
5862
5860
  this.pathPrefix = pathPrefix;
5863
5861
  this.downloader = downloader;
@@ -5943,7 +5941,12 @@ var AssetManagerBase = class {
5943
5941
  return null;
5944
5942
  })
5945
5943
  .then(blob => {
5946
- return blob ? createImageBitmap(blob, { premultiplyAlpha: 'none', colorSpaceConversion: 'none' }) : null;
5944
+ return blob
5945
+ ? createImageBitmap(blob, {
5946
+ premultiplyAlpha: 'none',
5947
+ colorSpaceConversion: 'none',
5948
+ })
5949
+ : null;
5947
5950
  })
5948
5951
  .then(bitmap => {
5949
5952
  if (bitmap) this.success(success, path2, this.textureLoader(bitmap));
@@ -6040,8 +6043,10 @@ var AssetManagerBase = class {
6040
6043
  }
6041
6044
  };
6042
6045
  var Downloader = class {
6043
- callbacks = {};
6044
- rawDataUris = {};
6046
+ constructor() {
6047
+ this.callbacks = {};
6048
+ this.rawDataUris = {};
6049
+ }
6045
6050
  dataUriToString(dataUri) {
6046
6051
  if (!dataUri.startsWith('data:')) {
6047
6052
  throw new Error('Not a data URI.');
@@ -6145,14 +6150,13 @@ var Downloader = class {
6145
6150
 
6146
6151
  // spine-core/src/Event.ts
6147
6152
  var Event = class {
6148
- data;
6149
- intValue = 0;
6150
- floatValue = 0;
6151
- stringValue = null;
6152
- time = 0;
6153
- volume = 0;
6154
- balance = 0;
6155
6153
  constructor(time, data) {
6154
+ this.intValue = 0;
6155
+ this.floatValue = 0;
6156
+ this.stringValue = null;
6157
+ this.time = 0;
6158
+ this.volume = 0;
6159
+ this.balance = 0;
6156
6160
  if (!data) throw new Error('data cannot be null.');
6157
6161
  this.time = time;
6158
6162
  this.data = data;
@@ -6161,39 +6165,32 @@ var Event = class {
6161
6165
 
6162
6166
  // spine-core/src/EventData.ts
6163
6167
  var EventData = class {
6164
- name;
6165
- intValue = 0;
6166
- floatValue = 0;
6167
- stringValue = null;
6168
- audioPath = null;
6169
- volume = 0;
6170
- balance = 0;
6171
6168
  constructor(name) {
6169
+ this.intValue = 0;
6170
+ this.floatValue = 0;
6171
+ this.stringValue = null;
6172
+ this.audioPath = null;
6173
+ this.volume = 0;
6174
+ this.balance = 0;
6172
6175
  this.name = name;
6173
6176
  }
6174
6177
  };
6175
6178
 
6176
6179
  // spine-core/src/IkConstraint.ts
6177
6180
  var IkConstraint = class {
6178
- /** The IK constraint's setup pose data. */
6179
- data;
6180
- /** The bones that will be modified by this IK constraint. */
6181
- bones;
6182
- /** The bone that is the IK target. */
6183
- target;
6184
- /** Controls the bend direction of the IK bones, either 1 or -1. */
6185
- bendDirection = 0;
6186
- /** When true and only a single bone is being constrained, if the target is too close, the bone is scaled to reach it. */
6187
- compress = false;
6188
- /** 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
6189
- * and the parent bone has local nonuniform scale, stretch is not applied. */
6190
- stretch = false;
6191
- /** A percentage (0-1) that controls the mix between the constrained and unconstrained rotations. */
6192
- mix = 1;
6193
- /** For two bone IK, the distance from the maximum reach of the bones that rotation will slow. */
6194
- softness = 0;
6195
- active = false;
6196
6181
  constructor(data, skeleton) {
6182
+ /** Controls the bend direction of the IK bones, either 1 or -1. */
6183
+ this.bendDirection = 0;
6184
+ /** When true and only a single bone is being constrained, if the target is too close, the bone is scaled to reach it. */
6185
+ this.compress = false;
6186
+ /** 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
6187
+ * and the parent bone has local nonuniform scale, stretch is not applied. */
6188
+ this.stretch = false;
6189
+ /** A percentage (0-1) that controls the mix between the constrained and unconstrained rotations. */
6190
+ this.mix = 1;
6191
+ /** For two bone IK, the distance from the maximum reach of the bones that rotation will slow. */
6192
+ this.softness = 0;
6193
+ this.active = false;
6197
6194
  if (!data) throw new Error('data cannot be null.');
6198
6195
  if (!skeleton) throw new Error('skeleton cannot be null.');
6199
6196
  this.data = data;
@@ -6502,10 +6499,27 @@ var IkConstraint = class {
6502
6499
 
6503
6500
  // spine-core/src/IkConstraintData.ts
6504
6501
  var IkConstraintData = class extends ConstraintData {
6505
- /** The bones that are constrained by this IK constraint. */
6506
- bones = new Array();
6507
- /** The bone that is the IK target. */
6508
- _target = null;
6502
+ constructor(name) {
6503
+ super(name, 0, false);
6504
+ /** The bones that are constrained by this IK constraint. */
6505
+ this.bones = new Array();
6506
+ /** The bone that is the IK target. */
6507
+ this._target = null;
6508
+ /** Controls the bend direction of the IK bones, either 1 or -1. */
6509
+ this.bendDirection = 0;
6510
+ /** When true and only a single bone is being constrained, if the target is too close, the bone is scaled to reach it. */
6511
+ this.compress = false;
6512
+ /** 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
6513
+ * and the parent bone has local nonuniform scale, stretch is not applied. */
6514
+ this.stretch = false;
6515
+ /** When true, only a single bone is being constrained, and {@link #getCompress()} or {@link #getStretch()} is used, the bone
6516
+ * is scaled on both the X and Y axes. */
6517
+ this.uniform = false;
6518
+ /** A percentage (0-1) that controls the mix between the constrained and unconstrained rotations. */
6519
+ this.mix = 0;
6520
+ /** For two bone IK, the distance from the maximum reach of the bones that rotation will slow. */
6521
+ this.softness = 0;
6522
+ }
6509
6523
  set target(boneData) {
6510
6524
  this._target = boneData;
6511
6525
  }
@@ -6513,31 +6527,32 @@ var IkConstraintData = class extends ConstraintData {
6513
6527
  if (!this._target) throw new Error('BoneData not set.');
6514
6528
  else return this._target;
6515
6529
  }
6516
- /** Controls the bend direction of the IK bones, either 1 or -1. */
6517
- bendDirection = 0;
6518
- /** When true and only a single bone is being constrained, if the target is too close, the bone is scaled to reach it. */
6519
- compress = false;
6520
- /** 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
6521
- * and the parent bone has local nonuniform scale, stretch is not applied. */
6522
- stretch = false;
6523
- /** When true, only a single bone is being constrained, and {@link #getCompress()} or {@link #getStretch()} is used, the bone
6524
- * is scaled on both the X and Y axes. */
6525
- uniform = false;
6526
- /** A percentage (0-1) that controls the mix between the constrained and unconstrained rotations. */
6527
- mix = 0;
6528
- /** For two bone IK, the distance from the maximum reach of the bones that rotation will slow. */
6529
- softness = 0;
6530
- constructor(name) {
6531
- super(name, 0, false);
6532
- }
6533
6530
  };
6534
6531
 
6535
6532
  // spine-core/src/PathConstraintData.ts
6536
6533
  var PathConstraintData = class extends ConstraintData {
6537
- /** The bones that will be modified by this path constraint. */
6538
- bones = new Array();
6539
- /** The slot whose path attachment will be used to constrained the bones. */
6540
- _target = null;
6534
+ constructor(name) {
6535
+ super(name, 0, false);
6536
+ /** The bones that will be modified by this path constraint. */
6537
+ this.bones = new Array();
6538
+ /** The slot whose path attachment will be used to constrained the bones. */
6539
+ this._target = null;
6540
+ /** The mode for positioning the first bone on the path. */
6541
+ this.positionMode = PositionMode.Fixed;
6542
+ /** The mode for positioning the bones after the first bone on the path. */
6543
+ this.spacingMode = SpacingMode.Fixed;
6544
+ /** The mode for adjusting the rotation of the bones. */
6545
+ this.rotateMode = RotateMode.Chain;
6546
+ /** An offset added to the constrained bone rotation. */
6547
+ this.offsetRotation = 0;
6548
+ /** The position along the path. */
6549
+ this.position = 0;
6550
+ /** The spacing between bones. */
6551
+ this.spacing = 0;
6552
+ this.mixRotate = 0;
6553
+ this.mixX = 0;
6554
+ this.mixY = 0;
6555
+ }
6541
6556
  set target(slotData) {
6542
6557
  this._target = slotData;
6543
6558
  }
@@ -6545,24 +6560,6 @@ var PathConstraintData = class extends ConstraintData {
6545
6560
  if (!this._target) throw new Error('SlotData not set.');
6546
6561
  else return this._target;
6547
6562
  }
6548
- /** The mode for positioning the first bone on the path. */
6549
- positionMode = PositionMode.Fixed;
6550
- /** The mode for positioning the bones after the first bone on the path. */
6551
- spacingMode = SpacingMode.Fixed;
6552
- /** The mode for adjusting the rotation of the bones. */
6553
- rotateMode = RotateMode.Chain;
6554
- /** An offset added to the constrained bone rotation. */
6555
- offsetRotation = 0;
6556
- /** The position along the path. */
6557
- position = 0;
6558
- /** The spacing between bones. */
6559
- spacing = 0;
6560
- mixRotate = 0;
6561
- mixX = 0;
6562
- mixY = 0;
6563
- constructor(name) {
6564
- super(name, 0, false);
6565
- }
6566
6563
  };
6567
6564
  var PositionMode = /* @__PURE__ */ (PositionMode2 => {
6568
6565
  PositionMode2[(PositionMode2['Fixed'] = 0)] = 'Fixed';
@@ -6585,27 +6582,21 @@ var RotateMode = /* @__PURE__ */ (RotateMode2 => {
6585
6582
 
6586
6583
  // spine-core/src/PathConstraint.ts
6587
6584
  var _PathConstraint = class {
6588
- /** The path constraint's setup pose data. */
6589
- data;
6590
- /** The bones that will be modified by this path constraint. */
6591
- bones;
6592
- /** The slot whose path attachment will be used to constrained the bones. */
6593
- target;
6594
- /** The position along the path. */
6595
- position = 0;
6596
- /** The spacing between bones. */
6597
- spacing = 0;
6598
- mixRotate = 0;
6599
- mixX = 0;
6600
- mixY = 0;
6601
- spaces = new Array();
6602
- positions = new Array();
6603
- world = new Array();
6604
- curves = new Array();
6605
- lengths = new Array();
6606
- segments = new Array();
6607
- active = false;
6608
6585
  constructor(data, skeleton) {
6586
+ /** The position along the path. */
6587
+ this.position = 0;
6588
+ /** The spacing between bones. */
6589
+ this.spacing = 0;
6590
+ this.mixRotate = 0;
6591
+ this.mixX = 0;
6592
+ this.mixY = 0;
6593
+ this.spaces = new Array();
6594
+ this.positions = new Array();
6595
+ this.world = new Array();
6596
+ this.curves = new Array();
6597
+ this.lengths = new Array();
6598
+ this.segments = new Array();
6599
+ this.active = false;
6609
6600
  if (!data) throw new Error('data cannot be null.');
6610
6601
  if (!skeleton) throw new Error('skeleton cannot be null.');
6611
6602
  this.data = data;
@@ -7052,50 +7043,40 @@ var _PathConstraint = class {
7052
7043
  }
7053
7044
  };
7054
7045
  var PathConstraint = _PathConstraint;
7055
- __publicField(PathConstraint, 'NONE', -1);
7056
- __publicField(PathConstraint, 'BEFORE', -2);
7057
- __publicField(PathConstraint, 'AFTER', -3);
7058
- __publicField(PathConstraint, 'epsilon', 1e-5);
7046
+ PathConstraint.NONE = -1;
7047
+ PathConstraint.BEFORE = -2;
7048
+ PathConstraint.AFTER = -3;
7049
+ PathConstraint.epsilon = 1e-5;
7059
7050
 
7060
7051
  // spine-core/src/PhysicsConstraint.ts
7061
7052
  var PhysicsConstraint = class {
7062
- data;
7063
- _bone = null;
7064
- /** The bone constrained by this physics constraint. */
7065
- set bone(bone) {
7066
- this._bone = bone;
7067
- }
7068
- get bone() {
7069
- if (!this._bone) throw new Error('Bone not set.');
7070
- else return this._bone;
7071
- }
7072
- inertia = 0;
7073
- strength = 0;
7074
- damping = 0;
7075
- massInverse = 0;
7076
- wind = 0;
7077
- gravity = 0;
7078
- mix = 0;
7079
- _reset = true;
7080
- ux = 0;
7081
- uy = 0;
7082
- cx = 0;
7083
- cy = 0;
7084
- tx = 0;
7085
- ty = 0;
7086
- xOffset = 0;
7087
- xVelocity = 0;
7088
- yOffset = 0;
7089
- yVelocity = 0;
7090
- rotateOffset = 0;
7091
- rotateVelocity = 0;
7092
- scaleOffset = 0;
7093
- scaleVelocity = 0;
7094
- active = false;
7095
- skeleton;
7096
- remaining = 0;
7097
- lastTime = 0;
7098
7053
  constructor(data, skeleton) {
7054
+ this._bone = null;
7055
+ this.inertia = 0;
7056
+ this.strength = 0;
7057
+ this.damping = 0;
7058
+ this.massInverse = 0;
7059
+ this.wind = 0;
7060
+ this.gravity = 0;
7061
+ this.mix = 0;
7062
+ this._reset = true;
7063
+ this.ux = 0;
7064
+ this.uy = 0;
7065
+ this.cx = 0;
7066
+ this.cy = 0;
7067
+ this.tx = 0;
7068
+ this.ty = 0;
7069
+ this.xOffset = 0;
7070
+ this.xVelocity = 0;
7071
+ this.yOffset = 0;
7072
+ this.yVelocity = 0;
7073
+ this.rotateOffset = 0;
7074
+ this.rotateVelocity = 0;
7075
+ this.scaleOffset = 0;
7076
+ this.scaleVelocity = 0;
7077
+ this.active = false;
7078
+ this.remaining = 0;
7079
+ this.lastTime = 0;
7099
7080
  this.data = data;
7100
7081
  this.skeleton = skeleton;
7101
7082
  this.bone = skeleton.bones[data.bone.index];
@@ -7107,6 +7088,14 @@ var PhysicsConstraint = class {
7107
7088
  this.gravity = data.gravity;
7108
7089
  this.mix = data.mix;
7109
7090
  }
7091
+ /** The bone constrained by this physics constraint. */
7092
+ set bone(bone) {
7093
+ this._bone = bone;
7094
+ }
7095
+ get bone() {
7096
+ if (!this._bone) throw new Error('Bone not set.');
7097
+ else return this._bone;
7098
+ }
7110
7099
  reset() {
7111
7100
  this.remaining = 0;
7112
7101
  this.lastTime = this.skeleton.time;
@@ -7332,27 +7321,20 @@ var PhysicsConstraint = class {
7332
7321
 
7333
7322
  // spine-core/src/Slot.ts
7334
7323
  var Slot = class {
7335
- /** The slot's setup pose data. */
7336
- data;
7337
- /** The bone this slot belongs to. */
7338
- bone;
7339
- /** The color used to tint the slot's attachment. If {@link #getDarkColor()} is set, this is used as the light color for two
7340
- * color tinting. */
7341
- color;
7342
- /** 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
7343
- * color's alpha is not used. */
7344
- darkColor = null;
7345
- attachment = null;
7346
- attachmentState = 0;
7347
- /** The index of the texture region to display when the slot's attachment has a {@link Sequence}. -1 represents the
7348
- * {@link Sequence#getSetupIndex()}. */
7349
- sequenceIndex = -1;
7350
- /** Values to deform the slot's attachment. For an unweighted mesh, the entries are local positions for each vertex. For a
7351
- * weighted mesh, the entries are an offset for each vertex which will be added to the mesh's local vertex positions.
7352
- *
7353
- * See {@link VertexAttachment#computeWorldVertices()} and {@link DeformTimeline}. */
7354
- deform = new Array();
7355
7324
  constructor(data, bone) {
7325
+ /** 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
7326
+ * color's alpha is not used. */
7327
+ this.darkColor = null;
7328
+ this.attachment = null;
7329
+ this.attachmentState = 0;
7330
+ /** The index of the texture region to display when the slot's attachment has a {@link Sequence}. -1 represents the
7331
+ * {@link Sequence#getSetupIndex()}. */
7332
+ this.sequenceIndex = -1;
7333
+ /** Values to deform the slot's attachment. For an unweighted mesh, the entries are local positions for each vertex. For a
7334
+ * weighted mesh, the entries are an offset for each vertex which will be added to the mesh's local vertex positions.
7335
+ *
7336
+ * See {@link VertexAttachment#computeWorldVertices()} and {@link DeformTimeline}. */
7337
+ this.deform = new Array();
7356
7338
  if (!data) throw new Error('data cannot be null.');
7357
7339
  if (!bone) throw new Error('bone cannot be null.');
7358
7340
  this.data = data;
@@ -7398,21 +7380,15 @@ var Slot = class {
7398
7380
 
7399
7381
  // spine-core/src/TransformConstraint.ts
7400
7382
  var TransformConstraint = class {
7401
- /** The transform constraint's setup pose data. */
7402
- data;
7403
- /** The bones that will be modified by this transform constraint. */
7404
- bones;
7405
- /** The target bone whose world transform will be copied to the constrained bones. */
7406
- target;
7407
- mixRotate = 0;
7408
- mixX = 0;
7409
- mixY = 0;
7410
- mixScaleX = 0;
7411
- mixScaleY = 0;
7412
- mixShearY = 0;
7413
- temp = new Vector2();
7414
- active = false;
7415
7383
  constructor(data, skeleton) {
7384
+ this.mixRotate = 0;
7385
+ this.mixX = 0;
7386
+ this.mixY = 0;
7387
+ this.mixScaleX = 0;
7388
+ this.mixScaleY = 0;
7389
+ this.mixShearY = 0;
7390
+ this.temp = new Vector2();
7391
+ this.active = false;
7416
7392
  if (!data) throw new Error('data cannot be null.');
7417
7393
  if (!skeleton) throw new Error('skeleton cannot be null.');
7418
7394
  this.data = data;
@@ -7647,49 +7623,25 @@ var TransformConstraint = class {
7647
7623
 
7648
7624
  // spine-core/src/Skeleton.ts
7649
7625
  var _Skeleton = class {
7650
- /** The skeleton's setup pose data. */
7651
- data;
7652
- /** The skeleton's bones, sorted parent first. The root bone is always the first bone. */
7653
- bones;
7654
- /** The skeleton's slots in the setup pose draw order. */
7655
- slots;
7656
- /** The skeleton's slots in the order they should be drawn. The returned array may be modified to change the draw order. */
7657
- drawOrder;
7658
- /** The skeleton's IK constraints. */
7659
- ikConstraints;
7660
- /** The skeleton's transform constraints. */
7661
- transformConstraints;
7662
- /** The skeleton's path constraints. */
7663
- pathConstraints;
7664
- /** The skeleton's physics constraints. */
7665
- physicsConstraints;
7666
- /** The list of bones and constraints, sorted in the order they should be updated, as computed by {@link #updateCache()}. */
7667
- _updateCache = new Array();
7668
- /** The skeleton's current skin. May be null. */
7669
- skin = null;
7670
- /** The color to tint all the skeleton's attachments. */
7671
- color;
7672
- /** Scales the entire skeleton on the X axis. This affects all bones, even if the bone's transform mode disallows scale
7673
- * inheritance. */
7674
- scaleX = 1;
7675
- /** Scales the entire skeleton on the Y axis. This affects all bones, even if the bone's transform mode disallows scale
7676
- * inheritance. */
7677
- _scaleY = 1;
7678
- get scaleY() {
7679
- return _Skeleton.yDown ? -this._scaleY : this._scaleY;
7680
- }
7681
- set scaleY(scaleY) {
7682
- this._scaleY = scaleY;
7683
- }
7684
- /** Sets the skeleton X position, which is added to the root bone worldX position. */
7685
- x = 0;
7686
- /** Sets the skeleton Y position, which is added to the root bone worldY position. */
7687
- y = 0;
7688
- /** Returns the skeleton's time. This is used for time-based manipulations, such as {@link PhysicsConstraint}.
7689
- * <p>
7690
- * See {@link #update(float)}. */
7691
- time = 0;
7692
7626
  constructor(data) {
7627
+ /** The list of bones and constraints, sorted in the order they should be updated, as computed by {@link #updateCache()}. */
7628
+ this._updateCache = new Array();
7629
+ /** The skeleton's current skin. May be null. */
7630
+ this.skin = null;
7631
+ /** Scales the entire skeleton on the X axis. This affects all bones, even if the bone's transform mode disallows scale
7632
+ * inheritance. */
7633
+ this.scaleX = 1;
7634
+ /** Scales the entire skeleton on the Y axis. This affects all bones, even if the bone's transform mode disallows scale
7635
+ * inheritance. */
7636
+ this._scaleY = 1;
7637
+ /** Sets the skeleton X position, which is added to the root bone worldX position. */
7638
+ this.x = 0;
7639
+ /** Sets the skeleton Y position, which is added to the root bone worldY position. */
7640
+ this.y = 0;
7641
+ /** Returns the skeleton's time. This is used for time-based manipulations, such as {@link PhysicsConstraint}.
7642
+ * <p>
7643
+ * See {@link #update(float)}. */
7644
+ this.time = 0;
7693
7645
  if (!data) throw new Error('data cannot be null.');
7694
7646
  this.data = data;
7695
7647
  this.bones = new Array();
@@ -7736,6 +7688,12 @@ var _Skeleton = class {
7736
7688
  this.color = new Color(1, 1, 1, 1);
7737
7689
  this.updateCache();
7738
7690
  }
7691
+ get scaleY() {
7692
+ return _Skeleton.yDown ? -this._scaleY : this._scaleY;
7693
+ }
7694
+ set scaleY(scaleY) {
7695
+ this._scaleY = scaleY;
7696
+ }
7739
7697
  /** Caches information about bones and constraints. Must be called if the {@link #getSkin()} is modified or if bones,
7740
7698
  * constraints, or weighted path attachments are added or removed. */
7741
7699
  updateCache() {
@@ -8101,28 +8059,36 @@ var _Skeleton = class {
8101
8059
  * than to call it repeatedly.
8102
8060
  * @return May be null. */
8103
8061
  findIkConstraint(constraintName) {
8062
+ var _a;
8104
8063
  if (!constraintName) throw new Error('constraintName cannot be null.');
8105
- return this.ikConstraints.find(constraint => constraint.data.name == constraintName) ?? null;
8064
+ return (_a = this.ikConstraints.find(constraint => constraint.data.name == constraintName)) != null ? _a : null;
8106
8065
  }
8107
8066
  /** Finds a transform constraint by comparing each transform constraint's name. It is more efficient to cache the results of
8108
8067
  * this method than to call it repeatedly.
8109
8068
  * @return May be null. */
8110
8069
  findTransformConstraint(constraintName) {
8070
+ var _a;
8111
8071
  if (!constraintName) throw new Error('constraintName cannot be null.');
8112
- return this.transformConstraints.find(constraint => constraint.data.name == constraintName) ?? null;
8072
+ return (_a = this.transformConstraints.find(constraint => constraint.data.name == constraintName)) != null
8073
+ ? _a
8074
+ : null;
8113
8075
  }
8114
8076
  /** Finds a path constraint by comparing each path constraint's name. It is more efficient to cache the results of this method
8115
8077
  * than to call it repeatedly.
8116
8078
  * @return May be null. */
8117
8079
  findPathConstraint(constraintName) {
8080
+ var _a;
8118
8081
  if (!constraintName) throw new Error('constraintName cannot be null.');
8119
- return this.pathConstraints.find(constraint => constraint.data.name == constraintName) ?? null;
8082
+ return (_a = this.pathConstraints.find(constraint => constraint.data.name == constraintName)) != null ? _a : null;
8120
8083
  }
8121
8084
  /** Finds a physics constraint by comparing each physics constraint's name. It is more efficient to cache the results of this
8122
8085
  * method than to call it repeatedly. */
8123
8086
  findPhysicsConstraint(constraintName) {
8087
+ var _a;
8124
8088
  if (constraintName == null) throw new Error('constraintName cannot be null.');
8125
- return this.physicsConstraints.find(constraint => constraint.data.name == constraintName) ?? null;
8089
+ return (_a = this.physicsConstraints.find(constraint => constraint.data.name == constraintName)) != null
8090
+ ? _a
8091
+ : null;
8126
8092
  }
8127
8093
  /** 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 }`.
8128
8094
  * Note that this method will create temporary objects which can add to garbage collection pressure. Use `getBounds()` if garbage collection is a concern. */
@@ -8203,8 +8169,8 @@ var _Skeleton = class {
8203
8169
  }
8204
8170
  };
8205
8171
  var Skeleton = _Skeleton;
8206
- __publicField(Skeleton, 'quadTriangles', [0, 1, 2, 2, 3, 0]);
8207
- __publicField(Skeleton, 'yDown', false);
8172
+ Skeleton.quadTriangles = [0, 1, 2, 2, 3, 0];
8173
+ Skeleton.yDown = false;
8208
8174
  var Physics = /* @__PURE__ */ (Physics2 => {
8209
8175
  Physics2[(Physics2['none'] = 0)] = 'none';
8210
8176
  Physics2[(Physics2['reset'] = 1)] = 'reset';
@@ -8215,7 +8181,32 @@ var Physics = /* @__PURE__ */ (Physics2 => {
8215
8181
 
8216
8182
  // spine-core/src/PhysicsConstraintData.ts
8217
8183
  var PhysicsConstraintData = class extends ConstraintData {
8218
- _bone = null;
8184
+ constructor(name) {
8185
+ super(name, 0, false);
8186
+ this._bone = null;
8187
+ this.x = 0;
8188
+ this.y = 0;
8189
+ this.rotate = 0;
8190
+ this.scaleX = 0;
8191
+ this.shearX = 0;
8192
+ this.limit = 0;
8193
+ this.step = 0;
8194
+ this.inertia = 0;
8195
+ this.strength = 0;
8196
+ this.damping = 0;
8197
+ this.massInverse = 0;
8198
+ this.wind = 0;
8199
+ this.gravity = 0;
8200
+ /** A percentage (0-1) that controls the mix between the constrained and unconstrained poses. */
8201
+ this.mix = 0;
8202
+ this.inertiaGlobal = false;
8203
+ this.strengthGlobal = false;
8204
+ this.dampingGlobal = false;
8205
+ this.massGlobal = false;
8206
+ this.windGlobal = false;
8207
+ this.gravityGlobal = false;
8208
+ this.mixGlobal = false;
8209
+ }
8219
8210
  /** The bone constrained by this physics constraint. */
8220
8211
  set bone(boneData) {
8221
8212
  this._bone = boneData;
@@ -8224,83 +8215,60 @@ var PhysicsConstraintData = class extends ConstraintData {
8224
8215
  if (!this._bone) throw new Error('BoneData not set.');
8225
8216
  else return this._bone;
8226
8217
  }
8227
- x = 0;
8228
- y = 0;
8229
- rotate = 0;
8230
- scaleX = 0;
8231
- shearX = 0;
8232
- limit = 0;
8233
- step = 0;
8234
- inertia = 0;
8235
- strength = 0;
8236
- damping = 0;
8237
- massInverse = 0;
8238
- wind = 0;
8239
- gravity = 0;
8240
- /** A percentage (0-1) that controls the mix between the constrained and unconstrained poses. */
8241
- mix = 0;
8242
- inertiaGlobal = false;
8243
- strengthGlobal = false;
8244
- dampingGlobal = false;
8245
- massGlobal = false;
8246
- windGlobal = false;
8247
- gravityGlobal = false;
8248
- mixGlobal = false;
8249
- constructor(name) {
8250
- super(name, 0, false);
8251
- }
8252
8218
  };
8253
8219
 
8254
8220
  // spine-core/src/SkeletonData.ts
8255
8221
  var SkeletonData = class {
8256
- /** The skeleton's name, which by default is the name of the skeleton data file, if possible. May be null. */
8257
- name = null;
8258
- /** The skeleton's bones, sorted parent first. The root bone is always the first bone. */
8259
- bones = new Array();
8260
- // Ordered parents first.
8261
- /** The skeleton's slots in the setup pose draw order. */
8262
- slots = new Array();
8263
- // Setup pose draw order.
8264
- skins = new Array();
8265
- /** The skeleton's default skin. By default this skin contains all attachments that were not in a skin in Spine.
8266
- *
8267
- * See {@link Skeleton#getAttachmentByName()}.
8268
- * May be null. */
8269
- defaultSkin = null;
8270
- /** The skeleton's events. */
8271
- events = new Array();
8272
- /** The skeleton's animations. */
8273
- animations = new Array();
8274
- /** The skeleton's IK constraints. */
8275
- ikConstraints = new Array();
8276
- /** The skeleton's transform constraints. */
8277
- transformConstraints = new Array();
8278
- /** The skeleton's path constraints. */
8279
- pathConstraints = new Array();
8280
- /** The skeleton's physics constraints. */
8281
- physicsConstraints = new Array();
8282
- /** The X coordinate of the skeleton's axis aligned bounding box in the setup pose. */
8283
- x = 0;
8284
- /** The Y coordinate of the skeleton's axis aligned bounding box in the setup pose. */
8285
- y = 0;
8286
- /** The width of the skeleton's axis aligned bounding box in the setup pose. */
8287
- width = 0;
8288
- /** The height of the skeleton's axis aligned bounding box in the setup pose. */
8289
- height = 0;
8290
- /** Baseline scale factor for applying distance-dependent effects on non-scalable properties, such as angle or scale. Default
8291
- * is 100. */
8292
- referenceScale = 100;
8293
- /** The Spine version used to export the skeleton data, or null. */
8294
- version = null;
8295
- /** The skeleton data hash. This value will change if any of the skeleton data has changed. May be null. */
8296
- hash = null;
8297
- // Nonessential
8298
- /** The dopesheet FPS in Spine. Available only when nonessential data was exported. */
8299
- fps = 0;
8300
- /** The path to the images directory as defined in Spine. Available only when nonessential data was exported. May be null. */
8301
- imagesPath = null;
8302
- /** The path to the audio directory as defined in Spine. Available only when nonessential data was exported. May be null. */
8303
- audioPath = null;
8222
+ constructor() {
8223
+ /** The skeleton's name, which by default is the name of the skeleton data file, if possible. May be null. */
8224
+ this.name = null;
8225
+ /** The skeleton's bones, sorted parent first. The root bone is always the first bone. */
8226
+ this.bones = new Array();
8227
+ // Ordered parents first.
8228
+ /** The skeleton's slots in the setup pose draw order. */
8229
+ this.slots = new Array();
8230
+ // Setup pose draw order.
8231
+ this.skins = new Array();
8232
+ /** The skeleton's default skin. By default this skin contains all attachments that were not in a skin in Spine.
8233
+ *
8234
+ * See {@link Skeleton#getAttachmentByName()}.
8235
+ * May be null. */
8236
+ this.defaultSkin = null;
8237
+ /** The skeleton's events. */
8238
+ this.events = new Array();
8239
+ /** The skeleton's animations. */
8240
+ this.animations = new Array();
8241
+ /** The skeleton's IK constraints. */
8242
+ this.ikConstraints = new Array();
8243
+ /** The skeleton's transform constraints. */
8244
+ this.transformConstraints = new Array();
8245
+ /** The skeleton's path constraints. */
8246
+ this.pathConstraints = new Array();
8247
+ /** The skeleton's physics constraints. */
8248
+ this.physicsConstraints = new Array();
8249
+ /** The X coordinate of the skeleton's axis aligned bounding box in the setup pose. */
8250
+ this.x = 0;
8251
+ /** The Y coordinate of the skeleton's axis aligned bounding box in the setup pose. */
8252
+ this.y = 0;
8253
+ /** The width of the skeleton's axis aligned bounding box in the setup pose. */
8254
+ this.width = 0;
8255
+ /** The height of the skeleton's axis aligned bounding box in the setup pose. */
8256
+ this.height = 0;
8257
+ /** Baseline scale factor for applying distance-dependent effects on non-scalable properties, such as angle or scale. Default
8258
+ * is 100. */
8259
+ this.referenceScale = 100;
8260
+ /** The Spine version used to export the skeleton data, or null. */
8261
+ this.version = null;
8262
+ /** The skeleton data hash. This value will change if any of the skeleton data has changed. May be null. */
8263
+ this.hash = null;
8264
+ // Nonessential
8265
+ /** The dopesheet FPS in Spine. Available only when nonessential data was exported. */
8266
+ this.fps = 0;
8267
+ /** The path to the images directory as defined in Spine. Available only when nonessential data was exported. May be null. */
8268
+ this.imagesPath = null;
8269
+ /** The path to the audio directory as defined in Spine. Available only when nonessential data was exported. May be null. */
8270
+ this.audioPath = null;
8271
+ }
8304
8272
  /** Finds a bone by comparing each bone's name. It is more efficient to cache the results of this method than to call it
8305
8273
  * multiple times.
8306
8274
  * @returns May be null. */
@@ -8420,15 +8388,13 @@ var SkinEntry = class {
8420
8388
  }
8421
8389
  };
8422
8390
  var Skin = class {
8423
- /** The skin's name, which is unique across all skins in the skeleton. */
8424
- name;
8425
- attachments = new Array();
8426
- bones = Array();
8427
- constraints = new Array();
8428
- /** The color of the skin as it was in Spine, or a default color if nonessential data was not exported. */
8429
- color = new Color(0.99607843, 0.61960787, 0.30980393, 1);
8430
8391
  // fe9e4fff
8431
8392
  constructor(name) {
8393
+ this.attachments = new Array();
8394
+ this.bones = Array();
8395
+ this.constraints = new Array();
8396
+ /** The color of the skin as it was in Spine, or a default color if nonessential data was not exported. */
8397
+ this.color = new Color(0.99607843, 0.61960787, 0.30980393, 1);
8432
8398
  if (!name) throw new Error('name cannot be null.');
8433
8399
  this.name = name;
8434
8400
  }
@@ -8572,25 +8538,21 @@ var Skin = class {
8572
8538
 
8573
8539
  // spine-core/src/SlotData.ts
8574
8540
  var SlotData = class {
8575
- /** The index of the slot in {@link Skeleton#getSlots()}. */
8576
- index = 0;
8577
- /** The name of the slot, which is unique across all slots in the skeleton. */
8578
- name;
8579
- /** The bone this slot belongs to. */
8580
- boneData;
8581
- /** The color used to tint the slot's attachment. If {@link #getDarkColor()} is set, this is used as the light color for two
8582
- * color tinting. */
8583
- color = new Color(1, 1, 1, 1);
8584
- /** 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
8585
- * color's alpha is not used. */
8586
- darkColor = null;
8587
- /** The name of the attachment that is visible for this slot in the setup pose, or null if no attachment is visible. */
8588
- attachmentName = null;
8589
- /** The blend mode for drawing the slot's attachment. */
8590
- blendMode = BlendMode.Normal;
8591
- /** False if the slot was hidden in Spine and nonessential data was exported. Does not affect runtime rendering. */
8592
- visible = true;
8593
8541
  constructor(index, name, boneData) {
8542
+ /** The index of the slot in {@link Skeleton#getSlots()}. */
8543
+ this.index = 0;
8544
+ /** The color used to tint the slot's attachment. If {@link #getDarkColor()} is set, this is used as the light color for two
8545
+ * color tinting. */
8546
+ this.color = new Color(1, 1, 1, 1);
8547
+ /** 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
8548
+ * color's alpha is not used. */
8549
+ this.darkColor = null;
8550
+ /** The name of the attachment that is visible for this slot in the setup pose, or null if no attachment is visible. */
8551
+ this.attachmentName = null;
8552
+ /** The blend mode for drawing the slot's attachment. */
8553
+ this.blendMode = BlendMode.Normal;
8554
+ /** False if the slot was hidden in Spine and nonessential data was exported. Does not affect runtime rendering. */
8555
+ this.visible = true;
8594
8556
  if (index < 0) throw new Error('index must be >= 0.');
8595
8557
  if (!name) throw new Error('name cannot be null.');
8596
8558
  if (!boneData) throw new Error('boneData cannot be null.');
@@ -8609,10 +8571,33 @@ var BlendMode = /* @__PURE__ */ (BlendMode2 => {
8609
8571
 
8610
8572
  // spine-core/src/TransformConstraintData.ts
8611
8573
  var TransformConstraintData = class extends ConstraintData {
8612
- /** The bones that will be modified by this transform constraint. */
8613
- bones = new Array();
8614
- /** The target bone whose world transform will be copied to the constrained bones. */
8615
- _target = null;
8574
+ constructor(name) {
8575
+ super(name, 0, false);
8576
+ /** The bones that will be modified by this transform constraint. */
8577
+ this.bones = new Array();
8578
+ /** The target bone whose world transform will be copied to the constrained bones. */
8579
+ this._target = null;
8580
+ this.mixRotate = 0;
8581
+ this.mixX = 0;
8582
+ this.mixY = 0;
8583
+ this.mixScaleX = 0;
8584
+ this.mixScaleY = 0;
8585
+ this.mixShearY = 0;
8586
+ /** An offset added to the constrained bone rotation. */
8587
+ this.offsetRotation = 0;
8588
+ /** An offset added to the constrained bone X translation. */
8589
+ this.offsetX = 0;
8590
+ /** An offset added to the constrained bone Y translation. */
8591
+ this.offsetY = 0;
8592
+ /** An offset added to the constrained bone scaleX. */
8593
+ this.offsetScaleX = 0;
8594
+ /** An offset added to the constrained bone scaleY. */
8595
+ this.offsetScaleY = 0;
8596
+ /** An offset added to the constrained bone shearY. */
8597
+ this.offsetShearY = 0;
8598
+ this.relative = false;
8599
+ this.local = false;
8600
+ }
8616
8601
  set target(boneData) {
8617
8602
  this._target = boneData;
8618
8603
  }
@@ -8620,44 +8605,21 @@ var TransformConstraintData = class extends ConstraintData {
8620
8605
  if (!this._target) throw new Error('BoneData not set.');
8621
8606
  else return this._target;
8622
8607
  }
8623
- mixRotate = 0;
8624
- mixX = 0;
8625
- mixY = 0;
8626
- mixScaleX = 0;
8627
- mixScaleY = 0;
8628
- mixShearY = 0;
8629
- /** An offset added to the constrained bone rotation. */
8630
- offsetRotation = 0;
8631
- /** An offset added to the constrained bone X translation. */
8632
- offsetX = 0;
8633
- /** An offset added to the constrained bone Y translation. */
8634
- offsetY = 0;
8635
- /** An offset added to the constrained bone scaleX. */
8636
- offsetScaleX = 0;
8637
- /** An offset added to the constrained bone scaleY. */
8638
- offsetScaleY = 0;
8639
- /** An offset added to the constrained bone shearY. */
8640
- offsetShearY = 0;
8641
- relative = false;
8642
- local = false;
8643
- constructor(name) {
8644
- super(name, 0, false);
8645
- }
8646
8608
  };
8647
8609
 
8648
8610
  // spine-core/src/SkeletonBinary.ts
8649
8611
  var SkeletonBinary = class {
8650
- /** Scales bone positions, image sizes, and translations as they are loaded. This allows different size images to be used at
8651
- * runtime than were used in Spine.
8652
- *
8653
- * See [Scaling](http://esotericsoftware.com/spine-loading-skeleton-data#Scaling) in the Spine Runtimes Guide. */
8654
- scale = 1;
8655
- attachmentLoader;
8656
- linkedMeshes = new Array();
8657
8612
  constructor(attachmentLoader) {
8613
+ /** Scales bone positions, image sizes, and translations as they are loaded. This allows different size images to be used at
8614
+ * runtime than were used in Spine.
8615
+ *
8616
+ * See [Scaling](http://esotericsoftware.com/spine-loading-skeleton-data#Scaling) in the Spine Runtimes Guide. */
8617
+ this.scale = 1;
8618
+ this.linkedMeshes = new Array();
8658
8619
  this.attachmentLoader = attachmentLoader;
8659
8620
  }
8660
8621
  readSkeletonData(binary) {
8622
+ var _a;
8661
8623
  let scale = this.scale;
8662
8624
  let skeletonData = new SkeletonData();
8663
8625
  skeletonData.name = '';
@@ -8702,7 +8664,7 @@ var SkeletonBinary = class {
8702
8664
  data.skinRequired = input.readBoolean();
8703
8665
  if (nonessential) {
8704
8666
  Color.rgba8888ToColor(data.color, input.readInt32());
8705
- data.icon = input.readString() ?? void 0;
8667
+ data.icon = (_a = input.readString()) != null ? _a : void 0;
8706
8668
  data.visible = input.readBoolean();
8707
8669
  }
8708
8670
  skeletonData.bones.push(data);
@@ -9737,11 +9699,6 @@ var BinaryInput = class {
9737
9699
  }
9738
9700
  };
9739
9701
  var LinkedMesh = class {
9740
- parent;
9741
- skinIndex;
9742
- slotIndex;
9743
- mesh;
9744
- inheritTimeline;
9745
9702
  constructor(mesh, skinIndex, slotIndex, parent, inheritDeform) {
9746
9703
  this.mesh = mesh;
9747
9704
  this.skinIndex = skinIndex;
@@ -9861,21 +9818,23 @@ var CURVE_BEZIER = 2;
9861
9818
 
9862
9819
  // spine-core/src/SkeletonBounds.ts
9863
9820
  var SkeletonBounds = class {
9864
- /** The left edge of the axis aligned bounding box. */
9865
- minX = 0;
9866
- /** The bottom edge of the axis aligned bounding box. */
9867
- minY = 0;
9868
- /** The right edge of the axis aligned bounding box. */
9869
- maxX = 0;
9870
- /** The top edge of the axis aligned bounding box. */
9871
- maxY = 0;
9872
- /** The visible bounding boxes. */
9873
- boundingBoxes = new Array();
9874
- /** The world vertices for the bounding box polygons. */
9875
- polygons = new Array();
9876
- polygonPool = new Pool(() => {
9877
- return Utils.newFloatArray(16);
9878
- });
9821
+ constructor() {
9822
+ /** The left edge of the axis aligned bounding box. */
9823
+ this.minX = 0;
9824
+ /** The bottom edge of the axis aligned bounding box. */
9825
+ this.minY = 0;
9826
+ /** The right edge of the axis aligned bounding box. */
9827
+ this.maxX = 0;
9828
+ /** The top edge of the axis aligned bounding box. */
9829
+ this.maxY = 0;
9830
+ /** The visible bounding boxes. */
9831
+ this.boundingBoxes = new Array();
9832
+ /** The world vertices for the bounding box polygons. */
9833
+ this.polygons = new Array();
9834
+ this.polygonPool = new Pool(() => {
9835
+ return Utils.newFloatArray(16);
9836
+ });
9837
+ }
9879
9838
  /** Clears any previous polygons, finds all visible bounding box attachments, and computes the world vertices for each bounding
9880
9839
  * box's polygon.
9881
9840
  * @param updateAabb If true, the axis aligned bounding box containing all the polygons is computed. If false, the
@@ -10048,17 +10007,19 @@ var SkeletonBounds = class {
10048
10007
 
10049
10008
  // spine-core/src/Triangulator.ts
10050
10009
  var Triangulator = class {
10051
- convexPolygons = new Array();
10052
- convexPolygonsIndices = new Array();
10053
- indicesArray = new Array();
10054
- isConcaveArray = new Array();
10055
- triangles = new Array();
10056
- polygonPool = new Pool(() => {
10057
- return new Array();
10058
- });
10059
- polygonIndicesPool = new Pool(() => {
10060
- return new Array();
10061
- });
10010
+ constructor() {
10011
+ this.convexPolygons = new Array();
10012
+ this.convexPolygonsIndices = new Array();
10013
+ this.indicesArray = new Array();
10014
+ this.isConcaveArray = new Array();
10015
+ this.triangles = new Array();
10016
+ this.polygonPool = new Pool(() => {
10017
+ return new Array();
10018
+ });
10019
+ this.polygonIndicesPool = new Pool(() => {
10020
+ return new Array();
10021
+ });
10022
+ }
10062
10023
  triangulate(verticesArray) {
10063
10024
  let vertices = verticesArray;
10064
10025
  let vertexCount = verticesArray.length >> 1;
@@ -10273,15 +10234,17 @@ var Triangulator = class {
10273
10234
 
10274
10235
  // spine-core/src/SkeletonClipping.ts
10275
10236
  var SkeletonClipping = class {
10276
- triangulator = new Triangulator();
10277
- clippingPolygon = new Array();
10278
- clipOutput = new Array();
10279
- clippedVertices = new Array();
10280
- clippedUVs = new Array();
10281
- clippedTriangles = new Array();
10282
- scratch = new Array();
10283
- clipAttachment = null;
10284
- clippingPolygons = null;
10237
+ constructor() {
10238
+ this.triangulator = new Triangulator();
10239
+ this.clippingPolygon = new Array();
10240
+ this.clipOutput = new Array();
10241
+ this.clippedVertices = new Array();
10242
+ this.clippedUVs = new Array();
10243
+ this.clippedTriangles = new Array();
10244
+ this.scratch = new Array();
10245
+ this.clipAttachment = null;
10246
+ this.clippingPolygons = null;
10247
+ }
10285
10248
  clipStart(slot, clip) {
10286
10249
  if (this.clipAttachment) return 0;
10287
10250
  this.clipAttachment = clip;
@@ -10761,17 +10724,17 @@ var SkeletonClipping = class {
10761
10724
 
10762
10725
  // spine-core/src/SkeletonJson.ts
10763
10726
  var SkeletonJson = class {
10764
- attachmentLoader;
10765
- /** Scales bone positions, image sizes, and translations as they are loaded. This allows different size images to be used at
10766
- * runtime than were used in Spine.
10767
- *
10768
- * See [Scaling](http://esotericsoftware.com/spine-loading-skeleton-data#Scaling) in the Spine Runtimes Guide. */
10769
- scale = 1;
10770
- linkedMeshes = new Array();
10771
10727
  constructor(attachmentLoader) {
10728
+ /** Scales bone positions, image sizes, and translations as they are loaded. This allows different size images to be used at
10729
+ * runtime than were used in Spine.
10730
+ *
10731
+ * See [Scaling](http://esotericsoftware.com/spine-loading-skeleton-data#Scaling) in the Spine Runtimes Guide. */
10732
+ this.scale = 1;
10733
+ this.linkedMeshes = new Array();
10772
10734
  this.attachmentLoader = attachmentLoader;
10773
10735
  }
10774
10736
  readSkeletonData(json) {
10737
+ var _a, _b;
10775
10738
  let scale = this.scale;
10776
10739
  let skeletonData = new SkeletonData();
10777
10740
  let root = typeof json === 'string' ? JSON.parse(json) : json;
@@ -10785,8 +10748,8 @@ var SkeletonJson = class {
10785
10748
  skeletonData.height = skeletonMap.height;
10786
10749
  skeletonData.referenceScale = getValue(skeletonMap, 'referenceScale', 100) * scale;
10787
10750
  skeletonData.fps = skeletonMap.fps;
10788
- skeletonData.imagesPath = skeletonMap.images ?? null;
10789
- skeletonData.audioPath = skeletonMap.audio ?? null;
10751
+ skeletonData.imagesPath = (_a = skeletonMap.images) != null ? _a : null;
10752
+ skeletonData.audioPath = (_b = skeletonMap.audio) != null ? _b : null;
10790
10753
  }
10791
10754
  if (root.bones) {
10792
10755
  for (let i = 0; i < root.bones.length; i++) {
@@ -11689,11 +11652,6 @@ var SkeletonJson = class {
11689
11652
  }
11690
11653
  };
11691
11654
  var LinkedMesh2 = class {
11692
- parent;
11693
- skin;
11694
- slotIndex;
11695
- mesh;
11696
- inheritTimeline;
11697
11655
  constructor(mesh, skin, slotIndex, parent, inheritDeform) {
11698
11656
  this.mesh = mesh;
11699
11657
  this.skin = skin;
@@ -11779,17 +11737,16 @@ function getValue(map, property, defaultValue) {
11779
11737
 
11780
11738
  // spine-pixi-v8/src/SpineTexture.ts
11781
11739
  var _SpineTexture = class extends Texture {
11740
+ constructor(image) {
11741
+ super(image.resource);
11742
+ this.texture = Texture$1.from(image);
11743
+ }
11782
11744
  static from(texture) {
11783
11745
  if (_SpineTexture.textureMap.has(texture)) {
11784
11746
  return _SpineTexture.textureMap.get(texture);
11785
11747
  }
11786
11748
  return new _SpineTexture(texture);
11787
11749
  }
11788
- texture;
11789
- constructor(image) {
11790
- super(image.resource);
11791
- this.texture = Texture$1.from(image);
11792
- }
11793
11750
  setFilters(minFilter, magFilter) {
11794
11751
  const style = this.texture.source.style;
11795
11752
  style.minFilter = _SpineTexture.toPixiTextureFilter(minFilter);
@@ -11861,7 +11818,7 @@ var _SpineTexture = class extends Texture {
11861
11818
  }
11862
11819
  };
11863
11820
  var SpineTexture = _SpineTexture;
11864
- __publicField(SpineTexture, 'textureMap', /* @__PURE__ */ new Map());
11821
+ SpineTexture.textureMap = /* @__PURE__ */ new Map();
11865
11822
 
11866
11823
  // spine-pixi-v8/src/assets/atlasLoader.ts
11867
11824
  var spineTextureAtlasLoader = {
@@ -11869,9 +11826,14 @@ var spineTextureAtlasLoader = {
11869
11826
  resolver: {
11870
11827
  test: value => checkExtension(value, '.atlas'),
11871
11828
  parse: value => {
11829
+ var _a, _b, _c;
11872
11830
  const split = value.split('.');
11873
11831
  return {
11874
- resolution: parseFloat(Resolver.RETINA_PREFIX?.exec(value)?.[1] ?? '1'),
11832
+ resolution: parseFloat(
11833
+ (_c = (_b = (_a = Resolver.RETINA_PREFIX) == null ? void 0 : _a.exec(value)) == null ? void 0 : _b[1]) != null
11834
+ ? _c
11835
+ : '1',
11836
+ ),
11875
11837
  format: split[split.length - 2],
11876
11838
  src: value,
11877
11839
  };
@@ -11886,10 +11848,12 @@ var spineTextureAtlasLoader = {
11886
11848
  test(url) {
11887
11849
  return checkExtension(url, '.atlas');
11888
11850
  },
11889
- async load(url) {
11890
- const response = await DOMAdapter.get().fetch(url);
11891
- const txt = await response.text();
11892
- return txt;
11851
+ load(url) {
11852
+ return __async(this, null, function* () {
11853
+ const response = yield DOMAdapter.get().fetch(url);
11854
+ const txt = yield response.text();
11855
+ return txt;
11856
+ });
11893
11857
  },
11894
11858
  testParse(asset, options) {
11895
11859
  const isExtensionRight = checkExtension(options.src, '.atlas');
@@ -11899,48 +11863,52 @@ var spineTextureAtlasLoader = {
11899
11863
  unload(atlas) {
11900
11864
  atlas.dispose();
11901
11865
  },
11902
- async parse(asset, options, loader) {
11903
- const metadata = options.data || {};
11904
- let basePath = path.dirname(options.src);
11905
- if (basePath && basePath.lastIndexOf('/') !== basePath.length - 1) {
11906
- basePath += '/';
11907
- }
11908
- const retval = new TextureAtlas(asset);
11909
- if (metadata.images instanceof TextureSource || typeof metadata.images === 'string') {
11910
- const pixiTexture = metadata.images;
11911
- metadata.images = {};
11912
- metadata.images[retval.pages[0].name] = pixiTexture;
11913
- }
11914
- const textureLoadingPromises = [];
11915
- for (const page of retval.pages) {
11916
- if (metadata.resolve) {
11917
- const resolvePromise = metadata.resolve().then(texture => {
11918
- page.setTexture(SpineTexture.from(texture.source));
11919
- });
11920
- textureLoadingPromises.push(resolvePromise);
11921
- continue;
11866
+ parse(asset, options, loader) {
11867
+ return __async(this, null, function* () {
11868
+ const metadata = options.data || {};
11869
+ let basePath = path.dirname(options.src);
11870
+ if (basePath && basePath.lastIndexOf('/') !== basePath.length - 1) {
11871
+ basePath += '/';
11922
11872
  }
11923
- const pageName = page.name;
11924
- const providedPage = metadata?.images ? metadata.images[pageName] : void 0;
11925
- if (providedPage instanceof TextureSource) {
11926
- page.setTexture(SpineTexture.from(providedPage));
11927
- } else {
11928
- const url = providedPage ?? path.normalize([...basePath.split(path.sep), pageName].join(path.sep));
11929
- const assetsToLoadIn = {
11930
- src: url,
11931
- data: {
11932
- ...metadata.imageMetadata,
11933
- alphaMode: page.pma ? 'premultiplied-alpha' : 'premultiply-alpha-on-upload',
11934
- },
11935
- };
11936
- const pixiPromise = loader.load(assetsToLoadIn).then(texture => {
11937
- page.setTexture(SpineTexture.from(texture.source));
11938
- });
11939
- textureLoadingPromises.push(pixiPromise);
11873
+ const retval = new TextureAtlas(asset);
11874
+ if (metadata.images instanceof TextureSource || typeof metadata.images === 'string') {
11875
+ const pixiTexture = metadata.images;
11876
+ metadata.images = {};
11877
+ metadata.images[retval.pages[0].name] = pixiTexture;
11940
11878
  }
11941
- }
11942
- await Promise.all(textureLoadingPromises);
11943
- return retval;
11879
+ const textureLoadingPromises = [];
11880
+ for (const page of retval.pages) {
11881
+ if (metadata.resolve) {
11882
+ const resolvePromise = metadata.resolve().then(texture => {
11883
+ page.setTexture(SpineTexture.from(texture.source));
11884
+ });
11885
+ textureLoadingPromises.push(resolvePromise);
11886
+ continue;
11887
+ }
11888
+ const pageName = page.name;
11889
+ const providedPage = (metadata == null ? void 0 : metadata.images) ? metadata.images[pageName] : void 0;
11890
+ if (providedPage instanceof TextureSource) {
11891
+ page.setTexture(SpineTexture.from(providedPage));
11892
+ } else {
11893
+ const url =
11894
+ providedPage != null
11895
+ ? providedPage
11896
+ : path.normalize([...basePath.split(path.sep), pageName].join(path.sep));
11897
+ const assetsToLoadIn = {
11898
+ src: url,
11899
+ data: __spreadProps(__spreadValues({}, metadata.imageMetadata), {
11900
+ alphaMode: page.pma ? 'premultiplied-alpha' : 'premultiply-alpha-on-upload',
11901
+ }),
11902
+ };
11903
+ const pixiPromise = loader.load(assetsToLoadIn).then(texture => {
11904
+ page.setTexture(SpineTexture.from(texture.source));
11905
+ });
11906
+ textureLoadingPromises.push(pixiPromise);
11907
+ }
11908
+ }
11909
+ yield Promise.all(textureLoadingPromises);
11910
+ return retval;
11911
+ });
11944
11912
  },
11945
11913
  },
11946
11914
  };
@@ -11962,10 +11930,12 @@ var spineLoaderExtension = {
11962
11930
  test(url) {
11963
11931
  return checkExtension(url, '.skel');
11964
11932
  },
11965
- async load(url) {
11966
- const response = await DOMAdapter.get().fetch(url);
11967
- const buffer = new Uint8Array(await response.arrayBuffer());
11968
- return buffer;
11933
+ load(url) {
11934
+ return __async(this, null, function* () {
11935
+ const response = yield DOMAdapter.get().fetch(url);
11936
+ const buffer = new Uint8Array(yield response.arrayBuffer());
11937
+ return buffer;
11938
+ });
11969
11939
  },
11970
11940
  testParse(asset, options) {
11971
11941
  const isJsonSpineModel = checkExtension(options.src, '.json') && isJson(asset);
@@ -12121,11 +12091,14 @@ var DarkTintShader = class extends Shader {
12121
12091
  // spine-pixi-v8/src/darktint/DarkTintBatcher.ts
12122
12092
  var defaultShader = null;
12123
12093
  var _DarkTintBatcher = class extends Batcher {
12124
- geometry = new DarkTintBatchGeometry();
12125
- shader = defaultShader || (defaultShader = new DarkTintShader(this.maxTextures));
12126
- name = _DarkTintBatcher.extension.name;
12127
- /** The size of one attribute. 1 = 32 bit. x, y, u, v, color, darkColor, textureIdAndRound -> total = 7 */
12128
- vertexSize = 7;
12094
+ constructor() {
12095
+ super(...arguments);
12096
+ this.geometry = new DarkTintBatchGeometry();
12097
+ this.shader = defaultShader || (defaultShader = new DarkTintShader(this.maxTextures));
12098
+ this.name = _DarkTintBatcher.extension.name;
12099
+ /** The size of one attribute. 1 = 32 bit. x, y, u, v, color, darkColor, textureIdAndRound -> total = 7 */
12100
+ this.vertexSize = 7;
12101
+ }
12129
12102
  packAttributes(element, float32View, uint32View, index, textureId) {
12130
12103
  const textureIdAndRound = (textureId << 16) | (element.roundPixels & 65535);
12131
12104
  const wt = element.transform;
@@ -12204,37 +12177,21 @@ var _DarkTintBatcher = class extends Batcher {
12204
12177
  };
12205
12178
  var DarkTintBatcher = _DarkTintBatcher;
12206
12179
  /** @ignore */
12207
- __publicField(DarkTintBatcher, 'extension', {
12180
+ DarkTintBatcher.extension = {
12208
12181
  type: [ExtensionType.Batcher],
12209
12182
  name: 'darkTint',
12210
- });
12183
+ };
12211
12184
  extensions.add(DarkTintBatcher);
12212
12185
 
12213
12186
  // spine-pixi-v8/src/BatchableSpineSlot.ts
12214
12187
  var BatchableSpineSlot = class {
12215
- indexOffset = 0;
12216
- attributeOffset = 0;
12217
- indexSize;
12218
- attributeSize;
12219
- batcherName = 'darkTint';
12220
- topology = 'triangle-list';
12221
- packAsQuad = false;
12222
- renderable;
12223
- positions;
12224
- indices;
12225
- uvs;
12226
- roundPixels;
12227
- data;
12228
- blendMode;
12229
- darkTint;
12230
- texture;
12231
- transform;
12232
- // used internally by batcher specific. Stored for efficient updating.
12233
- _textureId;
12234
- _attributeStart;
12235
- _indexStart;
12236
- _batcher;
12237
- _batch;
12188
+ constructor() {
12189
+ this.indexOffset = 0;
12190
+ this.attributeOffset = 0;
12191
+ this.batcherName = 'darkTint';
12192
+ this.topology = 'triangle-list';
12193
+ this.packAsQuad = false;
12194
+ }
12238
12195
  get color() {
12239
12196
  const slotColor = this.data.color;
12240
12197
  const parentColor = this.renderable.groupColor;
@@ -12294,10 +12251,9 @@ var spineBlendModeMap = {
12294
12251
  3: 'screen',
12295
12252
  };
12296
12253
  var SpinePipe = class {
12297
- renderer;
12298
- gpuSpineData = {};
12299
- _destroyRenderableBound = this.destroyRenderable.bind(this);
12300
12254
  constructor(renderer) {
12255
+ this.gpuSpineData = {};
12256
+ this._destroyRenderableBound = this.destroyRenderable.bind(this);
12301
12257
  this.renderer = renderer;
12302
12258
  }
12303
12259
  validateRenderable(spine) {
@@ -12325,6 +12281,7 @@ var SpinePipe = class {
12325
12281
  return false;
12326
12282
  }
12327
12283
  addRenderable(spine, instructionSet) {
12284
+ var _a, _b;
12328
12285
  const gpuSpine = this._getSpineData(spine);
12329
12286
  const batcher = this.renderer.renderPipes.batch;
12330
12287
  const drawOrder = spine.skeleton.drawOrder;
@@ -12336,7 +12293,8 @@ var SpinePipe = class {
12336
12293
  const blendMode = spineBlendModeMap[slot.data.blendMode];
12337
12294
  if (attachment instanceof RegionAttachment || attachment instanceof MeshAttachment) {
12338
12295
  const cacheData = spine._getCachedData(slot, attachment);
12339
- const batchableSpineSlot = (gpuSpine.slotBatches[cacheData.id] ||= new BatchableSpineSlot());
12296
+ const batchableSpineSlot =
12297
+ (_a = gpuSpine.slotBatches)[(_b = cacheData.id)] || (_a[_b] = new BatchableSpineSlot());
12340
12298
  batchableSpineSlot.setData(spine, cacheData, blendMode, roundPixels);
12341
12299
  if (!cacheData.skipRender) {
12342
12300
  batcher.addToBatch(batchableSpineSlot, instructionSet);
@@ -12352,6 +12310,7 @@ var SpinePipe = class {
12352
12310
  }
12353
12311
  }
12354
12312
  updateRenderable(spine) {
12313
+ var _a;
12355
12314
  const gpuSpine = this.gpuSpineData[spine.uid];
12356
12315
  spine._validateAndTransformAttachments();
12357
12316
  const drawOrder = spine.skeleton.drawOrder;
@@ -12362,7 +12321,7 @@ var SpinePipe = class {
12362
12321
  const cacheData = spine._getCachedData(slot, attachment);
12363
12322
  if (!cacheData.skipRender) {
12364
12323
  const batchableSpineSlot = gpuSpine.slotBatches[spine._getCachedData(slot, attachment).id];
12365
- batchableSpineSlot._batcher?.updateElement(batchableSpineSlot);
12324
+ (_a = batchableSpineSlot._batcher) == null ? void 0 : _a.updateElement(batchableSpineSlot);
12366
12325
  }
12367
12326
  }
12368
12327
  }
@@ -12385,33 +12344,57 @@ var SpinePipe = class {
12385
12344
  }
12386
12345
  };
12387
12346
  /** @ignore */
12388
- __publicField(SpinePipe, 'extension', {
12347
+ SpinePipe.extension = {
12389
12348
  type: [ExtensionType.WebGLPipes, ExtensionType.WebGPUPipes, ExtensionType.CanvasPipes],
12390
12349
  name: 'spine',
12391
- });
12350
+ };
12392
12351
  extensions.add(SpinePipe);
12393
12352
  var vectorAux = new Vector2();
12394
12353
  Skeleton.yDown = true;
12395
12354
  var clipper = new SkeletonClipping();
12396
12355
  var maskPool = new Pool(() => new Graphics());
12397
12356
  var Spine$1 = class extends ViewContainer {
12398
- // Pixi properties
12399
- batched = true;
12400
- buildId = 0;
12401
- renderPipeId = 'spine';
12402
- _didSpineUpdate = false;
12403
- beforeUpdateWorldTransforms = () => {};
12404
- afterUpdateWorldTransforms = () => {};
12405
- // Spine properties
12406
- /** The skeleton for this Spine game object. */
12407
- skeleton;
12408
- /** The animation state for this Spine game object. */
12409
- state;
12410
- skeletonBounds;
12411
- darkTint = false;
12412
- _debug = void 0;
12413
- _slotsObject = /* @__PURE__ */ Object.create(null);
12414
- clippingSlotToPixiMasks = /* @__PURE__ */ Object.create(null);
12357
+ constructor(options) {
12358
+ var _a;
12359
+ if (options instanceof SkeletonData) {
12360
+ options = {
12361
+ skeletonData: options,
12362
+ };
12363
+ }
12364
+ super();
12365
+ // Pixi properties
12366
+ this.batched = true;
12367
+ this.buildId = 0;
12368
+ this.renderPipeId = 'spine';
12369
+ this._didSpineUpdate = false;
12370
+ this.beforeUpdateWorldTransforms = () => {};
12371
+ this.afterUpdateWorldTransforms = () => {};
12372
+ this.darkTint = false;
12373
+ this._debug = void 0;
12374
+ this._slotsObject = /* @__PURE__ */ Object.create(null);
12375
+ this.clippingSlotToPixiMasks = /* @__PURE__ */ Object.create(null);
12376
+ this.spineAttachmentsDirty = true;
12377
+ this.spineTexturesDirty = true;
12378
+ this._lastAttachments = [];
12379
+ this._stateChanged = true;
12380
+ this.attachmentCacheData = [];
12381
+ this._autoUpdate = true;
12382
+ this.hasNeverUpdated = true;
12383
+ const skeletonData = options instanceof SkeletonData ? options : options.skeletonData;
12384
+ this.skeleton = new Skeleton(skeletonData);
12385
+ this.state = new AnimationState(new AnimationStateData(skeletonData));
12386
+ this.autoUpdate = (_a = options == null ? void 0 : options.autoUpdate) != null ? _a : true;
12387
+ this.darkTint =
12388
+ (options == null ? void 0 : options.darkTint) === void 0
12389
+ ? this.skeleton.slots.some(slot => !!slot.data.darkColor)
12390
+ : options == null
12391
+ ? void 0
12392
+ : options.darkTint;
12393
+ const slots = this.skeleton.slots;
12394
+ for (let i = 0; i < slots.length; i++) {
12395
+ this.attachmentCacheData[i] = /* @__PURE__ */ Object.create(null);
12396
+ }
12397
+ }
12415
12398
  getSlotFromRef(slotRef) {
12416
12399
  let slot;
12417
12400
  if (typeof slotRef === 'number') slot = this.skeleton.slots[slotRef];
@@ -12420,11 +12403,6 @@ var Spine$1 = class extends ViewContainer {
12420
12403
  if (!slot) throw new Error(`No slot found with the given slot reference: ${slotRef}`);
12421
12404
  return slot;
12422
12405
  }
12423
- spineAttachmentsDirty = true;
12424
- spineTexturesDirty = true;
12425
- _lastAttachments = [];
12426
- _stateChanged = true;
12427
- attachmentCacheData = [];
12428
12406
  get debug() {
12429
12407
  return this._debug;
12430
12408
  }
@@ -12440,7 +12418,6 @@ var Spine$1 = class extends ViewContainer {
12440
12418
  }
12441
12419
  this._debug = value;
12442
12420
  }
12443
- _autoUpdate = true;
12444
12421
  get autoUpdate() {
12445
12422
  return this._autoUpdate;
12446
12423
  }
@@ -12453,31 +12430,12 @@ var Spine$1 = class extends ViewContainer {
12453
12430
  }
12454
12431
  this._autoUpdate = value;
12455
12432
  }
12456
- hasNeverUpdated = true;
12457
- constructor(options) {
12458
- if (options instanceof SkeletonData) {
12459
- options = {
12460
- skeletonData: options,
12461
- };
12462
- }
12463
- super();
12464
- const skeletonData = options instanceof SkeletonData ? options : options.skeletonData;
12465
- this.skeleton = new Skeleton(skeletonData);
12466
- this.state = new AnimationState(new AnimationStateData(skeletonData));
12467
- this.autoUpdate = options?.autoUpdate ?? true;
12468
- this.darkTint =
12469
- options?.darkTint === void 0 ? this.skeleton.slots.some(slot => !!slot.data.darkColor) : options?.darkTint;
12470
- const slots = this.skeleton.slots;
12471
- for (let i = 0; i < slots.length; i++) {
12472
- this.attachmentCacheData[i] = /* @__PURE__ */ Object.create(null);
12473
- }
12474
- }
12475
12433
  /** If {@link Spine.autoUpdate} is `false`, this method allows to update the AnimationState and the Skeleton with the given delta. */
12476
12434
  update(dt) {
12477
12435
  this.internalUpdate(0, dt);
12478
12436
  }
12479
12437
  internalUpdate(_deltaFrame, deltaSeconds) {
12480
- this._updateAndApplyState(deltaSeconds ?? Ticker.shared.deltaMS / 1e3);
12438
+ this._updateAndApplyState(deltaSeconds != null ? deltaSeconds : Ticker.shared.deltaMS / 1e3);
12481
12439
  }
12482
12440
  get bounds() {
12483
12441
  if (this._boundsDirty) {
@@ -12583,9 +12541,15 @@ var Spine$1 = class extends ViewContainer {
12583
12541
  this.spineAttachmentsDirty = spineAttachmentsDirty;
12584
12542
  }
12585
12543
  updateAndSetPixiMask(slot, last) {
12544
+ var _a, _b;
12586
12545
  const attachment = slot.attachment;
12587
12546
  if (attachment && attachment instanceof ClippingAttachment) {
12588
- const clip = (this.clippingSlotToPixiMasks[slot.data.name] ||= { slot, vertices: new Array() });
12547
+ const clip =
12548
+ (_a = this.clippingSlotToPixiMasks)[(_b = slot.data.name)] ||
12549
+ (_a[_b] = {
12550
+ slot,
12551
+ vertices: new Array(),
12552
+ });
12589
12553
  clip.maskComputed = false;
12590
12554
  this.currentClippingSlot = this.clippingSlotToPixiMasks[slot.data.name];
12591
12555
  return;
@@ -12609,7 +12573,7 @@ var Spine$1 = class extends ViewContainer {
12609
12573
  mask.clear().poly(vertices).stroke({ width: 0 }).fill({ alpha: 0.25 });
12610
12574
  }
12611
12575
  slotObject.container.mask = mask;
12612
- } else if (slotObject?.container.mask) {
12576
+ } else if (slotObject == null ? void 0 : slotObject.container.mask) {
12613
12577
  slotObject.container.mask = null;
12614
12578
  }
12615
12579
  if (currentClippingSlot && currentClippingSlot.slot.attachment.endSlot == slot.data) {
@@ -12630,8 +12594,8 @@ var Spine$1 = class extends ViewContainer {
12630
12594
  }
12631
12595
  }
12632
12596
  }
12633
- currentClippingSlot;
12634
12597
  transformAttachments() {
12598
+ var _a;
12635
12599
  const currentDrawOrder = this.skeleton.drawOrder;
12636
12600
  for (let i = 0; i < currentDrawOrder.length; i++) {
12637
12601
  const slot = currentDrawOrder[i];
@@ -12663,7 +12627,7 @@ var Spine$1 = class extends ViewContainer {
12663
12627
  cacheData.darkColor.setFromColor(slot.darkColor);
12664
12628
  }
12665
12629
  cacheData.skipRender = cacheData.clipped = false;
12666
- const texture = attachment.region?.texture.texture || Texture$1.EMPTY;
12630
+ const texture = ((_a = attachment.region) == null ? void 0 : _a.texture.texture) || Texture$1.EMPTY;
12667
12631
  if (cacheData.texture !== texture) {
12668
12632
  cacheData.texture = texture;
12669
12633
  this.spineTexturesDirty = true;
@@ -12753,6 +12717,7 @@ var Spine$1 = class extends ViewContainer {
12753
12717
  return this.attachmentCacheData[slot.data.index][attachment.name] || this.initCachedData(slot, attachment);
12754
12718
  }
12755
12719
  initCachedData(slot, attachment) {
12720
+ var _a, _b;
12756
12721
  let vertices;
12757
12722
  if (attachment instanceof RegionAttachment) {
12758
12723
  vertices = new Float32Array(8);
@@ -12766,7 +12731,7 @@ var Spine$1 = class extends ViewContainer {
12766
12731
  darkColor: new Color(0, 0, 0, 0),
12767
12732
  darkTint: this.darkTint,
12768
12733
  skipRender: false,
12769
- texture: attachment.region?.texture.texture,
12734
+ texture: (_a = attachment.region) == null ? void 0 : _a.texture.texture,
12770
12735
  };
12771
12736
  } else {
12772
12737
  vertices = new Float32Array(attachment.worldVerticesLength);
@@ -12780,12 +12745,13 @@ var Spine$1 = class extends ViewContainer {
12780
12745
  darkColor: new Color(0, 0, 0, 0),
12781
12746
  darkTint: this.darkTint,
12782
12747
  skipRender: false,
12783
- texture: attachment.region?.texture.texture,
12748
+ texture: (_b = attachment.region) == null ? void 0 : _b.texture.texture,
12784
12749
  };
12785
12750
  }
12786
12751
  return this.attachmentCacheData[slot.data.index][attachment.name];
12787
12752
  }
12788
12753
  onViewUpdate() {
12754
+ var _a;
12789
12755
  this._didViewChangeTick++;
12790
12756
  this._boundsDirty = true;
12791
12757
  if (this.didViewUpdate) return;
@@ -12794,7 +12760,7 @@ var Spine$1 = class extends ViewContainer {
12794
12760
  if (renderGroup) {
12795
12761
  renderGroup.onChildViewUpdate(this);
12796
12762
  }
12797
- this.debug?.renderDebug(this);
12763
+ (_a = this.debug) == null ? void 0 : _a.renderDebug(this);
12798
12764
  }
12799
12765
  /**
12800
12766
  * Attaches a PixiJS container to a specified slot. This will map the world transform of the slots bone
@@ -12804,9 +12770,10 @@ var Spine$1 = class extends ViewContainer {
12804
12770
  * @param slotRef - The slot id or slot to attach to
12805
12771
  */
12806
12772
  addSlotObject(slot, container) {
12773
+ var _a;
12807
12774
  slot = this.getSlotFromRef(slot);
12808
12775
  for (const i in this._slotsObject) {
12809
- if (this._slotsObject[i]?.container === container) {
12776
+ if (((_a = this._slotsObject[i]) == null ? void 0 : _a.container) === container) {
12810
12777
  this.removeSlotObject(this._slotsObject[i].slot);
12811
12778
  }
12812
12779
  }
@@ -12824,10 +12791,11 @@ var Spine$1 = class extends ViewContainer {
12824
12791
  * @param slotOrContainer - The container, slot id or slot to detach from
12825
12792
  */
12826
12793
  removeSlotObject(slotOrContainer) {
12794
+ var _a, _b;
12827
12795
  let containerToRemove;
12828
12796
  if (slotOrContainer instanceof Container) {
12829
12797
  for (const i in this._slotsObject) {
12830
- if (this._slotsObject[i]?.container === slotOrContainer) {
12798
+ if (((_a = this._slotsObject[i]) == null ? void 0 : _a.container) === slotOrContainer) {
12831
12799
  this._slotsObject[i] = null;
12832
12800
  containerToRemove = slotOrContainer;
12833
12801
  break;
@@ -12835,7 +12803,7 @@ var Spine$1 = class extends ViewContainer {
12835
12803
  }
12836
12804
  } else {
12837
12805
  const slot = this.getSlotFromRef(slotOrContainer);
12838
- containerToRemove = this._slotsObject[slot.data.name]?.container;
12806
+ containerToRemove = (_b = this._slotsObject[slot.data.name]) == null ? void 0 : _b.container;
12839
12807
  this._slotsObject[slot.data.name] = null;
12840
12808
  }
12841
12809
  if (containerToRemove) {
@@ -12850,12 +12818,13 @@ var Spine$1 = class extends ViewContainer {
12850
12818
  * @returns - The container attached to the slot
12851
12819
  */
12852
12820
  getSlotObject(slot) {
12821
+ var _a;
12853
12822
  slot = this.getSlotFromRef(slot);
12854
- return this._slotsObject[slot.data.name]?.container;
12823
+ return (_a = this._slotsObject[slot.data.name]) == null ? void 0 : _a.container;
12855
12824
  }
12856
12825
  updateBounds() {
12857
12826
  this._boundsDirty = false;
12858
- this.skeletonBounds ||= new SkeletonBounds();
12827
+ this.skeletonBounds || (this.skeletonBounds = new SkeletonBounds());
12859
12828
  const skeletonBounds = this.skeletonBounds;
12860
12829
  skeletonBounds.update(this.skeleton, true);
12861
12830
  if (skeletonBounds.minX === Infinity) {
@@ -12947,6 +12916,7 @@ var Spine$1 = class extends ViewContainer {
12947
12916
  skeletonAsset instanceof Uint8Array ? new SkeletonBinary(attachmentLoader) : new SkeletonJson(attachmentLoader);
12948
12917
  parser.scale = scale;
12949
12918
  const skeletonData = parser.readSkeletonData(skeletonAsset);
12919
+ console.log('>>>skeletonData', skeletonData);
12950
12920
  Cache.set(cacheKey, skeletonData);
12951
12921
  return new Spine$1({
12952
12922
  skeletonData,
@@ -12956,29 +12926,31 @@ var Spine$1 = class extends ViewContainer {
12956
12926
  }
12957
12927
  };
12958
12928
  var SpineDebugRenderer = class {
12959
- registeredSpines = /* @__PURE__ */ new Map();
12960
- drawMeshHull = true;
12961
- drawMeshTriangles = true;
12962
- drawBones = true;
12963
- drawPaths = true;
12964
- drawBoundingBoxes = true;
12965
- drawClipping = true;
12966
- drawRegionAttachments = true;
12967
- drawEvents = true;
12968
- lineWidth = 1;
12969
- regionAttachmentsColor = 30975;
12970
- meshHullColor = 30975;
12971
- meshTrianglesColor = 16763904;
12972
- clippingPolygonColor = 16711935;
12973
- boundingBoxesRectColor = 65280;
12974
- boundingBoxesPolygonColor = 65280;
12975
- boundingBoxesCircleColor = 65280;
12976
- pathsCurveColor = 16711680;
12977
- pathsLineColor = 16711935;
12978
- skeletonXYColor = 16711680;
12979
- bonesColor = 61132;
12980
- eventFontSize = 24;
12981
- eventFontColor = 0;
12929
+ constructor() {
12930
+ this.registeredSpines = /* @__PURE__ */ new Map();
12931
+ this.drawMeshHull = true;
12932
+ this.drawMeshTriangles = true;
12933
+ this.drawBones = true;
12934
+ this.drawPaths = true;
12935
+ this.drawBoundingBoxes = true;
12936
+ this.drawClipping = true;
12937
+ this.drawRegionAttachments = true;
12938
+ this.drawEvents = true;
12939
+ this.lineWidth = 1;
12940
+ this.regionAttachmentsColor = 30975;
12941
+ this.meshHullColor = 30975;
12942
+ this.meshTrianglesColor = 16763904;
12943
+ this.clippingPolygonColor = 16711935;
12944
+ this.boundingBoxesRectColor = 65280;
12945
+ this.boundingBoxesPolygonColor = 65280;
12946
+ this.boundingBoxesCircleColor = 65280;
12947
+ this.pathsCurveColor = 16711680;
12948
+ this.pathsLineColor = 16711935;
12949
+ this.skeletonXYColor = 16711680;
12950
+ this.bonesColor = 61132;
12951
+ this.eventFontSize = 24;
12952
+ this.eventFontColor = 0;
12953
+ }
12982
12954
  /**
12983
12955
  * The debug is attached by force to each spine object.
12984
12956
  * So we need to create it inside the spine when we get the first update
@@ -13066,7 +13038,11 @@ var SpineDebugRenderer = class {
13066
13038
  debugDisplayObjects.pathsCurve.clear();
13067
13039
  debugDisplayObjects.pathsLine.clear();
13068
13040
  for (let len = debugDisplayObjects.bones.children.length; len > 0; len--) {
13069
- debugDisplayObjects.bones.children[len - 1].destroy({ children: true, texture: true, textureSource: true });
13041
+ debugDisplayObjects.bones.children[len - 1].destroy({
13042
+ children: true,
13043
+ texture: true,
13044
+ textureSource: true,
13045
+ });
13070
13046
  }
13071
13047
  const scale = Math.abs(spine.scale.x || spine.scale.y || 1);
13072
13048
  const lineWidth = this.lineWidth / scale;
@@ -13100,7 +13076,10 @@ var SpineDebugRenderer = class {
13100
13076
  const skeletonX = skeleton.x;
13101
13077
  const skeletonY = skeleton.y;
13102
13078
  const bones = skeleton.bones;
13103
- debugDisplayObjects.skeletonXY.strokeStyle = { width: lineWidth, color: this.skeletonXYColor };
13079
+ debugDisplayObjects.skeletonXY.strokeStyle = {
13080
+ width: lineWidth,
13081
+ color: this.skeletonXYColor,
13082
+ };
13104
13083
  for (let i = 0, len = bones.length; i < len; i++) {
13105
13084
  const bone = bones[i];
13106
13085
  const boneLen = bone.data.length;
@@ -13223,8 +13202,14 @@ var SpineDebugRenderer = class {
13223
13202
  }
13224
13203
  }
13225
13204
  }
13226
- debugDisplayObjects.meshHullLine.stroke({ width: lineWidth, color: this.meshHullColor });
13227
- debugDisplayObjects.meshTrianglesLine.stroke({ width: lineWidth, color: this.meshTrianglesColor });
13205
+ debugDisplayObjects.meshHullLine.stroke({
13206
+ width: lineWidth,
13207
+ color: this.meshHullColor,
13208
+ });
13209
+ debugDisplayObjects.meshTrianglesLine.stroke({
13210
+ width: lineWidth,
13211
+ color: this.meshTrianglesColor,
13212
+ });
13228
13213
  }
13229
13214
  drawClippingFunc(spine, debugDisplayObjects, lineWidth) {
13230
13215
  const skeleton = spine.skeleton;
@@ -13342,8 +13327,14 @@ var SpineDebugRenderer = class {
13342
13327
  y1 = y2;
13343
13328
  }
13344
13329
  }
13345
- debugDisplayObjects.pathsCurve.stroke({ width: lineWidth, color: this.pathsCurveColor });
13346
- debugDisplayObjects.pathsLine.stroke({ width: lineWidth, color: this.pathsLineColor });
13330
+ debugDisplayObjects.pathsCurve.stroke({
13331
+ width: lineWidth,
13332
+ color: this.pathsCurveColor,
13333
+ });
13334
+ debugDisplayObjects.pathsLine.stroke({
13335
+ width: lineWidth,
13336
+ color: this.pathsLineColor,
13337
+ });
13347
13338
  }
13348
13339
  unregisterSpine(spine) {
13349
13340
  if (!this.registeredSpines.has(spine)) {
@@ -13354,7 +13345,11 @@ var SpineDebugRenderer = class {
13354
13345
  return;
13355
13346
  }
13356
13347
  spine.state.removeListener(debugDisplayObjects.eventCallback);
13357
- debugDisplayObjects.parentDebugContainer.destroy({ textureSource: true, children: true, texture: true });
13348
+ debugDisplayObjects.parentDebugContainer.destroy({
13349
+ textureSource: true,
13350
+ children: true,
13351
+ texture: true,
13352
+ });
13358
13353
  this.registeredSpines.delete(spine);
13359
13354
  }
13360
13355
  };
@@ -13490,4 +13485,4 @@ class SpineSystem extends SpineSystem$1 {
13490
13485
  class Spine extends Spine$2 {
13491
13486
  }
13492
13487
 
13493
- export { Spine, SpineSystem };
13488
+ export { pixiSpine as PixiSpine, Spine, SpineSystem };