@esotericsoftware/spine-canvas 4.1.4 → 4.1.8

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.
@@ -513,6 +513,8 @@ var spine = (() => {
513
513
  constructor(name) {
514
514
  super(name);
515
515
  this.id = _VertexAttachment.nextID++;
516
+ this.bones = null;
517
+ this.vertices = null;
516
518
  this.worldVerticesLength = 0;
517
519
  this.timelineAttahment = this;
518
520
  }
@@ -658,6 +660,8 @@ var spine = (() => {
658
660
  // spine-core/src/Animation.ts
659
661
  var Animation = class {
660
662
  constructor(name, timelines, duration) {
663
+ this.timelines = null;
664
+ this.timelineIds = null;
661
665
  if (!name)
662
666
  throw new Error("name cannot be null.");
663
667
  this.name = name;
@@ -727,6 +731,8 @@ var spine = (() => {
727
731
  };
728
732
  var Timeline = class {
729
733
  constructor(frameCount, propertyIds) {
734
+ this.propertyIds = null;
735
+ this.frames = null;
730
736
  this.propertyIds = propertyIds;
731
737
  this.frames = Utils.newFloatArray(frameCount * this.getFrameEntries());
732
738
  }
@@ -760,6 +766,7 @@ var spine = (() => {
760
766
  var CurveTimeline = class extends Timeline {
761
767
  constructor(frameCount, bezierCount, propertyIds) {
762
768
  super(frameCount, propertyIds);
769
+ this.curves = null;
763
770
  this.curves = Utils.newFloatArray(frameCount + bezierCount * 18);
764
771
  this.curves[frameCount - 1] = 1;
765
772
  }
@@ -1096,8 +1103,8 @@ var spine = (() => {
1096
1103
  bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;
1097
1104
  break;
1098
1105
  case 3:
1099
- bone.scaleX = (x - bone.data.scaleX) * alpha;
1100
- bone.scaleY = (y - bone.data.scaleY) * alpha;
1106
+ bone.scaleX += (x - bone.data.scaleX) * alpha;
1107
+ bone.scaleY += (y - bone.data.scaleY) * alpha;
1101
1108
  }
1102
1109
  } else {
1103
1110
  switch (blend) {
@@ -1163,7 +1170,7 @@ var spine = (() => {
1163
1170
  bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;
1164
1171
  break;
1165
1172
  case 3:
1166
- bone.scaleX = (x - bone.data.scaleX) * alpha;
1173
+ bone.scaleX += (x - bone.data.scaleX) * alpha;
1167
1174
  }
1168
1175
  } else {
1169
1176
  switch (blend) {
@@ -1224,7 +1231,7 @@ var spine = (() => {
1224
1231
  bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;
1225
1232
  break;
1226
1233
  case 3:
1227
- bone.scaleY = (y - bone.data.scaleY) * alpha;
1234
+ bone.scaleY += (y - bone.data.scaleY) * alpha;
1228
1235
  }
1229
1236
  } else {
1230
1237
  switch (blend) {
@@ -1819,6 +1826,8 @@ var spine = (() => {
1819
1826
  Property.deform + "|" + slotIndex + "|" + attachment.id
1820
1827
  ]);
1821
1828
  this.slotIndex = 0;
1829
+ this.attachment = null;
1830
+ this.vertices = null;
1822
1831
  this.slotIndex = slotIndex;
1823
1832
  this.attachment = attachment;
1824
1833
  this.vertices = new Array(frameCount);
@@ -2035,6 +2044,7 @@ var spine = (() => {
2035
2044
  var _EventTimeline = class extends Timeline {
2036
2045
  constructor(frameCount) {
2037
2046
  super(frameCount, _EventTimeline.propertyIds);
2047
+ this.events = null;
2038
2048
  this.events = new Array(frameCount);
2039
2049
  }
2040
2050
  getFrameCount() {
@@ -2077,6 +2087,7 @@ var spine = (() => {
2077
2087
  var _DrawOrderTimeline = class extends Timeline {
2078
2088
  constructor(frameCount) {
2079
2089
  super(frameCount, _DrawOrderTimeline.propertyIds);
2090
+ this.drawOrders = null;
2080
2091
  this.drawOrders = new Array(frameCount);
2081
2092
  }
2082
2093
  getFrameCount() {
@@ -2115,6 +2126,7 @@ var spine = (() => {
2115
2126
  super(frameCount, bezierCount, [
2116
2127
  Property.ikConstraint + "|" + ikConstraintIndex
2117
2128
  ]);
2129
+ this.ikConstraintIndex = 0;
2118
2130
  this.ikConstraintIndex = ikConstraintIndex;
2119
2131
  }
2120
2132
  getFrameEntries() {
@@ -2200,6 +2212,7 @@ var spine = (() => {
2200
2212
  super(frameCount, bezierCount, [
2201
2213
  Property.transformConstraint + "|" + transformConstraintIndex
2202
2214
  ]);
2215
+ this.transformConstraintIndex = 0;
2203
2216
  this.transformConstraintIndex = transformConstraintIndex;
2204
2217
  }
2205
2218
  getFrameEntries() {
@@ -2299,6 +2312,7 @@ var spine = (() => {
2299
2312
  var PathConstraintPositionTimeline = class extends CurveTimeline1 {
2300
2313
  constructor(frameCount, bezierCount, pathConstraintIndex) {
2301
2314
  super(frameCount, bezierCount, Property.pathConstraintPosition + "|" + pathConstraintIndex);
2315
+ this.pathConstraintIndex = 0;
2302
2316
  this.pathConstraintIndex = pathConstraintIndex;
2303
2317
  }
2304
2318
  apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {
@@ -2480,17 +2494,25 @@ var spine = (() => {
2480
2494
  case SequenceMode.loop:
2481
2495
  index %= count;
2482
2496
  break;
2483
- case SequenceMode.pingpong:
2497
+ case SequenceMode.pingpong: {
2484
2498
  let n = (count << 1) - 2;
2485
2499
  index %= n;
2486
2500
  if (index >= count)
2487
2501
  index = n - index;
2488
2502
  break;
2503
+ }
2489
2504
  case SequenceMode.onceReverse:
2490
2505
  index = Math.max(count - 1 - index, 0);
2491
2506
  break;
2492
2507
  case SequenceMode.loopReverse:
2493
2508
  index = count - 1 - index % count;
2509
+ break;
2510
+ case SequenceMode.pingpongReverse: {
2511
+ let n = (count << 1) - 2;
2512
+ index = (index + count - 1) % n;
2513
+ if (index >= count)
2514
+ index = n - index;
2515
+ }
2494
2516
  }
2495
2517
  }
2496
2518
  slot.sequenceIndex = index;
@@ -2504,6 +2526,7 @@ var spine = (() => {
2504
2526
  // spine-core/src/AnimationState.ts
2505
2527
  var AnimationState = class {
2506
2528
  constructor(data) {
2529
+ this.data = null;
2507
2530
  this.tracks = new Array();
2508
2531
  this.timeScale = 1;
2509
2532
  this.unkeyedState = 0;
@@ -2630,13 +2653,14 @@ var spine = (() => {
2630
2653
  }
2631
2654
  } else {
2632
2655
  let timelineMode = current.timelineMode;
2633
- let firstFrame = current.timelinesRotation.length != timelineCount << 1;
2656
+ let shortestRotation = current.shortestRotation;
2657
+ let firstFrame = !shortestRotation && current.timelinesRotation.length != timelineCount << 1;
2634
2658
  if (firstFrame)
2635
2659
  current.timelinesRotation.length = timelineCount << 1;
2636
2660
  for (let ii = 0; ii < timelineCount; ii++) {
2637
2661
  let timeline2 = timelines[ii];
2638
2662
  let timelineBlend = timelineMode[ii] == SUBSEQUENT ? blend : MixBlend.setup;
2639
- if (timeline2 instanceof RotateTimeline) {
2663
+ if (!shortestRotation && timeline2 instanceof RotateTimeline) {
2640
2664
  this.applyRotateTimeline(timeline2, skeleton, applyTime, mix, timelineBlend, current.timelinesRotation, ii << 1, firstFrame);
2641
2665
  } else if (timeline2 instanceof AttachmentTimeline) {
2642
2666
  this.applyAttachmentTimeline(timeline2, skeleton, applyTime, blend, true);
@@ -2696,7 +2720,8 @@ var spine = (() => {
2696
2720
  } else {
2697
2721
  let timelineMode = from.timelineMode;
2698
2722
  let timelineHoldMix = from.timelineHoldMix;
2699
- let firstFrame = from.timelinesRotation.length != timelineCount << 1;
2723
+ let shortestRotation = from.shortestRotation;
2724
+ let firstFrame = !shortestRotation && from.timelinesRotation.length != timelineCount << 1;
2700
2725
  if (firstFrame)
2701
2726
  from.timelinesRotation.length = timelineCount << 1;
2702
2727
  from.totalAlpha = 0;
@@ -2731,7 +2756,7 @@ var spine = (() => {
2731
2756
  break;
2732
2757
  }
2733
2758
  from.totalAlpha += alpha;
2734
- if (timeline instanceof RotateTimeline)
2759
+ if (!shortestRotation && timeline instanceof RotateTimeline)
2735
2760
  this.applyRotateTimeline(timeline, skeleton, applyTime, alpha, timelineBlend, from.timelinesRotation, i << 1, firstFrame);
2736
2761
  else if (timeline instanceof AttachmentTimeline)
2737
2762
  this.applyAttachmentTimeline(timeline, skeleton, applyTime, timelineBlend, attachments);
@@ -2982,10 +3007,13 @@ var spine = (() => {
2982
3007
  }
2983
3008
  trackEntry(trackIndex, animation, loop, last) {
2984
3009
  let entry = this.trackEntryPool.obtain();
3010
+ entry.reset();
2985
3011
  entry.trackIndex = trackIndex;
2986
3012
  entry.animation = animation;
2987
3013
  entry.loop = loop;
2988
3014
  entry.holdPrevious = false;
3015
+ entry.reverse = false;
3016
+ entry.shortestRotation = false;
2989
3017
  entry.eventThreshold = 0;
2990
3018
  entry.attachmentThreshold = 0;
2991
3019
  entry.drawOrderThreshold = 0;
@@ -3000,9 +3028,10 @@ var spine = (() => {
3000
3028
  entry.trackEnd = Number.MAX_VALUE;
3001
3029
  entry.timeScale = 1;
3002
3030
  entry.alpha = 1;
3003
- entry.interruptAlpha = 1;
3004
3031
  entry.mixTime = 0;
3005
3032
  entry.mixDuration = !last ? 0 : this.data.getMix(last.animation, animation);
3033
+ entry.interruptAlpha = 1;
3034
+ entry.totalAlpha = 0;
3006
3035
  entry.mixBlend = MixBlend.replace;
3007
3036
  return entry;
3008
3037
  }
@@ -3092,6 +3121,35 @@ var spine = (() => {
3092
3121
  };
3093
3122
  var TrackEntry = class {
3094
3123
  constructor() {
3124
+ this.animation = null;
3125
+ this.previous = null;
3126
+ this.next = null;
3127
+ this.mixingFrom = null;
3128
+ this.mixingTo = null;
3129
+ this.listener = null;
3130
+ this.trackIndex = 0;
3131
+ this.loop = false;
3132
+ this.holdPrevious = false;
3133
+ this.reverse = false;
3134
+ this.shortestRotation = false;
3135
+ this.eventThreshold = 0;
3136
+ this.attachmentThreshold = 0;
3137
+ this.drawOrderThreshold = 0;
3138
+ this.animationStart = 0;
3139
+ this.animationEnd = 0;
3140
+ this.animationLast = 0;
3141
+ this.nextAnimationLast = 0;
3142
+ this.delay = 0;
3143
+ this.trackTime = 0;
3144
+ this.trackLast = 0;
3145
+ this.nextTrackLast = 0;
3146
+ this.trackEnd = 0;
3147
+ this.timeScale = 0;
3148
+ this.alpha = 0;
3149
+ this.mixTime = 0;
3150
+ this.mixDuration = 0;
3151
+ this.interruptAlpha = 0;
3152
+ this.totalAlpha = 0;
3095
3153
  this.mixBlend = MixBlend.replace;
3096
3154
  this.timelineMode = new Array();
3097
3155
  this.timelineHoldMix = new Array();
@@ -3142,6 +3200,7 @@ var spine = (() => {
3142
3200
  constructor(animState) {
3143
3201
  this.objects = [];
3144
3202
  this.drainDisabled = false;
3203
+ this.animState = null;
3145
3204
  this.animState = animState;
3146
3205
  }
3147
3206
  start(entry) {
@@ -3268,6 +3327,7 @@ var spine = (() => {
3268
3327
  // spine-core/src/AnimationStateData.ts
3269
3328
  var AnimationStateData = class {
3270
3329
  constructor(skeletonData) {
3330
+ this.skeletonData = null;
3271
3331
  this.animationToMixTime = {};
3272
3332
  this.defaultMix = 0;
3273
3333
  if (!skeletonData)
@@ -3316,6 +3376,7 @@ var spine = (() => {
3316
3376
  var ClippingAttachment = class extends VertexAttachment {
3317
3377
  constructor(name) {
3318
3378
  super(name);
3379
+ this.endSlot = null;
3319
3380
  this.color = new Color(0.2275, 0.2275, 0.8078, 1);
3320
3381
  }
3321
3382
  copy() {
@@ -3539,6 +3600,7 @@ var spine = (() => {
3539
3600
  };
3540
3601
  var TextureAtlasReader = class {
3541
3602
  constructor(text) {
3603
+ this.lines = null;
3542
3604
  this.index = 0;
3543
3605
  this.lines = text.split(/\r\n|\r|\n/);
3544
3606
  }
@@ -3572,10 +3634,15 @@ var spine = (() => {
3572
3634
  };
3573
3635
  var TextureAtlasPage = class {
3574
3636
  constructor() {
3637
+ this.name = null;
3575
3638
  this.minFilter = TextureFilter.Nearest;
3576
3639
  this.magFilter = TextureFilter.Nearest;
3577
3640
  this.uWrap = TextureWrap.ClampToEdge;
3578
3641
  this.vWrap = TextureWrap.ClampToEdge;
3642
+ this.texture = null;
3643
+ this.width = 0;
3644
+ this.height = 0;
3645
+ this.pma = false;
3579
3646
  }
3580
3647
  setTexture(texture) {
3581
3648
  this.texture = texture;
@@ -3584,13 +3651,39 @@ var spine = (() => {
3584
3651
  }
3585
3652
  };
3586
3653
  var TextureAtlasRegion = class extends TextureRegion {
3654
+ constructor() {
3655
+ super(...arguments);
3656
+ this.page = null;
3657
+ this.name = null;
3658
+ this.x = 0;
3659
+ this.y = 0;
3660
+ this.offsetX = 0;
3661
+ this.offsetY = 0;
3662
+ this.originalWidth = 0;
3663
+ this.originalHeight = 0;
3664
+ this.index = 0;
3665
+ this.degrees = 0;
3666
+ this.names = null;
3667
+ this.values = null;
3668
+ }
3587
3669
  };
3588
3670
 
3589
3671
  // spine-core/src/attachments/MeshAttachment.ts
3590
3672
  var MeshAttachment = class extends VertexAttachment {
3591
3673
  constructor(name) {
3592
3674
  super(name);
3675
+ this.region = null;
3676
+ this.path = null;
3677
+ this.regionUVs = null;
3678
+ this.uvs = null;
3679
+ this.triangles = null;
3593
3680
  this.color = new Color(1, 1, 1, 1);
3681
+ this.width = 0;
3682
+ this.height = 0;
3683
+ this.hullLength = 0;
3684
+ this.edges = null;
3685
+ this.parentMesh = null;
3686
+ this.sequence = null;
3594
3687
  this.tempColor = new Color(0, 0, 0, 0);
3595
3688
  }
3596
3689
  updateRegion() {
@@ -3712,6 +3805,7 @@ var spine = (() => {
3712
3805
  var PathAttachment = class extends VertexAttachment {
3713
3806
  constructor(name) {
3714
3807
  super(name);
3808
+ this.lengths = null;
3715
3809
  this.closed = false;
3716
3810
  this.constantSpeed = false;
3717
3811
  this.color = new Color(1, 1, 1, 1);
@@ -3732,6 +3826,9 @@ var spine = (() => {
3732
3826
  var PointAttachment = class extends VertexAttachment {
3733
3827
  constructor(name) {
3734
3828
  super(name);
3829
+ this.x = 0;
3830
+ this.y = 0;
3831
+ this.rotation = 0;
3735
3832
  this.color = new Color(0.38, 0.94, 0, 1);
3736
3833
  }
3737
3834
  computeWorldPosition(bone, point) {
@@ -3767,6 +3864,10 @@ var spine = (() => {
3767
3864
  this.width = 0;
3768
3865
  this.height = 0;
3769
3866
  this.color = new Color(1, 1, 1, 1);
3867
+ this.path = null;
3868
+ this.rendererObject = null;
3869
+ this.region = null;
3870
+ this.sequence = null;
3770
3871
  this.offset = Utils.newFloatArray(8);
3771
3872
  this.uvs = Utils.newFloatArray(8);
3772
3873
  this.tempColor = new Color(1, 1, 1, 1);
@@ -3905,6 +4006,7 @@ var spine = (() => {
3905
4006
  // spine-core/src/AtlasAttachmentLoader.ts
3906
4007
  var AtlasAttachmentLoader = class {
3907
4008
  constructor(atlas) {
4009
+ this.atlas = null;
3908
4010
  this.atlas = atlas;
3909
4011
  }
3910
4012
  loadSequence(name, basePath, sequence) {
@@ -3960,6 +4062,10 @@ var spine = (() => {
3960
4062
  // spine-core/src/BoneData.ts
3961
4063
  var BoneData = class {
3962
4064
  constructor(index, name, parent) {
4065
+ this.index = 0;
4066
+ this.name = null;
4067
+ this.parent = null;
4068
+ this.length = 0;
3963
4069
  this.x = 0;
3964
4070
  this.y = 0;
3965
4071
  this.rotation = 0;
@@ -3991,6 +4097,9 @@ var spine = (() => {
3991
4097
  // spine-core/src/Bone.ts
3992
4098
  var Bone = class {
3993
4099
  constructor(data, skeleton, parent) {
4100
+ this.data = null;
4101
+ this.skeleton = null;
4102
+ this.parent = null;
3994
4103
  this.children = new Array();
3995
4104
  this.x = 0;
3996
4105
  this.y = 0;
@@ -4243,6 +4352,7 @@ var spine = (() => {
4243
4352
  // spine-core/src/AssetManagerBase.ts
4244
4353
  var AssetManagerBase = class {
4245
4354
  constructor(textureLoader, pathPrefix = "", downloader = null) {
4355
+ this.pathPrefix = null;
4246
4356
  this.assets = {};
4247
4357
  this.errors = {};
4248
4358
  this.toLoad = 0;
@@ -4326,7 +4436,7 @@ var spine = (() => {
4326
4436
  image.src = path;
4327
4437
  }
4328
4438
  }
4329
- loadTextureAtlas(path, success = null, error = null) {
4439
+ loadTextureAtlas(path, success = null, error = null, fileAlias = null) {
4330
4440
  let index = path.lastIndexOf("/");
4331
4441
  let parent = index >= 0 ? path.substring(0, index + 1) : "";
4332
4442
  path = this.start(path);
@@ -4335,7 +4445,7 @@ var spine = (() => {
4335
4445
  let atlas = new TextureAtlas(atlasText);
4336
4446
  let toLoad = atlas.pages.length, abort = false;
4337
4447
  for (let page of atlas.pages) {
4338
- this.loadTexture(parent + page.name, (imagePath, texture) => {
4448
+ this.loadTexture(fileAlias == null ? parent + page.name : fileAlias[page.name], (imagePath, texture) => {
4339
4449
  if (!abort) {
4340
4450
  page.setTexture(texture);
4341
4451
  if (--toLoad == 0)
@@ -4512,6 +4622,13 @@ var spine = (() => {
4512
4622
  // spine-core/src/Event.ts
4513
4623
  var Event = class {
4514
4624
  constructor(time, data) {
4625
+ this.data = null;
4626
+ this.intValue = 0;
4627
+ this.floatValue = 0;
4628
+ this.stringValue = null;
4629
+ this.time = 0;
4630
+ this.volume = 0;
4631
+ this.balance = 0;
4515
4632
  if (!data)
4516
4633
  throw new Error("data cannot be null.");
4517
4634
  this.time = time;
@@ -4522,6 +4639,13 @@ var spine = (() => {
4522
4639
  // spine-core/src/EventData.ts
4523
4640
  var EventData = class {
4524
4641
  constructor(name) {
4642
+ this.name = null;
4643
+ this.intValue = 0;
4644
+ this.floatValue = 0;
4645
+ this.stringValue = null;
4646
+ this.audioPath = null;
4647
+ this.volume = 0;
4648
+ this.balance = 0;
4525
4649
  this.name = name;
4526
4650
  }
4527
4651
  };
@@ -4529,6 +4653,9 @@ var spine = (() => {
4529
4653
  // spine-core/src/IkConstraint.ts
4530
4654
  var IkConstraint = class {
4531
4655
  constructor(data, skeleton) {
4656
+ this.data = null;
4657
+ this.bones = null;
4658
+ this.target = null;
4532
4659
  this.bendDirection = 0;
4533
4660
  this.compress = false;
4534
4661
  this.stretch = false;
@@ -4767,6 +4894,7 @@ var spine = (() => {
4767
4894
  constructor(name) {
4768
4895
  super(name, 0, false);
4769
4896
  this.bones = new Array();
4897
+ this.target = null;
4770
4898
  this.bendDirection = 1;
4771
4899
  this.compress = false;
4772
4900
  this.stretch = false;
@@ -4781,6 +4909,13 @@ var spine = (() => {
4781
4909
  constructor(name) {
4782
4910
  super(name, 0, false);
4783
4911
  this.bones = new Array();
4912
+ this.target = null;
4913
+ this.positionMode = null;
4914
+ this.spacingMode = null;
4915
+ this.rotateMode = null;
4916
+ this.offsetRotation = 0;
4917
+ this.position = 0;
4918
+ this.spacing = 0;
4784
4919
  this.mixRotate = 0;
4785
4920
  this.mixX = 0;
4786
4921
  this.mixY = 0;
@@ -4808,6 +4943,9 @@ var spine = (() => {
4808
4943
  // spine-core/src/PathConstraint.ts
4809
4944
  var _PathConstraint = class {
4810
4945
  constructor(data, skeleton) {
4946
+ this.data = null;
4947
+ this.bones = null;
4948
+ this.target = null;
4811
4949
  this.position = 0;
4812
4950
  this.spacing = 0;
4813
4951
  this.mixRotate = 0;
@@ -5227,6 +5365,12 @@ var spine = (() => {
5227
5365
  // spine-core/src/Slot.ts
5228
5366
  var Slot = class {
5229
5367
  constructor(data, bone) {
5368
+ this.data = null;
5369
+ this.bone = null;
5370
+ this.color = null;
5371
+ this.darkColor = null;
5372
+ this.attachment = null;
5373
+ this.attachmentState = 0;
5230
5374
  this.deform = new Array();
5231
5375
  if (!data)
5232
5376
  throw new Error("data cannot be null.");
@@ -5269,6 +5413,9 @@ var spine = (() => {
5269
5413
  // spine-core/src/TransformConstraint.ts
5270
5414
  var TransformConstraint = class {
5271
5415
  constructor(data, skeleton) {
5416
+ this.data = null;
5417
+ this.bones = null;
5418
+ this.target = null;
5272
5419
  this.mixRotate = 0;
5273
5420
  this.mixX = 0;
5274
5421
  this.mixY = 0;
@@ -5476,7 +5623,16 @@ var spine = (() => {
5476
5623
  // spine-core/src/Skeleton.ts
5477
5624
  var Skeleton = class {
5478
5625
  constructor(data) {
5626
+ this.data = null;
5627
+ this.bones = null;
5628
+ this.slots = null;
5629
+ this.drawOrder = null;
5630
+ this.ikConstraints = null;
5631
+ this.transformConstraints = null;
5632
+ this.pathConstraints = null;
5479
5633
  this._updateCache = new Array();
5634
+ this.skin = null;
5635
+ this.color = null;
5480
5636
  this.scaleX = 1;
5481
5637
  this.scaleY = 1;
5482
5638
  this.x = 0;
@@ -5935,15 +6091,25 @@ var spine = (() => {
5935
6091
  // spine-core/src/SkeletonData.ts
5936
6092
  var SkeletonData = class {
5937
6093
  constructor() {
6094
+ this.name = null;
5938
6095
  this.bones = new Array();
5939
6096
  this.slots = new Array();
5940
6097
  this.skins = new Array();
6098
+ this.defaultSkin = null;
5941
6099
  this.events = new Array();
5942
6100
  this.animations = new Array();
5943
6101
  this.ikConstraints = new Array();
5944
6102
  this.transformConstraints = new Array();
5945
6103
  this.pathConstraints = new Array();
6104
+ this.x = 0;
6105
+ this.y = 0;
6106
+ this.width = 0;
6107
+ this.height = 0;
6108
+ this.version = null;
6109
+ this.hash = null;
5946
6110
  this.fps = 0;
6111
+ this.imagesPath = null;
6112
+ this.audioPath = null;
5947
6113
  }
5948
6114
  findBone(boneName) {
5949
6115
  if (!boneName)
@@ -6037,7 +6203,7 @@ var spine = (() => {
6037
6203
 
6038
6204
  // spine-core/src/Skin.ts
6039
6205
  var SkinEntry = class {
6040
- constructor(slotIndex, name, attachment) {
6206
+ constructor(slotIndex = 0, name = null, attachment = null) {
6041
6207
  this.slotIndex = slotIndex;
6042
6208
  this.name = name;
6043
6209
  this.attachment = attachment;
@@ -6045,6 +6211,7 @@ var spine = (() => {
6045
6211
  };
6046
6212
  var Skin = class {
6047
6213
  constructor(name) {
6214
+ this.name = null;
6048
6215
  this.attachments = new Array();
6049
6216
  this.bones = Array();
6050
6217
  this.constraints = new Array();
@@ -6195,7 +6362,13 @@ var spine = (() => {
6195
6362
  // spine-core/src/SlotData.ts
6196
6363
  var SlotData = class {
6197
6364
  constructor(index, name, boneData) {
6365
+ this.index = 0;
6366
+ this.name = null;
6367
+ this.boneData = null;
6198
6368
  this.color = new Color(1, 1, 1, 1);
6369
+ this.darkColor = null;
6370
+ this.attachmentName = null;
6371
+ this.blendMode = null;
6199
6372
  if (index < 0)
6200
6373
  throw new Error("index must be >= 0.");
6201
6374
  if (!name)
@@ -6220,6 +6393,7 @@ var spine = (() => {
6220
6393
  constructor(name) {
6221
6394
  super(name, 0, false);
6222
6395
  this.bones = new Array();
6396
+ this.target = null;
6223
6397
  this.mixRotate = 0;
6224
6398
  this.mixX = 0;
6225
6399
  this.mixY = 0;
@@ -6241,6 +6415,7 @@ var spine = (() => {
6241
6415
  var SkeletonBinary = class {
6242
6416
  constructor(attachmentLoader) {
6243
6417
  this.scale = 1;
6418
+ this.attachmentLoader = null;
6244
6419
  this.linkedMeshes = new Array();
6245
6420
  this.attachmentLoader = attachmentLoader;
6246
6421
  }
@@ -7952,6 +8127,7 @@ var spine = (() => {
7952
8127
  // spine-core/src/SkeletonJson.ts
7953
8128
  var SkeletonJson = class {
7954
8129
  constructor(attachmentLoader) {
8130
+ this.attachmentLoader = null;
7955
8131
  this.scale = 1;
7956
8132
  this.linkedMeshes = new Array();
7957
8133
  this.attachmentLoader = attachmentLoader;
@@ -8950,9 +9126,7 @@ var spine = (() => {
8950
9126
  }
8951
9127
  ctx.scale(1, -1);
8952
9128
  ctx.translate(-w / 2, -h / 2);
8953
- if (color.r != 1 || color.g != 1 || color.b != 1 || color.a != 1) {
8954
- ctx.globalAlpha = color.a;
8955
- }
9129
+ ctx.globalAlpha = color.a;
8956
9130
  ctx.drawImage(image, region.x, region.y, w, h, 0, 0, w, h);
8957
9131
  if (this.debugRendering)
8958
9132
  ctx.strokeRect(0, 0, w, h);
@@ -8991,9 +9165,7 @@ var spine = (() => {
8991
9165
  let slotColor = slot.color;
8992
9166
  let attachmentColor = attachment.color;
8993
9167
  color.set(skeletonColor.r * slotColor.r * attachmentColor.r, skeletonColor.g * slotColor.g * attachmentColor.g, skeletonColor.b * slotColor.b * attachmentColor.b, skeletonColor.a * slotColor.a * attachmentColor.a);
8994
- if (color.r != 1 || color.g != 1 || color.b != 1 || color.a != 1) {
8995
- ctx.globalAlpha = color.a;
8996
- }
9168
+ ctx.globalAlpha = color.a;
8997
9169
  for (var j = 0; j < triangles.length; j += 3) {
8998
9170
  let t1 = triangles[j] * 8, t2 = triangles[j + 1] * 8, t3 = triangles[j + 2] * 8;
8999
9171
  let x0 = vertices[t1], y0 = vertices[t1 + 1], u0 = vertices[t1 + 6], v0 = vertices[t1 + 7];