@eva/plugin-renderer-spine36 2.0.1-beta.9 → 2.0.1

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.
@@ -60,6 +60,9 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
60
60
  this.scale = 1;
61
61
  this.animationName = '';
62
62
  this.autoPlay = true;
63
+ this.keepResource = false;
64
+ this._slotGameObjects = new Map();
65
+ this._pendingSlotObjects = [];
63
66
  this.waitExecuteInfos = [];
64
67
  }
65
68
  set armature(val) {
@@ -169,12 +172,98 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
169
172
  }
170
173
  return this.armature.skeleton.findBone(boneName);
171
174
  }
175
+ addSlotObject(slot, gameObject, options) {
176
+ if (!this.armature) {
177
+ console.warn('Spine armature is not ready, cannot addSlotObject');
178
+ return;
179
+ }
180
+ if (!this._containerManager) {
181
+ console.warn('ContainerManager is not available');
182
+ return;
183
+ }
184
+ const container = this._containerManager.getContainer(gameObject.id);
185
+ if (!container) {
186
+ this._pendingSlotObjects.push({
187
+ slot,
188
+ gameObject,
189
+ options
190
+ });
191
+ return;
192
+ }
193
+ this._doAddSlotObject(slot, gameObject, container, options);
194
+ }
195
+ _doAddSlotObject(slot, gameObject, container, options) {
196
+ const wrapper = new pixi_js.Container();
197
+ wrapper.addChild(container);
198
+ this.armature.addSlotObject(slot, wrapper, options);
199
+ this._slotGameObjects.set(gameObject, {
200
+ slot,
201
+ wrapper
202
+ });
203
+ this._syncTransformTree(gameObject);
204
+ }
205
+ _syncTransformTree(gameObject) {
206
+ var _a;
207
+ if (!this._containerManager) return;
208
+ this._containerManager.updateTransform({
209
+ name: gameObject.id,
210
+ transform: gameObject.transform
211
+ });
212
+ if ((_a = gameObject.transform) === null || _a === void 0 ? void 0 : _a.children) {
213
+ for (const childTransform of gameObject.transform.children) {
214
+ if (childTransform.gameObject) {
215
+ this._syncTransformTree(childTransform.gameObject);
216
+ }
217
+ }
218
+ }
219
+ }
220
+ _flushPendingSlotObjects() {
221
+ if (this._pendingSlotObjects.length === 0) return;
222
+ if (!this.armature || !this._containerManager) return;
223
+ const still = [];
224
+ for (const pending of this._pendingSlotObjects) {
225
+ const container = this._containerManager.getContainer(pending.gameObject.id);
226
+ if (container) {
227
+ this._doAddSlotObject(pending.slot, pending.gameObject, container, pending.options);
228
+ } else {
229
+ still.push(pending);
230
+ }
231
+ }
232
+ this._pendingSlotObjects = still;
233
+ }
234
+ removeSlotObject(gameObject) {
235
+ this._pendingSlotObjects = this._pendingSlotObjects.filter(p => p.gameObject !== gameObject);
236
+ const entry = this._slotGameObjects.get(gameObject);
237
+ if (entry && this.armature) {
238
+ this.armature.removeSlotObject(entry.wrapper);
239
+ entry.wrapper.destroy({
240
+ children: false
241
+ });
242
+ }
243
+ this._slotGameObjects.delete(gameObject);
244
+ }
245
+ _destroySlotGameObjects() {
246
+ for (const [gameObject, entry] of this._slotGameObjects) {
247
+ if (!gameObject.destroyed) {
248
+ if (this.armature) {
249
+ this.armature.removeSlotObject(entry.wrapper);
250
+ }
251
+ entry.wrapper.destroy({
252
+ children: false
253
+ });
254
+ gameObject.destroy();
255
+ }
256
+ }
257
+ this._slotGameObjects.clear();
258
+ this._pendingSlotObjects = [];
259
+ }
172
260
  }
173
261
  Spine$2.componentName = 'Spine';
174
262
  __decorate([type('string')], Spine$2.prototype, "resource", void 0);
175
263
  __decorate([type('number')], Spine$2.prototype, "scale", void 0);
176
264
  __decorate([type('string')], Spine$2.prototype, "animationName", void 0);
177
265
  __decorate([type('boolean')], Spine$2.prototype, "autoPlay", void 0);
266
+ __decorate([type('boolean')], Spine$2.prototype, "keepResource", void 0);
178
267
  let dataMap = {};
179
268
  function createSpineData(name, data, scale, pixiSpine) {
180
269
  const skeletonAsset = data.ske;
@@ -214,14 +303,6 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
214
303
  data.ref--;
215
304
  setTimeout(() => __awaiter(this, void 0, void 0, function* () {
216
305
  if (data.ref <= 0) {
217
- yield pixi_js.Assets.unload([res.src.image.url, res.src.atlas.url, res.src.ske.url]);
218
- const resolver = pixi_js.Assets.resolver;
219
- delete resolver._assetMap[res.src.image.url];
220
- delete resolver._assetMap[res.src.atlas.url];
221
- delete resolver._assetMap[res.src.ske.url];
222
- delete resolver._resolverHash[res.src.image.url];
223
- delete resolver._resolverHash[res.src.atlas.url];
224
- delete resolver._resolverHash[res.src.ske.url];
225
306
  eva_js.resource.destroy(resourceName);
226
307
  delete dataMap[resourceName];
227
308
  }
@@ -232,6 +313,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
232
313
  constructor() {
233
314
  super(...arguments);
234
315
  this.armatures = {};
316
+ this._spineComponents = {};
235
317
  }
236
318
  init({
237
319
  pixiSpine
@@ -277,6 +359,9 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
277
359
  for (let key in this.armatures) {
278
360
  this.armatures[key].update(e.deltaTime * 0.001);
279
361
  }
362
+ for (let key in this._spineComponents) {
363
+ this._spineComponents[key]._flushPendingSlotObjects();
364
+ }
280
365
  super.update();
281
366
  }
282
367
  componentChanged(changed) {
@@ -297,7 +382,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
297
382
  });
298
383
  }
299
384
  add(changed, count) {
300
- var _a, _b;
385
+ var _a, _b, _c;
301
386
  return __awaiter(this, void 0, void 0, function* () {
302
387
  const component = changed.component;
303
388
  clearTimeout(component.addHandler);
@@ -334,6 +419,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
334
419
  autoUpdate: false
335
420
  });
336
421
  this.armatures[changed.gameObject.id] = armature;
422
+ this._spineComponents[changed.gameObject.id] = component;
337
423
  if (changed.gameObject && changed.gameObject.transform) {
338
424
  const tran = changed.gameObject.transform;
339
425
  armature.x = tran.size.width * tran.origin.x;
@@ -341,6 +427,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
341
427
  }
342
428
  container.addChildAt(armature, 0);
343
429
  armature.update();
430
+ component._containerManager = (_c = this.renderSystem) === null || _c === void 0 ? void 0 : _c.containerManager;
344
431
  component.armature = armature;
345
432
  component.emit('loaded', {
346
433
  resource: component.resource
@@ -392,15 +479,19 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
392
479
  container.removeChild(armature);
393
480
  }
394
481
  if (component.armature) {
482
+ component._destroySlotGameObjects();
395
483
  component.armature.destroy({
396
484
  children: true
397
485
  });
398
- const res = yield eva_js.resource.getResource(component.lastResource);
399
- ((_d = (_c = res.data) === null || _c === void 0 ? void 0 : _c.image) === null || _d === void 0 ? void 0 : _d.src) || ((_f = (_e = res.data) === null || _e === void 0 ? void 0 : _e.image) === null || _f === void 0 ? void 0 : _f.label);
400
- releaseSpineData(res);
486
+ if (!component.keepResource) {
487
+ const res = yield eva_js.resource.getResource(component.lastResource);
488
+ ((_d = (_c = res.data) === null || _c === void 0 ? void 0 : _c.image) === null || _d === void 0 ? void 0 : _d.src) || ((_f = (_e = res.data) === null || _e === void 0 ? void 0 : _e.image) === null || _f === void 0 ? void 0 : _f.label);
489
+ releaseSpineData(res);
490
+ }
401
491
  }
402
492
  component.armature = null;
403
493
  delete this.armatures[changed.gameObject.id];
494
+ delete this._spineComponents[changed.gameObject.id];
404
495
  if (changed.type === eva_js.OBSERVER_TYPE.CHANGE) ;
405
496
  });
406
497
  }
@@ -431,7 +522,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
431
522
  return a;
432
523
  };
433
524
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
434
- var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== 'symbol' ? key + '' : key, value);
525
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
435
526
  var __async = (__this, __arguments, generator) => {
436
527
  return new Promise((resolve, reject) => {
437
528
  var fulfilled = value => {
@@ -452,26 +543,26 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
452
543
  step((generator = generator.apply(__this, __arguments)).next());
453
544
  });
454
545
  };
455
- if (typeof window !== 'undefined' && window.PIXI) {
546
+ if (typeof window !== "undefined" && window.PIXI) {
456
547
  const prevRequire = window.require;
457
548
  window.require = x => {
458
- if (prevRequire) return prevRequire(x);else if (x.startsWith('@pixi/') || x.startsWith('pixi.js')) return window.PIXI;
549
+ if (prevRequire) return prevRequire(x);else if (x.startsWith("@pixi/") || x.startsWith("pixi.js")) return window.PIXI;
459
550
  };
460
551
  }
461
552
  class Attachment {
462
553
  constructor(name) {
463
- __publicField(this, 'name');
464
- if (name == null) throw new Error('name cannot be null.');
554
+ __publicField(this, "name");
555
+ if (name == null) throw new Error("name cannot be null.");
465
556
  this.name = name;
466
557
  }
467
558
  }
468
559
  const _VertexAttachment = class _VertexAttachment extends Attachment {
469
560
  constructor(name) {
470
561
  super(name);
471
- __publicField(this, 'id', (_VertexAttachment.nextID++ & 65535) << 11);
472
- __publicField(this, 'bones');
473
- __publicField(this, 'vertices');
474
- __publicField(this, 'worldVerticesLength', 0);
562
+ __publicField(this, "id", (_VertexAttachment.nextID++ & 65535) << 11);
563
+ __publicField(this, "bones");
564
+ __publicField(this, "vertices");
565
+ __publicField(this, "worldVerticesLength", 0);
475
566
  }
476
567
  computeWorldVertices(slot, start, count, worldVertices, offset, stride) {
477
568
  count = offset + (count >> 1) * stride;
@@ -545,11 +636,11 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
545
636
  return this == sourceAttachment;
546
637
  }
547
638
  };
548
- __publicField(_VertexAttachment, 'nextID', 0);
639
+ __publicField(_VertexAttachment, "nextID", 0);
549
640
  let VertexAttachment = _VertexAttachment;
550
641
  class IntSet {
551
642
  constructor() {
552
- __publicField(this, 'array', new Array());
643
+ __publicField(this, "array", new Array());
553
644
  }
554
645
  add(value) {
555
646
  let contains = this.contains(value);
@@ -589,7 +680,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
589
680
  return this;
590
681
  }
591
682
  setFromString(hex) {
592
- hex = hex.charAt(0) == '#' ? hex.substr(1) : hex;
683
+ hex = hex.charAt(0) == "#" ? hex.substr(1) : hex;
593
684
  this.r = parseInt(hex.substr(0, 2), 16) / 255;
594
685
  this.g = parseInt(hex.substr(2, 2), 16) / 255;
595
686
  this.b = parseInt(hex.substr(4, 2), 16) / 255;
@@ -612,11 +703,11 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
612
703
  return this;
613
704
  }
614
705
  };
615
- __publicField(_Color, 'WHITE', new _Color(1, 1, 1, 1));
616
- __publicField(_Color, 'RED', new _Color(1, 0, 0, 1));
617
- __publicField(_Color, 'GREEN', new _Color(0, 1, 0, 1));
618
- __publicField(_Color, 'BLUE', new _Color(0, 0, 1, 1));
619
- __publicField(_Color, 'MAGENTA', new _Color(1, 0, 1, 1));
706
+ __publicField(_Color, "WHITE", new _Color(1, 1, 1, 1));
707
+ __publicField(_Color, "RED", new _Color(1, 0, 0, 1));
708
+ __publicField(_Color, "GREEN", new _Color(0, 1, 0, 1));
709
+ __publicField(_Color, "BLUE", new _Color(0, 0, 1, 1));
710
+ __publicField(_Color, "MAGENTA", new _Color(1, 0, 1, 1));
620
711
  let Color = _Color;
621
712
  const _MathUtils = class _MathUtils {
622
713
  static clamp(value, min, max) {
@@ -650,12 +741,12 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
650
741
  return max - Math.sqrt((1 - u) * d * (max - mode));
651
742
  }
652
743
  };
653
- __publicField(_MathUtils, 'PI', 3.1415927);
654
- __publicField(_MathUtils, 'PI2', _MathUtils.PI * 2);
655
- __publicField(_MathUtils, 'radiansToDegrees', 180 / _MathUtils.PI);
656
- __publicField(_MathUtils, 'radDeg', _MathUtils.radiansToDegrees);
657
- __publicField(_MathUtils, 'degreesToRadians', _MathUtils.PI / 180);
658
- __publicField(_MathUtils, 'degRad', _MathUtils.degreesToRadians);
744
+ __publicField(_MathUtils, "PI", 3.1415927);
745
+ __publicField(_MathUtils, "PI2", _MathUtils.PI * 2);
746
+ __publicField(_MathUtils, "radiansToDegrees", 180 / _MathUtils.PI);
747
+ __publicField(_MathUtils, "radDeg", _MathUtils.radiansToDegrees);
748
+ __publicField(_MathUtils, "degreesToRadians", _MathUtils.PI / 180);
749
+ __publicField(_MathUtils, "degRad", _MathUtils.degreesToRadians);
659
750
  let MathUtils = _MathUtils;
660
751
  class Interpolation {
661
752
  apply(start, end, a) {
@@ -665,7 +756,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
665
756
  class Pow extends Interpolation {
666
757
  constructor(power) {
667
758
  super();
668
- __publicField(this, 'power', 2);
759
+ __publicField(this, "power", 2);
669
760
  this.power = power;
670
761
  }
671
762
  applyInternal(a) {
@@ -731,20 +822,20 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
731
822
  }
732
823
  static webkit602BugfixHelper(alpha, pose) {}
733
824
  };
734
- __publicField(_Utils, 'SUPPORTS_TYPED_ARRAYS', typeof Float32Array !== 'undefined');
825
+ __publicField(_Utils, "SUPPORTS_TYPED_ARRAYS", typeof Float32Array !== "undefined");
735
826
  let Utils = _Utils;
736
827
  class DebugUtils {
737
828
  static logBones(skeleton) {
738
829
  for (let i = 0; i < skeleton.bones.length; i++) {
739
830
  let bone = skeleton.bones[i];
740
- console.log(bone.data.name + ', ' + bone.a + ', ' + bone.b + ', ' + bone.c + ', ' + bone.d + ', ' + bone.worldX + ', ' + bone.worldY);
831
+ console.log(bone.data.name + ", " + bone.a + ", " + bone.b + ", " + bone.c + ", " + bone.d + ", " + bone.worldX + ", " + bone.worldY);
741
832
  }
742
833
  }
743
834
  }
744
835
  class Pool {
745
836
  constructor(instantiator) {
746
- __publicField(this, 'items', new Array());
747
- __publicField(this, 'instantiator');
837
+ __publicField(this, "items", new Array());
838
+ __publicField(this, "instantiator");
748
839
  this.instantiator = instantiator;
749
840
  }
750
841
  obtain() {
@@ -790,13 +881,13 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
790
881
  }
791
882
  class TimeKeeper {
792
883
  constructor() {
793
- __publicField(this, 'maxDelta', 0.064);
794
- __publicField(this, 'framesPerSecond', 0);
795
- __publicField(this, 'delta', 0);
796
- __publicField(this, 'totalTime', 0);
797
- __publicField(this, 'lastTime', Date.now() / 1e3);
798
- __publicField(this, 'frameCount', 0);
799
- __publicField(this, 'frameTime', 0);
884
+ __publicField(this, "maxDelta", 0.064);
885
+ __publicField(this, "framesPerSecond", 0);
886
+ __publicField(this, "delta", 0);
887
+ __publicField(this, "totalTime", 0);
888
+ __publicField(this, "lastTime", Date.now() / 1e3);
889
+ __publicField(this, "frameCount", 0);
890
+ __publicField(this, "frameTime", 0);
800
891
  }
801
892
  update() {
802
893
  var now = Date.now() / 1e3;
@@ -815,11 +906,11 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
815
906
  }
816
907
  class WindowedMean {
817
908
  constructor(windowSize = 32) {
818
- __publicField(this, 'values');
819
- __publicField(this, 'addedValues', 0);
820
- __publicField(this, 'lastValue', 0);
821
- __publicField(this, 'mean', 0);
822
- __publicField(this, 'dirty', true);
909
+ __publicField(this, "values");
910
+ __publicField(this, "addedValues", 0);
911
+ __publicField(this, "lastValue", 0);
912
+ __publicField(this, "mean", 0);
913
+ __publicField(this, "dirty", true);
823
914
  this.values = new Array(windowSize);
824
915
  }
825
916
  hasEnoughData() {
@@ -849,17 +940,17 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
849
940
  }
850
941
  class Animation {
851
942
  constructor(name, timelines, duration) {
852
- __publicField(this, 'name');
853
- __publicField(this, 'timelines');
854
- __publicField(this, 'duration');
855
- if (name == null) throw new Error('name cannot be null.');
856
- if (timelines == null) throw new Error('timelines cannot be null.');
943
+ __publicField(this, "name");
944
+ __publicField(this, "timelines");
945
+ __publicField(this, "duration");
946
+ if (name == null) throw new Error("name cannot be null.");
947
+ if (timelines == null) throw new Error("timelines cannot be null.");
857
948
  this.name = name;
858
949
  this.timelines = timelines;
859
950
  this.duration = duration;
860
951
  }
861
952
  apply(skeleton, lastTime, time, loop, events, alpha, pose, direction) {
862
- if (skeleton == null) throw new Error('skeleton cannot be null.');
953
+ if (skeleton == null) throw new Error("skeleton cannot be null.");
863
954
  if (loop && this.duration != 0) {
864
955
  time %= this.duration;
865
956
  if (lastTime > 0) lastTime %= this.duration;
@@ -884,38 +975,38 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
884
975
  }
885
976
  }
886
977
  var MixPose = (MixPose2 => {
887
- MixPose2[MixPose2['setup'] = 0] = 'setup';
888
- MixPose2[MixPose2['current'] = 1] = 'current';
889
- MixPose2[MixPose2['currentLayered'] = 2] = 'currentLayered';
978
+ MixPose2[MixPose2["setup"] = 0] = "setup";
979
+ MixPose2[MixPose2["current"] = 1] = "current";
980
+ MixPose2[MixPose2["currentLayered"] = 2] = "currentLayered";
890
981
  return MixPose2;
891
982
  })(MixPose || {});
892
983
  var MixDirection = (MixDirection2 => {
893
- MixDirection2[MixDirection2['in'] = 0] = 'in';
894
- MixDirection2[MixDirection2['out'] = 1] = 'out';
984
+ MixDirection2[MixDirection2["in"] = 0] = "in";
985
+ MixDirection2[MixDirection2["out"] = 1] = "out";
895
986
  return MixDirection2;
896
987
  })(MixDirection || {});
897
988
  var TimelineType = (TimelineType2 => {
898
- TimelineType2[TimelineType2['rotate'] = 0] = 'rotate';
899
- TimelineType2[TimelineType2['translate'] = 1] = 'translate';
900
- TimelineType2[TimelineType2['scale'] = 2] = 'scale';
901
- TimelineType2[TimelineType2['shear'] = 3] = 'shear';
902
- TimelineType2[TimelineType2['attachment'] = 4] = 'attachment';
903
- TimelineType2[TimelineType2['color'] = 5] = 'color';
904
- TimelineType2[TimelineType2['deform'] = 6] = 'deform';
905
- TimelineType2[TimelineType2['event'] = 7] = 'event';
906
- TimelineType2[TimelineType2['drawOrder'] = 8] = 'drawOrder';
907
- TimelineType2[TimelineType2['ikConstraint'] = 9] = 'ikConstraint';
908
- TimelineType2[TimelineType2['transformConstraint'] = 10] = 'transformConstraint';
909
- TimelineType2[TimelineType2['pathConstraintPosition'] = 11] = 'pathConstraintPosition';
910
- TimelineType2[TimelineType2['pathConstraintSpacing'] = 12] = 'pathConstraintSpacing';
911
- TimelineType2[TimelineType2['pathConstraintMix'] = 13] = 'pathConstraintMix';
912
- TimelineType2[TimelineType2['twoColor'] = 14] = 'twoColor';
989
+ TimelineType2[TimelineType2["rotate"] = 0] = "rotate";
990
+ TimelineType2[TimelineType2["translate"] = 1] = "translate";
991
+ TimelineType2[TimelineType2["scale"] = 2] = "scale";
992
+ TimelineType2[TimelineType2["shear"] = 3] = "shear";
993
+ TimelineType2[TimelineType2["attachment"] = 4] = "attachment";
994
+ TimelineType2[TimelineType2["color"] = 5] = "color";
995
+ TimelineType2[TimelineType2["deform"] = 6] = "deform";
996
+ TimelineType2[TimelineType2["event"] = 7] = "event";
997
+ TimelineType2[TimelineType2["drawOrder"] = 8] = "drawOrder";
998
+ TimelineType2[TimelineType2["ikConstraint"] = 9] = "ikConstraint";
999
+ TimelineType2[TimelineType2["transformConstraint"] = 10] = "transformConstraint";
1000
+ TimelineType2[TimelineType2["pathConstraintPosition"] = 11] = "pathConstraintPosition";
1001
+ TimelineType2[TimelineType2["pathConstraintSpacing"] = 12] = "pathConstraintSpacing";
1002
+ TimelineType2[TimelineType2["pathConstraintMix"] = 13] = "pathConstraintMix";
1003
+ TimelineType2[TimelineType2["twoColor"] = 14] = "twoColor";
913
1004
  return TimelineType2;
914
1005
  })(TimelineType || {});
915
1006
  const _CurveTimeline = class _CurveTimeline {
916
1007
  constructor(frameCount) {
917
- __publicField(this, 'curves');
918
- if (frameCount <= 0) throw new Error('frameCount must be > 0: ' + frameCount);
1008
+ __publicField(this, "curves");
1009
+ if (frameCount <= 0) throw new Error("frameCount must be > 0: " + frameCount);
919
1010
  this.curves = Utils.newFloatArray((frameCount - 1) * _CurveTimeline.BEZIER_SIZE);
920
1011
  }
921
1012
  getFrameCount() {
@@ -987,16 +1078,16 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
987
1078
  return y + (1 - y) * (percent - x) / (1 - x);
988
1079
  }
989
1080
  };
990
- __publicField(_CurveTimeline, 'LINEAR', 0);
991
- __publicField(_CurveTimeline, 'STEPPED', 1);
992
- __publicField(_CurveTimeline, 'BEZIER', 2);
993
- __publicField(_CurveTimeline, 'BEZIER_SIZE', 10 * 2 - 1);
1081
+ __publicField(_CurveTimeline, "LINEAR", 0);
1082
+ __publicField(_CurveTimeline, "STEPPED", 1);
1083
+ __publicField(_CurveTimeline, "BEZIER", 2);
1084
+ __publicField(_CurveTimeline, "BEZIER_SIZE", 10 * 2 - 1);
994
1085
  let CurveTimeline = _CurveTimeline;
995
1086
  const _RotateTimeline = class _RotateTimeline extends CurveTimeline {
996
1087
  constructor(frameCount) {
997
1088
  super(frameCount);
998
- __publicField(this, 'boneIndex');
999
- __publicField(this, 'frames');
1089
+ __publicField(this, "boneIndex");
1090
+ __publicField(this, "frames");
1000
1091
  this.frames = Utils.newFloatArray(frameCount << 1);
1001
1092
  }
1002
1093
  getPropertyId() {
@@ -1047,16 +1138,16 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
1047
1138
  }
1048
1139
  }
1049
1140
  };
1050
- __publicField(_RotateTimeline, 'ENTRIES', 2);
1051
- __publicField(_RotateTimeline, 'PREV_TIME', -2);
1052
- __publicField(_RotateTimeline, 'PREV_ROTATION', -1);
1053
- __publicField(_RotateTimeline, 'ROTATION', 1);
1141
+ __publicField(_RotateTimeline, "ENTRIES", 2);
1142
+ __publicField(_RotateTimeline, "PREV_TIME", -2);
1143
+ __publicField(_RotateTimeline, "PREV_ROTATION", -1);
1144
+ __publicField(_RotateTimeline, "ROTATION", 1);
1054
1145
  let RotateTimeline = _RotateTimeline;
1055
1146
  const _TranslateTimeline = class _TranslateTimeline extends CurveTimeline {
1056
1147
  constructor(frameCount) {
1057
1148
  super(frameCount);
1058
- __publicField(this, 'boneIndex');
1059
- __publicField(this, 'frames');
1149
+ __publicField(this, "boneIndex");
1150
+ __publicField(this, "frames");
1060
1151
  this.frames = Utils.newFloatArray(frameCount * _TranslateTimeline.ENTRIES);
1061
1152
  }
1062
1153
  getPropertyId() {
@@ -1106,12 +1197,12 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
1106
1197
  }
1107
1198
  }
1108
1199
  };
1109
- __publicField(_TranslateTimeline, 'ENTRIES', 3);
1110
- __publicField(_TranslateTimeline, 'PREV_TIME', -3);
1111
- __publicField(_TranslateTimeline, 'PREV_X', -2);
1112
- __publicField(_TranslateTimeline, 'PREV_Y', -1);
1113
- __publicField(_TranslateTimeline, 'X', 1);
1114
- __publicField(_TranslateTimeline, 'Y', 2);
1200
+ __publicField(_TranslateTimeline, "ENTRIES", 3);
1201
+ __publicField(_TranslateTimeline, "PREV_TIME", -3);
1202
+ __publicField(_TranslateTimeline, "PREV_X", -2);
1203
+ __publicField(_TranslateTimeline, "PREV_Y", -1);
1204
+ __publicField(_TranslateTimeline, "X", 1);
1205
+ __publicField(_TranslateTimeline, "Y", 2);
1115
1206
  let TranslateTimeline = _TranslateTimeline;
1116
1207
  class ScaleTimeline extends TranslateTimeline {
1117
1208
  constructor(frameCount) {
@@ -1222,8 +1313,8 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
1222
1313
  const _ColorTimeline = class _ColorTimeline extends CurveTimeline {
1223
1314
  constructor(frameCount) {
1224
1315
  super(frameCount);
1225
- __publicField(this, 'slotIndex');
1226
- __publicField(this, 'frames');
1316
+ __publicField(this, "slotIndex");
1317
+ __publicField(this, "frames");
1227
1318
  this.frames = Utils.newFloatArray(frameCount * _ColorTimeline.ENTRIES);
1228
1319
  }
1229
1320
  getPropertyId() {
@@ -1282,22 +1373,22 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
1282
1373
  }
1283
1374
  }
1284
1375
  };
1285
- __publicField(_ColorTimeline, 'ENTRIES', 5);
1286
- __publicField(_ColorTimeline, 'PREV_TIME', -5);
1287
- __publicField(_ColorTimeline, 'PREV_R', -4);
1288
- __publicField(_ColorTimeline, 'PREV_G', -3);
1289
- __publicField(_ColorTimeline, 'PREV_B', -2);
1290
- __publicField(_ColorTimeline, 'PREV_A', -1);
1291
- __publicField(_ColorTimeline, 'R', 1);
1292
- __publicField(_ColorTimeline, 'G', 2);
1293
- __publicField(_ColorTimeline, 'B', 3);
1294
- __publicField(_ColorTimeline, 'A', 4);
1376
+ __publicField(_ColorTimeline, "ENTRIES", 5);
1377
+ __publicField(_ColorTimeline, "PREV_TIME", -5);
1378
+ __publicField(_ColorTimeline, "PREV_R", -4);
1379
+ __publicField(_ColorTimeline, "PREV_G", -3);
1380
+ __publicField(_ColorTimeline, "PREV_B", -2);
1381
+ __publicField(_ColorTimeline, "PREV_A", -1);
1382
+ __publicField(_ColorTimeline, "R", 1);
1383
+ __publicField(_ColorTimeline, "G", 2);
1384
+ __publicField(_ColorTimeline, "B", 3);
1385
+ __publicField(_ColorTimeline, "A", 4);
1295
1386
  let ColorTimeline = _ColorTimeline;
1296
1387
  const _TwoColorTimeline = class _TwoColorTimeline extends CurveTimeline {
1297
1388
  constructor(frameCount) {
1298
1389
  super(frameCount);
1299
- __publicField(this, 'slotIndex');
1300
- __publicField(this, 'frames');
1390
+ __publicField(this, "slotIndex");
1391
+ __publicField(this, "frames");
1301
1392
  this.frames = Utils.newFloatArray(frameCount * _TwoColorTimeline.ENTRIES);
1302
1393
  }
1303
1394
  getPropertyId() {
@@ -1383,28 +1474,28 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
1383
1474
  }
1384
1475
  }
1385
1476
  };
1386
- __publicField(_TwoColorTimeline, 'ENTRIES', 8);
1387
- __publicField(_TwoColorTimeline, 'PREV_TIME', -8);
1388
- __publicField(_TwoColorTimeline, 'PREV_R', -7);
1389
- __publicField(_TwoColorTimeline, 'PREV_G', -6);
1390
- __publicField(_TwoColorTimeline, 'PREV_B', -5);
1391
- __publicField(_TwoColorTimeline, 'PREV_A', -4);
1392
- __publicField(_TwoColorTimeline, 'PREV_R2', -3);
1393
- __publicField(_TwoColorTimeline, 'PREV_G2', -2);
1394
- __publicField(_TwoColorTimeline, 'PREV_B2', -1);
1395
- __publicField(_TwoColorTimeline, 'R', 1);
1396
- __publicField(_TwoColorTimeline, 'G', 2);
1397
- __publicField(_TwoColorTimeline, 'B', 3);
1398
- __publicField(_TwoColorTimeline, 'A', 4);
1399
- __publicField(_TwoColorTimeline, 'R2', 5);
1400
- __publicField(_TwoColorTimeline, 'G2', 6);
1401
- __publicField(_TwoColorTimeline, 'B2', 7);
1477
+ __publicField(_TwoColorTimeline, "ENTRIES", 8);
1478
+ __publicField(_TwoColorTimeline, "PREV_TIME", -8);
1479
+ __publicField(_TwoColorTimeline, "PREV_R", -7);
1480
+ __publicField(_TwoColorTimeline, "PREV_G", -6);
1481
+ __publicField(_TwoColorTimeline, "PREV_B", -5);
1482
+ __publicField(_TwoColorTimeline, "PREV_A", -4);
1483
+ __publicField(_TwoColorTimeline, "PREV_R2", -3);
1484
+ __publicField(_TwoColorTimeline, "PREV_G2", -2);
1485
+ __publicField(_TwoColorTimeline, "PREV_B2", -1);
1486
+ __publicField(_TwoColorTimeline, "R", 1);
1487
+ __publicField(_TwoColorTimeline, "G", 2);
1488
+ __publicField(_TwoColorTimeline, "B", 3);
1489
+ __publicField(_TwoColorTimeline, "A", 4);
1490
+ __publicField(_TwoColorTimeline, "R2", 5);
1491
+ __publicField(_TwoColorTimeline, "G2", 6);
1492
+ __publicField(_TwoColorTimeline, "B2", 7);
1402
1493
  let TwoColorTimeline = _TwoColorTimeline;
1403
1494
  class AttachmentTimeline {
1404
1495
  constructor(frameCount) {
1405
- __publicField(this, 'slotIndex');
1406
- __publicField(this, 'frames');
1407
- __publicField(this, 'attachmentNames');
1496
+ __publicField(this, "slotIndex");
1497
+ __publicField(this, "frames");
1498
+ __publicField(this, "attachmentNames");
1408
1499
  this.frames = Utils.newFloatArray(frameCount);
1409
1500
  this.attachmentNames = new Array(frameCount);
1410
1501
  }
@@ -1443,10 +1534,10 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
1443
1534
  class DeformTimeline extends CurveTimeline {
1444
1535
  constructor(frameCount) {
1445
1536
  super(frameCount);
1446
- __publicField(this, 'slotIndex');
1447
- __publicField(this, 'attachment');
1448
- __publicField(this, 'frames');
1449
- __publicField(this, 'frameVertices');
1537
+ __publicField(this, "slotIndex");
1538
+ __publicField(this, "attachment");
1539
+ __publicField(this, "frames");
1540
+ __publicField(this, "frameVertices");
1450
1541
  this.frames = Utils.newFloatArray(frameCount);
1451
1542
  this.frameVertices = new Array(frameCount);
1452
1543
  if (zeros == null) zeros = Utils.newFloatArray(64);
@@ -1545,8 +1636,8 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
1545
1636
  }
1546
1637
  class EventTimeline {
1547
1638
  constructor(frameCount) {
1548
- __publicField(this, 'frames');
1549
- __publicField(this, 'events');
1639
+ __publicField(this, "frames");
1640
+ __publicField(this, "events");
1550
1641
  this.frames = Utils.newFloatArray(frameCount);
1551
1642
  this.events = new Array(frameCount);
1552
1643
  }
@@ -1583,8 +1674,8 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
1583
1674
  }
1584
1675
  class DrawOrderTimeline {
1585
1676
  constructor(frameCount) {
1586
- __publicField(this, 'frames');
1587
- __publicField(this, 'drawOrders');
1677
+ __publicField(this, "frames");
1678
+ __publicField(this, "drawOrders");
1588
1679
  this.frames = Utils.newFloatArray(frameCount);
1589
1680
  this.drawOrders = new Array(frameCount);
1590
1681
  }
@@ -1621,8 +1712,8 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
1621
1712
  const _IkConstraintTimeline = class _IkConstraintTimeline extends CurveTimeline {
1622
1713
  constructor(frameCount) {
1623
1714
  super(frameCount);
1624
- __publicField(this, 'ikConstraintIndex');
1625
- __publicField(this, 'frames');
1715
+ __publicField(this, "ikConstraintIndex");
1716
+ __publicField(this, "frames");
1626
1717
  this.frames = Utils.newFloatArray(frameCount * _IkConstraintTimeline.ENTRIES);
1627
1718
  }
1628
1719
  getPropertyId() {
@@ -1672,18 +1763,18 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
1672
1763
  }
1673
1764
  }
1674
1765
  };
1675
- __publicField(_IkConstraintTimeline, 'ENTRIES', 3);
1676
- __publicField(_IkConstraintTimeline, 'PREV_TIME', -3);
1677
- __publicField(_IkConstraintTimeline, 'PREV_MIX', -2);
1678
- __publicField(_IkConstraintTimeline, 'PREV_BEND_DIRECTION', -1);
1679
- __publicField(_IkConstraintTimeline, 'MIX', 1);
1680
- __publicField(_IkConstraintTimeline, 'BEND_DIRECTION', 2);
1766
+ __publicField(_IkConstraintTimeline, "ENTRIES", 3);
1767
+ __publicField(_IkConstraintTimeline, "PREV_TIME", -3);
1768
+ __publicField(_IkConstraintTimeline, "PREV_MIX", -2);
1769
+ __publicField(_IkConstraintTimeline, "PREV_BEND_DIRECTION", -1);
1770
+ __publicField(_IkConstraintTimeline, "MIX", 1);
1771
+ __publicField(_IkConstraintTimeline, "BEND_DIRECTION", 2);
1681
1772
  let IkConstraintTimeline = _IkConstraintTimeline;
1682
1773
  const _TransformConstraintTimeline = class _TransformConstraintTimeline extends CurveTimeline {
1683
1774
  constructor(frameCount) {
1684
1775
  super(frameCount);
1685
- __publicField(this, 'transformConstraintIndex');
1686
- __publicField(this, 'frames');
1776
+ __publicField(this, "transformConstraintIndex");
1777
+ __publicField(this, "frames");
1687
1778
  this.frames = Utils.newFloatArray(frameCount * _TransformConstraintTimeline.ENTRIES);
1688
1779
  }
1689
1780
  getPropertyId() {
@@ -1754,22 +1845,22 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
1754
1845
  }
1755
1846
  }
1756
1847
  };
1757
- __publicField(_TransformConstraintTimeline, 'ENTRIES', 5);
1758
- __publicField(_TransformConstraintTimeline, 'PREV_TIME', -5);
1759
- __publicField(_TransformConstraintTimeline, 'PREV_ROTATE', -4);
1760
- __publicField(_TransformConstraintTimeline, 'PREV_TRANSLATE', -3);
1761
- __publicField(_TransformConstraintTimeline, 'PREV_SCALE', -2);
1762
- __publicField(_TransformConstraintTimeline, 'PREV_SHEAR', -1);
1763
- __publicField(_TransformConstraintTimeline, 'ROTATE', 1);
1764
- __publicField(_TransformConstraintTimeline, 'TRANSLATE', 2);
1765
- __publicField(_TransformConstraintTimeline, 'SCALE', 3);
1766
- __publicField(_TransformConstraintTimeline, 'SHEAR', 4);
1848
+ __publicField(_TransformConstraintTimeline, "ENTRIES", 5);
1849
+ __publicField(_TransformConstraintTimeline, "PREV_TIME", -5);
1850
+ __publicField(_TransformConstraintTimeline, "PREV_ROTATE", -4);
1851
+ __publicField(_TransformConstraintTimeline, "PREV_TRANSLATE", -3);
1852
+ __publicField(_TransformConstraintTimeline, "PREV_SCALE", -2);
1853
+ __publicField(_TransformConstraintTimeline, "PREV_SHEAR", -1);
1854
+ __publicField(_TransformConstraintTimeline, "ROTATE", 1);
1855
+ __publicField(_TransformConstraintTimeline, "TRANSLATE", 2);
1856
+ __publicField(_TransformConstraintTimeline, "SCALE", 3);
1857
+ __publicField(_TransformConstraintTimeline, "SHEAR", 4);
1767
1858
  let TransformConstraintTimeline = _TransformConstraintTimeline;
1768
1859
  const _PathConstraintPositionTimeline = class _PathConstraintPositionTimeline extends CurveTimeline {
1769
1860
  constructor(frameCount) {
1770
1861
  super(frameCount);
1771
- __publicField(this, 'pathConstraintIndex');
1772
- __publicField(this, 'frames');
1862
+ __publicField(this, "pathConstraintIndex");
1863
+ __publicField(this, "frames");
1773
1864
  this.frames = Utils.newFloatArray(frameCount * _PathConstraintPositionTimeline.ENTRIES);
1774
1865
  }
1775
1866
  getPropertyId() {
@@ -1804,10 +1895,10 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
1804
1895
  if (pose == 0) constraint.position = constraint.data.position + (position - constraint.data.position) * alpha;else constraint.position += (position - constraint.position) * alpha;
1805
1896
  }
1806
1897
  };
1807
- __publicField(_PathConstraintPositionTimeline, 'ENTRIES', 2);
1808
- __publicField(_PathConstraintPositionTimeline, 'PREV_TIME', -2);
1809
- __publicField(_PathConstraintPositionTimeline, 'PREV_VALUE', -1);
1810
- __publicField(_PathConstraintPositionTimeline, 'VALUE', 1);
1898
+ __publicField(_PathConstraintPositionTimeline, "ENTRIES", 2);
1899
+ __publicField(_PathConstraintPositionTimeline, "PREV_TIME", -2);
1900
+ __publicField(_PathConstraintPositionTimeline, "PREV_VALUE", -1);
1901
+ __publicField(_PathConstraintPositionTimeline, "VALUE", 1);
1811
1902
  let PathConstraintPositionTimeline = _PathConstraintPositionTimeline;
1812
1903
  class PathConstraintSpacingTimeline extends PathConstraintPositionTimeline {
1813
1904
  constructor(frameCount) {
@@ -1843,8 +1934,8 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
1843
1934
  const _PathConstraintMixTimeline = class _PathConstraintMixTimeline extends CurveTimeline {
1844
1935
  constructor(frameCount) {
1845
1936
  super(frameCount);
1846
- __publicField(this, 'pathConstraintIndex');
1847
- __publicField(this, 'frames');
1937
+ __publicField(this, "pathConstraintIndex");
1938
+ __publicField(this, "frames");
1848
1939
  this.frames = Utils.newFloatArray(frameCount * _PathConstraintMixTimeline.ENTRIES);
1849
1940
  }
1850
1941
  getPropertyId() {
@@ -1894,25 +1985,25 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
1894
1985
  }
1895
1986
  }
1896
1987
  };
1897
- __publicField(_PathConstraintMixTimeline, 'ENTRIES', 3);
1898
- __publicField(_PathConstraintMixTimeline, 'PREV_TIME', -3);
1899
- __publicField(_PathConstraintMixTimeline, 'PREV_ROTATE', -2);
1900
- __publicField(_PathConstraintMixTimeline, 'PREV_TRANSLATE', -1);
1901
- __publicField(_PathConstraintMixTimeline, 'ROTATE', 1);
1902
- __publicField(_PathConstraintMixTimeline, 'TRANSLATE', 2);
1988
+ __publicField(_PathConstraintMixTimeline, "ENTRIES", 3);
1989
+ __publicField(_PathConstraintMixTimeline, "PREV_TIME", -3);
1990
+ __publicField(_PathConstraintMixTimeline, "PREV_ROTATE", -2);
1991
+ __publicField(_PathConstraintMixTimeline, "PREV_TRANSLATE", -1);
1992
+ __publicField(_PathConstraintMixTimeline, "ROTATE", 1);
1993
+ __publicField(_PathConstraintMixTimeline, "TRANSLATE", 2);
1903
1994
  let PathConstraintMixTimeline = _PathConstraintMixTimeline;
1904
1995
  const _AnimationState = class _AnimationState {
1905
1996
  constructor(data) {
1906
- __publicField(this, 'data');
1907
- __publicField(this, 'tracks', new Array());
1908
- __publicField(this, 'events', new Array());
1909
- __publicField(this, 'listeners', new Array());
1910
- __publicField(this, 'queue', new EventQueue(this));
1911
- __publicField(this, 'propertyIDs', new IntSet());
1912
- __publicField(this, 'mixingTo', new Array());
1913
- __publicField(this, 'animationsChanged', false);
1914
- __publicField(this, 'timeScale', 1);
1915
- __publicField(this, 'trackEntryPool', new Pool(() => new TrackEntry()));
1997
+ __publicField(this, "data");
1998
+ __publicField(this, "tracks", new Array());
1999
+ __publicField(this, "events", new Array());
2000
+ __publicField(this, "listeners", new Array());
2001
+ __publicField(this, "queue", new EventQueue(this));
2002
+ __publicField(this, "propertyIDs", new IntSet());
2003
+ __publicField(this, "mixingTo", new Array());
2004
+ __publicField(this, "animationsChanged", false);
2005
+ __publicField(this, "timeScale", 1);
2006
+ __publicField(this, "trackEntryPool", new Pool(() => new TrackEntry()));
1916
2007
  this.data = data;
1917
2008
  }
1918
2009
  update(delta) {
@@ -1981,7 +2072,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
1981
2072
  return false;
1982
2073
  }
1983
2074
  apply(skeleton) {
1984
- if (skeleton == null) throw new Error('skeleton cannot be null.');
2075
+ if (skeleton == null) throw new Error("skeleton cannot be null.");
1985
2076
  if (this.animationsChanged) this._animationsChanged();
1986
2077
  let events = this.events;
1987
2078
  let tracks = this.tracks;
@@ -2203,11 +2294,11 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
2203
2294
  }
2204
2295
  setAnimation(trackIndex, animationName, loop) {
2205
2296
  let animation = this.data.skeletonData.findAnimation(animationName);
2206
- if (animation == null) throw new Error('Animation not found: ' + animationName);
2297
+ if (animation == null) throw new Error("Animation not found: " + animationName);
2207
2298
  return this.setAnimationWith(trackIndex, animation, loop);
2208
2299
  }
2209
2300
  setAnimationWith(trackIndex, animation, loop) {
2210
- if (animation == null) throw new Error('animation cannot be null.');
2301
+ if (animation == null) throw new Error("animation cannot be null.");
2211
2302
  let interrupt = true;
2212
2303
  let current = this.expandToIndex(trackIndex);
2213
2304
  if (current != null) {
@@ -2227,11 +2318,11 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
2227
2318
  }
2228
2319
  addAnimation(trackIndex, animationName, loop, delay) {
2229
2320
  let animation = this.data.skeletonData.findAnimation(animationName);
2230
- if (animation == null) throw new Error('Animation not found: ' + animationName);
2321
+ if (animation == null) throw new Error("Animation not found: " + animationName);
2231
2322
  return this.addAnimationWith(trackIndex, animation, loop, delay);
2232
2323
  }
2233
2324
  addAnimationWith(trackIndex, animation, loop, delay) {
2234
- if (animation == null) throw new Error('animation cannot be null.');
2325
+ if (animation == null) throw new Error("animation cannot be null.");
2235
2326
  let last = this.expandToIndex(trackIndex);
2236
2327
  if (last != null) {
2237
2328
  while (last.next != null) last = last.next;
@@ -2329,7 +2420,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
2329
2420
  return this.tracks[trackIndex];
2330
2421
  }
2331
2422
  addListener(listener) {
2332
- if (listener == null) throw new Error('listener cannot be null.');
2423
+ if (listener == null) throw new Error("listener cannot be null.");
2333
2424
  this.listeners.push(listener);
2334
2425
  }
2335
2426
  removeListener(listener) {
@@ -2343,41 +2434,41 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
2343
2434
  this.queue.clear();
2344
2435
  }
2345
2436
  };
2346
- __publicField(_AnimationState, 'emptyAnimation', new Animation('<empty>', [], 0));
2347
- __publicField(_AnimationState, 'SUBSEQUENT', 0);
2348
- __publicField(_AnimationState, 'FIRST', 1);
2349
- __publicField(_AnimationState, 'DIP', 2);
2350
- __publicField(_AnimationState, 'DIP_MIX', 3);
2437
+ __publicField(_AnimationState, "emptyAnimation", new Animation("<empty>", [], 0));
2438
+ __publicField(_AnimationState, "SUBSEQUENT", 0);
2439
+ __publicField(_AnimationState, "FIRST", 1);
2440
+ __publicField(_AnimationState, "DIP", 2);
2441
+ __publicField(_AnimationState, "DIP_MIX", 3);
2351
2442
  let AnimationState = _AnimationState;
2352
2443
  class TrackEntry {
2353
2444
  constructor() {
2354
- __publicField(this, 'animation');
2355
- __publicField(this, 'next');
2356
- __publicField(this, 'mixingFrom');
2357
- __publicField(this, 'listener');
2358
- __publicField(this, 'trackIndex');
2359
- __publicField(this, 'loop');
2360
- __publicField(this, 'eventThreshold');
2361
- __publicField(this, 'attachmentThreshold');
2362
- __publicField(this, 'drawOrderThreshold');
2363
- __publicField(this, 'animationStart');
2364
- __publicField(this, 'animationEnd');
2365
- __publicField(this, 'animationLast');
2366
- __publicField(this, 'nextAnimationLast');
2367
- __publicField(this, 'delay');
2368
- __publicField(this, 'trackTime');
2369
- __publicField(this, 'trackLast');
2370
- __publicField(this, 'nextTrackLast');
2371
- __publicField(this, 'trackEnd');
2372
- __publicField(this, 'timeScale');
2373
- __publicField(this, 'alpha');
2374
- __publicField(this, 'mixTime');
2375
- __publicField(this, 'mixDuration');
2376
- __publicField(this, 'interruptAlpha');
2377
- __publicField(this, 'totalAlpha');
2378
- __publicField(this, 'timelineData', new Array());
2379
- __publicField(this, 'timelineDipMix', new Array());
2380
- __publicField(this, 'timelinesRotation', new Array());
2445
+ __publicField(this, "animation");
2446
+ __publicField(this, "next");
2447
+ __publicField(this, "mixingFrom");
2448
+ __publicField(this, "listener");
2449
+ __publicField(this, "trackIndex");
2450
+ __publicField(this, "loop");
2451
+ __publicField(this, "eventThreshold");
2452
+ __publicField(this, "attachmentThreshold");
2453
+ __publicField(this, "drawOrderThreshold");
2454
+ __publicField(this, "animationStart");
2455
+ __publicField(this, "animationEnd");
2456
+ __publicField(this, "animationLast");
2457
+ __publicField(this, "nextAnimationLast");
2458
+ __publicField(this, "delay");
2459
+ __publicField(this, "trackTime");
2460
+ __publicField(this, "trackLast");
2461
+ __publicField(this, "nextTrackLast");
2462
+ __publicField(this, "trackEnd");
2463
+ __publicField(this, "timeScale");
2464
+ __publicField(this, "alpha");
2465
+ __publicField(this, "mixTime");
2466
+ __publicField(this, "mixDuration");
2467
+ __publicField(this, "interruptAlpha");
2468
+ __publicField(this, "totalAlpha");
2469
+ __publicField(this, "timelineData", new Array());
2470
+ __publicField(this, "timelineDipMix", new Array());
2471
+ __publicField(this, "timelinesRotation", new Array());
2381
2472
  }
2382
2473
  reset() {
2383
2474
  this.next = null;
@@ -2443,9 +2534,9 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
2443
2534
  }
2444
2535
  class EventQueue {
2445
2536
  constructor(animState) {
2446
- __publicField(this, 'objects', []);
2447
- __publicField(this, 'drainDisabled', false);
2448
- __publicField(this, 'animState');
2537
+ __publicField(this, "objects", []);
2538
+ __publicField(this, "drainDisabled", false);
2539
+ __publicField(this, "animState");
2449
2540
  this.animState = animState;
2450
2541
  }
2451
2542
  start(entry) {
@@ -2519,12 +2610,12 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
2519
2610
  }
2520
2611
  }
2521
2612
  var EventType = (EventType2 => {
2522
- EventType2[EventType2['start'] = 0] = 'start';
2523
- EventType2[EventType2['interrupt'] = 1] = 'interrupt';
2524
- EventType2[EventType2['end'] = 2] = 'end';
2525
- EventType2[EventType2['dispose'] = 3] = 'dispose';
2526
- EventType2[EventType2['complete'] = 4] = 'complete';
2527
- EventType2[EventType2['event'] = 5] = 'event';
2613
+ EventType2[EventType2["start"] = 0] = "start";
2614
+ EventType2[EventType2["interrupt"] = 1] = "interrupt";
2615
+ EventType2[EventType2["end"] = 2] = "end";
2616
+ EventType2[EventType2["dispose"] = 3] = "dispose";
2617
+ EventType2[EventType2["complete"] = 4] = "complete";
2618
+ EventType2[EventType2["event"] = 5] = "event";
2528
2619
  return EventType2;
2529
2620
  })(EventType || {});
2530
2621
  class AnimationStateAdapter2 {
@@ -2537,27 +2628,27 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
2537
2628
  }
2538
2629
  class AnimationStateData {
2539
2630
  constructor(skeletonData) {
2540
- __publicField(this, 'skeletonData');
2541
- __publicField(this, 'animationToMixTime', {});
2542
- __publicField(this, 'defaultMix', 0);
2543
- if (skeletonData == null) throw new Error('skeletonData cannot be null.');
2631
+ __publicField(this, "skeletonData");
2632
+ __publicField(this, "animationToMixTime", {});
2633
+ __publicField(this, "defaultMix", 0);
2634
+ if (skeletonData == null) throw new Error("skeletonData cannot be null.");
2544
2635
  this.skeletonData = skeletonData;
2545
2636
  }
2546
2637
  setMix(fromName, toName, duration) {
2547
2638
  let from = this.skeletonData.findAnimation(fromName);
2548
- if (from == null) throw new Error('Animation not found: ' + fromName);
2639
+ if (from == null) throw new Error("Animation not found: " + fromName);
2549
2640
  let to = this.skeletonData.findAnimation(toName);
2550
- if (to == null) throw new Error('Animation not found: ' + toName);
2641
+ if (to == null) throw new Error("Animation not found: " + toName);
2551
2642
  this.setMixWith(from, to, duration);
2552
2643
  }
2553
2644
  setMixWith(from, to, duration) {
2554
- if (from == null) throw new Error('from cannot be null.');
2555
- if (to == null) throw new Error('to cannot be null.');
2556
- let key = from.name + '.' + to.name;
2645
+ if (from == null) throw new Error("from cannot be null.");
2646
+ if (to == null) throw new Error("to cannot be null.");
2647
+ let key = from.name + "." + to.name;
2557
2648
  this.animationToMixTime[key] = duration;
2558
2649
  }
2559
2650
  getMix(from, to) {
2560
- let key = from.name + '.' + to.name;
2651
+ let key = from.name + "." + to.name;
2561
2652
  let value = this.animationToMixTime[key];
2562
2653
  return value === void 0 ? this.defaultMix : value;
2563
2654
  }
@@ -2565,29 +2656,29 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
2565
2656
  class BoundingBoxAttachment extends VertexAttachment {
2566
2657
  constructor(name) {
2567
2658
  super(name);
2568
- __publicField(this, 'color', new Color(1, 1, 1, 1));
2659
+ __publicField(this, "color", new Color(1, 1, 1, 1));
2569
2660
  }
2570
2661
  }
2571
2662
  class ClippingAttachment extends VertexAttachment {
2572
2663
  constructor(name) {
2573
2664
  super(name);
2574
- __publicField(this, 'endSlot');
2575
- __publicField(this, 'color', new Color(0.2275, 0.2275, 0.8078, 1));
2665
+ __publicField(this, "endSlot");
2666
+ __publicField(this, "color", new Color(0.2275, 0.2275, 0.8078, 1));
2576
2667
  }
2577
2668
  }
2578
2669
  class MeshAttachment extends VertexAttachment {
2579
2670
  constructor(name) {
2580
2671
  super(name);
2581
- __publicField(this, 'region');
2582
- __publicField(this, 'path');
2583
- __publicField(this, 'regionUVs');
2584
- __publicField(this, 'uvs');
2585
- __publicField(this, 'triangles');
2586
- __publicField(this, 'color', new Color(1, 1, 1, 1));
2587
- __publicField(this, 'hullLength');
2588
- __publicField(this, 'parentMesh');
2589
- __publicField(this, 'inheritDeform', false);
2590
- __publicField(this, 'tempColor', new Color(0, 0, 0, 0));
2672
+ __publicField(this, "region");
2673
+ __publicField(this, "path");
2674
+ __publicField(this, "regionUVs");
2675
+ __publicField(this, "uvs");
2676
+ __publicField(this, "triangles");
2677
+ __publicField(this, "color", new Color(1, 1, 1, 1));
2678
+ __publicField(this, "hullLength");
2679
+ __publicField(this, "parentMesh");
2680
+ __publicField(this, "inheritDeform", false);
2681
+ __publicField(this, "tempColor", new Color(0, 0, 0, 0));
2591
2682
  }
2592
2683
  updateUVs() {
2593
2684
  let u = 0,
@@ -2640,19 +2731,19 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
2640
2731
  class PathAttachment extends VertexAttachment {
2641
2732
  constructor(name) {
2642
2733
  super(name);
2643
- __publicField(this, 'lengths');
2644
- __publicField(this, 'closed', false);
2645
- __publicField(this, 'constantSpeed', false);
2646
- __publicField(this, 'color', new Color(1, 1, 1, 1));
2734
+ __publicField(this, "lengths");
2735
+ __publicField(this, "closed", false);
2736
+ __publicField(this, "constantSpeed", false);
2737
+ __publicField(this, "color", new Color(1, 1, 1, 1));
2647
2738
  }
2648
2739
  }
2649
2740
  class PointAttachment extends VertexAttachment {
2650
2741
  constructor(name) {
2651
2742
  super(name);
2652
- __publicField(this, 'x');
2653
- __publicField(this, 'y');
2654
- __publicField(this, 'rotation');
2655
- __publicField(this, 'color', new Color(0.38, 0.94, 0, 1));
2743
+ __publicField(this, "x");
2744
+ __publicField(this, "y");
2745
+ __publicField(this, "rotation");
2746
+ __publicField(this, "color", new Color(0.38, 0.94, 0, 1));
2656
2747
  }
2657
2748
  computeWorldPosition(bone, point) {
2658
2749
  point.x = this.x * bone.a + this.y * bone.b + bone.worldX;
@@ -2670,20 +2761,20 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
2670
2761
  const _RegionAttachment = class _RegionAttachment extends Attachment {
2671
2762
  constructor(name) {
2672
2763
  super(name);
2673
- __publicField(this, 'x', 0);
2674
- __publicField(this, 'y', 0);
2675
- __publicField(this, 'scaleX', 1);
2676
- __publicField(this, 'scaleY', 1);
2677
- __publicField(this, 'rotation', 0);
2678
- __publicField(this, 'width', 0);
2679
- __publicField(this, 'height', 0);
2680
- __publicField(this, 'color', new Color(1, 1, 1, 1));
2681
- __publicField(this, 'path');
2682
- __publicField(this, 'rendererObject');
2683
- __publicField(this, 'region');
2684
- __publicField(this, 'offset', Utils.newFloatArray(8));
2685
- __publicField(this, 'uvs', Utils.newFloatArray(8));
2686
- __publicField(this, 'tempColor', new Color(1, 1, 1, 1));
2764
+ __publicField(this, "x", 0);
2765
+ __publicField(this, "y", 0);
2766
+ __publicField(this, "scaleX", 1);
2767
+ __publicField(this, "scaleY", 1);
2768
+ __publicField(this, "rotation", 0);
2769
+ __publicField(this, "width", 0);
2770
+ __publicField(this, "height", 0);
2771
+ __publicField(this, "color", new Color(1, 1, 1, 1));
2772
+ __publicField(this, "path");
2773
+ __publicField(this, "rendererObject");
2774
+ __publicField(this, "region");
2775
+ __publicField(this, "offset", Utils.newFloatArray(8));
2776
+ __publicField(this, "uvs", Utils.newFloatArray(8));
2777
+ __publicField(this, "tempColor", new Color(1, 1, 1, 1));
2687
2778
  }
2688
2779
  updateOffset() {
2689
2780
  let regionScaleX = this.width / this.region.originalWidth * this.scaleX;
@@ -2767,55 +2858,55 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
2767
2858
  worldVertices[offset + 1] = offsetX * c + offsetY * d + y;
2768
2859
  }
2769
2860
  };
2770
- __publicField(_RegionAttachment, 'OX1', 0);
2771
- __publicField(_RegionAttachment, 'OY1', 1);
2772
- __publicField(_RegionAttachment, 'OX2', 2);
2773
- __publicField(_RegionAttachment, 'OY2', 3);
2774
- __publicField(_RegionAttachment, 'OX3', 4);
2775
- __publicField(_RegionAttachment, 'OY3', 5);
2776
- __publicField(_RegionAttachment, 'OX4', 6);
2777
- __publicField(_RegionAttachment, 'OY4', 7);
2778
- __publicField(_RegionAttachment, 'X1', 0);
2779
- __publicField(_RegionAttachment, 'Y1', 1);
2780
- __publicField(_RegionAttachment, 'C1R', 2);
2781
- __publicField(_RegionAttachment, 'C1G', 3);
2782
- __publicField(_RegionAttachment, 'C1B', 4);
2783
- __publicField(_RegionAttachment, 'C1A', 5);
2784
- __publicField(_RegionAttachment, 'U1', 6);
2785
- __publicField(_RegionAttachment, 'V1', 7);
2786
- __publicField(_RegionAttachment, 'X2', 8);
2787
- __publicField(_RegionAttachment, 'Y2', 9);
2788
- __publicField(_RegionAttachment, 'C2R', 10);
2789
- __publicField(_RegionAttachment, 'C2G', 11);
2790
- __publicField(_RegionAttachment, 'C2B', 12);
2791
- __publicField(_RegionAttachment, 'C2A', 13);
2792
- __publicField(_RegionAttachment, 'U2', 14);
2793
- __publicField(_RegionAttachment, 'V2', 15);
2794
- __publicField(_RegionAttachment, 'X3', 16);
2795
- __publicField(_RegionAttachment, 'Y3', 17);
2796
- __publicField(_RegionAttachment, 'C3R', 18);
2797
- __publicField(_RegionAttachment, 'C3G', 19);
2798
- __publicField(_RegionAttachment, 'C3B', 20);
2799
- __publicField(_RegionAttachment, 'C3A', 21);
2800
- __publicField(_RegionAttachment, 'U3', 22);
2801
- __publicField(_RegionAttachment, 'V3', 23);
2802
- __publicField(_RegionAttachment, 'X4', 24);
2803
- __publicField(_RegionAttachment, 'Y4', 25);
2804
- __publicField(_RegionAttachment, 'C4R', 26);
2805
- __publicField(_RegionAttachment, 'C4G', 27);
2806
- __publicField(_RegionAttachment, 'C4B', 28);
2807
- __publicField(_RegionAttachment, 'C4A', 29);
2808
- __publicField(_RegionAttachment, 'U4', 30);
2809
- __publicField(_RegionAttachment, 'V4', 31);
2861
+ __publicField(_RegionAttachment, "OX1", 0);
2862
+ __publicField(_RegionAttachment, "OY1", 1);
2863
+ __publicField(_RegionAttachment, "OX2", 2);
2864
+ __publicField(_RegionAttachment, "OY2", 3);
2865
+ __publicField(_RegionAttachment, "OX3", 4);
2866
+ __publicField(_RegionAttachment, "OY3", 5);
2867
+ __publicField(_RegionAttachment, "OX4", 6);
2868
+ __publicField(_RegionAttachment, "OY4", 7);
2869
+ __publicField(_RegionAttachment, "X1", 0);
2870
+ __publicField(_RegionAttachment, "Y1", 1);
2871
+ __publicField(_RegionAttachment, "C1R", 2);
2872
+ __publicField(_RegionAttachment, "C1G", 3);
2873
+ __publicField(_RegionAttachment, "C1B", 4);
2874
+ __publicField(_RegionAttachment, "C1A", 5);
2875
+ __publicField(_RegionAttachment, "U1", 6);
2876
+ __publicField(_RegionAttachment, "V1", 7);
2877
+ __publicField(_RegionAttachment, "X2", 8);
2878
+ __publicField(_RegionAttachment, "Y2", 9);
2879
+ __publicField(_RegionAttachment, "C2R", 10);
2880
+ __publicField(_RegionAttachment, "C2G", 11);
2881
+ __publicField(_RegionAttachment, "C2B", 12);
2882
+ __publicField(_RegionAttachment, "C2A", 13);
2883
+ __publicField(_RegionAttachment, "U2", 14);
2884
+ __publicField(_RegionAttachment, "V2", 15);
2885
+ __publicField(_RegionAttachment, "X3", 16);
2886
+ __publicField(_RegionAttachment, "Y3", 17);
2887
+ __publicField(_RegionAttachment, "C3R", 18);
2888
+ __publicField(_RegionAttachment, "C3G", 19);
2889
+ __publicField(_RegionAttachment, "C3B", 20);
2890
+ __publicField(_RegionAttachment, "C3A", 21);
2891
+ __publicField(_RegionAttachment, "U3", 22);
2892
+ __publicField(_RegionAttachment, "V3", 23);
2893
+ __publicField(_RegionAttachment, "X4", 24);
2894
+ __publicField(_RegionAttachment, "Y4", 25);
2895
+ __publicField(_RegionAttachment, "C4R", 26);
2896
+ __publicField(_RegionAttachment, "C4G", 27);
2897
+ __publicField(_RegionAttachment, "C4B", 28);
2898
+ __publicField(_RegionAttachment, "C4A", 29);
2899
+ __publicField(_RegionAttachment, "U4", 30);
2900
+ __publicField(_RegionAttachment, "V4", 31);
2810
2901
  let RegionAttachment = _RegionAttachment;
2811
2902
  class AtlasAttachmentLoader {
2812
2903
  constructor(atlas) {
2813
- __publicField(this, 'atlas');
2904
+ __publicField(this, "atlas");
2814
2905
  this.atlas = atlas;
2815
2906
  }
2816
2907
  newRegionAttachment(skin, name, path2) {
2817
2908
  let region = this.atlas.findRegion(path2);
2818
- if (region == null) throw new Error('Region not found in atlas: ' + path2 + ' (region attachment: ' + name + ')');
2909
+ if (region == null) throw new Error("Region not found in atlas: " + path2 + " (region attachment: " + name + ")");
2819
2910
  region.renderObject = region;
2820
2911
  let attachment = new RegionAttachment(name);
2821
2912
  attachment.setRegion(region);
@@ -2823,7 +2914,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
2823
2914
  }
2824
2915
  newMeshAttachment(skin, name, path2) {
2825
2916
  let region = this.atlas.findRegion(path2);
2826
- if (region == null) throw new Error('Region not found in atlas: ' + path2 + ' (mesh attachment: ' + name + ')');
2917
+ if (region == null) throw new Error("Region not found in atlas: " + path2 + " (mesh attachment: " + name + ")");
2827
2918
  region.renderObject = region;
2828
2919
  let attachment = new MeshAttachment(name);
2829
2920
  attachment.region = region;
@@ -2844,63 +2935,63 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
2844
2935
  }
2845
2936
  class BoneData {
2846
2937
  constructor(index, name, parent) {
2847
- __publicField(this, 'index');
2848
- __publicField(this, 'name');
2849
- __publicField(this, 'parent');
2850
- __publicField(this, 'length');
2851
- __publicField(this, 'x', 0);
2852
- __publicField(this, 'y', 0);
2853
- __publicField(this, 'rotation', 0);
2854
- __publicField(this, 'scaleX', 1);
2855
- __publicField(this, 'scaleY', 1);
2856
- __publicField(this, 'shearX', 0);
2857
- __publicField(this, 'shearY', 0);
2858
- __publicField(this, 'transformMode', 0);
2859
- if (index < 0) throw new Error('index must be >= 0.');
2860
- if (name == null) throw new Error('name cannot be null.');
2938
+ __publicField(this, "index");
2939
+ __publicField(this, "name");
2940
+ __publicField(this, "parent");
2941
+ __publicField(this, "length");
2942
+ __publicField(this, "x", 0);
2943
+ __publicField(this, "y", 0);
2944
+ __publicField(this, "rotation", 0);
2945
+ __publicField(this, "scaleX", 1);
2946
+ __publicField(this, "scaleY", 1);
2947
+ __publicField(this, "shearX", 0);
2948
+ __publicField(this, "shearY", 0);
2949
+ __publicField(this, "transformMode", 0);
2950
+ if (index < 0) throw new Error("index must be >= 0.");
2951
+ if (name == null) throw new Error("name cannot be null.");
2861
2952
  this.index = index;
2862
2953
  this.name = name;
2863
2954
  this.parent = parent;
2864
2955
  }
2865
2956
  }
2866
2957
  var TransformMode = (TransformMode2 => {
2867
- TransformMode2[TransformMode2['Normal'] = 0] = 'Normal';
2868
- TransformMode2[TransformMode2['OnlyTranslation'] = 1] = 'OnlyTranslation';
2869
- TransformMode2[TransformMode2['NoRotationOrReflection'] = 2] = 'NoRotationOrReflection';
2870
- TransformMode2[TransformMode2['NoScale'] = 3] = 'NoScale';
2871
- TransformMode2[TransformMode2['NoScaleOrReflection'] = 4] = 'NoScaleOrReflection';
2958
+ TransformMode2[TransformMode2["Normal"] = 0] = "Normal";
2959
+ TransformMode2[TransformMode2["OnlyTranslation"] = 1] = "OnlyTranslation";
2960
+ TransformMode2[TransformMode2["NoRotationOrReflection"] = 2] = "NoRotationOrReflection";
2961
+ TransformMode2[TransformMode2["NoScale"] = 3] = "NoScale";
2962
+ TransformMode2[TransformMode2["NoScaleOrReflection"] = 4] = "NoScaleOrReflection";
2872
2963
  return TransformMode2;
2873
2964
  })(TransformMode || {});
2874
2965
  class Bone {
2875
2966
  constructor(data, skeleton, parent) {
2876
- __publicField(this, 'data');
2877
- __publicField(this, 'skeleton');
2878
- __publicField(this, 'parent');
2879
- __publicField(this, 'children', new Array());
2880
- __publicField(this, 'x', 0);
2881
- __publicField(this, 'y', 0);
2882
- __publicField(this, 'rotation', 0);
2883
- __publicField(this, 'scaleX', 0);
2884
- __publicField(this, 'scaleY', 0);
2885
- __publicField(this, 'shearX', 0);
2886
- __publicField(this, 'shearY', 0);
2887
- __publicField(this, 'ax', 0);
2888
- __publicField(this, 'ay', 0);
2889
- __publicField(this, 'arotation', 0);
2890
- __publicField(this, 'ascaleX', 0);
2891
- __publicField(this, 'ascaleY', 0);
2892
- __publicField(this, 'ashearX', 0);
2893
- __publicField(this, 'ashearY', 0);
2894
- __publicField(this, 'appliedValid', false);
2895
- __publicField(this, 'a', 0);
2896
- __publicField(this, 'b', 0);
2897
- __publicField(this, 'worldX', 0);
2898
- __publicField(this, 'c', 0);
2899
- __publicField(this, 'd', 0);
2900
- __publicField(this, 'worldY', 0);
2901
- __publicField(this, 'sorted', false);
2902
- if (data == null) throw new Error('data cannot be null.');
2903
- if (skeleton == null) throw new Error('skeleton cannot be null.');
2967
+ __publicField(this, "data");
2968
+ __publicField(this, "skeleton");
2969
+ __publicField(this, "parent");
2970
+ __publicField(this, "children", new Array());
2971
+ __publicField(this, "x", 0);
2972
+ __publicField(this, "y", 0);
2973
+ __publicField(this, "rotation", 0);
2974
+ __publicField(this, "scaleX", 0);
2975
+ __publicField(this, "scaleY", 0);
2976
+ __publicField(this, "shearX", 0);
2977
+ __publicField(this, "shearY", 0);
2978
+ __publicField(this, "ax", 0);
2979
+ __publicField(this, "ay", 0);
2980
+ __publicField(this, "arotation", 0);
2981
+ __publicField(this, "ascaleX", 0);
2982
+ __publicField(this, "ascaleY", 0);
2983
+ __publicField(this, "ashearX", 0);
2984
+ __publicField(this, "ashearY", 0);
2985
+ __publicField(this, "appliedValid", false);
2986
+ __publicField(this, "a", 0);
2987
+ __publicField(this, "b", 0);
2988
+ __publicField(this, "worldX", 0);
2989
+ __publicField(this, "c", 0);
2990
+ __publicField(this, "d", 0);
2991
+ __publicField(this, "worldY", 0);
2992
+ __publicField(this, "sorted", false);
2993
+ if (data == null) throw new Error("data cannot be null.");
2994
+ if (skeleton == null) throw new Error("skeleton cannot be null.");
2904
2995
  this.data = data;
2905
2996
  this.skeleton = skeleton;
2906
2997
  this.parent = parent;
@@ -3152,7 +3243,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
3152
3243
  }
3153
3244
  class Texture {
3154
3245
  constructor(image) {
3155
- __publicField(this, '_image');
3246
+ __publicField(this, "_image");
3156
3247
  this._image = image;
3157
3248
  }
3158
3249
  getImage() {
@@ -3160,19 +3251,19 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
3160
3251
  }
3161
3252
  static filterFromString(text) {
3162
3253
  switch (text.toLowerCase()) {
3163
- case 'nearest':
3254
+ case "nearest":
3164
3255
  return 9728;
3165
- case 'linear':
3256
+ case "linear":
3166
3257
  return 9729;
3167
- case 'mipmap':
3258
+ case "mipmap":
3168
3259
  return 9987;
3169
- case 'mipmapnearestnearest':
3260
+ case "mipmapnearestnearest":
3170
3261
  return 9984;
3171
- case 'mipmaplinearnearest':
3262
+ case "mipmaplinearnearest":
3172
3263
  return 9985;
3173
- case 'mipmapnearestlinear':
3264
+ case "mipmapnearestlinear":
3174
3265
  return 9986;
3175
- case 'mipmaplinearlinear':
3266
+ case "mipmaplinearlinear":
3176
3267
  return 9987;
3177
3268
  default:
3178
3269
  throw new Error(`Unknown texture filter ${text}`);
@@ -3180,11 +3271,11 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
3180
3271
  }
3181
3272
  static wrapFromString(text) {
3182
3273
  switch (text.toLowerCase()) {
3183
- case 'mirroredtepeat':
3274
+ case "mirroredtepeat":
3184
3275
  return 33648;
3185
- case 'clamptoedge':
3276
+ case "clamptoedge":
3186
3277
  return 33071;
3187
- case 'repeat':
3278
+ case "repeat":
3188
3279
  return 10497;
3189
3280
  default:
3190
3281
  throw new Error(`Unknown texture wrap ${text}`);
@@ -3192,36 +3283,36 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
3192
3283
  }
3193
3284
  }
3194
3285
  var TextureFilter = (TextureFilter2 => {
3195
- TextureFilter2[TextureFilter2['Nearest'] = 9728] = 'Nearest';
3196
- TextureFilter2[TextureFilter2['Linear'] = 9729] = 'Linear';
3197
- TextureFilter2[TextureFilter2['MipMap'] = 9987] = 'MipMap';
3198
- TextureFilter2[TextureFilter2['MipMapNearestNearest'] = 9984] = 'MipMapNearestNearest';
3199
- TextureFilter2[TextureFilter2['MipMapLinearNearest'] = 9985] = 'MipMapLinearNearest';
3200
- TextureFilter2[TextureFilter2['MipMapNearestLinear'] = 9986] = 'MipMapNearestLinear';
3201
- TextureFilter2[TextureFilter2['MipMapLinearLinear'] = 9987] = 'MipMapLinearLinear';
3286
+ TextureFilter2[TextureFilter2["Nearest"] = 9728] = "Nearest";
3287
+ TextureFilter2[TextureFilter2["Linear"] = 9729] = "Linear";
3288
+ TextureFilter2[TextureFilter2["MipMap"] = 9987] = "MipMap";
3289
+ TextureFilter2[TextureFilter2["MipMapNearestNearest"] = 9984] = "MipMapNearestNearest";
3290
+ TextureFilter2[TextureFilter2["MipMapLinearNearest"] = 9985] = "MipMapLinearNearest";
3291
+ TextureFilter2[TextureFilter2["MipMapNearestLinear"] = 9986] = "MipMapNearestLinear";
3292
+ TextureFilter2[TextureFilter2["MipMapLinearLinear"] = 9987] = "MipMapLinearLinear";
3202
3293
  return TextureFilter2;
3203
3294
  })(TextureFilter || {});
3204
3295
  var TextureWrap = (TextureWrap2 => {
3205
- TextureWrap2[TextureWrap2['MirroredRepeat'] = 33648] = 'MirroredRepeat';
3206
- TextureWrap2[TextureWrap2['ClampToEdge'] = 33071] = 'ClampToEdge';
3207
- TextureWrap2[TextureWrap2['Repeat'] = 10497] = 'Repeat';
3296
+ TextureWrap2[TextureWrap2["MirroredRepeat"] = 33648] = "MirroredRepeat";
3297
+ TextureWrap2[TextureWrap2["ClampToEdge"] = 33071] = "ClampToEdge";
3298
+ TextureWrap2[TextureWrap2["Repeat"] = 10497] = "Repeat";
3208
3299
  return TextureWrap2;
3209
3300
  })(TextureWrap || {});
3210
3301
  class TextureRegion {
3211
3302
  constructor() {
3212
- __publicField(this, 'renderObject');
3213
- __publicField(this, 'u', 0);
3214
- __publicField(this, 'v', 0);
3215
- __publicField(this, 'u2', 0);
3216
- __publicField(this, 'v2', 0);
3217
- __publicField(this, 'width', 0);
3218
- __publicField(this, 'height', 0);
3219
- __publicField(this, 'rotate', false);
3220
- __publicField(this, 'offsetX', 0);
3221
- __publicField(this, 'offsetY', 0);
3222
- __publicField(this, 'originalWidth', 0);
3223
- __publicField(this, 'originalHeight', 0);
3224
- __publicField(this, 'texture');
3303
+ __publicField(this, "renderObject");
3304
+ __publicField(this, "u", 0);
3305
+ __publicField(this, "v", 0);
3306
+ __publicField(this, "u2", 0);
3307
+ __publicField(this, "v2", 0);
3308
+ __publicField(this, "width", 0);
3309
+ __publicField(this, "height", 0);
3310
+ __publicField(this, "rotate", false);
3311
+ __publicField(this, "offsetX", 0);
3312
+ __publicField(this, "offsetY", 0);
3313
+ __publicField(this, "originalWidth", 0);
3314
+ __publicField(this, "originalHeight", 0);
3315
+ __publicField(this, "texture");
3225
3316
  }
3226
3317
  }
3227
3318
  class FakeTexture extends Texture {
@@ -3231,12 +3322,12 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
3231
3322
  }
3232
3323
  class TextureAtlas {
3233
3324
  constructor(atlasText, textureLoader) {
3234
- __publicField(this, 'pages', new Array());
3235
- __publicField(this, 'regions', new Array());
3325
+ __publicField(this, "pages", new Array());
3326
+ __publicField(this, "regions", new Array());
3236
3327
  this.load(atlasText, textureLoader);
3237
3328
  }
3238
3329
  load(atlasText, textureLoader) {
3239
- if (textureLoader == null) throw new Error('textureLoader cannot be null.');
3330
+ if (textureLoader == null) throw new Error("textureLoader cannot be null.");
3240
3331
  let reader = new TextureAtlasReader(atlasText);
3241
3332
  let tuple = new Array(4);
3242
3333
  let page = null;
@@ -3258,7 +3349,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
3258
3349
  let direction = reader.readValue();
3259
3350
  page.uWrap = TextureWrap.ClampToEdge;
3260
3351
  page.vWrap = TextureWrap.ClampToEdge;
3261
- if (direction == 'x') page.uWrap = TextureWrap.Repeat;else if (direction == 'y') page.vWrap = TextureWrap.Repeat;else if (direction == 'xy') page.uWrap = page.vWrap = TextureWrap.Repeat;
3352
+ if (direction == "x") page.uWrap = TextureWrap.Repeat;else if (direction == "y") page.vWrap = TextureWrap.Repeat;else if (direction == "xy") page.uWrap = page.vWrap = TextureWrap.Repeat;
3262
3353
  page.texture = textureLoader(line);
3263
3354
  page.texture.setFilters(page.minFilter, page.magFilter);
3264
3355
  page.texture.setWraps(page.uWrap, page.vWrap);
@@ -3269,7 +3360,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
3269
3360
  let region = new TextureAtlasRegion();
3270
3361
  region.name = line;
3271
3362
  region.page = page;
3272
- region.rotate = reader.readValue() == 'true';
3363
+ region.rotate = reader.readValue() == "true";
3273
3364
  reader.readTuple(tuple);
3274
3365
  let x = parseInt(tuple[0]);
3275
3366
  let y = parseInt(tuple[1]);
@@ -3321,8 +3412,8 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
3321
3412
  }
3322
3413
  class TextureAtlasReader {
3323
3414
  constructor(text) {
3324
- __publicField(this, 'lines');
3325
- __publicField(this, 'index', 0);
3415
+ __publicField(this, "lines");
3416
+ __publicField(this, "index", 0);
3326
3417
  this.lines = text.split(/\r\n|\r|\n/);
3327
3418
  }
3328
3419
  readLine() {
@@ -3331,18 +3422,18 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
3331
3422
  }
3332
3423
  readValue() {
3333
3424
  let line = this.readLine();
3334
- let colon = line.indexOf(':');
3335
- if (colon == -1) throw new Error('Invalid line: ' + line);
3425
+ let colon = line.indexOf(":");
3426
+ if (colon == -1) throw new Error("Invalid line: " + line);
3336
3427
  return line.substring(colon + 1).trim();
3337
3428
  }
3338
3429
  readTuple(tuple) {
3339
3430
  let line = this.readLine();
3340
- let colon = line.indexOf(':');
3341
- if (colon == -1) throw new Error('Invalid line: ' + line);
3431
+ let colon = line.indexOf(":");
3432
+ if (colon == -1) throw new Error("Invalid line: " + line);
3342
3433
  let i = 0,
3343
3434
  lastMatch = colon + 1;
3344
3435
  for (; i < 3; i++) {
3345
- let comma = line.indexOf(',', lastMatch);
3436
+ let comma = line.indexOf(",", lastMatch);
3346
3437
  if (comma == -1) break;
3347
3438
  tuple[i] = line.substr(lastMatch, comma - lastMatch).trim();
3348
3439
  lastMatch = comma + 1;
@@ -3353,14 +3444,14 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
3353
3444
  }
3354
3445
  class TextureAtlasPage {
3355
3446
  constructor() {
3356
- __publicField(this, 'name');
3357
- __publicField(this, 'minFilter');
3358
- __publicField(this, 'magFilter');
3359
- __publicField(this, 'uWrap');
3360
- __publicField(this, 'vWrap');
3361
- __publicField(this, 'texture');
3362
- __publicField(this, 'width');
3363
- __publicField(this, 'height');
3447
+ __publicField(this, "name");
3448
+ __publicField(this, "minFilter");
3449
+ __publicField(this, "magFilter");
3450
+ __publicField(this, "uWrap");
3451
+ __publicField(this, "vWrap");
3452
+ __publicField(this, "texture");
3453
+ __publicField(this, "width");
3454
+ __publicField(this, "height");
3364
3455
  }
3365
3456
  setTexture(texture) {
3366
3457
  this.texture = texture;
@@ -3373,29 +3464,29 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
3373
3464
  class TextureAtlasRegion extends TextureRegion {
3374
3465
  constructor() {
3375
3466
  super(...arguments);
3376
- __publicField(this, 'page');
3377
- __publicField(this, 'name');
3378
- __publicField(this, 'x');
3379
- __publicField(this, 'y');
3380
- __publicField(this, 'index');
3381
- __publicField(this, 'rotate');
3382
- __publicField(this, 'texture');
3467
+ __publicField(this, "page");
3468
+ __publicField(this, "name");
3469
+ __publicField(this, "x");
3470
+ __publicField(this, "y");
3471
+ __publicField(this, "index");
3472
+ __publicField(this, "rotate");
3473
+ __publicField(this, "texture");
3383
3474
  }
3384
3475
  }
3385
3476
  class AssetManager {
3386
- constructor(textureLoader, pathPrefix = '') {
3387
- __publicField(this, 'pathPrefix');
3388
- __publicField(this, 'textureLoader');
3389
- __publicField(this, 'assets', {});
3390
- __publicField(this, 'errors', {});
3391
- __publicField(this, 'toLoad', 0);
3392
- __publicField(this, 'loaded', 0);
3477
+ constructor(textureLoader, pathPrefix = "") {
3478
+ __publicField(this, "pathPrefix");
3479
+ __publicField(this, "textureLoader");
3480
+ __publicField(this, "assets", {});
3481
+ __publicField(this, "errors", {});
3482
+ __publicField(this, "toLoad", 0);
3483
+ __publicField(this, "loaded", 0);
3393
3484
  this.textureLoader = textureLoader;
3394
3485
  this.pathPrefix = pathPrefix;
3395
3486
  }
3396
3487
  static downloadText(url, success, error) {
3397
3488
  let request = new XMLHttpRequest();
3398
- request.open('GET', url, true);
3489
+ request.open("GET", url, true);
3399
3490
  request.onload = () => {
3400
3491
  if (request.status == 200) {
3401
3492
  success(request.responseText);
@@ -3410,8 +3501,8 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
3410
3501
  }
3411
3502
  static downloadBinary(url, success, error) {
3412
3503
  let request = new XMLHttpRequest();
3413
- request.open('GET', url, true);
3414
- request.responseType = 'arraybuffer';
3504
+ request.open("GET", url, true);
3505
+ request.responseType = "arraybuffer";
3415
3506
  request.onload = () => {
3416
3507
  if (request.status == 200) {
3417
3508
  success(new Uint8Array(request.response));
@@ -3443,7 +3534,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
3443
3534
  path2 = this.pathPrefix + path2;
3444
3535
  this.toLoad++;
3445
3536
  let img = new Image();
3446
- img.crossOrigin = 'anonymous';
3537
+ img.crossOrigin = "anonymous";
3447
3538
  img.onload = ev => {
3448
3539
  let texture = this.textureLoader(img);
3449
3540
  this.assets[path2] = texture;
@@ -3479,7 +3570,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
3479
3570
  img.src = data;
3480
3571
  }
3481
3572
  loadTextureAtlas(path2, success = null, error = null) {
3482
- let parent = path2.lastIndexOf('/') >= 0 ? path2.substring(0, path2.lastIndexOf('/')) : '';
3573
+ let parent = path2.lastIndexOf("/") >= 0 ? path2.substring(0, path2.lastIndexOf("/")) : "";
3483
3574
  path2 = this.pathPrefix + path2;
3484
3575
  this.toLoad++;
3485
3576
  AssetManager.downloadText(path2, atlasData => {
@@ -3489,8 +3580,8 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
3489
3580
  var atlasPages = new Array();
3490
3581
  try {
3491
3582
  let atlas = new TextureAtlas(atlasData, path22 => {
3492
- atlasPages.push(parent + '/' + path22);
3493
- let image = document.createElement('img');
3583
+ atlasPages.push(parent + "/" + path22);
3584
+ let image = document.createElement("img");
3494
3585
  image.width = 16;
3495
3586
  image.height = 16;
3496
3587
  return new FakeTexture(image);
@@ -3511,7 +3602,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
3511
3602
  if (!pageLoadError) {
3512
3603
  try {
3513
3604
  let atlas = new TextureAtlas(atlasData, path22 => {
3514
- return this.get(parent + '/' + path22);
3605
+ return this.get(parent + "/" + path22);
3515
3606
  });
3516
3607
  this.assets[path2] = atlas;
3517
3608
  if (success) success(path2, atlas);
@@ -3587,34 +3678,34 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
3587
3678
  }
3588
3679
  class Event {
3589
3680
  constructor(time, data) {
3590
- __publicField(this, 'data');
3591
- __publicField(this, 'intValue');
3592
- __publicField(this, 'floatValue');
3593
- __publicField(this, 'stringValue');
3594
- __publicField(this, 'time');
3595
- if (data == null) throw new Error('data cannot be null.');
3681
+ __publicField(this, "data");
3682
+ __publicField(this, "intValue");
3683
+ __publicField(this, "floatValue");
3684
+ __publicField(this, "stringValue");
3685
+ __publicField(this, "time");
3686
+ if (data == null) throw new Error("data cannot be null.");
3596
3687
  this.time = time;
3597
3688
  this.data = data;
3598
3689
  }
3599
3690
  }
3600
3691
  class EventData {
3601
3692
  constructor(name) {
3602
- __publicField(this, 'name');
3603
- __publicField(this, 'intValue');
3604
- __publicField(this, 'floatValue');
3605
- __publicField(this, 'stringValue');
3693
+ __publicField(this, "name");
3694
+ __publicField(this, "intValue");
3695
+ __publicField(this, "floatValue");
3696
+ __publicField(this, "stringValue");
3606
3697
  this.name = name;
3607
3698
  }
3608
3699
  }
3609
3700
  class IkConstraint {
3610
3701
  constructor(data, skeleton) {
3611
- __publicField(this, 'data');
3612
- __publicField(this, 'bones');
3613
- __publicField(this, 'target');
3614
- __publicField(this, 'mix', 1);
3615
- __publicField(this, 'bendDirection', 0);
3616
- if (data == null) throw new Error('data cannot be null.');
3617
- if (skeleton == null) throw new Error('skeleton cannot be null.');
3702
+ __publicField(this, "data");
3703
+ __publicField(this, "bones");
3704
+ __publicField(this, "target");
3705
+ __publicField(this, "mix", 1);
3706
+ __publicField(this, "bendDirection", 0);
3707
+ if (data == null) throw new Error("data cannot be null.");
3708
+ if (skeleton == null) throw new Error("skeleton cannot be null.");
3618
3709
  this.data = data;
3619
3710
  this.mix = data.mix;
3620
3711
  this.bendDirection = data.bendDirection;
@@ -3801,66 +3892,66 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
3801
3892
  }
3802
3893
  class IkConstraintData {
3803
3894
  constructor(name) {
3804
- __publicField(this, 'name');
3805
- __publicField(this, 'order', 0);
3806
- __publicField(this, 'bones', new Array());
3807
- __publicField(this, 'target');
3808
- __publicField(this, 'bendDirection', 1);
3809
- __publicField(this, 'mix', 1);
3895
+ __publicField(this, "name");
3896
+ __publicField(this, "order", 0);
3897
+ __publicField(this, "bones", new Array());
3898
+ __publicField(this, "target");
3899
+ __publicField(this, "bendDirection", 1);
3900
+ __publicField(this, "mix", 1);
3810
3901
  this.name = name;
3811
3902
  }
3812
3903
  }
3813
3904
  class PathConstraintData {
3814
3905
  constructor(name) {
3815
- __publicField(this, 'name');
3816
- __publicField(this, 'order', 0);
3817
- __publicField(this, 'bones', new Array());
3818
- __publicField(this, 'target');
3819
- __publicField(this, 'positionMode');
3820
- __publicField(this, 'spacingMode');
3821
- __publicField(this, 'rotateMode');
3822
- __publicField(this, 'offsetRotation');
3823
- __publicField(this, 'position');
3824
- __publicField(this, 'spacing');
3825
- __publicField(this, 'rotateMix');
3826
- __publicField(this, 'translateMix');
3906
+ __publicField(this, "name");
3907
+ __publicField(this, "order", 0);
3908
+ __publicField(this, "bones", new Array());
3909
+ __publicField(this, "target");
3910
+ __publicField(this, "positionMode");
3911
+ __publicField(this, "spacingMode");
3912
+ __publicField(this, "rotateMode");
3913
+ __publicField(this, "offsetRotation");
3914
+ __publicField(this, "position");
3915
+ __publicField(this, "spacing");
3916
+ __publicField(this, "rotateMix");
3917
+ __publicField(this, "translateMix");
3827
3918
  this.name = name;
3828
3919
  }
3829
3920
  }
3830
3921
  var PositionMode = (PositionMode2 => {
3831
- PositionMode2[PositionMode2['Fixed'] = 0] = 'Fixed';
3832
- PositionMode2[PositionMode2['Percent'] = 1] = 'Percent';
3922
+ PositionMode2[PositionMode2["Fixed"] = 0] = "Fixed";
3923
+ PositionMode2[PositionMode2["Percent"] = 1] = "Percent";
3833
3924
  return PositionMode2;
3834
3925
  })(PositionMode || {});
3835
3926
  var SpacingMode = (SpacingMode2 => {
3836
- SpacingMode2[SpacingMode2['Length'] = 0] = 'Length';
3837
- SpacingMode2[SpacingMode2['Fixed'] = 1] = 'Fixed';
3838
- SpacingMode2[SpacingMode2['Percent'] = 2] = 'Percent';
3927
+ SpacingMode2[SpacingMode2["Length"] = 0] = "Length";
3928
+ SpacingMode2[SpacingMode2["Fixed"] = 1] = "Fixed";
3929
+ SpacingMode2[SpacingMode2["Percent"] = 2] = "Percent";
3839
3930
  return SpacingMode2;
3840
3931
  })(SpacingMode || {});
3841
3932
  var RotateMode = (RotateMode2 => {
3842
- RotateMode2[RotateMode2['Tangent'] = 0] = 'Tangent';
3843
- RotateMode2[RotateMode2['Chain'] = 1] = 'Chain';
3844
- RotateMode2[RotateMode2['ChainScale'] = 2] = 'ChainScale';
3933
+ RotateMode2[RotateMode2["Tangent"] = 0] = "Tangent";
3934
+ RotateMode2[RotateMode2["Chain"] = 1] = "Chain";
3935
+ RotateMode2[RotateMode2["ChainScale"] = 2] = "ChainScale";
3845
3936
  return RotateMode2;
3846
3937
  })(RotateMode || {});
3847
3938
  const _PathConstraint = class _PathConstraint {
3848
3939
  constructor(data, skeleton) {
3849
- __publicField(this, 'data');
3850
- __publicField(this, 'bones');
3851
- __publicField(this, 'target');
3852
- __publicField(this, 'position', 0);
3853
- __publicField(this, 'spacing', 0);
3854
- __publicField(this, 'rotateMix', 0);
3855
- __publicField(this, 'translateMix', 0);
3856
- __publicField(this, 'spaces', new Array());
3857
- __publicField(this, 'positions', new Array());
3858
- __publicField(this, 'world', new Array());
3859
- __publicField(this, 'curves', new Array());
3860
- __publicField(this, 'lengths', new Array());
3861
- __publicField(this, 'segments', new Array());
3862
- if (data == null) throw new Error('data cannot be null.');
3863
- if (skeleton == null) throw new Error('skeleton cannot be null.');
3940
+ __publicField(this, "data");
3941
+ __publicField(this, "bones");
3942
+ __publicField(this, "target");
3943
+ __publicField(this, "position", 0);
3944
+ __publicField(this, "spacing", 0);
3945
+ __publicField(this, "rotateMix", 0);
3946
+ __publicField(this, "translateMix", 0);
3947
+ __publicField(this, "spaces", new Array());
3948
+ __publicField(this, "positions", new Array());
3949
+ __publicField(this, "world", new Array());
3950
+ __publicField(this, "curves", new Array());
3951
+ __publicField(this, "lengths", new Array());
3952
+ __publicField(this, "segments", new Array());
3953
+ if (data == null) throw new Error("data cannot be null.");
3954
+ if (skeleton == null) throw new Error("skeleton cannot be null.");
3864
3955
  this.data = data;
3865
3956
  this.bones = new Array();
3866
3957
  for (let i = 0, n = data.bones.length; i < n; i++) this.bones.push(skeleton.findBone(data.bones[i].name));
@@ -4219,22 +4310,22 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
4219
4310
  return this.data.order;
4220
4311
  }
4221
4312
  };
4222
- __publicField(_PathConstraint, 'NONE', -1);
4223
- __publicField(_PathConstraint, 'BEFORE', -2);
4224
- __publicField(_PathConstraint, 'AFTER', -3);
4225
- __publicField(_PathConstraint, 'epsilon', 1e-5);
4313
+ __publicField(_PathConstraint, "NONE", -1);
4314
+ __publicField(_PathConstraint, "BEFORE", -2);
4315
+ __publicField(_PathConstraint, "AFTER", -3);
4316
+ __publicField(_PathConstraint, "epsilon", 1e-5);
4226
4317
  let PathConstraint = _PathConstraint;
4227
4318
  class Slot {
4228
4319
  constructor(data, bone) {
4229
- __publicField(this, 'data');
4230
- __publicField(this, 'bone');
4231
- __publicField(this, 'color');
4232
- __publicField(this, 'darkColor');
4233
- __publicField(this, 'attachment');
4234
- __publicField(this, 'attachmentTime');
4235
- __publicField(this, 'attachmentVertices', new Array());
4236
- if (data == null) throw new Error('data cannot be null.');
4237
- if (bone == null) throw new Error('bone cannot be null.');
4320
+ __publicField(this, "data");
4321
+ __publicField(this, "bone");
4322
+ __publicField(this, "color");
4323
+ __publicField(this, "darkColor");
4324
+ __publicField(this, "attachment");
4325
+ __publicField(this, "attachmentTime");
4326
+ __publicField(this, "attachmentVertices", new Array());
4327
+ if (data == null) throw new Error("data cannot be null.");
4328
+ if (bone == null) throw new Error("bone cannot be null.");
4238
4329
  this.data = data;
4239
4330
  this.bone = bone;
4240
4331
  this.color = new Color();
@@ -4267,16 +4358,16 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
4267
4358
  }
4268
4359
  class TransformConstraint {
4269
4360
  constructor(data, skeleton) {
4270
- __publicField(this, 'data');
4271
- __publicField(this, 'bones');
4272
- __publicField(this, 'target');
4273
- __publicField(this, 'rotateMix', 0);
4274
- __publicField(this, 'translateMix', 0);
4275
- __publicField(this, 'scaleMix', 0);
4276
- __publicField(this, 'shearMix', 0);
4277
- __publicField(this, 'temp', new Vector2());
4278
- if (data == null) throw new Error('data cannot be null.');
4279
- if (skeleton == null) throw new Error('skeleton cannot be null.');
4361
+ __publicField(this, "data");
4362
+ __publicField(this, "bones");
4363
+ __publicField(this, "target");
4364
+ __publicField(this, "rotateMix", 0);
4365
+ __publicField(this, "translateMix", 0);
4366
+ __publicField(this, "scaleMix", 0);
4367
+ __publicField(this, "shearMix", 0);
4368
+ __publicField(this, "temp", new Vector2());
4369
+ if (data == null) throw new Error("data cannot be null.");
4370
+ if (skeleton == null) throw new Error("skeleton cannot be null.");
4280
4371
  this.data = data;
4281
4372
  this.rotateMix = data.rotateMix;
4282
4373
  this.translateMix = data.translateMix;
@@ -4501,23 +4592,23 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
4501
4592
  }
4502
4593
  class Skeleton {
4503
4594
  constructor(data) {
4504
- __publicField(this, 'data');
4505
- __publicField(this, 'bones');
4506
- __publicField(this, 'slots');
4507
- __publicField(this, 'drawOrder');
4508
- __publicField(this, 'ikConstraints');
4509
- __publicField(this, 'transformConstraints');
4510
- __publicField(this, 'pathConstraints');
4511
- __publicField(this, '_updateCache', new Array());
4512
- __publicField(this, 'updateCacheReset', new Array());
4513
- __publicField(this, 'skin');
4514
- __publicField(this, 'color');
4515
- __publicField(this, 'time', 0);
4516
- __publicField(this, 'flipX', false);
4517
- __publicField(this, 'flipY', false);
4518
- __publicField(this, 'x', 0);
4519
- __publicField(this, 'y', 0);
4520
- if (data == null) throw new Error('data cannot be null.');
4595
+ __publicField(this, "data");
4596
+ __publicField(this, "bones");
4597
+ __publicField(this, "slots");
4598
+ __publicField(this, "drawOrder");
4599
+ __publicField(this, "ikConstraints");
4600
+ __publicField(this, "transformConstraints");
4601
+ __publicField(this, "pathConstraints");
4602
+ __publicField(this, "_updateCache", new Array());
4603
+ __publicField(this, "updateCacheReset", new Array());
4604
+ __publicField(this, "skin");
4605
+ __publicField(this, "color");
4606
+ __publicField(this, "time", 0);
4607
+ __publicField(this, "flipX", false);
4608
+ __publicField(this, "flipY", false);
4609
+ __publicField(this, "x", 0);
4610
+ __publicField(this, "y", 0);
4611
+ if (data == null) throw new Error("data cannot be null.");
4521
4612
  this.data = data;
4522
4613
  this.bones = new Array();
4523
4614
  for (let i = 0; i < data.bones.length; i++) {
@@ -4738,7 +4829,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
4738
4829
  return this.bones[0];
4739
4830
  }
4740
4831
  findBone(boneName) {
4741
- if (boneName == null) throw new Error('boneName cannot be null.');
4832
+ if (boneName == null) throw new Error("boneName cannot be null.");
4742
4833
  let bones = this.bones;
4743
4834
  for (let i = 0, n = bones.length; i < n; i++) {
4744
4835
  let bone = bones[i];
@@ -4747,13 +4838,13 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
4747
4838
  return null;
4748
4839
  }
4749
4840
  findBoneIndex(boneName) {
4750
- if (boneName == null) throw new Error('boneName cannot be null.');
4841
+ if (boneName == null) throw new Error("boneName cannot be null.");
4751
4842
  let bones = this.bones;
4752
4843
  for (let i = 0, n = bones.length; i < n; i++) if (bones[i].data.name == boneName) return i;
4753
4844
  return -1;
4754
4845
  }
4755
4846
  findSlot(slotName) {
4756
- if (slotName == null) throw new Error('slotName cannot be null.');
4847
+ if (slotName == null) throw new Error("slotName cannot be null.");
4757
4848
  let slots = this.slots;
4758
4849
  for (let i = 0, n = slots.length; i < n; i++) {
4759
4850
  let slot = slots[i];
@@ -4762,14 +4853,14 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
4762
4853
  return null;
4763
4854
  }
4764
4855
  findSlotIndex(slotName) {
4765
- if (slotName == null) throw new Error('slotName cannot be null.');
4856
+ if (slotName == null) throw new Error("slotName cannot be null.");
4766
4857
  let slots = this.slots;
4767
4858
  for (let i = 0, n = slots.length; i < n; i++) if (slots[i].data.name == slotName) return i;
4768
4859
  return -1;
4769
4860
  }
4770
4861
  setSkinByName(skinName) {
4771
4862
  let skin = this.data.findSkin(skinName);
4772
- if (skin == null) throw new Error('Skin not found: ' + skinName);
4863
+ if (skin == null) throw new Error("Skin not found: " + skinName);
4773
4864
  this.setSkin(skin);
4774
4865
  }
4775
4866
  setSkin(newSkin) {
@@ -4792,7 +4883,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
4792
4883
  return this.getAttachment(this.data.findSlotIndex(slotName), attachmentName);
4793
4884
  }
4794
4885
  getAttachment(slotIndex, attachmentName) {
4795
- if (attachmentName == null) throw new Error('attachmentName cannot be null.');
4886
+ if (attachmentName == null) throw new Error("attachmentName cannot be null.");
4796
4887
  if (this.skin != null) {
4797
4888
  let attachment = this.skin.getAttachment(slotIndex, attachmentName);
4798
4889
  if (attachment != null) return attachment;
@@ -4801,7 +4892,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
4801
4892
  return null;
4802
4893
  }
4803
4894
  setAttachment(slotName, attachmentName) {
4804
- if (slotName == null) throw new Error('slotName cannot be null.');
4895
+ if (slotName == null) throw new Error("slotName cannot be null.");
4805
4896
  let slots = this.slots;
4806
4897
  for (let i = 0, n = slots.length; i < n; i++) {
4807
4898
  let slot = slots[i];
@@ -4809,16 +4900,16 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
4809
4900
  let attachment = null;
4810
4901
  if (attachmentName != null) {
4811
4902
  attachment = this.getAttachment(i, attachmentName);
4812
- if (attachment == null) throw new Error('Attachment not found: ' + attachmentName + ', for slot: ' + slotName);
4903
+ if (attachment == null) throw new Error("Attachment not found: " + attachmentName + ", for slot: " + slotName);
4813
4904
  }
4814
4905
  slot.setAttachment(attachment);
4815
4906
  return;
4816
4907
  }
4817
4908
  }
4818
- throw new Error('Slot not found: ' + slotName);
4909
+ throw new Error("Slot not found: " + slotName);
4819
4910
  }
4820
4911
  findIkConstraint(constraintName) {
4821
- if (constraintName == null) throw new Error('constraintName cannot be null.');
4912
+ if (constraintName == null) throw new Error("constraintName cannot be null.");
4822
4913
  let ikConstraints = this.ikConstraints;
4823
4914
  for (let i = 0, n = ikConstraints.length; i < n; i++) {
4824
4915
  let ikConstraint = ikConstraints[i];
@@ -4827,7 +4918,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
4827
4918
  return null;
4828
4919
  }
4829
4920
  findTransformConstraint(constraintName) {
4830
- if (constraintName == null) throw new Error('constraintName cannot be null.');
4921
+ if (constraintName == null) throw new Error("constraintName cannot be null.");
4831
4922
  let transformConstraints = this.transformConstraints;
4832
4923
  for (let i = 0, n = transformConstraints.length; i < n; i++) {
4833
4924
  let constraint = transformConstraints[i];
@@ -4836,7 +4927,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
4836
4927
  return null;
4837
4928
  }
4838
4929
  findPathConstraint(constraintName) {
4839
- if (constraintName == null) throw new Error('constraintName cannot be null.');
4930
+ if (constraintName == null) throw new Error("constraintName cannot be null.");
4840
4931
  let pathConstraints = this.pathConstraints;
4841
4932
  for (let i = 0, n = pathConstraints.length; i < n; i++) {
4842
4933
  let constraint = pathConstraints[i];
@@ -4845,8 +4936,8 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
4845
4936
  return null;
4846
4937
  }
4847
4938
  getBounds(offset, size, temp) {
4848
- if (offset == null) throw new Error('offset cannot be null.');
4849
- if (size == null) throw new Error('size cannot be null.');
4939
+ if (offset == null) throw new Error("offset cannot be null.");
4940
+ if (size == null) throw new Error("size cannot be null.");
4850
4941
  let drawOrder = this.drawOrder;
4851
4942
  let minX = Number.POSITIVE_INFINITY,
4852
4943
  minY = Number.POSITIVE_INFINITY,
@@ -4887,18 +4978,18 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
4887
4978
  }
4888
4979
  class SkeletonBounds {
4889
4980
  constructor() {
4890
- __publicField(this, 'minX', 0);
4891
- __publicField(this, 'minY', 0);
4892
- __publicField(this, 'maxX', 0);
4893
- __publicField(this, 'maxY', 0);
4894
- __publicField(this, 'boundingBoxes', new Array());
4895
- __publicField(this, 'polygons', new Array());
4896
- __publicField(this, 'polygonPool', new Pool(() => {
4981
+ __publicField(this, "minX", 0);
4982
+ __publicField(this, "minY", 0);
4983
+ __publicField(this, "maxX", 0);
4984
+ __publicField(this, "maxY", 0);
4985
+ __publicField(this, "boundingBoxes", new Array());
4986
+ __publicField(this, "polygons", new Array());
4987
+ __publicField(this, "polygonPool", new Pool(() => {
4897
4988
  return Utils.newFloatArray(16);
4898
4989
  }));
4899
4990
  }
4900
4991
  update(skeleton, updateAabb) {
4901
- if (skeleton == null) throw new Error('skeleton cannot be null.');
4992
+ if (skeleton == null) throw new Error("skeleton cannot be null.");
4902
4993
  let boundingBoxes = this.boundingBoxes;
4903
4994
  let polygons = this.polygons;
4904
4995
  let polygonPool = this.polygonPool;
@@ -5028,7 +5119,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
5028
5119
  return false;
5029
5120
  }
5030
5121
  getPolygon(boundingBox) {
5031
- if (boundingBox == null) throw new Error('boundingBox cannot be null.');
5122
+ if (boundingBox == null) throw new Error("boundingBox cannot be null.");
5032
5123
  let index = this.boundingBoxes.indexOf(boundingBox);
5033
5124
  return index == -1 ? null : this.polygons[index];
5034
5125
  }
@@ -5041,15 +5132,15 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
5041
5132
  }
5042
5133
  class Triangulator {
5043
5134
  constructor() {
5044
- __publicField(this, 'convexPolygons', new Array());
5045
- __publicField(this, 'convexPolygonsIndices', new Array());
5046
- __publicField(this, 'indicesArray', new Array());
5047
- __publicField(this, 'isConcaveArray', new Array());
5048
- __publicField(this, 'triangles', new Array());
5049
- __publicField(this, 'polygonPool', new Pool(() => {
5135
+ __publicField(this, "convexPolygons", new Array());
5136
+ __publicField(this, "convexPolygonsIndices", new Array());
5137
+ __publicField(this, "indicesArray", new Array());
5138
+ __publicField(this, "isConcaveArray", new Array());
5139
+ __publicField(this, "triangles", new Array());
5140
+ __publicField(this, "polygonPool", new Pool(() => {
5050
5141
  return new Array();
5051
5142
  }));
5052
- __publicField(this, 'polygonIndicesPool', new Pool(() => {
5143
+ __publicField(this, "polygonIndicesPool", new Pool(() => {
5053
5144
  return new Array();
5054
5145
  }));
5055
5146
  }
@@ -5258,15 +5349,15 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
5258
5349
  }
5259
5350
  class SkeletonClipping {
5260
5351
  constructor() {
5261
- __publicField(this, 'triangulator', new Triangulator());
5262
- __publicField(this, 'clippingPolygon', new Array());
5263
- __publicField(this, 'clipOutput', new Array());
5264
- __publicField(this, 'clippedVertices', new Array());
5265
- __publicField(this, 'clippedUVs', new Array());
5266
- __publicField(this, 'clippedTriangles', new Array());
5267
- __publicField(this, 'scratch', new Array());
5268
- __publicField(this, 'clipAttachment');
5269
- __publicField(this, 'clippingPolygons');
5352
+ __publicField(this, "triangulator", new Triangulator());
5353
+ __publicField(this, "clippingPolygon", new Array());
5354
+ __publicField(this, "clipOutput", new Array());
5355
+ __publicField(this, "clippedVertices", new Array());
5356
+ __publicField(this, "clippedUVs", new Array());
5357
+ __publicField(this, "clippedTriangles", new Array());
5358
+ __publicField(this, "scratch", new Array());
5359
+ __publicField(this, "clipAttachment");
5360
+ __publicField(this, "clippingPolygons");
5270
5361
  }
5271
5362
  clipStart(slot, clip) {
5272
5363
  if (this.clipAttachment != null) return 0;
@@ -5648,25 +5739,25 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
5648
5739
  }
5649
5740
  class SkeletonData {
5650
5741
  constructor() {
5651
- __publicField(this, 'name');
5652
- __publicField(this, 'bones', new Array());
5653
- __publicField(this, 'slots', new Array());
5654
- __publicField(this, 'skins', new Array());
5655
- __publicField(this, 'defaultSkin');
5656
- __publicField(this, 'events', new Array());
5657
- __publicField(this, 'animations', new Array());
5658
- __publicField(this, 'ikConstraints', new Array());
5659
- __publicField(this, 'transformConstraints', new Array());
5660
- __publicField(this, 'pathConstraints', new Array());
5661
- __publicField(this, 'width');
5662
- __publicField(this, 'height');
5663
- __publicField(this, 'version');
5664
- __publicField(this, 'hash');
5665
- __publicField(this, 'fps', 0);
5666
- __publicField(this, 'imagesPath');
5742
+ __publicField(this, "name");
5743
+ __publicField(this, "bones", new Array());
5744
+ __publicField(this, "slots", new Array());
5745
+ __publicField(this, "skins", new Array());
5746
+ __publicField(this, "defaultSkin");
5747
+ __publicField(this, "events", new Array());
5748
+ __publicField(this, "animations", new Array());
5749
+ __publicField(this, "ikConstraints", new Array());
5750
+ __publicField(this, "transformConstraints", new Array());
5751
+ __publicField(this, "pathConstraints", new Array());
5752
+ __publicField(this, "width");
5753
+ __publicField(this, "height");
5754
+ __publicField(this, "version");
5755
+ __publicField(this, "hash");
5756
+ __publicField(this, "fps", 0);
5757
+ __publicField(this, "imagesPath");
5667
5758
  }
5668
5759
  findBone(boneName) {
5669
- if (boneName == null) throw new Error('boneName cannot be null.');
5760
+ if (boneName == null) throw new Error("boneName cannot be null.");
5670
5761
  let bones = this.bones;
5671
5762
  for (let i = 0, n = bones.length; i < n; i++) {
5672
5763
  let bone = bones[i];
@@ -5675,13 +5766,13 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
5675
5766
  return null;
5676
5767
  }
5677
5768
  findBoneIndex(boneName) {
5678
- if (boneName == null) throw new Error('boneName cannot be null.');
5769
+ if (boneName == null) throw new Error("boneName cannot be null.");
5679
5770
  let bones = this.bones;
5680
5771
  for (let i = 0, n = bones.length; i < n; i++) if (bones[i].name == boneName) return i;
5681
5772
  return -1;
5682
5773
  }
5683
5774
  findSlot(slotName) {
5684
- if (slotName == null) throw new Error('slotName cannot be null.');
5775
+ if (slotName == null) throw new Error("slotName cannot be null.");
5685
5776
  let slots = this.slots;
5686
5777
  for (let i = 0, n = slots.length; i < n; i++) {
5687
5778
  let slot = slots[i];
@@ -5690,13 +5781,13 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
5690
5781
  return null;
5691
5782
  }
5692
5783
  findSlotIndex(slotName) {
5693
- if (slotName == null) throw new Error('slotName cannot be null.');
5784
+ if (slotName == null) throw new Error("slotName cannot be null.");
5694
5785
  let slots = this.slots;
5695
5786
  for (let i = 0, n = slots.length; i < n; i++) if (slots[i].name == slotName) return i;
5696
5787
  return -1;
5697
5788
  }
5698
5789
  findSkin(skinName) {
5699
- if (skinName == null) throw new Error('skinName cannot be null.');
5790
+ if (skinName == null) throw new Error("skinName cannot be null.");
5700
5791
  let skins = this.skins;
5701
5792
  for (let i = 0, n = skins.length; i < n; i++) {
5702
5793
  let skin = skins[i];
@@ -5705,7 +5796,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
5705
5796
  return null;
5706
5797
  }
5707
5798
  findEvent(eventDataName) {
5708
- if (eventDataName == null) throw new Error('eventDataName cannot be null.');
5799
+ if (eventDataName == null) throw new Error("eventDataName cannot be null.");
5709
5800
  let events = this.events;
5710
5801
  for (let i = 0, n = events.length; i < n; i++) {
5711
5802
  let event = events[i];
@@ -5714,7 +5805,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
5714
5805
  return null;
5715
5806
  }
5716
5807
  findAnimation(animationName) {
5717
- if (animationName == null) throw new Error('animationName cannot be null.');
5808
+ if (animationName == null) throw new Error("animationName cannot be null.");
5718
5809
  let animations = this.animations;
5719
5810
  for (let i = 0, n = animations.length; i < n; i++) {
5720
5811
  let animation = animations[i];
@@ -5723,7 +5814,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
5723
5814
  return null;
5724
5815
  }
5725
5816
  findIkConstraint(constraintName) {
5726
- if (constraintName == null) throw new Error('constraintName cannot be null.');
5817
+ if (constraintName == null) throw new Error("constraintName cannot be null.");
5727
5818
  let ikConstraints = this.ikConstraints;
5728
5819
  for (let i = 0, n = ikConstraints.length; i < n; i++) {
5729
5820
  let constraint = ikConstraints[i];
@@ -5732,7 +5823,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
5732
5823
  return null;
5733
5824
  }
5734
5825
  findTransformConstraint(constraintName) {
5735
- if (constraintName == null) throw new Error('constraintName cannot be null.');
5826
+ if (constraintName == null) throw new Error("constraintName cannot be null.");
5736
5827
  let transformConstraints = this.transformConstraints;
5737
5828
  for (let i = 0, n = transformConstraints.length; i < n; i++) {
5738
5829
  let constraint = transformConstraints[i];
@@ -5741,7 +5832,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
5741
5832
  return null;
5742
5833
  }
5743
5834
  findPathConstraint(constraintName) {
5744
- if (constraintName == null) throw new Error('constraintName cannot be null.');
5835
+ if (constraintName == null) throw new Error("constraintName cannot be null.");
5745
5836
  let pathConstraints = this.pathConstraints;
5746
5837
  for (let i = 0, n = pathConstraints.length; i < n; i++) {
5747
5838
  let constraint = pathConstraints[i];
@@ -5750,28 +5841,28 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
5750
5841
  return null;
5751
5842
  }
5752
5843
  findPathConstraintIndex(pathConstraintName) {
5753
- if (pathConstraintName == null) throw new Error('pathConstraintName cannot be null.');
5844
+ if (pathConstraintName == null) throw new Error("pathConstraintName cannot be null.");
5754
5845
  let pathConstraints = this.pathConstraints;
5755
5846
  for (let i = 0, n = pathConstraints.length; i < n; i++) if (pathConstraints[i].name == pathConstraintName) return i;
5756
5847
  return -1;
5757
5848
  }
5758
5849
  }
5759
5850
  var BlendMode = (BlendMode2 => {
5760
- BlendMode2[BlendMode2['Normal'] = 0] = 'Normal';
5761
- BlendMode2[BlendMode2['Additive'] = 1] = 'Additive';
5762
- BlendMode2[BlendMode2['Multiply'] = 2] = 'Multiply';
5763
- BlendMode2[BlendMode2['Screen'] = 3] = 'Screen';
5851
+ BlendMode2[BlendMode2["Normal"] = 0] = "Normal";
5852
+ BlendMode2[BlendMode2["Additive"] = 1] = "Additive";
5853
+ BlendMode2[BlendMode2["Multiply"] = 2] = "Multiply";
5854
+ BlendMode2[BlendMode2["Screen"] = 3] = "Screen";
5764
5855
  return BlendMode2;
5765
5856
  })(BlendMode || {});
5766
5857
  class Skin {
5767
5858
  constructor(name) {
5768
- __publicField(this, 'name');
5769
- __publicField(this, 'attachments', new Array());
5770
- if (name == null) throw new Error('name cannot be null.');
5859
+ __publicField(this, "name");
5860
+ __publicField(this, "attachments", new Array());
5861
+ if (name == null) throw new Error("name cannot be null.");
5771
5862
  this.name = name;
5772
5863
  }
5773
5864
  addAttachment(slotIndex, name, attachment) {
5774
- if (attachment == null) throw new Error('attachment cannot be null.');
5865
+ if (attachment == null) throw new Error("attachment cannot be null.");
5775
5866
  let attachments = this.attachments;
5776
5867
  if (slotIndex >= attachments.length) attachments.length = slotIndex + 1;
5777
5868
  if (!attachments[slotIndex]) attachments[slotIndex] = {};
@@ -5803,16 +5894,16 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
5803
5894
  }
5804
5895
  class SlotData {
5805
5896
  constructor(index, name, boneData) {
5806
- __publicField(this, 'index');
5807
- __publicField(this, 'name');
5808
- __publicField(this, 'boneData');
5809
- __publicField(this, 'color', new Color(1, 1, 1, 1));
5810
- __publicField(this, 'darkColor');
5811
- __publicField(this, 'attachmentName');
5812
- __publicField(this, 'blendMode');
5813
- if (index < 0) throw new Error('index must be >= 0.');
5814
- if (name == null) throw new Error('name cannot be null.');
5815
- if (boneData == null) throw new Error('boneData cannot be null.');
5897
+ __publicField(this, "index");
5898
+ __publicField(this, "name");
5899
+ __publicField(this, "boneData");
5900
+ __publicField(this, "color", new Color(1, 1, 1, 1));
5901
+ __publicField(this, "darkColor");
5902
+ __publicField(this, "attachmentName");
5903
+ __publicField(this, "blendMode");
5904
+ if (index < 0) throw new Error("index must be >= 0.");
5905
+ if (name == null) throw new Error("name cannot be null.");
5906
+ if (boneData == null) throw new Error("boneData cannot be null.");
5816
5907
  this.index = index;
5817
5908
  this.name = name;
5818
5909
  this.boneData = boneData;
@@ -5820,37 +5911,37 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
5820
5911
  }
5821
5912
  class TransformConstraintData {
5822
5913
  constructor(name) {
5823
- __publicField(this, 'name');
5824
- __publicField(this, 'order', 0);
5825
- __publicField(this, 'bones', new Array());
5826
- __publicField(this, 'target');
5827
- __publicField(this, 'rotateMix', 0);
5828
- __publicField(this, 'translateMix', 0);
5829
- __publicField(this, 'scaleMix', 0);
5830
- __publicField(this, 'shearMix', 0);
5831
- __publicField(this, 'offsetRotation', 0);
5832
- __publicField(this, 'offsetX', 0);
5833
- __publicField(this, 'offsetY', 0);
5834
- __publicField(this, 'offsetScaleX', 0);
5835
- __publicField(this, 'offsetScaleY', 0);
5836
- __publicField(this, 'offsetShearY', 0);
5837
- __publicField(this, 'relative', false);
5838
- __publicField(this, 'local', false);
5839
- if (name == null) throw new Error('name cannot be null.');
5914
+ __publicField(this, "name");
5915
+ __publicField(this, "order", 0);
5916
+ __publicField(this, "bones", new Array());
5917
+ __publicField(this, "target");
5918
+ __publicField(this, "rotateMix", 0);
5919
+ __publicField(this, "translateMix", 0);
5920
+ __publicField(this, "scaleMix", 0);
5921
+ __publicField(this, "shearMix", 0);
5922
+ __publicField(this, "offsetRotation", 0);
5923
+ __publicField(this, "offsetX", 0);
5924
+ __publicField(this, "offsetY", 0);
5925
+ __publicField(this, "offsetScaleX", 0);
5926
+ __publicField(this, "offsetScaleY", 0);
5927
+ __publicField(this, "offsetShearY", 0);
5928
+ __publicField(this, "relative", false);
5929
+ __publicField(this, "local", false);
5930
+ if (name == null) throw new Error("name cannot be null.");
5840
5931
  this.name = name;
5841
5932
  }
5842
5933
  }
5843
5934
  class SkeletonJson {
5844
5935
  constructor(attachmentLoader) {
5845
- __publicField(this, 'attachmentLoader');
5846
- __publicField(this, 'scale', 1);
5847
- __publicField(this, 'linkedMeshes', new Array());
5936
+ __publicField(this, "attachmentLoader");
5937
+ __publicField(this, "scale", 1);
5938
+ __publicField(this, "linkedMeshes", new Array());
5848
5939
  this.attachmentLoader = attachmentLoader;
5849
5940
  }
5850
5941
  readSkeletonData(json) {
5851
5942
  let scale = this.scale;
5852
5943
  let skeletonData = new SkeletonData();
5853
- let root = typeof json === 'string' ? JSON.parse(json) : json;
5944
+ let root = typeof json === "string" ? JSON.parse(json) : json;
5854
5945
  let skeletonMap = root.skeleton;
5855
5946
  if (skeletonMap != null) {
5856
5947
  skeletonData.hash = skeletonMap.hash;
@@ -5864,21 +5955,21 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
5864
5955
  for (let i = 0; i < root.bones.length; i++) {
5865
5956
  let boneMap = root.bones[i];
5866
5957
  let parent = null;
5867
- let parentName = this.getValue(boneMap, 'parent', null);
5958
+ let parentName = this.getValue(boneMap, "parent", null);
5868
5959
  if (parentName != null) {
5869
5960
  parent = skeletonData.findBone(parentName);
5870
- if (parent == null) throw new Error('Parent bone not found: ' + parentName);
5961
+ if (parent == null) throw new Error("Parent bone not found: " + parentName);
5871
5962
  }
5872
5963
  let data = new BoneData(skeletonData.bones.length, boneMap.name, parent);
5873
- data.length = this.getValue(boneMap, 'length', 0) * scale;
5874
- data.x = this.getValue(boneMap, 'x', 0) * scale;
5875
- data.y = this.getValue(boneMap, 'y', 0) * scale;
5876
- data.rotation = this.getValue(boneMap, 'rotation', 0);
5877
- data.scaleX = this.getValue(boneMap, 'scaleX', 1);
5878
- data.scaleY = this.getValue(boneMap, 'scaleY', 1);
5879
- data.shearX = this.getValue(boneMap, 'shearX', 0);
5880
- data.shearY = this.getValue(boneMap, 'shearY', 0);
5881
- data.transformMode = SkeletonJson.transformModeFromString(this.getValue(boneMap, 'transform', 'normal'));
5964
+ data.length = this.getValue(boneMap, "length", 0) * scale;
5965
+ data.x = this.getValue(boneMap, "x", 0) * scale;
5966
+ data.y = this.getValue(boneMap, "y", 0) * scale;
5967
+ data.rotation = this.getValue(boneMap, "rotation", 0);
5968
+ data.scaleX = this.getValue(boneMap, "scaleX", 1);
5969
+ data.scaleY = this.getValue(boneMap, "scaleY", 1);
5970
+ data.shearX = this.getValue(boneMap, "shearX", 0);
5971
+ data.shearY = this.getValue(boneMap, "shearY", 0);
5972
+ data.transformMode = SkeletonJson.transformModeFromString(this.getValue(boneMap, "transform", "normal"));
5882
5973
  skeletonData.bones.push(data);
5883
5974
  }
5884
5975
  }
@@ -5888,17 +5979,17 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
5888
5979
  let slotName = slotMap.name;
5889
5980
  let boneName = slotMap.bone;
5890
5981
  let boneData = skeletonData.findBone(boneName);
5891
- if (boneData == null) throw new Error('Slot bone not found: ' + boneName);
5982
+ if (boneData == null) throw new Error("Slot bone not found: " + boneName);
5892
5983
  let data = new SlotData(skeletonData.slots.length, slotName, boneData);
5893
- let color = this.getValue(slotMap, 'color', null);
5984
+ let color = this.getValue(slotMap, "color", null);
5894
5985
  if (color != null) data.color.setFromString(color);
5895
- let dark = this.getValue(slotMap, 'dark', null);
5986
+ let dark = this.getValue(slotMap, "dark", null);
5896
5987
  if (dark != null) {
5897
5988
  data.darkColor = new Color(1, 1, 1, 1);
5898
5989
  data.darkColor.setFromString(dark);
5899
5990
  }
5900
- data.attachmentName = this.getValue(slotMap, 'attachment', null);
5901
- data.blendMode = SkeletonJson.blendModeFromString(this.getValue(slotMap, 'blend', 'normal'));
5991
+ data.attachmentName = this.getValue(slotMap, "attachment", null);
5992
+ data.blendMode = SkeletonJson.blendModeFromString(this.getValue(slotMap, "blend", "normal"));
5902
5993
  skeletonData.slots.push(data);
5903
5994
  }
5904
5995
  }
@@ -5906,18 +5997,18 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
5906
5997
  for (let i = 0; i < root.ik.length; i++) {
5907
5998
  let constraintMap = root.ik[i];
5908
5999
  let data = new IkConstraintData(constraintMap.name);
5909
- data.order = this.getValue(constraintMap, 'order', 0);
6000
+ data.order = this.getValue(constraintMap, "order", 0);
5910
6001
  for (let j = 0; j < constraintMap.bones.length; j++) {
5911
6002
  let boneName = constraintMap.bones[j];
5912
6003
  let bone = skeletonData.findBone(boneName);
5913
- if (bone == null) throw new Error('IK bone not found: ' + boneName);
6004
+ if (bone == null) throw new Error("IK bone not found: " + boneName);
5914
6005
  data.bones.push(bone);
5915
6006
  }
5916
6007
  let targetName = constraintMap.target;
5917
6008
  data.target = skeletonData.findBone(targetName);
5918
- if (data.target == null) throw new Error('IK target bone not found: ' + targetName);
5919
- data.bendDirection = this.getValue(constraintMap, 'bendPositive', true) ? 1 : -1;
5920
- data.mix = this.getValue(constraintMap, 'mix', 1);
6009
+ if (data.target == null) throw new Error("IK target bone not found: " + targetName);
6010
+ data.bendDirection = this.getValue(constraintMap, "bendPositive", true) ? 1 : -1;
6011
+ data.mix = this.getValue(constraintMap, "mix", 1);
5921
6012
  skeletonData.ikConstraints.push(data);
5922
6013
  }
5923
6014
  }
@@ -5925,28 +6016,28 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
5925
6016
  for (let i = 0; i < root.transform.length; i++) {
5926
6017
  let constraintMap = root.transform[i];
5927
6018
  let data = new TransformConstraintData(constraintMap.name);
5928
- data.order = this.getValue(constraintMap, 'order', 0);
6019
+ data.order = this.getValue(constraintMap, "order", 0);
5929
6020
  for (let j = 0; j < constraintMap.bones.length; j++) {
5930
6021
  let boneName = constraintMap.bones[j];
5931
6022
  let bone = skeletonData.findBone(boneName);
5932
- if (bone == null) throw new Error('Transform constraint bone not found: ' + boneName);
6023
+ if (bone == null) throw new Error("Transform constraint bone not found: " + boneName);
5933
6024
  data.bones.push(bone);
5934
6025
  }
5935
6026
  let targetName = constraintMap.target;
5936
6027
  data.target = skeletonData.findBone(targetName);
5937
- if (data.target == null) throw new Error('Transform constraint target bone not found: ' + targetName);
5938
- data.local = this.getValue(constraintMap, 'local', false);
5939
- data.relative = this.getValue(constraintMap, 'relative', false);
5940
- data.offsetRotation = this.getValue(constraintMap, 'rotation', 0);
5941
- data.offsetX = this.getValue(constraintMap, 'x', 0) * scale;
5942
- data.offsetY = this.getValue(constraintMap, 'y', 0) * scale;
5943
- data.offsetScaleX = this.getValue(constraintMap, 'scaleX', 0);
5944
- data.offsetScaleY = this.getValue(constraintMap, 'scaleY', 0);
5945
- data.offsetShearY = this.getValue(constraintMap, 'shearY', 0);
5946
- data.rotateMix = this.getValue(constraintMap, 'rotateMix', 1);
5947
- data.translateMix = this.getValue(constraintMap, 'translateMix', 1);
5948
- data.scaleMix = this.getValue(constraintMap, 'scaleMix', 1);
5949
- data.shearMix = this.getValue(constraintMap, 'shearMix', 1);
6028
+ if (data.target == null) throw new Error("Transform constraint target bone not found: " + targetName);
6029
+ data.local = this.getValue(constraintMap, "local", false);
6030
+ data.relative = this.getValue(constraintMap, "relative", false);
6031
+ data.offsetRotation = this.getValue(constraintMap, "rotation", 0);
6032
+ data.offsetX = this.getValue(constraintMap, "x", 0) * scale;
6033
+ data.offsetY = this.getValue(constraintMap, "y", 0) * scale;
6034
+ data.offsetScaleX = this.getValue(constraintMap, "scaleX", 0);
6035
+ data.offsetScaleY = this.getValue(constraintMap, "scaleY", 0);
6036
+ data.offsetShearY = this.getValue(constraintMap, "shearY", 0);
6037
+ data.rotateMix = this.getValue(constraintMap, "rotateMix", 1);
6038
+ data.translateMix = this.getValue(constraintMap, "translateMix", 1);
6039
+ data.scaleMix = this.getValue(constraintMap, "scaleMix", 1);
6040
+ data.shearMix = this.getValue(constraintMap, "shearMix", 1);
5950
6041
  skeletonData.transformConstraints.push(data);
5951
6042
  }
5952
6043
  }
@@ -5954,26 +6045,26 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
5954
6045
  for (let i = 0; i < root.path.length; i++) {
5955
6046
  let constraintMap = root.path[i];
5956
6047
  let data = new PathConstraintData(constraintMap.name);
5957
- data.order = this.getValue(constraintMap, 'order', 0);
6048
+ data.order = this.getValue(constraintMap, "order", 0);
5958
6049
  for (let j = 0; j < constraintMap.bones.length; j++) {
5959
6050
  let boneName = constraintMap.bones[j];
5960
6051
  let bone = skeletonData.findBone(boneName);
5961
- if (bone == null) throw new Error('Transform constraint bone not found: ' + boneName);
6052
+ if (bone == null) throw new Error("Transform constraint bone not found: " + boneName);
5962
6053
  data.bones.push(bone);
5963
6054
  }
5964
6055
  let targetName = constraintMap.target;
5965
6056
  data.target = skeletonData.findSlot(targetName);
5966
- if (data.target == null) throw new Error('Path target slot not found: ' + targetName);
5967
- data.positionMode = SkeletonJson.positionModeFromString(this.getValue(constraintMap, 'positionMode', 'percent'));
5968
- data.spacingMode = SkeletonJson.spacingModeFromString(this.getValue(constraintMap, 'spacingMode', 'length'));
5969
- data.rotateMode = SkeletonJson.rotateModeFromString(this.getValue(constraintMap, 'rotateMode', 'tangent'));
5970
- data.offsetRotation = this.getValue(constraintMap, 'rotation', 0);
5971
- data.position = this.getValue(constraintMap, 'position', 0);
6057
+ if (data.target == null) throw new Error("Path target slot not found: " + targetName);
6058
+ data.positionMode = SkeletonJson.positionModeFromString(this.getValue(constraintMap, "positionMode", "percent"));
6059
+ data.spacingMode = SkeletonJson.spacingModeFromString(this.getValue(constraintMap, "spacingMode", "length"));
6060
+ data.rotateMode = SkeletonJson.rotateModeFromString(this.getValue(constraintMap, "rotateMode", "tangent"));
6061
+ data.offsetRotation = this.getValue(constraintMap, "rotation", 0);
6062
+ data.position = this.getValue(constraintMap, "position", 0);
5972
6063
  if (data.positionMode == PositionMode.Fixed) data.position *= scale;
5973
- data.spacing = this.getValue(constraintMap, 'spacing', 0);
6064
+ data.spacing = this.getValue(constraintMap, "spacing", 0);
5974
6065
  if (data.spacingMode == SpacingMode.Length || data.spacingMode == SpacingMode.Fixed) data.spacing *= scale;
5975
- data.rotateMix = this.getValue(constraintMap, 'rotateMix', 1);
5976
- data.translateMix = this.getValue(constraintMap, 'translateMix', 1);
6066
+ data.rotateMix = this.getValue(constraintMap, "rotateMix", 1);
6067
+ data.translateMix = this.getValue(constraintMap, "translateMix", 1);
5977
6068
  skeletonData.pathConstraints.push(data);
5978
6069
  }
5979
6070
  }
@@ -5983,7 +6074,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
5983
6074
  let skin = new Skin(skinName);
5984
6075
  for (let slotName in skinMap) {
5985
6076
  let slotIndex = skeletonData.findSlotIndex(slotName);
5986
- if (slotIndex == -1) throw new Error('Slot not found: ' + slotName);
6077
+ if (slotIndex == -1) throw new Error("Slot not found: " + slotName);
5987
6078
  let slotMap = skinMap[slotName];
5988
6079
  for (let entryName in slotMap) {
5989
6080
  let attachment = this.readAttachment(slotMap[entryName], skin, slotIndex, entryName, skeletonData);
@@ -5991,15 +6082,15 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
5991
6082
  }
5992
6083
  }
5993
6084
  skeletonData.skins.push(skin);
5994
- if (skin.name == 'default') skeletonData.defaultSkin = skin;
6085
+ if (skin.name == "default") skeletonData.defaultSkin = skin;
5995
6086
  }
5996
6087
  }
5997
6088
  for (let i = 0, n = this.linkedMeshes.length; i < n; i++) {
5998
6089
  let linkedMesh = this.linkedMeshes[i];
5999
6090
  let skin = linkedMesh.skin == null ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);
6000
- if (skin == null) throw new Error('Skin not found: ' + linkedMesh.skin);
6091
+ if (skin == null) throw new Error("Skin not found: " + linkedMesh.skin);
6001
6092
  let parent = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);
6002
- if (parent == null) throw new Error('Parent mesh not found: ' + linkedMesh.parent);
6093
+ if (parent == null) throw new Error("Parent mesh not found: " + linkedMesh.parent);
6003
6094
  linkedMesh.mesh.setParentMesh(parent);
6004
6095
  linkedMesh.mesh.updateUVs();
6005
6096
  }
@@ -6008,9 +6099,9 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6008
6099
  for (let eventName in root.events) {
6009
6100
  let eventMap = root.events[eventName];
6010
6101
  let data = new EventData(eventName);
6011
- data.intValue = this.getValue(eventMap, 'int', 0);
6012
- data.floatValue = this.getValue(eventMap, 'float', 0);
6013
- data.stringValue = this.getValue(eventMap, 'string', '');
6102
+ data.intValue = this.getValue(eventMap, "int", 0);
6103
+ data.floatValue = this.getValue(eventMap, "float", 0);
6104
+ data.stringValue = this.getValue(eventMap, "string", "");
6014
6105
  skeletonData.events.push(data);
6015
6106
  }
6016
6107
  }
@@ -6024,49 +6115,49 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6024
6115
  }
6025
6116
  readAttachment(map, skin, slotIndex, name, skeletonData) {
6026
6117
  let scale = this.scale;
6027
- name = this.getValue(map, 'name', name);
6028
- let type = this.getValue(map, 'type', 'region');
6118
+ name = this.getValue(map, "name", name);
6119
+ let type = this.getValue(map, "type", "region");
6029
6120
  switch (type) {
6030
- case 'region':
6121
+ case "region":
6031
6122
  {
6032
- let path2 = this.getValue(map, 'path', name);
6123
+ let path2 = this.getValue(map, "path", name);
6033
6124
  let region = this.attachmentLoader.newRegionAttachment(skin, name, path2);
6034
6125
  if (region == null) return null;
6035
6126
  region.path = path2;
6036
- region.x = this.getValue(map, 'x', 0) * scale;
6037
- region.y = this.getValue(map, 'y', 0) * scale;
6038
- region.scaleX = this.getValue(map, 'scaleX', 1);
6039
- region.scaleY = this.getValue(map, 'scaleY', 1);
6040
- region.rotation = this.getValue(map, 'rotation', 0);
6127
+ region.x = this.getValue(map, "x", 0) * scale;
6128
+ region.y = this.getValue(map, "y", 0) * scale;
6129
+ region.scaleX = this.getValue(map, "scaleX", 1);
6130
+ region.scaleY = this.getValue(map, "scaleY", 1);
6131
+ region.rotation = this.getValue(map, "rotation", 0);
6041
6132
  region.width = map.width * scale;
6042
6133
  region.height = map.height * scale;
6043
- let color = this.getValue(map, 'color', null);
6134
+ let color = this.getValue(map, "color", null);
6044
6135
  if (color != null) region.color.setFromString(color);
6045
6136
  region.updateOffset();
6046
6137
  return region;
6047
6138
  }
6048
- case 'boundingbox':
6139
+ case "boundingbox":
6049
6140
  {
6050
6141
  let box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);
6051
6142
  if (box == null) return null;
6052
6143
  this.readVertices(map, box, map.vertexCount << 1);
6053
- let color = this.getValue(map, 'color', null);
6144
+ let color = this.getValue(map, "color", null);
6054
6145
  if (color != null) box.color.setFromString(color);
6055
6146
  return box;
6056
6147
  }
6057
- case 'mesh':
6058
- case 'linkedmesh':
6148
+ case "mesh":
6149
+ case "linkedmesh":
6059
6150
  {
6060
- let path2 = this.getValue(map, 'path', name);
6151
+ let path2 = this.getValue(map, "path", name);
6061
6152
  let mesh = this.attachmentLoader.newMeshAttachment(skin, name, path2);
6062
6153
  if (mesh == null) return null;
6063
6154
  mesh.path = path2;
6064
- let color = this.getValue(map, 'color', null);
6155
+ let color = this.getValue(map, "color", null);
6065
6156
  if (color != null) mesh.color.setFromString(color);
6066
- let parent = this.getValue(map, 'parent', null);
6157
+ let parent = this.getValue(map, "parent", null);
6067
6158
  if (parent != null) {
6068
- mesh.inheritDeform = this.getValue(map, 'deform', true);
6069
- this.linkedMeshes.push(new LinkedMesh(mesh, this.getValue(map, 'skin', null), slotIndex, parent));
6159
+ mesh.inheritDeform = this.getValue(map, "deform", true);
6160
+ this.linkedMeshes.push(new LinkedMesh(mesh, this.getValue(map, "skin", null), slotIndex, parent));
6070
6161
  return mesh;
6071
6162
  }
6072
6163
  let uvs = map.uvs;
@@ -6074,48 +6165,48 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6074
6165
  mesh.triangles = map.triangles;
6075
6166
  mesh.regionUVs = uvs;
6076
6167
  mesh.updateUVs();
6077
- mesh.hullLength = this.getValue(map, 'hull', 0) * 2;
6168
+ mesh.hullLength = this.getValue(map, "hull", 0) * 2;
6078
6169
  return mesh;
6079
6170
  }
6080
- case 'path':
6171
+ case "path":
6081
6172
  {
6082
6173
  let path2 = this.attachmentLoader.newPathAttachment(skin, name);
6083
6174
  if (path2 == null) return null;
6084
- path2.closed = this.getValue(map, 'closed', false);
6085
- path2.constantSpeed = this.getValue(map, 'constantSpeed', true);
6175
+ path2.closed = this.getValue(map, "closed", false);
6176
+ path2.constantSpeed = this.getValue(map, "constantSpeed", true);
6086
6177
  let vertexCount = map.vertexCount;
6087
6178
  this.readVertices(map, path2, vertexCount << 1);
6088
6179
  let lengths = Utils.newArray(vertexCount / 3, 0);
6089
6180
  for (let i = 0; i < map.lengths.length; i++) lengths[i] = map.lengths[i] * scale;
6090
6181
  path2.lengths = lengths;
6091
- let color = this.getValue(map, 'color', null);
6182
+ let color = this.getValue(map, "color", null);
6092
6183
  if (color != null) path2.color.setFromString(color);
6093
6184
  return path2;
6094
6185
  }
6095
- case 'point':
6186
+ case "point":
6096
6187
  {
6097
6188
  let point = this.attachmentLoader.newPointAttachment(skin, name);
6098
6189
  if (point == null) return null;
6099
- point.x = this.getValue(map, 'x', 0) * scale;
6100
- point.y = this.getValue(map, 'y', 0) * scale;
6101
- point.rotation = this.getValue(map, 'rotation', 0);
6102
- let color = this.getValue(map, 'color', null);
6190
+ point.x = this.getValue(map, "x", 0) * scale;
6191
+ point.y = this.getValue(map, "y", 0) * scale;
6192
+ point.rotation = this.getValue(map, "rotation", 0);
6193
+ let color = this.getValue(map, "color", null);
6103
6194
  if (color != null) point.color.setFromString(color);
6104
6195
  return point;
6105
6196
  }
6106
- case 'clipping':
6197
+ case "clipping":
6107
6198
  {
6108
6199
  let clip = this.attachmentLoader.newClippingAttachment(skin, name);
6109
6200
  if (clip == null) return null;
6110
- let end = this.getValue(map, 'end', null);
6201
+ let end = this.getValue(map, "end", null);
6111
6202
  if (end != null) {
6112
6203
  let slot = skeletonData.findSlot(end);
6113
- if (slot == null) throw new Error('Clipping end slot not found: ' + end);
6204
+ if (slot == null) throw new Error("Clipping end slot not found: " + end);
6114
6205
  clip.endSlot = slot;
6115
6206
  }
6116
6207
  let vertexCount = map.vertexCount;
6117
6208
  this.readVertices(map, clip, vertexCount << 1);
6118
- let color = this.getValue(map, 'color', null);
6209
+ let color = this.getValue(map, "color", null);
6119
6210
  if (color != null) clip.color.setFromString(color);
6120
6211
  return clip;
6121
6212
  }
@@ -6157,10 +6248,10 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6157
6248
  for (let slotName in map.slots) {
6158
6249
  let slotMap = map.slots[slotName];
6159
6250
  let slotIndex = skeletonData.findSlotIndex(slotName);
6160
- if (slotIndex == -1) throw new Error('Slot not found: ' + slotName);
6251
+ if (slotIndex == -1) throw new Error("Slot not found: " + slotName);
6161
6252
  for (let timelineName in slotMap) {
6162
6253
  let timelineMap = slotMap[timelineName];
6163
- if (timelineName == 'attachment') {
6254
+ if (timelineName == "attachment") {
6164
6255
  let timeline = new AttachmentTimeline(timelineMap.length);
6165
6256
  timeline.slotIndex = slotIndex;
6166
6257
  let frameIndex = 0;
@@ -6170,7 +6261,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6170
6261
  }
6171
6262
  timelines.push(timeline);
6172
6263
  duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);
6173
- } else if (timelineName == 'color') {
6264
+ } else if (timelineName == "color") {
6174
6265
  let timeline = new ColorTimeline(timelineMap.length);
6175
6266
  timeline.slotIndex = slotIndex;
6176
6267
  let frameIndex = 0;
@@ -6184,7 +6275,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6184
6275
  }
6185
6276
  timelines.push(timeline);
6186
6277
  duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * ColorTimeline.ENTRIES]);
6187
- } else if (timelineName == 'twoColor') {
6278
+ } else if (timelineName == "twoColor") {
6188
6279
  let timeline = new TwoColorTimeline(timelineMap.length);
6189
6280
  timeline.slotIndex = slotIndex;
6190
6281
  let frameIndex = 0;
@@ -6200,7 +6291,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6200
6291
  }
6201
6292
  timelines.push(timeline);
6202
6293
  duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * TwoColorTimeline.ENTRIES]);
6203
- } else throw new Error('Invalid timeline type for a slot: ' + timelineName + ' (' + slotName + ')');
6294
+ } else throw new Error("Invalid timeline type for a slot: " + timelineName + " (" + slotName + ")");
6204
6295
  }
6205
6296
  }
6206
6297
  }
@@ -6208,10 +6299,10 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6208
6299
  for (let boneName in map.bones) {
6209
6300
  let boneMap = map.bones[boneName];
6210
6301
  let boneIndex = skeletonData.findBoneIndex(boneName);
6211
- if (boneIndex == -1) throw new Error('Bone not found: ' + boneName);
6302
+ if (boneIndex == -1) throw new Error("Bone not found: " + boneName);
6212
6303
  for (let timelineName in boneMap) {
6213
6304
  let timelineMap = boneMap[timelineName];
6214
- if (timelineName === 'rotate') {
6305
+ if (timelineName === "rotate") {
6215
6306
  let timeline = new RotateTimeline(timelineMap.length);
6216
6307
  timeline.boneIndex = boneIndex;
6217
6308
  let frameIndex = 0;
@@ -6223,10 +6314,10 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6223
6314
  }
6224
6315
  timelines.push(timeline);
6225
6316
  duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * RotateTimeline.ENTRIES]);
6226
- } else if (timelineName === 'translate' || timelineName === 'scale' || timelineName === 'shear') {
6317
+ } else if (timelineName === "translate" || timelineName === "scale" || timelineName === "shear") {
6227
6318
  let timeline = null;
6228
6319
  let timelineScale = 1;
6229
- if (timelineName === 'scale') timeline = new ScaleTimeline(timelineMap.length);else if (timelineName === 'shear') timeline = new ShearTimeline(timelineMap.length);else {
6320
+ if (timelineName === "scale") timeline = new ScaleTimeline(timelineMap.length);else if (timelineName === "shear") timeline = new ShearTimeline(timelineMap.length);else {
6230
6321
  timeline = new TranslateTimeline(timelineMap.length);
6231
6322
  timelineScale = scale;
6232
6323
  }
@@ -6234,15 +6325,15 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6234
6325
  let frameIndex = 0;
6235
6326
  for (let i = 0; i < timelineMap.length; i++) {
6236
6327
  let valueMap = timelineMap[i];
6237
- let x = this.getValue(valueMap, 'x', 0),
6238
- y = this.getValue(valueMap, 'y', 0);
6328
+ let x = this.getValue(valueMap, "x", 0),
6329
+ y = this.getValue(valueMap, "y", 0);
6239
6330
  timeline.setFrame(frameIndex, valueMap.time, x * timelineScale, y * timelineScale);
6240
6331
  this.readCurve(valueMap, timeline, frameIndex);
6241
6332
  frameIndex++;
6242
6333
  }
6243
6334
  timelines.push(timeline);
6244
6335
  duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * TranslateTimeline.ENTRIES]);
6245
- } else throw new Error('Invalid timeline type for a bone: ' + timelineName + ' (' + boneName + ')');
6336
+ } else throw new Error("Invalid timeline type for a bone: " + timelineName + " (" + boneName + ")");
6246
6337
  }
6247
6338
  }
6248
6339
  }
@@ -6255,7 +6346,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6255
6346
  let frameIndex = 0;
6256
6347
  for (let i = 0; i < constraintMap.length; i++) {
6257
6348
  let valueMap = constraintMap[i];
6258
- timeline.setFrame(frameIndex, valueMap.time, this.getValue(valueMap, 'mix', 1), this.getValue(valueMap, 'bendPositive', true) ? 1 : -1);
6349
+ timeline.setFrame(frameIndex, valueMap.time, this.getValue(valueMap, "mix", 1), this.getValue(valueMap, "bendPositive", true) ? 1 : -1);
6259
6350
  this.readCurve(valueMap, timeline, frameIndex);
6260
6351
  frameIndex++;
6261
6352
  }
@@ -6272,7 +6363,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6272
6363
  let frameIndex = 0;
6273
6364
  for (let i = 0; i < constraintMap.length; i++) {
6274
6365
  let valueMap = constraintMap[i];
6275
- timeline.setFrame(frameIndex, valueMap.time, this.getValue(valueMap, 'rotateMix', 1), this.getValue(valueMap, 'translateMix', 1), this.getValue(valueMap, 'scaleMix', 1), this.getValue(valueMap, 'shearMix', 1));
6366
+ timeline.setFrame(frameIndex, valueMap.time, this.getValue(valueMap, "rotateMix", 1), this.getValue(valueMap, "translateMix", 1), this.getValue(valueMap, "scaleMix", 1), this.getValue(valueMap, "shearMix", 1));
6276
6367
  this.readCurve(valueMap, timeline, frameIndex);
6277
6368
  frameIndex++;
6278
6369
  }
@@ -6284,14 +6375,14 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6284
6375
  for (let constraintName in map.paths) {
6285
6376
  let constraintMap = map.paths[constraintName];
6286
6377
  let index = skeletonData.findPathConstraintIndex(constraintName);
6287
- if (index == -1) throw new Error('Path constraint not found: ' + constraintName);
6378
+ if (index == -1) throw new Error("Path constraint not found: " + constraintName);
6288
6379
  let data = skeletonData.pathConstraints[index];
6289
6380
  for (let timelineName in constraintMap) {
6290
6381
  let timelineMap = constraintMap[timelineName];
6291
- if (timelineName === 'position' || timelineName === 'spacing') {
6382
+ if (timelineName === "position" || timelineName === "spacing") {
6292
6383
  let timeline = null;
6293
6384
  let timelineScale = 1;
6294
- if (timelineName === 'spacing') {
6385
+ if (timelineName === "spacing") {
6295
6386
  timeline = new PathConstraintSpacingTimeline(timelineMap.length);
6296
6387
  if (data.spacingMode == SpacingMode.Length || data.spacingMode == SpacingMode.Fixed) timelineScale = scale;
6297
6388
  } else {
@@ -6308,13 +6399,13 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6308
6399
  }
6309
6400
  timelines.push(timeline);
6310
6401
  duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * PathConstraintPositionTimeline.ENTRIES]);
6311
- } else if (timelineName === 'mix') {
6402
+ } else if (timelineName === "mix") {
6312
6403
  let timeline = new PathConstraintMixTimeline(timelineMap.length);
6313
6404
  timeline.pathConstraintIndex = index;
6314
6405
  let frameIndex = 0;
6315
6406
  for (let i = 0; i < timelineMap.length; i++) {
6316
6407
  let valueMap = timelineMap[i];
6317
- timeline.setFrame(frameIndex, valueMap.time, this.getValue(valueMap, 'rotateMix', 1), this.getValue(valueMap, 'translateMix', 1));
6408
+ timeline.setFrame(frameIndex, valueMap.time, this.getValue(valueMap, "rotateMix", 1), this.getValue(valueMap, "translateMix", 1));
6318
6409
  this.readCurve(valueMap, timeline, frameIndex);
6319
6410
  frameIndex++;
6320
6411
  }
@@ -6328,15 +6419,15 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6328
6419
  for (let deformName in map.deform) {
6329
6420
  let deformMap = map.deform[deformName];
6330
6421
  let skin = skeletonData.findSkin(deformName);
6331
- if (skin == null) throw new Error('Skin not found: ' + deformName);
6422
+ if (skin == null) throw new Error("Skin not found: " + deformName);
6332
6423
  for (let slotName in deformMap) {
6333
6424
  let slotMap = deformMap[slotName];
6334
6425
  let slotIndex = skeletonData.findSlotIndex(slotName);
6335
- if (slotIndex == -1) throw new Error('Slot not found: ' + slotMap.name);
6426
+ if (slotIndex == -1) throw new Error("Slot not found: " + slotMap.name);
6336
6427
  for (let timelineName in slotMap) {
6337
6428
  let timelineMap = slotMap[timelineName];
6338
6429
  let attachment = skin.getAttachment(slotIndex, timelineName);
6339
- if (attachment == null) throw new Error('Deform attachment not found: ' + timelineMap.name);
6430
+ if (attachment == null) throw new Error("Deform attachment not found: " + timelineMap.name);
6340
6431
  let weighted = attachment.bones != null;
6341
6432
  let vertices = attachment.vertices;
6342
6433
  let deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;
@@ -6347,10 +6438,10 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6347
6438
  for (let j = 0; j < timelineMap.length; j++) {
6348
6439
  let valueMap = timelineMap[j];
6349
6440
  let deform;
6350
- let verticesValue = this.getValue(valueMap, 'vertices', null);
6441
+ let verticesValue = this.getValue(valueMap, "vertices", null);
6351
6442
  if (verticesValue == null) deform = weighted ? Utils.newFloatArray(deformLength) : vertices;else {
6352
6443
  deform = Utils.newFloatArray(deformLength);
6353
- let start = this.getValue(valueMap, 'offset', 0);
6444
+ let start = this.getValue(valueMap, "offset", 0);
6354
6445
  Utils.arrayCopy(verticesValue, 0, deform, start, verticesValue.length);
6355
6446
  if (scale != 1) {
6356
6447
  for (let i = start, n = i + verticesValue.length; i < n; i++) deform[i] *= scale;
@@ -6378,7 +6469,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6378
6469
  for (let j = 0; j < drawOrderNode.length; j++) {
6379
6470
  let drawOrderMap = drawOrderNode[j];
6380
6471
  let drawOrder = null;
6381
- let offsets = this.getValue(drawOrderMap, 'offsets', null);
6472
+ let offsets = this.getValue(drawOrderMap, "offsets", null);
6382
6473
  if (offsets != null) {
6383
6474
  drawOrder = Utils.newArray(slotCount, -1);
6384
6475
  let unchanged = Utils.newArray(slotCount - offsets.length, 0);
@@ -6387,7 +6478,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6387
6478
  for (let i = 0; i < offsets.length; i++) {
6388
6479
  let offsetMap = offsets[i];
6389
6480
  let slotIndex = skeletonData.findSlotIndex(offsetMap.slot);
6390
- if (slotIndex == -1) throw new Error('Slot not found: ' + offsetMap.slot);
6481
+ if (slotIndex == -1) throw new Error("Slot not found: " + offsetMap.slot);
6391
6482
  while (originalIndex != slotIndex) unchanged[unchangedIndex++] = originalIndex++;
6392
6483
  drawOrder[originalIndex + offsetMap.offset] = originalIndex++;
6393
6484
  }
@@ -6405,24 +6496,24 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6405
6496
  for (let i = 0; i < map.events.length; i++) {
6406
6497
  let eventMap = map.events[i];
6407
6498
  let eventData = skeletonData.findEvent(eventMap.name);
6408
- if (eventData == null) throw new Error('Event not found: ' + eventMap.name);
6499
+ if (eventData == null) throw new Error("Event not found: " + eventMap.name);
6409
6500
  let event = new Event(Utils.toSinglePrecision(eventMap.time), eventData);
6410
- event.intValue = this.getValue(eventMap, 'int', eventData.intValue);
6411
- event.floatValue = this.getValue(eventMap, 'float', eventData.floatValue);
6412
- event.stringValue = this.getValue(eventMap, 'string', eventData.stringValue);
6501
+ event.intValue = this.getValue(eventMap, "int", eventData.intValue);
6502
+ event.floatValue = this.getValue(eventMap, "float", eventData.floatValue);
6503
+ event.stringValue = this.getValue(eventMap, "string", eventData.stringValue);
6413
6504
  timeline.setFrame(frameIndex++, event);
6414
6505
  }
6415
6506
  timelines.push(timeline);
6416
6507
  duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);
6417
6508
  }
6418
6509
  if (isNaN(duration)) {
6419
- throw new Error('Error while parsing animation, duration is NaN');
6510
+ throw new Error("Error while parsing animation, duration is NaN");
6420
6511
  }
6421
6512
  skeletonData.animations.push(new Animation(name, timelines, duration));
6422
6513
  }
6423
6514
  readCurve(map, timeline, frameIndex) {
6424
6515
  if (!map.curve) return;
6425
- if (map.curve === 'stepped') timeline.setStepped(frameIndex);else if (Object.prototype.toString.call(map.curve) === '[object Array]') {
6516
+ if (map.curve === "stepped") timeline.setStepped(frameIndex);else if (Object.prototype.toString.call(map.curve) === "[object Array]") {
6426
6517
  let curve = map.curve;
6427
6518
  timeline.setCurve(frameIndex, curve[0], curve[1], curve[2], curve[3]);
6428
6519
  }
@@ -6432,48 +6523,48 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6432
6523
  }
6433
6524
  static blendModeFromString(str) {
6434
6525
  str = str.toLowerCase();
6435
- if (str == 'normal') return BlendMode.Normal;
6436
- if (str == 'additive') return BlendMode.Additive;
6437
- if (str == 'multiply') return BlendMode.Multiply;
6438
- if (str == 'screen') return BlendMode.Screen;
6526
+ if (str == "normal") return BlendMode.Normal;
6527
+ if (str == "additive") return BlendMode.Additive;
6528
+ if (str == "multiply") return BlendMode.Multiply;
6529
+ if (str == "screen") return BlendMode.Screen;
6439
6530
  throw new Error(`Unknown blend mode: ${str}`);
6440
6531
  }
6441
6532
  static positionModeFromString(str) {
6442
6533
  str = str.toLowerCase();
6443
- if (str == 'fixed') return PositionMode.Fixed;
6444
- if (str == 'percent') return PositionMode.Percent;
6534
+ if (str == "fixed") return PositionMode.Fixed;
6535
+ if (str == "percent") return PositionMode.Percent;
6445
6536
  throw new Error(`Unknown position mode: ${str}`);
6446
6537
  }
6447
6538
  static spacingModeFromString(str) {
6448
6539
  str = str.toLowerCase();
6449
- if (str == 'length') return SpacingMode.Length;
6450
- if (str == 'fixed') return SpacingMode.Fixed;
6451
- if (str == 'percent') return SpacingMode.Percent;
6540
+ if (str == "length") return SpacingMode.Length;
6541
+ if (str == "fixed") return SpacingMode.Fixed;
6542
+ if (str == "percent") return SpacingMode.Percent;
6452
6543
  throw new Error(`Unknown position mode: ${str}`);
6453
6544
  }
6454
6545
  static rotateModeFromString(str) {
6455
6546
  str = str.toLowerCase();
6456
- if (str == 'tangent') return RotateMode.Tangent;
6457
- if (str == 'chain') return RotateMode.Chain;
6458
- if (str == 'chainscale') return RotateMode.ChainScale;
6547
+ if (str == "tangent") return RotateMode.Tangent;
6548
+ if (str == "chain") return RotateMode.Chain;
6549
+ if (str == "chainscale") return RotateMode.ChainScale;
6459
6550
  throw new Error(`Unknown rotate mode: ${str}`);
6460
6551
  }
6461
6552
  static transformModeFromString(str) {
6462
6553
  str = str.toLowerCase();
6463
- if (str == 'normal') return TransformMode.Normal;
6464
- if (str == 'onlytranslation') return TransformMode.OnlyTranslation;
6465
- if (str == 'norotationorreflection') return TransformMode.NoRotationOrReflection;
6466
- if (str == 'noscale') return TransformMode.NoScale;
6467
- if (str == 'noscaleorreflection') return TransformMode.NoScaleOrReflection;
6554
+ if (str == "normal") return TransformMode.Normal;
6555
+ if (str == "onlytranslation") return TransformMode.OnlyTranslation;
6556
+ if (str == "norotationorreflection") return TransformMode.NoRotationOrReflection;
6557
+ if (str == "noscale") return TransformMode.NoScale;
6558
+ if (str == "noscaleorreflection") return TransformMode.NoScaleOrReflection;
6468
6559
  throw new Error(`Unknown transform mode: ${str}`);
6469
6560
  }
6470
6561
  }
6471
6562
  class LinkedMesh {
6472
6563
  constructor(mesh, skin, slotIndex, parent) {
6473
- __publicField(this, 'parent');
6474
- __publicField(this, 'skin');
6475
- __publicField(this, 'slotIndex');
6476
- __publicField(this, 'mesh');
6564
+ __publicField(this, "parent");
6565
+ __publicField(this, "skin");
6566
+ __publicField(this, "slotIndex");
6567
+ __publicField(this, "mesh");
6477
6568
  this.mesh = mesh;
6478
6569
  this.skin = skin;
6479
6570
  this.slotIndex = slotIndex;
@@ -6491,10 +6582,10 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6491
6582
  })();
6492
6583
  class Assets {
6493
6584
  constructor(clientId) {
6494
- __publicField(this, 'clientId');
6495
- __publicField(this, 'toLoad', new Array());
6496
- __publicField(this, 'assets', {});
6497
- __publicField(this, 'textureLoader');
6585
+ __publicField(this, "clientId");
6586
+ __publicField(this, "toLoad", new Array());
6587
+ __publicField(this, "assets", {});
6588
+ __publicField(this, "textureLoader");
6498
6589
  this.clientId = clientId;
6499
6590
  }
6500
6591
  loaded() {
@@ -6504,12 +6595,12 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6504
6595
  }
6505
6596
  }
6506
6597
  class SharedAssetManager {
6507
- constructor(pathPrefix = '') {
6508
- __publicField(this, 'pathPrefix');
6509
- __publicField(this, 'clientAssets', {});
6510
- __publicField(this, 'queuedAssets', {});
6511
- __publicField(this, 'rawAssets', {});
6512
- __publicField(this, 'errors', {});
6598
+ constructor(pathPrefix = "") {
6599
+ __publicField(this, "pathPrefix");
6600
+ __publicField(this, "clientAssets", {});
6601
+ __publicField(this, "queuedAssets", {});
6602
+ __publicField(this, "rawAssets", {});
6603
+ __publicField(this, "errors", {});
6513
6604
  this.pathPrefix = pathPrefix;
6514
6605
  }
6515
6606
  queueAsset(clientId, textureLoader, path2) {
@@ -6540,7 +6631,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6540
6631
  }
6541
6632
  }
6542
6633
  };
6543
- request.open('GET', path2, true);
6634
+ request.open("GET", path2, true);
6544
6635
  request.send();
6545
6636
  }
6546
6637
  loadJson(clientId, path2) {
@@ -6556,7 +6647,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6556
6647
  }
6557
6648
  }
6558
6649
  };
6559
- request.open('GET', path2, true);
6650
+ request.open("GET", path2, true);
6560
6651
  request.send();
6561
6652
  }
6562
6653
  loadTexture(clientId, textureLoader, path2) {
@@ -6564,7 +6655,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6564
6655
  if (!this.queueAsset(clientId, textureLoader, path2)) return;
6565
6656
  let img = new Image();
6566
6657
  img.src = path2;
6567
- img.crossOrigin = 'anonymous';
6658
+ img.crossOrigin = "anonymous";
6568
6659
  img.onload = ev => {
6569
6660
  this.rawAssets[path2] = img;
6570
6661
  };
@@ -6609,8 +6700,8 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6609
6700
  }
6610
6701
  class JitterEffect {
6611
6702
  constructor(jitterX, jitterY) {
6612
- __publicField(this, 'jitterX', 0);
6613
- __publicField(this, 'jitterY', 0);
6703
+ __publicField(this, "jitterX", 0);
6704
+ __publicField(this, "jitterY", 0);
6614
6705
  this.jitterX = jitterX;
6615
6706
  this.jitterY = jitterY;
6616
6707
  }
@@ -6623,12 +6714,12 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6623
6714
  }
6624
6715
  const _SwirlEffect = class _SwirlEffect {
6625
6716
  constructor(radius) {
6626
- __publicField(this, 'centerX', 0);
6627
- __publicField(this, 'centerY', 0);
6628
- __publicField(this, 'radius', 0);
6629
- __publicField(this, 'angle', 0);
6630
- __publicField(this, 'worldX', 0);
6631
- __publicField(this, 'worldY', 0);
6717
+ __publicField(this, "centerX", 0);
6718
+ __publicField(this, "centerY", 0);
6719
+ __publicField(this, "radius", 0);
6720
+ __publicField(this, "angle", 0);
6721
+ __publicField(this, "worldX", 0);
6722
+ __publicField(this, "worldY", 0);
6632
6723
  this.radius = radius;
6633
6724
  }
6634
6725
  begin(skeleton) {
@@ -6650,12 +6741,12 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6650
6741
  }
6651
6742
  end() {}
6652
6743
  };
6653
- __publicField(_SwirlEffect, 'interpolation', new PowOut(2));
6744
+ __publicField(_SwirlEffect, "interpolation", new PowOut(2));
6654
6745
  let SwirlEffect = _SwirlEffect;
6655
6746
  const _SpineTexture = class _SpineTexture extends Texture {
6656
6747
  constructor(image) {
6657
6748
  super(image.resource);
6658
- __publicField(this, 'texture');
6749
+ __publicField(this, "texture");
6659
6750
  this.texture = pixi_js.Texture.from(image);
6660
6751
  }
6661
6752
  static from(texture) {
@@ -6665,6 +6756,9 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6665
6756
  return new _SpineTexture(texture);
6666
6757
  }
6667
6758
  setFilters(minFilter, magFilter) {
6759
+ if (!this.texture || !this.texture.source || !this.texture.source.style) {
6760
+ return;
6761
+ }
6668
6762
  const style = this.texture.source.style;
6669
6763
  style.minFilter = _SpineTexture.toPixiTextureFilter(minFilter);
6670
6764
  style.magFilter = _SpineTexture.toPixiTextureFilter(magFilter);
@@ -6672,6 +6766,9 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6672
6766
  this.texture.source.updateMipmaps();
6673
6767
  }
6674
6768
  setWraps(uWrap, vWrap) {
6769
+ if (!this.texture || !this.texture.source || !this.texture.source.style) {
6770
+ return;
6771
+ }
6675
6772
  const style = this.texture.source.style;
6676
6773
  style.addressModeU = _SpineTexture.toPixiTextureWrap(uWrap);
6677
6774
  style.addressModeV = _SpineTexture.toPixiTextureWrap(vWrap);
@@ -6698,11 +6795,11 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6698
6795
  case TextureFilter.Nearest:
6699
6796
  case TextureFilter.MipMapNearestLinear:
6700
6797
  case TextureFilter.MipMapNearestNearest:
6701
- return 'nearest';
6798
+ return "nearest";
6702
6799
  case TextureFilter.Linear:
6703
6800
  case TextureFilter.MipMapLinearLinear:
6704
6801
  case TextureFilter.MipMapLinearNearest:
6705
- return 'linear';
6802
+ return "linear";
6706
6803
  default:
6707
6804
  throw new Error(`Unknown texture filter: ${String(filter)}`);
6708
6805
  }
@@ -6710,11 +6807,11 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6710
6807
  static toPixiTextureWrap(wrap) {
6711
6808
  switch (wrap) {
6712
6809
  case TextureWrap.ClampToEdge:
6713
- return 'clamp-to-edge';
6810
+ return "clamp-to-edge";
6714
6811
  case TextureWrap.MirroredRepeat:
6715
- return 'mirror-repeat';
6812
+ return "mirror-repeat";
6716
6813
  case TextureWrap.Repeat:
6717
- return 'repeat';
6814
+ return "repeat";
6718
6815
  default:
6719
6816
  throw new Error(`Unknown texture wrap: ${String(wrap)}`);
6720
6817
  }
@@ -6722,29 +6819,29 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6722
6819
  static toPixiBlending(blend) {
6723
6820
  switch (blend) {
6724
6821
  case BlendMode.Normal:
6725
- return 'normal';
6822
+ return "normal";
6726
6823
  case BlendMode.Additive:
6727
- return 'add';
6824
+ return "add";
6728
6825
  case BlendMode.Multiply:
6729
- return 'multiply';
6826
+ return "multiply";
6730
6827
  case BlendMode.Screen:
6731
- return 'screen';
6828
+ return "screen";
6732
6829
  default:
6733
6830
  throw new Error(`Unknown blendMode: ${String(blend)}`);
6734
6831
  }
6735
6832
  }
6736
6833
  };
6737
- __publicField(_SpineTexture, 'textureMap', new Map());
6834
+ __publicField(_SpineTexture, "textureMap", new Map());
6738
6835
  let SpineTexture = _SpineTexture;
6739
6836
  const spineTextureAtlasLoader = {
6740
6837
  extension: pixi_js.ExtensionType.Asset,
6741
6838
  resolver: {
6742
- test: value => pixi_js.checkExtension(value, '.atlas'),
6839
+ test: value => pixi_js.checkExtension(value, ".atlas"),
6743
6840
  parse: value => {
6744
6841
  var _a, _b, _c;
6745
- const split = value.split('.');
6842
+ const split = value.split(".");
6746
6843
  return {
6747
- resolution: parseFloat((_c = (_b = (_a = pixi_js.Resolver.RETINA_PREFIX) == null ? void 0 : _a.exec(value)) == null ? void 0 : _b[1]) != null ? _c : '1'),
6844
+ resolution: parseFloat((_c = (_b = (_a = pixi_js.Resolver.RETINA_PREFIX) == null ? void 0 : _a.exec(value)) == null ? void 0 : _b[1]) != null ? _c : "1"),
6748
6845
  format: split[split.length - 2],
6749
6846
  src: value
6750
6847
  };
@@ -6754,10 +6851,10 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6754
6851
  extension: {
6755
6852
  type: pixi_js.ExtensionType.LoadParser,
6756
6853
  priority: pixi_js.LoaderParserPriority.Normal,
6757
- name: 'spineTextureAtlasLoader'
6854
+ name: "spineTextureAtlasLoader"
6758
6855
  },
6759
6856
  test(url) {
6760
- return pixi_js.checkExtension(url, '.atlas');
6857
+ return pixi_js.checkExtension(url, ".atlas");
6761
6858
  },
6762
6859
  load(url) {
6763
6860
  return __async(this, null, function* () {
@@ -6767,8 +6864,8 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6767
6864
  });
6768
6865
  },
6769
6866
  testParse(asset, options) {
6770
- const isExtensionRight = pixi_js.checkExtension(options.src, '.atlas');
6771
- const isString = typeof asset === 'string';
6867
+ const isExtensionRight = pixi_js.checkExtension(options.src, ".atlas");
6868
+ const isString = typeof asset === "string";
6772
6869
  return Promise.resolve(isExtensionRight && isString);
6773
6870
  },
6774
6871
  unload(atlas) {
@@ -6779,14 +6876,14 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6779
6876
  var _a;
6780
6877
  const metadata = options.data || {};
6781
6878
  let basePath = pixi_js.path.dirname(options.src);
6782
- if (basePath && basePath.lastIndexOf('/') !== basePath.length - 1) {
6783
- basePath += '/';
6879
+ if (basePath && basePath.lastIndexOf("/") !== basePath.length - 1) {
6880
+ basePath += "/";
6784
6881
  }
6785
6882
  const retval = new TextureAtlas(asset, path2 => {
6786
6883
  const data = SpineTexture.from(options.data.imageTexture.source);
6787
6884
  return data;
6788
6885
  });
6789
- if (metadata.images instanceof pixi_js.TextureSource || typeof metadata.images === 'string') {
6886
+ if (metadata.images instanceof pixi_js.TextureSource || typeof metadata.images === "string") {
6790
6887
  const pixiTexture = metadata.images;
6791
6888
  metadata.images = {};
6792
6889
  metadata.images[retval.pages[0].name] = pixiTexture;
@@ -6811,7 +6908,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6811
6908
  const assetsToLoadIn = {
6812
6909
  src: pixi_js.copySearchParams(url, options.src),
6813
6910
  data: __spreadProps(__spreadValues({}, metadata.imageMetadata), {
6814
- alphaMode: page.pma ? 'premultiplied-alpha' : 'premultiply-alpha-on-upload'
6911
+ alphaMode: page.pma ? "premultiplied-alpha" : "premultiply-alpha-on-upload"
6815
6912
  })
6816
6913
  };
6817
6914
  const pixiPromise = loader.load(assetsToLoadIn).then(texture => {
@@ -6828,7 +6925,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6828
6925
  };
6829
6926
  pixi_js.extensions.add(spineTextureAtlasLoader);
6830
6927
  function isJson(resource) {
6831
- return Object.prototype.hasOwnProperty.call(resource, 'bones');
6928
+ return Object.prototype.hasOwnProperty.call(resource, "bones");
6832
6929
  }
6833
6930
  function isBuffer(resource) {
6834
6931
  return resource instanceof Uint8Array;
@@ -6839,10 +6936,10 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6839
6936
  extension: {
6840
6937
  type: pixi_js.ExtensionType.LoadParser,
6841
6938
  priority: pixi_js.LoaderParserPriority.Normal,
6842
- name: 'spineSkeletonLoader'
6939
+ name: "spineSkeletonLoader"
6843
6940
  },
6844
6941
  test(url) {
6845
- return pixi_js.checkExtension(url, '.skel');
6942
+ return pixi_js.checkExtension(url, ".skel");
6846
6943
  },
6847
6944
  load(url) {
6848
6945
  return __async(this, null, function* () {
@@ -6852,8 +6949,8 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6852
6949
  });
6853
6950
  },
6854
6951
  testParse(asset, options) {
6855
- const isJsonSpineModel = pixi_js.checkExtension(options.src, '.json') && isJson(asset);
6856
- const isBinarySpineModel = pixi_js.checkExtension(options.src, '.skel') && isBuffer(asset);
6952
+ const isJsonSpineModel = pixi_js.checkExtension(options.src, ".json") && isJson(asset);
6953
+ const isBinarySpineModel = pixi_js.checkExtension(options.src, ".skel") && isBuffer(asset);
6857
6954
  return Promise.resolve(isJsonSpineModel || isBinarySpineModel);
6858
6955
  }
6859
6956
  }
@@ -6866,13 +6963,13 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6866
6963
  const vertexSize = 7;
6867
6964
  const attributeBuffer = new pixi_js.Buffer({
6868
6965
  data: placeHolderBufferData,
6869
- label: 'attribute-batch-buffer',
6966
+ label: "attribute-batch-buffer",
6870
6967
  usage: pixi_js.BufferUsage.VERTEX | pixi_js.BufferUsage.COPY_DST,
6871
6968
  shrinkToFit: false
6872
6969
  });
6873
6970
  const indexBuffer = new pixi_js.Buffer({
6874
6971
  data: placeHolderIndexData,
6875
- label: 'index-batch-buffer',
6972
+ label: "index-batch-buffer",
6876
6973
  usage: pixi_js.BufferUsage.INDEX | pixi_js.BufferUsage.COPY_DST,
6877
6974
  shrinkToFit: false
6878
6975
  });
@@ -6881,31 +6978,31 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6881
6978
  attributes: {
6882
6979
  aPosition: {
6883
6980
  buffer: attributeBuffer,
6884
- format: 'float32x2',
6981
+ format: "float32x2",
6885
6982
  stride,
6886
6983
  offset: 0
6887
6984
  },
6888
6985
  aUV: {
6889
6986
  buffer: attributeBuffer,
6890
- format: 'float32x2',
6987
+ format: "float32x2",
6891
6988
  stride,
6892
6989
  offset: 2 * 4
6893
6990
  },
6894
6991
  aColor: {
6895
6992
  buffer: attributeBuffer,
6896
- format: 'unorm8x4',
6993
+ format: "unorm8x4",
6897
6994
  stride,
6898
6995
  offset: 4 * 4
6899
6996
  },
6900
6997
  aDarkColor: {
6901
6998
  buffer: attributeBuffer,
6902
- format: 'unorm8x4',
6999
+ format: "unorm8x4",
6903
7000
  stride,
6904
7001
  offset: 5 * 4
6905
7002
  },
6906
7003
  aTextureIdAndRound: {
6907
7004
  buffer: attributeBuffer,
6908
- format: 'uint16x2',
7005
+ format: "uint16x2",
6909
7006
  stride,
6910
7007
  offset: 6 * 4
6911
7008
  }
@@ -6915,60 +7012,60 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6915
7012
  }
6916
7013
  }
6917
7014
  const darkTintBit = {
6918
- name: 'color-bit',
7015
+ name: "color-bit",
6919
7016
  vertex: {
6920
- header: `
7017
+ header: (`
6921
7018
  @in aDarkColor: vec4<f32>;
6922
7019
  @out vDarkColor: vec4<f32>;
6923
- `,
6924
- main: `
7020
+ `),
7021
+ main: (`
6925
7022
  vDarkColor = aDarkColor;
6926
- `
7023
+ `)
6927
7024
  },
6928
7025
  fragment: {
6929
- header: `
7026
+ header: (`
6930
7027
  @in vDarkColor: vec4<f32>;
6931
- `,
6932
- end: `
7028
+ `),
7029
+ end: (`
6933
7030
 
6934
7031
  let alpha = outColor.a * vColor.a;
6935
7032
  let rgb = ((outColor.a - 1.0) * vDarkColor.a + 1.0 - outColor.rgb) * vDarkColor.rgb + outColor.rgb * vColor.rgb;
6936
7033
 
6937
7034
  finalColor = vec4<f32>(rgb, alpha);
6938
7035
 
6939
- `
7036
+ `)
6940
7037
  }
6941
7038
  };
6942
7039
  const darkTintBitGl = {
6943
- name: 'color-bit',
7040
+ name: "color-bit",
6944
7041
  vertex: {
6945
- header: `
7042
+ header: (`
6946
7043
  in vec4 aDarkColor;
6947
7044
  out vec4 vDarkColor;
6948
- `,
6949
- main: `
7045
+ `),
7046
+ main: (`
6950
7047
  vDarkColor = aDarkColor;
6951
- `
7048
+ `)
6952
7049
  },
6953
7050
  fragment: {
6954
- header: `
7051
+ header: (`
6955
7052
  in vec4 vDarkColor;
6956
- `,
6957
- end: `
7053
+ `),
7054
+ end: (`
6958
7055
 
6959
7056
  finalColor.a = outColor.a * vColor.a;
6960
7057
  finalColor.rgb = ((outColor.a - 1.0) * vDarkColor.a + 1.0 - outColor.rgb) * vDarkColor.rgb + outColor.rgb * vColor.rgb;
6961
- `
7058
+ `)
6962
7059
  }
6963
7060
  };
6964
7061
  class DarkTintShader extends pixi_js.Shader {
6965
7062
  constructor(maxTextures) {
6966
7063
  const glProgram = pixi_js.compileHighShaderGlProgram({
6967
- name: 'dark-tint-batch',
7064
+ name: "dark-tint-batch",
6968
7065
  bits: [pixi_js.colorBitGl, darkTintBitGl, pixi_js.generateTextureBatchBitGl(maxTextures), pixi_js.roundPixelsBitGl]
6969
7066
  });
6970
7067
  const gpuProgram = pixi_js.compileHighShaderGpuProgram({
6971
- name: 'dark-tint-batch',
7068
+ name: "dark-tint-batch",
6972
7069
  bits: [pixi_js.colorBit, darkTintBit, pixi_js.generateTextureBatchBit(maxTextures), pixi_js.roundPixelsBit]
6973
7070
  });
6974
7071
  super({
@@ -6984,10 +7081,10 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6984
7081
  const _DarkTintBatcher = class _DarkTintBatcher extends pixi_js.Batcher {
6985
7082
  constructor() {
6986
7083
  super(...arguments);
6987
- __publicField(this, 'geometry', new DarkTintBatchGeometry());
6988
- __publicField(this, 'shader', defaultShader || (defaultShader = new DarkTintShader(this.maxTextures)));
6989
- __publicField(this, 'name', _DarkTintBatcher.extension.name);
6990
- __publicField(this, 'vertexSize', 7);
7084
+ __publicField(this, "geometry", new DarkTintBatchGeometry());
7085
+ __publicField(this, "shader", defaultShader || (defaultShader = new DarkTintShader(this.maxTextures)));
7086
+ __publicField(this, "name", _DarkTintBatcher.extension.name);
7087
+ __publicField(this, "vertexSize", 7);
6991
7088
  }
6992
7089
  packAttributes(element, float32View, uint32View, index, textureId) {
6993
7090
  const textureIdAndRound = textureId << 16 | element.roundPixels & 65535;
@@ -7068,36 +7165,317 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
7068
7165
  uint32View[index + 27] = textureIdAndRound;
7069
7166
  }
7070
7167
  };
7071
- __publicField(_DarkTintBatcher, 'extension', {
7168
+ __publicField(_DarkTintBatcher, "extension", {
7072
7169
  type: [pixi_js.ExtensionType.Batcher],
7073
- name: 'darkTint'
7170
+ name: "darkTint"
7074
7171
  });
7075
7172
  let DarkTintBatcher = _DarkTintBatcher;
7076
7173
  pixi_js.extensions.add(DarkTintBatcher);
7174
+ const _SkeletonRenderer = class _SkeletonRenderer {
7175
+ constructor(context) {
7176
+ __publicField(this, "ctx");
7177
+ __publicField(this, "clipper", new SkeletonClipping());
7178
+ __publicField(this, "triangleRendering", false);
7179
+ __publicField(this, "debugRendering", false);
7180
+ __publicField(this, "vertices", Utils.newFloatArray(8 * 1024));
7181
+ __publicField(this, "tempColor", new Color());
7182
+ this.ctx = context;
7183
+ }
7184
+ draw(skeleton) {
7185
+ if (this.triangleRendering) this.drawTriangles(skeleton);else this.drawImages(skeleton);
7186
+ }
7187
+ drawImages(skeleton) {
7188
+ let ctx = this.ctx;
7189
+ let drawOrder = skeleton.drawOrder;
7190
+ if (this.debugRendering) ctx.strokeStyle = "green";
7191
+ ctx.save();
7192
+ for (let i = 0, n = drawOrder.length; i < n; i++) {
7193
+ let slot = drawOrder[i];
7194
+ let attachment = slot.getAttachment();
7195
+ let regionAttachment = null;
7196
+ let region = null;
7197
+ let image = null;
7198
+ if (attachment instanceof RegionAttachment) {
7199
+ regionAttachment = attachment;
7200
+ region = regionAttachment.region;
7201
+ image = region.texture.getImage();
7202
+ } else continue;
7203
+ let skeleton2 = slot.bone.skeleton;
7204
+ let skeletonColor = skeleton2.color;
7205
+ let slotColor = slot.color;
7206
+ let regionColor = regionAttachment.color;
7207
+ let alpha = skeletonColor.a * slotColor.a * regionColor.a;
7208
+ let color = this.tempColor;
7209
+ color.set(skeletonColor.r * slotColor.r * regionColor.r, skeletonColor.g * slotColor.g * regionColor.g, skeletonColor.b * slotColor.b * regionColor.b, alpha);
7210
+ let att = attachment;
7211
+ let bone = slot.bone;
7212
+ let w = region.width;
7213
+ let h = region.height;
7214
+ ctx.save();
7215
+ ctx.transform(bone.a, bone.c, bone.b, bone.d, bone.worldX, bone.worldY);
7216
+ ctx.translate(attachment.offset[0], attachment.offset[1]);
7217
+ ctx.rotate(attachment.rotation * Math.PI / 180);
7218
+ let atlasScale = att.width / w;
7219
+ ctx.scale(atlasScale * attachment.scaleX, atlasScale * attachment.scaleY);
7220
+ ctx.translate(w / 2, h / 2);
7221
+ if (attachment.region.rotate) {
7222
+ let t = w;
7223
+ w = h;
7224
+ h = t;
7225
+ ctx.rotate(-Math.PI / 2);
7226
+ }
7227
+ ctx.scale(1, -1);
7228
+ ctx.translate(-w / 2, -h / 2);
7229
+ ctx.globalAlpha = color.a;
7230
+ ctx.drawImage(image, region.x, region.y, w, h, 0, 0, w, h);
7231
+ if (this.debugRendering) ctx.strokeRect(0, 0, w, h);
7232
+ ctx.restore();
7233
+ }
7234
+ ctx.restore();
7235
+ }
7236
+ drawTriangles(skeleton) {
7237
+ let vertices = this.vertices;
7238
+ let triangles = null;
7239
+ let drawOrder = skeleton.drawOrder;
7240
+ let clipper2 = this.clipper;
7241
+ for (let i = 0, n = drawOrder.length; i < n; i++) {
7242
+ let slot = drawOrder[i];
7243
+ let attachment = slot.getAttachment();
7244
+ let texture = null;
7245
+ let region = null;
7246
+ if (attachment instanceof ClippingAttachment) {
7247
+ clipper2.clipStart(slot, attachment);
7248
+ continue;
7249
+ }
7250
+ if (attachment instanceof RegionAttachment) {
7251
+ let regionAttachment = attachment;
7252
+ vertices = this.computeRegionVertices(slot, regionAttachment, false);
7253
+ triangles = _SkeletonRenderer.QUAD_TRIANGLES;
7254
+ region = regionAttachment.region;
7255
+ texture = region.texture.getImage();
7256
+ } else if (attachment instanceof MeshAttachment) {
7257
+ let mesh = attachment;
7258
+ vertices = this.computeMeshVertices(slot, mesh, false);
7259
+ triangles = mesh.triangles;
7260
+ texture = mesh.region.renderObject.texture.getImage();
7261
+ } else {
7262
+ clipper2.clipEndWithSlot(slot);
7263
+ continue;
7264
+ }
7265
+ if (texture != null) {
7266
+ slot.data.blendMode;
7267
+ let skeleton2 = slot.bone.skeleton;
7268
+ let skeletonColor = skeleton2.color;
7269
+ let slotColor = slot.color;
7270
+ let attachmentColor = attachment.color;
7271
+ let alpha = skeletonColor.a * slotColor.a * attachmentColor.a;
7272
+ let color = this.tempColor;
7273
+ color.set(skeletonColor.r * slotColor.r * attachmentColor.r, skeletonColor.g * slotColor.g * attachmentColor.g, skeletonColor.b * slotColor.b * attachmentColor.b, alpha);
7274
+ let ctx = this.ctx;
7275
+ ctx.globalAlpha = color.a;
7276
+ if (clipper2.isClipping()) {
7277
+ let vertexCount = vertices.length / 8;
7278
+ let positions = new Float32Array(vertexCount * 2);
7279
+ let uvs = new Float32Array(vertexCount * 2);
7280
+ for (let v = 0; v < vertexCount; v++) {
7281
+ positions[v * 2] = vertices[v * 8];
7282
+ positions[v * 2 + 1] = vertices[v * 8 + 1];
7283
+ uvs[v * 2] = vertices[v * 8 + 6];
7284
+ uvs[v * 2 + 1] = vertices[v * 8 + 7];
7285
+ }
7286
+ clipper2.clipTrianglesUnpacked(positions, triangles, triangles.length, uvs);
7287
+ let clippedVertices = clipper2.clippedVertices;
7288
+ let clippedUVs = clipper2.clippedUVs;
7289
+ let clippedTriangles = clipper2.clippedTriangles;
7290
+ for (var j = 0; j < clippedTriangles.length; j += 3) {
7291
+ let t1 = clippedTriangles[j] * 2,
7292
+ t2 = clippedTriangles[j + 1] * 2,
7293
+ t3 = clippedTriangles[j + 2] * 2;
7294
+ let x0 = clippedVertices[t1],
7295
+ y0 = clippedVertices[t1 + 1],
7296
+ u0 = clippedUVs[t1],
7297
+ v0 = clippedUVs[t1 + 1];
7298
+ let x1 = clippedVertices[t2],
7299
+ y1 = clippedVertices[t2 + 1],
7300
+ u1 = clippedUVs[t2],
7301
+ v1 = clippedUVs[t2 + 1];
7302
+ let x2 = clippedVertices[t3],
7303
+ y2 = clippedVertices[t3 + 1],
7304
+ u2 = clippedUVs[t3],
7305
+ v2 = clippedUVs[t3 + 1];
7306
+ this.drawTriangle(texture, x0, y0, u0, v0, x1, y1, u1, v1, x2, y2, u2, v2);
7307
+ if (this.debugRendering) {
7308
+ ctx.strokeStyle = "green";
7309
+ ctx.beginPath();
7310
+ ctx.moveTo(x0, y0);
7311
+ ctx.lineTo(x1, y1);
7312
+ ctx.lineTo(x2, y2);
7313
+ ctx.lineTo(x0, y0);
7314
+ ctx.stroke();
7315
+ }
7316
+ }
7317
+ } else {
7318
+ for (var j = 0; j < triangles.length; j += 3) {
7319
+ let t1 = triangles[j] * 8,
7320
+ t2 = triangles[j + 1] * 8,
7321
+ t3 = triangles[j + 2] * 8;
7322
+ let x0 = vertices[t1],
7323
+ y0 = vertices[t1 + 1],
7324
+ u0 = vertices[t1 + 6],
7325
+ v0 = vertices[t1 + 7];
7326
+ let x1 = vertices[t2],
7327
+ y1 = vertices[t2 + 1],
7328
+ u1 = vertices[t2 + 6],
7329
+ v1 = vertices[t2 + 7];
7330
+ let x2 = vertices[t3],
7331
+ y2 = vertices[t3 + 1],
7332
+ u2 = vertices[t3 + 6],
7333
+ v2 = vertices[t3 + 7];
7334
+ this.drawTriangle(texture, x0, y0, u0, v0, x1, y1, u1, v1, x2, y2, u2, v2);
7335
+ if (this.debugRendering) {
7336
+ ctx.strokeStyle = "green";
7337
+ ctx.beginPath();
7338
+ ctx.moveTo(x0, y0);
7339
+ ctx.lineTo(x1, y1);
7340
+ ctx.lineTo(x2, y2);
7341
+ ctx.lineTo(x0, y0);
7342
+ ctx.stroke();
7343
+ }
7344
+ }
7345
+ }
7346
+ }
7347
+ clipper2.clipEndWithSlot(slot);
7348
+ }
7349
+ clipper2.clipEnd();
7350
+ this.ctx.globalAlpha = 1;
7351
+ }
7352
+ drawTriangle(img, x0, y0, u0, v0, x1, y1, u1, v1, x2, y2, u2, v2) {
7353
+ let ctx = this.ctx;
7354
+ u0 *= img.width;
7355
+ v0 *= img.height;
7356
+ u1 *= img.width;
7357
+ v1 *= img.height;
7358
+ u2 *= img.width;
7359
+ v2 *= img.height;
7360
+ ctx.beginPath();
7361
+ ctx.moveTo(x0, y0);
7362
+ ctx.lineTo(x1, y1);
7363
+ ctx.lineTo(x2, y2);
7364
+ ctx.closePath();
7365
+ x1 -= x0;
7366
+ y1 -= y0;
7367
+ x2 -= x0;
7368
+ y2 -= y0;
7369
+ u1 -= u0;
7370
+ v1 -= v0;
7371
+ u2 -= u0;
7372
+ v2 -= v0;
7373
+ var det = 1 / (u1 * v2 - u2 * v1),
7374
+ a = (v2 * x1 - v1 * x2) * det,
7375
+ b = (v2 * y1 - v1 * y2) * det,
7376
+ c = (u1 * x2 - u2 * x1) * det,
7377
+ d = (u1 * y2 - u2 * y1) * det,
7378
+ e = x0 - a * u0 - c * v0,
7379
+ f = y0 - b * u0 - d * v0;
7380
+ ctx.save();
7381
+ ctx.transform(a, b, c, d, e, f);
7382
+ ctx.clip();
7383
+ ctx.drawImage(img, 0, 0);
7384
+ ctx.restore();
7385
+ }
7386
+ computeRegionVertices(slot, region, pma) {
7387
+ let skeleton = slot.bone.skeleton;
7388
+ let skeletonColor = skeleton.color;
7389
+ let slotColor = slot.color;
7390
+ let regionColor = region.color;
7391
+ let alpha = skeletonColor.a * slotColor.a * regionColor.a;
7392
+ let multiplier = pma ? alpha : 1;
7393
+ let color = this.tempColor;
7394
+ color.set(skeletonColor.r * slotColor.r * regionColor.r * multiplier, skeletonColor.g * slotColor.g * regionColor.g * multiplier, skeletonColor.b * slotColor.b * regionColor.b * multiplier, alpha);
7395
+ region.computeWorldVertices(slot.bone, this.vertices, 0, _SkeletonRenderer.VERTEX_SIZE);
7396
+ let vertices = this.vertices;
7397
+ let uvs = region.uvs;
7398
+ vertices[RegionAttachment.C1R] = color.r;
7399
+ vertices[RegionAttachment.C1G] = color.g;
7400
+ vertices[RegionAttachment.C1B] = color.b;
7401
+ vertices[RegionAttachment.C1A] = color.a;
7402
+ vertices[RegionAttachment.U1] = uvs[0];
7403
+ vertices[RegionAttachment.V1] = uvs[1];
7404
+ vertices[RegionAttachment.C2R] = color.r;
7405
+ vertices[RegionAttachment.C2G] = color.g;
7406
+ vertices[RegionAttachment.C2B] = color.b;
7407
+ vertices[RegionAttachment.C2A] = color.a;
7408
+ vertices[RegionAttachment.U2] = uvs[2];
7409
+ vertices[RegionAttachment.V2] = uvs[3];
7410
+ vertices[RegionAttachment.C3R] = color.r;
7411
+ vertices[RegionAttachment.C3G] = color.g;
7412
+ vertices[RegionAttachment.C3B] = color.b;
7413
+ vertices[RegionAttachment.C3A] = color.a;
7414
+ vertices[RegionAttachment.U3] = uvs[4];
7415
+ vertices[RegionAttachment.V3] = uvs[5];
7416
+ vertices[RegionAttachment.C4R] = color.r;
7417
+ vertices[RegionAttachment.C4G] = color.g;
7418
+ vertices[RegionAttachment.C4B] = color.b;
7419
+ vertices[RegionAttachment.C4A] = color.a;
7420
+ vertices[RegionAttachment.U4] = uvs[6];
7421
+ vertices[RegionAttachment.V4] = uvs[7];
7422
+ return vertices;
7423
+ }
7424
+ computeMeshVertices(slot, mesh, pma) {
7425
+ let skeleton = slot.bone.skeleton;
7426
+ let skeletonColor = skeleton.color;
7427
+ let slotColor = slot.color;
7428
+ let regionColor = mesh.color;
7429
+ let alpha = skeletonColor.a * slotColor.a * regionColor.a;
7430
+ let multiplier = pma ? alpha : 1;
7431
+ let color = this.tempColor;
7432
+ color.set(skeletonColor.r * slotColor.r * regionColor.r * multiplier, skeletonColor.g * slotColor.g * regionColor.g * multiplier, skeletonColor.b * slotColor.b * regionColor.b * multiplier, alpha);
7433
+ let numVertices = mesh.worldVerticesLength / 2;
7434
+ if (this.vertices.length < mesh.worldVerticesLength) {
7435
+ this.vertices = Utils.newFloatArray(mesh.worldVerticesLength);
7436
+ }
7437
+ let vertices = this.vertices;
7438
+ mesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, vertices, 0, _SkeletonRenderer.VERTEX_SIZE);
7439
+ let uvs = mesh.uvs;
7440
+ for (let i = 0, n = numVertices, u = 0, v = 2; i < n; i++) {
7441
+ vertices[v++] = color.r;
7442
+ vertices[v++] = color.g;
7443
+ vertices[v++] = color.b;
7444
+ vertices[v++] = color.a;
7445
+ vertices[v++] = uvs[u++];
7446
+ vertices[v++] = uvs[u++];
7447
+ v += 2;
7448
+ }
7449
+ return vertices;
7450
+ }
7451
+ };
7452
+ __publicField(_SkeletonRenderer, "QUAD_TRIANGLES", [0, 1, 2, 2, 3, 0]);
7453
+ __publicField(_SkeletonRenderer, "VERTEX_SIZE", 2 + 2 + 4);
7454
+ let SkeletonRenderer = _SkeletonRenderer;
7077
7455
  class BatchableSpineSlot {
7078
7456
  constructor() {
7079
- __publicField(this, 'indexOffset', 0);
7080
- __publicField(this, 'attributeOffset', 0);
7081
- __publicField(this, 'indexSize');
7082
- __publicField(this, 'attributeSize');
7083
- __publicField(this, 'batcherName', 'darkTint');
7084
- __publicField(this, 'topology', 'triangle-list');
7085
- __publicField(this, 'packAsQuad', false);
7086
- __publicField(this, 'renderable');
7087
- __publicField(this, 'positions');
7088
- __publicField(this, 'indices');
7089
- __publicField(this, 'uvs');
7090
- __publicField(this, 'roundPixels');
7091
- __publicField(this, 'data');
7092
- __publicField(this, 'blendMode');
7093
- __publicField(this, 'darkTint');
7094
- __publicField(this, 'texture');
7095
- __publicField(this, 'transform');
7096
- __publicField(this, '_textureId');
7097
- __publicField(this, '_attributeStart');
7098
- __publicField(this, '_indexStart');
7099
- __publicField(this, '_batcher');
7100
- __publicField(this, '_batch');
7457
+ __publicField(this, "indexOffset", 0);
7458
+ __publicField(this, "attributeOffset", 0);
7459
+ __publicField(this, "indexSize");
7460
+ __publicField(this, "attributeSize");
7461
+ __publicField(this, "batcherName", "darkTint");
7462
+ __publicField(this, "topology", "triangle-list");
7463
+ __publicField(this, "packAsQuad", false);
7464
+ __publicField(this, "renderable");
7465
+ __publicField(this, "positions");
7466
+ __publicField(this, "indices");
7467
+ __publicField(this, "uvs");
7468
+ __publicField(this, "roundPixels");
7469
+ __publicField(this, "data");
7470
+ __publicField(this, "blendMode");
7471
+ __publicField(this, "darkTint");
7472
+ __publicField(this, "texture");
7473
+ __publicField(this, "transform");
7474
+ __publicField(this, "_textureId");
7475
+ __publicField(this, "_attributeStart");
7476
+ __publicField(this, "_indexStart");
7477
+ __publicField(this, "_batcher");
7478
+ __publicField(this, "_batch");
7101
7479
  }
7102
7480
  get color() {
7103
7481
  const slotColor = this.data.color;
@@ -7146,23 +7524,27 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
7146
7524
  this.texture = data.texture;
7147
7525
  this.roundPixels = roundPixels;
7148
7526
  this.blendMode = blendMode;
7149
- this.batcherName = data.darkTint ? 'darkTint' : 'default';
7527
+ this.batcherName = data.darkTint ? "darkTint" : "default";
7150
7528
  }
7151
7529
  }
7152
7530
  const spineBlendModeMap = {
7153
- 0: 'normal',
7154
- 1: 'add',
7155
- 2: 'multiply',
7156
- 3: 'screen'
7531
+ 0: "normal",
7532
+ 1: "add",
7533
+ 2: "multiply",
7534
+ 3: "screen"
7157
7535
  };
7158
7536
  class SpinePipe {
7159
7537
  constructor(renderer) {
7160
- __publicField(this, 'renderer');
7161
- __publicField(this, 'gpuSpineData', {});
7162
- __publicField(this, '_destroyRenderableBound', this.destroyRenderable.bind(this));
7538
+ __publicField(this, "renderer");
7539
+ __publicField(this, "canvasSkeletonRenderer");
7540
+ __publicField(this, "gpuSpineData", {});
7541
+ __publicField(this, "_destroyRenderableBound", this.destroyRenderable.bind(this));
7163
7542
  this.renderer = renderer;
7164
7543
  }
7165
7544
  validateRenderable(spine) {
7545
+ if (this.renderer.type === pixi_js.RendererType.CANVAS) {
7546
+ return true;
7547
+ }
7166
7548
  spine._validateAndTransformAttachments();
7167
7549
  if (spine.spineAttachmentsDirty) {
7168
7550
  return true;
@@ -7176,8 +7558,8 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
7176
7558
  const cacheData = spine._getCachedData(slot, attachment);
7177
7559
  const batchableSpineSlot = gpuSpine.slotBatches[cacheData.id];
7178
7560
  const texture = cacheData.texture;
7179
- if (texture !== batchableSpineSlot.texture) {
7180
- if (!batchableSpineSlot._batcher.checkAndUpdateTexture(batchableSpineSlot, texture)) {
7561
+ if (texture !== (batchableSpineSlot == null ? void 0 : batchableSpineSlot.texture)) {
7562
+ if (!(batchableSpineSlot == null ? void 0 : batchableSpineSlot._batcher.checkAndUpdateTexture(batchableSpineSlot, texture))) {
7181
7563
  return true;
7182
7564
  }
7183
7565
  }
@@ -7186,30 +7568,60 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
7186
7568
  }
7187
7569
  return false;
7188
7570
  }
7571
+ execute(spine) {
7572
+ if (this.renderer.type === pixi_js.RendererType.CANVAS) {
7573
+ const renderer = this.renderer;
7574
+ const groupAlpha = (spine.groupColorAlpha >>> 24 & 255) / 255;
7575
+ const contextSystem = renderer.canvasContext;
7576
+ const context = contextSystem.activeContext;
7577
+ context.save();
7578
+ if (!this.canvasSkeletonRenderer) {
7579
+ this.canvasSkeletonRenderer = new SkeletonRenderer(context);
7580
+ this.canvasSkeletonRenderer.triangleRendering = true;
7581
+ }
7582
+ contextSystem.setContextTransform(spine.groupTransform, (renderer._roundPixels | spine._roundPixels) === 1);
7583
+ const oldAlpha = spine.skeleton.color.a;
7584
+ spine.skeleton.color.a *= groupAlpha;
7585
+ this.canvasSkeletonRenderer.draw(spine.skeleton);
7586
+ spine.skeleton.color.a = oldAlpha;
7587
+ context.restore();
7588
+ }
7589
+ }
7189
7590
  addRenderable(spine, instructionSet) {
7190
7591
  var _a, _b;
7592
+ if (this.renderer.type === pixi_js.RendererType.CANVAS) {
7593
+ this.renderer.renderPipes.batch.break(instructionSet);
7594
+ instructionSet.add(spine);
7595
+ return;
7596
+ }
7191
7597
  const gpuSpine = this._getSpineData(spine);
7192
7598
  const batcher = this.renderer.renderPipes.batch;
7193
7599
  const drawOrder = spine.skeleton.drawOrder;
7194
7600
  const roundPixels = this.renderer._roundPixels | spine._roundPixels;
7195
7601
  spine._validateAndTransformAttachments();
7602
+ spine.spineAttachmentsDirty = false;
7603
+ spine.spineTexturesDirty = false;
7196
7604
  for (let i = 0, n = drawOrder.length; i < n; i++) {
7197
7605
  const slot = drawOrder[i];
7198
7606
  const attachment = slot.getAttachment();
7199
7607
  const blendMode = spineBlendModeMap[slot.data.blendMode];
7608
+ let skipRender = false;
7200
7609
  if (attachment instanceof RegionAttachment || attachment instanceof MeshAttachment) {
7201
7610
  const cacheData = spine._getCachedData(slot, attachment);
7202
7611
  const batchableSpineSlot = (_a = gpuSpine.slotBatches)[_b = cacheData.id] || (_a[_b] = new BatchableSpineSlot());
7203
7612
  batchableSpineSlot.setData(spine, cacheData, blendMode, roundPixels);
7204
- if (!cacheData.skipRender) {
7613
+ skipRender = cacheData.skipRender;
7614
+ if (!skipRender) {
7205
7615
  batcher.addToBatch(batchableSpineSlot, instructionSet);
7206
7616
  }
7207
7617
  }
7208
7618
  const containerAttachment = spine._slotsObject[slot.data.name];
7209
7619
  if (containerAttachment) {
7210
7620
  const container = containerAttachment.container;
7211
- container.includeInBuild = true;
7212
- pixi_js.collectAllRenderables(container, instructionSet, this.renderer);
7621
+ if (!skipRender) {
7622
+ container.includeInBuild = true;
7623
+ container.collectRenderables(instructionSet, this.renderer, null);
7624
+ }
7213
7625
  container.includeInBuild = false;
7214
7626
  }
7215
7627
  }
@@ -7218,6 +7630,8 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
7218
7630
  var _a;
7219
7631
  const gpuSpine = this.gpuSpineData[spine.uid];
7220
7632
  spine._validateAndTransformAttachments();
7633
+ spine.spineAttachmentsDirty = false;
7634
+ spine.spineTexturesDirty = false;
7221
7635
  const drawOrder = spine.skeleton.drawOrder;
7222
7636
  for (let i = 0, n = drawOrder.length; i < n; i++) {
7223
7637
  const slot = drawOrder[i];
@@ -7225,19 +7639,20 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
7225
7639
  if (attachment instanceof RegionAttachment || attachment instanceof MeshAttachment) {
7226
7640
  const cacheData = spine._getCachedData(slot, attachment);
7227
7641
  if (!cacheData.skipRender) {
7228
- const batchableSpineSlot = gpuSpine.slotBatches[spine._getCachedData(slot, attachment).id];
7229
- (_a = batchableSpineSlot._batcher) == null ? void 0 : _a.updateElement(batchableSpineSlot);
7642
+ const batchableSpineSlot = gpuSpine.slotBatches[cacheData.id];
7643
+ (_a = batchableSpineSlot == null ? void 0 : batchableSpineSlot._batcher) == null ? void 0 : _a.updateElement(batchableSpineSlot);
7230
7644
  }
7231
7645
  }
7232
7646
  }
7233
7647
  }
7234
7648
  destroyRenderable(spine) {
7235
7649
  this.gpuSpineData[spine.uid] = null;
7236
- spine.off('destroyed', this._destroyRenderableBound);
7650
+ spine.off("destroyed", this._destroyRenderableBound);
7237
7651
  }
7238
7652
  destroy() {
7239
7653
  this.gpuSpineData = null;
7240
7654
  this.renderer = null;
7655
+ this.canvasSkeletonRenderer = null;
7241
7656
  }
7242
7657
  _getSpineData(spine) {
7243
7658
  return this.gpuSpineData[spine.uid] || this._initMeshData(spine);
@@ -7246,13 +7661,13 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
7246
7661
  this.gpuSpineData[spine.uid] = {
7247
7662
  slotBatches: {}
7248
7663
  };
7249
- spine.on('destroyed', this._destroyRenderableBound);
7664
+ spine.on("destroyed", this._destroyRenderableBound);
7250
7665
  return this.gpuSpineData[spine.uid];
7251
7666
  }
7252
7667
  }
7253
- __publicField(SpinePipe, 'extension', {
7668
+ __publicField(SpinePipe, "extension", {
7254
7669
  type: [pixi_js.ExtensionType.WebGLPipes, pixi_js.ExtensionType.WebGPUPipes, pixi_js.ExtensionType.CanvasPipes],
7255
- name: 'spine'
7670
+ name: "spine"
7256
7671
  });
7257
7672
  pixi_js.extensions.add(SpinePipe);
7258
7673
  const vectorAux = new Vector2();
@@ -7266,28 +7681,28 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
7266
7681
  skeletonData: options
7267
7682
  };
7268
7683
  }
7269
- super();
7270
- __publicField(this, 'batched', true);
7271
- __publicField(this, 'buildId', 0);
7272
- __publicField(this, 'renderPipeId', 'spine');
7273
- __publicField(this, '_didSpineUpdate', false);
7274
- __publicField(this, 'beforeUpdateWorldTransforms', () => {});
7275
- __publicField(this, 'afterUpdateWorldTransforms', () => {});
7276
- __publicField(this, 'skeleton');
7277
- __publicField(this, 'state');
7278
- __publicField(this, 'skeletonBounds');
7279
- __publicField(this, 'darkTint', false);
7280
- __publicField(this, '_debug');
7281
- __publicField(this, '_slotsObject', Object.create(null));
7282
- __publicField(this, 'clippingSlotToPixiMasks', Object.create(null));
7283
- __publicField(this, 'spineAttachmentsDirty', true);
7284
- __publicField(this, 'spineTexturesDirty', true);
7285
- __publicField(this, '_lastAttachments', []);
7286
- __publicField(this, '_stateChanged', true);
7287
- __publicField(this, 'attachmentCacheData', []);
7288
- __publicField(this, '_autoUpdate', false);
7289
- __publicField(this, 'hasNeverUpdated', true);
7290
- __publicField(this, 'currentClippingSlot');
7684
+ super({});
7685
+ __publicField(this, "batched", true);
7686
+ __publicField(this, "buildId", 0);
7687
+ __publicField(this, "renderPipeId", "spine");
7688
+ __publicField(this, "_didSpineUpdate", false);
7689
+ __publicField(this, "beforeUpdateWorldTransforms", () => {});
7690
+ __publicField(this, "afterUpdateWorldTransforms", () => {});
7691
+ __publicField(this, "skeleton");
7692
+ __publicField(this, "state");
7693
+ __publicField(this, "skeletonBounds");
7694
+ __publicField(this, "darkTint", false);
7695
+ __publicField(this, "_debug");
7696
+ __publicField(this, "_slotsObject", Object.create(null));
7697
+ __publicField(this, "clippingSlotToPixiMasks", Object.create(null));
7698
+ __publicField(this, "spineAttachmentsDirty", true);
7699
+ __publicField(this, "spineTexturesDirty", true);
7700
+ __publicField(this, "_lastAttachments", []);
7701
+ __publicField(this, "_stateChanged", true);
7702
+ __publicField(this, "attachmentCacheData", []);
7703
+ __publicField(this, "_autoUpdate", false);
7704
+ __publicField(this, "hasNeverUpdated", true);
7705
+ __publicField(this, "currentClippingSlot");
7291
7706
  const skeletonData = options instanceof SkeletonData ? options : options.skeletonData;
7292
7707
  this.skeleton = new Skeleton(skeletonData);
7293
7708
  this.skeleton.flipY = true;
@@ -7301,7 +7716,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
7301
7716
  }
7302
7717
  getSlotFromRef(slotRef) {
7303
7718
  let slot;
7304
- if (typeof slotRef === 'number') slot = this.skeleton.slots[slotRef];else if (typeof slotRef === 'string') slot = this.skeleton.findSlot(slotRef);else slot = slotRef;
7719
+ if (typeof slotRef === "number") slot = this.skeleton.slots[slotRef];else if (typeof slotRef === "string") slot = this.skeleton.findSlot(slotRef);else slot = slotRef;
7305
7720
  if (!slot) throw new Error(`No slot found with the given slot reference: ${slotRef}`);
7306
7721
  return slot;
7307
7722
  }
@@ -7342,7 +7757,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
7342
7757
  }
7343
7758
  setBonePosition(bone, position) {
7344
7759
  const boneAux = bone;
7345
- if (typeof bone === 'string') {
7760
+ if (typeof bone === "string") {
7346
7761
  bone = this.skeleton.findBone(bone);
7347
7762
  }
7348
7763
  if (!bone) throw Error(`Cant set bone position, bone ${String(boneAux)} not found`);
@@ -7358,7 +7773,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
7358
7773
  }
7359
7774
  getBonePosition(bone, outPos) {
7360
7775
  const boneAux = bone;
7361
- if (typeof bone === 'string') {
7776
+ if (typeof bone === "string") {
7362
7777
  bone = this.skeleton.findBone(bone);
7363
7778
  }
7364
7779
  if (!bone) {
@@ -7767,33 +8182,33 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
7767
8182
  }
7768
8183
  class SpineDebugRenderer {
7769
8184
  constructor() {
7770
- __publicField(this, 'registeredSpines', new Map());
7771
- __publicField(this, 'drawMeshHull', true);
7772
- __publicField(this, 'drawMeshTriangles', true);
7773
- __publicField(this, 'drawBones', true);
7774
- __publicField(this, 'drawPaths', true);
7775
- __publicField(this, 'drawBoundingBoxes', true);
7776
- __publicField(this, 'drawClipping', true);
7777
- __publicField(this, 'drawRegionAttachments', true);
7778
- __publicField(this, 'drawEvents', true);
7779
- __publicField(this, 'lineWidth', 1);
7780
- __publicField(this, 'regionAttachmentsColor', 30975);
7781
- __publicField(this, 'meshHullColor', 30975);
7782
- __publicField(this, 'meshTrianglesColor', 16763904);
7783
- __publicField(this, 'clippingPolygonColor', 16711935);
7784
- __publicField(this, 'boundingBoxesRectColor', 65280);
7785
- __publicField(this, 'boundingBoxesPolygonColor', 65280);
7786
- __publicField(this, 'boundingBoxesCircleColor', 65280);
7787
- __publicField(this, 'pathsCurveColor', 16711680);
7788
- __publicField(this, 'pathsLineColor', 16711935);
7789
- __publicField(this, 'skeletonXYColor', 16711680);
7790
- __publicField(this, 'bonesColor', 61132);
7791
- __publicField(this, 'eventFontSize', 24);
7792
- __publicField(this, 'eventFontColor', 0);
8185
+ __publicField(this, "registeredSpines", new Map());
8186
+ __publicField(this, "drawMeshHull", true);
8187
+ __publicField(this, "drawMeshTriangles", true);
8188
+ __publicField(this, "drawBones", true);
8189
+ __publicField(this, "drawPaths", true);
8190
+ __publicField(this, "drawBoundingBoxes", true);
8191
+ __publicField(this, "drawClipping", true);
8192
+ __publicField(this, "drawRegionAttachments", true);
8193
+ __publicField(this, "drawEvents", true);
8194
+ __publicField(this, "lineWidth", 1);
8195
+ __publicField(this, "regionAttachmentsColor", 30975);
8196
+ __publicField(this, "meshHullColor", 30975);
8197
+ __publicField(this, "meshTrianglesColor", 16763904);
8198
+ __publicField(this, "clippingPolygonColor", 16711935);
8199
+ __publicField(this, "boundingBoxesRectColor", 65280);
8200
+ __publicField(this, "boundingBoxesPolygonColor", 65280);
8201
+ __publicField(this, "boundingBoxesCircleColor", 65280);
8202
+ __publicField(this, "pathsCurveColor", 16711680);
8203
+ __publicField(this, "pathsLineColor", 16711935);
8204
+ __publicField(this, "skeletonXYColor", 16711680);
8205
+ __publicField(this, "bonesColor", 61132);
8206
+ __publicField(this, "eventFontSize", 24);
8207
+ __publicField(this, "eventFontColor", 0);
7793
8208
  }
7794
8209
  registerSpine(spine) {
7795
8210
  if (this.registeredSpines.has(spine)) {
7796
- console.warn('SpineDebugRenderer.registerSpine() - this spine is already registered!', spine);
8211
+ console.warn("SpineDebugRenderer.registerSpine() - this spine is already registered!", spine);
7797
8212
  return;
7798
8213
  }
7799
8214
  const debugDisplayObjects = {
@@ -7819,7 +8234,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
7819
8234
  style: {
7820
8235
  fontSize: this.eventFontSize / scale,
7821
8236
  fill: this.eventFontColor,
7822
- fontFamily: 'monospace'
8237
+ fontFamily: "monospace"
7823
8238
  }
7824
8239
  });
7825
8240
  text.scale.x = Math.sign(spine.scale.x);
@@ -7848,7 +8263,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
7848
8263
  debugDisplayObjects.parentDebugContainer.addChild(debugDisplayObjects.eventText);
7849
8264
  debugDisplayObjects.parentDebugContainer.zIndex = 9999999;
7850
8265
  debugDisplayObjects.parentDebugContainer.accessibleChildren = false;
7851
- debugDisplayObjects.parentDebugContainer.eventMode = 'none';
8266
+ debugDisplayObjects.parentDebugContainer.eventMode = "none";
7852
8267
  debugDisplayObjects.parentDebugContainer.interactiveChildren = false;
7853
8268
  spine.addChild(debugDisplayObjects.parentDebugContainer);
7854
8269
  spine.state.addListener(debugDisplayObjects.eventCallback);
@@ -7923,7 +8338,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
7923
8338
  const starY = skeletonY + bone.worldY;
7924
8339
  const endX = skeletonX + boneLen * bone.a + bone.worldX;
7925
8340
  const endY = skeletonY + boneLen * bone.b + bone.worldY;
7926
- if (bone.data.name === 'root' || bone.data.parent === null) {
8341
+ if (bone.data.name === "root" || bone.data.parent === null) {
7927
8342
  continue;
7928
8343
  }
7929
8344
  const w = Math.abs(starX - endX);
@@ -8077,7 +8492,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
8077
8492
  const polygons = bounds.polygons;
8078
8493
  const drawPolygon = (polygonVertices, _offset, count) => {
8079
8494
  if (count < 3) {
8080
- throw new Error('Polygon must contain at least 3 vertices');
8495
+ throw new Error("Polygon must contain at least 3 vertices");
8081
8496
  }
8082
8497
  const paths = [];
8083
8498
  const dotSize = lineWidth * 2;