@esotericsoftware/spine-webgl 4.1.44 → 4.1.46
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;
|
|
@@ -4154,141 +4178,139 @@ var spine = (() => {
|
|
|
4154
4178
|
}
|
|
4155
4179
|
};
|
|
4156
4180
|
var AnimationState = _AnimationState;
|
|
4157
|
-
AnimationState
|
|
4181
|
+
__publicField(AnimationState, "_emptyAnimation", new Animation("<empty>", [], 0));
|
|
4158
4182
|
var TrackEntry = class {
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
|
|
4178
|
-
|
|
4179
|
-
|
|
4180
|
-
|
|
4181
|
-
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4211
|
-
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
|
|
4218
|
-
|
|
4219
|
-
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
|
|
4226
|
-
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
-
|
|
4246
|
-
|
|
4247
|
-
|
|
4248
|
-
|
|
4249
|
-
|
|
4250
|
-
|
|
4251
|
-
|
|
4252
|
-
|
|
4253
|
-
|
|
4254
|
-
|
|
4255
|
-
|
|
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
|
-
this.timelinesRotation = new Array();
|
|
4291
|
-
}
|
|
4183
|
+
/** The animation to apply for this track entry. */
|
|
4184
|
+
animation = null;
|
|
4185
|
+
previous = null;
|
|
4186
|
+
/** The animation queued to start after this animation, or null. `next` makes up a linked list. */
|
|
4187
|
+
next = null;
|
|
4188
|
+
/** The track entry for the previous animation when mixing from the previous animation to this animation, or null if no
|
|
4189
|
+
* mixing is currently occuring. When mixing from multiple animations, `mixingFrom` makes up a linked list. */
|
|
4190
|
+
mixingFrom = null;
|
|
4191
|
+
/** The track entry for the next animation when mixing from this animation to the next animation, or null if no mixing is
|
|
4192
|
+
* currently occuring. When mixing to multiple animations, `mixingTo` makes up a linked list. */
|
|
4193
|
+
mixingTo = null;
|
|
4194
|
+
/** The listener for events generated by this track entry, or null.
|
|
4195
|
+
*
|
|
4196
|
+
* A track entry returned from {@link AnimationState#setAnimation()} is already the current animation
|
|
4197
|
+
* for the track, so the track entry listener {@link AnimationStateListener#start()} will not be called. */
|
|
4198
|
+
listener = null;
|
|
4199
|
+
/** The index of the track where this track entry is either current or queued.
|
|
4200
|
+
*
|
|
4201
|
+
* See {@link AnimationState#getCurrent()}. */
|
|
4202
|
+
trackIndex = 0;
|
|
4203
|
+
/** If true, the animation will repeat. If false it will not, instead its last frame is applied if played beyond its
|
|
4204
|
+
* duration. */
|
|
4205
|
+
loop = false;
|
|
4206
|
+
/** If true, when mixing from the previous animation to this animation, the previous animation is applied as normal instead
|
|
4207
|
+
* of being mixed out.
|
|
4208
|
+
*
|
|
4209
|
+
* When mixing between animations that key the same property, if a lower track also keys that property then the value will
|
|
4210
|
+
* briefly dip toward the lower track value during the mix. This happens because the first animation mixes from 100% to 0%
|
|
4211
|
+
* while the second animation mixes from 0% to 100%. Setting `holdPrevious` to true applies the first animation
|
|
4212
|
+
* at 100% during the mix so the lower track value is overwritten. Such dipping does not occur on the lowest track which
|
|
4213
|
+
* keys the property, only when a higher track also keys the property.
|
|
4214
|
+
*
|
|
4215
|
+
* Snapping will occur if `holdPrevious` is true and this animation does not key all the same properties as the
|
|
4216
|
+
* previous animation. */
|
|
4217
|
+
holdPrevious = false;
|
|
4218
|
+
reverse = false;
|
|
4219
|
+
shortestRotation = false;
|
|
4220
|
+
/** When the mix percentage ({@link #mixTime} / {@link #mixDuration}) is less than the
|
|
4221
|
+
* `eventThreshold`, event timelines are applied while this animation is being mixed out. Defaults to 0, so event
|
|
4222
|
+
* timelines are not applied while this animation is being mixed out. */
|
|
4223
|
+
eventThreshold = 0;
|
|
4224
|
+
/** When the mix percentage ({@link #mixtime} / {@link #mixDuration}) is less than the
|
|
4225
|
+
* `attachmentThreshold`, attachment timelines are applied while this animation is being mixed out. Defaults to
|
|
4226
|
+
* 0, so attachment timelines are not applied while this animation is being mixed out. */
|
|
4227
|
+
attachmentThreshold = 0;
|
|
4228
|
+
/** When the mix percentage ({@link #mixTime} / {@link #mixDuration}) is less than the
|
|
4229
|
+
* `drawOrderThreshold`, draw order timelines are applied while this animation is being mixed out. Defaults to 0,
|
|
4230
|
+
* so draw order timelines are not applied while this animation is being mixed out. */
|
|
4231
|
+
drawOrderThreshold = 0;
|
|
4232
|
+
/** Seconds when this animation starts, both initially and after looping. Defaults to 0.
|
|
4233
|
+
*
|
|
4234
|
+
* When changing the `animationStart` time, it often makes sense to set {@link #animationLast} to the same
|
|
4235
|
+
* value to prevent timeline keys before the start time from triggering. */
|
|
4236
|
+
animationStart = 0;
|
|
4237
|
+
/** Seconds for the last frame of this animation. Non-looping animations won't play past this time. Looping animations will
|
|
4238
|
+
* loop back to {@link #animationStart} at this time. Defaults to the animation {@link Animation#duration}. */
|
|
4239
|
+
animationEnd = 0;
|
|
4240
|
+
/** The time in seconds this animation was last applied. Some timelines use this for one-time triggers. Eg, when this
|
|
4241
|
+
* animation is applied, event timelines will fire all events between the `animationLast` time (exclusive) and
|
|
4242
|
+
* `animationTime` (inclusive). Defaults to -1 to ensure triggers on frame 0 happen the first time this animation
|
|
4243
|
+
* is applied. */
|
|
4244
|
+
animationLast = 0;
|
|
4245
|
+
nextAnimationLast = 0;
|
|
4246
|
+
/** Seconds to postpone playing the animation. When this track entry is the current track entry, `delay`
|
|
4247
|
+
* postpones incrementing the {@link #trackTime}. When this track entry is queued, `delay` is the time from
|
|
4248
|
+
* the start of the previous animation to when this track entry will become the current track entry (ie when the previous
|
|
4249
|
+
* track entry {@link TrackEntry#trackTime} >= this track entry's `delay`).
|
|
4250
|
+
*
|
|
4251
|
+
* {@link #timeScale} affects the delay. */
|
|
4252
|
+
delay = 0;
|
|
4253
|
+
/** Current time in seconds this track entry has been the current track entry. The track time determines
|
|
4254
|
+
* {@link #animationTime}. The track time can be set to start the animation at a time other than 0, without affecting
|
|
4255
|
+
* looping. */
|
|
4256
|
+
trackTime = 0;
|
|
4257
|
+
trackLast = 0;
|
|
4258
|
+
nextTrackLast = 0;
|
|
4259
|
+
/** The track time in seconds when this animation will be removed from the track. Defaults to the highest possible float
|
|
4260
|
+
* value, meaning the animation will be applied until a new animation is set or the track is cleared. If the track end time
|
|
4261
|
+
* is reached, no other animations are queued for playback, and mixing from any previous animations is complete, then the
|
|
4262
|
+
* properties keyed by the animation are set to the setup pose and the track is cleared.
|
|
4263
|
+
*
|
|
4264
|
+
* It may be desired to use {@link AnimationState#addEmptyAnimation()} rather than have the animation
|
|
4265
|
+
* abruptly cease being applied. */
|
|
4266
|
+
trackEnd = 0;
|
|
4267
|
+
/** Multiplier for the delta time when this track entry is updated, causing time for this animation to pass slower or
|
|
4268
|
+
* faster. Defaults to 1.
|
|
4269
|
+
*
|
|
4270
|
+
* {@link #mixTime} is not affected by track entry time scale, so {@link #mixDuration} may need to be adjusted to
|
|
4271
|
+
* match the animation speed.
|
|
4272
|
+
*
|
|
4273
|
+
* When using {@link AnimationState#addAnimation()} with a `delay` <= 0, note the
|
|
4274
|
+
* {@link #delay} is set using the mix duration from the {@link AnimationStateData}, assuming time scale to be 1. If
|
|
4275
|
+
* the time scale is not 1, the delay may need to be adjusted.
|
|
4276
|
+
*
|
|
4277
|
+
* See AnimationState {@link AnimationState#timeScale} for affecting all animations. */
|
|
4278
|
+
timeScale = 0;
|
|
4279
|
+
/** Values < 1 mix this animation with the skeleton's current pose (usually the pose resulting from lower tracks). Defaults
|
|
4280
|
+
* to 1, which overwrites the skeleton's current pose with this animation.
|
|
4281
|
+
*
|
|
4282
|
+
* Typically track 0 is used to completely pose the skeleton, then alpha is used on higher tracks. It doesn't make sense to
|
|
4283
|
+
* use alpha on track 0 if the skeleton pose is from the last frame render. */
|
|
4284
|
+
alpha = 0;
|
|
4285
|
+
/** Seconds from 0 to the {@link #getMixDuration()} when mixing from the previous animation to this animation. May be
|
|
4286
|
+
* slightly more than `mixDuration` when the mix is complete. */
|
|
4287
|
+
mixTime = 0;
|
|
4288
|
+
/** Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData
|
|
4289
|
+
* {@link AnimationStateData#getMix()} based on the animation before this animation (if any).
|
|
4290
|
+
*
|
|
4291
|
+
* A mix duration of 0 still mixes out over one frame to provide the track entry being mixed out a chance to revert the
|
|
4292
|
+
* properties it was animating.
|
|
4293
|
+
*
|
|
4294
|
+
* The `mixDuration` can be set manually rather than use the value from
|
|
4295
|
+
* {@link AnimationStateData#getMix()}. In that case, the `mixDuration` can be set for a new
|
|
4296
|
+
* track entry only before {@link AnimationState#update(float)} is first called.
|
|
4297
|
+
*
|
|
4298
|
+
* When using {@link AnimationState#addAnimation()} with a `delay` <= 0, note the
|
|
4299
|
+
* {@link #delay} is set using the mix duration from the {@link AnimationStateData}, not a mix duration set
|
|
4300
|
+
* afterward. */
|
|
4301
|
+
mixDuration = 0;
|
|
4302
|
+
interruptAlpha = 0;
|
|
4303
|
+
totalAlpha = 0;
|
|
4304
|
+
/** Controls how properties keyed in the animation are mixed with lower tracks. Defaults to {@link MixBlend#replace}, which
|
|
4305
|
+
* replaces the values from the lower tracks with the animation values. {@link MixBlend#add} adds the animation values to
|
|
4306
|
+
* the values from the lower tracks.
|
|
4307
|
+
*
|
|
4308
|
+
* The `mixBlend` can be set for a new track entry only before {@link AnimationState#apply()} is first
|
|
4309
|
+
* called. */
|
|
4310
|
+
mixBlend = 2 /* replace */;
|
|
4311
|
+
timelineMode = new Array();
|
|
4312
|
+
timelineHoldMix = new Array();
|
|
4313
|
+
timelinesRotation = new Array();
|
|
4292
4314
|
reset() {
|
|
4293
4315
|
this.next = null;
|
|
4294
4316
|
this.previous = null;
|
|
@@ -4344,9 +4366,10 @@ var spine = (() => {
|
|
|
4344
4366
|
}
|
|
4345
4367
|
};
|
|
4346
4368
|
var EventQueue = class {
|
|
4369
|
+
objects = [];
|
|
4370
|
+
drainDisabled = false;
|
|
4371
|
+
animState;
|
|
4347
4372
|
constructor(animState) {
|
|
4348
|
-
this.objects = [];
|
|
4349
|
-
this.drainDisabled = false;
|
|
4350
4373
|
this.animState = animState;
|
|
4351
4374
|
}
|
|
4352
4375
|
start(entry) {
|
|
@@ -4483,10 +4506,12 @@ var spine = (() => {
|
|
|
4483
4506
|
|
|
4484
4507
|
// spine-core/src/AnimationStateData.ts
|
|
4485
4508
|
var AnimationStateData = class {
|
|
4509
|
+
/** The SkeletonData to look up animations when they are specified by name. */
|
|
4510
|
+
skeletonData;
|
|
4511
|
+
animationToMixTime = {};
|
|
4512
|
+
/** The mix duration to use when no mix duration has been defined between two animations. */
|
|
4513
|
+
defaultMix = 0;
|
|
4486
4514
|
constructor(skeletonData) {
|
|
4487
|
-
this.animationToMixTime = {};
|
|
4488
|
-
/** The mix duration to use when no mix duration has been defined between two animations. */
|
|
4489
|
-
this.defaultMix = 0;
|
|
4490
4515
|
if (!skeletonData)
|
|
4491
4516
|
throw new Error("skeletonData cannot be null.");
|
|
4492
4517
|
this.skeletonData = skeletonData;
|
|
@@ -4525,9 +4550,9 @@ var spine = (() => {
|
|
|
4525
4550
|
|
|
4526
4551
|
// spine-core/src/attachments/BoundingBoxAttachment.ts
|
|
4527
4552
|
var BoundingBoxAttachment = class extends VertexAttachment {
|
|
4553
|
+
color = new Color(1, 1, 1, 1);
|
|
4528
4554
|
constructor(name) {
|
|
4529
4555
|
super(name);
|
|
4530
|
-
this.color = new Color(1, 1, 1, 1);
|
|
4531
4556
|
}
|
|
4532
4557
|
copy() {
|
|
4533
4558
|
let copy = new BoundingBoxAttachment(this.name);
|
|
@@ -4539,16 +4564,16 @@ var spine = (() => {
|
|
|
4539
4564
|
|
|
4540
4565
|
// spine-core/src/attachments/ClippingAttachment.ts
|
|
4541
4566
|
var ClippingAttachment = class extends VertexAttachment {
|
|
4567
|
+
/** Clipping is performed between the clipping polygon's slot and the end slot. Returns null if clipping is done until the end of
|
|
4568
|
+
* the skeleton's rendering. */
|
|
4569
|
+
endSlot = null;
|
|
4570
|
+
// Nonessential.
|
|
4571
|
+
/** The color of the clipping polygon as it was in Spine. Available only when nonessential data was exported. Clipping polygons
|
|
4572
|
+
* are not usually rendered at runtime. */
|
|
4573
|
+
color = new Color(0.2275, 0.2275, 0.8078, 1);
|
|
4542
4574
|
// ce3a3aff
|
|
4543
4575
|
constructor(name) {
|
|
4544
4576
|
super(name);
|
|
4545
|
-
/** Clipping is performed between the clipping polygon's slot and the end slot. Returns null if clipping is done until the end of
|
|
4546
|
-
* the skeleton's rendering. */
|
|
4547
|
-
this.endSlot = null;
|
|
4548
|
-
// Nonessential.
|
|
4549
|
-
/** The color of the clipping polygon as it was in Spine. Available only when nonessential data was exported. Clipping polygons
|
|
4550
|
-
* are not usually rendered at runtime. */
|
|
4551
|
-
this.color = new Color(0.2275, 0.2275, 0.8078, 1);
|
|
4552
4577
|
}
|
|
4553
4578
|
copy() {
|
|
4554
4579
|
let copy = new ClippingAttachment(this.name);
|
|
@@ -4561,6 +4586,7 @@ var spine = (() => {
|
|
|
4561
4586
|
|
|
4562
4587
|
// spine-core/src/Texture.ts
|
|
4563
4588
|
var Texture = class {
|
|
4589
|
+
_image;
|
|
4564
4590
|
constructor(image) {
|
|
4565
4591
|
this._image = image;
|
|
4566
4592
|
}
|
|
@@ -4585,19 +4611,18 @@ var spine = (() => {
|
|
|
4585
4611
|
return TextureWrap3;
|
|
4586
4612
|
})(TextureWrap || {});
|
|
4587
4613
|
var TextureRegion = class {
|
|
4588
|
-
|
|
4589
|
-
|
|
4590
|
-
|
|
4591
|
-
|
|
4592
|
-
|
|
4593
|
-
|
|
4594
|
-
|
|
4595
|
-
|
|
4596
|
-
|
|
4597
|
-
|
|
4598
|
-
|
|
4599
|
-
|
|
4600
|
-
}
|
|
4614
|
+
texture;
|
|
4615
|
+
u = 0;
|
|
4616
|
+
v = 0;
|
|
4617
|
+
u2 = 0;
|
|
4618
|
+
v2 = 0;
|
|
4619
|
+
width = 0;
|
|
4620
|
+
height = 0;
|
|
4621
|
+
degrees = 0;
|
|
4622
|
+
offsetX = 0;
|
|
4623
|
+
offsetY = 0;
|
|
4624
|
+
originalWidth = 0;
|
|
4625
|
+
originalHeight = 0;
|
|
4601
4626
|
};
|
|
4602
4627
|
var FakeTexture = class extends Texture {
|
|
4603
4628
|
setFilters(minFilter, magFilter) {
|
|
@@ -4610,9 +4635,9 @@ var spine = (() => {
|
|
|
4610
4635
|
|
|
4611
4636
|
// spine-core/src/TextureAtlas.ts
|
|
4612
4637
|
var TextureAtlas = class {
|
|
4638
|
+
pages = new Array();
|
|
4639
|
+
regions = new Array();
|
|
4613
4640
|
constructor(atlasText) {
|
|
4614
|
-
this.pages = new Array();
|
|
4615
|
-
this.regions = new Array();
|
|
4616
4641
|
let reader = new TextureAtlasReader(atlasText);
|
|
4617
4642
|
let entry = new Array(4);
|
|
4618
4643
|
let pageFields = {};
|
|
@@ -4760,15 +4785,15 @@ var spine = (() => {
|
|
|
4760
4785
|
page.setTexture(assetManager.get(pathPrefix + page.name));
|
|
4761
4786
|
}
|
|
4762
4787
|
dispose() {
|
|
4763
|
-
var _a;
|
|
4764
4788
|
for (let i = 0; i < this.pages.length; i++) {
|
|
4765
|
-
|
|
4789
|
+
this.pages[i].texture?.dispose();
|
|
4766
4790
|
}
|
|
4767
4791
|
}
|
|
4768
4792
|
};
|
|
4769
4793
|
var TextureAtlasReader = class {
|
|
4794
|
+
lines;
|
|
4795
|
+
index = 0;
|
|
4770
4796
|
constructor(text) {
|
|
4771
|
-
this.index = 0;
|
|
4772
4797
|
this.lines = text.split(/\r\n|\r|\n/);
|
|
4773
4798
|
}
|
|
4774
4799
|
readLine() {
|
|
@@ -4800,16 +4825,17 @@ var spine = (() => {
|
|
|
4800
4825
|
}
|
|
4801
4826
|
};
|
|
4802
4827
|
var TextureAtlasPage = class {
|
|
4828
|
+
name;
|
|
4829
|
+
minFilter = 9728 /* Nearest */;
|
|
4830
|
+
magFilter = 9728 /* Nearest */;
|
|
4831
|
+
uWrap = 33071 /* ClampToEdge */;
|
|
4832
|
+
vWrap = 33071 /* ClampToEdge */;
|
|
4833
|
+
texture = null;
|
|
4834
|
+
width = 0;
|
|
4835
|
+
height = 0;
|
|
4836
|
+
pma = false;
|
|
4837
|
+
regions = new Array();
|
|
4803
4838
|
constructor(name) {
|
|
4804
|
-
this.minFilter = 9728 /* Nearest */;
|
|
4805
|
-
this.magFilter = 9728 /* Nearest */;
|
|
4806
|
-
this.uWrap = 33071 /* ClampToEdge */;
|
|
4807
|
-
this.vWrap = 33071 /* ClampToEdge */;
|
|
4808
|
-
this.texture = null;
|
|
4809
|
-
this.width = 0;
|
|
4810
|
-
this.height = 0;
|
|
4811
|
-
this.pma = false;
|
|
4812
|
-
this.regions = new Array();
|
|
4813
4839
|
this.name = name;
|
|
4814
4840
|
}
|
|
4815
4841
|
setTexture(texture) {
|
|
@@ -4821,18 +4847,20 @@ var spine = (() => {
|
|
|
4821
4847
|
}
|
|
4822
4848
|
};
|
|
4823
4849
|
var TextureAtlasRegion = class extends TextureRegion {
|
|
4850
|
+
page;
|
|
4851
|
+
name;
|
|
4852
|
+
x = 0;
|
|
4853
|
+
y = 0;
|
|
4854
|
+
offsetX = 0;
|
|
4855
|
+
offsetY = 0;
|
|
4856
|
+
originalWidth = 0;
|
|
4857
|
+
originalHeight = 0;
|
|
4858
|
+
index = 0;
|
|
4859
|
+
degrees = 0;
|
|
4860
|
+
names = null;
|
|
4861
|
+
values = null;
|
|
4824
4862
|
constructor(page, name) {
|
|
4825
4863
|
super();
|
|
4826
|
-
this.x = 0;
|
|
4827
|
-
this.y = 0;
|
|
4828
|
-
this.offsetX = 0;
|
|
4829
|
-
this.offsetY = 0;
|
|
4830
|
-
this.originalWidth = 0;
|
|
4831
|
-
this.originalHeight = 0;
|
|
4832
|
-
this.index = 0;
|
|
4833
|
-
this.degrees = 0;
|
|
4834
|
-
this.names = null;
|
|
4835
|
-
this.values = null;
|
|
4836
4864
|
this.page = page;
|
|
4837
4865
|
this.name = name;
|
|
4838
4866
|
page.regions.push(this);
|
|
@@ -4841,31 +4869,33 @@ var spine = (() => {
|
|
|
4841
4869
|
|
|
4842
4870
|
// spine-core/src/attachments/MeshAttachment.ts
|
|
4843
4871
|
var MeshAttachment = class extends VertexAttachment {
|
|
4872
|
+
region = null;
|
|
4873
|
+
/** The name of the texture region for this attachment. */
|
|
4874
|
+
path;
|
|
4875
|
+
/** The UV pair for each vertex, normalized within the texture region. */
|
|
4876
|
+
regionUVs = [];
|
|
4877
|
+
/** The UV pair for each vertex, normalized within the entire texture.
|
|
4878
|
+
*
|
|
4879
|
+
* See {@link #updateUVs}. */
|
|
4880
|
+
uvs = [];
|
|
4881
|
+
/** Triplets of vertex indices which describe the mesh's triangulation. */
|
|
4882
|
+
triangles = [];
|
|
4883
|
+
/** The color to tint the mesh. */
|
|
4884
|
+
color = new Color(1, 1, 1, 1);
|
|
4885
|
+
/** The width of the mesh's image. Available only when nonessential data was exported. */
|
|
4886
|
+
width = 0;
|
|
4887
|
+
/** The height of the mesh's image. Available only when nonessential data was exported. */
|
|
4888
|
+
height = 0;
|
|
4889
|
+
/** The number of entries at the beginning of {@link #vertices} that make up the mesh hull. */
|
|
4890
|
+
hullLength = 0;
|
|
4891
|
+
/** Vertex index pairs describing edges for controling triangulation. Mesh triangles will never cross edges. Only available if
|
|
4892
|
+
* nonessential data was exported. Triangulation is not performed at runtime. */
|
|
4893
|
+
edges = [];
|
|
4894
|
+
parentMesh = null;
|
|
4895
|
+
sequence = null;
|
|
4896
|
+
tempColor = new Color(0, 0, 0, 0);
|
|
4844
4897
|
constructor(name, path) {
|
|
4845
4898
|
super(name);
|
|
4846
|
-
this.region = null;
|
|
4847
|
-
/** The UV pair for each vertex, normalized within the texture region. */
|
|
4848
|
-
this.regionUVs = [];
|
|
4849
|
-
/** The UV pair for each vertex, normalized within the entire texture.
|
|
4850
|
-
*
|
|
4851
|
-
* See {@link #updateUVs}. */
|
|
4852
|
-
this.uvs = [];
|
|
4853
|
-
/** Triplets of vertex indices which describe the mesh's triangulation. */
|
|
4854
|
-
this.triangles = [];
|
|
4855
|
-
/** The color to tint the mesh. */
|
|
4856
|
-
this.color = new Color(1, 1, 1, 1);
|
|
4857
|
-
/** The width of the mesh's image. Available only when nonessential data was exported. */
|
|
4858
|
-
this.width = 0;
|
|
4859
|
-
/** The height of the mesh's image. Available only when nonessential data was exported. */
|
|
4860
|
-
this.height = 0;
|
|
4861
|
-
/** The number of entries at the beginning of {@link #vertices} that make up the mesh hull. */
|
|
4862
|
-
this.hullLength = 0;
|
|
4863
|
-
/** Vertex index pairs describing edges for controling triangulation. Mesh triangles will never cross edges. Only available if
|
|
4864
|
-
* nonessential data was exported. Triangulation is not performed at runtime. */
|
|
4865
|
-
this.edges = [];
|
|
4866
|
-
this.parentMesh = null;
|
|
4867
|
-
this.sequence = null;
|
|
4868
|
-
this.tempColor = new Color(0, 0, 0, 0);
|
|
4869
4899
|
this.path = path;
|
|
4870
4900
|
}
|
|
4871
4901
|
/** Calculates {@link #uvs} using the {@link #regionUVs} and region. Must be called if the region, the region's properties, or
|
|
@@ -4992,18 +5022,18 @@ var spine = (() => {
|
|
|
4992
5022
|
|
|
4993
5023
|
// spine-core/src/attachments/PathAttachment.ts
|
|
4994
5024
|
var PathAttachment = class extends VertexAttachment {
|
|
5025
|
+
/** The lengths along the path in the setup pose from the start of the path to the end of each Bezier curve. */
|
|
5026
|
+
lengths = [];
|
|
5027
|
+
/** If true, the start and end knots are connected. */
|
|
5028
|
+
closed = false;
|
|
5029
|
+
/** If true, additional calculations are performed to make calculating positions along the path more accurate. If false, fewer
|
|
5030
|
+
* calculations are performed but calculating positions along the path is less accurate. */
|
|
5031
|
+
constantSpeed = false;
|
|
5032
|
+
/** The color of the path as it was in Spine. Available only when nonessential data was exported. Paths are not usually
|
|
5033
|
+
* rendered at runtime. */
|
|
5034
|
+
color = new Color(1, 1, 1, 1);
|
|
4995
5035
|
constructor(name) {
|
|
4996
5036
|
super(name);
|
|
4997
|
-
/** The lengths along the path in the setup pose from the start of the path to the end of each Bezier curve. */
|
|
4998
|
-
this.lengths = [];
|
|
4999
|
-
/** If true, the start and end knots are connected. */
|
|
5000
|
-
this.closed = false;
|
|
5001
|
-
/** If true, additional calculations are performed to make calculating positions along the path more accurate. If false, fewer
|
|
5002
|
-
* calculations are performed but calculating positions along the path is less accurate. */
|
|
5003
|
-
this.constantSpeed = false;
|
|
5004
|
-
/** The color of the path as it was in Spine. Available only when nonessential data was exported. Paths are not usually
|
|
5005
|
-
* rendered at runtime. */
|
|
5006
|
-
this.color = new Color(1, 1, 1, 1);
|
|
5007
5037
|
}
|
|
5008
5038
|
copy() {
|
|
5009
5039
|
let copy = new PathAttachment(this.name);
|
|
@@ -5019,14 +5049,14 @@ var spine = (() => {
|
|
|
5019
5049
|
|
|
5020
5050
|
// spine-core/src/attachments/PointAttachment.ts
|
|
5021
5051
|
var PointAttachment = class extends VertexAttachment {
|
|
5052
|
+
x = 0;
|
|
5053
|
+
y = 0;
|
|
5054
|
+
rotation = 0;
|
|
5055
|
+
/** The color of the point attachment as it was in Spine. Available only when nonessential data was exported. Point attachments
|
|
5056
|
+
* are not usually rendered at runtime. */
|
|
5057
|
+
color = new Color(0.38, 0.94, 0, 1);
|
|
5022
5058
|
constructor(name) {
|
|
5023
5059
|
super(name);
|
|
5024
|
-
this.x = 0;
|
|
5025
|
-
this.y = 0;
|
|
5026
|
-
this.rotation = 0;
|
|
5027
|
-
/** The color of the point attachment as it was in Spine. Available only when nonessential data was exported. Point attachments
|
|
5028
|
-
* are not usually rendered at runtime. */
|
|
5029
|
-
this.color = new Color(0.38, 0.94, 0, 1);
|
|
5030
5060
|
}
|
|
5031
5061
|
computeWorldPosition(bone, point) {
|
|
5032
5062
|
point.x = this.x * bone.a + this.y * bone.b + bone.worldX;
|
|
@@ -5051,32 +5081,34 @@ var spine = (() => {
|
|
|
5051
5081
|
|
|
5052
5082
|
// spine-core/src/attachments/RegionAttachment.ts
|
|
5053
5083
|
var _RegionAttachment = class extends Attachment {
|
|
5084
|
+
/** The local x translation. */
|
|
5085
|
+
x = 0;
|
|
5086
|
+
/** The local y translation. */
|
|
5087
|
+
y = 0;
|
|
5088
|
+
/** The local scaleX. */
|
|
5089
|
+
scaleX = 1;
|
|
5090
|
+
/** The local scaleY. */
|
|
5091
|
+
scaleY = 1;
|
|
5092
|
+
/** The local rotation. */
|
|
5093
|
+
rotation = 0;
|
|
5094
|
+
/** The width of the region attachment in Spine. */
|
|
5095
|
+
width = 0;
|
|
5096
|
+
/** The height of the region attachment in Spine. */
|
|
5097
|
+
height = 0;
|
|
5098
|
+
/** The color to tint the region attachment. */
|
|
5099
|
+
color = new Color(1, 1, 1, 1);
|
|
5100
|
+
/** The name of the texture region for this attachment. */
|
|
5101
|
+
path;
|
|
5102
|
+
region = null;
|
|
5103
|
+
sequence = null;
|
|
5104
|
+
/** For each of the 4 vertices, a pair of <code>x,y</code> values that is the local position of the vertex.
|
|
5105
|
+
*
|
|
5106
|
+
* See {@link #updateOffset()}. */
|
|
5107
|
+
offset = Utils.newFloatArray(8);
|
|
5108
|
+
uvs = Utils.newFloatArray(8);
|
|
5109
|
+
tempColor = new Color(1, 1, 1, 1);
|
|
5054
5110
|
constructor(name, path) {
|
|
5055
5111
|
super(name);
|
|
5056
|
-
/** The local x translation. */
|
|
5057
|
-
this.x = 0;
|
|
5058
|
-
/** The local y translation. */
|
|
5059
|
-
this.y = 0;
|
|
5060
|
-
/** The local scaleX. */
|
|
5061
|
-
this.scaleX = 1;
|
|
5062
|
-
/** The local scaleY. */
|
|
5063
|
-
this.scaleY = 1;
|
|
5064
|
-
/** The local rotation. */
|
|
5065
|
-
this.rotation = 0;
|
|
5066
|
-
/** The width of the region attachment in Spine. */
|
|
5067
|
-
this.width = 0;
|
|
5068
|
-
/** The height of the region attachment in Spine. */
|
|
5069
|
-
this.height = 0;
|
|
5070
|
-
/** The color to tint the region attachment. */
|
|
5071
|
-
this.color = new Color(1, 1, 1, 1);
|
|
5072
|
-
this.region = null;
|
|
5073
|
-
this.sequence = null;
|
|
5074
|
-
/** For each of the 4 vertices, a pair of <code>x,y</code> values that is the local position of the vertex.
|
|
5075
|
-
*
|
|
5076
|
-
* See {@link #updateOffset()}. */
|
|
5077
|
-
this.offset = Utils.newFloatArray(8);
|
|
5078
|
-
this.uvs = Utils.newFloatArray(8);
|
|
5079
|
-
this.tempColor = new Color(1, 1, 1, 1);
|
|
5080
5112
|
this.path = path;
|
|
5081
5113
|
}
|
|
5082
5114
|
/** Calculates the {@link #offset} using the region settings. Must be called after changing region settings. */
|
|
@@ -5197,41 +5229,42 @@ var spine = (() => {
|
|
|
5197
5229
|
}
|
|
5198
5230
|
};
|
|
5199
5231
|
var RegionAttachment = _RegionAttachment;
|
|
5200
|
-
RegionAttachment
|
|
5201
|
-
RegionAttachment
|
|
5202
|
-
RegionAttachment
|
|
5203
|
-
RegionAttachment
|
|
5204
|
-
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
|
+
__publicField(RegionAttachment, "X1", 0);
|
|
5233
|
+
__publicField(RegionAttachment, "Y1", 1);
|
|
5234
|
+
__publicField(RegionAttachment, "C1R", 2);
|
|
5235
|
+
__publicField(RegionAttachment, "C1G", 3);
|
|
5236
|
+
__publicField(RegionAttachment, "C1B", 4);
|
|
5237
|
+
__publicField(RegionAttachment, "C1A", 5);
|
|
5238
|
+
__publicField(RegionAttachment, "U1", 6);
|
|
5239
|
+
__publicField(RegionAttachment, "V1", 7);
|
|
5240
|
+
__publicField(RegionAttachment, "X2", 8);
|
|
5241
|
+
__publicField(RegionAttachment, "Y2", 9);
|
|
5242
|
+
__publicField(RegionAttachment, "C2R", 10);
|
|
5243
|
+
__publicField(RegionAttachment, "C2G", 11);
|
|
5244
|
+
__publicField(RegionAttachment, "C2B", 12);
|
|
5245
|
+
__publicField(RegionAttachment, "C2A", 13);
|
|
5246
|
+
__publicField(RegionAttachment, "U2", 14);
|
|
5247
|
+
__publicField(RegionAttachment, "V2", 15);
|
|
5248
|
+
__publicField(RegionAttachment, "X3", 16);
|
|
5249
|
+
__publicField(RegionAttachment, "Y3", 17);
|
|
5250
|
+
__publicField(RegionAttachment, "C3R", 18);
|
|
5251
|
+
__publicField(RegionAttachment, "C3G", 19);
|
|
5252
|
+
__publicField(RegionAttachment, "C3B", 20);
|
|
5253
|
+
__publicField(RegionAttachment, "C3A", 21);
|
|
5254
|
+
__publicField(RegionAttachment, "U3", 22);
|
|
5255
|
+
__publicField(RegionAttachment, "V3", 23);
|
|
5256
|
+
__publicField(RegionAttachment, "X4", 24);
|
|
5257
|
+
__publicField(RegionAttachment, "Y4", 25);
|
|
5258
|
+
__publicField(RegionAttachment, "C4R", 26);
|
|
5259
|
+
__publicField(RegionAttachment, "C4G", 27);
|
|
5260
|
+
__publicField(RegionAttachment, "C4B", 28);
|
|
5261
|
+
__publicField(RegionAttachment, "C4A", 29);
|
|
5262
|
+
__publicField(RegionAttachment, "U4", 30);
|
|
5263
|
+
__publicField(RegionAttachment, "V4", 31);
|
|
5232
5264
|
|
|
5233
5265
|
// spine-core/src/AtlasAttachmentLoader.ts
|
|
5234
5266
|
var AtlasAttachmentLoader = class {
|
|
5267
|
+
atlas;
|
|
5235
5268
|
constructor(atlas) {
|
|
5236
5269
|
this.atlas = atlas;
|
|
5237
5270
|
}
|
|
@@ -5285,36 +5318,38 @@ var spine = (() => {
|
|
|
5285
5318
|
|
|
5286
5319
|
// spine-core/src/BoneData.ts
|
|
5287
5320
|
var BoneData = class {
|
|
5321
|
+
/** The index of the bone in {@link Skeleton#getBones()}. */
|
|
5322
|
+
index = 0;
|
|
5323
|
+
/** The name of the bone, which is unique across all bones in the skeleton. */
|
|
5324
|
+
name;
|
|
5325
|
+
/** @returns May be null. */
|
|
5326
|
+
parent = null;
|
|
5327
|
+
/** The bone's length. */
|
|
5328
|
+
length = 0;
|
|
5329
|
+
/** The local x translation. */
|
|
5330
|
+
x = 0;
|
|
5331
|
+
/** The local y translation. */
|
|
5332
|
+
y = 0;
|
|
5333
|
+
/** The local rotation. */
|
|
5334
|
+
rotation = 0;
|
|
5335
|
+
/** The local scaleX. */
|
|
5336
|
+
scaleX = 1;
|
|
5337
|
+
/** The local scaleY. */
|
|
5338
|
+
scaleY = 1;
|
|
5339
|
+
/** The local shearX. */
|
|
5340
|
+
shearX = 0;
|
|
5341
|
+
/** The local shearX. */
|
|
5342
|
+
shearY = 0;
|
|
5343
|
+
/** The transform mode for how parent world transforms affect this bone. */
|
|
5344
|
+
transformMode = TransformMode.Normal;
|
|
5345
|
+
/** When true, {@link Skeleton#updateWorldTransform()} only updates this bone if the {@link Skeleton#skin} contains this
|
|
5346
|
+
* bone.
|
|
5347
|
+
* @see Skin#bones */
|
|
5348
|
+
skinRequired = false;
|
|
5349
|
+
/** The color of the bone as it was in Spine. Available only when nonessential data was exported. Bones are not usually
|
|
5350
|
+
* rendered at runtime. */
|
|
5351
|
+
color = new Color();
|
|
5288
5352
|
constructor(index, name, parent) {
|
|
5289
|
-
/** The index of the bone in {@link Skeleton#getBones()}. */
|
|
5290
|
-
this.index = 0;
|
|
5291
|
-
/** @returns May be null. */
|
|
5292
|
-
this.parent = null;
|
|
5293
|
-
/** The bone's length. */
|
|
5294
|
-
this.length = 0;
|
|
5295
|
-
/** The local x translation. */
|
|
5296
|
-
this.x = 0;
|
|
5297
|
-
/** The local y translation. */
|
|
5298
|
-
this.y = 0;
|
|
5299
|
-
/** The local rotation. */
|
|
5300
|
-
this.rotation = 0;
|
|
5301
|
-
/** The local scaleX. */
|
|
5302
|
-
this.scaleX = 1;
|
|
5303
|
-
/** The local scaleY. */
|
|
5304
|
-
this.scaleY = 1;
|
|
5305
|
-
/** The local shearX. */
|
|
5306
|
-
this.shearX = 0;
|
|
5307
|
-
/** The local shearX. */
|
|
5308
|
-
this.shearY = 0;
|
|
5309
|
-
/** The transform mode for how parent world transforms affect this bone. */
|
|
5310
|
-
this.transformMode = TransformMode.Normal;
|
|
5311
|
-
/** When true, {@link Skeleton#updateWorldTransform()} only updates this bone if the {@link Skeleton#skin} contains this
|
|
5312
|
-
* bone.
|
|
5313
|
-
* @see Skin#bones */
|
|
5314
|
-
this.skinRequired = false;
|
|
5315
|
-
/** The color of the bone as it was in Spine. Available only when nonessential data was exported. Bones are not usually
|
|
5316
|
-
* rendered at runtime. */
|
|
5317
|
-
this.color = new Color();
|
|
5318
5353
|
if (index < 0)
|
|
5319
5354
|
throw new Error("index must be >= 0.");
|
|
5320
5355
|
if (!name)
|
|
@@ -5335,54 +5370,58 @@ var spine = (() => {
|
|
|
5335
5370
|
|
|
5336
5371
|
// spine-core/src/Bone.ts
|
|
5337
5372
|
var Bone = class {
|
|
5373
|
+
/** The bone's setup pose data. */
|
|
5374
|
+
data;
|
|
5375
|
+
/** The skeleton this bone belongs to. */
|
|
5376
|
+
skeleton;
|
|
5377
|
+
/** The parent bone, or null if this is the root bone. */
|
|
5378
|
+
parent = null;
|
|
5379
|
+
/** The immediate children of this bone. */
|
|
5380
|
+
children = new Array();
|
|
5381
|
+
/** The local x translation. */
|
|
5382
|
+
x = 0;
|
|
5383
|
+
/** The local y translation. */
|
|
5384
|
+
y = 0;
|
|
5385
|
+
/** The local rotation in degrees, counter clockwise. */
|
|
5386
|
+
rotation = 0;
|
|
5387
|
+
/** The local scaleX. */
|
|
5388
|
+
scaleX = 0;
|
|
5389
|
+
/** The local scaleY. */
|
|
5390
|
+
scaleY = 0;
|
|
5391
|
+
/** The local shearX. */
|
|
5392
|
+
shearX = 0;
|
|
5393
|
+
/** The local shearY. */
|
|
5394
|
+
shearY = 0;
|
|
5395
|
+
/** The applied local x translation. */
|
|
5396
|
+
ax = 0;
|
|
5397
|
+
/** The applied local y translation. */
|
|
5398
|
+
ay = 0;
|
|
5399
|
+
/** The applied local rotation in degrees, counter clockwise. */
|
|
5400
|
+
arotation = 0;
|
|
5401
|
+
/** The applied local scaleX. */
|
|
5402
|
+
ascaleX = 0;
|
|
5403
|
+
/** The applied local scaleY. */
|
|
5404
|
+
ascaleY = 0;
|
|
5405
|
+
/** The applied local shearX. */
|
|
5406
|
+
ashearX = 0;
|
|
5407
|
+
/** The applied local shearY. */
|
|
5408
|
+
ashearY = 0;
|
|
5409
|
+
/** Part of the world transform matrix for the X axis. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5410
|
+
a = 0;
|
|
5411
|
+
/** Part of the world transform matrix for the Y axis. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5412
|
+
b = 0;
|
|
5413
|
+
/** Part of the world transform matrix for the X axis. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5414
|
+
c = 0;
|
|
5415
|
+
/** Part of the world transform matrix for the Y axis. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5416
|
+
d = 0;
|
|
5417
|
+
/** The world X position. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5418
|
+
worldY = 0;
|
|
5419
|
+
/** The world Y position. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5420
|
+
worldX = 0;
|
|
5421
|
+
sorted = false;
|
|
5422
|
+
active = false;
|
|
5338
5423
|
/** @param parent May be null. */
|
|
5339
5424
|
constructor(data, skeleton, parent) {
|
|
5340
|
-
/** The parent bone, or null if this is the root bone. */
|
|
5341
|
-
this.parent = null;
|
|
5342
|
-
/** The immediate children of this bone. */
|
|
5343
|
-
this.children = new Array();
|
|
5344
|
-
/** The local x translation. */
|
|
5345
|
-
this.x = 0;
|
|
5346
|
-
/** The local y translation. */
|
|
5347
|
-
this.y = 0;
|
|
5348
|
-
/** The local rotation in degrees, counter clockwise. */
|
|
5349
|
-
this.rotation = 0;
|
|
5350
|
-
/** The local scaleX. */
|
|
5351
|
-
this.scaleX = 0;
|
|
5352
|
-
/** The local scaleY. */
|
|
5353
|
-
this.scaleY = 0;
|
|
5354
|
-
/** The local shearX. */
|
|
5355
|
-
this.shearX = 0;
|
|
5356
|
-
/** The local shearY. */
|
|
5357
|
-
this.shearY = 0;
|
|
5358
|
-
/** The applied local x translation. */
|
|
5359
|
-
this.ax = 0;
|
|
5360
|
-
/** The applied local y translation. */
|
|
5361
|
-
this.ay = 0;
|
|
5362
|
-
/** The applied local rotation in degrees, counter clockwise. */
|
|
5363
|
-
this.arotation = 0;
|
|
5364
|
-
/** The applied local scaleX. */
|
|
5365
|
-
this.ascaleX = 0;
|
|
5366
|
-
/** The applied local scaleY. */
|
|
5367
|
-
this.ascaleY = 0;
|
|
5368
|
-
/** The applied local shearX. */
|
|
5369
|
-
this.ashearX = 0;
|
|
5370
|
-
/** The applied local shearY. */
|
|
5371
|
-
this.ashearY = 0;
|
|
5372
|
-
/** Part of the world transform matrix for the X axis. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5373
|
-
this.a = 0;
|
|
5374
|
-
/** Part of the world transform matrix for the Y axis. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5375
|
-
this.b = 0;
|
|
5376
|
-
/** Part of the world transform matrix for the X axis. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5377
|
-
this.c = 0;
|
|
5378
|
-
/** Part of the world transform matrix for the Y axis. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5379
|
-
this.d = 0;
|
|
5380
|
-
/** The world X position. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5381
|
-
this.worldY = 0;
|
|
5382
|
-
/** The world Y position. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5383
|
-
this.worldX = 0;
|
|
5384
|
-
this.sorted = false;
|
|
5385
|
-
this.active = false;
|
|
5386
5425
|
if (!data)
|
|
5387
5426
|
throw new Error("data cannot be null.");
|
|
5388
5427
|
if (!skeleton)
|
|
@@ -5643,12 +5682,14 @@ var spine = (() => {
|
|
|
5643
5682
|
|
|
5644
5683
|
// spine-core/src/AssetManagerBase.ts
|
|
5645
5684
|
var AssetManagerBase = class {
|
|
5685
|
+
pathPrefix = "";
|
|
5686
|
+
textureLoader;
|
|
5687
|
+
downloader;
|
|
5688
|
+
assets = {};
|
|
5689
|
+
errors = {};
|
|
5690
|
+
toLoad = 0;
|
|
5691
|
+
loaded = 0;
|
|
5646
5692
|
constructor(textureLoader, pathPrefix = "", downloader = new Downloader()) {
|
|
5647
|
-
this.pathPrefix = "";
|
|
5648
|
-
this.assets = {};
|
|
5649
|
-
this.errors = {};
|
|
5650
|
-
this.toLoad = 0;
|
|
5651
|
-
this.loaded = 0;
|
|
5652
5693
|
this.textureLoader = textureLoader;
|
|
5653
5694
|
this.pathPrefix = pathPrefix;
|
|
5654
5695
|
this.downloader = downloader;
|
|
@@ -5833,10 +5874,8 @@ var spine = (() => {
|
|
|
5833
5874
|
}
|
|
5834
5875
|
};
|
|
5835
5876
|
var Downloader = class {
|
|
5836
|
-
|
|
5837
|
-
|
|
5838
|
-
this.rawDataUris = {};
|
|
5839
|
-
}
|
|
5877
|
+
callbacks = {};
|
|
5878
|
+
rawDataUris = {};
|
|
5840
5879
|
dataUriToString(dataUri) {
|
|
5841
5880
|
if (!dataUri.startsWith("data:")) {
|
|
5842
5881
|
throw new Error("Not a data URI.");
|
|
@@ -5943,13 +5982,14 @@ var spine = (() => {
|
|
|
5943
5982
|
|
|
5944
5983
|
// spine-core/src/Event.ts
|
|
5945
5984
|
var Event = class {
|
|
5985
|
+
data;
|
|
5986
|
+
intValue = 0;
|
|
5987
|
+
floatValue = 0;
|
|
5988
|
+
stringValue = null;
|
|
5989
|
+
time = 0;
|
|
5990
|
+
volume = 0;
|
|
5991
|
+
balance = 0;
|
|
5946
5992
|
constructor(time, data) {
|
|
5947
|
-
this.intValue = 0;
|
|
5948
|
-
this.floatValue = 0;
|
|
5949
|
-
this.stringValue = null;
|
|
5950
|
-
this.time = 0;
|
|
5951
|
-
this.volume = 0;
|
|
5952
|
-
this.balance = 0;
|
|
5953
5993
|
if (!data)
|
|
5954
5994
|
throw new Error("data cannot be null.");
|
|
5955
5995
|
this.time = time;
|
|
@@ -5959,32 +5999,39 @@ var spine = (() => {
|
|
|
5959
5999
|
|
|
5960
6000
|
// spine-core/src/EventData.ts
|
|
5961
6001
|
var EventData = class {
|
|
6002
|
+
name;
|
|
6003
|
+
intValue = 0;
|
|
6004
|
+
floatValue = 0;
|
|
6005
|
+
stringValue = null;
|
|
6006
|
+
audioPath = null;
|
|
6007
|
+
volume = 0;
|
|
6008
|
+
balance = 0;
|
|
5962
6009
|
constructor(name) {
|
|
5963
|
-
this.intValue = 0;
|
|
5964
|
-
this.floatValue = 0;
|
|
5965
|
-
this.stringValue = null;
|
|
5966
|
-
this.audioPath = null;
|
|
5967
|
-
this.volume = 0;
|
|
5968
|
-
this.balance = 0;
|
|
5969
6010
|
this.name = name;
|
|
5970
6011
|
}
|
|
5971
6012
|
};
|
|
5972
6013
|
|
|
5973
6014
|
// spine-core/src/IkConstraint.ts
|
|
5974
6015
|
var IkConstraint = class {
|
|
6016
|
+
/** The IK constraint's setup pose data. */
|
|
6017
|
+
data;
|
|
6018
|
+
/** The bones that will be modified by this IK constraint. */
|
|
6019
|
+
bones;
|
|
6020
|
+
/** The bone that is the IK target. */
|
|
6021
|
+
target;
|
|
6022
|
+
/** Controls the bend direction of the IK bones, either 1 or -1. */
|
|
6023
|
+
bendDirection = 0;
|
|
6024
|
+
/** When true and only a single bone is being constrained, if the target is too close, the bone is scaled to reach it. */
|
|
6025
|
+
compress = false;
|
|
6026
|
+
/** 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
|
|
6027
|
+
* and the parent bone has local nonuniform scale, stretch is not applied. */
|
|
6028
|
+
stretch = false;
|
|
6029
|
+
/** A percentage (0-1) that controls the mix between the constrained and unconstrained rotations. */
|
|
6030
|
+
mix = 1;
|
|
6031
|
+
/** For two bone IK, the distance from the maximum reach of the bones that rotation will slow. */
|
|
6032
|
+
softness = 0;
|
|
6033
|
+
active = false;
|
|
5975
6034
|
constructor(data, skeleton) {
|
|
5976
|
-
/** Controls the bend direction of the IK bones, either 1 or -1. */
|
|
5977
|
-
this.bendDirection = 0;
|
|
5978
|
-
/** When true and only a single bone is being constrained, if the target is too close, the bone is scaled to reach it. */
|
|
5979
|
-
this.compress = false;
|
|
5980
|
-
/** 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
|
|
5981
|
-
* and the parent bone has local nonuniform scale, stretch is not applied. */
|
|
5982
|
-
this.stretch = false;
|
|
5983
|
-
/** A percentage (0-1) that controls the mix between the constrained and unconstrained rotations. */
|
|
5984
|
-
this.mix = 1;
|
|
5985
|
-
/** For two bone IK, the distance from the maximum reach of the bones that rotation will slow. */
|
|
5986
|
-
this.softness = 0;
|
|
5987
|
-
this.active = false;
|
|
5988
6035
|
if (!data)
|
|
5989
6036
|
throw new Error("data cannot be null.");
|
|
5990
6037
|
if (!skeleton)
|
|
@@ -6242,27 +6289,10 @@ var spine = (() => {
|
|
|
6242
6289
|
|
|
6243
6290
|
// spine-core/src/IkConstraintData.ts
|
|
6244
6291
|
var IkConstraintData = class extends ConstraintData {
|
|
6245
|
-
|
|
6246
|
-
|
|
6247
|
-
|
|
6248
|
-
|
|
6249
|
-
/** The bone that is the IK target. */
|
|
6250
|
-
this._target = null;
|
|
6251
|
-
/** Controls the bend direction of the IK bones, either 1 or -1. */
|
|
6252
|
-
this.bendDirection = 1;
|
|
6253
|
-
/** When true and only a single bone is being constrained, if the target is too close, the bone is scaled to reach it. */
|
|
6254
|
-
this.compress = false;
|
|
6255
|
-
/** 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
|
|
6256
|
-
* and the parent bone has local nonuniform scale, stretch is not applied. */
|
|
6257
|
-
this.stretch = false;
|
|
6258
|
-
/** When true, only a single bone is being constrained, and {@link #getCompress()} or {@link #getStretch()} is used, the bone
|
|
6259
|
-
* is scaled on both the X and Y axes. */
|
|
6260
|
-
this.uniform = false;
|
|
6261
|
-
/** A percentage (0-1) that controls the mix between the constrained and unconstrained rotations. */
|
|
6262
|
-
this.mix = 1;
|
|
6263
|
-
/** For two bone IK, the distance from the maximum reach of the bones that rotation will slow. */
|
|
6264
|
-
this.softness = 0;
|
|
6265
|
-
}
|
|
6292
|
+
/** The bones that are constrained by this IK constraint. */
|
|
6293
|
+
bones = new Array();
|
|
6294
|
+
/** The bone that is the IK target. */
|
|
6295
|
+
_target = null;
|
|
6266
6296
|
set target(boneData) {
|
|
6267
6297
|
this._target = boneData;
|
|
6268
6298
|
}
|
|
@@ -6272,32 +6302,31 @@ var spine = (() => {
|
|
|
6272
6302
|
else
|
|
6273
6303
|
return this._target;
|
|
6274
6304
|
}
|
|
6305
|
+
/** Controls the bend direction of the IK bones, either 1 or -1. */
|
|
6306
|
+
bendDirection = 1;
|
|
6307
|
+
/** When true and only a single bone is being constrained, if the target is too close, the bone is scaled to reach it. */
|
|
6308
|
+
compress = false;
|
|
6309
|
+
/** 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
|
|
6310
|
+
* and the parent bone has local nonuniform scale, stretch is not applied. */
|
|
6311
|
+
stretch = false;
|
|
6312
|
+
/** When true, only a single bone is being constrained, and {@link #getCompress()} or {@link #getStretch()} is used, the bone
|
|
6313
|
+
* is scaled on both the X and Y axes. */
|
|
6314
|
+
uniform = false;
|
|
6315
|
+
/** A percentage (0-1) that controls the mix between the constrained and unconstrained rotations. */
|
|
6316
|
+
mix = 1;
|
|
6317
|
+
/** For two bone IK, the distance from the maximum reach of the bones that rotation will slow. */
|
|
6318
|
+
softness = 0;
|
|
6319
|
+
constructor(name) {
|
|
6320
|
+
super(name, 0, false);
|
|
6321
|
+
}
|
|
6275
6322
|
};
|
|
6276
6323
|
|
|
6277
6324
|
// spine-core/src/PathConstraintData.ts
|
|
6278
6325
|
var PathConstraintData = class extends ConstraintData {
|
|
6279
|
-
|
|
6280
|
-
|
|
6281
|
-
|
|
6282
|
-
|
|
6283
|
-
/** The slot whose path attachment will be used to constrained the bones. */
|
|
6284
|
-
this._target = null;
|
|
6285
|
-
/** The mode for positioning the first bone on the path. */
|
|
6286
|
-
this.positionMode = PositionMode.Fixed;
|
|
6287
|
-
/** The mode for positioning the bones after the first bone on the path. */
|
|
6288
|
-
this.spacingMode = SpacingMode.Fixed;
|
|
6289
|
-
/** The mode for adjusting the rotation of the bones. */
|
|
6290
|
-
this.rotateMode = RotateMode.Chain;
|
|
6291
|
-
/** An offset added to the constrained bone rotation. */
|
|
6292
|
-
this.offsetRotation = 0;
|
|
6293
|
-
/** The position along the path. */
|
|
6294
|
-
this.position = 0;
|
|
6295
|
-
/** The spacing between bones. */
|
|
6296
|
-
this.spacing = 0;
|
|
6297
|
-
this.mixRotate = 0;
|
|
6298
|
-
this.mixX = 0;
|
|
6299
|
-
this.mixY = 0;
|
|
6300
|
-
}
|
|
6326
|
+
/** The bones that will be modified by this path constraint. */
|
|
6327
|
+
bones = new Array();
|
|
6328
|
+
/** The slot whose path attachment will be used to constrained the bones. */
|
|
6329
|
+
_target = null;
|
|
6301
6330
|
set target(slotData) {
|
|
6302
6331
|
this._target = slotData;
|
|
6303
6332
|
}
|
|
@@ -6307,6 +6336,24 @@ var spine = (() => {
|
|
|
6307
6336
|
else
|
|
6308
6337
|
return this._target;
|
|
6309
6338
|
}
|
|
6339
|
+
/** The mode for positioning the first bone on the path. */
|
|
6340
|
+
positionMode = PositionMode.Fixed;
|
|
6341
|
+
/** The mode for positioning the bones after the first bone on the path. */
|
|
6342
|
+
spacingMode = SpacingMode.Fixed;
|
|
6343
|
+
/** The mode for adjusting the rotation of the bones. */
|
|
6344
|
+
rotateMode = RotateMode.Chain;
|
|
6345
|
+
/** An offset added to the constrained bone rotation. */
|
|
6346
|
+
offsetRotation = 0;
|
|
6347
|
+
/** The position along the path. */
|
|
6348
|
+
position = 0;
|
|
6349
|
+
/** The spacing between bones. */
|
|
6350
|
+
spacing = 0;
|
|
6351
|
+
mixRotate = 0;
|
|
6352
|
+
mixX = 0;
|
|
6353
|
+
mixY = 0;
|
|
6354
|
+
constructor(name) {
|
|
6355
|
+
super(name, 0, false);
|
|
6356
|
+
}
|
|
6310
6357
|
};
|
|
6311
6358
|
var PositionMode = /* @__PURE__ */ ((PositionMode2) => {
|
|
6312
6359
|
PositionMode2[PositionMode2["Fixed"] = 0] = "Fixed";
|
|
@@ -6329,21 +6376,27 @@ var spine = (() => {
|
|
|
6329
6376
|
|
|
6330
6377
|
// spine-core/src/PathConstraint.ts
|
|
6331
6378
|
var _PathConstraint = class {
|
|
6379
|
+
/** The path constraint's setup pose data. */
|
|
6380
|
+
data;
|
|
6381
|
+
/** The bones that will be modified by this path constraint. */
|
|
6382
|
+
bones;
|
|
6383
|
+
/** The slot whose path attachment will be used to constrained the bones. */
|
|
6384
|
+
target;
|
|
6385
|
+
/** The position along the path. */
|
|
6386
|
+
position = 0;
|
|
6387
|
+
/** The spacing between bones. */
|
|
6388
|
+
spacing = 0;
|
|
6389
|
+
mixRotate = 0;
|
|
6390
|
+
mixX = 0;
|
|
6391
|
+
mixY = 0;
|
|
6392
|
+
spaces = new Array();
|
|
6393
|
+
positions = new Array();
|
|
6394
|
+
world = new Array();
|
|
6395
|
+
curves = new Array();
|
|
6396
|
+
lengths = new Array();
|
|
6397
|
+
segments = new Array();
|
|
6398
|
+
active = false;
|
|
6332
6399
|
constructor(data, skeleton) {
|
|
6333
|
-
/** The position along the path. */
|
|
6334
|
-
this.position = 0;
|
|
6335
|
-
/** The spacing between bones. */
|
|
6336
|
-
this.spacing = 0;
|
|
6337
|
-
this.mixRotate = 0;
|
|
6338
|
-
this.mixX = 0;
|
|
6339
|
-
this.mixY = 0;
|
|
6340
|
-
this.spaces = new Array();
|
|
6341
|
-
this.positions = new Array();
|
|
6342
|
-
this.world = new Array();
|
|
6343
|
-
this.curves = new Array();
|
|
6344
|
-
this.lengths = new Array();
|
|
6345
|
-
this.segments = new Array();
|
|
6346
|
-
this.active = false;
|
|
6347
6400
|
if (!data)
|
|
6348
6401
|
throw new Error("data cannot be null.");
|
|
6349
6402
|
if (!skeleton)
|
|
@@ -6763,27 +6816,34 @@ var spine = (() => {
|
|
|
6763
6816
|
}
|
|
6764
6817
|
};
|
|
6765
6818
|
var PathConstraint = _PathConstraint;
|
|
6766
|
-
PathConstraint
|
|
6767
|
-
PathConstraint
|
|
6768
|
-
PathConstraint
|
|
6769
|
-
PathConstraint
|
|
6819
|
+
__publicField(PathConstraint, "NONE", -1);
|
|
6820
|
+
__publicField(PathConstraint, "BEFORE", -2);
|
|
6821
|
+
__publicField(PathConstraint, "AFTER", -3);
|
|
6822
|
+
__publicField(PathConstraint, "epsilon", 1e-5);
|
|
6770
6823
|
|
|
6771
6824
|
// spine-core/src/Slot.ts
|
|
6772
6825
|
var Slot = class {
|
|
6826
|
+
/** The slot's setup pose data. */
|
|
6827
|
+
data;
|
|
6828
|
+
/** The bone this slot belongs to. */
|
|
6829
|
+
bone;
|
|
6830
|
+
/** The color used to tint the slot's attachment. If {@link #getDarkColor()} is set, this is used as the light color for two
|
|
6831
|
+
* color tinting. */
|
|
6832
|
+
color;
|
|
6833
|
+
/** 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
|
|
6834
|
+
* color's alpha is not used. */
|
|
6835
|
+
darkColor = null;
|
|
6836
|
+
attachment = null;
|
|
6837
|
+
attachmentState = 0;
|
|
6838
|
+
/** The index of the texture region to display when the slot's attachment has a {@link Sequence}. -1 represents the
|
|
6839
|
+
* {@link Sequence#getSetupIndex()}. */
|
|
6840
|
+
sequenceIndex = -1;
|
|
6841
|
+
/** Values to deform the slot's attachment. For an unweighted mesh, the entries are local positions for each vertex. For a
|
|
6842
|
+
* weighted mesh, the entries are an offset for each vertex which will be added to the mesh's local vertex positions.
|
|
6843
|
+
*
|
|
6844
|
+
* See {@link VertexAttachment#computeWorldVertices()} and {@link DeformTimeline}. */
|
|
6845
|
+
deform = new Array();
|
|
6773
6846
|
constructor(data, bone) {
|
|
6774
|
-
/** 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
|
|
6775
|
-
* color's alpha is not used. */
|
|
6776
|
-
this.darkColor = null;
|
|
6777
|
-
this.attachment = null;
|
|
6778
|
-
this.attachmentState = 0;
|
|
6779
|
-
/** The index of the texture region to display when the slot's attachment has a {@link Sequence}. -1 represents the
|
|
6780
|
-
* {@link Sequence#getSetupIndex()}. */
|
|
6781
|
-
this.sequenceIndex = -1;
|
|
6782
|
-
/** Values to deform the slot's attachment. For an unweighted mesh, the entries are local positions for each vertex. For a
|
|
6783
|
-
* weighted mesh, the entries are an offset for each vertex which will be added to the mesh's local vertex positions.
|
|
6784
|
-
*
|
|
6785
|
-
* See {@link VertexAttachment#computeWorldVertices()} and {@link DeformTimeline}. */
|
|
6786
|
-
this.deform = new Array();
|
|
6787
6847
|
if (!data)
|
|
6788
6848
|
throw new Error("data cannot be null.");
|
|
6789
6849
|
if (!bone)
|
|
@@ -6830,15 +6890,21 @@ var spine = (() => {
|
|
|
6830
6890
|
|
|
6831
6891
|
// spine-core/src/TransformConstraint.ts
|
|
6832
6892
|
var TransformConstraint = class {
|
|
6893
|
+
/** The transform constraint's setup pose data. */
|
|
6894
|
+
data;
|
|
6895
|
+
/** The bones that will be modified by this transform constraint. */
|
|
6896
|
+
bones;
|
|
6897
|
+
/** The target bone whose world transform will be copied to the constrained bones. */
|
|
6898
|
+
target;
|
|
6899
|
+
mixRotate = 0;
|
|
6900
|
+
mixX = 0;
|
|
6901
|
+
mixY = 0;
|
|
6902
|
+
mixScaleX = 0;
|
|
6903
|
+
mixScaleY = 0;
|
|
6904
|
+
mixShearY = 0;
|
|
6905
|
+
temp = new Vector2();
|
|
6906
|
+
active = false;
|
|
6833
6907
|
constructor(data, skeleton) {
|
|
6834
|
-
this.mixRotate = 0;
|
|
6835
|
-
this.mixX = 0;
|
|
6836
|
-
this.mixY = 0;
|
|
6837
|
-
this.mixScaleX = 0;
|
|
6838
|
-
this.mixScaleY = 0;
|
|
6839
|
-
this.mixShearY = 0;
|
|
6840
|
-
this.temp = new Vector2();
|
|
6841
|
-
this.active = false;
|
|
6842
6908
|
if (!data)
|
|
6843
6909
|
throw new Error("data cannot be null.");
|
|
6844
6910
|
if (!skeleton)
|
|
@@ -7044,21 +7110,43 @@ var spine = (() => {
|
|
|
7044
7110
|
|
|
7045
7111
|
// spine-core/src/Skeleton.ts
|
|
7046
7112
|
var _Skeleton = class {
|
|
7113
|
+
/** The skeleton's setup pose data. */
|
|
7114
|
+
data;
|
|
7115
|
+
/** The skeleton's bones, sorted parent first. The root bone is always the first bone. */
|
|
7116
|
+
bones;
|
|
7117
|
+
/** The skeleton's slots. */
|
|
7118
|
+
slots;
|
|
7119
|
+
/** The skeleton's slots in the order they should be drawn. The returned array may be modified to change the draw order. */
|
|
7120
|
+
drawOrder;
|
|
7121
|
+
/** The skeleton's IK constraints. */
|
|
7122
|
+
ikConstraints;
|
|
7123
|
+
/** The skeleton's transform constraints. */
|
|
7124
|
+
transformConstraints;
|
|
7125
|
+
/** The skeleton's path constraints. */
|
|
7126
|
+
pathConstraints;
|
|
7127
|
+
/** The list of bones and constraints, sorted in the order they should be updated, as computed by {@link #updateCache()}. */
|
|
7128
|
+
_updateCache = new Array();
|
|
7129
|
+
/** The skeleton's current skin. May be null. */
|
|
7130
|
+
skin = null;
|
|
7131
|
+
/** The color to tint all the skeleton's attachments. */
|
|
7132
|
+
color;
|
|
7133
|
+
/** Scales the entire skeleton on the X axis. This affects all bones, even if the bone's transform mode disallows scale
|
|
7134
|
+
* inheritance. */
|
|
7135
|
+
scaleX = 1;
|
|
7136
|
+
/** Scales the entire skeleton on the Y axis. This affects all bones, even if the bone's transform mode disallows scale
|
|
7137
|
+
* inheritance. */
|
|
7138
|
+
_scaleY = 1;
|
|
7139
|
+
get scaleY() {
|
|
7140
|
+
return _Skeleton.yDown ? -this._scaleY : this._scaleY;
|
|
7141
|
+
}
|
|
7142
|
+
set scaleY(scaleY) {
|
|
7143
|
+
this._scaleY = scaleY;
|
|
7144
|
+
}
|
|
7145
|
+
/** Sets the skeleton X position, which is added to the root bone worldX position. */
|
|
7146
|
+
x = 0;
|
|
7147
|
+
/** Sets the skeleton Y position, which is added to the root bone worldY position. */
|
|
7148
|
+
y = 0;
|
|
7047
7149
|
constructor(data) {
|
|
7048
|
-
/** The list of bones and constraints, sorted in the order they should be updated, as computed by {@link #updateCache()}. */
|
|
7049
|
-
this._updateCache = new Array();
|
|
7050
|
-
/** The skeleton's current skin. May be null. */
|
|
7051
|
-
this.skin = null;
|
|
7052
|
-
/** Scales the entire skeleton on the X axis. This affects all bones, even if the bone's transform mode disallows scale
|
|
7053
|
-
* inheritance. */
|
|
7054
|
-
this.scaleX = 1;
|
|
7055
|
-
/** Scales the entire skeleton on the Y axis. This affects all bones, even if the bone's transform mode disallows scale
|
|
7056
|
-
* inheritance. */
|
|
7057
|
-
this._scaleY = 1;
|
|
7058
|
-
/** Sets the skeleton X position, which is added to the root bone worldX position. */
|
|
7059
|
-
this.x = 0;
|
|
7060
|
-
/** Sets the skeleton Y position, which is added to the root bone worldY position. */
|
|
7061
|
-
this.y = 0;
|
|
7062
7150
|
if (!data)
|
|
7063
7151
|
throw new Error("data cannot be null.");
|
|
7064
7152
|
this.data = data;
|
|
@@ -7102,12 +7190,6 @@ var spine = (() => {
|
|
|
7102
7190
|
this.color = new Color(1, 1, 1, 1);
|
|
7103
7191
|
this.updateCache();
|
|
7104
7192
|
}
|
|
7105
|
-
get scaleY() {
|
|
7106
|
-
return _Skeleton.yDown ? -this._scaleY : this._scaleY;
|
|
7107
|
-
}
|
|
7108
|
-
set scaleY(scaleY) {
|
|
7109
|
-
this._scaleY = scaleY;
|
|
7110
|
-
}
|
|
7111
7193
|
/** Caches information about bones and constraints. Must be called if the {@link #getSkin()} is modified or if bones,
|
|
7112
7194
|
* constraints, or weighted path attachments are added or removed. */
|
|
7113
7195
|
updateCache() {
|
|
@@ -7584,55 +7666,53 @@ var spine = (() => {
|
|
|
7584
7666
|
}
|
|
7585
7667
|
};
|
|
7586
7668
|
var Skeleton = _Skeleton;
|
|
7587
|
-
Skeleton
|
|
7669
|
+
__publicField(Skeleton, "yDown", false);
|
|
7588
7670
|
|
|
7589
7671
|
// spine-core/src/SkeletonData.ts
|
|
7590
7672
|
var SkeletonData = class {
|
|
7591
|
-
|
|
7592
|
-
|
|
7593
|
-
|
|
7594
|
-
|
|
7595
|
-
|
|
7596
|
-
|
|
7597
|
-
|
|
7598
|
-
|
|
7599
|
-
|
|
7600
|
-
|
|
7601
|
-
|
|
7602
|
-
|
|
7603
|
-
|
|
7604
|
-
|
|
7605
|
-
|
|
7606
|
-
|
|
7607
|
-
|
|
7608
|
-
|
|
7609
|
-
|
|
7610
|
-
|
|
7611
|
-
|
|
7612
|
-
|
|
7613
|
-
|
|
7614
|
-
|
|
7615
|
-
|
|
7616
|
-
|
|
7617
|
-
|
|
7618
|
-
|
|
7619
|
-
|
|
7620
|
-
|
|
7621
|
-
|
|
7622
|
-
|
|
7623
|
-
|
|
7624
|
-
|
|
7625
|
-
|
|
7626
|
-
|
|
7627
|
-
|
|
7628
|
-
|
|
7629
|
-
|
|
7630
|
-
|
|
7631
|
-
|
|
7632
|
-
|
|
7633
|
-
|
|
7634
|
-
this.audioPath = null;
|
|
7635
|
-
}
|
|
7673
|
+
/** The skeleton's name, which by default is the name of the skeleton data file, if possible. May be null. */
|
|
7674
|
+
name = null;
|
|
7675
|
+
/** The skeleton's bones, sorted parent first. The root bone is always the first bone. */
|
|
7676
|
+
bones = new Array();
|
|
7677
|
+
// Ordered parents first.
|
|
7678
|
+
/** The skeleton's slots. */
|
|
7679
|
+
slots = new Array();
|
|
7680
|
+
// Setup pose draw order.
|
|
7681
|
+
skins = new Array();
|
|
7682
|
+
/** The skeleton's default skin. By default this skin contains all attachments that were not in a skin in Spine.
|
|
7683
|
+
*
|
|
7684
|
+
* See {@link Skeleton#getAttachmentByName()}.
|
|
7685
|
+
* May be null. */
|
|
7686
|
+
defaultSkin = null;
|
|
7687
|
+
/** The skeleton's events. */
|
|
7688
|
+
events = new Array();
|
|
7689
|
+
/** The skeleton's animations. */
|
|
7690
|
+
animations = new Array();
|
|
7691
|
+
/** The skeleton's IK constraints. */
|
|
7692
|
+
ikConstraints = new Array();
|
|
7693
|
+
/** The skeleton's transform constraints. */
|
|
7694
|
+
transformConstraints = new Array();
|
|
7695
|
+
/** The skeleton's path constraints. */
|
|
7696
|
+
pathConstraints = new Array();
|
|
7697
|
+
/** The X coordinate of the skeleton's axis aligned bounding box in the setup pose. */
|
|
7698
|
+
x = 0;
|
|
7699
|
+
/** The Y coordinate of the skeleton's axis aligned bounding box in the setup pose. */
|
|
7700
|
+
y = 0;
|
|
7701
|
+
/** The width of the skeleton's axis aligned bounding box in the setup pose. */
|
|
7702
|
+
width = 0;
|
|
7703
|
+
/** The height of the skeleton's axis aligned bounding box in the setup pose. */
|
|
7704
|
+
height = 0;
|
|
7705
|
+
/** The Spine version used to export the skeleton data, or null. */
|
|
7706
|
+
version = null;
|
|
7707
|
+
/** The skeleton data hash. This value will change if any of the skeleton data has changed. May be null. */
|
|
7708
|
+
hash = null;
|
|
7709
|
+
// Nonessential
|
|
7710
|
+
/** The dopesheet FPS in Spine. Available only when nonessential data was exported. */
|
|
7711
|
+
fps = 0;
|
|
7712
|
+
/** The path to the images directory as defined in Spine. Available only when nonessential data was exported. May be null. */
|
|
7713
|
+
imagesPath = null;
|
|
7714
|
+
/** The path to the audio directory as defined in Spine. Available only when nonessential data was exported. May be null. */
|
|
7715
|
+
audioPath = null;
|
|
7636
7716
|
/** Finds a bone by comparing each bone's name. It is more efficient to cache the results of this method than to call it
|
|
7637
7717
|
* multiple times.
|
|
7638
7718
|
* @returns May be null. */
|
|
@@ -7756,10 +7836,12 @@ var spine = (() => {
|
|
|
7756
7836
|
}
|
|
7757
7837
|
};
|
|
7758
7838
|
var Skin = class {
|
|
7839
|
+
/** The skin's name, which is unique across all skins in the skeleton. */
|
|
7840
|
+
name;
|
|
7841
|
+
attachments = new Array();
|
|
7842
|
+
bones = Array();
|
|
7843
|
+
constraints = new Array();
|
|
7759
7844
|
constructor(name) {
|
|
7760
|
-
this.attachments = new Array();
|
|
7761
|
-
this.bones = Array();
|
|
7762
|
-
this.constraints = new Array();
|
|
7763
7845
|
if (!name)
|
|
7764
7846
|
throw new Error("name cannot be null.");
|
|
7765
7847
|
this.name = name;
|
|
@@ -7916,19 +7998,23 @@ var spine = (() => {
|
|
|
7916
7998
|
|
|
7917
7999
|
// spine-core/src/SlotData.ts
|
|
7918
8000
|
var SlotData = class {
|
|
8001
|
+
/** The index of the slot in {@link Skeleton#getSlots()}. */
|
|
8002
|
+
index = 0;
|
|
8003
|
+
/** The name of the slot, which is unique across all slots in the skeleton. */
|
|
8004
|
+
name;
|
|
8005
|
+
/** The bone this slot belongs to. */
|
|
8006
|
+
boneData;
|
|
8007
|
+
/** The color used to tint the slot's attachment. If {@link #getDarkColor()} is set, this is used as the light color for two
|
|
8008
|
+
* color tinting. */
|
|
8009
|
+
color = new Color(1, 1, 1, 1);
|
|
8010
|
+
/** 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
|
|
8011
|
+
* color's alpha is not used. */
|
|
8012
|
+
darkColor = null;
|
|
8013
|
+
/** The name of the attachment that is visible for this slot in the setup pose, or null if no attachment is visible. */
|
|
8014
|
+
attachmentName = null;
|
|
8015
|
+
/** The blend mode for drawing the slot's attachment. */
|
|
8016
|
+
blendMode = BlendMode.Normal;
|
|
7919
8017
|
constructor(index, name, boneData) {
|
|
7920
|
-
/** The index of the slot in {@link Skeleton#getSlots()}. */
|
|
7921
|
-
this.index = 0;
|
|
7922
|
-
/** The color used to tint the slot's attachment. If {@link #getDarkColor()} is set, this is used as the light color for two
|
|
7923
|
-
* color tinting. */
|
|
7924
|
-
this.color = new Color(1, 1, 1, 1);
|
|
7925
|
-
/** 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
|
|
7926
|
-
* color's alpha is not used. */
|
|
7927
|
-
this.darkColor = null;
|
|
7928
|
-
/** The name of the attachment that is visible for this slot in the setup pose, or null if no attachment is visible. */
|
|
7929
|
-
this.attachmentName = null;
|
|
7930
|
-
/** The blend mode for drawing the slot's attachment. */
|
|
7931
|
-
this.blendMode = BlendMode.Normal;
|
|
7932
8018
|
if (index < 0)
|
|
7933
8019
|
throw new Error("index must be >= 0.");
|
|
7934
8020
|
if (!name)
|
|
@@ -7950,33 +8036,10 @@ var spine = (() => {
|
|
|
7950
8036
|
|
|
7951
8037
|
// spine-core/src/TransformConstraintData.ts
|
|
7952
8038
|
var TransformConstraintData = class extends ConstraintData {
|
|
7953
|
-
|
|
7954
|
-
|
|
7955
|
-
|
|
7956
|
-
|
|
7957
|
-
/** The target bone whose world transform will be copied to the constrained bones. */
|
|
7958
|
-
this._target = null;
|
|
7959
|
-
this.mixRotate = 0;
|
|
7960
|
-
this.mixX = 0;
|
|
7961
|
-
this.mixY = 0;
|
|
7962
|
-
this.mixScaleX = 0;
|
|
7963
|
-
this.mixScaleY = 0;
|
|
7964
|
-
this.mixShearY = 0;
|
|
7965
|
-
/** An offset added to the constrained bone rotation. */
|
|
7966
|
-
this.offsetRotation = 0;
|
|
7967
|
-
/** An offset added to the constrained bone X translation. */
|
|
7968
|
-
this.offsetX = 0;
|
|
7969
|
-
/** An offset added to the constrained bone Y translation. */
|
|
7970
|
-
this.offsetY = 0;
|
|
7971
|
-
/** An offset added to the constrained bone scaleX. */
|
|
7972
|
-
this.offsetScaleX = 0;
|
|
7973
|
-
/** An offset added to the constrained bone scaleY. */
|
|
7974
|
-
this.offsetScaleY = 0;
|
|
7975
|
-
/** An offset added to the constrained bone shearY. */
|
|
7976
|
-
this.offsetShearY = 0;
|
|
7977
|
-
this.relative = false;
|
|
7978
|
-
this.local = false;
|
|
7979
|
-
}
|
|
8039
|
+
/** The bones that will be modified by this transform constraint. */
|
|
8040
|
+
bones = new Array();
|
|
8041
|
+
/** The target bone whose world transform will be copied to the constrained bones. */
|
|
8042
|
+
_target = null;
|
|
7980
8043
|
set target(boneData) {
|
|
7981
8044
|
this._target = boneData;
|
|
7982
8045
|
}
|
|
@@ -7986,17 +8049,41 @@ var spine = (() => {
|
|
|
7986
8049
|
else
|
|
7987
8050
|
return this._target;
|
|
7988
8051
|
}
|
|
8052
|
+
mixRotate = 0;
|
|
8053
|
+
mixX = 0;
|
|
8054
|
+
mixY = 0;
|
|
8055
|
+
mixScaleX = 0;
|
|
8056
|
+
mixScaleY = 0;
|
|
8057
|
+
mixShearY = 0;
|
|
8058
|
+
/** An offset added to the constrained bone rotation. */
|
|
8059
|
+
offsetRotation = 0;
|
|
8060
|
+
/** An offset added to the constrained bone X translation. */
|
|
8061
|
+
offsetX = 0;
|
|
8062
|
+
/** An offset added to the constrained bone Y translation. */
|
|
8063
|
+
offsetY = 0;
|
|
8064
|
+
/** An offset added to the constrained bone scaleX. */
|
|
8065
|
+
offsetScaleX = 0;
|
|
8066
|
+
/** An offset added to the constrained bone scaleY. */
|
|
8067
|
+
offsetScaleY = 0;
|
|
8068
|
+
/** An offset added to the constrained bone shearY. */
|
|
8069
|
+
offsetShearY = 0;
|
|
8070
|
+
relative = false;
|
|
8071
|
+
local = false;
|
|
8072
|
+
constructor(name) {
|
|
8073
|
+
super(name, 0, false);
|
|
8074
|
+
}
|
|
7989
8075
|
};
|
|
7990
8076
|
|
|
7991
8077
|
// spine-core/src/SkeletonBinary.ts
|
|
7992
8078
|
var SkeletonBinary = class {
|
|
8079
|
+
/** Scales bone positions, image sizes, and translations as they are loaded. This allows different size images to be used at
|
|
8080
|
+
* runtime than were used in Spine.
|
|
8081
|
+
*
|
|
8082
|
+
* See [Scaling](http://esotericsoftware.com/spine-loading-skeleton-data#Scaling) in the Spine Runtimes Guide. */
|
|
8083
|
+
scale = 1;
|
|
8084
|
+
attachmentLoader;
|
|
8085
|
+
linkedMeshes = new Array();
|
|
7993
8086
|
constructor(attachmentLoader) {
|
|
7994
|
-
/** Scales bone positions, image sizes, and translations as they are loaded. This allows different size images to be used at
|
|
7995
|
-
* runtime than were used in Spine.
|
|
7996
|
-
*
|
|
7997
|
-
* See [Scaling](http://esotericsoftware.com/spine-loading-skeleton-data#Scaling) in the Spine Runtimes Guide. */
|
|
7998
|
-
this.scale = 1;
|
|
7999
|
-
this.linkedMeshes = new Array();
|
|
8000
8087
|
this.attachmentLoader = attachmentLoader;
|
|
8001
8088
|
}
|
|
8002
8089
|
readSkeletonData(binary) {
|
|
@@ -9010,6 +9097,11 @@ var spine = (() => {
|
|
|
9010
9097
|
}
|
|
9011
9098
|
};
|
|
9012
9099
|
var LinkedMesh = class {
|
|
9100
|
+
parent;
|
|
9101
|
+
skin;
|
|
9102
|
+
slotIndex;
|
|
9103
|
+
mesh;
|
|
9104
|
+
inheritTimeline;
|
|
9013
9105
|
constructor(mesh, skin, slotIndex, parent, inheritDeform) {
|
|
9014
9106
|
this.mesh = mesh;
|
|
9015
9107
|
this.skin = skin;
|
|
@@ -9103,23 +9195,21 @@ var spine = (() => {
|
|
|
9103
9195
|
|
|
9104
9196
|
// spine-core/src/SkeletonBounds.ts
|
|
9105
9197
|
var SkeletonBounds = class {
|
|
9106
|
-
|
|
9107
|
-
|
|
9108
|
-
|
|
9109
|
-
|
|
9110
|
-
|
|
9111
|
-
|
|
9112
|
-
|
|
9113
|
-
|
|
9114
|
-
|
|
9115
|
-
|
|
9116
|
-
|
|
9117
|
-
|
|
9118
|
-
|
|
9119
|
-
|
|
9120
|
-
|
|
9121
|
-
});
|
|
9122
|
-
}
|
|
9198
|
+
/** The left edge of the axis aligned bounding box. */
|
|
9199
|
+
minX = 0;
|
|
9200
|
+
/** The bottom edge of the axis aligned bounding box. */
|
|
9201
|
+
minY = 0;
|
|
9202
|
+
/** The right edge of the axis aligned bounding box. */
|
|
9203
|
+
maxX = 0;
|
|
9204
|
+
/** The top edge of the axis aligned bounding box. */
|
|
9205
|
+
maxY = 0;
|
|
9206
|
+
/** The visible bounding boxes. */
|
|
9207
|
+
boundingBoxes = new Array();
|
|
9208
|
+
/** The world vertices for the bounding box polygons. */
|
|
9209
|
+
polygons = new Array();
|
|
9210
|
+
polygonPool = new Pool(() => {
|
|
9211
|
+
return Utils.newFloatArray(16);
|
|
9212
|
+
});
|
|
9123
9213
|
/** Clears any previous polygons, finds all visible bounding box attachments, and computes the world vertices for each bounding
|
|
9124
9214
|
* box's polygon.
|
|
9125
9215
|
* @param updateAabb If true, the axis aligned bounding box containing all the polygons is computed. If false, the
|
|
@@ -9290,19 +9380,17 @@ var spine = (() => {
|
|
|
9290
9380
|
|
|
9291
9381
|
// spine-core/src/Triangulator.ts
|
|
9292
9382
|
var Triangulator = class {
|
|
9293
|
-
|
|
9294
|
-
|
|
9295
|
-
|
|
9296
|
-
|
|
9297
|
-
|
|
9298
|
-
|
|
9299
|
-
|
|
9300
|
-
|
|
9301
|
-
|
|
9302
|
-
|
|
9303
|
-
|
|
9304
|
-
});
|
|
9305
|
-
}
|
|
9383
|
+
convexPolygons = new Array();
|
|
9384
|
+
convexPolygonsIndices = new Array();
|
|
9385
|
+
indicesArray = new Array();
|
|
9386
|
+
isConcaveArray = new Array();
|
|
9387
|
+
triangles = new Array();
|
|
9388
|
+
polygonPool = new Pool(() => {
|
|
9389
|
+
return new Array();
|
|
9390
|
+
});
|
|
9391
|
+
polygonIndicesPool = new Pool(() => {
|
|
9392
|
+
return new Array();
|
|
9393
|
+
});
|
|
9306
9394
|
triangulate(verticesArray) {
|
|
9307
9395
|
let vertices = verticesArray;
|
|
9308
9396
|
let vertexCount = verticesArray.length >> 1;
|
|
@@ -9506,16 +9594,14 @@ var spine = (() => {
|
|
|
9506
9594
|
|
|
9507
9595
|
// spine-core/src/SkeletonClipping.ts
|
|
9508
9596
|
var SkeletonClipping = class {
|
|
9509
|
-
|
|
9510
|
-
|
|
9511
|
-
|
|
9512
|
-
|
|
9513
|
-
|
|
9514
|
-
|
|
9515
|
-
|
|
9516
|
-
|
|
9517
|
-
this.clippingPolygons = null;
|
|
9518
|
-
}
|
|
9597
|
+
triangulator = new Triangulator();
|
|
9598
|
+
clippingPolygon = new Array();
|
|
9599
|
+
clipOutput = new Array();
|
|
9600
|
+
clippedVertices = new Array();
|
|
9601
|
+
clippedTriangles = new Array();
|
|
9602
|
+
scratch = new Array();
|
|
9603
|
+
clipAttachment = null;
|
|
9604
|
+
clippingPolygons = null;
|
|
9519
9605
|
clipStart(slot, clip) {
|
|
9520
9606
|
if (this.clipAttachment)
|
|
9521
9607
|
return 0;
|
|
@@ -9795,13 +9881,14 @@ var spine = (() => {
|
|
|
9795
9881
|
|
|
9796
9882
|
// spine-core/src/SkeletonJson.ts
|
|
9797
9883
|
var SkeletonJson = class {
|
|
9884
|
+
attachmentLoader;
|
|
9885
|
+
/** Scales bone positions, image sizes, and translations as they are loaded. This allows different size images to be used at
|
|
9886
|
+
* runtime than were used in Spine.
|
|
9887
|
+
*
|
|
9888
|
+
* See [Scaling](http://esotericsoftware.com/spine-loading-skeleton-data#Scaling) in the Spine Runtimes Guide. */
|
|
9889
|
+
scale = 1;
|
|
9890
|
+
linkedMeshes = new Array();
|
|
9798
9891
|
constructor(attachmentLoader) {
|
|
9799
|
-
/** Scales bone positions, image sizes, and translations as they are loaded. This allows different size images to be used at
|
|
9800
|
-
* runtime than were used in Spine.
|
|
9801
|
-
*
|
|
9802
|
-
* See [Scaling](http://esotericsoftware.com/spine-loading-skeleton-data#Scaling) in the Spine Runtimes Guide. */
|
|
9803
|
-
this.scale = 1;
|
|
9804
|
-
this.linkedMeshes = new Array();
|
|
9805
9892
|
this.attachmentLoader = attachmentLoader;
|
|
9806
9893
|
}
|
|
9807
9894
|
readSkeletonData(json) {
|
|
@@ -10663,6 +10750,11 @@ var spine = (() => {
|
|
|
10663
10750
|
}
|
|
10664
10751
|
};
|
|
10665
10752
|
var LinkedMesh2 = class {
|
|
10753
|
+
parent;
|
|
10754
|
+
skin;
|
|
10755
|
+
slotIndex;
|
|
10756
|
+
mesh;
|
|
10757
|
+
inheritTimeline;
|
|
10666
10758
|
constructor(mesh, skin, slotIndex, parent, inheritDeform) {
|
|
10667
10759
|
this.mesh = mesh;
|
|
10668
10760
|
this.skin = skin;
|
|
@@ -10749,8 +10841,10 @@ var spine = (() => {
|
|
|
10749
10841
|
|
|
10750
10842
|
// spine-webgl/src/WebGL.ts
|
|
10751
10843
|
var ManagedWebGLRenderingContext = class {
|
|
10844
|
+
canvas;
|
|
10845
|
+
gl;
|
|
10846
|
+
restorables = new Array();
|
|
10752
10847
|
constructor(canvasOrContext, contextConfig = { alpha: "true" }) {
|
|
10753
|
-
this.restorables = new Array();
|
|
10754
10848
|
if (!(canvasOrContext instanceof WebGLRenderingContext || typeof WebGL2RenderingContext !== "undefined" && canvasOrContext instanceof WebGL2RenderingContext)) {
|
|
10755
10849
|
let canvas = canvasOrContext;
|
|
10756
10850
|
this.gl = canvas.getContext("webgl2", contextConfig) || canvas.getContext("webgl", contextConfig);
|
|
@@ -10781,11 +10875,12 @@ var spine = (() => {
|
|
|
10781
10875
|
|
|
10782
10876
|
// spine-webgl/src/GLTexture.ts
|
|
10783
10877
|
var _GLTexture = class extends Texture {
|
|
10878
|
+
context;
|
|
10879
|
+
texture = null;
|
|
10880
|
+
boundUnit = 0;
|
|
10881
|
+
useMipMaps = false;
|
|
10784
10882
|
constructor(context, image, useMipMaps = false) {
|
|
10785
10883
|
super(image);
|
|
10786
|
-
this.texture = null;
|
|
10787
|
-
this.boundUnit = 0;
|
|
10788
|
-
this.useMipMaps = false;
|
|
10789
10884
|
this.context = context instanceof ManagedWebGLRenderingContext ? context : new ManagedWebGLRenderingContext(context);
|
|
10790
10885
|
this.useMipMaps = useMipMaps;
|
|
10791
10886
|
this.restore();
|
|
@@ -10867,7 +10962,7 @@ var spine = (() => {
|
|
|
10867
10962
|
}
|
|
10868
10963
|
};
|
|
10869
10964
|
var GLTexture = _GLTexture;
|
|
10870
|
-
GLTexture
|
|
10965
|
+
__publicField(GLTexture, "DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL", false);
|
|
10871
10966
|
|
|
10872
10967
|
// spine-webgl/src/AssetManager.ts
|
|
10873
10968
|
var AssetManager = class extends AssetManagerBase {
|
|
@@ -10880,10 +10975,10 @@ var spine = (() => {
|
|
|
10880
10975
|
|
|
10881
10976
|
// spine-webgl/src/Vector3.ts
|
|
10882
10977
|
var Vector3 = class {
|
|
10978
|
+
x = 0;
|
|
10979
|
+
y = 0;
|
|
10980
|
+
z = 0;
|
|
10883
10981
|
constructor(x = 0, y = 0, z = 0) {
|
|
10884
|
-
this.x = 0;
|
|
10885
|
-
this.y = 0;
|
|
10886
|
-
this.z = 0;
|
|
10887
10982
|
this.x = x;
|
|
10888
10983
|
this.y = y;
|
|
10889
10984
|
this.z = z;
|
|
@@ -10980,9 +11075,9 @@ var spine = (() => {
|
|
|
10980
11075
|
var M32 = 11;
|
|
10981
11076
|
var M33 = 15;
|
|
10982
11077
|
var _Matrix4 = class {
|
|
11078
|
+
temp = new Float32Array(16);
|
|
11079
|
+
values = new Float32Array(16);
|
|
10983
11080
|
constructor() {
|
|
10984
|
-
this.temp = new Float32Array(16);
|
|
10985
|
-
this.values = new Float32Array(16);
|
|
10986
11081
|
let v = this.values;
|
|
10987
11082
|
v[M00] = 1;
|
|
10988
11083
|
v[M11] = 1;
|
|
@@ -11213,26 +11308,26 @@ var spine = (() => {
|
|
|
11213
11308
|
}
|
|
11214
11309
|
};
|
|
11215
11310
|
var Matrix42 = _Matrix4;
|
|
11216
|
-
Matrix42
|
|
11217
|
-
Matrix42
|
|
11218
|
-
Matrix42
|
|
11219
|
-
Matrix42
|
|
11311
|
+
__publicField(Matrix42, "xAxis", new Vector3());
|
|
11312
|
+
__publicField(Matrix42, "yAxis", new Vector3());
|
|
11313
|
+
__publicField(Matrix42, "zAxis", new Vector3());
|
|
11314
|
+
__publicField(Matrix42, "tmpMatrix", new _Matrix4());
|
|
11220
11315
|
|
|
11221
11316
|
// spine-webgl/src/Camera.ts
|
|
11222
11317
|
var OrthoCamera = class {
|
|
11318
|
+
position = new Vector3(0, 0, 0);
|
|
11319
|
+
direction = new Vector3(0, 0, -1);
|
|
11320
|
+
up = new Vector3(0, 1, 0);
|
|
11321
|
+
near = 0;
|
|
11322
|
+
far = 100;
|
|
11323
|
+
zoom = 1;
|
|
11324
|
+
viewportWidth = 0;
|
|
11325
|
+
viewportHeight = 0;
|
|
11326
|
+
projectionView = new Matrix42();
|
|
11327
|
+
inverseProjectionView = new Matrix42();
|
|
11328
|
+
projection = new Matrix42();
|
|
11329
|
+
view = new Matrix42();
|
|
11223
11330
|
constructor(viewportWidth, viewportHeight) {
|
|
11224
|
-
this.position = new Vector3(0, 0, 0);
|
|
11225
|
-
this.direction = new Vector3(0, 0, -1);
|
|
11226
|
-
this.up = new Vector3(0, 1, 0);
|
|
11227
|
-
this.near = 0;
|
|
11228
|
-
this.far = 100;
|
|
11229
|
-
this.zoom = 1;
|
|
11230
|
-
this.viewportWidth = 0;
|
|
11231
|
-
this.viewportHeight = 0;
|
|
11232
|
-
this.projectionView = new Matrix42();
|
|
11233
|
-
this.inverseProjectionView = new Matrix42();
|
|
11234
|
-
this.projection = new Matrix42();
|
|
11235
|
-
this.view = new Matrix42();
|
|
11236
11331
|
this.viewportWidth = viewportWidth;
|
|
11237
11332
|
this.viewportHeight = viewportHeight;
|
|
11238
11333
|
this.update();
|
|
@@ -11279,15 +11374,16 @@ var spine = (() => {
|
|
|
11279
11374
|
|
|
11280
11375
|
// spine-webgl/src/Input.ts
|
|
11281
11376
|
var Input = class {
|
|
11377
|
+
element;
|
|
11378
|
+
mouseX = 0;
|
|
11379
|
+
mouseY = 0;
|
|
11380
|
+
buttonDown = false;
|
|
11381
|
+
touch0 = null;
|
|
11382
|
+
touch1 = null;
|
|
11383
|
+
initialPinchDistance = 0;
|
|
11384
|
+
listeners = new Array();
|
|
11385
|
+
eventListeners = [];
|
|
11282
11386
|
constructor(element) {
|
|
11283
|
-
this.mouseX = 0;
|
|
11284
|
-
this.mouseY = 0;
|
|
11285
|
-
this.buttonDown = false;
|
|
11286
|
-
this.touch0 = null;
|
|
11287
|
-
this.touch1 = null;
|
|
11288
|
-
this.initialPinchDistance = 0;
|
|
11289
|
-
this.listeners = new Array();
|
|
11290
|
-
this.eventListeners = [];
|
|
11291
11387
|
this.element = element;
|
|
11292
11388
|
this.setupCallbacks(element);
|
|
11293
11389
|
}
|
|
@@ -11550,18 +11646,21 @@ var spine = (() => {
|
|
|
11550
11646
|
constructor(context, vertexShader, fragmentShader) {
|
|
11551
11647
|
this.vertexShader = vertexShader;
|
|
11552
11648
|
this.fragmentShader = fragmentShader;
|
|
11553
|
-
this.vs = null;
|
|
11554
|
-
this.fs = null;
|
|
11555
|
-
this.program = null;
|
|
11556
|
-
this.tmp2x2 = new Float32Array(2 * 2);
|
|
11557
|
-
this.tmp3x3 = new Float32Array(3 * 3);
|
|
11558
|
-
this.tmp4x4 = new Float32Array(4 * 4);
|
|
11559
11649
|
this.vsSource = vertexShader;
|
|
11560
11650
|
this.fsSource = fragmentShader;
|
|
11561
11651
|
this.context = context instanceof ManagedWebGLRenderingContext ? context : new ManagedWebGLRenderingContext(context);
|
|
11562
11652
|
this.context.addRestorable(this);
|
|
11563
11653
|
this.compile();
|
|
11564
11654
|
}
|
|
11655
|
+
context;
|
|
11656
|
+
vs = null;
|
|
11657
|
+
vsSource;
|
|
11658
|
+
fs = null;
|
|
11659
|
+
fsSource;
|
|
11660
|
+
program = null;
|
|
11661
|
+
tmp2x2 = new Float32Array(2 * 2);
|
|
11662
|
+
tmp3x3 = new Float32Array(3 * 3);
|
|
11663
|
+
tmp4x4 = new Float32Array(4 * 4);
|
|
11565
11664
|
getProgram() {
|
|
11566
11665
|
return this.program;
|
|
11567
11666
|
}
|
|
@@ -11795,24 +11894,17 @@ void main () {
|
|
|
11795
11894
|
}
|
|
11796
11895
|
};
|
|
11797
11896
|
var Shader = _Shader;
|
|
11798
|
-
Shader
|
|
11799
|
-
Shader
|
|
11800
|
-
Shader
|
|
11801
|
-
Shader
|
|
11802
|
-
Shader
|
|
11803
|
-
Shader
|
|
11897
|
+
__publicField(Shader, "MVP_MATRIX", "u_projTrans");
|
|
11898
|
+
__publicField(Shader, "POSITION", "a_position");
|
|
11899
|
+
__publicField(Shader, "COLOR", "a_color");
|
|
11900
|
+
__publicField(Shader, "COLOR2", "a_color2");
|
|
11901
|
+
__publicField(Shader, "TEXCOORDS", "a_texCoords");
|
|
11902
|
+
__publicField(Shader, "SAMPLER", "u_texture");
|
|
11804
11903
|
|
|
11805
11904
|
// spine-webgl/src/Mesh.ts
|
|
11806
11905
|
var Mesh = class {
|
|
11807
11906
|
constructor(context, attributes, maxVertices, maxIndices) {
|
|
11808
11907
|
this.attributes = attributes;
|
|
11809
|
-
this.verticesBuffer = null;
|
|
11810
|
-
this.verticesLength = 0;
|
|
11811
|
-
this.dirtyVertices = false;
|
|
11812
|
-
this.indicesBuffer = null;
|
|
11813
|
-
this.indicesLength = 0;
|
|
11814
|
-
this.dirtyIndices = false;
|
|
11815
|
-
this.elementsPerVertex = 0;
|
|
11816
11908
|
this.context = context instanceof ManagedWebGLRenderingContext ? context : new ManagedWebGLRenderingContext(context);
|
|
11817
11909
|
this.elementsPerVertex = 0;
|
|
11818
11910
|
for (let i = 0; i < attributes.length; i++) {
|
|
@@ -11822,6 +11914,16 @@ void main () {
|
|
|
11822
11914
|
this.indices = new Uint16Array(maxIndices);
|
|
11823
11915
|
this.context.addRestorable(this);
|
|
11824
11916
|
}
|
|
11917
|
+
context;
|
|
11918
|
+
vertices;
|
|
11919
|
+
verticesBuffer = null;
|
|
11920
|
+
verticesLength = 0;
|
|
11921
|
+
dirtyVertices = false;
|
|
11922
|
+
indices;
|
|
11923
|
+
indicesBuffer = null;
|
|
11924
|
+
indicesLength = 0;
|
|
11925
|
+
dirtyIndices = false;
|
|
11926
|
+
elementsPerVertex = 0;
|
|
11825
11927
|
getAttributes() {
|
|
11826
11928
|
return this.attributes;
|
|
11827
11929
|
}
|
|
@@ -11988,14 +12090,19 @@ void main () {
|
|
|
11988
12090
|
var GL_ONE_MINUS_SRC_ALPHA = 771;
|
|
11989
12091
|
var GL_DST_COLOR = 774;
|
|
11990
12092
|
var _PolygonBatcher = class {
|
|
12093
|
+
context;
|
|
12094
|
+
drawCalls = 0;
|
|
12095
|
+
isDrawing = false;
|
|
12096
|
+
mesh;
|
|
12097
|
+
shader = null;
|
|
12098
|
+
lastTexture = null;
|
|
12099
|
+
verticesLength = 0;
|
|
12100
|
+
indicesLength = 0;
|
|
12101
|
+
srcColorBlend;
|
|
12102
|
+
srcAlphaBlend;
|
|
12103
|
+
dstBlend;
|
|
12104
|
+
cullWasEnabled = false;
|
|
11991
12105
|
constructor(context, twoColorTint = true, maxVertices = 10920) {
|
|
11992
|
-
this.drawCalls = 0;
|
|
11993
|
-
this.isDrawing = false;
|
|
11994
|
-
this.shader = null;
|
|
11995
|
-
this.lastTexture = null;
|
|
11996
|
-
this.verticesLength = 0;
|
|
11997
|
-
this.indicesLength = 0;
|
|
11998
|
-
this.cullWasEnabled = false;
|
|
11999
12106
|
if (maxVertices > 10920)
|
|
12000
12107
|
throw new Error("Can't have more than 10920 triangles per batch: " + maxVertices);
|
|
12001
12108
|
this.context = context instanceof ManagedWebGLRenderingContext ? context : new ManagedWebGLRenderingContext(context);
|
|
@@ -12099,24 +12206,29 @@ void main () {
|
|
|
12099
12206
|
}
|
|
12100
12207
|
};
|
|
12101
12208
|
var PolygonBatcher = _PolygonBatcher;
|
|
12102
|
-
PolygonBatcher
|
|
12103
|
-
PolygonBatcher
|
|
12104
|
-
PolygonBatcher
|
|
12209
|
+
__publicField(PolygonBatcher, "disableCulling", false);
|
|
12210
|
+
__publicField(PolygonBatcher, "globalDrawCalls", 0);
|
|
12211
|
+
__publicField(PolygonBatcher, "blendModesGL", [
|
|
12105
12212
|
{ srcRgb: GL_SRC_ALPHA, srcRgbPma: GL_ONE, dstRgb: GL_ONE_MINUS_SRC_ALPHA, srcAlpha: GL_ONE },
|
|
12106
12213
|
{ srcRgb: GL_SRC_ALPHA, srcRgbPma: GL_ONE, dstRgb: GL_ONE, srcAlpha: GL_ONE },
|
|
12107
12214
|
{ srcRgb: GL_DST_COLOR, srcRgbPma: GL_DST_COLOR, dstRgb: GL_ONE_MINUS_SRC_ALPHA, srcAlpha: GL_ONE },
|
|
12108
12215
|
{ srcRgb: GL_ONE, srcRgbPma: GL_ONE, dstRgb: GL_ONE_MINUS_SRC_COLOR, srcAlpha: GL_ONE }
|
|
12109
|
-
];
|
|
12216
|
+
]);
|
|
12110
12217
|
|
|
12111
12218
|
// spine-webgl/src/ShapeRenderer.ts
|
|
12112
12219
|
var ShapeRenderer = class {
|
|
12220
|
+
context;
|
|
12221
|
+
isDrawing = false;
|
|
12222
|
+
mesh;
|
|
12223
|
+
shapeType = ShapeType.Filled;
|
|
12224
|
+
color = new Color(1, 1, 1, 1);
|
|
12225
|
+
shader = null;
|
|
12226
|
+
vertexIndex = 0;
|
|
12227
|
+
tmp = new Vector2();
|
|
12228
|
+
srcColorBlend;
|
|
12229
|
+
srcAlphaBlend;
|
|
12230
|
+
dstBlend;
|
|
12113
12231
|
constructor(context, maxVertices = 10920) {
|
|
12114
|
-
this.isDrawing = false;
|
|
12115
|
-
this.shapeType = ShapeType.Filled;
|
|
12116
|
-
this.color = new Color(1, 1, 1, 1);
|
|
12117
|
-
this.shader = null;
|
|
12118
|
-
this.vertexIndex = 0;
|
|
12119
|
-
this.tmp = new Vector2();
|
|
12120
12232
|
if (maxVertices > 10920)
|
|
12121
12233
|
throw new Error("Can't have more than 10920 triangles per batch: " + maxVertices);
|
|
12122
12234
|
this.context = context instanceof ManagedWebGLRenderingContext ? context : new ManagedWebGLRenderingContext(context);
|
|
@@ -12413,28 +12525,29 @@ void main () {
|
|
|
12413
12525
|
|
|
12414
12526
|
// spine-webgl/src/SkeletonDebugRenderer.ts
|
|
12415
12527
|
var _SkeletonDebugRenderer = class {
|
|
12528
|
+
boneLineColor = new Color(1, 0, 0, 1);
|
|
12529
|
+
boneOriginColor = new Color(0, 1, 0, 1);
|
|
12530
|
+
attachmentLineColor = new Color(0, 0, 1, 0.5);
|
|
12531
|
+
triangleLineColor = new Color(1, 0.64, 0, 0.5);
|
|
12532
|
+
pathColor = new Color().setFromString("FF7F00");
|
|
12533
|
+
clipColor = new Color(0.8, 0, 0, 2);
|
|
12534
|
+
aabbColor = new Color(0, 1, 0, 0.5);
|
|
12535
|
+
drawBones = true;
|
|
12536
|
+
drawRegionAttachments = true;
|
|
12537
|
+
drawBoundingBoxes = true;
|
|
12538
|
+
drawMeshHull = true;
|
|
12539
|
+
drawMeshTriangles = true;
|
|
12540
|
+
drawPaths = true;
|
|
12541
|
+
drawSkeletonXY = false;
|
|
12542
|
+
drawClipping = true;
|
|
12543
|
+
premultipliedAlpha = false;
|
|
12544
|
+
scale = 1;
|
|
12545
|
+
boneWidth = 2;
|
|
12546
|
+
context;
|
|
12547
|
+
bounds = new SkeletonBounds();
|
|
12548
|
+
temp = new Array();
|
|
12549
|
+
vertices = Utils.newFloatArray(2 * 1024);
|
|
12416
12550
|
constructor(context) {
|
|
12417
|
-
this.boneLineColor = new Color(1, 0, 0, 1);
|
|
12418
|
-
this.boneOriginColor = new Color(0, 1, 0, 1);
|
|
12419
|
-
this.attachmentLineColor = new Color(0, 0, 1, 0.5);
|
|
12420
|
-
this.triangleLineColor = new Color(1, 0.64, 0, 0.5);
|
|
12421
|
-
this.pathColor = new Color().setFromString("FF7F00");
|
|
12422
|
-
this.clipColor = new Color(0.8, 0, 0, 2);
|
|
12423
|
-
this.aabbColor = new Color(0, 1, 0, 0.5);
|
|
12424
|
-
this.drawBones = true;
|
|
12425
|
-
this.drawRegionAttachments = true;
|
|
12426
|
-
this.drawBoundingBoxes = true;
|
|
12427
|
-
this.drawMeshHull = true;
|
|
12428
|
-
this.drawMeshTriangles = true;
|
|
12429
|
-
this.drawPaths = true;
|
|
12430
|
-
this.drawSkeletonXY = false;
|
|
12431
|
-
this.drawClipping = true;
|
|
12432
|
-
this.premultipliedAlpha = false;
|
|
12433
|
-
this.scale = 1;
|
|
12434
|
-
this.boneWidth = 2;
|
|
12435
|
-
this.bounds = new SkeletonBounds();
|
|
12436
|
-
this.temp = new Array();
|
|
12437
|
-
this.vertices = Utils.newFloatArray(2 * 1024);
|
|
12438
12551
|
this.context = context instanceof ManagedWebGLRenderingContext ? context : new ManagedWebGLRenderingContext(context);
|
|
12439
12552
|
}
|
|
12440
12553
|
draw(shapes, skeleton, ignoredBones) {
|
|
@@ -12611,8 +12724,8 @@ void main () {
|
|
|
12611
12724
|
}
|
|
12612
12725
|
};
|
|
12613
12726
|
var SkeletonDebugRenderer = _SkeletonDebugRenderer;
|
|
12614
|
-
SkeletonDebugRenderer
|
|
12615
|
-
SkeletonDebugRenderer
|
|
12727
|
+
__publicField(SkeletonDebugRenderer, "LIGHT_GRAY", new Color(192 / 255, 192 / 255, 192 / 255, 1));
|
|
12728
|
+
__publicField(SkeletonDebugRenderer, "GREEN", new Color(0, 1, 0, 1));
|
|
12616
12729
|
|
|
12617
12730
|
// spine-webgl/src/SkeletonRenderer.ts
|
|
12618
12731
|
var Renderable = class {
|
|
@@ -12623,18 +12736,19 @@ void main () {
|
|
|
12623
12736
|
}
|
|
12624
12737
|
};
|
|
12625
12738
|
var _SkeletonRenderer = class {
|
|
12739
|
+
premultipliedAlpha = false;
|
|
12740
|
+
tempColor = new Color();
|
|
12741
|
+
tempColor2 = new Color();
|
|
12742
|
+
vertices;
|
|
12743
|
+
vertexSize = 2 + 2 + 4;
|
|
12744
|
+
twoColorTint = false;
|
|
12745
|
+
renderable = new Renderable([], 0, 0);
|
|
12746
|
+
clipper = new SkeletonClipping();
|
|
12747
|
+
temp = new Vector2();
|
|
12748
|
+
temp2 = new Vector2();
|
|
12749
|
+
temp3 = new Color();
|
|
12750
|
+
temp4 = new Color();
|
|
12626
12751
|
constructor(context, twoColorTint = true) {
|
|
12627
|
-
this.premultipliedAlpha = false;
|
|
12628
|
-
this.tempColor = new Color();
|
|
12629
|
-
this.tempColor2 = new Color();
|
|
12630
|
-
this.vertexSize = 2 + 2 + 4;
|
|
12631
|
-
this.twoColorTint = false;
|
|
12632
|
-
this.renderable = new Renderable([], 0, 0);
|
|
12633
|
-
this.clipper = new SkeletonClipping();
|
|
12634
|
-
this.temp = new Vector2();
|
|
12635
|
-
this.temp2 = new Vector2();
|
|
12636
|
-
this.temp3 = new Color();
|
|
12637
|
-
this.temp4 = new Color();
|
|
12638
12752
|
this.twoColorTint = twoColorTint;
|
|
12639
12753
|
if (twoColorTint)
|
|
12640
12754
|
this.vertexSize += 4;
|
|
@@ -12779,7 +12893,7 @@ void main () {
|
|
|
12779
12893
|
}
|
|
12780
12894
|
};
|
|
12781
12895
|
var SkeletonRenderer = _SkeletonRenderer;
|
|
12782
|
-
SkeletonRenderer
|
|
12896
|
+
__publicField(SkeletonRenderer, "QUAD_TRIANGLES", [0, 1, 2, 2, 3, 0]);
|
|
12783
12897
|
|
|
12784
12898
|
// spine-webgl/src/SceneRenderer.ts
|
|
12785
12899
|
var quad = [
|
|
@@ -12819,9 +12933,18 @@ void main () {
|
|
|
12819
12933
|
var QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];
|
|
12820
12934
|
var WHITE = new Color(1, 1, 1, 1);
|
|
12821
12935
|
var SceneRenderer = class {
|
|
12936
|
+
context;
|
|
12937
|
+
canvas;
|
|
12938
|
+
camera;
|
|
12939
|
+
batcher;
|
|
12940
|
+
twoColorTint = false;
|
|
12941
|
+
batcherShader;
|
|
12942
|
+
shapes;
|
|
12943
|
+
shapesShader;
|
|
12944
|
+
activeRenderer = null;
|
|
12945
|
+
skeletonRenderer;
|
|
12946
|
+
skeletonDebugRenderer;
|
|
12822
12947
|
constructor(canvas, context, twoColorTint = true) {
|
|
12823
|
-
this.twoColorTint = false;
|
|
12824
|
-
this.activeRenderer = null;
|
|
12825
12948
|
this.canvas = canvas;
|
|
12826
12949
|
this.context = context instanceof ManagedWebGLRenderingContext ? context : new ManagedWebGLRenderingContext(context);
|
|
12827
12950
|
this.twoColorTint = twoColorTint;
|
|
@@ -13254,15 +13377,16 @@ void main () {
|
|
|
13254
13377
|
var logoHeight = 108;
|
|
13255
13378
|
var spinnerSize = 163;
|
|
13256
13379
|
var LoadingScreen = class {
|
|
13380
|
+
renderer;
|
|
13381
|
+
logo = null;
|
|
13382
|
+
spinner = null;
|
|
13383
|
+
angle = 0;
|
|
13384
|
+
fadeOut = 0;
|
|
13385
|
+
fadeIn = 0;
|
|
13386
|
+
timeKeeper = new TimeKeeper();
|
|
13387
|
+
backgroundColor = new Color(0.135, 0.135, 0.135, 1);
|
|
13388
|
+
tempColor = new Color();
|
|
13257
13389
|
constructor(renderer) {
|
|
13258
|
-
this.logo = null;
|
|
13259
|
-
this.spinner = null;
|
|
13260
|
-
this.angle = 0;
|
|
13261
|
-
this.fadeOut = 0;
|
|
13262
|
-
this.fadeIn = 0;
|
|
13263
|
-
this.timeKeeper = new TimeKeeper();
|
|
13264
|
-
this.backgroundColor = new Color(0.135, 0.135, 0.135, 1);
|
|
13265
|
-
this.tempColor = new Color();
|
|
13266
13390
|
this.renderer = renderer;
|
|
13267
13391
|
this.timeKeeper.maxDelta = 9;
|
|
13268
13392
|
if (!logoImage) {
|
|
@@ -13281,9 +13405,8 @@ void main () {
|
|
|
13281
13405
|
}
|
|
13282
13406
|
}
|
|
13283
13407
|
dispose() {
|
|
13284
|
-
|
|
13285
|
-
|
|
13286
|
-
(_b = this.spinner) == null ? void 0 : _b.dispose();
|
|
13408
|
+
this.logo?.dispose();
|
|
13409
|
+
this.spinner?.dispose();
|
|
13287
13410
|
}
|
|
13288
13411
|
draw(complete = false) {
|
|
13289
13412
|
if (loaded < 2 || complete && this.fadeOut > FADE_OUT)
|
|
@@ -13356,9 +13479,6 @@ void main () {
|
|
|
13356
13479
|
/** Constructs a new spine canvas, rendering to the provided HTML canvas. */
|
|
13357
13480
|
constructor(canvas, config) {
|
|
13358
13481
|
this.config = config;
|
|
13359
|
-
/** Tracks the current time, delta, and other time related statistics. */
|
|
13360
|
-
this.time = new TimeKeeper();
|
|
13361
|
-
this.disposed = false;
|
|
13362
13482
|
if (!config.pathPrefix)
|
|
13363
13483
|
config.pathPrefix = "";
|
|
13364
13484
|
if (!config.app)
|
|
@@ -13414,6 +13534,20 @@ void main () {
|
|
|
13414
13534
|
};
|
|
13415
13535
|
requestAnimationFrame(waitForAssets);
|
|
13416
13536
|
}
|
|
13537
|
+
context;
|
|
13538
|
+
/** Tracks the current time, delta, and other time related statistics. */
|
|
13539
|
+
time = new TimeKeeper();
|
|
13540
|
+
/** The HTML canvas to render to. */
|
|
13541
|
+
htmlCanvas;
|
|
13542
|
+
/** The WebGL rendering context. */
|
|
13543
|
+
gl;
|
|
13544
|
+
/** The scene renderer for easy drawing of skeletons, shapes, and images. */
|
|
13545
|
+
renderer;
|
|
13546
|
+
/** The asset manager to load assets with. */
|
|
13547
|
+
assetManager;
|
|
13548
|
+
/** The input processor used to listen to mouse, touch, and keyboard events. */
|
|
13549
|
+
input;
|
|
13550
|
+
disposed = false;
|
|
13417
13551
|
/** Clears the canvas with the given color. The color values are given in the range [0,1]. */
|
|
13418
13552
|
clear(r, g, b, a) {
|
|
13419
13553
|
this.gl.clearColor(r, g, b, a);
|