@esotericsoftware/spine-webgl 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.d.ts +1 -1
- package/dist/AssetManager.js +2 -2
- package/dist/Camera.d.ts +2 -2
- package/dist/Camera.js +15 -15
- package/dist/CameraController.d.ts +1 -1
- package/dist/CameraController.js +5 -3
- package/dist/GLTexture.d.ts +1 -1
- package/dist/GLTexture.js +7 -6
- package/dist/Input.js +13 -9
- package/dist/LoadingScreen.d.ts +1 -1
- package/dist/LoadingScreen.js +14 -14
- package/dist/Matrix4.d.ts +1 -1
- package/dist/Matrix4.js +8 -8
- package/dist/Mesh.d.ts +2 -2
- package/dist/Mesh.js +17 -10
- package/dist/PolygonBatcher.d.ts +3 -3
- package/dist/PolygonBatcher.js +23 -18
- package/dist/SceneRenderer.d.ts +6 -6
- package/dist/SceneRenderer.js +19 -10
- package/dist/Shader.d.ts +1 -1
- package/dist/Shader.js +19 -14
- package/dist/ShapeRenderer.d.ts +2 -2
- package/dist/ShapeRenderer.js +14 -9
- package/dist/SkeletonDebugRenderer.d.ts +2 -2
- package/dist/SkeletonDebugRenderer.js +26 -25
- package/dist/SkeletonRenderer.d.ts +2 -2
- package/dist/SkeletonRenderer.js +17 -13
- package/dist/SpineCanvas.d.ts +1 -1
- package/dist/SpineCanvas.js +17 -5
- package/dist/Vector3.d.ts +1 -1
- package/dist/Vector3.js +5 -5
- package/dist/WebGL.js +4 -2
- package/dist/iife/spine-webgl.js +992 -858
- package/dist/iife/spine-webgl.js.map +2 -2
- package/dist/iife/spine-webgl.min.js +26 -26
- package/dist/index.d.ts +17 -17
- package/dist/index.js +18 -18
- package/package.json +3 -2
package/dist/iife/spine-webgl.js
CHANGED
|
@@ -4,6 +4,7 @@ var spine = (() => {
|
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7
8
|
var __export = (target, all) => {
|
|
8
9
|
for (var name in all)
|
|
9
10
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -17,6 +18,10 @@ var spine = (() => {
|
|
|
17
18
|
return to;
|
|
18
19
|
};
|
|
19
20
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
var __publicField = (obj, key, value) => {
|
|
22
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
23
|
+
return value;
|
|
24
|
+
};
|
|
20
25
|
|
|
21
26
|
// spine-webgl/src/index.ts
|
|
22
27
|
var src_exports = {};
|
|
@@ -173,9 +178,7 @@ var spine = (() => {
|
|
|
173
178
|
|
|
174
179
|
// spine-core/src/Utils.ts
|
|
175
180
|
var IntSet = class {
|
|
176
|
-
|
|
177
|
-
this.array = new Array();
|
|
178
|
-
}
|
|
181
|
+
array = new Array();
|
|
179
182
|
add(value) {
|
|
180
183
|
let contains = this.contains(value);
|
|
181
184
|
this.array[value | 0] = value | 0;
|
|
@@ -192,10 +195,8 @@ var spine = (() => {
|
|
|
192
195
|
}
|
|
193
196
|
};
|
|
194
197
|
var StringSet = class {
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
this.size = 0;
|
|
198
|
-
}
|
|
198
|
+
entries = {};
|
|
199
|
+
size = 0;
|
|
199
200
|
add(value) {
|
|
200
201
|
let contains = this.entries[value];
|
|
201
202
|
this.entries[value] = true;
|
|
@@ -290,11 +291,11 @@ var spine = (() => {
|
|
|
290
291
|
}
|
|
291
292
|
};
|
|
292
293
|
var Color = _Color;
|
|
293
|
-
Color
|
|
294
|
-
Color
|
|
295
|
-
Color
|
|
296
|
-
Color
|
|
297
|
-
Color
|
|
294
|
+
__publicField(Color, "WHITE", new _Color(1, 1, 1, 1));
|
|
295
|
+
__publicField(Color, "RED", new _Color(1, 0, 0, 1));
|
|
296
|
+
__publicField(Color, "GREEN", new _Color(0, 1, 0, 1));
|
|
297
|
+
__publicField(Color, "BLUE", new _Color(0, 0, 1, 1));
|
|
298
|
+
__publicField(Color, "MAGENTA", new _Color(1, 0, 1, 1));
|
|
298
299
|
var _MathUtils = class {
|
|
299
300
|
static clamp(value, min, max) {
|
|
300
301
|
if (value < min)
|
|
@@ -334,21 +335,21 @@ var spine = (() => {
|
|
|
334
335
|
}
|
|
335
336
|
};
|
|
336
337
|
var MathUtils = _MathUtils;
|
|
337
|
-
MathUtils
|
|
338
|
-
MathUtils
|
|
339
|
-
MathUtils
|
|
340
|
-
MathUtils
|
|
341
|
-
MathUtils
|
|
342
|
-
MathUtils
|
|
338
|
+
__publicField(MathUtils, "PI", 3.1415927);
|
|
339
|
+
__publicField(MathUtils, "PI2", _MathUtils.PI * 2);
|
|
340
|
+
__publicField(MathUtils, "radiansToDegrees", 180 / _MathUtils.PI);
|
|
341
|
+
__publicField(MathUtils, "radDeg", _MathUtils.radiansToDegrees);
|
|
342
|
+
__publicField(MathUtils, "degreesToRadians", _MathUtils.PI / 180);
|
|
343
|
+
__publicField(MathUtils, "degRad", _MathUtils.degreesToRadians);
|
|
343
344
|
var Interpolation = class {
|
|
344
345
|
apply(start, end, a) {
|
|
345
346
|
return start + (end - start) * this.applyInternal(a);
|
|
346
347
|
}
|
|
347
348
|
};
|
|
348
349
|
var Pow = class extends Interpolation {
|
|
350
|
+
power = 2;
|
|
349
351
|
constructor(power) {
|
|
350
352
|
super();
|
|
351
|
-
this.power = 2;
|
|
352
353
|
this.power = power;
|
|
353
354
|
}
|
|
354
355
|
applyInternal(a) {
|
|
@@ -437,7 +438,7 @@ var spine = (() => {
|
|
|
437
438
|
}
|
|
438
439
|
};
|
|
439
440
|
var Utils = _Utils;
|
|
440
|
-
Utils
|
|
441
|
+
__publicField(Utils, "SUPPORTS_TYPED_ARRAYS", typeof Float32Array !== "undefined");
|
|
441
442
|
var DebugUtils = class {
|
|
442
443
|
static logBones(skeleton) {
|
|
443
444
|
for (let i = 0; i < skeleton.bones.length; i++) {
|
|
@@ -447,8 +448,9 @@ var spine = (() => {
|
|
|
447
448
|
}
|
|
448
449
|
};
|
|
449
450
|
var Pool = class {
|
|
451
|
+
items = new Array();
|
|
452
|
+
instantiator;
|
|
450
453
|
constructor(instantiator) {
|
|
451
|
-
this.items = new Array();
|
|
452
454
|
this.instantiator = instantiator;
|
|
453
455
|
}
|
|
454
456
|
obtain() {
|
|
@@ -492,15 +494,13 @@ var spine = (() => {
|
|
|
492
494
|
}
|
|
493
495
|
};
|
|
494
496
|
var TimeKeeper = class {
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
this.frameTime = 0;
|
|
503
|
-
}
|
|
497
|
+
maxDelta = 0.064;
|
|
498
|
+
framesPerSecond = 0;
|
|
499
|
+
delta = 0;
|
|
500
|
+
totalTime = 0;
|
|
501
|
+
lastTime = Date.now() / 1e3;
|
|
502
|
+
frameCount = 0;
|
|
503
|
+
frameTime = 0;
|
|
504
504
|
update() {
|
|
505
505
|
let now = Date.now() / 1e3;
|
|
506
506
|
this.delta = now - this.lastTime;
|
|
@@ -518,11 +518,12 @@ var spine = (() => {
|
|
|
518
518
|
}
|
|
519
519
|
};
|
|
520
520
|
var WindowedMean = class {
|
|
521
|
+
values;
|
|
522
|
+
addedValues = 0;
|
|
523
|
+
lastValue = 0;
|
|
524
|
+
mean = 0;
|
|
525
|
+
dirty = true;
|
|
521
526
|
constructor(windowSize = 32) {
|
|
522
|
-
this.addedValues = 0;
|
|
523
|
-
this.lastValue = 0;
|
|
524
|
-
this.mean = 0;
|
|
525
|
-
this.dirty = true;
|
|
526
527
|
this.values = new Array(windowSize);
|
|
527
528
|
}
|
|
528
529
|
hasEnoughData() {
|
|
@@ -553,6 +554,7 @@ var spine = (() => {
|
|
|
553
554
|
|
|
554
555
|
// spine-core/src/attachments/Attachment.ts
|
|
555
556
|
var Attachment = class {
|
|
557
|
+
name;
|
|
556
558
|
constructor(name) {
|
|
557
559
|
if (!name)
|
|
558
560
|
throw new Error("name cannot be null.");
|
|
@@ -560,24 +562,24 @@ var spine = (() => {
|
|
|
560
562
|
}
|
|
561
563
|
};
|
|
562
564
|
var _VertexAttachment = class extends Attachment {
|
|
565
|
+
/** The unique ID for this attachment. */
|
|
566
|
+
id = _VertexAttachment.nextID++;
|
|
567
|
+
/** The bones which affect the {@link #getVertices()}. The array entries are, for each vertex, the number of bones affecting
|
|
568
|
+
* the vertex followed by that many bone indices, which is the index of the bone in {@link Skeleton#bones}. Will be null
|
|
569
|
+
* if this attachment has no weights. */
|
|
570
|
+
bones = null;
|
|
571
|
+
/** The vertex positions in the bone's coordinate system. For a non-weighted attachment, the values are `x,y`
|
|
572
|
+
* entries for each vertex. For a weighted attachment, the values are `x,y,weight` entries for each bone affecting
|
|
573
|
+
* each vertex. */
|
|
574
|
+
vertices = [];
|
|
575
|
+
/** The maximum number of world vertex values that can be output by
|
|
576
|
+
* {@link #computeWorldVertices()} using the `count` parameter. */
|
|
577
|
+
worldVerticesLength = 0;
|
|
578
|
+
/** Timelines for the timeline attachment are also applied to this attachment.
|
|
579
|
+
* May be null if no attachment-specific timelines should be applied. */
|
|
580
|
+
timelineAttachment = this;
|
|
563
581
|
constructor(name) {
|
|
564
582
|
super(name);
|
|
565
|
-
/** The unique ID for this attachment. */
|
|
566
|
-
this.id = _VertexAttachment.nextID++;
|
|
567
|
-
/** The bones which affect the {@link #getVertices()}. The array entries are, for each vertex, the number of bones affecting
|
|
568
|
-
* the vertex followed by that many bone indices, which is the index of the bone in {@link Skeleton#bones}. Will be null
|
|
569
|
-
* if this attachment has no weights. */
|
|
570
|
-
this.bones = null;
|
|
571
|
-
/** The vertex positions in the bone's coordinate system. For a non-weighted attachment, the values are `x,y`
|
|
572
|
-
* entries for each vertex. For a weighted attachment, the values are `x,y,weight` entries for each bone affecting
|
|
573
|
-
* each vertex. */
|
|
574
|
-
this.vertices = [];
|
|
575
|
-
/** The maximum number of world vertex values that can be output by
|
|
576
|
-
* {@link #computeWorldVertices()} using the `count` parameter. */
|
|
577
|
-
this.worldVerticesLength = 0;
|
|
578
|
-
/** Timelines for the timeline attachment are also applied to this attachment.
|
|
579
|
-
* May be null if no attachment-specific timelines should be applied. */
|
|
580
|
-
this.timelineAttachment = this;
|
|
581
583
|
}
|
|
582
584
|
/** Transforms the attachment's local {@link #vertices} to world coordinates. If the slot's {@link Slot#deform} is
|
|
583
585
|
* not empty, it is used to deform the vertices.
|
|
@@ -664,16 +666,17 @@ var spine = (() => {
|
|
|
664
666
|
}
|
|
665
667
|
};
|
|
666
668
|
var VertexAttachment = _VertexAttachment;
|
|
667
|
-
VertexAttachment
|
|
669
|
+
__publicField(VertexAttachment, "nextID", 0);
|
|
668
670
|
|
|
669
671
|
// spine-core/src/attachments/Sequence.ts
|
|
670
672
|
var _Sequence = class {
|
|
673
|
+
id = _Sequence.nextID();
|
|
674
|
+
regions;
|
|
675
|
+
start = 0;
|
|
676
|
+
digits = 0;
|
|
677
|
+
/** The index of the region to show for the setup pose. */
|
|
678
|
+
setupIndex = 0;
|
|
671
679
|
constructor(count) {
|
|
672
|
-
this.id = _Sequence.nextID();
|
|
673
|
-
this.start = 0;
|
|
674
|
-
this.digits = 0;
|
|
675
|
-
/** The index of the region to show for the setup pose. */
|
|
676
|
-
this.setupIndex = 0;
|
|
677
680
|
this.regions = new Array(count);
|
|
678
681
|
}
|
|
679
682
|
copy() {
|
|
@@ -709,7 +712,7 @@ var spine = (() => {
|
|
|
709
712
|
}
|
|
710
713
|
};
|
|
711
714
|
var Sequence = _Sequence;
|
|
712
|
-
Sequence
|
|
715
|
+
__publicField(Sequence, "_nextID", 0);
|
|
713
716
|
var SequenceMode = /* @__PURE__ */ ((SequenceMode2) => {
|
|
714
717
|
SequenceMode2[SequenceMode2["hold"] = 0] = "hold";
|
|
715
718
|
SequenceMode2[SequenceMode2["once"] = 1] = "once";
|
|
@@ -732,9 +735,13 @@ var spine = (() => {
|
|
|
732
735
|
|
|
733
736
|
// spine-core/src/Animation.ts
|
|
734
737
|
var Animation = class {
|
|
738
|
+
/** The animation's name, which is unique across all animations in the skeleton. */
|
|
739
|
+
name;
|
|
740
|
+
timelines = [];
|
|
741
|
+
timelineIds = new StringSet();
|
|
742
|
+
/** The duration of the animation in seconds, which is the highest time of all keys in the timeline. */
|
|
743
|
+
duration;
|
|
735
744
|
constructor(name, timelines, duration) {
|
|
736
|
-
this.timelines = [];
|
|
737
|
-
this.timelineIds = new StringSet();
|
|
738
745
|
if (!name)
|
|
739
746
|
throw new Error("name cannot be null.");
|
|
740
747
|
this.name = name;
|
|
@@ -808,6 +815,8 @@ var spine = (() => {
|
|
|
808
815
|
sequence: 19
|
|
809
816
|
};
|
|
810
817
|
var Timeline = class {
|
|
818
|
+
propertyIds;
|
|
819
|
+
frames;
|
|
811
820
|
constructor(frameCount, propertyIds) {
|
|
812
821
|
this.propertyIds = propertyIds;
|
|
813
822
|
this.frames = Utils.newFloatArray(frameCount * this.getFrameEntries());
|
|
@@ -840,6 +849,7 @@ var spine = (() => {
|
|
|
840
849
|
}
|
|
841
850
|
};
|
|
842
851
|
var CurveTimeline = class extends Timeline {
|
|
852
|
+
curves;
|
|
843
853
|
// type, x, y, ...
|
|
844
854
|
constructor(frameCount, bezierCount, propertyIds) {
|
|
845
855
|
super(frameCount, propertyIds);
|
|
@@ -1007,9 +1017,9 @@ var spine = (() => {
|
|
|
1007
1017
|
}
|
|
1008
1018
|
};
|
|
1009
1019
|
var RotateTimeline = class extends CurveTimeline1 {
|
|
1020
|
+
boneIndex = 0;
|
|
1010
1021
|
constructor(frameCount, bezierCount, boneIndex) {
|
|
1011
1022
|
super(frameCount, bezierCount, Property.rotate + "|" + boneIndex);
|
|
1012
|
-
this.boneIndex = 0;
|
|
1013
1023
|
this.boneIndex = boneIndex;
|
|
1014
1024
|
}
|
|
1015
1025
|
apply(skeleton, lastTime, time, events, alpha, blend, direction) {
|
|
@@ -1041,6 +1051,7 @@ var spine = (() => {
|
|
|
1041
1051
|
}
|
|
1042
1052
|
};
|
|
1043
1053
|
var TranslateTimeline = class extends CurveTimeline2 {
|
|
1054
|
+
boneIndex = 0;
|
|
1044
1055
|
constructor(frameCount, bezierCount, boneIndex) {
|
|
1045
1056
|
super(
|
|
1046
1057
|
frameCount,
|
|
@@ -1048,7 +1059,6 @@ var spine = (() => {
|
|
|
1048
1059
|
Property.x + "|" + boneIndex,
|
|
1049
1060
|
Property.y + "|" + boneIndex
|
|
1050
1061
|
);
|
|
1051
|
-
this.boneIndex = 0;
|
|
1052
1062
|
this.boneIndex = boneIndex;
|
|
1053
1063
|
}
|
|
1054
1064
|
apply(skeleton, lastTime, time, events, alpha, blend, direction) {
|
|
@@ -1146,9 +1156,9 @@ var spine = (() => {
|
|
|
1146
1156
|
}
|
|
1147
1157
|
};
|
|
1148
1158
|
var TranslateXTimeline = class extends CurveTimeline1 {
|
|
1159
|
+
boneIndex = 0;
|
|
1149
1160
|
constructor(frameCount, bezierCount, boneIndex) {
|
|
1150
1161
|
super(frameCount, bezierCount, Property.x + "|" + boneIndex);
|
|
1151
|
-
this.boneIndex = 0;
|
|
1152
1162
|
this.boneIndex = boneIndex;
|
|
1153
1163
|
}
|
|
1154
1164
|
apply(skeleton, lastTime, time, events, alpha, blend, direction) {
|
|
@@ -1181,9 +1191,9 @@ var spine = (() => {
|
|
|
1181
1191
|
}
|
|
1182
1192
|
};
|
|
1183
1193
|
var TranslateYTimeline = class extends CurveTimeline1 {
|
|
1194
|
+
boneIndex = 0;
|
|
1184
1195
|
constructor(frameCount, bezierCount, boneIndex) {
|
|
1185
1196
|
super(frameCount, bezierCount, Property.y + "|" + boneIndex);
|
|
1186
|
-
this.boneIndex = 0;
|
|
1187
1197
|
this.boneIndex = boneIndex;
|
|
1188
1198
|
}
|
|
1189
1199
|
apply(skeleton, lastTime, time, events, alpha, blend, direction) {
|
|
@@ -1216,6 +1226,7 @@ var spine = (() => {
|
|
|
1216
1226
|
}
|
|
1217
1227
|
};
|
|
1218
1228
|
var ScaleTimeline = class extends CurveTimeline2 {
|
|
1229
|
+
boneIndex = 0;
|
|
1219
1230
|
constructor(frameCount, bezierCount, boneIndex) {
|
|
1220
1231
|
super(
|
|
1221
1232
|
frameCount,
|
|
@@ -1223,7 +1234,6 @@ var spine = (() => {
|
|
|
1223
1234
|
Property.scaleX + "|" + boneIndex,
|
|
1224
1235
|
Property.scaleY + "|" + boneIndex
|
|
1225
1236
|
);
|
|
1226
|
-
this.boneIndex = 0;
|
|
1227
1237
|
this.boneIndex = boneIndex;
|
|
1228
1238
|
}
|
|
1229
1239
|
apply(skeleton, lastTime, time, events, alpha, blend, direction) {
|
|
@@ -1359,9 +1369,9 @@ var spine = (() => {
|
|
|
1359
1369
|
}
|
|
1360
1370
|
};
|
|
1361
1371
|
var ScaleXTimeline = class extends CurveTimeline1 {
|
|
1372
|
+
boneIndex = 0;
|
|
1362
1373
|
constructor(frameCount, bezierCount, boneIndex) {
|
|
1363
1374
|
super(frameCount, bezierCount, Property.scaleX + "|" + boneIndex);
|
|
1364
|
-
this.boneIndex = 0;
|
|
1365
1375
|
this.boneIndex = boneIndex;
|
|
1366
1376
|
}
|
|
1367
1377
|
apply(skeleton, lastTime, time, events, alpha, blend, direction) {
|
|
@@ -1420,9 +1430,9 @@ var spine = (() => {
|
|
|
1420
1430
|
}
|
|
1421
1431
|
};
|
|
1422
1432
|
var ScaleYTimeline = class extends CurveTimeline1 {
|
|
1433
|
+
boneIndex = 0;
|
|
1423
1434
|
constructor(frameCount, bezierCount, boneIndex) {
|
|
1424
1435
|
super(frameCount, bezierCount, Property.scaleY + "|" + boneIndex);
|
|
1425
|
-
this.boneIndex = 0;
|
|
1426
1436
|
this.boneIndex = boneIndex;
|
|
1427
1437
|
}
|
|
1428
1438
|
apply(skeleton, lastTime, time, events, alpha, blend, direction) {
|
|
@@ -1481,6 +1491,7 @@ var spine = (() => {
|
|
|
1481
1491
|
}
|
|
1482
1492
|
};
|
|
1483
1493
|
var ShearTimeline = class extends CurveTimeline2 {
|
|
1494
|
+
boneIndex = 0;
|
|
1484
1495
|
constructor(frameCount, bezierCount, boneIndex) {
|
|
1485
1496
|
super(
|
|
1486
1497
|
frameCount,
|
|
@@ -1488,7 +1499,6 @@ var spine = (() => {
|
|
|
1488
1499
|
Property.shearX + "|" + boneIndex,
|
|
1489
1500
|
Property.shearY + "|" + boneIndex
|
|
1490
1501
|
);
|
|
1491
|
-
this.boneIndex = 0;
|
|
1492
1502
|
this.boneIndex = boneIndex;
|
|
1493
1503
|
}
|
|
1494
1504
|
apply(skeleton, lastTime, time, events, alpha, blend, direction) {
|
|
@@ -1586,9 +1596,9 @@ var spine = (() => {
|
|
|
1586
1596
|
}
|
|
1587
1597
|
};
|
|
1588
1598
|
var ShearXTimeline = class extends CurveTimeline1 {
|
|
1599
|
+
boneIndex = 0;
|
|
1589
1600
|
constructor(frameCount, bezierCount, boneIndex) {
|
|
1590
1601
|
super(frameCount, bezierCount, Property.shearX + "|" + boneIndex);
|
|
1591
|
-
this.boneIndex = 0;
|
|
1592
1602
|
this.boneIndex = boneIndex;
|
|
1593
1603
|
}
|
|
1594
1604
|
apply(skeleton, lastTime, time, events, alpha, blend, direction) {
|
|
@@ -1621,9 +1631,9 @@ var spine = (() => {
|
|
|
1621
1631
|
}
|
|
1622
1632
|
};
|
|
1623
1633
|
var ShearYTimeline = class extends CurveTimeline1 {
|
|
1634
|
+
boneIndex = 0;
|
|
1624
1635
|
constructor(frameCount, bezierCount, boneIndex) {
|
|
1625
1636
|
super(frameCount, bezierCount, Property.shearY + "|" + boneIndex);
|
|
1626
|
-
this.boneIndex = 0;
|
|
1627
1637
|
this.boneIndex = boneIndex;
|
|
1628
1638
|
}
|
|
1629
1639
|
apply(skeleton, lastTime, time, events, alpha, blend, direction) {
|
|
@@ -1656,12 +1666,12 @@ var spine = (() => {
|
|
|
1656
1666
|
}
|
|
1657
1667
|
};
|
|
1658
1668
|
var RGBATimeline = class extends CurveTimeline {
|
|
1669
|
+
slotIndex = 0;
|
|
1659
1670
|
constructor(frameCount, bezierCount, slotIndex) {
|
|
1660
1671
|
super(frameCount, bezierCount, [
|
|
1661
1672
|
Property.rgb + "|" + slotIndex,
|
|
1662
1673
|
Property.alpha + "|" + slotIndex
|
|
1663
1674
|
]);
|
|
1664
|
-
this.slotIndex = 0;
|
|
1665
1675
|
this.slotIndex = slotIndex;
|
|
1666
1676
|
}
|
|
1667
1677
|
getFrameEntries() {
|
|
@@ -1819,11 +1829,11 @@ var spine = (() => {
|
|
|
1819
1829
|
}
|
|
1820
1830
|
};
|
|
1821
1831
|
var RGBTimeline = class extends CurveTimeline {
|
|
1832
|
+
slotIndex = 0;
|
|
1822
1833
|
constructor(frameCount, bezierCount, slotIndex) {
|
|
1823
1834
|
super(frameCount, bezierCount, [
|
|
1824
1835
|
Property.rgb + "|" + slotIndex
|
|
1825
1836
|
]);
|
|
1826
|
-
this.slotIndex = 0;
|
|
1827
1837
|
this.slotIndex = slotIndex;
|
|
1828
1838
|
}
|
|
1829
1839
|
getFrameEntries() {
|
|
@@ -1962,9 +1972,9 @@ var spine = (() => {
|
|
|
1962
1972
|
}
|
|
1963
1973
|
};
|
|
1964
1974
|
var AlphaTimeline = class extends CurveTimeline1 {
|
|
1975
|
+
slotIndex = 0;
|
|
1965
1976
|
constructor(frameCount, bezierCount, slotIndex) {
|
|
1966
1977
|
super(frameCount, bezierCount, Property.alpha + "|" + slotIndex);
|
|
1967
|
-
this.slotIndex = 0;
|
|
1968
1978
|
this.slotIndex = slotIndex;
|
|
1969
1979
|
}
|
|
1970
1980
|
apply(skeleton, lastTime, time, events, alpha, blend, direction) {
|
|
@@ -1994,13 +2004,13 @@ var spine = (() => {
|
|
|
1994
2004
|
}
|
|
1995
2005
|
};
|
|
1996
2006
|
var RGBA2Timeline = class extends CurveTimeline {
|
|
2007
|
+
slotIndex = 0;
|
|
1997
2008
|
constructor(frameCount, bezierCount, slotIndex) {
|
|
1998
2009
|
super(frameCount, bezierCount, [
|
|
1999
2010
|
Property.rgb + "|" + slotIndex,
|
|
2000
2011
|
Property.alpha + "|" + slotIndex,
|
|
2001
2012
|
Property.rgb2 + "|" + slotIndex
|
|
2002
2013
|
]);
|
|
2003
|
-
this.slotIndex = 0;
|
|
2004
2014
|
this.slotIndex = slotIndex;
|
|
2005
2015
|
}
|
|
2006
2016
|
getFrameEntries() {
|
|
@@ -2241,12 +2251,12 @@ var spine = (() => {
|
|
|
2241
2251
|
}
|
|
2242
2252
|
};
|
|
2243
2253
|
var RGB2Timeline = class extends CurveTimeline {
|
|
2254
|
+
slotIndex = 0;
|
|
2244
2255
|
constructor(frameCount, bezierCount, slotIndex) {
|
|
2245
2256
|
super(frameCount, bezierCount, [
|
|
2246
2257
|
Property.rgb + "|" + slotIndex,
|
|
2247
2258
|
Property.rgb2 + "|" + slotIndex
|
|
2248
2259
|
]);
|
|
2249
|
-
this.slotIndex = 0;
|
|
2250
2260
|
this.slotIndex = slotIndex;
|
|
2251
2261
|
}
|
|
2252
2262
|
getFrameEntries() {
|
|
@@ -2472,11 +2482,13 @@ var spine = (() => {
|
|
|
2472
2482
|
}
|
|
2473
2483
|
};
|
|
2474
2484
|
var AttachmentTimeline = class extends Timeline {
|
|
2485
|
+
slotIndex = 0;
|
|
2486
|
+
/** The attachment name for each key frame. May contain null values to clear the attachment. */
|
|
2487
|
+
attachmentNames;
|
|
2475
2488
|
constructor(frameCount, slotIndex) {
|
|
2476
2489
|
super(frameCount, [
|
|
2477
2490
|
Property.attachment + "|" + slotIndex
|
|
2478
2491
|
]);
|
|
2479
|
-
this.slotIndex = 0;
|
|
2480
2492
|
this.slotIndex = slotIndex;
|
|
2481
2493
|
this.attachmentNames = new Array(frameCount);
|
|
2482
2494
|
}
|
|
@@ -2509,11 +2521,15 @@ var spine = (() => {
|
|
|
2509
2521
|
}
|
|
2510
2522
|
};
|
|
2511
2523
|
var DeformTimeline = class extends CurveTimeline {
|
|
2524
|
+
slotIndex = 0;
|
|
2525
|
+
/** The attachment that will be deformed. */
|
|
2526
|
+
attachment;
|
|
2527
|
+
/** The vertices for each key frame. */
|
|
2528
|
+
vertices;
|
|
2512
2529
|
constructor(frameCount, bezierCount, slotIndex, attachment) {
|
|
2513
2530
|
super(frameCount, bezierCount, [
|
|
2514
2531
|
Property.deform + "|" + slotIndex + "|" + attachment.id
|
|
2515
2532
|
]);
|
|
2516
|
-
this.slotIndex = 0;
|
|
2517
2533
|
this.slotIndex = slotIndex;
|
|
2518
2534
|
this.attachment = attachment;
|
|
2519
2535
|
this.vertices = new Array(frameCount);
|
|
@@ -2734,6 +2750,8 @@ var spine = (() => {
|
|
|
2734
2750
|
}
|
|
2735
2751
|
};
|
|
2736
2752
|
var _EventTimeline = class extends Timeline {
|
|
2753
|
+
/** The event for each key frame. */
|
|
2754
|
+
events;
|
|
2737
2755
|
constructor(frameCount) {
|
|
2738
2756
|
super(frameCount, _EventTimeline.propertyIds);
|
|
2739
2757
|
this.events = new Array(frameCount);
|
|
@@ -2776,8 +2794,10 @@ var spine = (() => {
|
|
|
2776
2794
|
}
|
|
2777
2795
|
};
|
|
2778
2796
|
var EventTimeline = _EventTimeline;
|
|
2779
|
-
EventTimeline
|
|
2797
|
+
__publicField(EventTimeline, "propertyIds", ["" + Property.event]);
|
|
2780
2798
|
var _DrawOrderTimeline = class extends Timeline {
|
|
2799
|
+
/** The draw order for each key frame. See {@link #setFrame(int, float, int[])}. */
|
|
2800
|
+
drawOrders;
|
|
2781
2801
|
constructor(frameCount) {
|
|
2782
2802
|
super(frameCount, _DrawOrderTimeline.propertyIds);
|
|
2783
2803
|
this.drawOrders = new Array(frameCount);
|
|
@@ -2816,14 +2836,14 @@ var spine = (() => {
|
|
|
2816
2836
|
}
|
|
2817
2837
|
};
|
|
2818
2838
|
var DrawOrderTimeline = _DrawOrderTimeline;
|
|
2819
|
-
DrawOrderTimeline
|
|
2839
|
+
__publicField(DrawOrderTimeline, "propertyIds", ["" + Property.drawOrder]);
|
|
2820
2840
|
var IkConstraintTimeline = class extends CurveTimeline {
|
|
2841
|
+
/** The index of the IK constraint slot in {@link Skeleton#ikConstraints} that will be changed. */
|
|
2842
|
+
ikConstraintIndex = 0;
|
|
2821
2843
|
constructor(frameCount, bezierCount, ikConstraintIndex) {
|
|
2822
2844
|
super(frameCount, bezierCount, [
|
|
2823
2845
|
Property.ikConstraint + "|" + ikConstraintIndex
|
|
2824
2846
|
]);
|
|
2825
|
-
/** The index of the IK constraint slot in {@link Skeleton#ikConstraints} that will be changed. */
|
|
2826
|
-
this.ikConstraintIndex = 0;
|
|
2827
2847
|
this.ikConstraintIndex = ikConstraintIndex;
|
|
2828
2848
|
}
|
|
2829
2849
|
getFrameEntries() {
|
|
@@ -2980,12 +3000,12 @@ var spine = (() => {
|
|
|
2980
3000
|
}
|
|
2981
3001
|
};
|
|
2982
3002
|
var TransformConstraintTimeline = class extends CurveTimeline {
|
|
3003
|
+
/** The index of the transform constraint slot in {@link Skeleton#transformConstraints} that will be changed. */
|
|
3004
|
+
transformConstraintIndex = 0;
|
|
2983
3005
|
constructor(frameCount, bezierCount, transformConstraintIndex) {
|
|
2984
3006
|
super(frameCount, bezierCount, [
|
|
2985
3007
|
Property.transformConstraint + "|" + transformConstraintIndex
|
|
2986
3008
|
]);
|
|
2987
|
-
/** The index of the transform constraint slot in {@link Skeleton#transformConstraints} that will be changed. */
|
|
2988
|
-
this.transformConstraintIndex = 0;
|
|
2989
3009
|
this.transformConstraintIndex = transformConstraintIndex;
|
|
2990
3010
|
}
|
|
2991
3011
|
getFrameEntries() {
|
|
@@ -3203,10 +3223,10 @@ var spine = (() => {
|
|
|
3203
3223
|
}
|
|
3204
3224
|
};
|
|
3205
3225
|
var PathConstraintPositionTimeline = class extends CurveTimeline1 {
|
|
3226
|
+
/** The index of the path constraint slot in {@link Skeleton#pathConstraints} that will be changed. */
|
|
3227
|
+
pathConstraintIndex = 0;
|
|
3206
3228
|
constructor(frameCount, bezierCount, pathConstraintIndex) {
|
|
3207
3229
|
super(frameCount, bezierCount, Property.pathConstraintPosition + "|" + pathConstraintIndex);
|
|
3208
|
-
/** The index of the path constraint slot in {@link Skeleton#pathConstraints} that will be changed. */
|
|
3209
|
-
this.pathConstraintIndex = 0;
|
|
3210
3230
|
this.pathConstraintIndex = pathConstraintIndex;
|
|
3211
3231
|
}
|
|
3212
3232
|
apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {
|
|
@@ -3232,10 +3252,10 @@ var spine = (() => {
|
|
|
3232
3252
|
}
|
|
3233
3253
|
};
|
|
3234
3254
|
var PathConstraintSpacingTimeline = class extends CurveTimeline1 {
|
|
3255
|
+
/** The index of the path constraint slot in {@link Skeleton#getPathConstraints()} that will be changed. */
|
|
3256
|
+
pathConstraintIndex = 0;
|
|
3235
3257
|
constructor(frameCount, bezierCount, pathConstraintIndex) {
|
|
3236
3258
|
super(frameCount, bezierCount, Property.pathConstraintSpacing + "|" + pathConstraintIndex);
|
|
3237
|
-
/** The index of the path constraint slot in {@link Skeleton#getPathConstraints()} that will be changed. */
|
|
3238
|
-
this.pathConstraintIndex = 0;
|
|
3239
3259
|
this.pathConstraintIndex = pathConstraintIndex;
|
|
3240
3260
|
}
|
|
3241
3261
|
apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {
|
|
@@ -3261,12 +3281,12 @@ var spine = (() => {
|
|
|
3261
3281
|
}
|
|
3262
3282
|
};
|
|
3263
3283
|
var PathConstraintMixTimeline = class extends CurveTimeline {
|
|
3284
|
+
/** The index of the path constraint slot in {@link Skeleton#getPathConstraints()} that will be changed. */
|
|
3285
|
+
pathConstraintIndex = 0;
|
|
3264
3286
|
constructor(frameCount, bezierCount, pathConstraintIndex) {
|
|
3265
3287
|
super(frameCount, bezierCount, [
|
|
3266
3288
|
Property.pathConstraintMix + "|" + pathConstraintIndex
|
|
3267
3289
|
]);
|
|
3268
|
-
/** The index of the path constraint slot in {@link Skeleton#getPathConstraints()} that will be changed. */
|
|
3269
|
-
this.pathConstraintIndex = 0;
|
|
3270
3290
|
this.pathConstraintIndex = pathConstraintIndex;
|
|
3271
3291
|
}
|
|
3272
3292
|
getFrameEntries() {
|
|
@@ -3398,6 +3418,8 @@ var spine = (() => {
|
|
|
3398
3418
|
}
|
|
3399
3419
|
};
|
|
3400
3420
|
var _SequenceTimeline = class extends Timeline {
|
|
3421
|
+
slotIndex;
|
|
3422
|
+
attachment;
|
|
3401
3423
|
constructor(frameCount, slotIndex, attachment) {
|
|
3402
3424
|
super(frameCount, [
|
|
3403
3425
|
Property.sequence + "|" + slotIndex + "|" + attachment.sequence.id
|
|
@@ -3482,32 +3504,34 @@ var spine = (() => {
|
|
|
3482
3504
|
}
|
|
3483
3505
|
};
|
|
3484
3506
|
var SequenceTimeline = _SequenceTimeline;
|
|
3485
|
-
SequenceTimeline
|
|
3486
|
-
SequenceTimeline
|
|
3487
|
-
SequenceTimeline
|
|
3507
|
+
__publicField(SequenceTimeline, "ENTRIES", 3);
|
|
3508
|
+
__publicField(SequenceTimeline, "MODE", 1);
|
|
3509
|
+
__publicField(SequenceTimeline, "DELAY", 2);
|
|
3488
3510
|
|
|
3489
3511
|
// spine-core/src/AnimationState.ts
|
|
3490
3512
|
var _AnimationState = class {
|
|
3491
|
-
constructor(data) {
|
|
3492
|
-
/** The list of tracks that currently have animations, which may contain null entries. */
|
|
3493
|
-
this.tracks = new Array();
|
|
3494
|
-
/** Multiplier for the delta time when the animation state is updated, causing time for all animations and mixes to play slower
|
|
3495
|
-
* or faster. Defaults to 1.
|
|
3496
|
-
*
|
|
3497
|
-
* See TrackEntry {@link TrackEntry#timeScale} for affecting a single animation. */
|
|
3498
|
-
this.timeScale = 1;
|
|
3499
|
-
this.unkeyedState = 0;
|
|
3500
|
-
this.events = new Array();
|
|
3501
|
-
this.listeners = new Array();
|
|
3502
|
-
this.queue = new EventQueue(this);
|
|
3503
|
-
this.propertyIDs = new StringSet();
|
|
3504
|
-
this.animationsChanged = false;
|
|
3505
|
-
this.trackEntryPool = new Pool(() => new TrackEntry());
|
|
3506
|
-
this.data = data;
|
|
3507
|
-
}
|
|
3508
3513
|
static emptyAnimation() {
|
|
3509
3514
|
return _AnimationState._emptyAnimation;
|
|
3510
3515
|
}
|
|
3516
|
+
/** The AnimationStateData to look up mix durations. */
|
|
3517
|
+
data;
|
|
3518
|
+
/** The list of tracks that currently have animations, which may contain null entries. */
|
|
3519
|
+
tracks = new Array();
|
|
3520
|
+
/** Multiplier for the delta time when the animation state is updated, causing time for all animations and mixes to play slower
|
|
3521
|
+
* or faster. Defaults to 1.
|
|
3522
|
+
*
|
|
3523
|
+
* See TrackEntry {@link TrackEntry#timeScale} for affecting a single animation. */
|
|
3524
|
+
timeScale = 1;
|
|
3525
|
+
unkeyedState = 0;
|
|
3526
|
+
events = new Array();
|
|
3527
|
+
listeners = new Array();
|
|
3528
|
+
queue = new EventQueue(this);
|
|
3529
|
+
propertyIDs = new StringSet();
|
|
3530
|
+
animationsChanged = false;
|
|
3531
|
+
trackEntryPool = new Pool(() => new TrackEntry());
|
|
3532
|
+
constructor(data) {
|
|
3533
|
+
this.data = data;
|
|
3534
|
+
}
|
|
3511
3535
|
/** Increments each track entry {@link TrackEntry#trackTime()}, setting queued animations as current if needed. */
|
|
3512
3536
|
update(delta) {
|
|
3513
3537
|
delta *= this.timeScale;
|
|
@@ -4159,141 +4183,139 @@ var spine = (() => {
|
|
|
4159
4183
|
}
|
|
4160
4184
|
};
|
|
4161
4185
|
var AnimationState = _AnimationState;
|
|
4162
|
-
AnimationState
|
|
4186
|
+
__publicField(AnimationState, "_emptyAnimation", new Animation("<empty>", [], 0));
|
|
4163
4187
|
var TrackEntry = class {
|
|
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
|
-
|
|
4256
|
-
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
|
|
4262
|
-
|
|
4263
|
-
|
|
4264
|
-
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
|
|
4291
|
-
|
|
4292
|
-
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
-
this.timelinesRotation = new Array();
|
|
4296
|
-
}
|
|
4188
|
+
/** The animation to apply for this track entry. */
|
|
4189
|
+
animation = null;
|
|
4190
|
+
previous = null;
|
|
4191
|
+
/** The animation queued to start after this animation, or null. `next` makes up a linked list. */
|
|
4192
|
+
next = null;
|
|
4193
|
+
/** The track entry for the previous animation when mixing from the previous animation to this animation, or null if no
|
|
4194
|
+
* mixing is currently occuring. When mixing from multiple animations, `mixingFrom` makes up a linked list. */
|
|
4195
|
+
mixingFrom = null;
|
|
4196
|
+
/** The track entry for the next animation when mixing from this animation to the next animation, or null if no mixing is
|
|
4197
|
+
* currently occuring. When mixing to multiple animations, `mixingTo` makes up a linked list. */
|
|
4198
|
+
mixingTo = null;
|
|
4199
|
+
/** The listener for events generated by this track entry, or null.
|
|
4200
|
+
*
|
|
4201
|
+
* A track entry returned from {@link AnimationState#setAnimation()} is already the current animation
|
|
4202
|
+
* for the track, so the track entry listener {@link AnimationStateListener#start()} will not be called. */
|
|
4203
|
+
listener = null;
|
|
4204
|
+
/** The index of the track where this track entry is either current or queued.
|
|
4205
|
+
*
|
|
4206
|
+
* See {@link AnimationState#getCurrent()}. */
|
|
4207
|
+
trackIndex = 0;
|
|
4208
|
+
/** If true, the animation will repeat. If false it will not, instead its last frame is applied if played beyond its
|
|
4209
|
+
* duration. */
|
|
4210
|
+
loop = false;
|
|
4211
|
+
/** If true, when mixing from the previous animation to this animation, the previous animation is applied as normal instead
|
|
4212
|
+
* of being mixed out.
|
|
4213
|
+
*
|
|
4214
|
+
* When mixing between animations that key the same property, if a lower track also keys that property then the value will
|
|
4215
|
+
* briefly dip toward the lower track value during the mix. This happens because the first animation mixes from 100% to 0%
|
|
4216
|
+
* while the second animation mixes from 0% to 100%. Setting `holdPrevious` to true applies the first animation
|
|
4217
|
+
* at 100% during the mix so the lower track value is overwritten. Such dipping does not occur on the lowest track which
|
|
4218
|
+
* keys the property, only when a higher track also keys the property.
|
|
4219
|
+
*
|
|
4220
|
+
* Snapping will occur if `holdPrevious` is true and this animation does not key all the same properties as the
|
|
4221
|
+
* previous animation. */
|
|
4222
|
+
holdPrevious = false;
|
|
4223
|
+
reverse = false;
|
|
4224
|
+
shortestRotation = false;
|
|
4225
|
+
/** When the mix percentage ({@link #mixTime} / {@link #mixDuration}) is less than the
|
|
4226
|
+
* `eventThreshold`, event timelines are applied while this animation is being mixed out. Defaults to 0, so event
|
|
4227
|
+
* timelines are not applied while this animation is being mixed out. */
|
|
4228
|
+
eventThreshold = 0;
|
|
4229
|
+
/** When the mix percentage ({@link #mixtime} / {@link #mixDuration}) is less than the
|
|
4230
|
+
* `attachmentThreshold`, attachment timelines are applied while this animation is being mixed out. Defaults to
|
|
4231
|
+
* 0, so attachment timelines are not applied while this animation is being mixed out. */
|
|
4232
|
+
attachmentThreshold = 0;
|
|
4233
|
+
/** When the mix percentage ({@link #mixTime} / {@link #mixDuration}) is less than the
|
|
4234
|
+
* `drawOrderThreshold`, draw order timelines are applied while this animation is being mixed out. Defaults to 0,
|
|
4235
|
+
* so draw order timelines are not applied while this animation is being mixed out. */
|
|
4236
|
+
drawOrderThreshold = 0;
|
|
4237
|
+
/** Seconds when this animation starts, both initially and after looping. Defaults to 0.
|
|
4238
|
+
*
|
|
4239
|
+
* When changing the `animationStart` time, it often makes sense to set {@link #animationLast} to the same
|
|
4240
|
+
* value to prevent timeline keys before the start time from triggering. */
|
|
4241
|
+
animationStart = 0;
|
|
4242
|
+
/** Seconds for the last frame of this animation. Non-looping animations won't play past this time. Looping animations will
|
|
4243
|
+
* loop back to {@link #animationStart} at this time. Defaults to the animation {@link Animation#duration}. */
|
|
4244
|
+
animationEnd = 0;
|
|
4245
|
+
/** The time in seconds this animation was last applied. Some timelines use this for one-time triggers. Eg, when this
|
|
4246
|
+
* animation is applied, event timelines will fire all events between the `animationLast` time (exclusive) and
|
|
4247
|
+
* `animationTime` (inclusive). Defaults to -1 to ensure triggers on frame 0 happen the first time this animation
|
|
4248
|
+
* is applied. */
|
|
4249
|
+
animationLast = 0;
|
|
4250
|
+
nextAnimationLast = 0;
|
|
4251
|
+
/** Seconds to postpone playing the animation. When this track entry is the current track entry, `delay`
|
|
4252
|
+
* postpones incrementing the {@link #trackTime}. When this track entry is queued, `delay` is the time from
|
|
4253
|
+
* the start of the previous animation to when this track entry will become the current track entry (ie when the previous
|
|
4254
|
+
* track entry {@link TrackEntry#trackTime} >= this track entry's `delay`).
|
|
4255
|
+
*
|
|
4256
|
+
* {@link #timeScale} affects the delay. */
|
|
4257
|
+
delay = 0;
|
|
4258
|
+
/** Current time in seconds this track entry has been the current track entry. The track time determines
|
|
4259
|
+
* {@link #animationTime}. The track time can be set to start the animation at a time other than 0, without affecting
|
|
4260
|
+
* looping. */
|
|
4261
|
+
trackTime = 0;
|
|
4262
|
+
trackLast = 0;
|
|
4263
|
+
nextTrackLast = 0;
|
|
4264
|
+
/** The track time in seconds when this animation will be removed from the track. Defaults to the highest possible float
|
|
4265
|
+
* value, meaning the animation will be applied until a new animation is set or the track is cleared. If the track end time
|
|
4266
|
+
* is reached, no other animations are queued for playback, and mixing from any previous animations is complete, then the
|
|
4267
|
+
* properties keyed by the animation are set to the setup pose and the track is cleared.
|
|
4268
|
+
*
|
|
4269
|
+
* It may be desired to use {@link AnimationState#addEmptyAnimation()} rather than have the animation
|
|
4270
|
+
* abruptly cease being applied. */
|
|
4271
|
+
trackEnd = 0;
|
|
4272
|
+
/** Multiplier for the delta time when this track entry is updated, causing time for this animation to pass slower or
|
|
4273
|
+
* faster. Defaults to 1.
|
|
4274
|
+
*
|
|
4275
|
+
* {@link #mixTime} is not affected by track entry time scale, so {@link #mixDuration} may need to be adjusted to
|
|
4276
|
+
* match the animation speed.
|
|
4277
|
+
*
|
|
4278
|
+
* When using {@link AnimationState#addAnimation()} with a `delay` <= 0, note the
|
|
4279
|
+
* {@link #delay} is set using the mix duration from the {@link AnimationStateData}, assuming time scale to be 1. If
|
|
4280
|
+
* the time scale is not 1, the delay may need to be adjusted.
|
|
4281
|
+
*
|
|
4282
|
+
* See AnimationState {@link AnimationState#timeScale} for affecting all animations. */
|
|
4283
|
+
timeScale = 0;
|
|
4284
|
+
/** Values < 1 mix this animation with the skeleton's current pose (usually the pose resulting from lower tracks). Defaults
|
|
4285
|
+
* to 1, which overwrites the skeleton's current pose with this animation.
|
|
4286
|
+
*
|
|
4287
|
+
* Typically track 0 is used to completely pose the skeleton, then alpha is used on higher tracks. It doesn't make sense to
|
|
4288
|
+
* use alpha on track 0 if the skeleton pose is from the last frame render. */
|
|
4289
|
+
alpha = 0;
|
|
4290
|
+
/** Seconds from 0 to the {@link #getMixDuration()} when mixing from the previous animation to this animation. May be
|
|
4291
|
+
* slightly more than `mixDuration` when the mix is complete. */
|
|
4292
|
+
mixTime = 0;
|
|
4293
|
+
/** Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData
|
|
4294
|
+
* {@link AnimationStateData#getMix()} based on the animation before this animation (if any).
|
|
4295
|
+
*
|
|
4296
|
+
* A mix duration of 0 still mixes out over one frame to provide the track entry being mixed out a chance to revert the
|
|
4297
|
+
* properties it was animating.
|
|
4298
|
+
*
|
|
4299
|
+
* The `mixDuration` can be set manually rather than use the value from
|
|
4300
|
+
* {@link AnimationStateData#getMix()}. In that case, the `mixDuration` can be set for a new
|
|
4301
|
+
* track entry only before {@link AnimationState#update(float)} is first called.
|
|
4302
|
+
*
|
|
4303
|
+
* When using {@link AnimationState#addAnimation()} with a `delay` <= 0, note the
|
|
4304
|
+
* {@link #delay} is set using the mix duration from the {@link AnimationStateData}, not a mix duration set
|
|
4305
|
+
* afterward. */
|
|
4306
|
+
mixDuration = 0;
|
|
4307
|
+
interruptAlpha = 0;
|
|
4308
|
+
totalAlpha = 0;
|
|
4309
|
+
/** Controls how properties keyed in the animation are mixed with lower tracks. Defaults to {@link MixBlend#replace}, which
|
|
4310
|
+
* replaces the values from the lower tracks with the animation values. {@link MixBlend#add} adds the animation values to
|
|
4311
|
+
* the values from the lower tracks.
|
|
4312
|
+
*
|
|
4313
|
+
* The `mixBlend` can be set for a new track entry only before {@link AnimationState#apply()} is first
|
|
4314
|
+
* called. */
|
|
4315
|
+
mixBlend = 2 /* replace */;
|
|
4316
|
+
timelineMode = new Array();
|
|
4317
|
+
timelineHoldMix = new Array();
|
|
4318
|
+
timelinesRotation = new Array();
|
|
4297
4319
|
reset() {
|
|
4298
4320
|
this.next = null;
|
|
4299
4321
|
this.previous = null;
|
|
@@ -4349,9 +4371,10 @@ var spine = (() => {
|
|
|
4349
4371
|
}
|
|
4350
4372
|
};
|
|
4351
4373
|
var EventQueue = class {
|
|
4374
|
+
objects = [];
|
|
4375
|
+
drainDisabled = false;
|
|
4376
|
+
animState;
|
|
4352
4377
|
constructor(animState) {
|
|
4353
|
-
this.objects = [];
|
|
4354
|
-
this.drainDisabled = false;
|
|
4355
4378
|
this.animState = animState;
|
|
4356
4379
|
}
|
|
4357
4380
|
start(entry) {
|
|
@@ -4488,10 +4511,12 @@ var spine = (() => {
|
|
|
4488
4511
|
|
|
4489
4512
|
// spine-core/src/AnimationStateData.ts
|
|
4490
4513
|
var AnimationStateData = class {
|
|
4514
|
+
/** The SkeletonData to look up animations when they are specified by name. */
|
|
4515
|
+
skeletonData;
|
|
4516
|
+
animationToMixTime = {};
|
|
4517
|
+
/** The mix duration to use when no mix duration has been defined between two animations. */
|
|
4518
|
+
defaultMix = 0;
|
|
4491
4519
|
constructor(skeletonData) {
|
|
4492
|
-
this.animationToMixTime = {};
|
|
4493
|
-
/** The mix duration to use when no mix duration has been defined between two animations. */
|
|
4494
|
-
this.defaultMix = 0;
|
|
4495
4520
|
if (!skeletonData)
|
|
4496
4521
|
throw new Error("skeletonData cannot be null.");
|
|
4497
4522
|
this.skeletonData = skeletonData;
|
|
@@ -4530,9 +4555,9 @@ var spine = (() => {
|
|
|
4530
4555
|
|
|
4531
4556
|
// spine-core/src/attachments/BoundingBoxAttachment.ts
|
|
4532
4557
|
var BoundingBoxAttachment = class extends VertexAttachment {
|
|
4558
|
+
color = new Color(1, 1, 1, 1);
|
|
4533
4559
|
constructor(name) {
|
|
4534
4560
|
super(name);
|
|
4535
|
-
this.color = new Color(1, 1, 1, 1);
|
|
4536
4561
|
}
|
|
4537
4562
|
copy() {
|
|
4538
4563
|
let copy = new BoundingBoxAttachment(this.name);
|
|
@@ -4544,16 +4569,16 @@ var spine = (() => {
|
|
|
4544
4569
|
|
|
4545
4570
|
// spine-core/src/attachments/ClippingAttachment.ts
|
|
4546
4571
|
var ClippingAttachment = class extends VertexAttachment {
|
|
4572
|
+
/** Clipping is performed between the clipping polygon's slot and the end slot. Returns null if clipping is done until the end of
|
|
4573
|
+
* the skeleton's rendering. */
|
|
4574
|
+
endSlot = null;
|
|
4575
|
+
// Nonessential.
|
|
4576
|
+
/** The color of the clipping polygon as it was in Spine. Available only when nonessential data was exported. Clipping polygons
|
|
4577
|
+
* are not usually rendered at runtime. */
|
|
4578
|
+
color = new Color(0.2275, 0.2275, 0.8078, 1);
|
|
4547
4579
|
// ce3a3aff
|
|
4548
4580
|
constructor(name) {
|
|
4549
4581
|
super(name);
|
|
4550
|
-
/** Clipping is performed between the clipping polygon's slot and the end slot. Returns null if clipping is done until the end of
|
|
4551
|
-
* the skeleton's rendering. */
|
|
4552
|
-
this.endSlot = null;
|
|
4553
|
-
// Nonessential.
|
|
4554
|
-
/** The color of the clipping polygon as it was in Spine. Available only when nonessential data was exported. Clipping polygons
|
|
4555
|
-
* are not usually rendered at runtime. */
|
|
4556
|
-
this.color = new Color(0.2275, 0.2275, 0.8078, 1);
|
|
4557
4582
|
}
|
|
4558
4583
|
copy() {
|
|
4559
4584
|
let copy = new ClippingAttachment(this.name);
|
|
@@ -4566,6 +4591,7 @@ var spine = (() => {
|
|
|
4566
4591
|
|
|
4567
4592
|
// spine-core/src/Texture.ts
|
|
4568
4593
|
var Texture = class {
|
|
4594
|
+
_image;
|
|
4569
4595
|
constructor(image) {
|
|
4570
4596
|
this._image = image;
|
|
4571
4597
|
}
|
|
@@ -4590,19 +4616,18 @@ var spine = (() => {
|
|
|
4590
4616
|
return TextureWrap3;
|
|
4591
4617
|
})(TextureWrap || {});
|
|
4592
4618
|
var TextureRegion = class {
|
|
4593
|
-
|
|
4594
|
-
|
|
4595
|
-
|
|
4596
|
-
|
|
4597
|
-
|
|
4598
|
-
|
|
4599
|
-
|
|
4600
|
-
|
|
4601
|
-
|
|
4602
|
-
|
|
4603
|
-
|
|
4604
|
-
|
|
4605
|
-
}
|
|
4619
|
+
texture;
|
|
4620
|
+
u = 0;
|
|
4621
|
+
v = 0;
|
|
4622
|
+
u2 = 0;
|
|
4623
|
+
v2 = 0;
|
|
4624
|
+
width = 0;
|
|
4625
|
+
height = 0;
|
|
4626
|
+
degrees = 0;
|
|
4627
|
+
offsetX = 0;
|
|
4628
|
+
offsetY = 0;
|
|
4629
|
+
originalWidth = 0;
|
|
4630
|
+
originalHeight = 0;
|
|
4606
4631
|
};
|
|
4607
4632
|
var FakeTexture = class extends Texture {
|
|
4608
4633
|
setFilters(minFilter, magFilter) {
|
|
@@ -4615,9 +4640,9 @@ var spine = (() => {
|
|
|
4615
4640
|
|
|
4616
4641
|
// spine-core/src/TextureAtlas.ts
|
|
4617
4642
|
var TextureAtlas = class {
|
|
4643
|
+
pages = new Array();
|
|
4644
|
+
regions = new Array();
|
|
4618
4645
|
constructor(atlasText) {
|
|
4619
|
-
this.pages = new Array();
|
|
4620
|
-
this.regions = new Array();
|
|
4621
4646
|
let reader = new TextureAtlasReader(atlasText);
|
|
4622
4647
|
let entry = new Array(4);
|
|
4623
4648
|
let pageFields = {};
|
|
@@ -4765,15 +4790,15 @@ var spine = (() => {
|
|
|
4765
4790
|
page.setTexture(assetManager.get(pathPrefix + page.name));
|
|
4766
4791
|
}
|
|
4767
4792
|
dispose() {
|
|
4768
|
-
var _a;
|
|
4769
4793
|
for (let i = 0; i < this.pages.length; i++) {
|
|
4770
|
-
|
|
4794
|
+
this.pages[i].texture?.dispose();
|
|
4771
4795
|
}
|
|
4772
4796
|
}
|
|
4773
4797
|
};
|
|
4774
4798
|
var TextureAtlasReader = class {
|
|
4799
|
+
lines;
|
|
4800
|
+
index = 0;
|
|
4775
4801
|
constructor(text) {
|
|
4776
|
-
this.index = 0;
|
|
4777
4802
|
this.lines = text.split(/\r\n|\r|\n/);
|
|
4778
4803
|
}
|
|
4779
4804
|
readLine() {
|
|
@@ -4805,16 +4830,17 @@ var spine = (() => {
|
|
|
4805
4830
|
}
|
|
4806
4831
|
};
|
|
4807
4832
|
var TextureAtlasPage = class {
|
|
4833
|
+
name;
|
|
4834
|
+
minFilter = 9728 /* Nearest */;
|
|
4835
|
+
magFilter = 9728 /* Nearest */;
|
|
4836
|
+
uWrap = 33071 /* ClampToEdge */;
|
|
4837
|
+
vWrap = 33071 /* ClampToEdge */;
|
|
4838
|
+
texture = null;
|
|
4839
|
+
width = 0;
|
|
4840
|
+
height = 0;
|
|
4841
|
+
pma = false;
|
|
4842
|
+
regions = new Array();
|
|
4808
4843
|
constructor(name) {
|
|
4809
|
-
this.minFilter = 9728 /* Nearest */;
|
|
4810
|
-
this.magFilter = 9728 /* Nearest */;
|
|
4811
|
-
this.uWrap = 33071 /* ClampToEdge */;
|
|
4812
|
-
this.vWrap = 33071 /* ClampToEdge */;
|
|
4813
|
-
this.texture = null;
|
|
4814
|
-
this.width = 0;
|
|
4815
|
-
this.height = 0;
|
|
4816
|
-
this.pma = false;
|
|
4817
|
-
this.regions = new Array();
|
|
4818
4844
|
this.name = name;
|
|
4819
4845
|
}
|
|
4820
4846
|
setTexture(texture) {
|
|
@@ -4826,18 +4852,20 @@ var spine = (() => {
|
|
|
4826
4852
|
}
|
|
4827
4853
|
};
|
|
4828
4854
|
var TextureAtlasRegion = class extends TextureRegion {
|
|
4855
|
+
page;
|
|
4856
|
+
name;
|
|
4857
|
+
x = 0;
|
|
4858
|
+
y = 0;
|
|
4859
|
+
offsetX = 0;
|
|
4860
|
+
offsetY = 0;
|
|
4861
|
+
originalWidth = 0;
|
|
4862
|
+
originalHeight = 0;
|
|
4863
|
+
index = 0;
|
|
4864
|
+
degrees = 0;
|
|
4865
|
+
names = null;
|
|
4866
|
+
values = null;
|
|
4829
4867
|
constructor(page, name) {
|
|
4830
4868
|
super();
|
|
4831
|
-
this.x = 0;
|
|
4832
|
-
this.y = 0;
|
|
4833
|
-
this.offsetX = 0;
|
|
4834
|
-
this.offsetY = 0;
|
|
4835
|
-
this.originalWidth = 0;
|
|
4836
|
-
this.originalHeight = 0;
|
|
4837
|
-
this.index = 0;
|
|
4838
|
-
this.degrees = 0;
|
|
4839
|
-
this.names = null;
|
|
4840
|
-
this.values = null;
|
|
4841
4869
|
this.page = page;
|
|
4842
4870
|
this.name = name;
|
|
4843
4871
|
page.regions.push(this);
|
|
@@ -4846,31 +4874,33 @@ var spine = (() => {
|
|
|
4846
4874
|
|
|
4847
4875
|
// spine-core/src/attachments/MeshAttachment.ts
|
|
4848
4876
|
var MeshAttachment = class extends VertexAttachment {
|
|
4877
|
+
region = null;
|
|
4878
|
+
/** The name of the texture region for this attachment. */
|
|
4879
|
+
path;
|
|
4880
|
+
/** The UV pair for each vertex, normalized within the texture region. */
|
|
4881
|
+
regionUVs = [];
|
|
4882
|
+
/** The UV pair for each vertex, normalized within the entire texture.
|
|
4883
|
+
*
|
|
4884
|
+
* See {@link #updateUVs}. */
|
|
4885
|
+
uvs = [];
|
|
4886
|
+
/** Triplets of vertex indices which describe the mesh's triangulation. */
|
|
4887
|
+
triangles = [];
|
|
4888
|
+
/** The color to tint the mesh. */
|
|
4889
|
+
color = new Color(1, 1, 1, 1);
|
|
4890
|
+
/** The width of the mesh's image. Available only when nonessential data was exported. */
|
|
4891
|
+
width = 0;
|
|
4892
|
+
/** The height of the mesh's image. Available only when nonessential data was exported. */
|
|
4893
|
+
height = 0;
|
|
4894
|
+
/** The number of entries at the beginning of {@link #vertices} that make up the mesh hull. */
|
|
4895
|
+
hullLength = 0;
|
|
4896
|
+
/** Vertex index pairs describing edges for controling triangulation. Mesh triangles will never cross edges. Only available if
|
|
4897
|
+
* nonessential data was exported. Triangulation is not performed at runtime. */
|
|
4898
|
+
edges = [];
|
|
4899
|
+
parentMesh = null;
|
|
4900
|
+
sequence = null;
|
|
4901
|
+
tempColor = new Color(0, 0, 0, 0);
|
|
4849
4902
|
constructor(name, path) {
|
|
4850
4903
|
super(name);
|
|
4851
|
-
this.region = null;
|
|
4852
|
-
/** The UV pair for each vertex, normalized within the texture region. */
|
|
4853
|
-
this.regionUVs = [];
|
|
4854
|
-
/** The UV pair for each vertex, normalized within the entire texture.
|
|
4855
|
-
*
|
|
4856
|
-
* See {@link #updateUVs}. */
|
|
4857
|
-
this.uvs = [];
|
|
4858
|
-
/** Triplets of vertex indices which describe the mesh's triangulation. */
|
|
4859
|
-
this.triangles = [];
|
|
4860
|
-
/** The color to tint the mesh. */
|
|
4861
|
-
this.color = new Color(1, 1, 1, 1);
|
|
4862
|
-
/** The width of the mesh's image. Available only when nonessential data was exported. */
|
|
4863
|
-
this.width = 0;
|
|
4864
|
-
/** The height of the mesh's image. Available only when nonessential data was exported. */
|
|
4865
|
-
this.height = 0;
|
|
4866
|
-
/** The number of entries at the beginning of {@link #vertices} that make up the mesh hull. */
|
|
4867
|
-
this.hullLength = 0;
|
|
4868
|
-
/** Vertex index pairs describing edges for controling triangulation. Mesh triangles will never cross edges. Only available if
|
|
4869
|
-
* nonessential data was exported. Triangulation is not performed at runtime. */
|
|
4870
|
-
this.edges = [];
|
|
4871
|
-
this.parentMesh = null;
|
|
4872
|
-
this.sequence = null;
|
|
4873
|
-
this.tempColor = new Color(0, 0, 0, 0);
|
|
4874
4904
|
this.path = path;
|
|
4875
4905
|
}
|
|
4876
4906
|
/** Calculates {@link #uvs} using the {@link #regionUVs} and region. Must be called if the region, the region's properties, or
|
|
@@ -4997,18 +5027,18 @@ var spine = (() => {
|
|
|
4997
5027
|
|
|
4998
5028
|
// spine-core/src/attachments/PathAttachment.ts
|
|
4999
5029
|
var PathAttachment = class extends VertexAttachment {
|
|
5030
|
+
/** The lengths along the path in the setup pose from the start of the path to the end of each Bezier curve. */
|
|
5031
|
+
lengths = [];
|
|
5032
|
+
/** If true, the start and end knots are connected. */
|
|
5033
|
+
closed = false;
|
|
5034
|
+
/** If true, additional calculations are performed to make calculating positions along the path more accurate. If false, fewer
|
|
5035
|
+
* calculations are performed but calculating positions along the path is less accurate. */
|
|
5036
|
+
constantSpeed = false;
|
|
5037
|
+
/** The color of the path as it was in Spine. Available only when nonessential data was exported. Paths are not usually
|
|
5038
|
+
* rendered at runtime. */
|
|
5039
|
+
color = new Color(1, 1, 1, 1);
|
|
5000
5040
|
constructor(name) {
|
|
5001
5041
|
super(name);
|
|
5002
|
-
/** The lengths along the path in the setup pose from the start of the path to the end of each Bezier curve. */
|
|
5003
|
-
this.lengths = [];
|
|
5004
|
-
/** If true, the start and end knots are connected. */
|
|
5005
|
-
this.closed = false;
|
|
5006
|
-
/** If true, additional calculations are performed to make calculating positions along the path more accurate. If false, fewer
|
|
5007
|
-
* calculations are performed but calculating positions along the path is less accurate. */
|
|
5008
|
-
this.constantSpeed = false;
|
|
5009
|
-
/** The color of the path as it was in Spine. Available only when nonessential data was exported. Paths are not usually
|
|
5010
|
-
* rendered at runtime. */
|
|
5011
|
-
this.color = new Color(1, 1, 1, 1);
|
|
5012
5042
|
}
|
|
5013
5043
|
copy() {
|
|
5014
5044
|
let copy = new PathAttachment(this.name);
|
|
@@ -5024,14 +5054,14 @@ var spine = (() => {
|
|
|
5024
5054
|
|
|
5025
5055
|
// spine-core/src/attachments/PointAttachment.ts
|
|
5026
5056
|
var PointAttachment = class extends VertexAttachment {
|
|
5057
|
+
x = 0;
|
|
5058
|
+
y = 0;
|
|
5059
|
+
rotation = 0;
|
|
5060
|
+
/** The color of the point attachment as it was in Spine. Available only when nonessential data was exported. Point attachments
|
|
5061
|
+
* are not usually rendered at runtime. */
|
|
5062
|
+
color = new Color(0.38, 0.94, 0, 1);
|
|
5027
5063
|
constructor(name) {
|
|
5028
5064
|
super(name);
|
|
5029
|
-
this.x = 0;
|
|
5030
|
-
this.y = 0;
|
|
5031
|
-
this.rotation = 0;
|
|
5032
|
-
/** The color of the point attachment as it was in Spine. Available only when nonessential data was exported. Point attachments
|
|
5033
|
-
* are not usually rendered at runtime. */
|
|
5034
|
-
this.color = new Color(0.38, 0.94, 0, 1);
|
|
5035
5065
|
}
|
|
5036
5066
|
computeWorldPosition(bone, point) {
|
|
5037
5067
|
point.x = this.x * bone.a + this.y * bone.b + bone.worldX;
|
|
@@ -5056,32 +5086,34 @@ var spine = (() => {
|
|
|
5056
5086
|
|
|
5057
5087
|
// spine-core/src/attachments/RegionAttachment.ts
|
|
5058
5088
|
var _RegionAttachment = class extends Attachment {
|
|
5089
|
+
/** The local x translation. */
|
|
5090
|
+
x = 0;
|
|
5091
|
+
/** The local y translation. */
|
|
5092
|
+
y = 0;
|
|
5093
|
+
/** The local scaleX. */
|
|
5094
|
+
scaleX = 1;
|
|
5095
|
+
/** The local scaleY. */
|
|
5096
|
+
scaleY = 1;
|
|
5097
|
+
/** The local rotation. */
|
|
5098
|
+
rotation = 0;
|
|
5099
|
+
/** The width of the region attachment in Spine. */
|
|
5100
|
+
width = 0;
|
|
5101
|
+
/** The height of the region attachment in Spine. */
|
|
5102
|
+
height = 0;
|
|
5103
|
+
/** The color to tint the region attachment. */
|
|
5104
|
+
color = new Color(1, 1, 1, 1);
|
|
5105
|
+
/** The name of the texture region for this attachment. */
|
|
5106
|
+
path;
|
|
5107
|
+
region = null;
|
|
5108
|
+
sequence = null;
|
|
5109
|
+
/** For each of the 4 vertices, a pair of <code>x,y</code> values that is the local position of the vertex.
|
|
5110
|
+
*
|
|
5111
|
+
* See {@link #updateOffset()}. */
|
|
5112
|
+
offset = Utils.newFloatArray(8);
|
|
5113
|
+
uvs = Utils.newFloatArray(8);
|
|
5114
|
+
tempColor = new Color(1, 1, 1, 1);
|
|
5059
5115
|
constructor(name, path) {
|
|
5060
5116
|
super(name);
|
|
5061
|
-
/** The local x translation. */
|
|
5062
|
-
this.x = 0;
|
|
5063
|
-
/** The local y translation. */
|
|
5064
|
-
this.y = 0;
|
|
5065
|
-
/** The local scaleX. */
|
|
5066
|
-
this.scaleX = 1;
|
|
5067
|
-
/** The local scaleY. */
|
|
5068
|
-
this.scaleY = 1;
|
|
5069
|
-
/** The local rotation. */
|
|
5070
|
-
this.rotation = 0;
|
|
5071
|
-
/** The width of the region attachment in Spine. */
|
|
5072
|
-
this.width = 0;
|
|
5073
|
-
/** The height of the region attachment in Spine. */
|
|
5074
|
-
this.height = 0;
|
|
5075
|
-
/** The color to tint the region attachment. */
|
|
5076
|
-
this.color = new Color(1, 1, 1, 1);
|
|
5077
|
-
this.region = null;
|
|
5078
|
-
this.sequence = null;
|
|
5079
|
-
/** For each of the 4 vertices, a pair of <code>x,y</code> values that is the local position of the vertex.
|
|
5080
|
-
*
|
|
5081
|
-
* See {@link #updateOffset()}. */
|
|
5082
|
-
this.offset = Utils.newFloatArray(8);
|
|
5083
|
-
this.uvs = Utils.newFloatArray(8);
|
|
5084
|
-
this.tempColor = new Color(1, 1, 1, 1);
|
|
5085
5117
|
this.path = path;
|
|
5086
5118
|
}
|
|
5087
5119
|
/** Calculates the {@link #offset} using the region settings. Must be called after changing region settings. */
|
|
@@ -5202,41 +5234,42 @@ var spine = (() => {
|
|
|
5202
5234
|
}
|
|
5203
5235
|
};
|
|
5204
5236
|
var RegionAttachment = _RegionAttachment;
|
|
5205
|
-
RegionAttachment
|
|
5206
|
-
RegionAttachment
|
|
5207
|
-
RegionAttachment
|
|
5208
|
-
RegionAttachment
|
|
5209
|
-
RegionAttachment
|
|
5210
|
-
RegionAttachment
|
|
5211
|
-
RegionAttachment
|
|
5212
|
-
RegionAttachment
|
|
5213
|
-
RegionAttachment
|
|
5214
|
-
RegionAttachment
|
|
5215
|
-
RegionAttachment
|
|
5216
|
-
RegionAttachment
|
|
5217
|
-
RegionAttachment
|
|
5218
|
-
RegionAttachment
|
|
5219
|
-
RegionAttachment
|
|
5220
|
-
RegionAttachment
|
|
5221
|
-
RegionAttachment
|
|
5222
|
-
RegionAttachment
|
|
5223
|
-
RegionAttachment
|
|
5224
|
-
RegionAttachment
|
|
5225
|
-
RegionAttachment
|
|
5226
|
-
RegionAttachment
|
|
5227
|
-
RegionAttachment
|
|
5228
|
-
RegionAttachment
|
|
5229
|
-
RegionAttachment
|
|
5230
|
-
RegionAttachment
|
|
5231
|
-
RegionAttachment
|
|
5232
|
-
RegionAttachment
|
|
5233
|
-
RegionAttachment
|
|
5234
|
-
RegionAttachment
|
|
5235
|
-
RegionAttachment
|
|
5236
|
-
RegionAttachment
|
|
5237
|
+
__publicField(RegionAttachment, "X1", 0);
|
|
5238
|
+
__publicField(RegionAttachment, "Y1", 1);
|
|
5239
|
+
__publicField(RegionAttachment, "C1R", 2);
|
|
5240
|
+
__publicField(RegionAttachment, "C1G", 3);
|
|
5241
|
+
__publicField(RegionAttachment, "C1B", 4);
|
|
5242
|
+
__publicField(RegionAttachment, "C1A", 5);
|
|
5243
|
+
__publicField(RegionAttachment, "U1", 6);
|
|
5244
|
+
__publicField(RegionAttachment, "V1", 7);
|
|
5245
|
+
__publicField(RegionAttachment, "X2", 8);
|
|
5246
|
+
__publicField(RegionAttachment, "Y2", 9);
|
|
5247
|
+
__publicField(RegionAttachment, "C2R", 10);
|
|
5248
|
+
__publicField(RegionAttachment, "C2G", 11);
|
|
5249
|
+
__publicField(RegionAttachment, "C2B", 12);
|
|
5250
|
+
__publicField(RegionAttachment, "C2A", 13);
|
|
5251
|
+
__publicField(RegionAttachment, "U2", 14);
|
|
5252
|
+
__publicField(RegionAttachment, "V2", 15);
|
|
5253
|
+
__publicField(RegionAttachment, "X3", 16);
|
|
5254
|
+
__publicField(RegionAttachment, "Y3", 17);
|
|
5255
|
+
__publicField(RegionAttachment, "C3R", 18);
|
|
5256
|
+
__publicField(RegionAttachment, "C3G", 19);
|
|
5257
|
+
__publicField(RegionAttachment, "C3B", 20);
|
|
5258
|
+
__publicField(RegionAttachment, "C3A", 21);
|
|
5259
|
+
__publicField(RegionAttachment, "U3", 22);
|
|
5260
|
+
__publicField(RegionAttachment, "V3", 23);
|
|
5261
|
+
__publicField(RegionAttachment, "X4", 24);
|
|
5262
|
+
__publicField(RegionAttachment, "Y4", 25);
|
|
5263
|
+
__publicField(RegionAttachment, "C4R", 26);
|
|
5264
|
+
__publicField(RegionAttachment, "C4G", 27);
|
|
5265
|
+
__publicField(RegionAttachment, "C4B", 28);
|
|
5266
|
+
__publicField(RegionAttachment, "C4A", 29);
|
|
5267
|
+
__publicField(RegionAttachment, "U4", 30);
|
|
5268
|
+
__publicField(RegionAttachment, "V4", 31);
|
|
5237
5269
|
|
|
5238
5270
|
// spine-core/src/AtlasAttachmentLoader.ts
|
|
5239
5271
|
var AtlasAttachmentLoader = class {
|
|
5272
|
+
atlas;
|
|
5240
5273
|
constructor(atlas) {
|
|
5241
5274
|
this.atlas = atlas;
|
|
5242
5275
|
}
|
|
@@ -5290,36 +5323,38 @@ var spine = (() => {
|
|
|
5290
5323
|
|
|
5291
5324
|
// spine-core/src/BoneData.ts
|
|
5292
5325
|
var BoneData = class {
|
|
5326
|
+
/** The index of the bone in {@link Skeleton#getBones()}. */
|
|
5327
|
+
index = 0;
|
|
5328
|
+
/** The name of the bone, which is unique across all bones in the skeleton. */
|
|
5329
|
+
name;
|
|
5330
|
+
/** @returns May be null. */
|
|
5331
|
+
parent = null;
|
|
5332
|
+
/** The bone's length. */
|
|
5333
|
+
length = 0;
|
|
5334
|
+
/** The local x translation. */
|
|
5335
|
+
x = 0;
|
|
5336
|
+
/** The local y translation. */
|
|
5337
|
+
y = 0;
|
|
5338
|
+
/** The local rotation. */
|
|
5339
|
+
rotation = 0;
|
|
5340
|
+
/** The local scaleX. */
|
|
5341
|
+
scaleX = 1;
|
|
5342
|
+
/** The local scaleY. */
|
|
5343
|
+
scaleY = 1;
|
|
5344
|
+
/** The local shearX. */
|
|
5345
|
+
shearX = 0;
|
|
5346
|
+
/** The local shearX. */
|
|
5347
|
+
shearY = 0;
|
|
5348
|
+
/** The transform mode for how parent world transforms affect this bone. */
|
|
5349
|
+
transformMode = TransformMode.Normal;
|
|
5350
|
+
/** When true, {@link Skeleton#updateWorldTransform()} only updates this bone if the {@link Skeleton#skin} contains this
|
|
5351
|
+
* bone.
|
|
5352
|
+
* @see Skin#bones */
|
|
5353
|
+
skinRequired = false;
|
|
5354
|
+
/** The color of the bone as it was in Spine. Available only when nonessential data was exported. Bones are not usually
|
|
5355
|
+
* rendered at runtime. */
|
|
5356
|
+
color = new Color();
|
|
5293
5357
|
constructor(index, name, parent) {
|
|
5294
|
-
/** The index of the bone in {@link Skeleton#getBones()}. */
|
|
5295
|
-
this.index = 0;
|
|
5296
|
-
/** @returns May be null. */
|
|
5297
|
-
this.parent = null;
|
|
5298
|
-
/** The bone's length. */
|
|
5299
|
-
this.length = 0;
|
|
5300
|
-
/** The local x translation. */
|
|
5301
|
-
this.x = 0;
|
|
5302
|
-
/** The local y translation. */
|
|
5303
|
-
this.y = 0;
|
|
5304
|
-
/** The local rotation. */
|
|
5305
|
-
this.rotation = 0;
|
|
5306
|
-
/** The local scaleX. */
|
|
5307
|
-
this.scaleX = 1;
|
|
5308
|
-
/** The local scaleY. */
|
|
5309
|
-
this.scaleY = 1;
|
|
5310
|
-
/** The local shearX. */
|
|
5311
|
-
this.shearX = 0;
|
|
5312
|
-
/** The local shearX. */
|
|
5313
|
-
this.shearY = 0;
|
|
5314
|
-
/** The transform mode for how parent world transforms affect this bone. */
|
|
5315
|
-
this.transformMode = TransformMode.Normal;
|
|
5316
|
-
/** When true, {@link Skeleton#updateWorldTransform()} only updates this bone if the {@link Skeleton#skin} contains this
|
|
5317
|
-
* bone.
|
|
5318
|
-
* @see Skin#bones */
|
|
5319
|
-
this.skinRequired = false;
|
|
5320
|
-
/** The color of the bone as it was in Spine. Available only when nonessential data was exported. Bones are not usually
|
|
5321
|
-
* rendered at runtime. */
|
|
5322
|
-
this.color = new Color();
|
|
5323
5358
|
if (index < 0)
|
|
5324
5359
|
throw new Error("index must be >= 0.");
|
|
5325
5360
|
if (!name)
|
|
@@ -5340,54 +5375,58 @@ var spine = (() => {
|
|
|
5340
5375
|
|
|
5341
5376
|
// spine-core/src/Bone.ts
|
|
5342
5377
|
var Bone = class {
|
|
5378
|
+
/** The bone's setup pose data. */
|
|
5379
|
+
data;
|
|
5380
|
+
/** The skeleton this bone belongs to. */
|
|
5381
|
+
skeleton;
|
|
5382
|
+
/** The parent bone, or null if this is the root bone. */
|
|
5383
|
+
parent = null;
|
|
5384
|
+
/** The immediate children of this bone. */
|
|
5385
|
+
children = new Array();
|
|
5386
|
+
/** The local x translation. */
|
|
5387
|
+
x = 0;
|
|
5388
|
+
/** The local y translation. */
|
|
5389
|
+
y = 0;
|
|
5390
|
+
/** The local rotation in degrees, counter clockwise. */
|
|
5391
|
+
rotation = 0;
|
|
5392
|
+
/** The local scaleX. */
|
|
5393
|
+
scaleX = 0;
|
|
5394
|
+
/** The local scaleY. */
|
|
5395
|
+
scaleY = 0;
|
|
5396
|
+
/** The local shearX. */
|
|
5397
|
+
shearX = 0;
|
|
5398
|
+
/** The local shearY. */
|
|
5399
|
+
shearY = 0;
|
|
5400
|
+
/** The applied local x translation. */
|
|
5401
|
+
ax = 0;
|
|
5402
|
+
/** The applied local y translation. */
|
|
5403
|
+
ay = 0;
|
|
5404
|
+
/** The applied local rotation in degrees, counter clockwise. */
|
|
5405
|
+
arotation = 0;
|
|
5406
|
+
/** The applied local scaleX. */
|
|
5407
|
+
ascaleX = 0;
|
|
5408
|
+
/** The applied local scaleY. */
|
|
5409
|
+
ascaleY = 0;
|
|
5410
|
+
/** The applied local shearX. */
|
|
5411
|
+
ashearX = 0;
|
|
5412
|
+
/** The applied local shearY. */
|
|
5413
|
+
ashearY = 0;
|
|
5414
|
+
/** Part of the world transform matrix for the X axis. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5415
|
+
a = 0;
|
|
5416
|
+
/** Part of the world transform matrix for the Y axis. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5417
|
+
b = 0;
|
|
5418
|
+
/** Part of the world transform matrix for the X axis. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5419
|
+
c = 0;
|
|
5420
|
+
/** Part of the world transform matrix for the Y axis. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5421
|
+
d = 0;
|
|
5422
|
+
/** The world X position. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5423
|
+
worldY = 0;
|
|
5424
|
+
/** The world Y position. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5425
|
+
worldX = 0;
|
|
5426
|
+
sorted = false;
|
|
5427
|
+
active = false;
|
|
5343
5428
|
/** @param parent May be null. */
|
|
5344
5429
|
constructor(data, skeleton, parent) {
|
|
5345
|
-
/** The parent bone, or null if this is the root bone. */
|
|
5346
|
-
this.parent = null;
|
|
5347
|
-
/** The immediate children of this bone. */
|
|
5348
|
-
this.children = new Array();
|
|
5349
|
-
/** The local x translation. */
|
|
5350
|
-
this.x = 0;
|
|
5351
|
-
/** The local y translation. */
|
|
5352
|
-
this.y = 0;
|
|
5353
|
-
/** The local rotation in degrees, counter clockwise. */
|
|
5354
|
-
this.rotation = 0;
|
|
5355
|
-
/** The local scaleX. */
|
|
5356
|
-
this.scaleX = 0;
|
|
5357
|
-
/** The local scaleY. */
|
|
5358
|
-
this.scaleY = 0;
|
|
5359
|
-
/** The local shearX. */
|
|
5360
|
-
this.shearX = 0;
|
|
5361
|
-
/** The local shearY. */
|
|
5362
|
-
this.shearY = 0;
|
|
5363
|
-
/** The applied local x translation. */
|
|
5364
|
-
this.ax = 0;
|
|
5365
|
-
/** The applied local y translation. */
|
|
5366
|
-
this.ay = 0;
|
|
5367
|
-
/** The applied local rotation in degrees, counter clockwise. */
|
|
5368
|
-
this.arotation = 0;
|
|
5369
|
-
/** The applied local scaleX. */
|
|
5370
|
-
this.ascaleX = 0;
|
|
5371
|
-
/** The applied local scaleY. */
|
|
5372
|
-
this.ascaleY = 0;
|
|
5373
|
-
/** The applied local shearX. */
|
|
5374
|
-
this.ashearX = 0;
|
|
5375
|
-
/** The applied local shearY. */
|
|
5376
|
-
this.ashearY = 0;
|
|
5377
|
-
/** Part of the world transform matrix for the X axis. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5378
|
-
this.a = 0;
|
|
5379
|
-
/** Part of the world transform matrix for the Y axis. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5380
|
-
this.b = 0;
|
|
5381
|
-
/** Part of the world transform matrix for the X axis. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5382
|
-
this.c = 0;
|
|
5383
|
-
/** Part of the world transform matrix for the Y axis. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5384
|
-
this.d = 0;
|
|
5385
|
-
/** The world X position. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5386
|
-
this.worldY = 0;
|
|
5387
|
-
/** The world Y position. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5388
|
-
this.worldX = 0;
|
|
5389
|
-
this.sorted = false;
|
|
5390
|
-
this.active = false;
|
|
5391
5430
|
if (!data)
|
|
5392
5431
|
throw new Error("data cannot be null.");
|
|
5393
5432
|
if (!skeleton)
|
|
@@ -5687,12 +5726,14 @@ var spine = (() => {
|
|
|
5687
5726
|
|
|
5688
5727
|
// spine-core/src/AssetManagerBase.ts
|
|
5689
5728
|
var AssetManagerBase = class {
|
|
5729
|
+
pathPrefix = "";
|
|
5730
|
+
textureLoader;
|
|
5731
|
+
downloader;
|
|
5732
|
+
assets = {};
|
|
5733
|
+
errors = {};
|
|
5734
|
+
toLoad = 0;
|
|
5735
|
+
loaded = 0;
|
|
5690
5736
|
constructor(textureLoader, pathPrefix = "", downloader = new Downloader()) {
|
|
5691
|
-
this.pathPrefix = "";
|
|
5692
|
-
this.assets = {};
|
|
5693
|
-
this.errors = {};
|
|
5694
|
-
this.toLoad = 0;
|
|
5695
|
-
this.loaded = 0;
|
|
5696
5737
|
this.textureLoader = textureLoader;
|
|
5697
5738
|
this.pathPrefix = pathPrefix;
|
|
5698
5739
|
this.downloader = downloader;
|
|
@@ -5877,10 +5918,8 @@ var spine = (() => {
|
|
|
5877
5918
|
}
|
|
5878
5919
|
};
|
|
5879
5920
|
var Downloader = class {
|
|
5880
|
-
|
|
5881
|
-
|
|
5882
|
-
this.rawDataUris = {};
|
|
5883
|
-
}
|
|
5921
|
+
callbacks = {};
|
|
5922
|
+
rawDataUris = {};
|
|
5884
5923
|
dataUriToString(dataUri) {
|
|
5885
5924
|
if (!dataUri.startsWith("data:")) {
|
|
5886
5925
|
throw new Error("Not a data URI.");
|
|
@@ -5987,13 +6026,14 @@ var spine = (() => {
|
|
|
5987
6026
|
|
|
5988
6027
|
// spine-core/src/Event.ts
|
|
5989
6028
|
var Event = class {
|
|
6029
|
+
data;
|
|
6030
|
+
intValue = 0;
|
|
6031
|
+
floatValue = 0;
|
|
6032
|
+
stringValue = null;
|
|
6033
|
+
time = 0;
|
|
6034
|
+
volume = 0;
|
|
6035
|
+
balance = 0;
|
|
5990
6036
|
constructor(time, data) {
|
|
5991
|
-
this.intValue = 0;
|
|
5992
|
-
this.floatValue = 0;
|
|
5993
|
-
this.stringValue = null;
|
|
5994
|
-
this.time = 0;
|
|
5995
|
-
this.volume = 0;
|
|
5996
|
-
this.balance = 0;
|
|
5997
6037
|
if (!data)
|
|
5998
6038
|
throw new Error("data cannot be null.");
|
|
5999
6039
|
this.time = time;
|
|
@@ -6003,32 +6043,39 @@ var spine = (() => {
|
|
|
6003
6043
|
|
|
6004
6044
|
// spine-core/src/EventData.ts
|
|
6005
6045
|
var EventData = class {
|
|
6046
|
+
name;
|
|
6047
|
+
intValue = 0;
|
|
6048
|
+
floatValue = 0;
|
|
6049
|
+
stringValue = null;
|
|
6050
|
+
audioPath = null;
|
|
6051
|
+
volume = 0;
|
|
6052
|
+
balance = 0;
|
|
6006
6053
|
constructor(name) {
|
|
6007
|
-
this.intValue = 0;
|
|
6008
|
-
this.floatValue = 0;
|
|
6009
|
-
this.stringValue = null;
|
|
6010
|
-
this.audioPath = null;
|
|
6011
|
-
this.volume = 0;
|
|
6012
|
-
this.balance = 0;
|
|
6013
6054
|
this.name = name;
|
|
6014
6055
|
}
|
|
6015
6056
|
};
|
|
6016
6057
|
|
|
6017
6058
|
// spine-core/src/IkConstraint.ts
|
|
6018
6059
|
var IkConstraint = class {
|
|
6060
|
+
/** The IK constraint's setup pose data. */
|
|
6061
|
+
data;
|
|
6062
|
+
/** The bones that will be modified by this IK constraint. */
|
|
6063
|
+
bones;
|
|
6064
|
+
/** The bone that is the IK target. */
|
|
6065
|
+
target;
|
|
6066
|
+
/** Controls the bend direction of the IK bones, either 1 or -1. */
|
|
6067
|
+
bendDirection = 0;
|
|
6068
|
+
/** When true and only a single bone is being constrained, if the target is too close, the bone is scaled to reach it. */
|
|
6069
|
+
compress = false;
|
|
6070
|
+
/** 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
|
|
6071
|
+
* and the parent bone has local nonuniform scale, stretch is not applied. */
|
|
6072
|
+
stretch = false;
|
|
6073
|
+
/** A percentage (0-1) that controls the mix between the constrained and unconstrained rotations. */
|
|
6074
|
+
mix = 1;
|
|
6075
|
+
/** For two bone IK, the distance from the maximum reach of the bones that rotation will slow. */
|
|
6076
|
+
softness = 0;
|
|
6077
|
+
active = false;
|
|
6019
6078
|
constructor(data, skeleton) {
|
|
6020
|
-
/** Controls the bend direction of the IK bones, either 1 or -1. */
|
|
6021
|
-
this.bendDirection = 0;
|
|
6022
|
-
/** When true and only a single bone is being constrained, if the target is too close, the bone is scaled to reach it. */
|
|
6023
|
-
this.compress = false;
|
|
6024
|
-
/** 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
|
|
6025
|
-
* and the parent bone has local nonuniform scale, stretch is not applied. */
|
|
6026
|
-
this.stretch = false;
|
|
6027
|
-
/** A percentage (0-1) that controls the mix between the constrained and unconstrained rotations. */
|
|
6028
|
-
this.mix = 1;
|
|
6029
|
-
/** For two bone IK, the distance from the maximum reach of the bones that rotation will slow. */
|
|
6030
|
-
this.softness = 0;
|
|
6031
|
-
this.active = false;
|
|
6032
6079
|
if (!data)
|
|
6033
6080
|
throw new Error("data cannot be null.");
|
|
6034
6081
|
if (!skeleton)
|
|
@@ -6286,27 +6333,10 @@ var spine = (() => {
|
|
|
6286
6333
|
|
|
6287
6334
|
// spine-core/src/IkConstraintData.ts
|
|
6288
6335
|
var IkConstraintData = class extends ConstraintData {
|
|
6289
|
-
|
|
6290
|
-
|
|
6291
|
-
|
|
6292
|
-
|
|
6293
|
-
/** The bone that is the IK target. */
|
|
6294
|
-
this._target = null;
|
|
6295
|
-
/** Controls the bend direction of the IK bones, either 1 or -1. */
|
|
6296
|
-
this.bendDirection = 1;
|
|
6297
|
-
/** When true and only a single bone is being constrained, if the target is too close, the bone is scaled to reach it. */
|
|
6298
|
-
this.compress = false;
|
|
6299
|
-
/** 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
|
|
6300
|
-
* and the parent bone has local nonuniform scale, stretch is not applied. */
|
|
6301
|
-
this.stretch = false;
|
|
6302
|
-
/** When true, only a single bone is being constrained, and {@link #getCompress()} or {@link #getStretch()} is used, the bone
|
|
6303
|
-
* is scaled on both the X and Y axes. */
|
|
6304
|
-
this.uniform = false;
|
|
6305
|
-
/** A percentage (0-1) that controls the mix between the constrained and unconstrained rotations. */
|
|
6306
|
-
this.mix = 1;
|
|
6307
|
-
/** For two bone IK, the distance from the maximum reach of the bones that rotation will slow. */
|
|
6308
|
-
this.softness = 0;
|
|
6309
|
-
}
|
|
6336
|
+
/** The bones that are constrained by this IK constraint. */
|
|
6337
|
+
bones = new Array();
|
|
6338
|
+
/** The bone that is the IK target. */
|
|
6339
|
+
_target = null;
|
|
6310
6340
|
set target(boneData) {
|
|
6311
6341
|
this._target = boneData;
|
|
6312
6342
|
}
|
|
@@ -6316,32 +6346,31 @@ var spine = (() => {
|
|
|
6316
6346
|
else
|
|
6317
6347
|
return this._target;
|
|
6318
6348
|
}
|
|
6349
|
+
/** Controls the bend direction of the IK bones, either 1 or -1. */
|
|
6350
|
+
bendDirection = 1;
|
|
6351
|
+
/** When true and only a single bone is being constrained, if the target is too close, the bone is scaled to reach it. */
|
|
6352
|
+
compress = false;
|
|
6353
|
+
/** 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
|
|
6354
|
+
* and the parent bone has local nonuniform scale, stretch is not applied. */
|
|
6355
|
+
stretch = false;
|
|
6356
|
+
/** When true, only a single bone is being constrained, and {@link #getCompress()} or {@link #getStretch()} is used, the bone
|
|
6357
|
+
* is scaled on both the X and Y axes. */
|
|
6358
|
+
uniform = false;
|
|
6359
|
+
/** A percentage (0-1) that controls the mix between the constrained and unconstrained rotations. */
|
|
6360
|
+
mix = 1;
|
|
6361
|
+
/** For two bone IK, the distance from the maximum reach of the bones that rotation will slow. */
|
|
6362
|
+
softness = 0;
|
|
6363
|
+
constructor(name) {
|
|
6364
|
+
super(name, 0, false);
|
|
6365
|
+
}
|
|
6319
6366
|
};
|
|
6320
6367
|
|
|
6321
6368
|
// spine-core/src/PathConstraintData.ts
|
|
6322
6369
|
var PathConstraintData = class extends ConstraintData {
|
|
6323
|
-
|
|
6324
|
-
|
|
6325
|
-
|
|
6326
|
-
|
|
6327
|
-
/** The slot whose path attachment will be used to constrained the bones. */
|
|
6328
|
-
this._target = null;
|
|
6329
|
-
/** The mode for positioning the first bone on the path. */
|
|
6330
|
-
this.positionMode = PositionMode.Fixed;
|
|
6331
|
-
/** The mode for positioning the bones after the first bone on the path. */
|
|
6332
|
-
this.spacingMode = SpacingMode.Fixed;
|
|
6333
|
-
/** The mode for adjusting the rotation of the bones. */
|
|
6334
|
-
this.rotateMode = RotateMode.Chain;
|
|
6335
|
-
/** An offset added to the constrained bone rotation. */
|
|
6336
|
-
this.offsetRotation = 0;
|
|
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
|
-
}
|
|
6370
|
+
/** The bones that will be modified by this path constraint. */
|
|
6371
|
+
bones = new Array();
|
|
6372
|
+
/** The slot whose path attachment will be used to constrained the bones. */
|
|
6373
|
+
_target = null;
|
|
6345
6374
|
set target(slotData) {
|
|
6346
6375
|
this._target = slotData;
|
|
6347
6376
|
}
|
|
@@ -6351,6 +6380,24 @@ var spine = (() => {
|
|
|
6351
6380
|
else
|
|
6352
6381
|
return this._target;
|
|
6353
6382
|
}
|
|
6383
|
+
/** The mode for positioning the first bone on the path. */
|
|
6384
|
+
positionMode = PositionMode.Fixed;
|
|
6385
|
+
/** The mode for positioning the bones after the first bone on the path. */
|
|
6386
|
+
spacingMode = SpacingMode.Fixed;
|
|
6387
|
+
/** The mode for adjusting the rotation of the bones. */
|
|
6388
|
+
rotateMode = RotateMode.Chain;
|
|
6389
|
+
/** An offset added to the constrained bone rotation. */
|
|
6390
|
+
offsetRotation = 0;
|
|
6391
|
+
/** The position along the path. */
|
|
6392
|
+
position = 0;
|
|
6393
|
+
/** The spacing between bones. */
|
|
6394
|
+
spacing = 0;
|
|
6395
|
+
mixRotate = 0;
|
|
6396
|
+
mixX = 0;
|
|
6397
|
+
mixY = 0;
|
|
6398
|
+
constructor(name) {
|
|
6399
|
+
super(name, 0, false);
|
|
6400
|
+
}
|
|
6354
6401
|
};
|
|
6355
6402
|
var PositionMode = /* @__PURE__ */ ((PositionMode2) => {
|
|
6356
6403
|
PositionMode2[PositionMode2["Fixed"] = 0] = "Fixed";
|
|
@@ -6373,21 +6420,27 @@ var spine = (() => {
|
|
|
6373
6420
|
|
|
6374
6421
|
// spine-core/src/PathConstraint.ts
|
|
6375
6422
|
var _PathConstraint = class {
|
|
6423
|
+
/** The path constraint's setup pose data. */
|
|
6424
|
+
data;
|
|
6425
|
+
/** The bones that will be modified by this path constraint. */
|
|
6426
|
+
bones;
|
|
6427
|
+
/** The slot whose path attachment will be used to constrained the bones. */
|
|
6428
|
+
target;
|
|
6429
|
+
/** The position along the path. */
|
|
6430
|
+
position = 0;
|
|
6431
|
+
/** The spacing between bones. */
|
|
6432
|
+
spacing = 0;
|
|
6433
|
+
mixRotate = 0;
|
|
6434
|
+
mixX = 0;
|
|
6435
|
+
mixY = 0;
|
|
6436
|
+
spaces = new Array();
|
|
6437
|
+
positions = new Array();
|
|
6438
|
+
world = new Array();
|
|
6439
|
+
curves = new Array();
|
|
6440
|
+
lengths = new Array();
|
|
6441
|
+
segments = new Array();
|
|
6442
|
+
active = false;
|
|
6376
6443
|
constructor(data, skeleton) {
|
|
6377
|
-
/** The position along the path. */
|
|
6378
|
-
this.position = 0;
|
|
6379
|
-
/** The spacing between bones. */
|
|
6380
|
-
this.spacing = 0;
|
|
6381
|
-
this.mixRotate = 0;
|
|
6382
|
-
this.mixX = 0;
|
|
6383
|
-
this.mixY = 0;
|
|
6384
|
-
this.spaces = new Array();
|
|
6385
|
-
this.positions = new Array();
|
|
6386
|
-
this.world = new Array();
|
|
6387
|
-
this.curves = new Array();
|
|
6388
|
-
this.lengths = new Array();
|
|
6389
|
-
this.segments = new Array();
|
|
6390
|
-
this.active = false;
|
|
6391
6444
|
if (!data)
|
|
6392
6445
|
throw new Error("data cannot be null.");
|
|
6393
6446
|
if (!skeleton)
|
|
@@ -6807,27 +6860,34 @@ var spine = (() => {
|
|
|
6807
6860
|
}
|
|
6808
6861
|
};
|
|
6809
6862
|
var PathConstraint = _PathConstraint;
|
|
6810
|
-
PathConstraint
|
|
6811
|
-
PathConstraint
|
|
6812
|
-
PathConstraint
|
|
6813
|
-
PathConstraint
|
|
6863
|
+
__publicField(PathConstraint, "NONE", -1);
|
|
6864
|
+
__publicField(PathConstraint, "BEFORE", -2);
|
|
6865
|
+
__publicField(PathConstraint, "AFTER", -3);
|
|
6866
|
+
__publicField(PathConstraint, "epsilon", 1e-5);
|
|
6814
6867
|
|
|
6815
6868
|
// spine-core/src/Slot.ts
|
|
6816
6869
|
var Slot = class {
|
|
6870
|
+
/** The slot's setup pose data. */
|
|
6871
|
+
data;
|
|
6872
|
+
/** The bone this slot belongs to. */
|
|
6873
|
+
bone;
|
|
6874
|
+
/** The color used to tint the slot's attachment. If {@link #getDarkColor()} is set, this is used as the light color for two
|
|
6875
|
+
* color tinting. */
|
|
6876
|
+
color;
|
|
6877
|
+
/** 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
|
|
6878
|
+
* color's alpha is not used. */
|
|
6879
|
+
darkColor = null;
|
|
6880
|
+
attachment = null;
|
|
6881
|
+
attachmentState = 0;
|
|
6882
|
+
/** The index of the texture region to display when the slot's attachment has a {@link Sequence}. -1 represents the
|
|
6883
|
+
* {@link Sequence#getSetupIndex()}. */
|
|
6884
|
+
sequenceIndex = -1;
|
|
6885
|
+
/** Values to deform the slot's attachment. For an unweighted mesh, the entries are local positions for each vertex. For a
|
|
6886
|
+
* weighted mesh, the entries are an offset for each vertex which will be added to the mesh's local vertex positions.
|
|
6887
|
+
*
|
|
6888
|
+
* See {@link VertexAttachment#computeWorldVertices()} and {@link DeformTimeline}. */
|
|
6889
|
+
deform = new Array();
|
|
6817
6890
|
constructor(data, bone) {
|
|
6818
|
-
/** 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
|
|
6819
|
-
* color's alpha is not used. */
|
|
6820
|
-
this.darkColor = null;
|
|
6821
|
-
this.attachment = null;
|
|
6822
|
-
this.attachmentState = 0;
|
|
6823
|
-
/** The index of the texture region to display when the slot's attachment has a {@link Sequence}. -1 represents the
|
|
6824
|
-
* {@link Sequence#getSetupIndex()}. */
|
|
6825
|
-
this.sequenceIndex = -1;
|
|
6826
|
-
/** Values to deform the slot's attachment. For an unweighted mesh, the entries are local positions for each vertex. For a
|
|
6827
|
-
* weighted mesh, the entries are an offset for each vertex which will be added to the mesh's local vertex positions.
|
|
6828
|
-
*
|
|
6829
|
-
* See {@link VertexAttachment#computeWorldVertices()} and {@link DeformTimeline}. */
|
|
6830
|
-
this.deform = new Array();
|
|
6831
6891
|
if (!data)
|
|
6832
6892
|
throw new Error("data cannot be null.");
|
|
6833
6893
|
if (!bone)
|
|
@@ -6874,15 +6934,21 @@ var spine = (() => {
|
|
|
6874
6934
|
|
|
6875
6935
|
// spine-core/src/TransformConstraint.ts
|
|
6876
6936
|
var TransformConstraint = class {
|
|
6937
|
+
/** The transform constraint's setup pose data. */
|
|
6938
|
+
data;
|
|
6939
|
+
/** The bones that will be modified by this transform constraint. */
|
|
6940
|
+
bones;
|
|
6941
|
+
/** The target bone whose world transform will be copied to the constrained bones. */
|
|
6942
|
+
target;
|
|
6943
|
+
mixRotate = 0;
|
|
6944
|
+
mixX = 0;
|
|
6945
|
+
mixY = 0;
|
|
6946
|
+
mixScaleX = 0;
|
|
6947
|
+
mixScaleY = 0;
|
|
6948
|
+
mixShearY = 0;
|
|
6949
|
+
temp = new Vector2();
|
|
6950
|
+
active = false;
|
|
6877
6951
|
constructor(data, skeleton) {
|
|
6878
|
-
this.mixRotate = 0;
|
|
6879
|
-
this.mixX = 0;
|
|
6880
|
-
this.mixY = 0;
|
|
6881
|
-
this.mixScaleX = 0;
|
|
6882
|
-
this.mixScaleY = 0;
|
|
6883
|
-
this.mixShearY = 0;
|
|
6884
|
-
this.temp = new Vector2();
|
|
6885
|
-
this.active = false;
|
|
6886
6952
|
if (!data)
|
|
6887
6953
|
throw new Error("data cannot be null.");
|
|
6888
6954
|
if (!skeleton)
|
|
@@ -7088,21 +7154,43 @@ var spine = (() => {
|
|
|
7088
7154
|
|
|
7089
7155
|
// spine-core/src/Skeleton.ts
|
|
7090
7156
|
var _Skeleton = class {
|
|
7157
|
+
/** The skeleton's setup pose data. */
|
|
7158
|
+
data;
|
|
7159
|
+
/** The skeleton's bones, sorted parent first. The root bone is always the first bone. */
|
|
7160
|
+
bones;
|
|
7161
|
+
/** The skeleton's slots. */
|
|
7162
|
+
slots;
|
|
7163
|
+
/** The skeleton's slots in the order they should be drawn. The returned array may be modified to change the draw order. */
|
|
7164
|
+
drawOrder;
|
|
7165
|
+
/** The skeleton's IK constraints. */
|
|
7166
|
+
ikConstraints;
|
|
7167
|
+
/** The skeleton's transform constraints. */
|
|
7168
|
+
transformConstraints;
|
|
7169
|
+
/** The skeleton's path constraints. */
|
|
7170
|
+
pathConstraints;
|
|
7171
|
+
/** The list of bones and constraints, sorted in the order they should be updated, as computed by {@link #updateCache()}. */
|
|
7172
|
+
_updateCache = new Array();
|
|
7173
|
+
/** The skeleton's current skin. May be null. */
|
|
7174
|
+
skin = null;
|
|
7175
|
+
/** The color to tint all the skeleton's attachments. */
|
|
7176
|
+
color;
|
|
7177
|
+
/** Scales the entire skeleton on the X axis. This affects all bones, even if the bone's transform mode disallows scale
|
|
7178
|
+
* inheritance. */
|
|
7179
|
+
scaleX = 1;
|
|
7180
|
+
/** Scales the entire skeleton on the Y axis. This affects all bones, even if the bone's transform mode disallows scale
|
|
7181
|
+
* inheritance. */
|
|
7182
|
+
_scaleY = 1;
|
|
7183
|
+
get scaleY() {
|
|
7184
|
+
return _Skeleton.yDown ? -this._scaleY : this._scaleY;
|
|
7185
|
+
}
|
|
7186
|
+
set scaleY(scaleY) {
|
|
7187
|
+
this._scaleY = scaleY;
|
|
7188
|
+
}
|
|
7189
|
+
/** Sets the skeleton X position, which is added to the root bone worldX position. */
|
|
7190
|
+
x = 0;
|
|
7191
|
+
/** Sets the skeleton Y position, which is added to the root bone worldY position. */
|
|
7192
|
+
y = 0;
|
|
7091
7193
|
constructor(data) {
|
|
7092
|
-
/** The list of bones and constraints, sorted in the order they should be updated, as computed by {@link #updateCache()}. */
|
|
7093
|
-
this._updateCache = new Array();
|
|
7094
|
-
/** The skeleton's current skin. May be null. */
|
|
7095
|
-
this.skin = null;
|
|
7096
|
-
/** Scales the entire skeleton on the X axis. This affects all bones, even if the bone's transform mode disallows scale
|
|
7097
|
-
* inheritance. */
|
|
7098
|
-
this.scaleX = 1;
|
|
7099
|
-
/** Scales the entire skeleton on the Y axis. This affects all bones, even if the bone's transform mode disallows scale
|
|
7100
|
-
* inheritance. */
|
|
7101
|
-
this._scaleY = 1;
|
|
7102
|
-
/** Sets the skeleton X position, which is added to the root bone worldX position. */
|
|
7103
|
-
this.x = 0;
|
|
7104
|
-
/** Sets the skeleton Y position, which is added to the root bone worldY position. */
|
|
7105
|
-
this.y = 0;
|
|
7106
7194
|
if (!data)
|
|
7107
7195
|
throw new Error("data cannot be null.");
|
|
7108
7196
|
this.data = data;
|
|
@@ -7146,12 +7234,6 @@ var spine = (() => {
|
|
|
7146
7234
|
this.color = new Color(1, 1, 1, 1);
|
|
7147
7235
|
this.updateCache();
|
|
7148
7236
|
}
|
|
7149
|
-
get scaleY() {
|
|
7150
|
-
return _Skeleton.yDown ? -this._scaleY : this._scaleY;
|
|
7151
|
-
}
|
|
7152
|
-
set scaleY(scaleY) {
|
|
7153
|
-
this._scaleY = scaleY;
|
|
7154
|
-
}
|
|
7155
7237
|
/** Caches information about bones and constraints. Must be called if the {@link #getSkin()} is modified or if bones,
|
|
7156
7238
|
* constraints, or weighted path attachments are added or removed. */
|
|
7157
7239
|
updateCache() {
|
|
@@ -7628,55 +7710,53 @@ var spine = (() => {
|
|
|
7628
7710
|
}
|
|
7629
7711
|
};
|
|
7630
7712
|
var Skeleton = _Skeleton;
|
|
7631
|
-
Skeleton
|
|
7713
|
+
__publicField(Skeleton, "yDown", false);
|
|
7632
7714
|
|
|
7633
7715
|
// spine-core/src/SkeletonData.ts
|
|
7634
7716
|
var SkeletonData = class {
|
|
7635
|
-
|
|
7636
|
-
|
|
7637
|
-
|
|
7638
|
-
|
|
7639
|
-
|
|
7640
|
-
|
|
7641
|
-
|
|
7642
|
-
|
|
7643
|
-
|
|
7644
|
-
|
|
7645
|
-
|
|
7646
|
-
|
|
7647
|
-
|
|
7648
|
-
|
|
7649
|
-
|
|
7650
|
-
|
|
7651
|
-
|
|
7652
|
-
|
|
7653
|
-
|
|
7654
|
-
|
|
7655
|
-
|
|
7656
|
-
|
|
7657
|
-
|
|
7658
|
-
|
|
7659
|
-
|
|
7660
|
-
|
|
7661
|
-
|
|
7662
|
-
|
|
7663
|
-
|
|
7664
|
-
|
|
7665
|
-
|
|
7666
|
-
|
|
7667
|
-
|
|
7668
|
-
|
|
7669
|
-
|
|
7670
|
-
|
|
7671
|
-
|
|
7672
|
-
|
|
7673
|
-
|
|
7674
|
-
|
|
7675
|
-
|
|
7676
|
-
|
|
7677
|
-
|
|
7678
|
-
this.audioPath = null;
|
|
7679
|
-
}
|
|
7717
|
+
/** The skeleton's name, which by default is the name of the skeleton data file, if possible. May be null. */
|
|
7718
|
+
name = null;
|
|
7719
|
+
/** The skeleton's bones, sorted parent first. The root bone is always the first bone. */
|
|
7720
|
+
bones = new Array();
|
|
7721
|
+
// Ordered parents first.
|
|
7722
|
+
/** The skeleton's slots. */
|
|
7723
|
+
slots = new Array();
|
|
7724
|
+
// Setup pose draw order.
|
|
7725
|
+
skins = new Array();
|
|
7726
|
+
/** The skeleton's default skin. By default this skin contains all attachments that were not in a skin in Spine.
|
|
7727
|
+
*
|
|
7728
|
+
* See {@link Skeleton#getAttachmentByName()}.
|
|
7729
|
+
* May be null. */
|
|
7730
|
+
defaultSkin = null;
|
|
7731
|
+
/** The skeleton's events. */
|
|
7732
|
+
events = new Array();
|
|
7733
|
+
/** The skeleton's animations. */
|
|
7734
|
+
animations = new Array();
|
|
7735
|
+
/** The skeleton's IK constraints. */
|
|
7736
|
+
ikConstraints = new Array();
|
|
7737
|
+
/** The skeleton's transform constraints. */
|
|
7738
|
+
transformConstraints = new Array();
|
|
7739
|
+
/** The skeleton's path constraints. */
|
|
7740
|
+
pathConstraints = new Array();
|
|
7741
|
+
/** The X coordinate of the skeleton's axis aligned bounding box in the setup pose. */
|
|
7742
|
+
x = 0;
|
|
7743
|
+
/** The Y coordinate of the skeleton's axis aligned bounding box in the setup pose. */
|
|
7744
|
+
y = 0;
|
|
7745
|
+
/** The width of the skeleton's axis aligned bounding box in the setup pose. */
|
|
7746
|
+
width = 0;
|
|
7747
|
+
/** The height of the skeleton's axis aligned bounding box in the setup pose. */
|
|
7748
|
+
height = 0;
|
|
7749
|
+
/** The Spine version used to export the skeleton data, or null. */
|
|
7750
|
+
version = null;
|
|
7751
|
+
/** The skeleton data hash. This value will change if any of the skeleton data has changed. May be null. */
|
|
7752
|
+
hash = null;
|
|
7753
|
+
// Nonessential
|
|
7754
|
+
/** The dopesheet FPS in Spine. Available only when nonessential data was exported. */
|
|
7755
|
+
fps = 0;
|
|
7756
|
+
/** The path to the images directory as defined in Spine. Available only when nonessential data was exported. May be null. */
|
|
7757
|
+
imagesPath = null;
|
|
7758
|
+
/** The path to the audio directory as defined in Spine. Available only when nonessential data was exported. May be null. */
|
|
7759
|
+
audioPath = null;
|
|
7680
7760
|
/** Finds a bone by comparing each bone's name. It is more efficient to cache the results of this method than to call it
|
|
7681
7761
|
* multiple times.
|
|
7682
7762
|
* @returns May be null. */
|
|
@@ -7800,10 +7880,12 @@ var spine = (() => {
|
|
|
7800
7880
|
}
|
|
7801
7881
|
};
|
|
7802
7882
|
var Skin = class {
|
|
7883
|
+
/** The skin's name, which is unique across all skins in the skeleton. */
|
|
7884
|
+
name;
|
|
7885
|
+
attachments = new Array();
|
|
7886
|
+
bones = Array();
|
|
7887
|
+
constraints = new Array();
|
|
7803
7888
|
constructor(name) {
|
|
7804
|
-
this.attachments = new Array();
|
|
7805
|
-
this.bones = Array();
|
|
7806
|
-
this.constraints = new Array();
|
|
7807
7889
|
if (!name)
|
|
7808
7890
|
throw new Error("name cannot be null.");
|
|
7809
7891
|
this.name = name;
|
|
@@ -7960,19 +8042,23 @@ var spine = (() => {
|
|
|
7960
8042
|
|
|
7961
8043
|
// spine-core/src/SlotData.ts
|
|
7962
8044
|
var SlotData = class {
|
|
8045
|
+
/** The index of the slot in {@link Skeleton#getSlots()}. */
|
|
8046
|
+
index = 0;
|
|
8047
|
+
/** The name of the slot, which is unique across all slots in the skeleton. */
|
|
8048
|
+
name;
|
|
8049
|
+
/** The bone this slot belongs to. */
|
|
8050
|
+
boneData;
|
|
8051
|
+
/** The color used to tint the slot's attachment. If {@link #getDarkColor()} is set, this is used as the light color for two
|
|
8052
|
+
* color tinting. */
|
|
8053
|
+
color = new Color(1, 1, 1, 1);
|
|
8054
|
+
/** 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
|
|
8055
|
+
* color's alpha is not used. */
|
|
8056
|
+
darkColor = null;
|
|
8057
|
+
/** The name of the attachment that is visible for this slot in the setup pose, or null if no attachment is visible. */
|
|
8058
|
+
attachmentName = null;
|
|
8059
|
+
/** The blend mode for drawing the slot's attachment. */
|
|
8060
|
+
blendMode = BlendMode.Normal;
|
|
7963
8061
|
constructor(index, name, boneData) {
|
|
7964
|
-
/** The index of the slot in {@link Skeleton#getSlots()}. */
|
|
7965
|
-
this.index = 0;
|
|
7966
|
-
/** The color used to tint the slot's attachment. If {@link #getDarkColor()} is set, this is used as the light color for two
|
|
7967
|
-
* color tinting. */
|
|
7968
|
-
this.color = new Color(1, 1, 1, 1);
|
|
7969
|
-
/** 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
|
|
7970
|
-
* color's alpha is not used. */
|
|
7971
|
-
this.darkColor = null;
|
|
7972
|
-
/** The name of the attachment that is visible for this slot in the setup pose, or null if no attachment is visible. */
|
|
7973
|
-
this.attachmentName = null;
|
|
7974
|
-
/** The blend mode for drawing the slot's attachment. */
|
|
7975
|
-
this.blendMode = BlendMode.Normal;
|
|
7976
8062
|
if (index < 0)
|
|
7977
8063
|
throw new Error("index must be >= 0.");
|
|
7978
8064
|
if (!name)
|
|
@@ -7994,33 +8080,10 @@ var spine = (() => {
|
|
|
7994
8080
|
|
|
7995
8081
|
// spine-core/src/TransformConstraintData.ts
|
|
7996
8082
|
var TransformConstraintData = class extends ConstraintData {
|
|
7997
|
-
|
|
7998
|
-
|
|
7999
|
-
|
|
8000
|
-
|
|
8001
|
-
/** The target bone whose world transform will be copied to the constrained bones. */
|
|
8002
|
-
this._target = null;
|
|
8003
|
-
this.mixRotate = 0;
|
|
8004
|
-
this.mixX = 0;
|
|
8005
|
-
this.mixY = 0;
|
|
8006
|
-
this.mixScaleX = 0;
|
|
8007
|
-
this.mixScaleY = 0;
|
|
8008
|
-
this.mixShearY = 0;
|
|
8009
|
-
/** An offset added to the constrained bone rotation. */
|
|
8010
|
-
this.offsetRotation = 0;
|
|
8011
|
-
/** An offset added to the constrained bone X translation. */
|
|
8012
|
-
this.offsetX = 0;
|
|
8013
|
-
/** An offset added to the constrained bone Y translation. */
|
|
8014
|
-
this.offsetY = 0;
|
|
8015
|
-
/** An offset added to the constrained bone scaleX. */
|
|
8016
|
-
this.offsetScaleX = 0;
|
|
8017
|
-
/** An offset added to the constrained bone scaleY. */
|
|
8018
|
-
this.offsetScaleY = 0;
|
|
8019
|
-
/** An offset added to the constrained bone shearY. */
|
|
8020
|
-
this.offsetShearY = 0;
|
|
8021
|
-
this.relative = false;
|
|
8022
|
-
this.local = false;
|
|
8023
|
-
}
|
|
8083
|
+
/** The bones that will be modified by this transform constraint. */
|
|
8084
|
+
bones = new Array();
|
|
8085
|
+
/** The target bone whose world transform will be copied to the constrained bones. */
|
|
8086
|
+
_target = null;
|
|
8024
8087
|
set target(boneData) {
|
|
8025
8088
|
this._target = boneData;
|
|
8026
8089
|
}
|
|
@@ -8030,17 +8093,41 @@ var spine = (() => {
|
|
|
8030
8093
|
else
|
|
8031
8094
|
return this._target;
|
|
8032
8095
|
}
|
|
8096
|
+
mixRotate = 0;
|
|
8097
|
+
mixX = 0;
|
|
8098
|
+
mixY = 0;
|
|
8099
|
+
mixScaleX = 0;
|
|
8100
|
+
mixScaleY = 0;
|
|
8101
|
+
mixShearY = 0;
|
|
8102
|
+
/** An offset added to the constrained bone rotation. */
|
|
8103
|
+
offsetRotation = 0;
|
|
8104
|
+
/** An offset added to the constrained bone X translation. */
|
|
8105
|
+
offsetX = 0;
|
|
8106
|
+
/** An offset added to the constrained bone Y translation. */
|
|
8107
|
+
offsetY = 0;
|
|
8108
|
+
/** An offset added to the constrained bone scaleX. */
|
|
8109
|
+
offsetScaleX = 0;
|
|
8110
|
+
/** An offset added to the constrained bone scaleY. */
|
|
8111
|
+
offsetScaleY = 0;
|
|
8112
|
+
/** An offset added to the constrained bone shearY. */
|
|
8113
|
+
offsetShearY = 0;
|
|
8114
|
+
relative = false;
|
|
8115
|
+
local = false;
|
|
8116
|
+
constructor(name) {
|
|
8117
|
+
super(name, 0, false);
|
|
8118
|
+
}
|
|
8033
8119
|
};
|
|
8034
8120
|
|
|
8035
8121
|
// spine-core/src/SkeletonBinary.ts
|
|
8036
8122
|
var SkeletonBinary = class {
|
|
8123
|
+
/** Scales bone positions, image sizes, and translations as they are loaded. This allows different size images to be used at
|
|
8124
|
+
* runtime than were used in Spine.
|
|
8125
|
+
*
|
|
8126
|
+
* See [Scaling](http://esotericsoftware.com/spine-loading-skeleton-data#Scaling) in the Spine Runtimes Guide. */
|
|
8127
|
+
scale = 1;
|
|
8128
|
+
attachmentLoader;
|
|
8129
|
+
linkedMeshes = new Array();
|
|
8037
8130
|
constructor(attachmentLoader) {
|
|
8038
|
-
/** Scales bone positions, image sizes, and translations as they are loaded. This allows different size images to be used at
|
|
8039
|
-
* runtime than were used in Spine.
|
|
8040
|
-
*
|
|
8041
|
-
* See [Scaling](http://esotericsoftware.com/spine-loading-skeleton-data#Scaling) in the Spine Runtimes Guide. */
|
|
8042
|
-
this.scale = 1;
|
|
8043
|
-
this.linkedMeshes = new Array();
|
|
8044
8131
|
this.attachmentLoader = attachmentLoader;
|
|
8045
8132
|
}
|
|
8046
8133
|
readSkeletonData(binary) {
|
|
@@ -9054,6 +9141,11 @@ var spine = (() => {
|
|
|
9054
9141
|
}
|
|
9055
9142
|
};
|
|
9056
9143
|
var LinkedMesh = class {
|
|
9144
|
+
parent;
|
|
9145
|
+
skin;
|
|
9146
|
+
slotIndex;
|
|
9147
|
+
mesh;
|
|
9148
|
+
inheritTimeline;
|
|
9057
9149
|
constructor(mesh, skin, slotIndex, parent, inheritDeform) {
|
|
9058
9150
|
this.mesh = mesh;
|
|
9059
9151
|
this.skin = skin;
|
|
@@ -9147,23 +9239,21 @@ var spine = (() => {
|
|
|
9147
9239
|
|
|
9148
9240
|
// spine-core/src/SkeletonBounds.ts
|
|
9149
9241
|
var SkeletonBounds = class {
|
|
9150
|
-
|
|
9151
|
-
|
|
9152
|
-
|
|
9153
|
-
|
|
9154
|
-
|
|
9155
|
-
|
|
9156
|
-
|
|
9157
|
-
|
|
9158
|
-
|
|
9159
|
-
|
|
9160
|
-
|
|
9161
|
-
|
|
9162
|
-
|
|
9163
|
-
|
|
9164
|
-
|
|
9165
|
-
});
|
|
9166
|
-
}
|
|
9242
|
+
/** The left edge of the axis aligned bounding box. */
|
|
9243
|
+
minX = 0;
|
|
9244
|
+
/** The bottom edge of the axis aligned bounding box. */
|
|
9245
|
+
minY = 0;
|
|
9246
|
+
/** The right edge of the axis aligned bounding box. */
|
|
9247
|
+
maxX = 0;
|
|
9248
|
+
/** The top edge of the axis aligned bounding box. */
|
|
9249
|
+
maxY = 0;
|
|
9250
|
+
/** The visible bounding boxes. */
|
|
9251
|
+
boundingBoxes = new Array();
|
|
9252
|
+
/** The world vertices for the bounding box polygons. */
|
|
9253
|
+
polygons = new Array();
|
|
9254
|
+
polygonPool = new Pool(() => {
|
|
9255
|
+
return Utils.newFloatArray(16);
|
|
9256
|
+
});
|
|
9167
9257
|
/** Clears any previous polygons, finds all visible bounding box attachments, and computes the world vertices for each bounding
|
|
9168
9258
|
* box's polygon.
|
|
9169
9259
|
* @param updateAabb If true, the axis aligned bounding box containing all the polygons is computed. If false, the
|
|
@@ -9334,19 +9424,17 @@ var spine = (() => {
|
|
|
9334
9424
|
|
|
9335
9425
|
// spine-core/src/Triangulator.ts
|
|
9336
9426
|
var Triangulator = class {
|
|
9337
|
-
|
|
9338
|
-
|
|
9339
|
-
|
|
9340
|
-
|
|
9341
|
-
|
|
9342
|
-
|
|
9343
|
-
|
|
9344
|
-
|
|
9345
|
-
|
|
9346
|
-
|
|
9347
|
-
|
|
9348
|
-
});
|
|
9349
|
-
}
|
|
9427
|
+
convexPolygons = new Array();
|
|
9428
|
+
convexPolygonsIndices = new Array();
|
|
9429
|
+
indicesArray = new Array();
|
|
9430
|
+
isConcaveArray = new Array();
|
|
9431
|
+
triangles = new Array();
|
|
9432
|
+
polygonPool = new Pool(() => {
|
|
9433
|
+
return new Array();
|
|
9434
|
+
});
|
|
9435
|
+
polygonIndicesPool = new Pool(() => {
|
|
9436
|
+
return new Array();
|
|
9437
|
+
});
|
|
9350
9438
|
triangulate(verticesArray) {
|
|
9351
9439
|
let vertices = verticesArray;
|
|
9352
9440
|
let vertexCount = verticesArray.length >> 1;
|
|
@@ -9550,16 +9638,14 @@ var spine = (() => {
|
|
|
9550
9638
|
|
|
9551
9639
|
// spine-core/src/SkeletonClipping.ts
|
|
9552
9640
|
var SkeletonClipping = class {
|
|
9553
|
-
|
|
9554
|
-
|
|
9555
|
-
|
|
9556
|
-
|
|
9557
|
-
|
|
9558
|
-
|
|
9559
|
-
|
|
9560
|
-
|
|
9561
|
-
this.clippingPolygons = null;
|
|
9562
|
-
}
|
|
9641
|
+
triangulator = new Triangulator();
|
|
9642
|
+
clippingPolygon = new Array();
|
|
9643
|
+
clipOutput = new Array();
|
|
9644
|
+
clippedVertices = new Array();
|
|
9645
|
+
clippedTriangles = new Array();
|
|
9646
|
+
scratch = new Array();
|
|
9647
|
+
clipAttachment = null;
|
|
9648
|
+
clippingPolygons = null;
|
|
9563
9649
|
clipStart(slot, clip) {
|
|
9564
9650
|
if (this.clipAttachment)
|
|
9565
9651
|
return 0;
|
|
@@ -9839,13 +9925,14 @@ var spine = (() => {
|
|
|
9839
9925
|
|
|
9840
9926
|
// spine-core/src/SkeletonJson.ts
|
|
9841
9927
|
var SkeletonJson = class {
|
|
9928
|
+
attachmentLoader;
|
|
9929
|
+
/** Scales bone positions, image sizes, and translations as they are loaded. This allows different size images to be used at
|
|
9930
|
+
* runtime than were used in Spine.
|
|
9931
|
+
*
|
|
9932
|
+
* See [Scaling](http://esotericsoftware.com/spine-loading-skeleton-data#Scaling) in the Spine Runtimes Guide. */
|
|
9933
|
+
scale = 1;
|
|
9934
|
+
linkedMeshes = new Array();
|
|
9842
9935
|
constructor(attachmentLoader) {
|
|
9843
|
-
/** Scales bone positions, image sizes, and translations as they are loaded. This allows different size images to be used at
|
|
9844
|
-
* runtime than were used in Spine.
|
|
9845
|
-
*
|
|
9846
|
-
* See [Scaling](http://esotericsoftware.com/spine-loading-skeleton-data#Scaling) in the Spine Runtimes Guide. */
|
|
9847
|
-
this.scale = 1;
|
|
9848
|
-
this.linkedMeshes = new Array();
|
|
9849
9936
|
this.attachmentLoader = attachmentLoader;
|
|
9850
9937
|
}
|
|
9851
9938
|
readSkeletonData(json) {
|
|
@@ -10707,6 +10794,11 @@ var spine = (() => {
|
|
|
10707
10794
|
}
|
|
10708
10795
|
};
|
|
10709
10796
|
var LinkedMesh2 = class {
|
|
10797
|
+
parent;
|
|
10798
|
+
skin;
|
|
10799
|
+
slotIndex;
|
|
10800
|
+
mesh;
|
|
10801
|
+
inheritTimeline;
|
|
10710
10802
|
constructor(mesh, skin, slotIndex, parent, inheritDeform) {
|
|
10711
10803
|
this.mesh = mesh;
|
|
10712
10804
|
this.skin = skin;
|
|
@@ -10793,8 +10885,10 @@ var spine = (() => {
|
|
|
10793
10885
|
|
|
10794
10886
|
// spine-webgl/src/WebGL.ts
|
|
10795
10887
|
var ManagedWebGLRenderingContext = class {
|
|
10888
|
+
canvas;
|
|
10889
|
+
gl;
|
|
10890
|
+
restorables = new Array();
|
|
10796
10891
|
constructor(canvasOrContext, contextConfig = { alpha: "true" }) {
|
|
10797
|
-
this.restorables = new Array();
|
|
10798
10892
|
if (!(canvasOrContext instanceof WebGLRenderingContext || typeof WebGL2RenderingContext !== "undefined" && canvasOrContext instanceof WebGL2RenderingContext)) {
|
|
10799
10893
|
let canvas = canvasOrContext;
|
|
10800
10894
|
this.gl = canvas.getContext("webgl2", contextConfig) || canvas.getContext("webgl", contextConfig);
|
|
@@ -10825,11 +10919,12 @@ var spine = (() => {
|
|
|
10825
10919
|
|
|
10826
10920
|
// spine-webgl/src/GLTexture.ts
|
|
10827
10921
|
var _GLTexture = class extends Texture {
|
|
10922
|
+
context;
|
|
10923
|
+
texture = null;
|
|
10924
|
+
boundUnit = 0;
|
|
10925
|
+
useMipMaps = false;
|
|
10828
10926
|
constructor(context, image, useMipMaps = false) {
|
|
10829
10927
|
super(image);
|
|
10830
|
-
this.texture = null;
|
|
10831
|
-
this.boundUnit = 0;
|
|
10832
|
-
this.useMipMaps = false;
|
|
10833
10928
|
this.context = context instanceof ManagedWebGLRenderingContext ? context : new ManagedWebGLRenderingContext(context);
|
|
10834
10929
|
this.useMipMaps = useMipMaps;
|
|
10835
10930
|
this.restore();
|
|
@@ -10909,7 +11004,7 @@ var spine = (() => {
|
|
|
10909
11004
|
}
|
|
10910
11005
|
};
|
|
10911
11006
|
var GLTexture = _GLTexture;
|
|
10912
|
-
GLTexture
|
|
11007
|
+
__publicField(GLTexture, "DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL", false);
|
|
10913
11008
|
|
|
10914
11009
|
// spine-webgl/src/AssetManager.ts
|
|
10915
11010
|
var AssetManager = class extends AssetManagerBase {
|
|
@@ -10922,10 +11017,10 @@ var spine = (() => {
|
|
|
10922
11017
|
|
|
10923
11018
|
// spine-webgl/src/Vector3.ts
|
|
10924
11019
|
var Vector3 = class {
|
|
11020
|
+
x = 0;
|
|
11021
|
+
y = 0;
|
|
11022
|
+
z = 0;
|
|
10925
11023
|
constructor(x = 0, y = 0, z = 0) {
|
|
10926
|
-
this.x = 0;
|
|
10927
|
-
this.y = 0;
|
|
10928
|
-
this.z = 0;
|
|
10929
11024
|
this.x = x;
|
|
10930
11025
|
this.y = y;
|
|
10931
11026
|
this.z = z;
|
|
@@ -11022,9 +11117,9 @@ var spine = (() => {
|
|
|
11022
11117
|
var M32 = 11;
|
|
11023
11118
|
var M33 = 15;
|
|
11024
11119
|
var _Matrix4 = class {
|
|
11120
|
+
temp = new Float32Array(16);
|
|
11121
|
+
values = new Float32Array(16);
|
|
11025
11122
|
constructor() {
|
|
11026
|
-
this.temp = new Float32Array(16);
|
|
11027
|
-
this.values = new Float32Array(16);
|
|
11028
11123
|
let v = this.values;
|
|
11029
11124
|
v[M00] = 1;
|
|
11030
11125
|
v[M11] = 1;
|
|
@@ -11255,26 +11350,26 @@ var spine = (() => {
|
|
|
11255
11350
|
}
|
|
11256
11351
|
};
|
|
11257
11352
|
var Matrix42 = _Matrix4;
|
|
11258
|
-
Matrix42
|
|
11259
|
-
Matrix42
|
|
11260
|
-
Matrix42
|
|
11261
|
-
Matrix42
|
|
11353
|
+
__publicField(Matrix42, "xAxis", new Vector3());
|
|
11354
|
+
__publicField(Matrix42, "yAxis", new Vector3());
|
|
11355
|
+
__publicField(Matrix42, "zAxis", new Vector3());
|
|
11356
|
+
__publicField(Matrix42, "tmpMatrix", new _Matrix4());
|
|
11262
11357
|
|
|
11263
11358
|
// spine-webgl/src/Camera.ts
|
|
11264
11359
|
var OrthoCamera = class {
|
|
11360
|
+
position = new Vector3(0, 0, 0);
|
|
11361
|
+
direction = new Vector3(0, 0, -1);
|
|
11362
|
+
up = new Vector3(0, 1, 0);
|
|
11363
|
+
near = 0;
|
|
11364
|
+
far = 100;
|
|
11365
|
+
zoom = 1;
|
|
11366
|
+
viewportWidth = 0;
|
|
11367
|
+
viewportHeight = 0;
|
|
11368
|
+
projectionView = new Matrix42();
|
|
11369
|
+
inverseProjectionView = new Matrix42();
|
|
11370
|
+
projection = new Matrix42();
|
|
11371
|
+
view = new Matrix42();
|
|
11265
11372
|
constructor(viewportWidth, viewportHeight) {
|
|
11266
|
-
this.position = new Vector3(0, 0, 0);
|
|
11267
|
-
this.direction = new Vector3(0, 0, -1);
|
|
11268
|
-
this.up = new Vector3(0, 1, 0);
|
|
11269
|
-
this.near = 0;
|
|
11270
|
-
this.far = 100;
|
|
11271
|
-
this.zoom = 1;
|
|
11272
|
-
this.viewportWidth = 0;
|
|
11273
|
-
this.viewportHeight = 0;
|
|
11274
|
-
this.projectionView = new Matrix42();
|
|
11275
|
-
this.inverseProjectionView = new Matrix42();
|
|
11276
|
-
this.projection = new Matrix42();
|
|
11277
|
-
this.view = new Matrix42();
|
|
11278
11373
|
this.viewportWidth = viewportWidth;
|
|
11279
11374
|
this.viewportHeight = viewportHeight;
|
|
11280
11375
|
this.update();
|
|
@@ -11321,15 +11416,16 @@ var spine = (() => {
|
|
|
11321
11416
|
|
|
11322
11417
|
// spine-webgl/src/Input.ts
|
|
11323
11418
|
var Input = class {
|
|
11419
|
+
element;
|
|
11420
|
+
mouseX = 0;
|
|
11421
|
+
mouseY = 0;
|
|
11422
|
+
buttonDown = false;
|
|
11423
|
+
touch0 = null;
|
|
11424
|
+
touch1 = null;
|
|
11425
|
+
initialPinchDistance = 0;
|
|
11426
|
+
listeners = new Array();
|
|
11427
|
+
eventListeners = [];
|
|
11324
11428
|
constructor(element) {
|
|
11325
|
-
this.mouseX = 0;
|
|
11326
|
-
this.mouseY = 0;
|
|
11327
|
-
this.buttonDown = false;
|
|
11328
|
-
this.touch0 = null;
|
|
11329
|
-
this.touch1 = null;
|
|
11330
|
-
this.initialPinchDistance = 0;
|
|
11331
|
-
this.listeners = new Array();
|
|
11332
|
-
this.eventListeners = [];
|
|
11333
11429
|
this.element = element;
|
|
11334
11430
|
this.setupCallbacks(element);
|
|
11335
11431
|
}
|
|
@@ -11592,18 +11688,21 @@ var spine = (() => {
|
|
|
11592
11688
|
constructor(context, vertexShader, fragmentShader) {
|
|
11593
11689
|
this.vertexShader = vertexShader;
|
|
11594
11690
|
this.fragmentShader = fragmentShader;
|
|
11595
|
-
this.vs = null;
|
|
11596
|
-
this.fs = null;
|
|
11597
|
-
this.program = null;
|
|
11598
|
-
this.tmp2x2 = new Float32Array(2 * 2);
|
|
11599
|
-
this.tmp3x3 = new Float32Array(3 * 3);
|
|
11600
|
-
this.tmp4x4 = new Float32Array(4 * 4);
|
|
11601
11691
|
this.vsSource = vertexShader;
|
|
11602
11692
|
this.fsSource = fragmentShader;
|
|
11603
11693
|
this.context = context instanceof ManagedWebGLRenderingContext ? context : new ManagedWebGLRenderingContext(context);
|
|
11604
11694
|
this.context.addRestorable(this);
|
|
11605
11695
|
this.compile();
|
|
11606
11696
|
}
|
|
11697
|
+
context;
|
|
11698
|
+
vs = null;
|
|
11699
|
+
vsSource;
|
|
11700
|
+
fs = null;
|
|
11701
|
+
fsSource;
|
|
11702
|
+
program = null;
|
|
11703
|
+
tmp2x2 = new Float32Array(2 * 2);
|
|
11704
|
+
tmp3x3 = new Float32Array(3 * 3);
|
|
11705
|
+
tmp4x4 = new Float32Array(4 * 4);
|
|
11607
11706
|
getProgram() {
|
|
11608
11707
|
return this.program;
|
|
11609
11708
|
}
|
|
@@ -11837,24 +11936,17 @@ void main () {
|
|
|
11837
11936
|
}
|
|
11838
11937
|
};
|
|
11839
11938
|
var Shader = _Shader;
|
|
11840
|
-
Shader
|
|
11841
|
-
Shader
|
|
11842
|
-
Shader
|
|
11843
|
-
Shader
|
|
11844
|
-
Shader
|
|
11845
|
-
Shader
|
|
11939
|
+
__publicField(Shader, "MVP_MATRIX", "u_projTrans");
|
|
11940
|
+
__publicField(Shader, "POSITION", "a_position");
|
|
11941
|
+
__publicField(Shader, "COLOR", "a_color");
|
|
11942
|
+
__publicField(Shader, "COLOR2", "a_color2");
|
|
11943
|
+
__publicField(Shader, "TEXCOORDS", "a_texCoords");
|
|
11944
|
+
__publicField(Shader, "SAMPLER", "u_texture");
|
|
11846
11945
|
|
|
11847
11946
|
// spine-webgl/src/Mesh.ts
|
|
11848
11947
|
var Mesh = class {
|
|
11849
11948
|
constructor(context, attributes, maxVertices, maxIndices) {
|
|
11850
11949
|
this.attributes = attributes;
|
|
11851
|
-
this.verticesBuffer = null;
|
|
11852
|
-
this.verticesLength = 0;
|
|
11853
|
-
this.dirtyVertices = false;
|
|
11854
|
-
this.indicesBuffer = null;
|
|
11855
|
-
this.indicesLength = 0;
|
|
11856
|
-
this.dirtyIndices = false;
|
|
11857
|
-
this.elementsPerVertex = 0;
|
|
11858
11950
|
this.context = context instanceof ManagedWebGLRenderingContext ? context : new ManagedWebGLRenderingContext(context);
|
|
11859
11951
|
this.elementsPerVertex = 0;
|
|
11860
11952
|
for (let i = 0; i < attributes.length; i++) {
|
|
@@ -11864,6 +11956,16 @@ void main () {
|
|
|
11864
11956
|
this.indices = new Uint16Array(maxIndices);
|
|
11865
11957
|
this.context.addRestorable(this);
|
|
11866
11958
|
}
|
|
11959
|
+
context;
|
|
11960
|
+
vertices;
|
|
11961
|
+
verticesBuffer = null;
|
|
11962
|
+
verticesLength = 0;
|
|
11963
|
+
dirtyVertices = false;
|
|
11964
|
+
indices;
|
|
11965
|
+
indicesBuffer = null;
|
|
11966
|
+
indicesLength = 0;
|
|
11967
|
+
dirtyIndices = false;
|
|
11968
|
+
elementsPerVertex = 0;
|
|
11867
11969
|
getAttributes() {
|
|
11868
11970
|
return this.attributes;
|
|
11869
11971
|
}
|
|
@@ -12030,14 +12132,19 @@ void main () {
|
|
|
12030
12132
|
var GL_ONE_MINUS_SRC_ALPHA = 771;
|
|
12031
12133
|
var GL_DST_COLOR = 774;
|
|
12032
12134
|
var _PolygonBatcher = class {
|
|
12135
|
+
context;
|
|
12136
|
+
drawCalls = 0;
|
|
12137
|
+
isDrawing = false;
|
|
12138
|
+
mesh;
|
|
12139
|
+
shader = null;
|
|
12140
|
+
lastTexture = null;
|
|
12141
|
+
verticesLength = 0;
|
|
12142
|
+
indicesLength = 0;
|
|
12143
|
+
srcColorBlend;
|
|
12144
|
+
srcAlphaBlend;
|
|
12145
|
+
dstBlend;
|
|
12146
|
+
cullWasEnabled = false;
|
|
12033
12147
|
constructor(context, twoColorTint = true, maxVertices = 10920) {
|
|
12034
|
-
this.drawCalls = 0;
|
|
12035
|
-
this.isDrawing = false;
|
|
12036
|
-
this.shader = null;
|
|
12037
|
-
this.lastTexture = null;
|
|
12038
|
-
this.verticesLength = 0;
|
|
12039
|
-
this.indicesLength = 0;
|
|
12040
|
-
this.cullWasEnabled = false;
|
|
12041
12148
|
if (maxVertices > 10920)
|
|
12042
12149
|
throw new Error("Can't have more than 10920 triangles per batch: " + maxVertices);
|
|
12043
12150
|
this.context = context instanceof ManagedWebGLRenderingContext ? context : new ManagedWebGLRenderingContext(context);
|
|
@@ -12141,24 +12248,29 @@ void main () {
|
|
|
12141
12248
|
}
|
|
12142
12249
|
};
|
|
12143
12250
|
var PolygonBatcher = _PolygonBatcher;
|
|
12144
|
-
PolygonBatcher
|
|
12145
|
-
PolygonBatcher
|
|
12146
|
-
PolygonBatcher
|
|
12251
|
+
__publicField(PolygonBatcher, "disableCulling", false);
|
|
12252
|
+
__publicField(PolygonBatcher, "globalDrawCalls", 0);
|
|
12253
|
+
__publicField(PolygonBatcher, "blendModesGL", [
|
|
12147
12254
|
{ srcRgb: GL_SRC_ALPHA, srcRgbPma: GL_ONE, dstRgb: GL_ONE_MINUS_SRC_ALPHA, srcAlpha: GL_ONE },
|
|
12148
12255
|
{ srcRgb: GL_SRC_ALPHA, srcRgbPma: GL_ONE, dstRgb: GL_ONE, srcAlpha: GL_ONE },
|
|
12149
12256
|
{ srcRgb: GL_DST_COLOR, srcRgbPma: GL_DST_COLOR, dstRgb: GL_ONE_MINUS_SRC_ALPHA, srcAlpha: GL_ONE },
|
|
12150
12257
|
{ srcRgb: GL_ONE, srcRgbPma: GL_ONE, dstRgb: GL_ONE_MINUS_SRC_COLOR, srcAlpha: GL_ONE }
|
|
12151
|
-
];
|
|
12258
|
+
]);
|
|
12152
12259
|
|
|
12153
12260
|
// spine-webgl/src/ShapeRenderer.ts
|
|
12154
12261
|
var ShapeRenderer = class {
|
|
12262
|
+
context;
|
|
12263
|
+
isDrawing = false;
|
|
12264
|
+
mesh;
|
|
12265
|
+
shapeType = ShapeType.Filled;
|
|
12266
|
+
color = new Color(1, 1, 1, 1);
|
|
12267
|
+
shader = null;
|
|
12268
|
+
vertexIndex = 0;
|
|
12269
|
+
tmp = new Vector2();
|
|
12270
|
+
srcColorBlend;
|
|
12271
|
+
srcAlphaBlend;
|
|
12272
|
+
dstBlend;
|
|
12155
12273
|
constructor(context, maxVertices = 10920) {
|
|
12156
|
-
this.isDrawing = false;
|
|
12157
|
-
this.shapeType = ShapeType.Filled;
|
|
12158
|
-
this.color = new Color(1, 1, 1, 1);
|
|
12159
|
-
this.shader = null;
|
|
12160
|
-
this.vertexIndex = 0;
|
|
12161
|
-
this.tmp = new Vector2();
|
|
12162
12274
|
if (maxVertices > 10920)
|
|
12163
12275
|
throw new Error("Can't have more than 10920 triangles per batch: " + maxVertices);
|
|
12164
12276
|
this.context = context instanceof ManagedWebGLRenderingContext ? context : new ManagedWebGLRenderingContext(context);
|
|
@@ -12455,28 +12567,29 @@ void main () {
|
|
|
12455
12567
|
|
|
12456
12568
|
// spine-webgl/src/SkeletonDebugRenderer.ts
|
|
12457
12569
|
var _SkeletonDebugRenderer = class {
|
|
12570
|
+
boneLineColor = new Color(1, 0, 0, 1);
|
|
12571
|
+
boneOriginColor = new Color(0, 1, 0, 1);
|
|
12572
|
+
attachmentLineColor = new Color(0, 0, 1, 0.5);
|
|
12573
|
+
triangleLineColor = new Color(1, 0.64, 0, 0.5);
|
|
12574
|
+
pathColor = new Color().setFromString("FF7F00");
|
|
12575
|
+
clipColor = new Color(0.8, 0, 0, 2);
|
|
12576
|
+
aabbColor = new Color(0, 1, 0, 0.5);
|
|
12577
|
+
drawBones = true;
|
|
12578
|
+
drawRegionAttachments = true;
|
|
12579
|
+
drawBoundingBoxes = true;
|
|
12580
|
+
drawMeshHull = true;
|
|
12581
|
+
drawMeshTriangles = true;
|
|
12582
|
+
drawPaths = true;
|
|
12583
|
+
drawSkeletonXY = false;
|
|
12584
|
+
drawClipping = true;
|
|
12585
|
+
premultipliedAlpha = false;
|
|
12586
|
+
scale = 1;
|
|
12587
|
+
boneWidth = 2;
|
|
12588
|
+
context;
|
|
12589
|
+
bounds = new SkeletonBounds();
|
|
12590
|
+
temp = new Array();
|
|
12591
|
+
vertices = Utils.newFloatArray(2 * 1024);
|
|
12458
12592
|
constructor(context) {
|
|
12459
|
-
this.boneLineColor = new Color(1, 0, 0, 1);
|
|
12460
|
-
this.boneOriginColor = new Color(0, 1, 0, 1);
|
|
12461
|
-
this.attachmentLineColor = new Color(0, 0, 1, 0.5);
|
|
12462
|
-
this.triangleLineColor = new Color(1, 0.64, 0, 0.5);
|
|
12463
|
-
this.pathColor = new Color().setFromString("FF7F00");
|
|
12464
|
-
this.clipColor = new Color(0.8, 0, 0, 2);
|
|
12465
|
-
this.aabbColor = new Color(0, 1, 0, 0.5);
|
|
12466
|
-
this.drawBones = true;
|
|
12467
|
-
this.drawRegionAttachments = true;
|
|
12468
|
-
this.drawBoundingBoxes = true;
|
|
12469
|
-
this.drawMeshHull = true;
|
|
12470
|
-
this.drawMeshTriangles = true;
|
|
12471
|
-
this.drawPaths = true;
|
|
12472
|
-
this.drawSkeletonXY = false;
|
|
12473
|
-
this.drawClipping = true;
|
|
12474
|
-
this.premultipliedAlpha = false;
|
|
12475
|
-
this.scale = 1;
|
|
12476
|
-
this.boneWidth = 2;
|
|
12477
|
-
this.bounds = new SkeletonBounds();
|
|
12478
|
-
this.temp = new Array();
|
|
12479
|
-
this.vertices = Utils.newFloatArray(2 * 1024);
|
|
12480
12593
|
this.context = context instanceof ManagedWebGLRenderingContext ? context : new ManagedWebGLRenderingContext(context);
|
|
12481
12594
|
}
|
|
12482
12595
|
draw(shapes, skeleton, ignoredBones) {
|
|
@@ -12653,8 +12766,8 @@ void main () {
|
|
|
12653
12766
|
}
|
|
12654
12767
|
};
|
|
12655
12768
|
var SkeletonDebugRenderer = _SkeletonDebugRenderer;
|
|
12656
|
-
SkeletonDebugRenderer
|
|
12657
|
-
SkeletonDebugRenderer
|
|
12769
|
+
__publicField(SkeletonDebugRenderer, "LIGHT_GRAY", new Color(192 / 255, 192 / 255, 192 / 255, 1));
|
|
12770
|
+
__publicField(SkeletonDebugRenderer, "GREEN", new Color(0, 1, 0, 1));
|
|
12658
12771
|
|
|
12659
12772
|
// spine-webgl/src/SkeletonRenderer.ts
|
|
12660
12773
|
var Renderable = class {
|
|
@@ -12665,18 +12778,19 @@ void main () {
|
|
|
12665
12778
|
}
|
|
12666
12779
|
};
|
|
12667
12780
|
var _SkeletonRenderer = class {
|
|
12781
|
+
premultipliedAlpha = false;
|
|
12782
|
+
tempColor = new Color();
|
|
12783
|
+
tempColor2 = new Color();
|
|
12784
|
+
vertices;
|
|
12785
|
+
vertexSize = 2 + 2 + 4;
|
|
12786
|
+
twoColorTint = false;
|
|
12787
|
+
renderable = new Renderable([], 0, 0);
|
|
12788
|
+
clipper = new SkeletonClipping();
|
|
12789
|
+
temp = new Vector2();
|
|
12790
|
+
temp2 = new Vector2();
|
|
12791
|
+
temp3 = new Color();
|
|
12792
|
+
temp4 = new Color();
|
|
12668
12793
|
constructor(context, twoColorTint = true) {
|
|
12669
|
-
this.premultipliedAlpha = false;
|
|
12670
|
-
this.tempColor = new Color();
|
|
12671
|
-
this.tempColor2 = new Color();
|
|
12672
|
-
this.vertexSize = 2 + 2 + 4;
|
|
12673
|
-
this.twoColorTint = false;
|
|
12674
|
-
this.renderable = new Renderable([], 0, 0);
|
|
12675
|
-
this.clipper = new SkeletonClipping();
|
|
12676
|
-
this.temp = new Vector2();
|
|
12677
|
-
this.temp2 = new Vector2();
|
|
12678
|
-
this.temp3 = new Color();
|
|
12679
|
-
this.temp4 = new Color();
|
|
12680
12794
|
this.twoColorTint = twoColorTint;
|
|
12681
12795
|
if (twoColorTint)
|
|
12682
12796
|
this.vertexSize += 4;
|
|
@@ -12821,7 +12935,7 @@ void main () {
|
|
|
12821
12935
|
}
|
|
12822
12936
|
};
|
|
12823
12937
|
var SkeletonRenderer = _SkeletonRenderer;
|
|
12824
|
-
SkeletonRenderer
|
|
12938
|
+
__publicField(SkeletonRenderer, "QUAD_TRIANGLES", [0, 1, 2, 2, 3, 0]);
|
|
12825
12939
|
|
|
12826
12940
|
// spine-webgl/src/SceneRenderer.ts
|
|
12827
12941
|
var quad = [
|
|
@@ -12861,9 +12975,18 @@ void main () {
|
|
|
12861
12975
|
var QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];
|
|
12862
12976
|
var WHITE = new Color(1, 1, 1, 1);
|
|
12863
12977
|
var SceneRenderer = class {
|
|
12978
|
+
context;
|
|
12979
|
+
canvas;
|
|
12980
|
+
camera;
|
|
12981
|
+
batcher;
|
|
12982
|
+
twoColorTint = false;
|
|
12983
|
+
batcherShader;
|
|
12984
|
+
shapes;
|
|
12985
|
+
shapesShader;
|
|
12986
|
+
activeRenderer = null;
|
|
12987
|
+
skeletonRenderer;
|
|
12988
|
+
skeletonDebugRenderer;
|
|
12864
12989
|
constructor(canvas, context, twoColorTint = true) {
|
|
12865
|
-
this.twoColorTint = false;
|
|
12866
|
-
this.activeRenderer = null;
|
|
12867
12990
|
this.canvas = canvas;
|
|
12868
12991
|
this.context = context instanceof ManagedWebGLRenderingContext ? context : new ManagedWebGLRenderingContext(context);
|
|
12869
12992
|
this.twoColorTint = twoColorTint;
|
|
@@ -13296,15 +13419,16 @@ void main () {
|
|
|
13296
13419
|
var logoHeight = 108;
|
|
13297
13420
|
var spinnerSize = 163;
|
|
13298
13421
|
var LoadingScreen = class {
|
|
13422
|
+
renderer;
|
|
13423
|
+
logo = null;
|
|
13424
|
+
spinner = null;
|
|
13425
|
+
angle = 0;
|
|
13426
|
+
fadeOut = 0;
|
|
13427
|
+
fadeIn = 0;
|
|
13428
|
+
timeKeeper = new TimeKeeper();
|
|
13429
|
+
backgroundColor = new Color(0.135, 0.135, 0.135, 1);
|
|
13430
|
+
tempColor = new Color();
|
|
13299
13431
|
constructor(renderer) {
|
|
13300
|
-
this.logo = null;
|
|
13301
|
-
this.spinner = null;
|
|
13302
|
-
this.angle = 0;
|
|
13303
|
-
this.fadeOut = 0;
|
|
13304
|
-
this.fadeIn = 0;
|
|
13305
|
-
this.timeKeeper = new TimeKeeper();
|
|
13306
|
-
this.backgroundColor = new Color(0.135, 0.135, 0.135, 1);
|
|
13307
|
-
this.tempColor = new Color();
|
|
13308
13432
|
this.renderer = renderer;
|
|
13309
13433
|
this.timeKeeper.maxDelta = 9;
|
|
13310
13434
|
if (!logoImage) {
|
|
@@ -13323,9 +13447,8 @@ void main () {
|
|
|
13323
13447
|
}
|
|
13324
13448
|
}
|
|
13325
13449
|
dispose() {
|
|
13326
|
-
|
|
13327
|
-
|
|
13328
|
-
(_b = this.spinner) == null ? void 0 : _b.dispose();
|
|
13450
|
+
this.logo?.dispose();
|
|
13451
|
+
this.spinner?.dispose();
|
|
13329
13452
|
}
|
|
13330
13453
|
draw(complete = false) {
|
|
13331
13454
|
if (loaded < 2 || complete && this.fadeOut > FADE_OUT)
|
|
@@ -13398,9 +13521,6 @@ void main () {
|
|
|
13398
13521
|
/** Constructs a new spine canvas, rendering to the provided HTML canvas. */
|
|
13399
13522
|
constructor(canvas, config) {
|
|
13400
13523
|
this.config = config;
|
|
13401
|
-
/** Tracks the current time, delta, and other time related statistics. */
|
|
13402
|
-
this.time = new TimeKeeper();
|
|
13403
|
-
this.disposed = false;
|
|
13404
13524
|
if (!config.pathPrefix)
|
|
13405
13525
|
config.pathPrefix = "";
|
|
13406
13526
|
if (!config.app)
|
|
@@ -13456,6 +13576,20 @@ void main () {
|
|
|
13456
13576
|
};
|
|
13457
13577
|
requestAnimationFrame(waitForAssets);
|
|
13458
13578
|
}
|
|
13579
|
+
context;
|
|
13580
|
+
/** Tracks the current time, delta, and other time related statistics. */
|
|
13581
|
+
time = new TimeKeeper();
|
|
13582
|
+
/** The HTML canvas to render to. */
|
|
13583
|
+
htmlCanvas;
|
|
13584
|
+
/** The WebGL rendering context. */
|
|
13585
|
+
gl;
|
|
13586
|
+
/** The scene renderer for easy drawing of skeletons, shapes, and images. */
|
|
13587
|
+
renderer;
|
|
13588
|
+
/** The asset manager to load assets with. */
|
|
13589
|
+
assetManager;
|
|
13590
|
+
/** The input processor used to listen to mouse, touch, and keyboard events. */
|
|
13591
|
+
input;
|
|
13592
|
+
disposed = false;
|
|
13459
13593
|
/** Clears the canvas with the given color. The color values are given in the range [0,1]. */
|
|
13460
13594
|
clear(r, g, b, a) {
|
|
13461
13595
|
this.gl.clearColor(r, g, b, a);
|