@esotericsoftware/spine-canvas 4.2.25 → 4.2.26
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/AssetManager.js +2 -2
- package/dist/SkeletonRenderer.js +8 -7
- package/dist/iife/spine-canvas.js +836 -743
- package/dist/iife/spine-canvas.js.map +2 -2
- package/dist/iife/spine-canvas.min.js +2 -2
- package/dist/index.d.ts +3 -3
- package/dist/index.js +4 -4
- package/package.json +3 -2
|
@@ -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-canvas/src/index.ts
|
|
22
27
|
var src_exports = {};
|
|
@@ -133,9 +138,7 @@ var spine = (() => {
|
|
|
133
138
|
|
|
134
139
|
// spine-core/src/Utils.ts
|
|
135
140
|
var IntSet = class {
|
|
136
|
-
|
|
137
|
-
this.array = new Array();
|
|
138
|
-
}
|
|
141
|
+
array = new Array();
|
|
139
142
|
add(value) {
|
|
140
143
|
let contains = this.contains(value);
|
|
141
144
|
this.array[value | 0] = value | 0;
|
|
@@ -152,10 +155,8 @@ var spine = (() => {
|
|
|
152
155
|
}
|
|
153
156
|
};
|
|
154
157
|
var StringSet = class {
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
this.size = 0;
|
|
158
|
-
}
|
|
158
|
+
entries = {};
|
|
159
|
+
size = 0;
|
|
159
160
|
add(value) {
|
|
160
161
|
let contains = this.entries[value];
|
|
161
162
|
this.entries[value] = true;
|
|
@@ -250,11 +251,11 @@ var spine = (() => {
|
|
|
250
251
|
}
|
|
251
252
|
};
|
|
252
253
|
var Color = _Color;
|
|
253
|
-
Color
|
|
254
|
-
Color
|
|
255
|
-
Color
|
|
256
|
-
Color
|
|
257
|
-
Color
|
|
254
|
+
__publicField(Color, "WHITE", new _Color(1, 1, 1, 1));
|
|
255
|
+
__publicField(Color, "RED", new _Color(1, 0, 0, 1));
|
|
256
|
+
__publicField(Color, "GREEN", new _Color(0, 1, 0, 1));
|
|
257
|
+
__publicField(Color, "BLUE", new _Color(0, 0, 1, 1));
|
|
258
|
+
__publicField(Color, "MAGENTA", new _Color(1, 0, 1, 1));
|
|
258
259
|
var _MathUtils = class {
|
|
259
260
|
static clamp(value, min, max) {
|
|
260
261
|
if (value < min)
|
|
@@ -294,21 +295,21 @@ var spine = (() => {
|
|
|
294
295
|
}
|
|
295
296
|
};
|
|
296
297
|
var MathUtils = _MathUtils;
|
|
297
|
-
MathUtils
|
|
298
|
-
MathUtils
|
|
299
|
-
MathUtils
|
|
300
|
-
MathUtils
|
|
301
|
-
MathUtils
|
|
302
|
-
MathUtils
|
|
298
|
+
__publicField(MathUtils, "PI", 3.1415927);
|
|
299
|
+
__publicField(MathUtils, "PI2", _MathUtils.PI * 2);
|
|
300
|
+
__publicField(MathUtils, "radiansToDegrees", 180 / _MathUtils.PI);
|
|
301
|
+
__publicField(MathUtils, "radDeg", _MathUtils.radiansToDegrees);
|
|
302
|
+
__publicField(MathUtils, "degreesToRadians", _MathUtils.PI / 180);
|
|
303
|
+
__publicField(MathUtils, "degRad", _MathUtils.degreesToRadians);
|
|
303
304
|
var Interpolation = class {
|
|
304
305
|
apply(start, end, a) {
|
|
305
306
|
return start + (end - start) * this.applyInternal(a);
|
|
306
307
|
}
|
|
307
308
|
};
|
|
308
309
|
var Pow = class extends Interpolation {
|
|
310
|
+
power = 2;
|
|
309
311
|
constructor(power) {
|
|
310
312
|
super();
|
|
311
|
-
this.power = 2;
|
|
312
313
|
this.power = power;
|
|
313
314
|
}
|
|
314
315
|
applyInternal(a) {
|
|
@@ -397,7 +398,7 @@ var spine = (() => {
|
|
|
397
398
|
}
|
|
398
399
|
};
|
|
399
400
|
var Utils = _Utils;
|
|
400
|
-
Utils
|
|
401
|
+
__publicField(Utils, "SUPPORTS_TYPED_ARRAYS", typeof Float32Array !== "undefined");
|
|
401
402
|
var DebugUtils = class {
|
|
402
403
|
static logBones(skeleton) {
|
|
403
404
|
for (let i = 0; i < skeleton.bones.length; i++) {
|
|
@@ -407,8 +408,9 @@ var spine = (() => {
|
|
|
407
408
|
}
|
|
408
409
|
};
|
|
409
410
|
var Pool = class {
|
|
411
|
+
items = new Array();
|
|
412
|
+
instantiator;
|
|
410
413
|
constructor(instantiator) {
|
|
411
|
-
this.items = new Array();
|
|
412
414
|
this.instantiator = instantiator;
|
|
413
415
|
}
|
|
414
416
|
obtain() {
|
|
@@ -452,15 +454,13 @@ var spine = (() => {
|
|
|
452
454
|
}
|
|
453
455
|
};
|
|
454
456
|
var TimeKeeper = class {
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
this.frameTime = 0;
|
|
463
|
-
}
|
|
457
|
+
maxDelta = 0.064;
|
|
458
|
+
framesPerSecond = 0;
|
|
459
|
+
delta = 0;
|
|
460
|
+
totalTime = 0;
|
|
461
|
+
lastTime = Date.now() / 1e3;
|
|
462
|
+
frameCount = 0;
|
|
463
|
+
frameTime = 0;
|
|
464
464
|
update() {
|
|
465
465
|
let now = Date.now() / 1e3;
|
|
466
466
|
this.delta = now - this.lastTime;
|
|
@@ -478,11 +478,12 @@ var spine = (() => {
|
|
|
478
478
|
}
|
|
479
479
|
};
|
|
480
480
|
var WindowedMean = class {
|
|
481
|
+
values;
|
|
482
|
+
addedValues = 0;
|
|
483
|
+
lastValue = 0;
|
|
484
|
+
mean = 0;
|
|
485
|
+
dirty = true;
|
|
481
486
|
constructor(windowSize = 32) {
|
|
482
|
-
this.addedValues = 0;
|
|
483
|
-
this.lastValue = 0;
|
|
484
|
-
this.mean = 0;
|
|
485
|
-
this.dirty = true;
|
|
486
487
|
this.values = new Array(windowSize);
|
|
487
488
|
}
|
|
488
489
|
hasEnoughData() {
|
|
@@ -513,6 +514,7 @@ var spine = (() => {
|
|
|
513
514
|
|
|
514
515
|
// spine-core/src/attachments/Attachment.ts
|
|
515
516
|
var Attachment = class {
|
|
517
|
+
name;
|
|
516
518
|
constructor(name) {
|
|
517
519
|
if (!name)
|
|
518
520
|
throw new Error("name cannot be null.");
|
|
@@ -520,24 +522,24 @@ var spine = (() => {
|
|
|
520
522
|
}
|
|
521
523
|
};
|
|
522
524
|
var _VertexAttachment = class extends Attachment {
|
|
525
|
+
/** The unique ID for this attachment. */
|
|
526
|
+
id = _VertexAttachment.nextID++;
|
|
527
|
+
/** The bones which affect the {@link #getVertices()}. The array entries are, for each vertex, the number of bones affecting
|
|
528
|
+
* the vertex followed by that many bone indices, which is the index of the bone in {@link Skeleton#bones}. Will be null
|
|
529
|
+
* if this attachment has no weights. */
|
|
530
|
+
bones = null;
|
|
531
|
+
/** The vertex positions in the bone's coordinate system. For a non-weighted attachment, the values are `x,y`
|
|
532
|
+
* entries for each vertex. For a weighted attachment, the values are `x,y,weight` entries for each bone affecting
|
|
533
|
+
* each vertex. */
|
|
534
|
+
vertices = [];
|
|
535
|
+
/** The maximum number of world vertex values that can be output by
|
|
536
|
+
* {@link #computeWorldVertices()} using the `count` parameter. */
|
|
537
|
+
worldVerticesLength = 0;
|
|
538
|
+
/** Timelines for the timeline attachment are also applied to this attachment.
|
|
539
|
+
* May be null if no attachment-specific timelines should be applied. */
|
|
540
|
+
timelineAttachment = this;
|
|
523
541
|
constructor(name) {
|
|
524
542
|
super(name);
|
|
525
|
-
/** The unique ID for this attachment. */
|
|
526
|
-
this.id = _VertexAttachment.nextID++;
|
|
527
|
-
/** The bones which affect the {@link #getVertices()}. The array entries are, for each vertex, the number of bones affecting
|
|
528
|
-
* the vertex followed by that many bone indices, which is the index of the bone in {@link Skeleton#bones}. Will be null
|
|
529
|
-
* if this attachment has no weights. */
|
|
530
|
-
this.bones = null;
|
|
531
|
-
/** The vertex positions in the bone's coordinate system. For a non-weighted attachment, the values are `x,y`
|
|
532
|
-
* entries for each vertex. For a weighted attachment, the values are `x,y,weight` entries for each bone affecting
|
|
533
|
-
* each vertex. */
|
|
534
|
-
this.vertices = [];
|
|
535
|
-
/** The maximum number of world vertex values that can be output by
|
|
536
|
-
* {@link #computeWorldVertices()} using the `count` parameter. */
|
|
537
|
-
this.worldVerticesLength = 0;
|
|
538
|
-
/** Timelines for the timeline attachment are also applied to this attachment.
|
|
539
|
-
* May be null if no attachment-specific timelines should be applied. */
|
|
540
|
-
this.timelineAttachment = this;
|
|
541
543
|
}
|
|
542
544
|
/** Transforms the attachment's local {@link #vertices} to world coordinates. If the slot's {@link Slot#deform} is
|
|
543
545
|
* not empty, it is used to deform the vertices.
|
|
@@ -624,16 +626,17 @@ var spine = (() => {
|
|
|
624
626
|
}
|
|
625
627
|
};
|
|
626
628
|
var VertexAttachment = _VertexAttachment;
|
|
627
|
-
VertexAttachment
|
|
629
|
+
__publicField(VertexAttachment, "nextID", 0);
|
|
628
630
|
|
|
629
631
|
// spine-core/src/attachments/Sequence.ts
|
|
630
632
|
var _Sequence = class {
|
|
633
|
+
id = _Sequence.nextID();
|
|
634
|
+
regions;
|
|
635
|
+
start = 0;
|
|
636
|
+
digits = 0;
|
|
637
|
+
/** The index of the region to show for the setup pose. */
|
|
638
|
+
setupIndex = 0;
|
|
631
639
|
constructor(count) {
|
|
632
|
-
this.id = _Sequence.nextID();
|
|
633
|
-
this.start = 0;
|
|
634
|
-
this.digits = 0;
|
|
635
|
-
/** The index of the region to show for the setup pose. */
|
|
636
|
-
this.setupIndex = 0;
|
|
637
640
|
this.regions = new Array(count);
|
|
638
641
|
}
|
|
639
642
|
copy() {
|
|
@@ -669,7 +672,7 @@ var spine = (() => {
|
|
|
669
672
|
}
|
|
670
673
|
};
|
|
671
674
|
var Sequence = _Sequence;
|
|
672
|
-
Sequence
|
|
675
|
+
__publicField(Sequence, "_nextID", 0);
|
|
673
676
|
var SequenceMode = /* @__PURE__ */ ((SequenceMode2) => {
|
|
674
677
|
SequenceMode2[SequenceMode2["hold"] = 0] = "hold";
|
|
675
678
|
SequenceMode2[SequenceMode2["once"] = 1] = "once";
|
|
@@ -692,9 +695,13 @@ var spine = (() => {
|
|
|
692
695
|
|
|
693
696
|
// spine-core/src/Animation.ts
|
|
694
697
|
var Animation = class {
|
|
698
|
+
/** The animation's name, which is unique across all animations in the skeleton. */
|
|
699
|
+
name;
|
|
700
|
+
timelines = [];
|
|
701
|
+
timelineIds = new StringSet();
|
|
702
|
+
/** The duration of the animation in seconds, which is the highest time of all keys in the timeline. */
|
|
703
|
+
duration;
|
|
695
704
|
constructor(name, timelines, duration) {
|
|
696
|
-
this.timelines = [];
|
|
697
|
-
this.timelineIds = new StringSet();
|
|
698
705
|
if (!name)
|
|
699
706
|
throw new Error("name cannot be null.");
|
|
700
707
|
this.name = name;
|
|
@@ -768,6 +775,8 @@ var spine = (() => {
|
|
|
768
775
|
sequence: 19
|
|
769
776
|
};
|
|
770
777
|
var Timeline = class {
|
|
778
|
+
propertyIds;
|
|
779
|
+
frames;
|
|
771
780
|
constructor(frameCount, propertyIds) {
|
|
772
781
|
this.propertyIds = propertyIds;
|
|
773
782
|
this.frames = Utils.newFloatArray(frameCount * this.getFrameEntries());
|
|
@@ -800,6 +809,7 @@ var spine = (() => {
|
|
|
800
809
|
}
|
|
801
810
|
};
|
|
802
811
|
var CurveTimeline = class extends Timeline {
|
|
812
|
+
curves;
|
|
803
813
|
// type, x, y, ...
|
|
804
814
|
constructor(frameCount, bezierCount, propertyIds) {
|
|
805
815
|
super(frameCount, propertyIds);
|
|
@@ -967,9 +977,9 @@ var spine = (() => {
|
|
|
967
977
|
}
|
|
968
978
|
};
|
|
969
979
|
var RotateTimeline = class extends CurveTimeline1 {
|
|
980
|
+
boneIndex = 0;
|
|
970
981
|
constructor(frameCount, bezierCount, boneIndex) {
|
|
971
982
|
super(frameCount, bezierCount, Property.rotate + "|" + boneIndex);
|
|
972
|
-
this.boneIndex = 0;
|
|
973
983
|
this.boneIndex = boneIndex;
|
|
974
984
|
}
|
|
975
985
|
apply(skeleton, lastTime, time, events, alpha, blend, direction) {
|
|
@@ -1001,6 +1011,7 @@ var spine = (() => {
|
|
|
1001
1011
|
}
|
|
1002
1012
|
};
|
|
1003
1013
|
var TranslateTimeline = class extends CurveTimeline2 {
|
|
1014
|
+
boneIndex = 0;
|
|
1004
1015
|
constructor(frameCount, bezierCount, boneIndex) {
|
|
1005
1016
|
super(
|
|
1006
1017
|
frameCount,
|
|
@@ -1008,7 +1019,6 @@ var spine = (() => {
|
|
|
1008
1019
|
Property.x + "|" + boneIndex,
|
|
1009
1020
|
Property.y + "|" + boneIndex
|
|
1010
1021
|
);
|
|
1011
|
-
this.boneIndex = 0;
|
|
1012
1022
|
this.boneIndex = boneIndex;
|
|
1013
1023
|
}
|
|
1014
1024
|
apply(skeleton, lastTime, time, events, alpha, blend, direction) {
|
|
@@ -1106,9 +1116,9 @@ var spine = (() => {
|
|
|
1106
1116
|
}
|
|
1107
1117
|
};
|
|
1108
1118
|
var TranslateXTimeline = class extends CurveTimeline1 {
|
|
1119
|
+
boneIndex = 0;
|
|
1109
1120
|
constructor(frameCount, bezierCount, boneIndex) {
|
|
1110
1121
|
super(frameCount, bezierCount, Property.x + "|" + boneIndex);
|
|
1111
|
-
this.boneIndex = 0;
|
|
1112
1122
|
this.boneIndex = boneIndex;
|
|
1113
1123
|
}
|
|
1114
1124
|
apply(skeleton, lastTime, time, events, alpha, blend, direction) {
|
|
@@ -1141,9 +1151,9 @@ var spine = (() => {
|
|
|
1141
1151
|
}
|
|
1142
1152
|
};
|
|
1143
1153
|
var TranslateYTimeline = class extends CurveTimeline1 {
|
|
1154
|
+
boneIndex = 0;
|
|
1144
1155
|
constructor(frameCount, bezierCount, boneIndex) {
|
|
1145
1156
|
super(frameCount, bezierCount, Property.y + "|" + boneIndex);
|
|
1146
|
-
this.boneIndex = 0;
|
|
1147
1157
|
this.boneIndex = boneIndex;
|
|
1148
1158
|
}
|
|
1149
1159
|
apply(skeleton, lastTime, time, events, alpha, blend, direction) {
|
|
@@ -1176,6 +1186,7 @@ var spine = (() => {
|
|
|
1176
1186
|
}
|
|
1177
1187
|
};
|
|
1178
1188
|
var ScaleTimeline = class extends CurveTimeline2 {
|
|
1189
|
+
boneIndex = 0;
|
|
1179
1190
|
constructor(frameCount, bezierCount, boneIndex) {
|
|
1180
1191
|
super(
|
|
1181
1192
|
frameCount,
|
|
@@ -1183,7 +1194,6 @@ var spine = (() => {
|
|
|
1183
1194
|
Property.scaleX + "|" + boneIndex,
|
|
1184
1195
|
Property.scaleY + "|" + boneIndex
|
|
1185
1196
|
);
|
|
1186
|
-
this.boneIndex = 0;
|
|
1187
1197
|
this.boneIndex = boneIndex;
|
|
1188
1198
|
}
|
|
1189
1199
|
apply(skeleton, lastTime, time, events, alpha, blend, direction) {
|
|
@@ -1319,9 +1329,9 @@ var spine = (() => {
|
|
|
1319
1329
|
}
|
|
1320
1330
|
};
|
|
1321
1331
|
var ScaleXTimeline = class extends CurveTimeline1 {
|
|
1332
|
+
boneIndex = 0;
|
|
1322
1333
|
constructor(frameCount, bezierCount, boneIndex) {
|
|
1323
1334
|
super(frameCount, bezierCount, Property.scaleX + "|" + boneIndex);
|
|
1324
|
-
this.boneIndex = 0;
|
|
1325
1335
|
this.boneIndex = boneIndex;
|
|
1326
1336
|
}
|
|
1327
1337
|
apply(skeleton, lastTime, time, events, alpha, blend, direction) {
|
|
@@ -1380,9 +1390,9 @@ var spine = (() => {
|
|
|
1380
1390
|
}
|
|
1381
1391
|
};
|
|
1382
1392
|
var ScaleYTimeline = class extends CurveTimeline1 {
|
|
1393
|
+
boneIndex = 0;
|
|
1383
1394
|
constructor(frameCount, bezierCount, boneIndex) {
|
|
1384
1395
|
super(frameCount, bezierCount, Property.scaleY + "|" + boneIndex);
|
|
1385
|
-
this.boneIndex = 0;
|
|
1386
1396
|
this.boneIndex = boneIndex;
|
|
1387
1397
|
}
|
|
1388
1398
|
apply(skeleton, lastTime, time, events, alpha, blend, direction) {
|
|
@@ -1441,6 +1451,7 @@ var spine = (() => {
|
|
|
1441
1451
|
}
|
|
1442
1452
|
};
|
|
1443
1453
|
var ShearTimeline = class extends CurveTimeline2 {
|
|
1454
|
+
boneIndex = 0;
|
|
1444
1455
|
constructor(frameCount, bezierCount, boneIndex) {
|
|
1445
1456
|
super(
|
|
1446
1457
|
frameCount,
|
|
@@ -1448,7 +1459,6 @@ var spine = (() => {
|
|
|
1448
1459
|
Property.shearX + "|" + boneIndex,
|
|
1449
1460
|
Property.shearY + "|" + boneIndex
|
|
1450
1461
|
);
|
|
1451
|
-
this.boneIndex = 0;
|
|
1452
1462
|
this.boneIndex = boneIndex;
|
|
1453
1463
|
}
|
|
1454
1464
|
apply(skeleton, lastTime, time, events, alpha, blend, direction) {
|
|
@@ -1546,9 +1556,9 @@ var spine = (() => {
|
|
|
1546
1556
|
}
|
|
1547
1557
|
};
|
|
1548
1558
|
var ShearXTimeline = class extends CurveTimeline1 {
|
|
1559
|
+
boneIndex = 0;
|
|
1549
1560
|
constructor(frameCount, bezierCount, boneIndex) {
|
|
1550
1561
|
super(frameCount, bezierCount, Property.shearX + "|" + boneIndex);
|
|
1551
|
-
this.boneIndex = 0;
|
|
1552
1562
|
this.boneIndex = boneIndex;
|
|
1553
1563
|
}
|
|
1554
1564
|
apply(skeleton, lastTime, time, events, alpha, blend, direction) {
|
|
@@ -1581,9 +1591,9 @@ var spine = (() => {
|
|
|
1581
1591
|
}
|
|
1582
1592
|
};
|
|
1583
1593
|
var ShearYTimeline = class extends CurveTimeline1 {
|
|
1594
|
+
boneIndex = 0;
|
|
1584
1595
|
constructor(frameCount, bezierCount, boneIndex) {
|
|
1585
1596
|
super(frameCount, bezierCount, Property.shearY + "|" + boneIndex);
|
|
1586
|
-
this.boneIndex = 0;
|
|
1587
1597
|
this.boneIndex = boneIndex;
|
|
1588
1598
|
}
|
|
1589
1599
|
apply(skeleton, lastTime, time, events, alpha, blend, direction) {
|
|
@@ -1616,12 +1626,12 @@ var spine = (() => {
|
|
|
1616
1626
|
}
|
|
1617
1627
|
};
|
|
1618
1628
|
var RGBATimeline = class extends CurveTimeline {
|
|
1629
|
+
slotIndex = 0;
|
|
1619
1630
|
constructor(frameCount, bezierCount, slotIndex) {
|
|
1620
1631
|
super(frameCount, bezierCount, [
|
|
1621
1632
|
Property.rgb + "|" + slotIndex,
|
|
1622
1633
|
Property.alpha + "|" + slotIndex
|
|
1623
1634
|
]);
|
|
1624
|
-
this.slotIndex = 0;
|
|
1625
1635
|
this.slotIndex = slotIndex;
|
|
1626
1636
|
}
|
|
1627
1637
|
getFrameEntries() {
|
|
@@ -1779,11 +1789,11 @@ var spine = (() => {
|
|
|
1779
1789
|
}
|
|
1780
1790
|
};
|
|
1781
1791
|
var RGBTimeline = class extends CurveTimeline {
|
|
1792
|
+
slotIndex = 0;
|
|
1782
1793
|
constructor(frameCount, bezierCount, slotIndex) {
|
|
1783
1794
|
super(frameCount, bezierCount, [
|
|
1784
1795
|
Property.rgb + "|" + slotIndex
|
|
1785
1796
|
]);
|
|
1786
|
-
this.slotIndex = 0;
|
|
1787
1797
|
this.slotIndex = slotIndex;
|
|
1788
1798
|
}
|
|
1789
1799
|
getFrameEntries() {
|
|
@@ -1922,9 +1932,9 @@ var spine = (() => {
|
|
|
1922
1932
|
}
|
|
1923
1933
|
};
|
|
1924
1934
|
var AlphaTimeline = class extends CurveTimeline1 {
|
|
1935
|
+
slotIndex = 0;
|
|
1925
1936
|
constructor(frameCount, bezierCount, slotIndex) {
|
|
1926
1937
|
super(frameCount, bezierCount, Property.alpha + "|" + slotIndex);
|
|
1927
|
-
this.slotIndex = 0;
|
|
1928
1938
|
this.slotIndex = slotIndex;
|
|
1929
1939
|
}
|
|
1930
1940
|
apply(skeleton, lastTime, time, events, alpha, blend, direction) {
|
|
@@ -1954,13 +1964,13 @@ var spine = (() => {
|
|
|
1954
1964
|
}
|
|
1955
1965
|
};
|
|
1956
1966
|
var RGBA2Timeline = class extends CurveTimeline {
|
|
1967
|
+
slotIndex = 0;
|
|
1957
1968
|
constructor(frameCount, bezierCount, slotIndex) {
|
|
1958
1969
|
super(frameCount, bezierCount, [
|
|
1959
1970
|
Property.rgb + "|" + slotIndex,
|
|
1960
1971
|
Property.alpha + "|" + slotIndex,
|
|
1961
1972
|
Property.rgb2 + "|" + slotIndex
|
|
1962
1973
|
]);
|
|
1963
|
-
this.slotIndex = 0;
|
|
1964
1974
|
this.slotIndex = slotIndex;
|
|
1965
1975
|
}
|
|
1966
1976
|
getFrameEntries() {
|
|
@@ -2201,12 +2211,12 @@ var spine = (() => {
|
|
|
2201
2211
|
}
|
|
2202
2212
|
};
|
|
2203
2213
|
var RGB2Timeline = class extends CurveTimeline {
|
|
2214
|
+
slotIndex = 0;
|
|
2204
2215
|
constructor(frameCount, bezierCount, slotIndex) {
|
|
2205
2216
|
super(frameCount, bezierCount, [
|
|
2206
2217
|
Property.rgb + "|" + slotIndex,
|
|
2207
2218
|
Property.rgb2 + "|" + slotIndex
|
|
2208
2219
|
]);
|
|
2209
|
-
this.slotIndex = 0;
|
|
2210
2220
|
this.slotIndex = slotIndex;
|
|
2211
2221
|
}
|
|
2212
2222
|
getFrameEntries() {
|
|
@@ -2432,11 +2442,13 @@ var spine = (() => {
|
|
|
2432
2442
|
}
|
|
2433
2443
|
};
|
|
2434
2444
|
var AttachmentTimeline = class extends Timeline {
|
|
2445
|
+
slotIndex = 0;
|
|
2446
|
+
/** The attachment name for each key frame. May contain null values to clear the attachment. */
|
|
2447
|
+
attachmentNames;
|
|
2435
2448
|
constructor(frameCount, slotIndex) {
|
|
2436
2449
|
super(frameCount, [
|
|
2437
2450
|
Property.attachment + "|" + slotIndex
|
|
2438
2451
|
]);
|
|
2439
|
-
this.slotIndex = 0;
|
|
2440
2452
|
this.slotIndex = slotIndex;
|
|
2441
2453
|
this.attachmentNames = new Array(frameCount);
|
|
2442
2454
|
}
|
|
@@ -2469,11 +2481,15 @@ var spine = (() => {
|
|
|
2469
2481
|
}
|
|
2470
2482
|
};
|
|
2471
2483
|
var DeformTimeline = class extends CurveTimeline {
|
|
2484
|
+
slotIndex = 0;
|
|
2485
|
+
/** The attachment that will be deformed. */
|
|
2486
|
+
attachment;
|
|
2487
|
+
/** The vertices for each key frame. */
|
|
2488
|
+
vertices;
|
|
2472
2489
|
constructor(frameCount, bezierCount, slotIndex, attachment) {
|
|
2473
2490
|
super(frameCount, bezierCount, [
|
|
2474
2491
|
Property.deform + "|" + slotIndex + "|" + attachment.id
|
|
2475
2492
|
]);
|
|
2476
|
-
this.slotIndex = 0;
|
|
2477
2493
|
this.slotIndex = slotIndex;
|
|
2478
2494
|
this.attachment = attachment;
|
|
2479
2495
|
this.vertices = new Array(frameCount);
|
|
@@ -2694,6 +2710,8 @@ var spine = (() => {
|
|
|
2694
2710
|
}
|
|
2695
2711
|
};
|
|
2696
2712
|
var _EventTimeline = class extends Timeline {
|
|
2713
|
+
/** The event for each key frame. */
|
|
2714
|
+
events;
|
|
2697
2715
|
constructor(frameCount) {
|
|
2698
2716
|
super(frameCount, _EventTimeline.propertyIds);
|
|
2699
2717
|
this.events = new Array(frameCount);
|
|
@@ -2736,8 +2754,10 @@ var spine = (() => {
|
|
|
2736
2754
|
}
|
|
2737
2755
|
};
|
|
2738
2756
|
var EventTimeline = _EventTimeline;
|
|
2739
|
-
EventTimeline
|
|
2757
|
+
__publicField(EventTimeline, "propertyIds", ["" + Property.event]);
|
|
2740
2758
|
var _DrawOrderTimeline = class extends Timeline {
|
|
2759
|
+
/** The draw order for each key frame. See {@link #setFrame(int, float, int[])}. */
|
|
2760
|
+
drawOrders;
|
|
2741
2761
|
constructor(frameCount) {
|
|
2742
2762
|
super(frameCount, _DrawOrderTimeline.propertyIds);
|
|
2743
2763
|
this.drawOrders = new Array(frameCount);
|
|
@@ -2776,14 +2796,14 @@ var spine = (() => {
|
|
|
2776
2796
|
}
|
|
2777
2797
|
};
|
|
2778
2798
|
var DrawOrderTimeline = _DrawOrderTimeline;
|
|
2779
|
-
DrawOrderTimeline
|
|
2799
|
+
__publicField(DrawOrderTimeline, "propertyIds", ["" + Property.drawOrder]);
|
|
2780
2800
|
var IkConstraintTimeline = class extends CurveTimeline {
|
|
2801
|
+
/** The index of the IK constraint slot in {@link Skeleton#ikConstraints} that will be changed. */
|
|
2802
|
+
ikConstraintIndex = 0;
|
|
2781
2803
|
constructor(frameCount, bezierCount, ikConstraintIndex) {
|
|
2782
2804
|
super(frameCount, bezierCount, [
|
|
2783
2805
|
Property.ikConstraint + "|" + ikConstraintIndex
|
|
2784
2806
|
]);
|
|
2785
|
-
/** The index of the IK constraint slot in {@link Skeleton#ikConstraints} that will be changed. */
|
|
2786
|
-
this.ikConstraintIndex = 0;
|
|
2787
2807
|
this.ikConstraintIndex = ikConstraintIndex;
|
|
2788
2808
|
}
|
|
2789
2809
|
getFrameEntries() {
|
|
@@ -2940,12 +2960,12 @@ var spine = (() => {
|
|
|
2940
2960
|
}
|
|
2941
2961
|
};
|
|
2942
2962
|
var TransformConstraintTimeline = class extends CurveTimeline {
|
|
2963
|
+
/** The index of the transform constraint slot in {@link Skeleton#transformConstraints} that will be changed. */
|
|
2964
|
+
transformConstraintIndex = 0;
|
|
2943
2965
|
constructor(frameCount, bezierCount, transformConstraintIndex) {
|
|
2944
2966
|
super(frameCount, bezierCount, [
|
|
2945
2967
|
Property.transformConstraint + "|" + transformConstraintIndex
|
|
2946
2968
|
]);
|
|
2947
|
-
/** The index of the transform constraint slot in {@link Skeleton#transformConstraints} that will be changed. */
|
|
2948
|
-
this.transformConstraintIndex = 0;
|
|
2949
2969
|
this.transformConstraintIndex = transformConstraintIndex;
|
|
2950
2970
|
}
|
|
2951
2971
|
getFrameEntries() {
|
|
@@ -3163,10 +3183,10 @@ var spine = (() => {
|
|
|
3163
3183
|
}
|
|
3164
3184
|
};
|
|
3165
3185
|
var PathConstraintPositionTimeline = class extends CurveTimeline1 {
|
|
3186
|
+
/** The index of the path constraint slot in {@link Skeleton#pathConstraints} that will be changed. */
|
|
3187
|
+
pathConstraintIndex = 0;
|
|
3166
3188
|
constructor(frameCount, bezierCount, pathConstraintIndex) {
|
|
3167
3189
|
super(frameCount, bezierCount, Property.pathConstraintPosition + "|" + pathConstraintIndex);
|
|
3168
|
-
/** The index of the path constraint slot in {@link Skeleton#pathConstraints} that will be changed. */
|
|
3169
|
-
this.pathConstraintIndex = 0;
|
|
3170
3190
|
this.pathConstraintIndex = pathConstraintIndex;
|
|
3171
3191
|
}
|
|
3172
3192
|
apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {
|
|
@@ -3192,10 +3212,10 @@ var spine = (() => {
|
|
|
3192
3212
|
}
|
|
3193
3213
|
};
|
|
3194
3214
|
var PathConstraintSpacingTimeline = class extends CurveTimeline1 {
|
|
3215
|
+
/** The index of the path constraint slot in {@link Skeleton#getPathConstraints()} that will be changed. */
|
|
3216
|
+
pathConstraintIndex = 0;
|
|
3195
3217
|
constructor(frameCount, bezierCount, pathConstraintIndex) {
|
|
3196
3218
|
super(frameCount, bezierCount, Property.pathConstraintSpacing + "|" + pathConstraintIndex);
|
|
3197
|
-
/** The index of the path constraint slot in {@link Skeleton#getPathConstraints()} that will be changed. */
|
|
3198
|
-
this.pathConstraintIndex = 0;
|
|
3199
3219
|
this.pathConstraintIndex = pathConstraintIndex;
|
|
3200
3220
|
}
|
|
3201
3221
|
apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {
|
|
@@ -3221,12 +3241,12 @@ var spine = (() => {
|
|
|
3221
3241
|
}
|
|
3222
3242
|
};
|
|
3223
3243
|
var PathConstraintMixTimeline = class extends CurveTimeline {
|
|
3244
|
+
/** The index of the path constraint slot in {@link Skeleton#getPathConstraints()} that will be changed. */
|
|
3245
|
+
pathConstraintIndex = 0;
|
|
3224
3246
|
constructor(frameCount, bezierCount, pathConstraintIndex) {
|
|
3225
3247
|
super(frameCount, bezierCount, [
|
|
3226
3248
|
Property.pathConstraintMix + "|" + pathConstraintIndex
|
|
3227
3249
|
]);
|
|
3228
|
-
/** The index of the path constraint slot in {@link Skeleton#getPathConstraints()} that will be changed. */
|
|
3229
|
-
this.pathConstraintIndex = 0;
|
|
3230
3250
|
this.pathConstraintIndex = pathConstraintIndex;
|
|
3231
3251
|
}
|
|
3232
3252
|
getFrameEntries() {
|
|
@@ -3358,6 +3378,8 @@ var spine = (() => {
|
|
|
3358
3378
|
}
|
|
3359
3379
|
};
|
|
3360
3380
|
var _SequenceTimeline = class extends Timeline {
|
|
3381
|
+
slotIndex;
|
|
3382
|
+
attachment;
|
|
3361
3383
|
constructor(frameCount, slotIndex, attachment) {
|
|
3362
3384
|
super(frameCount, [
|
|
3363
3385
|
Property.sequence + "|" + slotIndex + "|" + attachment.sequence.id
|
|
@@ -3442,32 +3464,34 @@ var spine = (() => {
|
|
|
3442
3464
|
}
|
|
3443
3465
|
};
|
|
3444
3466
|
var SequenceTimeline = _SequenceTimeline;
|
|
3445
|
-
SequenceTimeline
|
|
3446
|
-
SequenceTimeline
|
|
3447
|
-
SequenceTimeline
|
|
3467
|
+
__publicField(SequenceTimeline, "ENTRIES", 3);
|
|
3468
|
+
__publicField(SequenceTimeline, "MODE", 1);
|
|
3469
|
+
__publicField(SequenceTimeline, "DELAY", 2);
|
|
3448
3470
|
|
|
3449
3471
|
// spine-core/src/AnimationState.ts
|
|
3450
3472
|
var _AnimationState = class {
|
|
3451
|
-
constructor(data) {
|
|
3452
|
-
/** The list of tracks that currently have animations, which may contain null entries. */
|
|
3453
|
-
this.tracks = new Array();
|
|
3454
|
-
/** Multiplier for the delta time when the animation state is updated, causing time for all animations and mixes to play slower
|
|
3455
|
-
* or faster. Defaults to 1.
|
|
3456
|
-
*
|
|
3457
|
-
* See TrackEntry {@link TrackEntry#timeScale} for affecting a single animation. */
|
|
3458
|
-
this.timeScale = 1;
|
|
3459
|
-
this.unkeyedState = 0;
|
|
3460
|
-
this.events = new Array();
|
|
3461
|
-
this.listeners = new Array();
|
|
3462
|
-
this.queue = new EventQueue(this);
|
|
3463
|
-
this.propertyIDs = new StringSet();
|
|
3464
|
-
this.animationsChanged = false;
|
|
3465
|
-
this.trackEntryPool = new Pool(() => new TrackEntry());
|
|
3466
|
-
this.data = data;
|
|
3467
|
-
}
|
|
3468
3473
|
static emptyAnimation() {
|
|
3469
3474
|
return _AnimationState._emptyAnimation;
|
|
3470
3475
|
}
|
|
3476
|
+
/** The AnimationStateData to look up mix durations. */
|
|
3477
|
+
data;
|
|
3478
|
+
/** The list of tracks that currently have animations, which may contain null entries. */
|
|
3479
|
+
tracks = new Array();
|
|
3480
|
+
/** Multiplier for the delta time when the animation state is updated, causing time for all animations and mixes to play slower
|
|
3481
|
+
* or faster. Defaults to 1.
|
|
3482
|
+
*
|
|
3483
|
+
* See TrackEntry {@link TrackEntry#timeScale} for affecting a single animation. */
|
|
3484
|
+
timeScale = 1;
|
|
3485
|
+
unkeyedState = 0;
|
|
3486
|
+
events = new Array();
|
|
3487
|
+
listeners = new Array();
|
|
3488
|
+
queue = new EventQueue(this);
|
|
3489
|
+
propertyIDs = new StringSet();
|
|
3490
|
+
animationsChanged = false;
|
|
3491
|
+
trackEntryPool = new Pool(() => new TrackEntry());
|
|
3492
|
+
constructor(data) {
|
|
3493
|
+
this.data = data;
|
|
3494
|
+
}
|
|
3471
3495
|
/** Increments each track entry {@link TrackEntry#trackTime()}, setting queued animations as current if needed. */
|
|
3472
3496
|
update(delta) {
|
|
3473
3497
|
delta *= this.timeScale;
|
|
@@ -4119,141 +4143,139 @@ var spine = (() => {
|
|
|
4119
4143
|
}
|
|
4120
4144
|
};
|
|
4121
4145
|
var AnimationState = _AnimationState;
|
|
4122
|
-
AnimationState
|
|
4146
|
+
__publicField(AnimationState, "_emptyAnimation", new Animation("<empty>", [], 0));
|
|
4123
4147
|
var TrackEntry = class {
|
|
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
|
-
|
|
4248
|
-
|
|
4249
|
-
|
|
4250
|
-
|
|
4251
|
-
|
|
4252
|
-
|
|
4253
|
-
|
|
4254
|
-
|
|
4255
|
-
this.timelinesRotation = new Array();
|
|
4256
|
-
}
|
|
4148
|
+
/** The animation to apply for this track entry. */
|
|
4149
|
+
animation = null;
|
|
4150
|
+
previous = null;
|
|
4151
|
+
/** The animation queued to start after this animation, or null. `next` makes up a linked list. */
|
|
4152
|
+
next = null;
|
|
4153
|
+
/** The track entry for the previous animation when mixing from the previous animation to this animation, or null if no
|
|
4154
|
+
* mixing is currently occuring. When mixing from multiple animations, `mixingFrom` makes up a linked list. */
|
|
4155
|
+
mixingFrom = null;
|
|
4156
|
+
/** The track entry for the next animation when mixing from this animation to the next animation, or null if no mixing is
|
|
4157
|
+
* currently occuring. When mixing to multiple animations, `mixingTo` makes up a linked list. */
|
|
4158
|
+
mixingTo = null;
|
|
4159
|
+
/** The listener for events generated by this track entry, or null.
|
|
4160
|
+
*
|
|
4161
|
+
* A track entry returned from {@link AnimationState#setAnimation()} is already the current animation
|
|
4162
|
+
* for the track, so the track entry listener {@link AnimationStateListener#start()} will not be called. */
|
|
4163
|
+
listener = null;
|
|
4164
|
+
/** The index of the track where this track entry is either current or queued.
|
|
4165
|
+
*
|
|
4166
|
+
* See {@link AnimationState#getCurrent()}. */
|
|
4167
|
+
trackIndex = 0;
|
|
4168
|
+
/** If true, the animation will repeat. If false it will not, instead its last frame is applied if played beyond its
|
|
4169
|
+
* duration. */
|
|
4170
|
+
loop = false;
|
|
4171
|
+
/** If true, when mixing from the previous animation to this animation, the previous animation is applied as normal instead
|
|
4172
|
+
* of being mixed out.
|
|
4173
|
+
*
|
|
4174
|
+
* When mixing between animations that key the same property, if a lower track also keys that property then the value will
|
|
4175
|
+
* briefly dip toward the lower track value during the mix. This happens because the first animation mixes from 100% to 0%
|
|
4176
|
+
* while the second animation mixes from 0% to 100%. Setting `holdPrevious` to true applies the first animation
|
|
4177
|
+
* at 100% during the mix so the lower track value is overwritten. Such dipping does not occur on the lowest track which
|
|
4178
|
+
* keys the property, only when a higher track also keys the property.
|
|
4179
|
+
*
|
|
4180
|
+
* Snapping will occur if `holdPrevious` is true and this animation does not key all the same properties as the
|
|
4181
|
+
* previous animation. */
|
|
4182
|
+
holdPrevious = false;
|
|
4183
|
+
reverse = false;
|
|
4184
|
+
shortestRotation = false;
|
|
4185
|
+
/** When the mix percentage ({@link #mixTime} / {@link #mixDuration}) is less than the
|
|
4186
|
+
* `eventThreshold`, event timelines are applied while this animation is being mixed out. Defaults to 0, so event
|
|
4187
|
+
* timelines are not applied while this animation is being mixed out. */
|
|
4188
|
+
eventThreshold = 0;
|
|
4189
|
+
/** When the mix percentage ({@link #mixtime} / {@link #mixDuration}) is less than the
|
|
4190
|
+
* `attachmentThreshold`, attachment timelines are applied while this animation is being mixed out. Defaults to
|
|
4191
|
+
* 0, so attachment timelines are not applied while this animation is being mixed out. */
|
|
4192
|
+
attachmentThreshold = 0;
|
|
4193
|
+
/** When the mix percentage ({@link #mixTime} / {@link #mixDuration}) is less than the
|
|
4194
|
+
* `drawOrderThreshold`, draw order timelines are applied while this animation is being mixed out. Defaults to 0,
|
|
4195
|
+
* so draw order timelines are not applied while this animation is being mixed out. */
|
|
4196
|
+
drawOrderThreshold = 0;
|
|
4197
|
+
/** Seconds when this animation starts, both initially and after looping. Defaults to 0.
|
|
4198
|
+
*
|
|
4199
|
+
* When changing the `animationStart` time, it often makes sense to set {@link #animationLast} to the same
|
|
4200
|
+
* value to prevent timeline keys before the start time from triggering. */
|
|
4201
|
+
animationStart = 0;
|
|
4202
|
+
/** Seconds for the last frame of this animation. Non-looping animations won't play past this time. Looping animations will
|
|
4203
|
+
* loop back to {@link #animationStart} at this time. Defaults to the animation {@link Animation#duration}. */
|
|
4204
|
+
animationEnd = 0;
|
|
4205
|
+
/** The time in seconds this animation was last applied. Some timelines use this for one-time triggers. Eg, when this
|
|
4206
|
+
* animation is applied, event timelines will fire all events between the `animationLast` time (exclusive) and
|
|
4207
|
+
* `animationTime` (inclusive). Defaults to -1 to ensure triggers on frame 0 happen the first time this animation
|
|
4208
|
+
* is applied. */
|
|
4209
|
+
animationLast = 0;
|
|
4210
|
+
nextAnimationLast = 0;
|
|
4211
|
+
/** Seconds to postpone playing the animation. When this track entry is the current track entry, `delay`
|
|
4212
|
+
* postpones incrementing the {@link #trackTime}. When this track entry is queued, `delay` is the time from
|
|
4213
|
+
* the start of the previous animation to when this track entry will become the current track entry (ie when the previous
|
|
4214
|
+
* track entry {@link TrackEntry#trackTime} >= this track entry's `delay`).
|
|
4215
|
+
*
|
|
4216
|
+
* {@link #timeScale} affects the delay. */
|
|
4217
|
+
delay = 0;
|
|
4218
|
+
/** Current time in seconds this track entry has been the current track entry. The track time determines
|
|
4219
|
+
* {@link #animationTime}. The track time can be set to start the animation at a time other than 0, without affecting
|
|
4220
|
+
* looping. */
|
|
4221
|
+
trackTime = 0;
|
|
4222
|
+
trackLast = 0;
|
|
4223
|
+
nextTrackLast = 0;
|
|
4224
|
+
/** The track time in seconds when this animation will be removed from the track. Defaults to the highest possible float
|
|
4225
|
+
* value, meaning the animation will be applied until a new animation is set or the track is cleared. If the track end time
|
|
4226
|
+
* is reached, no other animations are queued for playback, and mixing from any previous animations is complete, then the
|
|
4227
|
+
* properties keyed by the animation are set to the setup pose and the track is cleared.
|
|
4228
|
+
*
|
|
4229
|
+
* It may be desired to use {@link AnimationState#addEmptyAnimation()} rather than have the animation
|
|
4230
|
+
* abruptly cease being applied. */
|
|
4231
|
+
trackEnd = 0;
|
|
4232
|
+
/** Multiplier for the delta time when this track entry is updated, causing time for this animation to pass slower or
|
|
4233
|
+
* faster. Defaults to 1.
|
|
4234
|
+
*
|
|
4235
|
+
* {@link #mixTime} is not affected by track entry time scale, so {@link #mixDuration} may need to be adjusted to
|
|
4236
|
+
* match the animation speed.
|
|
4237
|
+
*
|
|
4238
|
+
* When using {@link AnimationState#addAnimation()} with a `delay` <= 0, note the
|
|
4239
|
+
* {@link #delay} is set using the mix duration from the {@link AnimationStateData}, assuming time scale to be 1. If
|
|
4240
|
+
* the time scale is not 1, the delay may need to be adjusted.
|
|
4241
|
+
*
|
|
4242
|
+
* See AnimationState {@link AnimationState#timeScale} for affecting all animations. */
|
|
4243
|
+
timeScale = 0;
|
|
4244
|
+
/** Values < 1 mix this animation with the skeleton's current pose (usually the pose resulting from lower tracks). Defaults
|
|
4245
|
+
* to 1, which overwrites the skeleton's current pose with this animation.
|
|
4246
|
+
*
|
|
4247
|
+
* Typically track 0 is used to completely pose the skeleton, then alpha is used on higher tracks. It doesn't make sense to
|
|
4248
|
+
* use alpha on track 0 if the skeleton pose is from the last frame render. */
|
|
4249
|
+
alpha = 0;
|
|
4250
|
+
/** Seconds from 0 to the {@link #getMixDuration()} when mixing from the previous animation to this animation. May be
|
|
4251
|
+
* slightly more than `mixDuration` when the mix is complete. */
|
|
4252
|
+
mixTime = 0;
|
|
4253
|
+
/** Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData
|
|
4254
|
+
* {@link AnimationStateData#getMix()} based on the animation before this animation (if any).
|
|
4255
|
+
*
|
|
4256
|
+
* A mix duration of 0 still mixes out over one frame to provide the track entry being mixed out a chance to revert the
|
|
4257
|
+
* properties it was animating.
|
|
4258
|
+
*
|
|
4259
|
+
* The `mixDuration` can be set manually rather than use the value from
|
|
4260
|
+
* {@link AnimationStateData#getMix()}. In that case, the `mixDuration` can be set for a new
|
|
4261
|
+
* track entry only before {@link AnimationState#update(float)} is first called.
|
|
4262
|
+
*
|
|
4263
|
+
* When using {@link AnimationState#addAnimation()} with a `delay` <= 0, note the
|
|
4264
|
+
* {@link #delay} is set using the mix duration from the {@link AnimationStateData}, not a mix duration set
|
|
4265
|
+
* afterward. */
|
|
4266
|
+
mixDuration = 0;
|
|
4267
|
+
interruptAlpha = 0;
|
|
4268
|
+
totalAlpha = 0;
|
|
4269
|
+
/** Controls how properties keyed in the animation are mixed with lower tracks. Defaults to {@link MixBlend#replace}, which
|
|
4270
|
+
* replaces the values from the lower tracks with the animation values. {@link MixBlend#add} adds the animation values to
|
|
4271
|
+
* the values from the lower tracks.
|
|
4272
|
+
*
|
|
4273
|
+
* The `mixBlend` can be set for a new track entry only before {@link AnimationState#apply()} is first
|
|
4274
|
+
* called. */
|
|
4275
|
+
mixBlend = 2 /* replace */;
|
|
4276
|
+
timelineMode = new Array();
|
|
4277
|
+
timelineHoldMix = new Array();
|
|
4278
|
+
timelinesRotation = new Array();
|
|
4257
4279
|
reset() {
|
|
4258
4280
|
this.next = null;
|
|
4259
4281
|
this.previous = null;
|
|
@@ -4309,9 +4331,10 @@ var spine = (() => {
|
|
|
4309
4331
|
}
|
|
4310
4332
|
};
|
|
4311
4333
|
var EventQueue = class {
|
|
4334
|
+
objects = [];
|
|
4335
|
+
drainDisabled = false;
|
|
4336
|
+
animState;
|
|
4312
4337
|
constructor(animState) {
|
|
4313
|
-
this.objects = [];
|
|
4314
|
-
this.drainDisabled = false;
|
|
4315
4338
|
this.animState = animState;
|
|
4316
4339
|
}
|
|
4317
4340
|
start(entry) {
|
|
@@ -4448,10 +4471,12 @@ var spine = (() => {
|
|
|
4448
4471
|
|
|
4449
4472
|
// spine-core/src/AnimationStateData.ts
|
|
4450
4473
|
var AnimationStateData = class {
|
|
4474
|
+
/** The SkeletonData to look up animations when they are specified by name. */
|
|
4475
|
+
skeletonData;
|
|
4476
|
+
animationToMixTime = {};
|
|
4477
|
+
/** The mix duration to use when no mix duration has been defined between two animations. */
|
|
4478
|
+
defaultMix = 0;
|
|
4451
4479
|
constructor(skeletonData) {
|
|
4452
|
-
this.animationToMixTime = {};
|
|
4453
|
-
/** The mix duration to use when no mix duration has been defined between two animations. */
|
|
4454
|
-
this.defaultMix = 0;
|
|
4455
4480
|
if (!skeletonData)
|
|
4456
4481
|
throw new Error("skeletonData cannot be null.");
|
|
4457
4482
|
this.skeletonData = skeletonData;
|
|
@@ -4490,9 +4515,9 @@ var spine = (() => {
|
|
|
4490
4515
|
|
|
4491
4516
|
// spine-core/src/attachments/BoundingBoxAttachment.ts
|
|
4492
4517
|
var BoundingBoxAttachment = class extends VertexAttachment {
|
|
4518
|
+
color = new Color(1, 1, 1, 1);
|
|
4493
4519
|
constructor(name) {
|
|
4494
4520
|
super(name);
|
|
4495
|
-
this.color = new Color(1, 1, 1, 1);
|
|
4496
4521
|
}
|
|
4497
4522
|
copy() {
|
|
4498
4523
|
let copy = new BoundingBoxAttachment(this.name);
|
|
@@ -4504,16 +4529,16 @@ var spine = (() => {
|
|
|
4504
4529
|
|
|
4505
4530
|
// spine-core/src/attachments/ClippingAttachment.ts
|
|
4506
4531
|
var ClippingAttachment = class extends VertexAttachment {
|
|
4532
|
+
/** Clipping is performed between the clipping polygon's slot and the end slot. Returns null if clipping is done until the end of
|
|
4533
|
+
* the skeleton's rendering. */
|
|
4534
|
+
endSlot = null;
|
|
4535
|
+
// Nonessential.
|
|
4536
|
+
/** The color of the clipping polygon as it was in Spine. Available only when nonessential data was exported. Clipping polygons
|
|
4537
|
+
* are not usually rendered at runtime. */
|
|
4538
|
+
color = new Color(0.2275, 0.2275, 0.8078, 1);
|
|
4507
4539
|
// ce3a3aff
|
|
4508
4540
|
constructor(name) {
|
|
4509
4541
|
super(name);
|
|
4510
|
-
/** Clipping is performed between the clipping polygon's slot and the end slot. Returns null if clipping is done until the end of
|
|
4511
|
-
* the skeleton's rendering. */
|
|
4512
|
-
this.endSlot = null;
|
|
4513
|
-
// Nonessential.
|
|
4514
|
-
/** The color of the clipping polygon as it was in Spine. Available only when nonessential data was exported. Clipping polygons
|
|
4515
|
-
* are not usually rendered at runtime. */
|
|
4516
|
-
this.color = new Color(0.2275, 0.2275, 0.8078, 1);
|
|
4517
4542
|
}
|
|
4518
4543
|
copy() {
|
|
4519
4544
|
let copy = new ClippingAttachment(this.name);
|
|
@@ -4526,6 +4551,7 @@ var spine = (() => {
|
|
|
4526
4551
|
|
|
4527
4552
|
// spine-core/src/Texture.ts
|
|
4528
4553
|
var Texture = class {
|
|
4554
|
+
_image;
|
|
4529
4555
|
constructor(image) {
|
|
4530
4556
|
this._image = image;
|
|
4531
4557
|
}
|
|
@@ -4550,19 +4576,18 @@ var spine = (() => {
|
|
|
4550
4576
|
return TextureWrap3;
|
|
4551
4577
|
})(TextureWrap || {});
|
|
4552
4578
|
var TextureRegion = class {
|
|
4553
|
-
|
|
4554
|
-
|
|
4555
|
-
|
|
4556
|
-
|
|
4557
|
-
|
|
4558
|
-
|
|
4559
|
-
|
|
4560
|
-
|
|
4561
|
-
|
|
4562
|
-
|
|
4563
|
-
|
|
4564
|
-
|
|
4565
|
-
}
|
|
4579
|
+
texture;
|
|
4580
|
+
u = 0;
|
|
4581
|
+
v = 0;
|
|
4582
|
+
u2 = 0;
|
|
4583
|
+
v2 = 0;
|
|
4584
|
+
width = 0;
|
|
4585
|
+
height = 0;
|
|
4586
|
+
degrees = 0;
|
|
4587
|
+
offsetX = 0;
|
|
4588
|
+
offsetY = 0;
|
|
4589
|
+
originalWidth = 0;
|
|
4590
|
+
originalHeight = 0;
|
|
4566
4591
|
};
|
|
4567
4592
|
var FakeTexture = class extends Texture {
|
|
4568
4593
|
setFilters(minFilter, magFilter) {
|
|
@@ -4575,9 +4600,9 @@ var spine = (() => {
|
|
|
4575
4600
|
|
|
4576
4601
|
// spine-core/src/TextureAtlas.ts
|
|
4577
4602
|
var TextureAtlas = class {
|
|
4603
|
+
pages = new Array();
|
|
4604
|
+
regions = new Array();
|
|
4578
4605
|
constructor(atlasText) {
|
|
4579
|
-
this.pages = new Array();
|
|
4580
|
-
this.regions = new Array();
|
|
4581
4606
|
let reader = new TextureAtlasReader(atlasText);
|
|
4582
4607
|
let entry = new Array(4);
|
|
4583
4608
|
let pageFields = {};
|
|
@@ -4725,15 +4750,15 @@ var spine = (() => {
|
|
|
4725
4750
|
page.setTexture(assetManager.get(pathPrefix + page.name));
|
|
4726
4751
|
}
|
|
4727
4752
|
dispose() {
|
|
4728
|
-
var _a;
|
|
4729
4753
|
for (let i = 0; i < this.pages.length; i++) {
|
|
4730
|
-
|
|
4754
|
+
this.pages[i].texture?.dispose();
|
|
4731
4755
|
}
|
|
4732
4756
|
}
|
|
4733
4757
|
};
|
|
4734
4758
|
var TextureAtlasReader = class {
|
|
4759
|
+
lines;
|
|
4760
|
+
index = 0;
|
|
4735
4761
|
constructor(text) {
|
|
4736
|
-
this.index = 0;
|
|
4737
4762
|
this.lines = text.split(/\r\n|\r|\n/);
|
|
4738
4763
|
}
|
|
4739
4764
|
readLine() {
|
|
@@ -4765,16 +4790,17 @@ var spine = (() => {
|
|
|
4765
4790
|
}
|
|
4766
4791
|
};
|
|
4767
4792
|
var TextureAtlasPage = class {
|
|
4793
|
+
name;
|
|
4794
|
+
minFilter = 9728 /* Nearest */;
|
|
4795
|
+
magFilter = 9728 /* Nearest */;
|
|
4796
|
+
uWrap = 33071 /* ClampToEdge */;
|
|
4797
|
+
vWrap = 33071 /* ClampToEdge */;
|
|
4798
|
+
texture = null;
|
|
4799
|
+
width = 0;
|
|
4800
|
+
height = 0;
|
|
4801
|
+
pma = false;
|
|
4802
|
+
regions = new Array();
|
|
4768
4803
|
constructor(name) {
|
|
4769
|
-
this.minFilter = 9728 /* Nearest */;
|
|
4770
|
-
this.magFilter = 9728 /* Nearest */;
|
|
4771
|
-
this.uWrap = 33071 /* ClampToEdge */;
|
|
4772
|
-
this.vWrap = 33071 /* ClampToEdge */;
|
|
4773
|
-
this.texture = null;
|
|
4774
|
-
this.width = 0;
|
|
4775
|
-
this.height = 0;
|
|
4776
|
-
this.pma = false;
|
|
4777
|
-
this.regions = new Array();
|
|
4778
4804
|
this.name = name;
|
|
4779
4805
|
}
|
|
4780
4806
|
setTexture(texture) {
|
|
@@ -4786,18 +4812,20 @@ var spine = (() => {
|
|
|
4786
4812
|
}
|
|
4787
4813
|
};
|
|
4788
4814
|
var TextureAtlasRegion = class extends TextureRegion {
|
|
4815
|
+
page;
|
|
4816
|
+
name;
|
|
4817
|
+
x = 0;
|
|
4818
|
+
y = 0;
|
|
4819
|
+
offsetX = 0;
|
|
4820
|
+
offsetY = 0;
|
|
4821
|
+
originalWidth = 0;
|
|
4822
|
+
originalHeight = 0;
|
|
4823
|
+
index = 0;
|
|
4824
|
+
degrees = 0;
|
|
4825
|
+
names = null;
|
|
4826
|
+
values = null;
|
|
4789
4827
|
constructor(page, name) {
|
|
4790
4828
|
super();
|
|
4791
|
-
this.x = 0;
|
|
4792
|
-
this.y = 0;
|
|
4793
|
-
this.offsetX = 0;
|
|
4794
|
-
this.offsetY = 0;
|
|
4795
|
-
this.originalWidth = 0;
|
|
4796
|
-
this.originalHeight = 0;
|
|
4797
|
-
this.index = 0;
|
|
4798
|
-
this.degrees = 0;
|
|
4799
|
-
this.names = null;
|
|
4800
|
-
this.values = null;
|
|
4801
4829
|
this.page = page;
|
|
4802
4830
|
this.name = name;
|
|
4803
4831
|
page.regions.push(this);
|
|
@@ -4806,31 +4834,33 @@ var spine = (() => {
|
|
|
4806
4834
|
|
|
4807
4835
|
// spine-core/src/attachments/MeshAttachment.ts
|
|
4808
4836
|
var MeshAttachment = class extends VertexAttachment {
|
|
4837
|
+
region = null;
|
|
4838
|
+
/** The name of the texture region for this attachment. */
|
|
4839
|
+
path;
|
|
4840
|
+
/** The UV pair for each vertex, normalized within the texture region. */
|
|
4841
|
+
regionUVs = [];
|
|
4842
|
+
/** The UV pair for each vertex, normalized within the entire texture.
|
|
4843
|
+
*
|
|
4844
|
+
* See {@link #updateUVs}. */
|
|
4845
|
+
uvs = [];
|
|
4846
|
+
/** Triplets of vertex indices which describe the mesh's triangulation. */
|
|
4847
|
+
triangles = [];
|
|
4848
|
+
/** The color to tint the mesh. */
|
|
4849
|
+
color = new Color(1, 1, 1, 1);
|
|
4850
|
+
/** The width of the mesh's image. Available only when nonessential data was exported. */
|
|
4851
|
+
width = 0;
|
|
4852
|
+
/** The height of the mesh's image. Available only when nonessential data was exported. */
|
|
4853
|
+
height = 0;
|
|
4854
|
+
/** The number of entries at the beginning of {@link #vertices} that make up the mesh hull. */
|
|
4855
|
+
hullLength = 0;
|
|
4856
|
+
/** Vertex index pairs describing edges for controling triangulation. Mesh triangles will never cross edges. Only available if
|
|
4857
|
+
* nonessential data was exported. Triangulation is not performed at runtime. */
|
|
4858
|
+
edges = [];
|
|
4859
|
+
parentMesh = null;
|
|
4860
|
+
sequence = null;
|
|
4861
|
+
tempColor = new Color(0, 0, 0, 0);
|
|
4809
4862
|
constructor(name, path) {
|
|
4810
4863
|
super(name);
|
|
4811
|
-
this.region = null;
|
|
4812
|
-
/** The UV pair for each vertex, normalized within the texture region. */
|
|
4813
|
-
this.regionUVs = [];
|
|
4814
|
-
/** The UV pair for each vertex, normalized within the entire texture.
|
|
4815
|
-
*
|
|
4816
|
-
* See {@link #updateUVs}. */
|
|
4817
|
-
this.uvs = [];
|
|
4818
|
-
/** Triplets of vertex indices which describe the mesh's triangulation. */
|
|
4819
|
-
this.triangles = [];
|
|
4820
|
-
/** The color to tint the mesh. */
|
|
4821
|
-
this.color = new Color(1, 1, 1, 1);
|
|
4822
|
-
/** The width of the mesh's image. Available only when nonessential data was exported. */
|
|
4823
|
-
this.width = 0;
|
|
4824
|
-
/** The height of the mesh's image. Available only when nonessential data was exported. */
|
|
4825
|
-
this.height = 0;
|
|
4826
|
-
/** The number of entries at the beginning of {@link #vertices} that make up the mesh hull. */
|
|
4827
|
-
this.hullLength = 0;
|
|
4828
|
-
/** Vertex index pairs describing edges for controling triangulation. Mesh triangles will never cross edges. Only available if
|
|
4829
|
-
* nonessential data was exported. Triangulation is not performed at runtime. */
|
|
4830
|
-
this.edges = [];
|
|
4831
|
-
this.parentMesh = null;
|
|
4832
|
-
this.sequence = null;
|
|
4833
|
-
this.tempColor = new Color(0, 0, 0, 0);
|
|
4834
4864
|
this.path = path;
|
|
4835
4865
|
}
|
|
4836
4866
|
/** Calculates {@link #uvs} using the {@link #regionUVs} and region. Must be called if the region, the region's properties, or
|
|
@@ -4957,18 +4987,18 @@ var spine = (() => {
|
|
|
4957
4987
|
|
|
4958
4988
|
// spine-core/src/attachments/PathAttachment.ts
|
|
4959
4989
|
var PathAttachment = class extends VertexAttachment {
|
|
4990
|
+
/** The lengths along the path in the setup pose from the start of the path to the end of each Bezier curve. */
|
|
4991
|
+
lengths = [];
|
|
4992
|
+
/** If true, the start and end knots are connected. */
|
|
4993
|
+
closed = false;
|
|
4994
|
+
/** If true, additional calculations are performed to make calculating positions along the path more accurate. If false, fewer
|
|
4995
|
+
* calculations are performed but calculating positions along the path is less accurate. */
|
|
4996
|
+
constantSpeed = false;
|
|
4997
|
+
/** The color of the path as it was in Spine. Available only when nonessential data was exported. Paths are not usually
|
|
4998
|
+
* rendered at runtime. */
|
|
4999
|
+
color = new Color(1, 1, 1, 1);
|
|
4960
5000
|
constructor(name) {
|
|
4961
5001
|
super(name);
|
|
4962
|
-
/** The lengths along the path in the setup pose from the start of the path to the end of each Bezier curve. */
|
|
4963
|
-
this.lengths = [];
|
|
4964
|
-
/** If true, the start and end knots are connected. */
|
|
4965
|
-
this.closed = false;
|
|
4966
|
-
/** If true, additional calculations are performed to make calculating positions along the path more accurate. If false, fewer
|
|
4967
|
-
* calculations are performed but calculating positions along the path is less accurate. */
|
|
4968
|
-
this.constantSpeed = false;
|
|
4969
|
-
/** The color of the path as it was in Spine. Available only when nonessential data was exported. Paths are not usually
|
|
4970
|
-
* rendered at runtime. */
|
|
4971
|
-
this.color = new Color(1, 1, 1, 1);
|
|
4972
5002
|
}
|
|
4973
5003
|
copy() {
|
|
4974
5004
|
let copy = new PathAttachment(this.name);
|
|
@@ -4984,14 +5014,14 @@ var spine = (() => {
|
|
|
4984
5014
|
|
|
4985
5015
|
// spine-core/src/attachments/PointAttachment.ts
|
|
4986
5016
|
var PointAttachment = class extends VertexAttachment {
|
|
5017
|
+
x = 0;
|
|
5018
|
+
y = 0;
|
|
5019
|
+
rotation = 0;
|
|
5020
|
+
/** The color of the point attachment as it was in Spine. Available only when nonessential data was exported. Point attachments
|
|
5021
|
+
* are not usually rendered at runtime. */
|
|
5022
|
+
color = new Color(0.38, 0.94, 0, 1);
|
|
4987
5023
|
constructor(name) {
|
|
4988
5024
|
super(name);
|
|
4989
|
-
this.x = 0;
|
|
4990
|
-
this.y = 0;
|
|
4991
|
-
this.rotation = 0;
|
|
4992
|
-
/** The color of the point attachment as it was in Spine. Available only when nonessential data was exported. Point attachments
|
|
4993
|
-
* are not usually rendered at runtime. */
|
|
4994
|
-
this.color = new Color(0.38, 0.94, 0, 1);
|
|
4995
5025
|
}
|
|
4996
5026
|
computeWorldPosition(bone, point) {
|
|
4997
5027
|
point.x = this.x * bone.a + this.y * bone.b + bone.worldX;
|
|
@@ -5016,32 +5046,34 @@ var spine = (() => {
|
|
|
5016
5046
|
|
|
5017
5047
|
// spine-core/src/attachments/RegionAttachment.ts
|
|
5018
5048
|
var _RegionAttachment = class extends Attachment {
|
|
5049
|
+
/** The local x translation. */
|
|
5050
|
+
x = 0;
|
|
5051
|
+
/** The local y translation. */
|
|
5052
|
+
y = 0;
|
|
5053
|
+
/** The local scaleX. */
|
|
5054
|
+
scaleX = 1;
|
|
5055
|
+
/** The local scaleY. */
|
|
5056
|
+
scaleY = 1;
|
|
5057
|
+
/** The local rotation. */
|
|
5058
|
+
rotation = 0;
|
|
5059
|
+
/** The width of the region attachment in Spine. */
|
|
5060
|
+
width = 0;
|
|
5061
|
+
/** The height of the region attachment in Spine. */
|
|
5062
|
+
height = 0;
|
|
5063
|
+
/** The color to tint the region attachment. */
|
|
5064
|
+
color = new Color(1, 1, 1, 1);
|
|
5065
|
+
/** The name of the texture region for this attachment. */
|
|
5066
|
+
path;
|
|
5067
|
+
region = null;
|
|
5068
|
+
sequence = null;
|
|
5069
|
+
/** For each of the 4 vertices, a pair of <code>x,y</code> values that is the local position of the vertex.
|
|
5070
|
+
*
|
|
5071
|
+
* See {@link #updateOffset()}. */
|
|
5072
|
+
offset = Utils.newFloatArray(8);
|
|
5073
|
+
uvs = Utils.newFloatArray(8);
|
|
5074
|
+
tempColor = new Color(1, 1, 1, 1);
|
|
5019
5075
|
constructor(name, path) {
|
|
5020
5076
|
super(name);
|
|
5021
|
-
/** The local x translation. */
|
|
5022
|
-
this.x = 0;
|
|
5023
|
-
/** The local y translation. */
|
|
5024
|
-
this.y = 0;
|
|
5025
|
-
/** The local scaleX. */
|
|
5026
|
-
this.scaleX = 1;
|
|
5027
|
-
/** The local scaleY. */
|
|
5028
|
-
this.scaleY = 1;
|
|
5029
|
-
/** The local rotation. */
|
|
5030
|
-
this.rotation = 0;
|
|
5031
|
-
/** The width of the region attachment in Spine. */
|
|
5032
|
-
this.width = 0;
|
|
5033
|
-
/** The height of the region attachment in Spine. */
|
|
5034
|
-
this.height = 0;
|
|
5035
|
-
/** The color to tint the region attachment. */
|
|
5036
|
-
this.color = new Color(1, 1, 1, 1);
|
|
5037
|
-
this.region = null;
|
|
5038
|
-
this.sequence = null;
|
|
5039
|
-
/** For each of the 4 vertices, a pair of <code>x,y</code> values that is the local position of the vertex.
|
|
5040
|
-
*
|
|
5041
|
-
* See {@link #updateOffset()}. */
|
|
5042
|
-
this.offset = Utils.newFloatArray(8);
|
|
5043
|
-
this.uvs = Utils.newFloatArray(8);
|
|
5044
|
-
this.tempColor = new Color(1, 1, 1, 1);
|
|
5045
5077
|
this.path = path;
|
|
5046
5078
|
}
|
|
5047
5079
|
/** Calculates the {@link #offset} using the region settings. Must be called after changing region settings. */
|
|
@@ -5162,41 +5194,42 @@ var spine = (() => {
|
|
|
5162
5194
|
}
|
|
5163
5195
|
};
|
|
5164
5196
|
var RegionAttachment = _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
|
-
RegionAttachment
|
|
5190
|
-
RegionAttachment
|
|
5191
|
-
RegionAttachment
|
|
5192
|
-
RegionAttachment
|
|
5193
|
-
RegionAttachment
|
|
5194
|
-
RegionAttachment
|
|
5195
|
-
RegionAttachment
|
|
5196
|
-
RegionAttachment
|
|
5197
|
+
__publicField(RegionAttachment, "X1", 0);
|
|
5198
|
+
__publicField(RegionAttachment, "Y1", 1);
|
|
5199
|
+
__publicField(RegionAttachment, "C1R", 2);
|
|
5200
|
+
__publicField(RegionAttachment, "C1G", 3);
|
|
5201
|
+
__publicField(RegionAttachment, "C1B", 4);
|
|
5202
|
+
__publicField(RegionAttachment, "C1A", 5);
|
|
5203
|
+
__publicField(RegionAttachment, "U1", 6);
|
|
5204
|
+
__publicField(RegionAttachment, "V1", 7);
|
|
5205
|
+
__publicField(RegionAttachment, "X2", 8);
|
|
5206
|
+
__publicField(RegionAttachment, "Y2", 9);
|
|
5207
|
+
__publicField(RegionAttachment, "C2R", 10);
|
|
5208
|
+
__publicField(RegionAttachment, "C2G", 11);
|
|
5209
|
+
__publicField(RegionAttachment, "C2B", 12);
|
|
5210
|
+
__publicField(RegionAttachment, "C2A", 13);
|
|
5211
|
+
__publicField(RegionAttachment, "U2", 14);
|
|
5212
|
+
__publicField(RegionAttachment, "V2", 15);
|
|
5213
|
+
__publicField(RegionAttachment, "X3", 16);
|
|
5214
|
+
__publicField(RegionAttachment, "Y3", 17);
|
|
5215
|
+
__publicField(RegionAttachment, "C3R", 18);
|
|
5216
|
+
__publicField(RegionAttachment, "C3G", 19);
|
|
5217
|
+
__publicField(RegionAttachment, "C3B", 20);
|
|
5218
|
+
__publicField(RegionAttachment, "C3A", 21);
|
|
5219
|
+
__publicField(RegionAttachment, "U3", 22);
|
|
5220
|
+
__publicField(RegionAttachment, "V3", 23);
|
|
5221
|
+
__publicField(RegionAttachment, "X4", 24);
|
|
5222
|
+
__publicField(RegionAttachment, "Y4", 25);
|
|
5223
|
+
__publicField(RegionAttachment, "C4R", 26);
|
|
5224
|
+
__publicField(RegionAttachment, "C4G", 27);
|
|
5225
|
+
__publicField(RegionAttachment, "C4B", 28);
|
|
5226
|
+
__publicField(RegionAttachment, "C4A", 29);
|
|
5227
|
+
__publicField(RegionAttachment, "U4", 30);
|
|
5228
|
+
__publicField(RegionAttachment, "V4", 31);
|
|
5197
5229
|
|
|
5198
5230
|
// spine-core/src/AtlasAttachmentLoader.ts
|
|
5199
5231
|
var AtlasAttachmentLoader = class {
|
|
5232
|
+
atlas;
|
|
5200
5233
|
constructor(atlas) {
|
|
5201
5234
|
this.atlas = atlas;
|
|
5202
5235
|
}
|
|
@@ -5250,36 +5283,38 @@ var spine = (() => {
|
|
|
5250
5283
|
|
|
5251
5284
|
// spine-core/src/BoneData.ts
|
|
5252
5285
|
var BoneData = class {
|
|
5286
|
+
/** The index of the bone in {@link Skeleton#getBones()}. */
|
|
5287
|
+
index = 0;
|
|
5288
|
+
/** The name of the bone, which is unique across all bones in the skeleton. */
|
|
5289
|
+
name;
|
|
5290
|
+
/** @returns May be null. */
|
|
5291
|
+
parent = null;
|
|
5292
|
+
/** The bone's length. */
|
|
5293
|
+
length = 0;
|
|
5294
|
+
/** The local x translation. */
|
|
5295
|
+
x = 0;
|
|
5296
|
+
/** The local y translation. */
|
|
5297
|
+
y = 0;
|
|
5298
|
+
/** The local rotation. */
|
|
5299
|
+
rotation = 0;
|
|
5300
|
+
/** The local scaleX. */
|
|
5301
|
+
scaleX = 1;
|
|
5302
|
+
/** The local scaleY. */
|
|
5303
|
+
scaleY = 1;
|
|
5304
|
+
/** The local shearX. */
|
|
5305
|
+
shearX = 0;
|
|
5306
|
+
/** The local shearX. */
|
|
5307
|
+
shearY = 0;
|
|
5308
|
+
/** The transform mode for how parent world transforms affect this bone. */
|
|
5309
|
+
transformMode = TransformMode.Normal;
|
|
5310
|
+
/** When true, {@link Skeleton#updateWorldTransform()} only updates this bone if the {@link Skeleton#skin} contains this
|
|
5311
|
+
* bone.
|
|
5312
|
+
* @see Skin#bones */
|
|
5313
|
+
skinRequired = false;
|
|
5314
|
+
/** The color of the bone as it was in Spine. Available only when nonessential data was exported. Bones are not usually
|
|
5315
|
+
* rendered at runtime. */
|
|
5316
|
+
color = new Color();
|
|
5253
5317
|
constructor(index, name, parent) {
|
|
5254
|
-
/** The index of the bone in {@link Skeleton#getBones()}. */
|
|
5255
|
-
this.index = 0;
|
|
5256
|
-
/** @returns May be null. */
|
|
5257
|
-
this.parent = null;
|
|
5258
|
-
/** The bone's length. */
|
|
5259
|
-
this.length = 0;
|
|
5260
|
-
/** The local x translation. */
|
|
5261
|
-
this.x = 0;
|
|
5262
|
-
/** The local y translation. */
|
|
5263
|
-
this.y = 0;
|
|
5264
|
-
/** The local rotation. */
|
|
5265
|
-
this.rotation = 0;
|
|
5266
|
-
/** The local scaleX. */
|
|
5267
|
-
this.scaleX = 1;
|
|
5268
|
-
/** The local scaleY. */
|
|
5269
|
-
this.scaleY = 1;
|
|
5270
|
-
/** The local shearX. */
|
|
5271
|
-
this.shearX = 0;
|
|
5272
|
-
/** The local shearX. */
|
|
5273
|
-
this.shearY = 0;
|
|
5274
|
-
/** The transform mode for how parent world transforms affect this bone. */
|
|
5275
|
-
this.transformMode = TransformMode.Normal;
|
|
5276
|
-
/** When true, {@link Skeleton#updateWorldTransform()} only updates this bone if the {@link Skeleton#skin} contains this
|
|
5277
|
-
* bone.
|
|
5278
|
-
* @see Skin#bones */
|
|
5279
|
-
this.skinRequired = false;
|
|
5280
|
-
/** The color of the bone as it was in Spine. Available only when nonessential data was exported. Bones are not usually
|
|
5281
|
-
* rendered at runtime. */
|
|
5282
|
-
this.color = new Color();
|
|
5283
5318
|
if (index < 0)
|
|
5284
5319
|
throw new Error("index must be >= 0.");
|
|
5285
5320
|
if (!name)
|
|
@@ -5300,54 +5335,58 @@ var spine = (() => {
|
|
|
5300
5335
|
|
|
5301
5336
|
// spine-core/src/Bone.ts
|
|
5302
5337
|
var Bone = class {
|
|
5338
|
+
/** The bone's setup pose data. */
|
|
5339
|
+
data;
|
|
5340
|
+
/** The skeleton this bone belongs to. */
|
|
5341
|
+
skeleton;
|
|
5342
|
+
/** The parent bone, or null if this is the root bone. */
|
|
5343
|
+
parent = null;
|
|
5344
|
+
/** The immediate children of this bone. */
|
|
5345
|
+
children = new Array();
|
|
5346
|
+
/** The local x translation. */
|
|
5347
|
+
x = 0;
|
|
5348
|
+
/** The local y translation. */
|
|
5349
|
+
y = 0;
|
|
5350
|
+
/** The local rotation in degrees, counter clockwise. */
|
|
5351
|
+
rotation = 0;
|
|
5352
|
+
/** The local scaleX. */
|
|
5353
|
+
scaleX = 0;
|
|
5354
|
+
/** The local scaleY. */
|
|
5355
|
+
scaleY = 0;
|
|
5356
|
+
/** The local shearX. */
|
|
5357
|
+
shearX = 0;
|
|
5358
|
+
/** The local shearY. */
|
|
5359
|
+
shearY = 0;
|
|
5360
|
+
/** The applied local x translation. */
|
|
5361
|
+
ax = 0;
|
|
5362
|
+
/** The applied local y translation. */
|
|
5363
|
+
ay = 0;
|
|
5364
|
+
/** The applied local rotation in degrees, counter clockwise. */
|
|
5365
|
+
arotation = 0;
|
|
5366
|
+
/** The applied local scaleX. */
|
|
5367
|
+
ascaleX = 0;
|
|
5368
|
+
/** The applied local scaleY. */
|
|
5369
|
+
ascaleY = 0;
|
|
5370
|
+
/** The applied local shearX. */
|
|
5371
|
+
ashearX = 0;
|
|
5372
|
+
/** The applied local shearY. */
|
|
5373
|
+
ashearY = 0;
|
|
5374
|
+
/** Part of the world transform matrix for the X axis. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5375
|
+
a = 0;
|
|
5376
|
+
/** Part of the world transform matrix for the Y axis. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5377
|
+
b = 0;
|
|
5378
|
+
/** Part of the world transform matrix for the X axis. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5379
|
+
c = 0;
|
|
5380
|
+
/** Part of the world transform matrix for the Y axis. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5381
|
+
d = 0;
|
|
5382
|
+
/** The world X position. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5383
|
+
worldY = 0;
|
|
5384
|
+
/** The world Y position. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5385
|
+
worldX = 0;
|
|
5386
|
+
sorted = false;
|
|
5387
|
+
active = false;
|
|
5303
5388
|
/** @param parent May be null. */
|
|
5304
5389
|
constructor(data, skeleton, parent) {
|
|
5305
|
-
/** The parent bone, or null if this is the root bone. */
|
|
5306
|
-
this.parent = null;
|
|
5307
|
-
/** The immediate children of this bone. */
|
|
5308
|
-
this.children = new Array();
|
|
5309
|
-
/** The local x translation. */
|
|
5310
|
-
this.x = 0;
|
|
5311
|
-
/** The local y translation. */
|
|
5312
|
-
this.y = 0;
|
|
5313
|
-
/** The local rotation in degrees, counter clockwise. */
|
|
5314
|
-
this.rotation = 0;
|
|
5315
|
-
/** The local scaleX. */
|
|
5316
|
-
this.scaleX = 0;
|
|
5317
|
-
/** The local scaleY. */
|
|
5318
|
-
this.scaleY = 0;
|
|
5319
|
-
/** The local shearX. */
|
|
5320
|
-
this.shearX = 0;
|
|
5321
|
-
/** The local shearY. */
|
|
5322
|
-
this.shearY = 0;
|
|
5323
|
-
/** The applied local x translation. */
|
|
5324
|
-
this.ax = 0;
|
|
5325
|
-
/** The applied local y translation. */
|
|
5326
|
-
this.ay = 0;
|
|
5327
|
-
/** The applied local rotation in degrees, counter clockwise. */
|
|
5328
|
-
this.arotation = 0;
|
|
5329
|
-
/** The applied local scaleX. */
|
|
5330
|
-
this.ascaleX = 0;
|
|
5331
|
-
/** The applied local scaleY. */
|
|
5332
|
-
this.ascaleY = 0;
|
|
5333
|
-
/** The applied local shearX. */
|
|
5334
|
-
this.ashearX = 0;
|
|
5335
|
-
/** The applied local shearY. */
|
|
5336
|
-
this.ashearY = 0;
|
|
5337
|
-
/** Part of the world transform matrix for the X axis. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5338
|
-
this.a = 0;
|
|
5339
|
-
/** Part of the world transform matrix for the Y axis. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5340
|
-
this.b = 0;
|
|
5341
|
-
/** Part of the world transform matrix for the X axis. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5342
|
-
this.c = 0;
|
|
5343
|
-
/** Part of the world transform matrix for the Y axis. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5344
|
-
this.d = 0;
|
|
5345
|
-
/** The world X position. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5346
|
-
this.worldY = 0;
|
|
5347
|
-
/** The world Y position. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5348
|
-
this.worldX = 0;
|
|
5349
|
-
this.sorted = false;
|
|
5350
|
-
this.active = false;
|
|
5351
5390
|
if (!data)
|
|
5352
5391
|
throw new Error("data cannot be null.");
|
|
5353
5392
|
if (!skeleton)
|
|
@@ -5647,12 +5686,14 @@ var spine = (() => {
|
|
|
5647
5686
|
|
|
5648
5687
|
// spine-core/src/AssetManagerBase.ts
|
|
5649
5688
|
var AssetManagerBase = class {
|
|
5689
|
+
pathPrefix = "";
|
|
5690
|
+
textureLoader;
|
|
5691
|
+
downloader;
|
|
5692
|
+
assets = {};
|
|
5693
|
+
errors = {};
|
|
5694
|
+
toLoad = 0;
|
|
5695
|
+
loaded = 0;
|
|
5650
5696
|
constructor(textureLoader, pathPrefix = "", downloader = new Downloader()) {
|
|
5651
|
-
this.pathPrefix = "";
|
|
5652
|
-
this.assets = {};
|
|
5653
|
-
this.errors = {};
|
|
5654
|
-
this.toLoad = 0;
|
|
5655
|
-
this.loaded = 0;
|
|
5656
5697
|
this.textureLoader = textureLoader;
|
|
5657
5698
|
this.pathPrefix = pathPrefix;
|
|
5658
5699
|
this.downloader = downloader;
|
|
@@ -5837,10 +5878,8 @@ var spine = (() => {
|
|
|
5837
5878
|
}
|
|
5838
5879
|
};
|
|
5839
5880
|
var Downloader = class {
|
|
5840
|
-
|
|
5841
|
-
|
|
5842
|
-
this.rawDataUris = {};
|
|
5843
|
-
}
|
|
5881
|
+
callbacks = {};
|
|
5882
|
+
rawDataUris = {};
|
|
5844
5883
|
dataUriToString(dataUri) {
|
|
5845
5884
|
if (!dataUri.startsWith("data:")) {
|
|
5846
5885
|
throw new Error("Not a data URI.");
|
|
@@ -5947,13 +5986,14 @@ var spine = (() => {
|
|
|
5947
5986
|
|
|
5948
5987
|
// spine-core/src/Event.ts
|
|
5949
5988
|
var Event = class {
|
|
5989
|
+
data;
|
|
5990
|
+
intValue = 0;
|
|
5991
|
+
floatValue = 0;
|
|
5992
|
+
stringValue = null;
|
|
5993
|
+
time = 0;
|
|
5994
|
+
volume = 0;
|
|
5995
|
+
balance = 0;
|
|
5950
5996
|
constructor(time, data) {
|
|
5951
|
-
this.intValue = 0;
|
|
5952
|
-
this.floatValue = 0;
|
|
5953
|
-
this.stringValue = null;
|
|
5954
|
-
this.time = 0;
|
|
5955
|
-
this.volume = 0;
|
|
5956
|
-
this.balance = 0;
|
|
5957
5997
|
if (!data)
|
|
5958
5998
|
throw new Error("data cannot be null.");
|
|
5959
5999
|
this.time = time;
|
|
@@ -5963,32 +6003,39 @@ var spine = (() => {
|
|
|
5963
6003
|
|
|
5964
6004
|
// spine-core/src/EventData.ts
|
|
5965
6005
|
var EventData = class {
|
|
6006
|
+
name;
|
|
6007
|
+
intValue = 0;
|
|
6008
|
+
floatValue = 0;
|
|
6009
|
+
stringValue = null;
|
|
6010
|
+
audioPath = null;
|
|
6011
|
+
volume = 0;
|
|
6012
|
+
balance = 0;
|
|
5966
6013
|
constructor(name) {
|
|
5967
|
-
this.intValue = 0;
|
|
5968
|
-
this.floatValue = 0;
|
|
5969
|
-
this.stringValue = null;
|
|
5970
|
-
this.audioPath = null;
|
|
5971
|
-
this.volume = 0;
|
|
5972
|
-
this.balance = 0;
|
|
5973
6014
|
this.name = name;
|
|
5974
6015
|
}
|
|
5975
6016
|
};
|
|
5976
6017
|
|
|
5977
6018
|
// spine-core/src/IkConstraint.ts
|
|
5978
6019
|
var IkConstraint = class {
|
|
6020
|
+
/** The IK constraint's setup pose data. */
|
|
6021
|
+
data;
|
|
6022
|
+
/** The bones that will be modified by this IK constraint. */
|
|
6023
|
+
bones;
|
|
6024
|
+
/** The bone that is the IK target. */
|
|
6025
|
+
target;
|
|
6026
|
+
/** Controls the bend direction of the IK bones, either 1 or -1. */
|
|
6027
|
+
bendDirection = 0;
|
|
6028
|
+
/** When true and only a single bone is being constrained, if the target is too close, the bone is scaled to reach it. */
|
|
6029
|
+
compress = false;
|
|
6030
|
+
/** 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
|
|
6031
|
+
* and the parent bone has local nonuniform scale, stretch is not applied. */
|
|
6032
|
+
stretch = false;
|
|
6033
|
+
/** A percentage (0-1) that controls the mix between the constrained and unconstrained rotations. */
|
|
6034
|
+
mix = 1;
|
|
6035
|
+
/** For two bone IK, the distance from the maximum reach of the bones that rotation will slow. */
|
|
6036
|
+
softness = 0;
|
|
6037
|
+
active = false;
|
|
5979
6038
|
constructor(data, skeleton) {
|
|
5980
|
-
/** Controls the bend direction of the IK bones, either 1 or -1. */
|
|
5981
|
-
this.bendDirection = 0;
|
|
5982
|
-
/** When true and only a single bone is being constrained, if the target is too close, the bone is scaled to reach it. */
|
|
5983
|
-
this.compress = false;
|
|
5984
|
-
/** 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
|
|
5985
|
-
* and the parent bone has local nonuniform scale, stretch is not applied. */
|
|
5986
|
-
this.stretch = false;
|
|
5987
|
-
/** A percentage (0-1) that controls the mix between the constrained and unconstrained rotations. */
|
|
5988
|
-
this.mix = 1;
|
|
5989
|
-
/** For two bone IK, the distance from the maximum reach of the bones that rotation will slow. */
|
|
5990
|
-
this.softness = 0;
|
|
5991
|
-
this.active = false;
|
|
5992
6039
|
if (!data)
|
|
5993
6040
|
throw new Error("data cannot be null.");
|
|
5994
6041
|
if (!skeleton)
|
|
@@ -6246,27 +6293,10 @@ var spine = (() => {
|
|
|
6246
6293
|
|
|
6247
6294
|
// spine-core/src/IkConstraintData.ts
|
|
6248
6295
|
var IkConstraintData = class extends ConstraintData {
|
|
6249
|
-
|
|
6250
|
-
|
|
6251
|
-
|
|
6252
|
-
|
|
6253
|
-
/** The bone that is the IK target. */
|
|
6254
|
-
this._target = null;
|
|
6255
|
-
/** Controls the bend direction of the IK bones, either 1 or -1. */
|
|
6256
|
-
this.bendDirection = 1;
|
|
6257
|
-
/** When true and only a single bone is being constrained, if the target is too close, the bone is scaled to reach it. */
|
|
6258
|
-
this.compress = false;
|
|
6259
|
-
/** 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
|
|
6260
|
-
* and the parent bone has local nonuniform scale, stretch is not applied. */
|
|
6261
|
-
this.stretch = false;
|
|
6262
|
-
/** When true, only a single bone is being constrained, and {@link #getCompress()} or {@link #getStretch()} is used, the bone
|
|
6263
|
-
* is scaled on both the X and Y axes. */
|
|
6264
|
-
this.uniform = false;
|
|
6265
|
-
/** A percentage (0-1) that controls the mix between the constrained and unconstrained rotations. */
|
|
6266
|
-
this.mix = 1;
|
|
6267
|
-
/** For two bone IK, the distance from the maximum reach of the bones that rotation will slow. */
|
|
6268
|
-
this.softness = 0;
|
|
6269
|
-
}
|
|
6296
|
+
/** The bones that are constrained by this IK constraint. */
|
|
6297
|
+
bones = new Array();
|
|
6298
|
+
/** The bone that is the IK target. */
|
|
6299
|
+
_target = null;
|
|
6270
6300
|
set target(boneData) {
|
|
6271
6301
|
this._target = boneData;
|
|
6272
6302
|
}
|
|
@@ -6276,32 +6306,31 @@ var spine = (() => {
|
|
|
6276
6306
|
else
|
|
6277
6307
|
return this._target;
|
|
6278
6308
|
}
|
|
6309
|
+
/** Controls the bend direction of the IK bones, either 1 or -1. */
|
|
6310
|
+
bendDirection = 1;
|
|
6311
|
+
/** When true and only a single bone is being constrained, if the target is too close, the bone is scaled to reach it. */
|
|
6312
|
+
compress = false;
|
|
6313
|
+
/** 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
|
|
6314
|
+
* and the parent bone has local nonuniform scale, stretch is not applied. */
|
|
6315
|
+
stretch = false;
|
|
6316
|
+
/** When true, only a single bone is being constrained, and {@link #getCompress()} or {@link #getStretch()} is used, the bone
|
|
6317
|
+
* is scaled on both the X and Y axes. */
|
|
6318
|
+
uniform = false;
|
|
6319
|
+
/** A percentage (0-1) that controls the mix between the constrained and unconstrained rotations. */
|
|
6320
|
+
mix = 1;
|
|
6321
|
+
/** For two bone IK, the distance from the maximum reach of the bones that rotation will slow. */
|
|
6322
|
+
softness = 0;
|
|
6323
|
+
constructor(name) {
|
|
6324
|
+
super(name, 0, false);
|
|
6325
|
+
}
|
|
6279
6326
|
};
|
|
6280
6327
|
|
|
6281
6328
|
// spine-core/src/PathConstraintData.ts
|
|
6282
6329
|
var PathConstraintData = class extends ConstraintData {
|
|
6283
|
-
|
|
6284
|
-
|
|
6285
|
-
|
|
6286
|
-
|
|
6287
|
-
/** The slot whose path attachment will be used to constrained the bones. */
|
|
6288
|
-
this._target = null;
|
|
6289
|
-
/** The mode for positioning the first bone on the path. */
|
|
6290
|
-
this.positionMode = PositionMode.Fixed;
|
|
6291
|
-
/** The mode for positioning the bones after the first bone on the path. */
|
|
6292
|
-
this.spacingMode = SpacingMode.Fixed;
|
|
6293
|
-
/** The mode for adjusting the rotation of the bones. */
|
|
6294
|
-
this.rotateMode = RotateMode.Chain;
|
|
6295
|
-
/** An offset added to the constrained bone rotation. */
|
|
6296
|
-
this.offsetRotation = 0;
|
|
6297
|
-
/** The position along the path. */
|
|
6298
|
-
this.position = 0;
|
|
6299
|
-
/** The spacing between bones. */
|
|
6300
|
-
this.spacing = 0;
|
|
6301
|
-
this.mixRotate = 0;
|
|
6302
|
-
this.mixX = 0;
|
|
6303
|
-
this.mixY = 0;
|
|
6304
|
-
}
|
|
6330
|
+
/** The bones that will be modified by this path constraint. */
|
|
6331
|
+
bones = new Array();
|
|
6332
|
+
/** The slot whose path attachment will be used to constrained the bones. */
|
|
6333
|
+
_target = null;
|
|
6305
6334
|
set target(slotData) {
|
|
6306
6335
|
this._target = slotData;
|
|
6307
6336
|
}
|
|
@@ -6311,6 +6340,24 @@ var spine = (() => {
|
|
|
6311
6340
|
else
|
|
6312
6341
|
return this._target;
|
|
6313
6342
|
}
|
|
6343
|
+
/** The mode for positioning the first bone on the path. */
|
|
6344
|
+
positionMode = PositionMode.Fixed;
|
|
6345
|
+
/** The mode for positioning the bones after the first bone on the path. */
|
|
6346
|
+
spacingMode = SpacingMode.Fixed;
|
|
6347
|
+
/** The mode for adjusting the rotation of the bones. */
|
|
6348
|
+
rotateMode = RotateMode.Chain;
|
|
6349
|
+
/** An offset added to the constrained bone rotation. */
|
|
6350
|
+
offsetRotation = 0;
|
|
6351
|
+
/** The position along the path. */
|
|
6352
|
+
position = 0;
|
|
6353
|
+
/** The spacing between bones. */
|
|
6354
|
+
spacing = 0;
|
|
6355
|
+
mixRotate = 0;
|
|
6356
|
+
mixX = 0;
|
|
6357
|
+
mixY = 0;
|
|
6358
|
+
constructor(name) {
|
|
6359
|
+
super(name, 0, false);
|
|
6360
|
+
}
|
|
6314
6361
|
};
|
|
6315
6362
|
var PositionMode = /* @__PURE__ */ ((PositionMode2) => {
|
|
6316
6363
|
PositionMode2[PositionMode2["Fixed"] = 0] = "Fixed";
|
|
@@ -6333,21 +6380,27 @@ var spine = (() => {
|
|
|
6333
6380
|
|
|
6334
6381
|
// spine-core/src/PathConstraint.ts
|
|
6335
6382
|
var _PathConstraint = class {
|
|
6383
|
+
/** The path constraint's setup pose data. */
|
|
6384
|
+
data;
|
|
6385
|
+
/** The bones that will be modified by this path constraint. */
|
|
6386
|
+
bones;
|
|
6387
|
+
/** The slot whose path attachment will be used to constrained the bones. */
|
|
6388
|
+
target;
|
|
6389
|
+
/** The position along the path. */
|
|
6390
|
+
position = 0;
|
|
6391
|
+
/** The spacing between bones. */
|
|
6392
|
+
spacing = 0;
|
|
6393
|
+
mixRotate = 0;
|
|
6394
|
+
mixX = 0;
|
|
6395
|
+
mixY = 0;
|
|
6396
|
+
spaces = new Array();
|
|
6397
|
+
positions = new Array();
|
|
6398
|
+
world = new Array();
|
|
6399
|
+
curves = new Array();
|
|
6400
|
+
lengths = new Array();
|
|
6401
|
+
segments = new Array();
|
|
6402
|
+
active = false;
|
|
6336
6403
|
constructor(data, skeleton) {
|
|
6337
|
-
/** The position along the path. */
|
|
6338
|
-
this.position = 0;
|
|
6339
|
-
/** The spacing between bones. */
|
|
6340
|
-
this.spacing = 0;
|
|
6341
|
-
this.mixRotate = 0;
|
|
6342
|
-
this.mixX = 0;
|
|
6343
|
-
this.mixY = 0;
|
|
6344
|
-
this.spaces = new Array();
|
|
6345
|
-
this.positions = new Array();
|
|
6346
|
-
this.world = new Array();
|
|
6347
|
-
this.curves = new Array();
|
|
6348
|
-
this.lengths = new Array();
|
|
6349
|
-
this.segments = new Array();
|
|
6350
|
-
this.active = false;
|
|
6351
6404
|
if (!data)
|
|
6352
6405
|
throw new Error("data cannot be null.");
|
|
6353
6406
|
if (!skeleton)
|
|
@@ -6767,27 +6820,34 @@ var spine = (() => {
|
|
|
6767
6820
|
}
|
|
6768
6821
|
};
|
|
6769
6822
|
var PathConstraint = _PathConstraint;
|
|
6770
|
-
PathConstraint
|
|
6771
|
-
PathConstraint
|
|
6772
|
-
PathConstraint
|
|
6773
|
-
PathConstraint
|
|
6823
|
+
__publicField(PathConstraint, "NONE", -1);
|
|
6824
|
+
__publicField(PathConstraint, "BEFORE", -2);
|
|
6825
|
+
__publicField(PathConstraint, "AFTER", -3);
|
|
6826
|
+
__publicField(PathConstraint, "epsilon", 1e-5);
|
|
6774
6827
|
|
|
6775
6828
|
// spine-core/src/Slot.ts
|
|
6776
6829
|
var Slot = class {
|
|
6830
|
+
/** The slot's setup pose data. */
|
|
6831
|
+
data;
|
|
6832
|
+
/** The bone this slot belongs to. */
|
|
6833
|
+
bone;
|
|
6834
|
+
/** The color used to tint the slot's attachment. If {@link #getDarkColor()} is set, this is used as the light color for two
|
|
6835
|
+
* color tinting. */
|
|
6836
|
+
color;
|
|
6837
|
+
/** 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
|
|
6838
|
+
* color's alpha is not used. */
|
|
6839
|
+
darkColor = null;
|
|
6840
|
+
attachment = null;
|
|
6841
|
+
attachmentState = 0;
|
|
6842
|
+
/** The index of the texture region to display when the slot's attachment has a {@link Sequence}. -1 represents the
|
|
6843
|
+
* {@link Sequence#getSetupIndex()}. */
|
|
6844
|
+
sequenceIndex = -1;
|
|
6845
|
+
/** Values to deform the slot's attachment. For an unweighted mesh, the entries are local positions for each vertex. For a
|
|
6846
|
+
* weighted mesh, the entries are an offset for each vertex which will be added to the mesh's local vertex positions.
|
|
6847
|
+
*
|
|
6848
|
+
* See {@link VertexAttachment#computeWorldVertices()} and {@link DeformTimeline}. */
|
|
6849
|
+
deform = new Array();
|
|
6777
6850
|
constructor(data, bone) {
|
|
6778
|
-
/** 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
|
|
6779
|
-
* color's alpha is not used. */
|
|
6780
|
-
this.darkColor = null;
|
|
6781
|
-
this.attachment = null;
|
|
6782
|
-
this.attachmentState = 0;
|
|
6783
|
-
/** The index of the texture region to display when the slot's attachment has a {@link Sequence}. -1 represents the
|
|
6784
|
-
* {@link Sequence#getSetupIndex()}. */
|
|
6785
|
-
this.sequenceIndex = -1;
|
|
6786
|
-
/** Values to deform the slot's attachment. For an unweighted mesh, the entries are local positions for each vertex. For a
|
|
6787
|
-
* weighted mesh, the entries are an offset for each vertex which will be added to the mesh's local vertex positions.
|
|
6788
|
-
*
|
|
6789
|
-
* See {@link VertexAttachment#computeWorldVertices()} and {@link DeformTimeline}. */
|
|
6790
|
-
this.deform = new Array();
|
|
6791
6851
|
if (!data)
|
|
6792
6852
|
throw new Error("data cannot be null.");
|
|
6793
6853
|
if (!bone)
|
|
@@ -6834,15 +6894,21 @@ var spine = (() => {
|
|
|
6834
6894
|
|
|
6835
6895
|
// spine-core/src/TransformConstraint.ts
|
|
6836
6896
|
var TransformConstraint = class {
|
|
6897
|
+
/** The transform constraint's setup pose data. */
|
|
6898
|
+
data;
|
|
6899
|
+
/** The bones that will be modified by this transform constraint. */
|
|
6900
|
+
bones;
|
|
6901
|
+
/** The target bone whose world transform will be copied to the constrained bones. */
|
|
6902
|
+
target;
|
|
6903
|
+
mixRotate = 0;
|
|
6904
|
+
mixX = 0;
|
|
6905
|
+
mixY = 0;
|
|
6906
|
+
mixScaleX = 0;
|
|
6907
|
+
mixScaleY = 0;
|
|
6908
|
+
mixShearY = 0;
|
|
6909
|
+
temp = new Vector2();
|
|
6910
|
+
active = false;
|
|
6837
6911
|
constructor(data, skeleton) {
|
|
6838
|
-
this.mixRotate = 0;
|
|
6839
|
-
this.mixX = 0;
|
|
6840
|
-
this.mixY = 0;
|
|
6841
|
-
this.mixScaleX = 0;
|
|
6842
|
-
this.mixScaleY = 0;
|
|
6843
|
-
this.mixShearY = 0;
|
|
6844
|
-
this.temp = new Vector2();
|
|
6845
|
-
this.active = false;
|
|
6846
6912
|
if (!data)
|
|
6847
6913
|
throw new Error("data cannot be null.");
|
|
6848
6914
|
if (!skeleton)
|
|
@@ -7048,21 +7114,43 @@ var spine = (() => {
|
|
|
7048
7114
|
|
|
7049
7115
|
// spine-core/src/Skeleton.ts
|
|
7050
7116
|
var _Skeleton = class {
|
|
7117
|
+
/** The skeleton's setup pose data. */
|
|
7118
|
+
data;
|
|
7119
|
+
/** The skeleton's bones, sorted parent first. The root bone is always the first bone. */
|
|
7120
|
+
bones;
|
|
7121
|
+
/** The skeleton's slots. */
|
|
7122
|
+
slots;
|
|
7123
|
+
/** The skeleton's slots in the order they should be drawn. The returned array may be modified to change the draw order. */
|
|
7124
|
+
drawOrder;
|
|
7125
|
+
/** The skeleton's IK constraints. */
|
|
7126
|
+
ikConstraints;
|
|
7127
|
+
/** The skeleton's transform constraints. */
|
|
7128
|
+
transformConstraints;
|
|
7129
|
+
/** The skeleton's path constraints. */
|
|
7130
|
+
pathConstraints;
|
|
7131
|
+
/** The list of bones and constraints, sorted in the order they should be updated, as computed by {@link #updateCache()}. */
|
|
7132
|
+
_updateCache = new Array();
|
|
7133
|
+
/** The skeleton's current skin. May be null. */
|
|
7134
|
+
skin = null;
|
|
7135
|
+
/** The color to tint all the skeleton's attachments. */
|
|
7136
|
+
color;
|
|
7137
|
+
/** Scales the entire skeleton on the X axis. This affects all bones, even if the bone's transform mode disallows scale
|
|
7138
|
+
* inheritance. */
|
|
7139
|
+
scaleX = 1;
|
|
7140
|
+
/** Scales the entire skeleton on the Y axis. This affects all bones, even if the bone's transform mode disallows scale
|
|
7141
|
+
* inheritance. */
|
|
7142
|
+
_scaleY = 1;
|
|
7143
|
+
get scaleY() {
|
|
7144
|
+
return _Skeleton.yDown ? -this._scaleY : this._scaleY;
|
|
7145
|
+
}
|
|
7146
|
+
set scaleY(scaleY) {
|
|
7147
|
+
this._scaleY = scaleY;
|
|
7148
|
+
}
|
|
7149
|
+
/** Sets the skeleton X position, which is added to the root bone worldX position. */
|
|
7150
|
+
x = 0;
|
|
7151
|
+
/** Sets the skeleton Y position, which is added to the root bone worldY position. */
|
|
7152
|
+
y = 0;
|
|
7051
7153
|
constructor(data) {
|
|
7052
|
-
/** The list of bones and constraints, sorted in the order they should be updated, as computed by {@link #updateCache()}. */
|
|
7053
|
-
this._updateCache = new Array();
|
|
7054
|
-
/** The skeleton's current skin. May be null. */
|
|
7055
|
-
this.skin = null;
|
|
7056
|
-
/** Scales the entire skeleton on the X axis. This affects all bones, even if the bone's transform mode disallows scale
|
|
7057
|
-
* inheritance. */
|
|
7058
|
-
this.scaleX = 1;
|
|
7059
|
-
/** Scales the entire skeleton on the Y axis. This affects all bones, even if the bone's transform mode disallows scale
|
|
7060
|
-
* inheritance. */
|
|
7061
|
-
this._scaleY = 1;
|
|
7062
|
-
/** Sets the skeleton X position, which is added to the root bone worldX position. */
|
|
7063
|
-
this.x = 0;
|
|
7064
|
-
/** Sets the skeleton Y position, which is added to the root bone worldY position. */
|
|
7065
|
-
this.y = 0;
|
|
7066
7154
|
if (!data)
|
|
7067
7155
|
throw new Error("data cannot be null.");
|
|
7068
7156
|
this.data = data;
|
|
@@ -7106,12 +7194,6 @@ var spine = (() => {
|
|
|
7106
7194
|
this.color = new Color(1, 1, 1, 1);
|
|
7107
7195
|
this.updateCache();
|
|
7108
7196
|
}
|
|
7109
|
-
get scaleY() {
|
|
7110
|
-
return _Skeleton.yDown ? -this._scaleY : this._scaleY;
|
|
7111
|
-
}
|
|
7112
|
-
set scaleY(scaleY) {
|
|
7113
|
-
this._scaleY = scaleY;
|
|
7114
|
-
}
|
|
7115
7197
|
/** Caches information about bones and constraints. Must be called if the {@link #getSkin()} is modified or if bones,
|
|
7116
7198
|
* constraints, or weighted path attachments are added or removed. */
|
|
7117
7199
|
updateCache() {
|
|
@@ -7588,55 +7670,53 @@ var spine = (() => {
|
|
|
7588
7670
|
}
|
|
7589
7671
|
};
|
|
7590
7672
|
var Skeleton = _Skeleton;
|
|
7591
|
-
Skeleton
|
|
7673
|
+
__publicField(Skeleton, "yDown", false);
|
|
7592
7674
|
|
|
7593
7675
|
// spine-core/src/SkeletonData.ts
|
|
7594
7676
|
var SkeletonData = class {
|
|
7595
|
-
|
|
7596
|
-
|
|
7597
|
-
|
|
7598
|
-
|
|
7599
|
-
|
|
7600
|
-
|
|
7601
|
-
|
|
7602
|
-
|
|
7603
|
-
|
|
7604
|
-
|
|
7605
|
-
|
|
7606
|
-
|
|
7607
|
-
|
|
7608
|
-
|
|
7609
|
-
|
|
7610
|
-
|
|
7611
|
-
|
|
7612
|
-
|
|
7613
|
-
|
|
7614
|
-
|
|
7615
|
-
|
|
7616
|
-
|
|
7617
|
-
|
|
7618
|
-
|
|
7619
|
-
|
|
7620
|
-
|
|
7621
|
-
|
|
7622
|
-
|
|
7623
|
-
|
|
7624
|
-
|
|
7625
|
-
|
|
7626
|
-
|
|
7627
|
-
|
|
7628
|
-
|
|
7629
|
-
|
|
7630
|
-
|
|
7631
|
-
|
|
7632
|
-
|
|
7633
|
-
|
|
7634
|
-
|
|
7635
|
-
|
|
7636
|
-
|
|
7637
|
-
|
|
7638
|
-
this.audioPath = null;
|
|
7639
|
-
}
|
|
7677
|
+
/** The skeleton's name, which by default is the name of the skeleton data file, if possible. May be null. */
|
|
7678
|
+
name = null;
|
|
7679
|
+
/** The skeleton's bones, sorted parent first. The root bone is always the first bone. */
|
|
7680
|
+
bones = new Array();
|
|
7681
|
+
// Ordered parents first.
|
|
7682
|
+
/** The skeleton's slots. */
|
|
7683
|
+
slots = new Array();
|
|
7684
|
+
// Setup pose draw order.
|
|
7685
|
+
skins = new Array();
|
|
7686
|
+
/** The skeleton's default skin. By default this skin contains all attachments that were not in a skin in Spine.
|
|
7687
|
+
*
|
|
7688
|
+
* See {@link Skeleton#getAttachmentByName()}.
|
|
7689
|
+
* May be null. */
|
|
7690
|
+
defaultSkin = null;
|
|
7691
|
+
/** The skeleton's events. */
|
|
7692
|
+
events = new Array();
|
|
7693
|
+
/** The skeleton's animations. */
|
|
7694
|
+
animations = new Array();
|
|
7695
|
+
/** The skeleton's IK constraints. */
|
|
7696
|
+
ikConstraints = new Array();
|
|
7697
|
+
/** The skeleton's transform constraints. */
|
|
7698
|
+
transformConstraints = new Array();
|
|
7699
|
+
/** The skeleton's path constraints. */
|
|
7700
|
+
pathConstraints = new Array();
|
|
7701
|
+
/** The X coordinate of the skeleton's axis aligned bounding box in the setup pose. */
|
|
7702
|
+
x = 0;
|
|
7703
|
+
/** The Y coordinate of the skeleton's axis aligned bounding box in the setup pose. */
|
|
7704
|
+
y = 0;
|
|
7705
|
+
/** The width of the skeleton's axis aligned bounding box in the setup pose. */
|
|
7706
|
+
width = 0;
|
|
7707
|
+
/** The height of the skeleton's axis aligned bounding box in the setup pose. */
|
|
7708
|
+
height = 0;
|
|
7709
|
+
/** The Spine version used to export the skeleton data, or null. */
|
|
7710
|
+
version = null;
|
|
7711
|
+
/** The skeleton data hash. This value will change if any of the skeleton data has changed. May be null. */
|
|
7712
|
+
hash = null;
|
|
7713
|
+
// Nonessential
|
|
7714
|
+
/** The dopesheet FPS in Spine. Available only when nonessential data was exported. */
|
|
7715
|
+
fps = 0;
|
|
7716
|
+
/** The path to the images directory as defined in Spine. Available only when nonessential data was exported. May be null. */
|
|
7717
|
+
imagesPath = null;
|
|
7718
|
+
/** The path to the audio directory as defined in Spine. Available only when nonessential data was exported. May be null. */
|
|
7719
|
+
audioPath = null;
|
|
7640
7720
|
/** Finds a bone by comparing each bone's name. It is more efficient to cache the results of this method than to call it
|
|
7641
7721
|
* multiple times.
|
|
7642
7722
|
* @returns May be null. */
|
|
@@ -7760,10 +7840,12 @@ var spine = (() => {
|
|
|
7760
7840
|
}
|
|
7761
7841
|
};
|
|
7762
7842
|
var Skin = class {
|
|
7843
|
+
/** The skin's name, which is unique across all skins in the skeleton. */
|
|
7844
|
+
name;
|
|
7845
|
+
attachments = new Array();
|
|
7846
|
+
bones = Array();
|
|
7847
|
+
constraints = new Array();
|
|
7763
7848
|
constructor(name) {
|
|
7764
|
-
this.attachments = new Array();
|
|
7765
|
-
this.bones = Array();
|
|
7766
|
-
this.constraints = new Array();
|
|
7767
7849
|
if (!name)
|
|
7768
7850
|
throw new Error("name cannot be null.");
|
|
7769
7851
|
this.name = name;
|
|
@@ -7920,19 +8002,23 @@ var spine = (() => {
|
|
|
7920
8002
|
|
|
7921
8003
|
// spine-core/src/SlotData.ts
|
|
7922
8004
|
var SlotData = class {
|
|
8005
|
+
/** The index of the slot in {@link Skeleton#getSlots()}. */
|
|
8006
|
+
index = 0;
|
|
8007
|
+
/** The name of the slot, which is unique across all slots in the skeleton. */
|
|
8008
|
+
name;
|
|
8009
|
+
/** The bone this slot belongs to. */
|
|
8010
|
+
boneData;
|
|
8011
|
+
/** The color used to tint the slot's attachment. If {@link #getDarkColor()} is set, this is used as the light color for two
|
|
8012
|
+
* color tinting. */
|
|
8013
|
+
color = new Color(1, 1, 1, 1);
|
|
8014
|
+
/** 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
|
|
8015
|
+
* color's alpha is not used. */
|
|
8016
|
+
darkColor = null;
|
|
8017
|
+
/** The name of the attachment that is visible for this slot in the setup pose, or null if no attachment is visible. */
|
|
8018
|
+
attachmentName = null;
|
|
8019
|
+
/** The blend mode for drawing the slot's attachment. */
|
|
8020
|
+
blendMode = BlendMode.Normal;
|
|
7923
8021
|
constructor(index, name, boneData) {
|
|
7924
|
-
/** The index of the slot in {@link Skeleton#getSlots()}. */
|
|
7925
|
-
this.index = 0;
|
|
7926
|
-
/** The color used to tint the slot's attachment. If {@link #getDarkColor()} is set, this is used as the light color for two
|
|
7927
|
-
* color tinting. */
|
|
7928
|
-
this.color = new Color(1, 1, 1, 1);
|
|
7929
|
-
/** 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
|
|
7930
|
-
* color's alpha is not used. */
|
|
7931
|
-
this.darkColor = null;
|
|
7932
|
-
/** The name of the attachment that is visible for this slot in the setup pose, or null if no attachment is visible. */
|
|
7933
|
-
this.attachmentName = null;
|
|
7934
|
-
/** The blend mode for drawing the slot's attachment. */
|
|
7935
|
-
this.blendMode = BlendMode.Normal;
|
|
7936
8022
|
if (index < 0)
|
|
7937
8023
|
throw new Error("index must be >= 0.");
|
|
7938
8024
|
if (!name)
|
|
@@ -7954,33 +8040,10 @@ var spine = (() => {
|
|
|
7954
8040
|
|
|
7955
8041
|
// spine-core/src/TransformConstraintData.ts
|
|
7956
8042
|
var TransformConstraintData = class extends ConstraintData {
|
|
7957
|
-
|
|
7958
|
-
|
|
7959
|
-
|
|
7960
|
-
|
|
7961
|
-
/** The target bone whose world transform will be copied to the constrained bones. */
|
|
7962
|
-
this._target = null;
|
|
7963
|
-
this.mixRotate = 0;
|
|
7964
|
-
this.mixX = 0;
|
|
7965
|
-
this.mixY = 0;
|
|
7966
|
-
this.mixScaleX = 0;
|
|
7967
|
-
this.mixScaleY = 0;
|
|
7968
|
-
this.mixShearY = 0;
|
|
7969
|
-
/** An offset added to the constrained bone rotation. */
|
|
7970
|
-
this.offsetRotation = 0;
|
|
7971
|
-
/** An offset added to the constrained bone X translation. */
|
|
7972
|
-
this.offsetX = 0;
|
|
7973
|
-
/** An offset added to the constrained bone Y translation. */
|
|
7974
|
-
this.offsetY = 0;
|
|
7975
|
-
/** An offset added to the constrained bone scaleX. */
|
|
7976
|
-
this.offsetScaleX = 0;
|
|
7977
|
-
/** An offset added to the constrained bone scaleY. */
|
|
7978
|
-
this.offsetScaleY = 0;
|
|
7979
|
-
/** An offset added to the constrained bone shearY. */
|
|
7980
|
-
this.offsetShearY = 0;
|
|
7981
|
-
this.relative = false;
|
|
7982
|
-
this.local = false;
|
|
7983
|
-
}
|
|
8043
|
+
/** The bones that will be modified by this transform constraint. */
|
|
8044
|
+
bones = new Array();
|
|
8045
|
+
/** The target bone whose world transform will be copied to the constrained bones. */
|
|
8046
|
+
_target = null;
|
|
7984
8047
|
set target(boneData) {
|
|
7985
8048
|
this._target = boneData;
|
|
7986
8049
|
}
|
|
@@ -7990,17 +8053,41 @@ var spine = (() => {
|
|
|
7990
8053
|
else
|
|
7991
8054
|
return this._target;
|
|
7992
8055
|
}
|
|
8056
|
+
mixRotate = 0;
|
|
8057
|
+
mixX = 0;
|
|
8058
|
+
mixY = 0;
|
|
8059
|
+
mixScaleX = 0;
|
|
8060
|
+
mixScaleY = 0;
|
|
8061
|
+
mixShearY = 0;
|
|
8062
|
+
/** An offset added to the constrained bone rotation. */
|
|
8063
|
+
offsetRotation = 0;
|
|
8064
|
+
/** An offset added to the constrained bone X translation. */
|
|
8065
|
+
offsetX = 0;
|
|
8066
|
+
/** An offset added to the constrained bone Y translation. */
|
|
8067
|
+
offsetY = 0;
|
|
8068
|
+
/** An offset added to the constrained bone scaleX. */
|
|
8069
|
+
offsetScaleX = 0;
|
|
8070
|
+
/** An offset added to the constrained bone scaleY. */
|
|
8071
|
+
offsetScaleY = 0;
|
|
8072
|
+
/** An offset added to the constrained bone shearY. */
|
|
8073
|
+
offsetShearY = 0;
|
|
8074
|
+
relative = false;
|
|
8075
|
+
local = false;
|
|
8076
|
+
constructor(name) {
|
|
8077
|
+
super(name, 0, false);
|
|
8078
|
+
}
|
|
7993
8079
|
};
|
|
7994
8080
|
|
|
7995
8081
|
// spine-core/src/SkeletonBinary.ts
|
|
7996
8082
|
var SkeletonBinary = class {
|
|
8083
|
+
/** Scales bone positions, image sizes, and translations as they are loaded. This allows different size images to be used at
|
|
8084
|
+
* runtime than were used in Spine.
|
|
8085
|
+
*
|
|
8086
|
+
* See [Scaling](http://esotericsoftware.com/spine-loading-skeleton-data#Scaling) in the Spine Runtimes Guide. */
|
|
8087
|
+
scale = 1;
|
|
8088
|
+
attachmentLoader;
|
|
8089
|
+
linkedMeshes = new Array();
|
|
7997
8090
|
constructor(attachmentLoader) {
|
|
7998
|
-
/** Scales bone positions, image sizes, and translations as they are loaded. This allows different size images to be used at
|
|
7999
|
-
* runtime than were used in Spine.
|
|
8000
|
-
*
|
|
8001
|
-
* See [Scaling](http://esotericsoftware.com/spine-loading-skeleton-data#Scaling) in the Spine Runtimes Guide. */
|
|
8002
|
-
this.scale = 1;
|
|
8003
|
-
this.linkedMeshes = new Array();
|
|
8004
8091
|
this.attachmentLoader = attachmentLoader;
|
|
8005
8092
|
}
|
|
8006
8093
|
readSkeletonData(binary) {
|
|
@@ -9014,6 +9101,11 @@ var spine = (() => {
|
|
|
9014
9101
|
}
|
|
9015
9102
|
};
|
|
9016
9103
|
var LinkedMesh = class {
|
|
9104
|
+
parent;
|
|
9105
|
+
skin;
|
|
9106
|
+
slotIndex;
|
|
9107
|
+
mesh;
|
|
9108
|
+
inheritTimeline;
|
|
9017
9109
|
constructor(mesh, skin, slotIndex, parent, inheritDeform) {
|
|
9018
9110
|
this.mesh = mesh;
|
|
9019
9111
|
this.skin = skin;
|
|
@@ -9107,23 +9199,21 @@ var spine = (() => {
|
|
|
9107
9199
|
|
|
9108
9200
|
// spine-core/src/SkeletonBounds.ts
|
|
9109
9201
|
var SkeletonBounds = class {
|
|
9110
|
-
|
|
9111
|
-
|
|
9112
|
-
|
|
9113
|
-
|
|
9114
|
-
|
|
9115
|
-
|
|
9116
|
-
|
|
9117
|
-
|
|
9118
|
-
|
|
9119
|
-
|
|
9120
|
-
|
|
9121
|
-
|
|
9122
|
-
|
|
9123
|
-
|
|
9124
|
-
|
|
9125
|
-
});
|
|
9126
|
-
}
|
|
9202
|
+
/** The left edge of the axis aligned bounding box. */
|
|
9203
|
+
minX = 0;
|
|
9204
|
+
/** The bottom edge of the axis aligned bounding box. */
|
|
9205
|
+
minY = 0;
|
|
9206
|
+
/** The right edge of the axis aligned bounding box. */
|
|
9207
|
+
maxX = 0;
|
|
9208
|
+
/** The top edge of the axis aligned bounding box. */
|
|
9209
|
+
maxY = 0;
|
|
9210
|
+
/** The visible bounding boxes. */
|
|
9211
|
+
boundingBoxes = new Array();
|
|
9212
|
+
/** The world vertices for the bounding box polygons. */
|
|
9213
|
+
polygons = new Array();
|
|
9214
|
+
polygonPool = new Pool(() => {
|
|
9215
|
+
return Utils.newFloatArray(16);
|
|
9216
|
+
});
|
|
9127
9217
|
/** Clears any previous polygons, finds all visible bounding box attachments, and computes the world vertices for each bounding
|
|
9128
9218
|
* box's polygon.
|
|
9129
9219
|
* @param updateAabb If true, the axis aligned bounding box containing all the polygons is computed. If false, the
|
|
@@ -9294,19 +9384,17 @@ var spine = (() => {
|
|
|
9294
9384
|
|
|
9295
9385
|
// spine-core/src/Triangulator.ts
|
|
9296
9386
|
var Triangulator = class {
|
|
9297
|
-
|
|
9298
|
-
|
|
9299
|
-
|
|
9300
|
-
|
|
9301
|
-
|
|
9302
|
-
|
|
9303
|
-
|
|
9304
|
-
|
|
9305
|
-
|
|
9306
|
-
|
|
9307
|
-
|
|
9308
|
-
});
|
|
9309
|
-
}
|
|
9387
|
+
convexPolygons = new Array();
|
|
9388
|
+
convexPolygonsIndices = new Array();
|
|
9389
|
+
indicesArray = new Array();
|
|
9390
|
+
isConcaveArray = new Array();
|
|
9391
|
+
triangles = new Array();
|
|
9392
|
+
polygonPool = new Pool(() => {
|
|
9393
|
+
return new Array();
|
|
9394
|
+
});
|
|
9395
|
+
polygonIndicesPool = new Pool(() => {
|
|
9396
|
+
return new Array();
|
|
9397
|
+
});
|
|
9310
9398
|
triangulate(verticesArray) {
|
|
9311
9399
|
let vertices = verticesArray;
|
|
9312
9400
|
let vertexCount = verticesArray.length >> 1;
|
|
@@ -9510,16 +9598,14 @@ var spine = (() => {
|
|
|
9510
9598
|
|
|
9511
9599
|
// spine-core/src/SkeletonClipping.ts
|
|
9512
9600
|
var SkeletonClipping = class {
|
|
9513
|
-
|
|
9514
|
-
|
|
9515
|
-
|
|
9516
|
-
|
|
9517
|
-
|
|
9518
|
-
|
|
9519
|
-
|
|
9520
|
-
|
|
9521
|
-
this.clippingPolygons = null;
|
|
9522
|
-
}
|
|
9601
|
+
triangulator = new Triangulator();
|
|
9602
|
+
clippingPolygon = new Array();
|
|
9603
|
+
clipOutput = new Array();
|
|
9604
|
+
clippedVertices = new Array();
|
|
9605
|
+
clippedTriangles = new Array();
|
|
9606
|
+
scratch = new Array();
|
|
9607
|
+
clipAttachment = null;
|
|
9608
|
+
clippingPolygons = null;
|
|
9523
9609
|
clipStart(slot, clip) {
|
|
9524
9610
|
if (this.clipAttachment)
|
|
9525
9611
|
return 0;
|
|
@@ -9799,13 +9885,14 @@ var spine = (() => {
|
|
|
9799
9885
|
|
|
9800
9886
|
// spine-core/src/SkeletonJson.ts
|
|
9801
9887
|
var SkeletonJson = class {
|
|
9888
|
+
attachmentLoader;
|
|
9889
|
+
/** Scales bone positions, image sizes, and translations as they are loaded. This allows different size images to be used at
|
|
9890
|
+
* runtime than were used in Spine.
|
|
9891
|
+
*
|
|
9892
|
+
* See [Scaling](http://esotericsoftware.com/spine-loading-skeleton-data#Scaling) in the Spine Runtimes Guide. */
|
|
9893
|
+
scale = 1;
|
|
9894
|
+
linkedMeshes = new Array();
|
|
9802
9895
|
constructor(attachmentLoader) {
|
|
9803
|
-
/** Scales bone positions, image sizes, and translations as they are loaded. This allows different size images to be used at
|
|
9804
|
-
* runtime than were used in Spine.
|
|
9805
|
-
*
|
|
9806
|
-
* See [Scaling](http://esotericsoftware.com/spine-loading-skeleton-data#Scaling) in the Spine Runtimes Guide. */
|
|
9807
|
-
this.scale = 1;
|
|
9808
|
-
this.linkedMeshes = new Array();
|
|
9809
9896
|
this.attachmentLoader = attachmentLoader;
|
|
9810
9897
|
}
|
|
9811
9898
|
readSkeletonData(json) {
|
|
@@ -10667,6 +10754,11 @@ var spine = (() => {
|
|
|
10667
10754
|
}
|
|
10668
10755
|
};
|
|
10669
10756
|
var LinkedMesh2 = class {
|
|
10757
|
+
parent;
|
|
10758
|
+
skin;
|
|
10759
|
+
slotIndex;
|
|
10760
|
+
mesh;
|
|
10761
|
+
inheritTimeline;
|
|
10670
10762
|
constructor(mesh, skin, slotIndex, parent, inheritDeform) {
|
|
10671
10763
|
this.mesh = mesh;
|
|
10672
10764
|
this.skin = skin;
|
|
@@ -10776,11 +10868,12 @@ var spine = (() => {
|
|
|
10776
10868
|
// spine-canvas/src/SkeletonRenderer.ts
|
|
10777
10869
|
var worldVertices = Utils.newFloatArray(8);
|
|
10778
10870
|
var _SkeletonRenderer = class {
|
|
10871
|
+
ctx;
|
|
10872
|
+
triangleRendering = false;
|
|
10873
|
+
debugRendering = false;
|
|
10874
|
+
vertices = Utils.newFloatArray(8 * 1024);
|
|
10875
|
+
tempColor = new Color();
|
|
10779
10876
|
constructor(context) {
|
|
10780
|
-
this.triangleRendering = false;
|
|
10781
|
-
this.debugRendering = false;
|
|
10782
|
-
this.vertices = Utils.newFloatArray(8 * 1024);
|
|
10783
|
-
this.tempColor = new Color();
|
|
10784
10877
|
this.ctx = context;
|
|
10785
10878
|
}
|
|
10786
10879
|
draw(skeleton) {
|
|
@@ -10999,8 +11092,8 @@ var spine = (() => {
|
|
|
10999
11092
|
}
|
|
11000
11093
|
};
|
|
11001
11094
|
var SkeletonRenderer = _SkeletonRenderer;
|
|
11002
|
-
SkeletonRenderer
|
|
11003
|
-
SkeletonRenderer
|
|
11095
|
+
__publicField(SkeletonRenderer, "QUAD_TRIANGLES", [0, 1, 2, 2, 3, 0]);
|
|
11096
|
+
__publicField(SkeletonRenderer, "VERTEX_SIZE", 2 + 2 + 4);
|
|
11004
11097
|
return __toCommonJS(src_exports);
|
|
11005
11098
|
})();
|
|
11006
11099
|
//# sourceMappingURL=spine-canvas.js.map
|