@esotericsoftware/spine-core 4.0.16 → 4.0.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -509,6 +509,8 @@ var spine = (() => {
509
509
  constructor(name) {
510
510
  super(name);
511
511
  this.id = _VertexAttachment.nextID++;
512
+ this.bones = null;
513
+ this.vertices = null;
512
514
  this.worldVerticesLength = 0;
513
515
  this.deformAttachment = this;
514
516
  }
@@ -591,6 +593,8 @@ var spine = (() => {
591
593
  // spine-core/src/Animation.ts
592
594
  var Animation = class {
593
595
  constructor(name, timelines, duration) {
596
+ this.timelines = null;
597
+ this.timelineIds = null;
594
598
  if (!name)
595
599
  throw new Error("name cannot be null.");
596
600
  this.name = name;
@@ -659,6 +663,8 @@ var spine = (() => {
659
663
  };
660
664
  var Timeline = class {
661
665
  constructor(frameCount, propertyIds) {
666
+ this.propertyIds = null;
667
+ this.frames = null;
662
668
  this.propertyIds = propertyIds;
663
669
  this.frames = Utils.newFloatArray(frameCount * this.getFrameEntries());
664
670
  }
@@ -692,6 +698,7 @@ var spine = (() => {
692
698
  var CurveTimeline = class extends Timeline {
693
699
  constructor(frameCount, bezierCount, propertyIds) {
694
700
  super(frameCount, propertyIds);
701
+ this.curves = null;
695
702
  this.curves = Utils.newFloatArray(frameCount + bezierCount * 18);
696
703
  this.curves[frameCount - 1] = 1;
697
704
  }
@@ -1028,8 +1035,8 @@ var spine = (() => {
1028
1035
  bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;
1029
1036
  break;
1030
1037
  case 3:
1031
- bone.scaleX = (x - bone.data.scaleX) * alpha;
1032
- bone.scaleY = (y - bone.data.scaleY) * alpha;
1038
+ bone.scaleX += (x - bone.data.scaleX) * alpha;
1039
+ bone.scaleY += (y - bone.data.scaleY) * alpha;
1033
1040
  }
1034
1041
  } else {
1035
1042
  switch (blend) {
@@ -1095,7 +1102,7 @@ var spine = (() => {
1095
1102
  bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;
1096
1103
  break;
1097
1104
  case 3:
1098
- bone.scaleX = (x - bone.data.scaleX) * alpha;
1105
+ bone.scaleX += (x - bone.data.scaleX) * alpha;
1099
1106
  }
1100
1107
  } else {
1101
1108
  switch (blend) {
@@ -1156,7 +1163,7 @@ var spine = (() => {
1156
1163
  bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;
1157
1164
  break;
1158
1165
  case 3:
1159
- bone.scaleY = (y - bone.data.scaleY) * alpha;
1166
+ bone.scaleY += (y - bone.data.scaleY) * alpha;
1160
1167
  }
1161
1168
  } else {
1162
1169
  switch (blend) {
@@ -1751,6 +1758,8 @@ var spine = (() => {
1751
1758
  Property.deform + "|" + slotIndex + "|" + attachment.id
1752
1759
  ]);
1753
1760
  this.slotIndex = 0;
1761
+ this.attachment = null;
1762
+ this.vertices = null;
1754
1763
  this.slotIndex = slotIndex;
1755
1764
  this.attachment = attachment;
1756
1765
  this.vertices = new Array(frameCount);
@@ -1967,6 +1976,7 @@ var spine = (() => {
1967
1976
  var _EventTimeline = class extends Timeline {
1968
1977
  constructor(frameCount) {
1969
1978
  super(frameCount, _EventTimeline.propertyIds);
1979
+ this.events = null;
1970
1980
  this.events = new Array(frameCount);
1971
1981
  }
1972
1982
  getFrameCount() {
@@ -2009,6 +2019,7 @@ var spine = (() => {
2009
2019
  var _DrawOrderTimeline = class extends Timeline {
2010
2020
  constructor(frameCount) {
2011
2021
  super(frameCount, _DrawOrderTimeline.propertyIds);
2022
+ this.drawOrders = null;
2012
2023
  this.drawOrders = new Array(frameCount);
2013
2024
  }
2014
2025
  getFrameCount() {
@@ -2047,6 +2058,7 @@ var spine = (() => {
2047
2058
  super(frameCount, bezierCount, [
2048
2059
  Property.ikConstraint + "|" + ikConstraintIndex
2049
2060
  ]);
2061
+ this.ikConstraintIndex = 0;
2050
2062
  this.ikConstraintIndex = ikConstraintIndex;
2051
2063
  }
2052
2064
  getFrameEntries() {
@@ -2132,6 +2144,7 @@ var spine = (() => {
2132
2144
  super(frameCount, bezierCount, [
2133
2145
  Property.transformConstraint + "|" + transformConstraintIndex
2134
2146
  ]);
2147
+ this.transformConstraintIndex = 0;
2135
2148
  this.transformConstraintIndex = transformConstraintIndex;
2136
2149
  }
2137
2150
  getFrameEntries() {
@@ -2231,6 +2244,7 @@ var spine = (() => {
2231
2244
  var PathConstraintPositionTimeline = class extends CurveTimeline1 {
2232
2245
  constructor(frameCount, bezierCount, pathConstraintIndex) {
2233
2246
  super(frameCount, bezierCount, Property.pathConstraintPosition + "|" + pathConstraintIndex);
2247
+ this.pathConstraintIndex = 0;
2234
2248
  this.pathConstraintIndex = pathConstraintIndex;
2235
2249
  }
2236
2250
  apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {
@@ -2361,6 +2375,7 @@ var spine = (() => {
2361
2375
  // spine-core/src/AnimationState.ts
2362
2376
  var AnimationState = class {
2363
2377
  constructor(data) {
2378
+ this.data = null;
2364
2379
  this.tracks = new Array();
2365
2380
  this.timeScale = 1;
2366
2381
  this.unkeyedState = 0;
@@ -2839,6 +2854,7 @@ var spine = (() => {
2839
2854
  }
2840
2855
  trackEntry(trackIndex, animation, loop, last) {
2841
2856
  let entry = this.trackEntryPool.obtain();
2857
+ entry.reset();
2842
2858
  entry.trackIndex = trackIndex;
2843
2859
  entry.animation = animation;
2844
2860
  entry.loop = loop;
@@ -2949,6 +2965,34 @@ var spine = (() => {
2949
2965
  };
2950
2966
  var TrackEntry = class {
2951
2967
  constructor() {
2968
+ this.animation = null;
2969
+ this.previous = null;
2970
+ this.next = null;
2971
+ this.mixingFrom = null;
2972
+ this.mixingTo = null;
2973
+ this.listener = null;
2974
+ this.trackIndex = 0;
2975
+ this.loop = false;
2976
+ this.holdPrevious = false;
2977
+ this.reverse = false;
2978
+ this.eventThreshold = 0;
2979
+ this.attachmentThreshold = 0;
2980
+ this.drawOrderThreshold = 0;
2981
+ this.animationStart = 0;
2982
+ this.animationEnd = 0;
2983
+ this.animationLast = 0;
2984
+ this.nextAnimationLast = 0;
2985
+ this.delay = 0;
2986
+ this.trackTime = 0;
2987
+ this.trackLast = 0;
2988
+ this.nextTrackLast = 0;
2989
+ this.trackEnd = 0;
2990
+ this.timeScale = 0;
2991
+ this.alpha = 0;
2992
+ this.mixTime = 0;
2993
+ this.mixDuration = 0;
2994
+ this.interruptAlpha = 0;
2995
+ this.totalAlpha = 0;
2952
2996
  this.mixBlend = MixBlend.replace;
2953
2997
  this.timelineMode = new Array();
2954
2998
  this.timelineHoldMix = new Array();
@@ -2999,6 +3043,7 @@ var spine = (() => {
2999
3043
  constructor(animState) {
3000
3044
  this.objects = [];
3001
3045
  this.drainDisabled = false;
3046
+ this.animState = null;
3002
3047
  this.animState = animState;
3003
3048
  }
3004
3049
  start(entry) {
@@ -3125,6 +3170,7 @@ var spine = (() => {
3125
3170
  // spine-core/src/AnimationStateData.ts
3126
3171
  var AnimationStateData = class {
3127
3172
  constructor(skeletonData) {
3173
+ this.skeletonData = null;
3128
3174
  this.animationToMixTime = {};
3129
3175
  this.defaultMix = 0;
3130
3176
  if (!skeletonData)
@@ -3173,6 +3219,7 @@ var spine = (() => {
3173
3219
  var ClippingAttachment = class extends VertexAttachment {
3174
3220
  constructor(name) {
3175
3221
  super(name);
3222
+ this.endSlot = null;
3176
3223
  this.color = new Color(0.2275, 0.2275, 0.8078, 1);
3177
3224
  }
3178
3225
  copy() {
@@ -3396,6 +3443,7 @@ var spine = (() => {
3396
3443
  };
3397
3444
  var TextureAtlasReader = class {
3398
3445
  constructor(text) {
3446
+ this.lines = null;
3399
3447
  this.index = 0;
3400
3448
  this.lines = text.split(/\r\n|\r|\n/);
3401
3449
  }
@@ -3429,10 +3477,15 @@ var spine = (() => {
3429
3477
  };
3430
3478
  var TextureAtlasPage = class {
3431
3479
  constructor() {
3480
+ this.name = null;
3432
3481
  this.minFilter = TextureFilter.Nearest;
3433
3482
  this.magFilter = TextureFilter.Nearest;
3434
3483
  this.uWrap = TextureWrap.ClampToEdge;
3435
3484
  this.vWrap = TextureWrap.ClampToEdge;
3485
+ this.texture = null;
3486
+ this.width = 0;
3487
+ this.height = 0;
3488
+ this.pma = false;
3436
3489
  }
3437
3490
  setTexture(texture) {
3438
3491
  this.texture = texture;
@@ -3441,13 +3494,38 @@ var spine = (() => {
3441
3494
  }
3442
3495
  };
3443
3496
  var TextureAtlasRegion = class extends TextureRegion {
3497
+ constructor() {
3498
+ super(...arguments);
3499
+ this.page = null;
3500
+ this.name = null;
3501
+ this.x = 0;
3502
+ this.y = 0;
3503
+ this.offsetX = 0;
3504
+ this.offsetY = 0;
3505
+ this.originalWidth = 0;
3506
+ this.originalHeight = 0;
3507
+ this.index = 0;
3508
+ this.degrees = 0;
3509
+ this.names = null;
3510
+ this.values = null;
3511
+ }
3444
3512
  };
3445
3513
 
3446
3514
  // spine-core/src/attachments/MeshAttachment.ts
3447
3515
  var MeshAttachment = class extends VertexAttachment {
3448
3516
  constructor(name) {
3449
3517
  super(name);
3518
+ this.region = null;
3519
+ this.path = null;
3520
+ this.regionUVs = null;
3521
+ this.uvs = null;
3522
+ this.triangles = null;
3450
3523
  this.color = new Color(1, 1, 1, 1);
3524
+ this.width = 0;
3525
+ this.height = 0;
3526
+ this.hullLength = 0;
3527
+ this.edges = null;
3528
+ this.parentMesh = null;
3451
3529
  this.tempColor = new Color(0, 0, 0, 0);
3452
3530
  }
3453
3531
  updateUVs() {
@@ -3562,6 +3640,7 @@ var spine = (() => {
3562
3640
  var PathAttachment = class extends VertexAttachment {
3563
3641
  constructor(name) {
3564
3642
  super(name);
3643
+ this.lengths = null;
3565
3644
  this.closed = false;
3566
3645
  this.constantSpeed = false;
3567
3646
  this.color = new Color(1, 1, 1, 1);
@@ -3582,6 +3661,9 @@ var spine = (() => {
3582
3661
  var PointAttachment = class extends VertexAttachment {
3583
3662
  constructor(name) {
3584
3663
  super(name);
3664
+ this.x = 0;
3665
+ this.y = 0;
3666
+ this.rotation = 0;
3585
3667
  this.color = new Color(0.38, 0.94, 0, 1);
3586
3668
  }
3587
3669
  computeWorldPosition(bone, point) {
@@ -3617,6 +3699,9 @@ var spine = (() => {
3617
3699
  this.width = 0;
3618
3700
  this.height = 0;
3619
3701
  this.color = new Color(1, 1, 1, 1);
3702
+ this.path = null;
3703
+ this.rendererObject = null;
3704
+ this.region = null;
3620
3705
  this.offset = Utils.newFloatArray(8);
3621
3706
  this.uvs = Utils.newFloatArray(8);
3622
3707
  this.tempColor = new Color(1, 1, 1, 1);
@@ -3754,6 +3839,7 @@ var spine = (() => {
3754
3839
  // spine-core/src/AtlasAttachmentLoader.ts
3755
3840
  var AtlasAttachmentLoader = class {
3756
3841
  constructor(atlas) {
3842
+ this.atlas = null;
3757
3843
  this.atlas = atlas;
3758
3844
  }
3759
3845
  newRegionAttachment(skin, name, path) {
@@ -3791,6 +3877,10 @@ var spine = (() => {
3791
3877
  // spine-core/src/BoneData.ts
3792
3878
  var BoneData = class {
3793
3879
  constructor(index, name, parent) {
3880
+ this.index = 0;
3881
+ this.name = null;
3882
+ this.parent = null;
3883
+ this.length = 0;
3794
3884
  this.x = 0;
3795
3885
  this.y = 0;
3796
3886
  this.rotation = 0;
@@ -3822,6 +3912,9 @@ var spine = (() => {
3822
3912
  // spine-core/src/Bone.ts
3823
3913
  var Bone = class {
3824
3914
  constructor(data, skeleton, parent) {
3915
+ this.data = null;
3916
+ this.skeleton = null;
3917
+ this.parent = null;
3825
3918
  this.children = new Array();
3826
3919
  this.x = 0;
3827
3920
  this.y = 0;
@@ -4074,6 +4167,7 @@ var spine = (() => {
4074
4167
  // spine-core/src/AssetManagerBase.ts
4075
4168
  var AssetManagerBase = class {
4076
4169
  constructor(textureLoader, pathPrefix = "", downloader = null) {
4170
+ this.pathPrefix = null;
4077
4171
  this.assets = {};
4078
4172
  this.errors = {};
4079
4173
  this.toLoad = 0;
@@ -4157,7 +4251,7 @@ var spine = (() => {
4157
4251
  image.src = path;
4158
4252
  }
4159
4253
  }
4160
- loadTextureAtlas(path, success = null, error = null) {
4254
+ loadTextureAtlas(path, success = null, error = null, fileAlias = null) {
4161
4255
  let index = path.lastIndexOf("/");
4162
4256
  let parent = index >= 0 ? path.substring(0, index + 1) : "";
4163
4257
  path = this.start(path);
@@ -4166,7 +4260,7 @@ var spine = (() => {
4166
4260
  let atlas = new TextureAtlas(atlasText);
4167
4261
  let toLoad = atlas.pages.length, abort = false;
4168
4262
  for (let page of atlas.pages) {
4169
- this.loadTexture(parent + page.name, (imagePath, texture) => {
4263
+ this.loadTexture(fileAlias == null ? parent + page.name : fileAlias[page.name], (imagePath, texture) => {
4170
4264
  if (!abort) {
4171
4265
  page.setTexture(texture);
4172
4266
  if (--toLoad == 0)
@@ -4343,6 +4437,13 @@ var spine = (() => {
4343
4437
  // spine-core/src/Event.ts
4344
4438
  var Event = class {
4345
4439
  constructor(time, data) {
4440
+ this.data = null;
4441
+ this.intValue = 0;
4442
+ this.floatValue = 0;
4443
+ this.stringValue = null;
4444
+ this.time = 0;
4445
+ this.volume = 0;
4446
+ this.balance = 0;
4346
4447
  if (!data)
4347
4448
  throw new Error("data cannot be null.");
4348
4449
  this.time = time;
@@ -4353,6 +4454,13 @@ var spine = (() => {
4353
4454
  // spine-core/src/EventData.ts
4354
4455
  var EventData = class {
4355
4456
  constructor(name) {
4457
+ this.name = null;
4458
+ this.intValue = 0;
4459
+ this.floatValue = 0;
4460
+ this.stringValue = null;
4461
+ this.audioPath = null;
4462
+ this.volume = 0;
4463
+ this.balance = 0;
4356
4464
  this.name = name;
4357
4465
  }
4358
4466
  };
@@ -4360,6 +4468,9 @@ var spine = (() => {
4360
4468
  // spine-core/src/IkConstraint.ts
4361
4469
  var IkConstraint = class {
4362
4470
  constructor(data, skeleton) {
4471
+ this.data = null;
4472
+ this.bones = null;
4473
+ this.target = null;
4363
4474
  this.bendDirection = 0;
4364
4475
  this.compress = false;
4365
4476
  this.stretch = false;
@@ -4598,6 +4709,7 @@ var spine = (() => {
4598
4709
  constructor(name) {
4599
4710
  super(name, 0, false);
4600
4711
  this.bones = new Array();
4712
+ this.target = null;
4601
4713
  this.bendDirection = 1;
4602
4714
  this.compress = false;
4603
4715
  this.stretch = false;
@@ -4612,6 +4724,13 @@ var spine = (() => {
4612
4724
  constructor(name) {
4613
4725
  super(name, 0, false);
4614
4726
  this.bones = new Array();
4727
+ this.target = null;
4728
+ this.positionMode = null;
4729
+ this.spacingMode = null;
4730
+ this.rotateMode = null;
4731
+ this.offsetRotation = 0;
4732
+ this.position = 0;
4733
+ this.spacing = 0;
4615
4734
  this.mixRotate = 0;
4616
4735
  this.mixX = 0;
4617
4736
  this.mixY = 0;
@@ -4639,6 +4758,9 @@ var spine = (() => {
4639
4758
  // spine-core/src/PathConstraint.ts
4640
4759
  var _PathConstraint = class {
4641
4760
  constructor(data, skeleton) {
4761
+ this.data = null;
4762
+ this.bones = null;
4763
+ this.target = null;
4642
4764
  this.position = 0;
4643
4765
  this.spacing = 0;
4644
4766
  this.mixRotate = 0;
@@ -5058,6 +5180,13 @@ var spine = (() => {
5058
5180
  // spine-core/src/Slot.ts
5059
5181
  var Slot = class {
5060
5182
  constructor(data, bone) {
5183
+ this.data = null;
5184
+ this.bone = null;
5185
+ this.color = null;
5186
+ this.darkColor = null;
5187
+ this.attachment = null;
5188
+ this.attachmentTime = 0;
5189
+ this.attachmentState = 0;
5061
5190
  this.deform = new Array();
5062
5191
  if (!data)
5063
5192
  throw new Error("data cannot be null.");
@@ -5106,6 +5235,9 @@ var spine = (() => {
5106
5235
  // spine-core/src/TransformConstraint.ts
5107
5236
  var TransformConstraint = class {
5108
5237
  constructor(data, skeleton) {
5238
+ this.data = null;
5239
+ this.bones = null;
5240
+ this.target = null;
5109
5241
  this.mixRotate = 0;
5110
5242
  this.mixX = 0;
5111
5243
  this.mixY = 0;
@@ -5313,7 +5445,16 @@ var spine = (() => {
5313
5445
  // spine-core/src/Skeleton.ts
5314
5446
  var Skeleton = class {
5315
5447
  constructor(data) {
5448
+ this.data = null;
5449
+ this.bones = null;
5450
+ this.slots = null;
5451
+ this.drawOrder = null;
5452
+ this.ikConstraints = null;
5453
+ this.transformConstraints = null;
5454
+ this.pathConstraints = null;
5316
5455
  this._updateCache = new Array();
5456
+ this.skin = null;
5457
+ this.color = null;
5317
5458
  this.time = 0;
5318
5459
  this.scaleX = 1;
5319
5460
  this.scaleY = 1;
@@ -5776,15 +5917,25 @@ var spine = (() => {
5776
5917
  // spine-core/src/SkeletonData.ts
5777
5918
  var SkeletonData = class {
5778
5919
  constructor() {
5920
+ this.name = null;
5779
5921
  this.bones = new Array();
5780
5922
  this.slots = new Array();
5781
5923
  this.skins = new Array();
5924
+ this.defaultSkin = null;
5782
5925
  this.events = new Array();
5783
5926
  this.animations = new Array();
5784
5927
  this.ikConstraints = new Array();
5785
5928
  this.transformConstraints = new Array();
5786
5929
  this.pathConstraints = new Array();
5930
+ this.x = 0;
5931
+ this.y = 0;
5932
+ this.width = 0;
5933
+ this.height = 0;
5934
+ this.version = null;
5935
+ this.hash = null;
5787
5936
  this.fps = 0;
5937
+ this.imagesPath = null;
5938
+ this.audioPath = null;
5788
5939
  }
5789
5940
  findBone(boneName) {
5790
5941
  if (!boneName)
@@ -5878,7 +6029,7 @@ var spine = (() => {
5878
6029
 
5879
6030
  // spine-core/src/Skin.ts
5880
6031
  var SkinEntry = class {
5881
- constructor(slotIndex, name, attachment) {
6032
+ constructor(slotIndex = 0, name = null, attachment = null) {
5882
6033
  this.slotIndex = slotIndex;
5883
6034
  this.name = name;
5884
6035
  this.attachment = attachment;
@@ -5886,6 +6037,7 @@ var spine = (() => {
5886
6037
  };
5887
6038
  var Skin = class {
5888
6039
  constructor(name) {
6040
+ this.name = null;
5889
6041
  this.attachments = new Array();
5890
6042
  this.bones = Array();
5891
6043
  this.constraints = new Array();
@@ -6036,7 +6188,13 @@ var spine = (() => {
6036
6188
  // spine-core/src/SlotData.ts
6037
6189
  var SlotData = class {
6038
6190
  constructor(index, name, boneData) {
6191
+ this.index = 0;
6192
+ this.name = null;
6193
+ this.boneData = null;
6039
6194
  this.color = new Color(1, 1, 1, 1);
6195
+ this.darkColor = null;
6196
+ this.attachmentName = null;
6197
+ this.blendMode = null;
6040
6198
  if (index < 0)
6041
6199
  throw new Error("index must be >= 0.");
6042
6200
  if (!name)
@@ -6061,6 +6219,7 @@ var spine = (() => {
6061
6219
  constructor(name) {
6062
6220
  super(name, 0, false);
6063
6221
  this.bones = new Array();
6222
+ this.target = null;
6064
6223
  this.mixRotate = 0;
6065
6224
  this.mixX = 0;
6066
6225
  this.mixY = 0;
@@ -6082,6 +6241,7 @@ var spine = (() => {
6082
6241
  var SkeletonBinary = class {
6083
6242
  constructor(attachmentLoader) {
6084
6243
  this.scale = 1;
6244
+ this.attachmentLoader = null;
6085
6245
  this.linkedMeshes = new Array();
6086
6246
  this.attachmentLoader = attachmentLoader;
6087
6247
  }
@@ -7757,6 +7917,7 @@ var spine = (() => {
7757
7917
  // spine-core/src/SkeletonJson.ts
7758
7918
  var SkeletonJson = class {
7759
7919
  constructor(attachmentLoader) {
7920
+ this.attachmentLoader = null;
7760
7921
  this.scale = 1;
7761
7922
  this.linkedMeshes = new Array();
7762
7923
  this.attachmentLoader = attachmentLoader;