@eva/plugin-renderer-spine 2.0.0-beta.8 → 2.0.0
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.
|
@@ -1,14 +1,50 @@
|
|
|
1
|
-
import { ExtensionType, checkExtension, Resolver, LoaderParserPriority,
|
|
1
|
+
import { ExtensionType, checkExtension, Resolver, LoaderParserPriority, extensions, collectAllRenderables, Graphics, ViewContainer, Ticker, fastCopy, Texture as Texture$1, DEG_TO_RAD, Container, Cache, Assets, Text, DOMAdapter, path, TextureSource, Batcher, Color as Color$1, Geometry, Buffer, BufferUsage, Shader, compileHighShaderGlProgram, colorBitGl, generateTextureBatchBitGl, roundPixelsBitGl, compileHighShaderGpuProgram, colorBit, generateTextureBatchBit, roundPixelsBit, getBatchSamplersUniformGroup } from 'pixi.js';
|
|
2
2
|
import { SpineSystem as SpineSystem$1, Spine as Spine$2 } from '@eva/spine-base';
|
|
3
3
|
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
|
+
var __defProps = Object.defineProperties;
|
|
6
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
7
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
10
|
var __defNormalProp = (obj, key, value) =>
|
|
6
11
|
key in obj
|
|
7
|
-
? __defProp(obj, key, {
|
|
12
|
+
? __defProp(obj, key, {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
configurable: true,
|
|
15
|
+
writable: true,
|
|
16
|
+
value,
|
|
17
|
+
})
|
|
8
18
|
: (obj[key] = value);
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
|
|
19
|
+
var __spreadValues = (a, b) => {
|
|
20
|
+
if (!b) b = {};
|
|
21
|
+
for (var prop in b) if (__hasOwnProp.call(b, prop)) __defNormalProp(a, prop, b[prop]);
|
|
22
|
+
if (__getOwnPropSymbols)
|
|
23
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
24
|
+
if (__propIsEnum.call(b, prop)) __defNormalProp(a, prop, b[prop]);
|
|
25
|
+
}
|
|
26
|
+
return a;
|
|
27
|
+
};
|
|
28
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
29
|
+
var __async = (__this, __arguments, generator) => {
|
|
30
|
+
return new Promise((resolve, reject) => {
|
|
31
|
+
var fulfilled = value => {
|
|
32
|
+
try {
|
|
33
|
+
step(generator.next(value));
|
|
34
|
+
} catch (e) {
|
|
35
|
+
reject(e);
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
var rejected = value => {
|
|
39
|
+
try {
|
|
40
|
+
step(generator.throw(value));
|
|
41
|
+
} catch (e) {
|
|
42
|
+
reject(e);
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
var step = x => (x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected));
|
|
46
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
47
|
+
});
|
|
12
48
|
};
|
|
13
49
|
|
|
14
50
|
// spine-pixi-v8/src/require-shim.ts
|
|
@@ -22,7 +58,9 @@ if (typeof window !== 'undefined' && window.PIXI) {
|
|
|
22
58
|
|
|
23
59
|
// spine-core/src/Utils.ts
|
|
24
60
|
var IntSet = class {
|
|
25
|
-
|
|
61
|
+
constructor() {
|
|
62
|
+
this.array = new Array();
|
|
63
|
+
}
|
|
26
64
|
add(value) {
|
|
27
65
|
let contains = this.contains(value);
|
|
28
66
|
this.array[value | 0] = value | 0;
|
|
@@ -39,8 +77,10 @@ var IntSet = class {
|
|
|
39
77
|
}
|
|
40
78
|
};
|
|
41
79
|
var StringSet = class {
|
|
42
|
-
|
|
43
|
-
|
|
80
|
+
constructor() {
|
|
81
|
+
this.entries = {};
|
|
82
|
+
this.size = 0;
|
|
83
|
+
}
|
|
44
84
|
add(value) {
|
|
45
85
|
let contains = this.entries[value];
|
|
46
86
|
this.entries[value] = true;
|
|
@@ -130,11 +170,11 @@ var _Color = class {
|
|
|
130
170
|
}
|
|
131
171
|
};
|
|
132
172
|
var Color = _Color;
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
173
|
+
Color.WHITE = new _Color(1, 1, 1, 1);
|
|
174
|
+
Color.RED = new _Color(1, 0, 0, 1);
|
|
175
|
+
Color.GREEN = new _Color(0, 1, 0, 1);
|
|
176
|
+
Color.BLUE = new _Color(0, 0, 1, 1);
|
|
177
|
+
Color.MAGENTA = new _Color(1, 0, 1, 1);
|
|
138
178
|
var _MathUtils = class {
|
|
139
179
|
static clamp(value, min, max) {
|
|
140
180
|
if (value < min) return min;
|
|
@@ -174,22 +214,22 @@ var _MathUtils = class {
|
|
|
174
214
|
}
|
|
175
215
|
};
|
|
176
216
|
var MathUtils = _MathUtils;
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
217
|
+
MathUtils.PI = 3.1415927;
|
|
218
|
+
MathUtils.PI2 = _MathUtils.PI * 2;
|
|
219
|
+
MathUtils.invPI2 = 1 / _MathUtils.PI2;
|
|
220
|
+
MathUtils.radiansToDegrees = 180 / _MathUtils.PI;
|
|
221
|
+
MathUtils.radDeg = _MathUtils.radiansToDegrees;
|
|
222
|
+
MathUtils.degreesToRadians = _MathUtils.PI / 180;
|
|
223
|
+
MathUtils.degRad = _MathUtils.degreesToRadians;
|
|
184
224
|
var Interpolation = class {
|
|
185
225
|
apply(start, end, a) {
|
|
186
226
|
return start + (end - start) * this.applyInternal(a);
|
|
187
227
|
}
|
|
188
228
|
};
|
|
189
229
|
var Pow = class extends Interpolation {
|
|
190
|
-
power = 2;
|
|
191
230
|
constructor(power) {
|
|
192
231
|
super();
|
|
232
|
+
this.power = 2;
|
|
193
233
|
this.power = power;
|
|
194
234
|
}
|
|
195
235
|
applyInternal(a) {
|
|
@@ -265,7 +305,7 @@ var _Utils = class {
|
|
|
265
305
|
}
|
|
266
306
|
};
|
|
267
307
|
var Utils = _Utils;
|
|
268
|
-
|
|
308
|
+
Utils.SUPPORTS_TYPED_ARRAYS = typeof Float32Array !== 'undefined';
|
|
269
309
|
var DebugUtils = class {
|
|
270
310
|
static logBones(skeleton) {
|
|
271
311
|
for (let i = 0; i < skeleton.bones.length; i++) {
|
|
@@ -289,9 +329,8 @@ var DebugUtils = class {
|
|
|
289
329
|
}
|
|
290
330
|
};
|
|
291
331
|
var Pool = class {
|
|
292
|
-
items = new Array();
|
|
293
|
-
instantiator;
|
|
294
332
|
constructor(instantiator) {
|
|
333
|
+
this.items = new Array();
|
|
295
334
|
this.instantiator = instantiator;
|
|
296
335
|
}
|
|
297
336
|
obtain() {
|
|
@@ -333,13 +372,15 @@ var Vector2 = class {
|
|
|
333
372
|
}
|
|
334
373
|
};
|
|
335
374
|
var TimeKeeper = class {
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
375
|
+
constructor() {
|
|
376
|
+
this.maxDelta = 0.064;
|
|
377
|
+
this.framesPerSecond = 0;
|
|
378
|
+
this.delta = 0;
|
|
379
|
+
this.totalTime = 0;
|
|
380
|
+
this.lastTime = Date.now() / 1e3;
|
|
381
|
+
this.frameCount = 0;
|
|
382
|
+
this.frameTime = 0;
|
|
383
|
+
}
|
|
343
384
|
update() {
|
|
344
385
|
let now = Date.now() / 1e3;
|
|
345
386
|
this.delta = now - this.lastTime;
|
|
@@ -356,12 +397,11 @@ var TimeKeeper = class {
|
|
|
356
397
|
}
|
|
357
398
|
};
|
|
358
399
|
var WindowedMean = class {
|
|
359
|
-
values;
|
|
360
|
-
addedValues = 0;
|
|
361
|
-
lastValue = 0;
|
|
362
|
-
mean = 0;
|
|
363
|
-
dirty = true;
|
|
364
400
|
constructor(windowSize = 32) {
|
|
401
|
+
this.addedValues = 0;
|
|
402
|
+
this.lastValue = 0;
|
|
403
|
+
this.mean = 0;
|
|
404
|
+
this.dirty = true;
|
|
365
405
|
this.values = new Array(windowSize);
|
|
366
406
|
}
|
|
367
407
|
hasEnoughData() {
|
|
@@ -389,31 +429,30 @@ var WindowedMean = class {
|
|
|
389
429
|
|
|
390
430
|
// spine-core/src/attachments/Attachment.ts
|
|
391
431
|
var Attachment = class {
|
|
392
|
-
name;
|
|
393
432
|
constructor(name) {
|
|
394
433
|
if (!name) throw new Error('name cannot be null.');
|
|
395
434
|
this.name = name;
|
|
396
435
|
}
|
|
397
436
|
};
|
|
398
437
|
var _VertexAttachment = class extends Attachment {
|
|
399
|
-
/** The unique ID for this attachment. */
|
|
400
|
-
id = _VertexAttachment.nextID++;
|
|
401
|
-
/** The bones which affect the {@link #getVertices()}. The array entries are, for each vertex, the number of bones affecting
|
|
402
|
-
* the vertex followed by that many bone indices, which is the index of the bone in {@link Skeleton#bones}. Will be null
|
|
403
|
-
* if this attachment has no weights. */
|
|
404
|
-
bones = null;
|
|
405
|
-
/** The vertex positions in the bone's coordinate system. For a non-weighted attachment, the values are `x,y`
|
|
406
|
-
* entries for each vertex. For a weighted attachment, the values are `x,y,weight` entries for each bone affecting
|
|
407
|
-
* each vertex. */
|
|
408
|
-
vertices = [];
|
|
409
|
-
/** The maximum number of world vertex values that can be output by
|
|
410
|
-
* {@link #computeWorldVertices()} using the `count` parameter. */
|
|
411
|
-
worldVerticesLength = 0;
|
|
412
|
-
/** Timelines for the timeline attachment are also applied to this attachment.
|
|
413
|
-
* May be null if no attachment-specific timelines should be applied. */
|
|
414
|
-
timelineAttachment = this;
|
|
415
438
|
constructor(name) {
|
|
416
439
|
super(name);
|
|
440
|
+
/** The unique ID for this attachment. */
|
|
441
|
+
this.id = _VertexAttachment.nextID++;
|
|
442
|
+
/** The bones which affect the {@link #getVertices()}. The array entries are, for each vertex, the number of bones affecting
|
|
443
|
+
* the vertex followed by that many bone indices, which is the index of the bone in {@link Skeleton#bones}. Will be null
|
|
444
|
+
* if this attachment has no weights. */
|
|
445
|
+
this.bones = null;
|
|
446
|
+
/** The vertex positions in the bone's coordinate system. For a non-weighted attachment, the values are `x,y`
|
|
447
|
+
* entries for each vertex. For a weighted attachment, the values are `x,y,weight` entries for each bone affecting
|
|
448
|
+
* each vertex. */
|
|
449
|
+
this.vertices = [];
|
|
450
|
+
/** The maximum number of world vertex values that can be output by
|
|
451
|
+
* {@link #computeWorldVertices()} using the `count` parameter. */
|
|
452
|
+
this.worldVerticesLength = 0;
|
|
453
|
+
/** Timelines for the timeline attachment are also applied to this attachment.
|
|
454
|
+
* May be null if no attachment-specific timelines should be applied. */
|
|
455
|
+
this.timelineAttachment = this;
|
|
417
456
|
}
|
|
418
457
|
/** Transforms the attachment's local {@link #vertices} to world coordinates. If the slot's {@link Slot#deform} is
|
|
419
458
|
* not empty, it is used to deform the vertices.
|
|
@@ -509,17 +548,16 @@ var _VertexAttachment = class extends Attachment {
|
|
|
509
548
|
}
|
|
510
549
|
};
|
|
511
550
|
var VertexAttachment = _VertexAttachment;
|
|
512
|
-
|
|
551
|
+
VertexAttachment.nextID = 0;
|
|
513
552
|
|
|
514
553
|
// spine-core/src/attachments/Sequence.ts
|
|
515
554
|
var _Sequence = class {
|
|
516
|
-
id = _Sequence.nextID();
|
|
517
|
-
regions;
|
|
518
|
-
start = 0;
|
|
519
|
-
digits = 0;
|
|
520
|
-
/** The index of the region to show for the setup pose. */
|
|
521
|
-
setupIndex = 0;
|
|
522
555
|
constructor(count) {
|
|
556
|
+
this.id = _Sequence.nextID();
|
|
557
|
+
this.start = 0;
|
|
558
|
+
this.digits = 0;
|
|
559
|
+
/** The index of the region to show for the setup pose. */
|
|
560
|
+
this.setupIndex = 0;
|
|
523
561
|
this.regions = new Array(count);
|
|
524
562
|
}
|
|
525
563
|
copy() {
|
|
@@ -552,7 +590,7 @@ var _Sequence = class {
|
|
|
552
590
|
}
|
|
553
591
|
};
|
|
554
592
|
var Sequence = _Sequence;
|
|
555
|
-
|
|
593
|
+
Sequence._nextID = 0;
|
|
556
594
|
var SequenceMode = /* @__PURE__ */ (SequenceMode2 => {
|
|
557
595
|
SequenceMode2[(SequenceMode2['hold'] = 0)] = 'hold';
|
|
558
596
|
SequenceMode2[(SequenceMode2['once'] = 1)] = 'once';
|
|
@@ -570,13 +608,9 @@ var SequenceModeValues = [
|
|
|
570
608
|
|
|
571
609
|
// spine-core/src/Animation.ts
|
|
572
610
|
var Animation = class {
|
|
573
|
-
/** The animation's name, which is unique across all animations in the skeleton. */
|
|
574
|
-
name;
|
|
575
|
-
timelines = [];
|
|
576
|
-
timelineIds = new StringSet();
|
|
577
|
-
/** The duration of the animation in seconds, which is the highest time of all keys in the timeline. */
|
|
578
|
-
duration;
|
|
579
611
|
constructor(name, timelines, duration) {
|
|
612
|
+
this.timelines = [];
|
|
613
|
+
this.timelineIds = new StringSet();
|
|
580
614
|
if (!name) throw new Error('name cannot be null.');
|
|
581
615
|
this.name = name;
|
|
582
616
|
this.setTimelines(timelines);
|
|
@@ -652,8 +686,6 @@ var Property = {
|
|
|
652
686
|
sequence: 28,
|
|
653
687
|
};
|
|
654
688
|
var Timeline = class {
|
|
655
|
-
propertyIds;
|
|
656
|
-
frames;
|
|
657
689
|
constructor(frameCount, propertyIds) {
|
|
658
690
|
this.propertyIds = propertyIds;
|
|
659
691
|
this.frames = Utils.newFloatArray(frameCount * this.getFrameEntries());
|
|
@@ -682,7 +714,6 @@ var Timeline = class {
|
|
|
682
714
|
}
|
|
683
715
|
};
|
|
684
716
|
var CurveTimeline = class extends Timeline {
|
|
685
|
-
curves;
|
|
686
717
|
// type, x, y, ...
|
|
687
718
|
constructor(frameCount, bezierCount, propertyIds) {
|
|
688
719
|
super(frameCount, propertyIds);
|
|
@@ -951,9 +982,9 @@ var CurveTimeline2 = class extends CurveTimeline {
|
|
|
951
982
|
}
|
|
952
983
|
};
|
|
953
984
|
var RotateTimeline = class extends CurveTimeline1 {
|
|
954
|
-
boneIndex = 0;
|
|
955
985
|
constructor(frameCount, bezierCount, boneIndex) {
|
|
956
986
|
super(frameCount, bezierCount, Property.rotate + '|' + boneIndex);
|
|
987
|
+
this.boneIndex = 0;
|
|
957
988
|
this.boneIndex = boneIndex;
|
|
958
989
|
}
|
|
959
990
|
apply(skeleton, lastTime, time, events, alpha, blend, direction) {
|
|
@@ -962,9 +993,9 @@ var RotateTimeline = class extends CurveTimeline1 {
|
|
|
962
993
|
}
|
|
963
994
|
};
|
|
964
995
|
var TranslateTimeline = class extends CurveTimeline2 {
|
|
965
|
-
boneIndex = 0;
|
|
966
996
|
constructor(frameCount, bezierCount, boneIndex) {
|
|
967
997
|
super(frameCount, bezierCount, Property.x + '|' + boneIndex, Property.y + '|' + boneIndex);
|
|
998
|
+
this.boneIndex = 0;
|
|
968
999
|
this.boneIndex = boneIndex;
|
|
969
1000
|
}
|
|
970
1001
|
apply(skeleton, lastTime, time, events, alpha, blend, direction) {
|
|
@@ -1076,9 +1107,9 @@ var TranslateTimeline = class extends CurveTimeline2 {
|
|
|
1076
1107
|
}
|
|
1077
1108
|
};
|
|
1078
1109
|
var TranslateXTimeline = class extends CurveTimeline1 {
|
|
1079
|
-
boneIndex = 0;
|
|
1080
1110
|
constructor(frameCount, bezierCount, boneIndex) {
|
|
1081
1111
|
super(frameCount, bezierCount, Property.x + '|' + boneIndex);
|
|
1112
|
+
this.boneIndex = 0;
|
|
1082
1113
|
this.boneIndex = boneIndex;
|
|
1083
1114
|
}
|
|
1084
1115
|
apply(skeleton, lastTime, time, events, alpha, blend, direction) {
|
|
@@ -1087,9 +1118,9 @@ var TranslateXTimeline = class extends CurveTimeline1 {
|
|
|
1087
1118
|
}
|
|
1088
1119
|
};
|
|
1089
1120
|
var TranslateYTimeline = class extends CurveTimeline1 {
|
|
1090
|
-
boneIndex = 0;
|
|
1091
1121
|
constructor(frameCount, bezierCount, boneIndex) {
|
|
1092
1122
|
super(frameCount, bezierCount, Property.y + '|' + boneIndex);
|
|
1123
|
+
this.boneIndex = 0;
|
|
1093
1124
|
this.boneIndex = boneIndex;
|
|
1094
1125
|
}
|
|
1095
1126
|
apply(skeleton, lastTime, time, events, alpha, blend, direction) {
|
|
@@ -1098,9 +1129,9 @@ var TranslateYTimeline = class extends CurveTimeline1 {
|
|
|
1098
1129
|
}
|
|
1099
1130
|
};
|
|
1100
1131
|
var ScaleTimeline = class extends CurveTimeline2 {
|
|
1101
|
-
boneIndex = 0;
|
|
1102
1132
|
constructor(frameCount, bezierCount, boneIndex) {
|
|
1103
1133
|
super(frameCount, bezierCount, Property.scaleX + '|' + boneIndex, Property.scaleY + '|' + boneIndex);
|
|
1134
|
+
this.boneIndex = 0;
|
|
1104
1135
|
this.boneIndex = boneIndex;
|
|
1105
1136
|
}
|
|
1106
1137
|
apply(skeleton, lastTime, time, events, alpha, blend, direction) {
|
|
@@ -1250,9 +1281,9 @@ var ScaleTimeline = class extends CurveTimeline2 {
|
|
|
1250
1281
|
}
|
|
1251
1282
|
};
|
|
1252
1283
|
var ScaleXTimeline = class extends CurveTimeline1 {
|
|
1253
|
-
boneIndex = 0;
|
|
1254
1284
|
constructor(frameCount, bezierCount, boneIndex) {
|
|
1255
1285
|
super(frameCount, bezierCount, Property.scaleX + '|' + boneIndex);
|
|
1286
|
+
this.boneIndex = 0;
|
|
1256
1287
|
this.boneIndex = boneIndex;
|
|
1257
1288
|
}
|
|
1258
1289
|
apply(skeleton, lastTime, time, events, alpha, blend, direction) {
|
|
@@ -1261,9 +1292,9 @@ var ScaleXTimeline = class extends CurveTimeline1 {
|
|
|
1261
1292
|
}
|
|
1262
1293
|
};
|
|
1263
1294
|
var ScaleYTimeline = class extends CurveTimeline1 {
|
|
1264
|
-
boneIndex = 0;
|
|
1265
1295
|
constructor(frameCount, bezierCount, boneIndex) {
|
|
1266
1296
|
super(frameCount, bezierCount, Property.scaleY + '|' + boneIndex);
|
|
1297
|
+
this.boneIndex = 0;
|
|
1267
1298
|
this.boneIndex = boneIndex;
|
|
1268
1299
|
}
|
|
1269
1300
|
apply(skeleton, lastTime, time, events, alpha, blend, direction) {
|
|
@@ -1272,9 +1303,9 @@ var ScaleYTimeline = class extends CurveTimeline1 {
|
|
|
1272
1303
|
}
|
|
1273
1304
|
};
|
|
1274
1305
|
var ShearTimeline = class extends CurveTimeline2 {
|
|
1275
|
-
boneIndex = 0;
|
|
1276
1306
|
constructor(frameCount, bezierCount, boneIndex) {
|
|
1277
1307
|
super(frameCount, bezierCount, Property.shearX + '|' + boneIndex, Property.shearY + '|' + boneIndex);
|
|
1308
|
+
this.boneIndex = 0;
|
|
1278
1309
|
this.boneIndex = boneIndex;
|
|
1279
1310
|
}
|
|
1280
1311
|
apply(skeleton, lastTime, time, events, alpha, blend, direction) {
|
|
@@ -1386,9 +1417,9 @@ var ShearTimeline = class extends CurveTimeline2 {
|
|
|
1386
1417
|
}
|
|
1387
1418
|
};
|
|
1388
1419
|
var ShearXTimeline = class extends CurveTimeline1 {
|
|
1389
|
-
boneIndex = 0;
|
|
1390
1420
|
constructor(frameCount, bezierCount, boneIndex) {
|
|
1391
1421
|
super(frameCount, bezierCount, Property.shearX + '|' + boneIndex);
|
|
1422
|
+
this.boneIndex = 0;
|
|
1392
1423
|
this.boneIndex = boneIndex;
|
|
1393
1424
|
}
|
|
1394
1425
|
apply(skeleton, lastTime, time, events, alpha, blend, direction) {
|
|
@@ -1397,9 +1428,9 @@ var ShearXTimeline = class extends CurveTimeline1 {
|
|
|
1397
1428
|
}
|
|
1398
1429
|
};
|
|
1399
1430
|
var ShearYTimeline = class extends CurveTimeline1 {
|
|
1400
|
-
boneIndex = 0;
|
|
1401
1431
|
constructor(frameCount, bezierCount, boneIndex) {
|
|
1402
1432
|
super(frameCount, bezierCount, Property.shearY + '|' + boneIndex);
|
|
1433
|
+
this.boneIndex = 0;
|
|
1403
1434
|
this.boneIndex = boneIndex;
|
|
1404
1435
|
}
|
|
1405
1436
|
apply(skeleton, lastTime, time, events, alpha, blend, direction) {
|
|
@@ -1408,9 +1439,9 @@ var ShearYTimeline = class extends CurveTimeline1 {
|
|
|
1408
1439
|
}
|
|
1409
1440
|
};
|
|
1410
1441
|
var InheritTimeline = class extends Timeline {
|
|
1411
|
-
boneIndex = 0;
|
|
1412
1442
|
constructor(frameCount, boneIndex) {
|
|
1413
1443
|
super(frameCount, [Property.inherit + '|' + boneIndex]);
|
|
1444
|
+
this.boneIndex = 0;
|
|
1414
1445
|
this.boneIndex = boneIndex;
|
|
1415
1446
|
}
|
|
1416
1447
|
getFrameEntries() {
|
|
@@ -1452,9 +1483,9 @@ var InheritTimeline = class extends Timeline {
|
|
|
1452
1483
|
}
|
|
1453
1484
|
};
|
|
1454
1485
|
var RGBATimeline = class extends CurveTimeline {
|
|
1455
|
-
slotIndex = 0;
|
|
1456
1486
|
constructor(frameCount, bezierCount, slotIndex) {
|
|
1457
1487
|
super(frameCount, bezierCount, [Property.rgb + '|' + slotIndex, Property.alpha + '|' + slotIndex]);
|
|
1488
|
+
this.slotIndex = 0;
|
|
1458
1489
|
this.slotIndex = slotIndex;
|
|
1459
1490
|
}
|
|
1460
1491
|
getFrameEntries() {
|
|
@@ -1636,9 +1667,9 @@ var RGBATimeline = class extends CurveTimeline {
|
|
|
1636
1667
|
}
|
|
1637
1668
|
};
|
|
1638
1669
|
var RGBTimeline = class extends CurveTimeline {
|
|
1639
|
-
slotIndex = 0;
|
|
1640
1670
|
constructor(frameCount, bezierCount, slotIndex) {
|
|
1641
1671
|
super(frameCount, bezierCount, [Property.rgb + '|' + slotIndex]);
|
|
1672
|
+
this.slotIndex = 0;
|
|
1642
1673
|
this.slotIndex = slotIndex;
|
|
1643
1674
|
}
|
|
1644
1675
|
getFrameEntries() {
|
|
@@ -1796,9 +1827,9 @@ var RGBTimeline = class extends CurveTimeline {
|
|
|
1796
1827
|
}
|
|
1797
1828
|
};
|
|
1798
1829
|
var AlphaTimeline = class extends CurveTimeline1 {
|
|
1799
|
-
slotIndex = 0;
|
|
1800
1830
|
constructor(frameCount, bezierCount, slotIndex) {
|
|
1801
1831
|
super(frameCount, bezierCount, Property.alpha + '|' + slotIndex);
|
|
1832
|
+
this.slotIndex = 0;
|
|
1802
1833
|
this.slotIndex = slotIndex;
|
|
1803
1834
|
}
|
|
1804
1835
|
apply(skeleton, lastTime, time, events, alpha, blend, direction) {
|
|
@@ -1825,13 +1856,13 @@ var AlphaTimeline = class extends CurveTimeline1 {
|
|
|
1825
1856
|
}
|
|
1826
1857
|
};
|
|
1827
1858
|
var RGBA2Timeline = class extends CurveTimeline {
|
|
1828
|
-
slotIndex = 0;
|
|
1829
1859
|
constructor(frameCount, bezierCount, slotIndex) {
|
|
1830
1860
|
super(frameCount, bezierCount, [
|
|
1831
1861
|
Property.rgb + '|' + slotIndex,
|
|
1832
1862
|
Property.alpha + '|' + slotIndex,
|
|
1833
1863
|
Property.rgb2 + '|' + slotIndex,
|
|
1834
1864
|
]);
|
|
1865
|
+
this.slotIndex = 0;
|
|
1835
1866
|
this.slotIndex = slotIndex;
|
|
1836
1867
|
}
|
|
1837
1868
|
getFrameEntries() {
|
|
@@ -2117,9 +2148,9 @@ var RGBA2Timeline = class extends CurveTimeline {
|
|
|
2117
2148
|
}
|
|
2118
2149
|
};
|
|
2119
2150
|
var RGB2Timeline = class extends CurveTimeline {
|
|
2120
|
-
slotIndex = 0;
|
|
2121
2151
|
constructor(frameCount, bezierCount, slotIndex) {
|
|
2122
2152
|
super(frameCount, bezierCount, [Property.rgb + '|' + slotIndex, Property.rgb2 + '|' + slotIndex]);
|
|
2153
|
+
this.slotIndex = 0;
|
|
2123
2154
|
this.slotIndex = slotIndex;
|
|
2124
2155
|
}
|
|
2125
2156
|
getFrameEntries() {
|
|
@@ -2386,11 +2417,9 @@ var RGB2Timeline = class extends CurveTimeline {
|
|
|
2386
2417
|
}
|
|
2387
2418
|
};
|
|
2388
2419
|
var AttachmentTimeline = class extends Timeline {
|
|
2389
|
-
slotIndex = 0;
|
|
2390
|
-
/** The attachment name for each key frame. May contain null values to clear the attachment. */
|
|
2391
|
-
attachmentNames;
|
|
2392
2420
|
constructor(frameCount, slotIndex) {
|
|
2393
2421
|
super(frameCount, [Property.attachment + '|' + slotIndex]);
|
|
2422
|
+
this.slotIndex = 0;
|
|
2394
2423
|
this.slotIndex = slotIndex;
|
|
2395
2424
|
this.attachmentNames = new Array(frameCount);
|
|
2396
2425
|
}
|
|
@@ -2421,13 +2450,9 @@ var AttachmentTimeline = class extends Timeline {
|
|
|
2421
2450
|
}
|
|
2422
2451
|
};
|
|
2423
2452
|
var DeformTimeline = class extends CurveTimeline {
|
|
2424
|
-
slotIndex = 0;
|
|
2425
|
-
/** The attachment that will be deformed. */
|
|
2426
|
-
attachment;
|
|
2427
|
-
/** The vertices for each key frame. */
|
|
2428
|
-
vertices;
|
|
2429
2453
|
constructor(frameCount, bezierCount, slotIndex, attachment) {
|
|
2430
2454
|
super(frameCount, bezierCount, [Property.deform + '|' + slotIndex + '|' + attachment.id]);
|
|
2455
|
+
this.slotIndex = 0;
|
|
2431
2456
|
this.slotIndex = slotIndex;
|
|
2432
2457
|
this.attachment = attachment;
|
|
2433
2458
|
this.vertices = new Array(frameCount);
|
|
@@ -2642,8 +2667,6 @@ var DeformTimeline = class extends CurveTimeline {
|
|
|
2642
2667
|
}
|
|
2643
2668
|
};
|
|
2644
2669
|
var _EventTimeline = class extends Timeline {
|
|
2645
|
-
/** The event for each key frame. */
|
|
2646
|
-
events;
|
|
2647
2670
|
constructor(frameCount) {
|
|
2648
2671
|
super(frameCount, _EventTimeline.propertyIds);
|
|
2649
2672
|
this.events = new Array(frameCount);
|
|
@@ -2680,10 +2703,8 @@ var _EventTimeline = class extends Timeline {
|
|
|
2680
2703
|
}
|
|
2681
2704
|
};
|
|
2682
2705
|
var EventTimeline = _EventTimeline;
|
|
2683
|
-
|
|
2706
|
+
EventTimeline.propertyIds = ['' + Property.event];
|
|
2684
2707
|
var _DrawOrderTimeline = class extends Timeline {
|
|
2685
|
-
/** The draw order for each key frame. See {@link #setFrame(int, float, int[])}. */
|
|
2686
|
-
drawOrders;
|
|
2687
2708
|
constructor(frameCount) {
|
|
2688
2709
|
super(frameCount, _DrawOrderTimeline.propertyIds);
|
|
2689
2710
|
this.drawOrders = new Array(frameCount);
|
|
@@ -2719,12 +2740,12 @@ var _DrawOrderTimeline = class extends Timeline {
|
|
|
2719
2740
|
}
|
|
2720
2741
|
};
|
|
2721
2742
|
var DrawOrderTimeline = _DrawOrderTimeline;
|
|
2722
|
-
|
|
2743
|
+
DrawOrderTimeline.propertyIds = ['' + Property.drawOrder];
|
|
2723
2744
|
var IkConstraintTimeline = class extends CurveTimeline {
|
|
2724
|
-
/** The index of the IK constraint in {@link Skeleton#getIkConstraints()} that will be changed when this timeline is applied */
|
|
2725
|
-
constraintIndex = 0;
|
|
2726
2745
|
constructor(frameCount, bezierCount, ikConstraintIndex) {
|
|
2727
2746
|
super(frameCount, bezierCount, [Property.ikConstraint + '|' + ikConstraintIndex]);
|
|
2747
|
+
/** The index of the IK constraint in {@link Skeleton#getIkConstraints()} that will be changed when this timeline is applied */
|
|
2748
|
+
this.constraintIndex = 0;
|
|
2728
2749
|
this.constraintIndex = ikConstraintIndex;
|
|
2729
2750
|
}
|
|
2730
2751
|
getFrameEntries() {
|
|
@@ -2901,10 +2922,10 @@ var IkConstraintTimeline = class extends CurveTimeline {
|
|
|
2901
2922
|
}
|
|
2902
2923
|
};
|
|
2903
2924
|
var TransformConstraintTimeline = class extends CurveTimeline {
|
|
2904
|
-
/** The index of the transform constraint slot in {@link Skeleton#transformConstraints} that will be changed. */
|
|
2905
|
-
constraintIndex = 0;
|
|
2906
2925
|
constructor(frameCount, bezierCount, transformConstraintIndex) {
|
|
2907
2926
|
super(frameCount, bezierCount, [Property.transformConstraint + '|' + transformConstraintIndex]);
|
|
2927
|
+
/** The index of the transform constraint slot in {@link Skeleton#transformConstraints} that will be changed. */
|
|
2928
|
+
this.constraintIndex = 0;
|
|
2908
2929
|
this.constraintIndex = transformConstraintIndex;
|
|
2909
2930
|
}
|
|
2910
2931
|
getFrameEntries() {
|
|
@@ -3155,11 +3176,11 @@ var TransformConstraintTimeline = class extends CurveTimeline {
|
|
|
3155
3176
|
}
|
|
3156
3177
|
};
|
|
3157
3178
|
var PathConstraintPositionTimeline = class extends CurveTimeline1 {
|
|
3158
|
-
/** The index of the path constraint in {@link Skeleton#getPathConstraints()} that will be changed when this timeline is
|
|
3159
|
-
* applied. */
|
|
3160
|
-
constraintIndex = 0;
|
|
3161
3179
|
constructor(frameCount, bezierCount, pathConstraintIndex) {
|
|
3162
3180
|
super(frameCount, bezierCount, Property.pathConstraintPosition + '|' + pathConstraintIndex);
|
|
3181
|
+
/** The index of the path constraint in {@link Skeleton#getPathConstraints()} that will be changed when this timeline is
|
|
3182
|
+
* applied. */
|
|
3183
|
+
this.constraintIndex = 0;
|
|
3163
3184
|
this.constraintIndex = pathConstraintIndex;
|
|
3164
3185
|
}
|
|
3165
3186
|
apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {
|
|
@@ -3169,11 +3190,11 @@ var PathConstraintPositionTimeline = class extends CurveTimeline1 {
|
|
|
3169
3190
|
}
|
|
3170
3191
|
};
|
|
3171
3192
|
var PathConstraintSpacingTimeline = class extends CurveTimeline1 {
|
|
3172
|
-
/** The index of the path constraint in {@link Skeleton#getPathConstraints()} that will be changed when this timeline is
|
|
3173
|
-
* applied. */
|
|
3174
|
-
constraintIndex = 0;
|
|
3175
3193
|
constructor(frameCount, bezierCount, pathConstraintIndex) {
|
|
3176
3194
|
super(frameCount, bezierCount, Property.pathConstraintSpacing + '|' + pathConstraintIndex);
|
|
3195
|
+
/** The index of the path constraint in {@link Skeleton#getPathConstraints()} that will be changed when this timeline is
|
|
3196
|
+
* applied. */
|
|
3197
|
+
this.constraintIndex = 0;
|
|
3177
3198
|
this.constraintIndex = pathConstraintIndex;
|
|
3178
3199
|
}
|
|
3179
3200
|
apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {
|
|
@@ -3183,11 +3204,11 @@ var PathConstraintSpacingTimeline = class extends CurveTimeline1 {
|
|
|
3183
3204
|
}
|
|
3184
3205
|
};
|
|
3185
3206
|
var PathConstraintMixTimeline = class extends CurveTimeline {
|
|
3186
|
-
/** The index of the path constraint in {@link Skeleton#getPathConstraints()} that will be changed when this timeline is
|
|
3187
|
-
* applied. */
|
|
3188
|
-
constraintIndex = 0;
|
|
3189
3207
|
constructor(frameCount, bezierCount, pathConstraintIndex) {
|
|
3190
3208
|
super(frameCount, bezierCount, [Property.pathConstraintMix + '|' + pathConstraintIndex]);
|
|
3209
|
+
/** The index of the path constraint in {@link Skeleton#getPathConstraints()} that will be changed when this timeline is
|
|
3210
|
+
* applied. */
|
|
3211
|
+
this.constraintIndex = 0;
|
|
3191
3212
|
this.constraintIndex = pathConstraintIndex;
|
|
3192
3213
|
}
|
|
3193
3214
|
getFrameEntries() {
|
|
@@ -3336,12 +3357,12 @@ var PathConstraintMixTimeline = class extends CurveTimeline {
|
|
|
3336
3357
|
}
|
|
3337
3358
|
};
|
|
3338
3359
|
var PhysicsConstraintTimeline = class extends CurveTimeline1 {
|
|
3339
|
-
/** The index of the physics constraint in {@link Skeleton#getPhysicsConstraints()} that will be changed when this timeline
|
|
3340
|
-
* is applied, or -1 if all physics constraints in the skeleton will be changed. */
|
|
3341
|
-
constraintIndex = 0;
|
|
3342
3360
|
/** @param physicsConstraintIndex -1 for all physics constraints in the skeleton. */
|
|
3343
3361
|
constructor(frameCount, bezierCount, physicsConstraintIndex, property) {
|
|
3344
3362
|
super(frameCount, bezierCount, property + '|' + physicsConstraintIndex);
|
|
3363
|
+
/** The index of the physics constraint in {@link Skeleton#getPhysicsConstraints()} that will be changed when this timeline
|
|
3364
|
+
* is applied, or -1 if all physics constraints in the skeleton will be changed. */
|
|
3365
|
+
this.constraintIndex = 0;
|
|
3345
3366
|
this.constraintIndex = physicsConstraintIndex;
|
|
3346
3367
|
}
|
|
3347
3368
|
apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {
|
|
@@ -3482,9 +3503,6 @@ var PhysicsConstraintMixTimeline = class extends PhysicsConstraintTimeline {
|
|
|
3482
3503
|
}
|
|
3483
3504
|
};
|
|
3484
3505
|
var _PhysicsConstraintResetTimeline = class extends Timeline {
|
|
3485
|
-
/** The index of the physics constraint in {@link Skeleton#getPhysicsConstraints()} that will be reset when this timeline is
|
|
3486
|
-
* applied, or -1 if all physics constraints in the skeleton will be reset. */
|
|
3487
|
-
constraintIndex;
|
|
3488
3506
|
/** @param physicsConstraintIndex -1 for all physics constraints in the skeleton. */
|
|
3489
3507
|
constructor(frameCount, physicsConstraintIndex) {
|
|
3490
3508
|
super(frameCount, _PhysicsConstraintResetTimeline.propertyIds);
|
|
@@ -3522,10 +3540,8 @@ var _PhysicsConstraintResetTimeline = class extends Timeline {
|
|
|
3522
3540
|
}
|
|
3523
3541
|
};
|
|
3524
3542
|
var PhysicsConstraintResetTimeline = _PhysicsConstraintResetTimeline;
|
|
3525
|
-
|
|
3543
|
+
PhysicsConstraintResetTimeline.propertyIds = [Property.physicsConstraintReset.toString()];
|
|
3526
3544
|
var _SequenceTimeline = class extends Timeline {
|
|
3527
|
-
slotIndex;
|
|
3528
|
-
attachment;
|
|
3529
3545
|
constructor(frameCount, slotIndex, attachment) {
|
|
3530
3546
|
super(frameCount, [Property.sequence + '|' + slotIndex + '|' + attachment.sequence.id]);
|
|
3531
3547
|
this.slotIndex = slotIndex;
|
|
@@ -3607,34 +3623,32 @@ var _SequenceTimeline = class extends Timeline {
|
|
|
3607
3623
|
}
|
|
3608
3624
|
};
|
|
3609
3625
|
var SequenceTimeline = _SequenceTimeline;
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
|
|
3626
|
+
SequenceTimeline.ENTRIES = 3;
|
|
3627
|
+
SequenceTimeline.MODE = 1;
|
|
3628
|
+
SequenceTimeline.DELAY = 2;
|
|
3613
3629
|
|
|
3614
3630
|
// spine-core/src/AnimationState.ts
|
|
3615
3631
|
var _AnimationState = class {
|
|
3616
|
-
static emptyAnimation() {
|
|
3617
|
-
return _AnimationState._emptyAnimation;
|
|
3618
|
-
}
|
|
3619
|
-
/** The AnimationStateData to look up mix durations. */
|
|
3620
|
-
data;
|
|
3621
|
-
/** The list of tracks that currently have animations, which may contain null entries. */
|
|
3622
|
-
tracks = new Array();
|
|
3623
|
-
/** Multiplier for the delta time when the animation state is updated, causing time for all animations and mixes to play slower
|
|
3624
|
-
* or faster. Defaults to 1.
|
|
3625
|
-
*
|
|
3626
|
-
* See TrackEntry {@link TrackEntry#timeScale} for affecting a single animation. */
|
|
3627
|
-
timeScale = 1;
|
|
3628
|
-
unkeyedState = 0;
|
|
3629
|
-
events = new Array();
|
|
3630
|
-
listeners = new Array();
|
|
3631
|
-
queue = new EventQueue(this);
|
|
3632
|
-
propertyIDs = new StringSet();
|
|
3633
|
-
animationsChanged = false;
|
|
3634
|
-
trackEntryPool = new Pool(() => new TrackEntry());
|
|
3635
3632
|
constructor(data) {
|
|
3633
|
+
/** The list of tracks that currently have animations, which may contain null entries. */
|
|
3634
|
+
this.tracks = new Array();
|
|
3635
|
+
/** Multiplier for the delta time when the animation state is updated, causing time for all animations and mixes to play slower
|
|
3636
|
+
* or faster. Defaults to 1.
|
|
3637
|
+
*
|
|
3638
|
+
* See TrackEntry {@link TrackEntry#timeScale} for affecting a single animation. */
|
|
3639
|
+
this.timeScale = 1;
|
|
3640
|
+
this.unkeyedState = 0;
|
|
3641
|
+
this.events = new Array();
|
|
3642
|
+
this.listeners = new Array();
|
|
3643
|
+
this.queue = new EventQueue(this);
|
|
3644
|
+
this.propertyIDs = new StringSet();
|
|
3645
|
+
this.animationsChanged = false;
|
|
3646
|
+
this.trackEntryPool = new Pool(() => new TrackEntry());
|
|
3636
3647
|
this.data = data;
|
|
3637
3648
|
}
|
|
3649
|
+
static emptyAnimation() {
|
|
3650
|
+
return _AnimationState._emptyAnimation;
|
|
3651
|
+
}
|
|
3638
3652
|
/** Increments each track entry {@link TrackEntry#trackTime()}, setting queued animations as current if needed. */
|
|
3639
3653
|
update(delta) {
|
|
3640
3654
|
delta *= this.timeScale;
|
|
@@ -4285,132 +4299,144 @@ var _AnimationState = class {
|
|
|
4285
4299
|
}
|
|
4286
4300
|
};
|
|
4287
4301
|
var AnimationState = _AnimationState;
|
|
4288
|
-
|
|
4302
|
+
AnimationState._emptyAnimation = new Animation('<empty>', [], 0);
|
|
4289
4303
|
var TrackEntry = class {
|
|
4290
|
-
|
|
4291
|
-
|
|
4292
|
-
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
-
|
|
4296
|
-
|
|
4297
|
-
|
|
4298
|
-
|
|
4299
|
-
|
|
4300
|
-
|
|
4301
|
-
|
|
4302
|
-
|
|
4303
|
-
|
|
4304
|
-
|
|
4305
|
-
|
|
4306
|
-
|
|
4307
|
-
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
|
|
4316
|
-
|
|
4317
|
-
|
|
4318
|
-
|
|
4319
|
-
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
|
|
4326
|
-
|
|
4327
|
-
|
|
4328
|
-
|
|
4329
|
-
|
|
4330
|
-
|
|
4331
|
-
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
|
|
4344
|
-
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
|
|
4355
|
-
|
|
4356
|
-
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
|
|
4363
|
-
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
|
|
4367
|
-
|
|
4368
|
-
|
|
4369
|
-
|
|
4370
|
-
|
|
4371
|
-
|
|
4372
|
-
|
|
4373
|
-
|
|
4374
|
-
|
|
4375
|
-
|
|
4376
|
-
|
|
4377
|
-
|
|
4378
|
-
|
|
4379
|
-
|
|
4380
|
-
|
|
4381
|
-
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
4389
|
-
|
|
4390
|
-
|
|
4391
|
-
|
|
4392
|
-
|
|
4393
|
-
|
|
4394
|
-
|
|
4395
|
-
|
|
4396
|
-
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
|
|
4400
|
-
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
|
|
4404
|
-
|
|
4405
|
-
|
|
4406
|
-
|
|
4407
|
-
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
-
|
|
4411
|
-
|
|
4412
|
-
|
|
4413
|
-
|
|
4304
|
+
constructor() {
|
|
4305
|
+
/** The animation to apply for this track entry. */
|
|
4306
|
+
this.animation = null;
|
|
4307
|
+
this.previous = null;
|
|
4308
|
+
/** The animation queued to start after this animation, or null. `next` makes up a linked list. */
|
|
4309
|
+
this.next = null;
|
|
4310
|
+
/** The track entry for the previous animation when mixing from the previous animation to this animation, or null if no
|
|
4311
|
+
* mixing is currently occuring. When mixing from multiple animations, `mixingFrom` makes up a linked list. */
|
|
4312
|
+
this.mixingFrom = null;
|
|
4313
|
+
/** The track entry for the next animation when mixing from this animation to the next animation, or null if no mixing is
|
|
4314
|
+
* currently occuring. When mixing to multiple animations, `mixingTo` makes up a linked list. */
|
|
4315
|
+
this.mixingTo = null;
|
|
4316
|
+
/** The listener for events generated by this track entry, or null.
|
|
4317
|
+
*
|
|
4318
|
+
* A track entry returned from {@link AnimationState#setAnimation()} is already the current animation
|
|
4319
|
+
* for the track, so the track entry listener {@link AnimationStateListener#start()} will not be called. */
|
|
4320
|
+
this.listener = null;
|
|
4321
|
+
/** The index of the track where this track entry is either current or queued.
|
|
4322
|
+
*
|
|
4323
|
+
* See {@link AnimationState#getCurrent()}. */
|
|
4324
|
+
this.trackIndex = 0;
|
|
4325
|
+
/** If true, the animation will repeat. If false it will not, instead its last frame is applied if played beyond its
|
|
4326
|
+
* duration. */
|
|
4327
|
+
this.loop = false;
|
|
4328
|
+
/** If true, when mixing from the previous animation to this animation, the previous animation is applied as normal instead
|
|
4329
|
+
* of being mixed out.
|
|
4330
|
+
*
|
|
4331
|
+
* When mixing between animations that key the same property, if a lower track also keys that property then the value will
|
|
4332
|
+
* briefly dip toward the lower track value during the mix. This happens because the first animation mixes from 100% to 0%
|
|
4333
|
+
* while the second animation mixes from 0% to 100%. Setting `holdPrevious` to true applies the first animation
|
|
4334
|
+
* at 100% during the mix so the lower track value is overwritten. Such dipping does not occur on the lowest track which
|
|
4335
|
+
* keys the property, only when a higher track also keys the property.
|
|
4336
|
+
*
|
|
4337
|
+
* Snapping will occur if `holdPrevious` is true and this animation does not key all the same properties as the
|
|
4338
|
+
* previous animation. */
|
|
4339
|
+
this.holdPrevious = false;
|
|
4340
|
+
this.reverse = false;
|
|
4341
|
+
this.shortestRotation = false;
|
|
4342
|
+
/** When the mix percentage ({@link #mixTime} / {@link #mixDuration}) is less than the
|
|
4343
|
+
* `eventThreshold`, event timelines are applied while this animation is being mixed out. Defaults to 0, so event
|
|
4344
|
+
* timelines are not applied while this animation is being mixed out. */
|
|
4345
|
+
this.eventThreshold = 0;
|
|
4346
|
+
/** When the mix percentage ({@link #mixtime} / {@link #mixDuration}) is less than the
|
|
4347
|
+
* `attachmentThreshold`, attachment timelines are applied while this animation is being mixed out. Defaults to
|
|
4348
|
+
* 0, so attachment timelines are not applied while this animation is being mixed out. */
|
|
4349
|
+
this.mixAttachmentThreshold = 0;
|
|
4350
|
+
/** When {@link #getAlpha()} is greater than <code>alphaAttachmentThreshold</code>, attachment timelines are applied.
|
|
4351
|
+
* Defaults to 0, so attachment timelines are always applied. */
|
|
4352
|
+
this.alphaAttachmentThreshold = 0;
|
|
4353
|
+
/** When the mix percentage ({@link #getMixTime()} / {@link #getMixDuration()}) is less than the
|
|
4354
|
+
* <code>mixDrawOrderThreshold</code>, draw order timelines are applied while this animation is being mixed out. Defaults to
|
|
4355
|
+
* 0, so draw order timelines are not applied while this animation is being mixed out. */
|
|
4356
|
+
this.mixDrawOrderThreshold = 0;
|
|
4357
|
+
/** Seconds when this animation starts, both initially and after looping. Defaults to 0.
|
|
4358
|
+
*
|
|
4359
|
+
* When changing the `animationStart` time, it often makes sense to set {@link #animationLast} to the same
|
|
4360
|
+
* value to prevent timeline keys before the start time from triggering. */
|
|
4361
|
+
this.animationStart = 0;
|
|
4362
|
+
/** Seconds for the last frame of this animation. Non-looping animations won't play past this time. Looping animations will
|
|
4363
|
+
* loop back to {@link #animationStart} at this time. Defaults to the animation {@link Animation#duration}. */
|
|
4364
|
+
this.animationEnd = 0;
|
|
4365
|
+
/** The time in seconds this animation was last applied. Some timelines use this for one-time triggers. Eg, when this
|
|
4366
|
+
* animation is applied, event timelines will fire all events between the `animationLast` time (exclusive) and
|
|
4367
|
+
* `animationTime` (inclusive). Defaults to -1 to ensure triggers on frame 0 happen the first time this animation
|
|
4368
|
+
* is applied. */
|
|
4369
|
+
this.animationLast = 0;
|
|
4370
|
+
this.nextAnimationLast = 0;
|
|
4371
|
+
/** Seconds to postpone playing the animation. When this track entry is the current track entry, `delay`
|
|
4372
|
+
* postpones incrementing the {@link #trackTime}. When this track entry is queued, `delay` is the time from
|
|
4373
|
+
* the start of the previous animation to when this track entry will become the current track entry (ie when the previous
|
|
4374
|
+
* track entry {@link TrackEntry#trackTime} >= this track entry's `delay`).
|
|
4375
|
+
*
|
|
4376
|
+
* {@link #timeScale} affects the delay. */
|
|
4377
|
+
this.delay = 0;
|
|
4378
|
+
/** Current time in seconds this track entry has been the current track entry. The track time determines
|
|
4379
|
+
* {@link #animationTime}. The track time can be set to start the animation at a time other than 0, without affecting
|
|
4380
|
+
* looping. */
|
|
4381
|
+
this.trackTime = 0;
|
|
4382
|
+
this.trackLast = 0;
|
|
4383
|
+
this.nextTrackLast = 0;
|
|
4384
|
+
/** The track time in seconds when this animation will be removed from the track. Defaults to the highest possible float
|
|
4385
|
+
* value, meaning the animation will be applied until a new animation is set or the track is cleared. If the track end time
|
|
4386
|
+
* is reached, no other animations are queued for playback, and mixing from any previous animations is complete, then the
|
|
4387
|
+
* properties keyed by the animation are set to the setup pose and the track is cleared.
|
|
4388
|
+
*
|
|
4389
|
+
* It may be desired to use {@link AnimationState#addEmptyAnimation()} rather than have the animation
|
|
4390
|
+
* abruptly cease being applied. */
|
|
4391
|
+
this.trackEnd = 0;
|
|
4392
|
+
/** Multiplier for the delta time when this track entry is updated, causing time for this animation to pass slower or
|
|
4393
|
+
* faster. Defaults to 1.
|
|
4394
|
+
*
|
|
4395
|
+
* {@link #mixTime} is not affected by track entry time scale, so {@link #mixDuration} may need to be adjusted to
|
|
4396
|
+
* match the animation speed.
|
|
4397
|
+
*
|
|
4398
|
+
* When using {@link AnimationState#addAnimation()} with a `delay` <= 0, note the
|
|
4399
|
+
* {@link #delay} is set using the mix duration from the {@link AnimationStateData}, assuming time scale to be 1. If
|
|
4400
|
+
* the time scale is not 1, the delay may need to be adjusted.
|
|
4401
|
+
*
|
|
4402
|
+
* See AnimationState {@link AnimationState#timeScale} for affecting all animations. */
|
|
4403
|
+
this.timeScale = 0;
|
|
4404
|
+
/** Values < 1 mix this animation with the skeleton's current pose (usually the pose resulting from lower tracks). Defaults
|
|
4405
|
+
* to 1, which overwrites the skeleton's current pose with this animation.
|
|
4406
|
+
*
|
|
4407
|
+
* Typically track 0 is used to completely pose the skeleton, then alpha is used on higher tracks. It doesn't make sense to
|
|
4408
|
+
* use alpha on track 0 if the skeleton pose is from the last frame render. */
|
|
4409
|
+
this.alpha = 0;
|
|
4410
|
+
/** Seconds from 0 to the {@link #getMixDuration()} when mixing from the previous animation to this animation. May be
|
|
4411
|
+
* slightly more than `mixDuration` when the mix is complete. */
|
|
4412
|
+
this.mixTime = 0;
|
|
4413
|
+
/** Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData
|
|
4414
|
+
* {@link AnimationStateData#getMix()} based on the animation before this animation (if any).
|
|
4415
|
+
*
|
|
4416
|
+
* A mix duration of 0 still mixes out over one frame to provide the track entry being mixed out a chance to revert the
|
|
4417
|
+
* properties it was animating.
|
|
4418
|
+
*
|
|
4419
|
+
* The `mixDuration` can be set manually rather than use the value from
|
|
4420
|
+
* {@link AnimationStateData#getMix()}. In that case, the `mixDuration` can be set for a new
|
|
4421
|
+
* track entry only before {@link AnimationState#update(float)} is first called.
|
|
4422
|
+
*
|
|
4423
|
+
* When using {@link AnimationState#addAnimation()} with a `delay` <= 0, note the
|
|
4424
|
+
* {@link #delay} is set using the mix duration from the {@link AnimationStateData}, not a mix duration set
|
|
4425
|
+
* afterward. */
|
|
4426
|
+
this._mixDuration = 0;
|
|
4427
|
+
this.interruptAlpha = 0;
|
|
4428
|
+
this.totalAlpha = 0;
|
|
4429
|
+
/** Controls how properties keyed in the animation are mixed with lower tracks. Defaults to {@link MixBlend#replace}, which
|
|
4430
|
+
* replaces the values from the lower tracks with the animation values. {@link MixBlend#add} adds the animation values to
|
|
4431
|
+
* the values from the lower tracks.
|
|
4432
|
+
*
|
|
4433
|
+
* The `mixBlend` can be set for a new track entry only before {@link AnimationState#apply()} is first
|
|
4434
|
+
* called. */
|
|
4435
|
+
this.mixBlend = 2 /* replace */;
|
|
4436
|
+
this.timelineMode = new Array();
|
|
4437
|
+
this.timelineHoldMix = new Array();
|
|
4438
|
+
this.timelinesRotation = new Array();
|
|
4439
|
+
}
|
|
4414
4440
|
get mixDuration() {
|
|
4415
4441
|
return this._mixDuration;
|
|
4416
4442
|
}
|
|
@@ -4422,16 +4448,6 @@ var TrackEntry = class {
|
|
|
4422
4448
|
if (this.previous != null && delay <= 0) delay += this.previous.getTrackComplete() - mixDuration;
|
|
4423
4449
|
this.delay = delay;
|
|
4424
4450
|
}
|
|
4425
|
-
/** Controls how properties keyed in the animation are mixed with lower tracks. Defaults to {@link MixBlend#replace}, which
|
|
4426
|
-
* replaces the values from the lower tracks with the animation values. {@link MixBlend#add} adds the animation values to
|
|
4427
|
-
* the values from the lower tracks.
|
|
4428
|
-
*
|
|
4429
|
-
* The `mixBlend` can be set for a new track entry only before {@link AnimationState#apply()} is first
|
|
4430
|
-
* called. */
|
|
4431
|
-
mixBlend = 2 /* replace */;
|
|
4432
|
-
timelineMode = new Array();
|
|
4433
|
-
timelineHoldMix = new Array();
|
|
4434
|
-
timelinesRotation = new Array();
|
|
4435
4451
|
reset() {
|
|
4436
4452
|
this.next = null;
|
|
4437
4453
|
this.previous = null;
|
|
@@ -4495,10 +4511,9 @@ var TrackEntry = class {
|
|
|
4495
4511
|
}
|
|
4496
4512
|
};
|
|
4497
4513
|
var EventQueue = class {
|
|
4498
|
-
objects = [];
|
|
4499
|
-
drainDisabled = false;
|
|
4500
|
-
animState;
|
|
4501
4514
|
constructor(animState) {
|
|
4515
|
+
this.objects = [];
|
|
4516
|
+
this.drainDisabled = false;
|
|
4502
4517
|
this.animState = animState;
|
|
4503
4518
|
}
|
|
4504
4519
|
start(entry) {
|
|
@@ -4616,12 +4631,10 @@ var CURRENT = 2;
|
|
|
4616
4631
|
|
|
4617
4632
|
// spine-core/src/AnimationStateData.ts
|
|
4618
4633
|
var AnimationStateData = class {
|
|
4619
|
-
/** The SkeletonData to look up animations when they are specified by name. */
|
|
4620
|
-
skeletonData;
|
|
4621
|
-
animationToMixTime = {};
|
|
4622
|
-
/** The mix duration to use when no mix duration has been defined between two animations. */
|
|
4623
|
-
defaultMix = 0;
|
|
4624
4634
|
constructor(skeletonData) {
|
|
4635
|
+
this.animationToMixTime = {};
|
|
4636
|
+
/** The mix duration to use when no mix duration has been defined between two animations. */
|
|
4637
|
+
this.defaultMix = 0;
|
|
4625
4638
|
if (!skeletonData) throw new Error('skeletonData cannot be null.');
|
|
4626
4639
|
this.skeletonData = skeletonData;
|
|
4627
4640
|
}
|
|
@@ -4655,9 +4668,9 @@ var AnimationStateData = class {
|
|
|
4655
4668
|
|
|
4656
4669
|
// spine-core/src/attachments/BoundingBoxAttachment.ts
|
|
4657
4670
|
var BoundingBoxAttachment = class extends VertexAttachment {
|
|
4658
|
-
color = new Color(1, 1, 1, 1);
|
|
4659
4671
|
constructor(name) {
|
|
4660
4672
|
super(name);
|
|
4673
|
+
this.color = new Color(1, 1, 1, 1);
|
|
4661
4674
|
}
|
|
4662
4675
|
copy() {
|
|
4663
4676
|
let copy = new BoundingBoxAttachment(this.name);
|
|
@@ -4669,16 +4682,16 @@ var BoundingBoxAttachment = class extends VertexAttachment {
|
|
|
4669
4682
|
|
|
4670
4683
|
// spine-core/src/attachments/ClippingAttachment.ts
|
|
4671
4684
|
var ClippingAttachment = class extends VertexAttachment {
|
|
4672
|
-
/** Clipping is performed between the clipping polygon's slot and the end slot. Returns null if clipping is done until the end of
|
|
4673
|
-
* the skeleton's rendering. */
|
|
4674
|
-
endSlot = null;
|
|
4675
|
-
// Nonessential.
|
|
4676
|
-
/** The color of the clipping polygon as it was in Spine. Available only when nonessential data was exported. Clipping polygons
|
|
4677
|
-
* are not usually rendered at runtime. */
|
|
4678
|
-
color = new Color(0.2275, 0.2275, 0.8078, 1);
|
|
4679
4685
|
// ce3a3aff
|
|
4680
4686
|
constructor(name) {
|
|
4681
4687
|
super(name);
|
|
4688
|
+
/** Clipping is performed between the clipping polygon's slot and the end slot. Returns null if clipping is done until the end of
|
|
4689
|
+
* the skeleton's rendering. */
|
|
4690
|
+
this.endSlot = null;
|
|
4691
|
+
// Nonessential.
|
|
4692
|
+
/** The color of the clipping polygon as it was in Spine. Available only when nonessential data was exported. Clipping polygons
|
|
4693
|
+
* are not usually rendered at runtime. */
|
|
4694
|
+
this.color = new Color(0.2275, 0.2275, 0.8078, 1);
|
|
4682
4695
|
}
|
|
4683
4696
|
copy() {
|
|
4684
4697
|
let copy = new ClippingAttachment(this.name);
|
|
@@ -4691,7 +4704,6 @@ var ClippingAttachment = class extends VertexAttachment {
|
|
|
4691
4704
|
|
|
4692
4705
|
// spine-core/src/Texture.ts
|
|
4693
4706
|
var Texture = class {
|
|
4694
|
-
_image;
|
|
4695
4707
|
constructor(image) {
|
|
4696
4708
|
this._image = image;
|
|
4697
4709
|
}
|
|
@@ -4716,18 +4728,19 @@ var TextureWrap = /* @__PURE__ */ (TextureWrap2 => {
|
|
|
4716
4728
|
return TextureWrap2;
|
|
4717
4729
|
})(TextureWrap || {});
|
|
4718
4730
|
var TextureRegion = class {
|
|
4719
|
-
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
|
|
4726
|
-
|
|
4727
|
-
|
|
4728
|
-
|
|
4729
|
-
|
|
4730
|
-
|
|
4731
|
+
constructor() {
|
|
4732
|
+
this.u = 0;
|
|
4733
|
+
this.v = 0;
|
|
4734
|
+
this.u2 = 0;
|
|
4735
|
+
this.v2 = 0;
|
|
4736
|
+
this.width = 0;
|
|
4737
|
+
this.height = 0;
|
|
4738
|
+
this.degrees = 0;
|
|
4739
|
+
this.offsetX = 0;
|
|
4740
|
+
this.offsetY = 0;
|
|
4741
|
+
this.originalWidth = 0;
|
|
4742
|
+
this.originalHeight = 0;
|
|
4743
|
+
}
|
|
4731
4744
|
};
|
|
4732
4745
|
var FakeTexture = class extends Texture {
|
|
4733
4746
|
setFilters(minFilter, magFilter) {}
|
|
@@ -4737,9 +4750,9 @@ var FakeTexture = class extends Texture {
|
|
|
4737
4750
|
|
|
4738
4751
|
// spine-core/src/TextureAtlas.ts
|
|
4739
4752
|
var TextureAtlas = class {
|
|
4740
|
-
pages = new Array();
|
|
4741
|
-
regions = new Array();
|
|
4742
4753
|
constructor(atlasText) {
|
|
4754
|
+
this.pages = new Array();
|
|
4755
|
+
this.regions = new Array();
|
|
4743
4756
|
let reader = new TextureAtlasReader(atlasText);
|
|
4744
4757
|
let entry = new Array(4);
|
|
4745
4758
|
let pageFields = {};
|
|
@@ -4870,15 +4883,15 @@ var TextureAtlas = class {
|
|
|
4870
4883
|
for (let page of this.pages) page.setTexture(assetManager.get(pathPrefix + page.name));
|
|
4871
4884
|
}
|
|
4872
4885
|
dispose() {
|
|
4886
|
+
var _a;
|
|
4873
4887
|
for (let i = 0; i < this.pages.length; i++) {
|
|
4874
|
-
this.pages[i].texture
|
|
4888
|
+
(_a = this.pages[i].texture) == null ? void 0 : _a.dispose();
|
|
4875
4889
|
}
|
|
4876
4890
|
}
|
|
4877
4891
|
};
|
|
4878
4892
|
var TextureAtlasReader = class {
|
|
4879
|
-
lines;
|
|
4880
|
-
index = 0;
|
|
4881
4893
|
constructor(text) {
|
|
4894
|
+
this.index = 0;
|
|
4882
4895
|
this.lines = text.split(/\r\n|\r|\n/);
|
|
4883
4896
|
}
|
|
4884
4897
|
readLine() {
|
|
@@ -4905,17 +4918,16 @@ var TextureAtlasReader = class {
|
|
|
4905
4918
|
}
|
|
4906
4919
|
};
|
|
4907
4920
|
var TextureAtlasPage = class {
|
|
4908
|
-
name;
|
|
4909
|
-
minFilter = 9728 /* Nearest */;
|
|
4910
|
-
magFilter = 9728 /* Nearest */;
|
|
4911
|
-
uWrap = 33071 /* ClampToEdge */;
|
|
4912
|
-
vWrap = 33071 /* ClampToEdge */;
|
|
4913
|
-
texture = null;
|
|
4914
|
-
width = 0;
|
|
4915
|
-
height = 0;
|
|
4916
|
-
pma = false;
|
|
4917
|
-
regions = new Array();
|
|
4918
4921
|
constructor(name) {
|
|
4922
|
+
this.minFilter = 9728 /* Nearest */;
|
|
4923
|
+
this.magFilter = 9728 /* Nearest */;
|
|
4924
|
+
this.uWrap = 33071 /* ClampToEdge */;
|
|
4925
|
+
this.vWrap = 33071 /* ClampToEdge */;
|
|
4926
|
+
this.texture = null;
|
|
4927
|
+
this.width = 0;
|
|
4928
|
+
this.height = 0;
|
|
4929
|
+
this.pma = false;
|
|
4930
|
+
this.regions = new Array();
|
|
4919
4931
|
this.name = name;
|
|
4920
4932
|
}
|
|
4921
4933
|
setTexture(texture) {
|
|
@@ -4926,20 +4938,18 @@ var TextureAtlasPage = class {
|
|
|
4926
4938
|
}
|
|
4927
4939
|
};
|
|
4928
4940
|
var TextureAtlasRegion = class extends TextureRegion {
|
|
4929
|
-
page;
|
|
4930
|
-
name;
|
|
4931
|
-
x = 0;
|
|
4932
|
-
y = 0;
|
|
4933
|
-
offsetX = 0;
|
|
4934
|
-
offsetY = 0;
|
|
4935
|
-
originalWidth = 0;
|
|
4936
|
-
originalHeight = 0;
|
|
4937
|
-
index = 0;
|
|
4938
|
-
degrees = 0;
|
|
4939
|
-
names = null;
|
|
4940
|
-
values = null;
|
|
4941
4941
|
constructor(page, name) {
|
|
4942
4942
|
super();
|
|
4943
|
+
this.x = 0;
|
|
4944
|
+
this.y = 0;
|
|
4945
|
+
this.offsetX = 0;
|
|
4946
|
+
this.offsetY = 0;
|
|
4947
|
+
this.originalWidth = 0;
|
|
4948
|
+
this.originalHeight = 0;
|
|
4949
|
+
this.index = 0;
|
|
4950
|
+
this.degrees = 0;
|
|
4951
|
+
this.names = null;
|
|
4952
|
+
this.values = null;
|
|
4943
4953
|
this.page = page;
|
|
4944
4954
|
this.name = name;
|
|
4945
4955
|
page.regions.push(this);
|
|
@@ -4948,33 +4958,31 @@ var TextureAtlasRegion = class extends TextureRegion {
|
|
|
4948
4958
|
|
|
4949
4959
|
// spine-core/src/attachments/MeshAttachment.ts
|
|
4950
4960
|
var MeshAttachment = class extends VertexAttachment {
|
|
4951
|
-
region = null;
|
|
4952
|
-
/** The name of the texture region for this attachment. */
|
|
4953
|
-
path;
|
|
4954
|
-
/** The UV pair for each vertex, normalized within the texture region. */
|
|
4955
|
-
regionUVs = [];
|
|
4956
|
-
/** The UV pair for each vertex, normalized within the entire texture.
|
|
4957
|
-
*
|
|
4958
|
-
* See {@link #updateUVs}. */
|
|
4959
|
-
uvs = [];
|
|
4960
|
-
/** Triplets of vertex indices which describe the mesh's triangulation. */
|
|
4961
|
-
triangles = [];
|
|
4962
|
-
/** The color to tint the mesh. */
|
|
4963
|
-
color = new Color(1, 1, 1, 1);
|
|
4964
|
-
/** The width of the mesh's image. Available only when nonessential data was exported. */
|
|
4965
|
-
width = 0;
|
|
4966
|
-
/** The height of the mesh's image. Available only when nonessential data was exported. */
|
|
4967
|
-
height = 0;
|
|
4968
|
-
/** The number of entries at the beginning of {@link #vertices} that make up the mesh hull. */
|
|
4969
|
-
hullLength = 0;
|
|
4970
|
-
/** Vertex index pairs describing edges for controling triangulation. Mesh triangles will never cross edges. Only available if
|
|
4971
|
-
* nonessential data was exported. Triangulation is not performed at runtime. */
|
|
4972
|
-
edges = [];
|
|
4973
|
-
parentMesh = null;
|
|
4974
|
-
sequence = null;
|
|
4975
|
-
tempColor = new Color(0, 0, 0, 0);
|
|
4976
4961
|
constructor(name, path2) {
|
|
4977
4962
|
super(name);
|
|
4963
|
+
this.region = null;
|
|
4964
|
+
/** The UV pair for each vertex, normalized within the texture region. */
|
|
4965
|
+
this.regionUVs = [];
|
|
4966
|
+
/** The UV pair for each vertex, normalized within the entire texture.
|
|
4967
|
+
*
|
|
4968
|
+
* See {@link #updateUVs}. */
|
|
4969
|
+
this.uvs = [];
|
|
4970
|
+
/** Triplets of vertex indices which describe the mesh's triangulation. */
|
|
4971
|
+
this.triangles = [];
|
|
4972
|
+
/** The color to tint the mesh. */
|
|
4973
|
+
this.color = new Color(1, 1, 1, 1);
|
|
4974
|
+
/** The width of the mesh's image. Available only when nonessential data was exported. */
|
|
4975
|
+
this.width = 0;
|
|
4976
|
+
/** The height of the mesh's image. Available only when nonessential data was exported. */
|
|
4977
|
+
this.height = 0;
|
|
4978
|
+
/** The number of entries at the beginning of {@link #vertices} that make up the mesh hull. */
|
|
4979
|
+
this.hullLength = 0;
|
|
4980
|
+
/** Vertex index pairs describing edges for controling triangulation. Mesh triangles will never cross edges. Only available if
|
|
4981
|
+
* nonessential data was exported. Triangulation is not performed at runtime. */
|
|
4982
|
+
this.edges = [];
|
|
4983
|
+
this.parentMesh = null;
|
|
4984
|
+
this.sequence = null;
|
|
4985
|
+
this.tempColor = new Color(0, 0, 0, 0);
|
|
4978
4986
|
this.path = path2;
|
|
4979
4987
|
}
|
|
4980
4988
|
/** Calculates {@link #uvs} using the {@link #regionUVs} and region. Must be called if the region, the region's properties, or
|
|
@@ -5101,18 +5109,18 @@ var MeshAttachment = class extends VertexAttachment {
|
|
|
5101
5109
|
|
|
5102
5110
|
// spine-core/src/attachments/PathAttachment.ts
|
|
5103
5111
|
var PathAttachment = class extends VertexAttachment {
|
|
5104
|
-
/** The lengths along the path in the setup pose from the start of the path to the end of each Bezier curve. */
|
|
5105
|
-
lengths = [];
|
|
5106
|
-
/** If true, the start and end knots are connected. */
|
|
5107
|
-
closed = false;
|
|
5108
|
-
/** If true, additional calculations are performed to make calculating positions along the path more accurate. If false, fewer
|
|
5109
|
-
* calculations are performed but calculating positions along the path is less accurate. */
|
|
5110
|
-
constantSpeed = false;
|
|
5111
|
-
/** The color of the path as it was in Spine. Available only when nonessential data was exported. Paths are not usually
|
|
5112
|
-
* rendered at runtime. */
|
|
5113
|
-
color = new Color(1, 1, 1, 1);
|
|
5114
5112
|
constructor(name) {
|
|
5115
5113
|
super(name);
|
|
5114
|
+
/** The lengths along the path in the setup pose from the start of the path to the end of each Bezier curve. */
|
|
5115
|
+
this.lengths = [];
|
|
5116
|
+
/** If true, the start and end knots are connected. */
|
|
5117
|
+
this.closed = false;
|
|
5118
|
+
/** If true, additional calculations are performed to make calculating positions along the path more accurate. If false, fewer
|
|
5119
|
+
* calculations are performed but calculating positions along the path is less accurate. */
|
|
5120
|
+
this.constantSpeed = false;
|
|
5121
|
+
/** The color of the path as it was in Spine. Available only when nonessential data was exported. Paths are not usually
|
|
5122
|
+
* rendered at runtime. */
|
|
5123
|
+
this.color = new Color(1, 1, 1, 1);
|
|
5116
5124
|
}
|
|
5117
5125
|
copy() {
|
|
5118
5126
|
let copy = new PathAttachment(this.name);
|
|
@@ -5128,14 +5136,14 @@ var PathAttachment = class extends VertexAttachment {
|
|
|
5128
5136
|
|
|
5129
5137
|
// spine-core/src/attachments/PointAttachment.ts
|
|
5130
5138
|
var PointAttachment = class extends VertexAttachment {
|
|
5131
|
-
x = 0;
|
|
5132
|
-
y = 0;
|
|
5133
|
-
rotation = 0;
|
|
5134
|
-
/** The color of the point attachment as it was in Spine. Available only when nonessential data was exported. Point attachments
|
|
5135
|
-
* are not usually rendered at runtime. */
|
|
5136
|
-
color = new Color(0.38, 0.94, 0, 1);
|
|
5137
5139
|
constructor(name) {
|
|
5138
5140
|
super(name);
|
|
5141
|
+
this.x = 0;
|
|
5142
|
+
this.y = 0;
|
|
5143
|
+
this.rotation = 0;
|
|
5144
|
+
/** The color of the point attachment as it was in Spine. Available only when nonessential data was exported. Point attachments
|
|
5145
|
+
* are not usually rendered at runtime. */
|
|
5146
|
+
this.color = new Color(0.38, 0.94, 0, 1);
|
|
5139
5147
|
}
|
|
5140
5148
|
computeWorldPosition(bone, point) {
|
|
5141
5149
|
point.x = this.x * bone.a + this.y * bone.b + bone.worldX;
|
|
@@ -5162,34 +5170,32 @@ var PointAttachment = class extends VertexAttachment {
|
|
|
5162
5170
|
|
|
5163
5171
|
// spine-core/src/attachments/RegionAttachment.ts
|
|
5164
5172
|
var _RegionAttachment = class extends Attachment {
|
|
5165
|
-
/** The local x translation. */
|
|
5166
|
-
x = 0;
|
|
5167
|
-
/** The local y translation. */
|
|
5168
|
-
y = 0;
|
|
5169
|
-
/** The local scaleX. */
|
|
5170
|
-
scaleX = 1;
|
|
5171
|
-
/** The local scaleY. */
|
|
5172
|
-
scaleY = 1;
|
|
5173
|
-
/** The local rotation. */
|
|
5174
|
-
rotation = 0;
|
|
5175
|
-
/** The width of the region attachment in Spine. */
|
|
5176
|
-
width = 0;
|
|
5177
|
-
/** The height of the region attachment in Spine. */
|
|
5178
|
-
height = 0;
|
|
5179
|
-
/** The color to tint the region attachment. */
|
|
5180
|
-
color = new Color(1, 1, 1, 1);
|
|
5181
|
-
/** The name of the texture region for this attachment. */
|
|
5182
|
-
path;
|
|
5183
|
-
region = null;
|
|
5184
|
-
sequence = null;
|
|
5185
|
-
/** For each of the 4 vertices, a pair of <code>x,y</code> values that is the local position of the vertex.
|
|
5186
|
-
*
|
|
5187
|
-
* See {@link #updateOffset()}. */
|
|
5188
|
-
offset = Utils.newFloatArray(8);
|
|
5189
|
-
uvs = Utils.newFloatArray(8);
|
|
5190
|
-
tempColor = new Color(1, 1, 1, 1);
|
|
5191
5173
|
constructor(name, path2) {
|
|
5192
5174
|
super(name);
|
|
5175
|
+
/** The local x translation. */
|
|
5176
|
+
this.x = 0;
|
|
5177
|
+
/** The local y translation. */
|
|
5178
|
+
this.y = 0;
|
|
5179
|
+
/** The local scaleX. */
|
|
5180
|
+
this.scaleX = 1;
|
|
5181
|
+
/** The local scaleY. */
|
|
5182
|
+
this.scaleY = 1;
|
|
5183
|
+
/** The local rotation. */
|
|
5184
|
+
this.rotation = 0;
|
|
5185
|
+
/** The width of the region attachment in Spine. */
|
|
5186
|
+
this.width = 0;
|
|
5187
|
+
/** The height of the region attachment in Spine. */
|
|
5188
|
+
this.height = 0;
|
|
5189
|
+
/** The color to tint the region attachment. */
|
|
5190
|
+
this.color = new Color(1, 1, 1, 1);
|
|
5191
|
+
this.region = null;
|
|
5192
|
+
this.sequence = null;
|
|
5193
|
+
/** For each of the 4 vertices, a pair of <code>x,y</code> values that is the local position of the vertex.
|
|
5194
|
+
*
|
|
5195
|
+
* See {@link #updateOffset()}. */
|
|
5196
|
+
this.offset = Utils.newFloatArray(8);
|
|
5197
|
+
this.uvs = Utils.newFloatArray(8);
|
|
5198
|
+
this.tempColor = new Color(1, 1, 1, 1);
|
|
5193
5199
|
this.path = path2;
|
|
5194
5200
|
}
|
|
5195
5201
|
/** Calculates the {@link #offset} using the region settings. Must be called after changing region settings. */
|
|
@@ -5314,42 +5320,41 @@ var _RegionAttachment = class extends Attachment {
|
|
|
5314
5320
|
}
|
|
5315
5321
|
};
|
|
5316
5322
|
var RegionAttachment = _RegionAttachment;
|
|
5317
|
-
|
|
5318
|
-
|
|
5319
|
-
|
|
5320
|
-
|
|
5321
|
-
|
|
5322
|
-
|
|
5323
|
-
|
|
5324
|
-
|
|
5325
|
-
|
|
5326
|
-
|
|
5327
|
-
|
|
5328
|
-
|
|
5329
|
-
|
|
5330
|
-
|
|
5331
|
-
|
|
5332
|
-
|
|
5333
|
-
|
|
5334
|
-
|
|
5335
|
-
|
|
5336
|
-
|
|
5337
|
-
|
|
5338
|
-
|
|
5339
|
-
|
|
5340
|
-
|
|
5341
|
-
|
|
5342
|
-
|
|
5343
|
-
|
|
5344
|
-
|
|
5345
|
-
|
|
5346
|
-
|
|
5347
|
-
|
|
5348
|
-
|
|
5323
|
+
RegionAttachment.X1 = 0;
|
|
5324
|
+
RegionAttachment.Y1 = 1;
|
|
5325
|
+
RegionAttachment.C1R = 2;
|
|
5326
|
+
RegionAttachment.C1G = 3;
|
|
5327
|
+
RegionAttachment.C1B = 4;
|
|
5328
|
+
RegionAttachment.C1A = 5;
|
|
5329
|
+
RegionAttachment.U1 = 6;
|
|
5330
|
+
RegionAttachment.V1 = 7;
|
|
5331
|
+
RegionAttachment.X2 = 8;
|
|
5332
|
+
RegionAttachment.Y2 = 9;
|
|
5333
|
+
RegionAttachment.C2R = 10;
|
|
5334
|
+
RegionAttachment.C2G = 11;
|
|
5335
|
+
RegionAttachment.C2B = 12;
|
|
5336
|
+
RegionAttachment.C2A = 13;
|
|
5337
|
+
RegionAttachment.U2 = 14;
|
|
5338
|
+
RegionAttachment.V2 = 15;
|
|
5339
|
+
RegionAttachment.X3 = 16;
|
|
5340
|
+
RegionAttachment.Y3 = 17;
|
|
5341
|
+
RegionAttachment.C3R = 18;
|
|
5342
|
+
RegionAttachment.C3G = 19;
|
|
5343
|
+
RegionAttachment.C3B = 20;
|
|
5344
|
+
RegionAttachment.C3A = 21;
|
|
5345
|
+
RegionAttachment.U3 = 22;
|
|
5346
|
+
RegionAttachment.V3 = 23;
|
|
5347
|
+
RegionAttachment.X4 = 24;
|
|
5348
|
+
RegionAttachment.Y4 = 25;
|
|
5349
|
+
RegionAttachment.C4R = 26;
|
|
5350
|
+
RegionAttachment.C4G = 27;
|
|
5351
|
+
RegionAttachment.C4B = 28;
|
|
5352
|
+
RegionAttachment.C4A = 29;
|
|
5353
|
+
RegionAttachment.U4 = 30;
|
|
5354
|
+
RegionAttachment.V4 = 31;
|
|
5349
5355
|
|
|
5350
5356
|
// spine-core/src/AtlasAttachmentLoader.ts
|
|
5351
5357
|
var AtlasAttachmentLoader = class {
|
|
5352
|
-
atlas;
|
|
5353
5358
|
constructor(atlas) {
|
|
5354
5359
|
this.atlas = atlas;
|
|
5355
5360
|
}
|
|
@@ -5400,42 +5405,38 @@ var AtlasAttachmentLoader = class {
|
|
|
5400
5405
|
|
|
5401
5406
|
// spine-core/src/BoneData.ts
|
|
5402
5407
|
var BoneData = class {
|
|
5403
|
-
/** The index of the bone in {@link Skeleton#getBones()}. */
|
|
5404
|
-
index = 0;
|
|
5405
|
-
/** The name of the bone, which is unique across all bones in the skeleton. */
|
|
5406
|
-
name;
|
|
5407
|
-
/** @returns May be null. */
|
|
5408
|
-
parent = null;
|
|
5409
|
-
/** The bone's length. */
|
|
5410
|
-
length = 0;
|
|
5411
|
-
/** The local x translation. */
|
|
5412
|
-
x = 0;
|
|
5413
|
-
/** The local y translation. */
|
|
5414
|
-
y = 0;
|
|
5415
|
-
/** The local rotation in degrees, counter clockwise. */
|
|
5416
|
-
rotation = 0;
|
|
5417
|
-
/** The local scaleX. */
|
|
5418
|
-
scaleX = 1;
|
|
5419
|
-
/** The local scaleY. */
|
|
5420
|
-
scaleY = 1;
|
|
5421
|
-
/** The local shearX. */
|
|
5422
|
-
shearX = 0;
|
|
5423
|
-
/** The local shearX. */
|
|
5424
|
-
shearY = 0;
|
|
5425
|
-
/** The transform mode for how parent world transforms affect this bone. */
|
|
5426
|
-
inherit = Inherit.Normal;
|
|
5427
|
-
/** When true, {@link Skeleton#updateWorldTransform()} only updates this bone if the {@link Skeleton#skin} contains this
|
|
5428
|
-
* bone.
|
|
5429
|
-
* @see Skin#bones */
|
|
5430
|
-
skinRequired = false;
|
|
5431
|
-
/** The color of the bone as it was in Spine. Available only when nonessential data was exported. Bones are not usually
|
|
5432
|
-
* rendered at runtime. */
|
|
5433
|
-
color = new Color();
|
|
5434
|
-
/** The bone icon as it was in Spine, or null if nonessential data was not exported. */
|
|
5435
|
-
icon;
|
|
5436
|
-
/** False if the bone was hidden in Spine and nonessential data was exported. Does not affect runtime rendering. */
|
|
5437
|
-
visible = false;
|
|
5438
5408
|
constructor(index, name, parent) {
|
|
5409
|
+
/** The index of the bone in {@link Skeleton#getBones()}. */
|
|
5410
|
+
this.index = 0;
|
|
5411
|
+
/** @returns May be null. */
|
|
5412
|
+
this.parent = null;
|
|
5413
|
+
/** The bone's length. */
|
|
5414
|
+
this.length = 0;
|
|
5415
|
+
/** The local x translation. */
|
|
5416
|
+
this.x = 0;
|
|
5417
|
+
/** The local y translation. */
|
|
5418
|
+
this.y = 0;
|
|
5419
|
+
/** The local rotation in degrees, counter clockwise. */
|
|
5420
|
+
this.rotation = 0;
|
|
5421
|
+
/** The local scaleX. */
|
|
5422
|
+
this.scaleX = 1;
|
|
5423
|
+
/** The local scaleY. */
|
|
5424
|
+
this.scaleY = 1;
|
|
5425
|
+
/** The local shearX. */
|
|
5426
|
+
this.shearX = 0;
|
|
5427
|
+
/** The local shearX. */
|
|
5428
|
+
this.shearY = 0;
|
|
5429
|
+
/** The transform mode for how parent world transforms affect this bone. */
|
|
5430
|
+
this.inherit = Inherit.Normal;
|
|
5431
|
+
/** When true, {@link Skeleton#updateWorldTransform()} only updates this bone if the {@link Skeleton#skin} contains this
|
|
5432
|
+
* bone.
|
|
5433
|
+
* @see Skin#bones */
|
|
5434
|
+
this.skinRequired = false;
|
|
5435
|
+
/** The color of the bone as it was in Spine. Available only when nonessential data was exported. Bones are not usually
|
|
5436
|
+
* rendered at runtime. */
|
|
5437
|
+
this.color = new Color();
|
|
5438
|
+
/** False if the bone was hidden in Spine and nonessential data was exported. Does not affect runtime rendering. */
|
|
5439
|
+
this.visible = false;
|
|
5439
5440
|
if (index < 0) throw new Error('index must be >= 0.');
|
|
5440
5441
|
if (!name) throw new Error('name cannot be null.');
|
|
5441
5442
|
this.index = index;
|
|
@@ -5454,59 +5455,55 @@ var Inherit = /* @__PURE__ */ (Inherit2 => {
|
|
|
5454
5455
|
|
|
5455
5456
|
// spine-core/src/Bone.ts
|
|
5456
5457
|
var Bone = class {
|
|
5457
|
-
/** The bone's setup pose data. */
|
|
5458
|
-
data;
|
|
5459
|
-
/** The skeleton this bone belongs to. */
|
|
5460
|
-
skeleton;
|
|
5461
|
-
/** The parent bone, or null if this is the root bone. */
|
|
5462
|
-
parent = null;
|
|
5463
|
-
/** The immediate children of this bone. */
|
|
5464
|
-
children = new Array();
|
|
5465
|
-
/** The local x translation. */
|
|
5466
|
-
x = 0;
|
|
5467
|
-
/** The local y translation. */
|
|
5468
|
-
y = 0;
|
|
5469
|
-
/** The local rotation in degrees, counter clockwise. */
|
|
5470
|
-
rotation = 0;
|
|
5471
|
-
/** The local scaleX. */
|
|
5472
|
-
scaleX = 0;
|
|
5473
|
-
/** The local scaleY. */
|
|
5474
|
-
scaleY = 0;
|
|
5475
|
-
/** The local shearX. */
|
|
5476
|
-
shearX = 0;
|
|
5477
|
-
/** The local shearY. */
|
|
5478
|
-
shearY = 0;
|
|
5479
|
-
/** The applied local x translation. */
|
|
5480
|
-
ax = 0;
|
|
5481
|
-
/** The applied local y translation. */
|
|
5482
|
-
ay = 0;
|
|
5483
|
-
/** The applied local rotation in degrees, counter clockwise. */
|
|
5484
|
-
arotation = 0;
|
|
5485
|
-
/** The applied local scaleX. */
|
|
5486
|
-
ascaleX = 0;
|
|
5487
|
-
/** The applied local scaleY. */
|
|
5488
|
-
ascaleY = 0;
|
|
5489
|
-
/** The applied local shearX. */
|
|
5490
|
-
ashearX = 0;
|
|
5491
|
-
/** The applied local shearY. */
|
|
5492
|
-
ashearY = 0;
|
|
5493
|
-
/** Part of the world transform matrix for the X axis. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5494
|
-
a = 0;
|
|
5495
|
-
/** Part of the world transform matrix for the Y axis. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5496
|
-
b = 0;
|
|
5497
|
-
/** Part of the world transform matrix for the X axis. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5498
|
-
c = 0;
|
|
5499
|
-
/** Part of the world transform matrix for the Y axis. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5500
|
-
d = 0;
|
|
5501
|
-
/** The world X position. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5502
|
-
worldY = 0;
|
|
5503
|
-
/** The world Y position. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5504
|
-
worldX = 0;
|
|
5505
|
-
inherit = 0 /* Normal */;
|
|
5506
|
-
sorted = false;
|
|
5507
|
-
active = false;
|
|
5508
5458
|
/** @param parent May be null. */
|
|
5509
5459
|
constructor(data, skeleton, parent) {
|
|
5460
|
+
/** The parent bone, or null if this is the root bone. */
|
|
5461
|
+
this.parent = null;
|
|
5462
|
+
/** The immediate children of this bone. */
|
|
5463
|
+
this.children = new Array();
|
|
5464
|
+
/** The local x translation. */
|
|
5465
|
+
this.x = 0;
|
|
5466
|
+
/** The local y translation. */
|
|
5467
|
+
this.y = 0;
|
|
5468
|
+
/** The local rotation in degrees, counter clockwise. */
|
|
5469
|
+
this.rotation = 0;
|
|
5470
|
+
/** The local scaleX. */
|
|
5471
|
+
this.scaleX = 0;
|
|
5472
|
+
/** The local scaleY. */
|
|
5473
|
+
this.scaleY = 0;
|
|
5474
|
+
/** The local shearX. */
|
|
5475
|
+
this.shearX = 0;
|
|
5476
|
+
/** The local shearY. */
|
|
5477
|
+
this.shearY = 0;
|
|
5478
|
+
/** The applied local x translation. */
|
|
5479
|
+
this.ax = 0;
|
|
5480
|
+
/** The applied local y translation. */
|
|
5481
|
+
this.ay = 0;
|
|
5482
|
+
/** The applied local rotation in degrees, counter clockwise. */
|
|
5483
|
+
this.arotation = 0;
|
|
5484
|
+
/** The applied local scaleX. */
|
|
5485
|
+
this.ascaleX = 0;
|
|
5486
|
+
/** The applied local scaleY. */
|
|
5487
|
+
this.ascaleY = 0;
|
|
5488
|
+
/** The applied local shearX. */
|
|
5489
|
+
this.ashearX = 0;
|
|
5490
|
+
/** The applied local shearY. */
|
|
5491
|
+
this.ashearY = 0;
|
|
5492
|
+
/** Part of the world transform matrix for the X axis. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5493
|
+
this.a = 0;
|
|
5494
|
+
/** Part of the world transform matrix for the Y axis. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5495
|
+
this.b = 0;
|
|
5496
|
+
/** Part of the world transform matrix for the X axis. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5497
|
+
this.c = 0;
|
|
5498
|
+
/** Part of the world transform matrix for the Y axis. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5499
|
+
this.d = 0;
|
|
5500
|
+
/** The world X position. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5501
|
+
this.worldY = 0;
|
|
5502
|
+
/** The world Y position. If changed, {@link #updateAppliedTransform()} should be called. */
|
|
5503
|
+
this.worldX = 0;
|
|
5504
|
+
this.inherit = 0 /* Normal */;
|
|
5505
|
+
this.sorted = false;
|
|
5506
|
+
this.active = false;
|
|
5510
5507
|
if (!data) throw new Error('data cannot be null.');
|
|
5511
5508
|
if (!skeleton) throw new Error('skeleton cannot be null.');
|
|
5512
5509
|
this.data = data;
|
|
@@ -5853,14 +5850,12 @@ var ConstraintData = class {
|
|
|
5853
5850
|
|
|
5854
5851
|
// spine-core/src/AssetManagerBase.ts
|
|
5855
5852
|
var AssetManagerBase = class {
|
|
5856
|
-
pathPrefix = '';
|
|
5857
|
-
textureLoader;
|
|
5858
|
-
downloader;
|
|
5859
|
-
assets = {};
|
|
5860
|
-
errors = {};
|
|
5861
|
-
toLoad = 0;
|
|
5862
|
-
loaded = 0;
|
|
5863
5853
|
constructor(textureLoader, pathPrefix = '', downloader = new Downloader()) {
|
|
5854
|
+
this.pathPrefix = '';
|
|
5855
|
+
this.assets = {};
|
|
5856
|
+
this.errors = {};
|
|
5857
|
+
this.toLoad = 0;
|
|
5858
|
+
this.loaded = 0;
|
|
5864
5859
|
this.textureLoader = textureLoader;
|
|
5865
5860
|
this.pathPrefix = pathPrefix;
|
|
5866
5861
|
this.downloader = downloader;
|
|
@@ -5946,7 +5941,12 @@ var AssetManagerBase = class {
|
|
|
5946
5941
|
return null;
|
|
5947
5942
|
})
|
|
5948
5943
|
.then(blob => {
|
|
5949
|
-
return blob
|
|
5944
|
+
return blob
|
|
5945
|
+
? createImageBitmap(blob, {
|
|
5946
|
+
premultiplyAlpha: 'none',
|
|
5947
|
+
colorSpaceConversion: 'none',
|
|
5948
|
+
})
|
|
5949
|
+
: null;
|
|
5950
5950
|
})
|
|
5951
5951
|
.then(bitmap => {
|
|
5952
5952
|
if (bitmap) this.success(success, path2, this.textureLoader(bitmap));
|
|
@@ -6043,8 +6043,10 @@ var AssetManagerBase = class {
|
|
|
6043
6043
|
}
|
|
6044
6044
|
};
|
|
6045
6045
|
var Downloader = class {
|
|
6046
|
-
|
|
6047
|
-
|
|
6046
|
+
constructor() {
|
|
6047
|
+
this.callbacks = {};
|
|
6048
|
+
this.rawDataUris = {};
|
|
6049
|
+
}
|
|
6048
6050
|
dataUriToString(dataUri) {
|
|
6049
6051
|
if (!dataUri.startsWith('data:')) {
|
|
6050
6052
|
throw new Error('Not a data URI.');
|
|
@@ -6148,14 +6150,13 @@ var Downloader = class {
|
|
|
6148
6150
|
|
|
6149
6151
|
// spine-core/src/Event.ts
|
|
6150
6152
|
var Event = class {
|
|
6151
|
-
data;
|
|
6152
|
-
intValue = 0;
|
|
6153
|
-
floatValue = 0;
|
|
6154
|
-
stringValue = null;
|
|
6155
|
-
time = 0;
|
|
6156
|
-
volume = 0;
|
|
6157
|
-
balance = 0;
|
|
6158
6153
|
constructor(time, data) {
|
|
6154
|
+
this.intValue = 0;
|
|
6155
|
+
this.floatValue = 0;
|
|
6156
|
+
this.stringValue = null;
|
|
6157
|
+
this.time = 0;
|
|
6158
|
+
this.volume = 0;
|
|
6159
|
+
this.balance = 0;
|
|
6159
6160
|
if (!data) throw new Error('data cannot be null.');
|
|
6160
6161
|
this.time = time;
|
|
6161
6162
|
this.data = data;
|
|
@@ -6164,39 +6165,32 @@ var Event = class {
|
|
|
6164
6165
|
|
|
6165
6166
|
// spine-core/src/EventData.ts
|
|
6166
6167
|
var EventData = class {
|
|
6167
|
-
name;
|
|
6168
|
-
intValue = 0;
|
|
6169
|
-
floatValue = 0;
|
|
6170
|
-
stringValue = null;
|
|
6171
|
-
audioPath = null;
|
|
6172
|
-
volume = 0;
|
|
6173
|
-
balance = 0;
|
|
6174
6168
|
constructor(name) {
|
|
6169
|
+
this.intValue = 0;
|
|
6170
|
+
this.floatValue = 0;
|
|
6171
|
+
this.stringValue = null;
|
|
6172
|
+
this.audioPath = null;
|
|
6173
|
+
this.volume = 0;
|
|
6174
|
+
this.balance = 0;
|
|
6175
6175
|
this.name = name;
|
|
6176
6176
|
}
|
|
6177
6177
|
};
|
|
6178
6178
|
|
|
6179
6179
|
// spine-core/src/IkConstraint.ts
|
|
6180
6180
|
var IkConstraint = class {
|
|
6181
|
-
/** The IK constraint's setup pose data. */
|
|
6182
|
-
data;
|
|
6183
|
-
/** The bones that will be modified by this IK constraint. */
|
|
6184
|
-
bones;
|
|
6185
|
-
/** The bone that is the IK target. */
|
|
6186
|
-
target;
|
|
6187
|
-
/** Controls the bend direction of the IK bones, either 1 or -1. */
|
|
6188
|
-
bendDirection = 0;
|
|
6189
|
-
/** When true and only a single bone is being constrained, if the target is too close, the bone is scaled to reach it. */
|
|
6190
|
-
compress = false;
|
|
6191
|
-
/** 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
|
|
6192
|
-
* and the parent bone has local nonuniform scale, stretch is not applied. */
|
|
6193
|
-
stretch = false;
|
|
6194
|
-
/** A percentage (0-1) that controls the mix between the constrained and unconstrained rotations. */
|
|
6195
|
-
mix = 1;
|
|
6196
|
-
/** For two bone IK, the distance from the maximum reach of the bones that rotation will slow. */
|
|
6197
|
-
softness = 0;
|
|
6198
|
-
active = false;
|
|
6199
6181
|
constructor(data, skeleton) {
|
|
6182
|
+
/** Controls the bend direction of the IK bones, either 1 or -1. */
|
|
6183
|
+
this.bendDirection = 0;
|
|
6184
|
+
/** When true and only a single bone is being constrained, if the target is too close, the bone is scaled to reach it. */
|
|
6185
|
+
this.compress = false;
|
|
6186
|
+
/** 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
|
|
6187
|
+
* and the parent bone has local nonuniform scale, stretch is not applied. */
|
|
6188
|
+
this.stretch = false;
|
|
6189
|
+
/** A percentage (0-1) that controls the mix between the constrained and unconstrained rotations. */
|
|
6190
|
+
this.mix = 1;
|
|
6191
|
+
/** For two bone IK, the distance from the maximum reach of the bones that rotation will slow. */
|
|
6192
|
+
this.softness = 0;
|
|
6193
|
+
this.active = false;
|
|
6200
6194
|
if (!data) throw new Error('data cannot be null.');
|
|
6201
6195
|
if (!skeleton) throw new Error('skeleton cannot be null.');
|
|
6202
6196
|
this.data = data;
|
|
@@ -6505,10 +6499,27 @@ var IkConstraint = class {
|
|
|
6505
6499
|
|
|
6506
6500
|
// spine-core/src/IkConstraintData.ts
|
|
6507
6501
|
var IkConstraintData = class extends ConstraintData {
|
|
6508
|
-
|
|
6509
|
-
|
|
6510
|
-
|
|
6511
|
-
|
|
6502
|
+
constructor(name) {
|
|
6503
|
+
super(name, 0, false);
|
|
6504
|
+
/** The bones that are constrained by this IK constraint. */
|
|
6505
|
+
this.bones = new Array();
|
|
6506
|
+
/** The bone that is the IK target. */
|
|
6507
|
+
this._target = null;
|
|
6508
|
+
/** Controls the bend direction of the IK bones, either 1 or -1. */
|
|
6509
|
+
this.bendDirection = 0;
|
|
6510
|
+
/** When true and only a single bone is being constrained, if the target is too close, the bone is scaled to reach it. */
|
|
6511
|
+
this.compress = false;
|
|
6512
|
+
/** 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
|
|
6513
|
+
* and the parent bone has local nonuniform scale, stretch is not applied. */
|
|
6514
|
+
this.stretch = false;
|
|
6515
|
+
/** When true, only a single bone is being constrained, and {@link #getCompress()} or {@link #getStretch()} is used, the bone
|
|
6516
|
+
* is scaled on both the X and Y axes. */
|
|
6517
|
+
this.uniform = false;
|
|
6518
|
+
/** A percentage (0-1) that controls the mix between the constrained and unconstrained rotations. */
|
|
6519
|
+
this.mix = 0;
|
|
6520
|
+
/** For two bone IK, the distance from the maximum reach of the bones that rotation will slow. */
|
|
6521
|
+
this.softness = 0;
|
|
6522
|
+
}
|
|
6512
6523
|
set target(boneData) {
|
|
6513
6524
|
this._target = boneData;
|
|
6514
6525
|
}
|
|
@@ -6516,31 +6527,32 @@ var IkConstraintData = class extends ConstraintData {
|
|
|
6516
6527
|
if (!this._target) throw new Error('BoneData not set.');
|
|
6517
6528
|
else return this._target;
|
|
6518
6529
|
}
|
|
6519
|
-
/** Controls the bend direction of the IK bones, either 1 or -1. */
|
|
6520
|
-
bendDirection = 0;
|
|
6521
|
-
/** When true and only a single bone is being constrained, if the target is too close, the bone is scaled to reach it. */
|
|
6522
|
-
compress = false;
|
|
6523
|
-
/** 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
|
|
6524
|
-
* and the parent bone has local nonuniform scale, stretch is not applied. */
|
|
6525
|
-
stretch = false;
|
|
6526
|
-
/** When true, only a single bone is being constrained, and {@link #getCompress()} or {@link #getStretch()} is used, the bone
|
|
6527
|
-
* is scaled on both the X and Y axes. */
|
|
6528
|
-
uniform = false;
|
|
6529
|
-
/** A percentage (0-1) that controls the mix between the constrained and unconstrained rotations. */
|
|
6530
|
-
mix = 0;
|
|
6531
|
-
/** For two bone IK, the distance from the maximum reach of the bones that rotation will slow. */
|
|
6532
|
-
softness = 0;
|
|
6533
|
-
constructor(name) {
|
|
6534
|
-
super(name, 0, false);
|
|
6535
|
-
}
|
|
6536
6530
|
};
|
|
6537
6531
|
|
|
6538
6532
|
// spine-core/src/PathConstraintData.ts
|
|
6539
6533
|
var PathConstraintData = class extends ConstraintData {
|
|
6540
|
-
|
|
6541
|
-
|
|
6542
|
-
|
|
6543
|
-
|
|
6534
|
+
constructor(name) {
|
|
6535
|
+
super(name, 0, false);
|
|
6536
|
+
/** The bones that will be modified by this path constraint. */
|
|
6537
|
+
this.bones = new Array();
|
|
6538
|
+
/** The slot whose path attachment will be used to constrained the bones. */
|
|
6539
|
+
this._target = null;
|
|
6540
|
+
/** The mode for positioning the first bone on the path. */
|
|
6541
|
+
this.positionMode = PositionMode.Fixed;
|
|
6542
|
+
/** The mode for positioning the bones after the first bone on the path. */
|
|
6543
|
+
this.spacingMode = SpacingMode.Fixed;
|
|
6544
|
+
/** The mode for adjusting the rotation of the bones. */
|
|
6545
|
+
this.rotateMode = RotateMode.Chain;
|
|
6546
|
+
/** An offset added to the constrained bone rotation. */
|
|
6547
|
+
this.offsetRotation = 0;
|
|
6548
|
+
/** The position along the path. */
|
|
6549
|
+
this.position = 0;
|
|
6550
|
+
/** The spacing between bones. */
|
|
6551
|
+
this.spacing = 0;
|
|
6552
|
+
this.mixRotate = 0;
|
|
6553
|
+
this.mixX = 0;
|
|
6554
|
+
this.mixY = 0;
|
|
6555
|
+
}
|
|
6544
6556
|
set target(slotData) {
|
|
6545
6557
|
this._target = slotData;
|
|
6546
6558
|
}
|
|
@@ -6548,24 +6560,6 @@ var PathConstraintData = class extends ConstraintData {
|
|
|
6548
6560
|
if (!this._target) throw new Error('SlotData not set.');
|
|
6549
6561
|
else return this._target;
|
|
6550
6562
|
}
|
|
6551
|
-
/** The mode for positioning the first bone on the path. */
|
|
6552
|
-
positionMode = PositionMode.Fixed;
|
|
6553
|
-
/** The mode for positioning the bones after the first bone on the path. */
|
|
6554
|
-
spacingMode = SpacingMode.Fixed;
|
|
6555
|
-
/** The mode for adjusting the rotation of the bones. */
|
|
6556
|
-
rotateMode = RotateMode.Chain;
|
|
6557
|
-
/** An offset added to the constrained bone rotation. */
|
|
6558
|
-
offsetRotation = 0;
|
|
6559
|
-
/** The position along the path. */
|
|
6560
|
-
position = 0;
|
|
6561
|
-
/** The spacing between bones. */
|
|
6562
|
-
spacing = 0;
|
|
6563
|
-
mixRotate = 0;
|
|
6564
|
-
mixX = 0;
|
|
6565
|
-
mixY = 0;
|
|
6566
|
-
constructor(name) {
|
|
6567
|
-
super(name, 0, false);
|
|
6568
|
-
}
|
|
6569
6563
|
};
|
|
6570
6564
|
var PositionMode = /* @__PURE__ */ (PositionMode2 => {
|
|
6571
6565
|
PositionMode2[(PositionMode2['Fixed'] = 0)] = 'Fixed';
|
|
@@ -6588,27 +6582,21 @@ var RotateMode = /* @__PURE__ */ (RotateMode2 => {
|
|
|
6588
6582
|
|
|
6589
6583
|
// spine-core/src/PathConstraint.ts
|
|
6590
6584
|
var _PathConstraint = class {
|
|
6591
|
-
/** The path constraint's setup pose data. */
|
|
6592
|
-
data;
|
|
6593
|
-
/** The bones that will be modified by this path constraint. */
|
|
6594
|
-
bones;
|
|
6595
|
-
/** The slot whose path attachment will be used to constrained the bones. */
|
|
6596
|
-
target;
|
|
6597
|
-
/** The position along the path. */
|
|
6598
|
-
position = 0;
|
|
6599
|
-
/** The spacing between bones. */
|
|
6600
|
-
spacing = 0;
|
|
6601
|
-
mixRotate = 0;
|
|
6602
|
-
mixX = 0;
|
|
6603
|
-
mixY = 0;
|
|
6604
|
-
spaces = new Array();
|
|
6605
|
-
positions = new Array();
|
|
6606
|
-
world = new Array();
|
|
6607
|
-
curves = new Array();
|
|
6608
|
-
lengths = new Array();
|
|
6609
|
-
segments = new Array();
|
|
6610
|
-
active = false;
|
|
6611
6585
|
constructor(data, skeleton) {
|
|
6586
|
+
/** The position along the path. */
|
|
6587
|
+
this.position = 0;
|
|
6588
|
+
/** The spacing between bones. */
|
|
6589
|
+
this.spacing = 0;
|
|
6590
|
+
this.mixRotate = 0;
|
|
6591
|
+
this.mixX = 0;
|
|
6592
|
+
this.mixY = 0;
|
|
6593
|
+
this.spaces = new Array();
|
|
6594
|
+
this.positions = new Array();
|
|
6595
|
+
this.world = new Array();
|
|
6596
|
+
this.curves = new Array();
|
|
6597
|
+
this.lengths = new Array();
|
|
6598
|
+
this.segments = new Array();
|
|
6599
|
+
this.active = false;
|
|
6612
6600
|
if (!data) throw new Error('data cannot be null.');
|
|
6613
6601
|
if (!skeleton) throw new Error('skeleton cannot be null.');
|
|
6614
6602
|
this.data = data;
|
|
@@ -7055,50 +7043,40 @@ var _PathConstraint = class {
|
|
|
7055
7043
|
}
|
|
7056
7044
|
};
|
|
7057
7045
|
var PathConstraint = _PathConstraint;
|
|
7058
|
-
|
|
7059
|
-
|
|
7060
|
-
|
|
7061
|
-
|
|
7046
|
+
PathConstraint.NONE = -1;
|
|
7047
|
+
PathConstraint.BEFORE = -2;
|
|
7048
|
+
PathConstraint.AFTER = -3;
|
|
7049
|
+
PathConstraint.epsilon = 1e-5;
|
|
7062
7050
|
|
|
7063
7051
|
// spine-core/src/PhysicsConstraint.ts
|
|
7064
7052
|
var PhysicsConstraint = class {
|
|
7065
|
-
data;
|
|
7066
|
-
_bone = null;
|
|
7067
|
-
/** The bone constrained by this physics constraint. */
|
|
7068
|
-
set bone(bone) {
|
|
7069
|
-
this._bone = bone;
|
|
7070
|
-
}
|
|
7071
|
-
get bone() {
|
|
7072
|
-
if (!this._bone) throw new Error('Bone not set.');
|
|
7073
|
-
else return this._bone;
|
|
7074
|
-
}
|
|
7075
|
-
inertia = 0;
|
|
7076
|
-
strength = 0;
|
|
7077
|
-
damping = 0;
|
|
7078
|
-
massInverse = 0;
|
|
7079
|
-
wind = 0;
|
|
7080
|
-
gravity = 0;
|
|
7081
|
-
mix = 0;
|
|
7082
|
-
_reset = true;
|
|
7083
|
-
ux = 0;
|
|
7084
|
-
uy = 0;
|
|
7085
|
-
cx = 0;
|
|
7086
|
-
cy = 0;
|
|
7087
|
-
tx = 0;
|
|
7088
|
-
ty = 0;
|
|
7089
|
-
xOffset = 0;
|
|
7090
|
-
xVelocity = 0;
|
|
7091
|
-
yOffset = 0;
|
|
7092
|
-
yVelocity = 0;
|
|
7093
|
-
rotateOffset = 0;
|
|
7094
|
-
rotateVelocity = 0;
|
|
7095
|
-
scaleOffset = 0;
|
|
7096
|
-
scaleVelocity = 0;
|
|
7097
|
-
active = false;
|
|
7098
|
-
skeleton;
|
|
7099
|
-
remaining = 0;
|
|
7100
|
-
lastTime = 0;
|
|
7101
7053
|
constructor(data, skeleton) {
|
|
7054
|
+
this._bone = null;
|
|
7055
|
+
this.inertia = 0;
|
|
7056
|
+
this.strength = 0;
|
|
7057
|
+
this.damping = 0;
|
|
7058
|
+
this.massInverse = 0;
|
|
7059
|
+
this.wind = 0;
|
|
7060
|
+
this.gravity = 0;
|
|
7061
|
+
this.mix = 0;
|
|
7062
|
+
this._reset = true;
|
|
7063
|
+
this.ux = 0;
|
|
7064
|
+
this.uy = 0;
|
|
7065
|
+
this.cx = 0;
|
|
7066
|
+
this.cy = 0;
|
|
7067
|
+
this.tx = 0;
|
|
7068
|
+
this.ty = 0;
|
|
7069
|
+
this.xOffset = 0;
|
|
7070
|
+
this.xVelocity = 0;
|
|
7071
|
+
this.yOffset = 0;
|
|
7072
|
+
this.yVelocity = 0;
|
|
7073
|
+
this.rotateOffset = 0;
|
|
7074
|
+
this.rotateVelocity = 0;
|
|
7075
|
+
this.scaleOffset = 0;
|
|
7076
|
+
this.scaleVelocity = 0;
|
|
7077
|
+
this.active = false;
|
|
7078
|
+
this.remaining = 0;
|
|
7079
|
+
this.lastTime = 0;
|
|
7102
7080
|
this.data = data;
|
|
7103
7081
|
this.skeleton = skeleton;
|
|
7104
7082
|
this.bone = skeleton.bones[data.bone.index];
|
|
@@ -7110,6 +7088,14 @@ var PhysicsConstraint = class {
|
|
|
7110
7088
|
this.gravity = data.gravity;
|
|
7111
7089
|
this.mix = data.mix;
|
|
7112
7090
|
}
|
|
7091
|
+
/** The bone constrained by this physics constraint. */
|
|
7092
|
+
set bone(bone) {
|
|
7093
|
+
this._bone = bone;
|
|
7094
|
+
}
|
|
7095
|
+
get bone() {
|
|
7096
|
+
if (!this._bone) throw new Error('Bone not set.');
|
|
7097
|
+
else return this._bone;
|
|
7098
|
+
}
|
|
7113
7099
|
reset() {
|
|
7114
7100
|
this.remaining = 0;
|
|
7115
7101
|
this.lastTime = this.skeleton.time;
|
|
@@ -7335,27 +7321,20 @@ var PhysicsConstraint = class {
|
|
|
7335
7321
|
|
|
7336
7322
|
// spine-core/src/Slot.ts
|
|
7337
7323
|
var Slot = class {
|
|
7338
|
-
/** The slot's setup pose data. */
|
|
7339
|
-
data;
|
|
7340
|
-
/** The bone this slot belongs to. */
|
|
7341
|
-
bone;
|
|
7342
|
-
/** The color used to tint the slot's attachment. If {@link #getDarkColor()} is set, this is used as the light color for two
|
|
7343
|
-
* color tinting. */
|
|
7344
|
-
color;
|
|
7345
|
-
/** 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
|
|
7346
|
-
* color's alpha is not used. */
|
|
7347
|
-
darkColor = null;
|
|
7348
|
-
attachment = null;
|
|
7349
|
-
attachmentState = 0;
|
|
7350
|
-
/** The index of the texture region to display when the slot's attachment has a {@link Sequence}. -1 represents the
|
|
7351
|
-
* {@link Sequence#getSetupIndex()}. */
|
|
7352
|
-
sequenceIndex = -1;
|
|
7353
|
-
/** Values to deform the slot's attachment. For an unweighted mesh, the entries are local positions for each vertex. For a
|
|
7354
|
-
* weighted mesh, the entries are an offset for each vertex which will be added to the mesh's local vertex positions.
|
|
7355
|
-
*
|
|
7356
|
-
* See {@link VertexAttachment#computeWorldVertices()} and {@link DeformTimeline}. */
|
|
7357
|
-
deform = new Array();
|
|
7358
7324
|
constructor(data, bone) {
|
|
7325
|
+
/** 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
|
|
7326
|
+
* color's alpha is not used. */
|
|
7327
|
+
this.darkColor = null;
|
|
7328
|
+
this.attachment = null;
|
|
7329
|
+
this.attachmentState = 0;
|
|
7330
|
+
/** The index of the texture region to display when the slot's attachment has a {@link Sequence}. -1 represents the
|
|
7331
|
+
* {@link Sequence#getSetupIndex()}. */
|
|
7332
|
+
this.sequenceIndex = -1;
|
|
7333
|
+
/** Values to deform the slot's attachment. For an unweighted mesh, the entries are local positions for each vertex. For a
|
|
7334
|
+
* weighted mesh, the entries are an offset for each vertex which will be added to the mesh's local vertex positions.
|
|
7335
|
+
*
|
|
7336
|
+
* See {@link VertexAttachment#computeWorldVertices()} and {@link DeformTimeline}. */
|
|
7337
|
+
this.deform = new Array();
|
|
7359
7338
|
if (!data) throw new Error('data cannot be null.');
|
|
7360
7339
|
if (!bone) throw new Error('bone cannot be null.');
|
|
7361
7340
|
this.data = data;
|
|
@@ -7401,21 +7380,15 @@ var Slot = class {
|
|
|
7401
7380
|
|
|
7402
7381
|
// spine-core/src/TransformConstraint.ts
|
|
7403
7382
|
var TransformConstraint = class {
|
|
7404
|
-
/** The transform constraint's setup pose data. */
|
|
7405
|
-
data;
|
|
7406
|
-
/** The bones that will be modified by this transform constraint. */
|
|
7407
|
-
bones;
|
|
7408
|
-
/** The target bone whose world transform will be copied to the constrained bones. */
|
|
7409
|
-
target;
|
|
7410
|
-
mixRotate = 0;
|
|
7411
|
-
mixX = 0;
|
|
7412
|
-
mixY = 0;
|
|
7413
|
-
mixScaleX = 0;
|
|
7414
|
-
mixScaleY = 0;
|
|
7415
|
-
mixShearY = 0;
|
|
7416
|
-
temp = new Vector2();
|
|
7417
|
-
active = false;
|
|
7418
7383
|
constructor(data, skeleton) {
|
|
7384
|
+
this.mixRotate = 0;
|
|
7385
|
+
this.mixX = 0;
|
|
7386
|
+
this.mixY = 0;
|
|
7387
|
+
this.mixScaleX = 0;
|
|
7388
|
+
this.mixScaleY = 0;
|
|
7389
|
+
this.mixShearY = 0;
|
|
7390
|
+
this.temp = new Vector2();
|
|
7391
|
+
this.active = false;
|
|
7419
7392
|
if (!data) throw new Error('data cannot be null.');
|
|
7420
7393
|
if (!skeleton) throw new Error('skeleton cannot be null.');
|
|
7421
7394
|
this.data = data;
|
|
@@ -7650,49 +7623,25 @@ var TransformConstraint = class {
|
|
|
7650
7623
|
|
|
7651
7624
|
// spine-core/src/Skeleton.ts
|
|
7652
7625
|
var _Skeleton = class {
|
|
7653
|
-
/** The skeleton's setup pose data. */
|
|
7654
|
-
data;
|
|
7655
|
-
/** The skeleton's bones, sorted parent first. The root bone is always the first bone. */
|
|
7656
|
-
bones;
|
|
7657
|
-
/** The skeleton's slots in the setup pose draw order. */
|
|
7658
|
-
slots;
|
|
7659
|
-
/** The skeleton's slots in the order they should be drawn. The returned array may be modified to change the draw order. */
|
|
7660
|
-
drawOrder;
|
|
7661
|
-
/** The skeleton's IK constraints. */
|
|
7662
|
-
ikConstraints;
|
|
7663
|
-
/** The skeleton's transform constraints. */
|
|
7664
|
-
transformConstraints;
|
|
7665
|
-
/** The skeleton's path constraints. */
|
|
7666
|
-
pathConstraints;
|
|
7667
|
-
/** The skeleton's physics constraints. */
|
|
7668
|
-
physicsConstraints;
|
|
7669
|
-
/** The list of bones and constraints, sorted in the order they should be updated, as computed by {@link #updateCache()}. */
|
|
7670
|
-
_updateCache = new Array();
|
|
7671
|
-
/** The skeleton's current skin. May be null. */
|
|
7672
|
-
skin = null;
|
|
7673
|
-
/** The color to tint all the skeleton's attachments. */
|
|
7674
|
-
color;
|
|
7675
|
-
/** Scales the entire skeleton on the X axis. This affects all bones, even if the bone's transform mode disallows scale
|
|
7676
|
-
* inheritance. */
|
|
7677
|
-
scaleX = 1;
|
|
7678
|
-
/** Scales the entire skeleton on the Y axis. This affects all bones, even if the bone's transform mode disallows scale
|
|
7679
|
-
* inheritance. */
|
|
7680
|
-
_scaleY = 1;
|
|
7681
|
-
get scaleY() {
|
|
7682
|
-
return _Skeleton.yDown ? -this._scaleY : this._scaleY;
|
|
7683
|
-
}
|
|
7684
|
-
set scaleY(scaleY) {
|
|
7685
|
-
this._scaleY = scaleY;
|
|
7686
|
-
}
|
|
7687
|
-
/** Sets the skeleton X position, which is added to the root bone worldX position. */
|
|
7688
|
-
x = 0;
|
|
7689
|
-
/** Sets the skeleton Y position, which is added to the root bone worldY position. */
|
|
7690
|
-
y = 0;
|
|
7691
|
-
/** Returns the skeleton's time. This is used for time-based manipulations, such as {@link PhysicsConstraint}.
|
|
7692
|
-
* <p>
|
|
7693
|
-
* See {@link #update(float)}. */
|
|
7694
|
-
time = 0;
|
|
7695
7626
|
constructor(data) {
|
|
7627
|
+
/** The list of bones and constraints, sorted in the order they should be updated, as computed by {@link #updateCache()}. */
|
|
7628
|
+
this._updateCache = new Array();
|
|
7629
|
+
/** The skeleton's current skin. May be null. */
|
|
7630
|
+
this.skin = null;
|
|
7631
|
+
/** Scales the entire skeleton on the X axis. This affects all bones, even if the bone's transform mode disallows scale
|
|
7632
|
+
* inheritance. */
|
|
7633
|
+
this.scaleX = 1;
|
|
7634
|
+
/** Scales the entire skeleton on the Y axis. This affects all bones, even if the bone's transform mode disallows scale
|
|
7635
|
+
* inheritance. */
|
|
7636
|
+
this._scaleY = 1;
|
|
7637
|
+
/** Sets the skeleton X position, which is added to the root bone worldX position. */
|
|
7638
|
+
this.x = 0;
|
|
7639
|
+
/** Sets the skeleton Y position, which is added to the root bone worldY position. */
|
|
7640
|
+
this.y = 0;
|
|
7641
|
+
/** Returns the skeleton's time. This is used for time-based manipulations, such as {@link PhysicsConstraint}.
|
|
7642
|
+
* <p>
|
|
7643
|
+
* See {@link #update(float)}. */
|
|
7644
|
+
this.time = 0;
|
|
7696
7645
|
if (!data) throw new Error('data cannot be null.');
|
|
7697
7646
|
this.data = data;
|
|
7698
7647
|
this.bones = new Array();
|
|
@@ -7739,6 +7688,12 @@ var _Skeleton = class {
|
|
|
7739
7688
|
this.color = new Color(1, 1, 1, 1);
|
|
7740
7689
|
this.updateCache();
|
|
7741
7690
|
}
|
|
7691
|
+
get scaleY() {
|
|
7692
|
+
return _Skeleton.yDown ? -this._scaleY : this._scaleY;
|
|
7693
|
+
}
|
|
7694
|
+
set scaleY(scaleY) {
|
|
7695
|
+
this._scaleY = scaleY;
|
|
7696
|
+
}
|
|
7742
7697
|
/** Caches information about bones and constraints. Must be called if the {@link #getSkin()} is modified or if bones,
|
|
7743
7698
|
* constraints, or weighted path attachments are added or removed. */
|
|
7744
7699
|
updateCache() {
|
|
@@ -8104,28 +8059,36 @@ var _Skeleton = class {
|
|
|
8104
8059
|
* than to call it repeatedly.
|
|
8105
8060
|
* @return May be null. */
|
|
8106
8061
|
findIkConstraint(constraintName) {
|
|
8062
|
+
var _a;
|
|
8107
8063
|
if (!constraintName) throw new Error('constraintName cannot be null.');
|
|
8108
|
-
return this.ikConstraints.find(constraint => constraint.data.name == constraintName)
|
|
8064
|
+
return (_a = this.ikConstraints.find(constraint => constraint.data.name == constraintName)) != null ? _a : null;
|
|
8109
8065
|
}
|
|
8110
8066
|
/** Finds a transform constraint by comparing each transform constraint's name. It is more efficient to cache the results of
|
|
8111
8067
|
* this method than to call it repeatedly.
|
|
8112
8068
|
* @return May be null. */
|
|
8113
8069
|
findTransformConstraint(constraintName) {
|
|
8070
|
+
var _a;
|
|
8114
8071
|
if (!constraintName) throw new Error('constraintName cannot be null.');
|
|
8115
|
-
return this.transformConstraints.find(constraint => constraint.data.name == constraintName)
|
|
8072
|
+
return (_a = this.transformConstraints.find(constraint => constraint.data.name == constraintName)) != null
|
|
8073
|
+
? _a
|
|
8074
|
+
: null;
|
|
8116
8075
|
}
|
|
8117
8076
|
/** Finds a path constraint by comparing each path constraint's name. It is more efficient to cache the results of this method
|
|
8118
8077
|
* than to call it repeatedly.
|
|
8119
8078
|
* @return May be null. */
|
|
8120
8079
|
findPathConstraint(constraintName) {
|
|
8080
|
+
var _a;
|
|
8121
8081
|
if (!constraintName) throw new Error('constraintName cannot be null.');
|
|
8122
|
-
return this.pathConstraints.find(constraint => constraint.data.name == constraintName)
|
|
8082
|
+
return (_a = this.pathConstraints.find(constraint => constraint.data.name == constraintName)) != null ? _a : null;
|
|
8123
8083
|
}
|
|
8124
8084
|
/** Finds a physics constraint by comparing each physics constraint's name. It is more efficient to cache the results of this
|
|
8125
8085
|
* method than to call it repeatedly. */
|
|
8126
8086
|
findPhysicsConstraint(constraintName) {
|
|
8087
|
+
var _a;
|
|
8127
8088
|
if (constraintName == null) throw new Error('constraintName cannot be null.');
|
|
8128
|
-
return this.physicsConstraints.find(constraint => constraint.data.name == constraintName)
|
|
8089
|
+
return (_a = this.physicsConstraints.find(constraint => constraint.data.name == constraintName)) != null
|
|
8090
|
+
? _a
|
|
8091
|
+
: null;
|
|
8129
8092
|
}
|
|
8130
8093
|
/** Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose as `{ x: number, y: number, width: number, height: number }`.
|
|
8131
8094
|
* Note that this method will create temporary objects which can add to garbage collection pressure. Use `getBounds()` if garbage collection is a concern. */
|
|
@@ -8206,8 +8169,8 @@ var _Skeleton = class {
|
|
|
8206
8169
|
}
|
|
8207
8170
|
};
|
|
8208
8171
|
var Skeleton = _Skeleton;
|
|
8209
|
-
|
|
8210
|
-
|
|
8172
|
+
Skeleton.quadTriangles = [0, 1, 2, 2, 3, 0];
|
|
8173
|
+
Skeleton.yDown = false;
|
|
8211
8174
|
var Physics = /* @__PURE__ */ (Physics2 => {
|
|
8212
8175
|
Physics2[(Physics2['none'] = 0)] = 'none';
|
|
8213
8176
|
Physics2[(Physics2['reset'] = 1)] = 'reset';
|
|
@@ -8218,7 +8181,32 @@ var Physics = /* @__PURE__ */ (Physics2 => {
|
|
|
8218
8181
|
|
|
8219
8182
|
// spine-core/src/PhysicsConstraintData.ts
|
|
8220
8183
|
var PhysicsConstraintData = class extends ConstraintData {
|
|
8221
|
-
|
|
8184
|
+
constructor(name) {
|
|
8185
|
+
super(name, 0, false);
|
|
8186
|
+
this._bone = null;
|
|
8187
|
+
this.x = 0;
|
|
8188
|
+
this.y = 0;
|
|
8189
|
+
this.rotate = 0;
|
|
8190
|
+
this.scaleX = 0;
|
|
8191
|
+
this.shearX = 0;
|
|
8192
|
+
this.limit = 0;
|
|
8193
|
+
this.step = 0;
|
|
8194
|
+
this.inertia = 0;
|
|
8195
|
+
this.strength = 0;
|
|
8196
|
+
this.damping = 0;
|
|
8197
|
+
this.massInverse = 0;
|
|
8198
|
+
this.wind = 0;
|
|
8199
|
+
this.gravity = 0;
|
|
8200
|
+
/** A percentage (0-1) that controls the mix between the constrained and unconstrained poses. */
|
|
8201
|
+
this.mix = 0;
|
|
8202
|
+
this.inertiaGlobal = false;
|
|
8203
|
+
this.strengthGlobal = false;
|
|
8204
|
+
this.dampingGlobal = false;
|
|
8205
|
+
this.massGlobal = false;
|
|
8206
|
+
this.windGlobal = false;
|
|
8207
|
+
this.gravityGlobal = false;
|
|
8208
|
+
this.mixGlobal = false;
|
|
8209
|
+
}
|
|
8222
8210
|
/** The bone constrained by this physics constraint. */
|
|
8223
8211
|
set bone(boneData) {
|
|
8224
8212
|
this._bone = boneData;
|
|
@@ -8227,83 +8215,60 @@ var PhysicsConstraintData = class extends ConstraintData {
|
|
|
8227
8215
|
if (!this._bone) throw new Error('BoneData not set.');
|
|
8228
8216
|
else return this._bone;
|
|
8229
8217
|
}
|
|
8230
|
-
x = 0;
|
|
8231
|
-
y = 0;
|
|
8232
|
-
rotate = 0;
|
|
8233
|
-
scaleX = 0;
|
|
8234
|
-
shearX = 0;
|
|
8235
|
-
limit = 0;
|
|
8236
|
-
step = 0;
|
|
8237
|
-
inertia = 0;
|
|
8238
|
-
strength = 0;
|
|
8239
|
-
damping = 0;
|
|
8240
|
-
massInverse = 0;
|
|
8241
|
-
wind = 0;
|
|
8242
|
-
gravity = 0;
|
|
8243
|
-
/** A percentage (0-1) that controls the mix between the constrained and unconstrained poses. */
|
|
8244
|
-
mix = 0;
|
|
8245
|
-
inertiaGlobal = false;
|
|
8246
|
-
strengthGlobal = false;
|
|
8247
|
-
dampingGlobal = false;
|
|
8248
|
-
massGlobal = false;
|
|
8249
|
-
windGlobal = false;
|
|
8250
|
-
gravityGlobal = false;
|
|
8251
|
-
mixGlobal = false;
|
|
8252
|
-
constructor(name) {
|
|
8253
|
-
super(name, 0, false);
|
|
8254
|
-
}
|
|
8255
8218
|
};
|
|
8256
8219
|
|
|
8257
8220
|
// spine-core/src/SkeletonData.ts
|
|
8258
8221
|
var SkeletonData = class {
|
|
8259
|
-
|
|
8260
|
-
|
|
8261
|
-
|
|
8262
|
-
|
|
8263
|
-
|
|
8264
|
-
|
|
8265
|
-
|
|
8266
|
-
|
|
8267
|
-
|
|
8268
|
-
|
|
8269
|
-
|
|
8270
|
-
|
|
8271
|
-
|
|
8272
|
-
|
|
8273
|
-
|
|
8274
|
-
|
|
8275
|
-
|
|
8276
|
-
|
|
8277
|
-
|
|
8278
|
-
|
|
8279
|
-
|
|
8280
|
-
|
|
8281
|
-
|
|
8282
|
-
|
|
8283
|
-
|
|
8284
|
-
|
|
8285
|
-
|
|
8286
|
-
|
|
8287
|
-
|
|
8288
|
-
|
|
8289
|
-
|
|
8290
|
-
|
|
8291
|
-
|
|
8292
|
-
|
|
8293
|
-
|
|
8294
|
-
|
|
8295
|
-
|
|
8296
|
-
|
|
8297
|
-
|
|
8298
|
-
|
|
8299
|
-
|
|
8300
|
-
|
|
8301
|
-
|
|
8302
|
-
|
|
8303
|
-
|
|
8304
|
-
|
|
8305
|
-
|
|
8306
|
-
|
|
8222
|
+
constructor() {
|
|
8223
|
+
/** The skeleton's name, which by default is the name of the skeleton data file, if possible. May be null. */
|
|
8224
|
+
this.name = null;
|
|
8225
|
+
/** The skeleton's bones, sorted parent first. The root bone is always the first bone. */
|
|
8226
|
+
this.bones = new Array();
|
|
8227
|
+
// Ordered parents first.
|
|
8228
|
+
/** The skeleton's slots in the setup pose draw order. */
|
|
8229
|
+
this.slots = new Array();
|
|
8230
|
+
// Setup pose draw order.
|
|
8231
|
+
this.skins = new Array();
|
|
8232
|
+
/** The skeleton's default skin. By default this skin contains all attachments that were not in a skin in Spine.
|
|
8233
|
+
*
|
|
8234
|
+
* See {@link Skeleton#getAttachmentByName()}.
|
|
8235
|
+
* May be null. */
|
|
8236
|
+
this.defaultSkin = null;
|
|
8237
|
+
/** The skeleton's events. */
|
|
8238
|
+
this.events = new Array();
|
|
8239
|
+
/** The skeleton's animations. */
|
|
8240
|
+
this.animations = new Array();
|
|
8241
|
+
/** The skeleton's IK constraints. */
|
|
8242
|
+
this.ikConstraints = new Array();
|
|
8243
|
+
/** The skeleton's transform constraints. */
|
|
8244
|
+
this.transformConstraints = new Array();
|
|
8245
|
+
/** The skeleton's path constraints. */
|
|
8246
|
+
this.pathConstraints = new Array();
|
|
8247
|
+
/** The skeleton's physics constraints. */
|
|
8248
|
+
this.physicsConstraints = new Array();
|
|
8249
|
+
/** The X coordinate of the skeleton's axis aligned bounding box in the setup pose. */
|
|
8250
|
+
this.x = 0;
|
|
8251
|
+
/** The Y coordinate of the skeleton's axis aligned bounding box in the setup pose. */
|
|
8252
|
+
this.y = 0;
|
|
8253
|
+
/** The width of the skeleton's axis aligned bounding box in the setup pose. */
|
|
8254
|
+
this.width = 0;
|
|
8255
|
+
/** The height of the skeleton's axis aligned bounding box in the setup pose. */
|
|
8256
|
+
this.height = 0;
|
|
8257
|
+
/** Baseline scale factor for applying distance-dependent effects on non-scalable properties, such as angle or scale. Default
|
|
8258
|
+
* is 100. */
|
|
8259
|
+
this.referenceScale = 100;
|
|
8260
|
+
/** The Spine version used to export the skeleton data, or null. */
|
|
8261
|
+
this.version = null;
|
|
8262
|
+
/** The skeleton data hash. This value will change if any of the skeleton data has changed. May be null. */
|
|
8263
|
+
this.hash = null;
|
|
8264
|
+
// Nonessential
|
|
8265
|
+
/** The dopesheet FPS in Spine. Available only when nonessential data was exported. */
|
|
8266
|
+
this.fps = 0;
|
|
8267
|
+
/** The path to the images directory as defined in Spine. Available only when nonessential data was exported. May be null. */
|
|
8268
|
+
this.imagesPath = null;
|
|
8269
|
+
/** The path to the audio directory as defined in Spine. Available only when nonessential data was exported. May be null. */
|
|
8270
|
+
this.audioPath = null;
|
|
8271
|
+
}
|
|
8307
8272
|
/** Finds a bone by comparing each bone's name. It is more efficient to cache the results of this method than to call it
|
|
8308
8273
|
* multiple times.
|
|
8309
8274
|
* @returns May be null. */
|
|
@@ -8423,15 +8388,13 @@ var SkinEntry = class {
|
|
|
8423
8388
|
}
|
|
8424
8389
|
};
|
|
8425
8390
|
var Skin = class {
|
|
8426
|
-
/** The skin's name, which is unique across all skins in the skeleton. */
|
|
8427
|
-
name;
|
|
8428
|
-
attachments = new Array();
|
|
8429
|
-
bones = Array();
|
|
8430
|
-
constraints = new Array();
|
|
8431
|
-
/** The color of the skin as it was in Spine, or a default color if nonessential data was not exported. */
|
|
8432
|
-
color = new Color(0.99607843, 0.61960787, 0.30980393, 1);
|
|
8433
8391
|
// fe9e4fff
|
|
8434
8392
|
constructor(name) {
|
|
8393
|
+
this.attachments = new Array();
|
|
8394
|
+
this.bones = Array();
|
|
8395
|
+
this.constraints = new Array();
|
|
8396
|
+
/** The color of the skin as it was in Spine, or a default color if nonessential data was not exported. */
|
|
8397
|
+
this.color = new Color(0.99607843, 0.61960787, 0.30980393, 1);
|
|
8435
8398
|
if (!name) throw new Error('name cannot be null.');
|
|
8436
8399
|
this.name = name;
|
|
8437
8400
|
}
|
|
@@ -8575,25 +8538,21 @@ var Skin = class {
|
|
|
8575
8538
|
|
|
8576
8539
|
// spine-core/src/SlotData.ts
|
|
8577
8540
|
var SlotData = class {
|
|
8578
|
-
/** The index of the slot in {@link Skeleton#getSlots()}. */
|
|
8579
|
-
index = 0;
|
|
8580
|
-
/** The name of the slot, which is unique across all slots in the skeleton. */
|
|
8581
|
-
name;
|
|
8582
|
-
/** The bone this slot belongs to. */
|
|
8583
|
-
boneData;
|
|
8584
|
-
/** The color used to tint the slot's attachment. If {@link #getDarkColor()} is set, this is used as the light color for two
|
|
8585
|
-
* color tinting. */
|
|
8586
|
-
color = new Color(1, 1, 1, 1);
|
|
8587
|
-
/** 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
|
|
8588
|
-
* color's alpha is not used. */
|
|
8589
|
-
darkColor = null;
|
|
8590
|
-
/** The name of the attachment that is visible for this slot in the setup pose, or null if no attachment is visible. */
|
|
8591
|
-
attachmentName = null;
|
|
8592
|
-
/** The blend mode for drawing the slot's attachment. */
|
|
8593
|
-
blendMode = BlendMode.Normal;
|
|
8594
|
-
/** False if the slot was hidden in Spine and nonessential data was exported. Does not affect runtime rendering. */
|
|
8595
|
-
visible = true;
|
|
8596
8541
|
constructor(index, name, boneData) {
|
|
8542
|
+
/** The index of the slot in {@link Skeleton#getSlots()}. */
|
|
8543
|
+
this.index = 0;
|
|
8544
|
+
/** The color used to tint the slot's attachment. If {@link #getDarkColor()} is set, this is used as the light color for two
|
|
8545
|
+
* color tinting. */
|
|
8546
|
+
this.color = new Color(1, 1, 1, 1);
|
|
8547
|
+
/** 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
|
|
8548
|
+
* color's alpha is not used. */
|
|
8549
|
+
this.darkColor = null;
|
|
8550
|
+
/** The name of the attachment that is visible for this slot in the setup pose, or null if no attachment is visible. */
|
|
8551
|
+
this.attachmentName = null;
|
|
8552
|
+
/** The blend mode for drawing the slot's attachment. */
|
|
8553
|
+
this.blendMode = BlendMode.Normal;
|
|
8554
|
+
/** False if the slot was hidden in Spine and nonessential data was exported. Does not affect runtime rendering. */
|
|
8555
|
+
this.visible = true;
|
|
8597
8556
|
if (index < 0) throw new Error('index must be >= 0.');
|
|
8598
8557
|
if (!name) throw new Error('name cannot be null.');
|
|
8599
8558
|
if (!boneData) throw new Error('boneData cannot be null.');
|
|
@@ -8612,10 +8571,33 @@ var BlendMode = /* @__PURE__ */ (BlendMode2 => {
|
|
|
8612
8571
|
|
|
8613
8572
|
// spine-core/src/TransformConstraintData.ts
|
|
8614
8573
|
var TransformConstraintData = class extends ConstraintData {
|
|
8615
|
-
|
|
8616
|
-
|
|
8617
|
-
|
|
8618
|
-
|
|
8574
|
+
constructor(name) {
|
|
8575
|
+
super(name, 0, false);
|
|
8576
|
+
/** The bones that will be modified by this transform constraint. */
|
|
8577
|
+
this.bones = new Array();
|
|
8578
|
+
/** The target bone whose world transform will be copied to the constrained bones. */
|
|
8579
|
+
this._target = null;
|
|
8580
|
+
this.mixRotate = 0;
|
|
8581
|
+
this.mixX = 0;
|
|
8582
|
+
this.mixY = 0;
|
|
8583
|
+
this.mixScaleX = 0;
|
|
8584
|
+
this.mixScaleY = 0;
|
|
8585
|
+
this.mixShearY = 0;
|
|
8586
|
+
/** An offset added to the constrained bone rotation. */
|
|
8587
|
+
this.offsetRotation = 0;
|
|
8588
|
+
/** An offset added to the constrained bone X translation. */
|
|
8589
|
+
this.offsetX = 0;
|
|
8590
|
+
/** An offset added to the constrained bone Y translation. */
|
|
8591
|
+
this.offsetY = 0;
|
|
8592
|
+
/** An offset added to the constrained bone scaleX. */
|
|
8593
|
+
this.offsetScaleX = 0;
|
|
8594
|
+
/** An offset added to the constrained bone scaleY. */
|
|
8595
|
+
this.offsetScaleY = 0;
|
|
8596
|
+
/** An offset added to the constrained bone shearY. */
|
|
8597
|
+
this.offsetShearY = 0;
|
|
8598
|
+
this.relative = false;
|
|
8599
|
+
this.local = false;
|
|
8600
|
+
}
|
|
8619
8601
|
set target(boneData) {
|
|
8620
8602
|
this._target = boneData;
|
|
8621
8603
|
}
|
|
@@ -8623,44 +8605,21 @@ var TransformConstraintData = class extends ConstraintData {
|
|
|
8623
8605
|
if (!this._target) throw new Error('BoneData not set.');
|
|
8624
8606
|
else return this._target;
|
|
8625
8607
|
}
|
|
8626
|
-
mixRotate = 0;
|
|
8627
|
-
mixX = 0;
|
|
8628
|
-
mixY = 0;
|
|
8629
|
-
mixScaleX = 0;
|
|
8630
|
-
mixScaleY = 0;
|
|
8631
|
-
mixShearY = 0;
|
|
8632
|
-
/** An offset added to the constrained bone rotation. */
|
|
8633
|
-
offsetRotation = 0;
|
|
8634
|
-
/** An offset added to the constrained bone X translation. */
|
|
8635
|
-
offsetX = 0;
|
|
8636
|
-
/** An offset added to the constrained bone Y translation. */
|
|
8637
|
-
offsetY = 0;
|
|
8638
|
-
/** An offset added to the constrained bone scaleX. */
|
|
8639
|
-
offsetScaleX = 0;
|
|
8640
|
-
/** An offset added to the constrained bone scaleY. */
|
|
8641
|
-
offsetScaleY = 0;
|
|
8642
|
-
/** An offset added to the constrained bone shearY. */
|
|
8643
|
-
offsetShearY = 0;
|
|
8644
|
-
relative = false;
|
|
8645
|
-
local = false;
|
|
8646
|
-
constructor(name) {
|
|
8647
|
-
super(name, 0, false);
|
|
8648
|
-
}
|
|
8649
8608
|
};
|
|
8650
8609
|
|
|
8651
8610
|
// spine-core/src/SkeletonBinary.ts
|
|
8652
8611
|
var SkeletonBinary = class {
|
|
8653
|
-
/** Scales bone positions, image sizes, and translations as they are loaded. This allows different size images to be used at
|
|
8654
|
-
* runtime than were used in Spine.
|
|
8655
|
-
*
|
|
8656
|
-
* See [Scaling](http://esotericsoftware.com/spine-loading-skeleton-data#Scaling) in the Spine Runtimes Guide. */
|
|
8657
|
-
scale = 1;
|
|
8658
|
-
attachmentLoader;
|
|
8659
|
-
linkedMeshes = new Array();
|
|
8660
8612
|
constructor(attachmentLoader) {
|
|
8613
|
+
/** Scales bone positions, image sizes, and translations as they are loaded. This allows different size images to be used at
|
|
8614
|
+
* runtime than were used in Spine.
|
|
8615
|
+
*
|
|
8616
|
+
* See [Scaling](http://esotericsoftware.com/spine-loading-skeleton-data#Scaling) in the Spine Runtimes Guide. */
|
|
8617
|
+
this.scale = 1;
|
|
8618
|
+
this.linkedMeshes = new Array();
|
|
8661
8619
|
this.attachmentLoader = attachmentLoader;
|
|
8662
8620
|
}
|
|
8663
8621
|
readSkeletonData(binary) {
|
|
8622
|
+
var _a;
|
|
8664
8623
|
let scale = this.scale;
|
|
8665
8624
|
let skeletonData = new SkeletonData();
|
|
8666
8625
|
skeletonData.name = '';
|
|
@@ -8705,7 +8664,7 @@ var SkeletonBinary = class {
|
|
|
8705
8664
|
data.skinRequired = input.readBoolean();
|
|
8706
8665
|
if (nonessential) {
|
|
8707
8666
|
Color.rgba8888ToColor(data.color, input.readInt32());
|
|
8708
|
-
data.icon = input.readString()
|
|
8667
|
+
data.icon = (_a = input.readString()) != null ? _a : void 0;
|
|
8709
8668
|
data.visible = input.readBoolean();
|
|
8710
8669
|
}
|
|
8711
8670
|
skeletonData.bones.push(data);
|
|
@@ -9740,11 +9699,6 @@ var BinaryInput = class {
|
|
|
9740
9699
|
}
|
|
9741
9700
|
};
|
|
9742
9701
|
var LinkedMesh = class {
|
|
9743
|
-
parent;
|
|
9744
|
-
skinIndex;
|
|
9745
|
-
slotIndex;
|
|
9746
|
-
mesh;
|
|
9747
|
-
inheritTimeline;
|
|
9748
9702
|
constructor(mesh, skinIndex, slotIndex, parent, inheritDeform) {
|
|
9749
9703
|
this.mesh = mesh;
|
|
9750
9704
|
this.skinIndex = skinIndex;
|
|
@@ -9864,21 +9818,23 @@ var CURVE_BEZIER = 2;
|
|
|
9864
9818
|
|
|
9865
9819
|
// spine-core/src/SkeletonBounds.ts
|
|
9866
9820
|
var SkeletonBounds = class {
|
|
9867
|
-
|
|
9868
|
-
|
|
9869
|
-
|
|
9870
|
-
|
|
9871
|
-
|
|
9872
|
-
|
|
9873
|
-
|
|
9874
|
-
|
|
9875
|
-
|
|
9876
|
-
|
|
9877
|
-
|
|
9878
|
-
|
|
9879
|
-
|
|
9880
|
-
|
|
9881
|
-
|
|
9821
|
+
constructor() {
|
|
9822
|
+
/** The left edge of the axis aligned bounding box. */
|
|
9823
|
+
this.minX = 0;
|
|
9824
|
+
/** The bottom edge of the axis aligned bounding box. */
|
|
9825
|
+
this.minY = 0;
|
|
9826
|
+
/** The right edge of the axis aligned bounding box. */
|
|
9827
|
+
this.maxX = 0;
|
|
9828
|
+
/** The top edge of the axis aligned bounding box. */
|
|
9829
|
+
this.maxY = 0;
|
|
9830
|
+
/** The visible bounding boxes. */
|
|
9831
|
+
this.boundingBoxes = new Array();
|
|
9832
|
+
/** The world vertices for the bounding box polygons. */
|
|
9833
|
+
this.polygons = new Array();
|
|
9834
|
+
this.polygonPool = new Pool(() => {
|
|
9835
|
+
return Utils.newFloatArray(16);
|
|
9836
|
+
});
|
|
9837
|
+
}
|
|
9882
9838
|
/** Clears any previous polygons, finds all visible bounding box attachments, and computes the world vertices for each bounding
|
|
9883
9839
|
* box's polygon.
|
|
9884
9840
|
* @param updateAabb If true, the axis aligned bounding box containing all the polygons is computed. If false, the
|
|
@@ -10051,17 +10007,19 @@ var SkeletonBounds = class {
|
|
|
10051
10007
|
|
|
10052
10008
|
// spine-core/src/Triangulator.ts
|
|
10053
10009
|
var Triangulator = class {
|
|
10054
|
-
|
|
10055
|
-
|
|
10056
|
-
|
|
10057
|
-
|
|
10058
|
-
|
|
10059
|
-
|
|
10060
|
-
|
|
10061
|
-
|
|
10062
|
-
|
|
10063
|
-
|
|
10064
|
-
|
|
10010
|
+
constructor() {
|
|
10011
|
+
this.convexPolygons = new Array();
|
|
10012
|
+
this.convexPolygonsIndices = new Array();
|
|
10013
|
+
this.indicesArray = new Array();
|
|
10014
|
+
this.isConcaveArray = new Array();
|
|
10015
|
+
this.triangles = new Array();
|
|
10016
|
+
this.polygonPool = new Pool(() => {
|
|
10017
|
+
return new Array();
|
|
10018
|
+
});
|
|
10019
|
+
this.polygonIndicesPool = new Pool(() => {
|
|
10020
|
+
return new Array();
|
|
10021
|
+
});
|
|
10022
|
+
}
|
|
10065
10023
|
triangulate(verticesArray) {
|
|
10066
10024
|
let vertices = verticesArray;
|
|
10067
10025
|
let vertexCount = verticesArray.length >> 1;
|
|
@@ -10276,15 +10234,17 @@ var Triangulator = class {
|
|
|
10276
10234
|
|
|
10277
10235
|
// spine-core/src/SkeletonClipping.ts
|
|
10278
10236
|
var SkeletonClipping = class {
|
|
10279
|
-
|
|
10280
|
-
|
|
10281
|
-
|
|
10282
|
-
|
|
10283
|
-
|
|
10284
|
-
|
|
10285
|
-
|
|
10286
|
-
|
|
10287
|
-
|
|
10237
|
+
constructor() {
|
|
10238
|
+
this.triangulator = new Triangulator();
|
|
10239
|
+
this.clippingPolygon = new Array();
|
|
10240
|
+
this.clipOutput = new Array();
|
|
10241
|
+
this.clippedVertices = new Array();
|
|
10242
|
+
this.clippedUVs = new Array();
|
|
10243
|
+
this.clippedTriangles = new Array();
|
|
10244
|
+
this.scratch = new Array();
|
|
10245
|
+
this.clipAttachment = null;
|
|
10246
|
+
this.clippingPolygons = null;
|
|
10247
|
+
}
|
|
10288
10248
|
clipStart(slot, clip) {
|
|
10289
10249
|
if (this.clipAttachment) return 0;
|
|
10290
10250
|
this.clipAttachment = clip;
|
|
@@ -10764,17 +10724,17 @@ var SkeletonClipping = class {
|
|
|
10764
10724
|
|
|
10765
10725
|
// spine-core/src/SkeletonJson.ts
|
|
10766
10726
|
var SkeletonJson = class {
|
|
10767
|
-
attachmentLoader;
|
|
10768
|
-
/** Scales bone positions, image sizes, and translations as they are loaded. This allows different size images to be used at
|
|
10769
|
-
* runtime than were used in Spine.
|
|
10770
|
-
*
|
|
10771
|
-
* See [Scaling](http://esotericsoftware.com/spine-loading-skeleton-data#Scaling) in the Spine Runtimes Guide. */
|
|
10772
|
-
scale = 1;
|
|
10773
|
-
linkedMeshes = new Array();
|
|
10774
10727
|
constructor(attachmentLoader) {
|
|
10728
|
+
/** Scales bone positions, image sizes, and translations as they are loaded. This allows different size images to be used at
|
|
10729
|
+
* runtime than were used in Spine.
|
|
10730
|
+
*
|
|
10731
|
+
* See [Scaling](http://esotericsoftware.com/spine-loading-skeleton-data#Scaling) in the Spine Runtimes Guide. */
|
|
10732
|
+
this.scale = 1;
|
|
10733
|
+
this.linkedMeshes = new Array();
|
|
10775
10734
|
this.attachmentLoader = attachmentLoader;
|
|
10776
10735
|
}
|
|
10777
10736
|
readSkeletonData(json) {
|
|
10737
|
+
var _a, _b;
|
|
10778
10738
|
let scale = this.scale;
|
|
10779
10739
|
let skeletonData = new SkeletonData();
|
|
10780
10740
|
let root = typeof json === 'string' ? JSON.parse(json) : json;
|
|
@@ -10788,8 +10748,8 @@ var SkeletonJson = class {
|
|
|
10788
10748
|
skeletonData.height = skeletonMap.height;
|
|
10789
10749
|
skeletonData.referenceScale = getValue(skeletonMap, 'referenceScale', 100) * scale;
|
|
10790
10750
|
skeletonData.fps = skeletonMap.fps;
|
|
10791
|
-
skeletonData.imagesPath = skeletonMap.images
|
|
10792
|
-
skeletonData.audioPath = skeletonMap.audio
|
|
10751
|
+
skeletonData.imagesPath = (_a = skeletonMap.images) != null ? _a : null;
|
|
10752
|
+
skeletonData.audioPath = (_b = skeletonMap.audio) != null ? _b : null;
|
|
10793
10753
|
}
|
|
10794
10754
|
if (root.bones) {
|
|
10795
10755
|
for (let i = 0; i < root.bones.length; i++) {
|
|
@@ -11692,11 +11652,6 @@ var SkeletonJson = class {
|
|
|
11692
11652
|
}
|
|
11693
11653
|
};
|
|
11694
11654
|
var LinkedMesh2 = class {
|
|
11695
|
-
parent;
|
|
11696
|
-
skin;
|
|
11697
|
-
slotIndex;
|
|
11698
|
-
mesh;
|
|
11699
|
-
inheritTimeline;
|
|
11700
11655
|
constructor(mesh, skin, slotIndex, parent, inheritDeform) {
|
|
11701
11656
|
this.mesh = mesh;
|
|
11702
11657
|
this.skin = skin;
|
|
@@ -11782,17 +11737,16 @@ function getValue(map, property, defaultValue) {
|
|
|
11782
11737
|
|
|
11783
11738
|
// spine-pixi-v8/src/SpineTexture.ts
|
|
11784
11739
|
var _SpineTexture = class extends Texture {
|
|
11740
|
+
constructor(image) {
|
|
11741
|
+
super(image.resource);
|
|
11742
|
+
this.texture = Texture$1.from(image);
|
|
11743
|
+
}
|
|
11785
11744
|
static from(texture) {
|
|
11786
11745
|
if (_SpineTexture.textureMap.has(texture)) {
|
|
11787
11746
|
return _SpineTexture.textureMap.get(texture);
|
|
11788
11747
|
}
|
|
11789
11748
|
return new _SpineTexture(texture);
|
|
11790
11749
|
}
|
|
11791
|
-
texture;
|
|
11792
|
-
constructor(image) {
|
|
11793
|
-
super(image.resource);
|
|
11794
|
-
this.texture = Texture$1.from(image);
|
|
11795
|
-
}
|
|
11796
11750
|
setFilters(minFilter, magFilter) {
|
|
11797
11751
|
const style = this.texture.source.style;
|
|
11798
11752
|
style.minFilter = _SpineTexture.toPixiTextureFilter(minFilter);
|
|
@@ -11864,7 +11818,7 @@ var _SpineTexture = class extends Texture {
|
|
|
11864
11818
|
}
|
|
11865
11819
|
};
|
|
11866
11820
|
var SpineTexture = _SpineTexture;
|
|
11867
|
-
|
|
11821
|
+
SpineTexture.textureMap = /* @__PURE__ */ new Map();
|
|
11868
11822
|
|
|
11869
11823
|
// spine-pixi-v8/src/assets/atlasLoader.ts
|
|
11870
11824
|
var spineTextureAtlasLoader = {
|
|
@@ -11872,9 +11826,14 @@ var spineTextureAtlasLoader = {
|
|
|
11872
11826
|
resolver: {
|
|
11873
11827
|
test: value => checkExtension(value, '.atlas'),
|
|
11874
11828
|
parse: value => {
|
|
11829
|
+
var _a, _b, _c;
|
|
11875
11830
|
const split = value.split('.');
|
|
11876
11831
|
return {
|
|
11877
|
-
resolution: parseFloat(
|
|
11832
|
+
resolution: parseFloat(
|
|
11833
|
+
(_c = (_b = (_a = Resolver.RETINA_PREFIX) == null ? void 0 : _a.exec(value)) == null ? void 0 : _b[1]) != null
|
|
11834
|
+
? _c
|
|
11835
|
+
: '1',
|
|
11836
|
+
),
|
|
11878
11837
|
format: split[split.length - 2],
|
|
11879
11838
|
src: value,
|
|
11880
11839
|
};
|
|
@@ -11889,10 +11848,12 @@ var spineTextureAtlasLoader = {
|
|
|
11889
11848
|
test(url) {
|
|
11890
11849
|
return checkExtension(url, '.atlas');
|
|
11891
11850
|
},
|
|
11892
|
-
|
|
11893
|
-
|
|
11894
|
-
|
|
11895
|
-
|
|
11851
|
+
load(url) {
|
|
11852
|
+
return __async(this, null, function* () {
|
|
11853
|
+
const response = yield DOMAdapter.get().fetch(url);
|
|
11854
|
+
const txt = yield response.text();
|
|
11855
|
+
return txt;
|
|
11856
|
+
});
|
|
11896
11857
|
},
|
|
11897
11858
|
testParse(asset, options) {
|
|
11898
11859
|
const isExtensionRight = checkExtension(options.src, '.atlas');
|
|
@@ -11902,48 +11863,52 @@ var spineTextureAtlasLoader = {
|
|
|
11902
11863
|
unload(atlas) {
|
|
11903
11864
|
atlas.dispose();
|
|
11904
11865
|
},
|
|
11905
|
-
|
|
11906
|
-
|
|
11907
|
-
|
|
11908
|
-
|
|
11909
|
-
basePath
|
|
11910
|
-
|
|
11911
|
-
const retval = new TextureAtlas(asset);
|
|
11912
|
-
if (metadata.images instanceof TextureSource || typeof metadata.images === 'string') {
|
|
11913
|
-
const pixiTexture = metadata.images;
|
|
11914
|
-
metadata.images = {};
|
|
11915
|
-
metadata.images[retval.pages[0].name] = pixiTexture;
|
|
11916
|
-
}
|
|
11917
|
-
const textureLoadingPromises = [];
|
|
11918
|
-
for (const page of retval.pages) {
|
|
11919
|
-
if (metadata.resolve) {
|
|
11920
|
-
const resolvePromise = metadata.resolve().then(texture => {
|
|
11921
|
-
page.setTexture(SpineTexture.from(texture.source));
|
|
11922
|
-
});
|
|
11923
|
-
textureLoadingPromises.push(resolvePromise);
|
|
11924
|
-
continue;
|
|
11866
|
+
parse(asset, options, loader) {
|
|
11867
|
+
return __async(this, null, function* () {
|
|
11868
|
+
const metadata = options.data || {};
|
|
11869
|
+
let basePath = path.dirname(options.src);
|
|
11870
|
+
if (basePath && basePath.lastIndexOf('/') !== basePath.length - 1) {
|
|
11871
|
+
basePath += '/';
|
|
11925
11872
|
}
|
|
11926
|
-
const
|
|
11927
|
-
|
|
11928
|
-
|
|
11929
|
-
|
|
11930
|
-
|
|
11931
|
-
const url = providedPage ?? path.normalize([...basePath.split(path.sep), pageName].join(path.sep));
|
|
11932
|
-
const assetsToLoadIn = {
|
|
11933
|
-
src: url,
|
|
11934
|
-
data: {
|
|
11935
|
-
...metadata.imageMetadata,
|
|
11936
|
-
alphaMode: page.pma ? 'premultiplied-alpha' : 'premultiply-alpha-on-upload',
|
|
11937
|
-
},
|
|
11938
|
-
};
|
|
11939
|
-
const pixiPromise = loader.load(assetsToLoadIn).then(texture => {
|
|
11940
|
-
page.setTexture(SpineTexture.from(texture.source));
|
|
11941
|
-
});
|
|
11942
|
-
textureLoadingPromises.push(pixiPromise);
|
|
11873
|
+
const retval = new TextureAtlas(asset);
|
|
11874
|
+
if (metadata.images instanceof TextureSource || typeof metadata.images === 'string') {
|
|
11875
|
+
const pixiTexture = metadata.images;
|
|
11876
|
+
metadata.images = {};
|
|
11877
|
+
metadata.images[retval.pages[0].name] = pixiTexture;
|
|
11943
11878
|
}
|
|
11944
|
-
|
|
11945
|
-
|
|
11946
|
-
|
|
11879
|
+
const textureLoadingPromises = [];
|
|
11880
|
+
for (const page of retval.pages) {
|
|
11881
|
+
if (metadata.resolve) {
|
|
11882
|
+
const resolvePromise = metadata.resolve().then(texture => {
|
|
11883
|
+
page.setTexture(SpineTexture.from(texture.source));
|
|
11884
|
+
});
|
|
11885
|
+
textureLoadingPromises.push(resolvePromise);
|
|
11886
|
+
continue;
|
|
11887
|
+
}
|
|
11888
|
+
const pageName = page.name;
|
|
11889
|
+
const providedPage = (metadata == null ? void 0 : metadata.images) ? metadata.images[pageName] : void 0;
|
|
11890
|
+
if (providedPage instanceof TextureSource) {
|
|
11891
|
+
page.setTexture(SpineTexture.from(providedPage));
|
|
11892
|
+
} else {
|
|
11893
|
+
const url =
|
|
11894
|
+
providedPage != null
|
|
11895
|
+
? providedPage
|
|
11896
|
+
: path.normalize([...basePath.split(path.sep), pageName].join(path.sep));
|
|
11897
|
+
const assetsToLoadIn = {
|
|
11898
|
+
src: url,
|
|
11899
|
+
data: __spreadProps(__spreadValues({}, metadata.imageMetadata), {
|
|
11900
|
+
alphaMode: page.pma ? 'premultiplied-alpha' : 'premultiply-alpha-on-upload',
|
|
11901
|
+
}),
|
|
11902
|
+
};
|
|
11903
|
+
const pixiPromise = loader.load(assetsToLoadIn).then(texture => {
|
|
11904
|
+
page.setTexture(SpineTexture.from(texture.source));
|
|
11905
|
+
});
|
|
11906
|
+
textureLoadingPromises.push(pixiPromise);
|
|
11907
|
+
}
|
|
11908
|
+
}
|
|
11909
|
+
yield Promise.all(textureLoadingPromises);
|
|
11910
|
+
return retval;
|
|
11911
|
+
});
|
|
11947
11912
|
},
|
|
11948
11913
|
},
|
|
11949
11914
|
};
|
|
@@ -11965,10 +11930,12 @@ var spineLoaderExtension = {
|
|
|
11965
11930
|
test(url) {
|
|
11966
11931
|
return checkExtension(url, '.skel');
|
|
11967
11932
|
},
|
|
11968
|
-
|
|
11969
|
-
|
|
11970
|
-
|
|
11971
|
-
|
|
11933
|
+
load(url) {
|
|
11934
|
+
return __async(this, null, function* () {
|
|
11935
|
+
const response = yield DOMAdapter.get().fetch(url);
|
|
11936
|
+
const buffer = new Uint8Array(yield response.arrayBuffer());
|
|
11937
|
+
return buffer;
|
|
11938
|
+
});
|
|
11972
11939
|
},
|
|
11973
11940
|
testParse(asset, options) {
|
|
11974
11941
|
const isJsonSpineModel = checkExtension(options.src, '.json') && isJson(asset);
|
|
@@ -12124,11 +12091,14 @@ var DarkTintShader = class extends Shader {
|
|
|
12124
12091
|
// spine-pixi-v8/src/darktint/DarkTintBatcher.ts
|
|
12125
12092
|
var defaultShader = null;
|
|
12126
12093
|
var _DarkTintBatcher = class extends Batcher {
|
|
12127
|
-
|
|
12128
|
-
|
|
12129
|
-
|
|
12130
|
-
|
|
12131
|
-
|
|
12094
|
+
constructor() {
|
|
12095
|
+
super(...arguments);
|
|
12096
|
+
this.geometry = new DarkTintBatchGeometry();
|
|
12097
|
+
this.shader = defaultShader || (defaultShader = new DarkTintShader(this.maxTextures));
|
|
12098
|
+
this.name = _DarkTintBatcher.extension.name;
|
|
12099
|
+
/** The size of one attribute. 1 = 32 bit. x, y, u, v, color, darkColor, textureIdAndRound -> total = 7 */
|
|
12100
|
+
this.vertexSize = 7;
|
|
12101
|
+
}
|
|
12132
12102
|
packAttributes(element, float32View, uint32View, index, textureId) {
|
|
12133
12103
|
const textureIdAndRound = (textureId << 16) | (element.roundPixels & 65535);
|
|
12134
12104
|
const wt = element.transform;
|
|
@@ -12207,37 +12177,21 @@ var _DarkTintBatcher = class extends Batcher {
|
|
|
12207
12177
|
};
|
|
12208
12178
|
var DarkTintBatcher = _DarkTintBatcher;
|
|
12209
12179
|
/** @ignore */
|
|
12210
|
-
|
|
12180
|
+
DarkTintBatcher.extension = {
|
|
12211
12181
|
type: [ExtensionType.Batcher],
|
|
12212
12182
|
name: 'darkTint',
|
|
12213
|
-
}
|
|
12183
|
+
};
|
|
12214
12184
|
extensions.add(DarkTintBatcher);
|
|
12215
12185
|
|
|
12216
12186
|
// spine-pixi-v8/src/BatchableSpineSlot.ts
|
|
12217
12187
|
var BatchableSpineSlot = class {
|
|
12218
|
-
|
|
12219
|
-
|
|
12220
|
-
|
|
12221
|
-
|
|
12222
|
-
|
|
12223
|
-
|
|
12224
|
-
|
|
12225
|
-
renderable;
|
|
12226
|
-
positions;
|
|
12227
|
-
indices;
|
|
12228
|
-
uvs;
|
|
12229
|
-
roundPixels;
|
|
12230
|
-
data;
|
|
12231
|
-
blendMode;
|
|
12232
|
-
darkTint;
|
|
12233
|
-
texture;
|
|
12234
|
-
transform;
|
|
12235
|
-
// used internally by batcher specific. Stored for efficient updating.
|
|
12236
|
-
_textureId;
|
|
12237
|
-
_attributeStart;
|
|
12238
|
-
_indexStart;
|
|
12239
|
-
_batcher;
|
|
12240
|
-
_batch;
|
|
12188
|
+
constructor() {
|
|
12189
|
+
this.indexOffset = 0;
|
|
12190
|
+
this.attributeOffset = 0;
|
|
12191
|
+
this.batcherName = 'darkTint';
|
|
12192
|
+
this.topology = 'triangle-list';
|
|
12193
|
+
this.packAsQuad = false;
|
|
12194
|
+
}
|
|
12241
12195
|
get color() {
|
|
12242
12196
|
const slotColor = this.data.color;
|
|
12243
12197
|
const parentColor = this.renderable.groupColor;
|
|
@@ -12297,10 +12251,9 @@ var spineBlendModeMap = {
|
|
|
12297
12251
|
3: 'screen',
|
|
12298
12252
|
};
|
|
12299
12253
|
var SpinePipe = class {
|
|
12300
|
-
renderer;
|
|
12301
|
-
gpuSpineData = {};
|
|
12302
|
-
_destroyRenderableBound = this.destroyRenderable.bind(this);
|
|
12303
12254
|
constructor(renderer) {
|
|
12255
|
+
this.gpuSpineData = {};
|
|
12256
|
+
this._destroyRenderableBound = this.destroyRenderable.bind(this);
|
|
12304
12257
|
this.renderer = renderer;
|
|
12305
12258
|
}
|
|
12306
12259
|
validateRenderable(spine) {
|
|
@@ -12328,6 +12281,7 @@ var SpinePipe = class {
|
|
|
12328
12281
|
return false;
|
|
12329
12282
|
}
|
|
12330
12283
|
addRenderable(spine, instructionSet) {
|
|
12284
|
+
var _a, _b;
|
|
12331
12285
|
const gpuSpine = this._getSpineData(spine);
|
|
12332
12286
|
const batcher = this.renderer.renderPipes.batch;
|
|
12333
12287
|
const drawOrder = spine.skeleton.drawOrder;
|
|
@@ -12339,7 +12293,8 @@ var SpinePipe = class {
|
|
|
12339
12293
|
const blendMode = spineBlendModeMap[slot.data.blendMode];
|
|
12340
12294
|
if (attachment instanceof RegionAttachment || attachment instanceof MeshAttachment) {
|
|
12341
12295
|
const cacheData = spine._getCachedData(slot, attachment);
|
|
12342
|
-
const batchableSpineSlot =
|
|
12296
|
+
const batchableSpineSlot =
|
|
12297
|
+
(_a = gpuSpine.slotBatches)[(_b = cacheData.id)] || (_a[_b] = new BatchableSpineSlot());
|
|
12343
12298
|
batchableSpineSlot.setData(spine, cacheData, blendMode, roundPixels);
|
|
12344
12299
|
if (!cacheData.skipRender) {
|
|
12345
12300
|
batcher.addToBatch(batchableSpineSlot, instructionSet);
|
|
@@ -12355,6 +12310,7 @@ var SpinePipe = class {
|
|
|
12355
12310
|
}
|
|
12356
12311
|
}
|
|
12357
12312
|
updateRenderable(spine) {
|
|
12313
|
+
var _a;
|
|
12358
12314
|
const gpuSpine = this.gpuSpineData[spine.uid];
|
|
12359
12315
|
spine._validateAndTransformAttachments();
|
|
12360
12316
|
const drawOrder = spine.skeleton.drawOrder;
|
|
@@ -12365,7 +12321,7 @@ var SpinePipe = class {
|
|
|
12365
12321
|
const cacheData = spine._getCachedData(slot, attachment);
|
|
12366
12322
|
if (!cacheData.skipRender) {
|
|
12367
12323
|
const batchableSpineSlot = gpuSpine.slotBatches[spine._getCachedData(slot, attachment).id];
|
|
12368
|
-
batchableSpineSlot._batcher
|
|
12324
|
+
(_a = batchableSpineSlot._batcher) == null ? void 0 : _a.updateElement(batchableSpineSlot);
|
|
12369
12325
|
}
|
|
12370
12326
|
}
|
|
12371
12327
|
}
|
|
@@ -12388,33 +12344,57 @@ var SpinePipe = class {
|
|
|
12388
12344
|
}
|
|
12389
12345
|
};
|
|
12390
12346
|
/** @ignore */
|
|
12391
|
-
|
|
12347
|
+
SpinePipe.extension = {
|
|
12392
12348
|
type: [ExtensionType.WebGLPipes, ExtensionType.WebGPUPipes, ExtensionType.CanvasPipes],
|
|
12393
12349
|
name: 'spine',
|
|
12394
|
-
}
|
|
12350
|
+
};
|
|
12395
12351
|
extensions.add(SpinePipe);
|
|
12396
12352
|
var vectorAux = new Vector2();
|
|
12397
12353
|
Skeleton.yDown = true;
|
|
12398
12354
|
var clipper = new SkeletonClipping();
|
|
12399
12355
|
var maskPool = new Pool(() => new Graphics());
|
|
12400
12356
|
var Spine$1 = class extends ViewContainer {
|
|
12401
|
-
|
|
12402
|
-
|
|
12403
|
-
|
|
12404
|
-
|
|
12405
|
-
|
|
12406
|
-
|
|
12407
|
-
|
|
12408
|
-
|
|
12409
|
-
|
|
12410
|
-
|
|
12411
|
-
|
|
12412
|
-
|
|
12413
|
-
|
|
12414
|
-
|
|
12415
|
-
|
|
12416
|
-
|
|
12417
|
-
|
|
12357
|
+
constructor(options) {
|
|
12358
|
+
var _a;
|
|
12359
|
+
if (options instanceof SkeletonData) {
|
|
12360
|
+
options = {
|
|
12361
|
+
skeletonData: options,
|
|
12362
|
+
};
|
|
12363
|
+
}
|
|
12364
|
+
super();
|
|
12365
|
+
// Pixi properties
|
|
12366
|
+
this.batched = true;
|
|
12367
|
+
this.buildId = 0;
|
|
12368
|
+
this.renderPipeId = 'spine';
|
|
12369
|
+
this._didSpineUpdate = false;
|
|
12370
|
+
this.beforeUpdateWorldTransforms = () => {};
|
|
12371
|
+
this.afterUpdateWorldTransforms = () => {};
|
|
12372
|
+
this.darkTint = false;
|
|
12373
|
+
this._debug = void 0;
|
|
12374
|
+
this._slotsObject = /* @__PURE__ */ Object.create(null);
|
|
12375
|
+
this.clippingSlotToPixiMasks = /* @__PURE__ */ Object.create(null);
|
|
12376
|
+
this.spineAttachmentsDirty = true;
|
|
12377
|
+
this.spineTexturesDirty = true;
|
|
12378
|
+
this._lastAttachments = [];
|
|
12379
|
+
this._stateChanged = true;
|
|
12380
|
+
this.attachmentCacheData = [];
|
|
12381
|
+
this._autoUpdate = true;
|
|
12382
|
+
this.hasNeverUpdated = true;
|
|
12383
|
+
const skeletonData = options instanceof SkeletonData ? options : options.skeletonData;
|
|
12384
|
+
this.skeleton = new Skeleton(skeletonData);
|
|
12385
|
+
this.state = new AnimationState(new AnimationStateData(skeletonData));
|
|
12386
|
+
this.autoUpdate = (_a = options == null ? void 0 : options.autoUpdate) != null ? _a : true;
|
|
12387
|
+
this.darkTint =
|
|
12388
|
+
(options == null ? void 0 : options.darkTint) === void 0
|
|
12389
|
+
? this.skeleton.slots.some(slot => !!slot.data.darkColor)
|
|
12390
|
+
: options == null
|
|
12391
|
+
? void 0
|
|
12392
|
+
: options.darkTint;
|
|
12393
|
+
const slots = this.skeleton.slots;
|
|
12394
|
+
for (let i = 0; i < slots.length; i++) {
|
|
12395
|
+
this.attachmentCacheData[i] = /* @__PURE__ */ Object.create(null);
|
|
12396
|
+
}
|
|
12397
|
+
}
|
|
12418
12398
|
getSlotFromRef(slotRef) {
|
|
12419
12399
|
let slot;
|
|
12420
12400
|
if (typeof slotRef === 'number') slot = this.skeleton.slots[slotRef];
|
|
@@ -12423,11 +12403,6 @@ var Spine$1 = class extends ViewContainer {
|
|
|
12423
12403
|
if (!slot) throw new Error(`No slot found with the given slot reference: ${slotRef}`);
|
|
12424
12404
|
return slot;
|
|
12425
12405
|
}
|
|
12426
|
-
spineAttachmentsDirty = true;
|
|
12427
|
-
spineTexturesDirty = true;
|
|
12428
|
-
_lastAttachments = [];
|
|
12429
|
-
_stateChanged = true;
|
|
12430
|
-
attachmentCacheData = [];
|
|
12431
12406
|
get debug() {
|
|
12432
12407
|
return this._debug;
|
|
12433
12408
|
}
|
|
@@ -12443,7 +12418,6 @@ var Spine$1 = class extends ViewContainer {
|
|
|
12443
12418
|
}
|
|
12444
12419
|
this._debug = value;
|
|
12445
12420
|
}
|
|
12446
|
-
_autoUpdate = true;
|
|
12447
12421
|
get autoUpdate() {
|
|
12448
12422
|
return this._autoUpdate;
|
|
12449
12423
|
}
|
|
@@ -12456,31 +12430,12 @@ var Spine$1 = class extends ViewContainer {
|
|
|
12456
12430
|
}
|
|
12457
12431
|
this._autoUpdate = value;
|
|
12458
12432
|
}
|
|
12459
|
-
hasNeverUpdated = true;
|
|
12460
|
-
constructor(options) {
|
|
12461
|
-
if (options instanceof SkeletonData) {
|
|
12462
|
-
options = {
|
|
12463
|
-
skeletonData: options,
|
|
12464
|
-
};
|
|
12465
|
-
}
|
|
12466
|
-
super();
|
|
12467
|
-
const skeletonData = options instanceof SkeletonData ? options : options.skeletonData;
|
|
12468
|
-
this.skeleton = new Skeleton(skeletonData);
|
|
12469
|
-
this.state = new AnimationState(new AnimationStateData(skeletonData));
|
|
12470
|
-
this.autoUpdate = options?.autoUpdate ?? true;
|
|
12471
|
-
this.darkTint =
|
|
12472
|
-
options?.darkTint === void 0 ? this.skeleton.slots.some(slot => !!slot.data.darkColor) : options?.darkTint;
|
|
12473
|
-
const slots = this.skeleton.slots;
|
|
12474
|
-
for (let i = 0; i < slots.length; i++) {
|
|
12475
|
-
this.attachmentCacheData[i] = /* @__PURE__ */ Object.create(null);
|
|
12476
|
-
}
|
|
12477
|
-
}
|
|
12478
12433
|
/** If {@link Spine.autoUpdate} is `false`, this method allows to update the AnimationState and the Skeleton with the given delta. */
|
|
12479
12434
|
update(dt) {
|
|
12480
12435
|
this.internalUpdate(0, dt);
|
|
12481
12436
|
}
|
|
12482
12437
|
internalUpdate(_deltaFrame, deltaSeconds) {
|
|
12483
|
-
this._updateAndApplyState(deltaSeconds
|
|
12438
|
+
this._updateAndApplyState(deltaSeconds != null ? deltaSeconds : Ticker.shared.deltaMS / 1e3);
|
|
12484
12439
|
}
|
|
12485
12440
|
get bounds() {
|
|
12486
12441
|
if (this._boundsDirty) {
|
|
@@ -12586,9 +12541,15 @@ var Spine$1 = class extends ViewContainer {
|
|
|
12586
12541
|
this.spineAttachmentsDirty = spineAttachmentsDirty;
|
|
12587
12542
|
}
|
|
12588
12543
|
updateAndSetPixiMask(slot, last) {
|
|
12544
|
+
var _a, _b;
|
|
12589
12545
|
const attachment = slot.attachment;
|
|
12590
12546
|
if (attachment && attachment instanceof ClippingAttachment) {
|
|
12591
|
-
const clip =
|
|
12547
|
+
const clip =
|
|
12548
|
+
(_a = this.clippingSlotToPixiMasks)[(_b = slot.data.name)] ||
|
|
12549
|
+
(_a[_b] = {
|
|
12550
|
+
slot,
|
|
12551
|
+
vertices: new Array(),
|
|
12552
|
+
});
|
|
12592
12553
|
clip.maskComputed = false;
|
|
12593
12554
|
this.currentClippingSlot = this.clippingSlotToPixiMasks[slot.data.name];
|
|
12594
12555
|
return;
|
|
@@ -12612,7 +12573,7 @@ var Spine$1 = class extends ViewContainer {
|
|
|
12612
12573
|
mask.clear().poly(vertices).stroke({ width: 0 }).fill({ alpha: 0.25 });
|
|
12613
12574
|
}
|
|
12614
12575
|
slotObject.container.mask = mask;
|
|
12615
|
-
} else if (slotObject
|
|
12576
|
+
} else if (slotObject == null ? void 0 : slotObject.container.mask) {
|
|
12616
12577
|
slotObject.container.mask = null;
|
|
12617
12578
|
}
|
|
12618
12579
|
if (currentClippingSlot && currentClippingSlot.slot.attachment.endSlot == slot.data) {
|
|
@@ -12633,8 +12594,8 @@ var Spine$1 = class extends ViewContainer {
|
|
|
12633
12594
|
}
|
|
12634
12595
|
}
|
|
12635
12596
|
}
|
|
12636
|
-
currentClippingSlot;
|
|
12637
12597
|
transformAttachments() {
|
|
12598
|
+
var _a;
|
|
12638
12599
|
const currentDrawOrder = this.skeleton.drawOrder;
|
|
12639
12600
|
for (let i = 0; i < currentDrawOrder.length; i++) {
|
|
12640
12601
|
const slot = currentDrawOrder[i];
|
|
@@ -12666,7 +12627,7 @@ var Spine$1 = class extends ViewContainer {
|
|
|
12666
12627
|
cacheData.darkColor.setFromColor(slot.darkColor);
|
|
12667
12628
|
}
|
|
12668
12629
|
cacheData.skipRender = cacheData.clipped = false;
|
|
12669
|
-
const texture = attachment.region
|
|
12630
|
+
const texture = ((_a = attachment.region) == null ? void 0 : _a.texture.texture) || Texture$1.EMPTY;
|
|
12670
12631
|
if (cacheData.texture !== texture) {
|
|
12671
12632
|
cacheData.texture = texture;
|
|
12672
12633
|
this.spineTexturesDirty = true;
|
|
@@ -12756,6 +12717,7 @@ var Spine$1 = class extends ViewContainer {
|
|
|
12756
12717
|
return this.attachmentCacheData[slot.data.index][attachment.name] || this.initCachedData(slot, attachment);
|
|
12757
12718
|
}
|
|
12758
12719
|
initCachedData(slot, attachment) {
|
|
12720
|
+
var _a, _b;
|
|
12759
12721
|
let vertices;
|
|
12760
12722
|
if (attachment instanceof RegionAttachment) {
|
|
12761
12723
|
vertices = new Float32Array(8);
|
|
@@ -12769,7 +12731,7 @@ var Spine$1 = class extends ViewContainer {
|
|
|
12769
12731
|
darkColor: new Color(0, 0, 0, 0),
|
|
12770
12732
|
darkTint: this.darkTint,
|
|
12771
12733
|
skipRender: false,
|
|
12772
|
-
texture: attachment.region
|
|
12734
|
+
texture: (_a = attachment.region) == null ? void 0 : _a.texture.texture,
|
|
12773
12735
|
};
|
|
12774
12736
|
} else {
|
|
12775
12737
|
vertices = new Float32Array(attachment.worldVerticesLength);
|
|
@@ -12783,12 +12745,13 @@ var Spine$1 = class extends ViewContainer {
|
|
|
12783
12745
|
darkColor: new Color(0, 0, 0, 0),
|
|
12784
12746
|
darkTint: this.darkTint,
|
|
12785
12747
|
skipRender: false,
|
|
12786
|
-
texture: attachment.region
|
|
12748
|
+
texture: (_b = attachment.region) == null ? void 0 : _b.texture.texture,
|
|
12787
12749
|
};
|
|
12788
12750
|
}
|
|
12789
12751
|
return this.attachmentCacheData[slot.data.index][attachment.name];
|
|
12790
12752
|
}
|
|
12791
12753
|
onViewUpdate() {
|
|
12754
|
+
var _a;
|
|
12792
12755
|
this._didViewChangeTick++;
|
|
12793
12756
|
this._boundsDirty = true;
|
|
12794
12757
|
if (this.didViewUpdate) return;
|
|
@@ -12797,7 +12760,7 @@ var Spine$1 = class extends ViewContainer {
|
|
|
12797
12760
|
if (renderGroup) {
|
|
12798
12761
|
renderGroup.onChildViewUpdate(this);
|
|
12799
12762
|
}
|
|
12800
|
-
this.debug
|
|
12763
|
+
(_a = this.debug) == null ? void 0 : _a.renderDebug(this);
|
|
12801
12764
|
}
|
|
12802
12765
|
/**
|
|
12803
12766
|
* Attaches a PixiJS container to a specified slot. This will map the world transform of the slots bone
|
|
@@ -12807,9 +12770,10 @@ var Spine$1 = class extends ViewContainer {
|
|
|
12807
12770
|
* @param slotRef - The slot id or slot to attach to
|
|
12808
12771
|
*/
|
|
12809
12772
|
addSlotObject(slot, container) {
|
|
12773
|
+
var _a;
|
|
12810
12774
|
slot = this.getSlotFromRef(slot);
|
|
12811
12775
|
for (const i in this._slotsObject) {
|
|
12812
|
-
if (this._slotsObject[i]
|
|
12776
|
+
if (((_a = this._slotsObject[i]) == null ? void 0 : _a.container) === container) {
|
|
12813
12777
|
this.removeSlotObject(this._slotsObject[i].slot);
|
|
12814
12778
|
}
|
|
12815
12779
|
}
|
|
@@ -12827,10 +12791,11 @@ var Spine$1 = class extends ViewContainer {
|
|
|
12827
12791
|
* @param slotOrContainer - The container, slot id or slot to detach from
|
|
12828
12792
|
*/
|
|
12829
12793
|
removeSlotObject(slotOrContainer) {
|
|
12794
|
+
var _a, _b;
|
|
12830
12795
|
let containerToRemove;
|
|
12831
12796
|
if (slotOrContainer instanceof Container) {
|
|
12832
12797
|
for (const i in this._slotsObject) {
|
|
12833
|
-
if (this._slotsObject[i]
|
|
12798
|
+
if (((_a = this._slotsObject[i]) == null ? void 0 : _a.container) === slotOrContainer) {
|
|
12834
12799
|
this._slotsObject[i] = null;
|
|
12835
12800
|
containerToRemove = slotOrContainer;
|
|
12836
12801
|
break;
|
|
@@ -12838,7 +12803,7 @@ var Spine$1 = class extends ViewContainer {
|
|
|
12838
12803
|
}
|
|
12839
12804
|
} else {
|
|
12840
12805
|
const slot = this.getSlotFromRef(slotOrContainer);
|
|
12841
|
-
containerToRemove = this._slotsObject[slot.data.name]
|
|
12806
|
+
containerToRemove = (_b = this._slotsObject[slot.data.name]) == null ? void 0 : _b.container;
|
|
12842
12807
|
this._slotsObject[slot.data.name] = null;
|
|
12843
12808
|
}
|
|
12844
12809
|
if (containerToRemove) {
|
|
@@ -12853,12 +12818,13 @@ var Spine$1 = class extends ViewContainer {
|
|
|
12853
12818
|
* @returns - The container attached to the slot
|
|
12854
12819
|
*/
|
|
12855
12820
|
getSlotObject(slot) {
|
|
12821
|
+
var _a;
|
|
12856
12822
|
slot = this.getSlotFromRef(slot);
|
|
12857
|
-
return this._slotsObject[slot.data.name]
|
|
12823
|
+
return (_a = this._slotsObject[slot.data.name]) == null ? void 0 : _a.container;
|
|
12858
12824
|
}
|
|
12859
12825
|
updateBounds() {
|
|
12860
12826
|
this._boundsDirty = false;
|
|
12861
|
-
this.skeletonBounds
|
|
12827
|
+
this.skeletonBounds || (this.skeletonBounds = new SkeletonBounds());
|
|
12862
12828
|
const skeletonBounds = this.skeletonBounds;
|
|
12863
12829
|
skeletonBounds.update(this.skeleton, true);
|
|
12864
12830
|
if (skeletonBounds.minX === Infinity) {
|
|
@@ -12950,6 +12916,7 @@ var Spine$1 = class extends ViewContainer {
|
|
|
12950
12916
|
skeletonAsset instanceof Uint8Array ? new SkeletonBinary(attachmentLoader) : new SkeletonJson(attachmentLoader);
|
|
12951
12917
|
parser.scale = scale;
|
|
12952
12918
|
const skeletonData = parser.readSkeletonData(skeletonAsset);
|
|
12919
|
+
console.log('>>>skeletonData', skeletonData);
|
|
12953
12920
|
Cache.set(cacheKey, skeletonData);
|
|
12954
12921
|
return new Spine$1({
|
|
12955
12922
|
skeletonData,
|
|
@@ -12959,29 +12926,31 @@ var Spine$1 = class extends ViewContainer {
|
|
|
12959
12926
|
}
|
|
12960
12927
|
};
|
|
12961
12928
|
var SpineDebugRenderer = class {
|
|
12962
|
-
|
|
12963
|
-
|
|
12964
|
-
|
|
12965
|
-
|
|
12966
|
-
|
|
12967
|
-
|
|
12968
|
-
|
|
12969
|
-
|
|
12970
|
-
|
|
12971
|
-
|
|
12972
|
-
|
|
12973
|
-
|
|
12974
|
-
|
|
12975
|
-
|
|
12976
|
-
|
|
12977
|
-
|
|
12978
|
-
|
|
12979
|
-
|
|
12980
|
-
|
|
12981
|
-
|
|
12982
|
-
|
|
12983
|
-
|
|
12984
|
-
|
|
12929
|
+
constructor() {
|
|
12930
|
+
this.registeredSpines = /* @__PURE__ */ new Map();
|
|
12931
|
+
this.drawMeshHull = true;
|
|
12932
|
+
this.drawMeshTriangles = true;
|
|
12933
|
+
this.drawBones = true;
|
|
12934
|
+
this.drawPaths = true;
|
|
12935
|
+
this.drawBoundingBoxes = true;
|
|
12936
|
+
this.drawClipping = true;
|
|
12937
|
+
this.drawRegionAttachments = true;
|
|
12938
|
+
this.drawEvents = true;
|
|
12939
|
+
this.lineWidth = 1;
|
|
12940
|
+
this.regionAttachmentsColor = 30975;
|
|
12941
|
+
this.meshHullColor = 30975;
|
|
12942
|
+
this.meshTrianglesColor = 16763904;
|
|
12943
|
+
this.clippingPolygonColor = 16711935;
|
|
12944
|
+
this.boundingBoxesRectColor = 65280;
|
|
12945
|
+
this.boundingBoxesPolygonColor = 65280;
|
|
12946
|
+
this.boundingBoxesCircleColor = 65280;
|
|
12947
|
+
this.pathsCurveColor = 16711680;
|
|
12948
|
+
this.pathsLineColor = 16711935;
|
|
12949
|
+
this.skeletonXYColor = 16711680;
|
|
12950
|
+
this.bonesColor = 61132;
|
|
12951
|
+
this.eventFontSize = 24;
|
|
12952
|
+
this.eventFontColor = 0;
|
|
12953
|
+
}
|
|
12985
12954
|
/**
|
|
12986
12955
|
* The debug is attached by force to each spine object.
|
|
12987
12956
|
* So we need to create it inside the spine when we get the first update
|
|
@@ -13069,7 +13038,11 @@ var SpineDebugRenderer = class {
|
|
|
13069
13038
|
debugDisplayObjects.pathsCurve.clear();
|
|
13070
13039
|
debugDisplayObjects.pathsLine.clear();
|
|
13071
13040
|
for (let len = debugDisplayObjects.bones.children.length; len > 0; len--) {
|
|
13072
|
-
debugDisplayObjects.bones.children[len - 1].destroy({
|
|
13041
|
+
debugDisplayObjects.bones.children[len - 1].destroy({
|
|
13042
|
+
children: true,
|
|
13043
|
+
texture: true,
|
|
13044
|
+
textureSource: true,
|
|
13045
|
+
});
|
|
13073
13046
|
}
|
|
13074
13047
|
const scale = Math.abs(spine.scale.x || spine.scale.y || 1);
|
|
13075
13048
|
const lineWidth = this.lineWidth / scale;
|
|
@@ -13103,7 +13076,10 @@ var SpineDebugRenderer = class {
|
|
|
13103
13076
|
const skeletonX = skeleton.x;
|
|
13104
13077
|
const skeletonY = skeleton.y;
|
|
13105
13078
|
const bones = skeleton.bones;
|
|
13106
|
-
debugDisplayObjects.skeletonXY.strokeStyle = {
|
|
13079
|
+
debugDisplayObjects.skeletonXY.strokeStyle = {
|
|
13080
|
+
width: lineWidth,
|
|
13081
|
+
color: this.skeletonXYColor,
|
|
13082
|
+
};
|
|
13107
13083
|
for (let i = 0, len = bones.length; i < len; i++) {
|
|
13108
13084
|
const bone = bones[i];
|
|
13109
13085
|
const boneLen = bone.data.length;
|
|
@@ -13226,8 +13202,14 @@ var SpineDebugRenderer = class {
|
|
|
13226
13202
|
}
|
|
13227
13203
|
}
|
|
13228
13204
|
}
|
|
13229
|
-
debugDisplayObjects.meshHullLine.stroke({
|
|
13230
|
-
|
|
13205
|
+
debugDisplayObjects.meshHullLine.stroke({
|
|
13206
|
+
width: lineWidth,
|
|
13207
|
+
color: this.meshHullColor,
|
|
13208
|
+
});
|
|
13209
|
+
debugDisplayObjects.meshTrianglesLine.stroke({
|
|
13210
|
+
width: lineWidth,
|
|
13211
|
+
color: this.meshTrianglesColor,
|
|
13212
|
+
});
|
|
13231
13213
|
}
|
|
13232
13214
|
drawClippingFunc(spine, debugDisplayObjects, lineWidth) {
|
|
13233
13215
|
const skeleton = spine.skeleton;
|
|
@@ -13345,8 +13327,14 @@ var SpineDebugRenderer = class {
|
|
|
13345
13327
|
y1 = y2;
|
|
13346
13328
|
}
|
|
13347
13329
|
}
|
|
13348
|
-
debugDisplayObjects.pathsCurve.stroke({
|
|
13349
|
-
|
|
13330
|
+
debugDisplayObjects.pathsCurve.stroke({
|
|
13331
|
+
width: lineWidth,
|
|
13332
|
+
color: this.pathsCurveColor,
|
|
13333
|
+
});
|
|
13334
|
+
debugDisplayObjects.pathsLine.stroke({
|
|
13335
|
+
width: lineWidth,
|
|
13336
|
+
color: this.pathsLineColor,
|
|
13337
|
+
});
|
|
13350
13338
|
}
|
|
13351
13339
|
unregisterSpine(spine) {
|
|
13352
13340
|
if (!this.registeredSpines.has(spine)) {
|
|
@@ -13357,7 +13345,11 @@ var SpineDebugRenderer = class {
|
|
|
13357
13345
|
return;
|
|
13358
13346
|
}
|
|
13359
13347
|
spine.state.removeListener(debugDisplayObjects.eventCallback);
|
|
13360
|
-
debugDisplayObjects.parentDebugContainer.destroy({
|
|
13348
|
+
debugDisplayObjects.parentDebugContainer.destroy({
|
|
13349
|
+
textureSource: true,
|
|
13350
|
+
children: true,
|
|
13351
|
+
texture: true,
|
|
13352
|
+
});
|
|
13361
13353
|
this.registeredSpines.delete(spine);
|
|
13362
13354
|
}
|
|
13363
13355
|
};
|
|
@@ -13446,7 +13438,6 @@ var pixiSpine = {
|
|
|
13446
13438
|
ShearXTimeline,
|
|
13447
13439
|
ShearYTimeline,
|
|
13448
13440
|
Skeleton,
|
|
13449
|
-
SpineTexture,
|
|
13450
13441
|
SkeletonBinary,
|
|
13451
13442
|
SkeletonBounds,
|
|
13452
13443
|
SkeletonClipping,
|