@esotericsoftware/spine-canvas 4.1.4 → 4.1.5

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
  }
@@ -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;
@@ -2982,6 +3005,7 @@ var spine = (() => {
2982
3005
  }
2983
3006
  trackEntry(trackIndex, animation, loop, last) {
2984
3007
  let entry = this.trackEntryPool.obtain();
3008
+ entry.reset();
2985
3009
  entry.trackIndex = trackIndex;
2986
3010
  entry.animation = animation;
2987
3011
  entry.loop = loop;
@@ -3092,6 +3116,34 @@ var spine = (() => {
3092
3116
  };
3093
3117
  var TrackEntry = class {
3094
3118
  constructor() {
3119
+ this.animation = null;
3120
+ this.previous = null;
3121
+ this.next = null;
3122
+ this.mixingFrom = null;
3123
+ this.mixingTo = null;
3124
+ this.listener = null;
3125
+ this.trackIndex = 0;
3126
+ this.loop = false;
3127
+ this.holdPrevious = false;
3128
+ this.reverse = false;
3129
+ this.eventThreshold = 0;
3130
+ this.attachmentThreshold = 0;
3131
+ this.drawOrderThreshold = 0;
3132
+ this.animationStart = 0;
3133
+ this.animationEnd = 0;
3134
+ this.animationLast = 0;
3135
+ this.nextAnimationLast = 0;
3136
+ this.delay = 0;
3137
+ this.trackTime = 0;
3138
+ this.trackLast = 0;
3139
+ this.nextTrackLast = 0;
3140
+ this.trackEnd = 0;
3141
+ this.timeScale = 0;
3142
+ this.alpha = 0;
3143
+ this.mixTime = 0;
3144
+ this.mixDuration = 0;
3145
+ this.interruptAlpha = 0;
3146
+ this.totalAlpha = 0;
3095
3147
  this.mixBlend = MixBlend.replace;
3096
3148
  this.timelineMode = new Array();
3097
3149
  this.timelineHoldMix = new Array();
@@ -3142,6 +3194,7 @@ var spine = (() => {
3142
3194
  constructor(animState) {
3143
3195
  this.objects = [];
3144
3196
  this.drainDisabled = false;
3197
+ this.animState = null;
3145
3198
  this.animState = animState;
3146
3199
  }
3147
3200
  start(entry) {
@@ -3268,6 +3321,7 @@ var spine = (() => {
3268
3321
  // spine-core/src/AnimationStateData.ts
3269
3322
  var AnimationStateData = class {
3270
3323
  constructor(skeletonData) {
3324
+ this.skeletonData = null;
3271
3325
  this.animationToMixTime = {};
3272
3326
  this.defaultMix = 0;
3273
3327
  if (!skeletonData)
@@ -3316,6 +3370,7 @@ var spine = (() => {
3316
3370
  var ClippingAttachment = class extends VertexAttachment {
3317
3371
  constructor(name) {
3318
3372
  super(name);
3373
+ this.endSlot = null;
3319
3374
  this.color = new Color(0.2275, 0.2275, 0.8078, 1);
3320
3375
  }
3321
3376
  copy() {
@@ -3539,6 +3594,7 @@ var spine = (() => {
3539
3594
  };
3540
3595
  var TextureAtlasReader = class {
3541
3596
  constructor(text) {
3597
+ this.lines = null;
3542
3598
  this.index = 0;
3543
3599
  this.lines = text.split(/\r\n|\r|\n/);
3544
3600
  }
@@ -3572,10 +3628,15 @@ var spine = (() => {
3572
3628
  };
3573
3629
  var TextureAtlasPage = class {
3574
3630
  constructor() {
3631
+ this.name = null;
3575
3632
  this.minFilter = TextureFilter.Nearest;
3576
3633
  this.magFilter = TextureFilter.Nearest;
3577
3634
  this.uWrap = TextureWrap.ClampToEdge;
3578
3635
  this.vWrap = TextureWrap.ClampToEdge;
3636
+ this.texture = null;
3637
+ this.width = 0;
3638
+ this.height = 0;
3639
+ this.pma = false;
3579
3640
  }
3580
3641
  setTexture(texture) {
3581
3642
  this.texture = texture;
@@ -3584,13 +3645,39 @@ var spine = (() => {
3584
3645
  }
3585
3646
  };
3586
3647
  var TextureAtlasRegion = class extends TextureRegion {
3648
+ constructor() {
3649
+ super(...arguments);
3650
+ this.page = null;
3651
+ this.name = null;
3652
+ this.x = 0;
3653
+ this.y = 0;
3654
+ this.offsetX = 0;
3655
+ this.offsetY = 0;
3656
+ this.originalWidth = 0;
3657
+ this.originalHeight = 0;
3658
+ this.index = 0;
3659
+ this.degrees = 0;
3660
+ this.names = null;
3661
+ this.values = null;
3662
+ }
3587
3663
  };
3588
3664
 
3589
3665
  // spine-core/src/attachments/MeshAttachment.ts
3590
3666
  var MeshAttachment = class extends VertexAttachment {
3591
3667
  constructor(name) {
3592
3668
  super(name);
3669
+ this.region = null;
3670
+ this.path = null;
3671
+ this.regionUVs = null;
3672
+ this.uvs = null;
3673
+ this.triangles = null;
3593
3674
  this.color = new Color(1, 1, 1, 1);
3675
+ this.width = 0;
3676
+ this.height = 0;
3677
+ this.hullLength = 0;
3678
+ this.edges = null;
3679
+ this.parentMesh = null;
3680
+ this.sequence = null;
3594
3681
  this.tempColor = new Color(0, 0, 0, 0);
3595
3682
  }
3596
3683
  updateRegion() {
@@ -3712,6 +3799,7 @@ var spine = (() => {
3712
3799
  var PathAttachment = class extends VertexAttachment {
3713
3800
  constructor(name) {
3714
3801
  super(name);
3802
+ this.lengths = null;
3715
3803
  this.closed = false;
3716
3804
  this.constantSpeed = false;
3717
3805
  this.color = new Color(1, 1, 1, 1);
@@ -3732,6 +3820,9 @@ var spine = (() => {
3732
3820
  var PointAttachment = class extends VertexAttachment {
3733
3821
  constructor(name) {
3734
3822
  super(name);
3823
+ this.x = 0;
3824
+ this.y = 0;
3825
+ this.rotation = 0;
3735
3826
  this.color = new Color(0.38, 0.94, 0, 1);
3736
3827
  }
3737
3828
  computeWorldPosition(bone, point) {
@@ -3767,6 +3858,10 @@ var spine = (() => {
3767
3858
  this.width = 0;
3768
3859
  this.height = 0;
3769
3860
  this.color = new Color(1, 1, 1, 1);
3861
+ this.path = null;
3862
+ this.rendererObject = null;
3863
+ this.region = null;
3864
+ this.sequence = null;
3770
3865
  this.offset = Utils.newFloatArray(8);
3771
3866
  this.uvs = Utils.newFloatArray(8);
3772
3867
  this.tempColor = new Color(1, 1, 1, 1);
@@ -3905,6 +4000,7 @@ var spine = (() => {
3905
4000
  // spine-core/src/AtlasAttachmentLoader.ts
3906
4001
  var AtlasAttachmentLoader = class {
3907
4002
  constructor(atlas) {
4003
+ this.atlas = null;
3908
4004
  this.atlas = atlas;
3909
4005
  }
3910
4006
  loadSequence(name, basePath, sequence) {
@@ -3960,6 +4056,10 @@ var spine = (() => {
3960
4056
  // spine-core/src/BoneData.ts
3961
4057
  var BoneData = class {
3962
4058
  constructor(index, name, parent) {
4059
+ this.index = 0;
4060
+ this.name = null;
4061
+ this.parent = null;
4062
+ this.length = 0;
3963
4063
  this.x = 0;
3964
4064
  this.y = 0;
3965
4065
  this.rotation = 0;
@@ -3991,6 +4091,9 @@ var spine = (() => {
3991
4091
  // spine-core/src/Bone.ts
3992
4092
  var Bone = class {
3993
4093
  constructor(data, skeleton, parent) {
4094
+ this.data = null;
4095
+ this.skeleton = null;
4096
+ this.parent = null;
3994
4097
  this.children = new Array();
3995
4098
  this.x = 0;
3996
4099
  this.y = 0;
@@ -4243,6 +4346,7 @@ var spine = (() => {
4243
4346
  // spine-core/src/AssetManagerBase.ts
4244
4347
  var AssetManagerBase = class {
4245
4348
  constructor(textureLoader, pathPrefix = "", downloader = null) {
4349
+ this.pathPrefix = null;
4246
4350
  this.assets = {};
4247
4351
  this.errors = {};
4248
4352
  this.toLoad = 0;
@@ -4512,6 +4616,13 @@ var spine = (() => {
4512
4616
  // spine-core/src/Event.ts
4513
4617
  var Event = class {
4514
4618
  constructor(time, data) {
4619
+ this.data = null;
4620
+ this.intValue = 0;
4621
+ this.floatValue = 0;
4622
+ this.stringValue = null;
4623
+ this.time = 0;
4624
+ this.volume = 0;
4625
+ this.balance = 0;
4515
4626
  if (!data)
4516
4627
  throw new Error("data cannot be null.");
4517
4628
  this.time = time;
@@ -4522,6 +4633,13 @@ var spine = (() => {
4522
4633
  // spine-core/src/EventData.ts
4523
4634
  var EventData = class {
4524
4635
  constructor(name) {
4636
+ this.name = null;
4637
+ this.intValue = 0;
4638
+ this.floatValue = 0;
4639
+ this.stringValue = null;
4640
+ this.audioPath = null;
4641
+ this.volume = 0;
4642
+ this.balance = 0;
4525
4643
  this.name = name;
4526
4644
  }
4527
4645
  };
@@ -4529,6 +4647,9 @@ var spine = (() => {
4529
4647
  // spine-core/src/IkConstraint.ts
4530
4648
  var IkConstraint = class {
4531
4649
  constructor(data, skeleton) {
4650
+ this.data = null;
4651
+ this.bones = null;
4652
+ this.target = null;
4532
4653
  this.bendDirection = 0;
4533
4654
  this.compress = false;
4534
4655
  this.stretch = false;
@@ -4767,6 +4888,7 @@ var spine = (() => {
4767
4888
  constructor(name) {
4768
4889
  super(name, 0, false);
4769
4890
  this.bones = new Array();
4891
+ this.target = null;
4770
4892
  this.bendDirection = 1;
4771
4893
  this.compress = false;
4772
4894
  this.stretch = false;
@@ -4781,6 +4903,13 @@ var spine = (() => {
4781
4903
  constructor(name) {
4782
4904
  super(name, 0, false);
4783
4905
  this.bones = new Array();
4906
+ this.target = null;
4907
+ this.positionMode = null;
4908
+ this.spacingMode = null;
4909
+ this.rotateMode = null;
4910
+ this.offsetRotation = 0;
4911
+ this.position = 0;
4912
+ this.spacing = 0;
4784
4913
  this.mixRotate = 0;
4785
4914
  this.mixX = 0;
4786
4915
  this.mixY = 0;
@@ -4808,6 +4937,9 @@ var spine = (() => {
4808
4937
  // spine-core/src/PathConstraint.ts
4809
4938
  var _PathConstraint = class {
4810
4939
  constructor(data, skeleton) {
4940
+ this.data = null;
4941
+ this.bones = null;
4942
+ this.target = null;
4811
4943
  this.position = 0;
4812
4944
  this.spacing = 0;
4813
4945
  this.mixRotate = 0;
@@ -5227,6 +5359,12 @@ var spine = (() => {
5227
5359
  // spine-core/src/Slot.ts
5228
5360
  var Slot = class {
5229
5361
  constructor(data, bone) {
5362
+ this.data = null;
5363
+ this.bone = null;
5364
+ this.color = null;
5365
+ this.darkColor = null;
5366
+ this.attachment = null;
5367
+ this.attachmentState = 0;
5230
5368
  this.deform = new Array();
5231
5369
  if (!data)
5232
5370
  throw new Error("data cannot be null.");
@@ -5269,6 +5407,9 @@ var spine = (() => {
5269
5407
  // spine-core/src/TransformConstraint.ts
5270
5408
  var TransformConstraint = class {
5271
5409
  constructor(data, skeleton) {
5410
+ this.data = null;
5411
+ this.bones = null;
5412
+ this.target = null;
5272
5413
  this.mixRotate = 0;
5273
5414
  this.mixX = 0;
5274
5415
  this.mixY = 0;
@@ -5476,7 +5617,16 @@ var spine = (() => {
5476
5617
  // spine-core/src/Skeleton.ts
5477
5618
  var Skeleton = class {
5478
5619
  constructor(data) {
5620
+ this.data = null;
5621
+ this.bones = null;
5622
+ this.slots = null;
5623
+ this.drawOrder = null;
5624
+ this.ikConstraints = null;
5625
+ this.transformConstraints = null;
5626
+ this.pathConstraints = null;
5479
5627
  this._updateCache = new Array();
5628
+ this.skin = null;
5629
+ this.color = null;
5480
5630
  this.scaleX = 1;
5481
5631
  this.scaleY = 1;
5482
5632
  this.x = 0;
@@ -5935,15 +6085,25 @@ var spine = (() => {
5935
6085
  // spine-core/src/SkeletonData.ts
5936
6086
  var SkeletonData = class {
5937
6087
  constructor() {
6088
+ this.name = null;
5938
6089
  this.bones = new Array();
5939
6090
  this.slots = new Array();
5940
6091
  this.skins = new Array();
6092
+ this.defaultSkin = null;
5941
6093
  this.events = new Array();
5942
6094
  this.animations = new Array();
5943
6095
  this.ikConstraints = new Array();
5944
6096
  this.transformConstraints = new Array();
5945
6097
  this.pathConstraints = new Array();
6098
+ this.x = 0;
6099
+ this.y = 0;
6100
+ this.width = 0;
6101
+ this.height = 0;
6102
+ this.version = null;
6103
+ this.hash = null;
5946
6104
  this.fps = 0;
6105
+ this.imagesPath = null;
6106
+ this.audioPath = null;
5947
6107
  }
5948
6108
  findBone(boneName) {
5949
6109
  if (!boneName)
@@ -6037,7 +6197,7 @@ var spine = (() => {
6037
6197
 
6038
6198
  // spine-core/src/Skin.ts
6039
6199
  var SkinEntry = class {
6040
- constructor(slotIndex, name, attachment) {
6200
+ constructor(slotIndex = 0, name = null, attachment = null) {
6041
6201
  this.slotIndex = slotIndex;
6042
6202
  this.name = name;
6043
6203
  this.attachment = attachment;
@@ -6045,6 +6205,7 @@ var spine = (() => {
6045
6205
  };
6046
6206
  var Skin = class {
6047
6207
  constructor(name) {
6208
+ this.name = null;
6048
6209
  this.attachments = new Array();
6049
6210
  this.bones = Array();
6050
6211
  this.constraints = new Array();
@@ -6195,7 +6356,13 @@ var spine = (() => {
6195
6356
  // spine-core/src/SlotData.ts
6196
6357
  var SlotData = class {
6197
6358
  constructor(index, name, boneData) {
6359
+ this.index = 0;
6360
+ this.name = null;
6361
+ this.boneData = null;
6198
6362
  this.color = new Color(1, 1, 1, 1);
6363
+ this.darkColor = null;
6364
+ this.attachmentName = null;
6365
+ this.blendMode = null;
6199
6366
  if (index < 0)
6200
6367
  throw new Error("index must be >= 0.");
6201
6368
  if (!name)
@@ -6220,6 +6387,7 @@ var spine = (() => {
6220
6387
  constructor(name) {
6221
6388
  super(name, 0, false);
6222
6389
  this.bones = new Array();
6390
+ this.target = null;
6223
6391
  this.mixRotate = 0;
6224
6392
  this.mixX = 0;
6225
6393
  this.mixY = 0;
@@ -6241,6 +6409,7 @@ var spine = (() => {
6241
6409
  var SkeletonBinary = class {
6242
6410
  constructor(attachmentLoader) {
6243
6411
  this.scale = 1;
6412
+ this.attachmentLoader = null;
6244
6413
  this.linkedMeshes = new Array();
6245
6414
  this.attachmentLoader = attachmentLoader;
6246
6415
  }
@@ -7952,6 +8121,7 @@ var spine = (() => {
7952
8121
  // spine-core/src/SkeletonJson.ts
7953
8122
  var SkeletonJson = class {
7954
8123
  constructor(attachmentLoader) {
8124
+ this.attachmentLoader = null;
7955
8125
  this.scale = 1;
7956
8126
  this.linkedMeshes = new Array();
7957
8127
  this.attachmentLoader = attachmentLoader;