@caperjs/core 0.2.4 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/assetpack.mjs +90 -0
- package/build/index.mjs +3 -1
- package/build/internal/discovery.mjs +1 -1
- package/build/internal/manifest.mjs +8 -3
- package/build/internal/validate.mjs +3 -1
- package/build/plugins/assetTypes.mjs +4 -4
- package/build/plugins/caperConfig.mjs +12 -5
- package/build/plugins/lists.mjs +29 -9
- package/build/plugins/pruneFallbacks.mjs +25 -2
- package/cli/create.mjs +57 -6
- package/cli/create.test.mjs +36 -0
- package/cli/update.mjs +1 -1
- package/lib/{CaptionsPlugin-WPAcfAkx.js → CaptionsPlugin-cSJj-R9M.js} +5 -5
- package/lib/{CaptionsPlugin-WPAcfAkx.js.map → CaptionsPlugin-cSJj-R9M.js.map} +1 -1
- package/lib/{DataAdapter-DS-twowe.js → DataAdapter-D2tc6hx9.js} +15 -10
- package/lib/DataAdapter-D2tc6hx9.js.map +1 -0
- package/lib/{DebugRenderer-D1ryrRYx.js → DebugRenderer-CGUKy6Fy.js} +2 -2
- package/lib/{DebugRenderer-D1ryrRYx.js.map → DebugRenderer-CGUKy6Fy.js.map} +1 -1
- package/lib/{DevToolsPlugin-DH7zX7HU.js → DevToolsPlugin-B8GX3H9b.js} +2 -2
- package/lib/{DevToolsPlugin-DH7zX7HU.js.map → DevToolsPlugin-B8GX3H9b.js.map} +1 -1
- package/lib/{GSAPPlugin-BBtRjUqe.js → GSAPPlugin-Br9AjuTD.js} +6 -6
- package/lib/{GSAPPlugin-BBtRjUqe.js.map → GSAPPlugin-Br9AjuTD.js.map} +1 -1
- package/lib/{LayoutPlugin-Co6vcoV4.js → LayoutPlugin-BX3OP7pw.js} +4 -4
- package/lib/{LayoutPlugin-Co6vcoV4.js.map → LayoutPlugin-BX3OP7pw.js.map} +1 -1
- package/lib/{SpinePlugin-uN641Hmk.js → SpinePlugin-C-JDdXpf.js} +690 -793
- package/lib/SpinePlugin-C-JDdXpf.js.map +1 -0
- package/lib/{StatsPlugin-vZQRm6wh.js → StatsPlugin-yJlJtoQ2.js} +7 -7
- package/lib/StatsPlugin-yJlJtoQ2.js.map +1 -0
- package/lib/{VoiceOverPlugin-KlZdGj1G.js → VoiceOverPlugin-DjSZp4Ko.js} +7 -6
- package/lib/VoiceOverPlugin-DjSZp4Ko.js.map +1 -0
- package/lib/caper.mjs +159 -1917
- package/lib/caper.mjs.map +1 -1
- package/lib/const-C3sxeYhl.js +1746 -0
- package/lib/const-C3sxeYhl.js.map +1 -0
- package/lib/core/Application.d.ts +8 -3
- package/lib/core/Application.d.ts.map +1 -1
- package/lib/core/Application.test.d.ts +2 -0
- package/lib/core/Application.test.d.ts.map +1 -0
- package/lib/core/config.d.ts +6 -1
- package/lib/core/config.d.ts.map +1 -1
- package/lib/core/config.test.d.ts +2 -0
- package/lib/core/config.test.d.ts.map +1 -0
- package/lib/core/create.d.ts.map +1 -1
- package/lib/core/interfaces/IApplication.d.ts +6 -6
- package/lib/core/interfaces/IApplication.d.ts.map +1 -1
- package/lib/core/interfaces/ICoreSignals.d.ts +2 -1
- package/lib/core/interfaces/ICoreSignals.d.ts.map +1 -1
- package/lib/display/Camera.test.d.ts +2 -0
- package/lib/display/Camera.test.d.ts.map +1 -0
- package/lib/display/Entity.d.ts +2 -2
- package/lib/display/SceneTransition.test.d.ts +1 -0
- package/lib/display/SceneTransition.test.d.ts.map +1 -0
- package/lib/display/SpineAnimation.d.ts +3 -3
- package/lib/mixins/factory/methods.d.ts.map +1 -1
- package/lib/padding-1kHDpGlQ.js +41 -0
- package/lib/padding-1kHDpGlQ.js.map +1 -0
- package/lib/plugins/AssetsPlugin.d.ts.map +1 -1
- package/lib/plugins/AssetsPlugin.test.d.ts +2 -0
- package/lib/plugins/AssetsPlugin.test.d.ts.map +1 -0
- package/lib/plugins/DataAdapter.d.ts.map +1 -1
- package/lib/plugins/DataAdapter.test.d.ts +2 -0
- package/lib/plugins/DataAdapter.test.d.ts.map +1 -0
- package/lib/plugins/FullScreenPlugin.d.ts +0 -5
- package/lib/plugins/FullScreenPlugin.d.ts.map +1 -1
- package/lib/plugins/FullScreenPlugin.test.d.ts +2 -0
- package/lib/plugins/FullScreenPlugin.test.d.ts.map +1 -0
- package/lib/plugins/GSAPPlugin.d.ts +0 -2
- package/lib/plugins/GSAPPlugin.d.ts.map +1 -1
- package/lib/plugins/GSAPPlugin.test.d.ts +2 -0
- package/lib/plugins/GSAPPlugin.test.d.ts.map +1 -0
- package/lib/plugins/KeyboardPlugin.d.ts +0 -1
- package/lib/plugins/KeyboardPlugin.d.ts.map +1 -1
- package/lib/plugins/LookupPlugin.d.ts +6 -1
- package/lib/plugins/LookupPlugin.d.ts.map +1 -1
- package/lib/plugins/LookupPlugin.test.d.ts +2 -0
- package/lib/plugins/LookupPlugin.test.d.ts.map +1 -0
- package/lib/plugins/Plugin.d.ts +101 -2
- package/lib/plugins/Plugin.d.ts.map +1 -1
- package/lib/plugins/PopupManagerPlugin.d.ts.map +1 -1
- package/lib/plugins/PopupManagerPlugin.test.d.ts +1 -0
- package/lib/plugins/PopupManagerPlugin.test.d.ts.map +1 -0
- package/lib/plugins/SceneManagerPlugin.d.ts +1 -1
- package/lib/plugins/SceneManagerPlugin.d.ts.map +1 -1
- package/lib/plugins/SceneManagerPlugin.test.d.ts +2 -0
- package/lib/plugins/SceneManagerPlugin.test.d.ts.map +1 -0
- package/lib/plugins/StatsPlugin.d.ts.map +1 -1
- package/lib/plugins/TimerPlugin.d.ts.map +1 -1
- package/lib/plugins/WebEventsPlugin.d.ts +0 -1
- package/lib/plugins/WebEventsPlugin.d.ts.map +1 -1
- package/lib/plugins/actions/ActionsPlugin.test.d.ts +2 -0
- package/lib/plugins/actions/ActionsPlugin.test.d.ts.map +1 -0
- package/lib/plugins/audio/AudioChannel.d.ts.map +1 -1
- package/lib/plugins/audio/AudioManagerPlugin.d.ts.map +1 -1
- package/lib/plugins/audio/AudioManagerPlugin.test.d.ts +2 -0
- package/lib/plugins/audio/AudioManagerPlugin.test.d.ts.map +1 -0
- package/lib/plugins/audio/VoiceOverPlugin.d.ts.map +1 -1
- package/lib/plugins/breakpoints/BreakpointPlugin.d.ts.map +1 -1
- package/lib/plugins/captions/CaptionsPlugin.test.d.ts +2 -0
- package/lib/plugins/captions/CaptionsPlugin.test.d.ts.map +1 -0
- package/lib/plugins/focus/FocusManagerPlugin.d.ts.map +1 -1
- package/lib/plugins/focus/FocusManagerPlugin.test.d.ts +2 -0
- package/lib/plugins/focus/FocusManagerPlugin.test.d.ts.map +1 -0
- package/lib/plugins/gesture/GesturePlugin.d.ts.map +1 -1
- package/lib/plugins/input/AbstractControls.d.ts +47 -3
- package/lib/plugins/input/AbstractControls.d.ts.map +1 -1
- package/lib/plugins/input/Controls.test.d.ts +2 -0
- package/lib/plugins/input/Controls.test.d.ts.map +1 -0
- package/lib/plugins/input/InputPlugin.d.ts.map +1 -1
- package/lib/plugins/input/controlsCore.d.ts +58 -0
- package/lib/plugins/input/controlsCore.d.ts.map +1 -0
- package/lib/plugins/input/controlsCore.test.d.ts +2 -0
- package/lib/plugins/input/controlsCore.test.d.ts.map +1 -0
- package/lib/plugins/input/keyboard/KeyboardControls.d.ts +15 -0
- package/lib/plugins/input/keyboard/KeyboardControls.d.ts.map +1 -0
- package/lib/plugins/input/keyboard/index.d.ts +1 -1
- package/lib/plugins/input/keyboard/index.d.ts.map +1 -1
- package/lib/plugins/input/touch/VirtualControls.d.ts +8 -14
- package/lib/plugins/input/touch/VirtualControls.d.ts.map +1 -1
- package/lib/plugins/input/touch/VirtualControls.test.d.ts +2 -0
- package/lib/plugins/input/touch/VirtualControls.test.d.ts.map +1 -0
- package/lib/{registries-BLrxALZ0.js → registries-BfV-VF7a.js} +665 -597
- package/lib/registries-BfV-VF7a.js.map +1 -0
- package/lib/store/Store.d.ts.map +1 -1
- package/lib/ui/Button.d.ts.map +1 -1
- package/lib/ui/UICanvas.d.ts +10 -1
- package/lib/ui/UICanvas.d.ts.map +1 -1
- package/lib/ui/UICanvas.test.d.ts +0 -1
- package/lib/ui/UICanvas.test.d.ts.map +1 -1
- package/lib/utils/color.d.ts.map +1 -1
- package/lib/utils/color.test.d.ts +2 -0
- package/lib/utils/color.test.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/core/Application.test.ts +168 -0
- package/src/core/Application.ts +37 -27
- package/src/core/config.test.ts +79 -0
- package/src/core/config.ts +28 -6
- package/src/core/create.ts +11 -0
- package/src/core/interfaces/IApplication.ts +6 -6
- package/src/core/interfaces/ICoreSignals.ts +2 -0
- package/src/display/Camera.test.ts +40 -0
- package/src/display/Camera.ts +3 -3
- package/src/display/Entity.ts +2 -2
- package/src/display/SceneTransition.test.ts +58 -0
- package/src/display/SceneTransition.ts +1 -1
- package/src/display/SpineAnimation.ts +4 -4
- package/src/mixins/factory/methods.ts +0 -1
- package/src/plugins/AssetsPlugin.test.ts +48 -0
- package/src/plugins/AssetsPlugin.ts +3 -1
- package/src/plugins/DataAdapter.test.ts +32 -0
- package/src/plugins/DataAdapter.ts +5 -1
- package/src/plugins/FullScreenPlugin.test.ts +48 -0
- package/src/plugins/FullScreenPlugin.ts +9 -18
- package/src/plugins/GSAPPlugin.test.ts +31 -0
- package/src/plugins/GSAPPlugin.ts +1 -4
- package/src/plugins/KeyboardPlugin.ts +3 -10
- package/src/plugins/LookupPlugin.test.ts +42 -0
- package/src/plugins/LookupPlugin.ts +15 -3
- package/src/plugins/Plugin.test.ts +130 -2
- package/src/plugins/Plugin.ts +159 -3
- package/src/plugins/PopupManagerPlugin.test.ts +53 -0
- package/src/plugins/PopupManagerPlugin.ts +5 -3
- package/src/plugins/SceneManagerPlugin.test.ts +76 -0
- package/src/plugins/SceneManagerPlugin.ts +18 -13
- package/src/plugins/StatsPlugin.ts +3 -2
- package/src/plugins/TimerPlugin.ts +1 -2
- package/src/plugins/WebEventsPlugin.test.ts +32 -0
- package/src/plugins/WebEventsPlugin.ts +9 -16
- package/src/plugins/actions/ActionsPlugin.test.ts +68 -0
- package/src/plugins/actions/ActionsPlugin.ts +5 -5
- package/src/plugins/audio/AudioChannel.test.ts +19 -0
- package/src/plugins/audio/AudioChannel.ts +8 -1
- package/src/plugins/audio/AudioManagerPlugin.test.ts +41 -0
- package/src/plugins/audio/AudioManagerPlugin.ts +3 -2
- package/src/plugins/audio/VoiceOverPlugin.ts +1 -0
- package/src/plugins/breakpoints/BreakpointPlugin.ts +1 -2
- package/src/plugins/captions/CaptionsPlugin.test.ts +40 -0
- package/src/plugins/captions/CaptionsPlugin.ts +2 -2
- package/src/plugins/focus/FocusManagerPlugin.test.ts +71 -0
- package/src/plugins/focus/FocusManagerPlugin.ts +7 -0
- package/src/plugins/gesture/GesturePlugin.ts +4 -8
- package/src/plugins/input/AbstractControls.ts +104 -3
- package/src/plugins/input/Controls.test.ts +205 -0
- package/src/plugins/input/InputPlugin.ts +6 -14
- package/src/plugins/input/controlsCore.test.ts +151 -0
- package/src/plugins/input/controlsCore.ts +162 -0
- package/src/plugins/input/keyboard/KeyboardControls.ts +84 -0
- package/src/plugins/input/keyboard/index.ts +1 -1
- package/src/plugins/input/touch/VirtualControls.test.ts +38 -0
- package/src/plugins/input/touch/VirtualControls.ts +53 -120
- package/src/plugins/spine/SpinePlugin.ts +2 -2
- package/src/store/Store.test.ts +15 -0
- package/src/store/Store.ts +4 -1
- package/src/ui/Button.test.ts +12 -0
- package/src/ui/Button.ts +1 -0
- package/src/ui/UICanvas.test.ts +109 -6
- package/src/ui/UICanvas.ts +41 -3
- package/src/utils/color.test.ts +16 -0
- package/src/utils/color.ts +2 -1
- package/src/utils/platform.ts +1 -1
- package/src/version.ts +1 -1
- package/lib/DataAdapter-DS-twowe.js.map +0 -1
- package/lib/SpinePlugin-uN641Hmk.js.map +0 -1
- package/lib/StatsPlugin-vZQRm6wh.js.map +0 -1
- package/lib/VoiceOverPlugin-KlZdGj1G.js.map +0 -1
- package/lib/plugins/input/keyboard/KeyboardContols.d.ts +0 -28
- package/lib/plugins/input/keyboard/KeyboardContols.d.ts.map +0 -1
- package/lib/registries-BLrxALZ0.js.map +0 -1
- package/src/plugins/input/keyboard/KeyboardContols.ts +0 -182
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { H as e } from "./registries-
|
|
2
|
-
import { Assets as t, Cache as n, Container as r, DEG_TO_RAD as i, DOMAdapter as a, ExtensionType as o, Graphics as s, LoaderParserPriority as c, Resolver as l, Texture as u, TextureSource as d, Ticker as f, ViewContainer as p, checkExtension as m,
|
|
1
|
+
import { H as e } from "./registries-BfV-VF7a.js";
|
|
2
|
+
import { Assets as t, Cache as n, Container as r, DEG_TO_RAD as i, DOMAdapter as a, ExtensionType as o, Graphics as s, LoaderParserPriority as c, Resolver as l, Texture as u, TextureSource as d, Ticker as f, ViewContainer as p, checkExtension as m, extensions as h, fastCopy as g, path as _ } 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 v = class {
|
|
5
5
|
entries = {};
|
|
6
6
|
size = 0;
|
|
7
7
|
add(e) {
|
|
@@ -19,7 +19,7 @@ var y = class {
|
|
|
19
19
|
clear() {
|
|
20
20
|
this.entries = {}, this.size = 0;
|
|
21
21
|
}
|
|
22
|
-
},
|
|
22
|
+
}, y = class e {
|
|
23
23
|
r;
|
|
24
24
|
g;
|
|
25
25
|
b;
|
|
@@ -60,7 +60,7 @@ var y = class {
|
|
|
60
60
|
static fromString(t, n = new e()) {
|
|
61
61
|
return n.setFromString(t);
|
|
62
62
|
}
|
|
63
|
-
},
|
|
63
|
+
}, b = 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 y = class {
|
|
|
100
100
|
static isPowerOfTwo(e) {
|
|
101
101
|
return e && (e & e - 1) == 0;
|
|
102
102
|
}
|
|
103
|
-
},
|
|
103
|
+
}, x = 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 y = class {
|
|
|
152
152
|
static enumValue(e, t) {
|
|
153
153
|
return e[t[0].toUpperCase() + t.slice(1)];
|
|
154
154
|
}
|
|
155
|
-
},
|
|
155
|
+
}, S = class {
|
|
156
156
|
items = [];
|
|
157
157
|
instantiator;
|
|
158
158
|
constructor(e) {
|
|
@@ -170,7 +170,7 @@ var y = class {
|
|
|
170
170
|
clear() {
|
|
171
171
|
this.items.length = 0;
|
|
172
172
|
}
|
|
173
|
-
},
|
|
173
|
+
}, C = class {
|
|
174
174
|
x;
|
|
175
175
|
y;
|
|
176
176
|
constructor(e = 0, t = 0) {
|
|
@@ -187,13 +187,13 @@ var y = class {
|
|
|
187
187
|
let e = this.length();
|
|
188
188
|
return e != 0 && (this.x /= e, this.y /= e), this;
|
|
189
189
|
}
|
|
190
|
-
},
|
|
190
|
+
}, w = 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
|
+
}, T = class e extends w {
|
|
197
197
|
static nextID = 0;
|
|
198
198
|
id = e.nextID++;
|
|
199
199
|
bones = null;
|
|
@@ -242,9 +242,9 @@ var y = 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), x.arrayCopy(this.bones, 0, e.bones, 0, this.bones.length)) : e.bones = null, this.vertices && (e.vertices = x.newFloatArray(this.vertices.length), x.arrayCopy(this.vertices, 0, e.vertices, 0, this.vertices.length)), e.worldVerticesLength = this.worldVerticesLength, e.timelineAttachment = this.timelineAttachment;
|
|
246
246
|
}
|
|
247
|
-
},
|
|
247
|
+
}, E = class e {
|
|
248
248
|
static _nextID = 0;
|
|
249
249
|
id = e.nextID();
|
|
250
250
|
regions;
|
|
@@ -256,7 +256,7 @@ var y = class {
|
|
|
256
256
|
}
|
|
257
257
|
copy() {
|
|
258
258
|
let t = new e(this.regions.length);
|
|
259
|
-
return
|
|
259
|
+
return x.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 y = class {
|
|
|
272
272
|
static nextID() {
|
|
273
273
|
return e._nextID++;
|
|
274
274
|
}
|
|
275
|
-
},
|
|
275
|
+
}, D;
|
|
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
|
+
})(D ||= {});
|
|
279
|
+
var O = [
|
|
280
|
+
D.hold,
|
|
281
|
+
D.once,
|
|
282
|
+
D.loop,
|
|
283
|
+
D.pingpong,
|
|
284
|
+
D.onceReverse,
|
|
285
|
+
D.loopReverse,
|
|
286
|
+
D.pingpongReverse
|
|
287
|
+
], k = class {
|
|
288
288
|
name;
|
|
289
289
|
timelines = [];
|
|
290
|
-
timelineIds = new
|
|
290
|
+
timelineIds = new v();
|
|
291
291
|
duration;
|
|
292
292
|
constructor(e, t, n) {
|
|
293
293
|
if (!e) throw Error("name cannot be null.");
|
|
@@ -308,15 +308,15 @@ var k = [
|
|
|
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
|
+
}, A;
|
|
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
|
+
})(A ||= {});
|
|
315
|
+
var j;
|
|
316
316
|
(function(e) {
|
|
317
317
|
e[e.mixIn = 0] = "mixIn", e[e.mixOut = 1] = "mixOut";
|
|
318
|
-
})(
|
|
319
|
-
var
|
|
318
|
+
})(j ||= {});
|
|
319
|
+
var M = {
|
|
320
320
|
rotate: 0,
|
|
321
321
|
x: 1,
|
|
322
322
|
y: 2,
|
|
@@ -346,11 +346,11 @@ var N = {
|
|
|
346
346
|
physicsConstraintMix: 26,
|
|
347
347
|
physicsConstraintReset: 27,
|
|
348
348
|
sequence: 28
|
|
349
|
-
},
|
|
349
|
+
}, N = class {
|
|
350
350
|
propertyIds;
|
|
351
351
|
frames;
|
|
352
352
|
constructor(e, t) {
|
|
353
|
-
this.propertyIds = t, this.frames =
|
|
353
|
+
this.propertyIds = t, this.frames = x.newFloatArray(e * this.getFrameEntries());
|
|
354
354
|
}
|
|
355
355
|
getPropertyIds() {
|
|
356
356
|
return this.propertyIds;
|
|
@@ -374,10 +374,10 @@ var N = {
|
|
|
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
|
+
}, P = class extends N {
|
|
378
378
|
curves;
|
|
379
379
|
constructor(e, t, n) {
|
|
380
|
-
super(e, n), this.curves =
|
|
380
|
+
super(e, n), this.curves = x.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 N = {
|
|
|
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 = x.newFloatArray(t);
|
|
392
|
+
x.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 N = {
|
|
|
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
|
+
}, F = class extends P {
|
|
417
417
|
constructor(e, t, n) {
|
|
418
418
|
super(e, t, [n]);
|
|
419
419
|
}
|
|
@@ -441,66 +441,66 @@ var N = {
|
|
|
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 A.setup: return i;
|
|
445
|
+
case A.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 A.setup: return i + a * t;
|
|
452
|
+
case A.first:
|
|
453
|
+
case A.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 A.setup: return i;
|
|
461
|
+
case A.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 == A.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 A.setup: return i;
|
|
472
|
+
case A.first: return r + (i - r) * t;
|
|
473
473
|
}
|
|
474
474
|
return r;
|
|
475
475
|
}
|
|
476
|
-
return n ==
|
|
476
|
+
return n == A.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 A.setup: return a;
|
|
482
|
+
case A.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 == A.add ? i + o - a : o;
|
|
488
|
+
if (r == j.mixOut) switch (n) {
|
|
489
|
+
case A.setup: return a + (Math.abs(o) * b.signum(a) - a) * t;
|
|
490
|
+
case A.first:
|
|
491
|
+
case A.replace: return i + (Math.abs(o) * b.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 A.setup: return e = Math.abs(a) * b.signum(o), e + (o - e) * t;
|
|
497
|
+
case A.first:
|
|
498
|
+
case A.replace: return e = Math.abs(i) * b.signum(o), e + (o - e) * t;
|
|
499
499
|
}
|
|
500
500
|
}
|
|
501
501
|
return i + (o - a) * t;
|
|
502
502
|
}
|
|
503
|
-
},
|
|
503
|
+
}, I = class extends P {
|
|
504
504
|
constructor(e, t, n, r) {
|
|
505
505
|
super(e, t, [n, r]);
|
|
506
506
|
}
|
|
@@ -510,19 +510,19 @@ var N = {
|
|
|
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
|
+
}, L = class extends F {
|
|
514
514
|
boneIndex = 0;
|
|
515
515
|
constructor(e, t, n) {
|
|
516
|
-
super(e, t,
|
|
516
|
+
super(e, t, M.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
|
+
}, R = class extends I {
|
|
523
523
|
boneIndex = 0;
|
|
524
524
|
constructor(e, t, n) {
|
|
525
|
-
super(e, t,
|
|
525
|
+
super(e, t, M.x + "|" + n, M.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 N = {
|
|
|
530
530
|
let c = this.frames;
|
|
531
531
|
if (n < c[0]) {
|
|
532
532
|
switch (a) {
|
|
533
|
-
case
|
|
533
|
+
case A.setup:
|
|
534
534
|
s.x = s.data.x, s.y = s.data.y;
|
|
535
535
|
return;
|
|
536
|
-
case
|
|
536
|
+
case A.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 = N.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 N = {
|
|
|
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 A.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 A.first:
|
|
558
|
+
case A.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 A.add: s.x += l * i, s.y += u * i;
|
|
562
562
|
}
|
|
563
563
|
}
|
|
564
|
-
},
|
|
564
|
+
}, z = class extends F {
|
|
565
565
|
boneIndex = 0;
|
|
566
566
|
constructor(e, t, n) {
|
|
567
|
-
super(e, t,
|
|
567
|
+
super(e, t, M.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
|
+
}, B = class extends F {
|
|
574
574
|
boneIndex = 0;
|
|
575
575
|
constructor(e, t, n) {
|
|
576
|
-
super(e, t,
|
|
576
|
+
super(e, t, M.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
|
+
}, V = class extends I {
|
|
583
583
|
boneIndex = 0;
|
|
584
584
|
constructor(e, t, n) {
|
|
585
|
-
super(e, t,
|
|
585
|
+
super(e, t, M.scaleX + "|" + n, M.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 N = {
|
|
|
590
590
|
let c = this.frames;
|
|
591
591
|
if (n < c[0]) {
|
|
592
592
|
switch (a) {
|
|
593
|
-
case
|
|
593
|
+
case A.setup:
|
|
594
594
|
s.scaleX = s.data.scaleX, s.scaleY = s.data.scaleY;
|
|
595
595
|
return;
|
|
596
|
-
case
|
|
596
|
+
case A.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 = N.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 N = {
|
|
|
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 == A.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 == j.mixOut) switch (a) {
|
|
617
|
+
case A.setup:
|
|
618
|
+
e = s.data.scaleX, t = s.data.scaleY, s.scaleX = e + (Math.abs(l) * b.signum(e) - e) * i, s.scaleY = t + (Math.abs(u) * b.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 A.first:
|
|
621
|
+
case A.replace:
|
|
622
|
+
e = s.scaleX, t = s.scaleY, s.scaleX = e + (Math.abs(l) * b.signum(e) - e) * i, s.scaleY = t + (Math.abs(u) * b.signum(t) - t) * i;
|
|
623
623
|
break;
|
|
624
|
-
case
|
|
624
|
+
case A.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 A.setup:
|
|
628
|
+
e = Math.abs(s.data.scaleX) * b.signum(l), t = Math.abs(s.data.scaleY) * b.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 A.first:
|
|
631
|
+
case A.replace:
|
|
632
|
+
e = Math.abs(s.scaleX) * b.signum(l), t = Math.abs(s.scaleY) * b.signum(u), s.scaleX = e + (l - e) * i, s.scaleY = t + (u - t) * i;
|
|
633
633
|
break;
|
|
634
|
-
case
|
|
634
|
+
case A.add: s.scaleX += (l - s.data.scaleX) * i, s.scaleY += (u - s.data.scaleY) * i;
|
|
635
635
|
}
|
|
636
636
|
}
|
|
637
637
|
}
|
|
638
|
-
},
|
|
638
|
+
}, ee = class extends F {
|
|
639
639
|
boneIndex = 0;
|
|
640
640
|
constructor(e, t, n) {
|
|
641
|
-
super(e, t,
|
|
641
|
+
super(e, t, M.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
|
+
}, te = class extends F {
|
|
648
648
|
boneIndex = 0;
|
|
649
649
|
constructor(e, t, n) {
|
|
650
|
-
super(e, t,
|
|
650
|
+
super(e, t, M.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
|
+
}, ne = class extends I {
|
|
657
657
|
boneIndex = 0;
|
|
658
658
|
constructor(e, t, n) {
|
|
659
|
-
super(e, t,
|
|
659
|
+
super(e, t, M.shearX + "|" + n, M.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 N = {
|
|
|
664
664
|
let c = this.frames;
|
|
665
665
|
if (n < c[0]) {
|
|
666
666
|
switch (a) {
|
|
667
|
-
case
|
|
667
|
+
case A.setup:
|
|
668
668
|
s.shearX = s.data.shearX, s.shearY = s.data.shearY;
|
|
669
669
|
return;
|
|
670
|
-
case
|
|
670
|
+
case A.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 = N.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 N = {
|
|
|
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 A.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 A.first:
|
|
692
|
+
case A.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 A.add: s.shearX += l * i, s.shearY += u * i;
|
|
696
696
|
}
|
|
697
697
|
}
|
|
698
|
-
},
|
|
698
|
+
}, re = class extends F {
|
|
699
699
|
boneIndex = 0;
|
|
700
700
|
constructor(e, t, n) {
|
|
701
|
-
super(e, t,
|
|
701
|
+
super(e, t, M.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
|
+
}, ie = class extends F {
|
|
708
708
|
boneIndex = 0;
|
|
709
709
|
constructor(e, t, n) {
|
|
710
|
-
super(e, t,
|
|
710
|
+
super(e, t, M.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
|
+
}, ae = class extends N {
|
|
717
717
|
boneIndex = 0;
|
|
718
718
|
constructor(e, t) {
|
|
719
|
-
super(e, [
|
|
719
|
+
super(e, [M.inherit + "|" + t]), this.boneIndex = t;
|
|
720
720
|
}
|
|
721
721
|
getFrameEntries() {
|
|
722
722
|
return 2;
|
|
@@ -727,21 +727,21 @@ var N = {
|
|
|
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 == j.mixOut) {
|
|
731
|
+
a == A.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 == A.setup || a == A.first) && (s.inherit = s.data.inherit);
|
|
737
737
|
return;
|
|
738
738
|
}
|
|
739
|
-
s.inherit = this.frames[
|
|
739
|
+
s.inherit = this.frames[N.search(c, n, 2) + 1];
|
|
740
740
|
}
|
|
741
|
-
},
|
|
741
|
+
}, oe = class extends P {
|
|
742
742
|
slotIndex = 0;
|
|
743
743
|
constructor(e, t, n) {
|
|
744
|
-
super(e, t, [
|
|
744
|
+
super(e, t, [M.rgb + "|" + n, M.alpha + "|" + n]), this.slotIndex = n;
|
|
745
745
|
}
|
|
746
746
|
getFrameEntries() {
|
|
747
747
|
return 5;
|
|
@@ -756,14 +756,14 @@ var N = {
|
|
|
756
756
|
if (n < c[0]) {
|
|
757
757
|
let e = s.data.color;
|
|
758
758
|
switch (a) {
|
|
759
|
-
case
|
|
759
|
+
case A.setup:
|
|
760
760
|
l.setFromColor(e);
|
|
761
761
|
return;
|
|
762
|
-
case
|
|
762
|
+
case A.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 = N.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 N = {
|
|
|
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 == A.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
|
+
}, se = class extends P {
|
|
782
782
|
slotIndex = 0;
|
|
783
783
|
constructor(e, t, n) {
|
|
784
|
-
super(e, t, [
|
|
784
|
+
super(e, t, [M.rgb + "|" + n]), this.slotIndex = n;
|
|
785
785
|
}
|
|
786
786
|
getFrameEntries() {
|
|
787
787
|
return 4;
|
|
@@ -796,14 +796,14 @@ var N = {
|
|
|
796
796
|
if (n < c[0]) {
|
|
797
797
|
let e = s.data.color;
|
|
798
798
|
switch (a) {
|
|
799
|
-
case
|
|
799
|
+
case A.setup:
|
|
800
800
|
l.r = e.r, l.g = e.g, l.b = e.b;
|
|
801
801
|
return;
|
|
802
|
-
case
|
|
802
|
+
case A.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 = N.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 N = {
|
|
|
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 == A.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
|
+
}, ce = class extends F {
|
|
829
829
|
slotIndex = 0;
|
|
830
830
|
constructor(e, t, n) {
|
|
831
|
-
super(e, t,
|
|
831
|
+
super(e, t, M.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 N = {
|
|
|
837
837
|
if (n < this.frames[0]) {
|
|
838
838
|
let e = s.data.color;
|
|
839
839
|
switch (a) {
|
|
840
|
-
case
|
|
840
|
+
case A.setup:
|
|
841
841
|
c.a = e.a;
|
|
842
842
|
return;
|
|
843
|
-
case
|
|
843
|
+
case A.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 == A.setup && (c.a = s.data.color.a), c.a += (l - c.a) * i);
|
|
849
849
|
}
|
|
850
|
-
},
|
|
850
|
+
}, le = class extends P {
|
|
851
851
|
slotIndex = 0;
|
|
852
852
|
constructor(e, t, n) {
|
|
853
853
|
super(e, t, [
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
854
|
+
M.rgb + "|" + n,
|
|
855
|
+
M.alpha + "|" + n,
|
|
856
|
+
M.rgb2 + "|" + n
|
|
857
857
|
]), this.slotIndex = n;
|
|
858
858
|
}
|
|
859
859
|
getFrameEntries() {
|
|
@@ -869,14 +869,14 @@ var N = {
|
|
|
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 A.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 A.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 = N.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 N = {
|
|
|
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 == A.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 N = {
|
|
|
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
|
+
}, ue = class extends P {
|
|
903
903
|
slotIndex = 0;
|
|
904
904
|
constructor(e, t, n) {
|
|
905
|
-
super(e, t, [
|
|
905
|
+
super(e, t, [M.rgb + "|" + n, M.rgb2 + "|" + n]), this.slotIndex = n;
|
|
906
906
|
}
|
|
907
907
|
getFrameEntries() {
|
|
908
908
|
return 7;
|
|
@@ -917,14 +917,14 @@ var N = {
|
|
|
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 A.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 A.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, _ = N.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 N = {
|
|
|
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 == A.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
|
+
}, de = class extends N {
|
|
950
950
|
slotIndex = 0;
|
|
951
951
|
attachmentNames;
|
|
952
952
|
constructor(e, t) {
|
|
953
|
-
super(e, [
|
|
953
|
+
super(e, [M.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 N = {
|
|
|
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 == j.mixOut) {
|
|
965
|
+
a == A.setup && this.setAttachment(e, s, s.data.attachmentName);
|
|
966
966
|
return;
|
|
967
967
|
}
|
|
968
968
|
if (n < this.frames[0]) {
|
|
969
|
-
(a ==
|
|
969
|
+
(a == A.setup || a == A.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[N.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
|
+
}, fe = class extends P {
|
|
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, [M.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 N = {
|
|
|
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 T) || c.timelineAttachment != this.attachment) return;
|
|
1022
1022
|
let l = s.deform;
|
|
1023
|
-
l.length == 0 && (a =
|
|
1023
|
+
l.length == 0 && (a = A.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 A.setup:
|
|
1028
1028
|
l.length = 0;
|
|
1029
1029
|
return;
|
|
1030
|
-
case
|
|
1030
|
+
case A.first:
|
|
1031
1031
|
if (i == 1) {
|
|
1032
1032
|
l.length = 0;
|
|
1033
1033
|
return;
|
|
@@ -1046,16 +1046,16 @@ var N = {
|
|
|
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 == A.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 x.arrayCopy(e, 0, l, 0, d);
|
|
1057
1057
|
else switch (a) {
|
|
1058
|
-
case
|
|
1058
|
+
case A.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 N = {
|
|
|
1067
1067
|
}
|
|
1068
1068
|
break;
|
|
1069
1069
|
}
|
|
1070
|
-
case
|
|
1071
|
-
case
|
|
1070
|
+
case A.first:
|
|
1071
|
+
case A.replace:
|
|
1072
1072
|
for (let t = 0; t < d; t++) l[t] += (e[t] - l[t]) * i;
|
|
1073
1073
|
break;
|
|
1074
|
-
case
|
|
1074
|
+
case A.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 N = {
|
|
|
1081
1081
|
}
|
|
1082
1082
|
return;
|
|
1083
1083
|
}
|
|
1084
|
-
let m =
|
|
1085
|
-
if (i == 1) if (a ==
|
|
1084
|
+
let m = N.search1(f, n), h = this.getCurvePercent(n, m), g = u[m], _ = u[m + 1];
|
|
1085
|
+
if (i == 1) if (a == A.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 N = {
|
|
|
1100
1100
|
l[e] = t + (_[e] - t) * h;
|
|
1101
1101
|
}
|
|
1102
1102
|
else switch (a) {
|
|
1103
|
-
case
|
|
1103
|
+
case A.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 N = {
|
|
|
1115
1115
|
}
|
|
1116
1116
|
break;
|
|
1117
1117
|
}
|
|
1118
|
-
case
|
|
1119
|
-
case
|
|
1118
|
+
case A.first:
|
|
1119
|
+
case A.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 A.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 N = {
|
|
|
1137
1137
|
}
|
|
1138
1138
|
}
|
|
1139
1139
|
}
|
|
1140
|
-
},
|
|
1141
|
-
static propertyIds = ["" +
|
|
1140
|
+
}, pe = class e extends N {
|
|
1141
|
+
static propertyIds = ["" + M.event];
|
|
1142
1142
|
events;
|
|
1143
1143
|
constructor(t) {
|
|
1144
1144
|
super(t, e.propertyIds), this.events = Array(t);
|
|
@@ -1158,14 +1158,14 @@ var N = {
|
|
|
1158
1158
|
let l = 0;
|
|
1159
1159
|
if (t < s[0]) l = 0;
|
|
1160
1160
|
else {
|
|
1161
|
-
l =
|
|
1161
|
+
l = N.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
|
+
}, me = class e extends N {
|
|
1168
|
+
static propertyIds = ["" + M.drawOrder];
|
|
1169
1169
|
drawOrders;
|
|
1170
1170
|
constructor(t) {
|
|
1171
1171
|
super(t, e.propertyIds), this.drawOrders = Array(t);
|
|
@@ -1177,25 +1177,25 @@ var N = {
|
|
|
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 == j.mixOut) {
|
|
1181
|
+
a == A.setup && x.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 == A.setup || a == A.first) && x.arrayCopy(e.slots, 0, e.drawOrder, 0, e.slots.length);
|
|
1186
1186
|
return;
|
|
1187
1187
|
}
|
|
1188
|
-
let s =
|
|
1189
|
-
if (!c)
|
|
1188
|
+
let s = N.search1(this.frames, n), c = this.drawOrders[s];
|
|
1189
|
+
if (!c) x.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
|
+
}, he = class extends P {
|
|
1196
1196
|
constraintIndex = 0;
|
|
1197
1197
|
constructor(e, t, n) {
|
|
1198
|
-
super(e, t, [
|
|
1198
|
+
super(e, t, [M.ikConstraint + "|" + n]), this.constraintIndex = n;
|
|
1199
1199
|
}
|
|
1200
1200
|
getFrameEntries() {
|
|
1201
1201
|
return 6;
|
|
@@ -1209,14 +1209,14 @@ var N = {
|
|
|
1209
1209
|
let c = this.frames;
|
|
1210
1210
|
if (n < c[0]) {
|
|
1211
1211
|
switch (a) {
|
|
1212
|
-
case
|
|
1212
|
+
case A.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 A.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 = N.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 N = {
|
|
|
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 == A.setup ? (s.mix = s.data.mix + (l - s.data.mix) * i, s.softness = s.data.softness + (u - s.data.softness) * i, o == j.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 == j.mixIn && (s.bendDirection = c[d + 3], s.compress = c[d + 4] != 0, s.stretch = c[d + 5] != 0));
|
|
1233
1233
|
}
|
|
1234
|
-
},
|
|
1234
|
+
}, ge = class extends P {
|
|
1235
1235
|
constraintIndex = 0;
|
|
1236
1236
|
constructor(e, t, n) {
|
|
1237
|
-
super(e, t, [
|
|
1237
|
+
super(e, t, [M.transformConstraint + "|" + n]), this.constraintIndex = n;
|
|
1238
1238
|
}
|
|
1239
1239
|
getFrameEntries() {
|
|
1240
1240
|
return 7;
|
|
@@ -1250,14 +1250,14 @@ var N = {
|
|
|
1250
1250
|
if (n < c[0]) {
|
|
1251
1251
|
let e = s.data;
|
|
1252
1252
|
switch (a) {
|
|
1253
|
-
case
|
|
1253
|
+
case A.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 A.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 = N.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 N = {
|
|
|
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 == A.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
|
+
}, _e = class extends F {
|
|
1279
1279
|
constraintIndex = 0;
|
|
1280
1280
|
constructor(e, t, n) {
|
|
1281
|
-
super(e, t,
|
|
1281
|
+
super(e, t, M.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
|
+
}, ve = class extends F {
|
|
1288
1288
|
constraintIndex = 0;
|
|
1289
1289
|
constructor(e, t, n) {
|
|
1290
|
-
super(e, t,
|
|
1290
|
+
super(e, t, M.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
|
+
}, ye = class extends P {
|
|
1297
1297
|
constraintIndex = 0;
|
|
1298
1298
|
constructor(e, t, n) {
|
|
1299
|
-
super(e, t, [
|
|
1299
|
+
super(e, t, [M.pathConstraintMix + "|" + n]), this.constraintIndex = n;
|
|
1300
1300
|
}
|
|
1301
1301
|
getFrameEntries() {
|
|
1302
1302
|
return 4;
|
|
@@ -1311,14 +1311,14 @@ var N = {
|
|
|
1311
1311
|
let c = this.frames;
|
|
1312
1312
|
if (n < c[0]) {
|
|
1313
1313
|
switch (a) {
|
|
1314
|
-
case
|
|
1314
|
+
case A.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 A.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 = N.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 N = {
|
|
|
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 == A.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
|
+
}, be = class extends F {
|
|
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 N = {
|
|
|
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
|
+
}, xe = class extends be {
|
|
1352
1352
|
constructor(e, t, n) {
|
|
1353
|
-
super(e, t, n,
|
|
1353
|
+
super(e, t, n, M.physicsConstraintInertia);
|
|
1354
1354
|
}
|
|
1355
1355
|
setup(e) {
|
|
1356
1356
|
return e.data.inertia;
|
|
@@ -1364,9 +1364,9 @@ var N = {
|
|
|
1364
1364
|
global(e) {
|
|
1365
1365
|
return e.inertiaGlobal;
|
|
1366
1366
|
}
|
|
1367
|
-
},
|
|
1367
|
+
}, Se = class extends be {
|
|
1368
1368
|
constructor(e, t, n) {
|
|
1369
|
-
super(e, t, n,
|
|
1369
|
+
super(e, t, n, M.physicsConstraintStrength);
|
|
1370
1370
|
}
|
|
1371
1371
|
setup(e) {
|
|
1372
1372
|
return e.data.strength;
|
|
@@ -1380,9 +1380,9 @@ var N = {
|
|
|
1380
1380
|
global(e) {
|
|
1381
1381
|
return e.strengthGlobal;
|
|
1382
1382
|
}
|
|
1383
|
-
},
|
|
1383
|
+
}, Ce = class extends be {
|
|
1384
1384
|
constructor(e, t, n) {
|
|
1385
|
-
super(e, t, n,
|
|
1385
|
+
super(e, t, n, M.physicsConstraintDamping);
|
|
1386
1386
|
}
|
|
1387
1387
|
setup(e) {
|
|
1388
1388
|
return e.data.damping;
|
|
@@ -1396,9 +1396,9 @@ var N = {
|
|
|
1396
1396
|
global(e) {
|
|
1397
1397
|
return e.dampingGlobal;
|
|
1398
1398
|
}
|
|
1399
|
-
},
|
|
1399
|
+
}, we = class extends be {
|
|
1400
1400
|
constructor(e, t, n) {
|
|
1401
|
-
super(e, t, n,
|
|
1401
|
+
super(e, t, n, M.physicsConstraintMass);
|
|
1402
1402
|
}
|
|
1403
1403
|
setup(e) {
|
|
1404
1404
|
return 1 / e.data.massInverse;
|
|
@@ -1412,9 +1412,9 @@ var N = {
|
|
|
1412
1412
|
global(e) {
|
|
1413
1413
|
return e.massGlobal;
|
|
1414
1414
|
}
|
|
1415
|
-
},
|
|
1415
|
+
}, Te = class extends be {
|
|
1416
1416
|
constructor(e, t, n) {
|
|
1417
|
-
super(e, t, n,
|
|
1417
|
+
super(e, t, n, M.physicsConstraintWind);
|
|
1418
1418
|
}
|
|
1419
1419
|
setup(e) {
|
|
1420
1420
|
return e.data.wind;
|
|
@@ -1428,9 +1428,9 @@ var N = {
|
|
|
1428
1428
|
global(e) {
|
|
1429
1429
|
return e.windGlobal;
|
|
1430
1430
|
}
|
|
1431
|
-
},
|
|
1431
|
+
}, Ee = class extends be {
|
|
1432
1432
|
constructor(e, t, n) {
|
|
1433
|
-
super(e, t, n,
|
|
1433
|
+
super(e, t, n, M.physicsConstraintGravity);
|
|
1434
1434
|
}
|
|
1435
1435
|
setup(e) {
|
|
1436
1436
|
return e.data.gravity;
|
|
@@ -1444,9 +1444,9 @@ var N = {
|
|
|
1444
1444
|
global(e) {
|
|
1445
1445
|
return e.gravityGlobal;
|
|
1446
1446
|
}
|
|
1447
|
-
},
|
|
1447
|
+
}, De = class extends be {
|
|
1448
1448
|
constructor(e, t, n) {
|
|
1449
|
-
super(e, t, n,
|
|
1449
|
+
super(e, t, n, M.physicsConstraintMix);
|
|
1450
1450
|
}
|
|
1451
1451
|
setup(e) {
|
|
1452
1452
|
return e.data.mix;
|
|
@@ -1460,8 +1460,8 @@ var N = {
|
|
|
1460
1460
|
global(e) {
|
|
1461
1461
|
return e.mixGlobal;
|
|
1462
1462
|
}
|
|
1463
|
-
},
|
|
1464
|
-
static propertyIds = [
|
|
1463
|
+
}, Oe = class e extends N {
|
|
1464
|
+
static propertyIds = [M.physicsConstraintReset.toString()];
|
|
1465
1465
|
constraintIndex;
|
|
1466
1466
|
constructor(t, n) {
|
|
1467
1467
|
super(t, e.propertyIds), this.constraintIndex = n;
|
|
@@ -1478,17 +1478,17 @@ var N = {
|
|
|
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[N.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
|
+
}, ke = class e extends N {
|
|
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, [M.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 N = {
|
|
|
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 T) || l.timelineAttachment != u)) return;
|
|
1511
|
+
if (s == j.mixOut) {
|
|
1512
|
+
o == A.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 == A.setup || o == A.first) && (c.sequenceIndex = -1);
|
|
1518
1518
|
return;
|
|
1519
1519
|
}
|
|
1520
|
-
let f =
|
|
1520
|
+
let f = N.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 = O[m & 15];
|
|
1523
|
+
if (v != D.hold) switch (g += (r - p) / h + 1e-5 | 0, v) {
|
|
1524
|
+
case D.once:
|
|
1525
1525
|
g = Math.min(_ - 1, g);
|
|
1526
1526
|
break;
|
|
1527
|
-
case
|
|
1527
|
+
case D.loop:
|
|
1528
1528
|
g %= _;
|
|
1529
1529
|
break;
|
|
1530
|
-
case
|
|
1530
|
+
case D.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 D.onceReverse:
|
|
1536
1536
|
g = Math.max(_ - 1 - g, 0);
|
|
1537
1537
|
break;
|
|
1538
|
-
case
|
|
1538
|
+
case D.loopReverse:
|
|
1539
1539
|
g = _ - 1 - g % _;
|
|
1540
1540
|
break;
|
|
1541
|
-
case
|
|
1541
|
+
case D.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
|
+
}, Ae = class e {
|
|
1549
|
+
static _emptyAnimation = new k("<empty>", [], 0);
|
|
1550
1550
|
static emptyAnimation() {
|
|
1551
1551
|
return e._emptyAnimation;
|
|
1552
1552
|
}
|
|
@@ -1556,10 +1556,10 @@ var N = {
|
|
|
1556
1556
|
unkeyedState = 0;
|
|
1557
1557
|
events = [];
|
|
1558
1558
|
listeners = [];
|
|
1559
|
-
queue = new
|
|
1560
|
-
propertyIDs = new
|
|
1559
|
+
queue = new Me(this);
|
|
1560
|
+
propertyIDs = new v();
|
|
1561
1561
|
animationsChanged = !1;
|
|
1562
|
-
trackEntryPool = new
|
|
1562
|
+
trackEntryPool = new S(() => new je());
|
|
1563
1563
|
constructor(e) {
|
|
1564
1564
|
this.data = e;
|
|
1565
1565
|
}
|
|
@@ -1608,24 +1608,24 @@ var N = {
|
|
|
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 ? A.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 == A.add) {
|
|
1617
1617
|
a == 0 && (l = !0);
|
|
1618
1618
|
for (let t = 0; t < h; t++) {
|
|
1619
|
-
|
|
1619
|
+
x.webkit602BugfixHelper(c, s);
|
|
1620
1620
|
var i = m[t];
|
|
1621
|
-
i instanceof
|
|
1621
|
+
i instanceof de ? this.applyAttachmentTimeline(i, e, f, s, l) : i.apply(e, u, f, p, c, s, j.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 : A.setup;
|
|
1628
|
+
!n && a instanceof L ? this.applyRotateTimeline(a, e, f, c, d, o.timelinesRotation, i << 1, r) : a instanceof de ? this.applyAttachmentTimeline(a, e, f, s, l) : (x.webkit602BugfixHelper(c, s), a.apply(e, u, f, p, c, d, j.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 N = {
|
|
|
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 == A.first && (n = A.setup)) : (i = e.mixTime / e.mixDuration, i > 1 && (i = 1), n != A.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 == A.add) for (let e = 0; e < c; e++) s[e].apply(t, d, p, m, u, n, j.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], _ = j.mixOut, v, y = 0;
|
|
1654
1654
|
switch (e[g]) {
|
|
1655
1655
|
case 0:
|
|
1656
|
-
if (!o && c instanceof
|
|
1656
|
+
if (!o && c instanceof me) continue;
|
|
1657
1657
|
v = n, y = u;
|
|
1658
1658
|
break;
|
|
1659
1659
|
case 1:
|
|
1660
|
-
v =
|
|
1660
|
+
v = A.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 = A.setup, y = l;
|
|
1667
1667
|
break;
|
|
1668
1668
|
default:
|
|
1669
|
-
v =
|
|
1669
|
+
v = A.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 L ? this.applyRotateTimeline(c, t, p, y, v, r.timelinesRotation, g << 1, h) : c instanceof de ? this.applyAttachmentTimeline(c, t, p, v, a && y >= r.alphaAttachmentThreshold) : (x.webkit602BugfixHelper(y, n), o && c instanceof me && v == A.setup && (_ = j.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 == A.setup || r == A.first) && this.setAttachment(t, a, a.data.attachmentName, i) : this.setAttachment(t, a, e.attachmentNames[N.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, j.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 A.setup: c.rotation = c.data.rotation;
|
|
1696
1696
|
default: return;
|
|
1697
|
-
case
|
|
1697
|
+
case A.first: u = c.rotation, d = c.data.rotation;
|
|
1698
1698
|
}
|
|
1699
|
-
else u = i ==
|
|
1699
|
+
else u = i == A.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 N = {
|
|
|
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 && b.signum(t) != b.signum(p) && (Math.abs(e - n) > 180 ? (f += 360 * b.signum(e), i = r) : n == 0 ? i = r : f -= 360 * b.signum(e)), i != r && (f += 360 * b.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 N = {
|
|
|
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] : (x.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 = A.replace, i;
|
|
1801
1801
|
}
|
|
1802
1802
|
clearNext(e) {
|
|
1803
1803
|
let t = e.next;
|
|
@@ -1812,7 +1812,7 @@ var N = {
|
|
|
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 != A.add) && this.computeHold(n), n = n.mixingTo;
|
|
1816
1816
|
while (n);
|
|
1817
1817
|
}
|
|
1818
1818
|
}
|
|
@@ -1830,7 +1830,7 @@ var N = {
|
|
|
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 de || r instanceof me || r instanceof pe || !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 N = {
|
|
|
1860
1860
|
clearListenerNotifications() {
|
|
1861
1861
|
this.queue.clear();
|
|
1862
1862
|
}
|
|
1863
|
-
},
|
|
1863
|
+
}, je = class {
|
|
1864
1864
|
animation = null;
|
|
1865
1865
|
previous = null;
|
|
1866
1866
|
next = null;
|
|
@@ -1900,7 +1900,7 @@ var N = {
|
|
|
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 = A.replace;
|
|
1904
1904
|
timelineMode = [];
|
|
1905
1905
|
timelineHoldMix = [];
|
|
1906
1906
|
timelinesRotation = [];
|
|
@@ -1937,7 +1937,7 @@ var N = {
|
|
|
1937
1937
|
isNextReady() {
|
|
1938
1938
|
return this.next != null && this.nextTrackLast - this.next.delay >= 0;
|
|
1939
1939
|
}
|
|
1940
|
-
},
|
|
1940
|
+
}, Me = class {
|
|
1941
1941
|
objects = [];
|
|
1942
1942
|
drainDisabled = !1;
|
|
1943
1943
|
animState;
|
|
@@ -2025,7 +2025,7 @@ var N = {
|
|
|
2025
2025
|
})(H ||= {});
|
|
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 Ne = class {
|
|
2029
2029
|
skeletonData;
|
|
2030
2030
|
animationToMixTime = {};
|
|
2031
2031
|
defaultMix = 0;
|
|
@@ -2050,8 +2050,8 @@ var Pe = 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
|
+
}, Pe = class e extends T {
|
|
2054
|
+
color = new y(1, 1, 1, 1);
|
|
2055
2055
|
constructor(e) {
|
|
2056
2056
|
super(e);
|
|
2057
2057
|
}
|
|
@@ -2059,9 +2059,9 @@ var Pe = 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
|
+
}, Fe = class e extends T {
|
|
2063
2063
|
endSlot = null;
|
|
2064
|
-
color = new
|
|
2064
|
+
color = new y(.2275, .2275, .8078, 1);
|
|
2065
2065
|
constructor(e) {
|
|
2066
2066
|
super(e);
|
|
2067
2067
|
}
|
|
@@ -2069,7 +2069,7 @@ var Pe = 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
|
+
}, Ie = class {
|
|
2073
2073
|
_image;
|
|
2074
2074
|
constructor(e) {
|
|
2075
2075
|
this._image = e;
|
|
@@ -2081,11 +2081,11 @@ var Pe = class {
|
|
|
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
2083
|
})(U ||= {});
|
|
2084
|
-
var
|
|
2084
|
+
var Le;
|
|
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
|
+
})(Le ||= {});
|
|
2088
|
+
var Re = class {
|
|
2089
2089
|
texture;
|
|
2090
2090
|
u = 0;
|
|
2091
2091
|
v = 0;
|
|
@@ -2098,11 +2098,11 @@ var ze = 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 Be(e), n = [
|
|
2106
2106
|
,
|
|
2107
2107
|
,
|
|
2108
2108
|
,
|
|
@@ -2111,9 +2111,9 @@ var ze = 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 = x.enumValue(U, n[1]), e.magFilter = x.enumValue(U, n[2]);
|
|
2115
2115
|
}, r.repeat = (e) => {
|
|
2116
|
-
n[1].indexOf("x") != -1 && (e.uWrap =
|
|
2116
|
+
n[1].indexOf("x") != -1 && (e.uWrap = Le.Repeat), n[1].indexOf("y") != -1 && (e.vWrap = Le.Repeat);
|
|
2117
2117
|
}, r.pma = (e) => {
|
|
2118
2118
|
e.pma = n[1] == "true";
|
|
2119
2119
|
};
|
|
@@ -2142,7 +2142,7 @@ var ze = 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 He(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 ze = 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 Ve(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 ze = class {
|
|
|
2174
2174
|
dispose() {
|
|
2175
2175
|
for (let e = 0; e < this.pages.length; e++) this.pages[e].texture?.dispose();
|
|
2176
2176
|
}
|
|
2177
|
-
},
|
|
2177
|
+
}, Be = class {
|
|
2178
2178
|
lines;
|
|
2179
2179
|
index = 0;
|
|
2180
2180
|
constructor(e) {
|
|
@@ -2194,12 +2194,12 @@ var ze = 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
|
+
}, Ve = class {
|
|
2198
2198
|
name;
|
|
2199
2199
|
minFilter = U.Nearest;
|
|
2200
2200
|
magFilter = U.Nearest;
|
|
2201
|
-
uWrap =
|
|
2202
|
-
vWrap =
|
|
2201
|
+
uWrap = Le.ClampToEdge;
|
|
2202
|
+
vWrap = Le.ClampToEdge;
|
|
2203
2203
|
texture = null;
|
|
2204
2204
|
width = 0;
|
|
2205
2205
|
height = 0;
|
|
@@ -2212,7 +2212,7 @@ var ze = 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
|
+
}, He = class extends Re {
|
|
2216
2216
|
page;
|
|
2217
2217
|
name;
|
|
2218
2218
|
x = 0;
|
|
@@ -2228,29 +2228,29 @@ var ze = class {
|
|
|
2228
2228
|
constructor(e, t) {
|
|
2229
2229
|
super(), this.page = e, this.name = t, e.regions.push(this);
|
|
2230
2230
|
}
|
|
2231
|
-
},
|
|
2231
|
+
}, Ue = class e extends T {
|
|
2232
2232
|
region = null;
|
|
2233
2233
|
path;
|
|
2234
2234
|
regionUVs = [];
|
|
2235
2235
|
uvs = [];
|
|
2236
2236
|
triangles = [];
|
|
2237
|
-
color = new
|
|
2237
|
+
color = new y(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 y(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 = x.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 He) {
|
|
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 ze = 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), x.arrayCopy(this.regionUVs, 0, t.regionUVs, 0, this.regionUVs.length), t.uvs = this.uvs instanceof Float32Array ? x.newFloatArray(this.uvs.length) : Array(this.uvs.length), x.arrayCopy(this.uvs, 0, t.uvs, 0, this.uvs.length), t.triangles = Array(this.triangles.length), x.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), x.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 ze = 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
|
+
}, We = class e extends T {
|
|
2292
2292
|
lengths = [];
|
|
2293
2293
|
closed = !1;
|
|
2294
2294
|
constantSpeed = !1;
|
|
2295
|
-
color = new
|
|
2295
|
+
color = new y(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), x.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
|
+
}, Ge = class e extends T {
|
|
2304
2304
|
x = 0;
|
|
2305
2305
|
y = 0;
|
|
2306
2306
|
rotation = 0;
|
|
2307
|
-
color = new
|
|
2307
|
+
color = new y(.38, .94, 0, 1);
|
|
2308
2308
|
constructor(e) {
|
|
2309
2309
|
super(e);
|
|
2310
2310
|
}
|
|
@@ -2312,14 +2312,14 @@ var ze = 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 * b.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 b.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
|
+
}, Ke = class e extends w {
|
|
2323
2323
|
x = 0;
|
|
2324
2324
|
y = 0;
|
|
2325
2325
|
scaleX = 1;
|
|
@@ -2327,13 +2327,13 @@ var ze = class {
|
|
|
2327
2327
|
rotation = 0;
|
|
2328
2328
|
width = 0;
|
|
2329
2329
|
height = 0;
|
|
2330
|
-
color = new
|
|
2330
|
+
color = new y(1, 1, 1, 1);
|
|
2331
2331
|
path;
|
|
2332
2332
|
region = null;
|
|
2333
2333
|
sequence = null;
|
|
2334
|
-
offset =
|
|
2335
|
-
uvs =
|
|
2336
|
-
tempColor = new
|
|
2334
|
+
offset = x.newFloatArray(8);
|
|
2335
|
+
uvs = x.newFloatArray(8);
|
|
2336
|
+
tempColor = new y(1, 1, 1, 1);
|
|
2337
2337
|
constructor(e, t) {
|
|
2338
2338
|
super(e), this.path = t;
|
|
2339
2339
|
}
|
|
@@ -2344,8 +2344,8 @@ var ze = 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
|
-
S[0] = p - g, S[1] = h + m, S[2] = p -
|
|
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 * b.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, x = s * u, S = this.offset;
|
|
2348
|
+
S[0] = p - g, S[1] = h + m, S[2] = p - x, S[3] = y + m, S[4] = _ - x, S[5] = y + v, S[6] = _ - g, S[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 ze = 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, x.arrayCopy(this.uvs, 0, t.uvs, 0, 8), x.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;
|
|
@@ -2402,7 +2402,7 @@ var ze = class {
|
|
|
2402
2402
|
}
|
|
2403
2403
|
}
|
|
2404
2404
|
newRegionAttachment(e, t, n, r) {
|
|
2405
|
-
let i = new
|
|
2405
|
+
let i = new Ke(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 ze = class {
|
|
|
2412
2412
|
return i;
|
|
2413
2413
|
}
|
|
2414
2414
|
newMeshAttachment(e, t, n, r) {
|
|
2415
|
-
let i = new
|
|
2415
|
+
let i = new Ue(t, n);
|
|
2416
2416
|
if (r != null) this.loadSequence(t, n, r);
|
|
2417
2417
|
else {
|
|
2418
2418
|
let e = this.atlas.findRegion(n);
|
|
@@ -2422,16 +2422,16 @@ var ze = class {
|
|
|
2422
2422
|
return i;
|
|
2423
2423
|
}
|
|
2424
2424
|
newBoundingBoxAttachment(e, t) {
|
|
2425
|
-
return new
|
|
2425
|
+
return new Pe(t);
|
|
2426
2426
|
}
|
|
2427
2427
|
newPathAttachment(e, t) {
|
|
2428
|
-
return new
|
|
2428
|
+
return new We(t);
|
|
2429
2429
|
}
|
|
2430
2430
|
newPointAttachment(e, t) {
|
|
2431
|
-
return new
|
|
2431
|
+
return new Ge(t);
|
|
2432
2432
|
}
|
|
2433
2433
|
newClippingAttachment(e, t) {
|
|
2434
|
-
return new
|
|
2434
|
+
return new Fe(t);
|
|
2435
2435
|
}
|
|
2436
2436
|
}, Je = class {
|
|
2437
2437
|
index = 0;
|
|
@@ -2445,9 +2445,9 @@ var ze = class {
|
|
|
2445
2445
|
scaleY = 1;
|
|
2446
2446
|
shearX = 0;
|
|
2447
2447
|
shearY = 0;
|
|
2448
|
-
inherit =
|
|
2448
|
+
inherit = W.Normal;
|
|
2449
2449
|
skinRequired = !1;
|
|
2450
|
-
color = new
|
|
2450
|
+
color = new y();
|
|
2451
2451
|
icon;
|
|
2452
2452
|
visible = !1;
|
|
2453
2453
|
constructor(e, t, n) {
|
|
@@ -2455,10 +2455,10 @@ var ze = 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
|
+
}, W;
|
|
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
|
+
})(W ||= {});
|
|
2462
2462
|
//#endregion
|
|
2463
2463
|
//#region ../../node_modules/.pnpm/@esotericsoftware+spine-core@4.2.84/node_modules/@esotericsoftware/spine-core/dist/Bone.js
|
|
2464
2464
|
var Ye = class {
|
|
@@ -2486,7 +2486,7 @@ var Ye = class {
|
|
|
2486
2486
|
d = 0;
|
|
2487
2487
|
worldY = 0;
|
|
2488
2488
|
worldX = 0;
|
|
2489
|
-
inherit =
|
|
2489
|
+
inherit = W.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) * b.degRad, d = (n + 90 + o) * b.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 W.Normal: {
|
|
2517
|
+
let e = (n + a) * b.degRad, t = (n + 90 + o) * b.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 W.OnlyTranslation: {
|
|
2522
|
+
let e = (n + a) * b.degRad, t = (n + 90 + o) * b.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 W.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) * b.radDeg) : (c = 0, u = 0, f = 90 - Math.atan2(d, l) * b.radDeg);
|
|
2531
|
+
let p = (n + a - f) * b.degRad, m = (n + o - f + 90) * b.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 W.NoScale:
|
|
2536
|
+
case W.NoScaleOrReflection: {
|
|
2537
|
+
n *= b.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 == W.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 *= b.degRad, o = (90 + o) * b.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) * b.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) * b.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 == W.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 W.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 W.NoScale:
|
|
2571
|
+
case W.NoScaleOrReflection:
|
|
2572
|
+
let e = b.cosDeg(this.rotation), u = b.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 == W.NoScale && a < 0 != (this.skeleton.scaleX < 0 != this.skeleton.scaleY < 0) && (d = -d);
|
|
2576
|
+
let f = b.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) * b.radDeg, this.arotation = Math.atan2(m, f) * b.radDeg;
|
|
2584
|
+
} else this.ascaleX = 0, this.ascaleY = Math.sqrt(p * p + h * h), this.ashearY = 0, this.arotation = 90 - Math.atan2(h, p) * b.radDeg;
|
|
2585
2585
|
}
|
|
2586
2586
|
getWorldRotationX() {
|
|
2587
|
-
return Math.atan2(this.c, this.a) *
|
|
2587
|
+
return Math.atan2(this.c, this.a) * b.radDeg;
|
|
2588
2588
|
}
|
|
2589
2589
|
getWorldRotationY() {
|
|
2590
|
-
return Math.atan2(this.d, this.b) *
|
|
2590
|
+
return Math.atan2(this.d, this.b) * b.radDeg;
|
|
2591
2591
|
}
|
|
2592
2592
|
getWorldScaleX() {
|
|
2593
2593
|
return Math.sqrt(this.a * this.a + this.c * this.c);
|
|
@@ -2612,16 +2612,16 @@ 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 = b.sinDeg(e), n = b.cosDeg(e);
|
|
2616
|
+
return Math.atan2(this.a * t - this.c * n, this.d * n - this.b * t) * b.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 = b.sinDeg(e), n = b.cosDeg(e);
|
|
2621
|
+
return Math.atan2(n * this.c + t * this.d, n * this.a + t * this.b) * b.radDeg;
|
|
2622
2622
|
}
|
|
2623
2623
|
rotateWorld(e) {
|
|
2624
|
-
e *=
|
|
2624
|
+
e *= b.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
|
}
|
|
@@ -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 W.OnlyTranslation:
|
|
2706
|
+
p = (t - e.worldX) * b.signum(e.skeleton.scaleX), m = (n - e.worldY) * b.signum(e.skeleton.scaleY);
|
|
2707
2707
|
break;
|
|
2708
|
-
case
|
|
2708
|
+
case W.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) * b.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) * b.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 W.NoScale:
|
|
2720
|
+
case W.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,11 +2731,11 @@ 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 != W.Normal || t.inherit != W.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
|
-
!O || a ? (
|
|
2737
|
+
let y = t.ax, x = 0, S = 0, C = 0, w = e.a, T = e.b, E = e.c, D = e.d, O = Math.abs(d - f) <= 1e-4;
|
|
2738
|
+
!O || a ? (x = 0, S = w * y + e.worldX, C = E * y + e.worldY) : (x = t.ay, S = w * y + T * x + e.worldX, C = E * y + D * x + e.worldY);
|
|
2739
2739
|
let k = e.parent;
|
|
2740
2740
|
if (!k) throw Error("IK parent must itself have a parent.");
|
|
2741
2741
|
w = k.a, T = k.b, E = k.c, D = k.d;
|
|
@@ -2743,7 +2743,7 @@ var Ye = class {
|
|
|
2743
2743
|
A = Math.abs(A) <= 1e-4 ? 0 : 1 / A;
|
|
2744
2744
|
let N = (j * D - M * T) * A - l, P = (M * w - j * E) * A - u, F = Math.sqrt(N * N + P * P), I = t.data.length * h, L, R;
|
|
2745
2745
|
if (F < 1e-4) {
|
|
2746
|
-
this.apply1(e, n, r, !1, a, !1, c), t.updateWorldTransformWith(y,
|
|
2746
|
+
this.apply1(e, n, r, !1, a, !1, c), t.updateWorldTransformWith(y, x, 0, t.ascaleX, t.ascaleY, t.ashearX, t.ashearY);
|
|
2747
2747
|
return;
|
|
2748
2748
|
}
|
|
2749
2749
|
j = n - k.worldX, M = r - k.worldY;
|
|
@@ -2774,11 +2774,11 @@ var Ye = class {
|
|
|
2774
2774
|
break outer;
|
|
2775
2775
|
}
|
|
2776
2776
|
}
|
|
2777
|
-
let o =
|
|
2777
|
+
let o = b.PI, s = F - w, c = s * s, l = 0, u = 0, p = F + w, m = p * p, h = 0;
|
|
2778
2778
|
E = -w * F / (e - t), E >= -1 && E <= 1 && (E = Math.acos(E), j = w * Math.cos(E) + F, M = T * Math.sin(E), D = j * j + M * M, D < c && (o = E, c = D, s = j, l = M), D > m && (u = E, m = D, p = j, h = M)), V <= (c + m) * .5 ? (L = n - Math.atan2(l * i, s), R = o * i) : (L = n - Math.atan2(h * i, p), R = u * i);
|
|
2779
2779
|
}
|
|
2780
|
-
let ee = Math.atan2(
|
|
2781
|
-
L = (L - ee) *
|
|
2780
|
+
let ee = Math.atan2(x, y) * v, te = e.arotation;
|
|
2781
|
+
L = (L - ee) * b.radDeg + g - te, L > 180 ? L -= 360 : L < -180 && (L += 360), e.updateWorldTransformWith(l, u, te + L * c, p, m, 0, 0), te = t.arotation, R = ((R + ee) * b.radDeg - t.ashearX) * v + _ - te, R > 180 ? R -= 360 : R < -180 && (R += 360), t.updateWorldTransformWith(y, x, te + R * c, t.ascaleX, t.ascaleY, t.ashearX, t.ashearY);
|
|
2782
2782
|
}
|
|
2783
2783
|
}, et = class extends Xe {
|
|
2784
2784
|
bones = [];
|
|
@@ -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 =
|
|
2812
|
+
positionMode = G.Fixed;
|
|
2813
2813
|
spacingMode = K.Fixed;
|
|
2814
|
-
rotateMode =
|
|
2814
|
+
rotateMode = nt.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
|
+
}, G;
|
|
2825
2825
|
(function(e) {
|
|
2826
2826
|
e[e.Fixed = 0] = "Fixed", e[e.Percent = 1] = "Percent";
|
|
2827
|
-
})(
|
|
2827
|
+
})(G ||= {});
|
|
2828
2828
|
var K;
|
|
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
2831
|
})(K ||= {});
|
|
2832
|
-
var
|
|
2832
|
+
var nt;
|
|
2833
2833
|
(function(e) {
|
|
2834
2834
|
e[e.Tangent = 0] = "Tangent", e[e.Chain = 1] = "Chain", e[e.ChainScale = 2] = "ChainScale";
|
|
2835
|
-
})(
|
|
2835
|
+
})(nt ||= {});
|
|
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 rt = class e {
|
|
2839
2839
|
static NONE = -1;
|
|
2840
2840
|
static BEFORE = -2;
|
|
2841
2841
|
static AFTER = -3;
|
|
@@ -2877,17 +2877,17 @@ var it = class e {
|
|
|
2877
2877
|
}
|
|
2878
2878
|
update(t) {
|
|
2879
2879
|
let n = this.target.getAttachment();
|
|
2880
|
-
if (!(n instanceof
|
|
2880
|
+
if (!(n instanceof We)) 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 == nt.Tangent, c = o.rotateMode == nt.ChainScale, l = this.bones, u = l.length, d = s ? u : u + 1, f = x.setArraySize(this.spaces, d), p = c ? this.lengths = x.setArraySize(this.lengths, u) : [], m = this.spacing;
|
|
2884
2884
|
switch (o.spacingMode) {
|
|
2885
2885
|
case K.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
|
+
x.arrayFill(f, 1, d, m);
|
|
2891
2891
|
break;
|
|
2892
2892
|
case K.Proportional:
|
|
2893
2893
|
let t = 0;
|
|
@@ -2916,11 +2916,11 @@ var it = 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 == nt.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 ? b.degRad : -b.degRad;
|
|
2924
2924
|
}
|
|
2925
2925
|
for (let e = 0, t = 3; e < u; e++, t += 3) {
|
|
2926
2926
|
let n = l[e];
|
|
@@ -2940,18 +2940,18 @@ var it = 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 > b.PI ? l -= b.PI2 : l < -b.PI && (l += b.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 = x.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 == G.Percent && (a *= m);
|
|
2955
2955
|
let h;
|
|
2956
2956
|
switch (this.data.spacingMode) {
|
|
2957
2957
|
case K.Percent:
|
|
@@ -2962,7 +2962,7 @@ var it = class e {
|
|
|
2962
2962
|
break;
|
|
2963
2963
|
default: h = 1;
|
|
2964
2964
|
}
|
|
2965
|
-
c =
|
|
2965
|
+
c = x.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,10 +2990,10 @@ var it = 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 ==
|
|
2993
|
+
l ? (u += 2, c = x.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 = x.setArraySize(this.world, u), t.computeWorldVertices(i, 2, u, c, 0, 2));
|
|
2994
|
+
let p = x.setArraySize(this.curves, d), m = 0, h = c[0], g = c[1], _ = 0, v = 0, y = 0, b = 0, S = 0, C = 0, w = 0, T = 0, E = 0, D = 0, O = 0, k = 0, A = 0, j = 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], S = c[t + 4], C = c[t + 5], w = (h - _ * 2 + y) * .1875, T = (g - v * 2 + b) * .1875, E = ((_ - y) * 3 - h + S) * .09375, D = ((v - b) * 3 - g + C) * .09375, O = w * 2 + E, k = T * 2 + D, A = (_ - h) * .75 + w + E * .16666667, j = (v - g) * .75 + T + D * .16666667, m += Math.sqrt(A * A + j * j), A += O, j += k, O += E, k += D, m += Math.sqrt(A * A + j * j), A += O, j += k, m += Math.sqrt(A * A + j * j), A += O + E, j += k + D, m += Math.sqrt(A * A + j * j), p[e] = m, h = S, g = C;
|
|
2996
|
+
this.data.positionMode == G.Percent && (a *= m);
|
|
2997
2997
|
let M;
|
|
2998
2998
|
switch (this.data.spacingMode) {
|
|
2999
2999
|
case K.Percent:
|
|
@@ -3008,22 +3008,22 @@ var it = class e {
|
|
|
3008
3008
|
for (let e = 0, t = 0, i = 0, d = 0; e < n; e++, t += 3) {
|
|
3009
3009
|
let n = o[e] * M;
|
|
3010
3010
|
a += n;
|
|
3011
|
-
let
|
|
3012
|
-
if (l)
|
|
3013
|
-
else if (
|
|
3014
|
-
this.addBeforePosition(
|
|
3011
|
+
let x = a;
|
|
3012
|
+
if (l) x %= m, x < 0 && (x += m), i = 0;
|
|
3013
|
+
else if (x < 0) {
|
|
3014
|
+
this.addBeforePosition(x, c, 0, s, t);
|
|
3015
3015
|
continue;
|
|
3016
|
-
} else if (
|
|
3017
|
-
this.addAfterPosition(
|
|
3016
|
+
} else if (x > m) {
|
|
3017
|
+
this.addAfterPosition(x - 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 (!(x > e)) {
|
|
3023
|
+
if (i == 0) x /= e;
|
|
3024
3024
|
else {
|
|
3025
3025
|
let t = p[i - 1];
|
|
3026
|
-
|
|
3026
|
+
x = (x - t) / (e - t);
|
|
3027
3027
|
}
|
|
3028
3028
|
break;
|
|
3029
3029
|
}
|
|
@@ -3031,21 +3031,21 @@ var it = 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],
|
|
3034
|
+
for (h = c[e], g = c[e + 1], _ = c[e + 2], v = c[e + 3], y = c[e + 4], b = c[e + 5], S = c[e + 6], C = c[e + 7], w = (h - _ * 2 + y) * .03, T = (g - v * 2 + b) * .03, E = ((_ - y) * 3 - h + S) * .006, D = ((v - b) * 3 - g + C) * .006, O = w * 2 + E, k = T * 2 + D, A = (_ - h) * .3 + w + E * .16666667, j = (v - g) * .3 + T + D * .16666667, P = Math.sqrt(A * A + j * j), N[0] = P, e = 1; e < 8; e++) A += O, j += k, O += E, k += D, P += Math.sqrt(A * A + j * j), N[e] = P;
|
|
3035
3035
|
A += O, j += k, P += Math.sqrt(A * A + j * j), N[8] = P, A += O + E, j += k + D, P += Math.sqrt(A * A + j * j), N[9] = P, d = 0;
|
|
3036
3036
|
}
|
|
3037
|
-
for (
|
|
3037
|
+
for (x *= P;; d++) {
|
|
3038
3038
|
let e = N[d];
|
|
3039
|
-
if (!(
|
|
3040
|
-
if (d == 0)
|
|
3039
|
+
if (!(x > e)) {
|
|
3040
|
+
if (d == 0) x /= e;
|
|
3041
3041
|
else {
|
|
3042
3042
|
let t = N[d - 1];
|
|
3043
|
-
|
|
3043
|
+
x = d + (x - t) / (e - t);
|
|
3044
3044
|
}
|
|
3045
3045
|
break;
|
|
3046
3046
|
}
|
|
3047
3047
|
}
|
|
3048
|
-
this.addCurvePosition(
|
|
3048
|
+
this.addCurvePosition(x * .1, h, g, _, v, y, b, S, C, s, t, r || e > 0 && n == 0);
|
|
3049
3049
|
}
|
|
3050
3050
|
return s;
|
|
3051
3051
|
}
|
|
@@ -3065,7 +3065,7 @@ var it = 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
|
+
}, it = class {
|
|
3069
3069
|
data;
|
|
3070
3070
|
_bone = null;
|
|
3071
3071
|
set bone(e) {
|
|
@@ -3119,9 +3119,9 @@ var it = 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 ct.none: return;
|
|
3123
|
+
case ct.reset: this.reset();
|
|
3124
|
+
case ct.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 it = 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 * b.invPI2 - .5) * b.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 it = 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 = st.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 it = class e {
|
|
|
3171
3171
|
}
|
|
3172
3172
|
this.cx = o.worldX, this.cy = o.worldY;
|
|
3173
3173
|
break;
|
|
3174
|
-
case
|
|
3174
|
+
case ct.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 it = 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 != ct.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 * b.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
|
+
}, at = class {
|
|
3197
3197
|
data;
|
|
3198
3198
|
bone;
|
|
3199
3199
|
color;
|
|
@@ -3205,7 +3205,7 @@ var it = 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 y(), this.darkColor = e.darkColor ? new y() : null, this.setToSetupPose();
|
|
3209
3209
|
}
|
|
3210
3210
|
getSkeleton() {
|
|
3211
3211
|
return this.bone.skeleton;
|
|
@@ -3214,12 +3214,12 @@ var it = 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 T) || !(this.attachment instanceof T) || 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
|
+
}, ot = class {
|
|
3223
3223
|
data;
|
|
3224
3224
|
bones;
|
|
3225
3225
|
target;
|
|
@@ -3229,7 +3229,7 @@ var it = class e {
|
|
|
3229
3229
|
mixScaleX = 0;
|
|
3230
3230
|
mixScaleY = 0;
|
|
3231
3231
|
mixShearY = 0;
|
|
3232
|
-
temp = new
|
|
3232
|
+
temp = new C();
|
|
3233
3233
|
active = !1;
|
|
3234
3234
|
constructor(e, t) {
|
|
3235
3235
|
if (!e) throw Error("data cannot be null.");
|
|
@@ -3255,12 +3255,12 @@ var it = 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 ? b.degRad : -b.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 > b.PI ? a -= b.PI2 : a < -b.PI && (a += b.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 it = 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 > b.PI ? r -= b.PI2 : r < -b.PI && (r += b.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 it = 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 ? b.degRad : -b.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 > b.PI ? a -= b.PI2 : a < -b.PI && (a += b.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 it = 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 > b.PI ? e -= b.PI2 : e < -b.PI && (e += b.PI2);
|
|
3313
3313
|
let t = g.b, n = g.d;
|
|
3314
|
-
e = Math.atan2(n, t) + (e -
|
|
3314
|
+
e = Math.atan2(n, t) + (e - b.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 it = class e {
|
|
|
3338
3338
|
l.updateWorldTransformWith(d, f, u, p, m, l.ashearX, h);
|
|
3339
3339
|
}
|
|
3340
3340
|
}
|
|
3341
|
-
},
|
|
3341
|
+
}, st = class e {
|
|
3342
3342
|
static quadTriangles = [
|
|
3343
3343
|
0,
|
|
3344
3344
|
1,
|
|
@@ -3384,7 +3384,7 @@ var it = class e {
|
|
|
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 at(n, r);
|
|
3388
3388
|
this.slots.push(i), this.drawOrder.push(i);
|
|
3389
3389
|
}
|
|
3390
3390
|
this.ikConstraints = [];
|
|
@@ -3395,19 +3395,19 @@ var it = class e {
|
|
|
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 ot(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 rt(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 it(n, this));
|
|
3409
3409
|
}
|
|
3410
|
-
this.color = new
|
|
3410
|
+
this.color = new y(1, 1, 1, 1), this.updateCache();
|
|
3411
3411
|
}
|
|
3412
3412
|
updateCache() {
|
|
3413
3413
|
let e = this._updateCache;
|
|
@@ -3460,7 +3460,7 @@ var it = 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 && x.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 it = 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 && x.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 We && 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 it = 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 && x.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 it = 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 We)) return;
|
|
3505
3505
|
let n = e.bones;
|
|
3506
3506
|
if (!n) this.sortBone(t);
|
|
3507
3507
|
else {
|
|
@@ -3514,7 +3514,7 @@ var it = 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 && x.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 it = 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) * b.degRad, l = (r.rotation + 90 + r.shearY) * b.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 it = class e {
|
|
|
3568
3568
|
}
|
|
3569
3569
|
setSlotsToSetupPose() {
|
|
3570
3570
|
let e = this.slots;
|
|
3571
|
-
|
|
3571
|
+
x.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 it = 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 C(), n = new C();
|
|
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 it = 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 Ke) u = 8, d = x.setArraySize(r, u, 0), p.computeWorldVertices(n, d, 0, 2), f = e.quadTriangles;
|
|
3677
|
+
else if (p instanceof Ue) {
|
|
3678
3678
|
let e = p;
|
|
3679
|
-
u = e.worldVerticesLength, d =
|
|
3680
|
-
} else if (p instanceof
|
|
3679
|
+
u = e.worldVerticesLength, d = x.setArraySize(r, u, 0), e.computeWorldVertices(n, 0, u, d, 0, 2), f = e.triangles;
|
|
3680
|
+
} else if (p instanceof Fe && i != null) {
|
|
3681
3681
|
i.clipStart(n, p);
|
|
3682
3682
|
continue;
|
|
3683
3683
|
}
|
|
@@ -3703,13 +3703,13 @@ var it = 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
|
+
}, ct;
|
|
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
|
+
})(ct ||= {});
|
|
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 lt = class extends Xe {
|
|
3713
3713
|
_bone = null;
|
|
3714
3714
|
set bone(e) {
|
|
3715
3715
|
this._bone = e;
|
|
@@ -3742,7 +3742,7 @@ var ut = class extends Xe {
|
|
|
3742
3742
|
constructor(e) {
|
|
3743
3743
|
super(e, 0, !1);
|
|
3744
3744
|
}
|
|
3745
|
-
},
|
|
3745
|
+
}, ut = class {
|
|
3746
3746
|
name = null;
|
|
3747
3747
|
bones = [];
|
|
3748
3748
|
slots = [];
|
|
@@ -3845,19 +3845,19 @@ var ut = class extends Xe {
|
|
|
3845
3845
|
}
|
|
3846
3846
|
return null;
|
|
3847
3847
|
}
|
|
3848
|
-
},
|
|
3848
|
+
}, dt = 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
|
+
}, ft = class {
|
|
3856
3856
|
name;
|
|
3857
3857
|
attachments = [];
|
|
3858
3858
|
bones = [];
|
|
3859
3859
|
constraints = [];
|
|
3860
|
-
color = new
|
|
3860
|
+
color = new y(.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 ut = 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 Ue ? (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 ut = 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 dt(t, r, i));
|
|
3931
3931
|
}
|
|
3932
3932
|
}
|
|
3933
3933
|
return e;
|
|
@@ -3936,7 +3936,7 @@ var ut = 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 dt(e, r, i));
|
|
3940
3940
|
}
|
|
3941
3941
|
}
|
|
3942
3942
|
clear() {
|
|
@@ -3957,14 +3957,14 @@ var ut = class extends Xe {
|
|
|
3957
3957
|
n++;
|
|
3958
3958
|
}
|
|
3959
3959
|
}
|
|
3960
|
-
},
|
|
3960
|
+
}, pt = class {
|
|
3961
3961
|
index = 0;
|
|
3962
3962
|
name;
|
|
3963
3963
|
boneData;
|
|
3964
|
-
color = new
|
|
3964
|
+
color = new y(1, 1, 1, 1);
|
|
3965
3965
|
darkColor = null;
|
|
3966
3966
|
attachmentName = null;
|
|
3967
|
-
blendMode =
|
|
3967
|
+
blendMode = mt.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 ut = 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
|
+
}, mt;
|
|
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
|
+
})(mt ||= {});
|
|
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 ht = class extends Xe {
|
|
3982
3982
|
bones = [];
|
|
3983
3983
|
_target = null;
|
|
3984
3984
|
set target(e) {
|
|
@@ -4005,7 +4005,7 @@ var gt = class extends Xe {
|
|
|
4005
4005
|
constructor(e) {
|
|
4006
4006
|
super(e, 0, !1);
|
|
4007
4007
|
}
|
|
4008
|
-
},
|
|
4008
|
+
}, gt = class {
|
|
4009
4009
|
scale = 1;
|
|
4010
4010
|
attachmentLoader;
|
|
4011
4011
|
linkedMeshes = [];
|
|
@@ -4013,9 +4013,9 @@ var gt = 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 ut();
|
|
4017
4017
|
n.name = "";
|
|
4018
|
-
let r = new
|
|
4018
|
+
let r = new _t(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());
|
|
@@ -4031,16 +4031,16 @@ var gt = class extends Xe {
|
|
|
4031
4031
|
let i = r.readString();
|
|
4032
4032
|
if (!i) throw Error("Bone name must not be null.");
|
|
4033
4033
|
let a = e == 0 ? null : n.bones[r.readInt(!0)], s = new Je(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 && (
|
|
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 && (y.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 pt(e, t, i);
|
|
4041
|
+
y.rgba8888ToColor(a.color, r.readInt32());
|
|
4042
4042
|
let s = r.readInt32();
|
|
4043
|
-
s != -1 &&
|
|
4043
|
+
s != -1 && y.rgb888ToColor(a.darkColor = new y(), 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++) {
|
|
@@ -4057,7 +4057,7 @@ var gt = 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 ht(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)];
|
|
@@ -4073,13 +4073,13 @@ var gt = class extends Xe {
|
|
|
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 == G.Fixed && (a.position *= t), a.spacing = r.readFloat(), (a.spacingMode == K.Length || a.spacingMode == K.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 lt(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 gt = 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 (x.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;
|
|
@@ -4121,11 +4121,11 @@ var gt = 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 ft("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 ft(n), r && y.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 gt = 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 bt.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, y.rgba8888ToColor(h.color, r), h.sequence = i, i ?? h.updateRegion(), h) : null;
|
|
4156
4156
|
}
|
|
4157
|
-
case
|
|
4157
|
+
case bt.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 && y.rgba8888ToColor(i.color, r), i) : null;
|
|
4160
4160
|
}
|
|
4161
|
-
case
|
|
4161
|
+
case bt.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, y.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 bt.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, y.rgba8888ToColor(h.color, i), h.sequence = l, a && (h.width = p * o, h.height = m * o), this.linkedMeshes.push(new vt(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 bt.Path: {
|
|
4176
|
+
let t = (s & 16) != 0, r = (s & 32) != 0, i = this.readVertices(e, (s & 64) != 0), l = x.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 && y.rgba8888ToColor(d.color, u), d) : null;
|
|
4180
4180
|
}
|
|
4181
|
-
case
|
|
4181
|
+
case bt.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 && y.rgba8888ToColor(l.color, s), l) : null;
|
|
4184
4184
|
}
|
|
4185
|
-
case
|
|
4185
|
+
case bt.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 && y.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 E(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 yt();
|
|
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 gt = 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 = x.toFloatArray(a), i.bones = o, i;
|
|
4206
4206
|
}
|
|
4207
4207
|
readFloatArray(e, t, n) {
|
|
4208
4208
|
let r = Array(t);
|
|
@@ -4223,14 +4223,14 @@ var gt = 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 Nt: {
|
|
4227
|
+
let n = new de(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 Pt: {
|
|
4233
|
+
let n = new oe(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()) {
|
|
@@ -4244,8 +4244,8 @@ var gt = class extends Xe {
|
|
|
4244
4244
|
r.push(n);
|
|
4245
4245
|
break;
|
|
4246
4246
|
}
|
|
4247
|
-
case
|
|
4248
|
-
let n = new
|
|
4247
|
+
case Ft: {
|
|
4248
|
+
let n = new se(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()) {
|
|
@@ -4259,8 +4259,8 @@ var gt = class extends Xe {
|
|
|
4259
4259
|
r.push(n);
|
|
4260
4260
|
break;
|
|
4261
4261
|
}
|
|
4262
|
-
case
|
|
4263
|
-
let n = new
|
|
4262
|
+
case It: {
|
|
4263
|
+
let n = new le(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()) {
|
|
@@ -4274,8 +4274,8 @@ var gt = class extends Xe {
|
|
|
4274
4274
|
r.push(n);
|
|
4275
4275
|
break;
|
|
4276
4276
|
}
|
|
4277
|
-
case
|
|
4278
|
-
let n = new
|
|
4277
|
+
case Lt: {
|
|
4278
|
+
let n = new ue(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()) {
|
|
@@ -4289,8 +4289,8 @@ var gt = class extends Xe {
|
|
|
4289
4289
|
r.push(n);
|
|
4290
4290
|
break;
|
|
4291
4291
|
}
|
|
4292
|
-
case
|
|
4293
|
-
let n = new
|
|
4292
|
+
case Rt: {
|
|
4293
|
+
let n = new ce(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()) {
|
|
@@ -4310,47 +4310,47 @@ var gt = 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 == Mt) {
|
|
4314
|
+
let n = new ae(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 St:
|
|
4322
|
+
r.push(q(e, new L(a, o, t), 1));
|
|
4323
|
+
break;
|
|
4321
4324
|
case Ct:
|
|
4322
|
-
r.push(
|
|
4325
|
+
r.push(xt(e, new R(a, o, t), i));
|
|
4323
4326
|
break;
|
|
4324
4327
|
case wt:
|
|
4325
|
-
r.push(
|
|
4328
|
+
r.push(q(e, new z(a, o, t), i));
|
|
4326
4329
|
break;
|
|
4327
4330
|
case Tt:
|
|
4328
4331
|
r.push(q(e, new B(a, o, t), i));
|
|
4329
4332
|
break;
|
|
4330
4333
|
case Et:
|
|
4331
|
-
r.push(
|
|
4334
|
+
r.push(xt(e, new V(a, o, t), 1));
|
|
4332
4335
|
break;
|
|
4333
4336
|
case Dt:
|
|
4334
|
-
r.push(
|
|
4337
|
+
r.push(q(e, new ee(a, o, t), 1));
|
|
4335
4338
|
break;
|
|
4336
4339
|
case Ot:
|
|
4337
4340
|
r.push(q(e, new te(a, o, t), 1));
|
|
4338
4341
|
break;
|
|
4339
4342
|
case kt:
|
|
4340
|
-
r.push(
|
|
4343
|
+
r.push(xt(e, new ne(a, o, t), 1));
|
|
4341
4344
|
break;
|
|
4342
4345
|
case At:
|
|
4343
|
-
r.push(
|
|
4346
|
+
r.push(q(e, new re(a, o, t), 1));
|
|
4344
4347
|
break;
|
|
4345
|
-
case jt:
|
|
4346
|
-
r.push(q(e, new ie(a, o, t), 1));
|
|
4347
|
-
break;
|
|
4348
|
-
case Mt: r.push(q(e, new ae(a, o, t), 1));
|
|
4348
|
+
case jt: r.push(q(e, new ie(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 he(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;
|
|
@@ -4359,7 +4359,7 @@ var gt = class extends Xe {
|
|
|
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 ge(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()) {
|
|
@@ -4377,14 +4377,14 @@ var gt = 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 Vt:
|
|
4381
|
+
r.push(q(e, new _e(o, s, t), a.positionMode == G.Fixed ? i : 1));
|
|
4382
|
+
break;
|
|
4380
4383
|
case Ht:
|
|
4381
|
-
r.push(q(e, new ve(o, s, t), a.
|
|
4384
|
+
r.push(q(e, new ve(o, s, t), a.spacingMode == K.Length || a.spacingMode == K.Fixed ? i : 1));
|
|
4382
4385
|
break;
|
|
4383
4386
|
case Ut:
|
|
4384
|
-
|
|
4385
|
-
break;
|
|
4386
|
-
case Wt:
|
|
4387
|
-
let n = new be(o, s, t), c = e.readFloat(), l = e.readFloat(), u = e.readFloat(), d = e.readFloat();
|
|
4387
|
+
let n = new ye(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()) {
|
|
@@ -4403,14 +4403,17 @@ var gt = 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 == Zt) {
|
|
4407
|
+
let n = new Oe(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 Wt:
|
|
4415
|
+
r.push(q(e, new xe(i, a, t), 1));
|
|
4416
|
+
break;
|
|
4414
4417
|
case Gt:
|
|
4415
4418
|
r.push(q(e, new Se(i, a, t), 1));
|
|
4416
4419
|
break;
|
|
@@ -4426,10 +4429,7 @@ var gt = class extends Xe {
|
|
|
4426
4429
|
case Yt:
|
|
4427
4430
|
r.push(q(e, new Ee(i, a, t), 1));
|
|
4428
4431
|
break;
|
|
4429
|
-
case Xt:
|
|
4430
|
-
r.push(q(e, new De(i, a, t), 1));
|
|
4431
|
-
break;
|
|
4432
|
-
case Zt: r.push(q(e, new Oe(i, a, t), 1));
|
|
4432
|
+
case Xt: r.push(q(e, new De(i, a, t), 1));
|
|
4433
4433
|
}
|
|
4434
4434
|
}
|
|
4435
4435
|
}
|
|
@@ -4442,13 +4442,13 @@ var gt = 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 zt: {
|
|
4446
|
+
let t = o, a = t.bones, s = t.vertices, u = a ? s.length / 3 * 2 : s.length, d = new fe(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 ? x.newFloatArray(u) : s;
|
|
4450
4450
|
else {
|
|
4451
|
-
r =
|
|
4451
|
+
r = x.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;
|
|
@@ -4467,11 +4467,11 @@ var gt = class extends Xe {
|
|
|
4467
4467
|
r.push(d);
|
|
4468
4468
|
break;
|
|
4469
4469
|
}
|
|
4470
|
-
case
|
|
4471
|
-
let t = new
|
|
4470
|
+
case Bt: {
|
|
4471
|
+
let t = new ke(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, O[i & 15], i >> 4, e.readFloat());
|
|
4475
4475
|
}
|
|
4476
4476
|
r.push(t);
|
|
4477
4477
|
break;
|
|
@@ -4482,11 +4482,11 @@ var gt = 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 me(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 = x.newArray(i, 0);
|
|
4488
4488
|
for (let e = i - 1; e >= 0; e--) o[e] = -1;
|
|
4489
|
-
let s =
|
|
4489
|
+
let s = x.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,7 +4500,7 @@ var gt = 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 pe(o);
|
|
4504
4504
|
for (let r = 0; r < o; r++) {
|
|
4505
4505
|
let i = e.readFloat(), a = n.events[e.readInt(!0)], o = new Ze(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);
|
|
@@ -4509,9 +4509,9 @@ var gt = class extends Xe {
|
|
|
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 k(t, r, s);
|
|
4513
4513
|
}
|
|
4514
|
-
},
|
|
4514
|
+
}, _t = class {
|
|
4515
4515
|
strings;
|
|
4516
4516
|
index;
|
|
4517
4517
|
buffer;
|
|
@@ -4570,7 +4570,7 @@ var gt = class extends Xe {
|
|
|
4570
4570
|
readBoolean() {
|
|
4571
4571
|
return this.readByte() != 0;
|
|
4572
4572
|
}
|
|
4573
|
-
},
|
|
4573
|
+
}, vt = class {
|
|
4574
4574
|
parent;
|
|
4575
4575
|
skinIndex;
|
|
4576
4576
|
slotIndex;
|
|
@@ -4579,17 +4579,17 @@ var gt = 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
|
+
}, yt = 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
|
+
}, bt;
|
|
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
|
-
})(
|
|
4592
|
+
})(bt ||= {});
|
|
4593
4593
|
function q(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++) {
|
|
@@ -4604,7 +4604,7 @@ function q(e, t, n) {
|
|
|
4604
4604
|
}
|
|
4605
4605
|
return t;
|
|
4606
4606
|
}
|
|
4607
|
-
function
|
|
4607
|
+
function xt(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;
|
|
@@ -4621,14 +4621,14 @@ function St(e, t, n) {
|
|
|
4621
4621
|
function J(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 St = 0, Ct = 1, wt = 2, Tt = 3, Et = 4, Dt = 5, Ot = 6, kt = 7, At = 8, jt = 9, Mt = 10, Nt = 0, Pt = 1, Ft = 2, It = 3, Lt = 4, Rt = 5, zt = 0, Bt = 1, Vt = 0, Ht = 1, Ut = 2, Wt = 0, Gt = 1, Kt = 2, qt = 4, Jt = 5, Yt = 6, Xt = 7, Zt = 8, Y = 1, X = 2, Qt = 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 S(() => x.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 Ct = 0, wt = 1, Tt = 2, Et = 3, Dt = 4, Ot = 5, kt = 6, At = 7, jt = 8, Mt =
|
|
|
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 Pe) {
|
|
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 = x.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 Ct = 0, wt = 1, Tt = 2, Et = 3, Dt = 4, Ot = 5, kt = 6, At = 7, jt = 8, Mt =
|
|
|
4716
4716
|
getHeight() {
|
|
4717
4717
|
return this.maxY - this.minY;
|
|
4718
4718
|
}
|
|
4719
|
-
},
|
|
4719
|
+
}, $t = 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 S(() => []);
|
|
4726
|
+
polygonIndicesPool = new S(() => []);
|
|
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 Ct = 0, wt = 1, Tt = 2, Et = 3, Dt = 4, Ot = 5, kt = 6, At = 7, jt = 8, Mt =
|
|
|
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
|
+
}, en = class e {
|
|
4811
|
+
triangulator = new $t();
|
|
4812
4812
|
clippingPolygon = [];
|
|
4813
4813
|
clipOutput = [];
|
|
4814
4814
|
clippedVertices = [];
|
|
@@ -4820,7 +4820,7 @@ var Ct = 0, wt = 1, Tt = 2, Et = 3, Dt = 4, Ot = 5, kt = 6, At = 7, jt = 8, Mt =
|
|
|
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 = x.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 Ct = 0, wt = 1, Tt = 2, Et = 3, Dt = 4, Ot = 5, kt = 6, At = 7, jt = 8, Mt =
|
|
|
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 = x.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 = x.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 = x.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 = x.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,7 +4884,7 @@ var Ct = 0, wt = 1, Tt = 2, Et = 3, Dt = 4, Ot = 5, kt = 6, At = 7, jt = 8, Mt =
|
|
|
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], S = r[n], C = r[n + 1];
|
|
4888
4888
|
n = t[m + 2] << 1;
|
|
4889
4889
|
let w = e[n], T = e[n + 1], E = r[n], D = r[n + 1];
|
|
4890
4890
|
for (let e = 0; e < d; e++) {
|
|
@@ -4892,22 +4892,22 @@ var Ct = 0, wt = 1, Tt = 2, Et = 3, Dt = 4, Ot = 5, kt = 6, At = 7, jt = 8, Mt =
|
|
|
4892
4892
|
if (this.clip(h, g, y, b, w, T, u[e], s)) {
|
|
4893
4893
|
let e = s.length;
|
|
4894
4894
|
if (e == 0) continue;
|
|
4895
|
-
let n = b - T, r = w - y, u = h - w, d = T - g, m = 1 / (n * u + r * (g - T)), O = e >> 1, k = this.clipOutput, A =
|
|
4895
|
+
let n = b - T, r = w - y, u = h - w, d = T - g, m = 1 / (n * u + r * (g - T)), O = e >> 1, k = this.clipOutput, A = x.setArraySize(c, t + O * f);
|
|
4896
4896
|
for (let s = 0; s < e; s += 2, t += f) {
|
|
4897
4897
|
let e = k[s], c = k[s + 1];
|
|
4898
4898
|
A[t] = e, A[t + 1] = c, A[t + 2] = i.r, A[t + 3] = i.g, A[t + 4] = i.b, A[t + 5] = i.a;
|
|
4899
4899
|
let l = e - w, f = c - T, p = (n * l + r * f) * m, h = (d * l + u * f) * m, g = 1 - p - h;
|
|
4900
|
-
A[t + 6] = _ * p +
|
|
4900
|
+
A[t + 6] = _ * p + S * h + E * g, A[t + 7] = v * p + C * h + D * g, o && (A[t + 8] = a.r, A[t + 9] = a.g, A[t + 10] = a.b, A[t + 11] = a.a);
|
|
4901
4901
|
}
|
|
4902
4902
|
t = l.length;
|
|
4903
|
-
let j =
|
|
4903
|
+
let j = x.setArraySize(l, t + 3 * (O - 2));
|
|
4904
4904
|
O--;
|
|
4905
4905
|
for (let e = 1; e < O; e++, t += 3) j[t] = p, j[t + 1] = p + e, j[t + 2] = p + e + 1;
|
|
4906
4906
|
p += O + 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 = x.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] = S, e[t + 19] = C, e[t + 20] = a.r, e[t + 21] = a.g, e[t + 22] = a.b, e[t + 23] = a.a, e[t + 24] = w, e[t + 25] = T, e[t + 26] = i.r, e[t + 27] = i.g, e[t + 28] = i.b, e[t + 29] = i.a, e[t + 30] = E, e[t + 31] = D, 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] = S, e[t + 15] = C, e[t + 16] = w, e[t + 17] = T, e[t + 18] = i.r, e[t + 19] = i.g, e[t + 20] = i.b, e[t + 21] = i.a, e[t + 22] = E, e[t + 23] = D), t = l.length;
|
|
4910
|
+
let n = x.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 Ct = 0, wt = 1, Tt = 2, Et = 3, Dt = 4, Ot = 5, kt = 6, At = 7, jt = 8, Mt =
|
|
|
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], S = e[n + 1], C = r[n], w = 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, S, c[e], i)) {
|
|
4929
4929
|
let e = i.length;
|
|
4930
4930
|
if (e == 0) continue;
|
|
4931
|
-
let n = _ -
|
|
4931
|
+
let n = _ - S, r = b - g, c = f - b, l = S - p, d = 1 / (n * c + r * (p - S)), T = e >> 1, E = this.clipOutput, D = x.setArraySize(a, t + T * 2), O = x.setArraySize(o, t + T * 2);
|
|
4932
4932
|
for (let i = 0; i < e; i += 2, t += 2) {
|
|
4933
4933
|
let e = E[i], a = E[i + 1];
|
|
4934
4934
|
D[t] = e, D[t + 1] = a;
|
|
4935
|
-
let o = e - b, s = a -
|
|
4935
|
+
let o = e - b, s = a - S, u = (n * o + r * s) * d, f = (l * o + c * s) * d, p = 1 - u - f;
|
|
4936
4936
|
O[t] = m * u + v * f + C * p, O[t + 1] = h * u + y * f + w * p;
|
|
4937
4937
|
}
|
|
4938
4938
|
t = s.length;
|
|
4939
|
-
let k =
|
|
4939
|
+
let k = x.setArraySize(s, t + 3 * (T - 2));
|
|
4940
4940
|
T--;
|
|
4941
4941
|
for (let e = 1; e < T; e++, t += 3) k[t] = u, k[t + 1] = u + e, k[t + 2] = u + e + 1;
|
|
4942
4942
|
u += T + 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 =
|
|
4944
|
+
let e = x.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] = S;
|
|
4946
|
+
let n = x.setArraySize(o, t + 6);
|
|
4947
4947
|
n[t] = m, n[t + 1] = h, n[t + 2] = v, n[t + 3] = y, n[t + 4] = C, n[t + 5] = w, t = s.length;
|
|
4948
|
-
let r =
|
|
4948
|
+
let r = x.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 Ct = 0, wt = 1, Tt = 2, Et = 3, Dt = 4, Ot = 5, kt = 6, At = 7, jt = 8, Mt =
|
|
|
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
|
+
}, tn = class {
|
|
5006
5006
|
attachmentLoader;
|
|
5007
5007
|
scale = 1;
|
|
5008
5008
|
linkedMeshes = [];
|
|
@@ -5010,22 +5010,22 @@ var Ct = 0, wt = 1, Tt = 2, Et = 3, Dt = 4, Ot = 5, kt = 6, At = 7, jt = 8, Mt =
|
|
|
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 ut(), 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
5017
|
let s = new Je(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 =
|
|
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 = x.enumValue(W, $(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 pt(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 = y.fromString(c)), o.attachmentName = $(t, "attachment", null), o.blendMode = x.enumValue(mt, $(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
5031
|
let i = r.ik[e], a = new et(i.name);
|
|
@@ -5040,7 +5040,7 @@ var Ct = 0, wt = 1, Tt = 2, Et = 3, Dt = 4, Ot = 5, kt = 6, At = 7, jt = 8, Mt =
|
|
|
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 ht(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);
|
|
@@ -5061,17 +5061,17 @@ var Ct = 0, wt = 1, Tt = 2, Et = 3, Dt = 4, Ot = 5, kt = 6, At = 7, jt = 8, Mt =
|
|
|
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 = x.enumValue(G, $(i, "positionMode", "Percent")), a.spacingMode = x.enumValue(K, $(i, "spacingMode", "Length")), a.rotateMode = x.enumValue(nt, $(i, "rotateMode", "Tangent")), a.offsetRotation = $(i, "rotation", 0), a.position = $(i, "position", 0), a.positionMode == G.Fixed && (a.position *= t), a.spacing = $(i, "spacing", 0), (a.spacingMode == K.Length || a.spacingMode == K.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 lt(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 ft(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}.`);
|
|
@@ -5150,7 +5150,7 @@ var Ct = 0, wt = 1, Tt = 2, Et = 3, Dt = 4, Ot = 5, kt = 6, At = 7, jt = 8, Mt =
|
|
|
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 nn(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 Ct = 0, wt = 1, Tt = 2, Et = 3, Dt = 4, Ot = 5, kt = 6, At = 7, jt = 8, Mt =
|
|
|
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 = x.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 Ct = 0, wt = 1, Tt = 2, Et = 3, Dt = 4, Ot = 5, kt = 6, At = 7, jt = 8, Mt =
|
|
|
5188
5188
|
}
|
|
5189
5189
|
readSequence(e) {
|
|
5190
5190
|
if (e == null) return null;
|
|
5191
|
-
let t = new
|
|
5191
|
+
let t = new E($(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 Ct = 0, wt = 1, Tt = 2, Et = 3, Dt = 4, Ot = 5, kt = 6, At = 7, jt = 8, Mt =
|
|
|
5196
5196
|
t.worldVerticesLength = n;
|
|
5197
5197
|
let i = e.vertices;
|
|
5198
5198
|
if (n == i.length) {
|
|
5199
|
-
let e =
|
|
5199
|
+
let e = x.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 Ct = 0, wt = 1, Tt = 2, Et = 3, Dt = 4, Ot = 5, kt = 6, At = 7, jt = 8, Mt =
|
|
|
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 = x.toFloatArray(a);
|
|
5211
5211
|
}
|
|
5212
5212
|
readAnimation(e, t, n) {
|
|
5213
5213
|
let r = this.scale, i = [];
|
|
@@ -5220,14 +5220,14 @@ var Ct = 0, wt = 1, Tt = 2, Et = 3, Dt = 4, Ot = 5, kt = 6, At = 7, jt = 8, Mt =
|
|
|
5220
5220
|
if (!t) continue;
|
|
5221
5221
|
let n = t.length;
|
|
5222
5222
|
if (e == "attachment") {
|
|
5223
|
-
let e = new
|
|
5223
|
+
let e = new de(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 oe(n, n << 2, o), r = t[0], a = $(r, "time", 0), s = y.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 Ct = 0, wt = 1, Tt = 2, Et = 3, Dt = 4, Ot = 5, kt = 6, At = 7, jt = 8, Mt =
|
|
|
5235
5235
|
e.shrink(i);
|
|
5236
5236
|
break;
|
|
5237
5237
|
}
|
|
5238
|
-
let c = $(o, "time", 0), l =
|
|
5238
|
+
let c = $(o, "time", 0), l = y.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 se(n, n * 3, o), r = t[0], a = $(r, "time", 0), s = y.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 Ct = 0, wt = 1, Tt = 2, Et = 3, Dt = 4, Ot = 5, kt = 6, At = 7, jt = 8, Mt =
|
|
|
5248
5248
|
e.shrink(i);
|
|
5249
5249
|
break;
|
|
5250
5250
|
}
|
|
5251
|
-
let c = $(o, "time", 0), l =
|
|
5251
|
+
let c = $(o, "time", 0), l = y.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(Z(t, new
|
|
5255
|
+
} else if (e == "alpha") i.push(Z(t, new ce(n, n, o), 0, 1));
|
|
5256
5256
|
else if (e == "rgba2") {
|
|
5257
|
-
let e = new
|
|
5257
|
+
let e = new le(n, n * 7, o), r = t[0], a = $(r, "time", 0), s = y.fromString(r.light), c = y.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 Ct = 0, wt = 1, Tt = 2, Et = 3, Dt = 4, Ot = 5, kt = 6, At = 7, jt = 8, Mt =
|
|
|
5262
5262
|
e.shrink(i);
|
|
5263
5263
|
break;
|
|
5264
5264
|
}
|
|
5265
|
-
let l = $(o, "time", 0), u =
|
|
5265
|
+
let l = $(o, "time", 0), u = y.fromString(o.light), d = y.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 ue(n, n * 6, o), r = t[0], a = $(r, "time", 0), s = y.fromString(r.light), c = y.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 Ct = 0, wt = 1, Tt = 2, Et = 3, Dt = 4, Ot = 5, kt = 6, At = 7, jt = 8, Mt =
|
|
|
5275
5275
|
e.shrink(i);
|
|
5276
5276
|
break;
|
|
5277
5277
|
}
|
|
5278
|
-
let l = $(o, "time", 0), u =
|
|
5278
|
+
let l = $(o, "time", 0), u = y.fromString(o.light), d = y.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 Ct = 0, wt = 1, Tt = 2, Et = 3, Dt = 4, Ot = 5, kt = 6, At = 7, jt = 8, Mt =
|
|
|
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(Z(t, new
|
|
5292
|
+
if (e === "rotate") i.push(Z(t, new L(n, n, s), 0, 1));
|
|
5293
5293
|
else if (e === "translate") {
|
|
5294
|
-
let e = new
|
|
5295
|
-
i.push(
|
|
5294
|
+
let e = new R(n, n << 1, s);
|
|
5295
|
+
i.push(rn(t, e, "x", "y", 0, r));
|
|
5296
5296
|
} else if (e === "translatex") {
|
|
5297
|
-
let e = new
|
|
5297
|
+
let e = new z(n, n, s);
|
|
5298
5298
|
i.push(Z(t, e, 0, r));
|
|
5299
5299
|
} else if (e === "translatey") {
|
|
5300
|
-
let e = new
|
|
5300
|
+
let e = new B(n, n, s);
|
|
5301
5301
|
i.push(Z(t, e, 0, r));
|
|
5302
5302
|
} else if (e === "scale") {
|
|
5303
|
-
let e = new
|
|
5304
|
-
i.push(
|
|
5303
|
+
let e = new V(n, n << 1, s);
|
|
5304
|
+
i.push(rn(t, e, "x", "y", 1, 1));
|
|
5305
5305
|
} else if (e === "scalex") {
|
|
5306
|
-
let e = new
|
|
5306
|
+
let e = new ee(n, n, s);
|
|
5307
5307
|
i.push(Z(t, e, 1, 1));
|
|
5308
5308
|
} else if (e === "scaley") {
|
|
5309
|
-
let e = new
|
|
5309
|
+
let e = new te(n, n, s);
|
|
5310
5310
|
i.push(Z(t, e, 1, 1));
|
|
5311
5311
|
} else if (e === "shear") {
|
|
5312
|
-
let e = new
|
|
5313
|
-
i.push(
|
|
5312
|
+
let e = new ne(n, n << 1, s);
|
|
5313
|
+
i.push(rn(t, e, "x", "y", 0, 1));
|
|
5314
5314
|
} else if (e === "shearx") {
|
|
5315
|
-
let e = new
|
|
5315
|
+
let e = new re(n, n, s);
|
|
5316
5316
|
i.push(Z(t, e, 0, 1));
|
|
5317
5317
|
} else if (e === "sheary") {
|
|
5318
|
-
let e = new
|
|
5318
|
+
let e = new ie(n, n, s);
|
|
5319
5319
|
i.push(Z(t, e, 0, 1));
|
|
5320
5320
|
} else if (e === "inherit") {
|
|
5321
|
-
let e = new
|
|
5321
|
+
let e = new ae(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), x.enumValue(W, $(r, "inherit", "Normal")));
|
|
5325
5325
|
}
|
|
5326
5326
|
i.push(e);
|
|
5327
5327
|
}
|
|
@@ -5333,7 +5333,7 @@ var Ct = 0, wt = 1, Tt = 2, Et = 3, Dt = 4, Ot = 5, kt = 6, At = 7, jt = 8, Mt =
|
|
|
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 he(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 Ct = 0, wt = 1, Tt = 2, Et = 3, Dt = 4, Ot = 5, kt = 6, At = 7, jt = 8, Mt =
|
|
|
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 ge(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 Ct = 0, wt = 1, Tt = 2, Et = 3, Dt = 4, Ot = 5, kt = 6, At = 7, jt = 8, Mt =
|
|
|
5373
5373
|
if (!n) continue;
|
|
5374
5374
|
let c = t.length;
|
|
5375
5375
|
if (e === "position") {
|
|
5376
|
-
let e = new
|
|
5377
|
-
i.push(Z(t, e, 0, o.positionMode ==
|
|
5376
|
+
let e = new _e(c, c, s);
|
|
5377
|
+
i.push(Z(t, e, 0, o.positionMode == G.Fixed ? r : 1));
|
|
5378
5378
|
} else if (e === "spacing") {
|
|
5379
|
-
let e = new
|
|
5379
|
+
let e = new ve(c, c, s);
|
|
5380
5380
|
i.push(Z(t, e, 0, o.spacingMode == K.Length || o.spacingMode == K.Fixed ? r : 1));
|
|
5381
5381
|
} else if (e === "mix") {
|
|
5382
|
-
let e = new
|
|
5382
|
+
let e = new ye(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,19 +5406,19 @@ var Ct = 0, wt = 1, Tt = 2, Et = 3, Dt = 4, Ot = 5, kt = 6, At = 7, jt = 8, Mt =
|
|
|
5406
5406
|
if (!n) continue;
|
|
5407
5407
|
let o = t.length;
|
|
5408
5408
|
if (e == "reset") {
|
|
5409
|
-
let e = new
|
|
5409
|
+
let e = new Oe(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 xe(o, o, a);
|
|
5416
|
+
else if (e == "strength") s = new Se(o, o, a);
|
|
5417
|
+
else if (e == "damping") s = new Ce(o, o, a);
|
|
5418
|
+
else if (e == "mass") s = new we(o, o, a);
|
|
5419
|
+
else if (e == "wind") s = new Te(o, o, a);
|
|
5420
|
+
else if (e == "gravity") s = new Ee(o, o, a);
|
|
5421
|
+
else if (e == "mix") s = new De(o, o, a);
|
|
5422
5422
|
else continue;
|
|
5423
5423
|
i.push(Z(t, s, 0, 1));
|
|
5424
5424
|
}
|
|
@@ -5436,14 +5436,14 @@ var Ct = 0, wt = 1, Tt = 2, Et = 3, Dt = 4, Ot = 5, kt = 6, At = 7, jt = 8, Mt =
|
|
|
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 fe(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 ? x.newFloatArray(s) : n;
|
|
5443
5443
|
else {
|
|
5444
|
-
c =
|
|
5444
|
+
c = x.newFloatArray(s);
|
|
5445
5445
|
let t = $(o, "offset", 0);
|
|
5446
|
-
if (
|
|
5446
|
+
if (x.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 Ct = 0, wt = 1, Tt = 2, Et = 3, Dt = 4, Ot = 5, kt = 6, At = 7, jt = 8, Mt =
|
|
|
5457
5457
|
}
|
|
5458
5458
|
i.push(l);
|
|
5459
5459
|
} else if (e == "sequence") {
|
|
5460
|
-
let e = new
|
|
5460
|
+
let e = new ke(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 = D[$(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 Ct = 0, wt = 1, Tt = 2, Et = 3, Dt = 4, Ot = 5, kt = 6, At = 7, jt = 8, Mt =
|
|
|
5470
5470
|
}
|
|
5471
5471
|
}
|
|
5472
5472
|
if (e.drawOrder) {
|
|
5473
|
-
let t = new
|
|
5473
|
+
let t = new me(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 = x.newArray(r, -1);
|
|
5478
|
+
let e = x.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 Ct = 0, wt = 1, Tt = 2, Et = 3, Dt = 4, Ot = 5, kt = 6, At = 7, jt = 8, Mt =
|
|
|
5491
5491
|
i.push(t);
|
|
5492
5492
|
}
|
|
5493
5493
|
if (e.events) {
|
|
5494
|
-
let t = new
|
|
5494
|
+
let t = new pe(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 Ze(
|
|
5498
|
+
let s = new Ze(x.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 k(t, i, a));
|
|
5506
5506
|
}
|
|
5507
|
-
},
|
|
5507
|
+
}, nn = class {
|
|
5508
5508
|
parent;
|
|
5509
5509
|
skin;
|
|
5510
5510
|
slotIndex;
|
|
@@ -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 rn(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 an = class e extends Ie {
|
|
5555
5555
|
static {
|
|
5556
5556
|
this.textureMap = /* @__PURE__ */ new Map();
|
|
5557
5557
|
}
|
|
@@ -5596,22 +5596,22 @@ var on = class e extends Le {
|
|
|
5596
5596
|
}
|
|
5597
5597
|
static toPixiTextureWrap(e) {
|
|
5598
5598
|
switch (e) {
|
|
5599
|
-
case
|
|
5600
|
-
case
|
|
5601
|
-
case
|
|
5599
|
+
case Le.ClampToEdge: return "clamp-to-edge";
|
|
5600
|
+
case Le.MirroredRepeat: return "mirror-repeat";
|
|
5601
|
+
case Le.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 mt.Normal: return "normal";
|
|
5608
|
+
case mt.Additive: return "add";
|
|
5609
|
+
case mt.Multiply: return "multiply";
|
|
5610
|
+
case mt.Screen: return "screen";
|
|
5611
5611
|
default: throw Error(`Unknown blendMode: ${String(e)}`);
|
|
5612
5612
|
}
|
|
5613
5613
|
}
|
|
5614
|
-
},
|
|
5614
|
+
}, on = {
|
|
5615
5615
|
extension: o.Asset,
|
|
5616
5616
|
resolver: {
|
|
5617
5617
|
test: (e) => m(e, ".atlas"),
|
|
@@ -5644,9 +5644,9 @@ var on = class e extends Le {
|
|
|
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 = _.dirname(t.src);
|
|
5648
5648
|
i && i.lastIndexOf("/") !== i.length - 1 && (i += "/");
|
|
5649
|
-
let a = new
|
|
5649
|
+
let a = new ze(e);
|
|
5650
5650
|
if (r.images instanceof d || typeof r.images == "string") {
|
|
5651
5651
|
let e = r.images;
|
|
5652
5652
|
r.images = {}, r.images[a.pages[0].name] = e;
|
|
@@ -5654,16 +5654,16 @@ var on = class e extends Le {
|
|
|
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 d) e.setTexture(
|
|
5657
|
+
if (a instanceof d) e.setTexture(an.from(a));
|
|
5658
5658
|
else {
|
|
5659
5659
|
let s = {
|
|
5660
|
-
src: a ??
|
|
5660
|
+
src: a ?? _.normalize([...i.split(_.sep), t].join(_.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(an.from(t.source));
|
|
5667
5667
|
});
|
|
5668
5668
|
o.push(c);
|
|
5669
5669
|
}
|
|
@@ -5674,13 +5674,13 @@ var on = class e extends Le {
|
|
|
5674
5674
|
};
|
|
5675
5675
|
//#endregion
|
|
5676
5676
|
//#region src/plugins/spine/pixi-spine/assets/skeletonLoader.ts
|
|
5677
|
-
function
|
|
5677
|
+
function sn(e) {
|
|
5678
5678
|
return Object.prototype.hasOwnProperty.call(e, "bones");
|
|
5679
5679
|
}
|
|
5680
|
-
function
|
|
5680
|
+
function cn(e) {
|
|
5681
5681
|
return e instanceof Uint8Array;
|
|
5682
5682
|
}
|
|
5683
|
-
var
|
|
5683
|
+
var ln = {
|
|
5684
5684
|
extension: o.Asset,
|
|
5685
5685
|
loader: {
|
|
5686
5686
|
extension: {
|
|
@@ -5696,116 +5696,13 @@ var un = {
|
|
|
5696
5696
|
return new Uint8Array(await t.arrayBuffer());
|
|
5697
5697
|
},
|
|
5698
5698
|
testParse(e, t) {
|
|
5699
|
-
let n = m(t.src, ".json") &&
|
|
5699
|
+
let n = m(t.src, ".json") && sn(e), r = m(t.src, ".skel") && cn(e);
|
|
5700
5700
|
return Promise.resolve(n || r);
|
|
5701
5701
|
}
|
|
5702
5702
|
}
|
|
5703
|
-
},
|
|
5704
|
-
|
|
5705
|
-
|
|
5706
|
-
}
|
|
5707
|
-
get color() {
|
|
5708
|
-
let e = this.data.color, t = this.renderable.groupColor, n = this.renderable.groupAlpha, r, i = e.a * n * 255;
|
|
5709
|
-
if (t !== 16777215) {
|
|
5710
|
-
let n = t >> 16 & 255, a = t >> 8 & 255, o = t & 255, s = e.r * o, c = e.g * a, l = e.b * n;
|
|
5711
|
-
r = i << 24 | l << 16 | c << 8 | s;
|
|
5712
|
-
} else r = i << 24 | e.b * 255 << 16 | e.g * 255 << 8 | e.r * 255;
|
|
5713
|
-
return r;
|
|
5714
|
-
}
|
|
5715
|
-
get darkColor() {
|
|
5716
|
-
let e = this.data.darkColor;
|
|
5717
|
-
return e.b * 255 << 16 | e.g * 255 << 8 | e.r * 255;
|
|
5718
|
-
}
|
|
5719
|
-
get groupTransform() {
|
|
5720
|
-
return this.renderable.groupTransform;
|
|
5721
|
-
}
|
|
5722
|
-
setData(e, t, n, r) {
|
|
5723
|
-
if (this.renderable = e, this.transform = e.groupTransform, this.data = t, t.clipped) {
|
|
5724
|
-
let e = t.clippedData;
|
|
5725
|
-
this.indexSize = e.indicesCount, this.attributeSize = e.vertexCount, this.positions = e.vertices, this.indices = e.indices, this.uvs = e.uvs;
|
|
5726
|
-
} else this.indexSize = t.indices.length, this.attributeSize = t.vertices.length / 2, this.positions = t.vertices, this.indices = t.indices, this.uvs = t.uvs;
|
|
5727
|
-
this.texture = t.texture, this.roundPixels = r, this.blendMode = n, this.batcherName = t.darkTint ? "darkTint" : "default";
|
|
5728
|
-
}
|
|
5729
|
-
}, fn = {
|
|
5730
|
-
0: "normal",
|
|
5731
|
-
1: "add",
|
|
5732
|
-
2: "multiply",
|
|
5733
|
-
3: "screen"
|
|
5734
|
-
}, pn = class {
|
|
5735
|
-
static {
|
|
5736
|
-
this.extension = {
|
|
5737
|
-
type: [
|
|
5738
|
-
o.WebGLPipes,
|
|
5739
|
-
o.WebGPUPipes,
|
|
5740
|
-
o.CanvasPipes
|
|
5741
|
-
],
|
|
5742
|
-
name: "spine"
|
|
5743
|
-
};
|
|
5744
|
-
}
|
|
5745
|
-
constructor(e) {
|
|
5746
|
-
this.gpuSpineData = {}, this._destroyRenderableBound = this.destroyRenderable.bind(this), this.renderer = e;
|
|
5747
|
-
}
|
|
5748
|
-
validateRenderable(e) {
|
|
5749
|
-
if (e._validateAndTransformAttachments(), e.spineAttachmentsDirty) return !0;
|
|
5750
|
-
if (e.spineTexturesDirty) {
|
|
5751
|
-
let t = e.skeleton.drawOrder, n = this.gpuSpineData[e.uid];
|
|
5752
|
-
for (let r = 0, i = t.length; r < i; r++) {
|
|
5753
|
-
let i = t[r], a = i.getAttachment();
|
|
5754
|
-
if (a instanceof W || a instanceof We) {
|
|
5755
|
-
let t = e._getCachedData(i, a), r = n.slotBatches[t.id], o = t.texture;
|
|
5756
|
-
if (o !== r.texture && !r._batcher.checkAndUpdateTexture(r, o)) return !0;
|
|
5757
|
-
}
|
|
5758
|
-
}
|
|
5759
|
-
}
|
|
5760
|
-
return !1;
|
|
5761
|
-
}
|
|
5762
|
-
addRenderable(e, t) {
|
|
5763
|
-
let n = this._getSpineData(e), r = this.renderer.renderPipes.batch, i = e.skeleton.drawOrder, a = this.renderer._roundPixels | e._roundPixels;
|
|
5764
|
-
e._validateAndTransformAttachments();
|
|
5765
|
-
for (let o = 0, s = i.length; o < s; o++) {
|
|
5766
|
-
let s = i[o], c = s.getAttachment(), l = fn[s.data.blendMode];
|
|
5767
|
-
if (c instanceof W || c instanceof We) {
|
|
5768
|
-
let i = e._getCachedData(s, c), o = n.slotBatches[i.id] ||= new dn();
|
|
5769
|
-
o.setData(e, i, l, a), i.skipRender || r.addToBatch(o, t);
|
|
5770
|
-
}
|
|
5771
|
-
let u = e._slotsObject[s.data.name];
|
|
5772
|
-
if (u) {
|
|
5773
|
-
let e = u.container;
|
|
5774
|
-
e.includeInBuild = !0, h(e, t, this.renderer), e.includeInBuild = !1;
|
|
5775
|
-
}
|
|
5776
|
-
}
|
|
5777
|
-
}
|
|
5778
|
-
updateRenderable(e) {
|
|
5779
|
-
let t = this.gpuSpineData[e.uid];
|
|
5780
|
-
e._validateAndTransformAttachments();
|
|
5781
|
-
let n = e.skeleton.drawOrder;
|
|
5782
|
-
for (let r = 0, i = n.length; r < i; r++) {
|
|
5783
|
-
let i = n[r], a = i.getAttachment();
|
|
5784
|
-
if ((a instanceof W || a instanceof We) && !e._getCachedData(i, a).skipRender) {
|
|
5785
|
-
let n = t.slotBatches[e._getCachedData(i, a).id];
|
|
5786
|
-
n._batcher?.updateElement(n);
|
|
5787
|
-
}
|
|
5788
|
-
}
|
|
5789
|
-
}
|
|
5790
|
-
destroyRenderable(e) {
|
|
5791
|
-
this.gpuSpineData[e.uid] = null, e.off("destroyed", this._destroyRenderableBound);
|
|
5792
|
-
}
|
|
5793
|
-
destroy() {
|
|
5794
|
-
this.gpuSpineData = null, this.renderer = null;
|
|
5795
|
-
}
|
|
5796
|
-
_getSpineData(e) {
|
|
5797
|
-
return this.gpuSpineData[e.uid] || this._initMeshData(e);
|
|
5798
|
-
}
|
|
5799
|
-
_initMeshData(e) {
|
|
5800
|
-
return this.gpuSpineData[e.uid] = { slotBatches: {} }, e.on("destroyed", this._destroyRenderableBound), this.gpuSpineData[e.uid];
|
|
5801
|
-
}
|
|
5802
|
-
};
|
|
5803
|
-
g.add(pn);
|
|
5804
|
-
//#endregion
|
|
5805
|
-
//#region src/plugins/spine/pixi-spine/Spine.ts
|
|
5806
|
-
var mn = new w();
|
|
5807
|
-
ct.yDown = !0;
|
|
5808
|
-
var hn = new tn(), gn = new C(() => new s()), _n = class e extends p {
|
|
5703
|
+
}, un = new C();
|
|
5704
|
+
st.yDown = !0;
|
|
5705
|
+
var dn = new en(), fn = new S(() => new s()), pn = class e extends p {
|
|
5809
5706
|
getSlotFromRef(e) {
|
|
5810
5707
|
let t;
|
|
5811
5708
|
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}`);
|
|
@@ -5824,9 +5721,9 @@ var hn = new tn(), gn = new C(() => new s()), _n = class e extends p {
|
|
|
5824
5721
|
e ? f.shared.add(this.internalUpdate, this) : f.shared.remove(this.internalUpdate, this), this._autoUpdate = e;
|
|
5825
5722
|
}
|
|
5826
5723
|
constructor(e) {
|
|
5827
|
-
e instanceof
|
|
5828
|
-
let t = e instanceof
|
|
5829
|
-
this.skeleton = new
|
|
5724
|
+
e instanceof ut && (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;
|
|
5725
|
+
let t = e instanceof ut ? e : e.skeletonData;
|
|
5726
|
+
this.skeleton = new st(t), this.state = new Ae(new Ne(t)), this.autoUpdate = e?.autoUpdate ?? !0, this.darkTint = e?.darkTint === void 0 ? this.skeleton.slots.some((e) => !!e.data.darkColor) : e?.darkTint;
|
|
5830
5727
|
let n = this.skeleton.slots;
|
|
5831
5728
|
for (let e = 0; e < n.length; e++) this.attachmentCacheData[e] = Object.create(null);
|
|
5832
5729
|
}
|
|
@@ -5842,10 +5739,10 @@ var hn = new tn(), gn = new C(() => new s()), _n = class e extends p {
|
|
|
5842
5739
|
setBonePosition(e, t) {
|
|
5843
5740
|
let n = e;
|
|
5844
5741
|
if (typeof e == "string" && (e = this.skeleton.findBone(e)), !e) throw Error(`Cant set bone position, bone ${String(n)} not found`);
|
|
5845
|
-
if (
|
|
5846
|
-
let t = e.parent.worldToLocal(
|
|
5742
|
+
if (un.set(t.x, t.y), e.parent) {
|
|
5743
|
+
let t = e.parent.worldToLocal(un);
|
|
5847
5744
|
e.x = t.x, e.y = -t.y;
|
|
5848
|
-
} else e.x =
|
|
5745
|
+
} else e.x = un.x, e.y = un.y;
|
|
5849
5746
|
}
|
|
5850
5747
|
getBonePosition(e, t) {
|
|
5851
5748
|
let n = e;
|
|
@@ -5857,7 +5754,7 @@ var hn = new tn(), gn = new C(() => new s()), _n = class e extends p {
|
|
|
5857
5754
|
_updateAndApplyState(e) {
|
|
5858
5755
|
this.hasNeverUpdated = !1, this.state.update(e), this.skeleton.update(e);
|
|
5859
5756
|
let { skeleton: t } = this;
|
|
5860
|
-
this.state.apply(t), this.beforeUpdateWorldTransforms(this), t.updateWorldTransform(
|
|
5757
|
+
this.state.apply(t), this.beforeUpdateWorldTransforms(this), t.updateWorldTransform(ct.update), this.afterUpdateWorldTransforms(this), this.updateSlotObjects(), this._stateChanged = !0, this._boundsDirty = !0, this.onViewUpdate();
|
|
5861
5758
|
}
|
|
5862
5759
|
_validateAndTransformAttachments() {
|
|
5863
5760
|
this._stateChanged && (this._stateChanged = !1, this.validateAttachments(), this.transformAttachments());
|
|
@@ -5872,7 +5769,7 @@ var hn = new tn(), gn = new C(() => new s()), _n = class e extends p {
|
|
|
5872
5769
|
}
|
|
5873
5770
|
updateAndSetPixiMask(e, t) {
|
|
5874
5771
|
let n = e.attachment;
|
|
5875
|
-
if (n && n instanceof
|
|
5772
|
+
if (n && n instanceof Fe) {
|
|
5876
5773
|
let t = this.clippingSlotToPixiMasks[e.data.name] ||= {
|
|
5877
5774
|
slot: e,
|
|
5878
5775
|
vertices: []
|
|
@@ -5883,7 +5780,7 @@ var hn = new tn(), gn = new C(() => new s()), _n = class e extends p {
|
|
|
5883
5780
|
let r = this.currentClippingSlot, i = this._slotsObject[e.data.name];
|
|
5884
5781
|
if (r && i) {
|
|
5885
5782
|
let e = r.slot, t = e.attachment, n = r.mask;
|
|
5886
|
-
if (n || (n =
|
|
5783
|
+
if (n || (n = fn.obtain(), r.mask = n, this.addChild(n)), !r.maskComputed) {
|
|
5887
5784
|
r.maskComputed = !0;
|
|
5888
5785
|
let i = t.worldVerticesLength, a = r.vertices;
|
|
5889
5786
|
t.computeWorldVertices(e, 0, i, a, 0, 2), n.clear().poly(a).stroke({ width: 0 }).fill({ alpha: .25 });
|
|
@@ -5892,7 +5789,7 @@ var hn = new tn(), gn = new C(() => new s()), _n = class e extends p {
|
|
|
5892
5789
|
} else i?.container.mask && (i.container.mask = null);
|
|
5893
5790
|
if (r && r.slot.attachment.endSlot == e.data && (this.currentClippingSlot = void 0), t) for (let e in this.clippingSlotToPixiMasks) {
|
|
5894
5791
|
let t = this.clippingSlotToPixiMasks[e];
|
|
5895
|
-
(!(t.slot.attachment instanceof
|
|
5792
|
+
(!(t.slot.attachment instanceof Fe) || !t.maskComputed) && t.mask && (this.removeChild(t.mask), fn.free(t.mask), t.mask = void 0);
|
|
5896
5793
|
}
|
|
5897
5794
|
}
|
|
5898
5795
|
transformAttachments() {
|
|
@@ -5902,25 +5799,25 @@ var hn = new tn(), gn = new C(() => new s()), _n = class e extends p {
|
|
|
5902
5799
|
this.updateAndSetPixiMask(n, t === e.length - 1);
|
|
5903
5800
|
let r = n.getAttachment();
|
|
5904
5801
|
if (r) {
|
|
5905
|
-
if (r instanceof
|
|
5802
|
+
if (r instanceof Ue || r instanceof Ke) {
|
|
5906
5803
|
let e = this._getCachedData(n, r);
|
|
5907
|
-
r instanceof
|
|
5804
|
+
r instanceof Ke ? 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)), g(r.uvs.buffer, e.uvs.buffer);
|
|
5908
5805
|
let t = n.bone.skeleton.color, i = n.color, a = r.color;
|
|
5909
5806
|
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;
|
|
5910
5807
|
let o = r.region?.texture.texture || u.EMPTY;
|
|
5911
|
-
e.texture !== o && (e.texture = o, this.spineTexturesDirty = !0),
|
|
5912
|
-
} else if (r instanceof
|
|
5913
|
-
|
|
5808
|
+
e.texture !== o && (e.texture = o, this.spineTexturesDirty = !0), dn.isClipping() && this.updateClippingData(e);
|
|
5809
|
+
} else if (r instanceof Fe) {
|
|
5810
|
+
dn.clipStart(n, r);
|
|
5914
5811
|
continue;
|
|
5915
5812
|
}
|
|
5916
5813
|
}
|
|
5917
|
-
|
|
5814
|
+
dn.clipEndWithSlot(n);
|
|
5918
5815
|
}
|
|
5919
|
-
|
|
5816
|
+
dn.clipEnd();
|
|
5920
5817
|
}
|
|
5921
5818
|
updateClippingData(e) {
|
|
5922
|
-
e.clipped = !0,
|
|
5923
|
-
let { clippedVertices: t, clippedUVs: n, clippedTriangles: r } =
|
|
5819
|
+
e.clipped = !0, dn.clipTrianglesUnpacked(e.vertices, e.indices, e.indices.length, e.uvs);
|
|
5820
|
+
let { clippedVertices: t, clippedUVs: n, clippedTriangles: r } = dn, i = t.length / 2, a = r.length;
|
|
5924
5821
|
e.clippedData || (e.clippedData = {
|
|
5925
5822
|
vertices: new Float32Array(i * 2),
|
|
5926
5823
|
uvs: new Float32Array(i * 2),
|
|
@@ -5954,7 +5851,7 @@ var hn = new tn(), gn = new C(() => new s()), _n = class e extends p {
|
|
|
5954
5851
|
}
|
|
5955
5852
|
initCachedData(e, t) {
|
|
5956
5853
|
let n;
|
|
5957
|
-
return t instanceof
|
|
5854
|
+
return t instanceof Ke ? (n = new Float32Array(8), this.attachmentCacheData[e.data.index][t.name] = {
|
|
5958
5855
|
id: `${e.data.index}-${t.name}`,
|
|
5959
5856
|
vertices: n,
|
|
5960
5857
|
clipped: !1,
|
|
@@ -5967,8 +5864,8 @@ var hn = new tn(), gn = new C(() => new s()), _n = class e extends p {
|
|
|
5967
5864
|
3
|
|
5968
5865
|
],
|
|
5969
5866
|
uvs: new Float32Array(t.uvs.length),
|
|
5970
|
-
color: new
|
|
5971
|
-
darkColor: new
|
|
5867
|
+
color: new y(1, 1, 1, 1),
|
|
5868
|
+
darkColor: new y(0, 0, 0, 0),
|
|
5972
5869
|
darkTint: this.darkTint,
|
|
5973
5870
|
skipRender: !1,
|
|
5974
5871
|
texture: t.region?.texture.texture
|
|
@@ -5978,8 +5875,8 @@ var hn = new tn(), gn = new C(() => new s()), _n = class e extends p {
|
|
|
5978
5875
|
clipped: !1,
|
|
5979
5876
|
indices: t.triangles,
|
|
5980
5877
|
uvs: new Float32Array(t.uvs.length),
|
|
5981
|
-
color: new
|
|
5982
|
-
darkColor: new
|
|
5878
|
+
color: new y(1, 1, 1, 1),
|
|
5879
|
+
darkColor: new y(0, 0, 0, 0),
|
|
5983
5880
|
darkTint: this.darkTint,
|
|
5984
5881
|
skipRender: !1,
|
|
5985
5882
|
texture: t.region?.texture.texture
|
|
@@ -6021,7 +5918,7 @@ var hn = new tn(), gn = new C(() => new s()), _n = class e extends p {
|
|
|
6021
5918
|
return e = this.getSlotFromRef(e), this._slotsObject[e.data.name]?.container;
|
|
6022
5919
|
}
|
|
6023
5920
|
updateBounds() {
|
|
6024
|
-
this._boundsDirty = !1, this.skeletonBounds ||= new
|
|
5921
|
+
this._boundsDirty = !1, this.skeletonBounds ||= new Qt();
|
|
6025
5922
|
let e = this.skeletonBounds;
|
|
6026
5923
|
if (e.update(this.skeleton, !0), e.minX === Infinity) {
|
|
6027
5924
|
this.hasNeverUpdated && (this._updateAndApplyState(0), this._boundsDirty = !1), this._validateAndTransformAttachments();
|
|
@@ -6029,7 +5926,7 @@ var hn = new tn(), gn = new C(() => new s()), _n = class e extends p {
|
|
|
6029
5926
|
t.clear();
|
|
6030
5927
|
for (let n = 0; n < e.length; n++) {
|
|
6031
5928
|
let r = e[n], i = r.getAttachment();
|
|
6032
|
-
if (i && (i instanceof
|
|
5929
|
+
if (i && (i instanceof Ke || i instanceof Ue)) {
|
|
6033
5930
|
let e = this._getCachedData(r, i);
|
|
6034
5931
|
t.addVertexData(e.vertices, 0, e.vertices.length);
|
|
6035
5932
|
}
|
|
@@ -6054,7 +5951,7 @@ var hn = new tn(), gn = new C(() => new s()), _n = class e extends p {
|
|
|
6054
5951
|
static from({ skeleton: r, atlas: i, scale: a = 1, darkTint: o, autoUpdate: s = !0 }) {
|
|
6055
5952
|
let c = `${r}-${i}-${a}`;
|
|
6056
5953
|
if (n.has(c)) return new e(n.get(c));
|
|
6057
|
-
let l = t.get(r), u = new qe(t.get(i)), d = l instanceof Uint8Array ? new
|
|
5954
|
+
let l = t.get(r), u = new qe(t.get(i)), d = l instanceof Uint8Array ? new gt(u) : new tn(u);
|
|
6058
5955
|
d.scale = a;
|
|
6059
5956
|
let f = d.readSkeletonData(l);
|
|
6060
5957
|
return n.set(c, f), new e({
|
|
@@ -6063,15 +5960,15 @@ var hn = new tn(), gn = new C(() => new s()), _n = class e extends p {
|
|
|
6063
5960
|
autoUpdate: s
|
|
6064
5961
|
});
|
|
6065
5962
|
}
|
|
6066
|
-
},
|
|
5963
|
+
}, mn = class extends e {
|
|
6067
5964
|
constructor(...e) {
|
|
6068
5965
|
super(...e), this.id = "SpinePlugin";
|
|
6069
5966
|
}
|
|
6070
5967
|
async initialize() {
|
|
6071
|
-
|
|
5968
|
+
h.add(on), h.add(ln), window.Spine = pn;
|
|
6072
5969
|
}
|
|
6073
5970
|
};
|
|
6074
5971
|
//#endregion
|
|
6075
|
-
export {
|
|
5972
|
+
export { mn as SpinePlugin };
|
|
6076
5973
|
|
|
6077
|
-
//# sourceMappingURL=SpinePlugin-
|
|
5974
|
+
//# sourceMappingURL=SpinePlugin-C-JDdXpf.js.map
|