@esotericsoftware/spine-webgl 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.
- package/dist/Input.d.ts +1 -0
- package/dist/Input.js +2 -1
- package/dist/LoadingScreen.d.ts +3 -2
- package/dist/LoadingScreen.js +5 -1
- package/dist/SceneRenderer.d.ts +1 -1
- package/dist/SceneRenderer.js +8 -8
- package/dist/iife/spine-webgl.js +201 -20
- package/dist/iife/spine-webgl.js.map +2 -2
- package/dist/iife/spine-webgl.min.js +26 -26
- package/package.json +2 -2
package/dist/iife/spine-webgl.js
CHANGED
|
@@ -554,6 +554,8 @@ var spine = (() => {
|
|
|
554
554
|
constructor(name) {
|
|
555
555
|
super(name);
|
|
556
556
|
this.id = _VertexAttachment.nextID++;
|
|
557
|
+
this.bones = null;
|
|
558
|
+
this.vertices = null;
|
|
557
559
|
this.worldVerticesLength = 0;
|
|
558
560
|
this.timelineAttahment = this;
|
|
559
561
|
}
|
|
@@ -699,6 +701,8 @@ var spine = (() => {
|
|
|
699
701
|
// spine-core/src/Animation.ts
|
|
700
702
|
var Animation = class {
|
|
701
703
|
constructor(name, timelines, duration) {
|
|
704
|
+
this.timelines = null;
|
|
705
|
+
this.timelineIds = null;
|
|
702
706
|
if (!name)
|
|
703
707
|
throw new Error("name cannot be null.");
|
|
704
708
|
this.name = name;
|
|
@@ -768,6 +772,8 @@ var spine = (() => {
|
|
|
768
772
|
};
|
|
769
773
|
var Timeline = class {
|
|
770
774
|
constructor(frameCount, propertyIds) {
|
|
775
|
+
this.propertyIds = null;
|
|
776
|
+
this.frames = null;
|
|
771
777
|
this.propertyIds = propertyIds;
|
|
772
778
|
this.frames = Utils.newFloatArray(frameCount * this.getFrameEntries());
|
|
773
779
|
}
|
|
@@ -801,6 +807,7 @@ var spine = (() => {
|
|
|
801
807
|
var CurveTimeline = class extends Timeline {
|
|
802
808
|
constructor(frameCount, bezierCount, propertyIds) {
|
|
803
809
|
super(frameCount, propertyIds);
|
|
810
|
+
this.curves = null;
|
|
804
811
|
this.curves = Utils.newFloatArray(frameCount + bezierCount * 18);
|
|
805
812
|
this.curves[frameCount - 1] = 1;
|
|
806
813
|
}
|
|
@@ -1137,8 +1144,8 @@ var spine = (() => {
|
|
|
1137
1144
|
bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;
|
|
1138
1145
|
break;
|
|
1139
1146
|
case 3:
|
|
1140
|
-
bone.scaleX
|
|
1141
|
-
bone.scaleY
|
|
1147
|
+
bone.scaleX += (x - bone.data.scaleX) * alpha;
|
|
1148
|
+
bone.scaleY += (y - bone.data.scaleY) * alpha;
|
|
1142
1149
|
}
|
|
1143
1150
|
} else {
|
|
1144
1151
|
switch (blend) {
|
|
@@ -1204,7 +1211,7 @@ var spine = (() => {
|
|
|
1204
1211
|
bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;
|
|
1205
1212
|
break;
|
|
1206
1213
|
case 3:
|
|
1207
|
-
bone.scaleX
|
|
1214
|
+
bone.scaleX += (x - bone.data.scaleX) * alpha;
|
|
1208
1215
|
}
|
|
1209
1216
|
} else {
|
|
1210
1217
|
switch (blend) {
|
|
@@ -1265,7 +1272,7 @@ var spine = (() => {
|
|
|
1265
1272
|
bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;
|
|
1266
1273
|
break;
|
|
1267
1274
|
case 3:
|
|
1268
|
-
bone.scaleY
|
|
1275
|
+
bone.scaleY += (y - bone.data.scaleY) * alpha;
|
|
1269
1276
|
}
|
|
1270
1277
|
} else {
|
|
1271
1278
|
switch (blend) {
|
|
@@ -1860,6 +1867,8 @@ var spine = (() => {
|
|
|
1860
1867
|
Property.deform + "|" + slotIndex + "|" + attachment.id
|
|
1861
1868
|
]);
|
|
1862
1869
|
this.slotIndex = 0;
|
|
1870
|
+
this.attachment = null;
|
|
1871
|
+
this.vertices = null;
|
|
1863
1872
|
this.slotIndex = slotIndex;
|
|
1864
1873
|
this.attachment = attachment;
|
|
1865
1874
|
this.vertices = new Array(frameCount);
|
|
@@ -2076,6 +2085,7 @@ var spine = (() => {
|
|
|
2076
2085
|
var _EventTimeline = class extends Timeline {
|
|
2077
2086
|
constructor(frameCount) {
|
|
2078
2087
|
super(frameCount, _EventTimeline.propertyIds);
|
|
2088
|
+
this.events = null;
|
|
2079
2089
|
this.events = new Array(frameCount);
|
|
2080
2090
|
}
|
|
2081
2091
|
getFrameCount() {
|
|
@@ -2118,6 +2128,7 @@ var spine = (() => {
|
|
|
2118
2128
|
var _DrawOrderTimeline = class extends Timeline {
|
|
2119
2129
|
constructor(frameCount) {
|
|
2120
2130
|
super(frameCount, _DrawOrderTimeline.propertyIds);
|
|
2131
|
+
this.drawOrders = null;
|
|
2121
2132
|
this.drawOrders = new Array(frameCount);
|
|
2122
2133
|
}
|
|
2123
2134
|
getFrameCount() {
|
|
@@ -2156,6 +2167,7 @@ var spine = (() => {
|
|
|
2156
2167
|
super(frameCount, bezierCount, [
|
|
2157
2168
|
Property.ikConstraint + "|" + ikConstraintIndex
|
|
2158
2169
|
]);
|
|
2170
|
+
this.ikConstraintIndex = 0;
|
|
2159
2171
|
this.ikConstraintIndex = ikConstraintIndex;
|
|
2160
2172
|
}
|
|
2161
2173
|
getFrameEntries() {
|
|
@@ -2241,6 +2253,7 @@ var spine = (() => {
|
|
|
2241
2253
|
super(frameCount, bezierCount, [
|
|
2242
2254
|
Property.transformConstraint + "|" + transformConstraintIndex
|
|
2243
2255
|
]);
|
|
2256
|
+
this.transformConstraintIndex = 0;
|
|
2244
2257
|
this.transformConstraintIndex = transformConstraintIndex;
|
|
2245
2258
|
}
|
|
2246
2259
|
getFrameEntries() {
|
|
@@ -2340,6 +2353,7 @@ var spine = (() => {
|
|
|
2340
2353
|
var PathConstraintPositionTimeline = class extends CurveTimeline1 {
|
|
2341
2354
|
constructor(frameCount, bezierCount, pathConstraintIndex) {
|
|
2342
2355
|
super(frameCount, bezierCount, Property.pathConstraintPosition + "|" + pathConstraintIndex);
|
|
2356
|
+
this.pathConstraintIndex = 0;
|
|
2343
2357
|
this.pathConstraintIndex = pathConstraintIndex;
|
|
2344
2358
|
}
|
|
2345
2359
|
apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {
|
|
@@ -2521,17 +2535,25 @@ var spine = (() => {
|
|
|
2521
2535
|
case SequenceMode.loop:
|
|
2522
2536
|
index %= count;
|
|
2523
2537
|
break;
|
|
2524
|
-
case SequenceMode.pingpong:
|
|
2538
|
+
case SequenceMode.pingpong: {
|
|
2525
2539
|
let n = (count << 1) - 2;
|
|
2526
2540
|
index %= n;
|
|
2527
2541
|
if (index >= count)
|
|
2528
2542
|
index = n - index;
|
|
2529
2543
|
break;
|
|
2544
|
+
}
|
|
2530
2545
|
case SequenceMode.onceReverse:
|
|
2531
2546
|
index = Math.max(count - 1 - index, 0);
|
|
2532
2547
|
break;
|
|
2533
2548
|
case SequenceMode.loopReverse:
|
|
2534
2549
|
index = count - 1 - index % count;
|
|
2550
|
+
break;
|
|
2551
|
+
case SequenceMode.pingpongReverse: {
|
|
2552
|
+
let n = (count << 1) - 2;
|
|
2553
|
+
index = (index + count - 1) % n;
|
|
2554
|
+
if (index >= count)
|
|
2555
|
+
index = n - index;
|
|
2556
|
+
}
|
|
2535
2557
|
}
|
|
2536
2558
|
}
|
|
2537
2559
|
slot.sequenceIndex = index;
|
|
@@ -2545,6 +2567,7 @@ var spine = (() => {
|
|
|
2545
2567
|
// spine-core/src/AnimationState.ts
|
|
2546
2568
|
var AnimationState = class {
|
|
2547
2569
|
constructor(data) {
|
|
2570
|
+
this.data = null;
|
|
2548
2571
|
this.tracks = new Array();
|
|
2549
2572
|
this.timeScale = 1;
|
|
2550
2573
|
this.unkeyedState = 0;
|
|
@@ -2671,13 +2694,14 @@ var spine = (() => {
|
|
|
2671
2694
|
}
|
|
2672
2695
|
} else {
|
|
2673
2696
|
let timelineMode = current.timelineMode;
|
|
2674
|
-
let
|
|
2697
|
+
let shortestRotation = current.shortestRotation;
|
|
2698
|
+
let firstFrame = !shortestRotation && current.timelinesRotation.length != timelineCount << 1;
|
|
2675
2699
|
if (firstFrame)
|
|
2676
2700
|
current.timelinesRotation.length = timelineCount << 1;
|
|
2677
2701
|
for (let ii = 0; ii < timelineCount; ii++) {
|
|
2678
2702
|
let timeline2 = timelines[ii];
|
|
2679
2703
|
let timelineBlend = timelineMode[ii] == SUBSEQUENT ? blend : MixBlend.setup;
|
|
2680
|
-
if (timeline2 instanceof RotateTimeline) {
|
|
2704
|
+
if (!shortestRotation && timeline2 instanceof RotateTimeline) {
|
|
2681
2705
|
this.applyRotateTimeline(timeline2, skeleton, applyTime, mix, timelineBlend, current.timelinesRotation, ii << 1, firstFrame);
|
|
2682
2706
|
} else if (timeline2 instanceof AttachmentTimeline) {
|
|
2683
2707
|
this.applyAttachmentTimeline(timeline2, skeleton, applyTime, blend, true);
|
|
@@ -2737,7 +2761,8 @@ var spine = (() => {
|
|
|
2737
2761
|
} else {
|
|
2738
2762
|
let timelineMode = from.timelineMode;
|
|
2739
2763
|
let timelineHoldMix = from.timelineHoldMix;
|
|
2740
|
-
let
|
|
2764
|
+
let shortestRotation = from.shortestRotation;
|
|
2765
|
+
let firstFrame = !shortestRotation && from.timelinesRotation.length != timelineCount << 1;
|
|
2741
2766
|
if (firstFrame)
|
|
2742
2767
|
from.timelinesRotation.length = timelineCount << 1;
|
|
2743
2768
|
from.totalAlpha = 0;
|
|
@@ -2772,7 +2797,7 @@ var spine = (() => {
|
|
|
2772
2797
|
break;
|
|
2773
2798
|
}
|
|
2774
2799
|
from.totalAlpha += alpha;
|
|
2775
|
-
if (timeline instanceof RotateTimeline)
|
|
2800
|
+
if (!shortestRotation && timeline instanceof RotateTimeline)
|
|
2776
2801
|
this.applyRotateTimeline(timeline, skeleton, applyTime, alpha, timelineBlend, from.timelinesRotation, i << 1, firstFrame);
|
|
2777
2802
|
else if (timeline instanceof AttachmentTimeline)
|
|
2778
2803
|
this.applyAttachmentTimeline(timeline, skeleton, applyTime, timelineBlend, attachments);
|
|
@@ -3023,10 +3048,13 @@ var spine = (() => {
|
|
|
3023
3048
|
}
|
|
3024
3049
|
trackEntry(trackIndex, animation, loop, last) {
|
|
3025
3050
|
let entry = this.trackEntryPool.obtain();
|
|
3051
|
+
entry.reset();
|
|
3026
3052
|
entry.trackIndex = trackIndex;
|
|
3027
3053
|
entry.animation = animation;
|
|
3028
3054
|
entry.loop = loop;
|
|
3029
3055
|
entry.holdPrevious = false;
|
|
3056
|
+
entry.reverse = false;
|
|
3057
|
+
entry.shortestRotation = false;
|
|
3030
3058
|
entry.eventThreshold = 0;
|
|
3031
3059
|
entry.attachmentThreshold = 0;
|
|
3032
3060
|
entry.drawOrderThreshold = 0;
|
|
@@ -3041,9 +3069,10 @@ var spine = (() => {
|
|
|
3041
3069
|
entry.trackEnd = Number.MAX_VALUE;
|
|
3042
3070
|
entry.timeScale = 1;
|
|
3043
3071
|
entry.alpha = 1;
|
|
3044
|
-
entry.interruptAlpha = 1;
|
|
3045
3072
|
entry.mixTime = 0;
|
|
3046
3073
|
entry.mixDuration = !last ? 0 : this.data.getMix(last.animation, animation);
|
|
3074
|
+
entry.interruptAlpha = 1;
|
|
3075
|
+
entry.totalAlpha = 0;
|
|
3047
3076
|
entry.mixBlend = MixBlend.replace;
|
|
3048
3077
|
return entry;
|
|
3049
3078
|
}
|
|
@@ -3133,6 +3162,35 @@ var spine = (() => {
|
|
|
3133
3162
|
};
|
|
3134
3163
|
var TrackEntry = class {
|
|
3135
3164
|
constructor() {
|
|
3165
|
+
this.animation = null;
|
|
3166
|
+
this.previous = null;
|
|
3167
|
+
this.next = null;
|
|
3168
|
+
this.mixingFrom = null;
|
|
3169
|
+
this.mixingTo = null;
|
|
3170
|
+
this.listener = null;
|
|
3171
|
+
this.trackIndex = 0;
|
|
3172
|
+
this.loop = false;
|
|
3173
|
+
this.holdPrevious = false;
|
|
3174
|
+
this.reverse = false;
|
|
3175
|
+
this.shortestRotation = false;
|
|
3176
|
+
this.eventThreshold = 0;
|
|
3177
|
+
this.attachmentThreshold = 0;
|
|
3178
|
+
this.drawOrderThreshold = 0;
|
|
3179
|
+
this.animationStart = 0;
|
|
3180
|
+
this.animationEnd = 0;
|
|
3181
|
+
this.animationLast = 0;
|
|
3182
|
+
this.nextAnimationLast = 0;
|
|
3183
|
+
this.delay = 0;
|
|
3184
|
+
this.trackTime = 0;
|
|
3185
|
+
this.trackLast = 0;
|
|
3186
|
+
this.nextTrackLast = 0;
|
|
3187
|
+
this.trackEnd = 0;
|
|
3188
|
+
this.timeScale = 0;
|
|
3189
|
+
this.alpha = 0;
|
|
3190
|
+
this.mixTime = 0;
|
|
3191
|
+
this.mixDuration = 0;
|
|
3192
|
+
this.interruptAlpha = 0;
|
|
3193
|
+
this.totalAlpha = 0;
|
|
3136
3194
|
this.mixBlend = MixBlend.replace;
|
|
3137
3195
|
this.timelineMode = new Array();
|
|
3138
3196
|
this.timelineHoldMix = new Array();
|
|
@@ -3183,6 +3241,7 @@ var spine = (() => {
|
|
|
3183
3241
|
constructor(animState) {
|
|
3184
3242
|
this.objects = [];
|
|
3185
3243
|
this.drainDisabled = false;
|
|
3244
|
+
this.animState = null;
|
|
3186
3245
|
this.animState = animState;
|
|
3187
3246
|
}
|
|
3188
3247
|
start(entry) {
|
|
@@ -3309,6 +3368,7 @@ var spine = (() => {
|
|
|
3309
3368
|
// spine-core/src/AnimationStateData.ts
|
|
3310
3369
|
var AnimationStateData = class {
|
|
3311
3370
|
constructor(skeletonData) {
|
|
3371
|
+
this.skeletonData = null;
|
|
3312
3372
|
this.animationToMixTime = {};
|
|
3313
3373
|
this.defaultMix = 0;
|
|
3314
3374
|
if (!skeletonData)
|
|
@@ -3357,6 +3417,7 @@ var spine = (() => {
|
|
|
3357
3417
|
var ClippingAttachment = class extends VertexAttachment {
|
|
3358
3418
|
constructor(name) {
|
|
3359
3419
|
super(name);
|
|
3420
|
+
this.endSlot = null;
|
|
3360
3421
|
this.color = new Color(0.2275, 0.2275, 0.8078, 1);
|
|
3361
3422
|
}
|
|
3362
3423
|
copy() {
|
|
@@ -3580,6 +3641,7 @@ var spine = (() => {
|
|
|
3580
3641
|
};
|
|
3581
3642
|
var TextureAtlasReader = class {
|
|
3582
3643
|
constructor(text) {
|
|
3644
|
+
this.lines = null;
|
|
3583
3645
|
this.index = 0;
|
|
3584
3646
|
this.lines = text.split(/\r\n|\r|\n/);
|
|
3585
3647
|
}
|
|
@@ -3613,10 +3675,15 @@ var spine = (() => {
|
|
|
3613
3675
|
};
|
|
3614
3676
|
var TextureAtlasPage = class {
|
|
3615
3677
|
constructor() {
|
|
3678
|
+
this.name = null;
|
|
3616
3679
|
this.minFilter = TextureFilter.Nearest;
|
|
3617
3680
|
this.magFilter = TextureFilter.Nearest;
|
|
3618
3681
|
this.uWrap = TextureWrap.ClampToEdge;
|
|
3619
3682
|
this.vWrap = TextureWrap.ClampToEdge;
|
|
3683
|
+
this.texture = null;
|
|
3684
|
+
this.width = 0;
|
|
3685
|
+
this.height = 0;
|
|
3686
|
+
this.pma = false;
|
|
3620
3687
|
}
|
|
3621
3688
|
setTexture(texture) {
|
|
3622
3689
|
this.texture = texture;
|
|
@@ -3625,13 +3692,39 @@ var spine = (() => {
|
|
|
3625
3692
|
}
|
|
3626
3693
|
};
|
|
3627
3694
|
var TextureAtlasRegion = class extends TextureRegion {
|
|
3695
|
+
constructor() {
|
|
3696
|
+
super(...arguments);
|
|
3697
|
+
this.page = null;
|
|
3698
|
+
this.name = null;
|
|
3699
|
+
this.x = 0;
|
|
3700
|
+
this.y = 0;
|
|
3701
|
+
this.offsetX = 0;
|
|
3702
|
+
this.offsetY = 0;
|
|
3703
|
+
this.originalWidth = 0;
|
|
3704
|
+
this.originalHeight = 0;
|
|
3705
|
+
this.index = 0;
|
|
3706
|
+
this.degrees = 0;
|
|
3707
|
+
this.names = null;
|
|
3708
|
+
this.values = null;
|
|
3709
|
+
}
|
|
3628
3710
|
};
|
|
3629
3711
|
|
|
3630
3712
|
// spine-core/src/attachments/MeshAttachment.ts
|
|
3631
3713
|
var MeshAttachment = class extends VertexAttachment {
|
|
3632
3714
|
constructor(name) {
|
|
3633
3715
|
super(name);
|
|
3716
|
+
this.region = null;
|
|
3717
|
+
this.path = null;
|
|
3718
|
+
this.regionUVs = null;
|
|
3719
|
+
this.uvs = null;
|
|
3720
|
+
this.triangles = null;
|
|
3634
3721
|
this.color = new Color(1, 1, 1, 1);
|
|
3722
|
+
this.width = 0;
|
|
3723
|
+
this.height = 0;
|
|
3724
|
+
this.hullLength = 0;
|
|
3725
|
+
this.edges = null;
|
|
3726
|
+
this.parentMesh = null;
|
|
3727
|
+
this.sequence = null;
|
|
3635
3728
|
this.tempColor = new Color(0, 0, 0, 0);
|
|
3636
3729
|
}
|
|
3637
3730
|
updateRegion() {
|
|
@@ -3753,6 +3846,7 @@ var spine = (() => {
|
|
|
3753
3846
|
var PathAttachment = class extends VertexAttachment {
|
|
3754
3847
|
constructor(name) {
|
|
3755
3848
|
super(name);
|
|
3849
|
+
this.lengths = null;
|
|
3756
3850
|
this.closed = false;
|
|
3757
3851
|
this.constantSpeed = false;
|
|
3758
3852
|
this.color = new Color(1, 1, 1, 1);
|
|
@@ -3773,6 +3867,9 @@ var spine = (() => {
|
|
|
3773
3867
|
var PointAttachment = class extends VertexAttachment {
|
|
3774
3868
|
constructor(name) {
|
|
3775
3869
|
super(name);
|
|
3870
|
+
this.x = 0;
|
|
3871
|
+
this.y = 0;
|
|
3872
|
+
this.rotation = 0;
|
|
3776
3873
|
this.color = new Color(0.38, 0.94, 0, 1);
|
|
3777
3874
|
}
|
|
3778
3875
|
computeWorldPosition(bone, point) {
|
|
@@ -3808,6 +3905,10 @@ var spine = (() => {
|
|
|
3808
3905
|
this.width = 0;
|
|
3809
3906
|
this.height = 0;
|
|
3810
3907
|
this.color = new Color(1, 1, 1, 1);
|
|
3908
|
+
this.path = null;
|
|
3909
|
+
this.rendererObject = null;
|
|
3910
|
+
this.region = null;
|
|
3911
|
+
this.sequence = null;
|
|
3811
3912
|
this.offset = Utils.newFloatArray(8);
|
|
3812
3913
|
this.uvs = Utils.newFloatArray(8);
|
|
3813
3914
|
this.tempColor = new Color(1, 1, 1, 1);
|
|
@@ -3946,6 +4047,7 @@ var spine = (() => {
|
|
|
3946
4047
|
// spine-core/src/AtlasAttachmentLoader.ts
|
|
3947
4048
|
var AtlasAttachmentLoader = class {
|
|
3948
4049
|
constructor(atlas) {
|
|
4050
|
+
this.atlas = null;
|
|
3949
4051
|
this.atlas = atlas;
|
|
3950
4052
|
}
|
|
3951
4053
|
loadSequence(name, basePath, sequence) {
|
|
@@ -4001,6 +4103,10 @@ var spine = (() => {
|
|
|
4001
4103
|
// spine-core/src/BoneData.ts
|
|
4002
4104
|
var BoneData = class {
|
|
4003
4105
|
constructor(index, name, parent) {
|
|
4106
|
+
this.index = 0;
|
|
4107
|
+
this.name = null;
|
|
4108
|
+
this.parent = null;
|
|
4109
|
+
this.length = 0;
|
|
4004
4110
|
this.x = 0;
|
|
4005
4111
|
this.y = 0;
|
|
4006
4112
|
this.rotation = 0;
|
|
@@ -4032,6 +4138,9 @@ var spine = (() => {
|
|
|
4032
4138
|
// spine-core/src/Bone.ts
|
|
4033
4139
|
var Bone = class {
|
|
4034
4140
|
constructor(data, skeleton, parent) {
|
|
4141
|
+
this.data = null;
|
|
4142
|
+
this.skeleton = null;
|
|
4143
|
+
this.parent = null;
|
|
4035
4144
|
this.children = new Array();
|
|
4036
4145
|
this.x = 0;
|
|
4037
4146
|
this.y = 0;
|
|
@@ -4284,6 +4393,7 @@ var spine = (() => {
|
|
|
4284
4393
|
// spine-core/src/AssetManagerBase.ts
|
|
4285
4394
|
var AssetManagerBase = class {
|
|
4286
4395
|
constructor(textureLoader, pathPrefix = "", downloader = null) {
|
|
4396
|
+
this.pathPrefix = null;
|
|
4287
4397
|
this.assets = {};
|
|
4288
4398
|
this.errors = {};
|
|
4289
4399
|
this.toLoad = 0;
|
|
@@ -4367,7 +4477,7 @@ var spine = (() => {
|
|
|
4367
4477
|
image.src = path;
|
|
4368
4478
|
}
|
|
4369
4479
|
}
|
|
4370
|
-
loadTextureAtlas(path, success = null, error = null) {
|
|
4480
|
+
loadTextureAtlas(path, success = null, error = null, fileAlias = null) {
|
|
4371
4481
|
let index = path.lastIndexOf("/");
|
|
4372
4482
|
let parent = index >= 0 ? path.substring(0, index + 1) : "";
|
|
4373
4483
|
path = this.start(path);
|
|
@@ -4376,7 +4486,7 @@ var spine = (() => {
|
|
|
4376
4486
|
let atlas = new TextureAtlas(atlasText);
|
|
4377
4487
|
let toLoad = atlas.pages.length, abort = false;
|
|
4378
4488
|
for (let page of atlas.pages) {
|
|
4379
|
-
this.loadTexture(parent + page.name, (imagePath, texture) => {
|
|
4489
|
+
this.loadTexture(fileAlias == null ? parent + page.name : fileAlias[page.name], (imagePath, texture) => {
|
|
4380
4490
|
if (!abort) {
|
|
4381
4491
|
page.setTexture(texture);
|
|
4382
4492
|
if (--toLoad == 0)
|
|
@@ -4553,6 +4663,13 @@ var spine = (() => {
|
|
|
4553
4663
|
// spine-core/src/Event.ts
|
|
4554
4664
|
var Event = class {
|
|
4555
4665
|
constructor(time, data) {
|
|
4666
|
+
this.data = null;
|
|
4667
|
+
this.intValue = 0;
|
|
4668
|
+
this.floatValue = 0;
|
|
4669
|
+
this.stringValue = null;
|
|
4670
|
+
this.time = 0;
|
|
4671
|
+
this.volume = 0;
|
|
4672
|
+
this.balance = 0;
|
|
4556
4673
|
if (!data)
|
|
4557
4674
|
throw new Error("data cannot be null.");
|
|
4558
4675
|
this.time = time;
|
|
@@ -4563,6 +4680,13 @@ var spine = (() => {
|
|
|
4563
4680
|
// spine-core/src/EventData.ts
|
|
4564
4681
|
var EventData = class {
|
|
4565
4682
|
constructor(name) {
|
|
4683
|
+
this.name = null;
|
|
4684
|
+
this.intValue = 0;
|
|
4685
|
+
this.floatValue = 0;
|
|
4686
|
+
this.stringValue = null;
|
|
4687
|
+
this.audioPath = null;
|
|
4688
|
+
this.volume = 0;
|
|
4689
|
+
this.balance = 0;
|
|
4566
4690
|
this.name = name;
|
|
4567
4691
|
}
|
|
4568
4692
|
};
|
|
@@ -4570,6 +4694,9 @@ var spine = (() => {
|
|
|
4570
4694
|
// spine-core/src/IkConstraint.ts
|
|
4571
4695
|
var IkConstraint = class {
|
|
4572
4696
|
constructor(data, skeleton) {
|
|
4697
|
+
this.data = null;
|
|
4698
|
+
this.bones = null;
|
|
4699
|
+
this.target = null;
|
|
4573
4700
|
this.bendDirection = 0;
|
|
4574
4701
|
this.compress = false;
|
|
4575
4702
|
this.stretch = false;
|
|
@@ -4808,6 +4935,7 @@ var spine = (() => {
|
|
|
4808
4935
|
constructor(name) {
|
|
4809
4936
|
super(name, 0, false);
|
|
4810
4937
|
this.bones = new Array();
|
|
4938
|
+
this.target = null;
|
|
4811
4939
|
this.bendDirection = 1;
|
|
4812
4940
|
this.compress = false;
|
|
4813
4941
|
this.stretch = false;
|
|
@@ -4822,6 +4950,13 @@ var spine = (() => {
|
|
|
4822
4950
|
constructor(name) {
|
|
4823
4951
|
super(name, 0, false);
|
|
4824
4952
|
this.bones = new Array();
|
|
4953
|
+
this.target = null;
|
|
4954
|
+
this.positionMode = null;
|
|
4955
|
+
this.spacingMode = null;
|
|
4956
|
+
this.rotateMode = null;
|
|
4957
|
+
this.offsetRotation = 0;
|
|
4958
|
+
this.position = 0;
|
|
4959
|
+
this.spacing = 0;
|
|
4825
4960
|
this.mixRotate = 0;
|
|
4826
4961
|
this.mixX = 0;
|
|
4827
4962
|
this.mixY = 0;
|
|
@@ -4849,6 +4984,9 @@ var spine = (() => {
|
|
|
4849
4984
|
// spine-core/src/PathConstraint.ts
|
|
4850
4985
|
var _PathConstraint = class {
|
|
4851
4986
|
constructor(data, skeleton) {
|
|
4987
|
+
this.data = null;
|
|
4988
|
+
this.bones = null;
|
|
4989
|
+
this.target = null;
|
|
4852
4990
|
this.position = 0;
|
|
4853
4991
|
this.spacing = 0;
|
|
4854
4992
|
this.mixRotate = 0;
|
|
@@ -5268,6 +5406,12 @@ var spine = (() => {
|
|
|
5268
5406
|
// spine-core/src/Slot.ts
|
|
5269
5407
|
var Slot = class {
|
|
5270
5408
|
constructor(data, bone) {
|
|
5409
|
+
this.data = null;
|
|
5410
|
+
this.bone = null;
|
|
5411
|
+
this.color = null;
|
|
5412
|
+
this.darkColor = null;
|
|
5413
|
+
this.attachment = null;
|
|
5414
|
+
this.attachmentState = 0;
|
|
5271
5415
|
this.deform = new Array();
|
|
5272
5416
|
if (!data)
|
|
5273
5417
|
throw new Error("data cannot be null.");
|
|
@@ -5310,6 +5454,9 @@ var spine = (() => {
|
|
|
5310
5454
|
// spine-core/src/TransformConstraint.ts
|
|
5311
5455
|
var TransformConstraint = class {
|
|
5312
5456
|
constructor(data, skeleton) {
|
|
5457
|
+
this.data = null;
|
|
5458
|
+
this.bones = null;
|
|
5459
|
+
this.target = null;
|
|
5313
5460
|
this.mixRotate = 0;
|
|
5314
5461
|
this.mixX = 0;
|
|
5315
5462
|
this.mixY = 0;
|
|
@@ -5517,7 +5664,16 @@ var spine = (() => {
|
|
|
5517
5664
|
// spine-core/src/Skeleton.ts
|
|
5518
5665
|
var Skeleton = class {
|
|
5519
5666
|
constructor(data) {
|
|
5667
|
+
this.data = null;
|
|
5668
|
+
this.bones = null;
|
|
5669
|
+
this.slots = null;
|
|
5670
|
+
this.drawOrder = null;
|
|
5671
|
+
this.ikConstraints = null;
|
|
5672
|
+
this.transformConstraints = null;
|
|
5673
|
+
this.pathConstraints = null;
|
|
5520
5674
|
this._updateCache = new Array();
|
|
5675
|
+
this.skin = null;
|
|
5676
|
+
this.color = null;
|
|
5521
5677
|
this.scaleX = 1;
|
|
5522
5678
|
this.scaleY = 1;
|
|
5523
5679
|
this.x = 0;
|
|
@@ -5976,15 +6132,25 @@ var spine = (() => {
|
|
|
5976
6132
|
// spine-core/src/SkeletonData.ts
|
|
5977
6133
|
var SkeletonData = class {
|
|
5978
6134
|
constructor() {
|
|
6135
|
+
this.name = null;
|
|
5979
6136
|
this.bones = new Array();
|
|
5980
6137
|
this.slots = new Array();
|
|
5981
6138
|
this.skins = new Array();
|
|
6139
|
+
this.defaultSkin = null;
|
|
5982
6140
|
this.events = new Array();
|
|
5983
6141
|
this.animations = new Array();
|
|
5984
6142
|
this.ikConstraints = new Array();
|
|
5985
6143
|
this.transformConstraints = new Array();
|
|
5986
6144
|
this.pathConstraints = new Array();
|
|
6145
|
+
this.x = 0;
|
|
6146
|
+
this.y = 0;
|
|
6147
|
+
this.width = 0;
|
|
6148
|
+
this.height = 0;
|
|
6149
|
+
this.version = null;
|
|
6150
|
+
this.hash = null;
|
|
5987
6151
|
this.fps = 0;
|
|
6152
|
+
this.imagesPath = null;
|
|
6153
|
+
this.audioPath = null;
|
|
5988
6154
|
}
|
|
5989
6155
|
findBone(boneName) {
|
|
5990
6156
|
if (!boneName)
|
|
@@ -6078,7 +6244,7 @@ var spine = (() => {
|
|
|
6078
6244
|
|
|
6079
6245
|
// spine-core/src/Skin.ts
|
|
6080
6246
|
var SkinEntry = class {
|
|
6081
|
-
constructor(slotIndex, name, attachment) {
|
|
6247
|
+
constructor(slotIndex = 0, name = null, attachment = null) {
|
|
6082
6248
|
this.slotIndex = slotIndex;
|
|
6083
6249
|
this.name = name;
|
|
6084
6250
|
this.attachment = attachment;
|
|
@@ -6086,6 +6252,7 @@ var spine = (() => {
|
|
|
6086
6252
|
};
|
|
6087
6253
|
var Skin = class {
|
|
6088
6254
|
constructor(name) {
|
|
6255
|
+
this.name = null;
|
|
6089
6256
|
this.attachments = new Array();
|
|
6090
6257
|
this.bones = Array();
|
|
6091
6258
|
this.constraints = new Array();
|
|
@@ -6236,7 +6403,13 @@ var spine = (() => {
|
|
|
6236
6403
|
// spine-core/src/SlotData.ts
|
|
6237
6404
|
var SlotData = class {
|
|
6238
6405
|
constructor(index, name, boneData) {
|
|
6406
|
+
this.index = 0;
|
|
6407
|
+
this.name = null;
|
|
6408
|
+
this.boneData = null;
|
|
6239
6409
|
this.color = new Color(1, 1, 1, 1);
|
|
6410
|
+
this.darkColor = null;
|
|
6411
|
+
this.attachmentName = null;
|
|
6412
|
+
this.blendMode = null;
|
|
6240
6413
|
if (index < 0)
|
|
6241
6414
|
throw new Error("index must be >= 0.");
|
|
6242
6415
|
if (!name)
|
|
@@ -6261,6 +6434,7 @@ var spine = (() => {
|
|
|
6261
6434
|
constructor(name) {
|
|
6262
6435
|
super(name, 0, false);
|
|
6263
6436
|
this.bones = new Array();
|
|
6437
|
+
this.target = null;
|
|
6264
6438
|
this.mixRotate = 0;
|
|
6265
6439
|
this.mixX = 0;
|
|
6266
6440
|
this.mixY = 0;
|
|
@@ -6282,6 +6456,7 @@ var spine = (() => {
|
|
|
6282
6456
|
var SkeletonBinary = class {
|
|
6283
6457
|
constructor(attachmentLoader) {
|
|
6284
6458
|
this.scale = 1;
|
|
6459
|
+
this.attachmentLoader = null;
|
|
6285
6460
|
this.linkedMeshes = new Array();
|
|
6286
6461
|
this.attachmentLoader = attachmentLoader;
|
|
6287
6462
|
}
|
|
@@ -7993,6 +8168,7 @@ var spine = (() => {
|
|
|
7993
8168
|
// spine-core/src/SkeletonJson.ts
|
|
7994
8169
|
var SkeletonJson = class {
|
|
7995
8170
|
constructor(attachmentLoader) {
|
|
8171
|
+
this.attachmentLoader = null;
|
|
7996
8172
|
this.scale = 1;
|
|
7997
8173
|
this.linkedMeshes = new Array();
|
|
7998
8174
|
this.attachmentLoader = attachmentLoader;
|
|
@@ -9488,6 +9664,7 @@ var spine = (() => {
|
|
|
9488
9664
|
this.touch1 = null;
|
|
9489
9665
|
this.initialPinchDistance = 0;
|
|
9490
9666
|
this.listeners = new Array();
|
|
9667
|
+
this.eventListeners = [];
|
|
9491
9668
|
this.element = element;
|
|
9492
9669
|
this.setupCallbacks(element);
|
|
9493
9670
|
}
|
|
@@ -11054,6 +11231,13 @@ var spine = (() => {
|
|
|
11054
11231
|
this.skeletonRenderer = new SkeletonRenderer(this.context, twoColorTint);
|
|
11055
11232
|
this.skeletonDebugRenderer = new SkeletonDebugRenderer(this.context);
|
|
11056
11233
|
}
|
|
11234
|
+
dispose() {
|
|
11235
|
+
this.batcher.dispose();
|
|
11236
|
+
this.batcherShader.dispose();
|
|
11237
|
+
this.shapes.dispose();
|
|
11238
|
+
this.shapesShader.dispose();
|
|
11239
|
+
this.skeletonDebugRenderer.dispose();
|
|
11240
|
+
}
|
|
11057
11241
|
begin() {
|
|
11058
11242
|
this.camera.update();
|
|
11059
11243
|
this.enableRenderer(this.batcher);
|
|
@@ -11450,13 +11634,6 @@ var spine = (() => {
|
|
|
11450
11634
|
} else
|
|
11451
11635
|
this.activeRenderer = this.skeletonDebugRenderer;
|
|
11452
11636
|
}
|
|
11453
|
-
dispose() {
|
|
11454
|
-
this.batcher.dispose();
|
|
11455
|
-
this.batcherShader.dispose();
|
|
11456
|
-
this.shapes.dispose();
|
|
11457
|
-
this.shapesShader.dispose();
|
|
11458
|
-
this.skeletonDebugRenderer.dispose();
|
|
11459
|
-
}
|
|
11460
11637
|
};
|
|
11461
11638
|
var ResizeMode;
|
|
11462
11639
|
(function(ResizeMode2) {
|
|
@@ -11501,6 +11678,10 @@ var spine = (() => {
|
|
|
11501
11678
|
spinnerImage.onload = onload;
|
|
11502
11679
|
}
|
|
11503
11680
|
}
|
|
11681
|
+
dispose() {
|
|
11682
|
+
this.logo.dispose();
|
|
11683
|
+
this.spinner.dispose();
|
|
11684
|
+
}
|
|
11504
11685
|
draw(complete = false) {
|
|
11505
11686
|
if (loaded < 2 || complete && this.fadeOut > FADE_OUT)
|
|
11506
11687
|
return;
|