@caperjs/core 0.7.1 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/assetpack.mjs +35 -3
- package/build/defaults.mjs +39 -1
- package/build/index.mjs +13 -2
- package/build/internal/outputMarker.mjs +52 -0
- package/cli/doctor.mjs +205 -2
- package/cli/doctor.test.mjs +522 -1
- package/cli/native.mjs +808 -0
- package/cli/native.test.mjs +1039 -0
- package/cli.mjs +4 -0
- package/extras/css/fullscreen.css +8 -0
- package/extras/llms.txt +18 -0
- package/extras/skills/caper/SKILL.md +1 -0
- package/lib/{CaptionsPlugin-BoMkCsJO.js → CaptionsPlugin-COrofpHN.js} +2 -2
- package/lib/{CaptionsPlugin-BoMkCsJO.js.map → CaptionsPlugin-COrofpHN.js.map} +1 -1
- package/lib/{DataAdapter-DHWHuN-y.js → DataAdapter-T-22-_D1.js} +2 -2
- package/lib/{DataAdapter-DHWHuN-y.js.map → DataAdapter-T-22-_D1.js.map} +1 -1
- package/lib/{DebugRenderer-9a3mO9kX.js → DebugRenderer-ZN692Pbg.js} +4 -4
- package/lib/{DebugRenderer-9a3mO9kX.js.map → DebugRenderer-ZN692Pbg.js.map} +1 -1
- package/lib/{DevToolsPlugin-TkcBq1js.js → DevToolsPlugin-CQXFoj1T.js} +3 -3
- package/lib/{DevToolsPlugin-TkcBq1js.js.map → DevToolsPlugin-CQXFoj1T.js.map} +1 -1
- package/lib/{GSAPPlugin-DLOiVK_m.js → GSAPPlugin-CNkncyXS.js} +2 -2
- package/lib/{GSAPPlugin-DLOiVK_m.js.map → GSAPPlugin-CNkncyXS.js.map} +1 -1
- package/lib/{LayoutPlugin-CEPcr4GU.js → LayoutPlugin-BuJgr9bd.js} +26 -26
- package/lib/{LayoutPlugin-CEPcr4GU.js.map → LayoutPlugin-BuJgr9bd.js.map} +1 -1
- package/lib/{ScreenDebugPlugin-CiT0viiF.js → ScreenDebugPlugin-kz9Mr6j1.js} +2 -2
- package/lib/{ScreenDebugPlugin-CiT0viiF.js.map → ScreenDebugPlugin-kz9Mr6j1.js.map} +1 -1
- package/lib/{SpinePlugin-kyeWILtF.js → SpinePlugin-DDzD-Qxd.js} +1099 -877
- package/lib/SpinePlugin-DDzD-Qxd.js.map +1 -0
- package/lib/{StatsPlugin-5So44eOq.js → StatsPlugin-tyFGzVjy.js} +2 -2
- package/lib/{StatsPlugin-5So44eOq.js.map → StatsPlugin-tyFGzVjy.js.map} +1 -1
- package/lib/{VoiceOverPlugin--QoLj6pc.js → VoiceOverPlugin-rTNz_9eb.js} +2 -2
- package/lib/{VoiceOverPlugin--QoLj6pc.js.map → VoiceOverPlugin-rTNz_9eb.js.map} +1 -1
- package/lib/caper.mjs +51 -51
- package/lib/caper.mjs.map +1 -1
- package/lib/{const-GLIgV4ZV.js → const-Cj14a5U2.js} +5 -3
- package/lib/const-Cj14a5U2.js.map +1 -0
- package/lib/plugins/FullScreenPlugin.d.ts +65 -0
- package/lib/plugins/FullScreenPlugin.d.ts.map +1 -1
- package/lib/plugins/spine/SpinePlugin.d.ts.map +1 -1
- package/lib/plugins/spine/SpinePlugin.test.d.ts +2 -0
- package/lib/plugins/spine/SpinePlugin.test.d.ts.map +1 -0
- package/lib/{registries-C5yiKJ6v.js → registries-DmNGVLAi.js} +489 -446
- package/lib/registries-DmNGVLAi.js.map +1 -0
- package/lib/ui/Button.d.ts.map +1 -1
- package/lib/utils/platform.d.ts +5 -0
- package/lib/utils/platform.d.ts.map +1 -1
- package/lib/utils/platform.test.d.ts +2 -0
- package/lib/utils/platform.test.d.ts.map +1 -0
- package/lib/utils/types.d.ts +1 -1
- package/lib/utils/types.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/plugins/FullScreenPlugin.test.ts +138 -0
- package/src/plugins/FullScreenPlugin.ts +132 -0
- package/src/plugins/spine/SpinePlugin.test.ts +31 -0
- package/src/plugins/spine/SpinePlugin.ts +9 -2
- package/src/ui/Button.test.ts +22 -0
- package/src/ui/Button.ts +7 -0
- package/src/utils/platform.test.ts +20 -0
- package/src/utils/platform.ts +6 -0
- package/src/utils/types.ts +5 -1
- package/src/version.ts +2 -2
- package/lib/SpinePlugin-kyeWILtF.js.map +0 -1
- package/lib/const-GLIgV4ZV.js.map +0 -1
- package/lib/registries-C5yiKJ6v.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { W as e } from "./registries-
|
|
2
|
-
import { Assets as t,
|
|
1
|
+
import { W as e } from "./registries-DmNGVLAi.js";
|
|
2
|
+
import { Assets as t, Batcher as n, Buffer as r, BufferUsage as i, Cache as a, Color as o, Container as s, DEG_TO_RAD as c, DOMAdapter as l, ExtensionType as u, Geometry as d, Graphics as f, LoaderParserPriority as p, Resolver as m, Shader as h, Texture as g, TextureSource as _, Ticker as v, ViewContainer as y, checkExtension as b, collectAllRenderables as x, colorBit as S, colorBitGl as C, compileHighShaderGlProgram as w, compileHighShaderGpuProgram as T, extensions as E, fastCopy as D, generateTextureBatchBit as O, generateTextureBatchBitGl as k, getBatchSamplersUniformGroup as A, path as j, roundPixelsBit as ee, roundPixelsBitGl as M } from "pixi.js";
|
|
3
3
|
//#region ../../node_modules/.pnpm/@esotericsoftware+spine-core@4.2.84/node_modules/@esotericsoftware/spine-core/dist/Utils.js
|
|
4
|
-
var
|
|
4
|
+
var N = class {
|
|
5
5
|
entries = {};
|
|
6
6
|
size = 0;
|
|
7
7
|
add(e) {
|
|
@@ -19,7 +19,7 @@ var v = class {
|
|
|
19
19
|
clear() {
|
|
20
20
|
this.entries = {}, this.size = 0;
|
|
21
21
|
}
|
|
22
|
-
},
|
|
22
|
+
}, P = class e {
|
|
23
23
|
r;
|
|
24
24
|
g;
|
|
25
25
|
b;
|
|
@@ -60,7 +60,7 @@ var v = class {
|
|
|
60
60
|
static fromString(t, n = new e()) {
|
|
61
61
|
return n.setFromString(t);
|
|
62
62
|
}
|
|
63
|
-
},
|
|
63
|
+
}, F = class e {
|
|
64
64
|
static PI = 3.1415927;
|
|
65
65
|
static PI2 = e.PI * 2;
|
|
66
66
|
static invPI2 = 1 / e.PI2;
|
|
@@ -100,7 +100,7 @@ var v = class {
|
|
|
100
100
|
static isPowerOfTwo(e) {
|
|
101
101
|
return e && (e & e - 1) == 0;
|
|
102
102
|
}
|
|
103
|
-
},
|
|
103
|
+
}, I = class e {
|
|
104
104
|
static SUPPORTS_TYPED_ARRAYS = typeof Float32Array < "u";
|
|
105
105
|
static arrayCopy(e, t, n, r, i) {
|
|
106
106
|
for (let a = t, o = r; a < t + i; a++, o++) n[o] = e[a];
|
|
@@ -152,7 +152,7 @@ var v = class {
|
|
|
152
152
|
static enumValue(e, t) {
|
|
153
153
|
return e[t[0].toUpperCase() + t.slice(1)];
|
|
154
154
|
}
|
|
155
|
-
},
|
|
155
|
+
}, L = class {
|
|
156
156
|
items = [];
|
|
157
157
|
instantiator;
|
|
158
158
|
constructor(e) {
|
|
@@ -170,7 +170,7 @@ var v = class {
|
|
|
170
170
|
clear() {
|
|
171
171
|
this.items.length = 0;
|
|
172
172
|
}
|
|
173
|
-
},
|
|
173
|
+
}, R = class {
|
|
174
174
|
x;
|
|
175
175
|
y;
|
|
176
176
|
constructor(e = 0, t = 0) {
|
|
@@ -187,13 +187,13 @@ var v = class {
|
|
|
187
187
|
let e = this.length();
|
|
188
188
|
return e != 0 && (this.x /= e, this.y /= e), this;
|
|
189
189
|
}
|
|
190
|
-
},
|
|
190
|
+
}, z = class {
|
|
191
191
|
name;
|
|
192
192
|
constructor(e) {
|
|
193
193
|
if (!e) throw Error("name cannot be null.");
|
|
194
194
|
this.name = e;
|
|
195
195
|
}
|
|
196
|
-
},
|
|
196
|
+
}, B = class e extends z {
|
|
197
197
|
static nextID = 0;
|
|
198
198
|
id = e.nextID++;
|
|
199
199
|
bones = null;
|
|
@@ -242,9 +242,9 @@ var v = class {
|
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
244
|
copyTo(e) {
|
|
245
|
-
this.bones ? (e.bones = Array(this.bones.length),
|
|
245
|
+
this.bones ? (e.bones = Array(this.bones.length), I.arrayCopy(this.bones, 0, e.bones, 0, this.bones.length)) : e.bones = null, this.vertices && (e.vertices = I.newFloatArray(this.vertices.length), I.arrayCopy(this.vertices, 0, e.vertices, 0, this.vertices.length)), e.worldVerticesLength = this.worldVerticesLength, e.timelineAttachment = this.timelineAttachment;
|
|
246
246
|
}
|
|
247
|
-
},
|
|
247
|
+
}, te = class e {
|
|
248
248
|
static _nextID = 0;
|
|
249
249
|
id = e.nextID();
|
|
250
250
|
regions;
|
|
@@ -256,7 +256,7 @@ var v = class {
|
|
|
256
256
|
}
|
|
257
257
|
copy() {
|
|
258
258
|
let t = new e(this.regions.length);
|
|
259
|
-
return
|
|
259
|
+
return I.arrayCopy(this.regions, 0, t.regions, 0, this.regions.length), t.start = this.start, t.digits = this.digits, t.setupIndex = this.setupIndex, t;
|
|
260
260
|
}
|
|
261
261
|
apply(e, t) {
|
|
262
262
|
let n = e.sequenceIndex;
|
|
@@ -272,22 +272,22 @@ var v = class {
|
|
|
272
272
|
static nextID() {
|
|
273
273
|
return e._nextID++;
|
|
274
274
|
}
|
|
275
|
-
},
|
|
275
|
+
}, V;
|
|
276
276
|
(function(e) {
|
|
277
277
|
e[e.hold = 0] = "hold", e[e.once = 1] = "once", e[e.loop = 2] = "loop", e[e.pingpong = 3] = "pingpong", e[e.onceReverse = 4] = "onceReverse", e[e.loopReverse = 5] = "loopReverse", e[e.pingpongReverse = 6] = "pingpongReverse";
|
|
278
|
-
})(
|
|
279
|
-
var
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
],
|
|
278
|
+
})(V ||= {});
|
|
279
|
+
var ne = [
|
|
280
|
+
V.hold,
|
|
281
|
+
V.once,
|
|
282
|
+
V.loop,
|
|
283
|
+
V.pingpong,
|
|
284
|
+
V.onceReverse,
|
|
285
|
+
V.loopReverse,
|
|
286
|
+
V.pingpongReverse
|
|
287
|
+
], re = class {
|
|
288
288
|
name;
|
|
289
289
|
timelines = [];
|
|
290
|
-
timelineIds = new
|
|
290
|
+
timelineIds = new N();
|
|
291
291
|
duration;
|
|
292
292
|
constructor(e, t, n) {
|
|
293
293
|
if (!e) throw Error("name cannot be null.");
|
|
@@ -308,15 +308,15 @@ var O = [
|
|
|
308
308
|
let c = this.timelines;
|
|
309
309
|
for (let r = 0, l = c.length; r < l; r++) c[r].apply(e, t, n, i, a, o, s);
|
|
310
310
|
}
|
|
311
|
-
},
|
|
311
|
+
}, H;
|
|
312
312
|
(function(e) {
|
|
313
313
|
e[e.setup = 0] = "setup", e[e.first = 1] = "first", e[e.replace = 2] = "replace", e[e.add = 3] = "add";
|
|
314
|
-
})(
|
|
315
|
-
var
|
|
314
|
+
})(H ||= {});
|
|
315
|
+
var U;
|
|
316
316
|
(function(e) {
|
|
317
317
|
e[e.mixIn = 0] = "mixIn", e[e.mixOut = 1] = "mixOut";
|
|
318
|
-
})(
|
|
319
|
-
var
|
|
318
|
+
})(U ||= {});
|
|
319
|
+
var W = {
|
|
320
320
|
rotate: 0,
|
|
321
321
|
x: 1,
|
|
322
322
|
y: 2,
|
|
@@ -346,11 +346,11 @@ var M = {
|
|
|
346
346
|
physicsConstraintMix: 26,
|
|
347
347
|
physicsConstraintReset: 27,
|
|
348
348
|
sequence: 28
|
|
349
|
-
},
|
|
349
|
+
}, G = class {
|
|
350
350
|
propertyIds;
|
|
351
351
|
frames;
|
|
352
352
|
constructor(e, t) {
|
|
353
|
-
this.propertyIds = t, this.frames =
|
|
353
|
+
this.propertyIds = t, this.frames = I.newFloatArray(e * this.getFrameEntries());
|
|
354
354
|
}
|
|
355
355
|
getPropertyIds() {
|
|
356
356
|
return this.propertyIds;
|
|
@@ -374,10 +374,10 @@ var M = {
|
|
|
374
374
|
for (let i = n; i < r; i += n) if (e[i] > t) return i - n;
|
|
375
375
|
return r - n;
|
|
376
376
|
}
|
|
377
|
-
},
|
|
377
|
+
}, ie = class extends G {
|
|
378
378
|
curves;
|
|
379
379
|
constructor(e, t, n) {
|
|
380
|
-
super(e, n), this.curves =
|
|
380
|
+
super(e, n), this.curves = I.newFloatArray(e + t * 18), this.curves[e - 1] = 1;
|
|
381
381
|
}
|
|
382
382
|
setLinear(e) {
|
|
383
383
|
this.curves[e] = 0;
|
|
@@ -388,8 +388,8 @@ var M = {
|
|
|
388
388
|
shrink(e) {
|
|
389
389
|
let t = this.getFrameCount() + e * 18;
|
|
390
390
|
if (this.curves.length > t) {
|
|
391
|
-
let e =
|
|
392
|
-
|
|
391
|
+
let e = I.newFloatArray(t);
|
|
392
|
+
I.arrayCopy(this.curves, 0, e, 0, t), this.curves = e;
|
|
393
393
|
}
|
|
394
394
|
}
|
|
395
395
|
setBezier(e, t, n, r, i, a, o, s, c, l, u) {
|
|
@@ -413,7 +413,7 @@ var M = {
|
|
|
413
413
|
let o = i[a - 2], s = i[a - 1];
|
|
414
414
|
return s + (e - o) / (this.frames[t] - o) * (this.frames[t + n] - s);
|
|
415
415
|
}
|
|
416
|
-
},
|
|
416
|
+
}, ae = class extends ie {
|
|
417
417
|
constructor(e, t, n) {
|
|
418
418
|
super(e, t, [n]);
|
|
419
419
|
}
|
|
@@ -441,66 +441,66 @@ var M = {
|
|
|
441
441
|
getRelativeValue(e, t, n, r, i) {
|
|
442
442
|
if (e < this.frames[0]) {
|
|
443
443
|
switch (n) {
|
|
444
|
-
case
|
|
445
|
-
case
|
|
444
|
+
case H.setup: return i;
|
|
445
|
+
case H.first: return r + (i - r) * t;
|
|
446
446
|
}
|
|
447
447
|
return r;
|
|
448
448
|
}
|
|
449
449
|
let a = this.getCurveValue(e);
|
|
450
450
|
switch (n) {
|
|
451
|
-
case
|
|
452
|
-
case
|
|
453
|
-
case
|
|
451
|
+
case H.setup: return i + a * t;
|
|
452
|
+
case H.first:
|
|
453
|
+
case H.replace: a += i - r;
|
|
454
454
|
}
|
|
455
455
|
return r + a * t;
|
|
456
456
|
}
|
|
457
457
|
getAbsoluteValue(e, t, n, r, i) {
|
|
458
458
|
if (e < this.frames[0]) {
|
|
459
459
|
switch (n) {
|
|
460
|
-
case
|
|
461
|
-
case
|
|
460
|
+
case H.setup: return i;
|
|
461
|
+
case H.first: return r + (i - r) * t;
|
|
462
462
|
}
|
|
463
463
|
return r;
|
|
464
464
|
}
|
|
465
465
|
let a = this.getCurveValue(e);
|
|
466
|
-
return n ==
|
|
466
|
+
return n == H.setup ? i + (a - i) * t : r + (a - r) * t;
|
|
467
467
|
}
|
|
468
468
|
getAbsoluteValue2(e, t, n, r, i, a) {
|
|
469
469
|
if (e < this.frames[0]) {
|
|
470
470
|
switch (n) {
|
|
471
|
-
case
|
|
472
|
-
case
|
|
471
|
+
case H.setup: return i;
|
|
472
|
+
case H.first: return r + (i - r) * t;
|
|
473
473
|
}
|
|
474
474
|
return r;
|
|
475
475
|
}
|
|
476
|
-
return n ==
|
|
476
|
+
return n == H.setup ? i + (a - i) * t : r + (a - r) * t;
|
|
477
477
|
}
|
|
478
478
|
getScaleValue(e, t, n, r, i, a) {
|
|
479
479
|
if (e < this.frames[0]) {
|
|
480
480
|
switch (n) {
|
|
481
|
-
case
|
|
482
|
-
case
|
|
481
|
+
case H.setup: return a;
|
|
482
|
+
case H.first: return i + (a - i) * t;
|
|
483
483
|
}
|
|
484
484
|
return i;
|
|
485
485
|
}
|
|
486
486
|
let o = this.getCurveValue(e) * a;
|
|
487
|
-
if (t == 1) return n ==
|
|
488
|
-
if (r ==
|
|
489
|
-
case
|
|
490
|
-
case
|
|
491
|
-
case
|
|
487
|
+
if (t == 1) return n == H.add ? i + o - a : o;
|
|
488
|
+
if (r == U.mixOut) switch (n) {
|
|
489
|
+
case H.setup: return a + (Math.abs(o) * F.signum(a) - a) * t;
|
|
490
|
+
case H.first:
|
|
491
|
+
case H.replace: return i + (Math.abs(o) * F.signum(i) - i) * t;
|
|
492
492
|
}
|
|
493
493
|
else {
|
|
494
494
|
let e = 0;
|
|
495
495
|
switch (n) {
|
|
496
|
-
case
|
|
497
|
-
case
|
|
498
|
-
case
|
|
496
|
+
case H.setup: return e = Math.abs(a) * F.signum(o), e + (o - e) * t;
|
|
497
|
+
case H.first:
|
|
498
|
+
case H.replace: return e = Math.abs(i) * F.signum(o), e + (o - e) * t;
|
|
499
499
|
}
|
|
500
500
|
}
|
|
501
501
|
return i + (o - a) * t;
|
|
502
502
|
}
|
|
503
|
-
},
|
|
503
|
+
}, oe = class extends ie {
|
|
504
504
|
constructor(e, t, n, r) {
|
|
505
505
|
super(e, t, [n, r]);
|
|
506
506
|
}
|
|
@@ -510,19 +510,19 @@ var M = {
|
|
|
510
510
|
setFrame(e, t, n, r) {
|
|
511
511
|
e *= 3, this.frames[e] = t, this.frames[e + 1] = n, this.frames[e + 2] = r;
|
|
512
512
|
}
|
|
513
|
-
},
|
|
513
|
+
}, se = class extends ae {
|
|
514
514
|
boneIndex = 0;
|
|
515
515
|
constructor(e, t, n) {
|
|
516
|
-
super(e, t,
|
|
516
|
+
super(e, t, W.rotate + "|" + n), this.boneIndex = n;
|
|
517
517
|
}
|
|
518
518
|
apply(e, t, n, r, i, a, o) {
|
|
519
519
|
let s = e.bones[this.boneIndex];
|
|
520
520
|
s.active && (s.rotation = this.getRelativeValue(n, i, a, s.rotation, s.data.rotation));
|
|
521
521
|
}
|
|
522
|
-
},
|
|
522
|
+
}, ce = class extends oe {
|
|
523
523
|
boneIndex = 0;
|
|
524
524
|
constructor(e, t, n) {
|
|
525
|
-
super(e, t,
|
|
525
|
+
super(e, t, W.x + "|" + n, W.y + "|" + n), this.boneIndex = n;
|
|
526
526
|
}
|
|
527
527
|
apply(e, t, n, r, i, a, o) {
|
|
528
528
|
let s = e.bones[this.boneIndex];
|
|
@@ -530,14 +530,14 @@ var M = {
|
|
|
530
530
|
let c = this.frames;
|
|
531
531
|
if (n < c[0]) {
|
|
532
532
|
switch (a) {
|
|
533
|
-
case
|
|
533
|
+
case H.setup:
|
|
534
534
|
s.x = s.data.x, s.y = s.data.y;
|
|
535
535
|
return;
|
|
536
|
-
case
|
|
536
|
+
case H.first: s.x += (s.data.x - s.x) * i, s.y += (s.data.y - s.y) * i;
|
|
537
537
|
}
|
|
538
538
|
return;
|
|
539
539
|
}
|
|
540
|
-
let l = 0, u = 0, d =
|
|
540
|
+
let l = 0, u = 0, d = G.search(c, n, 3), f = this.curves[d / 3];
|
|
541
541
|
switch (f) {
|
|
542
542
|
case 0:
|
|
543
543
|
let e = c[d];
|
|
@@ -551,38 +551,38 @@ var M = {
|
|
|
551
551
|
default: l = this.getBezierValue(n, d, 1, f - 2), u = this.getBezierValue(n, d, 2, f + 18 - 2);
|
|
552
552
|
}
|
|
553
553
|
switch (a) {
|
|
554
|
-
case
|
|
554
|
+
case H.setup:
|
|
555
555
|
s.x = s.data.x + l * i, s.y = s.data.y + u * i;
|
|
556
556
|
break;
|
|
557
|
-
case
|
|
558
|
-
case
|
|
557
|
+
case H.first:
|
|
558
|
+
case H.replace:
|
|
559
559
|
s.x += (s.data.x + l - s.x) * i, s.y += (s.data.y + u - s.y) * i;
|
|
560
560
|
break;
|
|
561
|
-
case
|
|
561
|
+
case H.add: s.x += l * i, s.y += u * i;
|
|
562
562
|
}
|
|
563
563
|
}
|
|
564
|
-
},
|
|
564
|
+
}, le = class extends ae {
|
|
565
565
|
boneIndex = 0;
|
|
566
566
|
constructor(e, t, n) {
|
|
567
|
-
super(e, t,
|
|
567
|
+
super(e, t, W.x + "|" + n), this.boneIndex = n;
|
|
568
568
|
}
|
|
569
569
|
apply(e, t, n, r, i, a, o) {
|
|
570
570
|
let s = e.bones[this.boneIndex];
|
|
571
571
|
s.active && (s.x = this.getRelativeValue(n, i, a, s.x, s.data.x));
|
|
572
572
|
}
|
|
573
|
-
},
|
|
573
|
+
}, ue = class extends ae {
|
|
574
574
|
boneIndex = 0;
|
|
575
575
|
constructor(e, t, n) {
|
|
576
|
-
super(e, t,
|
|
576
|
+
super(e, t, W.y + "|" + n), this.boneIndex = n;
|
|
577
577
|
}
|
|
578
578
|
apply(e, t, n, r, i, a, o) {
|
|
579
579
|
let s = e.bones[this.boneIndex];
|
|
580
580
|
s.active && (s.y = this.getRelativeValue(n, i, a, s.y, s.data.y));
|
|
581
581
|
}
|
|
582
|
-
},
|
|
582
|
+
}, de = class extends oe {
|
|
583
583
|
boneIndex = 0;
|
|
584
584
|
constructor(e, t, n) {
|
|
585
|
-
super(e, t,
|
|
585
|
+
super(e, t, W.scaleX + "|" + n, W.scaleY + "|" + n), this.boneIndex = n;
|
|
586
586
|
}
|
|
587
587
|
apply(e, t, n, r, i, a, o) {
|
|
588
588
|
let s = e.bones[this.boneIndex];
|
|
@@ -590,14 +590,14 @@ var M = {
|
|
|
590
590
|
let c = this.frames;
|
|
591
591
|
if (n < c[0]) {
|
|
592
592
|
switch (a) {
|
|
593
|
-
case
|
|
593
|
+
case H.setup:
|
|
594
594
|
s.scaleX = s.data.scaleX, s.scaleY = s.data.scaleY;
|
|
595
595
|
return;
|
|
596
|
-
case
|
|
596
|
+
case H.first: s.scaleX += (s.data.scaleX - s.scaleX) * i, s.scaleY += (s.data.scaleY - s.scaleY) * i;
|
|
597
597
|
}
|
|
598
598
|
return;
|
|
599
599
|
}
|
|
600
|
-
let l, u, d =
|
|
600
|
+
let l, u, d = G.search(c, n, 3), f = this.curves[d / 3];
|
|
601
601
|
switch (f) {
|
|
602
602
|
case 0:
|
|
603
603
|
let e = c[d];
|
|
@@ -610,53 +610,53 @@ var M = {
|
|
|
610
610
|
break;
|
|
611
611
|
default: l = this.getBezierValue(n, d, 1, f - 2), u = this.getBezierValue(n, d, 2, f + 18 - 2);
|
|
612
612
|
}
|
|
613
|
-
if (l *= s.data.scaleX, u *= s.data.scaleY, i == 1) a ==
|
|
613
|
+
if (l *= s.data.scaleX, u *= s.data.scaleY, i == 1) a == H.add ? (s.scaleX += l - s.data.scaleX, s.scaleY += u - s.data.scaleY) : (s.scaleX = l, s.scaleY = u);
|
|
614
614
|
else {
|
|
615
615
|
let e = 0, t = 0;
|
|
616
|
-
if (o ==
|
|
617
|
-
case
|
|
618
|
-
e = s.data.scaleX, t = s.data.scaleY, s.scaleX = e + (Math.abs(l) *
|
|
616
|
+
if (o == U.mixOut) switch (a) {
|
|
617
|
+
case H.setup:
|
|
618
|
+
e = s.data.scaleX, t = s.data.scaleY, s.scaleX = e + (Math.abs(l) * F.signum(e) - e) * i, s.scaleY = t + (Math.abs(u) * F.signum(t) - t) * i;
|
|
619
619
|
break;
|
|
620
|
-
case
|
|
621
|
-
case
|
|
622
|
-
e = s.scaleX, t = s.scaleY, s.scaleX = e + (Math.abs(l) *
|
|
620
|
+
case H.first:
|
|
621
|
+
case H.replace:
|
|
622
|
+
e = s.scaleX, t = s.scaleY, s.scaleX = e + (Math.abs(l) * F.signum(e) - e) * i, s.scaleY = t + (Math.abs(u) * F.signum(t) - t) * i;
|
|
623
623
|
break;
|
|
624
|
-
case
|
|
624
|
+
case H.add: s.scaleX += (l - s.data.scaleX) * i, s.scaleY += (u - s.data.scaleY) * i;
|
|
625
625
|
}
|
|
626
626
|
else switch (a) {
|
|
627
|
-
case
|
|
628
|
-
e = Math.abs(s.data.scaleX) *
|
|
627
|
+
case H.setup:
|
|
628
|
+
e = Math.abs(s.data.scaleX) * F.signum(l), t = Math.abs(s.data.scaleY) * F.signum(u), s.scaleX = e + (l - e) * i, s.scaleY = t + (u - t) * i;
|
|
629
629
|
break;
|
|
630
|
-
case
|
|
631
|
-
case
|
|
632
|
-
e = Math.abs(s.scaleX) *
|
|
630
|
+
case H.first:
|
|
631
|
+
case H.replace:
|
|
632
|
+
e = Math.abs(s.scaleX) * F.signum(l), t = Math.abs(s.scaleY) * F.signum(u), s.scaleX = e + (l - e) * i, s.scaleY = t + (u - t) * i;
|
|
633
633
|
break;
|
|
634
|
-
case
|
|
634
|
+
case H.add: s.scaleX += (l - s.data.scaleX) * i, s.scaleY += (u - s.data.scaleY) * i;
|
|
635
635
|
}
|
|
636
636
|
}
|
|
637
637
|
}
|
|
638
|
-
},
|
|
638
|
+
}, fe = class extends ae {
|
|
639
639
|
boneIndex = 0;
|
|
640
640
|
constructor(e, t, n) {
|
|
641
|
-
super(e, t,
|
|
641
|
+
super(e, t, W.scaleX + "|" + n), this.boneIndex = n;
|
|
642
642
|
}
|
|
643
643
|
apply(e, t, n, r, i, a, o) {
|
|
644
644
|
let s = e.bones[this.boneIndex];
|
|
645
645
|
s.active && (s.scaleX = this.getScaleValue(n, i, a, o, s.scaleX, s.data.scaleX));
|
|
646
646
|
}
|
|
647
|
-
},
|
|
647
|
+
}, pe = class extends ae {
|
|
648
648
|
boneIndex = 0;
|
|
649
649
|
constructor(e, t, n) {
|
|
650
|
-
super(e, t,
|
|
650
|
+
super(e, t, W.scaleY + "|" + n), this.boneIndex = n;
|
|
651
651
|
}
|
|
652
652
|
apply(e, t, n, r, i, a, o) {
|
|
653
653
|
let s = e.bones[this.boneIndex];
|
|
654
654
|
s.active && (s.scaleY = this.getScaleValue(n, i, a, o, s.scaleY, s.data.scaleY));
|
|
655
655
|
}
|
|
656
|
-
},
|
|
656
|
+
}, me = class extends oe {
|
|
657
657
|
boneIndex = 0;
|
|
658
658
|
constructor(e, t, n) {
|
|
659
|
-
super(e, t,
|
|
659
|
+
super(e, t, W.shearX + "|" + n, W.shearY + "|" + n), this.boneIndex = n;
|
|
660
660
|
}
|
|
661
661
|
apply(e, t, n, r, i, a, o) {
|
|
662
662
|
let s = e.bones[this.boneIndex];
|
|
@@ -664,14 +664,14 @@ var M = {
|
|
|
664
664
|
let c = this.frames;
|
|
665
665
|
if (n < c[0]) {
|
|
666
666
|
switch (a) {
|
|
667
|
-
case
|
|
667
|
+
case H.setup:
|
|
668
668
|
s.shearX = s.data.shearX, s.shearY = s.data.shearY;
|
|
669
669
|
return;
|
|
670
|
-
case
|
|
670
|
+
case H.first: s.shearX += (s.data.shearX - s.shearX) * i, s.shearY += (s.data.shearY - s.shearY) * i;
|
|
671
671
|
}
|
|
672
672
|
return;
|
|
673
673
|
}
|
|
674
|
-
let l = 0, u = 0, d =
|
|
674
|
+
let l = 0, u = 0, d = G.search(c, n, 3), f = this.curves[d / 3];
|
|
675
675
|
switch (f) {
|
|
676
676
|
case 0:
|
|
677
677
|
let e = c[d];
|
|
@@ -685,38 +685,38 @@ var M = {
|
|
|
685
685
|
default: l = this.getBezierValue(n, d, 1, f - 2), u = this.getBezierValue(n, d, 2, f + 18 - 2);
|
|
686
686
|
}
|
|
687
687
|
switch (a) {
|
|
688
|
-
case
|
|
688
|
+
case H.setup:
|
|
689
689
|
s.shearX = s.data.shearX + l * i, s.shearY = s.data.shearY + u * i;
|
|
690
690
|
break;
|
|
691
|
-
case
|
|
692
|
-
case
|
|
691
|
+
case H.first:
|
|
692
|
+
case H.replace:
|
|
693
693
|
s.shearX += (s.data.shearX + l - s.shearX) * i, s.shearY += (s.data.shearY + u - s.shearY) * i;
|
|
694
694
|
break;
|
|
695
|
-
case
|
|
695
|
+
case H.add: s.shearX += l * i, s.shearY += u * i;
|
|
696
696
|
}
|
|
697
697
|
}
|
|
698
|
-
},
|
|
698
|
+
}, he = class extends ae {
|
|
699
699
|
boneIndex = 0;
|
|
700
700
|
constructor(e, t, n) {
|
|
701
|
-
super(e, t,
|
|
701
|
+
super(e, t, W.shearX + "|" + n), this.boneIndex = n;
|
|
702
702
|
}
|
|
703
703
|
apply(e, t, n, r, i, a, o) {
|
|
704
704
|
let s = e.bones[this.boneIndex];
|
|
705
705
|
s.active && (s.shearX = this.getRelativeValue(n, i, a, s.shearX, s.data.shearX));
|
|
706
706
|
}
|
|
707
|
-
},
|
|
707
|
+
}, ge = class extends ae {
|
|
708
708
|
boneIndex = 0;
|
|
709
709
|
constructor(e, t, n) {
|
|
710
|
-
super(e, t,
|
|
710
|
+
super(e, t, W.shearY + "|" + n), this.boneIndex = n;
|
|
711
711
|
}
|
|
712
712
|
apply(e, t, n, r, i, a, o) {
|
|
713
713
|
let s = e.bones[this.boneIndex];
|
|
714
714
|
s.active && (s.shearY = this.getRelativeValue(n, i, a, s.shearY, s.data.shearY));
|
|
715
715
|
}
|
|
716
|
-
},
|
|
716
|
+
}, _e = class extends G {
|
|
717
717
|
boneIndex = 0;
|
|
718
718
|
constructor(e, t) {
|
|
719
|
-
super(e, [
|
|
719
|
+
super(e, [W.inherit + "|" + t]), this.boneIndex = t;
|
|
720
720
|
}
|
|
721
721
|
getFrameEntries() {
|
|
722
722
|
return 2;
|
|
@@ -727,21 +727,21 @@ var M = {
|
|
|
727
727
|
apply(e, t, n, r, i, a, o) {
|
|
728
728
|
let s = e.bones[this.boneIndex];
|
|
729
729
|
if (!s.active) return;
|
|
730
|
-
if (o ==
|
|
731
|
-
a ==
|
|
730
|
+
if (o == U.mixOut) {
|
|
731
|
+
a == H.setup && (s.inherit = s.data.inherit);
|
|
732
732
|
return;
|
|
733
733
|
}
|
|
734
734
|
let c = this.frames;
|
|
735
735
|
if (n < c[0]) {
|
|
736
|
-
(a ==
|
|
736
|
+
(a == H.setup || a == H.first) && (s.inherit = s.data.inherit);
|
|
737
737
|
return;
|
|
738
738
|
}
|
|
739
|
-
s.inherit = this.frames[
|
|
739
|
+
s.inherit = this.frames[G.search(c, n, 2) + 1];
|
|
740
740
|
}
|
|
741
|
-
},
|
|
741
|
+
}, ve = class extends ie {
|
|
742
742
|
slotIndex = 0;
|
|
743
743
|
constructor(e, t, n) {
|
|
744
|
-
super(e, t, [
|
|
744
|
+
super(e, t, [W.rgb + "|" + n, W.alpha + "|" + n]), this.slotIndex = n;
|
|
745
745
|
}
|
|
746
746
|
getFrameEntries() {
|
|
747
747
|
return 5;
|
|
@@ -756,14 +756,14 @@ var M = {
|
|
|
756
756
|
if (n < c[0]) {
|
|
757
757
|
let e = s.data.color;
|
|
758
758
|
switch (a) {
|
|
759
|
-
case
|
|
759
|
+
case H.setup:
|
|
760
760
|
l.setFromColor(e);
|
|
761
761
|
return;
|
|
762
|
-
case
|
|
762
|
+
case H.first: l.add((e.r - l.r) * i, (e.g - l.g) * i, (e.b - l.b) * i, (e.a - l.a) * i);
|
|
763
763
|
}
|
|
764
764
|
return;
|
|
765
765
|
}
|
|
766
|
-
let u = 0, d = 0, f = 0, p = 0, m =
|
|
766
|
+
let u = 0, d = 0, f = 0, p = 0, m = G.search(c, n, 5), h = this.curves[m / 5];
|
|
767
767
|
switch (h) {
|
|
768
768
|
case 0:
|
|
769
769
|
let e = c[m];
|
|
@@ -776,12 +776,12 @@ var M = {
|
|
|
776
776
|
break;
|
|
777
777
|
default: u = this.getBezierValue(n, m, 1, h - 2), d = this.getBezierValue(n, m, 2, h + 18 - 2), f = this.getBezierValue(n, m, 3, h + 36 - 2), p = this.getBezierValue(n, m, 4, h + 54 - 2);
|
|
778
778
|
}
|
|
779
|
-
i == 1 ? l.set(u, d, f, p) : (a ==
|
|
779
|
+
i == 1 ? l.set(u, d, f, p) : (a == H.setup && l.setFromColor(s.data.color), l.add((u - l.r) * i, (d - l.g) * i, (f - l.b) * i, (p - l.a) * i));
|
|
780
780
|
}
|
|
781
|
-
},
|
|
781
|
+
}, ye = class extends ie {
|
|
782
782
|
slotIndex = 0;
|
|
783
783
|
constructor(e, t, n) {
|
|
784
|
-
super(e, t, [
|
|
784
|
+
super(e, t, [W.rgb + "|" + n]), this.slotIndex = n;
|
|
785
785
|
}
|
|
786
786
|
getFrameEntries() {
|
|
787
787
|
return 4;
|
|
@@ -796,14 +796,14 @@ var M = {
|
|
|
796
796
|
if (n < c[0]) {
|
|
797
797
|
let e = s.data.color;
|
|
798
798
|
switch (a) {
|
|
799
|
-
case
|
|
799
|
+
case H.setup:
|
|
800
800
|
l.r = e.r, l.g = e.g, l.b = e.b;
|
|
801
801
|
return;
|
|
802
|
-
case
|
|
802
|
+
case H.first: l.r += (e.r - l.r) * i, l.g += (e.g - l.g) * i, l.b += (e.b - l.b) * i;
|
|
803
803
|
}
|
|
804
804
|
return;
|
|
805
805
|
}
|
|
806
|
-
let u = 0, d = 0, f = 0, p =
|
|
806
|
+
let u = 0, d = 0, f = 0, p = G.search(c, n, 4), m = this.curves[p >> 2];
|
|
807
807
|
switch (m) {
|
|
808
808
|
case 0:
|
|
809
809
|
let e = c[p];
|
|
@@ -818,17 +818,17 @@ var M = {
|
|
|
818
818
|
}
|
|
819
819
|
if (i == 1) l.r = u, l.g = d, l.b = f;
|
|
820
820
|
else {
|
|
821
|
-
if (a ==
|
|
821
|
+
if (a == H.setup) {
|
|
822
822
|
let e = s.data.color;
|
|
823
823
|
l.r = e.r, l.g = e.g, l.b = e.b;
|
|
824
824
|
}
|
|
825
825
|
l.r += (u - l.r) * i, l.g += (d - l.g) * i, l.b += (f - l.b) * i;
|
|
826
826
|
}
|
|
827
827
|
}
|
|
828
|
-
},
|
|
828
|
+
}, be = class extends ae {
|
|
829
829
|
slotIndex = 0;
|
|
830
830
|
constructor(e, t, n) {
|
|
831
|
-
super(e, t,
|
|
831
|
+
super(e, t, W.alpha + "|" + n), this.slotIndex = n;
|
|
832
832
|
}
|
|
833
833
|
apply(e, t, n, r, i, a, o) {
|
|
834
834
|
let s = e.slots[this.slotIndex];
|
|
@@ -837,23 +837,23 @@ var M = {
|
|
|
837
837
|
if (n < this.frames[0]) {
|
|
838
838
|
let e = s.data.color;
|
|
839
839
|
switch (a) {
|
|
840
|
-
case
|
|
840
|
+
case H.setup:
|
|
841
841
|
c.a = e.a;
|
|
842
842
|
return;
|
|
843
|
-
case
|
|
843
|
+
case H.first: c.a += (e.a - c.a) * i;
|
|
844
844
|
}
|
|
845
845
|
return;
|
|
846
846
|
}
|
|
847
847
|
let l = this.getCurveValue(n);
|
|
848
|
-
i == 1 ? c.a = l : (a ==
|
|
848
|
+
i == 1 ? c.a = l : (a == H.setup && (c.a = s.data.color.a), c.a += (l - c.a) * i);
|
|
849
849
|
}
|
|
850
|
-
},
|
|
850
|
+
}, xe = class extends ie {
|
|
851
851
|
slotIndex = 0;
|
|
852
852
|
constructor(e, t, n) {
|
|
853
853
|
super(e, t, [
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
854
|
+
W.rgb + "|" + n,
|
|
855
|
+
W.alpha + "|" + n,
|
|
856
|
+
W.rgb2 + "|" + n
|
|
857
857
|
]), this.slotIndex = n;
|
|
858
858
|
}
|
|
859
859
|
getFrameEntries() {
|
|
@@ -869,14 +869,14 @@ var M = {
|
|
|
869
869
|
if (n < c[0]) {
|
|
870
870
|
let e = s.data.color, t = s.data.darkColor;
|
|
871
871
|
switch (a) {
|
|
872
|
-
case
|
|
872
|
+
case H.setup:
|
|
873
873
|
l.setFromColor(e), u.r = t.r, u.g = t.g, u.b = t.b;
|
|
874
874
|
return;
|
|
875
|
-
case
|
|
875
|
+
case H.first: l.add((e.r - l.r) * i, (e.g - l.g) * i, (e.b - l.b) * i, (e.a - l.a) * i), u.r += (t.r - u.r) * i, u.g += (t.g - u.g) * i, u.b += (t.b - u.b) * i;
|
|
876
876
|
}
|
|
877
877
|
return;
|
|
878
878
|
}
|
|
879
|
-
let d = 0, f = 0, p = 0, m = 0, h = 0, g = 0, _ = 0, v =
|
|
879
|
+
let d = 0, f = 0, p = 0, m = 0, h = 0, g = 0, _ = 0, v = G.search(c, n, 8), y = this.curves[v >> 3];
|
|
880
880
|
switch (y) {
|
|
881
881
|
case 0:
|
|
882
882
|
let e = c[v];
|
|
@@ -891,7 +891,7 @@ var M = {
|
|
|
891
891
|
}
|
|
892
892
|
if (i == 1) l.set(d, f, p, m), u.r = h, u.g = g, u.b = _;
|
|
893
893
|
else {
|
|
894
|
-
if (a ==
|
|
894
|
+
if (a == H.setup) {
|
|
895
895
|
l.setFromColor(s.data.color);
|
|
896
896
|
let e = s.data.darkColor;
|
|
897
897
|
u.r = e.r, u.g = e.g, u.b = e.b;
|
|
@@ -899,10 +899,10 @@ var M = {
|
|
|
899
899
|
l.add((d - l.r) * i, (f - l.g) * i, (p - l.b) * i, (m - l.a) * i), u.r += (h - u.r) * i, u.g += (g - u.g) * i, u.b += (_ - u.b) * i;
|
|
900
900
|
}
|
|
901
901
|
}
|
|
902
|
-
},
|
|
902
|
+
}, Se = class extends ie {
|
|
903
903
|
slotIndex = 0;
|
|
904
904
|
constructor(e, t, n) {
|
|
905
|
-
super(e, t, [
|
|
905
|
+
super(e, t, [W.rgb + "|" + n, W.rgb2 + "|" + n]), this.slotIndex = n;
|
|
906
906
|
}
|
|
907
907
|
getFrameEntries() {
|
|
908
908
|
return 7;
|
|
@@ -917,14 +917,14 @@ var M = {
|
|
|
917
917
|
if (n < c[0]) {
|
|
918
918
|
let e = s.data.color, t = s.data.darkColor;
|
|
919
919
|
switch (a) {
|
|
920
|
-
case
|
|
920
|
+
case H.setup:
|
|
921
921
|
l.r = e.r, l.g = e.g, l.b = e.b, u.r = t.r, u.g = t.g, u.b = t.b;
|
|
922
922
|
return;
|
|
923
|
-
case
|
|
923
|
+
case H.first: l.r += (e.r - l.r) * i, l.g += (e.g - l.g) * i, l.b += (e.b - l.b) * i, u.r += (t.r - u.r) * i, u.g += (t.g - u.g) * i, u.b += (t.b - u.b) * i;
|
|
924
924
|
}
|
|
925
925
|
return;
|
|
926
926
|
}
|
|
927
|
-
let d = 0, f = 0, p = 0, m = 0, h = 0, g = 0, _ =
|
|
927
|
+
let d = 0, f = 0, p = 0, m = 0, h = 0, g = 0, _ = G.search(c, n, 7), v = this.curves[_ / 7];
|
|
928
928
|
switch (v) {
|
|
929
929
|
case 0:
|
|
930
930
|
let e = c[_];
|
|
@@ -939,18 +939,18 @@ var M = {
|
|
|
939
939
|
}
|
|
940
940
|
if (i == 1) l.r = d, l.g = f, l.b = p, u.r = m, u.g = h, u.b = g;
|
|
941
941
|
else {
|
|
942
|
-
if (a ==
|
|
942
|
+
if (a == H.setup) {
|
|
943
943
|
let e = s.data.color, t = s.data.darkColor;
|
|
944
944
|
l.r = e.r, l.g = e.g, l.b = e.b, u.r = t.r, u.g = t.g, u.b = t.b;
|
|
945
945
|
}
|
|
946
946
|
l.r += (d - l.r) * i, l.g += (f - l.g) * i, l.b += (p - l.b) * i, u.r += (m - u.r) * i, u.g += (h - u.g) * i, u.b += (g - u.b) * i;
|
|
947
947
|
}
|
|
948
948
|
}
|
|
949
|
-
},
|
|
949
|
+
}, Ce = class extends G {
|
|
950
950
|
slotIndex = 0;
|
|
951
951
|
attachmentNames;
|
|
952
952
|
constructor(e, t) {
|
|
953
|
-
super(e, [
|
|
953
|
+
super(e, [W.attachment + "|" + t]), this.slotIndex = t, this.attachmentNames = Array(e);
|
|
954
954
|
}
|
|
955
955
|
getFrameCount() {
|
|
956
956
|
return this.frames.length;
|
|
@@ -961,26 +961,26 @@ var M = {
|
|
|
961
961
|
apply(e, t, n, r, i, a, o) {
|
|
962
962
|
let s = e.slots[this.slotIndex];
|
|
963
963
|
if (s.bone.active) {
|
|
964
|
-
if (o ==
|
|
965
|
-
a ==
|
|
964
|
+
if (o == U.mixOut) {
|
|
965
|
+
a == H.setup && this.setAttachment(e, s, s.data.attachmentName);
|
|
966
966
|
return;
|
|
967
967
|
}
|
|
968
968
|
if (n < this.frames[0]) {
|
|
969
|
-
(a ==
|
|
969
|
+
(a == H.setup || a == H.first) && this.setAttachment(e, s, s.data.attachmentName);
|
|
970
970
|
return;
|
|
971
971
|
}
|
|
972
|
-
this.setAttachment(e, s, this.attachmentNames[
|
|
972
|
+
this.setAttachment(e, s, this.attachmentNames[G.search1(this.frames, n)]);
|
|
973
973
|
}
|
|
974
974
|
}
|
|
975
975
|
setAttachment(e, t, n) {
|
|
976
976
|
t.setAttachment(n ? e.getAttachment(this.slotIndex, n) : null);
|
|
977
977
|
}
|
|
978
|
-
},
|
|
978
|
+
}, we = class extends ie {
|
|
979
979
|
slotIndex = 0;
|
|
980
980
|
attachment;
|
|
981
981
|
vertices;
|
|
982
982
|
constructor(e, t, n, r) {
|
|
983
|
-
super(e, t, [
|
|
983
|
+
super(e, t, [W.deform + "|" + n + "|" + r.id]), this.slotIndex = n, this.attachment = r, this.vertices = Array(e);
|
|
984
984
|
}
|
|
985
985
|
getFrameCount() {
|
|
986
986
|
return this.frames.length;
|
|
@@ -1018,16 +1018,16 @@ var M = {
|
|
|
1018
1018
|
let s = e.slots[this.slotIndex];
|
|
1019
1019
|
if (!s.bone.active) return;
|
|
1020
1020
|
let c = s.getAttachment();
|
|
1021
|
-
if (!c || !(c instanceof
|
|
1021
|
+
if (!c || !(c instanceof B) || c.timelineAttachment != this.attachment) return;
|
|
1022
1022
|
let l = s.deform;
|
|
1023
|
-
l.length == 0 && (a =
|
|
1023
|
+
l.length == 0 && (a = H.setup);
|
|
1024
1024
|
let u = this.vertices, d = u[0].length, f = this.frames;
|
|
1025
1025
|
if (n < f[0]) {
|
|
1026
1026
|
switch (a) {
|
|
1027
|
-
case
|
|
1027
|
+
case H.setup:
|
|
1028
1028
|
l.length = 0;
|
|
1029
1029
|
return;
|
|
1030
|
-
case
|
|
1030
|
+
case H.first:
|
|
1031
1031
|
if (i == 1) {
|
|
1032
1032
|
l.length = 0;
|
|
1033
1033
|
return;
|
|
@@ -1046,16 +1046,16 @@ var M = {
|
|
|
1046
1046
|
}
|
|
1047
1047
|
if (l.length = d, n >= f[f.length - 1]) {
|
|
1048
1048
|
let e = u[f.length - 1];
|
|
1049
|
-
if (i == 1) if (a ==
|
|
1049
|
+
if (i == 1) if (a == H.add) {
|
|
1050
1050
|
let t = c;
|
|
1051
1051
|
if (t.bones) for (let t = 0; t < d; t++) l[t] += e[t];
|
|
1052
1052
|
else {
|
|
1053
1053
|
let n = t.vertices;
|
|
1054
1054
|
for (let t = 0; t < d; t++) l[t] += e[t] - n[t];
|
|
1055
1055
|
}
|
|
1056
|
-
} else
|
|
1056
|
+
} else I.arrayCopy(e, 0, l, 0, d);
|
|
1057
1057
|
else switch (a) {
|
|
1058
|
-
case
|
|
1058
|
+
case H.setup: {
|
|
1059
1059
|
let t = c;
|
|
1060
1060
|
if (t.bones) for (let t = 0; t < d; t++) l[t] = e[t] * i;
|
|
1061
1061
|
else {
|
|
@@ -1067,11 +1067,11 @@ var M = {
|
|
|
1067
1067
|
}
|
|
1068
1068
|
break;
|
|
1069
1069
|
}
|
|
1070
|
-
case
|
|
1071
|
-
case
|
|
1070
|
+
case H.first:
|
|
1071
|
+
case H.replace:
|
|
1072
1072
|
for (let t = 0; t < d; t++) l[t] += (e[t] - l[t]) * i;
|
|
1073
1073
|
break;
|
|
1074
|
-
case
|
|
1074
|
+
case H.add:
|
|
1075
1075
|
let t = c;
|
|
1076
1076
|
if (t.bones) for (let t = 0; t < d; t++) l[t] += e[t] * i;
|
|
1077
1077
|
else {
|
|
@@ -1081,8 +1081,8 @@ var M = {
|
|
|
1081
1081
|
}
|
|
1082
1082
|
return;
|
|
1083
1083
|
}
|
|
1084
|
-
let m =
|
|
1085
|
-
if (i == 1) if (a ==
|
|
1084
|
+
let m = G.search1(f, n), h = this.getCurvePercent(n, m), g = u[m], _ = u[m + 1];
|
|
1085
|
+
if (i == 1) if (a == H.add) {
|
|
1086
1086
|
let e = c;
|
|
1087
1087
|
if (e.bones) for (let e = 0; e < d; e++) {
|
|
1088
1088
|
let t = g[e];
|
|
@@ -1100,7 +1100,7 @@ var M = {
|
|
|
1100
1100
|
l[e] = t + (_[e] - t) * h;
|
|
1101
1101
|
}
|
|
1102
1102
|
else switch (a) {
|
|
1103
|
-
case
|
|
1103
|
+
case H.setup: {
|
|
1104
1104
|
let e = c;
|
|
1105
1105
|
if (e.bones) for (let e = 0; e < d; e++) {
|
|
1106
1106
|
let t = g[e];
|
|
@@ -1115,14 +1115,14 @@ var M = {
|
|
|
1115
1115
|
}
|
|
1116
1116
|
break;
|
|
1117
1117
|
}
|
|
1118
|
-
case
|
|
1119
|
-
case
|
|
1118
|
+
case H.first:
|
|
1119
|
+
case H.replace:
|
|
1120
1120
|
for (let e = 0; e < d; e++) {
|
|
1121
1121
|
let t = g[e];
|
|
1122
1122
|
l[e] += (t + (_[e] - t) * h - l[e]) * i;
|
|
1123
1123
|
}
|
|
1124
1124
|
break;
|
|
1125
|
-
case
|
|
1125
|
+
case H.add:
|
|
1126
1126
|
let e = c;
|
|
1127
1127
|
if (e.bones) for (let e = 0; e < d; e++) {
|
|
1128
1128
|
let t = g[e];
|
|
@@ -1137,8 +1137,8 @@ var M = {
|
|
|
1137
1137
|
}
|
|
1138
1138
|
}
|
|
1139
1139
|
}
|
|
1140
|
-
},
|
|
1141
|
-
static propertyIds = ["" +
|
|
1140
|
+
}, Te = class e extends G {
|
|
1141
|
+
static propertyIds = ["" + W.event];
|
|
1142
1142
|
events;
|
|
1143
1143
|
constructor(t) {
|
|
1144
1144
|
super(t, e.propertyIds), this.events = Array(t);
|
|
@@ -1158,14 +1158,14 @@ var M = {
|
|
|
1158
1158
|
let l = 0;
|
|
1159
1159
|
if (t < s[0]) l = 0;
|
|
1160
1160
|
else {
|
|
1161
|
-
l =
|
|
1161
|
+
l = G.search1(s, t) + 1;
|
|
1162
1162
|
let e = s[l];
|
|
1163
1163
|
for (; l > 0 && s[l - 1] == e;) l--;
|
|
1164
1164
|
}
|
|
1165
1165
|
for (; l < c && n >= s[l]; l++) r.push(this.events[l]);
|
|
1166
1166
|
}
|
|
1167
|
-
},
|
|
1168
|
-
static propertyIds = ["" +
|
|
1167
|
+
}, Ee = class e extends G {
|
|
1168
|
+
static propertyIds = ["" + W.drawOrder];
|
|
1169
1169
|
drawOrders;
|
|
1170
1170
|
constructor(t) {
|
|
1171
1171
|
super(t, e.propertyIds), this.drawOrders = Array(t);
|
|
@@ -1177,25 +1177,25 @@ var M = {
|
|
|
1177
1177
|
this.frames[e] = t, this.drawOrders[e] = n;
|
|
1178
1178
|
}
|
|
1179
1179
|
apply(e, t, n, r, i, a, o) {
|
|
1180
|
-
if (o ==
|
|
1181
|
-
a ==
|
|
1180
|
+
if (o == U.mixOut) {
|
|
1181
|
+
a == H.setup && I.arrayCopy(e.slots, 0, e.drawOrder, 0, e.slots.length);
|
|
1182
1182
|
return;
|
|
1183
1183
|
}
|
|
1184
1184
|
if (n < this.frames[0]) {
|
|
1185
|
-
(a ==
|
|
1185
|
+
(a == H.setup || a == H.first) && I.arrayCopy(e.slots, 0, e.drawOrder, 0, e.slots.length);
|
|
1186
1186
|
return;
|
|
1187
1187
|
}
|
|
1188
|
-
let s =
|
|
1189
|
-
if (!c)
|
|
1188
|
+
let s = G.search1(this.frames, n), c = this.drawOrders[s];
|
|
1189
|
+
if (!c) I.arrayCopy(e.slots, 0, e.drawOrder, 0, e.slots.length);
|
|
1190
1190
|
else {
|
|
1191
1191
|
let t = e.drawOrder, n = e.slots;
|
|
1192
1192
|
for (let e = 0, r = c.length; e < r; e++) t[e] = n[c[e]];
|
|
1193
1193
|
}
|
|
1194
1194
|
}
|
|
1195
|
-
},
|
|
1195
|
+
}, De = class extends ie {
|
|
1196
1196
|
constraintIndex = 0;
|
|
1197
1197
|
constructor(e, t, n) {
|
|
1198
|
-
super(e, t, [
|
|
1198
|
+
super(e, t, [W.ikConstraint + "|" + n]), this.constraintIndex = n;
|
|
1199
1199
|
}
|
|
1200
1200
|
getFrameEntries() {
|
|
1201
1201
|
return 6;
|
|
@@ -1209,14 +1209,14 @@ var M = {
|
|
|
1209
1209
|
let c = this.frames;
|
|
1210
1210
|
if (n < c[0]) {
|
|
1211
1211
|
switch (a) {
|
|
1212
|
-
case
|
|
1212
|
+
case H.setup:
|
|
1213
1213
|
s.mix = s.data.mix, s.softness = s.data.softness, s.bendDirection = s.data.bendDirection, s.compress = s.data.compress, s.stretch = s.data.stretch;
|
|
1214
1214
|
return;
|
|
1215
|
-
case
|
|
1215
|
+
case H.first: s.mix += (s.data.mix - s.mix) * i, s.softness += (s.data.softness - s.softness) * i, s.bendDirection = s.data.bendDirection, s.compress = s.data.compress, s.stretch = s.data.stretch;
|
|
1216
1216
|
}
|
|
1217
1217
|
return;
|
|
1218
1218
|
}
|
|
1219
|
-
let l = 0, u = 0, d =
|
|
1219
|
+
let l = 0, u = 0, d = G.search(c, n, 6), f = this.curves[d / 6];
|
|
1220
1220
|
switch (f) {
|
|
1221
1221
|
case 0:
|
|
1222
1222
|
let e = c[d];
|
|
@@ -1229,12 +1229,12 @@ var M = {
|
|
|
1229
1229
|
break;
|
|
1230
1230
|
default: l = this.getBezierValue(n, d, 1, f - 2), u = this.getBezierValue(n, d, 2, f + 18 - 2);
|
|
1231
1231
|
}
|
|
1232
|
-
a ==
|
|
1232
|
+
a == H.setup ? (s.mix = s.data.mix + (l - s.data.mix) * i, s.softness = s.data.softness + (u - s.data.softness) * i, o == U.mixOut ? (s.bendDirection = s.data.bendDirection, s.compress = s.data.compress, s.stretch = s.data.stretch) : (s.bendDirection = c[d + 3], s.compress = c[d + 4] != 0, s.stretch = c[d + 5] != 0)) : (s.mix += (l - s.mix) * i, s.softness += (u - s.softness) * i, o == U.mixIn && (s.bendDirection = c[d + 3], s.compress = c[d + 4] != 0, s.stretch = c[d + 5] != 0));
|
|
1233
1233
|
}
|
|
1234
|
-
},
|
|
1234
|
+
}, Oe = class extends ie {
|
|
1235
1235
|
constraintIndex = 0;
|
|
1236
1236
|
constructor(e, t, n) {
|
|
1237
|
-
super(e, t, [
|
|
1237
|
+
super(e, t, [W.transformConstraint + "|" + n]), this.constraintIndex = n;
|
|
1238
1238
|
}
|
|
1239
1239
|
getFrameEntries() {
|
|
1240
1240
|
return 7;
|
|
@@ -1250,14 +1250,14 @@ var M = {
|
|
|
1250
1250
|
if (n < c[0]) {
|
|
1251
1251
|
let e = s.data;
|
|
1252
1252
|
switch (a) {
|
|
1253
|
-
case
|
|
1253
|
+
case H.setup:
|
|
1254
1254
|
s.mixRotate = e.mixRotate, s.mixX = e.mixX, s.mixY = e.mixY, s.mixScaleX = e.mixScaleX, s.mixScaleY = e.mixScaleY, s.mixShearY = e.mixShearY;
|
|
1255
1255
|
return;
|
|
1256
|
-
case
|
|
1256
|
+
case H.first: s.mixRotate += (e.mixRotate - s.mixRotate) * i, s.mixX += (e.mixX - s.mixX) * i, s.mixY += (e.mixY - s.mixY) * i, s.mixScaleX += (e.mixScaleX - s.mixScaleX) * i, s.mixScaleY += (e.mixScaleY - s.mixScaleY) * i, s.mixShearY += (e.mixShearY - s.mixShearY) * i;
|
|
1257
1257
|
}
|
|
1258
1258
|
return;
|
|
1259
1259
|
}
|
|
1260
|
-
let l, u, d, f, p, m, h =
|
|
1260
|
+
let l, u, d, f, p, m, h = G.search(c, n, 7), g = this.curves[h / 7];
|
|
1261
1261
|
switch (g) {
|
|
1262
1262
|
case 0:
|
|
1263
1263
|
let e = c[h];
|
|
@@ -1270,33 +1270,33 @@ var M = {
|
|
|
1270
1270
|
break;
|
|
1271
1271
|
default: l = this.getBezierValue(n, h, 1, g - 2), u = this.getBezierValue(n, h, 2, g + 18 - 2), d = this.getBezierValue(n, h, 3, g + 36 - 2), f = this.getBezierValue(n, h, 4, g + 54 - 2), p = this.getBezierValue(n, h, 5, g + 72 - 2), m = this.getBezierValue(n, h, 6, g + 90 - 2);
|
|
1272
1272
|
}
|
|
1273
|
-
if (a ==
|
|
1273
|
+
if (a == H.setup) {
|
|
1274
1274
|
let e = s.data;
|
|
1275
1275
|
s.mixRotate = e.mixRotate + (l - e.mixRotate) * i, s.mixX = e.mixX + (u - e.mixX) * i, s.mixY = e.mixY + (d - e.mixY) * i, s.mixScaleX = e.mixScaleX + (f - e.mixScaleX) * i, s.mixScaleY = e.mixScaleY + (p - e.mixScaleY) * i, s.mixShearY = e.mixShearY + (m - e.mixShearY) * i;
|
|
1276
1276
|
} else s.mixRotate += (l - s.mixRotate) * i, s.mixX += (u - s.mixX) * i, s.mixY += (d - s.mixY) * i, s.mixScaleX += (f - s.mixScaleX) * i, s.mixScaleY += (p - s.mixScaleY) * i, s.mixShearY += (m - s.mixShearY) * i;
|
|
1277
1277
|
}
|
|
1278
|
-
},
|
|
1278
|
+
}, ke = class extends ae {
|
|
1279
1279
|
constraintIndex = 0;
|
|
1280
1280
|
constructor(e, t, n) {
|
|
1281
|
-
super(e, t,
|
|
1281
|
+
super(e, t, W.pathConstraintPosition + "|" + n), this.constraintIndex = n;
|
|
1282
1282
|
}
|
|
1283
1283
|
apply(e, t, n, r, i, a, o) {
|
|
1284
1284
|
let s = e.pathConstraints[this.constraintIndex];
|
|
1285
1285
|
s.active && (s.position = this.getAbsoluteValue(n, i, a, s.position, s.data.position));
|
|
1286
1286
|
}
|
|
1287
|
-
},
|
|
1287
|
+
}, Ae = class extends ae {
|
|
1288
1288
|
constraintIndex = 0;
|
|
1289
1289
|
constructor(e, t, n) {
|
|
1290
|
-
super(e, t,
|
|
1290
|
+
super(e, t, W.pathConstraintSpacing + "|" + n), this.constraintIndex = n;
|
|
1291
1291
|
}
|
|
1292
1292
|
apply(e, t, n, r, i, a, o) {
|
|
1293
1293
|
let s = e.pathConstraints[this.constraintIndex];
|
|
1294
1294
|
s.active && (s.spacing = this.getAbsoluteValue(n, i, a, s.spacing, s.data.spacing));
|
|
1295
1295
|
}
|
|
1296
|
-
},
|
|
1296
|
+
}, je = class extends ie {
|
|
1297
1297
|
constraintIndex = 0;
|
|
1298
1298
|
constructor(e, t, n) {
|
|
1299
|
-
super(e, t, [
|
|
1299
|
+
super(e, t, [W.pathConstraintMix + "|" + n]), this.constraintIndex = n;
|
|
1300
1300
|
}
|
|
1301
1301
|
getFrameEntries() {
|
|
1302
1302
|
return 4;
|
|
@@ -1311,14 +1311,14 @@ var M = {
|
|
|
1311
1311
|
let c = this.frames;
|
|
1312
1312
|
if (n < c[0]) {
|
|
1313
1313
|
switch (a) {
|
|
1314
|
-
case
|
|
1314
|
+
case H.setup:
|
|
1315
1315
|
s.mixRotate = s.data.mixRotate, s.mixX = s.data.mixX, s.mixY = s.data.mixY;
|
|
1316
1316
|
return;
|
|
1317
|
-
case
|
|
1317
|
+
case H.first: s.mixRotate += (s.data.mixRotate - s.mixRotate) * i, s.mixX += (s.data.mixX - s.mixX) * i, s.mixY += (s.data.mixY - s.mixY) * i;
|
|
1318
1318
|
}
|
|
1319
1319
|
return;
|
|
1320
1320
|
}
|
|
1321
|
-
let l, u, d, f =
|
|
1321
|
+
let l, u, d, f = G.search(c, n, 4), p = this.curves[f >> 2];
|
|
1322
1322
|
switch (p) {
|
|
1323
1323
|
case 0:
|
|
1324
1324
|
let e = c[f];
|
|
@@ -1331,12 +1331,12 @@ var M = {
|
|
|
1331
1331
|
break;
|
|
1332
1332
|
default: l = this.getBezierValue(n, f, 1, p - 2), u = this.getBezierValue(n, f, 2, p + 18 - 2), d = this.getBezierValue(n, f, 3, p + 36 - 2);
|
|
1333
1333
|
}
|
|
1334
|
-
if (a ==
|
|
1334
|
+
if (a == H.setup) {
|
|
1335
1335
|
let e = s.data;
|
|
1336
1336
|
s.mixRotate = e.mixRotate + (l - e.mixRotate) * i, s.mixX = e.mixX + (u - e.mixX) * i, s.mixY = e.mixY + (d - e.mixY) * i;
|
|
1337
1337
|
} else s.mixRotate += (l - s.mixRotate) * i, s.mixX += (u - s.mixX) * i, s.mixY += (d - s.mixY) * i;
|
|
1338
1338
|
}
|
|
1339
|
-
},
|
|
1339
|
+
}, Me = class extends ae {
|
|
1340
1340
|
constraintIndex = 0;
|
|
1341
1341
|
constructor(e, t, n, r) {
|
|
1342
1342
|
super(e, t, r + "|" + n), this.constraintIndex = n;
|
|
@@ -1348,9 +1348,9 @@ var M = {
|
|
|
1348
1348
|
for (let r of e.physicsConstraints) r.active && this.global(r.data) && this.set(r, this.getAbsoluteValue2(n, i, a, this.get(r), this.setup(r), t));
|
|
1349
1349
|
} else s = e.physicsConstraints[this.constraintIndex], s.active && this.set(s, this.getAbsoluteValue(n, i, a, this.get(s), this.setup(s)));
|
|
1350
1350
|
}
|
|
1351
|
-
},
|
|
1351
|
+
}, Ne = class extends Me {
|
|
1352
1352
|
constructor(e, t, n) {
|
|
1353
|
-
super(e, t, n,
|
|
1353
|
+
super(e, t, n, W.physicsConstraintInertia);
|
|
1354
1354
|
}
|
|
1355
1355
|
setup(e) {
|
|
1356
1356
|
return e.data.inertia;
|
|
@@ -1364,9 +1364,9 @@ var M = {
|
|
|
1364
1364
|
global(e) {
|
|
1365
1365
|
return e.inertiaGlobal;
|
|
1366
1366
|
}
|
|
1367
|
-
},
|
|
1367
|
+
}, Pe = class extends Me {
|
|
1368
1368
|
constructor(e, t, n) {
|
|
1369
|
-
super(e, t, n,
|
|
1369
|
+
super(e, t, n, W.physicsConstraintStrength);
|
|
1370
1370
|
}
|
|
1371
1371
|
setup(e) {
|
|
1372
1372
|
return e.data.strength;
|
|
@@ -1380,9 +1380,9 @@ var M = {
|
|
|
1380
1380
|
global(e) {
|
|
1381
1381
|
return e.strengthGlobal;
|
|
1382
1382
|
}
|
|
1383
|
-
},
|
|
1383
|
+
}, Fe = class extends Me {
|
|
1384
1384
|
constructor(e, t, n) {
|
|
1385
|
-
super(e, t, n,
|
|
1385
|
+
super(e, t, n, W.physicsConstraintDamping);
|
|
1386
1386
|
}
|
|
1387
1387
|
setup(e) {
|
|
1388
1388
|
return e.data.damping;
|
|
@@ -1396,9 +1396,9 @@ var M = {
|
|
|
1396
1396
|
global(e) {
|
|
1397
1397
|
return e.dampingGlobal;
|
|
1398
1398
|
}
|
|
1399
|
-
},
|
|
1399
|
+
}, Ie = class extends Me {
|
|
1400
1400
|
constructor(e, t, n) {
|
|
1401
|
-
super(e, t, n,
|
|
1401
|
+
super(e, t, n, W.physicsConstraintMass);
|
|
1402
1402
|
}
|
|
1403
1403
|
setup(e) {
|
|
1404
1404
|
return 1 / e.data.massInverse;
|
|
@@ -1412,9 +1412,9 @@ var M = {
|
|
|
1412
1412
|
global(e) {
|
|
1413
1413
|
return e.massGlobal;
|
|
1414
1414
|
}
|
|
1415
|
-
},
|
|
1415
|
+
}, Le = class extends Me {
|
|
1416
1416
|
constructor(e, t, n) {
|
|
1417
|
-
super(e, t, n,
|
|
1417
|
+
super(e, t, n, W.physicsConstraintWind);
|
|
1418
1418
|
}
|
|
1419
1419
|
setup(e) {
|
|
1420
1420
|
return e.data.wind;
|
|
@@ -1428,9 +1428,9 @@ var M = {
|
|
|
1428
1428
|
global(e) {
|
|
1429
1429
|
return e.windGlobal;
|
|
1430
1430
|
}
|
|
1431
|
-
},
|
|
1431
|
+
}, Re = class extends Me {
|
|
1432
1432
|
constructor(e, t, n) {
|
|
1433
|
-
super(e, t, n,
|
|
1433
|
+
super(e, t, n, W.physicsConstraintGravity);
|
|
1434
1434
|
}
|
|
1435
1435
|
setup(e) {
|
|
1436
1436
|
return e.data.gravity;
|
|
@@ -1444,9 +1444,9 @@ var M = {
|
|
|
1444
1444
|
global(e) {
|
|
1445
1445
|
return e.gravityGlobal;
|
|
1446
1446
|
}
|
|
1447
|
-
},
|
|
1447
|
+
}, ze = class extends Me {
|
|
1448
1448
|
constructor(e, t, n) {
|
|
1449
|
-
super(e, t, n,
|
|
1449
|
+
super(e, t, n, W.physicsConstraintMix);
|
|
1450
1450
|
}
|
|
1451
1451
|
setup(e) {
|
|
1452
1452
|
return e.data.mix;
|
|
@@ -1460,8 +1460,8 @@ var M = {
|
|
|
1460
1460
|
global(e) {
|
|
1461
1461
|
return e.mixGlobal;
|
|
1462
1462
|
}
|
|
1463
|
-
},
|
|
1464
|
-
static propertyIds = [
|
|
1463
|
+
}, Be = class e extends G {
|
|
1464
|
+
static propertyIds = [W.physicsConstraintReset.toString()];
|
|
1465
1465
|
constraintIndex;
|
|
1466
1466
|
constructor(t, n) {
|
|
1467
1467
|
super(t, e.propertyIds), this.constraintIndex = n;
|
|
@@ -1478,17 +1478,17 @@ var M = {
|
|
|
1478
1478
|
let c = this.frames;
|
|
1479
1479
|
if (t > n) this.apply(e, t, Number.MAX_VALUE, [], i, a, o), t = -1;
|
|
1480
1480
|
else if (t >= c[c.length - 1]) return;
|
|
1481
|
-
if (!(n < c[0]) && (t < c[0] || n >= c[
|
|
1481
|
+
if (!(n < c[0]) && (t < c[0] || n >= c[G.search1(c, t) + 1])) if (s != null) s.reset();
|
|
1482
1482
|
else for (let t of e.physicsConstraints) t.active && t.reset();
|
|
1483
1483
|
}
|
|
1484
|
-
},
|
|
1484
|
+
}, Ve = class e extends G {
|
|
1485
1485
|
static ENTRIES = 3;
|
|
1486
1486
|
static MODE = 1;
|
|
1487
1487
|
static DELAY = 2;
|
|
1488
1488
|
slotIndex;
|
|
1489
1489
|
attachment;
|
|
1490
1490
|
constructor(e, t, n) {
|
|
1491
|
-
super(e, [
|
|
1491
|
+
super(e, [W.sequence + "|" + t + "|" + n.sequence.id]), this.slotIndex = t, this.attachment = n;
|
|
1492
1492
|
}
|
|
1493
1493
|
getFrameEntries() {
|
|
1494
1494
|
return e.ENTRIES;
|
|
@@ -1507,46 +1507,46 @@ var M = {
|
|
|
1507
1507
|
let c = t.slots[this.slotIndex];
|
|
1508
1508
|
if (!c.bone.active) return;
|
|
1509
1509
|
let l = c.attachment, u = this.attachment;
|
|
1510
|
-
if (l != u && (!(l instanceof
|
|
1511
|
-
if (s ==
|
|
1512
|
-
o ==
|
|
1510
|
+
if (l != u && (!(l instanceof B) || l.timelineAttachment != u)) return;
|
|
1511
|
+
if (s == U.mixOut) {
|
|
1512
|
+
o == H.setup && (c.sequenceIndex = -1);
|
|
1513
1513
|
return;
|
|
1514
1514
|
}
|
|
1515
1515
|
let d = this.frames;
|
|
1516
1516
|
if (r < d[0]) {
|
|
1517
|
-
(o ==
|
|
1517
|
+
(o == H.setup || o == H.first) && (c.sequenceIndex = -1);
|
|
1518
1518
|
return;
|
|
1519
1519
|
}
|
|
1520
|
-
let f =
|
|
1520
|
+
let f = G.search(d, r, e.ENTRIES), p = d[f], m = d[f + e.MODE], h = d[f + e.DELAY];
|
|
1521
1521
|
if (!this.attachment.sequence) return;
|
|
1522
|
-
let g = m >> 4, _ = this.attachment.sequence.regions.length, v =
|
|
1523
|
-
if (v !=
|
|
1524
|
-
case
|
|
1522
|
+
let g = m >> 4, _ = this.attachment.sequence.regions.length, v = ne[m & 15];
|
|
1523
|
+
if (v != V.hold) switch (g += (r - p) / h + 1e-5 | 0, v) {
|
|
1524
|
+
case V.once:
|
|
1525
1525
|
g = Math.min(_ - 1, g);
|
|
1526
1526
|
break;
|
|
1527
|
-
case
|
|
1527
|
+
case V.loop:
|
|
1528
1528
|
g %= _;
|
|
1529
1529
|
break;
|
|
1530
|
-
case
|
|
1530
|
+
case V.pingpong: {
|
|
1531
1531
|
let e = (_ << 1) - 2;
|
|
1532
1532
|
g = e == 0 ? 0 : g % e, g >= _ && (g = e - g);
|
|
1533
1533
|
break;
|
|
1534
1534
|
}
|
|
1535
|
-
case
|
|
1535
|
+
case V.onceReverse:
|
|
1536
1536
|
g = Math.max(_ - 1 - g, 0);
|
|
1537
1537
|
break;
|
|
1538
|
-
case
|
|
1538
|
+
case V.loopReverse:
|
|
1539
1539
|
g = _ - 1 - g % _;
|
|
1540
1540
|
break;
|
|
1541
|
-
case
|
|
1541
|
+
case V.pingpongReverse: {
|
|
1542
1542
|
let e = (_ << 1) - 2;
|
|
1543
1543
|
g = e == 0 ? 0 : (g + _ - 1) % e, g >= _ && (g = e - g);
|
|
1544
1544
|
}
|
|
1545
1545
|
}
|
|
1546
1546
|
c.sequenceIndex = g;
|
|
1547
1547
|
}
|
|
1548
|
-
},
|
|
1549
|
-
static _emptyAnimation = new
|
|
1548
|
+
}, He = class e {
|
|
1549
|
+
static _emptyAnimation = new re("<empty>", [], 0);
|
|
1550
1550
|
static emptyAnimation() {
|
|
1551
1551
|
return e._emptyAnimation;
|
|
1552
1552
|
}
|
|
@@ -1556,10 +1556,10 @@ var M = {
|
|
|
1556
1556
|
unkeyedState = 0;
|
|
1557
1557
|
events = [];
|
|
1558
1558
|
listeners = [];
|
|
1559
|
-
queue = new
|
|
1560
|
-
propertyIDs = new
|
|
1559
|
+
queue = new We(this);
|
|
1560
|
+
propertyIDs = new N();
|
|
1561
1561
|
animationsChanged = !1;
|
|
1562
|
-
trackEntryPool = new
|
|
1562
|
+
trackEntryPool = new L(() => new Ue());
|
|
1563
1563
|
constructor(e) {
|
|
1564
1564
|
this.data = e;
|
|
1565
1565
|
}
|
|
@@ -1608,24 +1608,24 @@ var M = {
|
|
|
1608
1608
|
let o = n[a];
|
|
1609
1609
|
if (!o || o.delay > 0) continue;
|
|
1610
1610
|
r = !0;
|
|
1611
|
-
let s = a == 0 ?
|
|
1611
|
+
let s = a == 0 ? H.first : o.mixBlend, c = o.alpha;
|
|
1612
1612
|
o.mixingFrom ? c *= this.applyMixingFrom(o, e, s) : o.trackTime >= o.trackEnd && !o.next && (c = 0);
|
|
1613
1613
|
let l = c >= o.alphaAttachmentThreshold, u = o.animationLast, d = o.getAnimationTime(), f = d, p = t;
|
|
1614
1614
|
o.reverse && (f = o.animation.duration - f, p = null);
|
|
1615
1615
|
let m = o.animation.timelines, h = m.length;
|
|
1616
|
-
if (a == 0 && c == 1 || s ==
|
|
1616
|
+
if (a == 0 && c == 1 || s == H.add) {
|
|
1617
1617
|
a == 0 && (l = !0);
|
|
1618
1618
|
for (let t = 0; t < h; t++) {
|
|
1619
|
-
|
|
1619
|
+
I.webkit602BugfixHelper(c, s);
|
|
1620
1620
|
var i = m[t];
|
|
1621
|
-
i instanceof
|
|
1621
|
+
i instanceof Ce ? this.applyAttachmentTimeline(i, e, f, s, l) : i.apply(e, u, f, p, c, s, U.mixIn);
|
|
1622
1622
|
}
|
|
1623
1623
|
} else {
|
|
1624
1624
|
let t = o.timelineMode, n = o.shortestRotation, r = !n && o.timelinesRotation.length != h << 1;
|
|
1625
1625
|
r && (o.timelinesRotation.length = h << 1);
|
|
1626
1626
|
for (let i = 0; i < h; i++) {
|
|
1627
|
-
let a = m[i], d = t[i] == 0 ? s :
|
|
1628
|
-
!n && a instanceof
|
|
1627
|
+
let a = m[i], d = t[i] == 0 ? s : H.setup;
|
|
1628
|
+
!n && a instanceof se ? this.applyRotateTimeline(a, e, f, c, d, o.timelinesRotation, i << 1, r) : a instanceof Ce ? this.applyAttachmentTimeline(a, e, f, s, l) : (I.webkit602BugfixHelper(c, s), a.apply(e, u, f, p, c, d, U.mixIn));
|
|
1629
1629
|
}
|
|
1630
1630
|
}
|
|
1631
1631
|
this.queueEvents(o, d), t.length = 0, o.nextAnimationLast = d, o.nextTrackLast = o.trackTime;
|
|
@@ -1643,60 +1643,60 @@ var M = {
|
|
|
1643
1643
|
let r = e.mixingFrom;
|
|
1644
1644
|
r.mixingFrom && this.applyMixingFrom(r, t, n);
|
|
1645
1645
|
let i = 0;
|
|
1646
|
-
e.mixDuration == 0 ? (i = 1, n ==
|
|
1646
|
+
e.mixDuration == 0 ? (i = 1, n == H.first && (n = H.setup)) : (i = e.mixTime / e.mixDuration, i > 1 && (i = 1), n != H.first && (n = r.mixBlend));
|
|
1647
1647
|
let a = i < r.mixAttachmentThreshold, o = i < r.mixDrawOrderThreshold, s = r.animation.timelines, c = s.length, l = r.alpha * e.interruptAlpha, u = l * (1 - i), d = r.animationLast, f = r.getAnimationTime(), p = f, m = null;
|
|
1648
|
-
if (r.reverse ? p = r.animation.duration - p : i < r.eventThreshold && (m = this.events), n ==
|
|
1648
|
+
if (r.reverse ? p = r.animation.duration - p : i < r.eventThreshold && (m = this.events), n == H.add) for (let e = 0; e < c; e++) s[e].apply(t, d, p, m, u, n, U.mixOut);
|
|
1649
1649
|
else {
|
|
1650
1650
|
let e = r.timelineMode, i = r.timelineHoldMix, f = r.shortestRotation, h = !f && r.timelinesRotation.length != c << 1;
|
|
1651
1651
|
h && (r.timelinesRotation.length = c << 1), r.totalAlpha = 0;
|
|
1652
1652
|
for (let g = 0; g < c; g++) {
|
|
1653
|
-
let c = s[g], _ =
|
|
1653
|
+
let c = s[g], _ = U.mixOut, v, y = 0;
|
|
1654
1654
|
switch (e[g]) {
|
|
1655
1655
|
case 0:
|
|
1656
|
-
if (!o && c instanceof
|
|
1656
|
+
if (!o && c instanceof Ee) continue;
|
|
1657
1657
|
v = n, y = u;
|
|
1658
1658
|
break;
|
|
1659
1659
|
case 1:
|
|
1660
|
-
v =
|
|
1660
|
+
v = H.setup, y = u;
|
|
1661
1661
|
break;
|
|
1662
1662
|
case 2:
|
|
1663
1663
|
v = n, y = l;
|
|
1664
1664
|
break;
|
|
1665
1665
|
case 3:
|
|
1666
|
-
v =
|
|
1666
|
+
v = H.setup, y = l;
|
|
1667
1667
|
break;
|
|
1668
1668
|
default:
|
|
1669
|
-
v =
|
|
1669
|
+
v = H.setup;
|
|
1670
1670
|
let e = i[g];
|
|
1671
1671
|
y = l * Math.max(0, 1 - e.mixTime / e.mixDuration);
|
|
1672
1672
|
break;
|
|
1673
1673
|
}
|
|
1674
|
-
r.totalAlpha += y, !f && c instanceof
|
|
1674
|
+
r.totalAlpha += y, !f && c instanceof se ? this.applyRotateTimeline(c, t, p, y, v, r.timelinesRotation, g << 1, h) : c instanceof Ce ? this.applyAttachmentTimeline(c, t, p, v, a && y >= r.alphaAttachmentThreshold) : (I.webkit602BugfixHelper(y, n), o && c instanceof Ee && v == H.setup && (_ = U.mixIn), c.apply(t, d, p, m, y, v, _));
|
|
1675
1675
|
}
|
|
1676
1676
|
}
|
|
1677
1677
|
return e.mixDuration > 0 && this.queueEvents(r, f), this.events.length = 0, r.nextAnimationLast = f, r.nextTrackLast = r.trackTime, i;
|
|
1678
1678
|
}
|
|
1679
1679
|
applyAttachmentTimeline(e, t, n, r, i) {
|
|
1680
1680
|
var a = t.slots[e.slotIndex];
|
|
1681
|
-
a.bone.active && (n < e.frames[0] ? (r ==
|
|
1681
|
+
a.bone.active && (n < e.frames[0] ? (r == H.setup || r == H.first) && this.setAttachment(t, a, a.data.attachmentName, i) : this.setAttachment(t, a, e.attachmentNames[G.search1(e.frames, n)], i), a.attachmentState <= this.unkeyedState && (a.attachmentState = this.unkeyedState + 1));
|
|
1682
1682
|
}
|
|
1683
1683
|
setAttachment(e, t, n, r) {
|
|
1684
1684
|
t.setAttachment(n ? e.getAttachment(t.data.index, n) : null), r && (t.attachmentState = this.unkeyedState + 2);
|
|
1685
1685
|
}
|
|
1686
1686
|
applyRotateTimeline(e, t, n, r, i, a, o, s) {
|
|
1687
1687
|
if (s && (a[o] = 0), r == 1) {
|
|
1688
|
-
e.apply(t, 0, n, null, 1, i,
|
|
1688
|
+
e.apply(t, 0, n, null, 1, i, U.mixIn);
|
|
1689
1689
|
return;
|
|
1690
1690
|
}
|
|
1691
1691
|
let c = t.bones[e.boneIndex];
|
|
1692
1692
|
if (!c.active) return;
|
|
1693
1693
|
let l = e.frames, u = 0, d = 0;
|
|
1694
1694
|
if (n < l[0]) switch (i) {
|
|
1695
|
-
case
|
|
1695
|
+
case H.setup: c.rotation = c.data.rotation;
|
|
1696
1696
|
default: return;
|
|
1697
|
-
case
|
|
1697
|
+
case H.first: u = c.rotation, d = c.data.rotation;
|
|
1698
1698
|
}
|
|
1699
|
-
else u = i ==
|
|
1699
|
+
else u = i == H.setup ? c.data.rotation : c.rotation, d = c.data.rotation + e.getCurveValue(n);
|
|
1700
1700
|
let f = 0, p = d - u;
|
|
1701
1701
|
if (p -= Math.ceil(p / 360 - .5) * 360, p == 0) f = a[o];
|
|
1702
1702
|
else {
|
|
@@ -1705,7 +1705,7 @@ var M = {
|
|
|
1705
1705
|
let n = e - e % 360;
|
|
1706
1706
|
f = p + n;
|
|
1707
1707
|
let r = p >= 0, i = e >= 0;
|
|
1708
|
-
Math.abs(t) <= 90 &&
|
|
1708
|
+
Math.abs(t) <= 90 && F.signum(t) != F.signum(p) && (Math.abs(e - n) > 180 ? (f += 360 * F.signum(e), i = r) : n == 0 ? i = r : f -= 360 * F.signum(e)), i != r && (f += 360 * F.signum(e)), a[o] = f;
|
|
1709
1709
|
}
|
|
1710
1710
|
a[o + 1] = p, c.rotation = u + f * r;
|
|
1711
1711
|
}
|
|
@@ -1793,11 +1793,11 @@ var M = {
|
|
|
1793
1793
|
this.queue.drainDisabled = t, this.queue.drain();
|
|
1794
1794
|
}
|
|
1795
1795
|
expandToIndex(e) {
|
|
1796
|
-
return e < this.tracks.length ? this.tracks[e] : (
|
|
1796
|
+
return e < this.tracks.length ? this.tracks[e] : (I.ensureArrayCapacity(this.tracks, e + 1, null), this.tracks.length = e + 1, null);
|
|
1797
1797
|
}
|
|
1798
1798
|
trackEntry(e, t, n, r) {
|
|
1799
1799
|
let i = this.trackEntryPool.obtain();
|
|
1800
|
-
return i.reset(), i.trackIndex = e, i.animation = t, i.loop = n, i.holdPrevious = !1, i.reverse = !1, i.shortestRotation = !1, i.eventThreshold = 0, i.alphaAttachmentThreshold = 0, i.mixAttachmentThreshold = 0, i.mixDrawOrderThreshold = 0, i.animationStart = 0, i.animationEnd = t.duration, i.animationLast = -1, i.nextAnimationLast = -1, i.delay = 0, i.trackTime = 0, i.trackLast = -1, i.nextTrackLast = -1, i.trackEnd = Number.MAX_VALUE, i.timeScale = 1, i.alpha = 1, i.mixTime = 0, i.mixDuration = r ? this.data.getMix(r.animation, t) : 0, i.interruptAlpha = 1, i.totalAlpha = 0, i.mixBlend =
|
|
1800
|
+
return i.reset(), i.trackIndex = e, i.animation = t, i.loop = n, i.holdPrevious = !1, i.reverse = !1, i.shortestRotation = !1, i.eventThreshold = 0, i.alphaAttachmentThreshold = 0, i.mixAttachmentThreshold = 0, i.mixDrawOrderThreshold = 0, i.animationStart = 0, i.animationEnd = t.duration, i.animationLast = -1, i.nextAnimationLast = -1, i.delay = 0, i.trackTime = 0, i.trackLast = -1, i.nextTrackLast = -1, i.trackEnd = Number.MAX_VALUE, i.timeScale = 1, i.alpha = 1, i.mixTime = 0, i.mixDuration = r ? this.data.getMix(r.animation, t) : 0, i.interruptAlpha = 1, i.totalAlpha = 0, i.mixBlend = H.replace, i;
|
|
1801
1801
|
}
|
|
1802
1802
|
clearNext(e) {
|
|
1803
1803
|
let t = e.next;
|
|
@@ -1812,7 +1812,7 @@ var M = {
|
|
|
1812
1812
|
if (n) {
|
|
1813
1813
|
for (; n.mixingFrom;) n = n.mixingFrom;
|
|
1814
1814
|
do
|
|
1815
|
-
(!n.mixingTo || n.mixBlend !=
|
|
1815
|
+
(!n.mixingTo || n.mixBlend != H.add) && this.computeHold(n), n = n.mixingTo;
|
|
1816
1816
|
while (n);
|
|
1817
1817
|
}
|
|
1818
1818
|
}
|
|
@@ -1830,7 +1830,7 @@ var M = {
|
|
|
1830
1830
|
outer: for (let s = 0; s < r; s++) {
|
|
1831
1831
|
let r = n[s], c = r.getPropertyIds();
|
|
1832
1832
|
if (!o.addAll(c)) i[s] = 0;
|
|
1833
|
-
else if (!t || r instanceof
|
|
1833
|
+
else if (!t || r instanceof Ce || r instanceof Ee || r instanceof Te || !t.animation.hasTimeline(c)) i[s] = 1;
|
|
1834
1834
|
else {
|
|
1835
1835
|
for (let n = t.mixingTo; n; n = n.mixingTo) if (!n.animation.hasTimeline(c)) {
|
|
1836
1836
|
if (e.mixDuration > 0) {
|
|
@@ -1860,7 +1860,7 @@ var M = {
|
|
|
1860
1860
|
clearListenerNotifications() {
|
|
1861
1861
|
this.queue.clear();
|
|
1862
1862
|
}
|
|
1863
|
-
},
|
|
1863
|
+
}, Ue = class {
|
|
1864
1864
|
animation = null;
|
|
1865
1865
|
previous = null;
|
|
1866
1866
|
next = null;
|
|
@@ -1900,7 +1900,7 @@ var M = {
|
|
|
1900
1900
|
setMixDurationWithDelay(e, t) {
|
|
1901
1901
|
this._mixDuration = e, t <= 0 && (t = this.previous == null ? 0 : Math.max(t + this.previous.getTrackComplete() - e, 0)), this.delay = t;
|
|
1902
1902
|
}
|
|
1903
|
-
mixBlend =
|
|
1903
|
+
mixBlend = H.replace;
|
|
1904
1904
|
timelineMode = [];
|
|
1905
1905
|
timelineHoldMix = [];
|
|
1906
1906
|
timelinesRotation = [];
|
|
@@ -1937,7 +1937,7 @@ var M = {
|
|
|
1937
1937
|
isNextReady() {
|
|
1938
1938
|
return this.next != null && this.nextTrackLast - this.next.delay >= 0;
|
|
1939
1939
|
}
|
|
1940
|
-
},
|
|
1940
|
+
}, We = class {
|
|
1941
1941
|
objects = [];
|
|
1942
1942
|
drainDisabled = !1;
|
|
1943
1943
|
animState;
|
|
@@ -1945,22 +1945,22 @@ var M = {
|
|
|
1945
1945
|
this.animState = e;
|
|
1946
1946
|
}
|
|
1947
1947
|
start(e) {
|
|
1948
|
-
this.objects.push(
|
|
1948
|
+
this.objects.push(K.start), this.objects.push(e), this.animState.animationsChanged = !0;
|
|
1949
1949
|
}
|
|
1950
1950
|
interrupt(e) {
|
|
1951
|
-
this.objects.push(
|
|
1951
|
+
this.objects.push(K.interrupt), this.objects.push(e);
|
|
1952
1952
|
}
|
|
1953
1953
|
end(e) {
|
|
1954
|
-
this.objects.push(
|
|
1954
|
+
this.objects.push(K.end), this.objects.push(e), this.animState.animationsChanged = !0;
|
|
1955
1955
|
}
|
|
1956
1956
|
dispose(e) {
|
|
1957
|
-
this.objects.push(
|
|
1957
|
+
this.objects.push(K.dispose), this.objects.push(e);
|
|
1958
1958
|
}
|
|
1959
1959
|
complete(e) {
|
|
1960
|
-
this.objects.push(
|
|
1960
|
+
this.objects.push(K.complete), this.objects.push(e);
|
|
1961
1961
|
}
|
|
1962
1962
|
event(e, t) {
|
|
1963
|
-
this.objects.push(
|
|
1963
|
+
this.objects.push(K.event), this.objects.push(e), this.objects.push(t);
|
|
1964
1964
|
}
|
|
1965
1965
|
drain() {
|
|
1966
1966
|
if (this.drainDisabled) return;
|
|
@@ -1969,27 +1969,27 @@ var M = {
|
|
|
1969
1969
|
for (let n = 0; n < e.length; n += 2) {
|
|
1970
1970
|
let r = e[n], i = e[n + 1];
|
|
1971
1971
|
switch (r) {
|
|
1972
|
-
case
|
|
1972
|
+
case K.start:
|
|
1973
1973
|
i.listener && i.listener.start && i.listener.start(i);
|
|
1974
1974
|
for (let e = 0; e < t.length; e++) {
|
|
1975
1975
|
let n = t[e];
|
|
1976
1976
|
n.start && n.start(i);
|
|
1977
1977
|
}
|
|
1978
1978
|
break;
|
|
1979
|
-
case
|
|
1979
|
+
case K.interrupt:
|
|
1980
1980
|
i.listener && i.listener.interrupt && i.listener.interrupt(i);
|
|
1981
1981
|
for (let e = 0; e < t.length; e++) {
|
|
1982
1982
|
let n = t[e];
|
|
1983
1983
|
n.interrupt && n.interrupt(i);
|
|
1984
1984
|
}
|
|
1985
1985
|
break;
|
|
1986
|
-
case
|
|
1986
|
+
case K.end:
|
|
1987
1987
|
i.listener && i.listener.end && i.listener.end(i);
|
|
1988
1988
|
for (let e = 0; e < t.length; e++) {
|
|
1989
1989
|
let n = t[e];
|
|
1990
1990
|
n.end && n.end(i);
|
|
1991
1991
|
}
|
|
1992
|
-
case
|
|
1992
|
+
case K.dispose:
|
|
1993
1993
|
i.listener && i.listener.dispose && i.listener.dispose(i);
|
|
1994
1994
|
for (let e = 0; e < t.length; e++) {
|
|
1995
1995
|
let n = t[e];
|
|
@@ -1997,14 +1997,14 @@ var M = {
|
|
|
1997
1997
|
}
|
|
1998
1998
|
this.animState.trackEntryPool.free(i);
|
|
1999
1999
|
break;
|
|
2000
|
-
case
|
|
2000
|
+
case K.complete:
|
|
2001
2001
|
i.listener && i.listener.complete && i.listener.complete(i);
|
|
2002
2002
|
for (let e = 0; e < t.length; e++) {
|
|
2003
2003
|
let n = t[e];
|
|
2004
2004
|
n.complete && n.complete(i);
|
|
2005
2005
|
}
|
|
2006
2006
|
break;
|
|
2007
|
-
case
|
|
2007
|
+
case K.event:
|
|
2008
2008
|
let r = e[n++ + 2];
|
|
2009
2009
|
i.listener && i.listener.event && i.listener.event(i, r);
|
|
2010
2010
|
for (let e = 0; e < t.length; e++) {
|
|
@@ -2019,13 +2019,13 @@ var M = {
|
|
|
2019
2019
|
clear() {
|
|
2020
2020
|
this.objects.length = 0;
|
|
2021
2021
|
}
|
|
2022
|
-
},
|
|
2022
|
+
}, K;
|
|
2023
2023
|
(function(e) {
|
|
2024
2024
|
e[e.start = 0] = "start", e[e.interrupt = 1] = "interrupt", e[e.end = 2] = "end", e[e.dispose = 3] = "dispose", e[e.complete = 4] = "complete", e[e.event = 5] = "event";
|
|
2025
|
-
})(
|
|
2025
|
+
})(K ||= {});
|
|
2026
2026
|
//#endregion
|
|
2027
2027
|
//#region ../../node_modules/.pnpm/@esotericsoftware+spine-core@4.2.84/node_modules/@esotericsoftware/spine-core/dist/AnimationStateData.js
|
|
2028
|
-
var
|
|
2028
|
+
var Ge = class {
|
|
2029
2029
|
skeletonData;
|
|
2030
2030
|
animationToMixTime = {};
|
|
2031
2031
|
defaultMix = 0;
|
|
@@ -2050,8 +2050,8 @@ var Ne = class {
|
|
|
2050
2050
|
let n = e.name + "." + t.name, r = this.animationToMixTime[n];
|
|
2051
2051
|
return r === void 0 ? this.defaultMix : r;
|
|
2052
2052
|
}
|
|
2053
|
-
},
|
|
2054
|
-
color = new
|
|
2053
|
+
}, Ke = class e extends B {
|
|
2054
|
+
color = new P(1, 1, 1, 1);
|
|
2055
2055
|
constructor(e) {
|
|
2056
2056
|
super(e);
|
|
2057
2057
|
}
|
|
@@ -2059,9 +2059,9 @@ var Ne = class {
|
|
|
2059
2059
|
let t = new e(this.name);
|
|
2060
2060
|
return this.copyTo(t), t.color.setFromColor(this.color), t;
|
|
2061
2061
|
}
|
|
2062
|
-
},
|
|
2062
|
+
}, qe = class e extends B {
|
|
2063
2063
|
endSlot = null;
|
|
2064
|
-
color = new
|
|
2064
|
+
color = new P(.2275, .2275, .8078, 1);
|
|
2065
2065
|
constructor(e) {
|
|
2066
2066
|
super(e);
|
|
2067
2067
|
}
|
|
@@ -2069,7 +2069,7 @@ var Ne = class {
|
|
|
2069
2069
|
let t = new e(this.name);
|
|
2070
2070
|
return this.copyTo(t), t.endSlot = this.endSlot, t.color.setFromColor(this.color), t;
|
|
2071
2071
|
}
|
|
2072
|
-
},
|
|
2072
|
+
}, Je = class {
|
|
2073
2073
|
_image;
|
|
2074
2074
|
constructor(e) {
|
|
2075
2075
|
this._image = e;
|
|
@@ -2077,15 +2077,15 @@ var Ne = class {
|
|
|
2077
2077
|
getImage() {
|
|
2078
2078
|
return this._image;
|
|
2079
2079
|
}
|
|
2080
|
-
},
|
|
2080
|
+
}, q;
|
|
2081
2081
|
(function(e) {
|
|
2082
2082
|
e[e.Nearest = 9728] = "Nearest", e[e.Linear = 9729] = "Linear", e[e.MipMap = 9987] = "MipMap", e[e.MipMapNearestNearest = 9984] = "MipMapNearestNearest", e[e.MipMapLinearNearest = 9985] = "MipMapLinearNearest", e[e.MipMapNearestLinear = 9986] = "MipMapNearestLinear", e[e.MipMapLinearLinear = 9987] = "MipMapLinearLinear";
|
|
2083
|
-
})(
|
|
2084
|
-
var
|
|
2083
|
+
})(q ||= {});
|
|
2084
|
+
var Ye;
|
|
2085
2085
|
(function(e) {
|
|
2086
2086
|
e[e.MirroredRepeat = 33648] = "MirroredRepeat", e[e.ClampToEdge = 33071] = "ClampToEdge", e[e.Repeat = 10497] = "Repeat";
|
|
2087
|
-
})(
|
|
2088
|
-
var
|
|
2087
|
+
})(Ye ||= {});
|
|
2088
|
+
var Xe = class {
|
|
2089
2089
|
texture;
|
|
2090
2090
|
u = 0;
|
|
2091
2091
|
v = 0;
|
|
@@ -2098,11 +2098,11 @@ var Re = class {
|
|
|
2098
2098
|
offsetY = 0;
|
|
2099
2099
|
originalWidth = 0;
|
|
2100
2100
|
originalHeight = 0;
|
|
2101
|
-
},
|
|
2101
|
+
}, Ze = class {
|
|
2102
2102
|
pages = [];
|
|
2103
2103
|
regions = [];
|
|
2104
2104
|
constructor(e) {
|
|
2105
|
-
let t = new
|
|
2105
|
+
let t = new Qe(e), n = [
|
|
2106
2106
|
,
|
|
2107
2107
|
,
|
|
2108
2108
|
,
|
|
@@ -2111,9 +2111,9 @@ var Re = class {
|
|
|
2111
2111
|
r.size = (e) => {
|
|
2112
2112
|
e.width = parseInt(n[1]), e.height = parseInt(n[2]);
|
|
2113
2113
|
}, r.format = () => {}, r.filter = (e) => {
|
|
2114
|
-
e.minFilter =
|
|
2114
|
+
e.minFilter = I.enumValue(q, n[1]), e.magFilter = I.enumValue(q, n[2]);
|
|
2115
2115
|
}, r.repeat = (e) => {
|
|
2116
|
-
n[1].indexOf("x") != -1 && (e.uWrap =
|
|
2116
|
+
n[1].indexOf("x") != -1 && (e.uWrap = Ye.Repeat), n[1].indexOf("y") != -1 && (e.vWrap = Ye.Repeat);
|
|
2117
2117
|
}, r.pma = (e) => {
|
|
2118
2118
|
e.pma = n[1] == "true";
|
|
2119
2119
|
};
|
|
@@ -2142,7 +2142,7 @@ var Re = class {
|
|
|
2142
2142
|
let o = null, s = null, c = null;
|
|
2143
2143
|
for (; a !== null;) if (a.trim().length == 0) o = null, a = t.readLine();
|
|
2144
2144
|
else if (o) {
|
|
2145
|
-
let e = new
|
|
2145
|
+
let e = new et(o, a);
|
|
2146
2146
|
for (;;) {
|
|
2147
2147
|
let r = t.readEntry(n, a = t.readLine());
|
|
2148
2148
|
if (r == 0) break;
|
|
@@ -2157,7 +2157,7 @@ var Re = class {
|
|
|
2157
2157
|
}
|
|
2158
2158
|
e.originalWidth == 0 && e.originalHeight == 0 && (e.originalWidth = e.width, e.originalHeight = e.height), s && s.length > 0 && c && c.length > 0 && (e.names = s, e.values = c, s = null, c = null), e.u = e.x / o.width, e.v = e.y / o.height, e.degrees == 90 ? (e.u2 = (e.x + e.height) / o.width, e.v2 = (e.y + e.width) / o.height) : (e.u2 = (e.x + e.width) / o.width, e.v2 = (e.y + e.height) / o.height), this.regions.push(e);
|
|
2159
2159
|
} else {
|
|
2160
|
-
for (o = new
|
|
2160
|
+
for (o = new $e(a.trim()); t.readEntry(n, a = t.readLine()) != 0;) {
|
|
2161
2161
|
let e = r[n[0]];
|
|
2162
2162
|
e && e(o);
|
|
2163
2163
|
}
|
|
@@ -2174,7 +2174,7 @@ var Re = class {
|
|
|
2174
2174
|
dispose() {
|
|
2175
2175
|
for (let e = 0; e < this.pages.length; e++) this.pages[e].texture?.dispose();
|
|
2176
2176
|
}
|
|
2177
|
-
},
|
|
2177
|
+
}, Qe = class {
|
|
2178
2178
|
lines;
|
|
2179
2179
|
index = 0;
|
|
2180
2180
|
constructor(e) {
|
|
@@ -2194,12 +2194,12 @@ var Re = class {
|
|
|
2194
2194
|
if (e[r] = t.substr(i, n - i).trim(), i = n + 1, r == 4) return 4;
|
|
2195
2195
|
}
|
|
2196
2196
|
}
|
|
2197
|
-
},
|
|
2197
|
+
}, $e = class {
|
|
2198
2198
|
name;
|
|
2199
|
-
minFilter =
|
|
2200
|
-
magFilter =
|
|
2201
|
-
uWrap =
|
|
2202
|
-
vWrap =
|
|
2199
|
+
minFilter = q.Nearest;
|
|
2200
|
+
magFilter = q.Nearest;
|
|
2201
|
+
uWrap = Ye.ClampToEdge;
|
|
2202
|
+
vWrap = Ye.ClampToEdge;
|
|
2203
2203
|
texture = null;
|
|
2204
2204
|
width = 0;
|
|
2205
2205
|
height = 0;
|
|
@@ -2212,7 +2212,7 @@ var Re = class {
|
|
|
2212
2212
|
this.texture = e, e.setFilters(this.minFilter, this.magFilter), e.setWraps(this.uWrap, this.vWrap);
|
|
2213
2213
|
for (let t of this.regions) t.texture = e;
|
|
2214
2214
|
}
|
|
2215
|
-
},
|
|
2215
|
+
}, et = class extends Xe {
|
|
2216
2216
|
page;
|
|
2217
2217
|
name;
|
|
2218
2218
|
x = 0;
|
|
@@ -2228,29 +2228,29 @@ var Re = class {
|
|
|
2228
2228
|
constructor(e, t) {
|
|
2229
2229
|
super(), this.page = e, this.name = t, e.regions.push(this);
|
|
2230
2230
|
}
|
|
2231
|
-
},
|
|
2231
|
+
}, tt = class e extends B {
|
|
2232
2232
|
region = null;
|
|
2233
2233
|
path;
|
|
2234
2234
|
regionUVs = [];
|
|
2235
2235
|
uvs = [];
|
|
2236
2236
|
triangles = [];
|
|
2237
|
-
color = new
|
|
2237
|
+
color = new P(1, 1, 1, 1);
|
|
2238
2238
|
width = 0;
|
|
2239
2239
|
height = 0;
|
|
2240
2240
|
hullLength = 0;
|
|
2241
2241
|
edges = [];
|
|
2242
2242
|
parentMesh = null;
|
|
2243
2243
|
sequence = null;
|
|
2244
|
-
tempColor = new
|
|
2244
|
+
tempColor = new P(0, 0, 0, 0);
|
|
2245
2245
|
constructor(e, t) {
|
|
2246
2246
|
super(e), this.path = t;
|
|
2247
2247
|
}
|
|
2248
2248
|
updateRegion() {
|
|
2249
2249
|
if (!this.region) throw Error("Region not set.");
|
|
2250
2250
|
let e = this.regionUVs;
|
|
2251
|
-
(!this.uvs || this.uvs.length != e.length) && (this.uvs =
|
|
2251
|
+
(!this.uvs || this.uvs.length != e.length) && (this.uvs = I.newFloatArray(e.length));
|
|
2252
2252
|
let t = this.uvs, n = this.uvs.length, r = this.region.u, i = this.region.v, a = 0, o = 0;
|
|
2253
|
-
if (this.region instanceof
|
|
2253
|
+
if (this.region instanceof et) {
|
|
2254
2254
|
let s = this.region, c = s.page, l = c.width, u = c.height;
|
|
2255
2255
|
switch (s.degrees) {
|
|
2256
2256
|
case 90:
|
|
@@ -2279,7 +2279,7 @@ var Re = class {
|
|
|
2279
2279
|
copy() {
|
|
2280
2280
|
if (this.parentMesh) return this.newLinkedMesh();
|
|
2281
2281
|
let t = new e(this.name, this.path);
|
|
2282
|
-
return t.region = this.region, t.color.setFromColor(this.color), this.copyTo(t), t.regionUVs = Array(this.regionUVs.length),
|
|
2282
|
+
return t.region = this.region, t.color.setFromColor(this.color), this.copyTo(t), t.regionUVs = Array(this.regionUVs.length), I.arrayCopy(this.regionUVs, 0, t.regionUVs, 0, this.regionUVs.length), t.uvs = this.uvs instanceof Float32Array ? I.newFloatArray(this.uvs.length) : Array(this.uvs.length), I.arrayCopy(this.uvs, 0, t.uvs, 0, this.uvs.length), t.triangles = Array(this.triangles.length), I.arrayCopy(this.triangles, 0, t.triangles, 0, this.triangles.length), t.hullLength = this.hullLength, t.sequence = this.sequence == null ? null : this.sequence.copy(), this.edges && (t.edges = Array(this.edges.length), I.arrayCopy(this.edges, 0, t.edges, 0, this.edges.length)), t.width = this.width, t.height = this.height, t;
|
|
2283
2283
|
}
|
|
2284
2284
|
computeWorldVertices(e, t, n, r, i, a) {
|
|
2285
2285
|
this.sequence != null && this.sequence.apply(e, this), super.computeWorldVertices(e, t, n, r, i, a);
|
|
@@ -2288,23 +2288,23 @@ var Re = class {
|
|
|
2288
2288
|
let t = new e(this.name, this.path);
|
|
2289
2289
|
return t.region = this.region, t.color.setFromColor(this.color), t.timelineAttachment = this.timelineAttachment, t.setParentMesh(this.parentMesh ? this.parentMesh : this), t.region != null && t.updateRegion(), t;
|
|
2290
2290
|
}
|
|
2291
|
-
},
|
|
2291
|
+
}, nt = class e extends B {
|
|
2292
2292
|
lengths = [];
|
|
2293
2293
|
closed = !1;
|
|
2294
2294
|
constantSpeed = !1;
|
|
2295
|
-
color = new
|
|
2295
|
+
color = new P(1, 1, 1, 1);
|
|
2296
2296
|
constructor(e) {
|
|
2297
2297
|
super(e);
|
|
2298
2298
|
}
|
|
2299
2299
|
copy() {
|
|
2300
2300
|
let t = new e(this.name);
|
|
2301
|
-
return this.copyTo(t), t.lengths = Array(this.lengths.length),
|
|
2301
|
+
return this.copyTo(t), t.lengths = Array(this.lengths.length), I.arrayCopy(this.lengths, 0, t.lengths, 0, this.lengths.length), t.closed = closed, t.constantSpeed = this.constantSpeed, t.color.setFromColor(this.color), t;
|
|
2302
2302
|
}
|
|
2303
|
-
},
|
|
2303
|
+
}, rt = class e extends B {
|
|
2304
2304
|
x = 0;
|
|
2305
2305
|
y = 0;
|
|
2306
2306
|
rotation = 0;
|
|
2307
|
-
color = new
|
|
2307
|
+
color = new P(.38, .94, 0, 1);
|
|
2308
2308
|
constructor(e) {
|
|
2309
2309
|
super(e);
|
|
2310
2310
|
}
|
|
@@ -2312,14 +2312,14 @@ var Re = class {
|
|
|
2312
2312
|
return t.x = this.x * e.a + this.y * e.b + e.worldX, t.y = this.x * e.c + this.y * e.d + e.worldY, t;
|
|
2313
2313
|
}
|
|
2314
2314
|
computeWorldRotation(e) {
|
|
2315
|
-
let t = this.rotation *
|
|
2316
|
-
return
|
|
2315
|
+
let t = this.rotation * F.degRad, n = Math.cos(t), r = Math.sin(t), i = n * e.a + r * e.b, a = n * e.c + r * e.d;
|
|
2316
|
+
return F.atan2Deg(a, i);
|
|
2317
2317
|
}
|
|
2318
2318
|
copy() {
|
|
2319
2319
|
let t = new e(this.name);
|
|
2320
2320
|
return t.x = this.x, t.y = this.y, t.rotation = this.rotation, t.color.setFromColor(this.color), t;
|
|
2321
2321
|
}
|
|
2322
|
-
},
|
|
2322
|
+
}, it = class e extends z {
|
|
2323
2323
|
x = 0;
|
|
2324
2324
|
y = 0;
|
|
2325
2325
|
scaleX = 1;
|
|
@@ -2327,13 +2327,13 @@ var Re = class {
|
|
|
2327
2327
|
rotation = 0;
|
|
2328
2328
|
width = 0;
|
|
2329
2329
|
height = 0;
|
|
2330
|
-
color = new
|
|
2330
|
+
color = new P(1, 1, 1, 1);
|
|
2331
2331
|
path;
|
|
2332
2332
|
region = null;
|
|
2333
2333
|
sequence = null;
|
|
2334
|
-
offset =
|
|
2335
|
-
uvs =
|
|
2336
|
-
tempColor = new
|
|
2334
|
+
offset = I.newFloatArray(8);
|
|
2335
|
+
uvs = I.newFloatArray(8);
|
|
2336
|
+
tempColor = new P(1, 1, 1, 1);
|
|
2337
2337
|
constructor(e, t) {
|
|
2338
2338
|
super(e), this.path = t;
|
|
2339
2339
|
}
|
|
@@ -2344,8 +2344,8 @@ var Re = class {
|
|
|
2344
2344
|
t[0] = 0, t[1] = 0, t[2] = 0, t[3] = 1, t[4] = 1, t[5] = 1, t[6] = 1, t[7] = 0;
|
|
2345
2345
|
return;
|
|
2346
2346
|
}
|
|
2347
|
-
let n = this.width / this.region.originalWidth * this.scaleX, r = this.height / this.region.originalHeight * this.scaleY, i = -this.width / 2 * this.scaleX + this.region.offsetX * n, a = -this.height / 2 * this.scaleY + this.region.offsetY * r, o = i + this.region.width * n, s = a + this.region.height * r, c = this.rotation *
|
|
2348
|
-
|
|
2347
|
+
let n = this.width / this.region.originalWidth * this.scaleX, r = this.height / this.region.originalHeight * this.scaleY, i = -this.width / 2 * this.scaleX + this.region.offsetX * n, a = -this.height / 2 * this.scaleY + this.region.offsetY * r, o = i + this.region.width * n, s = a + this.region.height * r, c = this.rotation * F.degRad, l = Math.cos(c), u = Math.sin(c), d = this.x, f = this.y, p = i * l + d, m = i * u, h = a * l + f, g = a * u, _ = o * l + d, v = o * u, y = s * l + f, b = s * u, x = this.offset;
|
|
2348
|
+
x[0] = p - g, x[1] = h + m, x[2] = p - b, x[3] = y + m, x[4] = _ - b, x[5] = y + v, x[6] = _ - g, x[7] = h + v, e.degrees == 90 ? (t[0] = e.u2, t[1] = e.v2, t[2] = e.u, t[3] = e.v2, t[4] = e.u, t[5] = e.v, t[6] = e.u2, t[7] = e.v) : (t[0] = e.u, t[1] = e.v2, t[2] = e.u, t[3] = e.v, t[4] = e.u2, t[5] = e.v, t[6] = e.u2, t[7] = e.v2);
|
|
2349
2349
|
}
|
|
2350
2350
|
computeWorldVertices(e, t, n, r) {
|
|
2351
2351
|
this.sequence != null && this.sequence.apply(e, this);
|
|
@@ -2354,7 +2354,7 @@ var Re = class {
|
|
|
2354
2354
|
}
|
|
2355
2355
|
copy() {
|
|
2356
2356
|
let t = new e(this.name, this.path);
|
|
2357
|
-
return t.region = this.region, t.x = this.x, t.y = this.y, t.scaleX = this.scaleX, t.scaleY = this.scaleY, t.rotation = this.rotation, t.width = this.width, t.height = this.height,
|
|
2357
|
+
return t.region = this.region, t.x = this.x, t.y = this.y, t.scaleX = this.scaleX, t.scaleY = this.scaleY, t.rotation = this.rotation, t.width = this.width, t.height = this.height, I.arrayCopy(this.uvs, 0, t.uvs, 0, 8), I.arrayCopy(this.offset, 0, t.offset, 0, 8), t.color.setFromColor(this.color), t.sequence = this.sequence == null ? null : this.sequence.copy(), t;
|
|
2358
2358
|
}
|
|
2359
2359
|
static X1 = 0;
|
|
2360
2360
|
static Y1 = 1;
|
|
@@ -2388,7 +2388,7 @@ var Re = class {
|
|
|
2388
2388
|
static C4A = 29;
|
|
2389
2389
|
static U4 = 30;
|
|
2390
2390
|
static V4 = 31;
|
|
2391
|
-
},
|
|
2391
|
+
}, at = class {
|
|
2392
2392
|
atlas;
|
|
2393
2393
|
constructor(e) {
|
|
2394
2394
|
this.atlas = e;
|
|
@@ -2402,7 +2402,7 @@ var Re = class {
|
|
|
2402
2402
|
}
|
|
2403
2403
|
}
|
|
2404
2404
|
newRegionAttachment(e, t, n, r) {
|
|
2405
|
-
let i = new
|
|
2405
|
+
let i = new it(t, n);
|
|
2406
2406
|
if (r != null) this.loadSequence(t, n, r);
|
|
2407
2407
|
else {
|
|
2408
2408
|
let e = this.atlas.findRegion(n);
|
|
@@ -2412,7 +2412,7 @@ var Re = class {
|
|
|
2412
2412
|
return i;
|
|
2413
2413
|
}
|
|
2414
2414
|
newMeshAttachment(e, t, n, r) {
|
|
2415
|
-
let i = new
|
|
2415
|
+
let i = new tt(t, n);
|
|
2416
2416
|
if (r != null) this.loadSequence(t, n, r);
|
|
2417
2417
|
else {
|
|
2418
2418
|
let e = this.atlas.findRegion(n);
|
|
@@ -2422,18 +2422,18 @@ var Re = class {
|
|
|
2422
2422
|
return i;
|
|
2423
2423
|
}
|
|
2424
2424
|
newBoundingBoxAttachment(e, t) {
|
|
2425
|
-
return new
|
|
2425
|
+
return new Ke(t);
|
|
2426
2426
|
}
|
|
2427
2427
|
newPathAttachment(e, t) {
|
|
2428
|
-
return new
|
|
2428
|
+
return new nt(t);
|
|
2429
2429
|
}
|
|
2430
2430
|
newPointAttachment(e, t) {
|
|
2431
|
-
return new
|
|
2431
|
+
return new rt(t);
|
|
2432
2432
|
}
|
|
2433
2433
|
newClippingAttachment(e, t) {
|
|
2434
|
-
return new
|
|
2434
|
+
return new qe(t);
|
|
2435
2435
|
}
|
|
2436
|
-
},
|
|
2436
|
+
}, ot = class {
|
|
2437
2437
|
index = 0;
|
|
2438
2438
|
name;
|
|
2439
2439
|
parent = null;
|
|
@@ -2445,9 +2445,9 @@ var Re = class {
|
|
|
2445
2445
|
scaleY = 1;
|
|
2446
2446
|
shearX = 0;
|
|
2447
2447
|
shearY = 0;
|
|
2448
|
-
inherit =
|
|
2448
|
+
inherit = J.Normal;
|
|
2449
2449
|
skinRequired = !1;
|
|
2450
|
-
color = new
|
|
2450
|
+
color = new P();
|
|
2451
2451
|
icon;
|
|
2452
2452
|
visible = !1;
|
|
2453
2453
|
constructor(e, t, n) {
|
|
@@ -2455,13 +2455,13 @@ var Re = class {
|
|
|
2455
2455
|
if (!t) throw Error("name cannot be null.");
|
|
2456
2456
|
this.index = e, this.name = t, this.parent = n;
|
|
2457
2457
|
}
|
|
2458
|
-
},
|
|
2458
|
+
}, J;
|
|
2459
2459
|
(function(e) {
|
|
2460
2460
|
e[e.Normal = 0] = "Normal", e[e.OnlyTranslation = 1] = "OnlyTranslation", e[e.NoRotationOrReflection = 2] = "NoRotationOrReflection", e[e.NoScale = 3] = "NoScale", e[e.NoScaleOrReflection = 4] = "NoScaleOrReflection";
|
|
2461
|
-
})(
|
|
2461
|
+
})(J ||= {});
|
|
2462
2462
|
//#endregion
|
|
2463
2463
|
//#region ../../node_modules/.pnpm/@esotericsoftware+spine-core@4.2.84/node_modules/@esotericsoftware/spine-core/dist/Bone.js
|
|
2464
|
-
var
|
|
2464
|
+
var st = class {
|
|
2465
2465
|
data;
|
|
2466
2466
|
skeleton;
|
|
2467
2467
|
parent = null;
|
|
@@ -2486,7 +2486,7 @@ var Ye = class {
|
|
|
2486
2486
|
d = 0;
|
|
2487
2487
|
worldY = 0;
|
|
2488
2488
|
worldX = 0;
|
|
2489
|
-
inherit =
|
|
2489
|
+
inherit = J.Normal;
|
|
2490
2490
|
sorted = !1;
|
|
2491
2491
|
active = !1;
|
|
2492
2492
|
constructor(e, t, n) {
|
|
@@ -2507,38 +2507,38 @@ var Ye = class {
|
|
|
2507
2507
|
this.ax = e, this.ay = t, this.arotation = n, this.ascaleX = r, this.ascaleY = i, this.ashearX = a, this.ashearY = o;
|
|
2508
2508
|
let s = this.parent;
|
|
2509
2509
|
if (!s) {
|
|
2510
|
-
let s = this.skeleton, c = s.scaleX, l = s.scaleY, u = (n + a) *
|
|
2510
|
+
let s = this.skeleton, c = s.scaleX, l = s.scaleY, u = (n + a) * F.degRad, d = (n + 90 + o) * F.degRad;
|
|
2511
2511
|
this.a = Math.cos(u) * r * c, this.b = Math.cos(d) * i * c, this.c = Math.sin(u) * r * l, this.d = Math.sin(d) * i * l, this.worldX = e * c + s.x, this.worldY = t * l + s.y;
|
|
2512
2512
|
return;
|
|
2513
2513
|
}
|
|
2514
2514
|
let c = s.a, l = s.b, u = s.c, d = s.d;
|
|
2515
2515
|
switch (this.worldX = c * e + l * t + s.worldX, this.worldY = u * e + d * t + s.worldY, this.inherit) {
|
|
2516
|
-
case
|
|
2517
|
-
let e = (n + a) *
|
|
2516
|
+
case J.Normal: {
|
|
2517
|
+
let e = (n + a) * F.degRad, t = (n + 90 + o) * F.degRad, s = Math.cos(e) * r, f = Math.cos(t) * i, p = Math.sin(e) * r, m = Math.sin(t) * i;
|
|
2518
2518
|
this.a = c * s + l * p, this.b = c * f + l * m, this.c = u * s + d * p, this.d = u * f + d * m;
|
|
2519
2519
|
return;
|
|
2520
2520
|
}
|
|
2521
|
-
case
|
|
2522
|
-
let e = (n + a) *
|
|
2521
|
+
case J.OnlyTranslation: {
|
|
2522
|
+
let e = (n + a) * F.degRad, t = (n + 90 + o) * F.degRad;
|
|
2523
2523
|
this.a = Math.cos(e) * r, this.b = Math.cos(t) * i, this.c = Math.sin(e) * r, this.d = Math.sin(t) * i;
|
|
2524
2524
|
break;
|
|
2525
2525
|
}
|
|
2526
|
-
case
|
|
2526
|
+
case J.NoRotationOrReflection: {
|
|
2527
2527
|
let e = 1 / this.skeleton.scaleX, t = 1 / this.skeleton.scaleY;
|
|
2528
2528
|
c *= e, u *= t;
|
|
2529
2529
|
let s = c * c + u * u, f = 0;
|
|
2530
|
-
s > 1e-4 ? (s = Math.abs(c * d * t - l * e * u) / s, l = u * s, d = c * s, f = Math.atan2(u, c) *
|
|
2531
|
-
let p = (n + a - f) *
|
|
2530
|
+
s > 1e-4 ? (s = Math.abs(c * d * t - l * e * u) / s, l = u * s, d = c * s, f = Math.atan2(u, c) * F.radDeg) : (c = 0, u = 0, f = 90 - Math.atan2(d, l) * F.radDeg);
|
|
2531
|
+
let p = (n + a - f) * F.degRad, m = (n + o - f + 90) * F.degRad, h = Math.cos(p) * r, g = Math.cos(m) * i, _ = Math.sin(p) * r, v = Math.sin(m) * i;
|
|
2532
2532
|
this.a = c * h - l * _, this.b = c * g - l * v, this.c = u * h + d * _, this.d = u * g + d * v;
|
|
2533
2533
|
break;
|
|
2534
2534
|
}
|
|
2535
|
-
case
|
|
2536
|
-
case
|
|
2537
|
-
n *=
|
|
2535
|
+
case J.NoScale:
|
|
2536
|
+
case J.NoScaleOrReflection: {
|
|
2537
|
+
n *= F.degRad;
|
|
2538
2538
|
let e = Math.cos(n), t = Math.sin(n), s = (c * e + l * t) / this.skeleton.scaleX, f = (u * e + d * t) / this.skeleton.scaleY, p = Math.sqrt(s * s + f * f);
|
|
2539
|
-
p > 1e-5 && (p = 1 / p), s *= p, f *= p, p = Math.sqrt(s * s + f * f), this.inherit ==
|
|
2539
|
+
p > 1e-5 && (p = 1 / p), s *= p, f *= p, p = Math.sqrt(s * s + f * f), this.inherit == J.NoScale && c * d - l * u < 0 != (this.skeleton.scaleX < 0 != this.skeleton.scaleY < 0) && (p = -p), n = Math.PI / 2 + Math.atan2(f, s);
|
|
2540
2540
|
let m = Math.cos(n) * p, h = Math.sin(n) * p;
|
|
2541
|
-
a *=
|
|
2541
|
+
a *= F.degRad, o = (90 + o) * F.degRad;
|
|
2542
2542
|
let g = Math.cos(a) * r, _ = Math.cos(o) * i, v = Math.sin(a) * r, y = Math.sin(o) * i;
|
|
2543
2543
|
this.a = s * g + m * v, this.b = s * _ + m * y, this.c = f * g + h * v, this.d = f * _ + h * y;
|
|
2544
2544
|
break;
|
|
@@ -2553,41 +2553,41 @@ var Ye = class {
|
|
|
2553
2553
|
updateAppliedTransform() {
|
|
2554
2554
|
let e = this.parent;
|
|
2555
2555
|
if (!e) {
|
|
2556
|
-
this.ax = this.worldX - this.skeleton.x, this.ay = this.worldY - this.skeleton.y, this.arotation = Math.atan2(this.c, this.a) *
|
|
2556
|
+
this.ax = this.worldX - this.skeleton.x, this.ay = this.worldY - this.skeleton.y, this.arotation = Math.atan2(this.c, this.a) * F.radDeg, this.ascaleX = Math.sqrt(this.a * this.a + this.c * this.c), this.ascaleY = Math.sqrt(this.b * this.b + this.d * this.d), this.ashearX = 0, this.ashearY = Math.atan2(this.a * this.b + this.c * this.d, this.a * this.d - this.b * this.c) * F.radDeg;
|
|
2557
2557
|
return;
|
|
2558
2558
|
}
|
|
2559
2559
|
let t = e.a, n = e.b, r = e.c, i = e.d, a = 1 / (t * i - n * r), o = i * a, s = n * a, c = r * a, l = t * a, u = this.worldX - e.worldX, d = this.worldY - e.worldY;
|
|
2560
2560
|
this.ax = u * o - d * s, this.ay = d * l - u * c;
|
|
2561
2561
|
let f, p, m, h;
|
|
2562
|
-
if (this.inherit ==
|
|
2562
|
+
if (this.inherit == J.OnlyTranslation) f = this.a, p = this.b, m = this.c, h = this.d;
|
|
2563
2563
|
else {
|
|
2564
2564
|
switch (this.inherit) {
|
|
2565
|
-
case
|
|
2565
|
+
case J.NoRotationOrReflection: {
|
|
2566
2566
|
let e = Math.abs(t * i - n * r) / (t * t + r * r);
|
|
2567
2567
|
n = -r * this.skeleton.scaleX * e / this.skeleton.scaleY, i = t * this.skeleton.scaleY * e / this.skeleton.scaleX, a = 1 / (t * i - n * r), o = i * a, s = n * a;
|
|
2568
2568
|
break;
|
|
2569
2569
|
}
|
|
2570
|
-
case
|
|
2571
|
-
case
|
|
2572
|
-
let e =
|
|
2570
|
+
case J.NoScale:
|
|
2571
|
+
case J.NoScaleOrReflection:
|
|
2572
|
+
let e = F.cosDeg(this.rotation), u = F.sinDeg(this.rotation);
|
|
2573
2573
|
t = (t * e + n * u) / this.skeleton.scaleX, r = (r * e + i * u) / this.skeleton.scaleY;
|
|
2574
2574
|
let d = Math.sqrt(t * t + r * r);
|
|
2575
|
-
d > 1e-5 && (d = 1 / d), t *= d, r *= d, d = Math.sqrt(t * t + r * r), this.inherit ==
|
|
2576
|
-
let f =
|
|
2575
|
+
d > 1e-5 && (d = 1 / d), t *= d, r *= d, d = Math.sqrt(t * t + r * r), this.inherit == J.NoScale && a < 0 != (this.skeleton.scaleX < 0 != this.skeleton.scaleY < 0) && (d = -d);
|
|
2576
|
+
let f = F.PI / 2 + Math.atan2(r, t);
|
|
2577
2577
|
n = Math.cos(f) * d, i = Math.sin(f) * d, a = 1 / (t * i - n * r), o = i * a, s = n * a, c = r * a, l = t * a;
|
|
2578
2578
|
}
|
|
2579
2579
|
f = o * this.a - s * this.c, p = o * this.b - s * this.d, m = l * this.c - c * this.a, h = l * this.d - c * this.b;
|
|
2580
2580
|
}
|
|
2581
2581
|
if (this.ashearX = 0, this.ascaleX = Math.sqrt(f * f + m * m), this.ascaleX > 1e-4) {
|
|
2582
2582
|
let e = f * h - p * m;
|
|
2583
|
-
this.ascaleY = e / this.ascaleX, this.ashearY = -Math.atan2(f * p + m * h, e) *
|
|
2584
|
-
} else this.ascaleX = 0, this.ascaleY = Math.sqrt(p * p + h * h), this.ashearY = 0, this.arotation = 90 - Math.atan2(h, p) *
|
|
2583
|
+
this.ascaleY = e / this.ascaleX, this.ashearY = -Math.atan2(f * p + m * h, e) * F.radDeg, this.arotation = Math.atan2(m, f) * F.radDeg;
|
|
2584
|
+
} else this.ascaleX = 0, this.ascaleY = Math.sqrt(p * p + h * h), this.ashearY = 0, this.arotation = 90 - Math.atan2(h, p) * F.radDeg;
|
|
2585
2585
|
}
|
|
2586
2586
|
getWorldRotationX() {
|
|
2587
|
-
return Math.atan2(this.c, this.a) *
|
|
2587
|
+
return Math.atan2(this.c, this.a) * F.radDeg;
|
|
2588
2588
|
}
|
|
2589
2589
|
getWorldRotationY() {
|
|
2590
|
-
return Math.atan2(this.d, this.b) *
|
|
2590
|
+
return Math.atan2(this.d, this.b) * F.radDeg;
|
|
2591
2591
|
}
|
|
2592
2592
|
getWorldScaleX() {
|
|
2593
2593
|
return Math.sqrt(this.a * this.a + this.c * this.c);
|
|
@@ -2612,27 +2612,27 @@ var Ye = class {
|
|
|
2612
2612
|
return this.parent == null ? e : this.parent.localToWorld(e);
|
|
2613
2613
|
}
|
|
2614
2614
|
worldToLocalRotation(e) {
|
|
2615
|
-
let t =
|
|
2616
|
-
return Math.atan2(this.a * t - this.c * n, this.d * n - this.b * t) *
|
|
2615
|
+
let t = F.sinDeg(e), n = F.cosDeg(e);
|
|
2616
|
+
return Math.atan2(this.a * t - this.c * n, this.d * n - this.b * t) * F.radDeg + this.rotation - this.shearX;
|
|
2617
2617
|
}
|
|
2618
2618
|
localToWorldRotation(e) {
|
|
2619
2619
|
e -= this.rotation - this.shearX;
|
|
2620
|
-
let t =
|
|
2621
|
-
return Math.atan2(n * this.c + t * this.d, n * this.a + t * this.b) *
|
|
2620
|
+
let t = F.sinDeg(e), n = F.cosDeg(e);
|
|
2621
|
+
return Math.atan2(n * this.c + t * this.d, n * this.a + t * this.b) * F.radDeg;
|
|
2622
2622
|
}
|
|
2623
2623
|
rotateWorld(e) {
|
|
2624
|
-
e *=
|
|
2624
|
+
e *= F.degRad;
|
|
2625
2625
|
let t = Math.sin(e), n = Math.cos(e), r = this.a, i = this.b;
|
|
2626
2626
|
this.a = n * r - t * this.c, this.b = n * i - t * this.d, this.c = t * r + n * this.c, this.d = t * i + n * this.d;
|
|
2627
2627
|
}
|
|
2628
|
-
},
|
|
2628
|
+
}, ct = class {
|
|
2629
2629
|
name;
|
|
2630
2630
|
order;
|
|
2631
2631
|
skinRequired;
|
|
2632
2632
|
constructor(e, t, n) {
|
|
2633
2633
|
this.name = e, this.order = t, this.skinRequired = n;
|
|
2634
2634
|
}
|
|
2635
|
-
},
|
|
2635
|
+
}, lt = class {
|
|
2636
2636
|
data;
|
|
2637
2637
|
intValue = 0;
|
|
2638
2638
|
floatValue = 0;
|
|
@@ -2644,7 +2644,7 @@ var Ye = class {
|
|
|
2644
2644
|
if (!t) throw Error("data cannot be null.");
|
|
2645
2645
|
this.time = e, this.data = t;
|
|
2646
2646
|
}
|
|
2647
|
-
},
|
|
2647
|
+
}, ut = class {
|
|
2648
2648
|
name;
|
|
2649
2649
|
intValue = 0;
|
|
2650
2650
|
floatValue = 0;
|
|
@@ -2655,7 +2655,7 @@ var Ye = class {
|
|
|
2655
2655
|
constructor(e) {
|
|
2656
2656
|
this.name = e;
|
|
2657
2657
|
}
|
|
2658
|
-
},
|
|
2658
|
+
}, dt = class {
|
|
2659
2659
|
data;
|
|
2660
2660
|
bones;
|
|
2661
2661
|
target;
|
|
@@ -2702,22 +2702,22 @@ var Ye = class {
|
|
|
2702
2702
|
if (!s) throw Error("IK bone must have parent.");
|
|
2703
2703
|
let c = s.a, l = s.b, u = s.c, d = s.d, f = -e.ashearX - e.arotation, p = 0, m = 0;
|
|
2704
2704
|
switch (e.inherit) {
|
|
2705
|
-
case
|
|
2706
|
-
p = (t - e.worldX) *
|
|
2705
|
+
case J.OnlyTranslation:
|
|
2706
|
+
p = (t - e.worldX) * F.signum(e.skeleton.scaleX), m = (n - e.worldY) * F.signum(e.skeleton.scaleY);
|
|
2707
2707
|
break;
|
|
2708
|
-
case
|
|
2708
|
+
case J.NoRotationOrReflection:
|
|
2709
2709
|
let r = Math.abs(c * d - l * u) / Math.max(1e-4, c * c + u * u), i = c / e.skeleton.scaleX, a = u / e.skeleton.scaleY;
|
|
2710
|
-
l = -a * r * e.skeleton.scaleX, d = i * r * e.skeleton.scaleY, f += Math.atan2(a, i) *
|
|
2710
|
+
l = -a * r * e.skeleton.scaleX, d = i * r * e.skeleton.scaleY, f += Math.atan2(a, i) * F.radDeg;
|
|
2711
2711
|
default:
|
|
2712
2712
|
let o = t - s.worldX, h = n - s.worldY, g = c * d - l * u;
|
|
2713
2713
|
Math.abs(g) <= 1e-4 ? (p = 0, m = 0) : (p = (o * d - h * l) / g - e.ax, m = (h * c - o * u) / g - e.ay);
|
|
2714
2714
|
}
|
|
2715
|
-
f += Math.atan2(m, p) *
|
|
2715
|
+
f += Math.atan2(m, p) * F.radDeg, e.ascaleX < 0 && (f += 180), f > 180 ? f -= 360 : f < -180 && (f += 360);
|
|
2716
2716
|
let h = e.ascaleX, g = e.ascaleY;
|
|
2717
2717
|
if (r || i) {
|
|
2718
2718
|
switch (e.inherit) {
|
|
2719
|
-
case
|
|
2720
|
-
case
|
|
2719
|
+
case J.NoScale:
|
|
2720
|
+
case J.NoScaleOrReflection: p = t - e.worldX, m = n - e.worldY;
|
|
2721
2721
|
}
|
|
2722
2722
|
let s = e.data.length * h;
|
|
2723
2723
|
if (s > 1e-4) {
|
|
@@ -2731,56 +2731,56 @@ var Ye = class {
|
|
|
2731
2731
|
e.updateWorldTransformWith(e.ax, e.ay, e.arotation + f * o, h, g, e.ashearX, e.ashearY);
|
|
2732
2732
|
}
|
|
2733
2733
|
apply2(e, t, n, r, i, a, o, s, c) {
|
|
2734
|
-
if (e.inherit !=
|
|
2734
|
+
if (e.inherit != J.Normal || t.inherit != J.Normal) return;
|
|
2735
2735
|
let l = e.ax, u = e.ay, d = e.ascaleX, f = e.ascaleY, p = d, m = f, h = t.ascaleX, g = 0, _ = 0, v = 0;
|
|
2736
2736
|
d < 0 ? (d = -d, g = 180, v = -1) : (g = 0, v = 1), f < 0 && (f = -f, v = -v), h < 0 ? (h = -h, _ = 180) : _ = 0;
|
|
2737
|
-
let y = t.ax,
|
|
2738
|
-
!
|
|
2739
|
-
let
|
|
2740
|
-
if (!
|
|
2741
|
-
|
|
2742
|
-
let
|
|
2743
|
-
|
|
2744
|
-
let
|
|
2745
|
-
if (
|
|
2746
|
-
this.apply1(e, n, r, !1, a, !1, c), t.updateWorldTransformWith(y,
|
|
2737
|
+
let y = t.ax, b = 0, x = 0, S = 0, C = e.a, w = e.b, T = e.c, E = e.d, D = Math.abs(d - f) <= 1e-4;
|
|
2738
|
+
!D || a ? (b = 0, x = C * y + e.worldX, S = T * y + e.worldY) : (b = t.ay, x = C * y + w * b + e.worldX, S = T * y + E * b + e.worldY);
|
|
2739
|
+
let O = e.parent;
|
|
2740
|
+
if (!O) throw Error("IK parent must itself have a parent.");
|
|
2741
|
+
C = O.a, w = O.b, T = O.c, E = O.d;
|
|
2742
|
+
let k = C * E - w * T, A = x - O.worldX, j = S - O.worldY;
|
|
2743
|
+
k = Math.abs(k) <= 1e-4 ? 0 : 1 / k;
|
|
2744
|
+
let ee = (A * E - j * w) * k - l, M = (j * C - A * T) * k - u, N = Math.sqrt(ee * ee + M * M), P = t.data.length * h, I, L;
|
|
2745
|
+
if (N < 1e-4) {
|
|
2746
|
+
this.apply1(e, n, r, !1, a, !1, c), t.updateWorldTransformWith(y, b, 0, t.ascaleX, t.ascaleY, t.ashearX, t.ashearY);
|
|
2747
2747
|
return;
|
|
2748
2748
|
}
|
|
2749
|
-
|
|
2750
|
-
let
|
|
2749
|
+
A = n - O.worldX, j = r - O.worldY;
|
|
2750
|
+
let R = (A * E - j * w) * k - l, z = (j * C - A * T) * k - u, B = R * R + z * z;
|
|
2751
2751
|
if (s != 0) {
|
|
2752
2752
|
s *= d * (h + 1) * .5;
|
|
2753
|
-
let e = Math.sqrt(
|
|
2753
|
+
let e = Math.sqrt(B), t = e - N - P * d + s;
|
|
2754
2754
|
if (t > 0) {
|
|
2755
2755
|
let n = Math.min(1, t / (s * 2)) - 1;
|
|
2756
|
-
n = (t - s * (1 - n * n)) / e,
|
|
2756
|
+
n = (t - s * (1 - n * n)) / e, R -= n * R, z -= n * z, B = R * R + z * z;
|
|
2757
2757
|
}
|
|
2758
2758
|
}
|
|
2759
|
-
outer: if (
|
|
2760
|
-
|
|
2761
|
-
let e = (
|
|
2762
|
-
e < -1 ? (e = -1,
|
|
2759
|
+
outer: if (D) {
|
|
2760
|
+
P *= d;
|
|
2761
|
+
let e = (B - N * N - P * P) / (2 * N * P);
|
|
2762
|
+
e < -1 ? (e = -1, L = Math.PI * i) : e > 1 ? (e = 1, L = 0, a && (C = (Math.sqrt(B) / (N + P) - 1) * c + 1, p *= C, o && (m *= C))) : L = Math.acos(e) * i, C = N + P * e, w = P * Math.sin(L), I = Math.atan2(z * C - R * w, R * C + z * w);
|
|
2763
2763
|
} else {
|
|
2764
|
-
|
|
2765
|
-
let e =
|
|
2766
|
-
|
|
2767
|
-
let r = -2 * t *
|
|
2768
|
-
if (
|
|
2769
|
-
let e = Math.sqrt(
|
|
2764
|
+
C = d * P, w = f * P;
|
|
2765
|
+
let e = C * C, t = w * w, n = Math.atan2(z, R);
|
|
2766
|
+
T = t * N * N + e * B - e * t;
|
|
2767
|
+
let r = -2 * t * N, a = t - e;
|
|
2768
|
+
if (E = r * r - 4 * a * T, E >= 0) {
|
|
2769
|
+
let e = Math.sqrt(E);
|
|
2770
2770
|
r < 0 && (e = -e), e = -(r + e) * .5;
|
|
2771
|
-
let t = e / a, o =
|
|
2772
|
-
if (t =
|
|
2773
|
-
|
|
2771
|
+
let t = e / a, o = T / e, s = Math.abs(t) < Math.abs(o) ? t : o;
|
|
2772
|
+
if (t = B - s * s, t >= 0) {
|
|
2773
|
+
j = Math.sqrt(t) * i, I = n - Math.atan2(j, s), L = Math.atan2(j / f, (s - N) / d);
|
|
2774
2774
|
break outer;
|
|
2775
2775
|
}
|
|
2776
2776
|
}
|
|
2777
|
-
let o =
|
|
2778
|
-
|
|
2777
|
+
let o = F.PI, s = N - C, c = s * s, l = 0, u = 0, p = N + C, m = p * p, h = 0;
|
|
2778
|
+
T = -C * N / (e - t), T >= -1 && T <= 1 && (T = Math.acos(T), A = C * Math.cos(T) + N, j = w * Math.sin(T), E = A * A + j * j, E < c && (o = T, c = E, s = A, l = j), E > m && (u = T, m = E, p = A, h = j)), B <= (c + m) * .5 ? (I = n - Math.atan2(l * i, s), L = o * i) : (I = n - Math.atan2(h * i, p), L = u * i);
|
|
2779
2779
|
}
|
|
2780
|
-
let
|
|
2781
|
-
|
|
2780
|
+
let te = Math.atan2(b, y) * v, V = e.arotation;
|
|
2781
|
+
I = (I - te) * F.radDeg + g - V, I > 180 ? I -= 360 : I < -180 && (I += 360), e.updateWorldTransformWith(l, u, V + I * c, p, m, 0, 0), V = t.arotation, L = ((L + te) * F.radDeg - t.ashearX) * v + _ - V, L > 180 ? L -= 360 : L < -180 && (L += 360), t.updateWorldTransformWith(y, b, V + L * c, t.ascaleX, t.ascaleY, t.ashearX, t.ashearY);
|
|
2782
2782
|
}
|
|
2783
|
-
},
|
|
2783
|
+
}, ft = class extends ct {
|
|
2784
2784
|
bones = [];
|
|
2785
2785
|
_target = null;
|
|
2786
2786
|
set target(e) {
|
|
@@ -2799,7 +2799,7 @@ var Ye = class {
|
|
|
2799
2799
|
constructor(e) {
|
|
2800
2800
|
super(e, 0, !1);
|
|
2801
2801
|
}
|
|
2802
|
-
},
|
|
2802
|
+
}, pt = class extends ct {
|
|
2803
2803
|
bones = [];
|
|
2804
2804
|
_target = null;
|
|
2805
2805
|
set target(e) {
|
|
@@ -2809,9 +2809,9 @@ var Ye = class {
|
|
|
2809
2809
|
if (this._target) return this._target;
|
|
2810
2810
|
throw Error("SlotData not set.");
|
|
2811
2811
|
}
|
|
2812
|
-
positionMode =
|
|
2813
|
-
spacingMode =
|
|
2814
|
-
rotateMode =
|
|
2812
|
+
positionMode = mt.Fixed;
|
|
2813
|
+
spacingMode = Y.Fixed;
|
|
2814
|
+
rotateMode = ht.Chain;
|
|
2815
2815
|
offsetRotation = 0;
|
|
2816
2816
|
position = 0;
|
|
2817
2817
|
spacing = 0;
|
|
@@ -2821,21 +2821,21 @@ var Ye = class {
|
|
|
2821
2821
|
constructor(e) {
|
|
2822
2822
|
super(e, 0, !1);
|
|
2823
2823
|
}
|
|
2824
|
-
},
|
|
2824
|
+
}, mt;
|
|
2825
2825
|
(function(e) {
|
|
2826
2826
|
e[e.Fixed = 0] = "Fixed", e[e.Percent = 1] = "Percent";
|
|
2827
|
-
})(
|
|
2828
|
-
var
|
|
2827
|
+
})(mt ||= {});
|
|
2828
|
+
var Y;
|
|
2829
2829
|
(function(e) {
|
|
2830
2830
|
e[e.Length = 0] = "Length", e[e.Fixed = 1] = "Fixed", e[e.Percent = 2] = "Percent", e[e.Proportional = 3] = "Proportional";
|
|
2831
|
-
})(
|
|
2832
|
-
var
|
|
2831
|
+
})(Y ||= {});
|
|
2832
|
+
var ht;
|
|
2833
2833
|
(function(e) {
|
|
2834
2834
|
e[e.Tangent = 0] = "Tangent", e[e.Chain = 1] = "Chain", e[e.ChainScale = 2] = "ChainScale";
|
|
2835
|
-
})(
|
|
2835
|
+
})(ht ||= {});
|
|
2836
2836
|
//#endregion
|
|
2837
2837
|
//#region ../../node_modules/.pnpm/@esotericsoftware+spine-core@4.2.84/node_modules/@esotericsoftware/spine-core/dist/PathConstraint.js
|
|
2838
|
-
var
|
|
2838
|
+
var gt = class e {
|
|
2839
2839
|
static NONE = -1;
|
|
2840
2840
|
static BEFORE = -2;
|
|
2841
2841
|
static AFTER = -3;
|
|
@@ -2877,19 +2877,19 @@ var rt = class e {
|
|
|
2877
2877
|
}
|
|
2878
2878
|
update(t) {
|
|
2879
2879
|
let n = this.target.getAttachment();
|
|
2880
|
-
if (!(n instanceof
|
|
2880
|
+
if (!(n instanceof nt)) return;
|
|
2881
2881
|
let r = this.mixRotate, i = this.mixX, a = this.mixY;
|
|
2882
2882
|
if (r == 0 && i == 0 && a == 0) return;
|
|
2883
|
-
let o = this.data, s = o.rotateMode ==
|
|
2883
|
+
let o = this.data, s = o.rotateMode == ht.Tangent, c = o.rotateMode == ht.ChainScale, l = this.bones, u = l.length, d = s ? u : u + 1, f = I.setArraySize(this.spaces, d), p = c ? this.lengths = I.setArraySize(this.lengths, u) : [], m = this.spacing;
|
|
2884
2884
|
switch (o.spacingMode) {
|
|
2885
|
-
case
|
|
2885
|
+
case Y.Percent:
|
|
2886
2886
|
if (c) for (let e = 0, t = d - 1; e < t; e++) {
|
|
2887
2887
|
let t = l[e], n = t.data.length, r = n * t.a, i = n * t.c;
|
|
2888
2888
|
p[e] = Math.sqrt(r * r + i * i);
|
|
2889
2889
|
}
|
|
2890
|
-
|
|
2890
|
+
I.arrayFill(f, 1, d, m);
|
|
2891
2891
|
break;
|
|
2892
|
-
case
|
|
2892
|
+
case Y.Proportional:
|
|
2893
2893
|
let t = 0;
|
|
2894
2894
|
for (let n = 0, r = d - 1; n < r;) {
|
|
2895
2895
|
let r = l[n], i = r.data.length;
|
|
@@ -2905,7 +2905,7 @@ var rt = class e {
|
|
|
2905
2905
|
}
|
|
2906
2906
|
break;
|
|
2907
2907
|
default:
|
|
2908
|
-
let n = o.spacingMode ==
|
|
2908
|
+
let n = o.spacingMode == Y.Length;
|
|
2909
2909
|
for (let t = 0, r = d - 1; t < r;) {
|
|
2910
2910
|
let r = l[t], i = r.data.length;
|
|
2911
2911
|
if (i < e.epsilon) c && (p[t] = 0), f[++t] = m;
|
|
@@ -2916,11 +2916,11 @@ var rt = class e {
|
|
|
2916
2916
|
}
|
|
2917
2917
|
}
|
|
2918
2918
|
let h = this.computeWorldPositions(n, d, s), g = h[0], _ = h[1], v = o.offsetRotation, y = !1;
|
|
2919
|
-
if (v == 0) y = o.rotateMode ==
|
|
2919
|
+
if (v == 0) y = o.rotateMode == ht.Chain;
|
|
2920
2920
|
else {
|
|
2921
2921
|
y = !1;
|
|
2922
2922
|
let e = this.target.bone;
|
|
2923
|
-
v *= e.a * e.d - e.b * e.c > 0 ?
|
|
2923
|
+
v *= e.a * e.d - e.b * e.c > 0 ? F.degRad : -F.degRad;
|
|
2924
2924
|
}
|
|
2925
2925
|
for (let e = 0, t = 3; e < u; e++, t += 3) {
|
|
2926
2926
|
let n = l[e];
|
|
@@ -2940,29 +2940,29 @@ var rt = class e {
|
|
|
2940
2940
|
let e = n.data.length;
|
|
2941
2941
|
g += (e * (u * i - p * o) - d) * r, _ += (e * (p * i + u * o) - m) * r;
|
|
2942
2942
|
} else l += v;
|
|
2943
|
-
l >
|
|
2943
|
+
l > F.PI ? l -= F.PI2 : l < -F.PI && (l += F.PI2), l *= r, u = Math.cos(l), p = Math.sin(l), n.a = u * i - p * o, n.b = u * a - p * c, n.c = p * i + u * o, n.d = p * a + u * c;
|
|
2944
2944
|
}
|
|
2945
2945
|
n.updateAppliedTransform();
|
|
2946
2946
|
}
|
|
2947
2947
|
}
|
|
2948
2948
|
computeWorldPositions(t, n, r) {
|
|
2949
|
-
let i = this.target, a = this.position, o = this.spaces, s =
|
|
2949
|
+
let i = this.target, a = this.position, o = this.spaces, s = I.setArraySize(this.positions, n * 3 + 2), c = this.world, l = t.closed, u = t.worldVerticesLength, d = u / 6, f = e.NONE;
|
|
2950
2950
|
if (!t.constantSpeed) {
|
|
2951
2951
|
let p = t.lengths;
|
|
2952
2952
|
d -= l ? 1 : 2;
|
|
2953
2953
|
let m = p[d];
|
|
2954
|
-
this.data.positionMode ==
|
|
2954
|
+
this.data.positionMode == mt.Percent && (a *= m);
|
|
2955
2955
|
let h;
|
|
2956
2956
|
switch (this.data.spacingMode) {
|
|
2957
|
-
case
|
|
2957
|
+
case Y.Percent:
|
|
2958
2958
|
h = m;
|
|
2959
2959
|
break;
|
|
2960
|
-
case
|
|
2960
|
+
case Y.Proportional:
|
|
2961
2961
|
h = m / n;
|
|
2962
2962
|
break;
|
|
2963
2963
|
default: h = 1;
|
|
2964
2964
|
}
|
|
2965
|
-
c =
|
|
2965
|
+
c = I.setArraySize(this.world, 8);
|
|
2966
2966
|
for (let g = 0, _ = 0, v = 0; g < n; g++, _ += 3) {
|
|
2967
2967
|
let n = o[g] * h;
|
|
2968
2968
|
a += n;
|
|
@@ -2990,40 +2990,40 @@ var rt = class e {
|
|
|
2990
2990
|
}
|
|
2991
2991
|
return s;
|
|
2992
2992
|
}
|
|
2993
|
-
l ? (u += 2, c =
|
|
2994
|
-
let p =
|
|
2995
|
-
for (let e = 0, t = 2; e < d; e++, t += 6) _ = c[t], v = c[t + 1], y = c[t + 2], b = c[t + 3],
|
|
2996
|
-
this.data.positionMode ==
|
|
2997
|
-
let
|
|
2993
|
+
l ? (u += 2, c = I.setArraySize(this.world, u), t.computeWorldVertices(i, 2, u - 4, c, 0, 2), t.computeWorldVertices(i, 0, 2, c, u - 4, 2), c[u - 2] = c[0], c[u - 1] = c[1]) : (d--, u -= 4, c = I.setArraySize(this.world, u), t.computeWorldVertices(i, 2, u, c, 0, 2));
|
|
2994
|
+
let p = I.setArraySize(this.curves, d), m = 0, h = c[0], g = c[1], _ = 0, v = 0, y = 0, b = 0, x = 0, S = 0, C = 0, w = 0, T = 0, E = 0, D = 0, O = 0, k = 0, A = 0;
|
|
2995
|
+
for (let e = 0, t = 2; e < d; e++, t += 6) _ = c[t], v = c[t + 1], y = c[t + 2], b = c[t + 3], x = c[t + 4], S = c[t + 5], C = (h - _ * 2 + y) * .1875, w = (g - v * 2 + b) * .1875, T = ((_ - y) * 3 - h + x) * .09375, E = ((v - b) * 3 - g + S) * .09375, D = C * 2 + T, O = w * 2 + E, k = (_ - h) * .75 + C + T * .16666667, A = (v - g) * .75 + w + E * .16666667, m += Math.sqrt(k * k + A * A), k += D, A += O, D += T, O += E, m += Math.sqrt(k * k + A * A), k += D, A += O, m += Math.sqrt(k * k + A * A), k += D + T, A += O + E, m += Math.sqrt(k * k + A * A), p[e] = m, h = x, g = S;
|
|
2996
|
+
this.data.positionMode == mt.Percent && (a *= m);
|
|
2997
|
+
let j;
|
|
2998
2998
|
switch (this.data.spacingMode) {
|
|
2999
|
-
case
|
|
3000
|
-
|
|
2999
|
+
case Y.Percent:
|
|
3000
|
+
j = m;
|
|
3001
3001
|
break;
|
|
3002
|
-
case
|
|
3003
|
-
|
|
3002
|
+
case Y.Proportional:
|
|
3003
|
+
j = m / n;
|
|
3004
3004
|
break;
|
|
3005
|
-
default:
|
|
3005
|
+
default: j = 1;
|
|
3006
3006
|
}
|
|
3007
|
-
let
|
|
3007
|
+
let ee = this.segments, M = 0;
|
|
3008
3008
|
for (let e = 0, t = 0, i = 0, d = 0; e < n; e++, t += 3) {
|
|
3009
|
-
let n = o[e] *
|
|
3009
|
+
let n = o[e] * j;
|
|
3010
3010
|
a += n;
|
|
3011
|
-
let
|
|
3012
|
-
if (l)
|
|
3013
|
-
else if (
|
|
3014
|
-
this.addBeforePosition(
|
|
3011
|
+
let N = a;
|
|
3012
|
+
if (l) N %= m, N < 0 && (N += m), i = 0;
|
|
3013
|
+
else if (N < 0) {
|
|
3014
|
+
this.addBeforePosition(N, c, 0, s, t);
|
|
3015
3015
|
continue;
|
|
3016
|
-
} else if (
|
|
3017
|
-
this.addAfterPosition(
|
|
3016
|
+
} else if (N > m) {
|
|
3017
|
+
this.addAfterPosition(N - m, c, u - 4, s, t);
|
|
3018
3018
|
continue;
|
|
3019
3019
|
}
|
|
3020
3020
|
for (;; i++) {
|
|
3021
3021
|
let e = p[i];
|
|
3022
|
-
if (!(
|
|
3023
|
-
if (i == 0)
|
|
3022
|
+
if (!(N > e)) {
|
|
3023
|
+
if (i == 0) N /= e;
|
|
3024
3024
|
else {
|
|
3025
3025
|
let t = p[i - 1];
|
|
3026
|
-
|
|
3026
|
+
N = (N - t) / (e - t);
|
|
3027
3027
|
}
|
|
3028
3028
|
break;
|
|
3029
3029
|
}
|
|
@@ -3031,21 +3031,21 @@ var rt = class e {
|
|
|
3031
3031
|
if (i != f) {
|
|
3032
3032
|
f = i;
|
|
3033
3033
|
let e = i * 6;
|
|
3034
|
-
for (h = c[e], g = c[e + 1], _ = c[e + 2], v = c[e + 3], y = c[e + 4], b = c[e + 5],
|
|
3035
|
-
|
|
3034
|
+
for (h = c[e], g = c[e + 1], _ = c[e + 2], v = c[e + 3], y = c[e + 4], b = c[e + 5], x = c[e + 6], S = c[e + 7], C = (h - _ * 2 + y) * .03, w = (g - v * 2 + b) * .03, T = ((_ - y) * 3 - h + x) * .006, E = ((v - b) * 3 - g + S) * .006, D = C * 2 + T, O = w * 2 + E, k = (_ - h) * .3 + C + T * .16666667, A = (v - g) * .3 + w + E * .16666667, M = Math.sqrt(k * k + A * A), ee[0] = M, e = 1; e < 8; e++) k += D, A += O, D += T, O += E, M += Math.sqrt(k * k + A * A), ee[e] = M;
|
|
3035
|
+
k += D, A += O, M += Math.sqrt(k * k + A * A), ee[8] = M, k += D + T, A += O + E, M += Math.sqrt(k * k + A * A), ee[9] = M, d = 0;
|
|
3036
3036
|
}
|
|
3037
|
-
for (
|
|
3038
|
-
let e =
|
|
3039
|
-
if (!(
|
|
3040
|
-
if (d == 0)
|
|
3037
|
+
for (N *= M;; d++) {
|
|
3038
|
+
let e = ee[d];
|
|
3039
|
+
if (!(N > e)) {
|
|
3040
|
+
if (d == 0) N /= e;
|
|
3041
3041
|
else {
|
|
3042
|
-
let t =
|
|
3043
|
-
|
|
3042
|
+
let t = ee[d - 1];
|
|
3043
|
+
N = d + (N - t) / (e - t);
|
|
3044
3044
|
}
|
|
3045
3045
|
break;
|
|
3046
3046
|
}
|
|
3047
3047
|
}
|
|
3048
|
-
this.addCurvePosition(
|
|
3048
|
+
this.addCurvePosition(N * .1, h, g, _, v, y, b, x, S, s, t, r || e > 0 && n == 0);
|
|
3049
3049
|
}
|
|
3050
3050
|
return s;
|
|
3051
3051
|
}
|
|
@@ -3065,7 +3065,7 @@ var rt = class e {
|
|
|
3065
3065
|
let f = e * e, p = f * e, m = 1 - e, h = m * m, g = h * m, _ = m * e, v = _ * 3, y = m * v, b = v * e, x = t * g + r * y + a * b + s * p, S = n * g + i * y + o * b + c * p;
|
|
3066
3066
|
l[u] = x, l[u + 1] = S, d && (e < .001 ? l[u + 2] = Math.atan2(i - n, r - t) : l[u + 2] = Math.atan2(S - (n * h + i * _ * 2 + o * f), x - (t * h + r * _ * 2 + a * f)));
|
|
3067
3067
|
}
|
|
3068
|
-
},
|
|
3068
|
+
}, _t = class {
|
|
3069
3069
|
data;
|
|
3070
3070
|
_bone = null;
|
|
3071
3071
|
set bone(e) {
|
|
@@ -3119,9 +3119,9 @@ var rt = class e {
|
|
|
3119
3119
|
if (t == 0) return;
|
|
3120
3120
|
let n = this.data.x > 0, r = this.data.y > 0, i = this.data.rotate > 0 || this.data.shearX > 0, a = this.data.scaleX > 0, o = this.bone, s = o.data.length;
|
|
3121
3121
|
switch (e) {
|
|
3122
|
-
case
|
|
3123
|
-
case
|
|
3124
|
-
case
|
|
3122
|
+
case xt.none: return;
|
|
3123
|
+
case xt.reset: this.reset();
|
|
3124
|
+
case xt.update:
|
|
3125
3125
|
let e = this.skeleton, c = Math.max(this.skeleton.time - this.lastTime, 0);
|
|
3126
3126
|
this.remaining += c, this.lastTime = e.time;
|
|
3127
3127
|
let l = o.worldX, u = o.worldY;
|
|
@@ -3151,7 +3151,7 @@ var rt = class e {
|
|
|
3151
3151
|
if (l > g ? l = g : l < -g && (l = -g), u > _ ? u = _ : u < -_ && (u = -_), i) {
|
|
3152
3152
|
c = (this.data.rotate + this.data.shearX) * t;
|
|
3153
3153
|
let i = Math.atan2(u + this.ty, l + this.tx) - e - this.rotateOffset * c;
|
|
3154
|
-
this.rotateOffset += (i - Math.ceil(i *
|
|
3154
|
+
this.rotateOffset += (i - Math.ceil(i * F.invPI2 - .5) * F.PI2) * f, i = this.rotateOffset * c + e, n = Math.cos(i), r = Math.sin(i), a && (i = s * o.getWorldScaleX(), i > 0 && (this.scaleOffset += (l * n + u * r) * f / i));
|
|
3155
3155
|
} else {
|
|
3156
3156
|
n = Math.cos(e), r = Math.sin(e);
|
|
3157
3157
|
let t = s * o.getWorldScaleX();
|
|
@@ -3159,7 +3159,7 @@ var rt = class e {
|
|
|
3159
3159
|
}
|
|
3160
3160
|
if (d = this.remaining, d >= p) {
|
|
3161
3161
|
h == -1 && (h = this.damping ** (60 * p));
|
|
3162
|
-
let t = this.massInverse * p, o = this.strength, l = this.wind, u =
|
|
3162
|
+
let t = this.massInverse * p, o = this.strength, l = this.wind, u = bt.yDown ? -this.gravity : this.gravity, f = s / m;
|
|
3163
3163
|
for (;;) if (d -= p, a && (this.scaleVelocity += (l * n - u * r - this.scaleOffset * o) * t, this.scaleOffset += this.scaleVelocity * p, this.scaleVelocity *= h), i) {
|
|
3164
3164
|
if (this.rotateVelocity -= ((l * r + u * n) * f + this.rotateOffset * o) * t, this.rotateOffset += this.rotateVelocity * p, this.rotateVelocity *= h, d < p) break;
|
|
3165
3165
|
let i = this.rotateOffset * c + e;
|
|
@@ -3171,7 +3171,7 @@ var rt = class e {
|
|
|
3171
3171
|
}
|
|
3172
3172
|
this.cx = o.worldX, this.cy = o.worldY;
|
|
3173
3173
|
break;
|
|
3174
|
-
case
|
|
3174
|
+
case xt.pose: n && (o.worldX += this.xOffset * t * this.data.x), r && (o.worldY += this.yOffset * t * this.data.y);
|
|
3175
3175
|
}
|
|
3176
3176
|
if (i) {
|
|
3177
3177
|
let e = this.rotateOffset * t, n = 0, r = 0, i = 0;
|
|
@@ -3184,16 +3184,16 @@ var rt = class e {
|
|
|
3184
3184
|
let e = 1 + this.scaleOffset * t * this.data.scaleX;
|
|
3185
3185
|
o.a *= e, o.c *= e;
|
|
3186
3186
|
}
|
|
3187
|
-
e !=
|
|
3187
|
+
e != xt.pose && (this.tx = s * o.a, this.ty = s * o.c), o.updateAppliedTransform();
|
|
3188
3188
|
}
|
|
3189
3189
|
translate(e, t) {
|
|
3190
3190
|
this.ux -= e, this.uy -= t, this.cx -= e, this.cy -= t;
|
|
3191
3191
|
}
|
|
3192
3192
|
rotate(e, t, n) {
|
|
3193
|
-
let r = n *
|
|
3193
|
+
let r = n * F.degRad, i = Math.cos(r), a = Math.sin(r), o = this.cx - e, s = this.cy - t;
|
|
3194
3194
|
this.translate(o * i - s * a - o, o * a + s * i - s);
|
|
3195
3195
|
}
|
|
3196
|
-
},
|
|
3196
|
+
}, vt = class {
|
|
3197
3197
|
data;
|
|
3198
3198
|
bone;
|
|
3199
3199
|
color;
|
|
@@ -3205,7 +3205,7 @@ var rt = class e {
|
|
|
3205
3205
|
constructor(e, t) {
|
|
3206
3206
|
if (!e) throw Error("data cannot be null.");
|
|
3207
3207
|
if (!t) throw Error("bone cannot be null.");
|
|
3208
|
-
this.data = e, this.bone = t, this.color = new
|
|
3208
|
+
this.data = e, this.bone = t, this.color = new P(), this.darkColor = e.darkColor ? new P() : null, this.setToSetupPose();
|
|
3209
3209
|
}
|
|
3210
3210
|
getSkeleton() {
|
|
3211
3211
|
return this.bone.skeleton;
|
|
@@ -3214,12 +3214,12 @@ var rt = class e {
|
|
|
3214
3214
|
return this.attachment;
|
|
3215
3215
|
}
|
|
3216
3216
|
setAttachment(e) {
|
|
3217
|
-
this.attachment != e && ((!(e instanceof
|
|
3217
|
+
this.attachment != e && ((!(e instanceof B) || !(this.attachment instanceof B) || e.timelineAttachment != this.attachment.timelineAttachment) && (this.deform.length = 0), this.attachment = e, this.sequenceIndex = -1);
|
|
3218
3218
|
}
|
|
3219
3219
|
setToSetupPose() {
|
|
3220
3220
|
this.color.setFromColor(this.data.color), this.darkColor && this.darkColor.setFromColor(this.data.darkColor), this.data.attachmentName ? (this.attachment = null, this.setAttachment(this.bone.skeleton.getAttachment(this.data.index, this.data.attachmentName))) : this.attachment = null;
|
|
3221
3221
|
}
|
|
3222
|
-
},
|
|
3222
|
+
}, yt = class {
|
|
3223
3223
|
data;
|
|
3224
3224
|
bones;
|
|
3225
3225
|
target;
|
|
@@ -3229,7 +3229,7 @@ var rt = class e {
|
|
|
3229
3229
|
mixScaleX = 0;
|
|
3230
3230
|
mixScaleY = 0;
|
|
3231
3231
|
mixShearY = 0;
|
|
3232
|
-
temp = new
|
|
3232
|
+
temp = new R();
|
|
3233
3233
|
active = !1;
|
|
3234
3234
|
constructor(e, t) {
|
|
3235
3235
|
if (!e) throw Error("data cannot be null.");
|
|
@@ -3255,12 +3255,12 @@ var rt = class e {
|
|
|
3255
3255
|
this.mixRotate == 0 && this.mixX == 0 && this.mixY == 0 && this.mixScaleX == 0 && this.mixScaleY == 0 && this.mixShearY == 0 || (this.data.local ? this.data.relative ? this.applyRelativeLocal() : this.applyAbsoluteLocal() : this.data.relative ? this.applyRelativeWorld() : this.applyAbsoluteWorld());
|
|
3256
3256
|
}
|
|
3257
3257
|
applyAbsoluteWorld() {
|
|
3258
|
-
let e = this.mixRotate, t = this.mixX, n = this.mixY, r = this.mixScaleX, i = this.mixScaleY, a = this.mixShearY, o = t != 0 || n != 0, s = this.target, c = s.a, l = s.b, u = s.c, d = s.d, f = c * d - l * u > 0 ?
|
|
3258
|
+
let e = this.mixRotate, t = this.mixX, n = this.mixY, r = this.mixScaleX, i = this.mixScaleY, a = this.mixShearY, o = t != 0 || n != 0, s = this.target, c = s.a, l = s.b, u = s.c, d = s.d, f = c * d - l * u > 0 ? F.degRad : -F.degRad, p = this.data.offsetRotation * f, m = this.data.offsetShearY * f, h = this.bones;
|
|
3259
3259
|
for (let f = 0, g = h.length; f < g; f++) {
|
|
3260
3260
|
let g = h[f];
|
|
3261
3261
|
if (e != 0) {
|
|
3262
3262
|
let t = g.a, n = g.b, r = g.c, i = g.d, a = Math.atan2(u, c) - Math.atan2(r, t) + p;
|
|
3263
|
-
a >
|
|
3263
|
+
a > F.PI ? a -= F.PI2 : a < -F.PI && (a += F.PI2), a *= e;
|
|
3264
3264
|
let o = Math.cos(a), s = Math.sin(a);
|
|
3265
3265
|
g.a = o * t - s * r, g.b = o * n - s * i, g.c = s * t + o * r, g.d = s * n + o * i;
|
|
3266
3266
|
}
|
|
@@ -3278,7 +3278,7 @@ var rt = class e {
|
|
|
3278
3278
|
}
|
|
3279
3279
|
if (a > 0) {
|
|
3280
3280
|
let e = g.b, t = g.d, n = Math.atan2(t, e), r = Math.atan2(d, l) - Math.atan2(u, c) - (n - Math.atan2(g.c, g.a));
|
|
3281
|
-
r >
|
|
3281
|
+
r > F.PI ? r -= F.PI2 : r < -F.PI && (r += F.PI2), r = n + (r + m) * a;
|
|
3282
3282
|
let i = Math.sqrt(e * e + t * t);
|
|
3283
3283
|
g.b = Math.cos(r) * i, g.d = Math.sin(r) * i;
|
|
3284
3284
|
}
|
|
@@ -3286,12 +3286,12 @@ var rt = class e {
|
|
|
3286
3286
|
}
|
|
3287
3287
|
}
|
|
3288
3288
|
applyRelativeWorld() {
|
|
3289
|
-
let e = this.mixRotate, t = this.mixX, n = this.mixY, r = this.mixScaleX, i = this.mixScaleY, a = this.mixShearY, o = t != 0 || n != 0, s = this.target, c = s.a, l = s.b, u = s.c, d = s.d, f = c * d - l * u > 0 ?
|
|
3289
|
+
let e = this.mixRotate, t = this.mixX, n = this.mixY, r = this.mixScaleX, i = this.mixScaleY, a = this.mixShearY, o = t != 0 || n != 0, s = this.target, c = s.a, l = s.b, u = s.c, d = s.d, f = c * d - l * u > 0 ? F.degRad : -F.degRad, p = this.data.offsetRotation * f, m = this.data.offsetShearY * f, h = this.bones;
|
|
3290
3290
|
for (let f = 0, g = h.length; f < g; f++) {
|
|
3291
3291
|
let g = h[f];
|
|
3292
3292
|
if (e != 0) {
|
|
3293
3293
|
let t = g.a, n = g.b, r = g.c, i = g.d, a = Math.atan2(u, c) + p;
|
|
3294
|
-
a >
|
|
3294
|
+
a > F.PI ? a -= F.PI2 : a < -F.PI && (a += F.PI2), a *= e;
|
|
3295
3295
|
let o = Math.cos(a), s = Math.sin(a);
|
|
3296
3296
|
g.a = o * t - s * r, g.b = o * n - s * i, g.c = s * t + o * r, g.d = s * n + o * i;
|
|
3297
3297
|
}
|
|
@@ -3309,9 +3309,9 @@ var rt = class e {
|
|
|
3309
3309
|
}
|
|
3310
3310
|
if (a > 0) {
|
|
3311
3311
|
let e = Math.atan2(d, l) - Math.atan2(u, c);
|
|
3312
|
-
e >
|
|
3312
|
+
e > F.PI ? e -= F.PI2 : e < -F.PI && (e += F.PI2);
|
|
3313
3313
|
let t = g.b, n = g.d;
|
|
3314
|
-
e = Math.atan2(n, t) + (e -
|
|
3314
|
+
e = Math.atan2(n, t) + (e - F.PI / 2 + m) * a;
|
|
3315
3315
|
let r = Math.sqrt(t * t + n * n);
|
|
3316
3316
|
g.b = Math.cos(e) * r, g.d = Math.sin(e) * r;
|
|
3317
3317
|
}
|
|
@@ -3338,7 +3338,7 @@ var rt = class e {
|
|
|
3338
3338
|
l.updateWorldTransformWith(d, f, u, p, m, l.ashearX, h);
|
|
3339
3339
|
}
|
|
3340
3340
|
}
|
|
3341
|
-
},
|
|
3341
|
+
}, bt = class e {
|
|
3342
3342
|
static quadTriangles = [
|
|
3343
3343
|
0,
|
|
3344
3344
|
1,
|
|
@@ -3375,39 +3375,39 @@ var rt = class e {
|
|
|
3375
3375
|
this.data = e, this.bones = [];
|
|
3376
3376
|
for (let t = 0; t < e.bones.length; t++) {
|
|
3377
3377
|
let n = e.bones[t], r;
|
|
3378
|
-
if (!n.parent) r = new
|
|
3378
|
+
if (!n.parent) r = new st(n, this, null);
|
|
3379
3379
|
else {
|
|
3380
3380
|
let e = this.bones[n.parent.index];
|
|
3381
|
-
r = new
|
|
3381
|
+
r = new st(n, this, e), e.children.push(r);
|
|
3382
3382
|
}
|
|
3383
3383
|
this.bones.push(r);
|
|
3384
3384
|
}
|
|
3385
3385
|
this.slots = [], this.drawOrder = [];
|
|
3386
3386
|
for (let t = 0; t < e.slots.length; t++) {
|
|
3387
|
-
let n = e.slots[t], r = this.bones[n.boneData.index], i = new
|
|
3387
|
+
let n = e.slots[t], r = this.bones[n.boneData.index], i = new vt(n, r);
|
|
3388
3388
|
this.slots.push(i), this.drawOrder.push(i);
|
|
3389
3389
|
}
|
|
3390
3390
|
this.ikConstraints = [];
|
|
3391
3391
|
for (let t = 0; t < e.ikConstraints.length; t++) {
|
|
3392
3392
|
let n = e.ikConstraints[t];
|
|
3393
|
-
this.ikConstraints.push(new
|
|
3393
|
+
this.ikConstraints.push(new dt(n, this));
|
|
3394
3394
|
}
|
|
3395
3395
|
this.transformConstraints = [];
|
|
3396
3396
|
for (let t = 0; t < e.transformConstraints.length; t++) {
|
|
3397
3397
|
let n = e.transformConstraints[t];
|
|
3398
|
-
this.transformConstraints.push(new
|
|
3398
|
+
this.transformConstraints.push(new yt(n, this));
|
|
3399
3399
|
}
|
|
3400
3400
|
this.pathConstraints = [];
|
|
3401
3401
|
for (let t = 0; t < e.pathConstraints.length; t++) {
|
|
3402
3402
|
let n = e.pathConstraints[t];
|
|
3403
|
-
this.pathConstraints.push(new
|
|
3403
|
+
this.pathConstraints.push(new gt(n, this));
|
|
3404
3404
|
}
|
|
3405
3405
|
this.physicsConstraints = [];
|
|
3406
3406
|
for (let t = 0; t < e.physicsConstraints.length; t++) {
|
|
3407
3407
|
let n = e.physicsConstraints[t];
|
|
3408
|
-
this.physicsConstraints.push(new
|
|
3408
|
+
this.physicsConstraints.push(new _t(n, this));
|
|
3409
3409
|
}
|
|
3410
|
-
this.color = new
|
|
3410
|
+
this.color = new P(1, 1, 1, 1), this.updateCache();
|
|
3411
3411
|
}
|
|
3412
3412
|
updateCache() {
|
|
3413
3413
|
let e = this._updateCache;
|
|
@@ -3460,7 +3460,7 @@ var rt = class e {
|
|
|
3460
3460
|
for (let e = 0, n = t.length; e < n; e++) this.sortBone(t[e]);
|
|
3461
3461
|
}
|
|
3462
3462
|
sortIkConstraint(e) {
|
|
3463
|
-
if (e.active = e.target.isActive() && (!e.data.skinRequired || this.skin &&
|
|
3463
|
+
if (e.active = e.target.isActive() && (!e.data.skinRequired || this.skin && I.contains(this.skin.constraints, e.data, !0)), !e.active) return;
|
|
3464
3464
|
let t = e.target;
|
|
3465
3465
|
this.sortBone(t);
|
|
3466
3466
|
let n = e.bones, r = n[0];
|
|
@@ -3471,12 +3471,12 @@ var rt = class e {
|
|
|
3471
3471
|
}
|
|
3472
3472
|
}
|
|
3473
3473
|
sortPathConstraint(e) {
|
|
3474
|
-
if (e.active = e.target.bone.isActive() && (!e.data.skinRequired || this.skin &&
|
|
3474
|
+
if (e.active = e.target.bone.isActive() && (!e.data.skinRequired || this.skin && I.contains(this.skin.constraints, e.data, !0)), !e.active) return;
|
|
3475
3475
|
let t = e.target, n = t.data.index, r = t.bone;
|
|
3476
3476
|
this.skin && this.sortPathConstraintAttachment(this.skin, n, r), this.data.defaultSkin && this.data.defaultSkin != this.skin && this.sortPathConstraintAttachment(this.data.defaultSkin, n, r);
|
|
3477
3477
|
for (let e = 0, t = this.data.skins.length; e < t; e++) this.sortPathConstraintAttachment(this.data.skins[e], n, r);
|
|
3478
3478
|
let i = t.getAttachment();
|
|
3479
|
-
i instanceof
|
|
3479
|
+
i instanceof nt && this.sortPathConstraintAttachmentWith(i, r);
|
|
3480
3480
|
let a = e.bones, o = a.length;
|
|
3481
3481
|
for (let e = 0; e < o; e++) this.sortBone(a[e]);
|
|
3482
3482
|
this._updateCache.push(e);
|
|
@@ -3484,7 +3484,7 @@ var rt = class e {
|
|
|
3484
3484
|
for (let e = 0; e < o; e++) a[e].sorted = !0;
|
|
3485
3485
|
}
|
|
3486
3486
|
sortTransformConstraint(e) {
|
|
3487
|
-
if (e.active = e.target.isActive() && (!e.data.skinRequired || this.skin &&
|
|
3487
|
+
if (e.active = e.target.isActive() && (!e.data.skinRequired || this.skin && I.contains(this.skin.constraints, e.data, !0)), !e.active) return;
|
|
3488
3488
|
this.sortBone(e.target);
|
|
3489
3489
|
let t = e.bones, n = t.length;
|
|
3490
3490
|
if (e.data.local) for (let e = 0; e < n; e++) {
|
|
@@ -3501,7 +3501,7 @@ var rt = class e {
|
|
|
3501
3501
|
if (r) for (let e in r) this.sortPathConstraintAttachmentWith(r[e], n);
|
|
3502
3502
|
}
|
|
3503
3503
|
sortPathConstraintAttachmentWith(e, t) {
|
|
3504
|
-
if (!(e instanceof
|
|
3504
|
+
if (!(e instanceof nt)) return;
|
|
3505
3505
|
let n = e.bones;
|
|
3506
3506
|
if (!n) this.sortBone(t);
|
|
3507
3507
|
else {
|
|
@@ -3514,7 +3514,7 @@ var rt = class e {
|
|
|
3514
3514
|
}
|
|
3515
3515
|
sortPhysicsConstraint(e) {
|
|
3516
3516
|
let t = e.bone;
|
|
3517
|
-
e.active = t.active && (!e.data.skinRequired || this.skin != null &&
|
|
3517
|
+
e.active = t.active && (!e.data.skinRequired || this.skin != null && I.contains(this.skin.constraints, e.data, !0)), e.active && (this.sortBone(t), this._updateCache.push(e), this.sortReset(t.children), t.sorted = !0);
|
|
3518
3518
|
}
|
|
3519
3519
|
sortBone(e) {
|
|
3520
3520
|
if (!e || e.sorted) return;
|
|
@@ -3548,7 +3548,7 @@ var rt = class e {
|
|
|
3548
3548
|
if (!r) throw Error("Root bone must not be null.");
|
|
3549
3549
|
let i = t.a, a = t.b, o = t.c, s = t.d;
|
|
3550
3550
|
r.worldX = i * this.x + a * this.y + t.worldX, r.worldY = o * this.x + s * this.y + t.worldY;
|
|
3551
|
-
let c = (r.rotation + r.shearX) *
|
|
3551
|
+
let c = (r.rotation + r.shearX) * F.degRad, l = (r.rotation + 90 + r.shearY) * F.degRad, u = Math.cos(c) * r.scaleX, d = Math.cos(l) * r.scaleY, f = Math.sin(c) * r.scaleX, p = Math.sin(l) * r.scaleY;
|
|
3552
3552
|
r.a = (i * u + a * f) * this.scaleX, r.b = (i * d + a * p) * this.scaleX, r.c = (o * u + s * f) * this.scaleY, r.d = (o * d + s * p) * this.scaleY;
|
|
3553
3553
|
let m = this._updateCache;
|
|
3554
3554
|
for (let t = 0, n = m.length; t < n; t++) {
|
|
@@ -3568,7 +3568,7 @@ var rt = class e {
|
|
|
3568
3568
|
}
|
|
3569
3569
|
setSlotsToSetupPose() {
|
|
3570
3570
|
let e = this.slots;
|
|
3571
|
-
|
|
3571
|
+
I.arrayCopy(e, 0, this.drawOrder, 0, e.length);
|
|
3572
3572
|
for (let t = 0, n = e.length; t < n; t++) e[t].setToSetupPose();
|
|
3573
3573
|
}
|
|
3574
3574
|
getRootBone() {
|
|
@@ -3657,7 +3657,7 @@ var rt = class e {
|
|
|
3657
3657
|
return this.physicsConstraints.find((t) => t.data.name == e) ?? null;
|
|
3658
3658
|
}
|
|
3659
3659
|
getBoundsRect(e) {
|
|
3660
|
-
let t = new
|
|
3660
|
+
let t = new R(), n = new R();
|
|
3661
3661
|
return this.getBounds(t, n, void 0, e), {
|
|
3662
3662
|
x: t.x,
|
|
3663
3663
|
y: t.y,
|
|
@@ -3673,11 +3673,11 @@ var rt = class e {
|
|
|
3673
3673
|
let n = a[t];
|
|
3674
3674
|
if (!n.bone.active) continue;
|
|
3675
3675
|
let u = 0, d = null, f = null, p = n.getAttachment();
|
|
3676
|
-
if (p instanceof
|
|
3677
|
-
else if (p instanceof
|
|
3676
|
+
if (p instanceof it) u = 8, d = I.setArraySize(r, u, 0), p.computeWorldVertices(n, d, 0, 2), f = e.quadTriangles;
|
|
3677
|
+
else if (p instanceof tt) {
|
|
3678
3678
|
let e = p;
|
|
3679
|
-
u = e.worldVerticesLength, d =
|
|
3680
|
-
} else if (p instanceof
|
|
3679
|
+
u = e.worldVerticesLength, d = I.setArraySize(r, u, 0), e.computeWorldVertices(n, 0, u, d, 0, 2), f = e.triangles;
|
|
3680
|
+
} else if (p instanceof qe && i != null) {
|
|
3681
3681
|
i.clipStart(n, p);
|
|
3682
3682
|
continue;
|
|
3683
3683
|
}
|
|
@@ -3703,13 +3703,13 @@ var rt = class e {
|
|
|
3703
3703
|
let r = this.physicsConstraints;
|
|
3704
3704
|
for (let i = 0, a = r.length; i < a; i++) r[i].rotate(e, t, n);
|
|
3705
3705
|
}
|
|
3706
|
-
},
|
|
3706
|
+
}, xt;
|
|
3707
3707
|
(function(e) {
|
|
3708
3708
|
e[e.none = 0] = "none", e[e.reset = 1] = "reset", e[e.update = 2] = "update", e[e.pose = 3] = "pose";
|
|
3709
|
-
})(
|
|
3709
|
+
})(xt ||= {});
|
|
3710
3710
|
//#endregion
|
|
3711
3711
|
//#region ../../node_modules/.pnpm/@esotericsoftware+spine-core@4.2.84/node_modules/@esotericsoftware/spine-core/dist/PhysicsConstraintData.js
|
|
3712
|
-
var
|
|
3712
|
+
var St = class extends ct {
|
|
3713
3713
|
_bone = null;
|
|
3714
3714
|
set bone(e) {
|
|
3715
3715
|
this._bone = e;
|
|
@@ -3742,7 +3742,7 @@ var lt = class extends Xe {
|
|
|
3742
3742
|
constructor(e) {
|
|
3743
3743
|
super(e, 0, !1);
|
|
3744
3744
|
}
|
|
3745
|
-
},
|
|
3745
|
+
}, Ct = class {
|
|
3746
3746
|
name = null;
|
|
3747
3747
|
bones = [];
|
|
3748
3748
|
slots = [];
|
|
@@ -3845,19 +3845,19 @@ var lt = class extends Xe {
|
|
|
3845
3845
|
}
|
|
3846
3846
|
return null;
|
|
3847
3847
|
}
|
|
3848
|
-
},
|
|
3848
|
+
}, wt = class {
|
|
3849
3849
|
slotIndex;
|
|
3850
3850
|
name;
|
|
3851
3851
|
attachment;
|
|
3852
3852
|
constructor(e = 0, t, n) {
|
|
3853
3853
|
this.slotIndex = e, this.name = t, this.attachment = n;
|
|
3854
3854
|
}
|
|
3855
|
-
},
|
|
3855
|
+
}, Tt = class {
|
|
3856
3856
|
name;
|
|
3857
3857
|
attachments = [];
|
|
3858
3858
|
bones = [];
|
|
3859
3859
|
constraints = [];
|
|
3860
|
-
color = new
|
|
3860
|
+
color = new P(.99607843, .61960787, .30980393, 1);
|
|
3861
3861
|
constructor(e) {
|
|
3862
3862
|
if (!e) throw Error("name cannot be null.");
|
|
3863
3863
|
this.name = e;
|
|
@@ -3910,7 +3910,7 @@ var lt = class extends Xe {
|
|
|
3910
3910
|
let t = e.getAttachments();
|
|
3911
3911
|
for (let e = 0; e < t.length; e++) {
|
|
3912
3912
|
var n = t[e];
|
|
3913
|
-
n.attachment && (n.attachment instanceof
|
|
3913
|
+
n.attachment && (n.attachment instanceof tt ? (n.attachment = n.attachment.newLinkedMesh(), this.setAttachment(n.slotIndex, n.name, n.attachment)) : (n.attachment = n.attachment.copy(), this.setAttachment(n.slotIndex, n.name, n.attachment)));
|
|
3914
3914
|
}
|
|
3915
3915
|
}
|
|
3916
3916
|
getAttachment(e, t) {
|
|
@@ -3927,7 +3927,7 @@ var lt = class extends Xe {
|
|
|
3927
3927
|
let n = this.attachments[t];
|
|
3928
3928
|
if (n) for (let r in n) {
|
|
3929
3929
|
let i = n[r];
|
|
3930
|
-
i && e.push(new
|
|
3930
|
+
i && e.push(new wt(t, r, i));
|
|
3931
3931
|
}
|
|
3932
3932
|
}
|
|
3933
3933
|
return e;
|
|
@@ -3936,7 +3936,7 @@ var lt = class extends Xe {
|
|
|
3936
3936
|
let n = this.attachments[e];
|
|
3937
3937
|
if (n) for (let r in n) {
|
|
3938
3938
|
let i = n[r];
|
|
3939
|
-
i && t.push(new
|
|
3939
|
+
i && t.push(new wt(e, r, i));
|
|
3940
3940
|
}
|
|
3941
3941
|
}
|
|
3942
3942
|
clear() {
|
|
@@ -3957,14 +3957,14 @@ var lt = class extends Xe {
|
|
|
3957
3957
|
n++;
|
|
3958
3958
|
}
|
|
3959
3959
|
}
|
|
3960
|
-
},
|
|
3960
|
+
}, Et = class {
|
|
3961
3961
|
index = 0;
|
|
3962
3962
|
name;
|
|
3963
3963
|
boneData;
|
|
3964
|
-
color = new
|
|
3964
|
+
color = new P(1, 1, 1, 1);
|
|
3965
3965
|
darkColor = null;
|
|
3966
3966
|
attachmentName = null;
|
|
3967
|
-
blendMode =
|
|
3967
|
+
blendMode = Dt.Normal;
|
|
3968
3968
|
visible = !0;
|
|
3969
3969
|
constructor(e, t, n) {
|
|
3970
3970
|
if (e < 0) throw Error("index must be >= 0.");
|
|
@@ -3972,13 +3972,13 @@ var lt = class extends Xe {
|
|
|
3972
3972
|
if (!n) throw Error("boneData cannot be null.");
|
|
3973
3973
|
this.index = e, this.name = t, this.boneData = n;
|
|
3974
3974
|
}
|
|
3975
|
-
},
|
|
3975
|
+
}, Dt;
|
|
3976
3976
|
(function(e) {
|
|
3977
3977
|
e[e.Normal = 0] = "Normal", e[e.Additive = 1] = "Additive", e[e.Multiply = 2] = "Multiply", e[e.Screen = 3] = "Screen";
|
|
3978
|
-
})(
|
|
3978
|
+
})(Dt ||= {});
|
|
3979
3979
|
//#endregion
|
|
3980
3980
|
//#region ../../node_modules/.pnpm/@esotericsoftware+spine-core@4.2.84/node_modules/@esotericsoftware/spine-core/dist/TransformConstraintData.js
|
|
3981
|
-
var
|
|
3981
|
+
var Ot = class extends ct {
|
|
3982
3982
|
bones = [];
|
|
3983
3983
|
_target = null;
|
|
3984
3984
|
set target(e) {
|
|
@@ -4005,7 +4005,7 @@ var ht = class extends Xe {
|
|
|
4005
4005
|
constructor(e) {
|
|
4006
4006
|
super(e, 0, !1);
|
|
4007
4007
|
}
|
|
4008
|
-
},
|
|
4008
|
+
}, kt = class {
|
|
4009
4009
|
scale = 1;
|
|
4010
4010
|
attachmentLoader;
|
|
4011
4011
|
linkedMeshes = [];
|
|
@@ -4013,9 +4013,9 @@ var ht = class extends Xe {
|
|
|
4013
4013
|
this.attachmentLoader = e;
|
|
4014
4014
|
}
|
|
4015
4015
|
readSkeletonData(e) {
|
|
4016
|
-
let t = this.scale, n = new
|
|
4016
|
+
let t = this.scale, n = new Ct();
|
|
4017
4017
|
n.name = "";
|
|
4018
|
-
let r = new
|
|
4018
|
+
let r = new At(e), i = r.readInt32(), a = r.readInt32();
|
|
4019
4019
|
n.hash = a == 0 && i == 0 ? null : a.toString(16) + i.toString(16), n.version = r.readString(), n.x = r.readFloat(), n.y = r.readFloat(), n.width = r.readFloat(), n.height = r.readFloat(), n.referenceScale = r.readFloat() * t;
|
|
4020
4020
|
let o = r.readBoolean();
|
|
4021
4021
|
o && (n.fps = r.readFloat(), n.imagesPath = r.readString(), n.audioPath = r.readString());
|
|
@@ -4030,23 +4030,23 @@ var ht = class extends Xe {
|
|
|
4030
4030
|
for (let e = 0; e < s; e++) {
|
|
4031
4031
|
let i = r.readString();
|
|
4032
4032
|
if (!i) throw Error("Bone name must not be null.");
|
|
4033
|
-
let a = e == 0 ? null : n.bones[r.readInt(!0)], s = new
|
|
4034
|
-
s.rotation = r.readFloat(), s.x = r.readFloat() * t, s.y = r.readFloat() * t, s.scaleX = r.readFloat(), s.scaleY = r.readFloat(), s.shearX = r.readFloat(), s.shearY = r.readFloat(), s.length = r.readFloat() * t, s.inherit = r.readByte(), s.skinRequired = r.readBoolean(), o && (
|
|
4033
|
+
let a = e == 0 ? null : n.bones[r.readInt(!0)], s = new ot(e, i, a);
|
|
4034
|
+
s.rotation = r.readFloat(), s.x = r.readFloat() * t, s.y = r.readFloat() * t, s.scaleX = r.readFloat(), s.scaleY = r.readFloat(), s.shearX = r.readFloat(), s.shearY = r.readFloat(), s.length = r.readFloat() * t, s.inherit = r.readByte(), s.skinRequired = r.readBoolean(), o && (P.rgba8888ToColor(s.color, r.readInt32()), s.icon = r.readString() ?? void 0, s.visible = r.readBoolean()), n.bones.push(s);
|
|
4035
4035
|
}
|
|
4036
4036
|
s = r.readInt(!0);
|
|
4037
4037
|
for (let e = 0; e < s; e++) {
|
|
4038
4038
|
let t = r.readString();
|
|
4039
4039
|
if (!t) throw Error("Slot name must not be null.");
|
|
4040
|
-
let i = n.bones[r.readInt(!0)], a = new
|
|
4041
|
-
|
|
4040
|
+
let i = n.bones[r.readInt(!0)], a = new Et(e, t, i);
|
|
4041
|
+
P.rgba8888ToColor(a.color, r.readInt32());
|
|
4042
4042
|
let s = r.readInt32();
|
|
4043
|
-
s != -1 &&
|
|
4043
|
+
s != -1 && P.rgb888ToColor(a.darkColor = new P(), s), a.attachmentName = r.readStringRef(), a.blendMode = r.readInt(!0), o && (a.visible = r.readBoolean()), n.slots.push(a);
|
|
4044
4044
|
}
|
|
4045
4045
|
s = r.readInt(!0);
|
|
4046
4046
|
for (let e = 0, i; e < s; e++) {
|
|
4047
4047
|
let e = r.readString();
|
|
4048
4048
|
if (!e) throw Error("IK constraint data name must not be null.");
|
|
4049
|
-
let a = new
|
|
4049
|
+
let a = new ft(e);
|
|
4050
4050
|
a.order = r.readInt(!0), i = r.readInt(!0);
|
|
4051
4051
|
for (let e = 0; e < i; e++) a.bones.push(n.bones[r.readInt(!0)]);
|
|
4052
4052
|
a.target = n.bones[r.readInt(!0)];
|
|
@@ -4057,7 +4057,7 @@ var ht = class extends Xe {
|
|
|
4057
4057
|
for (let e = 0, i; e < s; e++) {
|
|
4058
4058
|
let e = r.readString();
|
|
4059
4059
|
if (!e) throw Error("Transform constraint data name must not be null.");
|
|
4060
|
-
let a = new
|
|
4060
|
+
let a = new Ot(e);
|
|
4061
4061
|
a.order = r.readInt(!0), i = r.readInt(!0);
|
|
4062
4062
|
for (let e = 0; e < i; e++) a.bones.push(n.bones[r.readInt(!0)]);
|
|
4063
4063
|
a.target = n.bones[r.readInt(!0)];
|
|
@@ -4068,18 +4068,18 @@ var ht = class extends Xe {
|
|
|
4068
4068
|
for (let e = 0, i; e < s; e++) {
|
|
4069
4069
|
let e = r.readString();
|
|
4070
4070
|
if (!e) throw Error("Path constraint data name must not be null.");
|
|
4071
|
-
let a = new
|
|
4071
|
+
let a = new pt(e);
|
|
4072
4072
|
a.order = r.readInt(!0), a.skinRequired = r.readBoolean(), i = r.readInt(!0);
|
|
4073
4073
|
for (let e = 0; e < i; e++) a.bones.push(n.bones[r.readInt(!0)]);
|
|
4074
4074
|
a.target = n.slots[r.readInt(!0)];
|
|
4075
4075
|
let o = r.readByte();
|
|
4076
|
-
a.positionMode = o & 1, a.spacingMode = o >> 1 & 3, a.rotateMode = o >> 3 & 3, o & 128 && (a.offsetRotation = r.readFloat()), a.position = r.readFloat(), a.positionMode ==
|
|
4076
|
+
a.positionMode = o & 1, a.spacingMode = o >> 1 & 3, a.rotateMode = o >> 3 & 3, o & 128 && (a.offsetRotation = r.readFloat()), a.position = r.readFloat(), a.positionMode == mt.Fixed && (a.position *= t), a.spacing = r.readFloat(), (a.spacingMode == Y.Length || a.spacingMode == Y.Fixed) && (a.spacing *= t), a.mixRotate = r.readFloat(), a.mixX = r.readFloat(), a.mixY = r.readFloat(), n.pathConstraints.push(a);
|
|
4077
4077
|
}
|
|
4078
4078
|
s = r.readInt(!0);
|
|
4079
4079
|
for (let e = 0; e < s; e++) {
|
|
4080
4080
|
let e = r.readString();
|
|
4081
4081
|
if (!e) throw Error("Physics constraint data name must not be null.");
|
|
4082
|
-
let i = new
|
|
4082
|
+
let i = new St(e);
|
|
4083
4083
|
i.order = r.readInt(!0), i.bone = n.bones[r.readInt(!0)];
|
|
4084
4084
|
let a = r.readByte();
|
|
4085
4085
|
i.skinRequired = (a & 1) != 0, a & 2 && (i.x = r.readFloat()), a & 4 && (i.y = r.readFloat()), a & 8 && (i.rotate = r.readFloat()), a & 16 && (i.scaleX = r.readFloat()), a & 32 && (i.shearX = r.readFloat()), i.limit = (a & 64 ? r.readFloat() : 5e3) * t, i.step = 1 / r.readUnsignedByte(), i.inertia = r.readFloat(), i.strength = r.readFloat(), i.damping = r.readFloat(), i.massInverse = a & 128 ? r.readFloat() : 1, i.wind = r.readFloat(), i.gravity = r.readFloat(), a = r.readByte(), a & 1 && (i.inertiaGlobal = !0), a & 2 && (i.strengthGlobal = !0), a & 4 && (i.dampingGlobal = !0), a & 8 && (i.massGlobal = !0), a & 16 && (i.windGlobal = !0), a & 32 && (i.gravityGlobal = !0), a & 64 && (i.mixGlobal = !0), i.mix = a & 128 ? r.readFloat() : 1, n.physicsConstraints.push(i);
|
|
@@ -4088,7 +4088,7 @@ var ht = class extends Xe {
|
|
|
4088
4088
|
c && (n.defaultSkin = c, n.skins.push(c));
|
|
4089
4089
|
{
|
|
4090
4090
|
let e = n.skins.length;
|
|
4091
|
-
for (
|
|
4091
|
+
for (I.setArraySize(n.skins, s = e + r.readInt(!0)); e < s; e++) {
|
|
4092
4092
|
let t = this.readSkin(r, n, !1, o);
|
|
4093
4093
|
if (!t) throw Error("readSkin() should not have returned null.");
|
|
4094
4094
|
n.skins[e] = t;
|
|
@@ -4106,7 +4106,7 @@ var ht = class extends Xe {
|
|
|
4106
4106
|
for (let e = 0; e < s; e++) {
|
|
4107
4107
|
let e = r.readString();
|
|
4108
4108
|
if (!e) throw Error("Event data name must not be null");
|
|
4109
|
-
let t = new
|
|
4109
|
+
let t = new ut(e);
|
|
4110
4110
|
t.intValue = r.readInt(!1), t.floatValue = r.readFloat(), t.stringValue = r.readString(), t.audioPath = r.readString(), t.audioPath && (t.volume = r.readFloat(), t.balance = r.readFloat()), n.events.push(t);
|
|
4111
4111
|
}
|
|
4112
4112
|
s = r.readInt(!0);
|
|
@@ -4121,11 +4121,11 @@ var ht = class extends Xe {
|
|
|
4121
4121
|
let i = null, a = 0;
|
|
4122
4122
|
if (n) {
|
|
4123
4123
|
if (a = e.readInt(!0), a == 0) return null;
|
|
4124
|
-
i = new
|
|
4124
|
+
i = new Tt("default");
|
|
4125
4125
|
} else {
|
|
4126
4126
|
let n = e.readString();
|
|
4127
4127
|
if (!n) throw Error("Skin name must not be null.");
|
|
4128
|
-
i = new
|
|
4128
|
+
i = new Tt(n), r && P.rgba8888ToColor(i.color, e.readInt32()), i.bones.length = e.readInt(!0);
|
|
4129
4129
|
for (let n = 0, r = i.bones.length; n < r; n++) i.bones[n] = t.bones[e.readInt(!0)];
|
|
4130
4130
|
for (let n = 0, r = e.readInt(!0); n < r; n++) i.constraints.push(t.ikConstraints[e.readInt(!0)]);
|
|
4131
4131
|
for (let n = 0, r = e.readInt(!0); n < r; n++) i.constraints.push(t.transformConstraints[e.readInt(!0)]);
|
|
@@ -4148,53 +4148,53 @@ var ht = class extends Xe {
|
|
|
4148
4148
|
let o = this.scale, s = e.readByte(), c = s & 8 ? e.readStringRef() : i;
|
|
4149
4149
|
if (!c) throw Error("Attachment name must not be null");
|
|
4150
4150
|
switch (s & 7) {
|
|
4151
|
-
case
|
|
4151
|
+
case Nt.Region: {
|
|
4152
4152
|
let t = s & 16 ? e.readStringRef() : null, r = s & 32 ? e.readInt32() : 4294967295, i = s & 64 ? this.readSequence(e) : null, a = s & 128 ? e.readFloat() : 0, l = e.readFloat(), u = e.readFloat(), d = e.readFloat(), f = e.readFloat(), p = e.readFloat(), m = e.readFloat();
|
|
4153
4153
|
t ||= c;
|
|
4154
4154
|
let h = this.attachmentLoader.newRegionAttachment(n, c, t, i);
|
|
4155
|
-
return h ? (h.path = t, h.x = l * o, h.y = u * o, h.scaleX = d, h.scaleY = f, h.rotation = a, h.width = p * o, h.height = m * o,
|
|
4155
|
+
return h ? (h.path = t, h.x = l * o, h.y = u * o, h.scaleX = d, h.scaleY = f, h.rotation = a, h.width = p * o, h.height = m * o, P.rgba8888ToColor(h.color, r), h.sequence = i, i ?? h.updateRegion(), h) : null;
|
|
4156
4156
|
}
|
|
4157
|
-
case
|
|
4157
|
+
case Nt.BoundingBox: {
|
|
4158
4158
|
let t = this.readVertices(e, (s & 16) != 0), r = a ? e.readInt32() : 0, i = this.attachmentLoader.newBoundingBoxAttachment(n, c);
|
|
4159
|
-
return i ? (i.worldVerticesLength = t.length, i.vertices = t.vertices, i.bones = t.bones, a &&
|
|
4159
|
+
return i ? (i.worldVerticesLength = t.length, i.vertices = t.vertices, i.bones = t.bones, a && P.rgba8888ToColor(i.color, r), i) : null;
|
|
4160
4160
|
}
|
|
4161
|
-
case
|
|
4161
|
+
case Nt.Mesh: {
|
|
4162
4162
|
let t = s & 16 ? e.readStringRef() : c, r = s & 32 ? e.readInt32() : 4294967295, i = s & 64 ? this.readSequence(e) : null, l = e.readInt(!0), u = this.readVertices(e, (s & 128) != 0), d = this.readFloatArray(e, u.length, 1), f = this.readShortArray(e, (u.length - l - 2) * 3), p = [], m = 0, h = 0;
|
|
4163
4163
|
a && (p = this.readShortArray(e, e.readInt(!0)), m = e.readFloat(), h = e.readFloat()), t ||= c;
|
|
4164
4164
|
let g = this.attachmentLoader.newMeshAttachment(n, c, t, i);
|
|
4165
|
-
return g ? (g.path = t,
|
|
4165
|
+
return g ? (g.path = t, P.rgba8888ToColor(g.color, r), g.bones = u.bones, g.vertices = u.vertices, g.worldVerticesLength = u.length, g.triangles = f, g.regionUVs = d, i ?? g.updateRegion(), g.hullLength = l << 1, g.sequence = i, a && (g.edges = p, g.width = m * o, g.height = h * o), g) : null;
|
|
4166
4166
|
}
|
|
4167
|
-
case
|
|
4167
|
+
case Nt.LinkedMesh: {
|
|
4168
4168
|
let t = s & 16 ? e.readStringRef() : c;
|
|
4169
4169
|
if (t == null) throw Error("Path of linked mesh must not be null");
|
|
4170
4170
|
let i = s & 32 ? e.readInt32() : 4294967295, l = s & 64 ? this.readSequence(e) : null, u = (s & 128) != 0, d = e.readInt(!0), f = e.readStringRef(), p = 0, m = 0;
|
|
4171
4171
|
a && (p = e.readFloat(), m = e.readFloat());
|
|
4172
4172
|
let h = this.attachmentLoader.newMeshAttachment(n, c, t, l);
|
|
4173
|
-
return h ? (h.path = t,
|
|
4173
|
+
return h ? (h.path = t, P.rgba8888ToColor(h.color, i), h.sequence = l, a && (h.width = p * o, h.height = m * o), this.linkedMeshes.push(new jt(h, d, r, f, u)), h) : null;
|
|
4174
4174
|
}
|
|
4175
|
-
case
|
|
4176
|
-
let t = (s & 16) != 0, r = (s & 32) != 0, i = this.readVertices(e, (s & 64) != 0), l =
|
|
4175
|
+
case Nt.Path: {
|
|
4176
|
+
let t = (s & 16) != 0, r = (s & 32) != 0, i = this.readVertices(e, (s & 64) != 0), l = I.newArray(i.length / 6, 0);
|
|
4177
4177
|
for (let t = 0, n = l.length; t < n; t++) l[t] = e.readFloat() * o;
|
|
4178
4178
|
let u = a ? e.readInt32() : 0, d = this.attachmentLoader.newPathAttachment(n, c);
|
|
4179
|
-
return d ? (d.closed = t, d.constantSpeed = r, d.worldVerticesLength = i.length, d.vertices = i.vertices, d.bones = i.bones, d.lengths = l, a &&
|
|
4179
|
+
return d ? (d.closed = t, d.constantSpeed = r, d.worldVerticesLength = i.length, d.vertices = i.vertices, d.bones = i.bones, d.lengths = l, a && P.rgba8888ToColor(d.color, u), d) : null;
|
|
4180
4180
|
}
|
|
4181
|
-
case
|
|
4181
|
+
case Nt.Point: {
|
|
4182
4182
|
let t = e.readFloat(), r = e.readFloat(), i = e.readFloat(), s = a ? e.readInt32() : 0, l = this.attachmentLoader.newPointAttachment(n, c);
|
|
4183
|
-
return l ? (l.x = r * o, l.y = i * o, l.rotation = t, a &&
|
|
4183
|
+
return l ? (l.x = r * o, l.y = i * o, l.rotation = t, a && P.rgba8888ToColor(l.color, s), l) : null;
|
|
4184
4184
|
}
|
|
4185
|
-
case
|
|
4185
|
+
case Nt.Clipping: {
|
|
4186
4186
|
let r = e.readInt(!0), i = this.readVertices(e, (s & 16) != 0), o = a ? e.readInt32() : 0, l = this.attachmentLoader.newClippingAttachment(n, c);
|
|
4187
|
-
return l ? (l.endSlot = t.slots[r], l.worldVerticesLength = i.length, l.vertices = i.vertices, l.bones = i.bones, a &&
|
|
4187
|
+
return l ? (l.endSlot = t.slots[r], l.worldVerticesLength = i.length, l.vertices = i.vertices, l.bones = i.bones, a && P.rgba8888ToColor(l.color, o), l) : null;
|
|
4188
4188
|
}
|
|
4189
4189
|
}
|
|
4190
4190
|
return null;
|
|
4191
4191
|
}
|
|
4192
4192
|
readSequence(e) {
|
|
4193
|
-
let t = new
|
|
4193
|
+
let t = new te(e.readInt(!0));
|
|
4194
4194
|
return t.start = e.readInt(!0), t.digits = e.readInt(!0), t.setupIndex = e.readInt(!0), t;
|
|
4195
4195
|
}
|
|
4196
4196
|
readVertices(e, t) {
|
|
4197
|
-
let n = this.scale, r = e.readInt(!0), i = new
|
|
4197
|
+
let n = this.scale, r = e.readInt(!0), i = new Mt();
|
|
4198
4198
|
if (i.length = r << 1, !t) return i.vertices = this.readFloatArray(e, i.length, n), i;
|
|
4199
4199
|
let a = [], o = [];
|
|
4200
4200
|
for (let t = 0; t < r; t++) {
|
|
@@ -4202,7 +4202,7 @@ var ht = class extends Xe {
|
|
|
4202
4202
|
o.push(t);
|
|
4203
4203
|
for (let r = 0; r < t; r++) o.push(e.readInt(!0)), a.push(e.readFloat() * n), a.push(e.readFloat() * n), a.push(e.readFloat());
|
|
4204
4204
|
}
|
|
4205
|
-
return i.vertices =
|
|
4205
|
+
return i.vertices = I.toFloatArray(a), i.bones = o, i;
|
|
4206
4206
|
}
|
|
4207
4207
|
readFloatArray(e, t, n) {
|
|
4208
4208
|
let r = Array(t);
|
|
@@ -4223,81 +4223,81 @@ var ht = class extends Xe {
|
|
|
4223
4223
|
for (let n = 0, i = e.readInt(!0); n < i; n++) {
|
|
4224
4224
|
let n = e.readByte(), i = e.readInt(!0), a = i - 1;
|
|
4225
4225
|
switch (n) {
|
|
4226
|
-
case
|
|
4227
|
-
let n = new
|
|
4226
|
+
case Kt: {
|
|
4227
|
+
let n = new Ce(i, t);
|
|
4228
4228
|
for (let t = 0; t < i; t++) n.setFrame(t, e.readFloat(), e.readStringRef());
|
|
4229
4229
|
r.push(n);
|
|
4230
4230
|
break;
|
|
4231
4231
|
}
|
|
4232
|
-
case
|
|
4233
|
-
let n = new
|
|
4232
|
+
case qt: {
|
|
4233
|
+
let n = new ve(i, e.readInt(!0), t), o = e.readFloat(), s = e.readUnsignedByte() / 255, c = e.readUnsignedByte() / 255, l = e.readUnsignedByte() / 255, u = e.readUnsignedByte() / 255;
|
|
4234
4234
|
for (let t = 0, r = 0; n.setFrame(t, o, s, c, l, u), t != a; t++) {
|
|
4235
4235
|
let i = e.readFloat(), a = e.readUnsignedByte() / 255, d = e.readUnsignedByte() / 255, f = e.readUnsignedByte() / 255, p = e.readUnsignedByte() / 255;
|
|
4236
4236
|
switch (e.readByte()) {
|
|
4237
|
-
case
|
|
4237
|
+
case fn:
|
|
4238
4238
|
n.setStepped(t);
|
|
4239
4239
|
break;
|
|
4240
|
-
case
|
|
4240
|
+
case pn: Z(e, n, r++, t, 0, o, i, s, a, 1), Z(e, n, r++, t, 1, o, i, c, d, 1), Z(e, n, r++, t, 2, o, i, l, f, 1), Z(e, n, r++, t, 3, o, i, u, p, 1);
|
|
4241
4241
|
}
|
|
4242
4242
|
o = i, s = a, c = d, l = f, u = p;
|
|
4243
4243
|
}
|
|
4244
4244
|
r.push(n);
|
|
4245
4245
|
break;
|
|
4246
4246
|
}
|
|
4247
|
-
case
|
|
4248
|
-
let n = new
|
|
4247
|
+
case Jt: {
|
|
4248
|
+
let n = new ye(i, e.readInt(!0), t), o = e.readFloat(), s = e.readUnsignedByte() / 255, c = e.readUnsignedByte() / 255, l = e.readUnsignedByte() / 255;
|
|
4249
4249
|
for (let t = 0, r = 0; n.setFrame(t, o, s, c, l), t != a; t++) {
|
|
4250
4250
|
let i = e.readFloat(), a = e.readUnsignedByte() / 255, u = e.readUnsignedByte() / 255, d = e.readUnsignedByte() / 255;
|
|
4251
4251
|
switch (e.readByte()) {
|
|
4252
|
-
case
|
|
4252
|
+
case fn:
|
|
4253
4253
|
n.setStepped(t);
|
|
4254
4254
|
break;
|
|
4255
|
-
case
|
|
4255
|
+
case pn: Z(e, n, r++, t, 0, o, i, s, a, 1), Z(e, n, r++, t, 1, o, i, c, u, 1), Z(e, n, r++, t, 2, o, i, l, d, 1);
|
|
4256
4256
|
}
|
|
4257
4257
|
o = i, s = a, c = u, l = d;
|
|
4258
4258
|
}
|
|
4259
4259
|
r.push(n);
|
|
4260
4260
|
break;
|
|
4261
4261
|
}
|
|
4262
|
-
case
|
|
4263
|
-
let n = new
|
|
4262
|
+
case Yt: {
|
|
4263
|
+
let n = new xe(i, e.readInt(!0), t), o = e.readFloat(), s = e.readUnsignedByte() / 255, c = e.readUnsignedByte() / 255, l = e.readUnsignedByte() / 255, u = e.readUnsignedByte() / 255, d = e.readUnsignedByte() / 255, f = e.readUnsignedByte() / 255, p = e.readUnsignedByte() / 255;
|
|
4264
4264
|
for (let t = 0, r = 0; n.setFrame(t, o, s, c, l, u, d, f, p), t != a; t++) {
|
|
4265
4265
|
let i = e.readFloat(), a = e.readUnsignedByte() / 255, m = e.readUnsignedByte() / 255, h = e.readUnsignedByte() / 255, g = e.readUnsignedByte() / 255, _ = e.readUnsignedByte() / 255, v = e.readUnsignedByte() / 255, y = e.readUnsignedByte() / 255;
|
|
4266
4266
|
switch (e.readByte()) {
|
|
4267
|
-
case
|
|
4267
|
+
case fn:
|
|
4268
4268
|
n.setStepped(t);
|
|
4269
4269
|
break;
|
|
4270
|
-
case
|
|
4270
|
+
case pn: Z(e, n, r++, t, 0, o, i, s, a, 1), Z(e, n, r++, t, 1, o, i, c, m, 1), Z(e, n, r++, t, 2, o, i, l, h, 1), Z(e, n, r++, t, 3, o, i, u, g, 1), Z(e, n, r++, t, 4, o, i, d, _, 1), Z(e, n, r++, t, 5, o, i, f, v, 1), Z(e, n, r++, t, 6, o, i, p, y, 1);
|
|
4271
4271
|
}
|
|
4272
4272
|
o = i, s = a, c = m, l = h, u = g, d = _, f = v, p = y;
|
|
4273
4273
|
}
|
|
4274
4274
|
r.push(n);
|
|
4275
4275
|
break;
|
|
4276
4276
|
}
|
|
4277
|
-
case
|
|
4278
|
-
let n = new
|
|
4277
|
+
case Xt: {
|
|
4278
|
+
let n = new Se(i, e.readInt(!0), t), o = e.readFloat(), s = e.readUnsignedByte() / 255, c = e.readUnsignedByte() / 255, l = e.readUnsignedByte() / 255, u = e.readUnsignedByte() / 255, d = e.readUnsignedByte() / 255, f = e.readUnsignedByte() / 255;
|
|
4279
4279
|
for (let t = 0, r = 0; n.setFrame(t, o, s, c, l, u, d, f), t != a; t++) {
|
|
4280
4280
|
let i = e.readFloat(), a = e.readUnsignedByte() / 255, p = e.readUnsignedByte() / 255, m = e.readUnsignedByte() / 255, h = e.readUnsignedByte() / 255, g = e.readUnsignedByte() / 255, _ = e.readUnsignedByte() / 255;
|
|
4281
4281
|
switch (e.readByte()) {
|
|
4282
|
-
case
|
|
4282
|
+
case fn:
|
|
4283
4283
|
n.setStepped(t);
|
|
4284
4284
|
break;
|
|
4285
|
-
case
|
|
4285
|
+
case pn: Z(e, n, r++, t, 0, o, i, s, a, 1), Z(e, n, r++, t, 1, o, i, c, p, 1), Z(e, n, r++, t, 2, o, i, l, m, 1), Z(e, n, r++, t, 3, o, i, u, h, 1), Z(e, n, r++, t, 4, o, i, d, g, 1), Z(e, n, r++, t, 5, o, i, f, _, 1);
|
|
4286
4286
|
}
|
|
4287
4287
|
o = i, s = a, c = p, l = m, u = h, d = g, f = _;
|
|
4288
4288
|
}
|
|
4289
4289
|
r.push(n);
|
|
4290
4290
|
break;
|
|
4291
4291
|
}
|
|
4292
|
-
case
|
|
4293
|
-
let n = new
|
|
4292
|
+
case Zt: {
|
|
4293
|
+
let n = new be(i, e.readInt(!0), t), o = e.readFloat(), s = e.readUnsignedByte() / 255;
|
|
4294
4294
|
for (let t = 0, r = 0; n.setFrame(t, o, s), t != a; t++) {
|
|
4295
4295
|
let i = e.readFloat(), a = e.readUnsignedByte() / 255;
|
|
4296
4296
|
switch (e.readByte()) {
|
|
4297
|
-
case
|
|
4297
|
+
case fn:
|
|
4298
4298
|
n.setStepped(t);
|
|
4299
4299
|
break;
|
|
4300
|
-
case
|
|
4300
|
+
case pn: Z(e, n, r++, t, 0, o, i, s, a, 1);
|
|
4301
4301
|
}
|
|
4302
4302
|
o = i, s = a;
|
|
4303
4303
|
}
|
|
@@ -4310,63 +4310,63 @@ var ht = class extends Xe {
|
|
|
4310
4310
|
let t = e.readInt(!0);
|
|
4311
4311
|
for (let n = 0, a = e.readInt(!0); n < a; n++) {
|
|
4312
4312
|
let n = e.readByte(), a = e.readInt(!0);
|
|
4313
|
-
if (n ==
|
|
4314
|
-
let n = new
|
|
4313
|
+
if (n == Gt) {
|
|
4314
|
+
let n = new _e(a, t);
|
|
4315
4315
|
for (let t = 0; t < a; t++) n.setFrame(t, e.readFloat(), e.readByte());
|
|
4316
4316
|
r.push(n);
|
|
4317
4317
|
continue;
|
|
4318
4318
|
}
|
|
4319
4319
|
let o = e.readInt(!0);
|
|
4320
4320
|
switch (n) {
|
|
4321
|
-
case
|
|
4322
|
-
r.push(
|
|
4321
|
+
case Ft:
|
|
4322
|
+
r.push(X(e, new se(a, o, t), 1));
|
|
4323
4323
|
break;
|
|
4324
|
-
case
|
|
4325
|
-
r.push(
|
|
4324
|
+
case It:
|
|
4325
|
+
r.push(Pt(e, new ce(a, o, t), i));
|
|
4326
4326
|
break;
|
|
4327
|
-
case
|
|
4328
|
-
r.push(
|
|
4327
|
+
case Lt:
|
|
4328
|
+
r.push(X(e, new le(a, o, t), i));
|
|
4329
4329
|
break;
|
|
4330
|
-
case
|
|
4331
|
-
r.push(
|
|
4330
|
+
case Rt:
|
|
4331
|
+
r.push(X(e, new ue(a, o, t), i));
|
|
4332
4332
|
break;
|
|
4333
|
-
case
|
|
4334
|
-
r.push(
|
|
4333
|
+
case zt:
|
|
4334
|
+
r.push(Pt(e, new de(a, o, t), 1));
|
|
4335
4335
|
break;
|
|
4336
|
-
case
|
|
4337
|
-
r.push(
|
|
4336
|
+
case Bt:
|
|
4337
|
+
r.push(X(e, new fe(a, o, t), 1));
|
|
4338
4338
|
break;
|
|
4339
|
-
case
|
|
4340
|
-
r.push(
|
|
4339
|
+
case Vt:
|
|
4340
|
+
r.push(X(e, new pe(a, o, t), 1));
|
|
4341
4341
|
break;
|
|
4342
|
-
case
|
|
4343
|
-
r.push(
|
|
4342
|
+
case Ht:
|
|
4343
|
+
r.push(Pt(e, new me(a, o, t), 1));
|
|
4344
4344
|
break;
|
|
4345
|
-
case
|
|
4346
|
-
r.push(
|
|
4345
|
+
case Ut:
|
|
4346
|
+
r.push(X(e, new he(a, o, t), 1));
|
|
4347
4347
|
break;
|
|
4348
|
-
case
|
|
4348
|
+
case Wt: r.push(X(e, new ge(a, o, t), 1));
|
|
4349
4349
|
}
|
|
4350
4350
|
}
|
|
4351
4351
|
}
|
|
4352
4352
|
for (let t = 0, n = e.readInt(!0); t < n; t++) {
|
|
4353
|
-
let t = e.readInt(!0), n = e.readInt(!0), a = n - 1, o = new
|
|
4353
|
+
let t = e.readInt(!0), n = e.readInt(!0), a = n - 1, o = new De(n, e.readInt(!0), t), s = e.readByte(), c = e.readFloat(), l = s & 1 ? s & 2 ? e.readFloat() : 1 : 0, u = s & 4 ? e.readFloat() * i : 0;
|
|
4354
4354
|
for (let t = 0, n = 0; o.setFrame(t, c, l, u, s & 8 ? 1 : -1, (s & 16) != 0, (s & 32) != 0), t != a; t++) {
|
|
4355
4355
|
s = e.readByte();
|
|
4356
4356
|
let r = e.readFloat(), a = s & 1 ? s & 2 ? e.readFloat() : 1 : 0, d = s & 4 ? e.readFloat() * i : 0;
|
|
4357
|
-
s & 64 ? o.setStepped(t) : s & 128 && (
|
|
4357
|
+
s & 64 ? o.setStepped(t) : s & 128 && (Z(e, o, n++, t, 0, c, r, l, a, 1), Z(e, o, n++, t, 1, c, r, u, d, i)), c = r, l = a, u = d;
|
|
4358
4358
|
}
|
|
4359
4359
|
r.push(o);
|
|
4360
4360
|
}
|
|
4361
4361
|
for (let t = 0, n = e.readInt(!0); t < n; t++) {
|
|
4362
|
-
let t = e.readInt(!0), n = e.readInt(!0), i = n - 1, a = new
|
|
4362
|
+
let t = e.readInt(!0), n = e.readInt(!0), i = n - 1, a = new Oe(n, e.readInt(!0), t), o = e.readFloat(), s = e.readFloat(), c = e.readFloat(), l = e.readFloat(), u = e.readFloat(), d = e.readFloat(), f = e.readFloat();
|
|
4363
4363
|
for (let t = 0, n = 0; a.setFrame(t, o, s, c, l, u, d, f), t != i; t++) {
|
|
4364
4364
|
let r = e.readFloat(), i = e.readFloat(), p = e.readFloat(), m = e.readFloat(), h = e.readFloat(), g = e.readFloat(), _ = e.readFloat();
|
|
4365
4365
|
switch (e.readByte()) {
|
|
4366
|
-
case
|
|
4366
|
+
case fn:
|
|
4367
4367
|
a.setStepped(t);
|
|
4368
4368
|
break;
|
|
4369
|
-
case
|
|
4369
|
+
case pn: Z(e, a, n++, t, 0, o, r, s, i, 1), Z(e, a, n++, t, 1, o, r, c, p, 1), Z(e, a, n++, t, 2, o, r, l, m, 1), Z(e, a, n++, t, 3, o, r, u, h, 1), Z(e, a, n++, t, 4, o, r, d, g, 1), Z(e, a, n++, t, 5, o, r, f, _, 1);
|
|
4370
4370
|
}
|
|
4371
4371
|
o = r, s = i, c = p, l = m, u = h, d = g, f = _;
|
|
4372
4372
|
}
|
|
@@ -4377,21 +4377,21 @@ var ht = class extends Xe {
|
|
|
4377
4377
|
for (let n = 0, o = e.readInt(!0); n < o; n++) {
|
|
4378
4378
|
let n = e.readByte(), o = e.readInt(!0), s = e.readInt(!0);
|
|
4379
4379
|
switch (n) {
|
|
4380
|
-
case
|
|
4381
|
-
r.push(
|
|
4380
|
+
case en:
|
|
4381
|
+
r.push(X(e, new ke(o, s, t), a.positionMode == mt.Fixed ? i : 1));
|
|
4382
4382
|
break;
|
|
4383
|
-
case
|
|
4384
|
-
r.push(
|
|
4383
|
+
case tn:
|
|
4384
|
+
r.push(X(e, new Ae(o, s, t), a.spacingMode == Y.Length || a.spacingMode == Y.Fixed ? i : 1));
|
|
4385
4385
|
break;
|
|
4386
|
-
case
|
|
4387
|
-
let n = new
|
|
4386
|
+
case nn:
|
|
4387
|
+
let n = new je(o, s, t), c = e.readFloat(), l = e.readFloat(), u = e.readFloat(), d = e.readFloat();
|
|
4388
4388
|
for (let t = 0, r = 0, i = n.getFrameCount() - 1; n.setFrame(t, c, l, u, d), t != i; t++) {
|
|
4389
4389
|
let i = e.readFloat(), a = e.readFloat(), o = e.readFloat(), s = e.readFloat();
|
|
4390
4390
|
switch (e.readByte()) {
|
|
4391
|
-
case
|
|
4391
|
+
case fn:
|
|
4392
4392
|
n.setStepped(t);
|
|
4393
4393
|
break;
|
|
4394
|
-
case
|
|
4394
|
+
case pn: Z(e, n, r++, t, 0, c, i, l, a, 1), Z(e, n, r++, t, 1, c, i, u, o, 1), Z(e, n, r++, t, 2, c, i, d, s, 1);
|
|
4395
4395
|
}
|
|
4396
4396
|
c = i, l = a, u = o, d = s;
|
|
4397
4397
|
}
|
|
@@ -4403,33 +4403,33 @@ var ht = class extends Xe {
|
|
|
4403
4403
|
let t = e.readInt(!0) - 1;
|
|
4404
4404
|
for (let n = 0, i = e.readInt(!0); n < i; n++) {
|
|
4405
4405
|
let n = e.readByte(), i = e.readInt(!0);
|
|
4406
|
-
if (n ==
|
|
4407
|
-
let n = new
|
|
4406
|
+
if (n == dn) {
|
|
4407
|
+
let n = new Be(i, t);
|
|
4408
4408
|
for (let t = 0; t < i; t++) n.setFrame(t, e.readFloat());
|
|
4409
4409
|
r.push(n);
|
|
4410
4410
|
continue;
|
|
4411
4411
|
}
|
|
4412
4412
|
let a = e.readInt(!0);
|
|
4413
4413
|
switch (n) {
|
|
4414
|
-
case
|
|
4415
|
-
r.push(
|
|
4414
|
+
case rn:
|
|
4415
|
+
r.push(X(e, new Ne(i, a, t), 1));
|
|
4416
4416
|
break;
|
|
4417
|
-
case
|
|
4418
|
-
r.push(
|
|
4417
|
+
case an:
|
|
4418
|
+
r.push(X(e, new Pe(i, a, t), 1));
|
|
4419
4419
|
break;
|
|
4420
|
-
case
|
|
4421
|
-
r.push(
|
|
4420
|
+
case on:
|
|
4421
|
+
r.push(X(e, new Fe(i, a, t), 1));
|
|
4422
4422
|
break;
|
|
4423
|
-
case
|
|
4424
|
-
r.push(
|
|
4423
|
+
case sn:
|
|
4424
|
+
r.push(X(e, new Ie(i, a, t), 1));
|
|
4425
4425
|
break;
|
|
4426
|
-
case
|
|
4427
|
-
r.push(
|
|
4426
|
+
case cn:
|
|
4427
|
+
r.push(X(e, new Le(i, a, t), 1));
|
|
4428
4428
|
break;
|
|
4429
|
-
case
|
|
4430
|
-
r.push(
|
|
4429
|
+
case ln:
|
|
4430
|
+
r.push(X(e, new Re(i, a, t), 1));
|
|
4431
4431
|
break;
|
|
4432
|
-
case
|
|
4432
|
+
case un: r.push(X(e, new ze(i, a, t), 1));
|
|
4433
4433
|
}
|
|
4434
4434
|
}
|
|
4435
4435
|
}
|
|
@@ -4442,13 +4442,13 @@ var ht = class extends Xe {
|
|
|
4442
4442
|
if (!a) throw Error("attachmentName must not be null.");
|
|
4443
4443
|
let o = t.getAttachment(n, a), s = e.readByte(), c = e.readInt(!0), l = c - 1;
|
|
4444
4444
|
switch (s) {
|
|
4445
|
-
case
|
|
4446
|
-
let t = o, a = t.bones, s = t.vertices, u = a ? s.length / 3 * 2 : s.length, d = new
|
|
4445
|
+
case Qt: {
|
|
4446
|
+
let t = o, a = t.bones, s = t.vertices, u = a ? s.length / 3 * 2 : s.length, d = new we(c, e.readInt(!0), n, t), f = e.readFloat();
|
|
4447
4447
|
for (let t = 0, n = 0;; t++) {
|
|
4448
4448
|
let r, o = e.readInt(!0);
|
|
4449
|
-
if (o == 0) r = a ?
|
|
4449
|
+
if (o == 0) r = a ? I.newFloatArray(u) : s;
|
|
4450
4450
|
else {
|
|
4451
|
-
r =
|
|
4451
|
+
r = I.newFloatArray(u);
|
|
4452
4452
|
let t = e.readInt(!0);
|
|
4453
4453
|
if (o += t, i == 1) for (let n = t; n < o; n++) r[n] = e.readFloat();
|
|
4454
4454
|
else for (let n = t; n < o; n++) r[n] = e.readFloat() * i;
|
|
@@ -4457,21 +4457,21 @@ var ht = class extends Xe {
|
|
|
4457
4457
|
if (d.setFrame(t, f, r), t == l) break;
|
|
4458
4458
|
let c = e.readFloat();
|
|
4459
4459
|
switch (e.readByte()) {
|
|
4460
|
-
case
|
|
4460
|
+
case fn:
|
|
4461
4461
|
d.setStepped(t);
|
|
4462
4462
|
break;
|
|
4463
|
-
case
|
|
4463
|
+
case pn: Z(e, d, n++, t, 0, f, c, 0, 1, 1);
|
|
4464
4464
|
}
|
|
4465
4465
|
f = c;
|
|
4466
4466
|
}
|
|
4467
4467
|
r.push(d);
|
|
4468
4468
|
break;
|
|
4469
4469
|
}
|
|
4470
|
-
case
|
|
4471
|
-
let t = new
|
|
4470
|
+
case $t: {
|
|
4471
|
+
let t = new Ve(c, n, o);
|
|
4472
4472
|
for (let n = 0; n < c; n++) {
|
|
4473
4473
|
let r = e.readFloat(), i = e.readInt32();
|
|
4474
|
-
t.setFrame(n, r,
|
|
4474
|
+
t.setFrame(n, r, ne[i & 15], i >> 4, e.readFloat());
|
|
4475
4475
|
}
|
|
4476
4476
|
r.push(t);
|
|
4477
4477
|
break;
|
|
@@ -4482,11 +4482,11 @@ var ht = class extends Xe {
|
|
|
4482
4482
|
}
|
|
4483
4483
|
let a = e.readInt(!0);
|
|
4484
4484
|
if (a > 0) {
|
|
4485
|
-
let t = new
|
|
4485
|
+
let t = new Ee(a), i = n.slots.length;
|
|
4486
4486
|
for (let n = 0; n < a; n++) {
|
|
4487
|
-
let r = e.readFloat(), a = e.readInt(!0), o =
|
|
4487
|
+
let r = e.readFloat(), a = e.readInt(!0), o = I.newArray(i, 0);
|
|
4488
4488
|
for (let e = i - 1; e >= 0; e--) o[e] = -1;
|
|
4489
|
-
let s =
|
|
4489
|
+
let s = I.newArray(i - a, 0), c = 0, l = 0;
|
|
4490
4490
|
for (let t = 0; t < a; t++) {
|
|
4491
4491
|
let t = e.readInt(!0);
|
|
4492
4492
|
for (; c != t;) s[l++] = c++;
|
|
@@ -4500,18 +4500,18 @@ var ht = class extends Xe {
|
|
|
4500
4500
|
}
|
|
4501
4501
|
let o = e.readInt(!0);
|
|
4502
4502
|
if (o > 0) {
|
|
4503
|
-
let t = new
|
|
4503
|
+
let t = new Te(o);
|
|
4504
4504
|
for (let r = 0; r < o; r++) {
|
|
4505
|
-
let i = e.readFloat(), a = n.events[e.readInt(!0)], o = new
|
|
4505
|
+
let i = e.readFloat(), a = n.events[e.readInt(!0)], o = new lt(i, a);
|
|
4506
4506
|
o.intValue = e.readInt(!1), o.floatValue = e.readFloat(), o.stringValue = e.readString(), o.stringValue ??= a.stringValue, o.data.audioPath && (o.volume = e.readFloat(), o.balance = e.readFloat()), t.setFrame(r, o);
|
|
4507
4507
|
}
|
|
4508
4508
|
r.push(t);
|
|
4509
4509
|
}
|
|
4510
4510
|
let s = 0;
|
|
4511
4511
|
for (let e = 0, t = r.length; e < t; e++) s = Math.max(s, r[e].getDuration());
|
|
4512
|
-
return new
|
|
4512
|
+
return new re(t, r, s);
|
|
4513
4513
|
}
|
|
4514
|
-
},
|
|
4514
|
+
}, At = class {
|
|
4515
4515
|
strings;
|
|
4516
4516
|
index;
|
|
4517
4517
|
buffer;
|
|
@@ -4570,7 +4570,7 @@ var ht = class extends Xe {
|
|
|
4570
4570
|
readBoolean() {
|
|
4571
4571
|
return this.readByte() != 0;
|
|
4572
4572
|
}
|
|
4573
|
-
},
|
|
4573
|
+
}, jt = class {
|
|
4574
4574
|
parent;
|
|
4575
4575
|
skinIndex;
|
|
4576
4576
|
slotIndex;
|
|
@@ -4579,56 +4579,56 @@ var ht = class extends Xe {
|
|
|
4579
4579
|
constructor(e, t, n, r, i) {
|
|
4580
4580
|
this.mesh = e, this.skinIndex = t, this.slotIndex = n, this.parent = r, this.inheritTimeline = i;
|
|
4581
4581
|
}
|
|
4582
|
-
},
|
|
4582
|
+
}, Mt = class {
|
|
4583
4583
|
bones;
|
|
4584
4584
|
vertices;
|
|
4585
4585
|
length;
|
|
4586
4586
|
constructor(e = null, t = null, n = 0) {
|
|
4587
4587
|
this.bones = e, this.vertices = t, this.length = n;
|
|
4588
4588
|
}
|
|
4589
|
-
},
|
|
4589
|
+
}, Nt;
|
|
4590
4590
|
(function(e) {
|
|
4591
4591
|
e[e.Region = 0] = "Region", e[e.BoundingBox = 1] = "BoundingBox", e[e.Mesh = 2] = "Mesh", e[e.LinkedMesh = 3] = "LinkedMesh", e[e.Path = 4] = "Path", e[e.Point = 5] = "Point", e[e.Clipping = 6] = "Clipping";
|
|
4592
|
-
})(
|
|
4593
|
-
function
|
|
4592
|
+
})(Nt ||= {});
|
|
4593
|
+
function X(e, t, n) {
|
|
4594
4594
|
let r = e.readFloat(), i = e.readFloat() * n;
|
|
4595
4595
|
for (let a = 0, o = 0, s = t.getFrameCount() - 1; t.setFrame(a, r, i), a != s; a++) {
|
|
4596
4596
|
let s = e.readFloat(), c = e.readFloat() * n;
|
|
4597
4597
|
switch (e.readByte()) {
|
|
4598
|
-
case
|
|
4598
|
+
case fn:
|
|
4599
4599
|
t.setStepped(a);
|
|
4600
4600
|
break;
|
|
4601
|
-
case
|
|
4601
|
+
case pn: Z(e, t, o++, a, 0, r, s, i, c, n);
|
|
4602
4602
|
}
|
|
4603
4603
|
r = s, i = c;
|
|
4604
4604
|
}
|
|
4605
4605
|
return t;
|
|
4606
4606
|
}
|
|
4607
|
-
function
|
|
4607
|
+
function Pt(e, t, n) {
|
|
4608
4608
|
let r = e.readFloat(), i = e.readFloat() * n, a = e.readFloat() * n;
|
|
4609
4609
|
for (let o = 0, s = 0, c = t.getFrameCount() - 1; t.setFrame(o, r, i, a), o != c; o++) {
|
|
4610
4610
|
let c = e.readFloat(), l = e.readFloat() * n, u = e.readFloat() * n;
|
|
4611
4611
|
switch (e.readByte()) {
|
|
4612
|
-
case
|
|
4612
|
+
case fn:
|
|
4613
4613
|
t.setStepped(o);
|
|
4614
4614
|
break;
|
|
4615
|
-
case
|
|
4615
|
+
case pn: Z(e, t, s++, o, 0, r, c, i, l, n), Z(e, t, s++, o, 1, r, c, a, u, n);
|
|
4616
4616
|
}
|
|
4617
4617
|
r = c, i = l, a = u;
|
|
4618
4618
|
}
|
|
4619
4619
|
return t;
|
|
4620
4620
|
}
|
|
4621
|
-
function
|
|
4621
|
+
function Z(e, t, n, r, i, a, o, s, c, l) {
|
|
4622
4622
|
t.setBezier(n, r, i, a, s, e.readFloat(), e.readFloat() * l, e.readFloat(), e.readFloat() * l, o, c);
|
|
4623
4623
|
}
|
|
4624
|
-
var
|
|
4624
|
+
var Ft = 0, It = 1, Lt = 2, Rt = 3, zt = 4, Bt = 5, Vt = 6, Ht = 7, Ut = 8, Wt = 9, Gt = 10, Kt = 0, qt = 1, Jt = 2, Yt = 3, Xt = 4, Zt = 5, Qt = 0, $t = 1, en = 0, tn = 1, nn = 2, rn = 0, an = 1, on = 2, sn = 4, cn = 5, ln = 6, un = 7, dn = 8, fn = 1, pn = 2, mn = class {
|
|
4625
4625
|
minX = 0;
|
|
4626
4626
|
minY = 0;
|
|
4627
4627
|
maxX = 0;
|
|
4628
4628
|
maxY = 0;
|
|
4629
4629
|
boundingBoxes = [];
|
|
4630
4630
|
polygons = [];
|
|
4631
|
-
polygonPool = new
|
|
4631
|
+
polygonPool = new L(() => I.newFloatArray(16));
|
|
4632
4632
|
update(e, t) {
|
|
4633
4633
|
if (!e) throw Error("skeleton cannot be null.");
|
|
4634
4634
|
let n = this.boundingBoxes, r = this.polygons, i = this.polygonPool, a = e.slots, o = a.length;
|
|
@@ -4637,11 +4637,11 @@ var St = 0, Ct = 1, wt = 2, Tt = 3, Et = 4, Dt = 5, Ot = 6, kt = 7, At = 8, jt =
|
|
|
4637
4637
|
let t = a[e];
|
|
4638
4638
|
if (!t.bone.active) continue;
|
|
4639
4639
|
let o = t.getAttachment();
|
|
4640
|
-
if (o instanceof
|
|
4640
|
+
if (o instanceof Ke) {
|
|
4641
4641
|
let e = o;
|
|
4642
4642
|
n.push(e);
|
|
4643
4643
|
let a = i.obtain();
|
|
4644
|
-
a.length != e.worldVerticesLength && (a =
|
|
4644
|
+
a.length != e.worldVerticesLength && (a = I.newFloatArray(e.worldVerticesLength)), r.push(a), e.computeWorldVertices(t, 0, e.worldVerticesLength, a, 0, 2);
|
|
4645
4645
|
}
|
|
4646
4646
|
}
|
|
4647
4647
|
t ? this.aabbCompute() : (this.minX = Infinity, this.minY = Infinity, this.maxX = -Infinity, this.maxY = -Infinity);
|
|
@@ -4716,14 +4716,14 @@ var St = 0, Ct = 1, wt = 2, Tt = 3, Et = 4, Dt = 5, Ot = 6, kt = 7, At = 8, jt =
|
|
|
4716
4716
|
getHeight() {
|
|
4717
4717
|
return this.maxY - this.minY;
|
|
4718
4718
|
}
|
|
4719
|
-
},
|
|
4719
|
+
}, hn = class e {
|
|
4720
4720
|
convexPolygons = [];
|
|
4721
4721
|
convexPolygonsIndices = [];
|
|
4722
4722
|
indicesArray = [];
|
|
4723
4723
|
isConcaveArray = [];
|
|
4724
4724
|
triangles = [];
|
|
4725
|
-
polygonPool = new
|
|
4726
|
-
polygonIndicesPool = new
|
|
4725
|
+
polygonPool = new L(() => []);
|
|
4726
|
+
polygonIndicesPool = new L(() => []);
|
|
4727
4727
|
triangulate(t) {
|
|
4728
4728
|
let n = t, r = t.length >> 1, i = this.indicesArray;
|
|
4729
4729
|
i.length = 0;
|
|
@@ -4807,8 +4807,8 @@ var St = 0, Ct = 1, wt = 2, Tt = 3, Et = 4, Dt = 5, Ot = 6, kt = 7, At = 8, jt =
|
|
|
4807
4807
|
let o = n - e, s = r - t;
|
|
4808
4808
|
return i * s - a * o + o * t - e * s >= 0 ? 1 : -1;
|
|
4809
4809
|
}
|
|
4810
|
-
},
|
|
4811
|
-
triangulator = new
|
|
4810
|
+
}, gn = class e {
|
|
4811
|
+
triangulator = new hn();
|
|
4812
4812
|
clippingPolygon = [];
|
|
4813
4813
|
clipOutput = [];
|
|
4814
4814
|
clippedVertices = [];
|
|
@@ -4820,7 +4820,7 @@ var St = 0, Ct = 1, wt = 2, Tt = 3, Et = 4, Dt = 5, Ot = 6, kt = 7, At = 8, jt =
|
|
|
4820
4820
|
clipStart(t, n) {
|
|
4821
4821
|
if (this.clipAttachment) return 0;
|
|
4822
4822
|
this.clipAttachment = n;
|
|
4823
|
-
let r = n.worldVerticesLength, i =
|
|
4823
|
+
let r = n.worldVerticesLength, i = I.setArraySize(this.clippingPolygon, r);
|
|
4824
4824
|
n.computeWorldVertices(t, 0, r, i, 0, 2);
|
|
4825
4825
|
let a = this.clippingPolygon;
|
|
4826
4826
|
e.makeClockwise(a);
|
|
@@ -4858,20 +4858,20 @@ var St = 0, Ct = 1, wt = 2, Tt = 3, Et = 4, Dt = 5, Ot = 6, kt = 7, At = 8, jt =
|
|
|
4858
4858
|
if (this.clip(u, d, f, p, m, h, o[e], r)) {
|
|
4859
4859
|
let e = r.length;
|
|
4860
4860
|
if (e == 0) continue;
|
|
4861
|
-
let n = e >> 1, o = this.clipOutput, s =
|
|
4861
|
+
let n = e >> 1, o = this.clipOutput, s = I.setArraySize(i, t + n * 2);
|
|
4862
4862
|
for (let n = 0; n < e; n += 2, t += 2) {
|
|
4863
4863
|
let e = o[n], r = o[n + 1];
|
|
4864
4864
|
s[t] = e, s[t + 1] = r;
|
|
4865
4865
|
}
|
|
4866
4866
|
t = a.length;
|
|
4867
|
-
let l =
|
|
4867
|
+
let l = I.setArraySize(a, t + 3 * (n - 2));
|
|
4868
4868
|
n--;
|
|
4869
4869
|
for (let e = 1; e < n; e++, t += 3) l[t] = c, l[t + 1] = c + e, l[t + 2] = c + e + 1;
|
|
4870
4870
|
c += n + 1;
|
|
4871
4871
|
} else {
|
|
4872
|
-
let e =
|
|
4872
|
+
let e = I.setArraySize(i, t + 6);
|
|
4873
4873
|
e[t] = u, e[t + 1] = d, e[t + 2] = f, e[t + 3] = p, e[t + 4] = m, e[t + 5] = h, t = a.length;
|
|
4874
|
-
let n =
|
|
4874
|
+
let n = I.setArraySize(a, t + 3);
|
|
4875
4875
|
n[t] = c, n[t + 1] = c + 1, n[t + 2] = c + 2, c += 3;
|
|
4876
4876
|
break;
|
|
4877
4877
|
}
|
|
@@ -4884,30 +4884,30 @@ var St = 0, Ct = 1, wt = 2, Tt = 3, Et = 4, Dt = 5, Ot = 6, kt = 7, At = 8, jt =
|
|
|
4884
4884
|
for (let m = 0; m < n; m += 3) {
|
|
4885
4885
|
let n = t[m] << 1, h = e[n], g = e[n + 1], _ = r[n], v = r[n + 1];
|
|
4886
4886
|
n = t[m + 1] << 1;
|
|
4887
|
-
let y = e[n], b = e[n + 1],
|
|
4887
|
+
let y = e[n], b = e[n + 1], x = r[n], S = r[n + 1];
|
|
4888
4888
|
n = t[m + 2] << 1;
|
|
4889
|
-
let
|
|
4889
|
+
let C = e[n], w = e[n + 1], T = r[n], E = r[n + 1];
|
|
4890
4890
|
for (let e = 0; e < d; e++) {
|
|
4891
4891
|
let t = c.length;
|
|
4892
|
-
if (this.clip(h, g, y, b,
|
|
4892
|
+
if (this.clip(h, g, y, b, C, w, u[e], s)) {
|
|
4893
4893
|
let e = s.length;
|
|
4894
4894
|
if (e == 0) continue;
|
|
4895
|
-
let n = b -
|
|
4895
|
+
let n = b - w, r = C - y, u = h - C, d = w - g, m = 1 / (n * u + r * (g - w)), D = e >> 1, O = this.clipOutput, k = I.setArraySize(c, t + D * f);
|
|
4896
4896
|
for (let s = 0; s < e; s += 2, t += f) {
|
|
4897
|
-
let e =
|
|
4898
|
-
|
|
4899
|
-
let l = e -
|
|
4900
|
-
|
|
4897
|
+
let e = O[s], c = O[s + 1];
|
|
4898
|
+
k[t] = e, k[t + 1] = c, k[t + 2] = i.r, k[t + 3] = i.g, k[t + 4] = i.b, k[t + 5] = i.a;
|
|
4899
|
+
let l = e - C, f = c - w, p = (n * l + r * f) * m, h = (d * l + u * f) * m, g = 1 - p - h;
|
|
4900
|
+
k[t + 6] = _ * p + x * h + T * g, k[t + 7] = v * p + S * h + E * g, o && (k[t + 8] = a.r, k[t + 9] = a.g, k[t + 10] = a.b, k[t + 11] = a.a);
|
|
4901
4901
|
}
|
|
4902
4902
|
t = l.length;
|
|
4903
|
-
let
|
|
4904
|
-
|
|
4905
|
-
for (let e = 1; e <
|
|
4906
|
-
p +=
|
|
4903
|
+
let A = I.setArraySize(l, t + 3 * (D - 2));
|
|
4904
|
+
D--;
|
|
4905
|
+
for (let e = 1; e < D; e++, t += 3) A[t] = p, A[t + 1] = p + e, A[t + 2] = p + e + 1;
|
|
4906
|
+
p += D + 1;
|
|
4907
4907
|
} else {
|
|
4908
|
-
let e =
|
|
4909
|
-
e[t] = h, e[t + 1] = g, e[t + 2] = i.r, e[t + 3] = i.g, e[t + 4] = i.b, e[t + 5] = i.a, o ? (e[t + 6] = _, e[t + 7] = v, e[t + 8] = a.r, e[t + 9] = a.g, e[t + 10] = a.b, e[t + 11] = a.a, e[t + 12] = y, e[t + 13] = b, e[t + 14] = i.r, e[t + 15] = i.g, e[t + 16] = i.b, e[t + 17] = i.a, e[t + 18] =
|
|
4910
|
-
let n =
|
|
4908
|
+
let e = I.setArraySize(c, t + 3 * f);
|
|
4909
|
+
e[t] = h, e[t + 1] = g, e[t + 2] = i.r, e[t + 3] = i.g, e[t + 4] = i.b, e[t + 5] = i.a, o ? (e[t + 6] = _, e[t + 7] = v, e[t + 8] = a.r, e[t + 9] = a.g, e[t + 10] = a.b, e[t + 11] = a.a, e[t + 12] = y, e[t + 13] = b, e[t + 14] = i.r, e[t + 15] = i.g, e[t + 16] = i.b, e[t + 17] = i.a, e[t + 18] = x, e[t + 19] = S, e[t + 20] = a.r, e[t + 21] = a.g, e[t + 22] = a.b, e[t + 23] = a.a, e[t + 24] = C, e[t + 25] = w, e[t + 26] = i.r, e[t + 27] = i.g, e[t + 28] = i.b, e[t + 29] = i.a, e[t + 30] = T, e[t + 31] = E, e[t + 32] = a.r, e[t + 33] = a.g, e[t + 34] = a.b, e[t + 35] = a.a) : (e[t + 6] = _, e[t + 7] = v, e[t + 8] = y, e[t + 9] = b, e[t + 10] = i.r, e[t + 11] = i.g, e[t + 12] = i.b, e[t + 13] = i.a, e[t + 14] = x, e[t + 15] = S, e[t + 16] = C, e[t + 17] = w, e[t + 18] = i.r, e[t + 19] = i.g, e[t + 20] = i.b, e[t + 21] = i.a, e[t + 22] = T, e[t + 23] = E), t = l.length;
|
|
4910
|
+
let n = I.setArraySize(l, t + 3);
|
|
4911
4911
|
n[t] = p, n[t + 1] = p + 1, n[t + 2] = p + 2, p += 3;
|
|
4912
4912
|
break;
|
|
4913
4913
|
}
|
|
@@ -4922,30 +4922,30 @@ var St = 0, Ct = 1, wt = 2, Tt = 3, Et = 4, Dt = 5, Ot = 6, kt = 7, At = 8, jt =
|
|
|
4922
4922
|
n = t[d + 1] << 1;
|
|
4923
4923
|
let g = e[n], _ = e[n + 1], v = r[n], y = r[n + 1];
|
|
4924
4924
|
n = t[d + 2] << 1;
|
|
4925
|
-
let b = e[n],
|
|
4925
|
+
let b = e[n], x = e[n + 1], S = r[n], C = r[n + 1];
|
|
4926
4926
|
for (let e = 0; e < l; e++) {
|
|
4927
4927
|
let t = a.length;
|
|
4928
|
-
if (this.clip(f, p, g, _, b,
|
|
4928
|
+
if (this.clip(f, p, g, _, b, x, c[e], i)) {
|
|
4929
4929
|
let e = i.length;
|
|
4930
4930
|
if (e == 0) continue;
|
|
4931
|
-
let n = _ -
|
|
4931
|
+
let n = _ - x, r = b - g, c = f - b, l = x - p, d = 1 / (n * c + r * (p - x)), w = e >> 1, T = this.clipOutput, E = I.setArraySize(a, t + w * 2), D = I.setArraySize(o, t + w * 2);
|
|
4932
4932
|
for (let i = 0; i < e; i += 2, t += 2) {
|
|
4933
|
-
let e =
|
|
4934
|
-
|
|
4935
|
-
let o = e - b, s = a -
|
|
4936
|
-
|
|
4933
|
+
let e = T[i], a = T[i + 1];
|
|
4934
|
+
E[t] = e, E[t + 1] = a;
|
|
4935
|
+
let o = e - b, s = a - x, u = (n * o + r * s) * d, f = (l * o + c * s) * d, p = 1 - u - f;
|
|
4936
|
+
D[t] = m * u + v * f + S * p, D[t + 1] = h * u + y * f + C * p;
|
|
4937
4937
|
}
|
|
4938
4938
|
t = s.length;
|
|
4939
|
-
let
|
|
4940
|
-
|
|
4941
|
-
for (let e = 1; e <
|
|
4942
|
-
u +=
|
|
4939
|
+
let O = I.setArraySize(s, t + 3 * (w - 2));
|
|
4940
|
+
w--;
|
|
4941
|
+
for (let e = 1; e < w; e++, t += 3) O[t] = u, O[t + 1] = u + e, O[t + 2] = u + e + 1;
|
|
4942
|
+
u += w + 1;
|
|
4943
4943
|
} else {
|
|
4944
|
-
let e =
|
|
4945
|
-
e[t] = f, e[t + 1] = p, e[t + 2] = g, e[t + 3] = _, e[t + 4] = b, e[t + 5] =
|
|
4946
|
-
let n =
|
|
4947
|
-
n[t] = m, n[t + 1] = h, n[t + 2] = v, n[t + 3] = y, n[t + 4] =
|
|
4948
|
-
let r =
|
|
4944
|
+
let e = I.setArraySize(a, t + 6);
|
|
4945
|
+
e[t] = f, e[t + 1] = p, e[t + 2] = g, e[t + 3] = _, e[t + 4] = b, e[t + 5] = x;
|
|
4946
|
+
let n = I.setArraySize(o, t + 6);
|
|
4947
|
+
n[t] = m, n[t + 1] = h, n[t + 2] = v, n[t + 3] = y, n[t + 4] = S, n[t + 5] = C, t = s.length;
|
|
4948
|
+
let r = I.setArraySize(s, t + 3);
|
|
4949
4949
|
r[t] = u, r[t + 1] = u + 1, r[t + 2] = u + 2, u += 3;
|
|
4950
4950
|
break;
|
|
4951
4951
|
}
|
|
@@ -5002,7 +5002,7 @@ var St = 0, Ct = 1, wt = 2, Tt = 3, Et = 4, Dt = 5, Ot = 6, kt = 7, At = 8, jt =
|
|
|
5002
5002
|
t[e] = t[a], t[e + 1] = t[a + 1], t[a] = n, t[a + 1] = i;
|
|
5003
5003
|
}
|
|
5004
5004
|
}
|
|
5005
|
-
},
|
|
5005
|
+
}, _n = class {
|
|
5006
5006
|
attachmentLoader;
|
|
5007
5007
|
scale = 1;
|
|
5008
5008
|
linkedMeshes = [];
|
|
@@ -5010,25 +5010,25 @@ var St = 0, Ct = 1, wt = 2, Tt = 3, Et = 4, Dt = 5, Ot = 6, kt = 7, At = 8, jt =
|
|
|
5010
5010
|
this.attachmentLoader = e;
|
|
5011
5011
|
}
|
|
5012
5012
|
readSkeletonData(e) {
|
|
5013
|
-
let t = this.scale, n = new
|
|
5013
|
+
let t = this.scale, n = new Ct(), r = typeof e == "string" ? JSON.parse(e) : e, i = r.skeleton;
|
|
5014
5014
|
if (i && (n.hash = i.hash, n.version = i.spine, n.x = i.x, n.y = i.y, n.width = i.width, n.height = i.height, n.referenceScale = $(i, "referenceScale", 100) * t, n.fps = i.fps, n.imagesPath = i.images ?? null, n.audioPath = i.audio ?? null), r.bones) for (let e = 0; e < r.bones.length; e++) {
|
|
5015
5015
|
let i = r.bones[e], a = null, o = $(i, "parent", null);
|
|
5016
5016
|
o && (a = n.findBone(o));
|
|
5017
|
-
let s = new
|
|
5018
|
-
s.length = $(i, "length", 0) * t, s.x = $(i, "x", 0) * t, s.y = $(i, "y", 0) * t, s.rotation = $(i, "rotation", 0), s.scaleX = $(i, "scaleX", 1), s.scaleY = $(i, "scaleY", 1), s.shearX = $(i, "shearX", 0), s.shearY = $(i, "shearY", 0), s.inherit =
|
|
5017
|
+
let s = new ot(n.bones.length, i.name, a);
|
|
5018
|
+
s.length = $(i, "length", 0) * t, s.x = $(i, "x", 0) * t, s.y = $(i, "y", 0) * t, s.rotation = $(i, "rotation", 0), s.scaleX = $(i, "scaleX", 1), s.scaleY = $(i, "scaleY", 1), s.shearX = $(i, "shearX", 0), s.shearY = $(i, "shearY", 0), s.inherit = I.enumValue(J, $(i, "inherit", "Normal")), s.skinRequired = $(i, "skin", !1);
|
|
5019
5019
|
let c = $(i, "color", null);
|
|
5020
5020
|
c && s.color.setFromString(c), n.bones.push(s);
|
|
5021
5021
|
}
|
|
5022
5022
|
if (r.slots) for (let e = 0; e < r.slots.length; e++) {
|
|
5023
5023
|
let t = r.slots[e], i = t.name, a = n.findBone(t.bone);
|
|
5024
5024
|
if (!a) throw Error(`Couldn't find bone ${t.bone} for slot ${i}`);
|
|
5025
|
-
let o = new
|
|
5025
|
+
let o = new Et(n.slots.length, i, a), s = $(t, "color", null);
|
|
5026
5026
|
s && o.color.setFromString(s);
|
|
5027
5027
|
let c = $(t, "dark", null);
|
|
5028
|
-
c && (o.darkColor =
|
|
5028
|
+
c && (o.darkColor = P.fromString(c)), o.attachmentName = $(t, "attachment", null), o.blendMode = I.enumValue(Dt, $(t, "blend", "normal")), o.visible = $(t, "visible", !0), n.slots.push(o);
|
|
5029
5029
|
}
|
|
5030
5030
|
if (r.ik) for (let e = 0; e < r.ik.length; e++) {
|
|
5031
|
-
let i = r.ik[e], a = new
|
|
5031
|
+
let i = r.ik[e], a = new ft(i.name);
|
|
5032
5032
|
a.order = $(i, "order", 0), a.skinRequired = $(i, "skin", !1);
|
|
5033
5033
|
for (let e = 0; e < i.bones.length; e++) {
|
|
5034
5034
|
let t = n.findBone(i.bones[e]);
|
|
@@ -5040,7 +5040,7 @@ var St = 0, Ct = 1, wt = 2, Tt = 3, Et = 4, Dt = 5, Ot = 6, kt = 7, At = 8, jt =
|
|
|
5040
5040
|
a.target = o, a.mix = $(i, "mix", 1), a.softness = $(i, "softness", 0) * t, a.bendDirection = $(i, "bendPositive", !0) ? 1 : -1, a.compress = $(i, "compress", !1), a.stretch = $(i, "stretch", !1), a.uniform = $(i, "uniform", !1), n.ikConstraints.push(a);
|
|
5041
5041
|
}
|
|
5042
5042
|
if (r.transform) for (let e = 0; e < r.transform.length; e++) {
|
|
5043
|
-
let i = r.transform[e], a = new
|
|
5043
|
+
let i = r.transform[e], a = new Ot(i.name);
|
|
5044
5044
|
a.order = $(i, "order", 0), a.skinRequired = $(i, "skin", !1);
|
|
5045
5045
|
for (let e = 0; e < i.bones.length; e++) {
|
|
5046
5046
|
let t = i.bones[e], r = n.findBone(t);
|
|
@@ -5052,7 +5052,7 @@ var St = 0, Ct = 1, wt = 2, Tt = 3, Et = 4, Dt = 5, Ot = 6, kt = 7, At = 8, jt =
|
|
|
5052
5052
|
a.target = s, a.local = $(i, "local", !1), a.relative = $(i, "relative", !1), a.offsetRotation = $(i, "rotation", 0), a.offsetX = $(i, "x", 0) * t, a.offsetY = $(i, "y", 0) * t, a.offsetScaleX = $(i, "scaleX", 0), a.offsetScaleY = $(i, "scaleY", 0), a.offsetShearY = $(i, "shearY", 0), a.mixRotate = $(i, "mixRotate", 1), a.mixX = $(i, "mixX", 1), a.mixY = $(i, "mixY", a.mixX), a.mixScaleX = $(i, "mixScaleX", 1), a.mixScaleY = $(i, "mixScaleY", a.mixScaleX), a.mixShearY = $(i, "mixShearY", 1), n.transformConstraints.push(a);
|
|
5053
5053
|
}
|
|
5054
5054
|
if (r.path) for (let e = 0; e < r.path.length; e++) {
|
|
5055
|
-
let i = r.path[e], a = new
|
|
5055
|
+
let i = r.path[e], a = new pt(i.name);
|
|
5056
5056
|
a.order = $(i, "order", 0), a.skinRequired = $(i, "skin", !1);
|
|
5057
5057
|
for (let e = 0; e < i.bones.length; e++) {
|
|
5058
5058
|
let t = i.bones[e], r = n.findBone(t);
|
|
@@ -5061,17 +5061,17 @@ var St = 0, Ct = 1, wt = 2, Tt = 3, Et = 4, Dt = 5, Ot = 6, kt = 7, At = 8, jt =
|
|
|
5061
5061
|
}
|
|
5062
5062
|
let o = i.target, s = n.findSlot(o);
|
|
5063
5063
|
if (!s) throw Error(`Couldn't find target slot ${o} for path constraint ${i.name}.`);
|
|
5064
|
-
a.target = s, a.positionMode =
|
|
5064
|
+
a.target = s, a.positionMode = I.enumValue(mt, $(i, "positionMode", "Percent")), a.spacingMode = I.enumValue(Y, $(i, "spacingMode", "Length")), a.rotateMode = I.enumValue(ht, $(i, "rotateMode", "Tangent")), a.offsetRotation = $(i, "rotation", 0), a.position = $(i, "position", 0), a.positionMode == mt.Fixed && (a.position *= t), a.spacing = $(i, "spacing", 0), (a.spacingMode == Y.Length || a.spacingMode == Y.Fixed) && (a.spacing *= t), a.mixRotate = $(i, "mixRotate", 1), a.mixX = $(i, "mixX", 1), a.mixY = $(i, "mixY", a.mixX), n.pathConstraints.push(a);
|
|
5065
5065
|
}
|
|
5066
5066
|
if (r.physics) for (let e = 0; e < r.physics.length; e++) {
|
|
5067
|
-
let i = r.physics[e], a = new
|
|
5067
|
+
let i = r.physics[e], a = new St(i.name);
|
|
5068
5068
|
a.order = $(i, "order", 0), a.skinRequired = $(i, "skin", !1);
|
|
5069
5069
|
let o = i.bone, s = n.findBone(o);
|
|
5070
5070
|
if (s == null) throw Error("Physics bone not found: " + o);
|
|
5071
5071
|
a.bone = s, a.x = $(i, "x", 0), a.y = $(i, "y", 0), a.rotate = $(i, "rotate", 0), a.scaleX = $(i, "scaleX", 0), a.shearX = $(i, "shearX", 0), a.limit = $(i, "limit", 5e3) * t, a.step = 1 / $(i, "fps", 60), a.inertia = $(i, "inertia", 1), a.strength = $(i, "strength", 100), a.damping = $(i, "damping", 1), a.massInverse = 1 / $(i, "mass", 1), a.wind = $(i, "wind", 0), a.gravity = $(i, "gravity", 0), a.mix = $(i, "mix", 1), a.inertiaGlobal = $(i, "inertiaGlobal", !1), a.strengthGlobal = $(i, "strengthGlobal", !1), a.dampingGlobal = $(i, "dampingGlobal", !1), a.massGlobal = $(i, "massGlobal", !1), a.windGlobal = $(i, "windGlobal", !1), a.gravityGlobal = $(i, "gravityGlobal", !1), a.mixGlobal = $(i, "mixGlobal", !1), n.physicsConstraints.push(a);
|
|
5072
5072
|
}
|
|
5073
5073
|
if (r.skins) for (let e = 0; e < r.skins.length; e++) {
|
|
5074
|
-
let t = r.skins[e], i = new
|
|
5074
|
+
let t = r.skins[e], i = new Tt(t.name);
|
|
5075
5075
|
if (t.bones) for (let e = 0; e < t.bones.length; e++) {
|
|
5076
5076
|
let r = t.bones[e], a = n.findBone(r);
|
|
5077
5077
|
if (!a) throw Error(`Couldn't find bone ${r} for skin ${t.name}.`);
|
|
@@ -5116,7 +5116,7 @@ var St = 0, Ct = 1, wt = 2, Tt = 3, Et = 4, Dt = 5, Ot = 6, kt = 7, At = 8, jt =
|
|
|
5116
5116
|
t.mesh.timelineAttachment = t.inheritTimeline ? i : t.mesh, t.mesh.setParentMesh(i), t.mesh.region != null && t.mesh.updateRegion();
|
|
5117
5117
|
}
|
|
5118
5118
|
if (this.linkedMeshes.length = 0, r.events) for (let e in r.events) {
|
|
5119
|
-
let t = r.events[e], i = new
|
|
5119
|
+
let t = r.events[e], i = new ut(e);
|
|
5120
5120
|
i.intValue = $(t, "int", 0), i.floatValue = $(t, "float", 0), i.stringValue = $(t, "string", ""), i.audioPath = $(t, "audio", null), i.audioPath && (i.volume = $(t, "volume", 1), i.balance = $(t, "balance", 0)), n.events.push(i);
|
|
5121
5121
|
}
|
|
5122
5122
|
if (r.animations) for (let e in r.animations) {
|
|
@@ -5150,7 +5150,7 @@ var St = 0, Ct = 1, wt = 2, Tt = 3, Et = 4, Dt = 5, Ot = 6, kt = 7, At = 8, jt =
|
|
|
5150
5150
|
let c = $(e, "color", null);
|
|
5151
5151
|
c && s.color.setFromString(c), s.width = $(e, "width", 0) * a, s.height = $(e, "height", 0) * a, s.sequence = o;
|
|
5152
5152
|
let l = $(e, "parent", null);
|
|
5153
|
-
if (l) return this.linkedMeshes.push(new
|
|
5153
|
+
if (l) return this.linkedMeshes.push(new vn(s, $(e, "skin", null), n, l, $(e, "timelines", !0))), s;
|
|
5154
5154
|
let u = e.uvs;
|
|
5155
5155
|
return this.readVertices(e, s, u.length), s.triangles = e.triangles, s.regionUVs = u, s.region != null && s.updateRegion(), s.edges = $(e, "edges", null), s.hullLength = $(e, "hull", 0) * 2, s;
|
|
5156
5156
|
}
|
|
@@ -5160,7 +5160,7 @@ var St = 0, Ct = 1, wt = 2, Tt = 3, Et = 4, Dt = 5, Ot = 6, kt = 7, At = 8, jt =
|
|
|
5160
5160
|
n.closed = $(e, "closed", !1), n.constantSpeed = $(e, "constantSpeed", !0);
|
|
5161
5161
|
let i = e.vertexCount;
|
|
5162
5162
|
this.readVertices(e, n, i << 1);
|
|
5163
|
-
let o =
|
|
5163
|
+
let o = I.newArray(i / 3, 0);
|
|
5164
5164
|
for (let t = 0; t < e.lengths.length; t++) o[t] = e.lengths[t] * a;
|
|
5165
5165
|
n.lengths = o;
|
|
5166
5166
|
let s = $(e, "color", null);
|
|
@@ -5188,7 +5188,7 @@ var St = 0, Ct = 1, wt = 2, Tt = 3, Et = 4, Dt = 5, Ot = 6, kt = 7, At = 8, jt =
|
|
|
5188
5188
|
}
|
|
5189
5189
|
readSequence(e) {
|
|
5190
5190
|
if (e == null) return null;
|
|
5191
|
-
let t = new
|
|
5191
|
+
let t = new te($(e, "count", 0));
|
|
5192
5192
|
return t.start = $(e, "start", 1), t.digits = $(e, "digits", 0), t.setupIndex = $(e, "setup", 0), t;
|
|
5193
5193
|
}
|
|
5194
5194
|
readVertices(e, t, n) {
|
|
@@ -5196,7 +5196,7 @@ var St = 0, Ct = 1, wt = 2, Tt = 3, Et = 4, Dt = 5, Ot = 6, kt = 7, At = 8, jt =
|
|
|
5196
5196
|
t.worldVerticesLength = n;
|
|
5197
5197
|
let i = e.vertices;
|
|
5198
5198
|
if (n == i.length) {
|
|
5199
|
-
let e =
|
|
5199
|
+
let e = I.toFloatArray(i);
|
|
5200
5200
|
if (r != 1) for (let t = 0, n = i.length; t < n; t++) e[t] *= r;
|
|
5201
5201
|
t.vertices = e;
|
|
5202
5202
|
return;
|
|
@@ -5207,7 +5207,7 @@ var St = 0, Ct = 1, wt = 2, Tt = 3, Et = 4, Dt = 5, Ot = 6, kt = 7, At = 8, jt =
|
|
|
5207
5207
|
o.push(t);
|
|
5208
5208
|
for (let n = e + t * 4; e < n; e += 4) o.push(i[e]), a.push(i[e + 1] * r), a.push(i[e + 2] * r), a.push(i[e + 3]);
|
|
5209
5209
|
}
|
|
5210
|
-
t.bones = o, t.vertices =
|
|
5210
|
+
t.bones = o, t.vertices = I.toFloatArray(a);
|
|
5211
5211
|
}
|
|
5212
5212
|
readAnimation(e, t, n) {
|
|
5213
5213
|
let r = this.scale, i = [];
|
|
@@ -5220,14 +5220,14 @@ var St = 0, Ct = 1, wt = 2, Tt = 3, Et = 4, Dt = 5, Ot = 6, kt = 7, At = 8, jt =
|
|
|
5220
5220
|
if (!t) continue;
|
|
5221
5221
|
let n = t.length;
|
|
5222
5222
|
if (e == "attachment") {
|
|
5223
|
-
let e = new
|
|
5223
|
+
let e = new Ce(n, o);
|
|
5224
5224
|
for (let r = 0; r < n; r++) {
|
|
5225
5225
|
let n = t[r];
|
|
5226
5226
|
e.setFrame(r, $(n, "time", 0), $(n, "name", null));
|
|
5227
5227
|
}
|
|
5228
5228
|
i.push(e);
|
|
5229
5229
|
} else if (e == "rgba") {
|
|
5230
|
-
let e = new
|
|
5230
|
+
let e = new ve(n, n << 2, o), r = t[0], a = $(r, "time", 0), s = P.fromString(r.color);
|
|
5231
5231
|
for (let n = 0, i = 0;; n++) {
|
|
5232
5232
|
e.setFrame(n, a, s.r, s.g, s.b, s.a);
|
|
5233
5233
|
let o = t[n + 1];
|
|
@@ -5235,12 +5235,12 @@ var St = 0, Ct = 1, wt = 2, Tt = 3, Et = 4, Dt = 5, Ot = 6, kt = 7, At = 8, jt =
|
|
|
5235
5235
|
e.shrink(i);
|
|
5236
5236
|
break;
|
|
5237
5237
|
}
|
|
5238
|
-
let c = $(o, "time", 0), l =
|
|
5238
|
+
let c = $(o, "time", 0), l = P.fromString(o.color), u = r.curve;
|
|
5239
5239
|
u && (i = Q(u, e, i, n, 0, a, c, s.r, l.r, 1), i = Q(u, e, i, n, 1, a, c, s.g, l.g, 1), i = Q(u, e, i, n, 2, a, c, s.b, l.b, 1), i = Q(u, e, i, n, 3, a, c, s.a, l.a, 1)), a = c, s = l, r = o;
|
|
5240
5240
|
}
|
|
5241
5241
|
i.push(e);
|
|
5242
5242
|
} else if (e == "rgb") {
|
|
5243
|
-
let e = new
|
|
5243
|
+
let e = new ye(n, n * 3, o), r = t[0], a = $(r, "time", 0), s = P.fromString(r.color);
|
|
5244
5244
|
for (let n = 0, i = 0;; n++) {
|
|
5245
5245
|
e.setFrame(n, a, s.r, s.g, s.b);
|
|
5246
5246
|
let o = t[n + 1];
|
|
@@ -5248,13 +5248,13 @@ var St = 0, Ct = 1, wt = 2, Tt = 3, Et = 4, Dt = 5, Ot = 6, kt = 7, At = 8, jt =
|
|
|
5248
5248
|
e.shrink(i);
|
|
5249
5249
|
break;
|
|
5250
5250
|
}
|
|
5251
|
-
let c = $(o, "time", 0), l =
|
|
5251
|
+
let c = $(o, "time", 0), l = P.fromString(o.color), u = r.curve;
|
|
5252
5252
|
u && (i = Q(u, e, i, n, 0, a, c, s.r, l.r, 1), i = Q(u, e, i, n, 1, a, c, s.g, l.g, 1), i = Q(u, e, i, n, 2, a, c, s.b, l.b, 1)), a = c, s = l, r = o;
|
|
5253
5253
|
}
|
|
5254
5254
|
i.push(e);
|
|
5255
|
-
} else if (e == "alpha") i.push(
|
|
5255
|
+
} else if (e == "alpha") i.push(yn(t, new be(n, n, o), 0, 1));
|
|
5256
5256
|
else if (e == "rgba2") {
|
|
5257
|
-
let e = new
|
|
5257
|
+
let e = new xe(n, n * 7, o), r = t[0], a = $(r, "time", 0), s = P.fromString(r.light), c = P.fromString(r.dark);
|
|
5258
5258
|
for (let n = 0, i = 0;; n++) {
|
|
5259
5259
|
e.setFrame(n, a, s.r, s.g, s.b, s.a, c.r, c.g, c.b);
|
|
5260
5260
|
let o = t[n + 1];
|
|
@@ -5262,12 +5262,12 @@ var St = 0, Ct = 1, wt = 2, Tt = 3, Et = 4, Dt = 5, Ot = 6, kt = 7, At = 8, jt =
|
|
|
5262
5262
|
e.shrink(i);
|
|
5263
5263
|
break;
|
|
5264
5264
|
}
|
|
5265
|
-
let l = $(o, "time", 0), u =
|
|
5265
|
+
let l = $(o, "time", 0), u = P.fromString(o.light), d = P.fromString(o.dark), f = r.curve;
|
|
5266
5266
|
f && (i = Q(f, e, i, n, 0, a, l, s.r, u.r, 1), i = Q(f, e, i, n, 1, a, l, s.g, u.g, 1), i = Q(f, e, i, n, 2, a, l, s.b, u.b, 1), i = Q(f, e, i, n, 3, a, l, s.a, u.a, 1), i = Q(f, e, i, n, 4, a, l, c.r, d.r, 1), i = Q(f, e, i, n, 5, a, l, c.g, d.g, 1), i = Q(f, e, i, n, 6, a, l, c.b, d.b, 1)), a = l, s = u, c = d, r = o;
|
|
5267
5267
|
}
|
|
5268
5268
|
i.push(e);
|
|
5269
5269
|
} else if (e == "rgb2") {
|
|
5270
|
-
let e = new
|
|
5270
|
+
let e = new Se(n, n * 6, o), r = t[0], a = $(r, "time", 0), s = P.fromString(r.light), c = P.fromString(r.dark);
|
|
5271
5271
|
for (let n = 0, i = 0;; n++) {
|
|
5272
5272
|
e.setFrame(n, a, s.r, s.g, s.b, c.r, c.g, c.b);
|
|
5273
5273
|
let o = t[n + 1];
|
|
@@ -5275,7 +5275,7 @@ var St = 0, Ct = 1, wt = 2, Tt = 3, Et = 4, Dt = 5, Ot = 6, kt = 7, At = 8, jt =
|
|
|
5275
5275
|
e.shrink(i);
|
|
5276
5276
|
break;
|
|
5277
5277
|
}
|
|
5278
|
-
let l = $(o, "time", 0), u =
|
|
5278
|
+
let l = $(o, "time", 0), u = P.fromString(o.light), d = P.fromString(o.dark), f = r.curve;
|
|
5279
5279
|
f && (i = Q(f, e, i, n, 0, a, l, s.r, u.r, 1), i = Q(f, e, i, n, 1, a, l, s.g, u.g, 1), i = Q(f, e, i, n, 2, a, l, s.b, u.b, 1), i = Q(f, e, i, n, 3, a, l, c.r, d.r, 1), i = Q(f, e, i, n, 4, a, l, c.g, d.g, 1), i = Q(f, e, i, n, 5, a, l, c.b, d.b, 1)), a = l, s = u, c = d, r = o;
|
|
5280
5280
|
}
|
|
5281
5281
|
i.push(e);
|
|
@@ -5289,39 +5289,39 @@ var St = 0, Ct = 1, wt = 2, Tt = 3, Et = 4, Dt = 5, Ot = 6, kt = 7, At = 8, jt =
|
|
|
5289
5289
|
for (let e in a) {
|
|
5290
5290
|
let t = a[e], n = t.length;
|
|
5291
5291
|
if (n != 0) {
|
|
5292
|
-
if (e === "rotate") i.push(
|
|
5292
|
+
if (e === "rotate") i.push(yn(t, new se(n, n, s), 0, 1));
|
|
5293
5293
|
else if (e === "translate") {
|
|
5294
|
-
let e = new
|
|
5295
|
-
i.push(
|
|
5294
|
+
let e = new ce(n, n << 1, s);
|
|
5295
|
+
i.push(bn(t, e, "x", "y", 0, r));
|
|
5296
5296
|
} else if (e === "translatex") {
|
|
5297
|
-
let e = new
|
|
5298
|
-
i.push(
|
|
5297
|
+
let e = new le(n, n, s);
|
|
5298
|
+
i.push(yn(t, e, 0, r));
|
|
5299
5299
|
} else if (e === "translatey") {
|
|
5300
|
-
let e = new
|
|
5301
|
-
i.push(
|
|
5300
|
+
let e = new ue(n, n, s);
|
|
5301
|
+
i.push(yn(t, e, 0, r));
|
|
5302
5302
|
} else if (e === "scale") {
|
|
5303
|
-
let e = new
|
|
5304
|
-
i.push(
|
|
5303
|
+
let e = new de(n, n << 1, s);
|
|
5304
|
+
i.push(bn(t, e, "x", "y", 1, 1));
|
|
5305
5305
|
} else if (e === "scalex") {
|
|
5306
|
-
let e = new
|
|
5307
|
-
i.push(
|
|
5306
|
+
let e = new fe(n, n, s);
|
|
5307
|
+
i.push(yn(t, e, 1, 1));
|
|
5308
5308
|
} else if (e === "scaley") {
|
|
5309
|
-
let e = new
|
|
5310
|
-
i.push(
|
|
5309
|
+
let e = new pe(n, n, s);
|
|
5310
|
+
i.push(yn(t, e, 1, 1));
|
|
5311
5311
|
} else if (e === "shear") {
|
|
5312
|
-
let e = new
|
|
5313
|
-
i.push(
|
|
5312
|
+
let e = new me(n, n << 1, s);
|
|
5313
|
+
i.push(bn(t, e, "x", "y", 0, 1));
|
|
5314
5314
|
} else if (e === "shearx") {
|
|
5315
|
-
let e = new
|
|
5316
|
-
i.push(
|
|
5315
|
+
let e = new he(n, n, s);
|
|
5316
|
+
i.push(yn(t, e, 0, 1));
|
|
5317
5317
|
} else if (e === "sheary") {
|
|
5318
|
-
let e = new
|
|
5319
|
-
i.push(
|
|
5318
|
+
let e = new ge(n, n, s);
|
|
5319
|
+
i.push(yn(t, e, 0, 1));
|
|
5320
5320
|
} else if (e === "inherit") {
|
|
5321
|
-
let e = new
|
|
5321
|
+
let e = new _e(n, o.index);
|
|
5322
5322
|
for (let n = 0; n < t.length; n++) {
|
|
5323
5323
|
let r = t[n];
|
|
5324
|
-
e.setFrame(n, $(r, "time", 0),
|
|
5324
|
+
e.setFrame(n, $(r, "time", 0), I.enumValue(J, $(r, "inherit", "Normal")));
|
|
5325
5325
|
}
|
|
5326
5326
|
i.push(e);
|
|
5327
5327
|
}
|
|
@@ -5333,7 +5333,7 @@ var St = 0, Ct = 1, wt = 2, Tt = 3, Et = 4, Dt = 5, Ot = 6, kt = 7, At = 8, jt =
|
|
|
5333
5333
|
if (!o) continue;
|
|
5334
5334
|
let s = n.findIkConstraint(t);
|
|
5335
5335
|
if (!s) throw Error("IK Constraint not found: " + t);
|
|
5336
|
-
let c = n.ikConstraints.indexOf(s), l = new
|
|
5336
|
+
let c = n.ikConstraints.indexOf(s), l = new De(a.length, a.length << 1, c), u = $(o, "time", 0), d = $(o, "mix", 1), f = $(o, "softness", 0) * r;
|
|
5337
5337
|
for (let e = 0, t = 0;; e++) {
|
|
5338
5338
|
l.setFrame(e, u, d, f, $(o, "bendPositive", !0) ? 1 : -1, $(o, "compress", !1), $(o, "stretch", !1));
|
|
5339
5339
|
let n = a[e + 1];
|
|
@@ -5351,7 +5351,7 @@ var St = 0, Ct = 1, wt = 2, Tt = 3, Et = 4, Dt = 5, Ot = 6, kt = 7, At = 8, jt =
|
|
|
5351
5351
|
if (!a) continue;
|
|
5352
5352
|
let o = n.findTransformConstraint(t);
|
|
5353
5353
|
if (!o) throw Error("Transform constraint not found: " + t);
|
|
5354
|
-
let s = n.transformConstraints.indexOf(o), c = new
|
|
5354
|
+
let s = n.transformConstraints.indexOf(o), c = new Oe(r.length, r.length * 6, s), l = $(a, "time", 0), u = $(a, "mixRotate", 1), d = $(a, "mixX", 1), f = $(a, "mixY", d), p = $(a, "mixScaleX", 1), m = $(a, "mixScaleY", p), h = $(a, "mixShearY", 1);
|
|
5355
5355
|
for (let e = 0, t = 0;; e++) {
|
|
5356
5356
|
c.setFrame(e, l, u, d, f, p, m, h);
|
|
5357
5357
|
let n = r[e + 1];
|
|
@@ -5373,13 +5373,13 @@ var St = 0, Ct = 1, wt = 2, Tt = 3, Et = 4, Dt = 5, Ot = 6, kt = 7, At = 8, jt =
|
|
|
5373
5373
|
if (!n) continue;
|
|
5374
5374
|
let c = t.length;
|
|
5375
5375
|
if (e === "position") {
|
|
5376
|
-
let e = new
|
|
5377
|
-
i.push(
|
|
5376
|
+
let e = new ke(c, c, s);
|
|
5377
|
+
i.push(yn(t, e, 0, o.positionMode == mt.Fixed ? r : 1));
|
|
5378
5378
|
} else if (e === "spacing") {
|
|
5379
|
-
let e = new
|
|
5380
|
-
i.push(
|
|
5379
|
+
let e = new Ae(c, c, s);
|
|
5380
|
+
i.push(yn(t, e, 0, o.spacingMode == Y.Length || o.spacingMode == Y.Fixed ? r : 1));
|
|
5381
5381
|
} else if (e === "mix") {
|
|
5382
|
-
let e = new
|
|
5382
|
+
let e = new je(c, c * 3, s), r = $(n, "time", 0), a = $(n, "mixRotate", 1), o = $(n, "mixX", 1), l = $(n, "mixY", o);
|
|
5383
5383
|
for (let i = 0, s = 0;; i++) {
|
|
5384
5384
|
e.setFrame(i, r, a, o, l);
|
|
5385
5385
|
let c = t[i + 1];
|
|
@@ -5406,21 +5406,21 @@ var St = 0, Ct = 1, wt = 2, Tt = 3, Et = 4, Dt = 5, Ot = 6, kt = 7, At = 8, jt =
|
|
|
5406
5406
|
if (!n) continue;
|
|
5407
5407
|
let o = t.length;
|
|
5408
5408
|
if (e == "reset") {
|
|
5409
|
-
let e = new
|
|
5409
|
+
let e = new Be(o, a);
|
|
5410
5410
|
for (let r = 0; n != null; n = t[r + 1], r++) e.setFrame(r, $(n, "time", 0));
|
|
5411
5411
|
i.push(e);
|
|
5412
5412
|
continue;
|
|
5413
5413
|
}
|
|
5414
5414
|
let s;
|
|
5415
|
-
if (e == "inertia") s = new
|
|
5416
|
-
else if (e == "strength") s = new
|
|
5417
|
-
else if (e == "damping") s = new
|
|
5418
|
-
else if (e == "mass") s = new
|
|
5419
|
-
else if (e == "wind") s = new
|
|
5420
|
-
else if (e == "gravity") s = new
|
|
5421
|
-
else if (e == "mix") s = new
|
|
5415
|
+
if (e == "inertia") s = new Ne(o, o, a);
|
|
5416
|
+
else if (e == "strength") s = new Pe(o, o, a);
|
|
5417
|
+
else if (e == "damping") s = new Fe(o, o, a);
|
|
5418
|
+
else if (e == "mass") s = new Ie(o, o, a);
|
|
5419
|
+
else if (e == "wind") s = new Le(o, o, a);
|
|
5420
|
+
else if (e == "gravity") s = new Re(o, o, a);
|
|
5421
|
+
else if (e == "mix") s = new ze(o, o, a);
|
|
5422
5422
|
else continue;
|
|
5423
|
-
i.push(
|
|
5423
|
+
i.push(yn(t, s, 0, 1));
|
|
5424
5424
|
}
|
|
5425
5425
|
}
|
|
5426
5426
|
if (e.attachments) for (let t in e.attachments) {
|
|
@@ -5436,14 +5436,14 @@ var St = 0, Ct = 1, wt = 2, Tt = 3, Et = 4, Dt = 5, Ot = 6, kt = 7, At = 8, jt =
|
|
|
5436
5436
|
let t = n[e], o = t[0];
|
|
5437
5437
|
if (o) {
|
|
5438
5438
|
if (e == "deform") {
|
|
5439
|
-
let e = a.bones, n = a.vertices, s = e ? n.length / 3 * 2 : n.length, l = new
|
|
5439
|
+
let e = a.bones, n = a.vertices, s = e ? n.length / 3 * 2 : n.length, l = new we(t.length, t.length, c, a), u = $(o, "time", 0);
|
|
5440
5440
|
for (let i = 0, a = 0;; i++) {
|
|
5441
5441
|
let c, d = $(o, "vertices", null);
|
|
5442
|
-
if (!d) c = e ?
|
|
5442
|
+
if (!d) c = e ? I.newFloatArray(s) : n;
|
|
5443
5443
|
else {
|
|
5444
|
-
c =
|
|
5444
|
+
c = I.newFloatArray(s);
|
|
5445
5445
|
let t = $(o, "offset", 0);
|
|
5446
|
-
if (
|
|
5446
|
+
if (I.arrayCopy(d, 0, c, t, d.length), r != 1) for (let e = t, n = e + d.length; e < n; e++) c[e] *= r;
|
|
5447
5447
|
if (!e) for (let e = 0; e < s; e++) c[e] += n[e];
|
|
5448
5448
|
}
|
|
5449
5449
|
l.setFrame(i, u, c);
|
|
@@ -5457,9 +5457,9 @@ var St = 0, Ct = 1, wt = 2, Tt = 3, Et = 4, Dt = 5, Ot = 6, kt = 7, At = 8, jt =
|
|
|
5457
5457
|
}
|
|
5458
5458
|
i.push(l);
|
|
5459
5459
|
} else if (e == "sequence") {
|
|
5460
|
-
let e = new
|
|
5460
|
+
let e = new Ve(t.length, c, a), n = 0;
|
|
5461
5461
|
for (let r = 0; r < t.length; r++) {
|
|
5462
|
-
let i = $(o, "delay", n), a = $(o, "time", 0), s =
|
|
5462
|
+
let i = $(o, "delay", n), a = $(o, "time", 0), s = V[$(o, "mode", "hold")], c = $(o, "index", 0);
|
|
5463
5463
|
e.setFrame(r, a, s, c, i), n = i, o = t[r + 1];
|
|
5464
5464
|
}
|
|
5465
5465
|
i.push(e);
|
|
@@ -5470,12 +5470,12 @@ var St = 0, Ct = 1, wt = 2, Tt = 3, Et = 4, Dt = 5, Ot = 6, kt = 7, At = 8, jt =
|
|
|
5470
5470
|
}
|
|
5471
5471
|
}
|
|
5472
5472
|
if (e.drawOrder) {
|
|
5473
|
-
let t = new
|
|
5473
|
+
let t = new Ee(e.drawOrder.length), r = n.slots.length, a = 0;
|
|
5474
5474
|
for (let i = 0; i < e.drawOrder.length; i++, a++) {
|
|
5475
5475
|
let o = e.drawOrder[i], s = null, c = $(o, "offsets", null);
|
|
5476
5476
|
if (c) {
|
|
5477
|
-
s =
|
|
5478
|
-
let e =
|
|
5477
|
+
s = I.newArray(r, -1);
|
|
5478
|
+
let e = I.newArray(r - c.length, 0), t = 0, i = 0;
|
|
5479
5479
|
for (let r = 0; r < c.length; r++) {
|
|
5480
5480
|
let a = c[r], o = n.findSlot(a.slot);
|
|
5481
5481
|
if (!o) throw Error("Slot not found: " + o);
|
|
@@ -5491,20 +5491,20 @@ var St = 0, Ct = 1, wt = 2, Tt = 3, Et = 4, Dt = 5, Ot = 6, kt = 7, At = 8, jt =
|
|
|
5491
5491
|
i.push(t);
|
|
5492
5492
|
}
|
|
5493
5493
|
if (e.events) {
|
|
5494
|
-
let t = new
|
|
5494
|
+
let t = new Te(e.events.length), r = 0;
|
|
5495
5495
|
for (let i = 0; i < e.events.length; i++, r++) {
|
|
5496
5496
|
let a = e.events[i], o = n.findEvent(a.name);
|
|
5497
5497
|
if (!o) throw Error("Event not found: " + a.name);
|
|
5498
|
-
let s = new
|
|
5498
|
+
let s = new lt(I.toSinglePrecision($(a, "time", 0)), o);
|
|
5499
5499
|
s.intValue = $(a, "int", o.intValue), s.floatValue = $(a, "float", o.floatValue), s.stringValue = $(a, "string", o.stringValue), s.data.audioPath && (s.volume = $(a, "volume", 1), s.balance = $(a, "balance", 0)), t.setFrame(r, s);
|
|
5500
5500
|
}
|
|
5501
5501
|
i.push(t);
|
|
5502
5502
|
}
|
|
5503
5503
|
let a = 0;
|
|
5504
5504
|
for (let e = 0, t = i.length; e < t; e++) a = Math.max(a, i[e].getDuration());
|
|
5505
|
-
n.animations.push(new
|
|
5505
|
+
n.animations.push(new re(t, i, a));
|
|
5506
5506
|
}
|
|
5507
|
-
},
|
|
5507
|
+
}, vn = class {
|
|
5508
5508
|
parent;
|
|
5509
5509
|
skin;
|
|
5510
5510
|
slotIndex;
|
|
@@ -5514,7 +5514,7 @@ var St = 0, Ct = 1, wt = 2, Tt = 3, Et = 4, Dt = 5, Ot = 6, kt = 7, At = 8, jt =
|
|
|
5514
5514
|
this.mesh = e, this.skin = t, this.slotIndex = n, this.parent = r, this.inheritTimeline = i;
|
|
5515
5515
|
}
|
|
5516
5516
|
};
|
|
5517
|
-
function
|
|
5517
|
+
function yn(e, t, n, r) {
|
|
5518
5518
|
let i = e[0], a = $(i, "time", 0), o = $(i, "value", n) * r, s = 0;
|
|
5519
5519
|
for (let c = 0;; c++) {
|
|
5520
5520
|
t.setFrame(c, a, o);
|
|
@@ -5524,7 +5524,7 @@ function Z(e, t, n, r) {
|
|
|
5524
5524
|
i.curve && (s = Q(i.curve, t, s, c, 0, a, u, o, d, r)), a = u, o = d, i = l;
|
|
5525
5525
|
}
|
|
5526
5526
|
}
|
|
5527
|
-
function
|
|
5527
|
+
function bn(e, t, n, r, i, a) {
|
|
5528
5528
|
let o = e[0], s = $(o, "time", 0), c = $(o, n, i) * a, l = $(o, r, i) * a, u = 0;
|
|
5529
5529
|
for (let d = 0;; d++) {
|
|
5530
5530
|
t.setFrame(d, s, c, l);
|
|
@@ -5551,7 +5551,7 @@ Math.fround === void 0 && (Math.fround = (function(e) {
|
|
|
5551
5551
|
})(new Float32Array(1)));
|
|
5552
5552
|
//#endregion
|
|
5553
5553
|
//#region src/plugins/spine/pixi-spine/SpineTexture.ts
|
|
5554
|
-
var
|
|
5554
|
+
var xn = class e extends Je {
|
|
5555
5555
|
static {
|
|
5556
5556
|
this.textureMap = /* @__PURE__ */ new Map();
|
|
5557
5557
|
}
|
|
@@ -5559,7 +5559,7 @@ var an = class e extends Ie {
|
|
|
5559
5559
|
return e.textureMap.has(t) ? e.textureMap.get(t) : new e(t);
|
|
5560
5560
|
}
|
|
5561
5561
|
constructor(e) {
|
|
5562
|
-
super(e.resource), this.texture =
|
|
5562
|
+
super(e.resource), this.texture = g.from(e);
|
|
5563
5563
|
}
|
|
5564
5564
|
setFilters(t, n) {
|
|
5565
5565
|
let r = this.texture.source.style;
|
|
@@ -5574,51 +5574,51 @@ var an = class e extends Ie {
|
|
|
5574
5574
|
}
|
|
5575
5575
|
static toPixiMipMap(e) {
|
|
5576
5576
|
switch (e) {
|
|
5577
|
-
case
|
|
5578
|
-
case
|
|
5579
|
-
case
|
|
5580
|
-
case
|
|
5581
|
-
case
|
|
5582
|
-
case
|
|
5577
|
+
case q.Nearest:
|
|
5578
|
+
case q.Linear: return !1;
|
|
5579
|
+
case q.MipMapNearestLinear:
|
|
5580
|
+
case q.MipMapNearestNearest:
|
|
5581
|
+
case q.MipMapLinearLinear:
|
|
5582
|
+
case q.MipMapLinearNearest: return !0;
|
|
5583
5583
|
default: throw Error(`Unknown texture filter: ${String(e)}`);
|
|
5584
5584
|
}
|
|
5585
5585
|
}
|
|
5586
5586
|
static toPixiTextureFilter(e) {
|
|
5587
5587
|
switch (e) {
|
|
5588
|
-
case
|
|
5589
|
-
case
|
|
5590
|
-
case
|
|
5591
|
-
case
|
|
5592
|
-
case
|
|
5593
|
-
case
|
|
5588
|
+
case q.Nearest:
|
|
5589
|
+
case q.MipMapNearestLinear:
|
|
5590
|
+
case q.MipMapNearestNearest: return "nearest";
|
|
5591
|
+
case q.Linear:
|
|
5592
|
+
case q.MipMapLinearLinear:
|
|
5593
|
+
case q.MipMapLinearNearest: return "linear";
|
|
5594
5594
|
default: throw Error(`Unknown texture filter: ${String(e)}`);
|
|
5595
5595
|
}
|
|
5596
5596
|
}
|
|
5597
5597
|
static toPixiTextureWrap(e) {
|
|
5598
5598
|
switch (e) {
|
|
5599
|
-
case
|
|
5600
|
-
case
|
|
5601
|
-
case
|
|
5599
|
+
case Ye.ClampToEdge: return "clamp-to-edge";
|
|
5600
|
+
case Ye.MirroredRepeat: return "mirror-repeat";
|
|
5601
|
+
case Ye.Repeat: return "repeat";
|
|
5602
5602
|
default: throw Error(`Unknown texture wrap: ${String(e)}`);
|
|
5603
5603
|
}
|
|
5604
5604
|
}
|
|
5605
5605
|
static toPixiBlending(e) {
|
|
5606
5606
|
switch (e) {
|
|
5607
|
-
case
|
|
5608
|
-
case
|
|
5609
|
-
case
|
|
5610
|
-
case
|
|
5607
|
+
case Dt.Normal: return "normal";
|
|
5608
|
+
case Dt.Additive: return "add";
|
|
5609
|
+
case Dt.Multiply: return "multiply";
|
|
5610
|
+
case Dt.Screen: return "screen";
|
|
5611
5611
|
default: throw Error(`Unknown blendMode: ${String(e)}`);
|
|
5612
5612
|
}
|
|
5613
5613
|
}
|
|
5614
|
-
},
|
|
5615
|
-
extension:
|
|
5614
|
+
}, Sn = {
|
|
5615
|
+
extension: u.Asset,
|
|
5616
5616
|
resolver: {
|
|
5617
|
-
test: (e) =>
|
|
5617
|
+
test: (e) => b(e, ".atlas"),
|
|
5618
5618
|
parse: (e) => {
|
|
5619
5619
|
let t = e.split(".");
|
|
5620
5620
|
return {
|
|
5621
|
-
resolution: parseFloat(
|
|
5621
|
+
resolution: parseFloat(m.RETINA_PREFIX?.exec(e)?.[1] ?? "1"),
|
|
5622
5622
|
format: t[t.length - 2],
|
|
5623
5623
|
src: e
|
|
5624
5624
|
};
|
|
@@ -5626,44 +5626,44 @@ var an = class e extends Ie {
|
|
|
5626
5626
|
},
|
|
5627
5627
|
loader: {
|
|
5628
5628
|
extension: {
|
|
5629
|
-
type:
|
|
5630
|
-
priority:
|
|
5629
|
+
type: u.LoadParser,
|
|
5630
|
+
priority: p.Normal,
|
|
5631
5631
|
name: "spineTextureAtlasLoader"
|
|
5632
5632
|
},
|
|
5633
5633
|
test(e) {
|
|
5634
|
-
return
|
|
5634
|
+
return b(e, ".atlas");
|
|
5635
5635
|
},
|
|
5636
5636
|
async load(e) {
|
|
5637
|
-
return await (await
|
|
5637
|
+
return await (await l.get().fetch(e)).text();
|
|
5638
5638
|
},
|
|
5639
5639
|
testParse(e, t) {
|
|
5640
|
-
let n =
|
|
5640
|
+
let n = b(t.src, ".atlas"), r = typeof e == "string";
|
|
5641
5641
|
return Promise.resolve(n && r);
|
|
5642
5642
|
},
|
|
5643
5643
|
unload(e) {
|
|
5644
5644
|
e.dispose();
|
|
5645
5645
|
},
|
|
5646
5646
|
async parse(e, t, n) {
|
|
5647
|
-
let r = t.data || {}, i =
|
|
5647
|
+
let r = t.data || {}, i = j.dirname(t.src);
|
|
5648
5648
|
i && i.lastIndexOf("/") !== i.length - 1 && (i += "/");
|
|
5649
|
-
let a = new
|
|
5650
|
-
if (r.images instanceof
|
|
5649
|
+
let a = new Ze(e);
|
|
5650
|
+
if (r.images instanceof _ || typeof r.images == "string") {
|
|
5651
5651
|
let e = r.images;
|
|
5652
5652
|
r.images = {}, r.images[a.pages[0].name] = e;
|
|
5653
5653
|
}
|
|
5654
5654
|
let o = [];
|
|
5655
5655
|
for (let e of a.pages) {
|
|
5656
5656
|
let t = e.name, a = r?.images ? r.images[t] : void 0;
|
|
5657
|
-
if (a instanceof
|
|
5657
|
+
if (a instanceof _) e.setTexture(xn.from(a));
|
|
5658
5658
|
else {
|
|
5659
5659
|
let s = {
|
|
5660
|
-
src: a ??
|
|
5660
|
+
src: a ?? j.normalize([...i.split(j.sep), t].join(j.sep)),
|
|
5661
5661
|
data: {
|
|
5662
5662
|
...r.imageMetadata,
|
|
5663
5663
|
alphaMode: e.pma ? "premultiplied-alpha" : "premultiply-alpha-on-upload"
|
|
5664
5664
|
}
|
|
5665
5665
|
}, c = n.load(s).then((t) => {
|
|
5666
|
-
e.setTexture(
|
|
5666
|
+
e.setTexture(xn.from(t.source));
|
|
5667
5667
|
});
|
|
5668
5668
|
o.push(c);
|
|
5669
5669
|
}
|
|
@@ -5674,35 +5674,257 @@ var an = class e extends Ie {
|
|
|
5674
5674
|
};
|
|
5675
5675
|
//#endregion
|
|
5676
5676
|
//#region src/plugins/spine/pixi-spine/assets/skeletonLoader.ts
|
|
5677
|
-
function
|
|
5677
|
+
function Cn(e) {
|
|
5678
5678
|
return Object.prototype.hasOwnProperty.call(e, "bones");
|
|
5679
5679
|
}
|
|
5680
|
-
function
|
|
5680
|
+
function wn(e) {
|
|
5681
5681
|
return e instanceof Uint8Array;
|
|
5682
5682
|
}
|
|
5683
|
-
var
|
|
5684
|
-
extension:
|
|
5683
|
+
var Tn = {
|
|
5684
|
+
extension: u.Asset,
|
|
5685
5685
|
loader: {
|
|
5686
5686
|
extension: {
|
|
5687
|
-
type:
|
|
5688
|
-
priority:
|
|
5687
|
+
type: u.LoadParser,
|
|
5688
|
+
priority: p.Normal,
|
|
5689
5689
|
name: "spineSkeletonLoader"
|
|
5690
5690
|
},
|
|
5691
5691
|
test(e) {
|
|
5692
|
-
return
|
|
5692
|
+
return b(e, ".skel");
|
|
5693
5693
|
},
|
|
5694
5694
|
async load(e) {
|
|
5695
|
-
let t = await
|
|
5695
|
+
let t = await l.get().fetch(e);
|
|
5696
5696
|
return new Uint8Array(await t.arrayBuffer());
|
|
5697
5697
|
},
|
|
5698
5698
|
testParse(e, t) {
|
|
5699
|
-
let n =
|
|
5699
|
+
let n = b(t.src, ".json") && Cn(e), r = b(t.src, ".skel") && wn(e);
|
|
5700
5700
|
return Promise.resolve(n || r);
|
|
5701
5701
|
}
|
|
5702
5702
|
}
|
|
5703
|
-
},
|
|
5704
|
-
|
|
5705
|
-
|
|
5703
|
+
}, En = new Float32Array(1), Dn = new Uint32Array(1), On = class extends d {
|
|
5704
|
+
constructor() {
|
|
5705
|
+
let e = new r({
|
|
5706
|
+
data: En,
|
|
5707
|
+
label: "attribute-batch-buffer",
|
|
5708
|
+
usage: i.VERTEX | i.COPY_DST,
|
|
5709
|
+
shrinkToFit: !1
|
|
5710
|
+
}), t = new r({
|
|
5711
|
+
data: Dn,
|
|
5712
|
+
label: "index-batch-buffer",
|
|
5713
|
+
usage: i.INDEX | i.COPY_DST,
|
|
5714
|
+
shrinkToFit: !1
|
|
5715
|
+
});
|
|
5716
|
+
super({
|
|
5717
|
+
attributes: {
|
|
5718
|
+
aPosition: {
|
|
5719
|
+
buffer: e,
|
|
5720
|
+
format: "float32x2",
|
|
5721
|
+
stride: 28,
|
|
5722
|
+
offset: 0
|
|
5723
|
+
},
|
|
5724
|
+
aUV: {
|
|
5725
|
+
buffer: e,
|
|
5726
|
+
format: "float32x2",
|
|
5727
|
+
stride: 28,
|
|
5728
|
+
offset: 8
|
|
5729
|
+
},
|
|
5730
|
+
aColor: {
|
|
5731
|
+
buffer: e,
|
|
5732
|
+
format: "unorm8x4",
|
|
5733
|
+
stride: 28,
|
|
5734
|
+
offset: 16
|
|
5735
|
+
},
|
|
5736
|
+
aDarkColor: {
|
|
5737
|
+
buffer: e,
|
|
5738
|
+
format: "unorm8x4",
|
|
5739
|
+
stride: 28,
|
|
5740
|
+
offset: 20
|
|
5741
|
+
},
|
|
5742
|
+
aTextureIdAndRound: {
|
|
5743
|
+
buffer: e,
|
|
5744
|
+
format: "uint16x2",
|
|
5745
|
+
stride: 28,
|
|
5746
|
+
offset: 24
|
|
5747
|
+
}
|
|
5748
|
+
},
|
|
5749
|
+
indexBuffer: t
|
|
5750
|
+
});
|
|
5751
|
+
}
|
|
5752
|
+
}, kn = {
|
|
5753
|
+
name: "color-bit",
|
|
5754
|
+
vertex: {
|
|
5755
|
+
header: "\n @in aDarkColor: vec4<f32>;\n @out vDarkColor: vec4<f32>;\n ",
|
|
5756
|
+
main: "\n vDarkColor = aDarkColor;\n "
|
|
5757
|
+
},
|
|
5758
|
+
fragment: {
|
|
5759
|
+
header: "\n @in vDarkColor: vec4<f32>;\n ",
|
|
5760
|
+
end: "\n\n let alpha = outColor.a * vColor.a;\n let rgb = ((outColor.a - 1.0) * vDarkColor.a + 1.0 - outColor.rgb) * vDarkColor.rgb + outColor.rgb * vColor.rgb;\n\n finalColor = vec4<f32>(rgb, alpha);\n\n "
|
|
5761
|
+
}
|
|
5762
|
+
}, An = {
|
|
5763
|
+
name: "color-bit",
|
|
5764
|
+
vertex: {
|
|
5765
|
+
header: "\n in vec4 aDarkColor;\n out vec4 vDarkColor;\n ",
|
|
5766
|
+
main: "\n vDarkColor = aDarkColor;\n "
|
|
5767
|
+
},
|
|
5768
|
+
fragment: {
|
|
5769
|
+
header: "\n in vec4 vDarkColor;\n ",
|
|
5770
|
+
end: "\n\n finalColor.a = outColor.a * vColor.a;\n finalColor.rgb = ((outColor.a - 1.0) * vDarkColor.a + 1.0 - outColor.rgb) * vDarkColor.rgb + outColor.rgb * vColor.rgb;\n "
|
|
5771
|
+
}
|
|
5772
|
+
}, jn = class extends h {
|
|
5773
|
+
constructor(e) {
|
|
5774
|
+
let t = w({
|
|
5775
|
+
name: "dark-tint-batch",
|
|
5776
|
+
bits: [
|
|
5777
|
+
C,
|
|
5778
|
+
An,
|
|
5779
|
+
k(e),
|
|
5780
|
+
M
|
|
5781
|
+
]
|
|
5782
|
+
}), n = T({
|
|
5783
|
+
name: "dark-tint-batch",
|
|
5784
|
+
bits: [
|
|
5785
|
+
S,
|
|
5786
|
+
kn,
|
|
5787
|
+
O(e),
|
|
5788
|
+
ee
|
|
5789
|
+
]
|
|
5790
|
+
});
|
|
5791
|
+
super({
|
|
5792
|
+
glProgram: t,
|
|
5793
|
+
gpuProgram: n,
|
|
5794
|
+
resources: { batchSamplers: A(e) }
|
|
5795
|
+
});
|
|
5796
|
+
}
|
|
5797
|
+
}, Mn = null, Nn = class e extends n {
|
|
5798
|
+
constructor(...t) {
|
|
5799
|
+
super(...t), this.geometry = new On(), this.shader = Mn ||= new jn(this.maxTextures), this.name = e.extension.name, this.vertexSize = 7;
|
|
5800
|
+
}
|
|
5801
|
+
static {
|
|
5802
|
+
this.extension = {
|
|
5803
|
+
type: [u.Batcher],
|
|
5804
|
+
name: "darkTint"
|
|
5805
|
+
};
|
|
5806
|
+
}
|
|
5807
|
+
packAttributes(e, t, n, r, i) {
|
|
5808
|
+
let a = i << 16 | e.roundPixels & 65535, s = e.transform, c = s.a, l = s.b, u = s.c, d = s.d, f = s.tx, p = s.ty, { positions: m, uvs: h } = e, g = e.color, _ = (g >> 24 & 255) / 255, v = o.shared.setValue(e.darkColor).premultiply(_, !0).toPremultiplied(1, !1), y = e.attributeOffset, b = y + e.attributeSize;
|
|
5809
|
+
for (let e = y; e < b; e++) {
|
|
5810
|
+
let i = e * 2, o = m[i], s = m[i + 1];
|
|
5811
|
+
t[r++] = c * o + u * s + f, t[r++] = d * s + l * o + p, t[r++] = h[i], t[r++] = h[i + 1], n[r++] = g, n[r++] = v, n[r++] = a;
|
|
5812
|
+
}
|
|
5813
|
+
}
|
|
5814
|
+
packQuadAttributes(e, t, n, r, i) {
|
|
5815
|
+
let a = e.texture, o = e.transform, s = o.a, c = o.b, l = o.c, u = o.d, d = o.tx, f = o.ty, p = e.bounds, m = p.maxX, h = p.minX, g = p.maxY, _ = p.minY, v = a.uvs, y = e.color, b = e.darkColor, x = i << 16 | e.roundPixels & 65535;
|
|
5816
|
+
t[r + 0] = s * h + l * _ + d, t[r + 1] = u * _ + c * h + f, t[r + 2] = v.x0, t[r + 3] = v.y0, n[r + 4] = y, n[r + 5] = b, n[r + 6] = x, t[r + 7] = s * m + l * _ + d, t[r + 8] = u * _ + c * m + f, t[r + 9] = v.x1, t[r + 10] = v.y1, n[r + 11] = y, n[r + 12] = b, n[r + 13] = x, t[r + 14] = s * m + l * g + d, t[r + 15] = u * g + c * m + f, t[r + 16] = v.x2, t[r + 17] = v.y2, n[r + 18] = y, n[r + 19] = b, n[r + 20] = x, t[r + 21] = s * h + l * g + d, t[r + 22] = u * g + c * h + f, t[r + 23] = v.x3, t[r + 24] = v.y3, n[r + 25] = y, n[r + 26] = b, n[r + 27] = x;
|
|
5817
|
+
}
|
|
5818
|
+
};
|
|
5819
|
+
E.add(Nn);
|
|
5820
|
+
//#endregion
|
|
5821
|
+
//#region src/plugins/spine/pixi-spine/BatchableSpineSlot.ts
|
|
5822
|
+
var Pn = class {
|
|
5823
|
+
constructor() {
|
|
5824
|
+
this.indexOffset = 0, this.attributeOffset = 0, this.batcherName = "darkTint", this.topology = "triangle-list", this.packAsQuad = !1;
|
|
5825
|
+
}
|
|
5826
|
+
get color() {
|
|
5827
|
+
let e = this.data.color, t = this.renderable.groupColor, n = this.renderable.groupAlpha, r, i = e.a * n * 255;
|
|
5828
|
+
if (t !== 16777215) {
|
|
5829
|
+
let n = t >> 16 & 255, a = t >> 8 & 255, o = t & 255, s = e.r * o, c = e.g * a, l = e.b * n;
|
|
5830
|
+
r = i << 24 | l << 16 | c << 8 | s;
|
|
5831
|
+
} else r = i << 24 | e.b * 255 << 16 | e.g * 255 << 8 | e.r * 255;
|
|
5832
|
+
return r;
|
|
5833
|
+
}
|
|
5834
|
+
get darkColor() {
|
|
5835
|
+
let e = this.data.darkColor;
|
|
5836
|
+
return e.b * 255 << 16 | e.g * 255 << 8 | e.r * 255;
|
|
5837
|
+
}
|
|
5838
|
+
get groupTransform() {
|
|
5839
|
+
return this.renderable.groupTransform;
|
|
5840
|
+
}
|
|
5841
|
+
setData(e, t, n, r) {
|
|
5842
|
+
if (this.renderable = e, this.transform = e.groupTransform, this.data = t, t.clipped) {
|
|
5843
|
+
let e = t.clippedData;
|
|
5844
|
+
this.indexSize = e.indicesCount, this.attributeSize = e.vertexCount, this.positions = e.vertices, this.indices = e.indices, this.uvs = e.uvs;
|
|
5845
|
+
} else this.indexSize = t.indices.length, this.attributeSize = t.vertices.length / 2, this.positions = t.vertices, this.indices = t.indices, this.uvs = t.uvs;
|
|
5846
|
+
this.texture = t.texture, this.roundPixels = r, this.blendMode = n, this.batcherName = t.darkTint ? "darkTint" : "default";
|
|
5847
|
+
}
|
|
5848
|
+
}, Fn = {
|
|
5849
|
+
0: "normal",
|
|
5850
|
+
1: "add",
|
|
5851
|
+
2: "multiply",
|
|
5852
|
+
3: "screen"
|
|
5853
|
+
}, In = class {
|
|
5854
|
+
static {
|
|
5855
|
+
this.extension = {
|
|
5856
|
+
type: [
|
|
5857
|
+
u.WebGLPipes,
|
|
5858
|
+
u.WebGPUPipes,
|
|
5859
|
+
u.CanvasPipes
|
|
5860
|
+
],
|
|
5861
|
+
name: "spine"
|
|
5862
|
+
};
|
|
5863
|
+
}
|
|
5864
|
+
constructor(e) {
|
|
5865
|
+
this.gpuSpineData = {}, this._destroyRenderableBound = this.destroyRenderable.bind(this), this.renderer = e;
|
|
5866
|
+
}
|
|
5867
|
+
validateRenderable(e) {
|
|
5868
|
+
if (e._validateAndTransformAttachments(), e.spineAttachmentsDirty) return !0;
|
|
5869
|
+
if (e.spineTexturesDirty) {
|
|
5870
|
+
let t = e.skeleton.drawOrder, n = this.gpuSpineData[e.uid];
|
|
5871
|
+
for (let r = 0, i = t.length; r < i; r++) {
|
|
5872
|
+
let i = t[r], a = i.getAttachment();
|
|
5873
|
+
if (a instanceof it || a instanceof tt) {
|
|
5874
|
+
let t = e._getCachedData(i, a), r = n.slotBatches[t.id], o = t.texture;
|
|
5875
|
+
if (o !== r.texture && !r._batcher.checkAndUpdateTexture(r, o)) return !0;
|
|
5876
|
+
}
|
|
5877
|
+
}
|
|
5878
|
+
}
|
|
5879
|
+
return !1;
|
|
5880
|
+
}
|
|
5881
|
+
addRenderable(e, t) {
|
|
5882
|
+
let n = this._getSpineData(e), r = this.renderer.renderPipes.batch, i = e.skeleton.drawOrder, a = this.renderer._roundPixels | e._roundPixels;
|
|
5883
|
+
e._validateAndTransformAttachments();
|
|
5884
|
+
for (let o = 0, s = i.length; o < s; o++) {
|
|
5885
|
+
let s = i[o], c = s.getAttachment(), l = Fn[s.data.blendMode];
|
|
5886
|
+
if (c instanceof it || c instanceof tt) {
|
|
5887
|
+
let i = e._getCachedData(s, c), o = n.slotBatches[i.id] ||= new Pn();
|
|
5888
|
+
o.setData(e, i, l, a), i.skipRender || r.addToBatch(o, t);
|
|
5889
|
+
}
|
|
5890
|
+
let u = e._slotsObject[s.data.name];
|
|
5891
|
+
if (u) {
|
|
5892
|
+
let e = u.container;
|
|
5893
|
+
e.includeInBuild = !0, x(e, t, this.renderer), e.includeInBuild = !1;
|
|
5894
|
+
}
|
|
5895
|
+
}
|
|
5896
|
+
}
|
|
5897
|
+
updateRenderable(e) {
|
|
5898
|
+
let t = this.gpuSpineData[e.uid];
|
|
5899
|
+
e._validateAndTransformAttachments();
|
|
5900
|
+
let n = e.skeleton.drawOrder;
|
|
5901
|
+
for (let r = 0, i = n.length; r < i; r++) {
|
|
5902
|
+
let i = n[r], a = i.getAttachment();
|
|
5903
|
+
if ((a instanceof it || a instanceof tt) && !e._getCachedData(i, a).skipRender) {
|
|
5904
|
+
let n = t.slotBatches[e._getCachedData(i, a).id];
|
|
5905
|
+
n._batcher?.updateElement(n);
|
|
5906
|
+
}
|
|
5907
|
+
}
|
|
5908
|
+
}
|
|
5909
|
+
destroyRenderable(e) {
|
|
5910
|
+
this.gpuSpineData[e.uid] = null, e.off("destroyed", this._destroyRenderableBound);
|
|
5911
|
+
}
|
|
5912
|
+
destroy() {
|
|
5913
|
+
this.gpuSpineData = null, this.renderer = null;
|
|
5914
|
+
}
|
|
5915
|
+
_getSpineData(e) {
|
|
5916
|
+
return this.gpuSpineData[e.uid] || this._initMeshData(e);
|
|
5917
|
+
}
|
|
5918
|
+
_initMeshData(e) {
|
|
5919
|
+
return this.gpuSpineData[e.uid] = { slotBatches: {} }, e.on("destroyed", this._destroyRenderableBound), this.gpuSpineData[e.uid];
|
|
5920
|
+
}
|
|
5921
|
+
};
|
|
5922
|
+
E.add(In);
|
|
5923
|
+
//#endregion
|
|
5924
|
+
//#region src/plugins/spine/pixi-spine/Spine.ts
|
|
5925
|
+
var Ln = new R();
|
|
5926
|
+
bt.yDown = !0;
|
|
5927
|
+
var Rn = new gn(), zn = new L(() => new f()), Bn = class e extends y {
|
|
5706
5928
|
getSlotFromRef(e) {
|
|
5707
5929
|
let t;
|
|
5708
5930
|
if (t = typeof e == "number" ? this.skeleton.slots[e] : typeof e == "string" ? this.skeleton.findSlot(e) : e, !t) throw Error(`No slot found with the given slot reference: ${e}`);
|
|
@@ -5718,12 +5940,12 @@ var dn = new en(), fn = new S(() => new s()), pn = class e extends p {
|
|
|
5718
5940
|
return this._autoUpdate;
|
|
5719
5941
|
}
|
|
5720
5942
|
set autoUpdate(e) {
|
|
5721
|
-
e ?
|
|
5943
|
+
e ? v.shared.add(this.internalUpdate, this) : v.shared.remove(this.internalUpdate, this), this._autoUpdate = e;
|
|
5722
5944
|
}
|
|
5723
5945
|
constructor(e) {
|
|
5724
|
-
e instanceof
|
|
5725
|
-
let t = e instanceof
|
|
5726
|
-
this.skeleton = new
|
|
5946
|
+
e instanceof Ct && (e = { skeletonData: e }), super({}), this.batched = !0, this.buildId = 0, this.renderPipeId = "spine", this._didSpineUpdate = !1, this.beforeUpdateWorldTransforms = () => {}, this.afterUpdateWorldTransforms = () => {}, this.darkTint = !1, this._debug = void 0, this._slotsObject = Object.create(null), this.clippingSlotToPixiMasks = Object.create(null), this.spineAttachmentsDirty = !0, this.spineTexturesDirty = !0, this._lastAttachments = [], this._stateChanged = !0, this.attachmentCacheData = [], this._autoUpdate = !0, this.hasNeverUpdated = !0;
|
|
5947
|
+
let t = e instanceof Ct ? e : e.skeletonData;
|
|
5948
|
+
this.skeleton = new bt(t), this.state = new He(new Ge(t)), this.autoUpdate = e?.autoUpdate ?? !0, this.darkTint = e?.darkTint === void 0 ? this.skeleton.slots.some((e) => !!e.data.darkColor) : e?.darkTint;
|
|
5727
5949
|
let n = this.skeleton.slots;
|
|
5728
5950
|
for (let e = 0; e < n.length; e++) this.attachmentCacheData[e] = Object.create(null);
|
|
5729
5951
|
}
|
|
@@ -5731,7 +5953,7 @@ var dn = new en(), fn = new S(() => new s()), pn = class e extends p {
|
|
|
5731
5953
|
this.internalUpdate(0, e);
|
|
5732
5954
|
}
|
|
5733
5955
|
internalUpdate(e, t) {
|
|
5734
|
-
this._updateAndApplyState(t ??
|
|
5956
|
+
this._updateAndApplyState(t ?? v.shared.deltaMS / 1e3);
|
|
5735
5957
|
}
|
|
5736
5958
|
get bounds() {
|
|
5737
5959
|
return this._boundsDirty && this.updateBounds(), this._bounds;
|
|
@@ -5739,10 +5961,10 @@ var dn = new en(), fn = new S(() => new s()), pn = class e extends p {
|
|
|
5739
5961
|
setBonePosition(e, t) {
|
|
5740
5962
|
let n = e;
|
|
5741
5963
|
if (typeof e == "string" && (e = this.skeleton.findBone(e)), !e) throw Error(`Cant set bone position, bone ${String(n)} not found`);
|
|
5742
|
-
if (
|
|
5743
|
-
let t = e.parent.worldToLocal(
|
|
5964
|
+
if (Ln.set(t.x, t.y), e.parent) {
|
|
5965
|
+
let t = e.parent.worldToLocal(Ln);
|
|
5744
5966
|
e.x = t.x, e.y = -t.y;
|
|
5745
|
-
} else e.x =
|
|
5967
|
+
} else e.x = Ln.x, e.y = Ln.y;
|
|
5746
5968
|
}
|
|
5747
5969
|
getBonePosition(e, t) {
|
|
5748
5970
|
let n = e;
|
|
@@ -5754,7 +5976,7 @@ var dn = new en(), fn = new S(() => new s()), pn = class e extends p {
|
|
|
5754
5976
|
_updateAndApplyState(e) {
|
|
5755
5977
|
this.hasNeverUpdated = !1, this.state.update(e), this.skeleton.update(e);
|
|
5756
5978
|
let { skeleton: t } = this;
|
|
5757
|
-
this.state.apply(t), this.beforeUpdateWorldTransforms(this), t.updateWorldTransform(
|
|
5979
|
+
this.state.apply(t), this.beforeUpdateWorldTransforms(this), t.updateWorldTransform(xt.update), this.afterUpdateWorldTransforms(this), this.updateSlotObjects(), this._stateChanged = !0, this._boundsDirty = !0, this.onViewUpdate();
|
|
5758
5980
|
}
|
|
5759
5981
|
_validateAndTransformAttachments() {
|
|
5760
5982
|
this._stateChanged && (this._stateChanged = !1, this.validateAttachments(), this.transformAttachments());
|
|
@@ -5769,7 +5991,7 @@ var dn = new en(), fn = new S(() => new s()), pn = class e extends p {
|
|
|
5769
5991
|
}
|
|
5770
5992
|
updateAndSetPixiMask(e, t) {
|
|
5771
5993
|
let n = e.attachment;
|
|
5772
|
-
if (n && n instanceof
|
|
5994
|
+
if (n && n instanceof qe) {
|
|
5773
5995
|
let t = this.clippingSlotToPixiMasks[e.data.name] ||= {
|
|
5774
5996
|
slot: e,
|
|
5775
5997
|
vertices: []
|
|
@@ -5780,7 +6002,7 @@ var dn = new en(), fn = new S(() => new s()), pn = class e extends p {
|
|
|
5780
6002
|
let r = this.currentClippingSlot, i = this._slotsObject[e.data.name];
|
|
5781
6003
|
if (r && i) {
|
|
5782
6004
|
let e = r.slot, t = e.attachment, n = r.mask;
|
|
5783
|
-
if (n || (n =
|
|
6005
|
+
if (n || (n = zn.obtain(), r.mask = n, this.addChild(n)), !r.maskComputed) {
|
|
5784
6006
|
r.maskComputed = !0;
|
|
5785
6007
|
let i = t.worldVerticesLength, a = r.vertices;
|
|
5786
6008
|
t.computeWorldVertices(e, 0, i, a, 0, 2), n.clear().poly(a).stroke({ width: 0 }).fill({ alpha: .25 });
|
|
@@ -5789,7 +6011,7 @@ var dn = new en(), fn = new S(() => new s()), pn = class e extends p {
|
|
|
5789
6011
|
} else i?.container.mask && (i.container.mask = null);
|
|
5790
6012
|
if (r && r.slot.attachment.endSlot == e.data && (this.currentClippingSlot = void 0), t) for (let e in this.clippingSlotToPixiMasks) {
|
|
5791
6013
|
let t = this.clippingSlotToPixiMasks[e];
|
|
5792
|
-
(!(t.slot.attachment instanceof
|
|
6014
|
+
(!(t.slot.attachment instanceof qe) || !t.maskComputed) && t.mask && (this.removeChild(t.mask), zn.free(t.mask), t.mask = void 0);
|
|
5793
6015
|
}
|
|
5794
6016
|
}
|
|
5795
6017
|
transformAttachments() {
|
|
@@ -5799,25 +6021,25 @@ var dn = new en(), fn = new S(() => new s()), pn = class e extends p {
|
|
|
5799
6021
|
this.updateAndSetPixiMask(n, t === e.length - 1);
|
|
5800
6022
|
let r = n.getAttachment();
|
|
5801
6023
|
if (r) {
|
|
5802
|
-
if (r instanceof
|
|
6024
|
+
if (r instanceof tt || r instanceof it) {
|
|
5803
6025
|
let e = this._getCachedData(n, r);
|
|
5804
|
-
r instanceof
|
|
6026
|
+
r instanceof it ? r.computeWorldVertices(n, e.vertices, 0, 2) : r.computeWorldVertices(n, 0, r.worldVerticesLength, e.vertices, 0, 2), e.uvs.length < r.uvs.length && (e.uvs = new Float32Array(r.uvs.length)), D(r.uvs.buffer, e.uvs.buffer);
|
|
5805
6027
|
let t = n.bone.skeleton.color, i = n.color, a = r.color;
|
|
5806
6028
|
e.color.set(t.r * i.r * a.r, t.g * i.g * a.g, t.b * i.b * a.b, t.a * i.a * a.a), n.darkColor && e.darkColor.setFromColor(n.darkColor), e.skipRender = e.clipped = !1;
|
|
5807
|
-
let o = r.region?.texture.texture ||
|
|
5808
|
-
e.texture !== o && (e.texture = o, this.spineTexturesDirty = !0),
|
|
5809
|
-
} else if (r instanceof
|
|
5810
|
-
|
|
6029
|
+
let o = r.region?.texture.texture || g.EMPTY;
|
|
6030
|
+
e.texture !== o && (e.texture = o, this.spineTexturesDirty = !0), Rn.isClipping() && this.updateClippingData(e);
|
|
6031
|
+
} else if (r instanceof qe) {
|
|
6032
|
+
Rn.clipStart(n, r);
|
|
5811
6033
|
continue;
|
|
5812
6034
|
}
|
|
5813
6035
|
}
|
|
5814
|
-
|
|
6036
|
+
Rn.clipEndWithSlot(n);
|
|
5815
6037
|
}
|
|
5816
|
-
|
|
6038
|
+
Rn.clipEnd();
|
|
5817
6039
|
}
|
|
5818
6040
|
updateClippingData(e) {
|
|
5819
|
-
e.clipped = !0,
|
|
5820
|
-
let { clippedVertices: t, clippedUVs: n, clippedTriangles: r } =
|
|
6041
|
+
e.clipped = !0, Rn.clipTrianglesUnpacked(e.vertices, e.indices, e.indices.length, e.uvs);
|
|
6042
|
+
let { clippedVertices: t, clippedUVs: n, clippedTriangles: r } = Rn, i = t.length / 2, a = r.length;
|
|
5821
6043
|
e.clippedData || (e.clippedData = {
|
|
5822
6044
|
vertices: new Float32Array(i * 2),
|
|
5823
6045
|
uvs: new Float32Array(i * 2),
|
|
@@ -5843,7 +6065,7 @@ var dn = new en(), fn = new S(() => new s()), pn = class e extends p {
|
|
|
5843
6065
|
let { slot: t, container: n } = e;
|
|
5844
6066
|
if (n.visible = this.skeleton.drawOrder.includes(t), n.visible) {
|
|
5845
6067
|
let e = t.bone;
|
|
5846
|
-
n.position.set(e.worldX, e.worldY), n.scale.x = e.getWorldScaleX(), n.scale.y = e.getWorldScaleY(), n.rotation = e.getWorldRotationX() *
|
|
6068
|
+
n.position.set(e.worldX, e.worldY), n.scale.x = e.getWorldScaleX(), n.scale.y = e.getWorldScaleY(), n.rotation = e.getWorldRotationX() * c, n.alpha = this.skeleton.color.a * t.color.a;
|
|
5847
6069
|
}
|
|
5848
6070
|
}
|
|
5849
6071
|
_getCachedData(e, t) {
|
|
@@ -5851,7 +6073,7 @@ var dn = new en(), fn = new S(() => new s()), pn = class e extends p {
|
|
|
5851
6073
|
}
|
|
5852
6074
|
initCachedData(e, t) {
|
|
5853
6075
|
let n;
|
|
5854
|
-
return t instanceof
|
|
6076
|
+
return t instanceof it ? (n = new Float32Array(8), this.attachmentCacheData[e.data.index][t.name] = {
|
|
5855
6077
|
id: `${e.data.index}-${t.name}`,
|
|
5856
6078
|
vertices: n,
|
|
5857
6079
|
clipped: !1,
|
|
@@ -5864,8 +6086,8 @@ var dn = new en(), fn = new S(() => new s()), pn = class e extends p {
|
|
|
5864
6086
|
3
|
|
5865
6087
|
],
|
|
5866
6088
|
uvs: new Float32Array(t.uvs.length),
|
|
5867
|
-
color: new
|
|
5868
|
-
darkColor: new
|
|
6089
|
+
color: new P(1, 1, 1, 1),
|
|
6090
|
+
darkColor: new P(0, 0, 0, 0),
|
|
5869
6091
|
darkTint: this.darkTint,
|
|
5870
6092
|
skipRender: !1,
|
|
5871
6093
|
texture: t.region?.texture.texture
|
|
@@ -5875,8 +6097,8 @@ var dn = new en(), fn = new S(() => new s()), pn = class e extends p {
|
|
|
5875
6097
|
clipped: !1,
|
|
5876
6098
|
indices: t.triangles,
|
|
5877
6099
|
uvs: new Float32Array(t.uvs.length),
|
|
5878
|
-
color: new
|
|
5879
|
-
darkColor: new
|
|
6100
|
+
color: new P(1, 1, 1, 1),
|
|
6101
|
+
darkColor: new P(0, 0, 0, 0),
|
|
5880
6102
|
darkTint: this.darkTint,
|
|
5881
6103
|
skipRender: !1,
|
|
5882
6104
|
texture: t.region?.texture.texture
|
|
@@ -5903,7 +6125,7 @@ var dn = new en(), fn = new S(() => new s()), pn = class e extends p {
|
|
|
5903
6125
|
}
|
|
5904
6126
|
removeSlotObject(e) {
|
|
5905
6127
|
let t;
|
|
5906
|
-
if (e instanceof
|
|
6128
|
+
if (e instanceof s) {
|
|
5907
6129
|
for (let n in this._slotsObject) if (this._slotsObject[n]?.container === e) {
|
|
5908
6130
|
this._slotsObject[n] = null, t = e;
|
|
5909
6131
|
break;
|
|
@@ -5918,7 +6140,7 @@ var dn = new en(), fn = new S(() => new s()), pn = class e extends p {
|
|
|
5918
6140
|
return e = this.getSlotFromRef(e), this._slotsObject[e.data.name]?.container;
|
|
5919
6141
|
}
|
|
5920
6142
|
updateBounds() {
|
|
5921
|
-
this._boundsDirty = !1, this.skeletonBounds ||= new
|
|
6143
|
+
this._boundsDirty = !1, this.skeletonBounds ||= new mn();
|
|
5922
6144
|
let e = this.skeletonBounds;
|
|
5923
6145
|
if (e.update(this.skeleton, !0), e.minX === Infinity) {
|
|
5924
6146
|
this.hasNeverUpdated && (this._updateAndApplyState(0), this._boundsDirty = !1), this._validateAndTransformAttachments();
|
|
@@ -5926,7 +6148,7 @@ var dn = new en(), fn = new S(() => new s()), pn = class e extends p {
|
|
|
5926
6148
|
t.clear();
|
|
5927
6149
|
for (let n = 0; n < e.length; n++) {
|
|
5928
6150
|
let r = e[n], i = r.getAttachment();
|
|
5929
|
-
if (i && (i instanceof
|
|
6151
|
+
if (i && (i instanceof it || i instanceof tt)) {
|
|
5930
6152
|
let e = this._getCachedData(r, i);
|
|
5931
6153
|
t.addVertexData(e.vertices, 0, e.vertices.length);
|
|
5932
6154
|
}
|
|
@@ -5937,7 +6159,7 @@ var dn = new en(), fn = new S(() => new s()), pn = class e extends p {
|
|
|
5937
6159
|
e.addBounds(this.bounds);
|
|
5938
6160
|
}
|
|
5939
6161
|
destroy(e = !1) {
|
|
5940
|
-
super.destroy(e),
|
|
6162
|
+
super.destroy(e), v.shared.remove(this.internalUpdate, this), this.state.clearListeners(), this.debug = void 0, this.skeleton = null, this.state = null, this._slotsObject = null, this._lastAttachments.length = 0, this.attachmentCacheData = null;
|
|
5941
6163
|
}
|
|
5942
6164
|
skeletonToPixiWorldCoordinates(e) {
|
|
5943
6165
|
this.worldTransform.apply(e, e);
|
|
@@ -5948,27 +6170,27 @@ var dn = new en(), fn = new S(() => new s()), pn = class e extends p {
|
|
|
5948
6170
|
pixiWorldCoordinatesToBone(e, t) {
|
|
5949
6171
|
this.pixiWorldCoordinatesToSkeleton(e), t.parent ? t.parent.worldToLocal(e) : t.worldToLocal(e);
|
|
5950
6172
|
}
|
|
5951
|
-
static from({ skeleton:
|
|
5952
|
-
let c = `${
|
|
5953
|
-
if (
|
|
5954
|
-
let l = t.get(
|
|
5955
|
-
d.scale =
|
|
6173
|
+
static from({ skeleton: n, atlas: r, scale: i = 1, darkTint: o, autoUpdate: s = !0 }) {
|
|
6174
|
+
let c = `${n}-${r}-${i}`;
|
|
6175
|
+
if (a.has(c)) return new e(a.get(c));
|
|
6176
|
+
let l = t.get(n), u = new at(t.get(r)), d = l instanceof Uint8Array ? new kt(u) : new _n(u);
|
|
6177
|
+
d.scale = i;
|
|
5956
6178
|
let f = d.readSkeletonData(l);
|
|
5957
|
-
return
|
|
6179
|
+
return a.set(c, f), new e({
|
|
5958
6180
|
skeletonData: f,
|
|
5959
6181
|
darkTint: o,
|
|
5960
6182
|
autoUpdate: s
|
|
5961
6183
|
});
|
|
5962
6184
|
}
|
|
5963
|
-
},
|
|
6185
|
+
}, Vn = class extends e {
|
|
5964
6186
|
constructor(...e) {
|
|
5965
6187
|
super(...e), this.id = "SpinePlugin";
|
|
5966
6188
|
}
|
|
5967
6189
|
async initialize() {
|
|
5968
|
-
|
|
6190
|
+
E.add(Sn), E.add(Tn), E.add(In), E.add(Nn), window.Spine = Bn;
|
|
5969
6191
|
}
|
|
5970
6192
|
};
|
|
5971
6193
|
//#endregion
|
|
5972
|
-
export {
|
|
6194
|
+
export { Vn as SpinePlugin };
|
|
5973
6195
|
|
|
5974
|
-
//# sourceMappingURL=SpinePlugin-
|
|
6196
|
+
//# sourceMappingURL=SpinePlugin-DDzD-Qxd.js.map
|