@esotericsoftware/spine-core 4.1.3 → 4.1.7
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.
- package/dist/Animation.js +33 -6
- package/dist/AnimationState.d.ts +1 -0
- package/dist/AnimationState.js +136 -6
- package/dist/AnimationStateData.js +3 -1
- package/dist/AssetManagerBase.d.ts +3 -1
- package/dist/AssetManagerBase.js +6 -5
- package/dist/AtlasAttachmentLoader.js +2 -1
- package/dist/Bone.js +7 -1
- package/dist/BoneData.js +9 -1
- package/dist/Event.js +8 -1
- package/dist/EventData.js +8 -1
- package/dist/IkConstraint.js +7 -1
- package/dist/IkConstraintData.js +3 -1
- package/dist/PathConstraint.js +7 -1
- package/dist/PathConstraintData.js +15 -1
- package/dist/Skeleton.js +19 -1
- package/dist/SkeletonBinary.js +2 -1
- package/dist/SkeletonData.js +24 -1
- package/dist/SkeletonJson.js +2 -1
- package/dist/Skin.d.ts +1 -1
- package/dist/Skin.js +4 -2
- package/dist/Slot.js +13 -1
- package/dist/SlotData.js +14 -1
- package/dist/TextureAtlas.js +22 -1
- package/dist/TransformConstraint.js +7 -1
- package/dist/TransformConstraintData.js +3 -1
- package/dist/attachments/Attachment.js +9 -1
- package/dist/attachments/ClippingAttachment.js +4 -1
- package/dist/attachments/MeshAttachment.js +23 -1
- package/dist/attachments/PathAttachment.js +3 -1
- package/dist/attachments/PointAttachment.js +4 -1
- package/dist/attachments/RegionAttachment.js +6 -1
- package/dist/iife/spine-core.js +191 -15
- package/dist/iife/spine-core.js.map +2 -2
- package/dist/iife/spine-core.min.js +2 -2
- package/package.json +1 -1
package/dist/iife/spine-core.js
CHANGED
|
@@ -510,6 +510,8 @@ var spine = (() => {
|
|
|
510
510
|
constructor(name) {
|
|
511
511
|
super(name);
|
|
512
512
|
this.id = _VertexAttachment.nextID++;
|
|
513
|
+
this.bones = null;
|
|
514
|
+
this.vertices = null;
|
|
513
515
|
this.worldVerticesLength = 0;
|
|
514
516
|
this.timelineAttahment = this;
|
|
515
517
|
}
|
|
@@ -655,6 +657,8 @@ var spine = (() => {
|
|
|
655
657
|
// spine-core/src/Animation.ts
|
|
656
658
|
var Animation = class {
|
|
657
659
|
constructor(name, timelines, duration) {
|
|
660
|
+
this.timelines = null;
|
|
661
|
+
this.timelineIds = null;
|
|
658
662
|
if (!name)
|
|
659
663
|
throw new Error("name cannot be null.");
|
|
660
664
|
this.name = name;
|
|
@@ -724,6 +728,8 @@ var spine = (() => {
|
|
|
724
728
|
};
|
|
725
729
|
var Timeline = class {
|
|
726
730
|
constructor(frameCount, propertyIds) {
|
|
731
|
+
this.propertyIds = null;
|
|
732
|
+
this.frames = null;
|
|
727
733
|
this.propertyIds = propertyIds;
|
|
728
734
|
this.frames = Utils.newFloatArray(frameCount * this.getFrameEntries());
|
|
729
735
|
}
|
|
@@ -757,6 +763,7 @@ var spine = (() => {
|
|
|
757
763
|
var CurveTimeline = class extends Timeline {
|
|
758
764
|
constructor(frameCount, bezierCount, propertyIds) {
|
|
759
765
|
super(frameCount, propertyIds);
|
|
766
|
+
this.curves = null;
|
|
760
767
|
this.curves = Utils.newFloatArray(frameCount + bezierCount * 18);
|
|
761
768
|
this.curves[frameCount - 1] = 1;
|
|
762
769
|
}
|
|
@@ -1093,8 +1100,8 @@ var spine = (() => {
|
|
|
1093
1100
|
bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;
|
|
1094
1101
|
break;
|
|
1095
1102
|
case 3:
|
|
1096
|
-
bone.scaleX
|
|
1097
|
-
bone.scaleY
|
|
1103
|
+
bone.scaleX += (x - bone.data.scaleX) * alpha;
|
|
1104
|
+
bone.scaleY += (y - bone.data.scaleY) * alpha;
|
|
1098
1105
|
}
|
|
1099
1106
|
} else {
|
|
1100
1107
|
switch (blend) {
|
|
@@ -1160,7 +1167,7 @@ var spine = (() => {
|
|
|
1160
1167
|
bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;
|
|
1161
1168
|
break;
|
|
1162
1169
|
case 3:
|
|
1163
|
-
bone.scaleX
|
|
1170
|
+
bone.scaleX += (x - bone.data.scaleX) * alpha;
|
|
1164
1171
|
}
|
|
1165
1172
|
} else {
|
|
1166
1173
|
switch (blend) {
|
|
@@ -1221,7 +1228,7 @@ var spine = (() => {
|
|
|
1221
1228
|
bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;
|
|
1222
1229
|
break;
|
|
1223
1230
|
case 3:
|
|
1224
|
-
bone.scaleY
|
|
1231
|
+
bone.scaleY += (y - bone.data.scaleY) * alpha;
|
|
1225
1232
|
}
|
|
1226
1233
|
} else {
|
|
1227
1234
|
switch (blend) {
|
|
@@ -1816,6 +1823,8 @@ var spine = (() => {
|
|
|
1816
1823
|
Property.deform + "|" + slotIndex + "|" + attachment.id
|
|
1817
1824
|
]);
|
|
1818
1825
|
this.slotIndex = 0;
|
|
1826
|
+
this.attachment = null;
|
|
1827
|
+
this.vertices = null;
|
|
1819
1828
|
this.slotIndex = slotIndex;
|
|
1820
1829
|
this.attachment = attachment;
|
|
1821
1830
|
this.vertices = new Array(frameCount);
|
|
@@ -2032,6 +2041,7 @@ var spine = (() => {
|
|
|
2032
2041
|
var _EventTimeline = class extends Timeline {
|
|
2033
2042
|
constructor(frameCount) {
|
|
2034
2043
|
super(frameCount, _EventTimeline.propertyIds);
|
|
2044
|
+
this.events = null;
|
|
2035
2045
|
this.events = new Array(frameCount);
|
|
2036
2046
|
}
|
|
2037
2047
|
getFrameCount() {
|
|
@@ -2074,6 +2084,7 @@ var spine = (() => {
|
|
|
2074
2084
|
var _DrawOrderTimeline = class extends Timeline {
|
|
2075
2085
|
constructor(frameCount) {
|
|
2076
2086
|
super(frameCount, _DrawOrderTimeline.propertyIds);
|
|
2087
|
+
this.drawOrders = null;
|
|
2077
2088
|
this.drawOrders = new Array(frameCount);
|
|
2078
2089
|
}
|
|
2079
2090
|
getFrameCount() {
|
|
@@ -2112,6 +2123,7 @@ var spine = (() => {
|
|
|
2112
2123
|
super(frameCount, bezierCount, [
|
|
2113
2124
|
Property.ikConstraint + "|" + ikConstraintIndex
|
|
2114
2125
|
]);
|
|
2126
|
+
this.ikConstraintIndex = 0;
|
|
2115
2127
|
this.ikConstraintIndex = ikConstraintIndex;
|
|
2116
2128
|
}
|
|
2117
2129
|
getFrameEntries() {
|
|
@@ -2197,6 +2209,7 @@ var spine = (() => {
|
|
|
2197
2209
|
super(frameCount, bezierCount, [
|
|
2198
2210
|
Property.transformConstraint + "|" + transformConstraintIndex
|
|
2199
2211
|
]);
|
|
2212
|
+
this.transformConstraintIndex = 0;
|
|
2200
2213
|
this.transformConstraintIndex = transformConstraintIndex;
|
|
2201
2214
|
}
|
|
2202
2215
|
getFrameEntries() {
|
|
@@ -2296,6 +2309,7 @@ var spine = (() => {
|
|
|
2296
2309
|
var PathConstraintPositionTimeline = class extends CurveTimeline1 {
|
|
2297
2310
|
constructor(frameCount, bezierCount, pathConstraintIndex) {
|
|
2298
2311
|
super(frameCount, bezierCount, Property.pathConstraintPosition + "|" + pathConstraintIndex);
|
|
2312
|
+
this.pathConstraintIndex = 0;
|
|
2299
2313
|
this.pathConstraintIndex = pathConstraintIndex;
|
|
2300
2314
|
}
|
|
2301
2315
|
apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {
|
|
@@ -2477,17 +2491,25 @@ var spine = (() => {
|
|
|
2477
2491
|
case SequenceMode.loop:
|
|
2478
2492
|
index %= count;
|
|
2479
2493
|
break;
|
|
2480
|
-
case SequenceMode.pingpong:
|
|
2494
|
+
case SequenceMode.pingpong: {
|
|
2481
2495
|
let n = (count << 1) - 2;
|
|
2482
2496
|
index %= n;
|
|
2483
2497
|
if (index >= count)
|
|
2484
2498
|
index = n - index;
|
|
2485
2499
|
break;
|
|
2500
|
+
}
|
|
2486
2501
|
case SequenceMode.onceReverse:
|
|
2487
2502
|
index = Math.max(count - 1 - index, 0);
|
|
2488
2503
|
break;
|
|
2489
2504
|
case SequenceMode.loopReverse:
|
|
2490
2505
|
index = count - 1 - index % count;
|
|
2506
|
+
break;
|
|
2507
|
+
case SequenceMode.pingpongReverse: {
|
|
2508
|
+
let n = (count << 1) - 2;
|
|
2509
|
+
index = (index + count - 1) % n;
|
|
2510
|
+
if (index >= count)
|
|
2511
|
+
index = n - index;
|
|
2512
|
+
}
|
|
2491
2513
|
}
|
|
2492
2514
|
}
|
|
2493
2515
|
slot.sequenceIndex = index;
|
|
@@ -2501,6 +2523,7 @@ var spine = (() => {
|
|
|
2501
2523
|
// spine-core/src/AnimationState.ts
|
|
2502
2524
|
var AnimationState = class {
|
|
2503
2525
|
constructor(data) {
|
|
2526
|
+
this.data = null;
|
|
2504
2527
|
this.tracks = new Array();
|
|
2505
2528
|
this.timeScale = 1;
|
|
2506
2529
|
this.unkeyedState = 0;
|
|
@@ -2627,13 +2650,14 @@ var spine = (() => {
|
|
|
2627
2650
|
}
|
|
2628
2651
|
} else {
|
|
2629
2652
|
let timelineMode = current.timelineMode;
|
|
2630
|
-
let
|
|
2653
|
+
let shortestRotation = current.shortestRotation;
|
|
2654
|
+
let firstFrame = !shortestRotation && current.timelinesRotation.length != timelineCount << 1;
|
|
2631
2655
|
if (firstFrame)
|
|
2632
2656
|
current.timelinesRotation.length = timelineCount << 1;
|
|
2633
2657
|
for (let ii = 0; ii < timelineCount; ii++) {
|
|
2634
2658
|
let timeline2 = timelines[ii];
|
|
2635
2659
|
let timelineBlend = timelineMode[ii] == SUBSEQUENT ? blend : MixBlend.setup;
|
|
2636
|
-
if (timeline2 instanceof RotateTimeline) {
|
|
2660
|
+
if (!shortestRotation && timeline2 instanceof RotateTimeline) {
|
|
2637
2661
|
this.applyRotateTimeline(timeline2, skeleton, applyTime, mix, timelineBlend, current.timelinesRotation, ii << 1, firstFrame);
|
|
2638
2662
|
} else if (timeline2 instanceof AttachmentTimeline) {
|
|
2639
2663
|
this.applyAttachmentTimeline(timeline2, skeleton, applyTime, blend, true);
|
|
@@ -2693,7 +2717,8 @@ var spine = (() => {
|
|
|
2693
2717
|
} else {
|
|
2694
2718
|
let timelineMode = from.timelineMode;
|
|
2695
2719
|
let timelineHoldMix = from.timelineHoldMix;
|
|
2696
|
-
let
|
|
2720
|
+
let shortestRotation = from.shortestRotation;
|
|
2721
|
+
let firstFrame = !shortestRotation && from.timelinesRotation.length != timelineCount << 1;
|
|
2697
2722
|
if (firstFrame)
|
|
2698
2723
|
from.timelinesRotation.length = timelineCount << 1;
|
|
2699
2724
|
from.totalAlpha = 0;
|
|
@@ -2728,7 +2753,7 @@ var spine = (() => {
|
|
|
2728
2753
|
break;
|
|
2729
2754
|
}
|
|
2730
2755
|
from.totalAlpha += alpha;
|
|
2731
|
-
if (timeline instanceof RotateTimeline)
|
|
2756
|
+
if (!shortestRotation && timeline instanceof RotateTimeline)
|
|
2732
2757
|
this.applyRotateTimeline(timeline, skeleton, applyTime, alpha, timelineBlend, from.timelinesRotation, i << 1, firstFrame);
|
|
2733
2758
|
else if (timeline instanceof AttachmentTimeline)
|
|
2734
2759
|
this.applyAttachmentTimeline(timeline, skeleton, applyTime, timelineBlend, attachments);
|
|
@@ -2979,10 +3004,13 @@ var spine = (() => {
|
|
|
2979
3004
|
}
|
|
2980
3005
|
trackEntry(trackIndex, animation, loop, last) {
|
|
2981
3006
|
let entry = this.trackEntryPool.obtain();
|
|
3007
|
+
entry.reset();
|
|
2982
3008
|
entry.trackIndex = trackIndex;
|
|
2983
3009
|
entry.animation = animation;
|
|
2984
3010
|
entry.loop = loop;
|
|
2985
3011
|
entry.holdPrevious = false;
|
|
3012
|
+
entry.reverse = false;
|
|
3013
|
+
entry.shortestRotation = false;
|
|
2986
3014
|
entry.eventThreshold = 0;
|
|
2987
3015
|
entry.attachmentThreshold = 0;
|
|
2988
3016
|
entry.drawOrderThreshold = 0;
|
|
@@ -2997,9 +3025,10 @@ var spine = (() => {
|
|
|
2997
3025
|
entry.trackEnd = Number.MAX_VALUE;
|
|
2998
3026
|
entry.timeScale = 1;
|
|
2999
3027
|
entry.alpha = 1;
|
|
3000
|
-
entry.interruptAlpha = 1;
|
|
3001
3028
|
entry.mixTime = 0;
|
|
3002
3029
|
entry.mixDuration = !last ? 0 : this.data.getMix(last.animation, animation);
|
|
3030
|
+
entry.interruptAlpha = 1;
|
|
3031
|
+
entry.totalAlpha = 0;
|
|
3003
3032
|
entry.mixBlend = MixBlend.replace;
|
|
3004
3033
|
return entry;
|
|
3005
3034
|
}
|
|
@@ -3089,6 +3118,35 @@ var spine = (() => {
|
|
|
3089
3118
|
};
|
|
3090
3119
|
var TrackEntry = class {
|
|
3091
3120
|
constructor() {
|
|
3121
|
+
this.animation = null;
|
|
3122
|
+
this.previous = null;
|
|
3123
|
+
this.next = null;
|
|
3124
|
+
this.mixingFrom = null;
|
|
3125
|
+
this.mixingTo = null;
|
|
3126
|
+
this.listener = null;
|
|
3127
|
+
this.trackIndex = 0;
|
|
3128
|
+
this.loop = false;
|
|
3129
|
+
this.holdPrevious = false;
|
|
3130
|
+
this.reverse = false;
|
|
3131
|
+
this.shortestRotation = false;
|
|
3132
|
+
this.eventThreshold = 0;
|
|
3133
|
+
this.attachmentThreshold = 0;
|
|
3134
|
+
this.drawOrderThreshold = 0;
|
|
3135
|
+
this.animationStart = 0;
|
|
3136
|
+
this.animationEnd = 0;
|
|
3137
|
+
this.animationLast = 0;
|
|
3138
|
+
this.nextAnimationLast = 0;
|
|
3139
|
+
this.delay = 0;
|
|
3140
|
+
this.trackTime = 0;
|
|
3141
|
+
this.trackLast = 0;
|
|
3142
|
+
this.nextTrackLast = 0;
|
|
3143
|
+
this.trackEnd = 0;
|
|
3144
|
+
this.timeScale = 0;
|
|
3145
|
+
this.alpha = 0;
|
|
3146
|
+
this.mixTime = 0;
|
|
3147
|
+
this.mixDuration = 0;
|
|
3148
|
+
this.interruptAlpha = 0;
|
|
3149
|
+
this.totalAlpha = 0;
|
|
3092
3150
|
this.mixBlend = MixBlend.replace;
|
|
3093
3151
|
this.timelineMode = new Array();
|
|
3094
3152
|
this.timelineHoldMix = new Array();
|
|
@@ -3139,6 +3197,7 @@ var spine = (() => {
|
|
|
3139
3197
|
constructor(animState) {
|
|
3140
3198
|
this.objects = [];
|
|
3141
3199
|
this.drainDisabled = false;
|
|
3200
|
+
this.animState = null;
|
|
3142
3201
|
this.animState = animState;
|
|
3143
3202
|
}
|
|
3144
3203
|
start(entry) {
|
|
@@ -3265,6 +3324,7 @@ var spine = (() => {
|
|
|
3265
3324
|
// spine-core/src/AnimationStateData.ts
|
|
3266
3325
|
var AnimationStateData = class {
|
|
3267
3326
|
constructor(skeletonData) {
|
|
3327
|
+
this.skeletonData = null;
|
|
3268
3328
|
this.animationToMixTime = {};
|
|
3269
3329
|
this.defaultMix = 0;
|
|
3270
3330
|
if (!skeletonData)
|
|
@@ -3313,6 +3373,7 @@ var spine = (() => {
|
|
|
3313
3373
|
var ClippingAttachment = class extends VertexAttachment {
|
|
3314
3374
|
constructor(name) {
|
|
3315
3375
|
super(name);
|
|
3376
|
+
this.endSlot = null;
|
|
3316
3377
|
this.color = new Color(0.2275, 0.2275, 0.8078, 1);
|
|
3317
3378
|
}
|
|
3318
3379
|
copy() {
|
|
@@ -3536,6 +3597,7 @@ var spine = (() => {
|
|
|
3536
3597
|
};
|
|
3537
3598
|
var TextureAtlasReader = class {
|
|
3538
3599
|
constructor(text) {
|
|
3600
|
+
this.lines = null;
|
|
3539
3601
|
this.index = 0;
|
|
3540
3602
|
this.lines = text.split(/\r\n|\r|\n/);
|
|
3541
3603
|
}
|
|
@@ -3569,10 +3631,15 @@ var spine = (() => {
|
|
|
3569
3631
|
};
|
|
3570
3632
|
var TextureAtlasPage = class {
|
|
3571
3633
|
constructor() {
|
|
3634
|
+
this.name = null;
|
|
3572
3635
|
this.minFilter = TextureFilter.Nearest;
|
|
3573
3636
|
this.magFilter = TextureFilter.Nearest;
|
|
3574
3637
|
this.uWrap = TextureWrap.ClampToEdge;
|
|
3575
3638
|
this.vWrap = TextureWrap.ClampToEdge;
|
|
3639
|
+
this.texture = null;
|
|
3640
|
+
this.width = 0;
|
|
3641
|
+
this.height = 0;
|
|
3642
|
+
this.pma = false;
|
|
3576
3643
|
}
|
|
3577
3644
|
setTexture(texture) {
|
|
3578
3645
|
this.texture = texture;
|
|
@@ -3581,13 +3648,39 @@ var spine = (() => {
|
|
|
3581
3648
|
}
|
|
3582
3649
|
};
|
|
3583
3650
|
var TextureAtlasRegion = class extends TextureRegion {
|
|
3651
|
+
constructor() {
|
|
3652
|
+
super(...arguments);
|
|
3653
|
+
this.page = null;
|
|
3654
|
+
this.name = null;
|
|
3655
|
+
this.x = 0;
|
|
3656
|
+
this.y = 0;
|
|
3657
|
+
this.offsetX = 0;
|
|
3658
|
+
this.offsetY = 0;
|
|
3659
|
+
this.originalWidth = 0;
|
|
3660
|
+
this.originalHeight = 0;
|
|
3661
|
+
this.index = 0;
|
|
3662
|
+
this.degrees = 0;
|
|
3663
|
+
this.names = null;
|
|
3664
|
+
this.values = null;
|
|
3665
|
+
}
|
|
3584
3666
|
};
|
|
3585
3667
|
|
|
3586
3668
|
// spine-core/src/attachments/MeshAttachment.ts
|
|
3587
3669
|
var MeshAttachment = class extends VertexAttachment {
|
|
3588
3670
|
constructor(name) {
|
|
3589
3671
|
super(name);
|
|
3672
|
+
this.region = null;
|
|
3673
|
+
this.path = null;
|
|
3674
|
+
this.regionUVs = null;
|
|
3675
|
+
this.uvs = null;
|
|
3676
|
+
this.triangles = null;
|
|
3590
3677
|
this.color = new Color(1, 1, 1, 1);
|
|
3678
|
+
this.width = 0;
|
|
3679
|
+
this.height = 0;
|
|
3680
|
+
this.hullLength = 0;
|
|
3681
|
+
this.edges = null;
|
|
3682
|
+
this.parentMesh = null;
|
|
3683
|
+
this.sequence = null;
|
|
3591
3684
|
this.tempColor = new Color(0, 0, 0, 0);
|
|
3592
3685
|
}
|
|
3593
3686
|
updateRegion() {
|
|
@@ -3709,6 +3802,7 @@ var spine = (() => {
|
|
|
3709
3802
|
var PathAttachment = class extends VertexAttachment {
|
|
3710
3803
|
constructor(name) {
|
|
3711
3804
|
super(name);
|
|
3805
|
+
this.lengths = null;
|
|
3712
3806
|
this.closed = false;
|
|
3713
3807
|
this.constantSpeed = false;
|
|
3714
3808
|
this.color = new Color(1, 1, 1, 1);
|
|
@@ -3729,6 +3823,9 @@ var spine = (() => {
|
|
|
3729
3823
|
var PointAttachment = class extends VertexAttachment {
|
|
3730
3824
|
constructor(name) {
|
|
3731
3825
|
super(name);
|
|
3826
|
+
this.x = 0;
|
|
3827
|
+
this.y = 0;
|
|
3828
|
+
this.rotation = 0;
|
|
3732
3829
|
this.color = new Color(0.38, 0.94, 0, 1);
|
|
3733
3830
|
}
|
|
3734
3831
|
computeWorldPosition(bone, point) {
|
|
@@ -3764,6 +3861,10 @@ var spine = (() => {
|
|
|
3764
3861
|
this.width = 0;
|
|
3765
3862
|
this.height = 0;
|
|
3766
3863
|
this.color = new Color(1, 1, 1, 1);
|
|
3864
|
+
this.path = null;
|
|
3865
|
+
this.rendererObject = null;
|
|
3866
|
+
this.region = null;
|
|
3867
|
+
this.sequence = null;
|
|
3767
3868
|
this.offset = Utils.newFloatArray(8);
|
|
3768
3869
|
this.uvs = Utils.newFloatArray(8);
|
|
3769
3870
|
this.tempColor = new Color(1, 1, 1, 1);
|
|
@@ -3902,6 +4003,7 @@ var spine = (() => {
|
|
|
3902
4003
|
// spine-core/src/AtlasAttachmentLoader.ts
|
|
3903
4004
|
var AtlasAttachmentLoader = class {
|
|
3904
4005
|
constructor(atlas) {
|
|
4006
|
+
this.atlas = null;
|
|
3905
4007
|
this.atlas = atlas;
|
|
3906
4008
|
}
|
|
3907
4009
|
loadSequence(name, basePath, sequence) {
|
|
@@ -3957,6 +4059,10 @@ var spine = (() => {
|
|
|
3957
4059
|
// spine-core/src/BoneData.ts
|
|
3958
4060
|
var BoneData = class {
|
|
3959
4061
|
constructor(index, name, parent) {
|
|
4062
|
+
this.index = 0;
|
|
4063
|
+
this.name = null;
|
|
4064
|
+
this.parent = null;
|
|
4065
|
+
this.length = 0;
|
|
3960
4066
|
this.x = 0;
|
|
3961
4067
|
this.y = 0;
|
|
3962
4068
|
this.rotation = 0;
|
|
@@ -3988,6 +4094,9 @@ var spine = (() => {
|
|
|
3988
4094
|
// spine-core/src/Bone.ts
|
|
3989
4095
|
var Bone = class {
|
|
3990
4096
|
constructor(data, skeleton, parent) {
|
|
4097
|
+
this.data = null;
|
|
4098
|
+
this.skeleton = null;
|
|
4099
|
+
this.parent = null;
|
|
3991
4100
|
this.children = new Array();
|
|
3992
4101
|
this.x = 0;
|
|
3993
4102
|
this.y = 0;
|
|
@@ -4240,6 +4349,7 @@ var spine = (() => {
|
|
|
4240
4349
|
// spine-core/src/AssetManagerBase.ts
|
|
4241
4350
|
var AssetManagerBase = class {
|
|
4242
4351
|
constructor(textureLoader, pathPrefix = "", downloader = null) {
|
|
4352
|
+
this.pathPrefix = null;
|
|
4243
4353
|
this.assets = {};
|
|
4244
4354
|
this.errors = {};
|
|
4245
4355
|
this.toLoad = 0;
|
|
@@ -4323,7 +4433,7 @@ var spine = (() => {
|
|
|
4323
4433
|
image.src = path;
|
|
4324
4434
|
}
|
|
4325
4435
|
}
|
|
4326
|
-
loadTextureAtlas(path, success = null, error = null) {
|
|
4436
|
+
loadTextureAtlas(path, success = null, error = null, fileAlias = null) {
|
|
4327
4437
|
let index = path.lastIndexOf("/");
|
|
4328
4438
|
let parent = index >= 0 ? path.substring(0, index + 1) : "";
|
|
4329
4439
|
path = this.start(path);
|
|
@@ -4332,7 +4442,7 @@ var spine = (() => {
|
|
|
4332
4442
|
let atlas = new TextureAtlas(atlasText);
|
|
4333
4443
|
let toLoad = atlas.pages.length, abort = false;
|
|
4334
4444
|
for (let page of atlas.pages) {
|
|
4335
|
-
this.loadTexture(parent + page.name, (imagePath, texture) => {
|
|
4445
|
+
this.loadTexture(fileAlias == null ? parent + page.name : fileAlias[page.name], (imagePath, texture) => {
|
|
4336
4446
|
if (!abort) {
|
|
4337
4447
|
page.setTexture(texture);
|
|
4338
4448
|
if (--toLoad == 0)
|
|
@@ -4479,7 +4589,7 @@ var spine = (() => {
|
|
|
4479
4589
|
this.finish(url, request.status, request.response);
|
|
4480
4590
|
};
|
|
4481
4591
|
request.onload = () => {
|
|
4482
|
-
if (request.status == 200)
|
|
4592
|
+
if (request.status == 200 || request.status == 0)
|
|
4483
4593
|
this.finish(url, 200, new Uint8Array(request.response));
|
|
4484
4594
|
else
|
|
4485
4595
|
onerror();
|
|
@@ -4500,7 +4610,7 @@ var spine = (() => {
|
|
|
4500
4610
|
finish(url, status, data) {
|
|
4501
4611
|
let callbacks = this.callbacks[url];
|
|
4502
4612
|
delete this.callbacks[url];
|
|
4503
|
-
let args = status == 200 ? [data] : [status, data];
|
|
4613
|
+
let args = status == 200 || status == 0 ? [data] : [status, data];
|
|
4504
4614
|
for (let i = args.length - 1, n = callbacks.length; i < n; i += 2)
|
|
4505
4615
|
callbacks[i].apply(null, args);
|
|
4506
4616
|
}
|
|
@@ -4509,6 +4619,13 @@ var spine = (() => {
|
|
|
4509
4619
|
// spine-core/src/Event.ts
|
|
4510
4620
|
var Event = class {
|
|
4511
4621
|
constructor(time, data) {
|
|
4622
|
+
this.data = null;
|
|
4623
|
+
this.intValue = 0;
|
|
4624
|
+
this.floatValue = 0;
|
|
4625
|
+
this.stringValue = null;
|
|
4626
|
+
this.time = 0;
|
|
4627
|
+
this.volume = 0;
|
|
4628
|
+
this.balance = 0;
|
|
4512
4629
|
if (!data)
|
|
4513
4630
|
throw new Error("data cannot be null.");
|
|
4514
4631
|
this.time = time;
|
|
@@ -4519,6 +4636,13 @@ var spine = (() => {
|
|
|
4519
4636
|
// spine-core/src/EventData.ts
|
|
4520
4637
|
var EventData = class {
|
|
4521
4638
|
constructor(name) {
|
|
4639
|
+
this.name = null;
|
|
4640
|
+
this.intValue = 0;
|
|
4641
|
+
this.floatValue = 0;
|
|
4642
|
+
this.stringValue = null;
|
|
4643
|
+
this.audioPath = null;
|
|
4644
|
+
this.volume = 0;
|
|
4645
|
+
this.balance = 0;
|
|
4522
4646
|
this.name = name;
|
|
4523
4647
|
}
|
|
4524
4648
|
};
|
|
@@ -4526,6 +4650,9 @@ var spine = (() => {
|
|
|
4526
4650
|
// spine-core/src/IkConstraint.ts
|
|
4527
4651
|
var IkConstraint = class {
|
|
4528
4652
|
constructor(data, skeleton) {
|
|
4653
|
+
this.data = null;
|
|
4654
|
+
this.bones = null;
|
|
4655
|
+
this.target = null;
|
|
4529
4656
|
this.bendDirection = 0;
|
|
4530
4657
|
this.compress = false;
|
|
4531
4658
|
this.stretch = false;
|
|
@@ -4764,6 +4891,7 @@ var spine = (() => {
|
|
|
4764
4891
|
constructor(name) {
|
|
4765
4892
|
super(name, 0, false);
|
|
4766
4893
|
this.bones = new Array();
|
|
4894
|
+
this.target = null;
|
|
4767
4895
|
this.bendDirection = 1;
|
|
4768
4896
|
this.compress = false;
|
|
4769
4897
|
this.stretch = false;
|
|
@@ -4778,6 +4906,13 @@ var spine = (() => {
|
|
|
4778
4906
|
constructor(name) {
|
|
4779
4907
|
super(name, 0, false);
|
|
4780
4908
|
this.bones = new Array();
|
|
4909
|
+
this.target = null;
|
|
4910
|
+
this.positionMode = null;
|
|
4911
|
+
this.spacingMode = null;
|
|
4912
|
+
this.rotateMode = null;
|
|
4913
|
+
this.offsetRotation = 0;
|
|
4914
|
+
this.position = 0;
|
|
4915
|
+
this.spacing = 0;
|
|
4781
4916
|
this.mixRotate = 0;
|
|
4782
4917
|
this.mixX = 0;
|
|
4783
4918
|
this.mixY = 0;
|
|
@@ -4805,6 +4940,9 @@ var spine = (() => {
|
|
|
4805
4940
|
// spine-core/src/PathConstraint.ts
|
|
4806
4941
|
var _PathConstraint = class {
|
|
4807
4942
|
constructor(data, skeleton) {
|
|
4943
|
+
this.data = null;
|
|
4944
|
+
this.bones = null;
|
|
4945
|
+
this.target = null;
|
|
4808
4946
|
this.position = 0;
|
|
4809
4947
|
this.spacing = 0;
|
|
4810
4948
|
this.mixRotate = 0;
|
|
@@ -5224,6 +5362,12 @@ var spine = (() => {
|
|
|
5224
5362
|
// spine-core/src/Slot.ts
|
|
5225
5363
|
var Slot = class {
|
|
5226
5364
|
constructor(data, bone) {
|
|
5365
|
+
this.data = null;
|
|
5366
|
+
this.bone = null;
|
|
5367
|
+
this.color = null;
|
|
5368
|
+
this.darkColor = null;
|
|
5369
|
+
this.attachment = null;
|
|
5370
|
+
this.attachmentState = 0;
|
|
5227
5371
|
this.deform = new Array();
|
|
5228
5372
|
if (!data)
|
|
5229
5373
|
throw new Error("data cannot be null.");
|
|
@@ -5266,6 +5410,9 @@ var spine = (() => {
|
|
|
5266
5410
|
// spine-core/src/TransformConstraint.ts
|
|
5267
5411
|
var TransformConstraint = class {
|
|
5268
5412
|
constructor(data, skeleton) {
|
|
5413
|
+
this.data = null;
|
|
5414
|
+
this.bones = null;
|
|
5415
|
+
this.target = null;
|
|
5269
5416
|
this.mixRotate = 0;
|
|
5270
5417
|
this.mixX = 0;
|
|
5271
5418
|
this.mixY = 0;
|
|
@@ -5473,7 +5620,16 @@ var spine = (() => {
|
|
|
5473
5620
|
// spine-core/src/Skeleton.ts
|
|
5474
5621
|
var Skeleton = class {
|
|
5475
5622
|
constructor(data) {
|
|
5623
|
+
this.data = null;
|
|
5624
|
+
this.bones = null;
|
|
5625
|
+
this.slots = null;
|
|
5626
|
+
this.drawOrder = null;
|
|
5627
|
+
this.ikConstraints = null;
|
|
5628
|
+
this.transformConstraints = null;
|
|
5629
|
+
this.pathConstraints = null;
|
|
5476
5630
|
this._updateCache = new Array();
|
|
5631
|
+
this.skin = null;
|
|
5632
|
+
this.color = null;
|
|
5477
5633
|
this.scaleX = 1;
|
|
5478
5634
|
this.scaleY = 1;
|
|
5479
5635
|
this.x = 0;
|
|
@@ -5932,15 +6088,25 @@ var spine = (() => {
|
|
|
5932
6088
|
// spine-core/src/SkeletonData.ts
|
|
5933
6089
|
var SkeletonData = class {
|
|
5934
6090
|
constructor() {
|
|
6091
|
+
this.name = null;
|
|
5935
6092
|
this.bones = new Array();
|
|
5936
6093
|
this.slots = new Array();
|
|
5937
6094
|
this.skins = new Array();
|
|
6095
|
+
this.defaultSkin = null;
|
|
5938
6096
|
this.events = new Array();
|
|
5939
6097
|
this.animations = new Array();
|
|
5940
6098
|
this.ikConstraints = new Array();
|
|
5941
6099
|
this.transformConstraints = new Array();
|
|
5942
6100
|
this.pathConstraints = new Array();
|
|
6101
|
+
this.x = 0;
|
|
6102
|
+
this.y = 0;
|
|
6103
|
+
this.width = 0;
|
|
6104
|
+
this.height = 0;
|
|
6105
|
+
this.version = null;
|
|
6106
|
+
this.hash = null;
|
|
5943
6107
|
this.fps = 0;
|
|
6108
|
+
this.imagesPath = null;
|
|
6109
|
+
this.audioPath = null;
|
|
5944
6110
|
}
|
|
5945
6111
|
findBone(boneName) {
|
|
5946
6112
|
if (!boneName)
|
|
@@ -6034,7 +6200,7 @@ var spine = (() => {
|
|
|
6034
6200
|
|
|
6035
6201
|
// spine-core/src/Skin.ts
|
|
6036
6202
|
var SkinEntry = class {
|
|
6037
|
-
constructor(slotIndex, name, attachment) {
|
|
6203
|
+
constructor(slotIndex = 0, name = null, attachment = null) {
|
|
6038
6204
|
this.slotIndex = slotIndex;
|
|
6039
6205
|
this.name = name;
|
|
6040
6206
|
this.attachment = attachment;
|
|
@@ -6042,6 +6208,7 @@ var spine = (() => {
|
|
|
6042
6208
|
};
|
|
6043
6209
|
var Skin = class {
|
|
6044
6210
|
constructor(name) {
|
|
6211
|
+
this.name = null;
|
|
6045
6212
|
this.attachments = new Array();
|
|
6046
6213
|
this.bones = Array();
|
|
6047
6214
|
this.constraints = new Array();
|
|
@@ -6192,7 +6359,13 @@ var spine = (() => {
|
|
|
6192
6359
|
// spine-core/src/SlotData.ts
|
|
6193
6360
|
var SlotData = class {
|
|
6194
6361
|
constructor(index, name, boneData) {
|
|
6362
|
+
this.index = 0;
|
|
6363
|
+
this.name = null;
|
|
6364
|
+
this.boneData = null;
|
|
6195
6365
|
this.color = new Color(1, 1, 1, 1);
|
|
6366
|
+
this.darkColor = null;
|
|
6367
|
+
this.attachmentName = null;
|
|
6368
|
+
this.blendMode = null;
|
|
6196
6369
|
if (index < 0)
|
|
6197
6370
|
throw new Error("index must be >= 0.");
|
|
6198
6371
|
if (!name)
|
|
@@ -6217,6 +6390,7 @@ var spine = (() => {
|
|
|
6217
6390
|
constructor(name) {
|
|
6218
6391
|
super(name, 0, false);
|
|
6219
6392
|
this.bones = new Array();
|
|
6393
|
+
this.target = null;
|
|
6220
6394
|
this.mixRotate = 0;
|
|
6221
6395
|
this.mixX = 0;
|
|
6222
6396
|
this.mixY = 0;
|
|
@@ -6238,6 +6412,7 @@ var spine = (() => {
|
|
|
6238
6412
|
var SkeletonBinary = class {
|
|
6239
6413
|
constructor(attachmentLoader) {
|
|
6240
6414
|
this.scale = 1;
|
|
6415
|
+
this.attachmentLoader = null;
|
|
6241
6416
|
this.linkedMeshes = new Array();
|
|
6242
6417
|
this.attachmentLoader = attachmentLoader;
|
|
6243
6418
|
}
|
|
@@ -7949,6 +8124,7 @@ var spine = (() => {
|
|
|
7949
8124
|
// spine-core/src/SkeletonJson.ts
|
|
7950
8125
|
var SkeletonJson = class {
|
|
7951
8126
|
constructor(attachmentLoader) {
|
|
8127
|
+
this.attachmentLoader = null;
|
|
7952
8128
|
this.scale = 1;
|
|
7953
8129
|
this.linkedMeshes = new Array();
|
|
7954
8130
|
this.attachmentLoader = attachmentLoader;
|