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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -30,6 +30,11 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
30
30
  return c > 3 && r && Object.defineProperty(target, key, r), r;
31
31
  }
32
32
  function __awaiter(thisArg, _arguments, P, generator) {
33
+ function adopt(value) {
34
+ return value instanceof P ? value : new P(function (resolve) {
35
+ resolve(value);
36
+ });
37
+ }
33
38
  return new (P || (P = Promise))(function (resolve, reject) {
34
39
  function fulfilled(value) {
35
40
  try {
@@ -46,13 +51,15 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
46
51
  }
47
52
  }
48
53
  function step(result) {
49
- result.done ? resolve(result.value) : new P(function (resolve) {
50
- resolve(result.value);
51
- }).then(fulfilled, rejected);
54
+ result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
52
55
  }
53
56
  step((generator = generator.apply(thisArg, _arguments || [])).next());
54
57
  });
55
58
  }
59
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
60
+ var e = new Error(message);
61
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
62
+ };
56
63
  class Spine$2 extends eva_js.Component {
57
64
  constructor() {
58
65
  super(...arguments);
@@ -60,6 +67,9 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
60
67
  this.scale = 1;
61
68
  this.animationName = '';
62
69
  this.autoPlay = true;
70
+ this.keepResource = false;
71
+ this._slotGameObjects = new Map();
72
+ this._pendingSlotObjects = [];
63
73
  this.waitExecuteInfos = [];
64
74
  }
65
75
  set armature(val) {
@@ -169,12 +179,98 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
169
179
  }
170
180
  return this.armature.skeleton.findBone(boneName);
171
181
  }
182
+ addSlotObject(slot, gameObject, options) {
183
+ if (!this.armature) {
184
+ console.warn('Spine armature is not ready, cannot addSlotObject');
185
+ return;
186
+ }
187
+ if (!this._containerManager) {
188
+ console.warn('ContainerManager is not available');
189
+ return;
190
+ }
191
+ const container = this._containerManager.getContainer(gameObject.id);
192
+ if (!container) {
193
+ this._pendingSlotObjects.push({
194
+ slot,
195
+ gameObject,
196
+ options
197
+ });
198
+ return;
199
+ }
200
+ this._doAddSlotObject(slot, gameObject, container, options);
201
+ }
202
+ _doAddSlotObject(slot, gameObject, container, options) {
203
+ const wrapper = new pixi_js.Container();
204
+ wrapper.addChild(container);
205
+ this.armature.addSlotObject(slot, wrapper, options);
206
+ this._slotGameObjects.set(gameObject, {
207
+ slot,
208
+ wrapper
209
+ });
210
+ this._syncTransformTree(gameObject);
211
+ }
212
+ _syncTransformTree(gameObject) {
213
+ var _a;
214
+ if (!this._containerManager) return;
215
+ this._containerManager.updateTransform({
216
+ name: gameObject.id,
217
+ transform: gameObject.transform
218
+ });
219
+ if ((_a = gameObject.transform) === null || _a === void 0 ? void 0 : _a.children) {
220
+ for (const childTransform of gameObject.transform.children) {
221
+ if (childTransform.gameObject) {
222
+ this._syncTransformTree(childTransform.gameObject);
223
+ }
224
+ }
225
+ }
226
+ }
227
+ _flushPendingSlotObjects() {
228
+ if (this._pendingSlotObjects.length === 0) return;
229
+ if (!this.armature || !this._containerManager) return;
230
+ const still = [];
231
+ for (const pending of this._pendingSlotObjects) {
232
+ const container = this._containerManager.getContainer(pending.gameObject.id);
233
+ if (container) {
234
+ this._doAddSlotObject(pending.slot, pending.gameObject, container, pending.options);
235
+ } else {
236
+ still.push(pending);
237
+ }
238
+ }
239
+ this._pendingSlotObjects = still;
240
+ }
241
+ removeSlotObject(gameObject) {
242
+ this._pendingSlotObjects = this._pendingSlotObjects.filter(p => p.gameObject !== gameObject);
243
+ const entry = this._slotGameObjects.get(gameObject);
244
+ if (entry && this.armature) {
245
+ this.armature.removeSlotObject(entry.wrapper);
246
+ entry.wrapper.destroy({
247
+ children: false
248
+ });
249
+ }
250
+ this._slotGameObjects.delete(gameObject);
251
+ }
252
+ _destroySlotGameObjects() {
253
+ for (const [gameObject, entry] of this._slotGameObjects) {
254
+ if (!gameObject.destroyed) {
255
+ if (this.armature) {
256
+ this.armature.removeSlotObject(entry.wrapper);
257
+ }
258
+ entry.wrapper.destroy({
259
+ children: false
260
+ });
261
+ gameObject.destroy();
262
+ }
263
+ }
264
+ this._slotGameObjects.clear();
265
+ this._pendingSlotObjects = [];
266
+ }
172
267
  }
173
268
  Spine$2.componentName = 'Spine';
174
269
  __decorate([type('string')], Spine$2.prototype, "resource", void 0);
175
270
  __decorate([type('number')], Spine$2.prototype, "scale", void 0);
176
271
  __decorate([type('string')], Spine$2.prototype, "animationName", void 0);
177
272
  __decorate([type('boolean')], Spine$2.prototype, "autoPlay", void 0);
273
+ __decorate([type('boolean')], Spine$2.prototype, "keepResource", void 0);
178
274
  let dataMap = {};
179
275
  function createSpineData(name, data, scale, pixiSpine) {
180
276
  const skeletonAsset = data.ske;
@@ -214,14 +310,6 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
214
310
  data.ref--;
215
311
  setTimeout(() => __awaiter(this, void 0, void 0, function* () {
216
312
  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
313
  eva_js.resource.destroy(resourceName);
226
314
  delete dataMap[resourceName];
227
315
  }
@@ -232,6 +320,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
232
320
  constructor() {
233
321
  super(...arguments);
234
322
  this.armatures = {};
323
+ this._spineComponents = {};
235
324
  }
236
325
  init({
237
326
  pixiSpine
@@ -277,6 +366,9 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
277
366
  for (let key in this.armatures) {
278
367
  this.armatures[key].update(e.deltaTime * 0.001);
279
368
  }
369
+ for (let key in this._spineComponents) {
370
+ this._spineComponents[key]._flushPendingSlotObjects();
371
+ }
280
372
  super.update();
281
373
  }
282
374
  componentChanged(changed) {
@@ -297,7 +389,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
297
389
  });
298
390
  }
299
391
  add(changed, count) {
300
- var _a, _b;
392
+ var _a, _b, _c;
301
393
  return __awaiter(this, void 0, void 0, function* () {
302
394
  const component = changed.component;
303
395
  clearTimeout(component.addHandler);
@@ -334,6 +426,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
334
426
  autoUpdate: false
335
427
  });
336
428
  this.armatures[changed.gameObject.id] = armature;
429
+ this._spineComponents[changed.gameObject.id] = component;
337
430
  if (changed.gameObject && changed.gameObject.transform) {
338
431
  const tran = changed.gameObject.transform;
339
432
  armature.x = tran.size.width * tran.origin.x;
@@ -341,6 +434,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
341
434
  }
342
435
  container.addChildAt(armature, 0);
343
436
  armature.update();
437
+ component._containerManager = (_c = this.renderSystem) === null || _c === void 0 ? void 0 : _c.containerManager;
344
438
  component.armature = armature;
345
439
  component.emit('loaded', {
346
440
  resource: component.resource
@@ -392,15 +486,19 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
392
486
  container.removeChild(armature);
393
487
  }
394
488
  if (component.armature) {
489
+ component._destroySlotGameObjects();
395
490
  component.armature.destroy({
396
491
  children: true
397
492
  });
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);
493
+ if (!component.keepResource) {
494
+ const res = yield eva_js.resource.getResource(component.lastResource);
495
+ ((_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);
496
+ releaseSpineData(res);
497
+ }
401
498
  }
402
499
  component.armature = null;
403
500
  delete this.armatures[changed.gameObject.id];
501
+ delete this._spineComponents[changed.gameObject.id];
404
502
  if (changed.type === eva_js.OBSERVER_TYPE.CHANGE) ;
405
503
  });
406
504
  }
@@ -431,7 +529,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
431
529
  return a;
432
530
  };
433
531
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
434
- var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== 'symbol' ? key + '' : key, value);
532
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
435
533
  var __async = (__this, __arguments, generator) => {
436
534
  return new Promise((resolve, reject) => {
437
535
  var fulfilled = value => {
@@ -452,26 +550,26 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
452
550
  step((generator = generator.apply(__this, __arguments)).next());
453
551
  });
454
552
  };
455
- if (typeof window !== 'undefined' && window.PIXI) {
553
+ if (typeof window !== "undefined" && window.PIXI) {
456
554
  const prevRequire = window.require;
457
555
  window.require = x => {
458
- if (prevRequire) return prevRequire(x);else if (x.startsWith('@pixi/') || x.startsWith('pixi.js')) return window.PIXI;
556
+ if (prevRequire) return prevRequire(x);else if (x.startsWith("@pixi/") || x.startsWith("pixi.js")) return window.PIXI;
459
557
  };
460
558
  }
461
559
  class Attachment {
462
560
  constructor(name) {
463
- __publicField(this, 'name');
464
- if (name == null) throw new Error('name cannot be null.');
561
+ __publicField(this, "name");
562
+ if (name == null) throw new Error("name cannot be null.");
465
563
  this.name = name;
466
564
  }
467
565
  }
468
566
  const _VertexAttachment = class _VertexAttachment extends Attachment {
469
567
  constructor(name) {
470
568
  super(name);
471
- __publicField(this, 'id', (_VertexAttachment.nextID++ & 65535) << 11);
472
- __publicField(this, 'bones');
473
- __publicField(this, 'vertices');
474
- __publicField(this, 'worldVerticesLength', 0);
569
+ __publicField(this, "id", (_VertexAttachment.nextID++ & 65535) << 11);
570
+ __publicField(this, "bones");
571
+ __publicField(this, "vertices");
572
+ __publicField(this, "worldVerticesLength", 0);
475
573
  }
476
574
  computeWorldVertices(slot, start, count, worldVertices, offset, stride) {
477
575
  count = offset + (count >> 1) * stride;
@@ -545,11 +643,11 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
545
643
  return this == sourceAttachment;
546
644
  }
547
645
  };
548
- __publicField(_VertexAttachment, 'nextID', 0);
646
+ __publicField(_VertexAttachment, "nextID", 0);
549
647
  let VertexAttachment = _VertexAttachment;
550
648
  class IntSet {
551
649
  constructor() {
552
- __publicField(this, 'array', new Array());
650
+ __publicField(this, "array", new Array());
553
651
  }
554
652
  add(value) {
555
653
  let contains = this.contains(value);
@@ -589,7 +687,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
589
687
  return this;
590
688
  }
591
689
  setFromString(hex) {
592
- hex = hex.charAt(0) == '#' ? hex.substr(1) : hex;
690
+ hex = hex.charAt(0) == "#" ? hex.substr(1) : hex;
593
691
  this.r = parseInt(hex.substr(0, 2), 16) / 255;
594
692
  this.g = parseInt(hex.substr(2, 2), 16) / 255;
595
693
  this.b = parseInt(hex.substr(4, 2), 16) / 255;
@@ -612,11 +710,11 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
612
710
  return this;
613
711
  }
614
712
  };
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));
713
+ __publicField(_Color, "WHITE", new _Color(1, 1, 1, 1));
714
+ __publicField(_Color, "RED", new _Color(1, 0, 0, 1));
715
+ __publicField(_Color, "GREEN", new _Color(0, 1, 0, 1));
716
+ __publicField(_Color, "BLUE", new _Color(0, 0, 1, 1));
717
+ __publicField(_Color, "MAGENTA", new _Color(1, 0, 1, 1));
620
718
  let Color = _Color;
621
719
  const _MathUtils = class _MathUtils {
622
720
  static clamp(value, min, max) {
@@ -650,12 +748,12 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
650
748
  return max - Math.sqrt((1 - u) * d * (max - mode));
651
749
  }
652
750
  };
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);
751
+ __publicField(_MathUtils, "PI", 3.1415927);
752
+ __publicField(_MathUtils, "PI2", _MathUtils.PI * 2);
753
+ __publicField(_MathUtils, "radiansToDegrees", 180 / _MathUtils.PI);
754
+ __publicField(_MathUtils, "radDeg", _MathUtils.radiansToDegrees);
755
+ __publicField(_MathUtils, "degreesToRadians", _MathUtils.PI / 180);
756
+ __publicField(_MathUtils, "degRad", _MathUtils.degreesToRadians);
659
757
  let MathUtils = _MathUtils;
660
758
  class Interpolation {
661
759
  apply(start, end, a) {
@@ -665,7 +763,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
665
763
  class Pow extends Interpolation {
666
764
  constructor(power) {
667
765
  super();
668
- __publicField(this, 'power', 2);
766
+ __publicField(this, "power", 2);
669
767
  this.power = power;
670
768
  }
671
769
  applyInternal(a) {
@@ -731,20 +829,20 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
731
829
  }
732
830
  static webkit602BugfixHelper(alpha, pose) {}
733
831
  };
734
- __publicField(_Utils, 'SUPPORTS_TYPED_ARRAYS', typeof Float32Array !== 'undefined');
832
+ __publicField(_Utils, "SUPPORTS_TYPED_ARRAYS", typeof Float32Array !== "undefined");
735
833
  let Utils = _Utils;
736
834
  class DebugUtils {
737
835
  static logBones(skeleton) {
738
836
  for (let i = 0; i < skeleton.bones.length; i++) {
739
837
  let bone = skeleton.bones[i];
740
- console.log(bone.data.name + ', ' + bone.a + ', ' + bone.b + ', ' + bone.c + ', ' + bone.d + ', ' + bone.worldX + ', ' + bone.worldY);
838
+ console.log(bone.data.name + ", " + bone.a + ", " + bone.b + ", " + bone.c + ", " + bone.d + ", " + bone.worldX + ", " + bone.worldY);
741
839
  }
742
840
  }
743
841
  }
744
842
  class Pool {
745
843
  constructor(instantiator) {
746
- __publicField(this, 'items', new Array());
747
- __publicField(this, 'instantiator');
844
+ __publicField(this, "items", new Array());
845
+ __publicField(this, "instantiator");
748
846
  this.instantiator = instantiator;
749
847
  }
750
848
  obtain() {
@@ -790,13 +888,13 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
790
888
  }
791
889
  class TimeKeeper {
792
890
  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);
891
+ __publicField(this, "maxDelta", 0.064);
892
+ __publicField(this, "framesPerSecond", 0);
893
+ __publicField(this, "delta", 0);
894
+ __publicField(this, "totalTime", 0);
895
+ __publicField(this, "lastTime", Date.now() / 1e3);
896
+ __publicField(this, "frameCount", 0);
897
+ __publicField(this, "frameTime", 0);
800
898
  }
801
899
  update() {
802
900
  var now = Date.now() / 1e3;
@@ -815,11 +913,11 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
815
913
  }
816
914
  class WindowedMean {
817
915
  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);
916
+ __publicField(this, "values");
917
+ __publicField(this, "addedValues", 0);
918
+ __publicField(this, "lastValue", 0);
919
+ __publicField(this, "mean", 0);
920
+ __publicField(this, "dirty", true);
823
921
  this.values = new Array(windowSize);
824
922
  }
825
923
  hasEnoughData() {
@@ -849,17 +947,17 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
849
947
  }
850
948
  class Animation {
851
949
  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.');
950
+ __publicField(this, "name");
951
+ __publicField(this, "timelines");
952
+ __publicField(this, "duration");
953
+ if (name == null) throw new Error("name cannot be null.");
954
+ if (timelines == null) throw new Error("timelines cannot be null.");
857
955
  this.name = name;
858
956
  this.timelines = timelines;
859
957
  this.duration = duration;
860
958
  }
861
959
  apply(skeleton, lastTime, time, loop, events, alpha, pose, direction) {
862
- if (skeleton == null) throw new Error('skeleton cannot be null.');
960
+ if (skeleton == null) throw new Error("skeleton cannot be null.");
863
961
  if (loop && this.duration != 0) {
864
962
  time %= this.duration;
865
963
  if (lastTime > 0) lastTime %= this.duration;
@@ -884,38 +982,38 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
884
982
  }
885
983
  }
886
984
  var MixPose = (MixPose2 => {
887
- MixPose2[MixPose2['setup'] = 0] = 'setup';
888
- MixPose2[MixPose2['current'] = 1] = 'current';
889
- MixPose2[MixPose2['currentLayered'] = 2] = 'currentLayered';
985
+ MixPose2[MixPose2["setup"] = 0] = "setup";
986
+ MixPose2[MixPose2["current"] = 1] = "current";
987
+ MixPose2[MixPose2["currentLayered"] = 2] = "currentLayered";
890
988
  return MixPose2;
891
989
  })(MixPose || {});
892
990
  var MixDirection = (MixDirection2 => {
893
- MixDirection2[MixDirection2['in'] = 0] = 'in';
894
- MixDirection2[MixDirection2['out'] = 1] = 'out';
991
+ MixDirection2[MixDirection2["in"] = 0] = "in";
992
+ MixDirection2[MixDirection2["out"] = 1] = "out";
895
993
  return MixDirection2;
896
994
  })(MixDirection || {});
897
995
  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';
996
+ TimelineType2[TimelineType2["rotate"] = 0] = "rotate";
997
+ TimelineType2[TimelineType2["translate"] = 1] = "translate";
998
+ TimelineType2[TimelineType2["scale"] = 2] = "scale";
999
+ TimelineType2[TimelineType2["shear"] = 3] = "shear";
1000
+ TimelineType2[TimelineType2["attachment"] = 4] = "attachment";
1001
+ TimelineType2[TimelineType2["color"] = 5] = "color";
1002
+ TimelineType2[TimelineType2["deform"] = 6] = "deform";
1003
+ TimelineType2[TimelineType2["event"] = 7] = "event";
1004
+ TimelineType2[TimelineType2["drawOrder"] = 8] = "drawOrder";
1005
+ TimelineType2[TimelineType2["ikConstraint"] = 9] = "ikConstraint";
1006
+ TimelineType2[TimelineType2["transformConstraint"] = 10] = "transformConstraint";
1007
+ TimelineType2[TimelineType2["pathConstraintPosition"] = 11] = "pathConstraintPosition";
1008
+ TimelineType2[TimelineType2["pathConstraintSpacing"] = 12] = "pathConstraintSpacing";
1009
+ TimelineType2[TimelineType2["pathConstraintMix"] = 13] = "pathConstraintMix";
1010
+ TimelineType2[TimelineType2["twoColor"] = 14] = "twoColor";
913
1011
  return TimelineType2;
914
1012
  })(TimelineType || {});
915
1013
  const _CurveTimeline = class _CurveTimeline {
916
1014
  constructor(frameCount) {
917
- __publicField(this, 'curves');
918
- if (frameCount <= 0) throw new Error('frameCount must be > 0: ' + frameCount);
1015
+ __publicField(this, "curves");
1016
+ if (frameCount <= 0) throw new Error("frameCount must be > 0: " + frameCount);
919
1017
  this.curves = Utils.newFloatArray((frameCount - 1) * _CurveTimeline.BEZIER_SIZE);
920
1018
  }
921
1019
  getFrameCount() {
@@ -987,16 +1085,16 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
987
1085
  return y + (1 - y) * (percent - x) / (1 - x);
988
1086
  }
989
1087
  };
990
- __publicField(_CurveTimeline, 'LINEAR', 0);
991
- __publicField(_CurveTimeline, 'STEPPED', 1);
992
- __publicField(_CurveTimeline, 'BEZIER', 2);
993
- __publicField(_CurveTimeline, 'BEZIER_SIZE', 10 * 2 - 1);
1088
+ __publicField(_CurveTimeline, "LINEAR", 0);
1089
+ __publicField(_CurveTimeline, "STEPPED", 1);
1090
+ __publicField(_CurveTimeline, "BEZIER", 2);
1091
+ __publicField(_CurveTimeline, "BEZIER_SIZE", 10 * 2 - 1);
994
1092
  let CurveTimeline = _CurveTimeline;
995
1093
  const _RotateTimeline = class _RotateTimeline extends CurveTimeline {
996
1094
  constructor(frameCount) {
997
1095
  super(frameCount);
998
- __publicField(this, 'boneIndex');
999
- __publicField(this, 'frames');
1096
+ __publicField(this, "boneIndex");
1097
+ __publicField(this, "frames");
1000
1098
  this.frames = Utils.newFloatArray(frameCount << 1);
1001
1099
  }
1002
1100
  getPropertyId() {
@@ -1047,16 +1145,16 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
1047
1145
  }
1048
1146
  }
1049
1147
  };
1050
- __publicField(_RotateTimeline, 'ENTRIES', 2);
1051
- __publicField(_RotateTimeline, 'PREV_TIME', -2);
1052
- __publicField(_RotateTimeline, 'PREV_ROTATION', -1);
1053
- __publicField(_RotateTimeline, 'ROTATION', 1);
1148
+ __publicField(_RotateTimeline, "ENTRIES", 2);
1149
+ __publicField(_RotateTimeline, "PREV_TIME", -2);
1150
+ __publicField(_RotateTimeline, "PREV_ROTATION", -1);
1151
+ __publicField(_RotateTimeline, "ROTATION", 1);
1054
1152
  let RotateTimeline = _RotateTimeline;
1055
1153
  const _TranslateTimeline = class _TranslateTimeline extends CurveTimeline {
1056
1154
  constructor(frameCount) {
1057
1155
  super(frameCount);
1058
- __publicField(this, 'boneIndex');
1059
- __publicField(this, 'frames');
1156
+ __publicField(this, "boneIndex");
1157
+ __publicField(this, "frames");
1060
1158
  this.frames = Utils.newFloatArray(frameCount * _TranslateTimeline.ENTRIES);
1061
1159
  }
1062
1160
  getPropertyId() {
@@ -1106,12 +1204,12 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
1106
1204
  }
1107
1205
  }
1108
1206
  };
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);
1207
+ __publicField(_TranslateTimeline, "ENTRIES", 3);
1208
+ __publicField(_TranslateTimeline, "PREV_TIME", -3);
1209
+ __publicField(_TranslateTimeline, "PREV_X", -2);
1210
+ __publicField(_TranslateTimeline, "PREV_Y", -1);
1211
+ __publicField(_TranslateTimeline, "X", 1);
1212
+ __publicField(_TranslateTimeline, "Y", 2);
1115
1213
  let TranslateTimeline = _TranslateTimeline;
1116
1214
  class ScaleTimeline extends TranslateTimeline {
1117
1215
  constructor(frameCount) {
@@ -1222,8 +1320,8 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
1222
1320
  const _ColorTimeline = class _ColorTimeline extends CurveTimeline {
1223
1321
  constructor(frameCount) {
1224
1322
  super(frameCount);
1225
- __publicField(this, 'slotIndex');
1226
- __publicField(this, 'frames');
1323
+ __publicField(this, "slotIndex");
1324
+ __publicField(this, "frames");
1227
1325
  this.frames = Utils.newFloatArray(frameCount * _ColorTimeline.ENTRIES);
1228
1326
  }
1229
1327
  getPropertyId() {
@@ -1282,22 +1380,22 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
1282
1380
  }
1283
1381
  }
1284
1382
  };
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);
1383
+ __publicField(_ColorTimeline, "ENTRIES", 5);
1384
+ __publicField(_ColorTimeline, "PREV_TIME", -5);
1385
+ __publicField(_ColorTimeline, "PREV_R", -4);
1386
+ __publicField(_ColorTimeline, "PREV_G", -3);
1387
+ __publicField(_ColorTimeline, "PREV_B", -2);
1388
+ __publicField(_ColorTimeline, "PREV_A", -1);
1389
+ __publicField(_ColorTimeline, "R", 1);
1390
+ __publicField(_ColorTimeline, "G", 2);
1391
+ __publicField(_ColorTimeline, "B", 3);
1392
+ __publicField(_ColorTimeline, "A", 4);
1295
1393
  let ColorTimeline = _ColorTimeline;
1296
1394
  const _TwoColorTimeline = class _TwoColorTimeline extends CurveTimeline {
1297
1395
  constructor(frameCount) {
1298
1396
  super(frameCount);
1299
- __publicField(this, 'slotIndex');
1300
- __publicField(this, 'frames');
1397
+ __publicField(this, "slotIndex");
1398
+ __publicField(this, "frames");
1301
1399
  this.frames = Utils.newFloatArray(frameCount * _TwoColorTimeline.ENTRIES);
1302
1400
  }
1303
1401
  getPropertyId() {
@@ -1383,28 +1481,28 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
1383
1481
  }
1384
1482
  }
1385
1483
  };
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);
1484
+ __publicField(_TwoColorTimeline, "ENTRIES", 8);
1485
+ __publicField(_TwoColorTimeline, "PREV_TIME", -8);
1486
+ __publicField(_TwoColorTimeline, "PREV_R", -7);
1487
+ __publicField(_TwoColorTimeline, "PREV_G", -6);
1488
+ __publicField(_TwoColorTimeline, "PREV_B", -5);
1489
+ __publicField(_TwoColorTimeline, "PREV_A", -4);
1490
+ __publicField(_TwoColorTimeline, "PREV_R2", -3);
1491
+ __publicField(_TwoColorTimeline, "PREV_G2", -2);
1492
+ __publicField(_TwoColorTimeline, "PREV_B2", -1);
1493
+ __publicField(_TwoColorTimeline, "R", 1);
1494
+ __publicField(_TwoColorTimeline, "G", 2);
1495
+ __publicField(_TwoColorTimeline, "B", 3);
1496
+ __publicField(_TwoColorTimeline, "A", 4);
1497
+ __publicField(_TwoColorTimeline, "R2", 5);
1498
+ __publicField(_TwoColorTimeline, "G2", 6);
1499
+ __publicField(_TwoColorTimeline, "B2", 7);
1402
1500
  let TwoColorTimeline = _TwoColorTimeline;
1403
1501
  class AttachmentTimeline {
1404
1502
  constructor(frameCount) {
1405
- __publicField(this, 'slotIndex');
1406
- __publicField(this, 'frames');
1407
- __publicField(this, 'attachmentNames');
1503
+ __publicField(this, "slotIndex");
1504
+ __publicField(this, "frames");
1505
+ __publicField(this, "attachmentNames");
1408
1506
  this.frames = Utils.newFloatArray(frameCount);
1409
1507
  this.attachmentNames = new Array(frameCount);
1410
1508
  }
@@ -1443,10 +1541,10 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
1443
1541
  class DeformTimeline extends CurveTimeline {
1444
1542
  constructor(frameCount) {
1445
1543
  super(frameCount);
1446
- __publicField(this, 'slotIndex');
1447
- __publicField(this, 'attachment');
1448
- __publicField(this, 'frames');
1449
- __publicField(this, 'frameVertices');
1544
+ __publicField(this, "slotIndex");
1545
+ __publicField(this, "attachment");
1546
+ __publicField(this, "frames");
1547
+ __publicField(this, "frameVertices");
1450
1548
  this.frames = Utils.newFloatArray(frameCount);
1451
1549
  this.frameVertices = new Array(frameCount);
1452
1550
  if (zeros == null) zeros = Utils.newFloatArray(64);
@@ -1545,8 +1643,8 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
1545
1643
  }
1546
1644
  class EventTimeline {
1547
1645
  constructor(frameCount) {
1548
- __publicField(this, 'frames');
1549
- __publicField(this, 'events');
1646
+ __publicField(this, "frames");
1647
+ __publicField(this, "events");
1550
1648
  this.frames = Utils.newFloatArray(frameCount);
1551
1649
  this.events = new Array(frameCount);
1552
1650
  }
@@ -1583,8 +1681,8 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
1583
1681
  }
1584
1682
  class DrawOrderTimeline {
1585
1683
  constructor(frameCount) {
1586
- __publicField(this, 'frames');
1587
- __publicField(this, 'drawOrders');
1684
+ __publicField(this, "frames");
1685
+ __publicField(this, "drawOrders");
1588
1686
  this.frames = Utils.newFloatArray(frameCount);
1589
1687
  this.drawOrders = new Array(frameCount);
1590
1688
  }
@@ -1621,8 +1719,8 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
1621
1719
  const _IkConstraintTimeline = class _IkConstraintTimeline extends CurveTimeline {
1622
1720
  constructor(frameCount) {
1623
1721
  super(frameCount);
1624
- __publicField(this, 'ikConstraintIndex');
1625
- __publicField(this, 'frames');
1722
+ __publicField(this, "ikConstraintIndex");
1723
+ __publicField(this, "frames");
1626
1724
  this.frames = Utils.newFloatArray(frameCount * _IkConstraintTimeline.ENTRIES);
1627
1725
  }
1628
1726
  getPropertyId() {
@@ -1672,18 +1770,18 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
1672
1770
  }
1673
1771
  }
1674
1772
  };
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);
1773
+ __publicField(_IkConstraintTimeline, "ENTRIES", 3);
1774
+ __publicField(_IkConstraintTimeline, "PREV_TIME", -3);
1775
+ __publicField(_IkConstraintTimeline, "PREV_MIX", -2);
1776
+ __publicField(_IkConstraintTimeline, "PREV_BEND_DIRECTION", -1);
1777
+ __publicField(_IkConstraintTimeline, "MIX", 1);
1778
+ __publicField(_IkConstraintTimeline, "BEND_DIRECTION", 2);
1681
1779
  let IkConstraintTimeline = _IkConstraintTimeline;
1682
1780
  const _TransformConstraintTimeline = class _TransformConstraintTimeline extends CurveTimeline {
1683
1781
  constructor(frameCount) {
1684
1782
  super(frameCount);
1685
- __publicField(this, 'transformConstraintIndex');
1686
- __publicField(this, 'frames');
1783
+ __publicField(this, "transformConstraintIndex");
1784
+ __publicField(this, "frames");
1687
1785
  this.frames = Utils.newFloatArray(frameCount * _TransformConstraintTimeline.ENTRIES);
1688
1786
  }
1689
1787
  getPropertyId() {
@@ -1754,22 +1852,22 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
1754
1852
  }
1755
1853
  }
1756
1854
  };
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);
1855
+ __publicField(_TransformConstraintTimeline, "ENTRIES", 5);
1856
+ __publicField(_TransformConstraintTimeline, "PREV_TIME", -5);
1857
+ __publicField(_TransformConstraintTimeline, "PREV_ROTATE", -4);
1858
+ __publicField(_TransformConstraintTimeline, "PREV_TRANSLATE", -3);
1859
+ __publicField(_TransformConstraintTimeline, "PREV_SCALE", -2);
1860
+ __publicField(_TransformConstraintTimeline, "PREV_SHEAR", -1);
1861
+ __publicField(_TransformConstraintTimeline, "ROTATE", 1);
1862
+ __publicField(_TransformConstraintTimeline, "TRANSLATE", 2);
1863
+ __publicField(_TransformConstraintTimeline, "SCALE", 3);
1864
+ __publicField(_TransformConstraintTimeline, "SHEAR", 4);
1767
1865
  let TransformConstraintTimeline = _TransformConstraintTimeline;
1768
1866
  const _PathConstraintPositionTimeline = class _PathConstraintPositionTimeline extends CurveTimeline {
1769
1867
  constructor(frameCount) {
1770
1868
  super(frameCount);
1771
- __publicField(this, 'pathConstraintIndex');
1772
- __publicField(this, 'frames');
1869
+ __publicField(this, "pathConstraintIndex");
1870
+ __publicField(this, "frames");
1773
1871
  this.frames = Utils.newFloatArray(frameCount * _PathConstraintPositionTimeline.ENTRIES);
1774
1872
  }
1775
1873
  getPropertyId() {
@@ -1804,10 +1902,10 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
1804
1902
  if (pose == 0) constraint.position = constraint.data.position + (position - constraint.data.position) * alpha;else constraint.position += (position - constraint.position) * alpha;
1805
1903
  }
1806
1904
  };
1807
- __publicField(_PathConstraintPositionTimeline, 'ENTRIES', 2);
1808
- __publicField(_PathConstraintPositionTimeline, 'PREV_TIME', -2);
1809
- __publicField(_PathConstraintPositionTimeline, 'PREV_VALUE', -1);
1810
- __publicField(_PathConstraintPositionTimeline, 'VALUE', 1);
1905
+ __publicField(_PathConstraintPositionTimeline, "ENTRIES", 2);
1906
+ __publicField(_PathConstraintPositionTimeline, "PREV_TIME", -2);
1907
+ __publicField(_PathConstraintPositionTimeline, "PREV_VALUE", -1);
1908
+ __publicField(_PathConstraintPositionTimeline, "VALUE", 1);
1811
1909
  let PathConstraintPositionTimeline = _PathConstraintPositionTimeline;
1812
1910
  class PathConstraintSpacingTimeline extends PathConstraintPositionTimeline {
1813
1911
  constructor(frameCount) {
@@ -1843,8 +1941,8 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
1843
1941
  const _PathConstraintMixTimeline = class _PathConstraintMixTimeline extends CurveTimeline {
1844
1942
  constructor(frameCount) {
1845
1943
  super(frameCount);
1846
- __publicField(this, 'pathConstraintIndex');
1847
- __publicField(this, 'frames');
1944
+ __publicField(this, "pathConstraintIndex");
1945
+ __publicField(this, "frames");
1848
1946
  this.frames = Utils.newFloatArray(frameCount * _PathConstraintMixTimeline.ENTRIES);
1849
1947
  }
1850
1948
  getPropertyId() {
@@ -1894,25 +1992,25 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
1894
1992
  }
1895
1993
  }
1896
1994
  };
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);
1995
+ __publicField(_PathConstraintMixTimeline, "ENTRIES", 3);
1996
+ __publicField(_PathConstraintMixTimeline, "PREV_TIME", -3);
1997
+ __publicField(_PathConstraintMixTimeline, "PREV_ROTATE", -2);
1998
+ __publicField(_PathConstraintMixTimeline, "PREV_TRANSLATE", -1);
1999
+ __publicField(_PathConstraintMixTimeline, "ROTATE", 1);
2000
+ __publicField(_PathConstraintMixTimeline, "TRANSLATE", 2);
1903
2001
  let PathConstraintMixTimeline = _PathConstraintMixTimeline;
1904
2002
  const _AnimationState = class _AnimationState {
1905
2003
  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()));
2004
+ __publicField(this, "data");
2005
+ __publicField(this, "tracks", new Array());
2006
+ __publicField(this, "events", new Array());
2007
+ __publicField(this, "listeners", new Array());
2008
+ __publicField(this, "queue", new EventQueue(this));
2009
+ __publicField(this, "propertyIDs", new IntSet());
2010
+ __publicField(this, "mixingTo", new Array());
2011
+ __publicField(this, "animationsChanged", false);
2012
+ __publicField(this, "timeScale", 1);
2013
+ __publicField(this, "trackEntryPool", new Pool(() => new TrackEntry()));
1916
2014
  this.data = data;
1917
2015
  }
1918
2016
  update(delta) {
@@ -1981,7 +2079,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
1981
2079
  return false;
1982
2080
  }
1983
2081
  apply(skeleton) {
1984
- if (skeleton == null) throw new Error('skeleton cannot be null.');
2082
+ if (skeleton == null) throw new Error("skeleton cannot be null.");
1985
2083
  if (this.animationsChanged) this._animationsChanged();
1986
2084
  let events = this.events;
1987
2085
  let tracks = this.tracks;
@@ -2203,11 +2301,11 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
2203
2301
  }
2204
2302
  setAnimation(trackIndex, animationName, loop) {
2205
2303
  let animation = this.data.skeletonData.findAnimation(animationName);
2206
- if (animation == null) throw new Error('Animation not found: ' + animationName);
2304
+ if (animation == null) throw new Error("Animation not found: " + animationName);
2207
2305
  return this.setAnimationWith(trackIndex, animation, loop);
2208
2306
  }
2209
2307
  setAnimationWith(trackIndex, animation, loop) {
2210
- if (animation == null) throw new Error('animation cannot be null.');
2308
+ if (animation == null) throw new Error("animation cannot be null.");
2211
2309
  let interrupt = true;
2212
2310
  let current = this.expandToIndex(trackIndex);
2213
2311
  if (current != null) {
@@ -2227,11 +2325,11 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
2227
2325
  }
2228
2326
  addAnimation(trackIndex, animationName, loop, delay) {
2229
2327
  let animation = this.data.skeletonData.findAnimation(animationName);
2230
- if (animation == null) throw new Error('Animation not found: ' + animationName);
2328
+ if (animation == null) throw new Error("Animation not found: " + animationName);
2231
2329
  return this.addAnimationWith(trackIndex, animation, loop, delay);
2232
2330
  }
2233
2331
  addAnimationWith(trackIndex, animation, loop, delay) {
2234
- if (animation == null) throw new Error('animation cannot be null.');
2332
+ if (animation == null) throw new Error("animation cannot be null.");
2235
2333
  let last = this.expandToIndex(trackIndex);
2236
2334
  if (last != null) {
2237
2335
  while (last.next != null) last = last.next;
@@ -2329,7 +2427,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
2329
2427
  return this.tracks[trackIndex];
2330
2428
  }
2331
2429
  addListener(listener) {
2332
- if (listener == null) throw new Error('listener cannot be null.');
2430
+ if (listener == null) throw new Error("listener cannot be null.");
2333
2431
  this.listeners.push(listener);
2334
2432
  }
2335
2433
  removeListener(listener) {
@@ -2343,41 +2441,41 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
2343
2441
  this.queue.clear();
2344
2442
  }
2345
2443
  };
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);
2444
+ __publicField(_AnimationState, "emptyAnimation", new Animation("<empty>", [], 0));
2445
+ __publicField(_AnimationState, "SUBSEQUENT", 0);
2446
+ __publicField(_AnimationState, "FIRST", 1);
2447
+ __publicField(_AnimationState, "DIP", 2);
2448
+ __publicField(_AnimationState, "DIP_MIX", 3);
2351
2449
  let AnimationState = _AnimationState;
2352
2450
  class TrackEntry {
2353
2451
  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());
2452
+ __publicField(this, "animation");
2453
+ __publicField(this, "next");
2454
+ __publicField(this, "mixingFrom");
2455
+ __publicField(this, "listener");
2456
+ __publicField(this, "trackIndex");
2457
+ __publicField(this, "loop");
2458
+ __publicField(this, "eventThreshold");
2459
+ __publicField(this, "attachmentThreshold");
2460
+ __publicField(this, "drawOrderThreshold");
2461
+ __publicField(this, "animationStart");
2462
+ __publicField(this, "animationEnd");
2463
+ __publicField(this, "animationLast");
2464
+ __publicField(this, "nextAnimationLast");
2465
+ __publicField(this, "delay");
2466
+ __publicField(this, "trackTime");
2467
+ __publicField(this, "trackLast");
2468
+ __publicField(this, "nextTrackLast");
2469
+ __publicField(this, "trackEnd");
2470
+ __publicField(this, "timeScale");
2471
+ __publicField(this, "alpha");
2472
+ __publicField(this, "mixTime");
2473
+ __publicField(this, "mixDuration");
2474
+ __publicField(this, "interruptAlpha");
2475
+ __publicField(this, "totalAlpha");
2476
+ __publicField(this, "timelineData", new Array());
2477
+ __publicField(this, "timelineDipMix", new Array());
2478
+ __publicField(this, "timelinesRotation", new Array());
2381
2479
  }
2382
2480
  reset() {
2383
2481
  this.next = null;
@@ -2443,9 +2541,9 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
2443
2541
  }
2444
2542
  class EventQueue {
2445
2543
  constructor(animState) {
2446
- __publicField(this, 'objects', []);
2447
- __publicField(this, 'drainDisabled', false);
2448
- __publicField(this, 'animState');
2544
+ __publicField(this, "objects", []);
2545
+ __publicField(this, "drainDisabled", false);
2546
+ __publicField(this, "animState");
2449
2547
  this.animState = animState;
2450
2548
  }
2451
2549
  start(entry) {
@@ -2519,12 +2617,12 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
2519
2617
  }
2520
2618
  }
2521
2619
  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';
2620
+ EventType2[EventType2["start"] = 0] = "start";
2621
+ EventType2[EventType2["interrupt"] = 1] = "interrupt";
2622
+ EventType2[EventType2["end"] = 2] = "end";
2623
+ EventType2[EventType2["dispose"] = 3] = "dispose";
2624
+ EventType2[EventType2["complete"] = 4] = "complete";
2625
+ EventType2[EventType2["event"] = 5] = "event";
2528
2626
  return EventType2;
2529
2627
  })(EventType || {});
2530
2628
  class AnimationStateAdapter2 {
@@ -2537,27 +2635,27 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
2537
2635
  }
2538
2636
  class AnimationStateData {
2539
2637
  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.');
2638
+ __publicField(this, "skeletonData");
2639
+ __publicField(this, "animationToMixTime", {});
2640
+ __publicField(this, "defaultMix", 0);
2641
+ if (skeletonData == null) throw new Error("skeletonData cannot be null.");
2544
2642
  this.skeletonData = skeletonData;
2545
2643
  }
2546
2644
  setMix(fromName, toName, duration) {
2547
2645
  let from = this.skeletonData.findAnimation(fromName);
2548
- if (from == null) throw new Error('Animation not found: ' + fromName);
2646
+ if (from == null) throw new Error("Animation not found: " + fromName);
2549
2647
  let to = this.skeletonData.findAnimation(toName);
2550
- if (to == null) throw new Error('Animation not found: ' + toName);
2648
+ if (to == null) throw new Error("Animation not found: " + toName);
2551
2649
  this.setMixWith(from, to, duration);
2552
2650
  }
2553
2651
  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;
2652
+ if (from == null) throw new Error("from cannot be null.");
2653
+ if (to == null) throw new Error("to cannot be null.");
2654
+ let key = from.name + "." + to.name;
2557
2655
  this.animationToMixTime[key] = duration;
2558
2656
  }
2559
2657
  getMix(from, to) {
2560
- let key = from.name + '.' + to.name;
2658
+ let key = from.name + "." + to.name;
2561
2659
  let value = this.animationToMixTime[key];
2562
2660
  return value === void 0 ? this.defaultMix : value;
2563
2661
  }
@@ -2565,29 +2663,29 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
2565
2663
  class BoundingBoxAttachment extends VertexAttachment {
2566
2664
  constructor(name) {
2567
2665
  super(name);
2568
- __publicField(this, 'color', new Color(1, 1, 1, 1));
2666
+ __publicField(this, "color", new Color(1, 1, 1, 1));
2569
2667
  }
2570
2668
  }
2571
2669
  class ClippingAttachment extends VertexAttachment {
2572
2670
  constructor(name) {
2573
2671
  super(name);
2574
- __publicField(this, 'endSlot');
2575
- __publicField(this, 'color', new Color(0.2275, 0.2275, 0.8078, 1));
2672
+ __publicField(this, "endSlot");
2673
+ __publicField(this, "color", new Color(0.2275, 0.2275, 0.8078, 1));
2576
2674
  }
2577
2675
  }
2578
2676
  class MeshAttachment extends VertexAttachment {
2579
2677
  constructor(name) {
2580
2678
  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));
2679
+ __publicField(this, "region");
2680
+ __publicField(this, "path");
2681
+ __publicField(this, "regionUVs");
2682
+ __publicField(this, "uvs");
2683
+ __publicField(this, "triangles");
2684
+ __publicField(this, "color", new Color(1, 1, 1, 1));
2685
+ __publicField(this, "hullLength");
2686
+ __publicField(this, "parentMesh");
2687
+ __publicField(this, "inheritDeform", false);
2688
+ __publicField(this, "tempColor", new Color(0, 0, 0, 0));
2591
2689
  }
2592
2690
  updateUVs() {
2593
2691
  let u = 0,
@@ -2640,19 +2738,19 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
2640
2738
  class PathAttachment extends VertexAttachment {
2641
2739
  constructor(name) {
2642
2740
  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));
2741
+ __publicField(this, "lengths");
2742
+ __publicField(this, "closed", false);
2743
+ __publicField(this, "constantSpeed", false);
2744
+ __publicField(this, "color", new Color(1, 1, 1, 1));
2647
2745
  }
2648
2746
  }
2649
2747
  class PointAttachment extends VertexAttachment {
2650
2748
  constructor(name) {
2651
2749
  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));
2750
+ __publicField(this, "x");
2751
+ __publicField(this, "y");
2752
+ __publicField(this, "rotation");
2753
+ __publicField(this, "color", new Color(0.38, 0.94, 0, 1));
2656
2754
  }
2657
2755
  computeWorldPosition(bone, point) {
2658
2756
  point.x = this.x * bone.a + this.y * bone.b + bone.worldX;
@@ -2670,20 +2768,20 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
2670
2768
  const _RegionAttachment = class _RegionAttachment extends Attachment {
2671
2769
  constructor(name) {
2672
2770
  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));
2771
+ __publicField(this, "x", 0);
2772
+ __publicField(this, "y", 0);
2773
+ __publicField(this, "scaleX", 1);
2774
+ __publicField(this, "scaleY", 1);
2775
+ __publicField(this, "rotation", 0);
2776
+ __publicField(this, "width", 0);
2777
+ __publicField(this, "height", 0);
2778
+ __publicField(this, "color", new Color(1, 1, 1, 1));
2779
+ __publicField(this, "path");
2780
+ __publicField(this, "rendererObject");
2781
+ __publicField(this, "region");
2782
+ __publicField(this, "offset", Utils.newFloatArray(8));
2783
+ __publicField(this, "uvs", Utils.newFloatArray(8));
2784
+ __publicField(this, "tempColor", new Color(1, 1, 1, 1));
2687
2785
  }
2688
2786
  updateOffset() {
2689
2787
  let regionScaleX = this.width / this.region.originalWidth * this.scaleX;
@@ -2767,55 +2865,55 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
2767
2865
  worldVertices[offset + 1] = offsetX * c + offsetY * d + y;
2768
2866
  }
2769
2867
  };
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);
2868
+ __publicField(_RegionAttachment, "OX1", 0);
2869
+ __publicField(_RegionAttachment, "OY1", 1);
2870
+ __publicField(_RegionAttachment, "OX2", 2);
2871
+ __publicField(_RegionAttachment, "OY2", 3);
2872
+ __publicField(_RegionAttachment, "OX3", 4);
2873
+ __publicField(_RegionAttachment, "OY3", 5);
2874
+ __publicField(_RegionAttachment, "OX4", 6);
2875
+ __publicField(_RegionAttachment, "OY4", 7);
2876
+ __publicField(_RegionAttachment, "X1", 0);
2877
+ __publicField(_RegionAttachment, "Y1", 1);
2878
+ __publicField(_RegionAttachment, "C1R", 2);
2879
+ __publicField(_RegionAttachment, "C1G", 3);
2880
+ __publicField(_RegionAttachment, "C1B", 4);
2881
+ __publicField(_RegionAttachment, "C1A", 5);
2882
+ __publicField(_RegionAttachment, "U1", 6);
2883
+ __publicField(_RegionAttachment, "V1", 7);
2884
+ __publicField(_RegionAttachment, "X2", 8);
2885
+ __publicField(_RegionAttachment, "Y2", 9);
2886
+ __publicField(_RegionAttachment, "C2R", 10);
2887
+ __publicField(_RegionAttachment, "C2G", 11);
2888
+ __publicField(_RegionAttachment, "C2B", 12);
2889
+ __publicField(_RegionAttachment, "C2A", 13);
2890
+ __publicField(_RegionAttachment, "U2", 14);
2891
+ __publicField(_RegionAttachment, "V2", 15);
2892
+ __publicField(_RegionAttachment, "X3", 16);
2893
+ __publicField(_RegionAttachment, "Y3", 17);
2894
+ __publicField(_RegionAttachment, "C3R", 18);
2895
+ __publicField(_RegionAttachment, "C3G", 19);
2896
+ __publicField(_RegionAttachment, "C3B", 20);
2897
+ __publicField(_RegionAttachment, "C3A", 21);
2898
+ __publicField(_RegionAttachment, "U3", 22);
2899
+ __publicField(_RegionAttachment, "V3", 23);
2900
+ __publicField(_RegionAttachment, "X4", 24);
2901
+ __publicField(_RegionAttachment, "Y4", 25);
2902
+ __publicField(_RegionAttachment, "C4R", 26);
2903
+ __publicField(_RegionAttachment, "C4G", 27);
2904
+ __publicField(_RegionAttachment, "C4B", 28);
2905
+ __publicField(_RegionAttachment, "C4A", 29);
2906
+ __publicField(_RegionAttachment, "U4", 30);
2907
+ __publicField(_RegionAttachment, "V4", 31);
2810
2908
  let RegionAttachment = _RegionAttachment;
2811
2909
  class AtlasAttachmentLoader {
2812
2910
  constructor(atlas) {
2813
- __publicField(this, 'atlas');
2911
+ __publicField(this, "atlas");
2814
2912
  this.atlas = atlas;
2815
2913
  }
2816
2914
  newRegionAttachment(skin, name, path2) {
2817
2915
  let region = this.atlas.findRegion(path2);
2818
- if (region == null) throw new Error('Region not found in atlas: ' + path2 + ' (region attachment: ' + name + ')');
2916
+ if (region == null) throw new Error("Region not found in atlas: " + path2 + " (region attachment: " + name + ")");
2819
2917
  region.renderObject = region;
2820
2918
  let attachment = new RegionAttachment(name);
2821
2919
  attachment.setRegion(region);
@@ -2823,7 +2921,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
2823
2921
  }
2824
2922
  newMeshAttachment(skin, name, path2) {
2825
2923
  let region = this.atlas.findRegion(path2);
2826
- if (region == null) throw new Error('Region not found in atlas: ' + path2 + ' (mesh attachment: ' + name + ')');
2924
+ if (region == null) throw new Error("Region not found in atlas: " + path2 + " (mesh attachment: " + name + ")");
2827
2925
  region.renderObject = region;
2828
2926
  let attachment = new MeshAttachment(name);
2829
2927
  attachment.region = region;
@@ -2844,63 +2942,63 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
2844
2942
  }
2845
2943
  class BoneData {
2846
2944
  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.');
2945
+ __publicField(this, "index");
2946
+ __publicField(this, "name");
2947
+ __publicField(this, "parent");
2948
+ __publicField(this, "length");
2949
+ __publicField(this, "x", 0);
2950
+ __publicField(this, "y", 0);
2951
+ __publicField(this, "rotation", 0);
2952
+ __publicField(this, "scaleX", 1);
2953
+ __publicField(this, "scaleY", 1);
2954
+ __publicField(this, "shearX", 0);
2955
+ __publicField(this, "shearY", 0);
2956
+ __publicField(this, "transformMode", 0);
2957
+ if (index < 0) throw new Error("index must be >= 0.");
2958
+ if (name == null) throw new Error("name cannot be null.");
2861
2959
  this.index = index;
2862
2960
  this.name = name;
2863
2961
  this.parent = parent;
2864
2962
  }
2865
2963
  }
2866
2964
  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';
2965
+ TransformMode2[TransformMode2["Normal"] = 0] = "Normal";
2966
+ TransformMode2[TransformMode2["OnlyTranslation"] = 1] = "OnlyTranslation";
2967
+ TransformMode2[TransformMode2["NoRotationOrReflection"] = 2] = "NoRotationOrReflection";
2968
+ TransformMode2[TransformMode2["NoScale"] = 3] = "NoScale";
2969
+ TransformMode2[TransformMode2["NoScaleOrReflection"] = 4] = "NoScaleOrReflection";
2872
2970
  return TransformMode2;
2873
2971
  })(TransformMode || {});
2874
2972
  class Bone {
2875
2973
  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.');
2974
+ __publicField(this, "data");
2975
+ __publicField(this, "skeleton");
2976
+ __publicField(this, "parent");
2977
+ __publicField(this, "children", new Array());
2978
+ __publicField(this, "x", 0);
2979
+ __publicField(this, "y", 0);
2980
+ __publicField(this, "rotation", 0);
2981
+ __publicField(this, "scaleX", 0);
2982
+ __publicField(this, "scaleY", 0);
2983
+ __publicField(this, "shearX", 0);
2984
+ __publicField(this, "shearY", 0);
2985
+ __publicField(this, "ax", 0);
2986
+ __publicField(this, "ay", 0);
2987
+ __publicField(this, "arotation", 0);
2988
+ __publicField(this, "ascaleX", 0);
2989
+ __publicField(this, "ascaleY", 0);
2990
+ __publicField(this, "ashearX", 0);
2991
+ __publicField(this, "ashearY", 0);
2992
+ __publicField(this, "appliedValid", false);
2993
+ __publicField(this, "a", 0);
2994
+ __publicField(this, "b", 0);
2995
+ __publicField(this, "worldX", 0);
2996
+ __publicField(this, "c", 0);
2997
+ __publicField(this, "d", 0);
2998
+ __publicField(this, "worldY", 0);
2999
+ __publicField(this, "sorted", false);
3000
+ if (data == null) throw new Error("data cannot be null.");
3001
+ if (skeleton == null) throw new Error("skeleton cannot be null.");
2904
3002
  this.data = data;
2905
3003
  this.skeleton = skeleton;
2906
3004
  this.parent = parent;
@@ -3152,7 +3250,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
3152
3250
  }
3153
3251
  class Texture {
3154
3252
  constructor(image) {
3155
- __publicField(this, '_image');
3253
+ __publicField(this, "_image");
3156
3254
  this._image = image;
3157
3255
  }
3158
3256
  getImage() {
@@ -3160,19 +3258,19 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
3160
3258
  }
3161
3259
  static filterFromString(text) {
3162
3260
  switch (text.toLowerCase()) {
3163
- case 'nearest':
3261
+ case "nearest":
3164
3262
  return 9728;
3165
- case 'linear':
3263
+ case "linear":
3166
3264
  return 9729;
3167
- case 'mipmap':
3265
+ case "mipmap":
3168
3266
  return 9987;
3169
- case 'mipmapnearestnearest':
3267
+ case "mipmapnearestnearest":
3170
3268
  return 9984;
3171
- case 'mipmaplinearnearest':
3269
+ case "mipmaplinearnearest":
3172
3270
  return 9985;
3173
- case 'mipmapnearestlinear':
3271
+ case "mipmapnearestlinear":
3174
3272
  return 9986;
3175
- case 'mipmaplinearlinear':
3273
+ case "mipmaplinearlinear":
3176
3274
  return 9987;
3177
3275
  default:
3178
3276
  throw new Error(`Unknown texture filter ${text}`);
@@ -3180,11 +3278,11 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
3180
3278
  }
3181
3279
  static wrapFromString(text) {
3182
3280
  switch (text.toLowerCase()) {
3183
- case 'mirroredtepeat':
3281
+ case "mirroredtepeat":
3184
3282
  return 33648;
3185
- case 'clamptoedge':
3283
+ case "clamptoedge":
3186
3284
  return 33071;
3187
- case 'repeat':
3285
+ case "repeat":
3188
3286
  return 10497;
3189
3287
  default:
3190
3288
  throw new Error(`Unknown texture wrap ${text}`);
@@ -3192,36 +3290,36 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
3192
3290
  }
3193
3291
  }
3194
3292
  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';
3293
+ TextureFilter2[TextureFilter2["Nearest"] = 9728] = "Nearest";
3294
+ TextureFilter2[TextureFilter2["Linear"] = 9729] = "Linear";
3295
+ TextureFilter2[TextureFilter2["MipMap"] = 9987] = "MipMap";
3296
+ TextureFilter2[TextureFilter2["MipMapNearestNearest"] = 9984] = "MipMapNearestNearest";
3297
+ TextureFilter2[TextureFilter2["MipMapLinearNearest"] = 9985] = "MipMapLinearNearest";
3298
+ TextureFilter2[TextureFilter2["MipMapNearestLinear"] = 9986] = "MipMapNearestLinear";
3299
+ TextureFilter2[TextureFilter2["MipMapLinearLinear"] = 9987] = "MipMapLinearLinear";
3202
3300
  return TextureFilter2;
3203
3301
  })(TextureFilter || {});
3204
3302
  var TextureWrap = (TextureWrap2 => {
3205
- TextureWrap2[TextureWrap2['MirroredRepeat'] = 33648] = 'MirroredRepeat';
3206
- TextureWrap2[TextureWrap2['ClampToEdge'] = 33071] = 'ClampToEdge';
3207
- TextureWrap2[TextureWrap2['Repeat'] = 10497] = 'Repeat';
3303
+ TextureWrap2[TextureWrap2["MirroredRepeat"] = 33648] = "MirroredRepeat";
3304
+ TextureWrap2[TextureWrap2["ClampToEdge"] = 33071] = "ClampToEdge";
3305
+ TextureWrap2[TextureWrap2["Repeat"] = 10497] = "Repeat";
3208
3306
  return TextureWrap2;
3209
3307
  })(TextureWrap || {});
3210
3308
  class TextureRegion {
3211
3309
  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');
3310
+ __publicField(this, "renderObject");
3311
+ __publicField(this, "u", 0);
3312
+ __publicField(this, "v", 0);
3313
+ __publicField(this, "u2", 0);
3314
+ __publicField(this, "v2", 0);
3315
+ __publicField(this, "width", 0);
3316
+ __publicField(this, "height", 0);
3317
+ __publicField(this, "rotate", false);
3318
+ __publicField(this, "offsetX", 0);
3319
+ __publicField(this, "offsetY", 0);
3320
+ __publicField(this, "originalWidth", 0);
3321
+ __publicField(this, "originalHeight", 0);
3322
+ __publicField(this, "texture");
3225
3323
  }
3226
3324
  }
3227
3325
  class FakeTexture extends Texture {
@@ -3231,12 +3329,12 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
3231
3329
  }
3232
3330
  class TextureAtlas {
3233
3331
  constructor(atlasText, textureLoader) {
3234
- __publicField(this, 'pages', new Array());
3235
- __publicField(this, 'regions', new Array());
3332
+ __publicField(this, "pages", new Array());
3333
+ __publicField(this, "regions", new Array());
3236
3334
  this.load(atlasText, textureLoader);
3237
3335
  }
3238
3336
  load(atlasText, textureLoader) {
3239
- if (textureLoader == null) throw new Error('textureLoader cannot be null.');
3337
+ if (textureLoader == null) throw new Error("textureLoader cannot be null.");
3240
3338
  let reader = new TextureAtlasReader(atlasText);
3241
3339
  let tuple = new Array(4);
3242
3340
  let page = null;
@@ -3258,7 +3356,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
3258
3356
  let direction = reader.readValue();
3259
3357
  page.uWrap = TextureWrap.ClampToEdge;
3260
3358
  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;
3359
+ 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
3360
  page.texture = textureLoader(line);
3263
3361
  page.texture.setFilters(page.minFilter, page.magFilter);
3264
3362
  page.texture.setWraps(page.uWrap, page.vWrap);
@@ -3269,7 +3367,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
3269
3367
  let region = new TextureAtlasRegion();
3270
3368
  region.name = line;
3271
3369
  region.page = page;
3272
- region.rotate = reader.readValue() == 'true';
3370
+ region.rotate = reader.readValue() == "true";
3273
3371
  reader.readTuple(tuple);
3274
3372
  let x = parseInt(tuple[0]);
3275
3373
  let y = parseInt(tuple[1]);
@@ -3321,8 +3419,8 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
3321
3419
  }
3322
3420
  class TextureAtlasReader {
3323
3421
  constructor(text) {
3324
- __publicField(this, 'lines');
3325
- __publicField(this, 'index', 0);
3422
+ __publicField(this, "lines");
3423
+ __publicField(this, "index", 0);
3326
3424
  this.lines = text.split(/\r\n|\r|\n/);
3327
3425
  }
3328
3426
  readLine() {
@@ -3331,18 +3429,18 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
3331
3429
  }
3332
3430
  readValue() {
3333
3431
  let line = this.readLine();
3334
- let colon = line.indexOf(':');
3335
- if (colon == -1) throw new Error('Invalid line: ' + line);
3432
+ let colon = line.indexOf(":");
3433
+ if (colon == -1) throw new Error("Invalid line: " + line);
3336
3434
  return line.substring(colon + 1).trim();
3337
3435
  }
3338
3436
  readTuple(tuple) {
3339
3437
  let line = this.readLine();
3340
- let colon = line.indexOf(':');
3341
- if (colon == -1) throw new Error('Invalid line: ' + line);
3438
+ let colon = line.indexOf(":");
3439
+ if (colon == -1) throw new Error("Invalid line: " + line);
3342
3440
  let i = 0,
3343
3441
  lastMatch = colon + 1;
3344
3442
  for (; i < 3; i++) {
3345
- let comma = line.indexOf(',', lastMatch);
3443
+ let comma = line.indexOf(",", lastMatch);
3346
3444
  if (comma == -1) break;
3347
3445
  tuple[i] = line.substr(lastMatch, comma - lastMatch).trim();
3348
3446
  lastMatch = comma + 1;
@@ -3353,14 +3451,14 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
3353
3451
  }
3354
3452
  class TextureAtlasPage {
3355
3453
  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');
3454
+ __publicField(this, "name");
3455
+ __publicField(this, "minFilter");
3456
+ __publicField(this, "magFilter");
3457
+ __publicField(this, "uWrap");
3458
+ __publicField(this, "vWrap");
3459
+ __publicField(this, "texture");
3460
+ __publicField(this, "width");
3461
+ __publicField(this, "height");
3364
3462
  }
3365
3463
  setTexture(texture) {
3366
3464
  this.texture = texture;
@@ -3373,29 +3471,29 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
3373
3471
  class TextureAtlasRegion extends TextureRegion {
3374
3472
  constructor() {
3375
3473
  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');
3474
+ __publicField(this, "page");
3475
+ __publicField(this, "name");
3476
+ __publicField(this, "x");
3477
+ __publicField(this, "y");
3478
+ __publicField(this, "index");
3479
+ __publicField(this, "rotate");
3480
+ __publicField(this, "texture");
3383
3481
  }
3384
3482
  }
3385
3483
  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);
3484
+ constructor(textureLoader, pathPrefix = "") {
3485
+ __publicField(this, "pathPrefix");
3486
+ __publicField(this, "textureLoader");
3487
+ __publicField(this, "assets", {});
3488
+ __publicField(this, "errors", {});
3489
+ __publicField(this, "toLoad", 0);
3490
+ __publicField(this, "loaded", 0);
3393
3491
  this.textureLoader = textureLoader;
3394
3492
  this.pathPrefix = pathPrefix;
3395
3493
  }
3396
3494
  static downloadText(url, success, error) {
3397
3495
  let request = new XMLHttpRequest();
3398
- request.open('GET', url, true);
3496
+ request.open("GET", url, true);
3399
3497
  request.onload = () => {
3400
3498
  if (request.status == 200) {
3401
3499
  success(request.responseText);
@@ -3410,8 +3508,8 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
3410
3508
  }
3411
3509
  static downloadBinary(url, success, error) {
3412
3510
  let request = new XMLHttpRequest();
3413
- request.open('GET', url, true);
3414
- request.responseType = 'arraybuffer';
3511
+ request.open("GET", url, true);
3512
+ request.responseType = "arraybuffer";
3415
3513
  request.onload = () => {
3416
3514
  if (request.status == 200) {
3417
3515
  success(new Uint8Array(request.response));
@@ -3443,7 +3541,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
3443
3541
  path2 = this.pathPrefix + path2;
3444
3542
  this.toLoad++;
3445
3543
  let img = new Image();
3446
- img.crossOrigin = 'anonymous';
3544
+ img.crossOrigin = "anonymous";
3447
3545
  img.onload = ev => {
3448
3546
  let texture = this.textureLoader(img);
3449
3547
  this.assets[path2] = texture;
@@ -3479,7 +3577,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
3479
3577
  img.src = data;
3480
3578
  }
3481
3579
  loadTextureAtlas(path2, success = null, error = null) {
3482
- let parent = path2.lastIndexOf('/') >= 0 ? path2.substring(0, path2.lastIndexOf('/')) : '';
3580
+ let parent = path2.lastIndexOf("/") >= 0 ? path2.substring(0, path2.lastIndexOf("/")) : "";
3483
3581
  path2 = this.pathPrefix + path2;
3484
3582
  this.toLoad++;
3485
3583
  AssetManager.downloadText(path2, atlasData => {
@@ -3489,8 +3587,8 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
3489
3587
  var atlasPages = new Array();
3490
3588
  try {
3491
3589
  let atlas = new TextureAtlas(atlasData, path22 => {
3492
- atlasPages.push(parent + '/' + path22);
3493
- let image = document.createElement('img');
3590
+ atlasPages.push(parent + "/" + path22);
3591
+ let image = document.createElement("img");
3494
3592
  image.width = 16;
3495
3593
  image.height = 16;
3496
3594
  return new FakeTexture(image);
@@ -3511,7 +3609,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
3511
3609
  if (!pageLoadError) {
3512
3610
  try {
3513
3611
  let atlas = new TextureAtlas(atlasData, path22 => {
3514
- return this.get(parent + '/' + path22);
3612
+ return this.get(parent + "/" + path22);
3515
3613
  });
3516
3614
  this.assets[path2] = atlas;
3517
3615
  if (success) success(path2, atlas);
@@ -3587,34 +3685,34 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
3587
3685
  }
3588
3686
  class Event {
3589
3687
  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.');
3688
+ __publicField(this, "data");
3689
+ __publicField(this, "intValue");
3690
+ __publicField(this, "floatValue");
3691
+ __publicField(this, "stringValue");
3692
+ __publicField(this, "time");
3693
+ if (data == null) throw new Error("data cannot be null.");
3596
3694
  this.time = time;
3597
3695
  this.data = data;
3598
3696
  }
3599
3697
  }
3600
3698
  class EventData {
3601
3699
  constructor(name) {
3602
- __publicField(this, 'name');
3603
- __publicField(this, 'intValue');
3604
- __publicField(this, 'floatValue');
3605
- __publicField(this, 'stringValue');
3700
+ __publicField(this, "name");
3701
+ __publicField(this, "intValue");
3702
+ __publicField(this, "floatValue");
3703
+ __publicField(this, "stringValue");
3606
3704
  this.name = name;
3607
3705
  }
3608
3706
  }
3609
3707
  class IkConstraint {
3610
3708
  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.');
3709
+ __publicField(this, "data");
3710
+ __publicField(this, "bones");
3711
+ __publicField(this, "target");
3712
+ __publicField(this, "mix", 1);
3713
+ __publicField(this, "bendDirection", 0);
3714
+ if (data == null) throw new Error("data cannot be null.");
3715
+ if (skeleton == null) throw new Error("skeleton cannot be null.");
3618
3716
  this.data = data;
3619
3717
  this.mix = data.mix;
3620
3718
  this.bendDirection = data.bendDirection;
@@ -3801,66 +3899,66 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
3801
3899
  }
3802
3900
  class IkConstraintData {
3803
3901
  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);
3902
+ __publicField(this, "name");
3903
+ __publicField(this, "order", 0);
3904
+ __publicField(this, "bones", new Array());
3905
+ __publicField(this, "target");
3906
+ __publicField(this, "bendDirection", 1);
3907
+ __publicField(this, "mix", 1);
3810
3908
  this.name = name;
3811
3909
  }
3812
3910
  }
3813
3911
  class PathConstraintData {
3814
3912
  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');
3913
+ __publicField(this, "name");
3914
+ __publicField(this, "order", 0);
3915
+ __publicField(this, "bones", new Array());
3916
+ __publicField(this, "target");
3917
+ __publicField(this, "positionMode");
3918
+ __publicField(this, "spacingMode");
3919
+ __publicField(this, "rotateMode");
3920
+ __publicField(this, "offsetRotation");
3921
+ __publicField(this, "position");
3922
+ __publicField(this, "spacing");
3923
+ __publicField(this, "rotateMix");
3924
+ __publicField(this, "translateMix");
3827
3925
  this.name = name;
3828
3926
  }
3829
3927
  }
3830
3928
  var PositionMode = (PositionMode2 => {
3831
- PositionMode2[PositionMode2['Fixed'] = 0] = 'Fixed';
3832
- PositionMode2[PositionMode2['Percent'] = 1] = 'Percent';
3929
+ PositionMode2[PositionMode2["Fixed"] = 0] = "Fixed";
3930
+ PositionMode2[PositionMode2["Percent"] = 1] = "Percent";
3833
3931
  return PositionMode2;
3834
3932
  })(PositionMode || {});
3835
3933
  var SpacingMode = (SpacingMode2 => {
3836
- SpacingMode2[SpacingMode2['Length'] = 0] = 'Length';
3837
- SpacingMode2[SpacingMode2['Fixed'] = 1] = 'Fixed';
3838
- SpacingMode2[SpacingMode2['Percent'] = 2] = 'Percent';
3934
+ SpacingMode2[SpacingMode2["Length"] = 0] = "Length";
3935
+ SpacingMode2[SpacingMode2["Fixed"] = 1] = "Fixed";
3936
+ SpacingMode2[SpacingMode2["Percent"] = 2] = "Percent";
3839
3937
  return SpacingMode2;
3840
3938
  })(SpacingMode || {});
3841
3939
  var RotateMode = (RotateMode2 => {
3842
- RotateMode2[RotateMode2['Tangent'] = 0] = 'Tangent';
3843
- RotateMode2[RotateMode2['Chain'] = 1] = 'Chain';
3844
- RotateMode2[RotateMode2['ChainScale'] = 2] = 'ChainScale';
3940
+ RotateMode2[RotateMode2["Tangent"] = 0] = "Tangent";
3941
+ RotateMode2[RotateMode2["Chain"] = 1] = "Chain";
3942
+ RotateMode2[RotateMode2["ChainScale"] = 2] = "ChainScale";
3845
3943
  return RotateMode2;
3846
3944
  })(RotateMode || {});
3847
3945
  const _PathConstraint = class _PathConstraint {
3848
3946
  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.');
3947
+ __publicField(this, "data");
3948
+ __publicField(this, "bones");
3949
+ __publicField(this, "target");
3950
+ __publicField(this, "position", 0);
3951
+ __publicField(this, "spacing", 0);
3952
+ __publicField(this, "rotateMix", 0);
3953
+ __publicField(this, "translateMix", 0);
3954
+ __publicField(this, "spaces", new Array());
3955
+ __publicField(this, "positions", new Array());
3956
+ __publicField(this, "world", new Array());
3957
+ __publicField(this, "curves", new Array());
3958
+ __publicField(this, "lengths", new Array());
3959
+ __publicField(this, "segments", new Array());
3960
+ if (data == null) throw new Error("data cannot be null.");
3961
+ if (skeleton == null) throw new Error("skeleton cannot be null.");
3864
3962
  this.data = data;
3865
3963
  this.bones = new Array();
3866
3964
  for (let i = 0, n = data.bones.length; i < n; i++) this.bones.push(skeleton.findBone(data.bones[i].name));
@@ -4219,22 +4317,22 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
4219
4317
  return this.data.order;
4220
4318
  }
4221
4319
  };
4222
- __publicField(_PathConstraint, 'NONE', -1);
4223
- __publicField(_PathConstraint, 'BEFORE', -2);
4224
- __publicField(_PathConstraint, 'AFTER', -3);
4225
- __publicField(_PathConstraint, 'epsilon', 1e-5);
4320
+ __publicField(_PathConstraint, "NONE", -1);
4321
+ __publicField(_PathConstraint, "BEFORE", -2);
4322
+ __publicField(_PathConstraint, "AFTER", -3);
4323
+ __publicField(_PathConstraint, "epsilon", 1e-5);
4226
4324
  let PathConstraint = _PathConstraint;
4227
4325
  class Slot {
4228
4326
  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.');
4327
+ __publicField(this, "data");
4328
+ __publicField(this, "bone");
4329
+ __publicField(this, "color");
4330
+ __publicField(this, "darkColor");
4331
+ __publicField(this, "attachment");
4332
+ __publicField(this, "attachmentTime");
4333
+ __publicField(this, "attachmentVertices", new Array());
4334
+ if (data == null) throw new Error("data cannot be null.");
4335
+ if (bone == null) throw new Error("bone cannot be null.");
4238
4336
  this.data = data;
4239
4337
  this.bone = bone;
4240
4338
  this.color = new Color();
@@ -4267,16 +4365,16 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
4267
4365
  }
4268
4366
  class TransformConstraint {
4269
4367
  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.');
4368
+ __publicField(this, "data");
4369
+ __publicField(this, "bones");
4370
+ __publicField(this, "target");
4371
+ __publicField(this, "rotateMix", 0);
4372
+ __publicField(this, "translateMix", 0);
4373
+ __publicField(this, "scaleMix", 0);
4374
+ __publicField(this, "shearMix", 0);
4375
+ __publicField(this, "temp", new Vector2());
4376
+ if (data == null) throw new Error("data cannot be null.");
4377
+ if (skeleton == null) throw new Error("skeleton cannot be null.");
4280
4378
  this.data = data;
4281
4379
  this.rotateMix = data.rotateMix;
4282
4380
  this.translateMix = data.translateMix;
@@ -4501,23 +4599,23 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
4501
4599
  }
4502
4600
  class Skeleton {
4503
4601
  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.');
4602
+ __publicField(this, "data");
4603
+ __publicField(this, "bones");
4604
+ __publicField(this, "slots");
4605
+ __publicField(this, "drawOrder");
4606
+ __publicField(this, "ikConstraints");
4607
+ __publicField(this, "transformConstraints");
4608
+ __publicField(this, "pathConstraints");
4609
+ __publicField(this, "_updateCache", new Array());
4610
+ __publicField(this, "updateCacheReset", new Array());
4611
+ __publicField(this, "skin");
4612
+ __publicField(this, "color");
4613
+ __publicField(this, "time", 0);
4614
+ __publicField(this, "flipX", false);
4615
+ __publicField(this, "flipY", false);
4616
+ __publicField(this, "x", 0);
4617
+ __publicField(this, "y", 0);
4618
+ if (data == null) throw new Error("data cannot be null.");
4521
4619
  this.data = data;
4522
4620
  this.bones = new Array();
4523
4621
  for (let i = 0; i < data.bones.length; i++) {
@@ -4738,7 +4836,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
4738
4836
  return this.bones[0];
4739
4837
  }
4740
4838
  findBone(boneName) {
4741
- if (boneName == null) throw new Error('boneName cannot be null.');
4839
+ if (boneName == null) throw new Error("boneName cannot be null.");
4742
4840
  let bones = this.bones;
4743
4841
  for (let i = 0, n = bones.length; i < n; i++) {
4744
4842
  let bone = bones[i];
@@ -4747,13 +4845,13 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
4747
4845
  return null;
4748
4846
  }
4749
4847
  findBoneIndex(boneName) {
4750
- if (boneName == null) throw new Error('boneName cannot be null.');
4848
+ if (boneName == null) throw new Error("boneName cannot be null.");
4751
4849
  let bones = this.bones;
4752
4850
  for (let i = 0, n = bones.length; i < n; i++) if (bones[i].data.name == boneName) return i;
4753
4851
  return -1;
4754
4852
  }
4755
4853
  findSlot(slotName) {
4756
- if (slotName == null) throw new Error('slotName cannot be null.');
4854
+ if (slotName == null) throw new Error("slotName cannot be null.");
4757
4855
  let slots = this.slots;
4758
4856
  for (let i = 0, n = slots.length; i < n; i++) {
4759
4857
  let slot = slots[i];
@@ -4762,14 +4860,14 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
4762
4860
  return null;
4763
4861
  }
4764
4862
  findSlotIndex(slotName) {
4765
- if (slotName == null) throw new Error('slotName cannot be null.');
4863
+ if (slotName == null) throw new Error("slotName cannot be null.");
4766
4864
  let slots = this.slots;
4767
4865
  for (let i = 0, n = slots.length; i < n; i++) if (slots[i].data.name == slotName) return i;
4768
4866
  return -1;
4769
4867
  }
4770
4868
  setSkinByName(skinName) {
4771
4869
  let skin = this.data.findSkin(skinName);
4772
- if (skin == null) throw new Error('Skin not found: ' + skinName);
4870
+ if (skin == null) throw new Error("Skin not found: " + skinName);
4773
4871
  this.setSkin(skin);
4774
4872
  }
4775
4873
  setSkin(newSkin) {
@@ -4792,7 +4890,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
4792
4890
  return this.getAttachment(this.data.findSlotIndex(slotName), attachmentName);
4793
4891
  }
4794
4892
  getAttachment(slotIndex, attachmentName) {
4795
- if (attachmentName == null) throw new Error('attachmentName cannot be null.');
4893
+ if (attachmentName == null) throw new Error("attachmentName cannot be null.");
4796
4894
  if (this.skin != null) {
4797
4895
  let attachment = this.skin.getAttachment(slotIndex, attachmentName);
4798
4896
  if (attachment != null) return attachment;
@@ -4801,7 +4899,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
4801
4899
  return null;
4802
4900
  }
4803
4901
  setAttachment(slotName, attachmentName) {
4804
- if (slotName == null) throw new Error('slotName cannot be null.');
4902
+ if (slotName == null) throw new Error("slotName cannot be null.");
4805
4903
  let slots = this.slots;
4806
4904
  for (let i = 0, n = slots.length; i < n; i++) {
4807
4905
  let slot = slots[i];
@@ -4809,16 +4907,16 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
4809
4907
  let attachment = null;
4810
4908
  if (attachmentName != null) {
4811
4909
  attachment = this.getAttachment(i, attachmentName);
4812
- if (attachment == null) throw new Error('Attachment not found: ' + attachmentName + ', for slot: ' + slotName);
4910
+ if (attachment == null) throw new Error("Attachment not found: " + attachmentName + ", for slot: " + slotName);
4813
4911
  }
4814
4912
  slot.setAttachment(attachment);
4815
4913
  return;
4816
4914
  }
4817
4915
  }
4818
- throw new Error('Slot not found: ' + slotName);
4916
+ throw new Error("Slot not found: " + slotName);
4819
4917
  }
4820
4918
  findIkConstraint(constraintName) {
4821
- if (constraintName == null) throw new Error('constraintName cannot be null.');
4919
+ if (constraintName == null) throw new Error("constraintName cannot be null.");
4822
4920
  let ikConstraints = this.ikConstraints;
4823
4921
  for (let i = 0, n = ikConstraints.length; i < n; i++) {
4824
4922
  let ikConstraint = ikConstraints[i];
@@ -4827,7 +4925,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
4827
4925
  return null;
4828
4926
  }
4829
4927
  findTransformConstraint(constraintName) {
4830
- if (constraintName == null) throw new Error('constraintName cannot be null.');
4928
+ if (constraintName == null) throw new Error("constraintName cannot be null.");
4831
4929
  let transformConstraints = this.transformConstraints;
4832
4930
  for (let i = 0, n = transformConstraints.length; i < n; i++) {
4833
4931
  let constraint = transformConstraints[i];
@@ -4836,7 +4934,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
4836
4934
  return null;
4837
4935
  }
4838
4936
  findPathConstraint(constraintName) {
4839
- if (constraintName == null) throw new Error('constraintName cannot be null.');
4937
+ if (constraintName == null) throw new Error("constraintName cannot be null.");
4840
4938
  let pathConstraints = this.pathConstraints;
4841
4939
  for (let i = 0, n = pathConstraints.length; i < n; i++) {
4842
4940
  let constraint = pathConstraints[i];
@@ -4845,8 +4943,8 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
4845
4943
  return null;
4846
4944
  }
4847
4945
  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.');
4946
+ if (offset == null) throw new Error("offset cannot be null.");
4947
+ if (size == null) throw new Error("size cannot be null.");
4850
4948
  let drawOrder = this.drawOrder;
4851
4949
  let minX = Number.POSITIVE_INFINITY,
4852
4950
  minY = Number.POSITIVE_INFINITY,
@@ -4887,18 +4985,18 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
4887
4985
  }
4888
4986
  class SkeletonBounds {
4889
4987
  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(() => {
4988
+ __publicField(this, "minX", 0);
4989
+ __publicField(this, "minY", 0);
4990
+ __publicField(this, "maxX", 0);
4991
+ __publicField(this, "maxY", 0);
4992
+ __publicField(this, "boundingBoxes", new Array());
4993
+ __publicField(this, "polygons", new Array());
4994
+ __publicField(this, "polygonPool", new Pool(() => {
4897
4995
  return Utils.newFloatArray(16);
4898
4996
  }));
4899
4997
  }
4900
4998
  update(skeleton, updateAabb) {
4901
- if (skeleton == null) throw new Error('skeleton cannot be null.');
4999
+ if (skeleton == null) throw new Error("skeleton cannot be null.");
4902
5000
  let boundingBoxes = this.boundingBoxes;
4903
5001
  let polygons = this.polygons;
4904
5002
  let polygonPool = this.polygonPool;
@@ -5028,7 +5126,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
5028
5126
  return false;
5029
5127
  }
5030
5128
  getPolygon(boundingBox) {
5031
- if (boundingBox == null) throw new Error('boundingBox cannot be null.');
5129
+ if (boundingBox == null) throw new Error("boundingBox cannot be null.");
5032
5130
  let index = this.boundingBoxes.indexOf(boundingBox);
5033
5131
  return index == -1 ? null : this.polygons[index];
5034
5132
  }
@@ -5041,15 +5139,15 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
5041
5139
  }
5042
5140
  class Triangulator {
5043
5141
  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(() => {
5142
+ __publicField(this, "convexPolygons", new Array());
5143
+ __publicField(this, "convexPolygonsIndices", new Array());
5144
+ __publicField(this, "indicesArray", new Array());
5145
+ __publicField(this, "isConcaveArray", new Array());
5146
+ __publicField(this, "triangles", new Array());
5147
+ __publicField(this, "polygonPool", new Pool(() => {
5050
5148
  return new Array();
5051
5149
  }));
5052
- __publicField(this, 'polygonIndicesPool', new Pool(() => {
5150
+ __publicField(this, "polygonIndicesPool", new Pool(() => {
5053
5151
  return new Array();
5054
5152
  }));
5055
5153
  }
@@ -5258,15 +5356,15 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
5258
5356
  }
5259
5357
  class SkeletonClipping {
5260
5358
  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');
5359
+ __publicField(this, "triangulator", new Triangulator());
5360
+ __publicField(this, "clippingPolygon", new Array());
5361
+ __publicField(this, "clipOutput", new Array());
5362
+ __publicField(this, "clippedVertices", new Array());
5363
+ __publicField(this, "clippedUVs", new Array());
5364
+ __publicField(this, "clippedTriangles", new Array());
5365
+ __publicField(this, "scratch", new Array());
5366
+ __publicField(this, "clipAttachment");
5367
+ __publicField(this, "clippingPolygons");
5270
5368
  }
5271
5369
  clipStart(slot, clip) {
5272
5370
  if (this.clipAttachment != null) return 0;
@@ -5648,25 +5746,25 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
5648
5746
  }
5649
5747
  class SkeletonData {
5650
5748
  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');
5749
+ __publicField(this, "name");
5750
+ __publicField(this, "bones", new Array());
5751
+ __publicField(this, "slots", new Array());
5752
+ __publicField(this, "skins", new Array());
5753
+ __publicField(this, "defaultSkin");
5754
+ __publicField(this, "events", new Array());
5755
+ __publicField(this, "animations", new Array());
5756
+ __publicField(this, "ikConstraints", new Array());
5757
+ __publicField(this, "transformConstraints", new Array());
5758
+ __publicField(this, "pathConstraints", new Array());
5759
+ __publicField(this, "width");
5760
+ __publicField(this, "height");
5761
+ __publicField(this, "version");
5762
+ __publicField(this, "hash");
5763
+ __publicField(this, "fps", 0);
5764
+ __publicField(this, "imagesPath");
5667
5765
  }
5668
5766
  findBone(boneName) {
5669
- if (boneName == null) throw new Error('boneName cannot be null.');
5767
+ if (boneName == null) throw new Error("boneName cannot be null.");
5670
5768
  let bones = this.bones;
5671
5769
  for (let i = 0, n = bones.length; i < n; i++) {
5672
5770
  let bone = bones[i];
@@ -5675,13 +5773,13 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
5675
5773
  return null;
5676
5774
  }
5677
5775
  findBoneIndex(boneName) {
5678
- if (boneName == null) throw new Error('boneName cannot be null.');
5776
+ if (boneName == null) throw new Error("boneName cannot be null.");
5679
5777
  let bones = this.bones;
5680
5778
  for (let i = 0, n = bones.length; i < n; i++) if (bones[i].name == boneName) return i;
5681
5779
  return -1;
5682
5780
  }
5683
5781
  findSlot(slotName) {
5684
- if (slotName == null) throw new Error('slotName cannot be null.');
5782
+ if (slotName == null) throw new Error("slotName cannot be null.");
5685
5783
  let slots = this.slots;
5686
5784
  for (let i = 0, n = slots.length; i < n; i++) {
5687
5785
  let slot = slots[i];
@@ -5690,13 +5788,13 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
5690
5788
  return null;
5691
5789
  }
5692
5790
  findSlotIndex(slotName) {
5693
- if (slotName == null) throw new Error('slotName cannot be null.');
5791
+ if (slotName == null) throw new Error("slotName cannot be null.");
5694
5792
  let slots = this.slots;
5695
5793
  for (let i = 0, n = slots.length; i < n; i++) if (slots[i].name == slotName) return i;
5696
5794
  return -1;
5697
5795
  }
5698
5796
  findSkin(skinName) {
5699
- if (skinName == null) throw new Error('skinName cannot be null.');
5797
+ if (skinName == null) throw new Error("skinName cannot be null.");
5700
5798
  let skins = this.skins;
5701
5799
  for (let i = 0, n = skins.length; i < n; i++) {
5702
5800
  let skin = skins[i];
@@ -5705,7 +5803,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
5705
5803
  return null;
5706
5804
  }
5707
5805
  findEvent(eventDataName) {
5708
- if (eventDataName == null) throw new Error('eventDataName cannot be null.');
5806
+ if (eventDataName == null) throw new Error("eventDataName cannot be null.");
5709
5807
  let events = this.events;
5710
5808
  for (let i = 0, n = events.length; i < n; i++) {
5711
5809
  let event = events[i];
@@ -5714,7 +5812,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
5714
5812
  return null;
5715
5813
  }
5716
5814
  findAnimation(animationName) {
5717
- if (animationName == null) throw new Error('animationName cannot be null.');
5815
+ if (animationName == null) throw new Error("animationName cannot be null.");
5718
5816
  let animations = this.animations;
5719
5817
  for (let i = 0, n = animations.length; i < n; i++) {
5720
5818
  let animation = animations[i];
@@ -5723,7 +5821,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
5723
5821
  return null;
5724
5822
  }
5725
5823
  findIkConstraint(constraintName) {
5726
- if (constraintName == null) throw new Error('constraintName cannot be null.');
5824
+ if (constraintName == null) throw new Error("constraintName cannot be null.");
5727
5825
  let ikConstraints = this.ikConstraints;
5728
5826
  for (let i = 0, n = ikConstraints.length; i < n; i++) {
5729
5827
  let constraint = ikConstraints[i];
@@ -5732,7 +5830,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
5732
5830
  return null;
5733
5831
  }
5734
5832
  findTransformConstraint(constraintName) {
5735
- if (constraintName == null) throw new Error('constraintName cannot be null.');
5833
+ if (constraintName == null) throw new Error("constraintName cannot be null.");
5736
5834
  let transformConstraints = this.transformConstraints;
5737
5835
  for (let i = 0, n = transformConstraints.length; i < n; i++) {
5738
5836
  let constraint = transformConstraints[i];
@@ -5741,7 +5839,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
5741
5839
  return null;
5742
5840
  }
5743
5841
  findPathConstraint(constraintName) {
5744
- if (constraintName == null) throw new Error('constraintName cannot be null.');
5842
+ if (constraintName == null) throw new Error("constraintName cannot be null.");
5745
5843
  let pathConstraints = this.pathConstraints;
5746
5844
  for (let i = 0, n = pathConstraints.length; i < n; i++) {
5747
5845
  let constraint = pathConstraints[i];
@@ -5750,28 +5848,28 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
5750
5848
  return null;
5751
5849
  }
5752
5850
  findPathConstraintIndex(pathConstraintName) {
5753
- if (pathConstraintName == null) throw new Error('pathConstraintName cannot be null.');
5851
+ if (pathConstraintName == null) throw new Error("pathConstraintName cannot be null.");
5754
5852
  let pathConstraints = this.pathConstraints;
5755
5853
  for (let i = 0, n = pathConstraints.length; i < n; i++) if (pathConstraints[i].name == pathConstraintName) return i;
5756
5854
  return -1;
5757
5855
  }
5758
5856
  }
5759
5857
  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';
5858
+ BlendMode2[BlendMode2["Normal"] = 0] = "Normal";
5859
+ BlendMode2[BlendMode2["Additive"] = 1] = "Additive";
5860
+ BlendMode2[BlendMode2["Multiply"] = 2] = "Multiply";
5861
+ BlendMode2[BlendMode2["Screen"] = 3] = "Screen";
5764
5862
  return BlendMode2;
5765
5863
  })(BlendMode || {});
5766
5864
  class Skin {
5767
5865
  constructor(name) {
5768
- __publicField(this, 'name');
5769
- __publicField(this, 'attachments', new Array());
5770
- if (name == null) throw new Error('name cannot be null.');
5866
+ __publicField(this, "name");
5867
+ __publicField(this, "attachments", new Array());
5868
+ if (name == null) throw new Error("name cannot be null.");
5771
5869
  this.name = name;
5772
5870
  }
5773
5871
  addAttachment(slotIndex, name, attachment) {
5774
- if (attachment == null) throw new Error('attachment cannot be null.');
5872
+ if (attachment == null) throw new Error("attachment cannot be null.");
5775
5873
  let attachments = this.attachments;
5776
5874
  if (slotIndex >= attachments.length) attachments.length = slotIndex + 1;
5777
5875
  if (!attachments[slotIndex]) attachments[slotIndex] = {};
@@ -5803,16 +5901,16 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
5803
5901
  }
5804
5902
  class SlotData {
5805
5903
  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.');
5904
+ __publicField(this, "index");
5905
+ __publicField(this, "name");
5906
+ __publicField(this, "boneData");
5907
+ __publicField(this, "color", new Color(1, 1, 1, 1));
5908
+ __publicField(this, "darkColor");
5909
+ __publicField(this, "attachmentName");
5910
+ __publicField(this, "blendMode");
5911
+ if (index < 0) throw new Error("index must be >= 0.");
5912
+ if (name == null) throw new Error("name cannot be null.");
5913
+ if (boneData == null) throw new Error("boneData cannot be null.");
5816
5914
  this.index = index;
5817
5915
  this.name = name;
5818
5916
  this.boneData = boneData;
@@ -5820,37 +5918,37 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
5820
5918
  }
5821
5919
  class TransformConstraintData {
5822
5920
  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.');
5921
+ __publicField(this, "name");
5922
+ __publicField(this, "order", 0);
5923
+ __publicField(this, "bones", new Array());
5924
+ __publicField(this, "target");
5925
+ __publicField(this, "rotateMix", 0);
5926
+ __publicField(this, "translateMix", 0);
5927
+ __publicField(this, "scaleMix", 0);
5928
+ __publicField(this, "shearMix", 0);
5929
+ __publicField(this, "offsetRotation", 0);
5930
+ __publicField(this, "offsetX", 0);
5931
+ __publicField(this, "offsetY", 0);
5932
+ __publicField(this, "offsetScaleX", 0);
5933
+ __publicField(this, "offsetScaleY", 0);
5934
+ __publicField(this, "offsetShearY", 0);
5935
+ __publicField(this, "relative", false);
5936
+ __publicField(this, "local", false);
5937
+ if (name == null) throw new Error("name cannot be null.");
5840
5938
  this.name = name;
5841
5939
  }
5842
5940
  }
5843
5941
  class SkeletonJson {
5844
5942
  constructor(attachmentLoader) {
5845
- __publicField(this, 'attachmentLoader');
5846
- __publicField(this, 'scale', 1);
5847
- __publicField(this, 'linkedMeshes', new Array());
5943
+ __publicField(this, "attachmentLoader");
5944
+ __publicField(this, "scale", 1);
5945
+ __publicField(this, "linkedMeshes", new Array());
5848
5946
  this.attachmentLoader = attachmentLoader;
5849
5947
  }
5850
5948
  readSkeletonData(json) {
5851
5949
  let scale = this.scale;
5852
5950
  let skeletonData = new SkeletonData();
5853
- let root = typeof json === 'string' ? JSON.parse(json) : json;
5951
+ let root = typeof json === "string" ? JSON.parse(json) : json;
5854
5952
  let skeletonMap = root.skeleton;
5855
5953
  if (skeletonMap != null) {
5856
5954
  skeletonData.hash = skeletonMap.hash;
@@ -5864,21 +5962,21 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
5864
5962
  for (let i = 0; i < root.bones.length; i++) {
5865
5963
  let boneMap = root.bones[i];
5866
5964
  let parent = null;
5867
- let parentName = this.getValue(boneMap, 'parent', null);
5965
+ let parentName = this.getValue(boneMap, "parent", null);
5868
5966
  if (parentName != null) {
5869
5967
  parent = skeletonData.findBone(parentName);
5870
- if (parent == null) throw new Error('Parent bone not found: ' + parentName);
5968
+ if (parent == null) throw new Error("Parent bone not found: " + parentName);
5871
5969
  }
5872
5970
  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'));
5971
+ data.length = this.getValue(boneMap, "length", 0) * scale;
5972
+ data.x = this.getValue(boneMap, "x", 0) * scale;
5973
+ data.y = this.getValue(boneMap, "y", 0) * scale;
5974
+ data.rotation = this.getValue(boneMap, "rotation", 0);
5975
+ data.scaleX = this.getValue(boneMap, "scaleX", 1);
5976
+ data.scaleY = this.getValue(boneMap, "scaleY", 1);
5977
+ data.shearX = this.getValue(boneMap, "shearX", 0);
5978
+ data.shearY = this.getValue(boneMap, "shearY", 0);
5979
+ data.transformMode = SkeletonJson.transformModeFromString(this.getValue(boneMap, "transform", "normal"));
5882
5980
  skeletonData.bones.push(data);
5883
5981
  }
5884
5982
  }
@@ -5888,17 +5986,17 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
5888
5986
  let slotName = slotMap.name;
5889
5987
  let boneName = slotMap.bone;
5890
5988
  let boneData = skeletonData.findBone(boneName);
5891
- if (boneData == null) throw new Error('Slot bone not found: ' + boneName);
5989
+ if (boneData == null) throw new Error("Slot bone not found: " + boneName);
5892
5990
  let data = new SlotData(skeletonData.slots.length, slotName, boneData);
5893
- let color = this.getValue(slotMap, 'color', null);
5991
+ let color = this.getValue(slotMap, "color", null);
5894
5992
  if (color != null) data.color.setFromString(color);
5895
- let dark = this.getValue(slotMap, 'dark', null);
5993
+ let dark = this.getValue(slotMap, "dark", null);
5896
5994
  if (dark != null) {
5897
5995
  data.darkColor = new Color(1, 1, 1, 1);
5898
5996
  data.darkColor.setFromString(dark);
5899
5997
  }
5900
- data.attachmentName = this.getValue(slotMap, 'attachment', null);
5901
- data.blendMode = SkeletonJson.blendModeFromString(this.getValue(slotMap, 'blend', 'normal'));
5998
+ data.attachmentName = this.getValue(slotMap, "attachment", null);
5999
+ data.blendMode = SkeletonJson.blendModeFromString(this.getValue(slotMap, "blend", "normal"));
5902
6000
  skeletonData.slots.push(data);
5903
6001
  }
5904
6002
  }
@@ -5906,18 +6004,18 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
5906
6004
  for (let i = 0; i < root.ik.length; i++) {
5907
6005
  let constraintMap = root.ik[i];
5908
6006
  let data = new IkConstraintData(constraintMap.name);
5909
- data.order = this.getValue(constraintMap, 'order', 0);
6007
+ data.order = this.getValue(constraintMap, "order", 0);
5910
6008
  for (let j = 0; j < constraintMap.bones.length; j++) {
5911
6009
  let boneName = constraintMap.bones[j];
5912
6010
  let bone = skeletonData.findBone(boneName);
5913
- if (bone == null) throw new Error('IK bone not found: ' + boneName);
6011
+ if (bone == null) throw new Error("IK bone not found: " + boneName);
5914
6012
  data.bones.push(bone);
5915
6013
  }
5916
6014
  let targetName = constraintMap.target;
5917
6015
  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);
6016
+ if (data.target == null) throw new Error("IK target bone not found: " + targetName);
6017
+ data.bendDirection = this.getValue(constraintMap, "bendPositive", true) ? 1 : -1;
6018
+ data.mix = this.getValue(constraintMap, "mix", 1);
5921
6019
  skeletonData.ikConstraints.push(data);
5922
6020
  }
5923
6021
  }
@@ -5925,28 +6023,28 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
5925
6023
  for (let i = 0; i < root.transform.length; i++) {
5926
6024
  let constraintMap = root.transform[i];
5927
6025
  let data = new TransformConstraintData(constraintMap.name);
5928
- data.order = this.getValue(constraintMap, 'order', 0);
6026
+ data.order = this.getValue(constraintMap, "order", 0);
5929
6027
  for (let j = 0; j < constraintMap.bones.length; j++) {
5930
6028
  let boneName = constraintMap.bones[j];
5931
6029
  let bone = skeletonData.findBone(boneName);
5932
- if (bone == null) throw new Error('Transform constraint bone not found: ' + boneName);
6030
+ if (bone == null) throw new Error("Transform constraint bone not found: " + boneName);
5933
6031
  data.bones.push(bone);
5934
6032
  }
5935
6033
  let targetName = constraintMap.target;
5936
6034
  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);
6035
+ if (data.target == null) throw new Error("Transform constraint target bone not found: " + targetName);
6036
+ data.local = this.getValue(constraintMap, "local", false);
6037
+ data.relative = this.getValue(constraintMap, "relative", false);
6038
+ data.offsetRotation = this.getValue(constraintMap, "rotation", 0);
6039
+ data.offsetX = this.getValue(constraintMap, "x", 0) * scale;
6040
+ data.offsetY = this.getValue(constraintMap, "y", 0) * scale;
6041
+ data.offsetScaleX = this.getValue(constraintMap, "scaleX", 0);
6042
+ data.offsetScaleY = this.getValue(constraintMap, "scaleY", 0);
6043
+ data.offsetShearY = this.getValue(constraintMap, "shearY", 0);
6044
+ data.rotateMix = this.getValue(constraintMap, "rotateMix", 1);
6045
+ data.translateMix = this.getValue(constraintMap, "translateMix", 1);
6046
+ data.scaleMix = this.getValue(constraintMap, "scaleMix", 1);
6047
+ data.shearMix = this.getValue(constraintMap, "shearMix", 1);
5950
6048
  skeletonData.transformConstraints.push(data);
5951
6049
  }
5952
6050
  }
@@ -5954,26 +6052,26 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
5954
6052
  for (let i = 0; i < root.path.length; i++) {
5955
6053
  let constraintMap = root.path[i];
5956
6054
  let data = new PathConstraintData(constraintMap.name);
5957
- data.order = this.getValue(constraintMap, 'order', 0);
6055
+ data.order = this.getValue(constraintMap, "order", 0);
5958
6056
  for (let j = 0; j < constraintMap.bones.length; j++) {
5959
6057
  let boneName = constraintMap.bones[j];
5960
6058
  let bone = skeletonData.findBone(boneName);
5961
- if (bone == null) throw new Error('Transform constraint bone not found: ' + boneName);
6059
+ if (bone == null) throw new Error("Transform constraint bone not found: " + boneName);
5962
6060
  data.bones.push(bone);
5963
6061
  }
5964
6062
  let targetName = constraintMap.target;
5965
6063
  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);
6064
+ if (data.target == null) throw new Error("Path target slot not found: " + targetName);
6065
+ data.positionMode = SkeletonJson.positionModeFromString(this.getValue(constraintMap, "positionMode", "percent"));
6066
+ data.spacingMode = SkeletonJson.spacingModeFromString(this.getValue(constraintMap, "spacingMode", "length"));
6067
+ data.rotateMode = SkeletonJson.rotateModeFromString(this.getValue(constraintMap, "rotateMode", "tangent"));
6068
+ data.offsetRotation = this.getValue(constraintMap, "rotation", 0);
6069
+ data.position = this.getValue(constraintMap, "position", 0);
5972
6070
  if (data.positionMode == PositionMode.Fixed) data.position *= scale;
5973
- data.spacing = this.getValue(constraintMap, 'spacing', 0);
6071
+ data.spacing = this.getValue(constraintMap, "spacing", 0);
5974
6072
  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);
6073
+ data.rotateMix = this.getValue(constraintMap, "rotateMix", 1);
6074
+ data.translateMix = this.getValue(constraintMap, "translateMix", 1);
5977
6075
  skeletonData.pathConstraints.push(data);
5978
6076
  }
5979
6077
  }
@@ -5983,7 +6081,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
5983
6081
  let skin = new Skin(skinName);
5984
6082
  for (let slotName in skinMap) {
5985
6083
  let slotIndex = skeletonData.findSlotIndex(slotName);
5986
- if (slotIndex == -1) throw new Error('Slot not found: ' + slotName);
6084
+ if (slotIndex == -1) throw new Error("Slot not found: " + slotName);
5987
6085
  let slotMap = skinMap[slotName];
5988
6086
  for (let entryName in slotMap) {
5989
6087
  let attachment = this.readAttachment(slotMap[entryName], skin, slotIndex, entryName, skeletonData);
@@ -5991,15 +6089,15 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
5991
6089
  }
5992
6090
  }
5993
6091
  skeletonData.skins.push(skin);
5994
- if (skin.name == 'default') skeletonData.defaultSkin = skin;
6092
+ if (skin.name == "default") skeletonData.defaultSkin = skin;
5995
6093
  }
5996
6094
  }
5997
6095
  for (let i = 0, n = this.linkedMeshes.length; i < n; i++) {
5998
6096
  let linkedMesh = this.linkedMeshes[i];
5999
6097
  let skin = linkedMesh.skin == null ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);
6000
- if (skin == null) throw new Error('Skin not found: ' + linkedMesh.skin);
6098
+ if (skin == null) throw new Error("Skin not found: " + linkedMesh.skin);
6001
6099
  let parent = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);
6002
- if (parent == null) throw new Error('Parent mesh not found: ' + linkedMesh.parent);
6100
+ if (parent == null) throw new Error("Parent mesh not found: " + linkedMesh.parent);
6003
6101
  linkedMesh.mesh.setParentMesh(parent);
6004
6102
  linkedMesh.mesh.updateUVs();
6005
6103
  }
@@ -6008,9 +6106,9 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6008
6106
  for (let eventName in root.events) {
6009
6107
  let eventMap = root.events[eventName];
6010
6108
  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', '');
6109
+ data.intValue = this.getValue(eventMap, "int", 0);
6110
+ data.floatValue = this.getValue(eventMap, "float", 0);
6111
+ data.stringValue = this.getValue(eventMap, "string", "");
6014
6112
  skeletonData.events.push(data);
6015
6113
  }
6016
6114
  }
@@ -6024,49 +6122,49 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6024
6122
  }
6025
6123
  readAttachment(map, skin, slotIndex, name, skeletonData) {
6026
6124
  let scale = this.scale;
6027
- name = this.getValue(map, 'name', name);
6028
- let type = this.getValue(map, 'type', 'region');
6125
+ name = this.getValue(map, "name", name);
6126
+ let type = this.getValue(map, "type", "region");
6029
6127
  switch (type) {
6030
- case 'region':
6128
+ case "region":
6031
6129
  {
6032
- let path2 = this.getValue(map, 'path', name);
6130
+ let path2 = this.getValue(map, "path", name);
6033
6131
  let region = this.attachmentLoader.newRegionAttachment(skin, name, path2);
6034
6132
  if (region == null) return null;
6035
6133
  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);
6134
+ region.x = this.getValue(map, "x", 0) * scale;
6135
+ region.y = this.getValue(map, "y", 0) * scale;
6136
+ region.scaleX = this.getValue(map, "scaleX", 1);
6137
+ region.scaleY = this.getValue(map, "scaleY", 1);
6138
+ region.rotation = this.getValue(map, "rotation", 0);
6041
6139
  region.width = map.width * scale;
6042
6140
  region.height = map.height * scale;
6043
- let color = this.getValue(map, 'color', null);
6141
+ let color = this.getValue(map, "color", null);
6044
6142
  if (color != null) region.color.setFromString(color);
6045
6143
  region.updateOffset();
6046
6144
  return region;
6047
6145
  }
6048
- case 'boundingbox':
6146
+ case "boundingbox":
6049
6147
  {
6050
6148
  let box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);
6051
6149
  if (box == null) return null;
6052
6150
  this.readVertices(map, box, map.vertexCount << 1);
6053
- let color = this.getValue(map, 'color', null);
6151
+ let color = this.getValue(map, "color", null);
6054
6152
  if (color != null) box.color.setFromString(color);
6055
6153
  return box;
6056
6154
  }
6057
- case 'mesh':
6058
- case 'linkedmesh':
6155
+ case "mesh":
6156
+ case "linkedmesh":
6059
6157
  {
6060
- let path2 = this.getValue(map, 'path', name);
6158
+ let path2 = this.getValue(map, "path", name);
6061
6159
  let mesh = this.attachmentLoader.newMeshAttachment(skin, name, path2);
6062
6160
  if (mesh == null) return null;
6063
6161
  mesh.path = path2;
6064
- let color = this.getValue(map, 'color', null);
6162
+ let color = this.getValue(map, "color", null);
6065
6163
  if (color != null) mesh.color.setFromString(color);
6066
- let parent = this.getValue(map, 'parent', null);
6164
+ let parent = this.getValue(map, "parent", null);
6067
6165
  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));
6166
+ mesh.inheritDeform = this.getValue(map, "deform", true);
6167
+ this.linkedMeshes.push(new LinkedMesh(mesh, this.getValue(map, "skin", null), slotIndex, parent));
6070
6168
  return mesh;
6071
6169
  }
6072
6170
  let uvs = map.uvs;
@@ -6074,48 +6172,48 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6074
6172
  mesh.triangles = map.triangles;
6075
6173
  mesh.regionUVs = uvs;
6076
6174
  mesh.updateUVs();
6077
- mesh.hullLength = this.getValue(map, 'hull', 0) * 2;
6175
+ mesh.hullLength = this.getValue(map, "hull", 0) * 2;
6078
6176
  return mesh;
6079
6177
  }
6080
- case 'path':
6178
+ case "path":
6081
6179
  {
6082
6180
  let path2 = this.attachmentLoader.newPathAttachment(skin, name);
6083
6181
  if (path2 == null) return null;
6084
- path2.closed = this.getValue(map, 'closed', false);
6085
- path2.constantSpeed = this.getValue(map, 'constantSpeed', true);
6182
+ path2.closed = this.getValue(map, "closed", false);
6183
+ path2.constantSpeed = this.getValue(map, "constantSpeed", true);
6086
6184
  let vertexCount = map.vertexCount;
6087
6185
  this.readVertices(map, path2, vertexCount << 1);
6088
6186
  let lengths = Utils.newArray(vertexCount / 3, 0);
6089
6187
  for (let i = 0; i < map.lengths.length; i++) lengths[i] = map.lengths[i] * scale;
6090
6188
  path2.lengths = lengths;
6091
- let color = this.getValue(map, 'color', null);
6189
+ let color = this.getValue(map, "color", null);
6092
6190
  if (color != null) path2.color.setFromString(color);
6093
6191
  return path2;
6094
6192
  }
6095
- case 'point':
6193
+ case "point":
6096
6194
  {
6097
6195
  let point = this.attachmentLoader.newPointAttachment(skin, name);
6098
6196
  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);
6197
+ point.x = this.getValue(map, "x", 0) * scale;
6198
+ point.y = this.getValue(map, "y", 0) * scale;
6199
+ point.rotation = this.getValue(map, "rotation", 0);
6200
+ let color = this.getValue(map, "color", null);
6103
6201
  if (color != null) point.color.setFromString(color);
6104
6202
  return point;
6105
6203
  }
6106
- case 'clipping':
6204
+ case "clipping":
6107
6205
  {
6108
6206
  let clip = this.attachmentLoader.newClippingAttachment(skin, name);
6109
6207
  if (clip == null) return null;
6110
- let end = this.getValue(map, 'end', null);
6208
+ let end = this.getValue(map, "end", null);
6111
6209
  if (end != null) {
6112
6210
  let slot = skeletonData.findSlot(end);
6113
- if (slot == null) throw new Error('Clipping end slot not found: ' + end);
6211
+ if (slot == null) throw new Error("Clipping end slot not found: " + end);
6114
6212
  clip.endSlot = slot;
6115
6213
  }
6116
6214
  let vertexCount = map.vertexCount;
6117
6215
  this.readVertices(map, clip, vertexCount << 1);
6118
- let color = this.getValue(map, 'color', null);
6216
+ let color = this.getValue(map, "color", null);
6119
6217
  if (color != null) clip.color.setFromString(color);
6120
6218
  return clip;
6121
6219
  }
@@ -6157,10 +6255,10 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6157
6255
  for (let slotName in map.slots) {
6158
6256
  let slotMap = map.slots[slotName];
6159
6257
  let slotIndex = skeletonData.findSlotIndex(slotName);
6160
- if (slotIndex == -1) throw new Error('Slot not found: ' + slotName);
6258
+ if (slotIndex == -1) throw new Error("Slot not found: " + slotName);
6161
6259
  for (let timelineName in slotMap) {
6162
6260
  let timelineMap = slotMap[timelineName];
6163
- if (timelineName == 'attachment') {
6261
+ if (timelineName == "attachment") {
6164
6262
  let timeline = new AttachmentTimeline(timelineMap.length);
6165
6263
  timeline.slotIndex = slotIndex;
6166
6264
  let frameIndex = 0;
@@ -6170,7 +6268,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6170
6268
  }
6171
6269
  timelines.push(timeline);
6172
6270
  duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);
6173
- } else if (timelineName == 'color') {
6271
+ } else if (timelineName == "color") {
6174
6272
  let timeline = new ColorTimeline(timelineMap.length);
6175
6273
  timeline.slotIndex = slotIndex;
6176
6274
  let frameIndex = 0;
@@ -6184,7 +6282,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6184
6282
  }
6185
6283
  timelines.push(timeline);
6186
6284
  duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * ColorTimeline.ENTRIES]);
6187
- } else if (timelineName == 'twoColor') {
6285
+ } else if (timelineName == "twoColor") {
6188
6286
  let timeline = new TwoColorTimeline(timelineMap.length);
6189
6287
  timeline.slotIndex = slotIndex;
6190
6288
  let frameIndex = 0;
@@ -6200,7 +6298,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6200
6298
  }
6201
6299
  timelines.push(timeline);
6202
6300
  duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * TwoColorTimeline.ENTRIES]);
6203
- } else throw new Error('Invalid timeline type for a slot: ' + timelineName + ' (' + slotName + ')');
6301
+ } else throw new Error("Invalid timeline type for a slot: " + timelineName + " (" + slotName + ")");
6204
6302
  }
6205
6303
  }
6206
6304
  }
@@ -6208,10 +6306,10 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6208
6306
  for (let boneName in map.bones) {
6209
6307
  let boneMap = map.bones[boneName];
6210
6308
  let boneIndex = skeletonData.findBoneIndex(boneName);
6211
- if (boneIndex == -1) throw new Error('Bone not found: ' + boneName);
6309
+ if (boneIndex == -1) throw new Error("Bone not found: " + boneName);
6212
6310
  for (let timelineName in boneMap) {
6213
6311
  let timelineMap = boneMap[timelineName];
6214
- if (timelineName === 'rotate') {
6312
+ if (timelineName === "rotate") {
6215
6313
  let timeline = new RotateTimeline(timelineMap.length);
6216
6314
  timeline.boneIndex = boneIndex;
6217
6315
  let frameIndex = 0;
@@ -6223,10 +6321,10 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6223
6321
  }
6224
6322
  timelines.push(timeline);
6225
6323
  duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * RotateTimeline.ENTRIES]);
6226
- } else if (timelineName === 'translate' || timelineName === 'scale' || timelineName === 'shear') {
6324
+ } else if (timelineName === "translate" || timelineName === "scale" || timelineName === "shear") {
6227
6325
  let timeline = null;
6228
6326
  let timelineScale = 1;
6229
- if (timelineName === 'scale') timeline = new ScaleTimeline(timelineMap.length);else if (timelineName === 'shear') timeline = new ShearTimeline(timelineMap.length);else {
6327
+ if (timelineName === "scale") timeline = new ScaleTimeline(timelineMap.length);else if (timelineName === "shear") timeline = new ShearTimeline(timelineMap.length);else {
6230
6328
  timeline = new TranslateTimeline(timelineMap.length);
6231
6329
  timelineScale = scale;
6232
6330
  }
@@ -6234,15 +6332,15 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6234
6332
  let frameIndex = 0;
6235
6333
  for (let i = 0; i < timelineMap.length; i++) {
6236
6334
  let valueMap = timelineMap[i];
6237
- let x = this.getValue(valueMap, 'x', 0),
6238
- y = this.getValue(valueMap, 'y', 0);
6335
+ let x = this.getValue(valueMap, "x", 0),
6336
+ y = this.getValue(valueMap, "y", 0);
6239
6337
  timeline.setFrame(frameIndex, valueMap.time, x * timelineScale, y * timelineScale);
6240
6338
  this.readCurve(valueMap, timeline, frameIndex);
6241
6339
  frameIndex++;
6242
6340
  }
6243
6341
  timelines.push(timeline);
6244
6342
  duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * TranslateTimeline.ENTRIES]);
6245
- } else throw new Error('Invalid timeline type for a bone: ' + timelineName + ' (' + boneName + ')');
6343
+ } else throw new Error("Invalid timeline type for a bone: " + timelineName + " (" + boneName + ")");
6246
6344
  }
6247
6345
  }
6248
6346
  }
@@ -6255,7 +6353,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6255
6353
  let frameIndex = 0;
6256
6354
  for (let i = 0; i < constraintMap.length; i++) {
6257
6355
  let valueMap = constraintMap[i];
6258
- timeline.setFrame(frameIndex, valueMap.time, this.getValue(valueMap, 'mix', 1), this.getValue(valueMap, 'bendPositive', true) ? 1 : -1);
6356
+ timeline.setFrame(frameIndex, valueMap.time, this.getValue(valueMap, "mix", 1), this.getValue(valueMap, "bendPositive", true) ? 1 : -1);
6259
6357
  this.readCurve(valueMap, timeline, frameIndex);
6260
6358
  frameIndex++;
6261
6359
  }
@@ -6272,7 +6370,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6272
6370
  let frameIndex = 0;
6273
6371
  for (let i = 0; i < constraintMap.length; i++) {
6274
6372
  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));
6373
+ 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
6374
  this.readCurve(valueMap, timeline, frameIndex);
6277
6375
  frameIndex++;
6278
6376
  }
@@ -6284,14 +6382,14 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6284
6382
  for (let constraintName in map.paths) {
6285
6383
  let constraintMap = map.paths[constraintName];
6286
6384
  let index = skeletonData.findPathConstraintIndex(constraintName);
6287
- if (index == -1) throw new Error('Path constraint not found: ' + constraintName);
6385
+ if (index == -1) throw new Error("Path constraint not found: " + constraintName);
6288
6386
  let data = skeletonData.pathConstraints[index];
6289
6387
  for (let timelineName in constraintMap) {
6290
6388
  let timelineMap = constraintMap[timelineName];
6291
- if (timelineName === 'position' || timelineName === 'spacing') {
6389
+ if (timelineName === "position" || timelineName === "spacing") {
6292
6390
  let timeline = null;
6293
6391
  let timelineScale = 1;
6294
- if (timelineName === 'spacing') {
6392
+ if (timelineName === "spacing") {
6295
6393
  timeline = new PathConstraintSpacingTimeline(timelineMap.length);
6296
6394
  if (data.spacingMode == SpacingMode.Length || data.spacingMode == SpacingMode.Fixed) timelineScale = scale;
6297
6395
  } else {
@@ -6308,13 +6406,13 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6308
6406
  }
6309
6407
  timelines.push(timeline);
6310
6408
  duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * PathConstraintPositionTimeline.ENTRIES]);
6311
- } else if (timelineName === 'mix') {
6409
+ } else if (timelineName === "mix") {
6312
6410
  let timeline = new PathConstraintMixTimeline(timelineMap.length);
6313
6411
  timeline.pathConstraintIndex = index;
6314
6412
  let frameIndex = 0;
6315
6413
  for (let i = 0; i < timelineMap.length; i++) {
6316
6414
  let valueMap = timelineMap[i];
6317
- timeline.setFrame(frameIndex, valueMap.time, this.getValue(valueMap, 'rotateMix', 1), this.getValue(valueMap, 'translateMix', 1));
6415
+ timeline.setFrame(frameIndex, valueMap.time, this.getValue(valueMap, "rotateMix", 1), this.getValue(valueMap, "translateMix", 1));
6318
6416
  this.readCurve(valueMap, timeline, frameIndex);
6319
6417
  frameIndex++;
6320
6418
  }
@@ -6328,15 +6426,15 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6328
6426
  for (let deformName in map.deform) {
6329
6427
  let deformMap = map.deform[deformName];
6330
6428
  let skin = skeletonData.findSkin(deformName);
6331
- if (skin == null) throw new Error('Skin not found: ' + deformName);
6429
+ if (skin == null) throw new Error("Skin not found: " + deformName);
6332
6430
  for (let slotName in deformMap) {
6333
6431
  let slotMap = deformMap[slotName];
6334
6432
  let slotIndex = skeletonData.findSlotIndex(slotName);
6335
- if (slotIndex == -1) throw new Error('Slot not found: ' + slotMap.name);
6433
+ if (slotIndex == -1) throw new Error("Slot not found: " + slotMap.name);
6336
6434
  for (let timelineName in slotMap) {
6337
6435
  let timelineMap = slotMap[timelineName];
6338
6436
  let attachment = skin.getAttachment(slotIndex, timelineName);
6339
- if (attachment == null) throw new Error('Deform attachment not found: ' + timelineMap.name);
6437
+ if (attachment == null) throw new Error("Deform attachment not found: " + timelineMap.name);
6340
6438
  let weighted = attachment.bones != null;
6341
6439
  let vertices = attachment.vertices;
6342
6440
  let deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;
@@ -6347,10 +6445,10 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6347
6445
  for (let j = 0; j < timelineMap.length; j++) {
6348
6446
  let valueMap = timelineMap[j];
6349
6447
  let deform;
6350
- let verticesValue = this.getValue(valueMap, 'vertices', null);
6448
+ let verticesValue = this.getValue(valueMap, "vertices", null);
6351
6449
  if (verticesValue == null) deform = weighted ? Utils.newFloatArray(deformLength) : vertices;else {
6352
6450
  deform = Utils.newFloatArray(deformLength);
6353
- let start = this.getValue(valueMap, 'offset', 0);
6451
+ let start = this.getValue(valueMap, "offset", 0);
6354
6452
  Utils.arrayCopy(verticesValue, 0, deform, start, verticesValue.length);
6355
6453
  if (scale != 1) {
6356
6454
  for (let i = start, n = i + verticesValue.length; i < n; i++) deform[i] *= scale;
@@ -6378,7 +6476,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6378
6476
  for (let j = 0; j < drawOrderNode.length; j++) {
6379
6477
  let drawOrderMap = drawOrderNode[j];
6380
6478
  let drawOrder = null;
6381
- let offsets = this.getValue(drawOrderMap, 'offsets', null);
6479
+ let offsets = this.getValue(drawOrderMap, "offsets", null);
6382
6480
  if (offsets != null) {
6383
6481
  drawOrder = Utils.newArray(slotCount, -1);
6384
6482
  let unchanged = Utils.newArray(slotCount - offsets.length, 0);
@@ -6387,7 +6485,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6387
6485
  for (let i = 0; i < offsets.length; i++) {
6388
6486
  let offsetMap = offsets[i];
6389
6487
  let slotIndex = skeletonData.findSlotIndex(offsetMap.slot);
6390
- if (slotIndex == -1) throw new Error('Slot not found: ' + offsetMap.slot);
6488
+ if (slotIndex == -1) throw new Error("Slot not found: " + offsetMap.slot);
6391
6489
  while (originalIndex != slotIndex) unchanged[unchangedIndex++] = originalIndex++;
6392
6490
  drawOrder[originalIndex + offsetMap.offset] = originalIndex++;
6393
6491
  }
@@ -6405,24 +6503,24 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6405
6503
  for (let i = 0; i < map.events.length; i++) {
6406
6504
  let eventMap = map.events[i];
6407
6505
  let eventData = skeletonData.findEvent(eventMap.name);
6408
- if (eventData == null) throw new Error('Event not found: ' + eventMap.name);
6506
+ if (eventData == null) throw new Error("Event not found: " + eventMap.name);
6409
6507
  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);
6508
+ event.intValue = this.getValue(eventMap, "int", eventData.intValue);
6509
+ event.floatValue = this.getValue(eventMap, "float", eventData.floatValue);
6510
+ event.stringValue = this.getValue(eventMap, "string", eventData.stringValue);
6413
6511
  timeline.setFrame(frameIndex++, event);
6414
6512
  }
6415
6513
  timelines.push(timeline);
6416
6514
  duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);
6417
6515
  }
6418
6516
  if (isNaN(duration)) {
6419
- throw new Error('Error while parsing animation, duration is NaN');
6517
+ throw new Error("Error while parsing animation, duration is NaN");
6420
6518
  }
6421
6519
  skeletonData.animations.push(new Animation(name, timelines, duration));
6422
6520
  }
6423
6521
  readCurve(map, timeline, frameIndex) {
6424
6522
  if (!map.curve) return;
6425
- if (map.curve === 'stepped') timeline.setStepped(frameIndex);else if (Object.prototype.toString.call(map.curve) === '[object Array]') {
6523
+ if (map.curve === "stepped") timeline.setStepped(frameIndex);else if (Object.prototype.toString.call(map.curve) === "[object Array]") {
6426
6524
  let curve = map.curve;
6427
6525
  timeline.setCurve(frameIndex, curve[0], curve[1], curve[2], curve[3]);
6428
6526
  }
@@ -6432,48 +6530,48 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6432
6530
  }
6433
6531
  static blendModeFromString(str) {
6434
6532
  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;
6533
+ if (str == "normal") return BlendMode.Normal;
6534
+ if (str == "additive") return BlendMode.Additive;
6535
+ if (str == "multiply") return BlendMode.Multiply;
6536
+ if (str == "screen") return BlendMode.Screen;
6439
6537
  throw new Error(`Unknown blend mode: ${str}`);
6440
6538
  }
6441
6539
  static positionModeFromString(str) {
6442
6540
  str = str.toLowerCase();
6443
- if (str == 'fixed') return PositionMode.Fixed;
6444
- if (str == 'percent') return PositionMode.Percent;
6541
+ if (str == "fixed") return PositionMode.Fixed;
6542
+ if (str == "percent") return PositionMode.Percent;
6445
6543
  throw new Error(`Unknown position mode: ${str}`);
6446
6544
  }
6447
6545
  static spacingModeFromString(str) {
6448
6546
  str = str.toLowerCase();
6449
- if (str == 'length') return SpacingMode.Length;
6450
- if (str == 'fixed') return SpacingMode.Fixed;
6451
- if (str == 'percent') return SpacingMode.Percent;
6547
+ if (str == "length") return SpacingMode.Length;
6548
+ if (str == "fixed") return SpacingMode.Fixed;
6549
+ if (str == "percent") return SpacingMode.Percent;
6452
6550
  throw new Error(`Unknown position mode: ${str}`);
6453
6551
  }
6454
6552
  static rotateModeFromString(str) {
6455
6553
  str = str.toLowerCase();
6456
- if (str == 'tangent') return RotateMode.Tangent;
6457
- if (str == 'chain') return RotateMode.Chain;
6458
- if (str == 'chainscale') return RotateMode.ChainScale;
6554
+ if (str == "tangent") return RotateMode.Tangent;
6555
+ if (str == "chain") return RotateMode.Chain;
6556
+ if (str == "chainscale") return RotateMode.ChainScale;
6459
6557
  throw new Error(`Unknown rotate mode: ${str}`);
6460
6558
  }
6461
6559
  static transformModeFromString(str) {
6462
6560
  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;
6561
+ if (str == "normal") return TransformMode.Normal;
6562
+ if (str == "onlytranslation") return TransformMode.OnlyTranslation;
6563
+ if (str == "norotationorreflection") return TransformMode.NoRotationOrReflection;
6564
+ if (str == "noscale") return TransformMode.NoScale;
6565
+ if (str == "noscaleorreflection") return TransformMode.NoScaleOrReflection;
6468
6566
  throw new Error(`Unknown transform mode: ${str}`);
6469
6567
  }
6470
6568
  }
6471
6569
  class LinkedMesh {
6472
6570
  constructor(mesh, skin, slotIndex, parent) {
6473
- __publicField(this, 'parent');
6474
- __publicField(this, 'skin');
6475
- __publicField(this, 'slotIndex');
6476
- __publicField(this, 'mesh');
6571
+ __publicField(this, "parent");
6572
+ __publicField(this, "skin");
6573
+ __publicField(this, "slotIndex");
6574
+ __publicField(this, "mesh");
6477
6575
  this.mesh = mesh;
6478
6576
  this.skin = skin;
6479
6577
  this.slotIndex = slotIndex;
@@ -6491,10 +6589,10 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6491
6589
  })();
6492
6590
  class Assets {
6493
6591
  constructor(clientId) {
6494
- __publicField(this, 'clientId');
6495
- __publicField(this, 'toLoad', new Array());
6496
- __publicField(this, 'assets', {});
6497
- __publicField(this, 'textureLoader');
6592
+ __publicField(this, "clientId");
6593
+ __publicField(this, "toLoad", new Array());
6594
+ __publicField(this, "assets", {});
6595
+ __publicField(this, "textureLoader");
6498
6596
  this.clientId = clientId;
6499
6597
  }
6500
6598
  loaded() {
@@ -6504,12 +6602,12 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6504
6602
  }
6505
6603
  }
6506
6604
  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', {});
6605
+ constructor(pathPrefix = "") {
6606
+ __publicField(this, "pathPrefix");
6607
+ __publicField(this, "clientAssets", {});
6608
+ __publicField(this, "queuedAssets", {});
6609
+ __publicField(this, "rawAssets", {});
6610
+ __publicField(this, "errors", {});
6513
6611
  this.pathPrefix = pathPrefix;
6514
6612
  }
6515
6613
  queueAsset(clientId, textureLoader, path2) {
@@ -6540,7 +6638,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6540
6638
  }
6541
6639
  }
6542
6640
  };
6543
- request.open('GET', path2, true);
6641
+ request.open("GET", path2, true);
6544
6642
  request.send();
6545
6643
  }
6546
6644
  loadJson(clientId, path2) {
@@ -6556,7 +6654,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6556
6654
  }
6557
6655
  }
6558
6656
  };
6559
- request.open('GET', path2, true);
6657
+ request.open("GET", path2, true);
6560
6658
  request.send();
6561
6659
  }
6562
6660
  loadTexture(clientId, textureLoader, path2) {
@@ -6564,7 +6662,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6564
6662
  if (!this.queueAsset(clientId, textureLoader, path2)) return;
6565
6663
  let img = new Image();
6566
6664
  img.src = path2;
6567
- img.crossOrigin = 'anonymous';
6665
+ img.crossOrigin = "anonymous";
6568
6666
  img.onload = ev => {
6569
6667
  this.rawAssets[path2] = img;
6570
6668
  };
@@ -6609,8 +6707,8 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6609
6707
  }
6610
6708
  class JitterEffect {
6611
6709
  constructor(jitterX, jitterY) {
6612
- __publicField(this, 'jitterX', 0);
6613
- __publicField(this, 'jitterY', 0);
6710
+ __publicField(this, "jitterX", 0);
6711
+ __publicField(this, "jitterY", 0);
6614
6712
  this.jitterX = jitterX;
6615
6713
  this.jitterY = jitterY;
6616
6714
  }
@@ -6623,12 +6721,12 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6623
6721
  }
6624
6722
  const _SwirlEffect = class _SwirlEffect {
6625
6723
  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);
6724
+ __publicField(this, "centerX", 0);
6725
+ __publicField(this, "centerY", 0);
6726
+ __publicField(this, "radius", 0);
6727
+ __publicField(this, "angle", 0);
6728
+ __publicField(this, "worldX", 0);
6729
+ __publicField(this, "worldY", 0);
6632
6730
  this.radius = radius;
6633
6731
  }
6634
6732
  begin(skeleton) {
@@ -6650,12 +6748,12 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6650
6748
  }
6651
6749
  end() {}
6652
6750
  };
6653
- __publicField(_SwirlEffect, 'interpolation', new PowOut(2));
6751
+ __publicField(_SwirlEffect, "interpolation", new PowOut(2));
6654
6752
  let SwirlEffect = _SwirlEffect;
6655
6753
  const _SpineTexture = class _SpineTexture extends Texture {
6656
6754
  constructor(image) {
6657
6755
  super(image.resource);
6658
- __publicField(this, 'texture');
6756
+ __publicField(this, "texture");
6659
6757
  this.texture = pixi_js.Texture.from(image);
6660
6758
  }
6661
6759
  static from(texture) {
@@ -6665,6 +6763,9 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6665
6763
  return new _SpineTexture(texture);
6666
6764
  }
6667
6765
  setFilters(minFilter, magFilter) {
6766
+ if (!this.texture || !this.texture.source || !this.texture.source.style) {
6767
+ return;
6768
+ }
6668
6769
  const style = this.texture.source.style;
6669
6770
  style.minFilter = _SpineTexture.toPixiTextureFilter(minFilter);
6670
6771
  style.magFilter = _SpineTexture.toPixiTextureFilter(magFilter);
@@ -6672,6 +6773,9 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6672
6773
  this.texture.source.updateMipmaps();
6673
6774
  }
6674
6775
  setWraps(uWrap, vWrap) {
6776
+ if (!this.texture || !this.texture.source || !this.texture.source.style) {
6777
+ return;
6778
+ }
6675
6779
  const style = this.texture.source.style;
6676
6780
  style.addressModeU = _SpineTexture.toPixiTextureWrap(uWrap);
6677
6781
  style.addressModeV = _SpineTexture.toPixiTextureWrap(vWrap);
@@ -6698,11 +6802,11 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6698
6802
  case TextureFilter.Nearest:
6699
6803
  case TextureFilter.MipMapNearestLinear:
6700
6804
  case TextureFilter.MipMapNearestNearest:
6701
- return 'nearest';
6805
+ return "nearest";
6702
6806
  case TextureFilter.Linear:
6703
6807
  case TextureFilter.MipMapLinearLinear:
6704
6808
  case TextureFilter.MipMapLinearNearest:
6705
- return 'linear';
6809
+ return "linear";
6706
6810
  default:
6707
6811
  throw new Error(`Unknown texture filter: ${String(filter)}`);
6708
6812
  }
@@ -6710,11 +6814,11 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6710
6814
  static toPixiTextureWrap(wrap) {
6711
6815
  switch (wrap) {
6712
6816
  case TextureWrap.ClampToEdge:
6713
- return 'clamp-to-edge';
6817
+ return "clamp-to-edge";
6714
6818
  case TextureWrap.MirroredRepeat:
6715
- return 'mirror-repeat';
6819
+ return "mirror-repeat";
6716
6820
  case TextureWrap.Repeat:
6717
- return 'repeat';
6821
+ return "repeat";
6718
6822
  default:
6719
6823
  throw new Error(`Unknown texture wrap: ${String(wrap)}`);
6720
6824
  }
@@ -6722,29 +6826,29 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6722
6826
  static toPixiBlending(blend) {
6723
6827
  switch (blend) {
6724
6828
  case BlendMode.Normal:
6725
- return 'normal';
6829
+ return "normal";
6726
6830
  case BlendMode.Additive:
6727
- return 'add';
6831
+ return "add";
6728
6832
  case BlendMode.Multiply:
6729
- return 'multiply';
6833
+ return "multiply";
6730
6834
  case BlendMode.Screen:
6731
- return 'screen';
6835
+ return "screen";
6732
6836
  default:
6733
6837
  throw new Error(`Unknown blendMode: ${String(blend)}`);
6734
6838
  }
6735
6839
  }
6736
6840
  };
6737
- __publicField(_SpineTexture, 'textureMap', new Map());
6841
+ __publicField(_SpineTexture, "textureMap", new Map());
6738
6842
  let SpineTexture = _SpineTexture;
6739
6843
  const spineTextureAtlasLoader = {
6740
6844
  extension: pixi_js.ExtensionType.Asset,
6741
6845
  resolver: {
6742
- test: value => pixi_js.checkExtension(value, '.atlas'),
6846
+ test: value => pixi_js.checkExtension(value, ".atlas"),
6743
6847
  parse: value => {
6744
6848
  var _a, _b, _c;
6745
- const split = value.split('.');
6849
+ const split = value.split(".");
6746
6850
  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'),
6851
+ 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
6852
  format: split[split.length - 2],
6749
6853
  src: value
6750
6854
  };
@@ -6754,10 +6858,10 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6754
6858
  extension: {
6755
6859
  type: pixi_js.ExtensionType.LoadParser,
6756
6860
  priority: pixi_js.LoaderParserPriority.Normal,
6757
- name: 'spineTextureAtlasLoader'
6861
+ name: "spineTextureAtlasLoader"
6758
6862
  },
6759
6863
  test(url) {
6760
- return pixi_js.checkExtension(url, '.atlas');
6864
+ return pixi_js.checkExtension(url, ".atlas");
6761
6865
  },
6762
6866
  load(url) {
6763
6867
  return __async(this, null, function* () {
@@ -6767,8 +6871,8 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6767
6871
  });
6768
6872
  },
6769
6873
  testParse(asset, options) {
6770
- const isExtensionRight = pixi_js.checkExtension(options.src, '.atlas');
6771
- const isString = typeof asset === 'string';
6874
+ const isExtensionRight = pixi_js.checkExtension(options.src, ".atlas");
6875
+ const isString = typeof asset === "string";
6772
6876
  return Promise.resolve(isExtensionRight && isString);
6773
6877
  },
6774
6878
  unload(atlas) {
@@ -6779,14 +6883,14 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6779
6883
  var _a;
6780
6884
  const metadata = options.data || {};
6781
6885
  let basePath = pixi_js.path.dirname(options.src);
6782
- if (basePath && basePath.lastIndexOf('/') !== basePath.length - 1) {
6783
- basePath += '/';
6886
+ if (basePath && basePath.lastIndexOf("/") !== basePath.length - 1) {
6887
+ basePath += "/";
6784
6888
  }
6785
6889
  const retval = new TextureAtlas(asset, path2 => {
6786
6890
  const data = SpineTexture.from(options.data.imageTexture.source);
6787
6891
  return data;
6788
6892
  });
6789
- if (metadata.images instanceof pixi_js.TextureSource || typeof metadata.images === 'string') {
6893
+ if (metadata.images instanceof pixi_js.TextureSource || typeof metadata.images === "string") {
6790
6894
  const pixiTexture = metadata.images;
6791
6895
  metadata.images = {};
6792
6896
  metadata.images[retval.pages[0].name] = pixiTexture;
@@ -6811,7 +6915,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6811
6915
  const assetsToLoadIn = {
6812
6916
  src: pixi_js.copySearchParams(url, options.src),
6813
6917
  data: __spreadProps(__spreadValues({}, metadata.imageMetadata), {
6814
- alphaMode: page.pma ? 'premultiplied-alpha' : 'premultiply-alpha-on-upload'
6918
+ alphaMode: page.pma ? "premultiplied-alpha" : "premultiply-alpha-on-upload"
6815
6919
  })
6816
6920
  };
6817
6921
  const pixiPromise = loader.load(assetsToLoadIn).then(texture => {
@@ -6828,7 +6932,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6828
6932
  };
6829
6933
  pixi_js.extensions.add(spineTextureAtlasLoader);
6830
6934
  function isJson(resource) {
6831
- return Object.prototype.hasOwnProperty.call(resource, 'bones');
6935
+ return Object.prototype.hasOwnProperty.call(resource, "bones");
6832
6936
  }
6833
6937
  function isBuffer(resource) {
6834
6938
  return resource instanceof Uint8Array;
@@ -6839,10 +6943,10 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6839
6943
  extension: {
6840
6944
  type: pixi_js.ExtensionType.LoadParser,
6841
6945
  priority: pixi_js.LoaderParserPriority.Normal,
6842
- name: 'spineSkeletonLoader'
6946
+ name: "spineSkeletonLoader"
6843
6947
  },
6844
6948
  test(url) {
6845
- return pixi_js.checkExtension(url, '.skel');
6949
+ return pixi_js.checkExtension(url, ".skel");
6846
6950
  },
6847
6951
  load(url) {
6848
6952
  return __async(this, null, function* () {
@@ -6852,8 +6956,8 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6852
6956
  });
6853
6957
  },
6854
6958
  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);
6959
+ const isJsonSpineModel = pixi_js.checkExtension(options.src, ".json") && isJson(asset);
6960
+ const isBinarySpineModel = pixi_js.checkExtension(options.src, ".skel") && isBuffer(asset);
6857
6961
  return Promise.resolve(isJsonSpineModel || isBinarySpineModel);
6858
6962
  }
6859
6963
  }
@@ -6866,13 +6970,13 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6866
6970
  const vertexSize = 7;
6867
6971
  const attributeBuffer = new pixi_js.Buffer({
6868
6972
  data: placeHolderBufferData,
6869
- label: 'attribute-batch-buffer',
6973
+ label: "attribute-batch-buffer",
6870
6974
  usage: pixi_js.BufferUsage.VERTEX | pixi_js.BufferUsage.COPY_DST,
6871
6975
  shrinkToFit: false
6872
6976
  });
6873
6977
  const indexBuffer = new pixi_js.Buffer({
6874
6978
  data: placeHolderIndexData,
6875
- label: 'index-batch-buffer',
6979
+ label: "index-batch-buffer",
6876
6980
  usage: pixi_js.BufferUsage.INDEX | pixi_js.BufferUsage.COPY_DST,
6877
6981
  shrinkToFit: false
6878
6982
  });
@@ -6881,31 +6985,31 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6881
6985
  attributes: {
6882
6986
  aPosition: {
6883
6987
  buffer: attributeBuffer,
6884
- format: 'float32x2',
6988
+ format: "float32x2",
6885
6989
  stride,
6886
6990
  offset: 0
6887
6991
  },
6888
6992
  aUV: {
6889
6993
  buffer: attributeBuffer,
6890
- format: 'float32x2',
6994
+ format: "float32x2",
6891
6995
  stride,
6892
6996
  offset: 2 * 4
6893
6997
  },
6894
6998
  aColor: {
6895
6999
  buffer: attributeBuffer,
6896
- format: 'unorm8x4',
7000
+ format: "unorm8x4",
6897
7001
  stride,
6898
7002
  offset: 4 * 4
6899
7003
  },
6900
7004
  aDarkColor: {
6901
7005
  buffer: attributeBuffer,
6902
- format: 'unorm8x4',
7006
+ format: "unorm8x4",
6903
7007
  stride,
6904
7008
  offset: 5 * 4
6905
7009
  },
6906
7010
  aTextureIdAndRound: {
6907
7011
  buffer: attributeBuffer,
6908
- format: 'uint16x2',
7012
+ format: "uint16x2",
6909
7013
  stride,
6910
7014
  offset: 6 * 4
6911
7015
  }
@@ -6915,60 +7019,60 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6915
7019
  }
6916
7020
  }
6917
7021
  const darkTintBit = {
6918
- name: 'color-bit',
7022
+ name: "color-bit",
6919
7023
  vertex: {
6920
- header: `
7024
+ header: (`
6921
7025
  @in aDarkColor: vec4<f32>;
6922
7026
  @out vDarkColor: vec4<f32>;
6923
- `,
6924
- main: `
7027
+ `),
7028
+ main: (`
6925
7029
  vDarkColor = aDarkColor;
6926
- `
7030
+ `)
6927
7031
  },
6928
7032
  fragment: {
6929
- header: `
7033
+ header: (`
6930
7034
  @in vDarkColor: vec4<f32>;
6931
- `,
6932
- end: `
7035
+ `),
7036
+ end: (`
6933
7037
 
6934
7038
  let alpha = outColor.a * vColor.a;
6935
7039
  let rgb = ((outColor.a - 1.0) * vDarkColor.a + 1.0 - outColor.rgb) * vDarkColor.rgb + outColor.rgb * vColor.rgb;
6936
7040
 
6937
7041
  finalColor = vec4<f32>(rgb, alpha);
6938
7042
 
6939
- `
7043
+ `)
6940
7044
  }
6941
7045
  };
6942
7046
  const darkTintBitGl = {
6943
- name: 'color-bit',
7047
+ name: "color-bit",
6944
7048
  vertex: {
6945
- header: `
7049
+ header: (`
6946
7050
  in vec4 aDarkColor;
6947
7051
  out vec4 vDarkColor;
6948
- `,
6949
- main: `
7052
+ `),
7053
+ main: (`
6950
7054
  vDarkColor = aDarkColor;
6951
- `
7055
+ `)
6952
7056
  },
6953
7057
  fragment: {
6954
- header: `
7058
+ header: (`
6955
7059
  in vec4 vDarkColor;
6956
- `,
6957
- end: `
7060
+ `),
7061
+ end: (`
6958
7062
 
6959
7063
  finalColor.a = outColor.a * vColor.a;
6960
7064
  finalColor.rgb = ((outColor.a - 1.0) * vDarkColor.a + 1.0 - outColor.rgb) * vDarkColor.rgb + outColor.rgb * vColor.rgb;
6961
- `
7065
+ `)
6962
7066
  }
6963
7067
  };
6964
7068
  class DarkTintShader extends pixi_js.Shader {
6965
7069
  constructor(maxTextures) {
6966
7070
  const glProgram = pixi_js.compileHighShaderGlProgram({
6967
- name: 'dark-tint-batch',
7071
+ name: "dark-tint-batch",
6968
7072
  bits: [pixi_js.colorBitGl, darkTintBitGl, pixi_js.generateTextureBatchBitGl(maxTextures), pixi_js.roundPixelsBitGl]
6969
7073
  });
6970
7074
  const gpuProgram = pixi_js.compileHighShaderGpuProgram({
6971
- name: 'dark-tint-batch',
7075
+ name: "dark-tint-batch",
6972
7076
  bits: [pixi_js.colorBit, darkTintBit, pixi_js.generateTextureBatchBit(maxTextures), pixi_js.roundPixelsBit]
6973
7077
  });
6974
7078
  super({
@@ -6984,10 +7088,10 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
6984
7088
  const _DarkTintBatcher = class _DarkTintBatcher extends pixi_js.Batcher {
6985
7089
  constructor() {
6986
7090
  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);
7091
+ __publicField(this, "geometry", new DarkTintBatchGeometry());
7092
+ __publicField(this, "shader", defaultShader || (defaultShader = new DarkTintShader(this.maxTextures)));
7093
+ __publicField(this, "name", _DarkTintBatcher.extension.name);
7094
+ __publicField(this, "vertexSize", 7);
6991
7095
  }
6992
7096
  packAttributes(element, float32View, uint32View, index, textureId) {
6993
7097
  const textureIdAndRound = textureId << 16 | element.roundPixels & 65535;
@@ -7068,36 +7172,317 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
7068
7172
  uint32View[index + 27] = textureIdAndRound;
7069
7173
  }
7070
7174
  };
7071
- __publicField(_DarkTintBatcher, 'extension', {
7175
+ __publicField(_DarkTintBatcher, "extension", {
7072
7176
  type: [pixi_js.ExtensionType.Batcher],
7073
- name: 'darkTint'
7177
+ name: "darkTint"
7074
7178
  });
7075
7179
  let DarkTintBatcher = _DarkTintBatcher;
7076
7180
  pixi_js.extensions.add(DarkTintBatcher);
7181
+ const _SkeletonRenderer = class _SkeletonRenderer {
7182
+ constructor(context) {
7183
+ __publicField(this, "ctx");
7184
+ __publicField(this, "clipper", new SkeletonClipping());
7185
+ __publicField(this, "triangleRendering", false);
7186
+ __publicField(this, "debugRendering", false);
7187
+ __publicField(this, "vertices", Utils.newFloatArray(8 * 1024));
7188
+ __publicField(this, "tempColor", new Color());
7189
+ this.ctx = context;
7190
+ }
7191
+ draw(skeleton) {
7192
+ if (this.triangleRendering) this.drawTriangles(skeleton);else this.drawImages(skeleton);
7193
+ }
7194
+ drawImages(skeleton) {
7195
+ let ctx = this.ctx;
7196
+ let drawOrder = skeleton.drawOrder;
7197
+ if (this.debugRendering) ctx.strokeStyle = "green";
7198
+ ctx.save();
7199
+ for (let i = 0, n = drawOrder.length; i < n; i++) {
7200
+ let slot = drawOrder[i];
7201
+ let attachment = slot.getAttachment();
7202
+ let regionAttachment = null;
7203
+ let region = null;
7204
+ let image = null;
7205
+ if (attachment instanceof RegionAttachment) {
7206
+ regionAttachment = attachment;
7207
+ region = regionAttachment.region;
7208
+ image = region.texture.getImage();
7209
+ } else continue;
7210
+ let skeleton2 = slot.bone.skeleton;
7211
+ let skeletonColor = skeleton2.color;
7212
+ let slotColor = slot.color;
7213
+ let regionColor = regionAttachment.color;
7214
+ let alpha = skeletonColor.a * slotColor.a * regionColor.a;
7215
+ let color = this.tempColor;
7216
+ color.set(skeletonColor.r * slotColor.r * regionColor.r, skeletonColor.g * slotColor.g * regionColor.g, skeletonColor.b * slotColor.b * regionColor.b, alpha);
7217
+ let att = attachment;
7218
+ let bone = slot.bone;
7219
+ let w = region.width;
7220
+ let h = region.height;
7221
+ ctx.save();
7222
+ ctx.transform(bone.a, bone.c, bone.b, bone.d, bone.worldX, bone.worldY);
7223
+ ctx.translate(attachment.offset[0], attachment.offset[1]);
7224
+ ctx.rotate(attachment.rotation * Math.PI / 180);
7225
+ let atlasScale = att.width / w;
7226
+ ctx.scale(atlasScale * attachment.scaleX, atlasScale * attachment.scaleY);
7227
+ ctx.translate(w / 2, h / 2);
7228
+ if (attachment.region.rotate) {
7229
+ let t = w;
7230
+ w = h;
7231
+ h = t;
7232
+ ctx.rotate(-Math.PI / 2);
7233
+ }
7234
+ ctx.scale(1, -1);
7235
+ ctx.translate(-w / 2, -h / 2);
7236
+ ctx.globalAlpha = color.a;
7237
+ ctx.drawImage(image, region.x, region.y, w, h, 0, 0, w, h);
7238
+ if (this.debugRendering) ctx.strokeRect(0, 0, w, h);
7239
+ ctx.restore();
7240
+ }
7241
+ ctx.restore();
7242
+ }
7243
+ drawTriangles(skeleton) {
7244
+ let vertices = this.vertices;
7245
+ let triangles = null;
7246
+ let drawOrder = skeleton.drawOrder;
7247
+ let clipper2 = this.clipper;
7248
+ for (let i = 0, n = drawOrder.length; i < n; i++) {
7249
+ let slot = drawOrder[i];
7250
+ let attachment = slot.getAttachment();
7251
+ let texture = null;
7252
+ let region = null;
7253
+ if (attachment instanceof ClippingAttachment) {
7254
+ clipper2.clipStart(slot, attachment);
7255
+ continue;
7256
+ }
7257
+ if (attachment instanceof RegionAttachment) {
7258
+ let regionAttachment = attachment;
7259
+ vertices = this.computeRegionVertices(slot, regionAttachment, false);
7260
+ triangles = _SkeletonRenderer.QUAD_TRIANGLES;
7261
+ region = regionAttachment.region;
7262
+ texture = region.texture.getImage();
7263
+ } else if (attachment instanceof MeshAttachment) {
7264
+ let mesh = attachment;
7265
+ vertices = this.computeMeshVertices(slot, mesh, false);
7266
+ triangles = mesh.triangles;
7267
+ texture = mesh.region.renderObject.texture.getImage();
7268
+ } else {
7269
+ clipper2.clipEndWithSlot(slot);
7270
+ continue;
7271
+ }
7272
+ if (texture != null) {
7273
+ slot.data.blendMode;
7274
+ let skeleton2 = slot.bone.skeleton;
7275
+ let skeletonColor = skeleton2.color;
7276
+ let slotColor = slot.color;
7277
+ let attachmentColor = attachment.color;
7278
+ let alpha = skeletonColor.a * slotColor.a * attachmentColor.a;
7279
+ let color = this.tempColor;
7280
+ color.set(skeletonColor.r * slotColor.r * attachmentColor.r, skeletonColor.g * slotColor.g * attachmentColor.g, skeletonColor.b * slotColor.b * attachmentColor.b, alpha);
7281
+ let ctx = this.ctx;
7282
+ ctx.globalAlpha = color.a;
7283
+ if (clipper2.isClipping()) {
7284
+ let vertexCount = vertices.length / 8;
7285
+ let positions = new Float32Array(vertexCount * 2);
7286
+ let uvs = new Float32Array(vertexCount * 2);
7287
+ for (let v = 0; v < vertexCount; v++) {
7288
+ positions[v * 2] = vertices[v * 8];
7289
+ positions[v * 2 + 1] = vertices[v * 8 + 1];
7290
+ uvs[v * 2] = vertices[v * 8 + 6];
7291
+ uvs[v * 2 + 1] = vertices[v * 8 + 7];
7292
+ }
7293
+ clipper2.clipTrianglesUnpacked(positions, triangles, triangles.length, uvs);
7294
+ let clippedVertices = clipper2.clippedVertices;
7295
+ let clippedUVs = clipper2.clippedUVs;
7296
+ let clippedTriangles = clipper2.clippedTriangles;
7297
+ for (var j = 0; j < clippedTriangles.length; j += 3) {
7298
+ let t1 = clippedTriangles[j] * 2,
7299
+ t2 = clippedTriangles[j + 1] * 2,
7300
+ t3 = clippedTriangles[j + 2] * 2;
7301
+ let x0 = clippedVertices[t1],
7302
+ y0 = clippedVertices[t1 + 1],
7303
+ u0 = clippedUVs[t1],
7304
+ v0 = clippedUVs[t1 + 1];
7305
+ let x1 = clippedVertices[t2],
7306
+ y1 = clippedVertices[t2 + 1],
7307
+ u1 = clippedUVs[t2],
7308
+ v1 = clippedUVs[t2 + 1];
7309
+ let x2 = clippedVertices[t3],
7310
+ y2 = clippedVertices[t3 + 1],
7311
+ u2 = clippedUVs[t3],
7312
+ v2 = clippedUVs[t3 + 1];
7313
+ this.drawTriangle(texture, x0, y0, u0, v0, x1, y1, u1, v1, x2, y2, u2, v2);
7314
+ if (this.debugRendering) {
7315
+ ctx.strokeStyle = "green";
7316
+ ctx.beginPath();
7317
+ ctx.moveTo(x0, y0);
7318
+ ctx.lineTo(x1, y1);
7319
+ ctx.lineTo(x2, y2);
7320
+ ctx.lineTo(x0, y0);
7321
+ ctx.stroke();
7322
+ }
7323
+ }
7324
+ } else {
7325
+ for (var j = 0; j < triangles.length; j += 3) {
7326
+ let t1 = triangles[j] * 8,
7327
+ t2 = triangles[j + 1] * 8,
7328
+ t3 = triangles[j + 2] * 8;
7329
+ let x0 = vertices[t1],
7330
+ y0 = vertices[t1 + 1],
7331
+ u0 = vertices[t1 + 6],
7332
+ v0 = vertices[t1 + 7];
7333
+ let x1 = vertices[t2],
7334
+ y1 = vertices[t2 + 1],
7335
+ u1 = vertices[t2 + 6],
7336
+ v1 = vertices[t2 + 7];
7337
+ let x2 = vertices[t3],
7338
+ y2 = vertices[t3 + 1],
7339
+ u2 = vertices[t3 + 6],
7340
+ v2 = vertices[t3 + 7];
7341
+ this.drawTriangle(texture, x0, y0, u0, v0, x1, y1, u1, v1, x2, y2, u2, v2);
7342
+ if (this.debugRendering) {
7343
+ ctx.strokeStyle = "green";
7344
+ ctx.beginPath();
7345
+ ctx.moveTo(x0, y0);
7346
+ ctx.lineTo(x1, y1);
7347
+ ctx.lineTo(x2, y2);
7348
+ ctx.lineTo(x0, y0);
7349
+ ctx.stroke();
7350
+ }
7351
+ }
7352
+ }
7353
+ }
7354
+ clipper2.clipEndWithSlot(slot);
7355
+ }
7356
+ clipper2.clipEnd();
7357
+ this.ctx.globalAlpha = 1;
7358
+ }
7359
+ drawTriangle(img, x0, y0, u0, v0, x1, y1, u1, v1, x2, y2, u2, v2) {
7360
+ let ctx = this.ctx;
7361
+ u0 *= img.width;
7362
+ v0 *= img.height;
7363
+ u1 *= img.width;
7364
+ v1 *= img.height;
7365
+ u2 *= img.width;
7366
+ v2 *= img.height;
7367
+ ctx.beginPath();
7368
+ ctx.moveTo(x0, y0);
7369
+ ctx.lineTo(x1, y1);
7370
+ ctx.lineTo(x2, y2);
7371
+ ctx.closePath();
7372
+ x1 -= x0;
7373
+ y1 -= y0;
7374
+ x2 -= x0;
7375
+ y2 -= y0;
7376
+ u1 -= u0;
7377
+ v1 -= v0;
7378
+ u2 -= u0;
7379
+ v2 -= v0;
7380
+ var det = 1 / (u1 * v2 - u2 * v1),
7381
+ a = (v2 * x1 - v1 * x2) * det,
7382
+ b = (v2 * y1 - v1 * y2) * det,
7383
+ c = (u1 * x2 - u2 * x1) * det,
7384
+ d = (u1 * y2 - u2 * y1) * det,
7385
+ e = x0 - a * u0 - c * v0,
7386
+ f = y0 - b * u0 - d * v0;
7387
+ ctx.save();
7388
+ ctx.transform(a, b, c, d, e, f);
7389
+ ctx.clip();
7390
+ ctx.drawImage(img, 0, 0);
7391
+ ctx.restore();
7392
+ }
7393
+ computeRegionVertices(slot, region, pma) {
7394
+ let skeleton = slot.bone.skeleton;
7395
+ let skeletonColor = skeleton.color;
7396
+ let slotColor = slot.color;
7397
+ let regionColor = region.color;
7398
+ let alpha = skeletonColor.a * slotColor.a * regionColor.a;
7399
+ let multiplier = pma ? alpha : 1;
7400
+ let color = this.tempColor;
7401
+ color.set(skeletonColor.r * slotColor.r * regionColor.r * multiplier, skeletonColor.g * slotColor.g * regionColor.g * multiplier, skeletonColor.b * slotColor.b * regionColor.b * multiplier, alpha);
7402
+ region.computeWorldVertices(slot.bone, this.vertices, 0, _SkeletonRenderer.VERTEX_SIZE);
7403
+ let vertices = this.vertices;
7404
+ let uvs = region.uvs;
7405
+ vertices[RegionAttachment.C1R] = color.r;
7406
+ vertices[RegionAttachment.C1G] = color.g;
7407
+ vertices[RegionAttachment.C1B] = color.b;
7408
+ vertices[RegionAttachment.C1A] = color.a;
7409
+ vertices[RegionAttachment.U1] = uvs[0];
7410
+ vertices[RegionAttachment.V1] = uvs[1];
7411
+ vertices[RegionAttachment.C2R] = color.r;
7412
+ vertices[RegionAttachment.C2G] = color.g;
7413
+ vertices[RegionAttachment.C2B] = color.b;
7414
+ vertices[RegionAttachment.C2A] = color.a;
7415
+ vertices[RegionAttachment.U2] = uvs[2];
7416
+ vertices[RegionAttachment.V2] = uvs[3];
7417
+ vertices[RegionAttachment.C3R] = color.r;
7418
+ vertices[RegionAttachment.C3G] = color.g;
7419
+ vertices[RegionAttachment.C3B] = color.b;
7420
+ vertices[RegionAttachment.C3A] = color.a;
7421
+ vertices[RegionAttachment.U3] = uvs[4];
7422
+ vertices[RegionAttachment.V3] = uvs[5];
7423
+ vertices[RegionAttachment.C4R] = color.r;
7424
+ vertices[RegionAttachment.C4G] = color.g;
7425
+ vertices[RegionAttachment.C4B] = color.b;
7426
+ vertices[RegionAttachment.C4A] = color.a;
7427
+ vertices[RegionAttachment.U4] = uvs[6];
7428
+ vertices[RegionAttachment.V4] = uvs[7];
7429
+ return vertices;
7430
+ }
7431
+ computeMeshVertices(slot, mesh, pma) {
7432
+ let skeleton = slot.bone.skeleton;
7433
+ let skeletonColor = skeleton.color;
7434
+ let slotColor = slot.color;
7435
+ let regionColor = mesh.color;
7436
+ let alpha = skeletonColor.a * slotColor.a * regionColor.a;
7437
+ let multiplier = pma ? alpha : 1;
7438
+ let color = this.tempColor;
7439
+ color.set(skeletonColor.r * slotColor.r * regionColor.r * multiplier, skeletonColor.g * slotColor.g * regionColor.g * multiplier, skeletonColor.b * slotColor.b * regionColor.b * multiplier, alpha);
7440
+ let numVertices = mesh.worldVerticesLength / 2;
7441
+ if (this.vertices.length < mesh.worldVerticesLength) {
7442
+ this.vertices = Utils.newFloatArray(mesh.worldVerticesLength);
7443
+ }
7444
+ let vertices = this.vertices;
7445
+ mesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, vertices, 0, _SkeletonRenderer.VERTEX_SIZE);
7446
+ let uvs = mesh.uvs;
7447
+ for (let i = 0, n = numVertices, u = 0, v = 2; i < n; i++) {
7448
+ vertices[v++] = color.r;
7449
+ vertices[v++] = color.g;
7450
+ vertices[v++] = color.b;
7451
+ vertices[v++] = color.a;
7452
+ vertices[v++] = uvs[u++];
7453
+ vertices[v++] = uvs[u++];
7454
+ v += 2;
7455
+ }
7456
+ return vertices;
7457
+ }
7458
+ };
7459
+ __publicField(_SkeletonRenderer, "QUAD_TRIANGLES", [0, 1, 2, 2, 3, 0]);
7460
+ __publicField(_SkeletonRenderer, "VERTEX_SIZE", 2 + 2 + 4);
7461
+ let SkeletonRenderer = _SkeletonRenderer;
7077
7462
  class BatchableSpineSlot {
7078
7463
  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');
7464
+ __publicField(this, "indexOffset", 0);
7465
+ __publicField(this, "attributeOffset", 0);
7466
+ __publicField(this, "indexSize");
7467
+ __publicField(this, "attributeSize");
7468
+ __publicField(this, "batcherName", "darkTint");
7469
+ __publicField(this, "topology", "triangle-list");
7470
+ __publicField(this, "packAsQuad", false);
7471
+ __publicField(this, "renderable");
7472
+ __publicField(this, "positions");
7473
+ __publicField(this, "indices");
7474
+ __publicField(this, "uvs");
7475
+ __publicField(this, "roundPixels");
7476
+ __publicField(this, "data");
7477
+ __publicField(this, "blendMode");
7478
+ __publicField(this, "darkTint");
7479
+ __publicField(this, "texture");
7480
+ __publicField(this, "transform");
7481
+ __publicField(this, "_textureId");
7482
+ __publicField(this, "_attributeStart");
7483
+ __publicField(this, "_indexStart");
7484
+ __publicField(this, "_batcher");
7485
+ __publicField(this, "_batch");
7101
7486
  }
7102
7487
  get color() {
7103
7488
  const slotColor = this.data.color;
@@ -7146,23 +7531,27 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
7146
7531
  this.texture = data.texture;
7147
7532
  this.roundPixels = roundPixels;
7148
7533
  this.blendMode = blendMode;
7149
- this.batcherName = data.darkTint ? 'darkTint' : 'default';
7534
+ this.batcherName = data.darkTint ? "darkTint" : "default";
7150
7535
  }
7151
7536
  }
7152
7537
  const spineBlendModeMap = {
7153
- 0: 'normal',
7154
- 1: 'add',
7155
- 2: 'multiply',
7156
- 3: 'screen'
7538
+ 0: "normal",
7539
+ 1: "add",
7540
+ 2: "multiply",
7541
+ 3: "screen"
7157
7542
  };
7158
7543
  class SpinePipe {
7159
7544
  constructor(renderer) {
7160
- __publicField(this, 'renderer');
7161
- __publicField(this, 'gpuSpineData', {});
7162
- __publicField(this, '_destroyRenderableBound', this.destroyRenderable.bind(this));
7545
+ __publicField(this, "renderer");
7546
+ __publicField(this, "canvasSkeletonRenderer");
7547
+ __publicField(this, "gpuSpineData", {});
7548
+ __publicField(this, "_destroyRenderableBound", this.destroyRenderable.bind(this));
7163
7549
  this.renderer = renderer;
7164
7550
  }
7165
7551
  validateRenderable(spine) {
7552
+ if (this.renderer.type === pixi_js.RendererType.CANVAS) {
7553
+ return true;
7554
+ }
7166
7555
  spine._validateAndTransformAttachments();
7167
7556
  if (spine.spineAttachmentsDirty) {
7168
7557
  return true;
@@ -7176,8 +7565,8 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
7176
7565
  const cacheData = spine._getCachedData(slot, attachment);
7177
7566
  const batchableSpineSlot = gpuSpine.slotBatches[cacheData.id];
7178
7567
  const texture = cacheData.texture;
7179
- if (texture !== batchableSpineSlot.texture) {
7180
- if (!batchableSpineSlot._batcher.checkAndUpdateTexture(batchableSpineSlot, texture)) {
7568
+ if (texture !== (batchableSpineSlot == null ? void 0 : batchableSpineSlot.texture)) {
7569
+ if (!(batchableSpineSlot == null ? void 0 : batchableSpineSlot._batcher.checkAndUpdateTexture(batchableSpineSlot, texture))) {
7181
7570
  return true;
7182
7571
  }
7183
7572
  }
@@ -7186,30 +7575,60 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
7186
7575
  }
7187
7576
  return false;
7188
7577
  }
7578
+ execute(spine) {
7579
+ if (this.renderer.type === pixi_js.RendererType.CANVAS) {
7580
+ const renderer = this.renderer;
7581
+ const groupAlpha = (spine.groupColorAlpha >>> 24 & 255) / 255;
7582
+ const contextSystem = renderer.canvasContext;
7583
+ const context = contextSystem.activeContext;
7584
+ context.save();
7585
+ if (!this.canvasSkeletonRenderer) {
7586
+ this.canvasSkeletonRenderer = new SkeletonRenderer(context);
7587
+ this.canvasSkeletonRenderer.triangleRendering = true;
7588
+ }
7589
+ contextSystem.setContextTransform(spine.groupTransform, (renderer._roundPixels | spine._roundPixels) === 1);
7590
+ const oldAlpha = spine.skeleton.color.a;
7591
+ spine.skeleton.color.a *= groupAlpha;
7592
+ this.canvasSkeletonRenderer.draw(spine.skeleton);
7593
+ spine.skeleton.color.a = oldAlpha;
7594
+ context.restore();
7595
+ }
7596
+ }
7189
7597
  addRenderable(spine, instructionSet) {
7190
7598
  var _a, _b;
7599
+ if (this.renderer.type === pixi_js.RendererType.CANVAS) {
7600
+ this.renderer.renderPipes.batch.break(instructionSet);
7601
+ instructionSet.add(spine);
7602
+ return;
7603
+ }
7191
7604
  const gpuSpine = this._getSpineData(spine);
7192
7605
  const batcher = this.renderer.renderPipes.batch;
7193
7606
  const drawOrder = spine.skeleton.drawOrder;
7194
7607
  const roundPixels = this.renderer._roundPixels | spine._roundPixels;
7195
7608
  spine._validateAndTransformAttachments();
7609
+ spine.spineAttachmentsDirty = false;
7610
+ spine.spineTexturesDirty = false;
7196
7611
  for (let i = 0, n = drawOrder.length; i < n; i++) {
7197
7612
  const slot = drawOrder[i];
7198
7613
  const attachment = slot.getAttachment();
7199
7614
  const blendMode = spineBlendModeMap[slot.data.blendMode];
7615
+ let skipRender = false;
7200
7616
  if (attachment instanceof RegionAttachment || attachment instanceof MeshAttachment) {
7201
7617
  const cacheData = spine._getCachedData(slot, attachment);
7202
7618
  const batchableSpineSlot = (_a = gpuSpine.slotBatches)[_b = cacheData.id] || (_a[_b] = new BatchableSpineSlot());
7203
7619
  batchableSpineSlot.setData(spine, cacheData, blendMode, roundPixels);
7204
- if (!cacheData.skipRender) {
7620
+ skipRender = cacheData.skipRender;
7621
+ if (!skipRender) {
7205
7622
  batcher.addToBatch(batchableSpineSlot, instructionSet);
7206
7623
  }
7207
7624
  }
7208
7625
  const containerAttachment = spine._slotsObject[slot.data.name];
7209
7626
  if (containerAttachment) {
7210
7627
  const container = containerAttachment.container;
7211
- container.includeInBuild = true;
7212
- pixi_js.collectAllRenderables(container, instructionSet, this.renderer);
7628
+ if (!skipRender) {
7629
+ container.includeInBuild = true;
7630
+ container.collectRenderables(instructionSet, this.renderer, null);
7631
+ }
7213
7632
  container.includeInBuild = false;
7214
7633
  }
7215
7634
  }
@@ -7218,6 +7637,8 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
7218
7637
  var _a;
7219
7638
  const gpuSpine = this.gpuSpineData[spine.uid];
7220
7639
  spine._validateAndTransformAttachments();
7640
+ spine.spineAttachmentsDirty = false;
7641
+ spine.spineTexturesDirty = false;
7221
7642
  const drawOrder = spine.skeleton.drawOrder;
7222
7643
  for (let i = 0, n = drawOrder.length; i < n; i++) {
7223
7644
  const slot = drawOrder[i];
@@ -7225,19 +7646,20 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
7225
7646
  if (attachment instanceof RegionAttachment || attachment instanceof MeshAttachment) {
7226
7647
  const cacheData = spine._getCachedData(slot, attachment);
7227
7648
  if (!cacheData.skipRender) {
7228
- const batchableSpineSlot = gpuSpine.slotBatches[spine._getCachedData(slot, attachment).id];
7229
- (_a = batchableSpineSlot._batcher) == null ? void 0 : _a.updateElement(batchableSpineSlot);
7649
+ const batchableSpineSlot = gpuSpine.slotBatches[cacheData.id];
7650
+ (_a = batchableSpineSlot == null ? void 0 : batchableSpineSlot._batcher) == null ? void 0 : _a.updateElement(batchableSpineSlot);
7230
7651
  }
7231
7652
  }
7232
7653
  }
7233
7654
  }
7234
7655
  destroyRenderable(spine) {
7235
7656
  this.gpuSpineData[spine.uid] = null;
7236
- spine.off('destroyed', this._destroyRenderableBound);
7657
+ spine.off("destroyed", this._destroyRenderableBound);
7237
7658
  }
7238
7659
  destroy() {
7239
7660
  this.gpuSpineData = null;
7240
7661
  this.renderer = null;
7662
+ this.canvasSkeletonRenderer = null;
7241
7663
  }
7242
7664
  _getSpineData(spine) {
7243
7665
  return this.gpuSpineData[spine.uid] || this._initMeshData(spine);
@@ -7246,13 +7668,13 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
7246
7668
  this.gpuSpineData[spine.uid] = {
7247
7669
  slotBatches: {}
7248
7670
  };
7249
- spine.on('destroyed', this._destroyRenderableBound);
7671
+ spine.on("destroyed", this._destroyRenderableBound);
7250
7672
  return this.gpuSpineData[spine.uid];
7251
7673
  }
7252
7674
  }
7253
- __publicField(SpinePipe, 'extension', {
7675
+ __publicField(SpinePipe, "extension", {
7254
7676
  type: [pixi_js.ExtensionType.WebGLPipes, pixi_js.ExtensionType.WebGPUPipes, pixi_js.ExtensionType.CanvasPipes],
7255
- name: 'spine'
7677
+ name: "spine"
7256
7678
  });
7257
7679
  pixi_js.extensions.add(SpinePipe);
7258
7680
  const vectorAux = new Vector2();
@@ -7266,28 +7688,28 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
7266
7688
  skeletonData: options
7267
7689
  };
7268
7690
  }
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');
7691
+ super({});
7692
+ __publicField(this, "batched", true);
7693
+ __publicField(this, "buildId", 0);
7694
+ __publicField(this, "renderPipeId", "spine");
7695
+ __publicField(this, "_didSpineUpdate", false);
7696
+ __publicField(this, "beforeUpdateWorldTransforms", () => {});
7697
+ __publicField(this, "afterUpdateWorldTransforms", () => {});
7698
+ __publicField(this, "skeleton");
7699
+ __publicField(this, "state");
7700
+ __publicField(this, "skeletonBounds");
7701
+ __publicField(this, "darkTint", false);
7702
+ __publicField(this, "_debug");
7703
+ __publicField(this, "_slotsObject", Object.create(null));
7704
+ __publicField(this, "clippingSlotToPixiMasks", Object.create(null));
7705
+ __publicField(this, "spineAttachmentsDirty", true);
7706
+ __publicField(this, "spineTexturesDirty", true);
7707
+ __publicField(this, "_lastAttachments", []);
7708
+ __publicField(this, "_stateChanged", true);
7709
+ __publicField(this, "attachmentCacheData", []);
7710
+ __publicField(this, "_autoUpdate", false);
7711
+ __publicField(this, "hasNeverUpdated", true);
7712
+ __publicField(this, "currentClippingSlot");
7291
7713
  const skeletonData = options instanceof SkeletonData ? options : options.skeletonData;
7292
7714
  this.skeleton = new Skeleton(skeletonData);
7293
7715
  this.skeleton.flipY = true;
@@ -7301,7 +7723,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
7301
7723
  }
7302
7724
  getSlotFromRef(slotRef) {
7303
7725
  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;
7726
+ if (typeof slotRef === "number") slot = this.skeleton.slots[slotRef];else if (typeof slotRef === "string") slot = this.skeleton.findSlot(slotRef);else slot = slotRef;
7305
7727
  if (!slot) throw new Error(`No slot found with the given slot reference: ${slotRef}`);
7306
7728
  return slot;
7307
7729
  }
@@ -7342,7 +7764,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
7342
7764
  }
7343
7765
  setBonePosition(bone, position) {
7344
7766
  const boneAux = bone;
7345
- if (typeof bone === 'string') {
7767
+ if (typeof bone === "string") {
7346
7768
  bone = this.skeleton.findBone(bone);
7347
7769
  }
7348
7770
  if (!bone) throw Error(`Cant set bone position, bone ${String(boneAux)} not found`);
@@ -7358,7 +7780,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
7358
7780
  }
7359
7781
  getBonePosition(bone, outPos) {
7360
7782
  const boneAux = bone;
7361
- if (typeof bone === 'string') {
7783
+ if (typeof bone === "string") {
7362
7784
  bone = this.skeleton.findBone(bone);
7363
7785
  }
7364
7786
  if (!bone) {
@@ -7767,33 +8189,33 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
7767
8189
  }
7768
8190
  class SpineDebugRenderer {
7769
8191
  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);
8192
+ __publicField(this, "registeredSpines", new Map());
8193
+ __publicField(this, "drawMeshHull", true);
8194
+ __publicField(this, "drawMeshTriangles", true);
8195
+ __publicField(this, "drawBones", true);
8196
+ __publicField(this, "drawPaths", true);
8197
+ __publicField(this, "drawBoundingBoxes", true);
8198
+ __publicField(this, "drawClipping", true);
8199
+ __publicField(this, "drawRegionAttachments", true);
8200
+ __publicField(this, "drawEvents", true);
8201
+ __publicField(this, "lineWidth", 1);
8202
+ __publicField(this, "regionAttachmentsColor", 30975);
8203
+ __publicField(this, "meshHullColor", 30975);
8204
+ __publicField(this, "meshTrianglesColor", 16763904);
8205
+ __publicField(this, "clippingPolygonColor", 16711935);
8206
+ __publicField(this, "boundingBoxesRectColor", 65280);
8207
+ __publicField(this, "boundingBoxesPolygonColor", 65280);
8208
+ __publicField(this, "boundingBoxesCircleColor", 65280);
8209
+ __publicField(this, "pathsCurveColor", 16711680);
8210
+ __publicField(this, "pathsLineColor", 16711935);
8211
+ __publicField(this, "skeletonXYColor", 16711680);
8212
+ __publicField(this, "bonesColor", 61132);
8213
+ __publicField(this, "eventFontSize", 24);
8214
+ __publicField(this, "eventFontColor", 0);
7793
8215
  }
7794
8216
  registerSpine(spine) {
7795
8217
  if (this.registeredSpines.has(spine)) {
7796
- console.warn('SpineDebugRenderer.registerSpine() - this spine is already registered!', spine);
8218
+ console.warn("SpineDebugRenderer.registerSpine() - this spine is already registered!", spine);
7797
8219
  return;
7798
8220
  }
7799
8221
  const debugDisplayObjects = {
@@ -7819,7 +8241,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
7819
8241
  style: {
7820
8242
  fontSize: this.eventFontSize / scale,
7821
8243
  fill: this.eventFontColor,
7822
- fontFamily: 'monospace'
8244
+ fontFamily: "monospace"
7823
8245
  }
7824
8246
  });
7825
8247
  text.scale.x = Math.sign(spine.scale.x);
@@ -7848,7 +8270,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
7848
8270
  debugDisplayObjects.parentDebugContainer.addChild(debugDisplayObjects.eventText);
7849
8271
  debugDisplayObjects.parentDebugContainer.zIndex = 9999999;
7850
8272
  debugDisplayObjects.parentDebugContainer.accessibleChildren = false;
7851
- debugDisplayObjects.parentDebugContainer.eventMode = 'none';
8273
+ debugDisplayObjects.parentDebugContainer.eventMode = "none";
7852
8274
  debugDisplayObjects.parentDebugContainer.interactiveChildren = false;
7853
8275
  spine.addChild(debugDisplayObjects.parentDebugContainer);
7854
8276
  spine.state.addListener(debugDisplayObjects.eventCallback);
@@ -7923,7 +8345,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
7923
8345
  const starY = skeletonY + bone.worldY;
7924
8346
  const endX = skeletonX + boneLen * bone.a + bone.worldX;
7925
8347
  const endY = skeletonY + boneLen * bone.b + bone.worldY;
7926
- if (bone.data.name === 'root' || bone.data.parent === null) {
8348
+ if (bone.data.name === "root" || bone.data.parent === null) {
7927
8349
  continue;
7928
8350
  }
7929
8351
  const w = Math.abs(starX - endX);
@@ -8077,7 +8499,7 @@ var _EVA_IIFE_spine36 = function (exports, eva_js, pluginRenderer, pixi_js) {
8077
8499
  const polygons = bounds.polygons;
8078
8500
  const drawPolygon = (polygonVertices, _offset, count) => {
8079
8501
  if (count < 3) {
8080
- throw new Error('Polygon must contain at least 3 vertices');
8502
+ throw new Error("Polygon must contain at least 3 vertices");
8081
8503
  }
8082
8504
  const paths = [];
8083
8505
  const dotSize = lineWidth * 2;