@esotericsoftware/spine-canvas 4.0.15 → 4.0.19

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.
@@ -512,6 +512,8 @@ var spine = (() => {
512
512
  constructor(name) {
513
513
  super(name);
514
514
  this.id = _VertexAttachment.nextID++;
515
+ this.bones = null;
516
+ this.vertices = null;
515
517
  this.worldVerticesLength = 0;
516
518
  this.deformAttachment = this;
517
519
  }
@@ -594,6 +596,8 @@ var spine = (() => {
594
596
  // spine-core/src/Animation.ts
595
597
  var Animation = class {
596
598
  constructor(name, timelines, duration) {
599
+ this.timelines = null;
600
+ this.timelineIds = null;
597
601
  if (!name)
598
602
  throw new Error("name cannot be null.");
599
603
  this.name = name;
@@ -662,6 +666,8 @@ var spine = (() => {
662
666
  };
663
667
  var Timeline = class {
664
668
  constructor(frameCount, propertyIds) {
669
+ this.propertyIds = null;
670
+ this.frames = null;
665
671
  this.propertyIds = propertyIds;
666
672
  this.frames = Utils.newFloatArray(frameCount * this.getFrameEntries());
667
673
  }
@@ -695,6 +701,7 @@ var spine = (() => {
695
701
  var CurveTimeline = class extends Timeline {
696
702
  constructor(frameCount, bezierCount, propertyIds) {
697
703
  super(frameCount, propertyIds);
704
+ this.curves = null;
698
705
  this.curves = Utils.newFloatArray(frameCount + bezierCount * 18);
699
706
  this.curves[frameCount - 1] = 1;
700
707
  }
@@ -1031,8 +1038,8 @@ var spine = (() => {
1031
1038
  bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;
1032
1039
  break;
1033
1040
  case 3:
1034
- bone.scaleX = (x - bone.data.scaleX) * alpha;
1035
- bone.scaleY = (y - bone.data.scaleY) * alpha;
1041
+ bone.scaleX += (x - bone.data.scaleX) * alpha;
1042
+ bone.scaleY += (y - bone.data.scaleY) * alpha;
1036
1043
  }
1037
1044
  } else {
1038
1045
  switch (blend) {
@@ -1098,7 +1105,7 @@ var spine = (() => {
1098
1105
  bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;
1099
1106
  break;
1100
1107
  case 3:
1101
- bone.scaleX = (x - bone.data.scaleX) * alpha;
1108
+ bone.scaleX += (x - bone.data.scaleX) * alpha;
1102
1109
  }
1103
1110
  } else {
1104
1111
  switch (blend) {
@@ -1159,7 +1166,7 @@ var spine = (() => {
1159
1166
  bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;
1160
1167
  break;
1161
1168
  case 3:
1162
- bone.scaleY = (y - bone.data.scaleY) * alpha;
1169
+ bone.scaleY += (y - bone.data.scaleY) * alpha;
1163
1170
  }
1164
1171
  } else {
1165
1172
  switch (blend) {
@@ -1754,6 +1761,8 @@ var spine = (() => {
1754
1761
  Property.deform + "|" + slotIndex + "|" + attachment.id
1755
1762
  ]);
1756
1763
  this.slotIndex = 0;
1764
+ this.attachment = null;
1765
+ this.vertices = null;
1757
1766
  this.slotIndex = slotIndex;
1758
1767
  this.attachment = attachment;
1759
1768
  this.vertices = new Array(frameCount);
@@ -1970,6 +1979,7 @@ var spine = (() => {
1970
1979
  var _EventTimeline = class extends Timeline {
1971
1980
  constructor(frameCount) {
1972
1981
  super(frameCount, _EventTimeline.propertyIds);
1982
+ this.events = null;
1973
1983
  this.events = new Array(frameCount);
1974
1984
  }
1975
1985
  getFrameCount() {
@@ -2012,6 +2022,7 @@ var spine = (() => {
2012
2022
  var _DrawOrderTimeline = class extends Timeline {
2013
2023
  constructor(frameCount) {
2014
2024
  super(frameCount, _DrawOrderTimeline.propertyIds);
2025
+ this.drawOrders = null;
2015
2026
  this.drawOrders = new Array(frameCount);
2016
2027
  }
2017
2028
  getFrameCount() {
@@ -2050,6 +2061,7 @@ var spine = (() => {
2050
2061
  super(frameCount, bezierCount, [
2051
2062
  Property.ikConstraint + "|" + ikConstraintIndex
2052
2063
  ]);
2064
+ this.ikConstraintIndex = 0;
2053
2065
  this.ikConstraintIndex = ikConstraintIndex;
2054
2066
  }
2055
2067
  getFrameEntries() {
@@ -2135,6 +2147,7 @@ var spine = (() => {
2135
2147
  super(frameCount, bezierCount, [
2136
2148
  Property.transformConstraint + "|" + transformConstraintIndex
2137
2149
  ]);
2150
+ this.transformConstraintIndex = 0;
2138
2151
  this.transformConstraintIndex = transformConstraintIndex;
2139
2152
  }
2140
2153
  getFrameEntries() {
@@ -2234,6 +2247,7 @@ var spine = (() => {
2234
2247
  var PathConstraintPositionTimeline = class extends CurveTimeline1 {
2235
2248
  constructor(frameCount, bezierCount, pathConstraintIndex) {
2236
2249
  super(frameCount, bezierCount, Property.pathConstraintPosition + "|" + pathConstraintIndex);
2250
+ this.pathConstraintIndex = 0;
2237
2251
  this.pathConstraintIndex = pathConstraintIndex;
2238
2252
  }
2239
2253
  apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {
@@ -2364,6 +2378,7 @@ var spine = (() => {
2364
2378
  // spine-core/src/AnimationState.ts
2365
2379
  var AnimationState = class {
2366
2380
  constructor(data) {
2381
+ this.data = null;
2367
2382
  this.tracks = new Array();
2368
2383
  this.timeScale = 1;
2369
2384
  this.unkeyedState = 0;
@@ -2842,6 +2857,7 @@ var spine = (() => {
2842
2857
  }
2843
2858
  trackEntry(trackIndex, animation, loop, last) {
2844
2859
  let entry = this.trackEntryPool.obtain();
2860
+ entry.reset();
2845
2861
  entry.trackIndex = trackIndex;
2846
2862
  entry.animation = animation;
2847
2863
  entry.loop = loop;
@@ -2952,6 +2968,34 @@ var spine = (() => {
2952
2968
  };
2953
2969
  var TrackEntry = class {
2954
2970
  constructor() {
2971
+ this.animation = null;
2972
+ this.previous = null;
2973
+ this.next = null;
2974
+ this.mixingFrom = null;
2975
+ this.mixingTo = null;
2976
+ this.listener = null;
2977
+ this.trackIndex = 0;
2978
+ this.loop = false;
2979
+ this.holdPrevious = false;
2980
+ this.reverse = false;
2981
+ this.eventThreshold = 0;
2982
+ this.attachmentThreshold = 0;
2983
+ this.drawOrderThreshold = 0;
2984
+ this.animationStart = 0;
2985
+ this.animationEnd = 0;
2986
+ this.animationLast = 0;
2987
+ this.nextAnimationLast = 0;
2988
+ this.delay = 0;
2989
+ this.trackTime = 0;
2990
+ this.trackLast = 0;
2991
+ this.nextTrackLast = 0;
2992
+ this.trackEnd = 0;
2993
+ this.timeScale = 0;
2994
+ this.alpha = 0;
2995
+ this.mixTime = 0;
2996
+ this.mixDuration = 0;
2997
+ this.interruptAlpha = 0;
2998
+ this.totalAlpha = 0;
2955
2999
  this.mixBlend = MixBlend.replace;
2956
3000
  this.timelineMode = new Array();
2957
3001
  this.timelineHoldMix = new Array();
@@ -3002,6 +3046,7 @@ var spine = (() => {
3002
3046
  constructor(animState) {
3003
3047
  this.objects = [];
3004
3048
  this.drainDisabled = false;
3049
+ this.animState = null;
3005
3050
  this.animState = animState;
3006
3051
  }
3007
3052
  start(entry) {
@@ -3128,6 +3173,7 @@ var spine = (() => {
3128
3173
  // spine-core/src/AnimationStateData.ts
3129
3174
  var AnimationStateData = class {
3130
3175
  constructor(skeletonData) {
3176
+ this.skeletonData = null;
3131
3177
  this.animationToMixTime = {};
3132
3178
  this.defaultMix = 0;
3133
3179
  if (!skeletonData)
@@ -3176,6 +3222,7 @@ var spine = (() => {
3176
3222
  var ClippingAttachment = class extends VertexAttachment {
3177
3223
  constructor(name) {
3178
3224
  super(name);
3225
+ this.endSlot = null;
3179
3226
  this.color = new Color(0.2275, 0.2275, 0.8078, 1);
3180
3227
  }
3181
3228
  copy() {
@@ -3399,6 +3446,7 @@ var spine = (() => {
3399
3446
  };
3400
3447
  var TextureAtlasReader = class {
3401
3448
  constructor(text) {
3449
+ this.lines = null;
3402
3450
  this.index = 0;
3403
3451
  this.lines = text.split(/\r\n|\r|\n/);
3404
3452
  }
@@ -3432,10 +3480,15 @@ var spine = (() => {
3432
3480
  };
3433
3481
  var TextureAtlasPage = class {
3434
3482
  constructor() {
3483
+ this.name = null;
3435
3484
  this.minFilter = TextureFilter.Nearest;
3436
3485
  this.magFilter = TextureFilter.Nearest;
3437
3486
  this.uWrap = TextureWrap.ClampToEdge;
3438
3487
  this.vWrap = TextureWrap.ClampToEdge;
3488
+ this.texture = null;
3489
+ this.width = 0;
3490
+ this.height = 0;
3491
+ this.pma = false;
3439
3492
  }
3440
3493
  setTexture(texture) {
3441
3494
  this.texture = texture;
@@ -3444,13 +3497,38 @@ var spine = (() => {
3444
3497
  }
3445
3498
  };
3446
3499
  var TextureAtlasRegion = class extends TextureRegion {
3500
+ constructor() {
3501
+ super(...arguments);
3502
+ this.page = null;
3503
+ this.name = null;
3504
+ this.x = 0;
3505
+ this.y = 0;
3506
+ this.offsetX = 0;
3507
+ this.offsetY = 0;
3508
+ this.originalWidth = 0;
3509
+ this.originalHeight = 0;
3510
+ this.index = 0;
3511
+ this.degrees = 0;
3512
+ this.names = null;
3513
+ this.values = null;
3514
+ }
3447
3515
  };
3448
3516
 
3449
3517
  // spine-core/src/attachments/MeshAttachment.ts
3450
3518
  var MeshAttachment = class extends VertexAttachment {
3451
3519
  constructor(name) {
3452
3520
  super(name);
3521
+ this.region = null;
3522
+ this.path = null;
3523
+ this.regionUVs = null;
3524
+ this.uvs = null;
3525
+ this.triangles = null;
3453
3526
  this.color = new Color(1, 1, 1, 1);
3527
+ this.width = 0;
3528
+ this.height = 0;
3529
+ this.hullLength = 0;
3530
+ this.edges = null;
3531
+ this.parentMesh = null;
3454
3532
  this.tempColor = new Color(0, 0, 0, 0);
3455
3533
  }
3456
3534
  updateUVs() {
@@ -3565,6 +3643,7 @@ var spine = (() => {
3565
3643
  var PathAttachment = class extends VertexAttachment {
3566
3644
  constructor(name) {
3567
3645
  super(name);
3646
+ this.lengths = null;
3568
3647
  this.closed = false;
3569
3648
  this.constantSpeed = false;
3570
3649
  this.color = new Color(1, 1, 1, 1);
@@ -3585,6 +3664,9 @@ var spine = (() => {
3585
3664
  var PointAttachment = class extends VertexAttachment {
3586
3665
  constructor(name) {
3587
3666
  super(name);
3667
+ this.x = 0;
3668
+ this.y = 0;
3669
+ this.rotation = 0;
3588
3670
  this.color = new Color(0.38, 0.94, 0, 1);
3589
3671
  }
3590
3672
  computeWorldPosition(bone, point) {
@@ -3620,6 +3702,9 @@ var spine = (() => {
3620
3702
  this.width = 0;
3621
3703
  this.height = 0;
3622
3704
  this.color = new Color(1, 1, 1, 1);
3705
+ this.path = null;
3706
+ this.rendererObject = null;
3707
+ this.region = null;
3623
3708
  this.offset = Utils.newFloatArray(8);
3624
3709
  this.uvs = Utils.newFloatArray(8);
3625
3710
  this.tempColor = new Color(1, 1, 1, 1);
@@ -3757,6 +3842,7 @@ var spine = (() => {
3757
3842
  // spine-core/src/AtlasAttachmentLoader.ts
3758
3843
  var AtlasAttachmentLoader = class {
3759
3844
  constructor(atlas) {
3845
+ this.atlas = null;
3760
3846
  this.atlas = atlas;
3761
3847
  }
3762
3848
  newRegionAttachment(skin, name, path) {
@@ -3794,6 +3880,10 @@ var spine = (() => {
3794
3880
  // spine-core/src/BoneData.ts
3795
3881
  var BoneData = class {
3796
3882
  constructor(index, name, parent) {
3883
+ this.index = 0;
3884
+ this.name = null;
3885
+ this.parent = null;
3886
+ this.length = 0;
3797
3887
  this.x = 0;
3798
3888
  this.y = 0;
3799
3889
  this.rotation = 0;
@@ -3825,6 +3915,9 @@ var spine = (() => {
3825
3915
  // spine-core/src/Bone.ts
3826
3916
  var Bone = class {
3827
3917
  constructor(data, skeleton, parent) {
3918
+ this.data = null;
3919
+ this.skeleton = null;
3920
+ this.parent = null;
3828
3921
  this.children = new Array();
3829
3922
  this.x = 0;
3830
3923
  this.y = 0;
@@ -4077,6 +4170,7 @@ var spine = (() => {
4077
4170
  // spine-core/src/AssetManagerBase.ts
4078
4171
  var AssetManagerBase = class {
4079
4172
  constructor(textureLoader, pathPrefix = "", downloader = null) {
4173
+ this.pathPrefix = null;
4080
4174
  this.assets = {};
4081
4175
  this.errors = {};
4082
4176
  this.toLoad = 0;
@@ -4160,7 +4254,7 @@ var spine = (() => {
4160
4254
  image.src = path;
4161
4255
  }
4162
4256
  }
4163
- loadTextureAtlas(path, success = null, error = null) {
4257
+ loadTextureAtlas(path, success = null, error = null, fileAlias = null) {
4164
4258
  let index = path.lastIndexOf("/");
4165
4259
  let parent = index >= 0 ? path.substring(0, index + 1) : "";
4166
4260
  path = this.start(path);
@@ -4169,7 +4263,7 @@ var spine = (() => {
4169
4263
  let atlas = new TextureAtlas(atlasText);
4170
4264
  let toLoad = atlas.pages.length, abort = false;
4171
4265
  for (let page of atlas.pages) {
4172
- this.loadTexture(parent + page.name, (imagePath, texture) => {
4266
+ this.loadTexture(fileAlias == null ? parent + page.name : fileAlias[page.name], (imagePath, texture) => {
4173
4267
  if (!abort) {
4174
4268
  page.setTexture(texture);
4175
4269
  if (--toLoad == 0)
@@ -4316,7 +4410,7 @@ var spine = (() => {
4316
4410
  this.finish(url, request.status, request.response);
4317
4411
  };
4318
4412
  request.onload = () => {
4319
- if (request.status == 200)
4413
+ if (request.status == 200 || request.status == 0)
4320
4414
  this.finish(url, 200, new Uint8Array(request.response));
4321
4415
  else
4322
4416
  onerror();
@@ -4337,7 +4431,7 @@ var spine = (() => {
4337
4431
  finish(url, status, data) {
4338
4432
  let callbacks = this.callbacks[url];
4339
4433
  delete this.callbacks[url];
4340
- let args = status == 200 ? [data] : [status, data];
4434
+ let args = status == 200 || status == 0 ? [data] : [status, data];
4341
4435
  for (let i = args.length - 1, n = callbacks.length; i < n; i += 2)
4342
4436
  callbacks[i].apply(null, args);
4343
4437
  }
@@ -4346,6 +4440,13 @@ var spine = (() => {
4346
4440
  // spine-core/src/Event.ts
4347
4441
  var Event = class {
4348
4442
  constructor(time, data) {
4443
+ this.data = null;
4444
+ this.intValue = 0;
4445
+ this.floatValue = 0;
4446
+ this.stringValue = null;
4447
+ this.time = 0;
4448
+ this.volume = 0;
4449
+ this.balance = 0;
4349
4450
  if (!data)
4350
4451
  throw new Error("data cannot be null.");
4351
4452
  this.time = time;
@@ -4356,6 +4457,13 @@ var spine = (() => {
4356
4457
  // spine-core/src/EventData.ts
4357
4458
  var EventData = class {
4358
4459
  constructor(name) {
4460
+ this.name = null;
4461
+ this.intValue = 0;
4462
+ this.floatValue = 0;
4463
+ this.stringValue = null;
4464
+ this.audioPath = null;
4465
+ this.volume = 0;
4466
+ this.balance = 0;
4359
4467
  this.name = name;
4360
4468
  }
4361
4469
  };
@@ -4363,6 +4471,9 @@ var spine = (() => {
4363
4471
  // spine-core/src/IkConstraint.ts
4364
4472
  var IkConstraint = class {
4365
4473
  constructor(data, skeleton) {
4474
+ this.data = null;
4475
+ this.bones = null;
4476
+ this.target = null;
4366
4477
  this.bendDirection = 0;
4367
4478
  this.compress = false;
4368
4479
  this.stretch = false;
@@ -4601,6 +4712,7 @@ var spine = (() => {
4601
4712
  constructor(name) {
4602
4713
  super(name, 0, false);
4603
4714
  this.bones = new Array();
4715
+ this.target = null;
4604
4716
  this.bendDirection = 1;
4605
4717
  this.compress = false;
4606
4718
  this.stretch = false;
@@ -4615,6 +4727,13 @@ var spine = (() => {
4615
4727
  constructor(name) {
4616
4728
  super(name, 0, false);
4617
4729
  this.bones = new Array();
4730
+ this.target = null;
4731
+ this.positionMode = null;
4732
+ this.spacingMode = null;
4733
+ this.rotateMode = null;
4734
+ this.offsetRotation = 0;
4735
+ this.position = 0;
4736
+ this.spacing = 0;
4618
4737
  this.mixRotate = 0;
4619
4738
  this.mixX = 0;
4620
4739
  this.mixY = 0;
@@ -4642,6 +4761,9 @@ var spine = (() => {
4642
4761
  // spine-core/src/PathConstraint.ts
4643
4762
  var _PathConstraint = class {
4644
4763
  constructor(data, skeleton) {
4764
+ this.data = null;
4765
+ this.bones = null;
4766
+ this.target = null;
4645
4767
  this.position = 0;
4646
4768
  this.spacing = 0;
4647
4769
  this.mixRotate = 0;
@@ -5061,6 +5183,13 @@ var spine = (() => {
5061
5183
  // spine-core/src/Slot.ts
5062
5184
  var Slot = class {
5063
5185
  constructor(data, bone) {
5186
+ this.data = null;
5187
+ this.bone = null;
5188
+ this.color = null;
5189
+ this.darkColor = null;
5190
+ this.attachment = null;
5191
+ this.attachmentTime = 0;
5192
+ this.attachmentState = 0;
5064
5193
  this.deform = new Array();
5065
5194
  if (!data)
5066
5195
  throw new Error("data cannot be null.");
@@ -5109,6 +5238,9 @@ var spine = (() => {
5109
5238
  // spine-core/src/TransformConstraint.ts
5110
5239
  var TransformConstraint = class {
5111
5240
  constructor(data, skeleton) {
5241
+ this.data = null;
5242
+ this.bones = null;
5243
+ this.target = null;
5112
5244
  this.mixRotate = 0;
5113
5245
  this.mixX = 0;
5114
5246
  this.mixY = 0;
@@ -5316,7 +5448,16 @@ var spine = (() => {
5316
5448
  // spine-core/src/Skeleton.ts
5317
5449
  var Skeleton = class {
5318
5450
  constructor(data) {
5451
+ this.data = null;
5452
+ this.bones = null;
5453
+ this.slots = null;
5454
+ this.drawOrder = null;
5455
+ this.ikConstraints = null;
5456
+ this.transformConstraints = null;
5457
+ this.pathConstraints = null;
5319
5458
  this._updateCache = new Array();
5459
+ this.skin = null;
5460
+ this.color = null;
5320
5461
  this.time = 0;
5321
5462
  this.scaleX = 1;
5322
5463
  this.scaleY = 1;
@@ -5779,15 +5920,25 @@ var spine = (() => {
5779
5920
  // spine-core/src/SkeletonData.ts
5780
5921
  var SkeletonData = class {
5781
5922
  constructor() {
5923
+ this.name = null;
5782
5924
  this.bones = new Array();
5783
5925
  this.slots = new Array();
5784
5926
  this.skins = new Array();
5927
+ this.defaultSkin = null;
5785
5928
  this.events = new Array();
5786
5929
  this.animations = new Array();
5787
5930
  this.ikConstraints = new Array();
5788
5931
  this.transformConstraints = new Array();
5789
5932
  this.pathConstraints = new Array();
5933
+ this.x = 0;
5934
+ this.y = 0;
5935
+ this.width = 0;
5936
+ this.height = 0;
5937
+ this.version = null;
5938
+ this.hash = null;
5790
5939
  this.fps = 0;
5940
+ this.imagesPath = null;
5941
+ this.audioPath = null;
5791
5942
  }
5792
5943
  findBone(boneName) {
5793
5944
  if (!boneName)
@@ -5881,7 +6032,7 @@ var spine = (() => {
5881
6032
 
5882
6033
  // spine-core/src/Skin.ts
5883
6034
  var SkinEntry = class {
5884
- constructor(slotIndex, name, attachment) {
6035
+ constructor(slotIndex = 0, name = null, attachment = null) {
5885
6036
  this.slotIndex = slotIndex;
5886
6037
  this.name = name;
5887
6038
  this.attachment = attachment;
@@ -5889,6 +6040,7 @@ var spine = (() => {
5889
6040
  };
5890
6041
  var Skin = class {
5891
6042
  constructor(name) {
6043
+ this.name = null;
5892
6044
  this.attachments = new Array();
5893
6045
  this.bones = Array();
5894
6046
  this.constraints = new Array();
@@ -6039,7 +6191,13 @@ var spine = (() => {
6039
6191
  // spine-core/src/SlotData.ts
6040
6192
  var SlotData = class {
6041
6193
  constructor(index, name, boneData) {
6194
+ this.index = 0;
6195
+ this.name = null;
6196
+ this.boneData = null;
6042
6197
  this.color = new Color(1, 1, 1, 1);
6198
+ this.darkColor = null;
6199
+ this.attachmentName = null;
6200
+ this.blendMode = null;
6043
6201
  if (index < 0)
6044
6202
  throw new Error("index must be >= 0.");
6045
6203
  if (!name)
@@ -6064,6 +6222,7 @@ var spine = (() => {
6064
6222
  constructor(name) {
6065
6223
  super(name, 0, false);
6066
6224
  this.bones = new Array();
6225
+ this.target = null;
6067
6226
  this.mixRotate = 0;
6068
6227
  this.mixX = 0;
6069
6228
  this.mixY = 0;
@@ -6085,6 +6244,7 @@ var spine = (() => {
6085
6244
  var SkeletonBinary = class {
6086
6245
  constructor(attachmentLoader) {
6087
6246
  this.scale = 1;
6247
+ this.attachmentLoader = null;
6088
6248
  this.linkedMeshes = new Array();
6089
6249
  this.attachmentLoader = attachmentLoader;
6090
6250
  }
@@ -7760,6 +7920,7 @@ var spine = (() => {
7760
7920
  // spine-core/src/SkeletonJson.ts
7761
7921
  var SkeletonJson = class {
7762
7922
  constructor(attachmentLoader) {
7923
+ this.attachmentLoader = null;
7763
7924
  this.scale = 1;
7764
7925
  this.linkedMeshes = new Array();
7765
7926
  this.attachmentLoader = attachmentLoader;
@@ -8724,9 +8885,7 @@ var spine = (() => {
8724
8885
  }
8725
8886
  ctx.scale(1, -1);
8726
8887
  ctx.translate(-w / 2, -h / 2);
8727
- if (color.r != 1 || color.g != 1 || color.b != 1 || color.a != 1) {
8728
- ctx.globalAlpha = color.a;
8729
- }
8888
+ ctx.globalAlpha = color.a;
8730
8889
  ctx.drawImage(image, region.x, region.y, w, h, 0, 0, w, h);
8731
8890
  if (this.debugRendering)
8732
8891
  ctx.strokeRect(0, 0, w, h);
@@ -8765,9 +8924,7 @@ var spine = (() => {
8765
8924
  let slotColor = slot.color;
8766
8925
  let attachmentColor = attachment.color;
8767
8926
  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);
8768
- if (color.r != 1 || color.g != 1 || color.b != 1 || color.a != 1) {
8769
- ctx.globalAlpha = color.a;
8770
- }
8927
+ ctx.globalAlpha = color.a;
8771
8928
  for (var j = 0; j < triangles.length; j += 3) {
8772
8929
  let t1 = triangles[j] * 8, t2 = triangles[j + 1] * 8, t3 = triangles[j + 2] * 8;
8773
8930
  let x0 = vertices[t1], y0 = vertices[t1 + 1], u0 = vertices[t1 + 6], v0 = vertices[t1 + 7];