@esotericsoftware/spine-core 4.1.44 → 4.1.45
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.d.ts +7 -7
- package/dist/Animation.js +57 -38
- package/dist/AnimationState.d.ts +6 -6
- package/dist/AnimationState.js +154 -153
- package/dist/AnimationStateData.d.ts +3 -3
- package/dist/AnimationStateData.js +6 -4
- package/dist/AssetManagerBase.d.ts +3 -3
- package/dist/AssetManagerBase.js +11 -11
- package/dist/AtlasAttachmentLoader.d.ts +9 -9
- package/dist/AtlasAttachmentLoader.js +8 -7
- package/dist/Bone.d.ts +4 -4
- package/dist/Bone.js +53 -49
- package/dist/BoneData.d.ts +1 -1
- package/dist/BoneData.js +33 -31
- package/dist/ConstraintData.js +4 -1
- package/dist/Event.d.ts +1 -1
- package/dist/Event.js +8 -7
- package/dist/EventData.js +8 -7
- package/dist/IkConstraint.d.ts +4 -4
- package/dist/IkConstraint.js +21 -15
- package/dist/IkConstraintData.d.ts +2 -2
- package/dist/IkConstraintData.js +20 -20
- package/dist/PathConstraint.d.ts +6 -6
- package/dist/PathConstraint.js +28 -22
- package/dist/PathConstraintData.d.ts +3 -3
- package/dist/PathConstraintData.js +21 -21
- package/dist/Skeleton.d.ts +10 -10
- package/dist/Skeleton.js +41 -25
- package/dist/SkeletonBinary.d.ts +2 -2
- package/dist/SkeletonBinary.js +30 -19
- package/dist/SkeletonBounds.d.ts +3 -3
- package/dist/SkeletonBounds.js +18 -20
- package/dist/SkeletonClipping.d.ts +3 -3
- package/dist/SkeletonClipping.js +11 -13
- package/dist/SkeletonData.d.ts +7 -7
- package/dist/SkeletonData.js +42 -44
- package/dist/SkeletonJson.d.ts +5 -5
- package/dist/SkeletonJson.js +26 -20
- package/dist/Skin.d.ts +5 -5
- package/dist/Skin.js +10 -5
- package/dist/Slot.d.ts +5 -5
- package/dist/Slot.js +23 -16
- package/dist/SlotData.d.ts +2 -2
- package/dist/SlotData.js +18 -14
- package/dist/Texture.js +14 -14
- package/dist/TextureAtlas.d.ts +3 -3
- package/dist/TextureAtlas.js +30 -27
- package/dist/TransformConstraint.d.ts +5 -5
- package/dist/TransformConstraint.js +16 -10
- package/dist/TransformConstraintData.d.ts +2 -2
- package/dist/TransformConstraintData.js +26 -26
- package/dist/Triangulator.d.ts +1 -1
- package/dist/Triangulator.js +13 -15
- package/dist/Utils.d.ts +2 -2
- package/dist/Utils.js +37 -35
- package/dist/attachments/Attachment.d.ts +2 -2
- package/dist/attachments/Attachment.js +20 -19
- package/dist/attachments/AttachmentLoader.d.ts +8 -8
- package/dist/attachments/BoundingBoxAttachment.d.ts +2 -2
- package/dist/attachments/BoundingBoxAttachment.js +4 -4
- package/dist/attachments/ClippingAttachment.d.ts +3 -3
- package/dist/attachments/ClippingAttachment.js +10 -10
- package/dist/attachments/HasTextureRegion.d.ts +3 -3
- package/dist/attachments/MeshAttachment.d.ts +6 -6
- package/dist/attachments/MeshAttachment.js +29 -27
- package/dist/attachments/PathAttachment.d.ts +2 -2
- package/dist/attachments/PathAttachment.js +13 -13
- package/dist/attachments/PointAttachment.d.ts +3 -3
- package/dist/attachments/PointAttachment.js +9 -9
- package/dist/attachments/RegionAttachment.d.ts +6 -6
- package/dist/attachments/RegionAttachment.js +61 -59
- package/dist/attachments/Sequence.d.ts +3 -3
- package/dist/attachments/Sequence.js +9 -8
- package/dist/attachments/index.d.ts +8 -8
- package/dist/attachments/index.js +9 -9
- package/dist/iife/spine-core.js +829 -737
- package/dist/iife/spine-core.js.map +2 -2
- package/dist/iife/spine-core.min.js +2 -2
- package/dist/index.d.ts +39 -39
- package/dist/index.js +40 -40
- package/package.json +3 -2
package/dist/iife/spine-core.js
CHANGED
|
@@ -4,6 +4,7 @@ var spine = (() => {
|
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7
8
|
var __export = (target, all) => {
|
|
8
9
|
for (var name in all)
|
|
9
10
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -17,6 +18,10 @@ var spine = (() => {
|
|
|
17
18
|
return to;
|
|
18
19
|
};
|
|
19
20
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
var __publicField = (obj, key, value) => {
|
|
22
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
23
|
+
return value;
|
|
24
|
+
};
|
|
20
25
|
|
|
21
26
|
// spine-core/src/index.ts
|
|
22
27
|
var src_exports = {};
|
|
@@ -130,9 +135,7 @@ var spine = (() => {
|
|
|
130
135
|
|
|
131
136
|
// spine-core/src/Utils.ts
|
|
132
137
|
var IntSet = class {
|
|
133
|
-
|
|
134
|
-
this.array = new Array();
|
|
135
|
-
}
|
|
138
|
+
array = new Array();
|
|
136
139
|
add(value) {
|
|
137
140
|
let contains = this.contains(value);
|
|
138
141
|
this.array[value | 0] = value | 0;
|
|
@@ -149,10 +152,8 @@ var spine = (() => {
|
|
|
149
152
|
}
|
|
150
153
|
};
|
|
151
154
|
var StringSet = class {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
this.size = 0;
|
|
155
|
-
}
|
|
155
|
+
entries = {};
|
|
156
|
+
size = 0;
|
|
156
157
|
add(value) {
|
|
157
158
|
let contains = this.entries[value];
|
|
158
159
|
this.entries[value] = true;
|
|
@@ -247,11 +248,11 @@ var spine = (() => {
|
|
|
247
248
|
}
|
|
248
249
|
};
|
|
249
250
|
var Color = _Color;
|
|
250
|
-
Color
|
|
251
|
-
Color
|
|
252
|
-
Color
|
|
253
|
-
Color
|
|
254
|
-
Color
|
|
251
|
+
__publicField(Color, "WHITE", new _Color(1, 1, 1, 1));
|
|
252
|
+
__publicField(Color, "RED", new _Color(1, 0, 0, 1));
|
|
253
|
+
__publicField(Color, "GREEN", new _Color(0, 1, 0, 1));
|
|
254
|
+
__publicField(Color, "BLUE", new _Color(0, 0, 1, 1));
|
|
255
|
+
__publicField(Color, "MAGENTA", new _Color(1, 0, 1, 1));
|
|
255
256
|
var _MathUtils = class {
|
|
256
257
|
static clamp(value, min, max) {
|
|
257
258
|
if (value < min)
|
|
@@ -291,21 +292,21 @@ var spine = (() => {
|
|
|
291
292
|
}
|
|
292
293
|
};
|
|
293
294
|
var MathUtils = _MathUtils;
|
|
294
|
-
MathUtils
|
|
295
|
-
MathUtils
|
|
296
|
-
MathUtils
|
|
297
|
-
MathUtils
|
|
298
|
-
MathUtils
|
|
299
|
-
MathUtils
|
|
295
|
+
__publicField(MathUtils, "PI", 3.1415927);
|
|
296
|
+
__publicField(MathUtils, "PI2", _MathUtils.PI * 2);
|
|
297
|
+
__publicField(MathUtils, "radiansToDegrees", 180 / _MathUtils.PI);
|
|
298
|
+
__publicField(MathUtils, "radDeg", _MathUtils.radiansToDegrees);
|
|
299
|
+
__publicField(MathUtils, "degreesToRadians", _MathUtils.PI / 180);
|
|
300
|
+
__publicField(MathUtils, "degRad", _MathUtils.degreesToRadians);
|
|
300
301
|
var Interpolation = class {
|
|
301
302
|
apply(start, end, a) {
|
|
302
303
|
return start + (end - start) * this.applyInternal(a);
|
|
303
304
|
}
|
|
304
305
|
};
|
|
305
306
|
var Pow = class extends Interpolation {
|
|
307
|
+
power = 2;
|
|
306
308
|
constructor(power) {
|
|
307
309
|
super();
|
|
308
|
-
this.power = 2;
|
|
309
310
|
this.power = power;
|
|
310
311
|
}
|
|
311
312
|
applyInternal(a) {
|
|
@@ -394,7 +395,7 @@ var spine = (() => {
|
|
|
394
395
|
}
|
|
395
396
|
};
|
|
396
397
|
var Utils = _Utils;
|
|
397
|
-
Utils
|
|
398
|
+
__publicField(Utils, "SUPPORTS_TYPED_ARRAYS", typeof Float32Array !== "undefined");
|
|
398
399
|
var DebugUtils = class {
|
|
399
400
|
static logBones(skeleton) {
|
|
400
401
|
for (let i = 0; i < skeleton.bones.length; i++) {
|
|
@@ -404,8 +405,9 @@ var spine = (() => {
|
|
|
404
405
|
}
|
|
405
406
|
};
|
|
406
407
|
var Pool = class {
|
|
408
|
+
items = new Array();
|
|
409
|
+
instantiator;
|
|
407
410
|
constructor(instantiator) {
|
|
408
|
-
this.items = new Array();
|
|
409
411
|
this.instantiator = instantiator;
|
|
410
412
|
}
|
|
411
413
|
obtain() {
|
|
@@ -449,15 +451,13 @@ var spine = (() => {
|
|
|
449
451
|
}
|
|
450
452
|
};
|
|
451
453
|
var TimeKeeper = class {
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
this.frameTime = 0;
|
|
460
|
-
}
|
|
454
|
+
maxDelta = 0.064;
|
|
455
|
+
framesPerSecond = 0;
|
|
456
|
+
delta = 0;
|
|
457
|
+
totalTime = 0;
|
|
458
|
+
lastTime = Date.now() / 1e3;
|
|
459
|
+
frameCount = 0;
|
|
460
|
+
frameTime = 0;
|
|
461
461
|
update() {
|
|
462
462
|
let now = Date.now() / 1e3;
|
|
463
463
|
this.delta = now - this.lastTime;
|
|
@@ -475,11 +475,12 @@ var spine = (() => {
|
|
|
475
475
|
}
|
|
476
476
|
};
|
|
477
477
|
var WindowedMean = class {
|
|
478
|
+
values;
|
|
479
|
+
addedValues = 0;
|
|
480
|
+
lastValue = 0;
|
|
481
|
+
mean = 0;
|
|
482
|
+
dirty = true;
|
|
478
483
|
constructor(windowSize = 32) {
|
|
479
|
-
this.addedValues = 0;
|
|
480
|
-
this.lastValue = 0;
|
|
481
|
-
this.mean = 0;
|
|
482
|
-
this.dirty = true;
|
|
483
484
|
this.values = new Array(windowSize);
|
|
484
485
|
}
|
|
485
486
|
hasEnoughData() {
|
|
@@ -510,6 +511,7 @@ var spine = (() => {
|
|
|
510
511
|
|
|
511
512
|
// spine-core/src/attachments/Attachment.ts
|
|
512
513
|
var Attachment = class {
|
|
514
|
+
name;
|
|
513
515
|
constructor(name) {
|
|
514
516
|
if (!name)
|
|
515
517
|
throw new Error("name cannot be null.");
|
|
@@ -517,24 +519,24 @@ var spine = (() => {
|
|
|
517
519
|
}
|
|
518
520
|
};
|
|
519
521
|
var _VertexAttachment = class extends Attachment {
|
|
522
|
+
/** The unique ID for this attachment. */
|
|
523
|
+
id = _VertexAttachment.nextID++;
|
|
524
|
+
/** The bones which affect the {@link #getVertices()}. The array entries are, for each vertex, the number of bones affecting
|
|
525
|
+
* the vertex followed by that many bone indices, which is the index of the bone in {@link Skeleton#bones}. Will be null
|
|
526
|
+
* if this attachment has no weights. */
|
|
527
|
+
bones = null;
|
|
528
|
+
/** The vertex positions in the bone's coordinate system. For a non-weighted attachment, the values are `x,y`
|
|
529
|
+
* entries for each vertex. For a weighted attachment, the values are `x,y,weight` entries for each bone affecting
|
|
530
|
+
* each vertex. */
|
|
531
|
+
vertices = [];
|
|
532
|
+
/** The maximum number of world vertex values that can be output by
|
|
533
|
+
* {@link #computeWorldVertices()} using the `count` parameter. */
|
|
534
|
+
worldVerticesLength = 0;
|
|
535
|
+
/** Timelines for the timeline attachment are also applied to this attachment.
|
|
536
|
+
* May be null if no attachment-specific timelines should be applied. */
|
|
537
|
+
timelineAttachment = this;
|
|
520
538
|
constructor(name) {
|
|
521
539
|
super(name);
|
|
522
|
-
/** The unique ID for this attachment. */
|
|
523
|
-
this.id = _VertexAttachment.nextID++;
|
|
524
|
-
/** The bones which affect the {@link #getVertices()}. The array entries are, for each vertex, the number of bones affecting
|
|
525
|
-
* the vertex followed by that many bone indices, which is the index of the bone in {@link Skeleton#bones}. Will be null
|
|
526
|
-
* if this attachment has no weights. */
|
|
527
|
-
this.bones = null;
|
|
528
|
-
/** The vertex positions in the bone's coordinate system. For a non-weighted attachment, the values are `x,y`
|
|
529
|
-
* entries for each vertex. For a weighted attachment, the values are `x,y,weight` entries for each bone affecting
|
|
530
|
-
* each vertex. */
|
|
531
|
-
this.vertices = [];
|
|
532
|
-
/** The maximum number of world vertex values that can be output by
|
|
533
|
-
* {@link #computeWorldVertices()} using the `count` parameter. */
|
|
534
|
-
this.worldVerticesLength = 0;
|
|
535
|
-
/** Timelines for the timeline attachment are also applied to this attachment.
|
|
536
|
-
* May be null if no attachment-specific timelines should be applied. */
|
|
537
|
-
this.timelineAttachment = this;
|
|
538
540
|
}
|
|
539
541
|
/** Transforms the attachment's local {@link #vertices} to world coordinates. If the slot's {@link Slot#deform} is
|
|
540
542
|
* not empty, it is used to deform the vertices.
|
|
@@ -621,16 +623,17 @@ var spine = (() => {
|
|
|
621
623
|
}
|
|
622
624
|
};
|
|
623
625
|
var VertexAttachment = _VertexAttachment;
|
|
624
|
-
VertexAttachment
|
|
626
|
+
__publicField(VertexAttachment, "nextID", 0);
|
|
625
627
|
|
|
626
628
|
// spine-core/src/attachments/Sequence.ts
|
|
627
629
|
var _Sequence = class {
|
|
630
|
+
id = _Sequence.nextID();
|
|
631
|
+
regions;
|
|
632
|
+
start = 0;
|
|
633
|
+
digits = 0;
|
|
634
|
+
/** The index of the region to show for the setup pose. */
|
|
635
|
+
setupIndex = 0;
|
|
628
636
|
constructor(count) {
|
|
629
|
-
this.id = _Sequence.nextID();
|
|
630
|
-
this.start = 0;
|
|
631
|
-
this.digits = 0;
|
|
632
|
-
/** The index of the region to show for the setup pose. */
|
|
633
|
-
this.setupIndex = 0;
|
|
634
637
|
this.regions = new Array(count);
|
|
635
638
|
}
|
|
636
639
|
copy() {
|
|
@@ -666,7 +669,7 @@ var spine = (() => {
|
|
|
666
669
|
}
|
|
667
670
|
};
|
|
668
671
|
var Sequence = _Sequence;
|
|
669
|
-
Sequence
|
|
672
|
+
__publicField(Sequence, "_nextID", 0);
|
|
670
673
|
var SequenceMode = /* @__PURE__ */ ((SequenceMode2) => {
|
|
671
674
|
SequenceMode2[SequenceMode2["hold"] = 0] = "hold";
|
|
672
675
|
SequenceMode2[SequenceMode2["once"] = 1] = "once";
|
|
@@ -689,9 +692,13 @@ var spine = (() => {
|
|
|
689
692
|
|
|
690
693
|
// spine-core/src/Animation.ts
|
|
691
694
|
var Animation = class {
|
|
695
|
+
/** The animation's name, which is unique across all animations in the skeleton. */
|
|
696
|
+
name;
|
|
697
|
+
timelines = [];
|
|
698
|
+
timelineIds = new StringSet();
|
|
699
|
+
/** The duration of the animation in seconds, which is the highest time of all keys in the timeline. */
|
|
700
|
+
duration;
|
|
692
701
|
constructor(name, timelines, duration) {
|
|
693
|
-
this.timelines = [];
|
|
694
|
-
this.timelineIds = new StringSet();
|
|
695
702
|
if (!name)
|
|
696
703
|
throw new Error("name cannot be null.");
|
|
697
704
|
this.name = name;
|
|
@@ -765,6 +772,8 @@ var spine = (() => {
|
|
|
765
772
|
sequence: 19
|
|
766
773
|
};
|
|
767
774
|
var Timeline = class {
|
|
775
|
+
propertyIds;
|
|
776
|
+
frames;
|
|
768
777
|
constructor(frameCount, propertyIds) {
|
|
769
778
|
this.propertyIds = propertyIds;
|
|
770
779
|
this.frames = Utils.newFloatArray(frameCount * this.getFrameEntries());
|
|
@@ -797,6 +806,7 @@ var spine = (() => {
|
|
|
797
806
|
}
|
|
798
807
|
};
|
|
799
808
|
var CurveTimeline = class extends Timeline {
|
|
809
|
+
curves;
|
|
800
810
|
// type, x, y, ...
|
|
801
811
|
constructor(frameCount, bezierCount, propertyIds) {
|
|
802
812
|
super(frameCount, propertyIds);
|
|
@@ -964,9 +974,9 @@ var spine = (() => {
|
|
|
964
974
|
}
|
|
965
975
|
};
|
|
966
976
|
var RotateTimeline = class extends CurveTimeline1 {
|
|
977
|
+
boneIndex = 0;
|
|
967
978
|
constructor(frameCount, bezierCount, boneIndex) {
|
|
968
979
|
super(frameCount, bezierCount, Property.rotate + "|" + boneIndex);
|
|
969
|
-
this.boneIndex = 0;
|
|
970
980
|
this.boneIndex = boneIndex;
|
|
971
981
|
}
|
|
972
982
|
apply(skeleton, lastTime, time, events, alpha, blend, direction) {
|
|
@@ -998,6 +1008,7 @@ var spine = (() => {
|
|
|
998
1008
|
}
|
|
999
1009
|
};
|
|
1000
1010
|
var TranslateTimeline = class extends CurveTimeline2 {
|
|
1011
|
+
boneIndex = 0;
|
|
1001
1012
|
constructor(frameCount, bezierCount, boneIndex) {
|
|
1002
1013
|
super(
|
|
1003
1014
|
frameCount,
|
|
@@ -1005,7 +1016,6 @@ var spine = (() => {
|
|
|
1005
1016
|
Property.x + "|" + boneIndex,
|
|
1006
1017
|
Property.y + "|" + boneIndex
|
|
1007
1018
|
);
|
|
1008
|
-
this.boneIndex = 0;
|
|
1009
1019
|
this.boneIndex = boneIndex;
|
|
1010
1020
|
}
|
|
1011
1021
|
apply(skeleton, lastTime, time, events, alpha, blend, direction) {
|
|
@@ -1103,9 +1113,9 @@ var spine = (() => {
|
|
|
1103
1113
|
}
|
|
1104
1114
|
};
|
|
1105
1115
|
var TranslateXTimeline = class extends CurveTimeline1 {
|
|
1116
|
+
boneIndex = 0;
|
|
1106
1117
|
constructor(frameCount, bezierCount, boneIndex) {
|
|
1107
1118
|
super(frameCount, bezierCount, Property.x + "|" + boneIndex);
|
|
1108
|
-
this.boneIndex = 0;
|
|
1109
1119
|
this.boneIndex = boneIndex;
|
|
1110
1120
|
}
|
|
1111
1121
|
apply(skeleton, lastTime, time, events, alpha, blend, direction) {
|
|
@@ -1138,9 +1148,9 @@ var spine = (() => {
|
|
|
1138
1148
|
}
|
|
1139
1149
|
};
|
|
1140
1150
|
var TranslateYTimeline = class extends CurveTimeline1 {
|
|
1151
|
+
boneIndex = 0;
|
|
1141
1152
|
constructor(frameCount, bezierCount, boneIndex) {
|
|
1142
1153
|
super(frameCount, bezierCount, Property.y + "|" + boneIndex);
|
|
1143
|
-
this.boneIndex = 0;
|
|
1144
1154
|
this.boneIndex = boneIndex;
|
|
1145
1155
|
}
|
|
1146
1156
|
apply(skeleton, lastTime, time, events, alpha, blend, direction) {
|
|
@@ -1173,6 +1183,7 @@ var spine = (() => {
|
|
|
1173
1183
|
}
|
|
1174
1184
|
};
|
|
1175
1185
|
var ScaleTimeline = class extends CurveTimeline2 {
|
|
1186
|
+
boneIndex = 0;
|
|
1176
1187
|
constructor(frameCount, bezierCount, boneIndex) {
|
|
1177
1188
|
super(
|
|
1178
1189
|
frameCount,
|
|
@@ -1180,7 +1191,6 @@ var spine = (() => {
|
|
|
1180
1191
|
Property.scaleX + "|" + boneIndex,
|
|
1181
1192
|
Property.scaleY + "|" + boneIndex
|
|
1182
1193
|
);
|
|
1183
|
-
this.boneIndex = 0;
|
|
1184
1194
|
this.boneIndex = boneIndex;
|
|
1185
1195
|
}
|
|
1186
1196
|
apply(skeleton, lastTime, time, events, alpha, blend, direction) {
|
|
@@ -1316,9 +1326,9 @@ var spine = (() => {
|
|
|
1316
1326
|
}
|
|
1317
1327
|
};
|
|
1318
1328
|
var ScaleXTimeline = class extends CurveTimeline1 {
|
|
1329
|
+
boneIndex = 0;
|
|
1319
1330
|
constructor(frameCount, bezierCount, boneIndex) {
|
|
1320
1331
|
super(frameCount, bezierCount, Property.scaleX + "|" + boneIndex);
|
|
1321
|
-
this.boneIndex = 0;
|
|
1322
1332
|
this.boneIndex = boneIndex;
|
|
1323
1333
|
}
|
|
1324
1334
|
apply(skeleton, lastTime, time, events, alpha, blend, direction) {
|
|
@@ -1377,9 +1387,9 @@ var spine = (() => {
|
|
|
1377
1387
|
}
|
|
1378
1388
|
};
|
|
1379
1389
|
var ScaleYTimeline = class extends CurveTimeline1 {
|
|
1390
|
+
boneIndex = 0;
|
|
1380
1391
|
constructor(frameCount, bezierCount, boneIndex) {
|
|
1381
1392
|
super(frameCount, bezierCount, Property.scaleY + "|" + boneIndex);
|
|
1382
|
-
this.boneIndex = 0;
|
|
1383
1393
|
this.boneIndex = boneIndex;
|
|
1384
1394
|
}
|
|
1385
1395
|
apply(skeleton, lastTime, time, events, alpha, blend, direction) {
|
|
@@ -1438,6 +1448,7 @@ var spine = (() => {
|
|
|
1438
1448
|
}
|
|
1439
1449
|
};
|
|
1440
1450
|
var ShearTimeline = class extends CurveTimeline2 {
|
|
1451
|
+
boneIndex = 0;
|
|
1441
1452
|
constructor(frameCount, bezierCount, boneIndex) {
|
|
1442
1453
|
super(
|
|
1443
1454
|
frameCount,
|
|
@@ -1445,7 +1456,6 @@ var spine = (() => {
|
|
|
1445
1456
|
Property.shearX + "|" + boneIndex,
|
|
1446
1457
|
Property.shearY + "|" + boneIndex
|
|
1447
1458
|
);
|
|
1448
|
-
this.boneIndex = 0;
|
|
1449
1459
|
this.boneIndex = boneIndex;
|
|
1450
1460
|
}
|
|
1451
1461
|
apply(skeleton, lastTime, time, events, alpha, blend, direction) {
|
|
@@ -1543,9 +1553,9 @@ var spine = (() => {
|
|
|
1543
1553
|
}
|
|
1544
1554
|
};
|
|
1545
1555
|
var ShearXTimeline = class extends CurveTimeline1 {
|
|
1556
|
+
boneIndex = 0;
|
|
1546
1557
|
constructor(frameCount, bezierCount, boneIndex) {
|
|
1547
1558
|
super(frameCount, bezierCount, Property.shearX + "|" + boneIndex);
|
|
1548
|
-
this.boneIndex = 0;
|
|
1549
1559
|
this.boneIndex = boneIndex;
|
|
1550
1560
|
}
|
|
1551
1561
|
apply(skeleton, lastTime, time, events, alpha, blend, direction) {
|
|
@@ -1578,9 +1588,9 @@ var spine = (() => {
|
|
|
1578
1588
|
}
|
|
1579
1589
|
};
|
|
1580
1590
|
var ShearYTimeline = class extends CurveTimeline1 {
|
|
1591
|
+
boneIndex = 0;
|
|
1581
1592
|
constructor(frameCount, bezierCount, boneIndex) {
|
|
1582
1593
|
super(frameCount, bezierCount, Property.shearY + "|" + boneIndex);
|
|
1583
|
-
this.boneIndex = 0;
|
|
1584
1594
|
this.boneIndex = boneIndex;
|
|
1585
1595
|
}
|
|
1586
1596
|
apply(skeleton, lastTime, time, events, alpha, blend, direction) {
|
|
@@ -1613,12 +1623,12 @@ var spine = (() => {
|
|
|
1613
1623
|
}
|
|
1614
1624
|
};
|
|
1615
1625
|
var RGBATimeline = class extends CurveTimeline {
|
|
1626
|
+
slotIndex = 0;
|
|
1616
1627
|
constructor(frameCount, bezierCount, slotIndex) {
|
|
1617
1628
|
super(frameCount, bezierCount, [
|
|
1618
1629
|
Property.rgb + "|" + slotIndex,
|
|
1619
1630
|
Property.alpha + "|" + slotIndex
|
|
1620
1631
|
]);
|
|
1621
|
-
this.slotIndex = 0;
|
|
1622
1632
|
this.slotIndex = slotIndex;
|
|
1623
1633
|
}
|
|
1624
1634
|
getFrameEntries() {
|
|
@@ -1776,11 +1786,11 @@ var spine = (() => {
|
|
|
1776
1786
|
}
|
|
1777
1787
|
};
|
|
1778
1788
|
var RGBTimeline = class extends CurveTimeline {
|
|
1789
|
+
slotIndex = 0;
|
|
1779
1790
|
constructor(frameCount, bezierCount, slotIndex) {
|
|
1780
1791
|
super(frameCount, bezierCount, [
|
|
1781
1792
|
Property.rgb + "|" + slotIndex
|
|
1782
1793
|
]);
|
|
1783
|
-
this.slotIndex = 0;
|
|
1784
1794
|
this.slotIndex = slotIndex;
|
|
1785
1795
|
}
|
|
1786
1796
|
getFrameEntries() {
|
|
@@ -1919,9 +1929,9 @@ var spine = (() => {
|
|
|
1919
1929
|
}
|
|
1920
1930
|
};
|
|
1921
1931
|
var AlphaTimeline = class extends CurveTimeline1 {
|
|
1932
|
+
slotIndex = 0;
|
|
1922
1933
|
constructor(frameCount, bezierCount, slotIndex) {
|
|
1923
1934
|
super(frameCount, bezierCount, Property.alpha + "|" + slotIndex);
|
|
1924
|
-
this.slotIndex = 0;
|
|
1925
1935
|
this.slotIndex = slotIndex;
|
|
1926
1936
|
}
|
|
1927
1937
|
apply(skeleton, lastTime, time, events, alpha, blend, direction) {
|
|
@@ -1951,13 +1961,13 @@ var spine = (() => {
|
|
|
1951
1961
|
}
|
|
1952
1962
|
};
|
|
1953
1963
|
var RGBA2Timeline = class extends CurveTimeline {
|
|
1964
|
+
slotIndex = 0;
|
|
1954
1965
|
constructor(frameCount, bezierCount, slotIndex) {
|
|
1955
1966
|
super(frameCount, bezierCount, [
|
|
1956
1967
|
Property.rgb + "|" + slotIndex,
|
|
1957
1968
|
Property.alpha + "|" + slotIndex,
|
|
1958
1969
|
Property.rgb2 + "|" + slotIndex
|
|
1959
1970
|
]);
|
|
1960
|
-
this.slotIndex = 0;
|
|
1961
1971
|
this.slotIndex = slotIndex;
|
|
1962
1972
|
}
|
|
1963
1973
|
getFrameEntries() {
|
|
@@ -2198,12 +2208,12 @@ var spine = (() => {
|
|
|
2198
2208
|
}
|
|
2199
2209
|
};
|
|
2200
2210
|
var RGB2Timeline = class extends CurveTimeline {
|
|
2211
|
+
slotIndex = 0;
|
|
2201
2212
|
constructor(frameCount, bezierCount, slotIndex) {
|
|
2202
2213
|
super(frameCount, bezierCount, [
|
|
2203
2214
|
Property.rgb + "|" + slotIndex,
|
|
2204
2215
|
Property.rgb2 + "|" + slotIndex
|
|
2205
2216
|
]);
|
|
2206
|
-
this.slotIndex = 0;
|
|
2207
2217
|
this.slotIndex = slotIndex;
|
|
2208
2218
|
}
|
|
2209
2219
|
getFrameEntries() {
|
|
@@ -2429,11 +2439,13 @@ var spine = (() => {
|
|
|
2429
2439
|
}
|
|
2430
2440
|
};
|
|
2431
2441
|
var AttachmentTimeline = class extends Timeline {
|
|
2442
|
+
slotIndex = 0;
|
|
2443
|
+
/** The attachment name for each key frame. May contain null values to clear the attachment. */
|
|
2444
|
+
attachmentNames;
|
|
2432
2445
|
constructor(frameCount, slotIndex) {
|
|
2433
2446
|
super(frameCount, [
|
|
2434
2447
|
Property.attachment + "|" + slotIndex
|
|
2435
2448
|
]);
|
|
2436
|
-
this.slotIndex = 0;
|
|
2437
2449
|
this.slotIndex = slotIndex;
|
|
2438
2450
|
this.attachmentNames = new Array(frameCount);
|
|
2439
2451
|
}
|
|
@@ -2466,11 +2478,15 @@ var spine = (() => {
|
|
|
2466
2478
|
}
|
|
2467
2479
|
};
|
|
2468
2480
|
var DeformTimeline = class extends CurveTimeline {
|
|
2481
|
+
slotIndex = 0;
|
|
2482
|
+
/** The attachment that will be deformed. */
|
|
2483
|
+
attachment;
|
|
2484
|
+
/** The vertices for each key frame. */
|
|
2485
|
+
vertices;
|
|
2469
2486
|
constructor(frameCount, bezierCount, slotIndex, attachment) {
|
|
2470
2487
|
super(frameCount, bezierCount, [
|
|
2471
2488
|
Property.deform + "|" + slotIndex + "|" + attachment.id
|
|
2472
2489
|
]);
|
|
2473
|
-
this.slotIndex = 0;
|
|
2474
2490
|
this.slotIndex = slotIndex;
|
|
2475
2491
|
this.attachment = attachment;
|
|
2476
2492
|
this.vertices = new Array(frameCount);
|
|
@@ -2691,6 +2707,8 @@ var spine = (() => {
|
|
|
2691
2707
|
}
|
|
2692
2708
|
};
|
|
2693
2709
|
var _EventTimeline = class extends Timeline {
|
|
2710
|
+
/** The event for each key frame. */
|
|
2711
|
+
events;
|
|
2694
2712
|
constructor(frameCount) {
|
|
2695
2713
|
super(frameCount, _EventTimeline.propertyIds);
|
|
2696
2714
|
this.events = new Array(frameCount);
|
|
@@ -2733,8 +2751,10 @@ var spine = (() => {
|
|
|
2733
2751
|
}
|
|
2734
2752
|
};
|
|
2735
2753
|
var EventTimeline = _EventTimeline;
|
|
2736
|
-
EventTimeline
|
|
2754
|
+
__publicField(EventTimeline, "propertyIds", ["" + Property.event]);
|
|
2737
2755
|
var _DrawOrderTimeline = class extends Timeline {
|
|
2756
|
+
/** The draw order for each key frame. See {@link #setFrame(int, float, int[])}. */
|
|
2757
|
+
drawOrders;
|
|
2738
2758
|
constructor(frameCount) {
|
|
2739
2759
|
super(frameCount, _DrawOrderTimeline.propertyIds);
|
|
2740
2760
|
this.drawOrders = new Array(frameCount);
|
|
@@ -2773,14 +2793,14 @@ var spine = (() => {
|
|
|
2773
2793
|
}
|
|
2774
2794
|
};
|
|
2775
2795
|
var DrawOrderTimeline = _DrawOrderTimeline;
|
|
2776
|
-
DrawOrderTimeline
|
|
2796
|
+
__publicField(DrawOrderTimeline, "propertyIds", ["" + Property.drawOrder]);
|
|
2777
2797
|
var IkConstraintTimeline = class extends CurveTimeline {
|
|
2798
|
+
/** The index of the IK constraint slot in {@link Skeleton#ikConstraints} that will be changed. */
|
|
2799
|
+
ikConstraintIndex = 0;
|
|
2778
2800
|
constructor(frameCount, bezierCount, ikConstraintIndex) {
|
|
2779
2801
|
super(frameCount, bezierCount, [
|
|
2780
2802
|
Property.ikConstraint + "|" + ikConstraintIndex
|
|
2781
2803
|
]);
|
|
2782
|
-
/** The index of the IK constraint slot in {@link Skeleton#ikConstraints} that will be changed. */
|
|
2783
|
-
this.ikConstraintIndex = 0;
|
|
2784
2804
|
this.ikConstraintIndex = ikConstraintIndex;
|
|
2785
2805
|
}
|
|
2786
2806
|
getFrameEntries() {
|
|
@@ -2937,12 +2957,12 @@ var spine = (() => {
|
|
|
2937
2957
|
}
|
|
2938
2958
|
};
|
|
2939
2959
|
var TransformConstraintTimeline = class extends CurveTimeline {
|
|
2960
|
+
/** The index of the transform constraint slot in {@link Skeleton#transformConstraints} that will be changed. */
|
|
2961
|
+
transformConstraintIndex = 0;
|
|
2940
2962
|
constructor(frameCount, bezierCount, transformConstraintIndex) {
|
|
2941
2963
|
super(frameCount, bezierCount, [
|
|
2942
2964
|
Property.transformConstraint + "|" + transformConstraintIndex
|
|
2943
2965
|
]);
|
|
2944
|
-
/** The index of the transform constraint slot in {@link Skeleton#transformConstraints} that will be changed. */
|
|
2945
|
-
this.transformConstraintIndex = 0;
|
|
2946
2966
|
this.transformConstraintIndex = transformConstraintIndex;
|
|
2947
2967
|
}
|
|
2948
2968
|
getFrameEntries() {
|
|
@@ -3160,10 +3180,10 @@ var spine = (() => {
|
|
|
3160
3180
|
}
|
|
3161
3181
|
};
|
|
3162
3182
|
var PathConstraintPositionTimeline = class extends CurveTimeline1 {
|
|
3183
|
+
/** The index of the path constraint slot in {@link Skeleton#pathConstraints} that will be changed. */
|
|
3184
|
+
pathConstraintIndex = 0;
|
|
3163
3185
|
constructor(frameCount, bezierCount, pathConstraintIndex) {
|
|
3164
3186
|
super(frameCount, bezierCount, Property.pathConstraintPosition + "|" + pathConstraintIndex);
|
|
3165
|
-
/** The index of the path constraint slot in {@link Skeleton#pathConstraints} that will be changed. */
|
|
3166
|
-
this.pathConstraintIndex = 0;
|
|
3167
3187
|
this.pathConstraintIndex = pathConstraintIndex;
|
|
3168
3188
|
}
|
|
3169
3189
|
apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {
|
|
@@ -3189,10 +3209,10 @@ var spine = (() => {
|
|
|
3189
3209
|
}
|
|
3190
3210
|
};
|
|
3191
3211
|
var PathConstraintSpacingTimeline = class extends CurveTimeline1 {
|
|
3212
|
+
/** The index of the path constraint slot in {@link Skeleton#getPathConstraints()} that will be changed. */
|
|
3213
|
+
pathConstraintIndex = 0;
|
|
3192
3214
|
constructor(frameCount, bezierCount, pathConstraintIndex) {
|
|
3193
3215
|
super(frameCount, bezierCount, Property.pathConstraintSpacing + "|" + pathConstraintIndex);
|
|
3194
|
-
/** The index of the path constraint slot in {@link Skeleton#getPathConstraints()} that will be changed. */
|
|
3195
|
-
this.pathConstraintIndex = 0;
|
|
3196
3216
|
this.pathConstraintIndex = pathConstraintIndex;
|
|
3197
3217
|
}
|
|
3198
3218
|
apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {
|
|
@@ -3218,12 +3238,12 @@ var spine = (() => {
|
|
|
3218
3238
|
}
|
|
3219
3239
|
};
|
|
3220
3240
|
var PathConstraintMixTimeline = class extends CurveTimeline {
|
|
3241
|
+
/** The index of the path constraint slot in {@link Skeleton#getPathConstraints()} that will be changed. */
|
|
3242
|
+
pathConstraintIndex = 0;
|
|
3221
3243
|
constructor(frameCount, bezierCount, pathConstraintIndex) {
|
|
3222
3244
|
super(frameCount, bezierCount, [
|
|
3223
3245
|
Property.pathConstraintMix + "|" + pathConstraintIndex
|
|
3224
3246
|
]);
|
|
3225
|
-
/** The index of the path constraint slot in {@link Skeleton#getPathConstraints()} that will be changed. */
|
|
3226
|
-
this.pathConstraintIndex = 0;
|
|
3227
3247
|
this.pathConstraintIndex = pathConstraintIndex;
|
|
3228
3248
|
}
|
|
3229
3249
|
getFrameEntries() {
|
|
@@ -3355,6 +3375,8 @@ var spine = (() => {
|
|
|
3355
3375
|
}
|
|
3356
3376
|
};
|
|
3357
3377
|
var _SequenceTimeline = class extends Timeline {
|
|
3378
|
+
slotIndex;
|
|
3379
|
+
attachment;
|
|
3358
3380
|
constructor(frameCount, slotIndex, attachment) {
|
|
3359
3381
|
super(frameCount, [
|
|
3360
3382
|
Property.sequence + "|" + slotIndex + "|" + attachment.sequence.id
|
|
@@ -3439,32 +3461,34 @@ var spine = (() => {
|
|
|
3439
3461
|
}
|
|
3440
3462
|
};
|
|
3441
3463
|
var SequenceTimeline = _SequenceTimeline;
|
|
3442
|
-
SequenceTimeline
|
|
3443
|
-
SequenceTimeline
|
|
3444
|
-
SequenceTimeline
|
|
3464
|
+
__publicField(SequenceTimeline, "ENTRIES", 3);
|
|
3465
|
+
__publicField(SequenceTimeline, "MODE", 1);
|
|
3466
|
+
__publicField(SequenceTimeline, "DELAY", 2);
|
|
3445
3467
|
|
|
3446
3468
|
// spine-core/src/AnimationState.ts
|
|
3447
3469
|
var _AnimationState = class {
|
|
3448
|
-
constructor(data) {
|
|
3449
|
-
/** The list of tracks that currently have animations, which may contain null entries. */
|
|
3450
|
-
this.tracks = new Array();
|
|
3451
|
-
/** Multiplier for the delta time when the animation state is updated, causing time for all animations and mixes to play slower
|
|
3452
|
-
* or faster. Defaults to 1.
|
|
3453
|
-
*
|
|
3454
|
-
* See TrackEntry {@link TrackEntry#timeScale} for affecting a single animation. */
|
|
3455
|
-
this.timeScale = 1;
|
|
3456
|
-
this.unkeyedState = 0;
|
|
3457
|
-
this.events = new Array();
|
|
3458
|
-
this.listeners = new Array();
|
|
3459
|
-
this.queue = new EventQueue(this);
|
|
3460
|
-
this.propertyIDs = new StringSet();
|
|
3461
|
-
this.animationsChanged = false;
|
|
3462
|
-
this.trackEntryPool = new Pool(() => new TrackEntry());
|
|
3463
|
-
this.data = data;
|
|
3464
|
-
}
|
|
3465
3470
|
static emptyAnimation() {
|
|
3466
3471
|
return _AnimationState._emptyAnimation;
|
|
3467
3472
|
}
|
|
3473
|
+
/** The AnimationStateData to look up mix durations. */
|
|
3474
|
+
data;
|
|
3475
|
+
/** The list of tracks that currently have animations, which may contain null entries. */
|
|
3476
|
+
tracks = new Array();
|
|
3477
|
+
/** Multiplier for the delta time when the animation state is updated, causing time for all animations and mixes to play slower
|
|
3478
|
+
* or faster. Defaults to 1.
|
|
3479
|
+
*
|
|
3480
|
+
* See TrackEntry {@link TrackEntry#timeScale} for affecting a single animation. */
|
|
3481
|
+
timeScale = 1;
|
|
3482
|
+
unkeyedState = 0;
|
|
3483
|
+
events = new Array();
|
|
3484
|
+
listeners = new Array();
|
|
3485
|
+
queue = new EventQueue(this);
|
|
3486
|
+
propertyIDs = new StringSet();
|
|
3487
|
+
animationsChanged = false;
|
|
3488
|
+
trackEntryPool = new Pool(() => new TrackEntry());
|
|
3489
|
+
constructor(data) {
|
|
3490
|
+
this.data = data;
|
|
3491
|
+
}
|
|
3468
3492
|
/** Increments each track entry {@link TrackEntry#trackTime()}, setting queued animations as current if needed. */
|
|
3469
3493
|
update(delta) {
|
|
3470
3494
|
delta *= this.timeScale;
|
|
@@ -4111,141 +4135,139 @@ var spine = (() => {
|
|
|
4111
4135
|
}
|
|
4112
4136
|
};
|
|
4113
4137
|
var AnimationState = _AnimationState;
|
|
4114
|
-
AnimationState
|
|
4138
|
+
__publicField(AnimationState, "_emptyAnimation", new Animation("<empty>", [], 0));
|
|
4115
4139
|
var TrackEntry = class {
|
|
4116
|
-
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
|
|
4133
|
-
|
|
4134
|
-
|
|
4135
|
-
|
|
4136
|
-
|
|
4137
|
-
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
|
|
4158
|
-
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
|
|
4178
|
-
|
|
4179
|
-
|
|
4180
|
-
|
|
4181
|
-
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4211
|
-
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
|
|
4218
|
-
|
|
4219
|
-
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
|
|
4226
|
-
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
-
|
|
4246
|
-
|
|
4247
|
-
this.timelinesRotation = new Array();
|
|
4248
|
-
}
|
|
4140
|
+
/** The animation to apply for this track entry. */
|
|
4141
|
+
animation = null;
|
|
4142
|
+
previous = null;
|
|
4143
|
+
/** The animation queued to start after this animation, or null. `next` makes up a linked list. */
|
|
4144
|
+
next = null;
|
|
4145
|
+
/** The track entry for the previous animation when mixing from the previous animation to this animation, or null if no
|
|
4146
|
+
* mixing is currently occuring. When mixing from multiple animations, `mixingFrom` makes up a linked list. */
|
|
4147
|
+
mixingFrom = null;
|
|
4148
|
+
/** The track entry for the next animation when mixing from this animation to the next animation, or null if no mixing is
|
|
4149
|
+
* currently occuring. When mixing to multiple animations, `mixingTo` makes up a linked list. */
|
|
4150
|
+
mixingTo = null;
|
|
4151
|
+
/** The listener for events generated by this track entry, or null.
|
|
4152
|
+
*
|
|
4153
|
+
* A track entry returned from {@link AnimationState#setAnimation()} is already the current animation
|
|
4154
|
+
* for the track, so the track entry listener {@link AnimationStateListener#start()} will not be called. */
|
|
4155
|
+
listener = null;
|
|
4156
|
+
/** The index of the track where this track entry is either current or queued.
|
|
4157
|
+
*
|
|
4158
|
+
* See {@link AnimationState#getCurrent()}. */
|
|
4159
|
+
trackIndex = 0;
|
|
4160
|
+
/** If true, the animation will repeat. If false it will not, instead its last frame is applied if played beyond its
|
|
4161
|
+
* duration. */
|
|
4162
|
+
loop = false;
|
|
4163
|
+
/** If true, when mixing from the previous animation to this animation, the previous animation is applied as normal instead
|
|
4164
|
+
* of being mixed out.
|
|
4165
|
+
*
|
|
4166
|
+
* When mixing between animations that key the same property, if a lower track also keys that property then the value will
|
|
4167
|
+
* briefly dip toward the lower track value during the mix. This happens because the first animation mixes from 100% to 0%
|
|
4168
|
+
* while the second animation mixes from 0% to 100%. Setting `holdPrevious` to true applies the first animation
|
|
4169
|
+
* at 100% during the mix so the lower track value is overwritten. Such dipping does not occur on the lowest track which
|
|
4170
|
+
* keys the property, only when a higher track also keys the property.
|
|
4171
|
+
*
|
|
4172
|
+
* Snapping will occur if `holdPrevious` is true and this animation does not key all the same properties as the
|
|
4173
|
+
* previous animation. */
|
|
4174
|
+
holdPrevious = false;
|
|
4175
|
+
reverse = false;
|
|
4176
|
+
shortestRotation = false;
|
|
4177
|
+
/** When the mix percentage ({@link #mixTime} / {@link #mixDuration}) is less than the
|
|
4178
|
+
* `eventThreshold`, event timelines are applied while this animation is being mixed out. Defaults to 0, so event
|
|
4179
|
+
* timelines are not applied while this animation is being mixed out. */
|
|
4180
|
+
eventThreshold = 0;
|
|
4181
|
+
/** When the mix percentage ({@link #mixtime} / {@link #mixDuration}) is less than the
|
|
4182
|
+
* `attachmentThreshold`, attachment timelines are applied while this animation is being mixed out. Defaults to
|
|
4183
|
+
* 0, so attachment timelines are not applied while this animation is being mixed out. */
|
|
4184
|
+
attachmentThreshold = 0;
|
|
4185
|
+
/** When the mix percentage ({@link #mixTime} / {@link #mixDuration}) is less than the
|
|
4186
|
+
* `drawOrderThreshold`, draw order timelines are applied while this animation is being mixed out. Defaults to 0,
|
|
4187
|
+
* so draw order timelines are not applied while this animation is being mixed out. */
|
|
4188
|
+
drawOrderThreshold = 0;
|
|
4189
|
+
/** Seconds when this animation starts, both initially and after looping. Defaults to 0.
|
|
4190
|
+
*
|
|
4191
|
+
* When changing the `animationStart` time, it often makes sense to set {@link #animationLast} to the same
|
|
4192
|
+
* value to prevent timeline keys before the start time from triggering. */
|
|
4193
|
+
animationStart = 0;
|
|
4194
|
+
/** Seconds for the last frame of this animation. Non-looping animations won't play past this time. Looping animations will
|
|
4195
|
+
* loop back to {@link #animationStart} at this time. Defaults to the animation {@link Animation#duration}. */
|
|
4196
|
+
animationEnd = 0;
|
|
4197
|
+
/** The time in seconds this animation was last applied. Some timelines use this for one-time triggers. Eg, when this
|
|
4198
|
+
* animation is applied, event timelines will fire all events between the `animationLast` time (exclusive) and
|
|
4199
|
+
* `animationTime` (inclusive). Defaults to -1 to ensure triggers on frame 0 happen the first time this animation
|
|
4200
|
+
* is applied. */
|
|
4201
|
+
animationLast = 0;
|
|
4202
|
+
nextAnimationLast = 0;
|
|
4203
|
+
/** Seconds to postpone playing the animation. When this track entry is the current track entry, `delay`
|
|
4204
|
+
* postpones incrementing the {@link #trackTime}. When this track entry is queued, `delay` is the time from
|
|
4205
|
+
* the start of the previous animation to when this track entry will become the current track entry (ie when the previous
|
|
4206
|
+
* track entry {@link TrackEntry#trackTime} >= this track entry's `delay`).
|
|
4207
|
+
*
|
|
4208
|
+
* {@link #timeScale} affects the delay. */
|
|
4209
|
+
delay = 0;
|
|
4210
|
+
/** Current time in seconds this track entry has been the current track entry. The track time determines
|
|
4211
|
+
* {@link #animationTime}. The track time can be set to start the animation at a time other than 0, without affecting
|
|
4212
|
+
* looping. */
|
|
4213
|
+
trackTime = 0;
|
|
4214
|
+
trackLast = 0;
|
|
4215
|
+
nextTrackLast = 0;
|
|
4216
|
+
/** The track time in seconds when this animation will be removed from the track. Defaults to the highest possible float
|
|
4217
|
+
* value, meaning the animation will be applied until a new animation is set or the track is cleared. If the track end time
|
|
4218
|
+
* is reached, no other animations are queued for playback, and mixing from any previous animations is complete, then the
|
|
4219
|
+
* properties keyed by the animation are set to the setup pose and the track is cleared.
|
|
4220
|
+
*
|
|
4221
|
+
* It may be desired to use {@link AnimationState#addEmptyAnimation()} rather than have the animation
|
|
4222
|
+
* abruptly cease being applied. */
|
|
4223
|
+
trackEnd = 0;
|
|
4224
|
+
/** Multiplier for the delta time when this track entry is updated, causing time for this animation to pass slower or
|
|
4225
|
+
* faster. Defaults to 1.
|
|
4226
|
+
*
|
|
4227
|
+
* {@link #mixTime} is not affected by track entry time scale, so {@link #mixDuration} may need to be adjusted to
|
|
4228
|
+
* match the animation speed.
|
|
4229
|
+
*
|
|
4230
|
+
* When using {@link AnimationState#addAnimation()} with a `delay` <= 0, note the
|
|
4231
|
+
* {@link #delay} is set using the mix duration from the {@link AnimationStateData}, assuming time scale to be 1. If
|
|
4232
|
+
* the time scale is not 1, the delay may need to be adjusted.
|
|
4233
|
+
*
|
|
4234
|
+
* See AnimationState {@link AnimationState#timeScale} for affecting all animations. */
|
|
4235
|
+
timeScale = 0;
|
|
4236
|
+
/** Values < 1 mix this animation with the skeleton's current pose (usually the pose resulting from lower tracks). Defaults
|
|
4237
|
+
* to 1, which overwrites the skeleton's current pose with this animation.
|
|
4238
|
+
*
|
|
4239
|
+
* Typically track 0 is used to completely pose the skeleton, then alpha is used on higher tracks. It doesn't make sense to
|
|
4240
|
+
* use alpha on track 0 if the skeleton pose is from the last frame render. */
|
|
4241
|
+
alpha = 0;
|
|
4242
|
+
/** Seconds from 0 to the {@link #getMixDuration()} when mixing from the previous animation to this animation. May be
|
|
4243
|
+
* slightly more than `mixDuration` when the mix is complete. */
|
|
4244
|
+
mixTime = 0;
|
|
4245
|
+
/** Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData
|
|
4246
|
+
* {@link AnimationStateData#getMix()} based on the animation before this animation (if any).
|
|
4247
|
+
*
|
|
4248
|
+
* A mix duration of 0 still mixes out over one frame to provide the track entry being mixed out a chance to revert the
|
|
4249
|
+
* properties it was animating.
|
|
4250
|
+
*
|
|
4251
|
+
* The `mixDuration` can be set manually rather than use the value from
|
|
4252
|
+
* {@link AnimationStateData#getMix()}. In that case, the `mixDuration` can be set for a new
|
|
4253
|
+
* track entry only before {@link AnimationState#update(float)} is first called.
|
|
4254
|
+
*
|
|
4255
|
+
* When using {@link AnimationState#addAnimation()} with a `delay` <= 0, note the
|
|
4256
|
+
* {@link #delay} is set using the mix duration from the {@link AnimationStateData}, not a mix duration set
|
|
4257
|
+
* afterward. */
|
|
4258
|
+
mixDuration = 0;
|
|
4259
|
+
interruptAlpha = 0;
|
|
4260
|
+
totalAlpha = 0;
|
|
4261
|
+
/** Controls how properties keyed in the animation are mixed with lower tracks. Defaults to {@link MixBlend#replace}, which
|
|
4262
|
+
* replaces the values from the lower tracks with the animation values. {@link MixBlend#add} adds the animation values to
|
|
4263
|
+
* the values from the lower tracks.
|
|
4264
|
+
*
|
|
4265
|
+
* The `mixBlend` can be set for a new track entry only before {@link AnimationState#apply()} is first
|
|
4266
|
+
* called. */
|
|
4267
|
+
mixBlend = 2 /* replace */;
|
|
4268
|
+
timelineMode = new Array();
|
|
4269
|
+
timelineHoldMix = new Array();
|
|
4270
|
+
timelinesRotation = new Array();
|
|
4249
4271
|
reset() {
|
|
4250
4272
|
this.next = null;
|
|
4251
4273
|
this.previous = null;
|
|
@@ -4301,9 +4323,10 @@ var spine = (() => {
|
|
|
4301
4323
|
}
|
|
4302
4324
|
};
|
|
4303
4325
|
var EventQueue = class {
|
|
4326
|
+
objects = [];
|
|
4327
|
+
drainDisabled = false;
|
|
4328
|
+
animState;
|
|
4304
4329
|
constructor(animState) {
|
|
4305
|
-
this.objects = [];
|
|
4306
|
-
this.drainDisabled = false;
|
|
4307
4330
|
this.animState = animState;
|
|
4308
4331
|
}
|
|
4309
4332
|
start(entry) {
|
|
@@ -4440,10 +4463,12 @@ var spine = (() => {
|
|
|
4440
4463
|
|
|
4441
4464
|
// spine-core/src/AnimationStateData.ts
|
|
4442
4465
|
var AnimationStateData = class {
|
|
4466
|
+
/** The SkeletonData to look up animations when they are specified by name. */
|
|
4467
|
+
skeletonData;
|
|
4468
|
+
animationToMixTime = {};
|
|
4469
|
+
/** The mix duration to use when no mix duration has been defined between two animations. */
|
|
4470
|
+
defaultMix = 0;
|
|
4443
4471
|
constructor(skeletonData) {
|
|
4444
|
-
this.animationToMixTime = {};
|
|
4445
|
-
/** The mix duration to use when no mix duration has been defined between two animations. */
|
|
4446
|
-
this.defaultMix = 0;
|
|
4447
4472
|
if (!skeletonData)
|
|
4448
4473
|
throw new Error("skeletonData cannot be null.");
|
|
4449
4474
|
this.skeletonData = skeletonData;
|
|
@@ -4482,9 +4507,9 @@ var spine = (() => {
|
|
|
4482
4507
|
|
|
4483
4508
|
// spine-core/src/attachments/BoundingBoxAttachment.ts
|
|
4484
4509
|
var BoundingBoxAttachment = class extends VertexAttachment {
|
|
4510
|
+
color = new Color(1, 1, 1, 1);
|
|
4485
4511
|
constructor(name) {
|
|
4486
4512
|
super(name);
|
|
4487
|
-
this.color = new Color(1, 1, 1, 1);
|
|
4488
4513
|
}
|
|
4489
4514
|
copy() {
|
|
4490
4515
|
let copy = new BoundingBoxAttachment(this.name);
|
|
@@ -4496,16 +4521,16 @@ var spine = (() => {
|
|
|
4496
4521
|
|
|
4497
4522
|
// spine-core/src/attachments/ClippingAttachment.ts
|
|
4498
4523
|
var ClippingAttachment = class extends VertexAttachment {
|
|
4524
|
+
/** Clipping is performed between the clipping polygon's slot and the end slot. Returns null if clipping is done until the end of
|
|
4525
|
+
* the skeleton's rendering. */
|
|
4526
|
+
endSlot = null;
|
|
4527
|
+
// Nonessential.
|
|
4528
|
+
/** The color of the clipping polygon as it was in Spine. Available only when nonessential data was exported. Clipping polygons
|
|
4529
|
+
* are not usually rendered at runtime. */
|
|
4530
|
+
color = new Color(0.2275, 0.2275, 0.8078, 1);
|
|
4499
4531
|
// ce3a3aff
|
|
4500
4532
|
constructor(name) {
|
|
4501
4533
|
super(name);
|
|
4502
|
-
/** Clipping is performed between the clipping polygon's slot and the end slot. Returns null if clipping is done until the end of
|
|
4503
|
-
* the skeleton's rendering. */
|
|
4504
|
-
this.endSlot = null;
|
|
4505
|
-
// Nonessential.
|
|
4506
|
-
/** The color of the clipping polygon as it was in Spine. Available only when nonessential data was exported. Clipping polygons
|
|
4507
|
-
* are not usually rendered at runtime. */
|
|
4508
|
-
this.color = new Color(0.2275, 0.2275, 0.8078, 1);
|
|
4509
4534
|
}
|
|
4510
4535
|
copy() {
|
|
4511
4536
|
let copy = new ClippingAttachment(this.name);
|
|
@@ -4518,6 +4543,7 @@ var spine = (() => {
|
|
|
4518
4543
|
|
|
4519
4544
|
// spine-core/src/Texture.ts
|
|
4520
4545
|
var Texture = class {
|
|
4546
|
+
_image;
|
|
4521
4547
|
constructor(image) {
|
|
4522
4548
|
this._image = image;
|
|
4523
4549
|
}
|
|
@@ -4542,19 +4568,18 @@ var spine = (() => {
|
|
|
4542
4568
|
return TextureWrap2;
|
|
4543
4569
|
})(TextureWrap || {});
|
|
4544
4570
|
var TextureRegion = class {
|
|
4545
|
-
|
|
4546
|
-
|
|
4547
|
-
|
|
4548
|
-
|
|
4549
|
-
|
|
4550
|
-
|
|
4551
|
-
|
|
4552
|
-
|
|
4553
|
-
|
|
4554
|
-
|
|
4555
|
-
|
|
4556
|
-
|
|
4557
|
-
}
|
|
4571
|
+
texture;
|
|
4572
|
+
u = 0;
|
|
4573
|
+
v = 0;
|
|
4574
|
+
u2 = 0;
|
|
4575
|
+
v2 = 0;
|
|
4576
|
+
width = 0;
|
|
4577
|
+
height = 0;
|
|
4578
|
+
degrees = 0;
|
|
4579
|
+
offsetX = 0;
|
|
4580
|
+
offsetY = 0;
|
|
4581
|
+
originalWidth = 0;
|
|
4582
|
+
originalHeight = 0;
|
|
4558
4583
|
};
|
|
4559
4584
|
var FakeTexture = class extends Texture {
|
|
4560
4585
|
setFilters(minFilter, magFilter) {
|
|
@@ -4567,9 +4592,9 @@ var spine = (() => {
|
|
|
4567
4592
|
|
|
4568
4593
|
// spine-core/src/TextureAtlas.ts
|
|
4569
4594
|
var TextureAtlas = class {
|
|
4595
|
+
pages = new Array();
|
|
4596
|
+
regions = new Array();
|
|
4570
4597
|
constructor(atlasText) {
|
|
4571
|
-
this.pages = new Array();
|
|
4572
|
-
this.regions = new Array();
|
|
4573
4598
|
let reader = new TextureAtlasReader(atlasText);
|
|
4574
4599
|
let entry = new Array(4);
|
|
4575
4600
|
let pageFields = {};
|
|
@@ -4717,15 +4742,15 @@ var spine = (() => {
|
|
|
4717
4742
|
page.setTexture(assetManager.get(pathPrefix + page.name));
|
|
4718
4743
|
}
|
|
4719
4744
|
dispose() {
|
|
4720
|
-
var _a;
|
|
4721
4745
|
for (let i = 0; i < this.pages.length; i++) {
|
|
4722
|
-
|
|
4746
|
+
this.pages[i].texture?.dispose();
|
|
4723
4747
|
}
|
|
4724
4748
|
}
|
|
4725
4749
|
};
|
|
4726
4750
|
var TextureAtlasReader = class {
|
|
4751
|
+
lines;
|
|
4752
|
+
index = 0;
|
|
4727
4753
|
constructor(text) {
|
|
4728
|
-
this.index = 0;
|
|
4729
4754
|
this.lines = text.split(/\r\n|\r|\n/);
|
|
4730
4755
|
}
|
|
4731
4756
|
readLine() {
|
|
@@ -4757,16 +4782,17 @@ var spine = (() => {
|
|
|
4757
4782
|
}
|
|
4758
4783
|
};
|
|
4759
4784
|
var TextureAtlasPage = class {
|
|
4785
|
+
name;
|
|
4786
|
+
minFilter = 9728 /* Nearest */;
|
|
4787
|
+
magFilter = 9728 /* Nearest */;
|
|
4788
|
+
uWrap = 33071 /* ClampToEdge */;
|
|
4789
|
+
vWrap = 33071 /* ClampToEdge */;
|
|
4790
|
+
texture = null;
|
|
4791
|
+
width = 0;
|
|
4792
|
+
height = 0;
|
|
4793
|
+
pma = false;
|
|
4794
|
+
regions = new Array();
|
|
4760
4795
|
constructor(name) {
|
|
4761
|
-
this.minFilter = 9728 /* Nearest */;
|
|
4762
|
-
this.magFilter = 9728 /* Nearest */;
|
|
4763
|
-
this.uWrap = 33071 /* ClampToEdge */;
|
|
4764
|
-
this.vWrap = 33071 /* ClampToEdge */;
|
|
4765
|
-
this.texture = null;
|
|
4766
|
-
this.width = 0;
|
|
4767
|
-
this.height = 0;
|
|
4768
|
-
this.pma = false;
|
|
4769
|
-
this.regions = new Array();
|
|
4770
4796
|
this.name = name;
|
|
4771
4797
|
}
|
|
4772
4798
|
setTexture(texture) {
|
|
@@ -4778,18 +4804,20 @@ var spine = (() => {
|
|
|
4778
4804
|
}
|
|
4779
4805
|
};
|
|
4780
4806
|
var TextureAtlasRegion = class extends TextureRegion {
|
|
4807
|
+
page;
|
|
4808
|
+
name;
|
|
4809
|
+
x = 0;
|
|
4810
|
+
y = 0;
|
|
4811
|
+
offsetX = 0;
|
|
4812
|
+
offsetY = 0;
|
|
4813
|
+
originalWidth = 0;
|
|
4814
|
+
originalHeight = 0;
|
|
4815
|
+
index = 0;
|
|
4816
|
+
degrees = 0;
|
|
4817
|
+
names = null;
|
|
4818
|
+
values = null;
|
|
4781
4819
|
constructor(page, name) {
|
|
4782
4820
|
super();
|
|
4783
|
-
this.x = 0;
|
|
4784
|
-
this.y = 0;
|
|
4785
|
-
this.offsetX = 0;
|
|
4786
|
-
this.offsetY = 0;
|
|
4787
|
-
this.originalWidth = 0;
|
|
4788
|
-
this.originalHeight = 0;
|
|
4789
|
-
this.index = 0;
|
|
4790
|
-
this.degrees = 0;
|
|
4791
|
-
this.names = null;
|
|
4792
|
-
this.values = null;
|
|
4793
4821
|
this.page = page;
|
|
4794
4822
|
this.name = name;
|
|
4795
4823
|
page.regions.push(this);
|
|
@@ -4798,31 +4826,33 @@ var spine = (() => {
|
|
|
4798
4826
|
|
|
4799
4827
|
// spine-core/src/attachments/MeshAttachment.ts
|
|
4800
4828
|
var MeshAttachment = class extends VertexAttachment {
|
|
4829
|
+
region = null;
|
|
4830
|
+
/** The name of the texture region for this attachment. */
|
|
4831
|
+
path;
|
|
4832
|
+
/** The UV pair for each vertex, normalized within the texture region. */
|
|
4833
|
+
regionUVs = [];
|
|
4834
|
+
/** The UV pair for each vertex, normalized within the entire texture.
|
|
4835
|
+
*
|
|
4836
|
+
* See {@link #updateUVs}. */
|
|
4837
|
+
uvs = [];
|
|
4838
|
+
/** Triplets of vertex indices which describe the mesh's triangulation. */
|
|
4839
|
+
triangles = [];
|
|
4840
|
+
/** The color to tint the mesh. */
|
|
4841
|
+
color = new Color(1, 1, 1, 1);
|
|
4842
|
+
/** The width of the mesh's image. Available only when nonessential data was exported. */
|
|
4843
|
+
width = 0;
|
|
4844
|
+
/** The height of the mesh's image. Available only when nonessential data was exported. */
|
|
4845
|
+
height = 0;
|
|
4846
|
+
/** The number of entries at the beginning of {@link #vertices} that make up the mesh hull. */
|
|
4847
|
+
hullLength = 0;
|
|
4848
|
+
/** Vertex index pairs describing edges for controling triangulation. Mesh triangles will never cross edges. Only available if
|
|
4849
|
+
* nonessential data was exported. Triangulation is not performed at runtime. */
|
|
4850
|
+
edges = [];
|
|
4851
|
+
parentMesh = null;
|
|
4852
|
+
sequence = null;
|
|
4853
|
+
tempColor = new Color(0, 0, 0, 0);
|
|
4801
4854
|
constructor(name, path) {
|
|
4802
4855
|
super(name);
|
|
4803
|
-
this.region = null;
|
|
4804
|
-
/** The UV pair for each vertex, normalized within the texture region. */
|
|
4805
|
-
this.regionUVs = [];
|
|
4806
|
-
/** The UV pair for each vertex, normalized within the entire texture.
|
|
4807
|
-
*
|
|
4808
|
-
* See {@link #updateUVs}. */
|
|
4809
|
-
this.uvs = [];
|
|
4810
|
-
/** Triplets of vertex indices which describe the mesh's triangulation. */
|
|
4811
|
-
this.triangles = [];
|
|
4812
|
-
/** The color to tint the mesh. */
|
|
4813
|
-
this.color = new Color(1, 1, 1, 1);
|
|
4814
|
-
/** The width of the mesh's image. Available only when nonessential data was exported. */
|
|
4815
|
-
this.width = 0;
|
|
4816
|
-
/** The height of the mesh's image. Available only when nonessential data was exported. */
|
|
4817
|
-
this.height = 0;
|
|
4818
|
-
/** The number of entries at the beginning of {@link #vertices} that make up the mesh hull. */
|
|
4819
|
-
this.hullLength = 0;
|
|
4820
|
-
/** Vertex index pairs describing edges for controling triangulation. Mesh triangles will never cross edges. Only available if
|
|
4821
|
-
* nonessential data was exported. Triangulation is not performed at runtime. */
|
|
4822
|
-
this.edges = [];
|
|
4823
|
-
this.parentMesh = null;
|
|
4824
|
-
this.sequence = null;
|
|
4825
|
-
this.tempColor = new Color(0, 0, 0, 0);
|
|
4826
4856
|
this.path = path;
|
|
4827
4857
|
}
|
|
4828
4858
|
/** Calculates {@link #uvs} using the {@link #regionUVs} and region. Must be called if the region, the region's properties, or
|
|
@@ -4949,18 +4979,18 @@ var spine = (() => {
|
|
|
4949
4979
|
|
|
4950
4980
|
// spine-core/src/attachments/PathAttachment.ts
|
|
4951
4981
|
var PathAttachment = class extends VertexAttachment {
|
|
4982
|
+
/** The lengths along the path in the setup pose from the start of the path to the end of each Bezier curve. */
|
|
4983
|
+
lengths = [];
|
|
4984
|
+
/** If true, the start and end knots are connected. */
|
|
4985
|
+
closed = false;
|
|
4986
|
+
/** If true, additional calculations are performed to make calculating positions along the path more accurate. If false, fewer
|
|
4987
|
+
* calculations are performed but calculating positions along the path is less accurate. */
|
|
4988
|
+
constantSpeed = false;
|
|
4989
|
+
/** The color of the path as it was in Spine. Available only when nonessential data was exported. Paths are not usually
|
|
4990
|
+
* rendered at runtime. */
|
|
4991
|
+
color = new Color(1, 1, 1, 1);
|
|
4952
4992
|
constructor(name) {
|
|
4953
4993
|
super(name);
|
|
4954
|
-
/** The lengths along the path in the setup pose from the start of the path to the end of each Bezier curve. */
|
|
4955
|
-
this.lengths = [];
|
|
4956
|
-
/** If true, the start and end knots are connected. */
|
|
4957
|
-
this.closed = false;
|
|
4958
|
-
/** If true, additional calculations are performed to make calculating positions along the path more accurate. If false, fewer
|
|
4959
|
-
* calculations are performed but calculating positions along the path is less accurate. */
|
|
4960
|
-
this.constantSpeed = false;
|
|
4961
|
-
/** The color of the path as it was in Spine. Available only when nonessential data was exported. Paths are not usually
|
|
4962
|
-
* rendered at runtime. */
|
|
4963
|
-
this.color = new Color(1, 1, 1, 1);
|
|
4964
4994
|
}
|
|
4965
4995
|
copy() {
|
|
4966
4996
|
let copy = new PathAttachment(this.name);
|
|
@@ -4976,14 +5006,14 @@ var spine = (() => {
|
|
|
4976
5006
|
|
|
4977
5007
|
// spine-core/src/attachments/PointAttachment.ts
|
|
4978
5008
|
var PointAttachment = class extends VertexAttachment {
|
|
5009
|
+
x = 0;
|
|
5010
|
+
y = 0;
|
|
5011
|
+
rotation = 0;
|
|
5012
|
+
/** The color of the point attachment as it was in Spine. Available only when nonessential data was exported. Point attachments
|
|
5013
|
+
* are not usually rendered at runtime. */
|
|
5014
|
+
color = new Color(0.38, 0.94, 0, 1);
|
|
4979
5015
|
constructor(name) {
|
|
4980
5016
|
super(name);
|
|
4981
|
-
this.x = 0;
|
|
4982
|
-
this.y = 0;
|
|
4983
|
-
this.rotation = 0;
|
|
4984
|
-
/** The color of the point attachment as it was in Spine. Available only when nonessential data was exported. Point attachments
|
|
4985
|
-
* are not usually rendered at runtime. */
|
|
4986
|
-
this.color = new Color(0.38, 0.94, 0, 1);
|
|
4987
5017
|
}
|
|
4988
5018
|
computeWorldPosition(bone, point) {
|
|
4989
5019
|
point.x = this.x * bone.a + this.y * bone.b + bone.worldX;
|
|
@@ -5008,32 +5038,34 @@ var spine = (() => {
|
|
|
5008
5038
|
|
|
5009
5039
|
// spine-core/src/attachments/RegionAttachment.ts
|
|
5010
5040
|
var _RegionAttachment = class extends Attachment {
|
|
5041
|
+
/** The local x translation. */
|
|
5042
|
+
x = 0;
|
|
5043
|
+
/** The local y translation. */
|
|
5044
|
+
y = 0;
|
|
5045
|
+
/** The local scaleX. */
|
|
5046
|
+
scaleX = 1;
|
|
5047
|
+
/** The local scaleY. */
|
|
5048
|
+
scaleY = 1;
|
|
5049
|
+
/** The local rotation. */
|
|
5050
|
+
rotation = 0;
|
|
5051
|
+
/** The width of the region attachment in Spine. */
|
|
5052
|
+
width = 0;
|
|
5053
|
+
/** The height of the region attachment in Spine. */
|
|
5054
|
+
height = 0;
|
|
5055
|
+
/** The color to tint the region attachment. */
|
|
5056
|
+
color = new Color(1, 1, 1, 1);
|
|
5057
|
+
/** The name of the texture region for this attachment. */
|
|
5058
|
+
path;
|
|
5059
|
+
region = null;
|
|
5060
|
+
sequence = null;
|
|
5061
|
+
/** For each of the 4 vertices, a pair of <code>x,y</code> values that is the local position of the vertex.
|
|
5062
|
+
*
|
|
5063
|
+
* See {@link #updateOffset()}. */
|
|
5064
|
+
offset = Utils.newFloatArray(8);
|
|
5065
|
+
uvs = Utils.newFloatArray(8);
|
|
5066
|
+
tempColor = new Color(1, 1, 1, 1);
|
|
5011
5067
|
constructor(name, path) {
|
|
5012
5068
|
super(name);
|
|
5013
|
-
/** The local x translation. */
|
|
5014
|
-
this.x = 0;
|
|
5015
|
-
/** The local y translation. */
|
|
5016
|
-
this.y = 0;
|
|
5017
|
-
/** The local scaleX. */
|
|
5018
|
-
this.scaleX = 1;
|
|
5019
|
-
/** The local scaleY. */
|
|
5020
|
-
this.scaleY = 1;
|
|
5021
|
-
/** The local rotation. */
|
|
5022
|
-
this.rotation = 0;
|
|
5023
|
-
/** The width of the region attachment in Spine. */
|
|
5024
|
-
this.width = 0;
|
|
5025
|
-
/** The height of the region attachment in Spine. */
|
|
5026
|
-
this.height = 0;
|
|
5027
|
-
/** The color to tint the region attachment. */
|
|
5028
|
-
this.color = new Color(1, 1, 1, 1);
|
|
5029
|
-
this.region = null;
|
|
5030
|
-
this.sequence = null;
|
|
5031
|
-
/** For each of the 4 vertices, a pair of <code>x,y</code> values that is the local position of the vertex.
|
|
5032
|
-
*
|
|
5033
|
-
* See {@link #updateOffset()}. */
|
|
5034
|
-
this.offset = Utils.newFloatArray(8);
|
|
5035
|
-
this.uvs = Utils.newFloatArray(8);
|
|
5036
|
-
this.tempColor = new Color(1, 1, 1, 1);
|
|
5037
5069
|
this.path = path;
|
|
5038
5070
|
}
|
|
5039
5071
|
/** Calculates the {@link #offset} using the region settings. Must be called after changing region settings. */
|
|
@@ -5154,41 +5186,42 @@ var spine = (() => {
|
|
|
5154
5186
|
}
|
|
5155
5187
|
};
|
|
5156
5188
|
var RegionAttachment = _RegionAttachment;
|
|
5157
|
-
RegionAttachment
|
|
5158
|
-
RegionAttachment
|
|
5159
|
-
RegionAttachment
|
|
5160
|
-
RegionAttachment
|
|
5161
|
-
RegionAttachment
|
|
5162
|
-
RegionAttachment
|
|
5163
|
-
RegionAttachment
|
|
5164
|
-
RegionAttachment
|
|
5165
|
-
RegionAttachment
|
|
5166
|
-
RegionAttachment
|
|
5167
|
-
RegionAttachment
|
|
5168
|
-
RegionAttachment
|
|
5169
|
-
RegionAttachment
|
|
5170
|
-
RegionAttachment
|
|
5171
|
-
RegionAttachment
|
|
5172
|
-
RegionAttachment
|
|
5173
|
-
RegionAttachment
|
|
5174
|
-
RegionAttachment
|
|
5175
|
-
RegionAttachment
|
|
5176
|
-
RegionAttachment
|
|
5177
|
-
RegionAttachment
|
|
5178
|
-
RegionAttachment
|
|
5179
|
-
RegionAttachment
|
|
5180
|
-
RegionAttachment
|
|
5181
|
-
RegionAttachment
|
|
5182
|
-
RegionAttachment
|
|
5183
|
-
RegionAttachment
|
|
5184
|
-
RegionAttachment
|
|
5185
|
-
RegionAttachment
|
|
5186
|
-
RegionAttachment
|
|
5187
|
-
RegionAttachment
|
|
5188
|
-
RegionAttachment
|
|
5189
|
+
__publicField(RegionAttachment, "X1", 0);
|
|
5190
|
+
__publicField(RegionAttachment, "Y1", 1);
|
|
5191
|
+
__publicField(RegionAttachment, "C1R", 2);
|
|
5192
|
+
__publicField(RegionAttachment, "C1G", 3);
|
|
5193
|
+
__publicField(RegionAttachment, "C1B", 4);
|
|
5194
|
+
__publicField(RegionAttachment, "C1A", 5);
|
|
5195
|
+
__publicField(RegionAttachment, "U1", 6);
|
|
5196
|
+
__publicField(RegionAttachment, "V1", 7);
|
|
5197
|
+
__publicField(RegionAttachment, "X2", 8);
|
|
5198
|
+
__publicField(RegionAttachment, "Y2", 9);
|
|
5199
|
+
__publicField(RegionAttachment, "C2R", 10);
|
|
5200
|
+
__publicField(RegionAttachment, "C2G", 11);
|
|
5201
|
+
__publicField(RegionAttachment, "C2B", 12);
|
|
5202
|
+
__publicField(RegionAttachment, "C2A", 13);
|
|
5203
|
+
__publicField(RegionAttachment, "U2", 14);
|
|
5204
|
+
__publicField(RegionAttachment, "V2", 15);
|
|
5205
|
+
__publicField(RegionAttachment, "X3", 16);
|
|
5206
|
+
__publicField(RegionAttachment, "Y3", 17);
|
|
5207
|
+
__publicField(RegionAttachment, "C3R", 18);
|
|
5208
|
+
__publicField(RegionAttachment, "C3G", 19);
|
|
5209
|
+
__publicField(RegionAttachment, "C3B", 20);
|
|
5210
|
+
__publicField(RegionAttachment, "C3A", 21);
|
|
5211
|
+
__publicField(RegionAttachment, "U3", 22);
|
|
5212
|
+
__publicField(RegionAttachment, "V3", 23);
|
|
5213
|
+
__publicField(RegionAttachment, "X4", 24);
|
|
5214
|
+
__publicField(RegionAttachment, "Y4", 25);
|
|
5215
|
+
__publicField(RegionAttachment, "C4R", 26);
|
|
5216
|
+
__publicField(RegionAttachment, "C4G", 27);
|
|
5217
|
+
__publicField(RegionAttachment, "C4B", 28);
|
|
5218
|
+
__publicField(RegionAttachment, "C4A", 29);
|
|
5219
|
+
__publicField(RegionAttachment, "U4", 30);
|
|
5220
|
+
__publicField(RegionAttachment, "V4", 31);
|
|
5189
5221
|
|
|
5190
5222
|
// spine-core/src/AtlasAttachmentLoader.ts
|
|
5191
5223
|
var AtlasAttachmentLoader = class {
|
|
5224
|
+
atlas;
|
|
5192
5225
|
constructor(atlas) {
|
|
5193
5226
|
this.atlas = atlas;
|
|
5194
5227
|
}
|
|
@@ -5242,36 +5275,38 @@ var spine = (() => {
|
|
|
5242
5275
|
|
|
5243
5276
|
// spine-core/src/BoneData.ts
|
|
5244
5277
|
var BoneData = class {
|
|
5278
|
+
/** The index of the bone in {@link Skeleton#getBones()}. */
|
|
5279
|
+
index = 0;
|
|
5280
|
+
/** The name of the bone, which is unique across all bones in the skeleton. */
|
|
5281
|
+
name;
|
|
5282
|
+
/** @returns May be null. */
|
|
5283
|
+
parent = null;
|
|
5284
|
+
/** The bone's length. */
|
|
5285
|
+
length = 0;
|
|
5286
|
+
/** The local x translation. */
|
|
5287
|
+
x = 0;
|
|
5288
|
+
/** The local y translation. */
|
|
5289
|
+
y = 0;
|
|
5290
|
+
/** The local rotation. */
|
|
5291
|
+
rotation = 0;
|
|
5292
|
+
/** The local scaleX. */
|
|
5293
|
+
scaleX = 1;
|
|
5294
|
+
/** The local scaleY. */
|
|
5295
|
+
scaleY = 1;
|
|
5296
|
+
/** The local shearX. */
|
|
5297
|
+
shearX = 0;
|
|
5298
|
+
/** The local shearX. */
|
|
5299
|
+
shearY = 0;
|
|
5300
|
+
/** The transform mode for how parent world transforms affect this bone. */
|
|
5301
|
+
transformMode = TransformMode.Normal;
|
|
5302
|
+
/** When true, {@link Skeleton#updateWorldTransform()} only updates this bone if the {@link Skeleton#skin} contains this
|
|
5303
|
+
* bone.
|
|
5304
|
+
* @see Skin#bones */
|
|
5305
|
+
skinRequired = false;
|
|
5306
|
+
/** The color of the bone as it was in Spine. Available only when nonessential data was exported. Bones are not usually
|
|
5307
|
+
* rendered at runtime. */
|
|
5308
|
+
color = new Color();
|
|
5245
5309
|
constructor(index, name, parent) {
|
|
5246
|
-
/** The index of the bone in {@link Skeleton#getBones()}. */
|
|
5247
|
-
this.index = 0;
|
|
5248
|
-
/** @returns May be null. */
|
|
5249
|
-
this.parent = null;
|
|
5250
|
-
/** The bone's length. */
|
|
5251
|
-
this.length = 0;
|
|
5252
|
-
/** The local x translation. */
|
|
5253
|
-
this.x = 0;
|
|
5254
|
-
/** The local y translation. */
|
|
5255
|
-
this.y = 0;
|
|
5256
|
-
/** The local rotation. */
|
|
5257
|
-
this.rotation = 0;
|
|
5258
|
-
/** The local scaleX. */
|
|
5259
|
-
this.scaleX = 1;
|
|
5260
|
-
/** The local scaleY. */
|
|
5261
|
-
this.scaleY = 1;
|
|
5262
|
-
/** The local shearX. */
|
|
5263
|
-
this.shearX = 0;
|
|
5264
|
-
/** The local shearX. */
|
|
5265
|
-
this.shearY = 0;
|
|
5266
|
-
/** The transform mode for how parent world transforms affect this bone. */
|
|
5267
|
-
this.transformMode = TransformMode.Normal;
|
|
5268
|
-
/** When true, {@link Skeleton#updateWorldTransform()} only updates this bone if the {@link Skeleton#skin} contains this
|
|
5269
|
-
* bone.
|
|
5270
|
-
* @see Skin#bones */
|
|
5271
|
-
this.skinRequired = false;
|
|
5272
|
-
/** The color of the bone as it was in Spine. Available only when nonessential data was exported. Bones are not usually
|
|
5273
|
-
* rendered at runtime. */
|
|
5274
|
-
this.color = new Color();
|
|
5275
5310
|
if (index < 0)
|
|
5276
5311
|
throw new Error("index must be >= 0.");
|
|
5277
5312
|
if (!name)
|
|
@@ -5292,54 +5327,58 @@ var spine = (() => {
|
|
|
5292
5327
|
|
|
5293
5328
|
// spine-core/src/Bone.ts
|
|
5294
5329
|
var Bone = class {
|
|
5330
|
+
/** The bone's setup pose data. */
|
|
5331
|
+
data;
|
|
5332
|
+
/** The skeleton this bone belongs to. */
|
|
5333
|
+
skeleton;
|
|
5334
|
+
/** The parent bone, or null if this is the root bone. */
|
|
5335
|
+
parent = null;
|
|
5336
|
+
/** The immediate children of this bone. */
|
|
5337
|
+
children = new Array();
|
|
5338
|
+
/** The local x translation. */
|
|
5339
|
+
x = 0;
|
|
5340
|
+
/** The local y translation. */
|
|
5341
|
+
y = 0;
|
|
5342
|
+
/** The local rotation in degrees, counter clockwise. */
|
|
5343
|
+
rotation = 0;
|
|
5344
|
+
/** The local scaleX. */
|
|
5345
|
+
scaleX = 0;
|
|
5346
|
+
/** The local scaleY. */
|
|
5347
|
+
scaleY = 0;
|
|
5348
|
+
/** The local shearX. */
|
|
5349
|
+
shearX = 0;
|
|
5350
|
+
/** The local shearY. */
|
|
5351
|
+
shearY = 0;
|
|
5352
|
+
/** The applied local x translation. */
|
|
5353
|
+
ax = 0;
|
|
5354
|
+
/** The applied local y translation. */
|
|
5355
|
+
ay = 0;
|
|
5356
|
+
/** The applied local rotation in degrees, counter clockwise. */
|
|
5357
|
+
arotation = 0;
|
|
5358
|
+
/** The applied local scaleX. */
|
|
5359
|
+
ascaleX = 0;
|
|
5360
|
+
/** The applied local scaleY. */
|
|
5361
|
+
ascaleY = 0;
|
|
5362
|
+
/** The applied local shearX. */
|
|
5363
|
+
ashearX = 0;
|
|
5364
|
+
/** The applied local shearY. */
|
|
5365
|
+
ashearY = 0;
|
|
5366
|
+
/** Part of the world transform matrix for the X axis. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5367
|
+
a = 0;
|
|
5368
|
+
/** Part of the world transform matrix for the Y axis. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5369
|
+
b = 0;
|
|
5370
|
+
/** Part of the world transform matrix for the X axis. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5371
|
+
c = 0;
|
|
5372
|
+
/** Part of the world transform matrix for the Y axis. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5373
|
+
d = 0;
|
|
5374
|
+
/** The world X position. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5375
|
+
worldY = 0;
|
|
5376
|
+
/** The world Y position. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5377
|
+
worldX = 0;
|
|
5378
|
+
sorted = false;
|
|
5379
|
+
active = false;
|
|
5295
5380
|
/** @param parent May be null. */
|
|
5296
5381
|
constructor(data, skeleton, parent) {
|
|
5297
|
-
/** The parent bone, or null if this is the root bone. */
|
|
5298
|
-
this.parent = null;
|
|
5299
|
-
/** The immediate children of this bone. */
|
|
5300
|
-
this.children = new Array();
|
|
5301
|
-
/** The local x translation. */
|
|
5302
|
-
this.x = 0;
|
|
5303
|
-
/** The local y translation. */
|
|
5304
|
-
this.y = 0;
|
|
5305
|
-
/** The local rotation in degrees, counter clockwise. */
|
|
5306
|
-
this.rotation = 0;
|
|
5307
|
-
/** The local scaleX. */
|
|
5308
|
-
this.scaleX = 0;
|
|
5309
|
-
/** The local scaleY. */
|
|
5310
|
-
this.scaleY = 0;
|
|
5311
|
-
/** The local shearX. */
|
|
5312
|
-
this.shearX = 0;
|
|
5313
|
-
/** The local shearY. */
|
|
5314
|
-
this.shearY = 0;
|
|
5315
|
-
/** The applied local x translation. */
|
|
5316
|
-
this.ax = 0;
|
|
5317
|
-
/** The applied local y translation. */
|
|
5318
|
-
this.ay = 0;
|
|
5319
|
-
/** The applied local rotation in degrees, counter clockwise. */
|
|
5320
|
-
this.arotation = 0;
|
|
5321
|
-
/** The applied local scaleX. */
|
|
5322
|
-
this.ascaleX = 0;
|
|
5323
|
-
/** The applied local scaleY. */
|
|
5324
|
-
this.ascaleY = 0;
|
|
5325
|
-
/** The applied local shearX. */
|
|
5326
|
-
this.ashearX = 0;
|
|
5327
|
-
/** The applied local shearY. */
|
|
5328
|
-
this.ashearY = 0;
|
|
5329
|
-
/** Part of the world transform matrix for the X axis. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5330
|
-
this.a = 0;
|
|
5331
|
-
/** Part of the world transform matrix for the Y axis. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5332
|
-
this.b = 0;
|
|
5333
|
-
/** Part of the world transform matrix for the X axis. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5334
|
-
this.c = 0;
|
|
5335
|
-
/** Part of the world transform matrix for the Y axis. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5336
|
-
this.d = 0;
|
|
5337
|
-
/** The world X position. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5338
|
-
this.worldY = 0;
|
|
5339
|
-
/** The world Y position. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5340
|
-
this.worldX = 0;
|
|
5341
|
-
this.sorted = false;
|
|
5342
|
-
this.active = false;
|
|
5343
5382
|
if (!data)
|
|
5344
5383
|
throw new Error("data cannot be null.");
|
|
5345
5384
|
if (!skeleton)
|
|
@@ -5600,12 +5639,14 @@ var spine = (() => {
|
|
|
5600
5639
|
|
|
5601
5640
|
// spine-core/src/AssetManagerBase.ts
|
|
5602
5641
|
var AssetManagerBase = class {
|
|
5642
|
+
pathPrefix = "";
|
|
5643
|
+
textureLoader;
|
|
5644
|
+
downloader;
|
|
5645
|
+
assets = {};
|
|
5646
|
+
errors = {};
|
|
5647
|
+
toLoad = 0;
|
|
5648
|
+
loaded = 0;
|
|
5603
5649
|
constructor(textureLoader, pathPrefix = "", downloader = new Downloader()) {
|
|
5604
|
-
this.pathPrefix = "";
|
|
5605
|
-
this.assets = {};
|
|
5606
|
-
this.errors = {};
|
|
5607
|
-
this.toLoad = 0;
|
|
5608
|
-
this.loaded = 0;
|
|
5609
5650
|
this.textureLoader = textureLoader;
|
|
5610
5651
|
this.pathPrefix = pathPrefix;
|
|
5611
5652
|
this.downloader = downloader;
|
|
@@ -5790,10 +5831,8 @@ var spine = (() => {
|
|
|
5790
5831
|
}
|
|
5791
5832
|
};
|
|
5792
5833
|
var Downloader = class {
|
|
5793
|
-
|
|
5794
|
-
|
|
5795
|
-
this.rawDataUris = {};
|
|
5796
|
-
}
|
|
5834
|
+
callbacks = {};
|
|
5835
|
+
rawDataUris = {};
|
|
5797
5836
|
dataUriToString(dataUri) {
|
|
5798
5837
|
if (!dataUri.startsWith("data:")) {
|
|
5799
5838
|
throw new Error("Not a data URI.");
|
|
@@ -5900,13 +5939,14 @@ var spine = (() => {
|
|
|
5900
5939
|
|
|
5901
5940
|
// spine-core/src/Event.ts
|
|
5902
5941
|
var Event = class {
|
|
5942
|
+
data;
|
|
5943
|
+
intValue = 0;
|
|
5944
|
+
floatValue = 0;
|
|
5945
|
+
stringValue = null;
|
|
5946
|
+
time = 0;
|
|
5947
|
+
volume = 0;
|
|
5948
|
+
balance = 0;
|
|
5903
5949
|
constructor(time, data) {
|
|
5904
|
-
this.intValue = 0;
|
|
5905
|
-
this.floatValue = 0;
|
|
5906
|
-
this.stringValue = null;
|
|
5907
|
-
this.time = 0;
|
|
5908
|
-
this.volume = 0;
|
|
5909
|
-
this.balance = 0;
|
|
5910
5950
|
if (!data)
|
|
5911
5951
|
throw new Error("data cannot be null.");
|
|
5912
5952
|
this.time = time;
|
|
@@ -5916,32 +5956,39 @@ var spine = (() => {
|
|
|
5916
5956
|
|
|
5917
5957
|
// spine-core/src/EventData.ts
|
|
5918
5958
|
var EventData = class {
|
|
5959
|
+
name;
|
|
5960
|
+
intValue = 0;
|
|
5961
|
+
floatValue = 0;
|
|
5962
|
+
stringValue = null;
|
|
5963
|
+
audioPath = null;
|
|
5964
|
+
volume = 0;
|
|
5965
|
+
balance = 0;
|
|
5919
5966
|
constructor(name) {
|
|
5920
|
-
this.intValue = 0;
|
|
5921
|
-
this.floatValue = 0;
|
|
5922
|
-
this.stringValue = null;
|
|
5923
|
-
this.audioPath = null;
|
|
5924
|
-
this.volume = 0;
|
|
5925
|
-
this.balance = 0;
|
|
5926
5967
|
this.name = name;
|
|
5927
5968
|
}
|
|
5928
5969
|
};
|
|
5929
5970
|
|
|
5930
5971
|
// spine-core/src/IkConstraint.ts
|
|
5931
5972
|
var IkConstraint = class {
|
|
5973
|
+
/** The IK constraint's setup pose data. */
|
|
5974
|
+
data;
|
|
5975
|
+
/** The bones that will be modified by this IK constraint. */
|
|
5976
|
+
bones;
|
|
5977
|
+
/** The bone that is the IK target. */
|
|
5978
|
+
target;
|
|
5979
|
+
/** Controls the bend direction of the IK bones, either 1 or -1. */
|
|
5980
|
+
bendDirection = 0;
|
|
5981
|
+
/** When true and only a single bone is being constrained, if the target is too close, the bone is scaled to reach it. */
|
|
5982
|
+
compress = false;
|
|
5983
|
+
/** When true, if the target is out of range, the parent bone is scaled to reach it. If more than one bone is being constrained
|
|
5984
|
+
* and the parent bone has local nonuniform scale, stretch is not applied. */
|
|
5985
|
+
stretch = false;
|
|
5986
|
+
/** A percentage (0-1) that controls the mix between the constrained and unconstrained rotations. */
|
|
5987
|
+
mix = 1;
|
|
5988
|
+
/** For two bone IK, the distance from the maximum reach of the bones that rotation will slow. */
|
|
5989
|
+
softness = 0;
|
|
5990
|
+
active = false;
|
|
5932
5991
|
constructor(data, skeleton) {
|
|
5933
|
-
/** Controls the bend direction of the IK bones, either 1 or -1. */
|
|
5934
|
-
this.bendDirection = 0;
|
|
5935
|
-
/** When true and only a single bone is being constrained, if the target is too close, the bone is scaled to reach it. */
|
|
5936
|
-
this.compress = false;
|
|
5937
|
-
/** When true, if the target is out of range, the parent bone is scaled to reach it. If more than one bone is being constrained
|
|
5938
|
-
* and the parent bone has local nonuniform scale, stretch is not applied. */
|
|
5939
|
-
this.stretch = false;
|
|
5940
|
-
/** A percentage (0-1) that controls the mix between the constrained and unconstrained rotations. */
|
|
5941
|
-
this.mix = 1;
|
|
5942
|
-
/** For two bone IK, the distance from the maximum reach of the bones that rotation will slow. */
|
|
5943
|
-
this.softness = 0;
|
|
5944
|
-
this.active = false;
|
|
5945
5992
|
if (!data)
|
|
5946
5993
|
throw new Error("data cannot be null.");
|
|
5947
5994
|
if (!skeleton)
|
|
@@ -6199,27 +6246,10 @@ var spine = (() => {
|
|
|
6199
6246
|
|
|
6200
6247
|
// spine-core/src/IkConstraintData.ts
|
|
6201
6248
|
var IkConstraintData = class extends ConstraintData {
|
|
6202
|
-
|
|
6203
|
-
|
|
6204
|
-
|
|
6205
|
-
|
|
6206
|
-
/** The bone that is the IK target. */
|
|
6207
|
-
this._target = null;
|
|
6208
|
-
/** Controls the bend direction of the IK bones, either 1 or -1. */
|
|
6209
|
-
this.bendDirection = 1;
|
|
6210
|
-
/** When true and only a single bone is being constrained, if the target is too close, the bone is scaled to reach it. */
|
|
6211
|
-
this.compress = false;
|
|
6212
|
-
/** When true, if the target is out of range, the parent bone is scaled to reach it. If more than one bone is being constrained
|
|
6213
|
-
* and the parent bone has local nonuniform scale, stretch is not applied. */
|
|
6214
|
-
this.stretch = false;
|
|
6215
|
-
/** When true, only a single bone is being constrained, and {@link #getCompress()} or {@link #getStretch()} is used, the bone
|
|
6216
|
-
* is scaled on both the X and Y axes. */
|
|
6217
|
-
this.uniform = false;
|
|
6218
|
-
/** A percentage (0-1) that controls the mix between the constrained and unconstrained rotations. */
|
|
6219
|
-
this.mix = 1;
|
|
6220
|
-
/** For two bone IK, the distance from the maximum reach of the bones that rotation will slow. */
|
|
6221
|
-
this.softness = 0;
|
|
6222
|
-
}
|
|
6249
|
+
/** The bones that are constrained by this IK constraint. */
|
|
6250
|
+
bones = new Array();
|
|
6251
|
+
/** The bone that is the IK target. */
|
|
6252
|
+
_target = null;
|
|
6223
6253
|
set target(boneData) {
|
|
6224
6254
|
this._target = boneData;
|
|
6225
6255
|
}
|
|
@@ -6229,32 +6259,31 @@ var spine = (() => {
|
|
|
6229
6259
|
else
|
|
6230
6260
|
return this._target;
|
|
6231
6261
|
}
|
|
6262
|
+
/** Controls the bend direction of the IK bones, either 1 or -1. */
|
|
6263
|
+
bendDirection = 1;
|
|
6264
|
+
/** When true and only a single bone is being constrained, if the target is too close, the bone is scaled to reach it. */
|
|
6265
|
+
compress = false;
|
|
6266
|
+
/** When true, if the target is out of range, the parent bone is scaled to reach it. If more than one bone is being constrained
|
|
6267
|
+
* and the parent bone has local nonuniform scale, stretch is not applied. */
|
|
6268
|
+
stretch = false;
|
|
6269
|
+
/** When true, only a single bone is being constrained, and {@link #getCompress()} or {@link #getStretch()} is used, the bone
|
|
6270
|
+
* is scaled on both the X and Y axes. */
|
|
6271
|
+
uniform = false;
|
|
6272
|
+
/** A percentage (0-1) that controls the mix between the constrained and unconstrained rotations. */
|
|
6273
|
+
mix = 1;
|
|
6274
|
+
/** For two bone IK, the distance from the maximum reach of the bones that rotation will slow. */
|
|
6275
|
+
softness = 0;
|
|
6276
|
+
constructor(name) {
|
|
6277
|
+
super(name, 0, false);
|
|
6278
|
+
}
|
|
6232
6279
|
};
|
|
6233
6280
|
|
|
6234
6281
|
// spine-core/src/PathConstraintData.ts
|
|
6235
6282
|
var PathConstraintData = class extends ConstraintData {
|
|
6236
|
-
|
|
6237
|
-
|
|
6238
|
-
|
|
6239
|
-
|
|
6240
|
-
/** The slot whose path attachment will be used to constrained the bones. */
|
|
6241
|
-
this._target = null;
|
|
6242
|
-
/** The mode for positioning the first bone on the path. */
|
|
6243
|
-
this.positionMode = PositionMode.Fixed;
|
|
6244
|
-
/** The mode for positioning the bones after the first bone on the path. */
|
|
6245
|
-
this.spacingMode = SpacingMode.Fixed;
|
|
6246
|
-
/** The mode for adjusting the rotation of the bones. */
|
|
6247
|
-
this.rotateMode = RotateMode.Chain;
|
|
6248
|
-
/** An offset added to the constrained bone rotation. */
|
|
6249
|
-
this.offsetRotation = 0;
|
|
6250
|
-
/** The position along the path. */
|
|
6251
|
-
this.position = 0;
|
|
6252
|
-
/** The spacing between bones. */
|
|
6253
|
-
this.spacing = 0;
|
|
6254
|
-
this.mixRotate = 0;
|
|
6255
|
-
this.mixX = 0;
|
|
6256
|
-
this.mixY = 0;
|
|
6257
|
-
}
|
|
6283
|
+
/** The bones that will be modified by this path constraint. */
|
|
6284
|
+
bones = new Array();
|
|
6285
|
+
/** The slot whose path attachment will be used to constrained the bones. */
|
|
6286
|
+
_target = null;
|
|
6258
6287
|
set target(slotData) {
|
|
6259
6288
|
this._target = slotData;
|
|
6260
6289
|
}
|
|
@@ -6264,6 +6293,24 @@ var spine = (() => {
|
|
|
6264
6293
|
else
|
|
6265
6294
|
return this._target;
|
|
6266
6295
|
}
|
|
6296
|
+
/** The mode for positioning the first bone on the path. */
|
|
6297
|
+
positionMode = PositionMode.Fixed;
|
|
6298
|
+
/** The mode for positioning the bones after the first bone on the path. */
|
|
6299
|
+
spacingMode = SpacingMode.Fixed;
|
|
6300
|
+
/** The mode for adjusting the rotation of the bones. */
|
|
6301
|
+
rotateMode = RotateMode.Chain;
|
|
6302
|
+
/** An offset added to the constrained bone rotation. */
|
|
6303
|
+
offsetRotation = 0;
|
|
6304
|
+
/** The position along the path. */
|
|
6305
|
+
position = 0;
|
|
6306
|
+
/** The spacing between bones. */
|
|
6307
|
+
spacing = 0;
|
|
6308
|
+
mixRotate = 0;
|
|
6309
|
+
mixX = 0;
|
|
6310
|
+
mixY = 0;
|
|
6311
|
+
constructor(name) {
|
|
6312
|
+
super(name, 0, false);
|
|
6313
|
+
}
|
|
6267
6314
|
};
|
|
6268
6315
|
var PositionMode = /* @__PURE__ */ ((PositionMode2) => {
|
|
6269
6316
|
PositionMode2[PositionMode2["Fixed"] = 0] = "Fixed";
|
|
@@ -6286,21 +6333,27 @@ var spine = (() => {
|
|
|
6286
6333
|
|
|
6287
6334
|
// spine-core/src/PathConstraint.ts
|
|
6288
6335
|
var _PathConstraint = class {
|
|
6336
|
+
/** The path constraint's setup pose data. */
|
|
6337
|
+
data;
|
|
6338
|
+
/** The bones that will be modified by this path constraint. */
|
|
6339
|
+
bones;
|
|
6340
|
+
/** The slot whose path attachment will be used to constrained the bones. */
|
|
6341
|
+
target;
|
|
6342
|
+
/** The position along the path. */
|
|
6343
|
+
position = 0;
|
|
6344
|
+
/** The spacing between bones. */
|
|
6345
|
+
spacing = 0;
|
|
6346
|
+
mixRotate = 0;
|
|
6347
|
+
mixX = 0;
|
|
6348
|
+
mixY = 0;
|
|
6349
|
+
spaces = new Array();
|
|
6350
|
+
positions = new Array();
|
|
6351
|
+
world = new Array();
|
|
6352
|
+
curves = new Array();
|
|
6353
|
+
lengths = new Array();
|
|
6354
|
+
segments = new Array();
|
|
6355
|
+
active = false;
|
|
6289
6356
|
constructor(data, skeleton) {
|
|
6290
|
-
/** The position along the path. */
|
|
6291
|
-
this.position = 0;
|
|
6292
|
-
/** The spacing between bones. */
|
|
6293
|
-
this.spacing = 0;
|
|
6294
|
-
this.mixRotate = 0;
|
|
6295
|
-
this.mixX = 0;
|
|
6296
|
-
this.mixY = 0;
|
|
6297
|
-
this.spaces = new Array();
|
|
6298
|
-
this.positions = new Array();
|
|
6299
|
-
this.world = new Array();
|
|
6300
|
-
this.curves = new Array();
|
|
6301
|
-
this.lengths = new Array();
|
|
6302
|
-
this.segments = new Array();
|
|
6303
|
-
this.active = false;
|
|
6304
6357
|
if (!data)
|
|
6305
6358
|
throw new Error("data cannot be null.");
|
|
6306
6359
|
if (!skeleton)
|
|
@@ -6720,27 +6773,34 @@ var spine = (() => {
|
|
|
6720
6773
|
}
|
|
6721
6774
|
};
|
|
6722
6775
|
var PathConstraint = _PathConstraint;
|
|
6723
|
-
PathConstraint
|
|
6724
|
-
PathConstraint
|
|
6725
|
-
PathConstraint
|
|
6726
|
-
PathConstraint
|
|
6776
|
+
__publicField(PathConstraint, "NONE", -1);
|
|
6777
|
+
__publicField(PathConstraint, "BEFORE", -2);
|
|
6778
|
+
__publicField(PathConstraint, "AFTER", -3);
|
|
6779
|
+
__publicField(PathConstraint, "epsilon", 1e-5);
|
|
6727
6780
|
|
|
6728
6781
|
// spine-core/src/Slot.ts
|
|
6729
6782
|
var Slot = class {
|
|
6783
|
+
/** The slot's setup pose data. */
|
|
6784
|
+
data;
|
|
6785
|
+
/** The bone this slot belongs to. */
|
|
6786
|
+
bone;
|
|
6787
|
+
/** The color used to tint the slot's attachment. If {@link #getDarkColor()} is set, this is used as the light color for two
|
|
6788
|
+
* color tinting. */
|
|
6789
|
+
color;
|
|
6790
|
+
/** The dark color used to tint the slot's attachment for two color tinting, or null if two color tinting is not used. The dark
|
|
6791
|
+
* color's alpha is not used. */
|
|
6792
|
+
darkColor = null;
|
|
6793
|
+
attachment = null;
|
|
6794
|
+
attachmentState = 0;
|
|
6795
|
+
/** The index of the texture region to display when the slot's attachment has a {@link Sequence}. -1 represents the
|
|
6796
|
+
* {@link Sequence#getSetupIndex()}. */
|
|
6797
|
+
sequenceIndex = -1;
|
|
6798
|
+
/** Values to deform the slot's attachment. For an unweighted mesh, the entries are local positions for each vertex. For a
|
|
6799
|
+
* weighted mesh, the entries are an offset for each vertex which will be added to the mesh's local vertex positions.
|
|
6800
|
+
*
|
|
6801
|
+
* See {@link VertexAttachment#computeWorldVertices()} and {@link DeformTimeline}. */
|
|
6802
|
+
deform = new Array();
|
|
6730
6803
|
constructor(data, bone) {
|
|
6731
|
-
/** The dark color used to tint the slot's attachment for two color tinting, or null if two color tinting is not used. The dark
|
|
6732
|
-
* color's alpha is not used. */
|
|
6733
|
-
this.darkColor = null;
|
|
6734
|
-
this.attachment = null;
|
|
6735
|
-
this.attachmentState = 0;
|
|
6736
|
-
/** The index of the texture region to display when the slot's attachment has a {@link Sequence}. -1 represents the
|
|
6737
|
-
* {@link Sequence#getSetupIndex()}. */
|
|
6738
|
-
this.sequenceIndex = -1;
|
|
6739
|
-
/** Values to deform the slot's attachment. For an unweighted mesh, the entries are local positions for each vertex. For a
|
|
6740
|
-
* weighted mesh, the entries are an offset for each vertex which will be added to the mesh's local vertex positions.
|
|
6741
|
-
*
|
|
6742
|
-
* See {@link VertexAttachment#computeWorldVertices()} and {@link DeformTimeline}. */
|
|
6743
|
-
this.deform = new Array();
|
|
6744
6804
|
if (!data)
|
|
6745
6805
|
throw new Error("data cannot be null.");
|
|
6746
6806
|
if (!bone)
|
|
@@ -6787,15 +6847,21 @@ var spine = (() => {
|
|
|
6787
6847
|
|
|
6788
6848
|
// spine-core/src/TransformConstraint.ts
|
|
6789
6849
|
var TransformConstraint = class {
|
|
6850
|
+
/** The transform constraint's setup pose data. */
|
|
6851
|
+
data;
|
|
6852
|
+
/** The bones that will be modified by this transform constraint. */
|
|
6853
|
+
bones;
|
|
6854
|
+
/** The target bone whose world transform will be copied to the constrained bones. */
|
|
6855
|
+
target;
|
|
6856
|
+
mixRotate = 0;
|
|
6857
|
+
mixX = 0;
|
|
6858
|
+
mixY = 0;
|
|
6859
|
+
mixScaleX = 0;
|
|
6860
|
+
mixScaleY = 0;
|
|
6861
|
+
mixShearY = 0;
|
|
6862
|
+
temp = new Vector2();
|
|
6863
|
+
active = false;
|
|
6790
6864
|
constructor(data, skeleton) {
|
|
6791
|
-
this.mixRotate = 0;
|
|
6792
|
-
this.mixX = 0;
|
|
6793
|
-
this.mixY = 0;
|
|
6794
|
-
this.mixScaleX = 0;
|
|
6795
|
-
this.mixScaleY = 0;
|
|
6796
|
-
this.mixShearY = 0;
|
|
6797
|
-
this.temp = new Vector2();
|
|
6798
|
-
this.active = false;
|
|
6799
6865
|
if (!data)
|
|
6800
6866
|
throw new Error("data cannot be null.");
|
|
6801
6867
|
if (!skeleton)
|
|
@@ -7001,21 +7067,43 @@ var spine = (() => {
|
|
|
7001
7067
|
|
|
7002
7068
|
// spine-core/src/Skeleton.ts
|
|
7003
7069
|
var _Skeleton = class {
|
|
7070
|
+
/** The skeleton's setup pose data. */
|
|
7071
|
+
data;
|
|
7072
|
+
/** The skeleton's bones, sorted parent first. The root bone is always the first bone. */
|
|
7073
|
+
bones;
|
|
7074
|
+
/** The skeleton's slots. */
|
|
7075
|
+
slots;
|
|
7076
|
+
/** The skeleton's slots in the order they should be drawn. The returned array may be modified to change the draw order. */
|
|
7077
|
+
drawOrder;
|
|
7078
|
+
/** The skeleton's IK constraints. */
|
|
7079
|
+
ikConstraints;
|
|
7080
|
+
/** The skeleton's transform constraints. */
|
|
7081
|
+
transformConstraints;
|
|
7082
|
+
/** The skeleton's path constraints. */
|
|
7083
|
+
pathConstraints;
|
|
7084
|
+
/** The list of bones and constraints, sorted in the order they should be updated, as computed by {@link #updateCache()}. */
|
|
7085
|
+
_updateCache = new Array();
|
|
7086
|
+
/** The skeleton's current skin. May be null. */
|
|
7087
|
+
skin = null;
|
|
7088
|
+
/** The color to tint all the skeleton's attachments. */
|
|
7089
|
+
color;
|
|
7090
|
+
/** Scales the entire skeleton on the X axis. This affects all bones, even if the bone's transform mode disallows scale
|
|
7091
|
+
* inheritance. */
|
|
7092
|
+
scaleX = 1;
|
|
7093
|
+
/** Scales the entire skeleton on the Y axis. This affects all bones, even if the bone's transform mode disallows scale
|
|
7094
|
+
* inheritance. */
|
|
7095
|
+
_scaleY = 1;
|
|
7096
|
+
get scaleY() {
|
|
7097
|
+
return _Skeleton.yDown ? -this._scaleY : this._scaleY;
|
|
7098
|
+
}
|
|
7099
|
+
set scaleY(scaleY) {
|
|
7100
|
+
this._scaleY = scaleY;
|
|
7101
|
+
}
|
|
7102
|
+
/** Sets the skeleton X position, which is added to the root bone worldX position. */
|
|
7103
|
+
x = 0;
|
|
7104
|
+
/** Sets the skeleton Y position, which is added to the root bone worldY position. */
|
|
7105
|
+
y = 0;
|
|
7004
7106
|
constructor(data) {
|
|
7005
|
-
/** The list of bones and constraints, sorted in the order they should be updated, as computed by {@link #updateCache()}. */
|
|
7006
|
-
this._updateCache = new Array();
|
|
7007
|
-
/** The skeleton's current skin. May be null. */
|
|
7008
|
-
this.skin = null;
|
|
7009
|
-
/** Scales the entire skeleton on the X axis. This affects all bones, even if the bone's transform mode disallows scale
|
|
7010
|
-
* inheritance. */
|
|
7011
|
-
this.scaleX = 1;
|
|
7012
|
-
/** Scales the entire skeleton on the Y axis. This affects all bones, even if the bone's transform mode disallows scale
|
|
7013
|
-
* inheritance. */
|
|
7014
|
-
this._scaleY = 1;
|
|
7015
|
-
/** Sets the skeleton X position, which is added to the root bone worldX position. */
|
|
7016
|
-
this.x = 0;
|
|
7017
|
-
/** Sets the skeleton Y position, which is added to the root bone worldY position. */
|
|
7018
|
-
this.y = 0;
|
|
7019
7107
|
if (!data)
|
|
7020
7108
|
throw new Error("data cannot be null.");
|
|
7021
7109
|
this.data = data;
|
|
@@ -7059,12 +7147,6 @@ var spine = (() => {
|
|
|
7059
7147
|
this.color = new Color(1, 1, 1, 1);
|
|
7060
7148
|
this.updateCache();
|
|
7061
7149
|
}
|
|
7062
|
-
get scaleY() {
|
|
7063
|
-
return _Skeleton.yDown ? -this._scaleY : this._scaleY;
|
|
7064
|
-
}
|
|
7065
|
-
set scaleY(scaleY) {
|
|
7066
|
-
this._scaleY = scaleY;
|
|
7067
|
-
}
|
|
7068
7150
|
/** Caches information about bones and constraints. Must be called if the {@link #getSkin()} is modified or if bones,
|
|
7069
7151
|
* constraints, or weighted path attachments are added or removed. */
|
|
7070
7152
|
updateCache() {
|
|
@@ -7541,55 +7623,53 @@ var spine = (() => {
|
|
|
7541
7623
|
}
|
|
7542
7624
|
};
|
|
7543
7625
|
var Skeleton = _Skeleton;
|
|
7544
|
-
Skeleton
|
|
7626
|
+
__publicField(Skeleton, "yDown", false);
|
|
7545
7627
|
|
|
7546
7628
|
// spine-core/src/SkeletonData.ts
|
|
7547
7629
|
var SkeletonData = class {
|
|
7548
|
-
|
|
7549
|
-
|
|
7550
|
-
|
|
7551
|
-
|
|
7552
|
-
|
|
7553
|
-
|
|
7554
|
-
|
|
7555
|
-
|
|
7556
|
-
|
|
7557
|
-
|
|
7558
|
-
|
|
7559
|
-
|
|
7560
|
-
|
|
7561
|
-
|
|
7562
|
-
|
|
7563
|
-
|
|
7564
|
-
|
|
7565
|
-
|
|
7566
|
-
|
|
7567
|
-
|
|
7568
|
-
|
|
7569
|
-
|
|
7570
|
-
|
|
7571
|
-
|
|
7572
|
-
|
|
7573
|
-
|
|
7574
|
-
|
|
7575
|
-
|
|
7576
|
-
|
|
7577
|
-
|
|
7578
|
-
|
|
7579
|
-
|
|
7580
|
-
|
|
7581
|
-
|
|
7582
|
-
|
|
7583
|
-
|
|
7584
|
-
|
|
7585
|
-
|
|
7586
|
-
|
|
7587
|
-
|
|
7588
|
-
|
|
7589
|
-
|
|
7590
|
-
|
|
7591
|
-
this.audioPath = null;
|
|
7592
|
-
}
|
|
7630
|
+
/** The skeleton's name, which by default is the name of the skeleton data file, if possible. May be null. */
|
|
7631
|
+
name = null;
|
|
7632
|
+
/** The skeleton's bones, sorted parent first. The root bone is always the first bone. */
|
|
7633
|
+
bones = new Array();
|
|
7634
|
+
// Ordered parents first.
|
|
7635
|
+
/** The skeleton's slots. */
|
|
7636
|
+
slots = new Array();
|
|
7637
|
+
// Setup pose draw order.
|
|
7638
|
+
skins = new Array();
|
|
7639
|
+
/** The skeleton's default skin. By default this skin contains all attachments that were not in a skin in Spine.
|
|
7640
|
+
*
|
|
7641
|
+
* See {@link Skeleton#getAttachmentByName()}.
|
|
7642
|
+
* May be null. */
|
|
7643
|
+
defaultSkin = null;
|
|
7644
|
+
/** The skeleton's events. */
|
|
7645
|
+
events = new Array();
|
|
7646
|
+
/** The skeleton's animations. */
|
|
7647
|
+
animations = new Array();
|
|
7648
|
+
/** The skeleton's IK constraints. */
|
|
7649
|
+
ikConstraints = new Array();
|
|
7650
|
+
/** The skeleton's transform constraints. */
|
|
7651
|
+
transformConstraints = new Array();
|
|
7652
|
+
/** The skeleton's path constraints. */
|
|
7653
|
+
pathConstraints = new Array();
|
|
7654
|
+
/** The X coordinate of the skeleton's axis aligned bounding box in the setup pose. */
|
|
7655
|
+
x = 0;
|
|
7656
|
+
/** The Y coordinate of the skeleton's axis aligned bounding box in the setup pose. */
|
|
7657
|
+
y = 0;
|
|
7658
|
+
/** The width of the skeleton's axis aligned bounding box in the setup pose. */
|
|
7659
|
+
width = 0;
|
|
7660
|
+
/** The height of the skeleton's axis aligned bounding box in the setup pose. */
|
|
7661
|
+
height = 0;
|
|
7662
|
+
/** The Spine version used to export the skeleton data, or null. */
|
|
7663
|
+
version = null;
|
|
7664
|
+
/** The skeleton data hash. This value will change if any of the skeleton data has changed. May be null. */
|
|
7665
|
+
hash = null;
|
|
7666
|
+
// Nonessential
|
|
7667
|
+
/** The dopesheet FPS in Spine. Available only when nonessential data was exported. */
|
|
7668
|
+
fps = 0;
|
|
7669
|
+
/** The path to the images directory as defined in Spine. Available only when nonessential data was exported. May be null. */
|
|
7670
|
+
imagesPath = null;
|
|
7671
|
+
/** The path to the audio directory as defined in Spine. Available only when nonessential data was exported. May be null. */
|
|
7672
|
+
audioPath = null;
|
|
7593
7673
|
/** Finds a bone by comparing each bone's name. It is more efficient to cache the results of this method than to call it
|
|
7594
7674
|
* multiple times.
|
|
7595
7675
|
* @returns May be null. */
|
|
@@ -7713,10 +7793,12 @@ var spine = (() => {
|
|
|
7713
7793
|
}
|
|
7714
7794
|
};
|
|
7715
7795
|
var Skin = class {
|
|
7796
|
+
/** The skin's name, which is unique across all skins in the skeleton. */
|
|
7797
|
+
name;
|
|
7798
|
+
attachments = new Array();
|
|
7799
|
+
bones = Array();
|
|
7800
|
+
constraints = new Array();
|
|
7716
7801
|
constructor(name) {
|
|
7717
|
-
this.attachments = new Array();
|
|
7718
|
-
this.bones = Array();
|
|
7719
|
-
this.constraints = new Array();
|
|
7720
7802
|
if (!name)
|
|
7721
7803
|
throw new Error("name cannot be null.");
|
|
7722
7804
|
this.name = name;
|
|
@@ -7873,19 +7955,23 @@ var spine = (() => {
|
|
|
7873
7955
|
|
|
7874
7956
|
// spine-core/src/SlotData.ts
|
|
7875
7957
|
var SlotData = class {
|
|
7958
|
+
/** The index of the slot in {@link Skeleton#getSlots()}. */
|
|
7959
|
+
index = 0;
|
|
7960
|
+
/** The name of the slot, which is unique across all slots in the skeleton. */
|
|
7961
|
+
name;
|
|
7962
|
+
/** The bone this slot belongs to. */
|
|
7963
|
+
boneData;
|
|
7964
|
+
/** The color used to tint the slot's attachment. If {@link #getDarkColor()} is set, this is used as the light color for two
|
|
7965
|
+
* color tinting. */
|
|
7966
|
+
color = new Color(1, 1, 1, 1);
|
|
7967
|
+
/** The dark color used to tint the slot's attachment for two color tinting, or null if two color tinting is not used. The dark
|
|
7968
|
+
* color's alpha is not used. */
|
|
7969
|
+
darkColor = null;
|
|
7970
|
+
/** The name of the attachment that is visible for this slot in the setup pose, or null if no attachment is visible. */
|
|
7971
|
+
attachmentName = null;
|
|
7972
|
+
/** The blend mode for drawing the slot's attachment. */
|
|
7973
|
+
blendMode = BlendMode.Normal;
|
|
7876
7974
|
constructor(index, name, boneData) {
|
|
7877
|
-
/** The index of the slot in {@link Skeleton#getSlots()}. */
|
|
7878
|
-
this.index = 0;
|
|
7879
|
-
/** The color used to tint the slot's attachment. If {@link #getDarkColor()} is set, this is used as the light color for two
|
|
7880
|
-
* color tinting. */
|
|
7881
|
-
this.color = new Color(1, 1, 1, 1);
|
|
7882
|
-
/** The dark color used to tint the slot's attachment for two color tinting, or null if two color tinting is not used. The dark
|
|
7883
|
-
* color's alpha is not used. */
|
|
7884
|
-
this.darkColor = null;
|
|
7885
|
-
/** The name of the attachment that is visible for this slot in the setup pose, or null if no attachment is visible. */
|
|
7886
|
-
this.attachmentName = null;
|
|
7887
|
-
/** The blend mode for drawing the slot's attachment. */
|
|
7888
|
-
this.blendMode = BlendMode.Normal;
|
|
7889
7975
|
if (index < 0)
|
|
7890
7976
|
throw new Error("index must be >= 0.");
|
|
7891
7977
|
if (!name)
|
|
@@ -7907,33 +7993,10 @@ var spine = (() => {
|
|
|
7907
7993
|
|
|
7908
7994
|
// spine-core/src/TransformConstraintData.ts
|
|
7909
7995
|
var TransformConstraintData = class extends ConstraintData {
|
|
7910
|
-
|
|
7911
|
-
|
|
7912
|
-
|
|
7913
|
-
|
|
7914
|
-
/** The target bone whose world transform will be copied to the constrained bones. */
|
|
7915
|
-
this._target = null;
|
|
7916
|
-
this.mixRotate = 0;
|
|
7917
|
-
this.mixX = 0;
|
|
7918
|
-
this.mixY = 0;
|
|
7919
|
-
this.mixScaleX = 0;
|
|
7920
|
-
this.mixScaleY = 0;
|
|
7921
|
-
this.mixShearY = 0;
|
|
7922
|
-
/** An offset added to the constrained bone rotation. */
|
|
7923
|
-
this.offsetRotation = 0;
|
|
7924
|
-
/** An offset added to the constrained bone X translation. */
|
|
7925
|
-
this.offsetX = 0;
|
|
7926
|
-
/** An offset added to the constrained bone Y translation. */
|
|
7927
|
-
this.offsetY = 0;
|
|
7928
|
-
/** An offset added to the constrained bone scaleX. */
|
|
7929
|
-
this.offsetScaleX = 0;
|
|
7930
|
-
/** An offset added to the constrained bone scaleY. */
|
|
7931
|
-
this.offsetScaleY = 0;
|
|
7932
|
-
/** An offset added to the constrained bone shearY. */
|
|
7933
|
-
this.offsetShearY = 0;
|
|
7934
|
-
this.relative = false;
|
|
7935
|
-
this.local = false;
|
|
7936
|
-
}
|
|
7996
|
+
/** The bones that will be modified by this transform constraint. */
|
|
7997
|
+
bones = new Array();
|
|
7998
|
+
/** The target bone whose world transform will be copied to the constrained bones. */
|
|
7999
|
+
_target = null;
|
|
7937
8000
|
set target(boneData) {
|
|
7938
8001
|
this._target = boneData;
|
|
7939
8002
|
}
|
|
@@ -7943,17 +8006,41 @@ var spine = (() => {
|
|
|
7943
8006
|
else
|
|
7944
8007
|
return this._target;
|
|
7945
8008
|
}
|
|
8009
|
+
mixRotate = 0;
|
|
8010
|
+
mixX = 0;
|
|
8011
|
+
mixY = 0;
|
|
8012
|
+
mixScaleX = 0;
|
|
8013
|
+
mixScaleY = 0;
|
|
8014
|
+
mixShearY = 0;
|
|
8015
|
+
/** An offset added to the constrained bone rotation. */
|
|
8016
|
+
offsetRotation = 0;
|
|
8017
|
+
/** An offset added to the constrained bone X translation. */
|
|
8018
|
+
offsetX = 0;
|
|
8019
|
+
/** An offset added to the constrained bone Y translation. */
|
|
8020
|
+
offsetY = 0;
|
|
8021
|
+
/** An offset added to the constrained bone scaleX. */
|
|
8022
|
+
offsetScaleX = 0;
|
|
8023
|
+
/** An offset added to the constrained bone scaleY. */
|
|
8024
|
+
offsetScaleY = 0;
|
|
8025
|
+
/** An offset added to the constrained bone shearY. */
|
|
8026
|
+
offsetShearY = 0;
|
|
8027
|
+
relative = false;
|
|
8028
|
+
local = false;
|
|
8029
|
+
constructor(name) {
|
|
8030
|
+
super(name, 0, false);
|
|
8031
|
+
}
|
|
7946
8032
|
};
|
|
7947
8033
|
|
|
7948
8034
|
// spine-core/src/SkeletonBinary.ts
|
|
7949
8035
|
var SkeletonBinary = class {
|
|
8036
|
+
/** Scales bone positions, image sizes, and translations as they are loaded. This allows different size images to be used at
|
|
8037
|
+
* runtime than were used in Spine.
|
|
8038
|
+
*
|
|
8039
|
+
* See [Scaling](http://esotericsoftware.com/spine-loading-skeleton-data#Scaling) in the Spine Runtimes Guide. */
|
|
8040
|
+
scale = 1;
|
|
8041
|
+
attachmentLoader;
|
|
8042
|
+
linkedMeshes = new Array();
|
|
7950
8043
|
constructor(attachmentLoader) {
|
|
7951
|
-
/** Scales bone positions, image sizes, and translations as they are loaded. This allows different size images to be used at
|
|
7952
|
-
* runtime than were used in Spine.
|
|
7953
|
-
*
|
|
7954
|
-
* See [Scaling](http://esotericsoftware.com/spine-loading-skeleton-data#Scaling) in the Spine Runtimes Guide. */
|
|
7955
|
-
this.scale = 1;
|
|
7956
|
-
this.linkedMeshes = new Array();
|
|
7957
8044
|
this.attachmentLoader = attachmentLoader;
|
|
7958
8045
|
}
|
|
7959
8046
|
readSkeletonData(binary) {
|
|
@@ -8967,6 +9054,11 @@ var spine = (() => {
|
|
|
8967
9054
|
}
|
|
8968
9055
|
};
|
|
8969
9056
|
var LinkedMesh = class {
|
|
9057
|
+
parent;
|
|
9058
|
+
skin;
|
|
9059
|
+
slotIndex;
|
|
9060
|
+
mesh;
|
|
9061
|
+
inheritTimeline;
|
|
8970
9062
|
constructor(mesh, skin, slotIndex, parent, inheritDeform) {
|
|
8971
9063
|
this.mesh = mesh;
|
|
8972
9064
|
this.skin = skin;
|
|
@@ -9060,23 +9152,21 @@ var spine = (() => {
|
|
|
9060
9152
|
|
|
9061
9153
|
// spine-core/src/SkeletonBounds.ts
|
|
9062
9154
|
var SkeletonBounds = class {
|
|
9063
|
-
|
|
9064
|
-
|
|
9065
|
-
|
|
9066
|
-
|
|
9067
|
-
|
|
9068
|
-
|
|
9069
|
-
|
|
9070
|
-
|
|
9071
|
-
|
|
9072
|
-
|
|
9073
|
-
|
|
9074
|
-
|
|
9075
|
-
|
|
9076
|
-
|
|
9077
|
-
|
|
9078
|
-
});
|
|
9079
|
-
}
|
|
9155
|
+
/** The left edge of the axis aligned bounding box. */
|
|
9156
|
+
minX = 0;
|
|
9157
|
+
/** The bottom edge of the axis aligned bounding box. */
|
|
9158
|
+
minY = 0;
|
|
9159
|
+
/** The right edge of the axis aligned bounding box. */
|
|
9160
|
+
maxX = 0;
|
|
9161
|
+
/** The top edge of the axis aligned bounding box. */
|
|
9162
|
+
maxY = 0;
|
|
9163
|
+
/** The visible bounding boxes. */
|
|
9164
|
+
boundingBoxes = new Array();
|
|
9165
|
+
/** The world vertices for the bounding box polygons. */
|
|
9166
|
+
polygons = new Array();
|
|
9167
|
+
polygonPool = new Pool(() => {
|
|
9168
|
+
return Utils.newFloatArray(16);
|
|
9169
|
+
});
|
|
9080
9170
|
/** Clears any previous polygons, finds all visible bounding box attachments, and computes the world vertices for each bounding
|
|
9081
9171
|
* box's polygon.
|
|
9082
9172
|
* @param updateAabb If true, the axis aligned bounding box containing all the polygons is computed. If false, the
|
|
@@ -9247,19 +9337,17 @@ var spine = (() => {
|
|
|
9247
9337
|
|
|
9248
9338
|
// spine-core/src/Triangulator.ts
|
|
9249
9339
|
var Triangulator = class {
|
|
9250
|
-
|
|
9251
|
-
|
|
9252
|
-
|
|
9253
|
-
|
|
9254
|
-
|
|
9255
|
-
|
|
9256
|
-
|
|
9257
|
-
|
|
9258
|
-
|
|
9259
|
-
|
|
9260
|
-
|
|
9261
|
-
});
|
|
9262
|
-
}
|
|
9340
|
+
convexPolygons = new Array();
|
|
9341
|
+
convexPolygonsIndices = new Array();
|
|
9342
|
+
indicesArray = new Array();
|
|
9343
|
+
isConcaveArray = new Array();
|
|
9344
|
+
triangles = new Array();
|
|
9345
|
+
polygonPool = new Pool(() => {
|
|
9346
|
+
return new Array();
|
|
9347
|
+
});
|
|
9348
|
+
polygonIndicesPool = new Pool(() => {
|
|
9349
|
+
return new Array();
|
|
9350
|
+
});
|
|
9263
9351
|
triangulate(verticesArray) {
|
|
9264
9352
|
let vertices = verticesArray;
|
|
9265
9353
|
let vertexCount = verticesArray.length >> 1;
|
|
@@ -9463,16 +9551,14 @@ var spine = (() => {
|
|
|
9463
9551
|
|
|
9464
9552
|
// spine-core/src/SkeletonClipping.ts
|
|
9465
9553
|
var SkeletonClipping = class {
|
|
9466
|
-
|
|
9467
|
-
|
|
9468
|
-
|
|
9469
|
-
|
|
9470
|
-
|
|
9471
|
-
|
|
9472
|
-
|
|
9473
|
-
|
|
9474
|
-
this.clippingPolygons = null;
|
|
9475
|
-
}
|
|
9554
|
+
triangulator = new Triangulator();
|
|
9555
|
+
clippingPolygon = new Array();
|
|
9556
|
+
clipOutput = new Array();
|
|
9557
|
+
clippedVertices = new Array();
|
|
9558
|
+
clippedTriangles = new Array();
|
|
9559
|
+
scratch = new Array();
|
|
9560
|
+
clipAttachment = null;
|
|
9561
|
+
clippingPolygons = null;
|
|
9476
9562
|
clipStart(slot, clip) {
|
|
9477
9563
|
if (this.clipAttachment)
|
|
9478
9564
|
return 0;
|
|
@@ -9752,13 +9838,14 @@ var spine = (() => {
|
|
|
9752
9838
|
|
|
9753
9839
|
// spine-core/src/SkeletonJson.ts
|
|
9754
9840
|
var SkeletonJson = class {
|
|
9841
|
+
attachmentLoader;
|
|
9842
|
+
/** Scales bone positions, image sizes, and translations as they are loaded. This allows different size images to be used at
|
|
9843
|
+
* runtime than were used in Spine.
|
|
9844
|
+
*
|
|
9845
|
+
* See [Scaling](http://esotericsoftware.com/spine-loading-skeleton-data#Scaling) in the Spine Runtimes Guide. */
|
|
9846
|
+
scale = 1;
|
|
9847
|
+
linkedMeshes = new Array();
|
|
9755
9848
|
constructor(attachmentLoader) {
|
|
9756
|
-
/** Scales bone positions, image sizes, and translations as they are loaded. This allows different size images to be used at
|
|
9757
|
-
* runtime than were used in Spine.
|
|
9758
|
-
*
|
|
9759
|
-
* See [Scaling](http://esotericsoftware.com/spine-loading-skeleton-data#Scaling) in the Spine Runtimes Guide. */
|
|
9760
|
-
this.scale = 1;
|
|
9761
|
-
this.linkedMeshes = new Array();
|
|
9762
9849
|
this.attachmentLoader = attachmentLoader;
|
|
9763
9850
|
}
|
|
9764
9851
|
readSkeletonData(json) {
|
|
@@ -10620,6 +10707,11 @@ var spine = (() => {
|
|
|
10620
10707
|
}
|
|
10621
10708
|
};
|
|
10622
10709
|
var LinkedMesh2 = class {
|
|
10710
|
+
parent;
|
|
10711
|
+
skin;
|
|
10712
|
+
slotIndex;
|
|
10713
|
+
mesh;
|
|
10714
|
+
inheritTimeline;
|
|
10623
10715
|
constructor(mesh, skin, slotIndex, parent, inheritDeform) {
|
|
10624
10716
|
this.mesh = mesh;
|
|
10625
10717
|
this.skin = skin;
|