evotars 0.0.17 → 0.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{CanvasPool-CjuIv0cu.js → CanvasPool-l34IksYw.js} +1 -1
- package/dist/{SharedSystems-aL1uF3N5.js → SharedSystems-C4m5AD5I.js} +2 -2
- package/dist/{WebGLRenderer-gNt6Tn3N.js → WebGLRenderer-C-mXrQNx.js} +4 -4
- package/dist/{WebGPURenderer-ptwrch0v.js → WebGPURenderer-CtFHd2D-.js} +4 -4
- package/dist/{browserAll-zTAvu1L3.js → browserAll-Djz7wsJX.js} +2 -2
- package/dist/{colorToUniform-Cd4vRm7i.js → colorToUniform-BEK5qDau.js} +1 -1
- package/dist/evotars.js +1 -1
- package/dist/evotars.umd.cjs +45 -45
- package/dist/{getBatchSamplersUniformGroup-CAutilkw.js → getBatchSamplersUniformGroup-DfRszIW4.js} +1 -1
- package/dist/{index-Cm73GcdI.js → index-CIFPnF4S.js} +712 -707
- package/dist/index.d.ts +6 -1
- package/dist/{webworkerAll-D0zJeDoF.js → webworkerAll-Bj2vcYLu.js} +4 -4
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ var bn = Object.defineProperty;
|
|
|
2
2
|
var wn = (i, t, e) => t in i ? bn(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
|
|
3
3
|
var w = (i, t, e) => (wn(i, typeof t != "symbol" ? t + "" : t, e), e);
|
|
4
4
|
var B = /* @__PURE__ */ ((i) => (i.Application = "application", i.WebGLPipes = "webgl-pipes", i.WebGLPipesAdaptor = "webgl-pipes-adaptor", i.WebGLSystem = "webgl-system", i.WebGPUPipes = "webgpu-pipes", i.WebGPUPipesAdaptor = "webgpu-pipes-adaptor", i.WebGPUSystem = "webgpu-system", i.CanvasSystem = "canvas-system", i.CanvasPipesAdaptor = "canvas-pipes-adaptor", i.CanvasPipes = "canvas-pipes", i.Asset = "asset", i.LoadParser = "load-parser", i.ResolveParser = "resolve-parser", i.CacheParser = "cache-parser", i.DetectionParser = "detection-parser", i.MaskEffect = "mask-effect", i.BlendMode = "blend-mode", i.TextureSource = "texture-source", i.Environment = "environment", i))(B || {});
|
|
5
|
-
const
|
|
5
|
+
const Pi = (i) => {
|
|
6
6
|
if (typeof i == "function" || typeof i == "object" && i.extension) {
|
|
7
7
|
if (!i.extension)
|
|
8
8
|
throw new Error("Extension class must have an extension object");
|
|
@@ -13,7 +13,7 @@ const ki = (i) => {
|
|
|
13
13
|
else
|
|
14
14
|
throw new Error("Invalid extension type");
|
|
15
15
|
return typeof i.type == "string" && (i.type = [i.type]), i;
|
|
16
|
-
},
|
|
16
|
+
}, Ue = (i, t) => Pi(i).priority ?? t, dt = {
|
|
17
17
|
/** @ignore */
|
|
18
18
|
_addHandlers: {},
|
|
19
19
|
/** @ignore */
|
|
@@ -26,7 +26,7 @@ const ki = (i) => {
|
|
|
26
26
|
* @returns {extensions} For chaining.
|
|
27
27
|
*/
|
|
28
28
|
remove(...i) {
|
|
29
|
-
return i.map(
|
|
29
|
+
return i.map(Pi).forEach((t) => {
|
|
30
30
|
t.type.forEach((e) => {
|
|
31
31
|
var s, r;
|
|
32
32
|
return (r = (s = this._removeHandlers)[e]) == null ? void 0 : r.call(s, t);
|
|
@@ -39,7 +39,7 @@ const ki = (i) => {
|
|
|
39
39
|
* @returns {extensions} For chaining.
|
|
40
40
|
*/
|
|
41
41
|
add(...i) {
|
|
42
|
-
return i.map(
|
|
42
|
+
return i.map(Pi).forEach((t) => {
|
|
43
43
|
t.type.forEach((e) => {
|
|
44
44
|
var n, a;
|
|
45
45
|
const s = this._addHandlers, r = this._queue;
|
|
@@ -91,7 +91,7 @@ const ki = (i) => {
|
|
|
91
91
|
return this.handle(
|
|
92
92
|
i,
|
|
93
93
|
(s) => {
|
|
94
|
-
t.findIndex((n) => n.name === s.name) >= 0 || (t.push({ name: s.name, value: s.ref }), t.sort((n, a) =>
|
|
94
|
+
t.findIndex((n) => n.name === s.name) >= 0 || (t.push({ name: s.name, value: s.ref }), t.sort((n, a) => Ue(a.value, e) - Ue(n.value, e)));
|
|
95
95
|
},
|
|
96
96
|
(s) => {
|
|
97
97
|
const r = t.findIndex((n) => n.name === s.name);
|
|
@@ -110,7 +110,7 @@ const ki = (i) => {
|
|
|
110
110
|
return this.handle(
|
|
111
111
|
i,
|
|
112
112
|
(s) => {
|
|
113
|
-
t.includes(s.ref) || (t.push(s.ref), t.sort((r, n) =>
|
|
113
|
+
t.includes(s.ref) || (t.push(s.ref), t.sort((r, n) => Ue(n, e) - Ue(r, e)));
|
|
114
114
|
},
|
|
115
115
|
(s) => {
|
|
116
116
|
const r = t.indexOf(s.ref);
|
|
@@ -126,7 +126,7 @@ const ki = (i) => {
|
|
|
126
126
|
},
|
|
127
127
|
test: () => !0,
|
|
128
128
|
load: async () => {
|
|
129
|
-
await import("./browserAll-
|
|
129
|
+
await import("./browserAll-Djz7wsJX.js");
|
|
130
130
|
}
|
|
131
131
|
}, An = {
|
|
132
132
|
extension: {
|
|
@@ -136,7 +136,7 @@ const ki = (i) => {
|
|
|
136
136
|
},
|
|
137
137
|
test: () => typeof self < "u" && self.WorkerGlobalScope !== void 0,
|
|
138
138
|
load: async () => {
|
|
139
|
-
await import("./webworkerAll-
|
|
139
|
+
await import("./webworkerAll-Bj2vcYLu.js");
|
|
140
140
|
}
|
|
141
141
|
};
|
|
142
142
|
class nt {
|
|
@@ -209,7 +209,7 @@ class nt {
|
|
|
209
209
|
this._y !== t && (this._y = t, this._observer._onUpdate(this));
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
|
-
function
|
|
212
|
+
function Xi(i) {
|
|
213
213
|
return i && i.__esModule && Object.prototype.hasOwnProperty.call(i, "default") ? i.default : i;
|
|
214
214
|
}
|
|
215
215
|
var rr = { exports: {} };
|
|
@@ -324,7 +324,7 @@ var rr = { exports: {} };
|
|
|
324
324
|
}, o.prototype.off = o.prototype.removeListener, o.prototype.addListener = o.prototype.on, o.prefixed = e, o.EventEmitter = o, i.exports = o;
|
|
325
325
|
})(rr);
|
|
326
326
|
var Sn = rr.exports;
|
|
327
|
-
const Bt = /* @__PURE__ */
|
|
327
|
+
const Bt = /* @__PURE__ */ Xi(Sn), Cn = Math.PI * 2, Mn = 180 / Math.PI, Tn = Math.PI / 180;
|
|
328
328
|
class st {
|
|
329
329
|
/**
|
|
330
330
|
* Creates a new `Point`
|
|
@@ -383,10 +383,10 @@ class st {
|
|
|
383
383
|
* @readonly
|
|
384
384
|
*/
|
|
385
385
|
static get shared() {
|
|
386
|
-
return
|
|
386
|
+
return li.x = 0, li.y = 0, li;
|
|
387
387
|
}
|
|
388
388
|
}
|
|
389
|
-
const
|
|
389
|
+
const li = new st();
|
|
390
390
|
class D {
|
|
391
391
|
/**
|
|
392
392
|
* @param a - x scale
|
|
@@ -618,15 +618,15 @@ class D {
|
|
|
618
618
|
return Pn.identity();
|
|
619
619
|
}
|
|
620
620
|
}
|
|
621
|
-
const Pn = new D(), kn = new D(), Yt = [1, 1, 0, -1, -1, -1, 0, 1, 1, 1, 0, -1, -1, -1, 0, 1],
|
|
621
|
+
const Pn = new D(), kn = new D(), Yt = [1, 1, 0, -1, -1, -1, 0, 1, 1, 1, 0, -1, -1, -1, 0, 1], Vt = [0, 1, 1, 1, 0, -1, -1, -1, 0, 1, 1, 1, 0, -1, -1, -1], jt = [0, -1, -1, -1, 0, 1, 1, 1, 0, 1, 1, 1, 0, -1, -1, -1], Xt = [1, 1, 0, -1, -1, -1, 0, 1, -1, -1, 0, 1, 1, 1, 0, -1], ki = [], nr = [], Oe = Math.sign;
|
|
622
622
|
function In() {
|
|
623
623
|
for (let i = 0; i < 16; i++) {
|
|
624
624
|
const t = [];
|
|
625
|
-
|
|
625
|
+
ki.push(t);
|
|
626
626
|
for (let e = 0; e < 16; e++) {
|
|
627
|
-
const s =
|
|
627
|
+
const s = Oe(Yt[i] * Yt[e] + jt[i] * Vt[e]), r = Oe(Vt[i] * Yt[e] + Xt[i] * Vt[e]), n = Oe(Yt[i] * jt[e] + jt[i] * Xt[e]), a = Oe(Vt[i] * jt[e] + Xt[i] * Xt[e]);
|
|
628
628
|
for (let o = 0; o < 16; o++)
|
|
629
|
-
if (Yt[o] === s &&
|
|
629
|
+
if (Yt[o] === s && Vt[o] === r && jt[o] === n && Xt[o] === a) {
|
|
630
630
|
t.push(o);
|
|
631
631
|
break;
|
|
632
632
|
}
|
|
@@ -634,7 +634,7 @@ function In() {
|
|
|
634
634
|
}
|
|
635
635
|
for (let i = 0; i < 16; i++) {
|
|
636
636
|
const t = new D();
|
|
637
|
-
t.set(Yt[i],
|
|
637
|
+
t.set(Yt[i], Vt[i], jt[i], Xt[i], 0, 0), nr.push(t);
|
|
638
638
|
}
|
|
639
639
|
}
|
|
640
640
|
In();
|
|
@@ -740,14 +740,14 @@ const H = {
|
|
|
740
740
|
* @returns {GD8Symmetry} The Y-component of the U-axis
|
|
741
741
|
* after rotating the axes.
|
|
742
742
|
*/
|
|
743
|
-
uY: (i) =>
|
|
743
|
+
uY: (i) => Vt[i],
|
|
744
744
|
/**
|
|
745
745
|
* @memberof maths.groupD8
|
|
746
746
|
* @param {GD8Symmetry} ind - sprite rotation angle.
|
|
747
747
|
* @returns {GD8Symmetry} The X-component of the V-axis
|
|
748
748
|
* after rotating the axes.
|
|
749
749
|
*/
|
|
750
|
-
vX: (i) =>
|
|
750
|
+
vX: (i) => jt[i],
|
|
751
751
|
/**
|
|
752
752
|
* @memberof maths.groupD8
|
|
753
753
|
* @param {GD8Symmetry} ind - sprite rotation angle.
|
|
@@ -787,7 +787,7 @@ const H = {
|
|
|
787
787
|
* is the column in the above cayley table.
|
|
788
788
|
* @returns {GD8Symmetry} Composed operation
|
|
789
789
|
*/
|
|
790
|
-
add: (i, t) =>
|
|
790
|
+
add: (i, t) => ki[i][t],
|
|
791
791
|
/**
|
|
792
792
|
* Reverse of `add`.
|
|
793
793
|
* @memberof maths.groupD8
|
|
@@ -795,7 +795,7 @@ const H = {
|
|
|
795
795
|
* @param {GD8Symmetry} rotationFirst - First operation
|
|
796
796
|
* @returns {GD8Symmetry} Result
|
|
797
797
|
*/
|
|
798
|
-
sub: (i, t) =>
|
|
798
|
+
sub: (i, t) => ki[i][H.inv(t)],
|
|
799
799
|
/**
|
|
800
800
|
* Adds 180 degrees to rotation, which is a commutative
|
|
801
801
|
* operation.
|
|
@@ -835,7 +835,7 @@ const H = {
|
|
|
835
835
|
const r = nr[H.inv(t)];
|
|
836
836
|
r.tx = e, r.ty = s, i.append(r);
|
|
837
837
|
}
|
|
838
|
-
},
|
|
838
|
+
}, Ge = [new st(), new st(), new st(), new st()];
|
|
839
839
|
class tt {
|
|
840
840
|
/**
|
|
841
841
|
* @param x - The X coordinate of the upper-left corner of the rectangle
|
|
@@ -944,7 +944,7 @@ class tt {
|
|
|
944
944
|
const s = this.left, r = this.right, n = this.top, a = this.bottom;
|
|
945
945
|
if (r <= s || a <= n)
|
|
946
946
|
return !1;
|
|
947
|
-
const o =
|
|
947
|
+
const o = Ge[0].set(t.left, t.top), h = Ge[1].set(t.left, t.bottom), c = Ge[2].set(t.right, t.top), l = Ge[3].set(t.right, t.bottom);
|
|
948
948
|
if (c.x <= o.x || h.y <= o.y)
|
|
949
949
|
return !1;
|
|
950
950
|
const u = Math.sign(e.a * e.d - e.b * e.c);
|
|
@@ -1006,15 +1006,15 @@ class tt {
|
|
|
1006
1006
|
return `[pixi.js/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`;
|
|
1007
1007
|
}
|
|
1008
1008
|
}
|
|
1009
|
-
const
|
|
1009
|
+
const ci = {
|
|
1010
1010
|
default: -1
|
|
1011
1011
|
};
|
|
1012
1012
|
function et(i = "default") {
|
|
1013
|
-
return
|
|
1013
|
+
return ci[i] === void 0 && (ci[i] = -1), ++ci[i];
|
|
1014
1014
|
}
|
|
1015
|
-
const
|
|
1016
|
-
function
|
|
1017
|
-
if (
|
|
1015
|
+
const fs = {}, $ = "8.0.0";
|
|
1016
|
+
function q(i, t, e = 3) {
|
|
1017
|
+
if (fs[t])
|
|
1018
1018
|
return;
|
|
1019
1019
|
let s = new Error().stack;
|
|
1020
1020
|
typeof s > "u" ? console.warn("PixiJS Deprecation Warning: ", `${t}
|
|
@@ -1027,14 +1027,14 @@ Deprecated since v${i}`) : (s = s.split(`
|
|
|
1027
1027
|
`${t}
|
|
1028
1028
|
Deprecated since v${i}`
|
|
1029
1029
|
), console.warn(s), console.groupEnd()) : (console.warn("PixiJS Deprecation Warning: ", `${t}
|
|
1030
|
-
Deprecated since v${i}`), console.warn(s))),
|
|
1030
|
+
Deprecated since v${i}`), console.warn(s))), fs[t] = !0;
|
|
1031
1031
|
}
|
|
1032
1032
|
const ar = () => {
|
|
1033
1033
|
};
|
|
1034
1034
|
function uc(i) {
|
|
1035
1035
|
return i += i === 0 ? 1 : 0, --i, i |= i >>> 1, i |= i >>> 2, i |= i >>> 4, i |= i >>> 8, i |= i >>> 16, i + 1;
|
|
1036
1036
|
}
|
|
1037
|
-
function
|
|
1037
|
+
function ps(i) {
|
|
1038
1038
|
return !(i & i - 1) && !!i;
|
|
1039
1039
|
}
|
|
1040
1040
|
function En(i) {
|
|
@@ -1043,10 +1043,10 @@ function En(i) {
|
|
|
1043
1043
|
i[e] !== void 0 && (t[e] = i[e]);
|
|
1044
1044
|
return t;
|
|
1045
1045
|
}
|
|
1046
|
-
const
|
|
1046
|
+
const ms = /* @__PURE__ */ Object.create(null);
|
|
1047
1047
|
function Rn(i) {
|
|
1048
|
-
const t =
|
|
1049
|
-
return t === void 0 && (
|
|
1048
|
+
const t = ms[i];
|
|
1049
|
+
return t === void 0 && (ms[i] = et("resource")), t;
|
|
1050
1050
|
}
|
|
1051
1051
|
const or = class hr extends Bt {
|
|
1052
1052
|
/**
|
|
@@ -1063,7 +1063,7 @@ const or = class hr extends Bt {
|
|
|
1063
1063
|
return this.addressModeU;
|
|
1064
1064
|
}
|
|
1065
1065
|
set wrapMode(t) {
|
|
1066
|
-
|
|
1066
|
+
q($, "TextureStyle.wrapMode is now TextureStyle.addressMode"), this.addressMode = t;
|
|
1067
1067
|
}
|
|
1068
1068
|
get wrapMode() {
|
|
1069
1069
|
return this.addressMode;
|
|
@@ -1260,7 +1260,7 @@ const lr = class cr extends Bt {
|
|
|
1260
1260
|
* @private
|
|
1261
1261
|
*/
|
|
1262
1262
|
_refreshPOT() {
|
|
1263
|
-
this.isPowerOfTwo =
|
|
1263
|
+
this.isPowerOfTwo = ps(this.pixelWidth) && ps(this.pixelHeight);
|
|
1264
1264
|
}
|
|
1265
1265
|
static test(t) {
|
|
1266
1266
|
throw new Error("Unimplemented");
|
|
@@ -1278,7 +1278,7 @@ lr.defaultOptions = {
|
|
|
1278
1278
|
autoGarbageCollect: !1
|
|
1279
1279
|
};
|
|
1280
1280
|
let Ot = lr;
|
|
1281
|
-
class
|
|
1281
|
+
class $i extends Ot {
|
|
1282
1282
|
constructor(t) {
|
|
1283
1283
|
const e = t.resource || new Float32Array(t.width * t.height * 4);
|
|
1284
1284
|
let s = t.format;
|
|
@@ -1292,8 +1292,8 @@ class qi extends Ot {
|
|
|
1292
1292
|
return t instanceof Int8Array || t instanceof Uint8Array || t instanceof Uint8ClampedArray || t instanceof Int16Array || t instanceof Uint16Array || t instanceof Int32Array || t instanceof Uint32Array || t instanceof Float32Array;
|
|
1293
1293
|
}
|
|
1294
1294
|
}
|
|
1295
|
-
|
|
1296
|
-
const
|
|
1295
|
+
$i.extension = B.TextureSource;
|
|
1296
|
+
const gs = new D();
|
|
1297
1297
|
class Fn {
|
|
1298
1298
|
/**
|
|
1299
1299
|
* @param texture - observed texture
|
|
@@ -1335,14 +1335,14 @@ class Fn {
|
|
|
1335
1335
|
const e = t.uvs;
|
|
1336
1336
|
this.mapCoord.set(e.x1 - e.x0, e.y1 - e.y0, e.x3 - e.x0, e.y3 - e.y0, e.x0, e.y0);
|
|
1337
1337
|
const s = t.orig, r = t.trim;
|
|
1338
|
-
r && (
|
|
1338
|
+
r && (gs.set(
|
|
1339
1339
|
s.width / r.width,
|
|
1340
1340
|
0,
|
|
1341
1341
|
0,
|
|
1342
1342
|
s.height / r.height,
|
|
1343
1343
|
-r.x / r.width,
|
|
1344
1344
|
-r.y / r.height
|
|
1345
|
-
), this.mapCoord.append(
|
|
1345
|
+
), this.mapCoord.append(gs));
|
|
1346
1346
|
const n = t.source, a = this.uClampFrame, o = this.clampMargin / n._resolution, h = this.clampOffset;
|
|
1347
1347
|
return a[0] = (t.frame.x + o + h) / n.width, a[1] = (t.frame.y + o + h) / n.height, a[2] = (t.frame.x + t.frame.width - o + h) / n.width, a[3] = (t.frame.y + t.frame.height - o + h) / n.height, this.uClampOffset[0] = h / n.pixelWidth, this.uClampOffset[1] = h / n.pixelHeight, this.isSimple = t.frame.width === n.width && t.frame.height === n.height && t.rotate === 0, !0;
|
|
1348
1348
|
}
|
|
@@ -1412,7 +1412,7 @@ class L extends Bt {
|
|
|
1412
1412
|
}
|
|
1413
1413
|
/** @deprecated since 8.0.0 */
|
|
1414
1414
|
get baseTexture() {
|
|
1415
|
-
return
|
|
1415
|
+
return q($, "Texture.baseTexture is now Texture.source"), this._source;
|
|
1416
1416
|
}
|
|
1417
1417
|
}
|
|
1418
1418
|
L.EMPTY = new L({
|
|
@@ -1423,7 +1423,7 @@ L.EMPTY = new L({
|
|
|
1423
1423
|
});
|
|
1424
1424
|
L.EMPTY.destroy = ar;
|
|
1425
1425
|
L.WHITE = new L({
|
|
1426
|
-
source: new
|
|
1426
|
+
source: new $i({
|
|
1427
1427
|
resource: new Uint8Array([255, 255, 255, 255]),
|
|
1428
1428
|
width: 1,
|
|
1429
1429
|
height: 1,
|
|
@@ -1443,17 +1443,17 @@ function Ln(i, t, e, s) {
|
|
|
1443
1443
|
}
|
|
1444
1444
|
var Dn = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, Tt = function(i) {
|
|
1445
1445
|
return typeof i == "string" ? i.length > 0 : typeof i == "number";
|
|
1446
|
-
},
|
|
1446
|
+
}, Z = function(i, t, e) {
|
|
1447
1447
|
return t === void 0 && (t = 0), e === void 0 && (e = Math.pow(10, t)), Math.round(e * i) / e + 0;
|
|
1448
1448
|
}, ut = function(i, t, e) {
|
|
1449
1449
|
return t === void 0 && (t = 0), e === void 0 && (e = 1), i > e ? e : i > t ? i : t;
|
|
1450
1450
|
}, ur = function(i) {
|
|
1451
1451
|
return (i = isFinite(i) ? i % 360 : 0) > 0 ? i : i + 360;
|
|
1452
|
-
},
|
|
1452
|
+
}, ys = function(i) {
|
|
1453
1453
|
return { r: ut(i.r, 0, 255), g: ut(i.g, 0, 255), b: ut(i.b, 0, 255), a: ut(i.a) };
|
|
1454
|
-
},
|
|
1455
|
-
return { r:
|
|
1456
|
-
}, Un = /^#([0-9a-f]{3,8})$/i,
|
|
1454
|
+
}, ui = function(i) {
|
|
1455
|
+
return { r: Z(i.r), g: Z(i.g), b: Z(i.b), a: Z(i.a, 3) };
|
|
1456
|
+
}, Un = /^#([0-9a-f]{3,8})$/i, ze = function(i) {
|
|
1457
1457
|
var t = i.toString(16);
|
|
1458
1458
|
return t.length < 2 ? "0" + t : t;
|
|
1459
1459
|
}, dr = function(i) {
|
|
@@ -1464,37 +1464,37 @@ var Dn = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, Tt = function(i) {
|
|
|
1464
1464
|
t = t / 360 * 6, e /= 100, s /= 100;
|
|
1465
1465
|
var n = Math.floor(t), a = s * (1 - e), o = s * (1 - (t - n) * e), h = s * (1 - (1 - t + n) * e), c = n % 6;
|
|
1466
1466
|
return { r: 255 * [s, o, a, a, h, s][c], g: 255 * [h, s, s, o, a, a][c], b: 255 * [a, a, h, s, s, o][c], a: r };
|
|
1467
|
-
},
|
|
1467
|
+
}, _s = function(i) {
|
|
1468
1468
|
return { h: ur(i.h), s: ut(i.s, 0, 100), l: ut(i.l, 0, 100), a: ut(i.a) };
|
|
1469
|
+
}, xs = function(i) {
|
|
1470
|
+
return { h: Z(i.h), s: Z(i.s), l: Z(i.l), a: Z(i.a, 3) };
|
|
1469
1471
|
}, bs = function(i) {
|
|
1470
|
-
return { h: K(i.h), s: K(i.s), l: K(i.l), a: K(i.a, 3) };
|
|
1471
|
-
}, ws = function(i) {
|
|
1472
1472
|
return fr((e = (t = i).s, { h: t.h, s: (e *= ((s = t.l) < 50 ? s : 100 - s) / 100) > 0 ? 2 * e / (s + e) * 100 : 0, v: s + e, a: t.a }));
|
|
1473
1473
|
var t, e, s;
|
|
1474
|
-
},
|
|
1474
|
+
}, Ae = function(i) {
|
|
1475
1475
|
return { h: (t = dr(i)).h, s: (r = (200 - (e = t.s)) * (s = t.v) / 100) > 0 && r < 200 ? e * s / 100 / (r <= 100 ? r : 200 - r) * 100 : 0, l: r / 2, a: t.a };
|
|
1476
1476
|
var t, e, s, r;
|
|
1477
|
-
}, On = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, Gn = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, zn = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, Hn = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,
|
|
1477
|
+
}, On = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, Gn = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, zn = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, Hn = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, Ii = { string: [[function(i) {
|
|
1478
1478
|
var t = Un.exec(i);
|
|
1479
|
-
return t ? (i = t[1]).length <= 4 ? { r: parseInt(i[0] + i[0], 16), g: parseInt(i[1] + i[1], 16), b: parseInt(i[2] + i[2], 16), a: i.length === 4 ?
|
|
1479
|
+
return t ? (i = t[1]).length <= 4 ? { r: parseInt(i[0] + i[0], 16), g: parseInt(i[1] + i[1], 16), b: parseInt(i[2] + i[2], 16), a: i.length === 4 ? Z(parseInt(i[3] + i[3], 16) / 255, 2) : 1 } : i.length === 6 || i.length === 8 ? { r: parseInt(i.substr(0, 2), 16), g: parseInt(i.substr(2, 2), 16), b: parseInt(i.substr(4, 2), 16), a: i.length === 8 ? Z(parseInt(i.substr(6, 2), 16) / 255, 2) : 1 } : null : null;
|
|
1480
1480
|
}, "hex"], [function(i) {
|
|
1481
1481
|
var t = zn.exec(i) || Hn.exec(i);
|
|
1482
|
-
return t ? t[2] !== t[4] || t[4] !== t[6] ? null :
|
|
1482
|
+
return t ? t[2] !== t[4] || t[4] !== t[6] ? null : ys({ r: Number(t[1]) / (t[2] ? 100 / 255 : 1), g: Number(t[3]) / (t[4] ? 100 / 255 : 1), b: Number(t[5]) / (t[6] ? 100 / 255 : 1), a: t[7] === void 0 ? 1 : Number(t[7]) / (t[8] ? 100 : 1) }) : null;
|
|
1483
1483
|
}, "rgb"], [function(i) {
|
|
1484
1484
|
var t = On.exec(i) || Gn.exec(i);
|
|
1485
1485
|
if (!t)
|
|
1486
1486
|
return null;
|
|
1487
|
-
var e, s, r =
|
|
1488
|
-
return
|
|
1487
|
+
var e, s, r = _s({ h: (e = t[1], s = t[2], s === void 0 && (s = "deg"), Number(e) * (Dn[s] || 1)), s: Number(t[3]), l: Number(t[4]), a: t[5] === void 0 ? 1 : Number(t[5]) / (t[6] ? 100 : 1) });
|
|
1488
|
+
return bs(r);
|
|
1489
1489
|
}, "hsl"]], object: [[function(i) {
|
|
1490
1490
|
var t = i.r, e = i.g, s = i.b, r = i.a, n = r === void 0 ? 1 : r;
|
|
1491
|
-
return Tt(t) && Tt(e) && Tt(s) ?
|
|
1491
|
+
return Tt(t) && Tt(e) && Tt(s) ? ys({ r: Number(t), g: Number(e), b: Number(s), a: Number(n) }) : null;
|
|
1492
1492
|
}, "rgb"], [function(i) {
|
|
1493
1493
|
var t = i.h, e = i.s, s = i.l, r = i.a, n = r === void 0 ? 1 : r;
|
|
1494
1494
|
if (!Tt(t) || !Tt(e) || !Tt(s))
|
|
1495
1495
|
return null;
|
|
1496
|
-
var a =
|
|
1497
|
-
return
|
|
1496
|
+
var a = _s({ h: Number(t), s: Number(e), l: Number(s), a: Number(n) });
|
|
1497
|
+
return bs(a);
|
|
1498
1498
|
}, "hsl"], [function(i) {
|
|
1499
1499
|
var t = i.h, e = i.s, s = i.v, r = i.a, n = r === void 0 ? 1 : r;
|
|
1500
1500
|
if (!Tt(t) || !Tt(e) || !Tt(s))
|
|
@@ -1503,7 +1503,7 @@ var Dn = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, Tt = function(i) {
|
|
|
1503
1503
|
return { h: ur(o.h), s: ut(o.s, 0, 100), v: ut(o.v, 0, 100), a: ut(o.a) };
|
|
1504
1504
|
}({ h: Number(t), s: Number(e), v: Number(s), a: Number(n) });
|
|
1505
1505
|
return fr(a);
|
|
1506
|
-
}, "hsv"]] },
|
|
1506
|
+
}, "hsv"]] }, ws = function(i, t) {
|
|
1507
1507
|
for (var e = 0; e < t.length; e++) {
|
|
1508
1508
|
var s = t[e][0](i);
|
|
1509
1509
|
if (s)
|
|
@@ -1511,72 +1511,72 @@ var Dn = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, Tt = function(i) {
|
|
|
1511
1511
|
}
|
|
1512
1512
|
return [null, void 0];
|
|
1513
1513
|
}, Wn = function(i) {
|
|
1514
|
-
return typeof i == "string" ?
|
|
1515
|
-
},
|
|
1516
|
-
var e =
|
|
1514
|
+
return typeof i == "string" ? ws(i.trim(), Ii.string) : typeof i == "object" && i !== null ? ws(i, Ii.object) : [null, void 0];
|
|
1515
|
+
}, di = function(i, t) {
|
|
1516
|
+
var e = Ae(i);
|
|
1517
1517
|
return { h: e.h, s: ut(e.s + 100 * t, 0, 100), l: e.l, a: e.a };
|
|
1518
|
-
},
|
|
1518
|
+
}, fi = function(i) {
|
|
1519
1519
|
return (299 * i.r + 587 * i.g + 114 * i.b) / 1e3 / 255;
|
|
1520
|
-
},
|
|
1521
|
-
var e =
|
|
1520
|
+
}, vs = function(i, t) {
|
|
1521
|
+
var e = Ae(i);
|
|
1522
1522
|
return { h: e.h, s: e.s, l: ut(e.l + 100 * t, 0, 100), a: e.a };
|
|
1523
|
-
},
|
|
1523
|
+
}, Ei = function() {
|
|
1524
1524
|
function i(t) {
|
|
1525
1525
|
this.parsed = Wn(t)[0], this.rgba = this.parsed || { r: 0, g: 0, b: 0, a: 1 };
|
|
1526
1526
|
}
|
|
1527
1527
|
return i.prototype.isValid = function() {
|
|
1528
1528
|
return this.parsed !== null;
|
|
1529
1529
|
}, i.prototype.brightness = function() {
|
|
1530
|
-
return
|
|
1530
|
+
return Z(fi(this.rgba), 2);
|
|
1531
1531
|
}, i.prototype.isDark = function() {
|
|
1532
|
-
return
|
|
1532
|
+
return fi(this.rgba) < 0.5;
|
|
1533
1533
|
}, i.prototype.isLight = function() {
|
|
1534
|
-
return
|
|
1534
|
+
return fi(this.rgba) >= 0.5;
|
|
1535
1535
|
}, i.prototype.toHex = function() {
|
|
1536
|
-
return t =
|
|
1536
|
+
return t = ui(this.rgba), e = t.r, s = t.g, r = t.b, a = (n = t.a) < 1 ? ze(Z(255 * n)) : "", "#" + ze(e) + ze(s) + ze(r) + a;
|
|
1537
1537
|
var t, e, s, r, n, a;
|
|
1538
1538
|
}, i.prototype.toRgb = function() {
|
|
1539
|
-
return
|
|
1539
|
+
return ui(this.rgba);
|
|
1540
1540
|
}, i.prototype.toRgbString = function() {
|
|
1541
|
-
return t =
|
|
1541
|
+
return t = ui(this.rgba), e = t.r, s = t.g, r = t.b, (n = t.a) < 1 ? "rgba(" + e + ", " + s + ", " + r + ", " + n + ")" : "rgb(" + e + ", " + s + ", " + r + ")";
|
|
1542
1542
|
var t, e, s, r, n;
|
|
1543
1543
|
}, i.prototype.toHsl = function() {
|
|
1544
|
-
return
|
|
1544
|
+
return xs(Ae(this.rgba));
|
|
1545
1545
|
}, i.prototype.toHslString = function() {
|
|
1546
|
-
return t =
|
|
1546
|
+
return t = xs(Ae(this.rgba)), e = t.h, s = t.s, r = t.l, (n = t.a) < 1 ? "hsla(" + e + ", " + s + "%, " + r + "%, " + n + ")" : "hsl(" + e + ", " + s + "%, " + r + "%)";
|
|
1547
1547
|
var t, e, s, r, n;
|
|
1548
1548
|
}, i.prototype.toHsv = function() {
|
|
1549
|
-
return t = dr(this.rgba), { h:
|
|
1549
|
+
return t = dr(this.rgba), { h: Z(t.h), s: Z(t.s), v: Z(t.v), a: Z(t.a, 3) };
|
|
1550
1550
|
var t;
|
|
1551
1551
|
}, i.prototype.invert = function() {
|
|
1552
1552
|
return vt({ r: 255 - (t = this.rgba).r, g: 255 - t.g, b: 255 - t.b, a: t.a });
|
|
1553
1553
|
var t;
|
|
1554
1554
|
}, i.prototype.saturate = function(t) {
|
|
1555
|
-
return t === void 0 && (t = 0.1), vt(
|
|
1555
|
+
return t === void 0 && (t = 0.1), vt(di(this.rgba, t));
|
|
1556
1556
|
}, i.prototype.desaturate = function(t) {
|
|
1557
|
-
return t === void 0 && (t = 0.1), vt(
|
|
1557
|
+
return t === void 0 && (t = 0.1), vt(di(this.rgba, -t));
|
|
1558
1558
|
}, i.prototype.grayscale = function() {
|
|
1559
|
-
return vt(
|
|
1559
|
+
return vt(di(this.rgba, -1));
|
|
1560
1560
|
}, i.prototype.lighten = function(t) {
|
|
1561
|
-
return t === void 0 && (t = 0.1), vt(
|
|
1561
|
+
return t === void 0 && (t = 0.1), vt(vs(this.rgba, t));
|
|
1562
1562
|
}, i.prototype.darken = function(t) {
|
|
1563
|
-
return t === void 0 && (t = 0.1), vt(
|
|
1563
|
+
return t === void 0 && (t = 0.1), vt(vs(this.rgba, -t));
|
|
1564
1564
|
}, i.prototype.rotate = function(t) {
|
|
1565
1565
|
return t === void 0 && (t = 15), this.hue(this.hue() + t);
|
|
1566
1566
|
}, i.prototype.alpha = function(t) {
|
|
1567
|
-
return typeof t == "number" ? vt({ r: (e = this.rgba).r, g: e.g, b: e.b, a: t }) :
|
|
1567
|
+
return typeof t == "number" ? vt({ r: (e = this.rgba).r, g: e.g, b: e.b, a: t }) : Z(this.rgba.a, 3);
|
|
1568
1568
|
var e;
|
|
1569
1569
|
}, i.prototype.hue = function(t) {
|
|
1570
|
-
var e =
|
|
1571
|
-
return typeof t == "number" ? vt({ h: t, s: e.s, l: e.l, a: e.a }) :
|
|
1570
|
+
var e = Ae(this.rgba);
|
|
1571
|
+
return typeof t == "number" ? vt({ h: t, s: e.s, l: e.l, a: e.a }) : Z(e.h);
|
|
1572
1572
|
}, i.prototype.isEqual = function(t) {
|
|
1573
1573
|
return this.toHex() === vt(t).toHex();
|
|
1574
1574
|
}, i;
|
|
1575
1575
|
}(), vt = function(i) {
|
|
1576
|
-
return i instanceof
|
|
1577
|
-
},
|
|
1576
|
+
return i instanceof Ei ? i : new Ei(i);
|
|
1577
|
+
}, As = [], Nn = function(i) {
|
|
1578
1578
|
i.forEach(function(t) {
|
|
1579
|
-
|
|
1579
|
+
As.indexOf(t) < 0 && (t(Ei, Ii), As.push(t));
|
|
1580
1580
|
});
|
|
1581
1581
|
};
|
|
1582
1582
|
function Yn(i, t) {
|
|
@@ -1607,7 +1607,7 @@ function Yn(i, t) {
|
|
|
1607
1607
|
}, "name"]);
|
|
1608
1608
|
}
|
|
1609
1609
|
Nn([Yn]);
|
|
1610
|
-
const
|
|
1610
|
+
const re = class _e {
|
|
1611
1611
|
/**
|
|
1612
1612
|
* @param {ColorSource} value - Optional value to use, if not provided, white is used.
|
|
1613
1613
|
*/
|
|
@@ -1655,7 +1655,7 @@ const ne = class xe {
|
|
|
1655
1655
|
* - Otherwise, the color source used when setting is returned.
|
|
1656
1656
|
*/
|
|
1657
1657
|
set value(t) {
|
|
1658
|
-
if (t instanceof
|
|
1658
|
+
if (t instanceof _e)
|
|
1659
1659
|
this._value = this._cloneSource(t._value), this._int = t._int, this._components.set(t._components);
|
|
1660
1660
|
else {
|
|
1661
1661
|
if (t === null)
|
|
@@ -1768,7 +1768,7 @@ const ne = class xe {
|
|
|
1768
1768
|
* @param {ColorSource} value - The color to multiply by.
|
|
1769
1769
|
*/
|
|
1770
1770
|
multiply(t) {
|
|
1771
|
-
const [e, s, r, n] =
|
|
1771
|
+
const [e, s, r, n] = _e._temp.setValue(t)._components;
|
|
1772
1772
|
return this._components[0] *= e, this._components[1] *= s, this._components[2] *= r, this._components[3] *= n, this._refreshInt(), this._value = null, this;
|
|
1773
1773
|
}
|
|
1774
1774
|
/**
|
|
@@ -1837,7 +1837,7 @@ const ne = class xe {
|
|
|
1837
1837
|
t = this._clamp(t, 0, 255), [e, s, r, n = 255] = t, e /= 255, s /= 255, r /= 255, n /= 255;
|
|
1838
1838
|
else if (typeof t == "string" || typeof t == "object") {
|
|
1839
1839
|
if (typeof t == "string") {
|
|
1840
|
-
const o =
|
|
1840
|
+
const o = _e.HEX_PATTERN.exec(t);
|
|
1841
1841
|
o && (t = `#${o[2]}`);
|
|
1842
1842
|
}
|
|
1843
1843
|
const a = vt(t);
|
|
@@ -1877,19 +1877,19 @@ const ne = class xe {
|
|
|
1877
1877
|
* Color.isColorLike([1, 1, 1]); // returns true
|
|
1878
1878
|
*/
|
|
1879
1879
|
static isColorLike(t) {
|
|
1880
|
-
return typeof t == "number" || typeof t == "string" || t instanceof Number || t instanceof
|
|
1880
|
+
return typeof t == "number" || typeof t == "string" || t instanceof Number || t instanceof _e || Array.isArray(t) || t instanceof Uint8Array || t instanceof Uint8ClampedArray || t instanceof Float32Array || t.r !== void 0 && t.g !== void 0 && t.b !== void 0 || t.r !== void 0 && t.g !== void 0 && t.b !== void 0 && t.a !== void 0 || t.h !== void 0 && t.s !== void 0 && t.l !== void 0 || t.h !== void 0 && t.s !== void 0 && t.l !== void 0 && t.a !== void 0 || t.h !== void 0 && t.s !== void 0 && t.v !== void 0 || t.h !== void 0 && t.s !== void 0 && t.v !== void 0 && t.a !== void 0;
|
|
1881
1881
|
}
|
|
1882
1882
|
};
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
let J =
|
|
1887
|
-
const
|
|
1883
|
+
re.shared = new re();
|
|
1884
|
+
re._temp = new re();
|
|
1885
|
+
re.HEX_PATTERN = /^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;
|
|
1886
|
+
let J = re;
|
|
1887
|
+
const Vn = {
|
|
1888
1888
|
cullArea: null,
|
|
1889
1889
|
cullable: !1,
|
|
1890
1890
|
cullableChildren: !0
|
|
1891
1891
|
};
|
|
1892
|
-
function
|
|
1892
|
+
function jn(i, t, e) {
|
|
1893
1893
|
const s = i.length;
|
|
1894
1894
|
let r;
|
|
1895
1895
|
if (t >= s || e === 0)
|
|
@@ -1916,7 +1916,7 @@ const Xn = {
|
|
|
1916
1916
|
const o = this.children[a];
|
|
1917
1917
|
o && (r.push(o), o.parent = null);
|
|
1918
1918
|
}
|
|
1919
|
-
|
|
1919
|
+
jn(this.children, i, e);
|
|
1920
1920
|
const n = this.renderGroup || this.parentRenderGroup;
|
|
1921
1921
|
n && n.removeChildren(r);
|
|
1922
1922
|
for (let a = 0; a < r.length; ++a)
|
|
@@ -1979,7 +1979,7 @@ const Xn = {
|
|
|
1979
1979
|
* @memberof scene.Container#
|
|
1980
1980
|
*/
|
|
1981
1981
|
addChildAt(i, t) {
|
|
1982
|
-
this.allowChildren ||
|
|
1982
|
+
this.allowChildren || q($, "addChildAt: Only Containers will be allowed to add children in v8.0.0");
|
|
1983
1983
|
const { children: e } = this;
|
|
1984
1984
|
if (t < 0 || t > e.length)
|
|
1985
1985
|
throw new Error(`${i}addChildAt: The index ${t} supplied is out of bounds ${e.length}`);
|
|
@@ -2013,7 +2013,7 @@ const Xn = {
|
|
|
2013
2013
|
(i = this.parent) == null || i.removeChild(this);
|
|
2014
2014
|
}
|
|
2015
2015
|
};
|
|
2016
|
-
class
|
|
2016
|
+
class Ss {
|
|
2017
2017
|
constructor() {
|
|
2018
2018
|
this.pipe = "filter", this.priority = 1;
|
|
2019
2019
|
}
|
|
@@ -2023,7 +2023,7 @@ class Cs {
|
|
|
2023
2023
|
this.filters = null, this.filterArea = null;
|
|
2024
2024
|
}
|
|
2025
2025
|
}
|
|
2026
|
-
class
|
|
2026
|
+
class qi {
|
|
2027
2027
|
/**
|
|
2028
2028
|
* Constructs a new Pool.
|
|
2029
2029
|
* @param ClassType - The constructor of the items in the pool.
|
|
@@ -2122,7 +2122,7 @@ class $n {
|
|
|
2122
2122
|
* @returns {Pool<T>} The pool of the given class type.
|
|
2123
2123
|
*/
|
|
2124
2124
|
getPool(t) {
|
|
2125
|
-
return this._poolsByClass.has(t) || this._poolsByClass.set(t, new
|
|
2125
|
+
return this._poolsByClass.has(t) || this._poolsByClass.set(t, new qi(t)), this._poolsByClass.get(t);
|
|
2126
2126
|
}
|
|
2127
2127
|
/** gets the usage stats of each pool in the system */
|
|
2128
2128
|
stats() {
|
|
@@ -2166,8 +2166,8 @@ class qn {
|
|
|
2166
2166
|
kt.return(t);
|
|
2167
2167
|
}
|
|
2168
2168
|
}
|
|
2169
|
-
const
|
|
2170
|
-
dt.handleByList(B.MaskEffect,
|
|
2169
|
+
const Ri = new qn();
|
|
2170
|
+
dt.handleByList(B.MaskEffect, Ri._effectClasses);
|
|
2171
2171
|
const Kn = {
|
|
2172
2172
|
_maskEffect: null,
|
|
2173
2173
|
_filterEffect: null,
|
|
@@ -2202,7 +2202,7 @@ const Kn = {
|
|
|
2202
2202
|
},
|
|
2203
2203
|
set mask(i) {
|
|
2204
2204
|
const t = this._maskEffect;
|
|
2205
|
-
(t == null ? void 0 : t.mask) !== i && (t && (this.removeEffect(t),
|
|
2205
|
+
(t == null ? void 0 : t.mask) !== i && (t && (this.removeEffect(t), Ri.returnMaskEffect(t), this._maskEffect = null), i != null && (this._maskEffect = Ri.getMaskEffect(i), this.addEffect(this._maskEffect)));
|
|
2206
2206
|
},
|
|
2207
2207
|
/**
|
|
2208
2208
|
* Sets a mask for the displayObject. A mask is an object that limits the visibility of an
|
|
@@ -2232,7 +2232,7 @@ const Kn = {
|
|
|
2232
2232
|
set filters(i) {
|
|
2233
2233
|
var n;
|
|
2234
2234
|
!Array.isArray(i) && i && (i = [i]);
|
|
2235
|
-
const t = this._filterEffect || (this._filterEffect = new
|
|
2235
|
+
const t = this._filterEffect || (this._filterEffect = new Ss());
|
|
2236
2236
|
i = i;
|
|
2237
2237
|
const e = (i == null ? void 0 : i.length) > 0, s = ((n = t.filters) == null ? void 0 : n.length) > 0, r = e !== s;
|
|
2238
2238
|
i = Array.isArray(i) ? i.slice(0) : i, t.filters = Object.freeze(i), r && (e ? this.addEffect(t) : (this.removeEffect(t), t.filters = i ?? null));
|
|
@@ -2248,7 +2248,7 @@ const Kn = {
|
|
|
2248
2248
|
return (i = this._filterEffect) == null ? void 0 : i.filters;
|
|
2249
2249
|
},
|
|
2250
2250
|
set filterArea(i) {
|
|
2251
|
-
this._filterEffect || (this._filterEffect = new
|
|
2251
|
+
this._filterEffect || (this._filterEffect = new Ss()), this._filterEffect.filterArea = i;
|
|
2252
2252
|
},
|
|
2253
2253
|
/**
|
|
2254
2254
|
* The area the filter is applied to. This is used as more of an optimization
|
|
@@ -2276,10 +2276,10 @@ const Kn = {
|
|
|
2276
2276
|
* @memberof scene.Container#
|
|
2277
2277
|
*/
|
|
2278
2278
|
get name() {
|
|
2279
|
-
return
|
|
2279
|
+
return q($, "Container.name property has been removed, use Container.label instead"), this.label;
|
|
2280
2280
|
},
|
|
2281
2281
|
set name(i) {
|
|
2282
|
-
|
|
2282
|
+
q($, "Container.name property has been removed, use Container.label instead"), this.label = i;
|
|
2283
2283
|
},
|
|
2284
2284
|
/**
|
|
2285
2285
|
* @method getChildByName
|
|
@@ -2336,10 +2336,10 @@ const Kn = {
|
|
|
2336
2336
|
s[r].getChildrenByLabel(i, !0, e);
|
|
2337
2337
|
return e;
|
|
2338
2338
|
}
|
|
2339
|
-
},
|
|
2339
|
+
}, Cs = new D();
|
|
2340
2340
|
class St {
|
|
2341
2341
|
constructor(t = 1 / 0, e = 1 / 0, s = -1 / 0, r = -1 / 0) {
|
|
2342
|
-
this.minX = 1 / 0, this.minY = 1 / 0, this.maxX = -1 / 0, this.maxY = -1 / 0, this.matrix =
|
|
2342
|
+
this.minX = 1 / 0, this.minY = 1 / 0, this.maxX = -1 / 0, this.maxY = -1 / 0, this.matrix = Cs, this.minX = t, this.minY = e, this.maxX = s, this.maxY = r;
|
|
2343
2343
|
}
|
|
2344
2344
|
/**
|
|
2345
2345
|
* Checks if bounds are empty.
|
|
@@ -2356,7 +2356,7 @@ class St {
|
|
|
2356
2356
|
}
|
|
2357
2357
|
/** Clears the bounds and resets. */
|
|
2358
2358
|
clear() {
|
|
2359
|
-
return this.minX = 1 / 0, this.minY = 1 / 0, this.maxX = -1 / 0, this.maxY = -1 / 0, this.matrix =
|
|
2359
|
+
return this.minX = 1 / 0, this.minY = 1 / 0, this.maxX = -1 / 0, this.maxY = -1 / 0, this.matrix = Cs, this;
|
|
2360
2360
|
}
|
|
2361
2361
|
/**
|
|
2362
2362
|
* Sets the bounds.
|
|
@@ -2538,11 +2538,11 @@ class St {
|
|
|
2538
2538
|
return `[pixi.js:Bounds minX=${this.minX} minY=${this.minY} maxX=${this.maxX} maxY=${this.maxY} width=${this.width} height=${this.height}]`;
|
|
2539
2539
|
}
|
|
2540
2540
|
}
|
|
2541
|
-
const Et = new
|
|
2541
|
+
const Et = new qi(D), ne = new qi(St);
|
|
2542
2542
|
function pr(i, t, e) {
|
|
2543
2543
|
e.clear();
|
|
2544
2544
|
let s, r;
|
|
2545
|
-
return i.parent ? t ? s = i.parent.worldTransform : (r = Et.get().identity(), s =
|
|
2545
|
+
return i.parent ? t ? s = i.parent.worldTransform : (r = Et.get().identity(), s = qe(i, r)) : s = D.IDENTITY, mr(i, e, s, t), r && Et.return(r), e.isValid || e.set(0, 0, 0, 0), e;
|
|
2546
2546
|
}
|
|
2547
2547
|
function mr(i, t, e, s) {
|
|
2548
2548
|
var o, h;
|
|
@@ -2551,7 +2551,7 @@ function mr(i, t, e, s) {
|
|
|
2551
2551
|
let r;
|
|
2552
2552
|
s ? r = i.worldTransform : (i.updateLocalTransform(), r = Et.get(), r.appendFrom(i.localTransform, e));
|
|
2553
2553
|
const n = t, a = !!i.effects.length;
|
|
2554
|
-
if (a && (t =
|
|
2554
|
+
if (a && (t = ne.get().clear()), i.boundsArea)
|
|
2555
2555
|
t.addRect(i.boundsArea, r);
|
|
2556
2556
|
else {
|
|
2557
2557
|
i.addBounds && (t.matrix = r, i.addBounds(t));
|
|
@@ -2561,18 +2561,18 @@ function mr(i, t, e, s) {
|
|
|
2561
2561
|
if (a) {
|
|
2562
2562
|
for (let c = 0; c < i.effects.length; c++)
|
|
2563
2563
|
(h = (o = i.effects[c]).addBounds) == null || h.call(o, t);
|
|
2564
|
-
n.addBounds(t, D.IDENTITY),
|
|
2564
|
+
n.addBounds(t, D.IDENTITY), ne.return(t);
|
|
2565
2565
|
}
|
|
2566
2566
|
s || Et.return(r);
|
|
2567
2567
|
}
|
|
2568
|
-
function
|
|
2568
|
+
function qe(i, t) {
|
|
2569
2569
|
const e = i.parent;
|
|
2570
|
-
return e && (
|
|
2570
|
+
return e && (qe(e, t), e.updateLocalTransform(), t.append(e.localTransform)), t;
|
|
2571
2571
|
}
|
|
2572
|
-
let
|
|
2573
|
-
const
|
|
2572
|
+
let pi = 0;
|
|
2573
|
+
const Ms = 500;
|
|
2574
2574
|
function it(...i) {
|
|
2575
|
-
|
|
2575
|
+
pi !== Ms && (pi++, pi === Ms ? console.warn("PixiJS Warning: too many warnings, no more warnings will be reported to the console by PixiJS.") : console.warn("PixiJS Warning: ", ...i));
|
|
2576
2576
|
}
|
|
2577
2577
|
function gr(i, t, e) {
|
|
2578
2578
|
return t.clear(), e || (e = D.IDENTITY), yr(i, t, e, i, !0), t.isValid || t.set(0, 0, 0, 0), t;
|
|
@@ -2590,7 +2590,7 @@ function yr(i, t, e, s, r) {
|
|
|
2590
2590
|
n = Et.get(), n.appendFrom(l, e);
|
|
2591
2591
|
}
|
|
2592
2592
|
const a = t, o = !!i.effects.length;
|
|
2593
|
-
if (o && (t =
|
|
2593
|
+
if (o && (t = ne.get().clear()), i.boundsArea)
|
|
2594
2594
|
t.addRect(i.boundsArea, n);
|
|
2595
2595
|
else {
|
|
2596
2596
|
i.renderPipeId && (t.matrix = n, i.addBounds(t));
|
|
@@ -2601,7 +2601,7 @@ function yr(i, t, e, s, r) {
|
|
|
2601
2601
|
if (o) {
|
|
2602
2602
|
for (let l = 0; l < i.effects.length; l++)
|
|
2603
2603
|
(c = (h = i.effects[l]).addLocalBounds) == null || c.call(h, t, s);
|
|
2604
|
-
a.addBounds(t, D.IDENTITY),
|
|
2604
|
+
a.addBounds(t, D.IDENTITY), ne.return(t);
|
|
2605
2605
|
}
|
|
2606
2606
|
Et.return(n);
|
|
2607
2607
|
}
|
|
@@ -2753,7 +2753,7 @@ const sa = {
|
|
|
2753
2753
|
toGlobal(i, t, e = !1) {
|
|
2754
2754
|
if (!e) {
|
|
2755
2755
|
this.updateLocalTransform();
|
|
2756
|
-
const s =
|
|
2756
|
+
const s = qe(this, new D());
|
|
2757
2757
|
return s.append(this.localTransform), s.apply(i, t);
|
|
2758
2758
|
}
|
|
2759
2759
|
return this.worldTransform.apply(i, t);
|
|
@@ -2771,7 +2771,7 @@ const sa = {
|
|
|
2771
2771
|
toLocal(i, t, e, s) {
|
|
2772
2772
|
if (t && (i = t.toGlobal(i, e, s)), !s) {
|
|
2773
2773
|
this.updateLocalTransform();
|
|
2774
|
-
const r =
|
|
2774
|
+
const r = qe(this, new D());
|
|
2775
2775
|
return r.append(this.localTransform), r.applyInverse(i, e);
|
|
2776
2776
|
}
|
|
2777
2777
|
return this.worldTransform.applyInverse(i, e);
|
|
@@ -2892,11 +2892,11 @@ function na(i, t, e = {}) {
|
|
|
2892
2892
|
for (const s in t)
|
|
2893
2893
|
!e[s] && t[s] !== void 0 && (i[s] = t[s]);
|
|
2894
2894
|
}
|
|
2895
|
-
const
|
|
2895
|
+
const mi = new nt(null), gi = new nt(null), yi = new nt(null, 1, 1), Ts = 1, aa = 2, _i = 4;
|
|
2896
2896
|
class O extends Bt {
|
|
2897
2897
|
constructor(t = {}) {
|
|
2898
2898
|
var e, s;
|
|
2899
|
-
super(), this.uid = et("renderable"), this._updateFlags = 15, this.renderGroup = null, this.parentRenderGroup = null, this.parentRenderGroupIndex = 0, this.didChange = !1, this.didViewUpdate = !1, this.relativeRenderGroupDepth = 0, this.children = [], this.parent = null, this.includeInBuild = !0, this.measurable = !0, this.isSimple = !0, this.updateTick = -1, this.localTransform = new D(), this.relativeGroupTransform = new D(), this.groupTransform = this.relativeGroupTransform, this.destroyed = !1, this._position = new nt(this, 0, 0), this._scale =
|
|
2899
|
+
super(), this.uid = et("renderable"), this._updateFlags = 15, this.renderGroup = null, this.parentRenderGroup = null, this.parentRenderGroupIndex = 0, this.didChange = !1, this.didViewUpdate = !1, this.relativeRenderGroupDepth = 0, this.children = [], this.parent = null, this.includeInBuild = !0, this.measurable = !0, this.isSimple = !0, this.updateTick = -1, this.localTransform = new D(), this.relativeGroupTransform = new D(), this.groupTransform = this.relativeGroupTransform, this.destroyed = !1, this._position = new nt(this, 0, 0), this._scale = yi, this._pivot = gi, this._skew = mi, this._cx = 1, this._sx = 0, this._cy = 0, this._sy = 1, this._rotation = 0, this.localColor = 16777215, this.localAlpha = 1, this.groupAlpha = 1, this.groupColor = 16777215, this.groupColorAlpha = 4294967295, this.localBlendMode = "inherit", this.groupBlendMode = "normal", this.localDisplayStatus = 7, this.globalDisplayStatus = 7, this._didChangeId = 0, this._didLocalTransformChangeId = -1, na(this, t, {
|
|
2900
2900
|
children: !0,
|
|
2901
2901
|
parent: !0,
|
|
2902
2902
|
effects: !0
|
|
@@ -2917,7 +2917,7 @@ class O extends Bt {
|
|
|
2917
2917
|
* @returns {Container} - The first child that was added.
|
|
2918
2918
|
*/
|
|
2919
2919
|
addChild(...t) {
|
|
2920
|
-
if (this.allowChildren ||
|
|
2920
|
+
if (this.allowChildren || q($, "addChild: Only Containers will be allowed to add children in v8.0.0"), t.length > 1) {
|
|
2921
2921
|
for (let r = 0; r < t.length; r++)
|
|
2922
2922
|
this.addChild(t[r]);
|
|
2923
2923
|
return t[0];
|
|
@@ -3036,20 +3036,20 @@ class O extends Bt {
|
|
|
3036
3036
|
* @since 4.0.0
|
|
3037
3037
|
*/
|
|
3038
3038
|
get pivot() {
|
|
3039
|
-
return this._pivot ===
|
|
3039
|
+
return this._pivot === gi && (this._pivot = new nt(this, 0, 0)), this._pivot;
|
|
3040
3040
|
}
|
|
3041
3041
|
set pivot(t) {
|
|
3042
|
-
this._pivot ===
|
|
3042
|
+
this._pivot === gi && (this._pivot = new nt(this, 0, 0)), typeof t == "number" ? this._pivot.set(t) : this._pivot.copyFrom(t);
|
|
3043
3043
|
}
|
|
3044
3044
|
/**
|
|
3045
3045
|
* The skew factor for the object in radians.
|
|
3046
3046
|
* @since 4.0.0
|
|
3047
3047
|
*/
|
|
3048
3048
|
get skew() {
|
|
3049
|
-
return this._skew ===
|
|
3049
|
+
return this._skew === mi && (this._skew = new nt(this, 0, 0)), this._skew;
|
|
3050
3050
|
}
|
|
3051
3051
|
set skew(t) {
|
|
3052
|
-
this._skew ===
|
|
3052
|
+
this._skew === mi && (this._skew = new nt(this, 0, 0)), this._skew.copyFrom(t);
|
|
3053
3053
|
}
|
|
3054
3054
|
/**
|
|
3055
3055
|
* The scale factors of this object along the local coordinate axes.
|
|
@@ -3058,10 +3058,10 @@ class O extends Bt {
|
|
|
3058
3058
|
* @since 4.0.0
|
|
3059
3059
|
*/
|
|
3060
3060
|
get scale() {
|
|
3061
|
-
return this._scale ===
|
|
3061
|
+
return this._scale === yi && (this._scale = new nt(this, 1, 1)), this._scale;
|
|
3062
3062
|
}
|
|
3063
3063
|
set scale(t) {
|
|
3064
|
-
this._scale ===
|
|
3064
|
+
this._scale === yi && (this._scale = new nt(this, 0, 0)), typeof t == "number" ? this._scale.set(t) : this._scale.copyFrom(t);
|
|
3065
3065
|
}
|
|
3066
3066
|
/**
|
|
3067
3067
|
* The width of the Container, setting this will actually modify the scale to achieve the value set.
|
|
@@ -3159,7 +3159,7 @@ class O extends Bt {
|
|
|
3159
3159
|
}
|
|
3160
3160
|
// / ///// color related stuff
|
|
3161
3161
|
set alpha(t) {
|
|
3162
|
-
t !== this.localAlpha && (this.localAlpha = t, this._updateFlags |=
|
|
3162
|
+
t !== this.localAlpha && (this.localAlpha = t, this._updateFlags |= Ts, this._onUpdate());
|
|
3163
3163
|
}
|
|
3164
3164
|
/** The opacity of the object. */
|
|
3165
3165
|
get alpha() {
|
|
@@ -3167,7 +3167,7 @@ class O extends Bt {
|
|
|
3167
3167
|
}
|
|
3168
3168
|
set tint(t) {
|
|
3169
3169
|
const s = J.shared.setValue(t ?? 16777215).toBgrNumber();
|
|
3170
|
-
s !== this.localColor && (this.localColor = s, this._updateFlags |=
|
|
3170
|
+
s !== this.localColor && (this.localColor = s, this._updateFlags |= Ts, this._onUpdate());
|
|
3171
3171
|
}
|
|
3172
3172
|
/**
|
|
3173
3173
|
* The tint applied to the sprite. This is a hex value.
|
|
@@ -3197,7 +3197,7 @@ class O extends Bt {
|
|
|
3197
3197
|
}
|
|
3198
3198
|
set visible(t) {
|
|
3199
3199
|
const e = t ? 1 : 0;
|
|
3200
|
-
(this.localDisplayStatus & 2) >> 1 !== e && (this.parentRenderGroup && (this.parentRenderGroup.structureDidChange = !0), this._updateFlags |=
|
|
3200
|
+
(this.localDisplayStatus & 2) >> 1 !== e && (this.parentRenderGroup && (this.parentRenderGroup.structureDidChange = !0), this._updateFlags |= _i, this.localDisplayStatus ^= 2, this._onUpdate());
|
|
3201
3201
|
}
|
|
3202
3202
|
/** @ignore */
|
|
3203
3203
|
get culled() {
|
|
@@ -3206,7 +3206,7 @@ class O extends Bt {
|
|
|
3206
3206
|
/** @ignore */
|
|
3207
3207
|
set culled(t) {
|
|
3208
3208
|
const e = t ? 1 : 0;
|
|
3209
|
-
(this.localDisplayStatus & 4) >> 2 !== e && (this.parentRenderGroup && (this.parentRenderGroup.structureDidChange = !0), this._updateFlags |=
|
|
3209
|
+
(this.localDisplayStatus & 4) >> 2 !== e && (this.parentRenderGroup && (this.parentRenderGroup.structureDidChange = !0), this._updateFlags |= _i, this.localDisplayStatus ^= 4, this._onUpdate());
|
|
3210
3210
|
}
|
|
3211
3211
|
/** Can this object be rendered, if false the object will not be drawn but the transform will still be updated. */
|
|
3212
3212
|
get renderable() {
|
|
@@ -3214,7 +3214,7 @@ class O extends Bt {
|
|
|
3214
3214
|
}
|
|
3215
3215
|
set renderable(t) {
|
|
3216
3216
|
const e = t ? 1 : 0;
|
|
3217
|
-
(this.localDisplayStatus & 1) !== e && (this._updateFlags |=
|
|
3217
|
+
(this.localDisplayStatus & 1) !== e && (this._updateFlags |= _i, this.localDisplayStatus ^= 1, this.parentRenderGroup && (this.parentRenderGroup.structureDidChange = !0), this._onUpdate());
|
|
3218
3218
|
}
|
|
3219
3219
|
/** Whether or not the object should be rendered. */
|
|
3220
3220
|
get isRenderable() {
|
|
@@ -3251,7 +3251,7 @@ O.mixin(Qn);
|
|
|
3251
3251
|
O.mixin(Kn);
|
|
3252
3252
|
O.mixin(Zn);
|
|
3253
3253
|
O.mixin(ea);
|
|
3254
|
-
O.mixin(
|
|
3254
|
+
O.mixin(Vn);
|
|
3255
3255
|
class xt extends O {
|
|
3256
3256
|
/**
|
|
3257
3257
|
* @param options - The options for creating the sprite.
|
|
@@ -3420,10 +3420,10 @@ function br(i, t, e) {
|
|
|
3420
3420
|
i.measurable = !0, pr(i, e, s), t.addBoundsMask(s), i.measurable = !1;
|
|
3421
3421
|
}
|
|
3422
3422
|
function wr(i, t, e) {
|
|
3423
|
-
const s =
|
|
3423
|
+
const s = ne.get();
|
|
3424
3424
|
i.measurable = !0;
|
|
3425
3425
|
const r = Et.get().identity(), n = vr(i, e, r);
|
|
3426
|
-
gr(i, s, n), i.measurable = !1, t.addBoundsMask(s), Et.return(r),
|
|
3426
|
+
gr(i, s, n), i.measurable = !1, t.addBoundsMask(s), Et.return(r), ne.return(s);
|
|
3427
3427
|
}
|
|
3428
3428
|
function vr(i, t, e) {
|
|
3429
3429
|
return i ? (i !== t && (vr(i.parent, t, e), i.updateLocalTransform(), e.append(i.localTransform)), e) : (it("Mask bounds, renderable is not inside the root container"), e);
|
|
@@ -3511,26 +3511,26 @@ const ha = {
|
|
|
3511
3511
|
fetch: (i, t) => fetch(i, t),
|
|
3512
3512
|
parseXML: (i) => new DOMParser().parseFromString(i, "text/xml")
|
|
3513
3513
|
};
|
|
3514
|
-
let
|
|
3515
|
-
const
|
|
3514
|
+
let Ps = ha;
|
|
3515
|
+
const Y = {
|
|
3516
3516
|
/**
|
|
3517
3517
|
* Returns the current adapter.
|
|
3518
3518
|
* @returns {environment.Adapter} The current adapter.
|
|
3519
3519
|
*/
|
|
3520
3520
|
get() {
|
|
3521
|
-
return
|
|
3521
|
+
return Ps;
|
|
3522
3522
|
},
|
|
3523
3523
|
/**
|
|
3524
3524
|
* Sets the current adapter.
|
|
3525
3525
|
* @param adapter - The new adapter.
|
|
3526
3526
|
*/
|
|
3527
3527
|
set(i) {
|
|
3528
|
-
|
|
3528
|
+
Ps = i;
|
|
3529
3529
|
}
|
|
3530
3530
|
};
|
|
3531
3531
|
class Mr extends Ot {
|
|
3532
3532
|
constructor(t) {
|
|
3533
|
-
t.resource || (t.resource =
|
|
3533
|
+
t.resource || (t.resource = Y.get().createCanvas()), t.width || (t.width = t.resource.width, t.autoDensity || (t.width /= t.resolution)), t.height || (t.height = t.resource.height, t.autoDensity || (t.height /= t.resolution)), super(t), this.uploadMethodId = "image", this.autoDensity = t.autoDensity;
|
|
3534
3534
|
const e = t.resource;
|
|
3535
3535
|
(this.pixelWidth !== e.width || this.pixelWidth !== e.height) && this.resizeCanvas(), this.transparent = !!t.transparent;
|
|
3536
3536
|
}
|
|
@@ -3546,10 +3546,10 @@ class Mr extends Ot {
|
|
|
3546
3546
|
}
|
|
3547
3547
|
}
|
|
3548
3548
|
Mr.extension = B.TextureSource;
|
|
3549
|
-
class
|
|
3549
|
+
class Be extends Ot {
|
|
3550
3550
|
constructor(t) {
|
|
3551
3551
|
if (t.resource && globalThis.HTMLImageElement && t.resource instanceof HTMLImageElement) {
|
|
3552
|
-
const e =
|
|
3552
|
+
const e = Y.get().createCanvas(t.resource.width, t.resource.height);
|
|
3553
3553
|
e.getContext("2d").drawImage(t.resource, 0, 0), t.resource = e, it("ImageSource: Image element passed, converting to canvas. Use CanvasSource instead.");
|
|
3554
3554
|
}
|
|
3555
3555
|
super(t), this.uploadMethodId = "image", this.autoGarbageCollect = !0;
|
|
@@ -3558,9 +3558,9 @@ class Fe extends Ot {
|
|
|
3558
3558
|
return globalThis.HTMLImageElement && t instanceof HTMLImageElement || typeof ImageBitmap < "u" && t instanceof ImageBitmap;
|
|
3559
3559
|
}
|
|
3560
3560
|
}
|
|
3561
|
-
|
|
3562
|
-
var
|
|
3563
|
-
class
|
|
3561
|
+
Be.extension = B.TextureSource;
|
|
3562
|
+
var Te = /* @__PURE__ */ ((i) => (i[i.INTERACTION = 50] = "INTERACTION", i[i.HIGH = 25] = "HIGH", i[i.NORMAL = 0] = "NORMAL", i[i.LOW = -25] = "LOW", i[i.UTILITY = -50] = "UTILITY", i))(Te || {});
|
|
3563
|
+
class xi {
|
|
3564
3564
|
/**
|
|
3565
3565
|
* Constructor
|
|
3566
3566
|
* @private
|
|
@@ -3612,7 +3612,7 @@ class bi {
|
|
|
3612
3612
|
}
|
|
3613
3613
|
const Tr = class ht {
|
|
3614
3614
|
constructor() {
|
|
3615
|
-
this.autoStart = !1, this.deltaTime = 1, this.lastTime = -1, this.speed = 1, this.started = !1, this._requestId = null, this._maxElapsedMS = 100, this._minElapsedMS = 0, this._protected = !1, this._lastFrame = -1, this._head = new
|
|
3615
|
+
this.autoStart = !1, this.deltaTime = 1, this.lastTime = -1, this.speed = 1, this.started = !1, this._requestId = null, this._maxElapsedMS = 100, this._minElapsedMS = 0, this._protected = !1, this._lastFrame = -1, this._head = new xi(null, null, 1 / 0), this.deltaMS = 1 / ht.targetFPMS, this.elapsedMS = 1 / ht.targetFPMS, this._tick = (t) => {
|
|
3616
3616
|
this._requestId = null, this.started && (this.update(t), this.started && this._requestId === null && this._head.next && (this._requestId = requestAnimationFrame(this._tick)));
|
|
3617
3617
|
};
|
|
3618
3618
|
}
|
|
@@ -3652,8 +3652,8 @@ const Tr = class ht {
|
|
|
3652
3652
|
* @param {number} [priority=UPDATE_PRIORITY.NORMAL] - The priority for emitting
|
|
3653
3653
|
* @returns This instance of a ticker
|
|
3654
3654
|
*/
|
|
3655
|
-
add(t, e, s =
|
|
3656
|
-
return this._addListener(new
|
|
3655
|
+
add(t, e, s = Te.NORMAL) {
|
|
3656
|
+
return this._addListener(new xi(t, e, s));
|
|
3657
3657
|
}
|
|
3658
3658
|
/**
|
|
3659
3659
|
* Add a handler for the tick event which is only execute once.
|
|
@@ -3662,8 +3662,8 @@ const Tr = class ht {
|
|
|
3662
3662
|
* @param {number} [priority=UPDATE_PRIORITY.NORMAL] - The priority for emitting
|
|
3663
3663
|
* @returns This instance of a ticker
|
|
3664
3664
|
*/
|
|
3665
|
-
addOnce(t, e, s =
|
|
3666
|
-
return this._addListener(new
|
|
3665
|
+
addOnce(t, e, s = Te.NORMAL) {
|
|
3666
|
+
return this._addListener(new xi(t, e, s, !0));
|
|
3667
3667
|
}
|
|
3668
3668
|
/**
|
|
3669
3669
|
* Internally adds the event handler so that it can be sorted by priority.
|
|
@@ -3883,9 +3883,9 @@ const Tr = class ht {
|
|
|
3883
3883
|
}
|
|
3884
3884
|
};
|
|
3885
3885
|
Tr.targetFPMS = 0.06;
|
|
3886
|
-
let ot = Tr,
|
|
3886
|
+
let ot = Tr, bi;
|
|
3887
3887
|
async function Pr() {
|
|
3888
|
-
return
|
|
3888
|
+
return bi ?? (bi = (async () => {
|
|
3889
3889
|
var a;
|
|
3890
3890
|
const t = document.createElement("canvas").getContext("webgl");
|
|
3891
3891
|
if (!t)
|
|
@@ -3908,9 +3908,9 @@ async function Pr() {
|
|
|
3908
3908
|
), t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL, !1), t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL, t.NONE), t.texImage2D(t.TEXTURE_2D, 0, t.RGBA, t.RGBA, t.UNSIGNED_BYTE, e);
|
|
3909
3909
|
const n = new Uint8Array(4);
|
|
3910
3910
|
return t.readPixels(0, 0, 1, 1, t.RGBA, t.UNSIGNED_BYTE, n), t.deleteFramebuffer(r), t.deleteTexture(s), (a = t.getExtension("WEBGL_lose_context")) == null || a.loseContext(), n[0] <= n[3] ? "premultiplied-alpha" : "premultiply-alpha-on-upload";
|
|
3911
|
-
})()),
|
|
3911
|
+
})()), bi;
|
|
3912
3912
|
}
|
|
3913
|
-
const
|
|
3913
|
+
const ei = class kr extends Ot {
|
|
3914
3914
|
constructor(t) {
|
|
3915
3915
|
super(t), this.isReady = !1, this.uploadMethodId = "video", t = {
|
|
3916
3916
|
...kr.defaultOptions,
|
|
@@ -4044,8 +4044,8 @@ const ii = class kr extends Ot {
|
|
|
4044
4044
|
return globalThis.HTMLVideoElement && t instanceof HTMLVideoElement || globalThis.VideoFrame && t instanceof VideoFrame;
|
|
4045
4045
|
}
|
|
4046
4046
|
};
|
|
4047
|
-
|
|
4048
|
-
|
|
4047
|
+
ei.extension = B.TextureSource;
|
|
4048
|
+
ei.defaultOptions = {
|
|
4049
4049
|
...Ot.defaultOptions,
|
|
4050
4050
|
/** If true, the video will start loading immediately. */
|
|
4051
4051
|
autoLoad: !0,
|
|
@@ -4064,12 +4064,12 @@ ii.defaultOptions = {
|
|
|
4064
4064
|
/** If true, the video will be preloaded. */
|
|
4065
4065
|
preload: !1
|
|
4066
4066
|
};
|
|
4067
|
-
|
|
4067
|
+
ei.MIME_TYPES = {
|
|
4068
4068
|
ogv: "video/ogg",
|
|
4069
4069
|
mov: "video/quicktime",
|
|
4070
4070
|
m4v: "video/mp4"
|
|
4071
4071
|
};
|
|
4072
|
-
let
|
|
4072
|
+
let $e = ei;
|
|
4073
4073
|
const gt = (i, t, e = !1) => (Array.isArray(i) || (i = [i]), t ? i.map((s) => typeof s == "string" || e ? t(s) : s) : i);
|
|
4074
4074
|
class la {
|
|
4075
4075
|
constructor() {
|
|
@@ -4147,12 +4147,12 @@ class la {
|
|
|
4147
4147
|
return this._parsers;
|
|
4148
4148
|
}
|
|
4149
4149
|
}
|
|
4150
|
-
const rt = new la(),
|
|
4151
|
-
dt.handleByList(B.TextureSource,
|
|
4150
|
+
const rt = new la(), Bi = [];
|
|
4151
|
+
dt.handleByList(B.TextureSource, Bi);
|
|
4152
4152
|
function ca(i = {}) {
|
|
4153
4153
|
const t = i && i.resource, e = t ? i.resource : i, s = t ? i : { resource: i };
|
|
4154
|
-
for (let r = 0; r <
|
|
4155
|
-
const n =
|
|
4154
|
+
for (let r = 0; r < Bi.length; r++) {
|
|
4155
|
+
const n = Bi[r];
|
|
4156
4156
|
if (n.test(e))
|
|
4157
4157
|
return new n(s);
|
|
4158
4158
|
}
|
|
@@ -4171,13 +4171,13 @@ function da(i, t = !1) {
|
|
|
4171
4171
|
return typeof i == "string" ? rt.get(i) : i instanceof Ot ? new L({ source: i }) : ua(i, t);
|
|
4172
4172
|
}
|
|
4173
4173
|
L.from = da;
|
|
4174
|
-
dt.add(Ar, Sr, Cr,
|
|
4174
|
+
dt.add(Ar, Sr, Cr, $e, Be, Mr, $i);
|
|
4175
4175
|
var Zt = /* @__PURE__ */ ((i) => (i[i.Low = 0] = "Low", i[i.Normal = 1] = "Normal", i[i.High = 2] = "High", i))(Zt || {});
|
|
4176
4176
|
function pt(i) {
|
|
4177
4177
|
if (typeof i != "string")
|
|
4178
4178
|
throw new TypeError(`Path must be a string. Received ${JSON.stringify(i)}`);
|
|
4179
4179
|
}
|
|
4180
|
-
function
|
|
4180
|
+
function pe(i) {
|
|
4181
4181
|
return i.split("?")[0].split("#")[0];
|
|
4182
4182
|
}
|
|
4183
4183
|
function fa(i) {
|
|
@@ -4280,7 +4280,7 @@ const bt = {
|
|
|
4280
4280
|
toAbsolute(i, t, e) {
|
|
4281
4281
|
if (pt(i), this.isDataUrl(i) || this.isBlobUrl(i))
|
|
4282
4282
|
return i;
|
|
4283
|
-
const s =
|
|
4283
|
+
const s = pe(this.toPosix(t ?? Y.get().getBaseUrl())), r = pe(this.toPosix(e ?? this.rootname(s)));
|
|
4284
4284
|
return i = this.toPosix(i), i.startsWith("/") ? bt.join(r, i.slice(1)) : this.isAbsolute(i) ? i : this.join(s, i);
|
|
4285
4285
|
},
|
|
4286
4286
|
/**
|
|
@@ -4370,7 +4370,7 @@ const bt = {
|
|
|
4370
4370
|
* @param ext - Optional extension to remove
|
|
4371
4371
|
*/
|
|
4372
4372
|
basename(i, t) {
|
|
4373
|
-
pt(i), t && pt(t), i =
|
|
4373
|
+
pt(i), t && pt(t), i = pe(this.toPosix(i));
|
|
4374
4374
|
let e = 0, s = -1, r = !0, n;
|
|
4375
4375
|
if (t !== void 0 && t.length > 0 && t.length <= i.length) {
|
|
4376
4376
|
if (t.length === i.length && t === i)
|
|
@@ -4405,7 +4405,7 @@ const bt = {
|
|
|
4405
4405
|
* @param path - The path to parse
|
|
4406
4406
|
*/
|
|
4407
4407
|
extname(i) {
|
|
4408
|
-
pt(i), i =
|
|
4408
|
+
pt(i), i = pe(this.toPosix(i));
|
|
4409
4409
|
let t = -1, e = 0, s = -1, r = !0, n = 0;
|
|
4410
4410
|
for (let a = i.length - 1; a >= 0; --a) {
|
|
4411
4411
|
const o = i.charCodeAt(a);
|
|
@@ -4429,7 +4429,7 @@ const bt = {
|
|
|
4429
4429
|
const t = { root: "", dir: "", base: "", ext: "", name: "" };
|
|
4430
4430
|
if (i.length === 0)
|
|
4431
4431
|
return t;
|
|
4432
|
-
i =
|
|
4432
|
+
i = pe(this.toPosix(i));
|
|
4433
4433
|
let e = i.charCodeAt(0);
|
|
4434
4434
|
const s = this.isAbsolute(i);
|
|
4435
4435
|
let r;
|
|
@@ -4470,8 +4470,8 @@ function ga(i) {
|
|
|
4470
4470
|
s.push(i);
|
|
4471
4471
|
return s;
|
|
4472
4472
|
}
|
|
4473
|
-
const
|
|
4474
|
-
class
|
|
4473
|
+
const Ke = (i) => !Array.isArray(i);
|
|
4474
|
+
class oe {
|
|
4475
4475
|
constructor() {
|
|
4476
4476
|
this._defaultBundleIdentifierOptions = {
|
|
4477
4477
|
connector: "-",
|
|
@@ -4771,7 +4771,7 @@ class he {
|
|
|
4771
4771
|
* @returns All the bundles assets or a hash of assets for each bundle specified
|
|
4772
4772
|
*/
|
|
4773
4773
|
resolveBundle(t) {
|
|
4774
|
-
const e =
|
|
4774
|
+
const e = Ke(t);
|
|
4775
4775
|
t = gt(t);
|
|
4776
4776
|
const s = {};
|
|
4777
4777
|
return t.forEach((r) => {
|
|
@@ -4802,7 +4802,7 @@ class he {
|
|
|
4802
4802
|
return e.src;
|
|
4803
4803
|
}
|
|
4804
4804
|
resolve(t) {
|
|
4805
|
-
const e =
|
|
4805
|
+
const e = Ke(t);
|
|
4806
4806
|
t = gt(t);
|
|
4807
4807
|
const s = {};
|
|
4808
4808
|
return t.forEach((r) => {
|
|
@@ -4866,14 +4866,14 @@ class he {
|
|
|
4866
4866
|
return (this._basePath || this._rootPath) && (t.src = bt.toAbsolute(t.src, this._basePath, this._rootPath)), t.alias = s ?? t.alias ?? [t.src], t.src = this._appendDefaultSearchParams(t.src), t.data = { ...r || {}, ...t.data }, t.loadParser = n ?? t.loadParser, t.format = a ?? t.format ?? ya(t.src), t;
|
|
4867
4867
|
}
|
|
4868
4868
|
}
|
|
4869
|
-
|
|
4869
|
+
oe.RETINA_PREFIX = /@([0-9\.]+)x/;
|
|
4870
4870
|
function ya(i) {
|
|
4871
4871
|
return i.split(".").pop().split("?").shift().split("#").shift();
|
|
4872
4872
|
}
|
|
4873
|
-
const
|
|
4873
|
+
const ks = (i, t) => {
|
|
4874
4874
|
const e = t.split("?")[1];
|
|
4875
4875
|
return e && (i += `?${e}`), i;
|
|
4876
|
-
}, Er = class
|
|
4876
|
+
}, Er = class xe {
|
|
4877
4877
|
/**
|
|
4878
4878
|
* @param texture - Reference to the source BaseTexture object.
|
|
4879
4879
|
* @param {object} data - Spritesheet image data.
|
|
@@ -4889,7 +4889,7 @@ const Is = (i, t) => {
|
|
|
4889
4889
|
*/
|
|
4890
4890
|
parse() {
|
|
4891
4891
|
return new Promise((t) => {
|
|
4892
|
-
this._callback = t, this._batchIndex = 0, this._frameKeys.length <=
|
|
4892
|
+
this._callback = t, this._batchIndex = 0, this._frameKeys.length <= xe.BATCH_SIZE ? (this._processFrames(0), this._processAnimations(), this._parseComplete()) : this._nextBatch();
|
|
4893
4893
|
});
|
|
4894
4894
|
}
|
|
4895
4895
|
/**
|
|
@@ -4898,7 +4898,7 @@ const Is = (i, t) => {
|
|
|
4898
4898
|
*/
|
|
4899
4899
|
_processFrames(t) {
|
|
4900
4900
|
let e = t;
|
|
4901
|
-
const s =
|
|
4901
|
+
const s = xe.BATCH_SIZE;
|
|
4902
4902
|
for (; e - t < s && e < this._frameKeys.length; ) {
|
|
4903
4903
|
const r = this._frameKeys[e], n = this._frames[r], a = n.frame;
|
|
4904
4904
|
if (a) {
|
|
@@ -4956,8 +4956,8 @@ const Is = (i, t) => {
|
|
|
4956
4956
|
}
|
|
4957
4957
|
/** Begin the next batch of textures. */
|
|
4958
4958
|
_nextBatch() {
|
|
4959
|
-
this._processFrames(this._batchIndex *
|
|
4960
|
-
this._batchIndex *
|
|
4959
|
+
this._processFrames(this._batchIndex * xe.BATCH_SIZE), this._batchIndex++, setTimeout(() => {
|
|
4960
|
+
this._batchIndex * xe.BATCH_SIZE < this._frameKeys.length ? this._nextBatch() : (this._processAnimations(), this._parseComplete());
|
|
4961
4961
|
}, 0);
|
|
4962
4962
|
}
|
|
4963
4963
|
/**
|
|
@@ -4972,7 +4972,7 @@ const Is = (i, t) => {
|
|
|
4972
4972
|
}
|
|
4973
4973
|
};
|
|
4974
4974
|
Er.BATCH_SIZE = 1e3;
|
|
4975
|
-
let
|
|
4975
|
+
let Fi = Er;
|
|
4976
4976
|
const _a = [
|
|
4977
4977
|
"jpg",
|
|
4978
4978
|
"png",
|
|
@@ -5010,7 +5010,7 @@ const xa = {
|
|
|
5010
5010
|
extension: B.Asset,
|
|
5011
5011
|
/** Handle the caching of the related Spritesheet Textures */
|
|
5012
5012
|
cache: {
|
|
5013
|
-
test: (i) => i instanceof
|
|
5013
|
+
test: (i) => i instanceof Fi,
|
|
5014
5014
|
getCacheableAssets: (i, t) => Rr(i, t, !1)
|
|
5015
5015
|
},
|
|
5016
5016
|
/** Resolve the resolution of the asset. */
|
|
@@ -5023,7 +5023,7 @@ const xa = {
|
|
|
5023
5023
|
var e;
|
|
5024
5024
|
const t = i.split(".");
|
|
5025
5025
|
return {
|
|
5026
|
-
resolution: parseFloat(((e =
|
|
5026
|
+
resolution: parseFloat(((e = oe.RETINA_PREFIX.exec(i)) == null ? void 0 : e[1]) ?? "1"),
|
|
5027
5027
|
format: t[t.length - 2],
|
|
5028
5028
|
src: i
|
|
5029
5029
|
};
|
|
@@ -5058,10 +5058,10 @@ const xa = {
|
|
|
5058
5058
|
if (s instanceof L)
|
|
5059
5059
|
a = s;
|
|
5060
5060
|
else {
|
|
5061
|
-
const u =
|
|
5061
|
+
const u = ks(n + (r ?? i.meta.image), t.src);
|
|
5062
5062
|
a = (await e.load([u]))[u];
|
|
5063
5063
|
}
|
|
5064
|
-
const o = new
|
|
5064
|
+
const o = new Fi(
|
|
5065
5065
|
a.source,
|
|
5066
5066
|
i
|
|
5067
5067
|
);
|
|
@@ -5073,7 +5073,7 @@ const xa = {
|
|
|
5073
5073
|
if (typeof p != "string")
|
|
5074
5074
|
continue;
|
|
5075
5075
|
let f = n + p;
|
|
5076
|
-
(l = t.data) != null && l.ignoreMultiPack || (f =
|
|
5076
|
+
(l = t.data) != null && l.ignoreMultiPack || (f = ks(f, t.src), u.push(e.load({
|
|
5077
5077
|
src: f,
|
|
5078
5078
|
data: {
|
|
5079
5079
|
ignoreMultiPack: !0
|
|
@@ -5095,7 +5095,7 @@ const xa = {
|
|
|
5095
5095
|
dt.add(xa);
|
|
5096
5096
|
let Jt;
|
|
5097
5097
|
function ba() {
|
|
5098
|
-
return (!Jt || Jt != null && Jt.isContextLost()) && (Jt =
|
|
5098
|
+
return (!Jt || Jt != null && Jt.isContextLost()) && (Jt = Y.get().createCanvas().getContext("webgl", {})), Jt;
|
|
5099
5099
|
}
|
|
5100
5100
|
class wa {
|
|
5101
5101
|
/**
|
|
@@ -5178,33 +5178,33 @@ class wa {
|
|
|
5178
5178
|
this._updateKey();
|
|
5179
5179
|
}
|
|
5180
5180
|
}
|
|
5181
|
-
const
|
|
5182
|
-
dt.handleByNamedList(B.Environment,
|
|
5181
|
+
const Li = [];
|
|
5182
|
+
dt.handleByNamedList(B.Environment, Li);
|
|
5183
5183
|
async function va(i) {
|
|
5184
5184
|
if (i)
|
|
5185
|
-
for (let t = 0; t <
|
|
5186
|
-
const e =
|
|
5185
|
+
for (let t = 0; t < Li.length; t++) {
|
|
5186
|
+
const e = Li[t];
|
|
5187
5187
|
if (e.value.test()) {
|
|
5188
5188
|
await e.value.load();
|
|
5189
5189
|
return;
|
|
5190
5190
|
}
|
|
5191
5191
|
}
|
|
5192
5192
|
}
|
|
5193
|
-
let
|
|
5193
|
+
let me;
|
|
5194
5194
|
function Aa() {
|
|
5195
|
-
if (typeof
|
|
5196
|
-
return
|
|
5195
|
+
if (typeof me == "boolean")
|
|
5196
|
+
return me;
|
|
5197
5197
|
try {
|
|
5198
|
-
|
|
5198
|
+
me = new Function("param1", "param2", "param3", "return param1[param2] === param3;")({ a: "b" }, "a", "b") === !0;
|
|
5199
5199
|
} catch {
|
|
5200
|
-
|
|
5200
|
+
me = !1;
|
|
5201
5201
|
}
|
|
5202
|
-
return
|
|
5202
|
+
return me;
|
|
5203
5203
|
}
|
|
5204
|
-
var
|
|
5205
|
-
|
|
5206
|
-
|
|
5207
|
-
function
|
|
5204
|
+
var Ki = { exports: {} };
|
|
5205
|
+
Ki.exports = ii;
|
|
5206
|
+
Ki.exports.default = ii;
|
|
5207
|
+
function ii(i, t, e) {
|
|
5208
5208
|
e = e || 2;
|
|
5209
5209
|
var s = t && t.length, r = s ? t[0] * e : i.length, n = Br(i, 0, r, e, !0), a = [];
|
|
5210
5210
|
if (!n || n.next === n.prev)
|
|
@@ -5216,17 +5216,17 @@ function si(i, t, e) {
|
|
|
5216
5216
|
u = i[f], d = i[f + 1], u < o && (o = u), d < h && (h = d), u > c && (c = u), d > l && (l = d);
|
|
5217
5217
|
p = Math.max(c - o, l - h), p = p !== 0 ? 32767 / p : 0;
|
|
5218
5218
|
}
|
|
5219
|
-
return
|
|
5219
|
+
return Pe(n, a, e, o, h, p, 0), a;
|
|
5220
5220
|
}
|
|
5221
5221
|
function Br(i, t, e, s, r) {
|
|
5222
5222
|
var n, a;
|
|
5223
|
-
if (r ===
|
|
5223
|
+
if (r === Oi(i, t, e, s) > 0)
|
|
5224
5224
|
for (n = t; n < e; n += s)
|
|
5225
|
-
a =
|
|
5225
|
+
a = Is(n, i[n], i[n + 1], a);
|
|
5226
5226
|
else
|
|
5227
5227
|
for (n = e - s; n >= t; n -= s)
|
|
5228
|
-
a =
|
|
5229
|
-
return a &&
|
|
5228
|
+
a = Is(n, i[n], i[n + 1], a);
|
|
5229
|
+
return a && si(a, a.next) && (Ie(a), a = a.next), a;
|
|
5230
5230
|
}
|
|
5231
5231
|
function Kt(i, t) {
|
|
5232
5232
|
if (!i)
|
|
@@ -5234,8 +5234,8 @@ function Kt(i, t) {
|
|
|
5234
5234
|
t || (t = i);
|
|
5235
5235
|
var e = i, s;
|
|
5236
5236
|
do
|
|
5237
|
-
if (s = !1, !e.steiner && (
|
|
5238
|
-
if (
|
|
5237
|
+
if (s = !1, !e.steiner && (si(e, e.next) || W(e.prev, e, e.next) === 0)) {
|
|
5238
|
+
if (Ie(e), e = t = e.prev, e === e.next)
|
|
5239
5239
|
break;
|
|
5240
5240
|
s = !0;
|
|
5241
5241
|
} else
|
|
@@ -5243,16 +5243,16 @@ function Kt(i, t) {
|
|
|
5243
5243
|
while (s || e !== t);
|
|
5244
5244
|
return t;
|
|
5245
5245
|
}
|
|
5246
|
-
function
|
|
5246
|
+
function Pe(i, t, e, s, r, n, a) {
|
|
5247
5247
|
if (i) {
|
|
5248
5248
|
!a && n && Ba(i, s, r, n);
|
|
5249
5249
|
for (var o = i, h, c; i.prev !== i.next; ) {
|
|
5250
5250
|
if (h = i.prev, c = i.next, n ? Ca(i, s, r, n) : Sa(i)) {
|
|
5251
|
-
t.push(h.i / e | 0), t.push(i.i / e | 0), t.push(c.i / e | 0),
|
|
5251
|
+
t.push(h.i / e | 0), t.push(i.i / e | 0), t.push(c.i / e | 0), Ie(i), i = c.next, o = c.next;
|
|
5252
5252
|
continue;
|
|
5253
5253
|
}
|
|
5254
5254
|
if (i = c, i === o) {
|
|
5255
|
-
a ? a === 1 ? (i = Ma(Kt(i), t, e),
|
|
5255
|
+
a ? a === 1 ? (i = Ma(Kt(i), t, e), Pe(i, t, e, s, r, n, 2)) : a === 2 && Ta(i, t, e, s, r, n) : Pe(Kt(i), t, e, s, r, n, 1);
|
|
5256
5256
|
break;
|
|
5257
5257
|
}
|
|
5258
5258
|
}
|
|
@@ -5263,7 +5263,7 @@ function Sa(i) {
|
|
|
5263
5263
|
if (W(t, e, s) >= 0)
|
|
5264
5264
|
return !1;
|
|
5265
5265
|
for (var r = t.x, n = e.x, a = s.x, o = t.y, h = e.y, c = s.y, l = r < n ? r < a ? r : a : n < a ? n : a, u = o < h ? o < c ? o : c : h < c ? h : c, d = r > n ? r > a ? r : a : n > a ? n : a, p = o > h ? o > c ? o : c : h > c ? h : c, f = s.next; f !== t; ) {
|
|
5266
|
-
if (f.x >= l && f.x <= d && f.y >= u && f.y <= p &&
|
|
5266
|
+
if (f.x >= l && f.x <= d && f.y >= u && f.y <= p && te(r, o, n, h, a, c, f.x, f.y) && W(f.prev, f, f.next) >= 0)
|
|
5267
5267
|
return !1;
|
|
5268
5268
|
f = f.next;
|
|
5269
5269
|
}
|
|
@@ -5273,18 +5273,18 @@ function Ca(i, t, e, s) {
|
|
|
5273
5273
|
var r = i.prev, n = i, a = i.next;
|
|
5274
5274
|
if (W(r, n, a) >= 0)
|
|
5275
5275
|
return !1;
|
|
5276
|
-
for (var o = r.x, h = n.x, c = a.x, l = r.y, u = n.y, d = a.y, p = o < h ? o < c ? o : c : h < c ? h : c, f = l < u ? l < d ? l : d : u < d ? u : d, g = o > h ? o > c ? o : c : h > c ? h : c, m = l > u ? l > d ? l : d : u > d ? u : d, y =
|
|
5277
|
-
if (x.x >= p && x.x <= g && x.y >= f && x.y <= m && x !== r && x !== a &&
|
|
5276
|
+
for (var o = r.x, h = n.x, c = a.x, l = r.y, u = n.y, d = a.y, p = o < h ? o < c ? o : c : h < c ? h : c, f = l < u ? l < d ? l : d : u < d ? u : d, g = o > h ? o > c ? o : c : h > c ? h : c, m = l > u ? l > d ? l : d : u > d ? u : d, y = Di(p, f, t, e, s), _ = Di(g, m, t, e, s), x = i.prevZ, b = i.nextZ; x && x.z >= y && b && b.z <= _; ) {
|
|
5277
|
+
if (x.x >= p && x.x <= g && x.y >= f && x.y <= m && x !== r && x !== a && te(o, l, h, u, c, d, x.x, x.y) && W(x.prev, x, x.next) >= 0 || (x = x.prevZ, b.x >= p && b.x <= g && b.y >= f && b.y <= m && b !== r && b !== a && te(o, l, h, u, c, d, b.x, b.y) && W(b.prev, b, b.next) >= 0))
|
|
5278
5278
|
return !1;
|
|
5279
5279
|
b = b.nextZ;
|
|
5280
5280
|
}
|
|
5281
5281
|
for (; x && x.z >= y; ) {
|
|
5282
|
-
if (x.x >= p && x.x <= g && x.y >= f && x.y <= m && x !== r && x !== a &&
|
|
5282
|
+
if (x.x >= p && x.x <= g && x.y >= f && x.y <= m && x !== r && x !== a && te(o, l, h, u, c, d, x.x, x.y) && W(x.prev, x, x.next) >= 0)
|
|
5283
5283
|
return !1;
|
|
5284
5284
|
x = x.prevZ;
|
|
5285
5285
|
}
|
|
5286
5286
|
for (; b && b.z <= _; ) {
|
|
5287
|
-
if (b.x >= p && b.x <= g && b.y >= f && b.y <= m && b !== r && b !== a &&
|
|
5287
|
+
if (b.x >= p && b.x <= g && b.y >= f && b.y <= m && b !== r && b !== a && te(o, l, h, u, c, d, b.x, b.y) && W(b.prev, b, b.next) >= 0)
|
|
5288
5288
|
return !1;
|
|
5289
5289
|
b = b.nextZ;
|
|
5290
5290
|
}
|
|
@@ -5294,7 +5294,7 @@ function Ma(i, t, e) {
|
|
|
5294
5294
|
var s = i;
|
|
5295
5295
|
do {
|
|
5296
5296
|
var r = s.prev, n = s.next.next;
|
|
5297
|
-
!
|
|
5297
|
+
!si(r, n) && Fr(r, s, s.next, n) && ke(r, n) && ke(n, r) && (t.push(r.i / e | 0), t.push(s.i / e | 0), t.push(n.i / e | 0), Ie(s), Ie(s.next), s = i = n), s = s.next;
|
|
5298
5298
|
} while (s !== i);
|
|
5299
5299
|
return Kt(s);
|
|
5300
5300
|
}
|
|
@@ -5304,7 +5304,7 @@ function Ta(i, t, e, s, r, n) {
|
|
|
5304
5304
|
for (var o = a.next.next; o !== a.prev; ) {
|
|
5305
5305
|
if (a.i !== o.i && Da(a, o)) {
|
|
5306
5306
|
var h = Lr(a, o);
|
|
5307
|
-
a = Kt(a, a.next), h = Kt(h, h.next),
|
|
5307
|
+
a = Kt(a, a.next), h = Kt(h, h.next), Pe(a, t, e, s, r, n, 0), Pe(h, t, e, s, r, n, 0);
|
|
5308
5308
|
return;
|
|
5309
5309
|
}
|
|
5310
5310
|
o = o.next;
|
|
@@ -5345,7 +5345,7 @@ function Ea(i, t) {
|
|
|
5345
5345
|
var h = a, c = a.x, l = a.y, u = 1 / 0, d;
|
|
5346
5346
|
e = a;
|
|
5347
5347
|
do
|
|
5348
|
-
s >= e.x && e.x >= c && s !== e.x &&
|
|
5348
|
+
s >= e.x && e.x >= c && s !== e.x && te(r < l ? s : n, r, c, l, r < l ? n : s, r, e.x, e.y) && (d = Math.abs(r - e.y) / (s - e.x), ke(e, i) && (d < u || d === u && (e.x > a.x || e.x === a.x && Ra(a, e))) && (a = e, u = d)), e = e.next;
|
|
5349
5349
|
while (e !== h);
|
|
5350
5350
|
return a;
|
|
5351
5351
|
}
|
|
@@ -5355,7 +5355,7 @@ function Ra(i, t) {
|
|
|
5355
5355
|
function Ba(i, t, e, s) {
|
|
5356
5356
|
var r = i;
|
|
5357
5357
|
do
|
|
5358
|
-
r.z === 0 && (r.z =
|
|
5358
|
+
r.z === 0 && (r.z = Di(r.x, r.y, t, e, s)), r.prevZ = r.prev, r.nextZ = r.next, r = r.next;
|
|
5359
5359
|
while (r !== i);
|
|
5360
5360
|
r.prevZ.nextZ = null, r.prevZ = null, Fa(r);
|
|
5361
5361
|
}
|
|
@@ -5373,7 +5373,7 @@ function Fa(i) {
|
|
|
5373
5373
|
} while (a > 1);
|
|
5374
5374
|
return i;
|
|
5375
5375
|
}
|
|
5376
|
-
function
|
|
5376
|
+
function Di(i, t, e, s, r) {
|
|
5377
5377
|
return i = (i - e) * r | 0, t = (t - s) * r | 0, i = (i | i << 8) & 16711935, i = (i | i << 4) & 252645135, i = (i | i << 2) & 858993459, i = (i | i << 1) & 1431655765, t = (t | t << 8) & 16711935, t = (t | t << 4) & 252645135, t = (t | t << 2) & 858993459, t = (t | t << 1) & 1431655765, i | t << 1;
|
|
5378
5378
|
}
|
|
5379
5379
|
function La(i) {
|
|
@@ -5383,29 +5383,29 @@ function La(i) {
|
|
|
5383
5383
|
while (t !== i);
|
|
5384
5384
|
return e;
|
|
5385
5385
|
}
|
|
5386
|
-
function
|
|
5386
|
+
function te(i, t, e, s, r, n, a, o) {
|
|
5387
5387
|
return (r - a) * (t - o) >= (i - a) * (n - o) && (i - a) * (s - o) >= (e - a) * (t - o) && (e - a) * (n - o) >= (r - a) * (s - o);
|
|
5388
5388
|
}
|
|
5389
5389
|
function Da(i, t) {
|
|
5390
5390
|
return i.next.i !== t.i && i.prev.i !== t.i && !Ua(i, t) && // dones't intersect other edges
|
|
5391
|
-
(
|
|
5391
|
+
(ke(i, t) && ke(t, i) && Oa(i, t) && // locally visible
|
|
5392
5392
|
(W(i.prev, i, t.prev) || W(i, t.prev, t)) || // does not create opposite-facing sectors
|
|
5393
|
-
|
|
5393
|
+
si(i, t) && W(i.prev, i, i.next) > 0 && W(t.prev, t, t.next) > 0);
|
|
5394
5394
|
}
|
|
5395
5395
|
function W(i, t, e) {
|
|
5396
5396
|
return (t.y - i.y) * (e.x - t.x) - (t.x - i.x) * (e.y - t.y);
|
|
5397
5397
|
}
|
|
5398
|
-
function
|
|
5398
|
+
function si(i, t) {
|
|
5399
5399
|
return i.x === t.x && i.y === t.y;
|
|
5400
5400
|
}
|
|
5401
5401
|
function Fr(i, t, e, s) {
|
|
5402
|
-
var r =
|
|
5403
|
-
return !!(r !== n && a !== o || r === 0 &&
|
|
5402
|
+
var r = We(W(i, t, e)), n = We(W(i, t, s)), a = We(W(e, s, i)), o = We(W(e, s, t));
|
|
5403
|
+
return !!(r !== n && a !== o || r === 0 && He(i, e, t) || n === 0 && He(i, s, t) || a === 0 && He(e, i, s) || o === 0 && He(e, t, s));
|
|
5404
5404
|
}
|
|
5405
|
-
function
|
|
5405
|
+
function He(i, t, e) {
|
|
5406
5406
|
return t.x <= Math.max(i.x, e.x) && t.x >= Math.min(i.x, e.x) && t.y <= Math.max(i.y, e.y) && t.y >= Math.min(i.y, e.y);
|
|
5407
5407
|
}
|
|
5408
|
-
function
|
|
5408
|
+
function We(i) {
|
|
5409
5409
|
return i > 0 ? 1 : i < 0 ? -1 : 0;
|
|
5410
5410
|
}
|
|
5411
5411
|
function Ua(i, t) {
|
|
@@ -5417,7 +5417,7 @@ function Ua(i, t) {
|
|
|
5417
5417
|
} while (e !== i);
|
|
5418
5418
|
return !1;
|
|
5419
5419
|
}
|
|
5420
|
-
function
|
|
5420
|
+
function ke(i, t) {
|
|
5421
5421
|
return W(i.prev, i, i.next) < 0 ? W(i, t, i.next) >= 0 && W(i, i.prev, t) >= 0 : W(i, t, i.prev) < 0 || W(i, i.next, t) < 0;
|
|
5422
5422
|
}
|
|
5423
5423
|
function Oa(i, t) {
|
|
@@ -5428,25 +5428,25 @@ function Oa(i, t) {
|
|
|
5428
5428
|
return s;
|
|
5429
5429
|
}
|
|
5430
5430
|
function Lr(i, t) {
|
|
5431
|
-
var e = new
|
|
5431
|
+
var e = new Ui(i.i, i.x, i.y), s = new Ui(t.i, t.x, t.y), r = i.next, n = t.prev;
|
|
5432
5432
|
return i.next = t, t.prev = i, e.next = r, r.prev = e, s.next = e, e.prev = s, n.next = s, s.prev = n, s;
|
|
5433
5433
|
}
|
|
5434
|
-
function
|
|
5435
|
-
var r = new
|
|
5434
|
+
function Is(i, t, e, s) {
|
|
5435
|
+
var r = new Ui(i, t, e);
|
|
5436
5436
|
return s ? (r.next = s.next, r.prev = s, s.next.prev = r, s.next = r) : (r.prev = r, r.next = r), r;
|
|
5437
5437
|
}
|
|
5438
|
-
function
|
|
5438
|
+
function Ie(i) {
|
|
5439
5439
|
i.next.prev = i.prev, i.prev.next = i.next, i.prevZ && (i.prevZ.nextZ = i.nextZ), i.nextZ && (i.nextZ.prevZ = i.prevZ);
|
|
5440
5440
|
}
|
|
5441
|
-
function
|
|
5441
|
+
function Ui(i, t, e) {
|
|
5442
5442
|
this.i = i, this.x = t, this.y = e, this.prev = null, this.next = null, this.z = 0, this.prevZ = null, this.nextZ = null, this.steiner = !1;
|
|
5443
5443
|
}
|
|
5444
|
-
|
|
5445
|
-
var r = t && t.length, n = r ? t[0] * e : i.length, a = Math.abs(
|
|
5444
|
+
ii.deviation = function(i, t, e, s) {
|
|
5445
|
+
var r = t && t.length, n = r ? t[0] * e : i.length, a = Math.abs(Oi(i, 0, n, e));
|
|
5446
5446
|
if (r)
|
|
5447
5447
|
for (var o = 0, h = t.length; o < h; o++) {
|
|
5448
5448
|
var c = t[o] * e, l = o < h - 1 ? t[o + 1] * e : i.length;
|
|
5449
|
-
a -= Math.abs(
|
|
5449
|
+
a -= Math.abs(Oi(i, c, l, e));
|
|
5450
5450
|
}
|
|
5451
5451
|
var u = 0;
|
|
5452
5452
|
for (o = 0; o < s.length; o += 3) {
|
|
@@ -5457,12 +5457,12 @@ si.deviation = function(i, t, e, s) {
|
|
|
5457
5457
|
}
|
|
5458
5458
|
return a === 0 && u === 0 ? 0 : Math.abs((u - a) / a);
|
|
5459
5459
|
};
|
|
5460
|
-
function
|
|
5460
|
+
function Oi(i, t, e, s) {
|
|
5461
5461
|
for (var r = 0, n = t, a = e - s; n < e; n += s)
|
|
5462
5462
|
r += (i[a] - i[n]) * (i[n + 1] + i[a + 1]), a = n;
|
|
5463
5463
|
return r;
|
|
5464
5464
|
}
|
|
5465
|
-
|
|
5465
|
+
ii.flatten = function(i) {
|
|
5466
5466
|
for (var t = i[0][0].length, e = { vertices: [], holes: [], dimensions: t }, s = 0, r = 0; r < i.length; r++) {
|
|
5467
5467
|
for (var n = 0; n < i[r].length; n++)
|
|
5468
5468
|
for (var a = 0; a < t; a++)
|
|
@@ -5471,8 +5471,8 @@ si.flatten = function(i) {
|
|
|
5471
5471
|
}
|
|
5472
5472
|
return e;
|
|
5473
5473
|
};
|
|
5474
|
-
var Ga =
|
|
5475
|
-
const za = /* @__PURE__ */
|
|
5474
|
+
var Ga = Ki.exports;
|
|
5475
|
+
const za = /* @__PURE__ */ Xi(Ga);
|
|
5476
5476
|
var Dr = /* @__PURE__ */ ((i) => (i[i.NONE = 0] = "NONE", i[i.COLOR = 16384] = "COLOR", i[i.STENCIL = 1024] = "STENCIL", i[i.DEPTH = 256] = "DEPTH", i[i.COLOR_DEPTH = 16640] = "COLOR_DEPTH", i[i.COLOR_STENCIL = 17408] = "COLOR_STENCIL", i[i.DEPTH_STENCIL = 1280] = "DEPTH_STENCIL", i[i.ALL = 17664] = "ALL", i))(Dr || {});
|
|
5477
5477
|
class Ha {
|
|
5478
5478
|
/**
|
|
@@ -5589,7 +5589,7 @@ const Wa = [
|
|
|
5589
5589
|
}
|
|
5590
5590
|
render(t, e) {
|
|
5591
5591
|
let s = t;
|
|
5592
|
-
if (s instanceof O && (s = { container: s }, e && (
|
|
5592
|
+
if (s instanceof O && (s = { container: s }, e && (q($, "passing a second argument is deprecated, please use render options instead"), s.target = e.renderTexture)), s.target || (s.target = this.view.renderTarget), s.target === this.view.renderTarget && (this._lastObjectRendered = s.container, s.clearColor = this.background.colorRgba), s.clearColor) {
|
|
5593
5593
|
const r = Array.isArray(s.clearColor) && s.clearColor.length === 4;
|
|
5594
5594
|
s.clearColor = r ? s.clearColor : J.shared.setValue(s.clearColor).toArray();
|
|
5595
5595
|
}
|
|
@@ -5774,18 +5774,18 @@ Ur.defaultOptions = {
|
|
|
5774
5774
|
*/
|
|
5775
5775
|
roundPixels: !1
|
|
5776
5776
|
};
|
|
5777
|
-
let Gr = Ur,
|
|
5777
|
+
let Gr = Ur, Ne;
|
|
5778
5778
|
function Na(i) {
|
|
5779
|
-
return
|
|
5779
|
+
return Ne !== void 0 || (Ne = (() => {
|
|
5780
5780
|
var e;
|
|
5781
5781
|
const t = {
|
|
5782
5782
|
stencil: !0,
|
|
5783
5783
|
failIfMajorPerformanceCaveat: i ?? Gr.defaultOptions.failIfMajorPerformanceCaveat
|
|
5784
5784
|
};
|
|
5785
5785
|
try {
|
|
5786
|
-
if (!
|
|
5786
|
+
if (!Y.get().getWebGLRenderingContext())
|
|
5787
5787
|
return !1;
|
|
5788
|
-
let r =
|
|
5788
|
+
let r = Y.get().createCanvas().getContext("webgl", t);
|
|
5789
5789
|
const n = !!((e = r == null ? void 0 : r.getContextAttributes()) != null && e.stencil);
|
|
5790
5790
|
if (r) {
|
|
5791
5791
|
const a = r.getExtension("WEBGL_lose_context");
|
|
@@ -5795,26 +5795,26 @@ function Na(i) {
|
|
|
5795
5795
|
} catch {
|
|
5796
5796
|
return !1;
|
|
5797
5797
|
}
|
|
5798
|
-
})()),
|
|
5798
|
+
})()), Ne;
|
|
5799
5799
|
}
|
|
5800
|
-
let
|
|
5800
|
+
let Ye;
|
|
5801
5801
|
async function Ya(i = {}) {
|
|
5802
|
-
return
|
|
5803
|
-
if (!
|
|
5802
|
+
return Ye !== void 0 || (Ye = await (async () => {
|
|
5803
|
+
if (!Y.get().getNavigator().gpu)
|
|
5804
5804
|
return !1;
|
|
5805
5805
|
try {
|
|
5806
5806
|
return await (await navigator.gpu.requestAdapter(i)).requestDevice(), !0;
|
|
5807
5807
|
} catch {
|
|
5808
5808
|
return !1;
|
|
5809
5809
|
}
|
|
5810
|
-
})()),
|
|
5810
|
+
})()), Ye;
|
|
5811
5811
|
}
|
|
5812
|
-
const
|
|
5813
|
-
async function
|
|
5812
|
+
const Es = ["webgl", "webgpu", "canvas"];
|
|
5813
|
+
async function Va(i) {
|
|
5814
5814
|
let t = [];
|
|
5815
|
-
i.preference ? (t.push(i.preference),
|
|
5815
|
+
i.preference ? (t.push(i.preference), Es.forEach((n) => {
|
|
5816
5816
|
n !== i.preference && t.push(n);
|
|
5817
|
-
})) : t =
|
|
5817
|
+
})) : t = Es.slice();
|
|
5818
5818
|
let e;
|
|
5819
5819
|
await va(
|
|
5820
5820
|
i.manageImports ?? !0
|
|
@@ -5823,13 +5823,13 @@ async function ja(i) {
|
|
|
5823
5823
|
for (let n = 0; n < t.length; n++) {
|
|
5824
5824
|
const a = t[n];
|
|
5825
5825
|
if (a === "webgpu" && await Ya()) {
|
|
5826
|
-
const { WebGPURenderer: o } = await import("./WebGPURenderer-
|
|
5826
|
+
const { WebGPURenderer: o } = await import("./WebGPURenderer-CtFHd2D-.js");
|
|
5827
5827
|
e = o, s = { ...i, ...i.webgpu };
|
|
5828
5828
|
break;
|
|
5829
5829
|
} else if (a === "webgl" && Na(
|
|
5830
5830
|
i.failIfMajorPerformanceCaveat ?? Gr.defaultOptions.failIfMajorPerformanceCaveat
|
|
5831
5831
|
)) {
|
|
5832
|
-
const { WebGLRenderer: o } = await import("./WebGLRenderer-
|
|
5832
|
+
const { WebGLRenderer: o } = await import("./WebGLRenderer-C-mXrQNx.js");
|
|
5833
5833
|
e = o, s = { ...i, ...i.webgl };
|
|
5834
5834
|
break;
|
|
5835
5835
|
} else if (a === "canvas")
|
|
@@ -5840,7 +5840,7 @@ async function ja(i) {
|
|
|
5840
5840
|
const r = new e();
|
|
5841
5841
|
return await r.init(s), r;
|
|
5842
5842
|
}
|
|
5843
|
-
class
|
|
5843
|
+
class ja {
|
|
5844
5844
|
/**
|
|
5845
5845
|
* @param loader
|
|
5846
5846
|
* @param verbose - should the loader log to the console
|
|
@@ -5926,16 +5926,16 @@ const $a = {
|
|
|
5926
5926
|
),
|
|
5927
5927
|
add: async (i) => [...i, "avif"],
|
|
5928
5928
|
remove: async (i) => i.filter((t) => t !== "avif")
|
|
5929
|
-
},
|
|
5929
|
+
}, Rs = ["png", "jpg", "jpeg"], qa = {
|
|
5930
5930
|
extension: {
|
|
5931
5931
|
type: B.DetectionParser,
|
|
5932
5932
|
priority: -1
|
|
5933
5933
|
},
|
|
5934
5934
|
test: () => Promise.resolve(!0),
|
|
5935
|
-
add: async (i) => [...i, ...
|
|
5936
|
-
remove: async (i) => i.filter((t) => !
|
|
5935
|
+
add: async (i) => [...i, ...Rs],
|
|
5936
|
+
remove: async (i) => i.filter((t) => !Rs.includes(t))
|
|
5937
5937
|
}, Ka = "WorkerGlobalScope" in globalThis && globalThis instanceof globalThis.WorkerGlobalScope;
|
|
5938
|
-
function
|
|
5938
|
+
function Zi(i) {
|
|
5939
5939
|
return Ka ? !1 : document.createElement("video").canPlayType(i) !== "";
|
|
5940
5940
|
}
|
|
5941
5941
|
const Za = {
|
|
@@ -5943,7 +5943,7 @@ const Za = {
|
|
|
5943
5943
|
type: B.DetectionParser,
|
|
5944
5944
|
priority: 0
|
|
5945
5945
|
},
|
|
5946
|
-
test: async () =>
|
|
5946
|
+
test: async () => Zi("video/mp4"),
|
|
5947
5947
|
add: async (i) => [...i, "mp4", "m4v"],
|
|
5948
5948
|
remove: async (i) => i.filter((t) => t !== "mp4" && t !== "m4v")
|
|
5949
5949
|
}, Ja = {
|
|
@@ -5951,7 +5951,7 @@ const Za = {
|
|
|
5951
5951
|
type: B.DetectionParser,
|
|
5952
5952
|
priority: 0
|
|
5953
5953
|
},
|
|
5954
|
-
test: async () =>
|
|
5954
|
+
test: async () => Zi("video/ogg"),
|
|
5955
5955
|
add: async (i) => [...i, "ogv"],
|
|
5956
5956
|
remove: async (i) => i.filter((t) => t !== "ogv")
|
|
5957
5957
|
}, Qa = {
|
|
@@ -5959,7 +5959,7 @@ const Za = {
|
|
|
5959
5959
|
type: B.DetectionParser,
|
|
5960
5960
|
priority: 0
|
|
5961
5961
|
},
|
|
5962
|
-
test: async () =>
|
|
5962
|
+
test: async () => Zi("video/webm"),
|
|
5963
5963
|
add: async (i) => [...i, "webm"],
|
|
5964
5964
|
remove: async (i) => i.filter((t) => t !== "webm")
|
|
5965
5965
|
}, to = {
|
|
@@ -6019,7 +6019,7 @@ class eo {
|
|
|
6019
6019
|
async load(t, e) {
|
|
6020
6020
|
this._parsersValidated || this._validateParsers();
|
|
6021
6021
|
let s = 0;
|
|
6022
|
-
const r = {}, n =
|
|
6022
|
+
const r = {}, n = Ke(t), a = gt(t, (c) => ({
|
|
6023
6023
|
alias: [c],
|
|
6024
6024
|
src: c
|
|
6025
6025
|
})), o = a.length, h = a.map(async (c) => {
|
|
@@ -6065,7 +6065,7 @@ ${u}`);
|
|
|
6065
6065
|
this._parsersValidated = !0, this._parserHash = this._parsers.filter((t) => t.name).reduce((t, e) => (e.name ? t[e.name] && it(`[Assets] loadParser name conflict "${e.name}"`) : it("[Assets] loadParser should have a name"), { ...t, [e.name]: e }), {});
|
|
6066
6066
|
}
|
|
6067
6067
|
}
|
|
6068
|
-
function
|
|
6068
|
+
function he(i, t) {
|
|
6069
6069
|
if (Array.isArray(t)) {
|
|
6070
6070
|
for (const e of t)
|
|
6071
6071
|
if (i.startsWith(`data:${e}`))
|
|
@@ -6074,7 +6074,7 @@ function le(i, t) {
|
|
|
6074
6074
|
}
|
|
6075
6075
|
return i.startsWith(`data:${t}`);
|
|
6076
6076
|
}
|
|
6077
|
-
function
|
|
6077
|
+
function le(i, t) {
|
|
6078
6078
|
const e = i.split("?")[0], s = bt.extname(e).toLowerCase();
|
|
6079
6079
|
return Array.isArray(t) ? t.includes(s) : s === t;
|
|
6080
6080
|
}
|
|
@@ -6085,10 +6085,10 @@ const io = ".json", so = "application/json", ro = {
|
|
|
6085
6085
|
},
|
|
6086
6086
|
name: "loadJson",
|
|
6087
6087
|
test(i) {
|
|
6088
|
-
return
|
|
6088
|
+
return he(i, so) || le(i, io);
|
|
6089
6089
|
},
|
|
6090
6090
|
async load(i) {
|
|
6091
|
-
return await (await
|
|
6091
|
+
return await (await Y.get().fetch(i)).json();
|
|
6092
6092
|
}
|
|
6093
6093
|
}, no = ".txt", ao = "text/plain", oo = {
|
|
6094
6094
|
name: "loadTxt",
|
|
@@ -6097,10 +6097,10 @@ const io = ".json", so = "application/json", ro = {
|
|
|
6097
6097
|
priority: Zt.Low
|
|
6098
6098
|
},
|
|
6099
6099
|
test(i) {
|
|
6100
|
-
return
|
|
6100
|
+
return he(i, ao) || le(i, no);
|
|
6101
6101
|
},
|
|
6102
6102
|
async load(i) {
|
|
6103
|
-
return await (await
|
|
6103
|
+
return await (await Y.get().fetch(i)).text();
|
|
6104
6104
|
}
|
|
6105
6105
|
}, ho = [
|
|
6106
6106
|
"normal",
|
|
@@ -6142,11 +6142,11 @@ const go = {
|
|
|
6142
6142
|
},
|
|
6143
6143
|
name: "loadWebFont",
|
|
6144
6144
|
test(i) {
|
|
6145
|
-
return
|
|
6145
|
+
return he(i, co) || le(i, lo);
|
|
6146
6146
|
},
|
|
6147
6147
|
async load(i, t) {
|
|
6148
6148
|
var s, r, n;
|
|
6149
|
-
const e =
|
|
6149
|
+
const e = Y.get().getFontFaceSet();
|
|
6150
6150
|
if (e) {
|
|
6151
6151
|
const a = [], o = ((s = t.data) == null ? void 0 : s.family) ?? fo(i), h = ((n = (r = t.data) == null ? void 0 : r.weights) == null ? void 0 : n.filter((l) => ho.includes(l))) ?? ["normal"], c = t.data ?? {};
|
|
6152
6152
|
for (let l = 0; l < h.length; l++) {
|
|
@@ -6165,21 +6165,21 @@ const go = {
|
|
|
6165
6165
|
},
|
|
6166
6166
|
unload(i) {
|
|
6167
6167
|
(Array.isArray(i) ? i : [i]).forEach((t) => {
|
|
6168
|
-
rt.remove(t.family),
|
|
6168
|
+
rt.remove(t.family), Y.get().getFontFaceSet().delete(t);
|
|
6169
6169
|
});
|
|
6170
6170
|
}
|
|
6171
6171
|
};
|
|
6172
|
-
var yo = xo,
|
|
6172
|
+
var yo = xo, wi = { a: 7, c: 6, h: 1, l: 2, m: 2, q: 4, s: 4, t: 2, v: 1, z: 0 }, _o = /([astvzqmhlc])([^astvzqmhlc]*)/ig;
|
|
6173
6173
|
function xo(i) {
|
|
6174
6174
|
var t = [];
|
|
6175
6175
|
return i.replace(_o, function(e, s, r) {
|
|
6176
6176
|
var n = s.toLowerCase();
|
|
6177
6177
|
for (r = wo(r), n == "m" && r.length > 2 && (t.push([s].concat(r.splice(0, 2))), n = "l", s = s == "m" ? "l" : "L"); ; ) {
|
|
6178
|
-
if (r.length ==
|
|
6178
|
+
if (r.length == wi[n])
|
|
6179
6179
|
return r.unshift(s), t.push(r);
|
|
6180
|
-
if (r.length <
|
|
6180
|
+
if (r.length < wi[n])
|
|
6181
6181
|
throw new Error("malformed path data");
|
|
6182
|
-
t.push([s].concat(r.splice(0,
|
|
6182
|
+
t.push([s].concat(r.splice(0, wi[n])));
|
|
6183
6183
|
}
|
|
6184
6184
|
}), t;
|
|
6185
6185
|
}
|
|
@@ -6188,7 +6188,7 @@ function wo(i) {
|
|
|
6188
6188
|
var t = i.match(bo);
|
|
6189
6189
|
return t ? t.map(Number) : [];
|
|
6190
6190
|
}
|
|
6191
|
-
const vo = /* @__PURE__ */
|
|
6191
|
+
const vo = /* @__PURE__ */ Xi(yo);
|
|
6192
6192
|
function Ao(i, t) {
|
|
6193
6193
|
const e = vo(i), s = [];
|
|
6194
6194
|
let r = null, n = 0, a = 0;
|
|
@@ -6316,7 +6316,7 @@ function Ao(i, t) {
|
|
|
6316
6316
|
}
|
|
6317
6317
|
return t;
|
|
6318
6318
|
}
|
|
6319
|
-
class
|
|
6319
|
+
class Ji {
|
|
6320
6320
|
/**
|
|
6321
6321
|
* @param x - The X coordinate of the center of this circle
|
|
6322
6322
|
* @param y - The Y coordinate of the center of this circle
|
|
@@ -6330,7 +6330,7 @@ class Qi {
|
|
|
6330
6330
|
* @returns A copy of the Circle
|
|
6331
6331
|
*/
|
|
6332
6332
|
clone() {
|
|
6333
|
-
return new
|
|
6333
|
+
return new Ji(this.x, this.y, this.radius);
|
|
6334
6334
|
}
|
|
6335
6335
|
/**
|
|
6336
6336
|
* Checks whether the x and y coordinates given are contained within this circle
|
|
@@ -6386,7 +6386,7 @@ class Qi {
|
|
|
6386
6386
|
return `[pixi.js/math:Circle x=${this.x} y=${this.y} radius=${this.radius}]`;
|
|
6387
6387
|
}
|
|
6388
6388
|
}
|
|
6389
|
-
class
|
|
6389
|
+
class Qi {
|
|
6390
6390
|
/**
|
|
6391
6391
|
* @param x - The X coordinate of the center of this ellipse
|
|
6392
6392
|
* @param y - The Y coordinate of the center of this ellipse
|
|
@@ -6401,7 +6401,7 @@ class ts {
|
|
|
6401
6401
|
* @returns {Ellipse} A copy of the ellipse
|
|
6402
6402
|
*/
|
|
6403
6403
|
clone() {
|
|
6404
|
-
return new
|
|
6404
|
+
return new Qi(this.x, this.y, this.halfWidth, this.halfHeight);
|
|
6405
6405
|
}
|
|
6406
6406
|
/**
|
|
6407
6407
|
* Checks whether the x and y coordinates given are contained within this ellipse
|
|
@@ -6465,7 +6465,7 @@ function So(i, t, e, s, r, n) {
|
|
|
6465
6465
|
const g = i - p, m = t - f;
|
|
6466
6466
|
return g * g + m * m;
|
|
6467
6467
|
}
|
|
6468
|
-
class
|
|
6468
|
+
class Se {
|
|
6469
6469
|
/**
|
|
6470
6470
|
* @param points - This can be an array of Points
|
|
6471
6471
|
* that form the polygon, a flat array of numbers that will be interpreted as [x,y, x,y, ...], or
|
|
@@ -6489,7 +6489,7 @@ class Ce {
|
|
|
6489
6489
|
* @returns - A copy of the polygon.
|
|
6490
6490
|
*/
|
|
6491
6491
|
clone() {
|
|
6492
|
-
const t = this.points.slice(), e = new
|
|
6492
|
+
const t = this.points.slice(), e = new Se(t);
|
|
6493
6493
|
return e.closePath = this.closePath, e;
|
|
6494
6494
|
}
|
|
6495
6495
|
/**
|
|
@@ -6590,7 +6590,7 @@ const Ve = (i, t, e, s, r, n) => {
|
|
|
6590
6590
|
const a = i - e, o = t - s, h = Math.sqrt(a * a + o * o);
|
|
6591
6591
|
return h >= r - n && h <= r + n;
|
|
6592
6592
|
};
|
|
6593
|
-
class
|
|
6593
|
+
class ts {
|
|
6594
6594
|
/**
|
|
6595
6595
|
* @param x - The X coordinate of the upper-left corner of the rounded rectangle
|
|
6596
6596
|
* @param y - The Y coordinate of the upper-left corner of the rounded rectangle
|
|
@@ -6614,7 +6614,7 @@ class es {
|
|
|
6614
6614
|
* @returns - A copy of the rounded rectangle.
|
|
6615
6615
|
*/
|
|
6616
6616
|
clone() {
|
|
6617
|
-
return new
|
|
6617
|
+
return new ts(this.x, this.y, this.width, this.height, this.radius);
|
|
6618
6618
|
}
|
|
6619
6619
|
/**
|
|
6620
6620
|
* Copies another rectangle to this one.
|
|
@@ -6671,7 +6671,7 @@ class es {
|
|
|
6671
6671
|
}
|
|
6672
6672
|
}
|
|
6673
6673
|
var at = /* @__PURE__ */ ((i) => (i[i.MAP_READ = 1] = "MAP_READ", i[i.MAP_WRITE = 2] = "MAP_WRITE", i[i.COPY_SRC = 4] = "COPY_SRC", i[i.COPY_DST = 8] = "COPY_DST", i[i.INDEX = 16] = "INDEX", i[i.VERTEX = 32] = "VERTEX", i[i.UNIFORM = 64] = "UNIFORM", i[i.STORAGE = 128] = "STORAGE", i[i.INDIRECT = 256] = "INDIRECT", i[i.QUERY_RESOLVE = 512] = "QUERY_RESOLVE", i[i.STATIC = 1024] = "STATIC", i))(at || {});
|
|
6674
|
-
class
|
|
6674
|
+
class Ee extends Bt {
|
|
6675
6675
|
/**
|
|
6676
6676
|
* Creates a new Buffer with the given options
|
|
6677
6677
|
* @param options - the options for the buffer
|
|
@@ -6736,9 +6736,9 @@ class Re extends Bt {
|
|
|
6736
6736
|
}
|
|
6737
6737
|
}
|
|
6738
6738
|
function Hr(i, t) {
|
|
6739
|
-
if (!(i instanceof
|
|
6739
|
+
if (!(i instanceof Ee)) {
|
|
6740
6740
|
let e = t ? at.INDEX : at.VERTEX;
|
|
6741
|
-
i instanceof Array && (t ? (i = new Uint32Array(i), e = at.INDEX | at.COPY_DST) : (i = new Float32Array(i), e = at.VERTEX | at.COPY_DST)), i = new
|
|
6741
|
+
i instanceof Array && (t ? (i = new Uint32Array(i), e = at.INDEX | at.COPY_DST) : (i = new Float32Array(i), e = at.VERTEX | at.COPY_DST)), i = new Ee({
|
|
6742
6742
|
data: i,
|
|
6743
6743
|
label: t ? "index-mesh-buffer" : "vertex-mesh-buffer",
|
|
6744
6744
|
usage: e
|
|
@@ -6760,7 +6760,7 @@ function Co(i, t, e) {
|
|
|
6760
6760
|
return e.minX = n, e.minY = a, e.maxX = o, e.maxY = h, e;
|
|
6761
6761
|
}
|
|
6762
6762
|
function Mo(i) {
|
|
6763
|
-
return (i instanceof
|
|
6763
|
+
return (i instanceof Ee || Array.isArray(i) || i.BYTES_PER_ELEMENT) && (i = {
|
|
6764
6764
|
buffer: i
|
|
6765
6765
|
}), i.buffer = Hr(i.buffer, !1), i;
|
|
6766
6766
|
}
|
|
@@ -6830,12 +6830,12 @@ class To extends Bt {
|
|
|
6830
6830
|
const Po = new Float32Array(1), ko = new Uint32Array(1);
|
|
6831
6831
|
class Io extends To {
|
|
6832
6832
|
constructor() {
|
|
6833
|
-
const e = new
|
|
6833
|
+
const e = new Ee({
|
|
6834
6834
|
data: Po,
|
|
6835
6835
|
label: "attribute-batch-buffer",
|
|
6836
6836
|
usage: at.VERTEX | at.COPY_DST,
|
|
6837
6837
|
shrinkToFit: !1
|
|
6838
|
-
}), s = new
|
|
6838
|
+
}), s = new Ee({
|
|
6839
6839
|
data: ko,
|
|
6840
6840
|
label: "index-batch-buffer",
|
|
6841
6841
|
usage: at.INDEX | at.COPY_DST,
|
|
@@ -6877,12 +6877,12 @@ class Io extends To {
|
|
|
6877
6877
|
});
|
|
6878
6878
|
}
|
|
6879
6879
|
}
|
|
6880
|
-
let
|
|
6880
|
+
let je = null;
|
|
6881
6881
|
function Wr() {
|
|
6882
|
-
if (
|
|
6883
|
-
return
|
|
6882
|
+
if (je)
|
|
6883
|
+
return je;
|
|
6884
6884
|
const i = ba();
|
|
6885
|
-
return
|
|
6885
|
+
return je = i.getParameter(i.MAX_TEXTURE_IMAGE_UNITS), je;
|
|
6886
6886
|
}
|
|
6887
6887
|
const Nr = {};
|
|
6888
6888
|
function Eo(i, t) {
|
|
@@ -6891,19 +6891,19 @@ function Eo(i, t) {
|
|
|
6891
6891
|
e = e * 31 + i[s].uid >>> 0;
|
|
6892
6892
|
return Nr[e] || Ro(i, e);
|
|
6893
6893
|
}
|
|
6894
|
-
let
|
|
6894
|
+
let vi = 0;
|
|
6895
6895
|
function Ro(i, t) {
|
|
6896
6896
|
const e = {};
|
|
6897
6897
|
let s = 0;
|
|
6898
|
-
|
|
6899
|
-
for (let n = 0; n <
|
|
6898
|
+
vi || (vi = Wr());
|
|
6899
|
+
for (let n = 0; n < vi; n++) {
|
|
6900
6900
|
const a = n < i.length ? i[n] : L.EMPTY.source;
|
|
6901
6901
|
e[s++] = a.source, e[s++] = a.style;
|
|
6902
6902
|
}
|
|
6903
6903
|
const r = new wa(e);
|
|
6904
6904
|
return Nr[t] = r, r;
|
|
6905
6905
|
}
|
|
6906
|
-
class
|
|
6906
|
+
class Bs {
|
|
6907
6907
|
constructor(t) {
|
|
6908
6908
|
typeof t == "number" ? this.rawBinaryData = new ArrayBuffer(t) : t instanceof Uint8Array ? this.rawBinaryData = t.buffer : this.rawBinaryData = t, this.uint32View = new Uint32Array(this.rawBinaryData), this.float32View = new Float32Array(this.rawBinaryData), this.size = this.rawBinaryData.byteLength;
|
|
6909
6909
|
}
|
|
@@ -6967,7 +6967,7 @@ class Fs {
|
|
|
6967
6967
|
}
|
|
6968
6968
|
}
|
|
6969
6969
|
}
|
|
6970
|
-
function
|
|
6970
|
+
function Fs(i, t) {
|
|
6971
6971
|
const e = i.byteLength / 8 | 0, s = new Float64Array(i, 0, e);
|
|
6972
6972
|
new Float64Array(t, 0, e).set(s);
|
|
6973
6973
|
const n = i.byteLength - e * 8;
|
|
@@ -6982,10 +6982,10 @@ const Bo = {
|
|
|
6982
6982
|
screen: "screen-npm"
|
|
6983
6983
|
};
|
|
6984
6984
|
var Fo = /* @__PURE__ */ ((i) => (i[i.DISABLED = 0] = "DISABLED", i[i.RENDERING_MASK_ADD = 1] = "RENDERING_MASK_ADD", i[i.MASK_ACTIVE = 2] = "MASK_ACTIVE", i[i.RENDERING_MASK_REMOVE = 3] = "RENDERING_MASK_REMOVE", i[i.NONE = 4] = "NONE", i))(Fo || {});
|
|
6985
|
-
function
|
|
6985
|
+
function Ls(i, t) {
|
|
6986
6986
|
return t.alphaMode === "no-premultiply-alpha" && Bo[i] || i;
|
|
6987
6987
|
}
|
|
6988
|
-
class
|
|
6988
|
+
class Ds {
|
|
6989
6989
|
constructor() {
|
|
6990
6990
|
this.ids = /* @__PURE__ */ Object.create(null), this.textures = [], this.count = 0;
|
|
6991
6991
|
}
|
|
@@ -6998,7 +6998,7 @@ class Us {
|
|
|
6998
6998
|
this.count = 0;
|
|
6999
6999
|
}
|
|
7000
7000
|
}
|
|
7001
|
-
class
|
|
7001
|
+
class Us {
|
|
7002
7002
|
constructor() {
|
|
7003
7003
|
this.renderPipeId = "batch", this.action = "startBatch", this.start = 0, this.size = 0, this.blendMode = "normal", this.canBundle = !0;
|
|
7004
7004
|
}
|
|
@@ -7006,12 +7006,12 @@ class Os {
|
|
|
7006
7006
|
this.textures = null, this.gpuBindGroup = null, this.bindGroup = null, this.batcher = null;
|
|
7007
7007
|
}
|
|
7008
7008
|
}
|
|
7009
|
-
let
|
|
7010
|
-
const Yr = class
|
|
7009
|
+
let ge = 0;
|
|
7010
|
+
const Yr = class Vr {
|
|
7011
7011
|
constructor(t = {}) {
|
|
7012
|
-
this.uid = et("batcher"), this.dirty = !0, this.batchIndex = 0, this.batches = [], this._vertexSize = 6, this._elements = [], this._batchPool = [], this._batchPoolIndex = 0, this._textureBatchPool = [], this._textureBatchPoolIndex = 0, t = { ...
|
|
7012
|
+
this.uid = et("batcher"), this.dirty = !0, this.batchIndex = 0, this.batches = [], this._vertexSize = 6, this._elements = [], this._batchPool = [], this._batchPoolIndex = 0, this._textureBatchPool = [], this._textureBatchPoolIndex = 0, t = { ...Vr.defaultOptions, ...t };
|
|
7013
7013
|
const { vertexSize: e, indexSize: s } = t;
|
|
7014
|
-
this.attributeBuffer = new
|
|
7014
|
+
this.attributeBuffer = new Bs(e * this._vertexSize * 4), this.indexBuffer = new Uint16Array(s), this._maxTextures = Wr();
|
|
7015
7015
|
}
|
|
7016
7016
|
begin() {
|
|
7017
7017
|
this.batchIndex = 0, this.elementSize = 0, this.elementStart = 0, this.indexSize = 0, this.attributeSize = 0, this._batchPoolIndex = 0, this._textureBatchPoolIndex = 0, this._batchIndexStart = 0, this._batchIndexSize = 0, this.dirty = !0;
|
|
@@ -7038,24 +7038,24 @@ const Yr = class jr {
|
|
|
7038
7038
|
*/
|
|
7039
7039
|
break(t) {
|
|
7040
7040
|
const e = this._elements;
|
|
7041
|
-
let s = this._textureBatchPool[this._textureBatchPoolIndex++] || new
|
|
7041
|
+
let s = this._textureBatchPool[this._textureBatchPoolIndex++] || new Ds();
|
|
7042
7042
|
if (s.clear(), !e[this.elementStart])
|
|
7043
7043
|
return;
|
|
7044
7044
|
const r = e[this.elementStart];
|
|
7045
|
-
let n =
|
|
7045
|
+
let n = Ls(r.blendMode, r.texture._source);
|
|
7046
7046
|
this.attributeSize * 4 > this.attributeBuffer.size && this._resizeAttributeBuffer(this.attributeSize * 4), this.indexSize > this.indexBuffer.length && this._resizeIndexBuffer(this.indexSize);
|
|
7047
7047
|
const a = this.attributeBuffer.float32View, o = this.attributeBuffer.uint32View, h = this.indexBuffer;
|
|
7048
|
-
let c = this._batchIndexSize, l = this._batchIndexStart, u = "startBatch", d = this._batchPool[this._batchPoolIndex++] || new
|
|
7048
|
+
let c = this._batchIndexSize, l = this._batchIndexStart, u = "startBatch", d = this._batchPool[this._batchPoolIndex++] || new Us();
|
|
7049
7049
|
const p = this._maxTextures;
|
|
7050
7050
|
for (let f = this.elementStart; f < this.elementSize; ++f) {
|
|
7051
7051
|
const g = e[f];
|
|
7052
7052
|
e[f] = null;
|
|
7053
|
-
const y = g.texture._source, _ =
|
|
7054
|
-
if (y._batchTick ===
|
|
7053
|
+
const y = g.texture._source, _ = Ls(g.blendMode, y), x = n !== _;
|
|
7054
|
+
if (y._batchTick === ge && !x) {
|
|
7055
7055
|
g.textureId = y._textureBindLocation, c += g.indexSize, g.packAttributes(a, o, g.location, g.textureId), g.packIndex(h, g.indexStart, g.location / this._vertexSize), g.batch = d;
|
|
7056
7056
|
continue;
|
|
7057
7057
|
}
|
|
7058
|
-
y._batchTick =
|
|
7058
|
+
y._batchTick = ge, (s.count >= p || x) && (this._finishBatch(
|
|
7059
7059
|
d,
|
|
7060
7060
|
l,
|
|
7061
7061
|
c - l,
|
|
@@ -7063,7 +7063,7 @@ const Yr = class jr {
|
|
|
7063
7063
|
n,
|
|
7064
7064
|
t,
|
|
7065
7065
|
u
|
|
7066
|
-
), u = "renderBatch", l = c, n = _, s = this._textureBatchPool[this._textureBatchPoolIndex++] || new
|
|
7066
|
+
), u = "renderBatch", l = c, n = _, s = this._textureBatchPool[this._textureBatchPoolIndex++] || new Ds(), s.clear(), d = this._batchPool[this._batchPoolIndex++] || new Us(), ++ge), g.textureId = y._textureBindLocation = s.count, s.ids[y.uid] = s.count, s.textures[s.count++] = y, g.batch = d, c += g.indexSize, g.packAttributes(a, o, g.location, g.textureId), g.packIndex(h, g.indexStart, g.location / this._vertexSize);
|
|
7067
7067
|
}
|
|
7068
7068
|
s.count > 0 && (this._finishBatch(
|
|
7069
7069
|
d,
|
|
@@ -7073,10 +7073,10 @@ const Yr = class jr {
|
|
|
7073
7073
|
n,
|
|
7074
7074
|
t,
|
|
7075
7075
|
u
|
|
7076
|
-
), l = c, ++
|
|
7076
|
+
), l = c, ++ge), this.elementStart = this.elementSize, this._batchIndexStart = l, this._batchIndexSize = c;
|
|
7077
7077
|
}
|
|
7078
7078
|
_finishBatch(t, e, s, r, n, a, o) {
|
|
7079
|
-
t.gpuBindGroup = null, t.action = o, t.batcher = this, t.textures = r, t.blendMode = n, t.start = e, t.size = s, ++
|
|
7079
|
+
t.gpuBindGroup = null, t.action = o, t.batcher = this, t.textures = r, t.blendMode = n, t.start = e, t.size = s, ++ge, a.add(t);
|
|
7080
7080
|
}
|
|
7081
7081
|
finish(t) {
|
|
7082
7082
|
this.break(t);
|
|
@@ -7096,8 +7096,8 @@ const Yr = class jr {
|
|
|
7096
7096
|
t <= this.indexBuffer.length || this._resizeIndexBuffer(t);
|
|
7097
7097
|
}
|
|
7098
7098
|
_resizeAttributeBuffer(t) {
|
|
7099
|
-
const e = Math.max(t, this.attributeBuffer.size * 2), s = new
|
|
7100
|
-
|
|
7099
|
+
const e = Math.max(t, this.attributeBuffer.size * 2), s = new Bs(e);
|
|
7100
|
+
Fs(this.attributeBuffer.rawBinaryData, s.rawBinaryData), this.attributeBuffer = s;
|
|
7101
7101
|
}
|
|
7102
7102
|
_resizeIndexBuffer(t) {
|
|
7103
7103
|
const e = this.indexBuffer;
|
|
@@ -7108,7 +7108,7 @@ const Yr = class jr {
|
|
|
7108
7108
|
for (let n = 0; n < e.length; n++)
|
|
7109
7109
|
r[n] = e[n];
|
|
7110
7110
|
else
|
|
7111
|
-
|
|
7111
|
+
Fs(e.buffer, r.buffer);
|
|
7112
7112
|
this.indexBuffer = r;
|
|
7113
7113
|
}
|
|
7114
7114
|
destroy() {
|
|
@@ -7139,7 +7139,7 @@ function Uo(i, t, e, s) {
|
|
|
7139
7139
|
for (t *= e; r < s; )
|
|
7140
7140
|
i[t] = 0, i[t + 1] = 0, t += e, r++;
|
|
7141
7141
|
}
|
|
7142
|
-
function
|
|
7142
|
+
function jr(i, t, e, s, r) {
|
|
7143
7143
|
const n = t.a, a = t.b, o = t.c, h = t.d, c = t.tx, l = t.ty;
|
|
7144
7144
|
e = e || 0, s = s || 2, r = r || i.length / s - e;
|
|
7145
7145
|
let u = e * s;
|
|
@@ -7193,7 +7193,7 @@ class Xr {
|
|
|
7193
7193
|
this.applyTransform = !0;
|
|
7194
7194
|
}
|
|
7195
7195
|
}
|
|
7196
|
-
const
|
|
7196
|
+
const Ai = {
|
|
7197
7197
|
build(i, t) {
|
|
7198
7198
|
let e, s, r, n, a, o;
|
|
7199
7199
|
if (i.type === "circle") {
|
|
@@ -7240,7 +7240,7 @@ const Si = {
|
|
|
7240
7240
|
t[h * e] = i[l], t[h * e + 1] = i[l + 1], l > 0 && (r[n++] = h, r[n++] = c, r[n++] = h - 1), h++;
|
|
7241
7241
|
r[n++] = c + 1, r[n++] = c, r[n++] = h - 1;
|
|
7242
7242
|
}
|
|
7243
|
-
}, Go = 1e-4,
|
|
7243
|
+
}, Go = 1e-4, Os = 1e-4;
|
|
7244
7244
|
function zo(i) {
|
|
7245
7245
|
const t = i.length;
|
|
7246
7246
|
if (t < 6)
|
|
@@ -7252,7 +7252,7 @@ function zo(i) {
|
|
|
7252
7252
|
}
|
|
7253
7253
|
return e < 0 ? -1 : 1;
|
|
7254
7254
|
}
|
|
7255
|
-
function
|
|
7255
|
+
function Gs(i, t, e, s, r, n, a, o) {
|
|
7256
7256
|
const h = i - e * r, c = t - s * r, l = i + e * n, u = t + s * n;
|
|
7257
7257
|
let d, p;
|
|
7258
7258
|
a ? (d = s, p = -e) : (d = -s, p = e);
|
|
@@ -7303,9 +7303,9 @@ function Ho(i, t, e, s, r, n, a, o, h) {
|
|
|
7303
7303
|
const m = r, y = i.length / 2;
|
|
7304
7304
|
let _ = i.length;
|
|
7305
7305
|
const x = m.length / 2, b = l.width / 2, S = b * b, k = l.miterLimit * l.miterLimit;
|
|
7306
|
-
let M = i[0], C = i[1], v = i[2], A = i[3], j = 0, Mt = 0, R = -(C - A), E = M - v, z = 0,
|
|
7306
|
+
let M = i[0], C = i[1], v = i[2], A = i[3], j = 0, Mt = 0, R = -(C - A), E = M - v, z = 0, X = 0, ft = Math.sqrt(R * R + E * E);
|
|
7307
7307
|
R /= ft, E /= ft, R *= b, E *= b;
|
|
7308
|
-
const
|
|
7308
|
+
const hs = u, I = (1 - hs) * 2, F = hs * 2;
|
|
7309
7309
|
f || (l.cap === "round" ? _ += Nt(
|
|
7310
7310
|
M - R * (I - F) * 0.5,
|
|
7311
7311
|
C - E * (I - F) * 0.5,
|
|
@@ -7315,7 +7315,7 @@ function Ho(i, t, e, s, r, n, a, o, h) {
|
|
|
7315
7315
|
C + E * F,
|
|
7316
7316
|
m,
|
|
7317
7317
|
!0
|
|
7318
|
-
) + 2 : l.cap === "square" && (_ +=
|
|
7318
|
+
) + 2 : l.cap === "square" && (_ += Gs(M, C, R, E, I, F, !0, m))), m.push(
|
|
7319
7319
|
M - R * I,
|
|
7320
7320
|
C - E * I
|
|
7321
7321
|
), m.push(
|
|
@@ -7323,59 +7323,59 @@ function Ho(i, t, e, s, r, n, a, o, h) {
|
|
|
7323
7323
|
C + E * F
|
|
7324
7324
|
);
|
|
7325
7325
|
for (let U = 1; U < y - 1; ++U) {
|
|
7326
|
-
M = i[(U - 1) * 2], C = i[(U - 1) * 2 + 1], v = i[U * 2], A = i[U * 2 + 1], j = i[(U + 1) * 2], Mt = i[(U + 1) * 2 + 1], R = -(C - A), E = M - v, ft = Math.sqrt(R * R + E * E), R /= ft, E /= ft, R *= b, E *= b, z = -(A - Mt),
|
|
7327
|
-
const Ft = v - M,
|
|
7328
|
-
if (Math.abs(
|
|
7326
|
+
M = i[(U - 1) * 2], C = i[(U - 1) * 2 + 1], v = i[U * 2], A = i[U * 2 + 1], j = i[(U + 1) * 2], Mt = i[(U + 1) * 2 + 1], R = -(C - A), E = M - v, ft = Math.sqrt(R * R + E * E), R /= ft, E /= ft, R *= b, E *= b, z = -(A - Mt), X = v - j, ft = Math.sqrt(z * z + X * X), z /= ft, X /= ft, z *= b, X *= b;
|
|
7327
|
+
const Ft = v - M, ce = C - A, ue = v - j, de = Mt - A, ls = Ft * ue + ce * de, Fe = ce * ue - de * Ft, fe = Fe < 0;
|
|
7328
|
+
if (Math.abs(Fe) < 1e-3 * Math.abs(ls)) {
|
|
7329
7329
|
m.push(
|
|
7330
7330
|
v - R * I,
|
|
7331
7331
|
A - E * I
|
|
7332
7332
|
), m.push(
|
|
7333
7333
|
v + R * F,
|
|
7334
7334
|
A + E * F
|
|
7335
|
-
),
|
|
7335
|
+
), ls >= 0 && (l.join === "round" ? _ += Nt(
|
|
7336
7336
|
v,
|
|
7337
7337
|
A,
|
|
7338
7338
|
v - R * I,
|
|
7339
7339
|
A - E * I,
|
|
7340
7340
|
v - z * I,
|
|
7341
|
-
A -
|
|
7341
|
+
A - X * I,
|
|
7342
7342
|
m,
|
|
7343
7343
|
!1
|
|
7344
7344
|
) + 4 : _ += 2, m.push(
|
|
7345
7345
|
v - z * F,
|
|
7346
|
-
A -
|
|
7346
|
+
A - X * F
|
|
7347
7347
|
), m.push(
|
|
7348
7348
|
v + z * I,
|
|
7349
|
-
A +
|
|
7349
|
+
A + X * I
|
|
7350
7350
|
));
|
|
7351
7351
|
continue;
|
|
7352
7352
|
}
|
|
7353
|
-
const
|
|
7354
|
-
|
|
7353
|
+
const cs = (-R + M) * (-E + A) - (-R + v) * (-E + C), us = (-z + j) * (-X + A) - (-z + v) * (-X + Mt), Le = (Ft * us - ue * cs) / Fe, De = (de * cs - ce * us) / Fe, hi = (Le - v) * (Le - v) + (De - A) * (De - A), Gt = v + (Le - v) * I, zt = A + (De - A) * I, Ht = v - (Le - v) * F, Wt = A - (De - A) * F, _n = Math.min(Ft * Ft + ce * ce, ue * ue + de * de), ds = fe ? I : F, xn = _n + ds * ds * S;
|
|
7354
|
+
hi <= xn ? l.join === "bevel" || hi / S > k ? (fe ? (m.push(Gt, zt), m.push(v + R * F, A + E * F), m.push(Gt, zt), m.push(v + z * F, A + X * F)) : (m.push(v - R * I, A - E * I), m.push(Ht, Wt), m.push(v - z * I, A - X * I), m.push(Ht, Wt)), _ += 2) : l.join === "round" ? fe ? (m.push(Gt, zt), m.push(v + R * F, A + E * F), _ += Nt(
|
|
7355
7355
|
v,
|
|
7356
7356
|
A,
|
|
7357
7357
|
v + R * F,
|
|
7358
7358
|
A + E * F,
|
|
7359
7359
|
v + z * F,
|
|
7360
|
-
A +
|
|
7360
|
+
A + X * F,
|
|
7361
7361
|
m,
|
|
7362
7362
|
!0
|
|
7363
|
-
) + 4, m.push(Gt, zt), m.push(v + z * F, A +
|
|
7363
|
+
) + 4, m.push(Gt, zt), m.push(v + z * F, A + X * F)) : (m.push(v - R * I, A - E * I), m.push(Ht, Wt), _ += Nt(
|
|
7364
7364
|
v,
|
|
7365
7365
|
A,
|
|
7366
7366
|
v - R * I,
|
|
7367
7367
|
A - E * I,
|
|
7368
7368
|
v - z * I,
|
|
7369
|
-
A -
|
|
7369
|
+
A - X * I,
|
|
7370
7370
|
m,
|
|
7371
7371
|
!1
|
|
7372
|
-
) + 4, m.push(v - z * I, A -
|
|
7372
|
+
) + 4, m.push(v - z * I, A - X * I), m.push(Ht, Wt)) : (m.push(Gt, zt), m.push(Ht, Wt)) : (m.push(v - R * I, A - E * I), m.push(v + R * F, A + E * F), l.join === "round" ? fe ? _ += Nt(
|
|
7373
7373
|
v,
|
|
7374
7374
|
A,
|
|
7375
7375
|
v + R * F,
|
|
7376
7376
|
A + E * F,
|
|
7377
7377
|
v + z * F,
|
|
7378
|
-
A +
|
|
7378
|
+
A + X * F,
|
|
7379
7379
|
m,
|
|
7380
7380
|
!0
|
|
7381
7381
|
) + 2 : _ += Nt(
|
|
@@ -7384,10 +7384,10 @@ function Ho(i, t, e, s, r, n, a, o, h) {
|
|
|
7384
7384
|
v - R * I,
|
|
7385
7385
|
A - E * I,
|
|
7386
7386
|
v - z * I,
|
|
7387
|
-
A -
|
|
7387
|
+
A - X * I,
|
|
7388
7388
|
m,
|
|
7389
7389
|
!1
|
|
7390
|
-
) + 2 : l.join === "miter" &&
|
|
7390
|
+
) + 2 : l.join === "miter" && hi / S <= k && (fe ? (m.push(Ht, Wt), m.push(Ht, Wt)) : (m.push(Gt, zt), m.push(Gt, zt)), _ += 2), m.push(v - z * I, A - X * I), m.push(v + z * F, A + X * F), _ += 2);
|
|
7391
7391
|
}
|
|
7392
7392
|
M = i[(y - 2) * 2], C = i[(y - 2) * 2 + 1], v = i[(y - 1) * 2], A = i[(y - 1) * 2 + 1], R = -(C - A), E = M - v, ft = Math.sqrt(R * R + E * E), R /= ft, E /= ft, R *= b, E *= b, m.push(v - R * I, A - E * I), m.push(v + R * F, A + E * F), f || (l.cap === "round" ? _ += Nt(
|
|
7393
7393
|
v - R * (I - F) * 0.5,
|
|
@@ -7398,8 +7398,8 @@ function Ho(i, t, e, s, r, n, a, o, h) {
|
|
|
7398
7398
|
A + E * F,
|
|
7399
7399
|
m,
|
|
7400
7400
|
!1
|
|
7401
|
-
) + 2 : l.cap === "square" && (_ +=
|
|
7402
|
-
const yn =
|
|
7401
|
+
) + 2 : l.cap === "square" && (_ += Gs(v, A, R, E, I, F, !1, m)));
|
|
7402
|
+
const yn = Os * Os;
|
|
7403
7403
|
for (let U = x; U < _ + x - 2; ++U)
|
|
7404
7404
|
M = m[U * 2], C = m[U * 2 + 1], v = m[(U + 1) * 2], A = m[(U + 1) * 2 + 1], j = m[(U + 2) * 2], Mt = m[(U + 2) * 2 + 1], !(Math.abs(M * (A - Mt) + v * (Mt - C) + j * (C - A)) < yn) && o.push(U, U + 1, U + 2);
|
|
7405
7405
|
}
|
|
@@ -7433,7 +7433,7 @@ const Wo = [], No = {
|
|
|
7433
7433
|
const o = s / e;
|
|
7434
7434
|
r[n++] = o, r[n++] = o + 1, r[n++] = o + 2, r[n++] = o + 1, r[n++] = o + 3, r[n++] = o + 2;
|
|
7435
7435
|
}
|
|
7436
|
-
},
|
|
7436
|
+
}, Vo = {
|
|
7437
7437
|
build(i, t) {
|
|
7438
7438
|
return t[0] = i.x, t[1] = i.y, t[2] = i.x2, t[3] = i.y2, t[4] = i.x3, t[5] = i.y3, t;
|
|
7439
7439
|
},
|
|
@@ -7443,14 +7443,14 @@ const Wo = [], No = {
|
|
|
7443
7443
|
const o = s / e;
|
|
7444
7444
|
r[n++] = o, r[n++] = o + 1, r[n++] = o + 2;
|
|
7445
7445
|
}
|
|
7446
|
-
},
|
|
7446
|
+
}, es = {
|
|
7447
7447
|
rectangle: Yo,
|
|
7448
7448
|
polygon: No,
|
|
7449
|
-
triangle:
|
|
7450
|
-
circle:
|
|
7451
|
-
ellipse:
|
|
7452
|
-
roundedRectangle:
|
|
7453
|
-
},
|
|
7449
|
+
triangle: Vo,
|
|
7450
|
+
circle: Ai,
|
|
7451
|
+
ellipse: Ai,
|
|
7452
|
+
roundedRectangle: Ai
|
|
7453
|
+
}, jo = new tt();
|
|
7454
7454
|
function Xo(i, t) {
|
|
7455
7455
|
const { geometryData: e, batches: s } = t;
|
|
7456
7456
|
s.length = 0, e.indices.length = 0, e.vertices.length = 0, e.uvs.length = 0;
|
|
@@ -7460,15 +7460,15 @@ function Xo(i, t) {
|
|
|
7460
7460
|
$o(n.data, s, e);
|
|
7461
7461
|
else if (n.action === "fill" || n.action === "stroke") {
|
|
7462
7462
|
const a = n.action === "stroke", o = n.data.path.shapePath, h = n.data.style, c = n.data.hole;
|
|
7463
|
-
a && c &&
|
|
7463
|
+
a && c && zs(c.shapePath, h, null, !0, s, e), zs(o, h, c, a, s, e);
|
|
7464
7464
|
}
|
|
7465
7465
|
}
|
|
7466
7466
|
}
|
|
7467
7467
|
function $o(i, t, e) {
|
|
7468
|
-
const { vertices: s, uvs: r, indices: n } = e, a = n.length, o = s.length / 2, h = [], c =
|
|
7468
|
+
const { vertices: s, uvs: r, indices: n } = e, a = n.length, o = s.length / 2, h = [], c = es.rectangle, l = jo, u = i.image;
|
|
7469
7469
|
l.x = i.dx, l.y = i.dy, l.width = i.dw, l.height = i.dh;
|
|
7470
7470
|
const d = i.transform;
|
|
7471
|
-
c.build(l, h), d &&
|
|
7471
|
+
c.build(l, h), d && jr(h, d), c.triangulate(h, s, 2, o, n, a);
|
|
7472
7472
|
const p = u.uvs;
|
|
7473
7473
|
r.push(
|
|
7474
7474
|
p.x0,
|
|
@@ -7483,11 +7483,11 @@ function $o(i, t, e) {
|
|
|
7483
7483
|
const f = kt.get(Xr);
|
|
7484
7484
|
f.indexOffset = a, f.indexSize = n.length - a, f.vertexOffset = o, f.vertexSize = s.length / 2 - o, f.color = i.style, f.alpha = i.alpha, f.texture = u, f.geometryData = e, t.push(f);
|
|
7485
7485
|
}
|
|
7486
|
-
function
|
|
7486
|
+
function zs(i, t, e, s, r, n) {
|
|
7487
7487
|
const { vertices: a, uvs: o, indices: h } = n, c = i.shapePrimitives.length - 1;
|
|
7488
7488
|
i.shapePrimitives.forEach(({ shape: l, transform: u }, d) => {
|
|
7489
|
-
const p = h.length, f = a.length / 2, g = [], m =
|
|
7490
|
-
if (m.build(l, g), u &&
|
|
7489
|
+
const p = h.length, f = a.length / 2, g = [], m = es[l.type];
|
|
7490
|
+
if (m.build(l, g), u && jr(g, u), s) {
|
|
7491
7491
|
const b = l.closePath ?? !0;
|
|
7492
7492
|
Ho(g, t, !1, b, a, 2, f, h);
|
|
7493
7493
|
} else if (e && c === d) {
|
|
@@ -7514,7 +7514,7 @@ function qo(i) {
|
|
|
7514
7514
|
const t = i.shapePrimitives, e = [];
|
|
7515
7515
|
for (let s = 0; s < t.length; s++) {
|
|
7516
7516
|
const r = t[s].shape, n = [];
|
|
7517
|
-
|
|
7517
|
+
es[r.type].build(r, n), e.push(n);
|
|
7518
7518
|
}
|
|
7519
7519
|
return e;
|
|
7520
7520
|
}
|
|
@@ -7535,7 +7535,7 @@ class Zo {
|
|
|
7535
7535
|
this.instructions.reset();
|
|
7536
7536
|
}
|
|
7537
7537
|
}
|
|
7538
|
-
const
|
|
7538
|
+
const is = class Gi {
|
|
7539
7539
|
constructor() {
|
|
7540
7540
|
this._activeBatchers = [], this._gpuContextHash = {}, this._graphicsDataContextHash = /* @__PURE__ */ Object.create(null);
|
|
7541
7541
|
}
|
|
@@ -7544,7 +7544,7 @@ const ss = class zi {
|
|
|
7544
7544
|
* @ignore
|
|
7545
7545
|
*/
|
|
7546
7546
|
init(t) {
|
|
7547
|
-
|
|
7547
|
+
Gi.defaultOptions.bezierSmoothness = (t == null ? void 0 : t.bezierSmoothness) ?? Gi.defaultOptions.bezierSmoothness;
|
|
7548
7548
|
}
|
|
7549
7549
|
prerender() {
|
|
7550
7550
|
this._returnActiveBatchers();
|
|
@@ -7608,7 +7608,7 @@ const ss = class zi {
|
|
|
7608
7608
|
this._gpuContextHash[t] && this.onGraphicsContextDestroy(this._gpuContextHash[t].context);
|
|
7609
7609
|
}
|
|
7610
7610
|
};
|
|
7611
|
-
|
|
7611
|
+
is.extension = {
|
|
7612
7612
|
type: [
|
|
7613
7613
|
B.WebGLSystem,
|
|
7614
7614
|
B.WebGPUSystem,
|
|
@@ -7616,15 +7616,15 @@ ss.extension = {
|
|
|
7616
7616
|
],
|
|
7617
7617
|
name: "graphicsContext"
|
|
7618
7618
|
};
|
|
7619
|
-
|
|
7619
|
+
is.defaultOptions = {
|
|
7620
7620
|
/**
|
|
7621
7621
|
* A value from 0 to 1 that controls the smoothness of bezier curves (the higher the smoother)
|
|
7622
7622
|
* @default 0.5
|
|
7623
7623
|
*/
|
|
7624
7624
|
bezierSmoothness: 0.5
|
|
7625
7625
|
};
|
|
7626
|
-
let qr =
|
|
7627
|
-
const Jo = 8,
|
|
7626
|
+
let qr = is;
|
|
7627
|
+
const Jo = 8, Xe = 11920929e-14, Qo = 1;
|
|
7628
7628
|
function Kr(i, t, e, s, r, n, a, o, h, c) {
|
|
7629
7629
|
const u = Math.min(
|
|
7630
7630
|
0.99,
|
|
@@ -7635,26 +7635,26 @@ function Kr(i, t, e, s, r, n, a, o, h, c) {
|
|
|
7635
7635
|
return d *= d, th(t, e, s, r, n, a, o, h, i, d), i;
|
|
7636
7636
|
}
|
|
7637
7637
|
function th(i, t, e, s, r, n, a, o, h, c) {
|
|
7638
|
-
|
|
7638
|
+
zi(i, t, e, s, r, n, a, o, h, c, 0), h.push(a, o);
|
|
7639
7639
|
}
|
|
7640
|
-
function
|
|
7640
|
+
function zi(i, t, e, s, r, n, a, o, h, c, l) {
|
|
7641
7641
|
if (l > Jo)
|
|
7642
7642
|
return;
|
|
7643
7643
|
const u = (i + e) / 2, d = (t + s) / 2, p = (e + r) / 2, f = (s + n) / 2, g = (r + a) / 2, m = (n + o) / 2, y = (u + p) / 2, _ = (d + f) / 2, x = (p + g) / 2, b = (f + m) / 2, S = (y + x) / 2, k = (_ + b) / 2;
|
|
7644
7644
|
if (l > 0) {
|
|
7645
7645
|
let M = a - i, C = o - t;
|
|
7646
7646
|
const v = Math.abs((e - a) * C - (s - o) * M), A = Math.abs((r - a) * C - (n - o) * M);
|
|
7647
|
-
if (v >
|
|
7647
|
+
if (v > Xe && A > Xe) {
|
|
7648
7648
|
if ((v + A) * (v + A) <= c * (M * M + C * C)) {
|
|
7649
7649
|
h.push(S, k);
|
|
7650
7650
|
return;
|
|
7651
7651
|
}
|
|
7652
|
-
} else if (v >
|
|
7652
|
+
} else if (v > Xe) {
|
|
7653
7653
|
if (v * v <= c * (M * M + C * C)) {
|
|
7654
7654
|
h.push(S, k);
|
|
7655
7655
|
return;
|
|
7656
7656
|
}
|
|
7657
|
-
} else if (A >
|
|
7657
|
+
} else if (A > Xe) {
|
|
7658
7658
|
if (A * A <= c * (M * M + C * C)) {
|
|
7659
7659
|
h.push(S, k);
|
|
7660
7660
|
return;
|
|
@@ -7664,7 +7664,7 @@ function Hi(i, t, e, s, r, n, a, o, h, c, l) {
|
|
|
7664
7664
|
return;
|
|
7665
7665
|
}
|
|
7666
7666
|
}
|
|
7667
|
-
|
|
7667
|
+
zi(i, t, u, d, y, _, S, k, h, c, l + 1), zi(S, k, x, b, g, m, a, o, h, c, l + 1);
|
|
7668
7668
|
}
|
|
7669
7669
|
const eh = 8, ih = 11920929e-14, sh = 1;
|
|
7670
7670
|
function rh(i, t, e, s, r, n, a, o) {
|
|
@@ -7677,9 +7677,9 @@ function rh(i, t, e, s, r, n, a, o) {
|
|
|
7677
7677
|
return l *= l, nh(t, e, s, r, n, a, i, l), i;
|
|
7678
7678
|
}
|
|
7679
7679
|
function nh(i, t, e, s, r, n, a, o) {
|
|
7680
|
-
|
|
7680
|
+
Hi(a, i, t, e, s, r, n, o, 0), a.push(r, n);
|
|
7681
7681
|
}
|
|
7682
|
-
function
|
|
7682
|
+
function Hi(i, t, e, s, r, n, a, o, h) {
|
|
7683
7683
|
if (h > eh)
|
|
7684
7684
|
return;
|
|
7685
7685
|
const c = (t + s) / 2, l = (e + r) / 2, u = (s + n) / 2, d = (r + a) / 2, p = (c + u) / 2, f = (l + d) / 2;
|
|
@@ -7694,7 +7694,7 @@ function Wi(i, t, e, s, r, n, a, o, h) {
|
|
|
7694
7694
|
i.push(p, f);
|
|
7695
7695
|
return;
|
|
7696
7696
|
}
|
|
7697
|
-
|
|
7697
|
+
Hi(i, t, e, c, l, p, f, o, h + 1), Hi(i, p, f, u, d, n, a, o, h + 1);
|
|
7698
7698
|
}
|
|
7699
7699
|
function Zr(i, t, e, s, r, n, a, o) {
|
|
7700
7700
|
let h = Math.abs(r - n);
|
|
@@ -7723,12 +7723,12 @@ function ah(i, t, e, s, r, n) {
|
|
|
7723
7723
|
c * l > u * h
|
|
7724
7724
|
);
|
|
7725
7725
|
}
|
|
7726
|
-
const
|
|
7726
|
+
const Ce = Math.PI * 2, Si = {
|
|
7727
7727
|
centerX: 0,
|
|
7728
7728
|
centerY: 0,
|
|
7729
7729
|
ang1: 0,
|
|
7730
7730
|
ang2: 0
|
|
7731
|
-
},
|
|
7731
|
+
}, Ci = ({ x: i, y: t }, e, s, r, n, a, o, h) => {
|
|
7732
7732
|
i *= e, t *= s;
|
|
7733
7733
|
const c = r * i - n * t, l = n * i + r * t;
|
|
7734
7734
|
return h.x = c + a, h.y = l + o, h;
|
|
@@ -7750,7 +7750,7 @@ function oh(i, t) {
|
|
|
7750
7750
|
}
|
|
7751
7751
|
];
|
|
7752
7752
|
}
|
|
7753
|
-
const
|
|
7753
|
+
const Hs = (i, t, e, s) => {
|
|
7754
7754
|
const r = i * s - t * e < 0 ? -1 : 1;
|
|
7755
7755
|
let n = i * e + t * s;
|
|
7756
7756
|
return n > 1 && (n = 1), n < -1 && (n = -1), r * Math.acos(n);
|
|
@@ -7758,14 +7758,14 @@ const Ws = (i, t, e, s) => {
|
|
|
7758
7758
|
const p = Math.pow(r, 2), f = Math.pow(n, 2), g = Math.pow(l, 2), m = Math.pow(u, 2);
|
|
7759
7759
|
let y = p * f - p * m - f * g;
|
|
7760
7760
|
y < 0 && (y = 0), y /= p * m + f * g, y = Math.sqrt(y) * (a === o ? -1 : 1);
|
|
7761
|
-
const _ = y * r / n * u, x = y * -n / r * l, b = c * _ - h * x + (i + e) / 2, S = h * _ + c * x + (t + s) / 2, k = (l - _) / r, M = (u - x) / n, C = (-l - _) / r, v = (-u - x) / n, A =
|
|
7762
|
-
let j =
|
|
7763
|
-
o === 0 && j > 0 && (j -=
|
|
7761
|
+
const _ = y * r / n * u, x = y * -n / r * l, b = c * _ - h * x + (i + e) / 2, S = h * _ + c * x + (t + s) / 2, k = (l - _) / r, M = (u - x) / n, C = (-l - _) / r, v = (-u - x) / n, A = Hs(1, 0, k, M);
|
|
7762
|
+
let j = Hs(k, M, C, v);
|
|
7763
|
+
o === 0 && j > 0 && (j -= Ce), o === 1 && j < 0 && (j += Ce), d.centerX = b, d.centerY = S, d.ang1 = A, d.ang2 = j;
|
|
7764
7764
|
};
|
|
7765
7765
|
function lh(i, t, e, s, r, n, a, o = 0, h = 0, c = 0) {
|
|
7766
7766
|
if (n === 0 || a === 0)
|
|
7767
7767
|
return;
|
|
7768
|
-
const l = Math.sin(o *
|
|
7768
|
+
const l = Math.sin(o * Ce / 360), u = Math.cos(o * Ce / 360), d = u * (t - s) / 2 + l * (e - r) / 2, p = -l * (t - s) / 2 + u * (e - r) / 2;
|
|
7769
7769
|
if (d === 0 && p === 0)
|
|
7770
7770
|
return;
|
|
7771
7771
|
n = Math.abs(n), a = Math.abs(a);
|
|
@@ -7783,18 +7783,18 @@ function lh(i, t, e, s, r, n, a, o = 0, h = 0, c = 0) {
|
|
|
7783
7783
|
u,
|
|
7784
7784
|
d,
|
|
7785
7785
|
p,
|
|
7786
|
-
|
|
7786
|
+
Si
|
|
7787
7787
|
);
|
|
7788
|
-
let { ang1: g, ang2: m } =
|
|
7789
|
-
const { centerX: y, centerY: _ } =
|
|
7790
|
-
let x = Math.abs(m) / (
|
|
7788
|
+
let { ang1: g, ang2: m } = Si;
|
|
7789
|
+
const { centerX: y, centerY: _ } = Si;
|
|
7790
|
+
let x = Math.abs(m) / (Ce / 4);
|
|
7791
7791
|
Math.abs(1 - x) < 1e-7 && (x = 1);
|
|
7792
7792
|
const b = Math.max(Math.ceil(x), 1);
|
|
7793
7793
|
m /= b;
|
|
7794
7794
|
let S = i[i.length - 2], k = i[i.length - 1];
|
|
7795
7795
|
const M = { x: 0, y: 0 };
|
|
7796
7796
|
for (let C = 0; C < b; C++) {
|
|
7797
|
-
const v = oh(g, m), { x: A, y: j } =
|
|
7797
|
+
const v = oh(g, m), { x: A, y: j } = Ci(v[0], n, a, u, l, y, _, M), { x: Mt, y: R } = Ci(v[1], n, a, u, l, y, _, M), { x: E, y: z } = Ci(v[2], n, a, u, l, y, _, M);
|
|
7798
7798
|
Kr(
|
|
7799
7799
|
i,
|
|
7800
7800
|
S,
|
|
@@ -8065,7 +8065,7 @@ class fh {
|
|
|
8065
8065
|
* @returns The instance of the current object for chaining.
|
|
8066
8066
|
*/
|
|
8067
8067
|
circle(t, e, s, r) {
|
|
8068
|
-
return this.drawShape(new
|
|
8068
|
+
return this.drawShape(new Ji(t, e, s), r), this;
|
|
8069
8069
|
}
|
|
8070
8070
|
/**
|
|
8071
8071
|
* Draws a polygon shape. This method allows for the creation of complex polygons by specifying a sequence of points.
|
|
@@ -8076,7 +8076,7 @@ class fh {
|
|
|
8076
8076
|
* @returns The instance of the current object for chaining.
|
|
8077
8077
|
*/
|
|
8078
8078
|
poly(t, e, s) {
|
|
8079
|
-
const r = new
|
|
8079
|
+
const r = new Se(t);
|
|
8080
8080
|
return r.closePath = e, this.drawShape(r, s), this;
|
|
8081
8081
|
}
|
|
8082
8082
|
/**
|
|
@@ -8201,7 +8201,7 @@ class fh {
|
|
|
8201
8201
|
* @returns The instance of the current object for chaining.
|
|
8202
8202
|
*/
|
|
8203
8203
|
ellipse(t, e, s, r, n) {
|
|
8204
|
-
return this.drawShape(new
|
|
8204
|
+
return this.drawShape(new Qi(t, e, s, r), n), this;
|
|
8205
8205
|
}
|
|
8206
8206
|
/**
|
|
8207
8207
|
* Draws a rectangle with rounded corners.
|
|
@@ -8216,7 +8216,7 @@ class fh {
|
|
|
8216
8216
|
* @returns The instance of the current object for chaining.
|
|
8217
8217
|
*/
|
|
8218
8218
|
roundRect(t, e, s, r, n, a) {
|
|
8219
|
-
return this.drawShape(new
|
|
8219
|
+
return this.drawShape(new ts(t, e, s, r, n), a), this;
|
|
8220
8220
|
}
|
|
8221
8221
|
/**
|
|
8222
8222
|
* Draws a given shape on the canvas.
|
|
@@ -8239,7 +8239,7 @@ class fh {
|
|
|
8239
8239
|
*/
|
|
8240
8240
|
startPoly(t, e) {
|
|
8241
8241
|
let s = this._currentPoly;
|
|
8242
|
-
return s && this.endPoly(), s = new
|
|
8242
|
+
return s && this.endPoly(), s = new Se(), s.points.push(t, e), this._currentPoly = s, this;
|
|
8243
8243
|
}
|
|
8244
8244
|
/**
|
|
8245
8245
|
* Ends the current polygon path. If `closePath` is set to true,
|
|
@@ -8254,7 +8254,7 @@ class fh {
|
|
|
8254
8254
|
return e && e.points.length > 2 && (e.closePath = t, this.shapePrimitives.push({ shape: e })), this._currentPoly = null, this;
|
|
8255
8255
|
}
|
|
8256
8256
|
_ensurePoly(t = !0) {
|
|
8257
|
-
if (!this._currentPoly && (this._currentPoly = new
|
|
8257
|
+
if (!this._currentPoly && (this._currentPoly = new Se(), t)) {
|
|
8258
8258
|
const e = this.shapePrimitives[this.shapePrimitives.length - 1];
|
|
8259
8259
|
if (e) {
|
|
8260
8260
|
let s = e.shape.x, r = e.shape.y;
|
|
@@ -8289,7 +8289,7 @@ class fh {
|
|
|
8289
8289
|
return t;
|
|
8290
8290
|
}
|
|
8291
8291
|
}
|
|
8292
|
-
class
|
|
8292
|
+
class ae {
|
|
8293
8293
|
/**
|
|
8294
8294
|
* Creates a `GraphicsPath` instance optionally from an SVG path string or an array of `PathInstruction`.
|
|
8295
8295
|
* @param instructions - An SVG path string or an array of `PathInstruction` objects.
|
|
@@ -8471,7 +8471,7 @@ class oe {
|
|
|
8471
8471
|
* @returns A new `GraphicsPath` instance that is a clone of the current instance.
|
|
8472
8472
|
*/
|
|
8473
8473
|
clone(t = !1) {
|
|
8474
|
-
const e = new
|
|
8474
|
+
const e = new ae();
|
|
8475
8475
|
if (!t)
|
|
8476
8476
|
e.instructions = this.instructions.slice();
|
|
8477
8477
|
else
|
|
@@ -8520,22 +8520,22 @@ class oe {
|
|
|
8520
8520
|
h = _[5], c = _[6], f = _[0], g = _[1], _[0] = e * f + r * g, _[1] = s * f + n * g, _[5] = e * h + r * c + a, _[6] = s * h + n * c + o;
|
|
8521
8521
|
break;
|
|
8522
8522
|
case "circle":
|
|
8523
|
-
_[4] =
|
|
8523
|
+
_[4] = ye(_[3], t);
|
|
8524
8524
|
break;
|
|
8525
8525
|
case "rect":
|
|
8526
|
-
_[4] =
|
|
8526
|
+
_[4] = ye(_[4], t);
|
|
8527
8527
|
break;
|
|
8528
8528
|
case "ellipse":
|
|
8529
|
-
_[8] =
|
|
8529
|
+
_[8] = ye(_[8], t);
|
|
8530
8530
|
break;
|
|
8531
8531
|
case "roundRect":
|
|
8532
|
-
_[5] =
|
|
8532
|
+
_[5] = ye(_[5], t);
|
|
8533
8533
|
break;
|
|
8534
8534
|
case "addPath":
|
|
8535
8535
|
_[0].transform(t);
|
|
8536
8536
|
break;
|
|
8537
8537
|
case "poly":
|
|
8538
|
-
_[2] =
|
|
8538
|
+
_[2] = ye(_[2], t);
|
|
8539
8539
|
break;
|
|
8540
8540
|
default:
|
|
8541
8541
|
it("unknown transform action", y.action);
|
|
@@ -8592,7 +8592,7 @@ class oe {
|
|
|
8592
8592
|
return t;
|
|
8593
8593
|
}
|
|
8594
8594
|
}
|
|
8595
|
-
function
|
|
8595
|
+
function ye(i, t) {
|
|
8596
8596
|
return i ? i.prepend(t) : t.clone();
|
|
8597
8597
|
}
|
|
8598
8598
|
function ph(i, t) {
|
|
@@ -8602,7 +8602,7 @@ function ph(i, t) {
|
|
|
8602
8602
|
}
|
|
8603
8603
|
const e = {
|
|
8604
8604
|
context: t,
|
|
8605
|
-
path: new
|
|
8605
|
+
path: new ae()
|
|
8606
8606
|
};
|
|
8607
8607
|
return Jr(i, e, null, null), t;
|
|
8608
8608
|
}
|
|
@@ -8612,19 +8612,19 @@ function Jr(i, t, e, s) {
|
|
|
8612
8612
|
let o, h, c, l, u, d, p, f, g, m, y, _, x, b, S, k, M;
|
|
8613
8613
|
switch (i.nodeName.toLowerCase()) {
|
|
8614
8614
|
case "path":
|
|
8615
|
-
b = i.getAttribute("d"), S = new
|
|
8615
|
+
b = i.getAttribute("d"), S = new ae(b), t.context.path(S), e && t.context.fill(), s && t.context.stroke();
|
|
8616
8616
|
break;
|
|
8617
8617
|
case "circle":
|
|
8618
|
-
p =
|
|
8618
|
+
p = K(i, "cx", 0), f = K(i, "cy", 0), g = K(i, "r", 0), t.context.ellipse(p, f, g, g), e && t.context.fill(), s && t.context.stroke();
|
|
8619
8619
|
break;
|
|
8620
8620
|
case "rect":
|
|
8621
|
-
o =
|
|
8621
|
+
o = K(i, "x", 0), h = K(i, "y", 0), k = K(i, "width", 0), M = K(i, "height", 0), m = K(i, "rx", 0), y = K(i, "ry", 0), m || y ? t.context.roundRect(o, h, k, M, m || y) : t.context.rect(o, h, k, M), e && t.context.fill(), s && t.context.stroke();
|
|
8622
8622
|
break;
|
|
8623
8623
|
case "ellipse":
|
|
8624
|
-
p =
|
|
8624
|
+
p = K(i, "cx", 0), f = K(i, "cy", 0), m = K(i, "rx", 0), y = K(i, "ry", 0), t.context.beginPath(), t.context.ellipse(p, f, m, y), e && t.context.fill(), s && t.context.stroke();
|
|
8625
8625
|
break;
|
|
8626
8626
|
case "line":
|
|
8627
|
-
c =
|
|
8627
|
+
c = K(i, "x1", 0), l = K(i, "y1", 0), u = K(i, "x2", 0), d = K(i, "y2", 0), t.context.beginPath(), t.context.moveTo(c, l), t.context.lineTo(u, d), s && t.context.stroke();
|
|
8628
8628
|
break;
|
|
8629
8629
|
case "polygon":
|
|
8630
8630
|
x = i.getAttribute("points"), _ = x.match(/\d+/g).map((C) => parseInt(C, 10)), t.context.poly(_, !0), e && t.context.fill(), s && t.context.stroke();
|
|
@@ -8643,7 +8643,7 @@ function Jr(i, t, e, s) {
|
|
|
8643
8643
|
for (let C = 0; C < r.length; C++)
|
|
8644
8644
|
Jr(r[C], t, e, s);
|
|
8645
8645
|
}
|
|
8646
|
-
function
|
|
8646
|
+
function K(i, t, e) {
|
|
8647
8647
|
const s = i.getAttribute(t);
|
|
8648
8648
|
return s ? Number(s) : e;
|
|
8649
8649
|
}
|
|
@@ -8677,7 +8677,7 @@ function mh(i) {
|
|
|
8677
8677
|
}
|
|
8678
8678
|
} else {
|
|
8679
8679
|
const a = i.getAttribute("stroke");
|
|
8680
|
-
a && a !== "none" && (n = !0, e.color = J.shared.setValue(a).toNumber(), e.width =
|
|
8680
|
+
a && a !== "none" && (n = !0, e.color = J.shared.setValue(a).toNumber(), e.width = K(i, "stroke-width", 1));
|
|
8681
8681
|
const o = i.getAttribute("fill");
|
|
8682
8682
|
o && o !== "none" && (r = !0, s.color = J.shared.setValue(o).toNumber());
|
|
8683
8683
|
}
|
|
@@ -8686,7 +8686,7 @@ function mh(i) {
|
|
|
8686
8686
|
fillStyle: r ? s : null
|
|
8687
8687
|
};
|
|
8688
8688
|
}
|
|
8689
|
-
const Qr = class
|
|
8689
|
+
const Qr = class Wi {
|
|
8690
8690
|
constructor(t, e, s, r) {
|
|
8691
8691
|
this.uid = et("fillGradient"), this.type = "linear", this.gradientStops = [], this.x0 = t, this.y0 = e, this.x1 = s, this.y1 = r;
|
|
8692
8692
|
}
|
|
@@ -8695,15 +8695,15 @@ const Qr = class Ni {
|
|
|
8695
8695
|
}
|
|
8696
8696
|
// TODO move to the system!
|
|
8697
8697
|
buildLinearGradient() {
|
|
8698
|
-
const t =
|
|
8698
|
+
const t = Wi.defaultTextureSize, { gradientStops: e } = this, s = Y.get().createCanvas();
|
|
8699
8699
|
s.width = t, s.height = t;
|
|
8700
|
-
const r = s.getContext("2d"), n = r.createLinearGradient(0, 0,
|
|
8700
|
+
const r = s.getContext("2d"), n = r.createLinearGradient(0, 0, Wi.defaultTextureSize, 1);
|
|
8701
8701
|
for (let g = 0; g < e.length; g++) {
|
|
8702
8702
|
const m = e[g];
|
|
8703
8703
|
n.addColorStop(m.offset, m.color);
|
|
8704
8704
|
}
|
|
8705
8705
|
r.fillStyle = n, r.fillRect(0, 0, t, t), this.texture = new L({
|
|
8706
|
-
source: new
|
|
8706
|
+
source: new Be({
|
|
8707
8707
|
resource: s,
|
|
8708
8708
|
addressModeU: "clamp-to-edge",
|
|
8709
8709
|
addressModeV: "repeat"
|
|
@@ -8715,7 +8715,7 @@ const Qr = class Ni {
|
|
|
8715
8715
|
};
|
|
8716
8716
|
Qr.defaultTextureSize = 256;
|
|
8717
8717
|
let tn = Qr;
|
|
8718
|
-
const
|
|
8718
|
+
const Ws = {
|
|
8719
8719
|
repeat: {
|
|
8720
8720
|
addressModeU: "repeat",
|
|
8721
8721
|
addressModeV: "repeat"
|
|
@@ -8738,7 +8738,7 @@ class gh {
|
|
|
8738
8738
|
this.uid = et("fillPattern"), this.transform = new D(), this.texture = t, this.transform.scale(
|
|
8739
8739
|
1 / t.frame.width,
|
|
8740
8740
|
1 / t.frame.height
|
|
8741
|
-
), e && (t.source.style.addressModeU =
|
|
8741
|
+
), e && (t.source.style.addressModeU = Ws[e].addressModeU, t.source.style.addressModeV = Ws[e].addressModeV);
|
|
8742
8742
|
}
|
|
8743
8743
|
setTransform(t) {
|
|
8744
8744
|
const e = this.texture;
|
|
@@ -8794,9 +8794,9 @@ function Lt(i, t) {
|
|
|
8794
8794
|
const n = J.shared.setValue(r.color);
|
|
8795
8795
|
return r.alpha *= n.alpha, r.color = n.toNumber(), r.matrix = r.matrix ? r.matrix.clone() : null, r;
|
|
8796
8796
|
}
|
|
8797
|
-
const yh = new st(),
|
|
8797
|
+
const yh = new st(), Ns = new D(), ss = class At extends Bt {
|
|
8798
8798
|
constructor() {
|
|
8799
|
-
super(...arguments), this.uid = et("graphicsContext"), this.dirty = !0, this.batchMode = "auto", this.instructions = [], this._activePath = new
|
|
8799
|
+
super(...arguments), this.uid = et("graphicsContext"), this.dirty = !0, this.batchMode = "auto", this.instructions = [], this._activePath = new ae(), this._transform = new D(), this._fillStyle = { ...At.defaultFillStyle }, this._strokeStyle = { ...At.defaultStrokeStyle }, this._stateStack = [], this._tick = 0, this._bounds = new St(), this._boundsDirty = !0;
|
|
8800
8800
|
}
|
|
8801
8801
|
/**
|
|
8802
8802
|
* Creates a new GraphicsContext object that is a clone of this instance, copying all properties,
|
|
@@ -8866,12 +8866,12 @@ const yh = new st(), Ys = new D(), rs = class At extends Bt {
|
|
|
8866
8866
|
* @returns The instance of the current GraphicsContext for method chaining.
|
|
8867
8867
|
*/
|
|
8868
8868
|
beginPath() {
|
|
8869
|
-
return this._activePath = new
|
|
8869
|
+
return this._activePath = new ae(), this;
|
|
8870
8870
|
}
|
|
8871
8871
|
fill(t, e) {
|
|
8872
8872
|
let s;
|
|
8873
8873
|
const r = this.instructions[this.instructions.length - 1];
|
|
8874
|
-
return this._tick === 0 && r && r.action === "stroke" ? s = r.data.path : s = this._activePath.clone(), s ? (t != null && (e !== void 0 && typeof t == "number" && (
|
|
8874
|
+
return this._tick === 0 && r && r.action === "stroke" ? s = r.data.path : s = this._activePath.clone(), s ? (t != null && (e !== void 0 && typeof t == "number" && (q($, "GraphicsContext.fill(color, alpha) is deprecated, use GraphicsContext.fill({ color, alpha }) instead"), t = { color: t, alpha: e }), this._fillStyle = Lt(t, At.defaultFillStyle)), this.instructions.push({
|
|
8875
8875
|
action: "fill",
|
|
8876
8876
|
// TODO copy fill style!
|
|
8877
8877
|
data: { style: this.fillStyle, path: s }
|
|
@@ -9280,7 +9280,7 @@ const yh = new st(), Ys = new D(), rs = class At extends Bt {
|
|
|
9280
9280
|
return t instanceof D ? (this._transform.set(t.a, t.b, t.c, t.d, t.tx, t.ty), this) : (this._transform.set(t, e, s, r, n, a), this);
|
|
9281
9281
|
}
|
|
9282
9282
|
transform(t, e, s, r, n, a) {
|
|
9283
|
-
return t instanceof D ? (this._transform.append(t), this) : (
|
|
9283
|
+
return t instanceof D ? (this._transform.append(t), this) : (Ns.set(t, e, s, r, n, a), this._transform.append(Ns), this);
|
|
9284
9284
|
}
|
|
9285
9285
|
/**
|
|
9286
9286
|
* Applies a translation transformation to the graphics context, moving the origin by the specified amounts.
|
|
@@ -9379,7 +9379,7 @@ const yh = new st(), Ys = new D(), rs = class At extends Bt {
|
|
|
9379
9379
|
this._fillStyle = null, this._strokeStyle = null, this.instructions = null, this._activePath = null, this._bounds = null, this._stateStack = null, this.customShader = null, this._transform = null;
|
|
9380
9380
|
}
|
|
9381
9381
|
};
|
|
9382
|
-
|
|
9382
|
+
ss.defaultFillStyle = {
|
|
9383
9383
|
/** The color to use for the fill. */
|
|
9384
9384
|
color: 16777215,
|
|
9385
9385
|
/** The alpha value to use for the fill. */
|
|
@@ -9391,7 +9391,7 @@ rs.defaultFillStyle = {
|
|
|
9391
9391
|
/** The fill pattern to use. */
|
|
9392
9392
|
fill: null
|
|
9393
9393
|
};
|
|
9394
|
-
|
|
9394
|
+
ss.defaultStrokeStyle = {
|
|
9395
9395
|
/** The width of the stroke. */
|
|
9396
9396
|
width: 1,
|
|
9397
9397
|
/** The color to use for the stroke. */
|
|
@@ -9413,13 +9413,13 @@ rs.defaultStrokeStyle = {
|
|
|
9413
9413
|
/** The fill pattern to use. */
|
|
9414
9414
|
fill: null
|
|
9415
9415
|
};
|
|
9416
|
-
let Dt =
|
|
9417
|
-
function
|
|
9416
|
+
let Dt = ss;
|
|
9417
|
+
function rs(i, t = 1) {
|
|
9418
9418
|
var s;
|
|
9419
|
-
const e = (s =
|
|
9419
|
+
const e = (s = oe.RETINA_PREFIX) == null ? void 0 : s.exec(i);
|
|
9420
9420
|
return e ? parseFloat(e[1]) : t;
|
|
9421
9421
|
}
|
|
9422
|
-
function
|
|
9422
|
+
function ns(i, t, e) {
|
|
9423
9423
|
i.label = e, i._sourceOrigin = e;
|
|
9424
9424
|
const s = new L({
|
|
9425
9425
|
source: i,
|
|
@@ -9444,7 +9444,7 @@ const _h = ".svg", xh = "image/svg+xml", bh = {
|
|
|
9444
9444
|
parseAsGraphicsContext: !1
|
|
9445
9445
|
},
|
|
9446
9446
|
test(i) {
|
|
9447
|
-
return
|
|
9447
|
+
return he(i, xh) || le(i, _h);
|
|
9448
9448
|
},
|
|
9449
9449
|
async load(i, t, e) {
|
|
9450
9450
|
return t.data.parseAsGraphicsContext ?? this.config.parseAsGraphicsContext ? vh(i) : wh(i, t, e, this.config.crossOrigin);
|
|
@@ -9455,20 +9455,20 @@ const _h = ".svg", xh = "image/svg+xml", bh = {
|
|
|
9455
9455
|
};
|
|
9456
9456
|
async function wh(i, t, e, s) {
|
|
9457
9457
|
var m, y, _;
|
|
9458
|
-
const n = await (await
|
|
9458
|
+
const n = await (await Y.get().fetch(i)).blob(), a = URL.createObjectURL(n), o = new Image();
|
|
9459
9459
|
o.src = a, o.crossOrigin = s, await o.decode(), URL.revokeObjectURL(a);
|
|
9460
|
-
const h = document.createElement("canvas"), c = h.getContext("2d"), l = ((m = t.data) == null ? void 0 : m.resolution) ||
|
|
9460
|
+
const h = document.createElement("canvas"), c = h.getContext("2d"), l = ((m = t.data) == null ? void 0 : m.resolution) || rs(i), u = ((y = t.data) == null ? void 0 : y.width) ?? o.width, d = ((_ = t.data) == null ? void 0 : _.height) ?? o.height;
|
|
9461
9461
|
h.width = u * l, h.height = d * l, c.drawImage(o, 0, 0, u * l, d * l);
|
|
9462
|
-
const { parseAsGraphicsContext: p, ...f } = t.data, g = new
|
|
9462
|
+
const { parseAsGraphicsContext: p, ...f } = t.data, g = new Be({
|
|
9463
9463
|
resource: h,
|
|
9464
9464
|
alphaMode: "premultiply-alpha-on-upload",
|
|
9465
9465
|
resolution: l,
|
|
9466
9466
|
...f
|
|
9467
9467
|
});
|
|
9468
|
-
return
|
|
9468
|
+
return ns(g, e, i);
|
|
9469
9469
|
}
|
|
9470
9470
|
async function vh(i) {
|
|
9471
|
-
const e = await (await
|
|
9471
|
+
const e = await (await Y.get().fetch(i)).text(), s = new Dt();
|
|
9472
9472
|
return s.svg(e), s;
|
|
9473
9473
|
}
|
|
9474
9474
|
const Ah = `(function () {
|
|
@@ -9493,13 +9493,13 @@ const Ah = `(function () {
|
|
|
9493
9493
|
|
|
9494
9494
|
})();
|
|
9495
9495
|
`;
|
|
9496
|
-
let
|
|
9496
|
+
let ie = null, Ni = class {
|
|
9497
9497
|
constructor() {
|
|
9498
|
-
|
|
9498
|
+
ie || (ie = URL.createObjectURL(new Blob([Ah], { type: "application/javascript" }))), this.worker = new Worker(ie);
|
|
9499
9499
|
}
|
|
9500
9500
|
};
|
|
9501
|
-
|
|
9502
|
-
|
|
9501
|
+
Ni.revokeObjectURL = function() {
|
|
9502
|
+
ie && (URL.revokeObjectURL(ie), ie = null);
|
|
9503
9503
|
};
|
|
9504
9504
|
const Sh = `(function () {
|
|
9505
9505
|
'use strict';
|
|
@@ -9532,25 +9532,25 @@ const Sh = `(function () {
|
|
|
9532
9532
|
|
|
9533
9533
|
})();
|
|
9534
9534
|
`;
|
|
9535
|
-
let
|
|
9535
|
+
let se = null;
|
|
9536
9536
|
class en {
|
|
9537
9537
|
constructor() {
|
|
9538
|
-
|
|
9538
|
+
se || (se = URL.createObjectURL(new Blob([Sh], { type: "application/javascript" }))), this.worker = new Worker(se);
|
|
9539
9539
|
}
|
|
9540
9540
|
}
|
|
9541
9541
|
en.revokeObjectURL = function() {
|
|
9542
|
-
|
|
9542
|
+
se && (URL.revokeObjectURL(se), se = null);
|
|
9543
9543
|
};
|
|
9544
|
-
let
|
|
9544
|
+
let Ys = 0, Mi;
|
|
9545
9545
|
class Ch {
|
|
9546
9546
|
constructor() {
|
|
9547
9547
|
this._initialized = !1, this._createdWorkers = 0, this._workerPool = [], this._queue = [], this._resolveHash = {};
|
|
9548
9548
|
}
|
|
9549
9549
|
isImageBitmapSupported() {
|
|
9550
9550
|
return this._isImageBitmapSupported !== void 0 ? this._isImageBitmapSupported : (this._isImageBitmapSupported = new Promise((t) => {
|
|
9551
|
-
const { worker: e } = new
|
|
9551
|
+
const { worker: e } = new Ni();
|
|
9552
9552
|
e.addEventListener("message", (s) => {
|
|
9553
|
-
e.terminate(),
|
|
9553
|
+
e.terminate(), Ni.revokeObjectURL(), t(s.data);
|
|
9554
9554
|
});
|
|
9555
9555
|
}), this._isImageBitmapSupported);
|
|
9556
9556
|
}
|
|
@@ -9561,9 +9561,9 @@ class Ch {
|
|
|
9561
9561
|
this._initialized || (this._initialized = !0);
|
|
9562
9562
|
}
|
|
9563
9563
|
_getWorker() {
|
|
9564
|
-
|
|
9564
|
+
Mi === void 0 && (Mi = navigator.hardwareConcurrency || 4);
|
|
9565
9565
|
let t = this._workerPool.pop();
|
|
9566
|
-
return !t && this._createdWorkers <
|
|
9566
|
+
return !t && this._createdWorkers < Mi && (this._createdWorkers++, t = new en().worker, t.addEventListener("message", (e) => {
|
|
9567
9567
|
this._complete(e.data), this._returnWorker(e.target), this._next();
|
|
9568
9568
|
})), t;
|
|
9569
9569
|
}
|
|
@@ -9587,9 +9587,9 @@ class Ch {
|
|
|
9587
9587
|
if (!t)
|
|
9588
9588
|
return;
|
|
9589
9589
|
const e = this._queue.pop(), s = e.id;
|
|
9590
|
-
this._resolveHash[
|
|
9590
|
+
this._resolveHash[Ys] = { resolve: e.resolve, reject: e.reject }, t.postMessage({
|
|
9591
9591
|
data: e.arguments,
|
|
9592
|
-
uuid:
|
|
9592
|
+
uuid: Ys++,
|
|
9593
9593
|
id: s
|
|
9594
9594
|
});
|
|
9595
9595
|
}
|
|
@@ -9601,7 +9601,7 @@ const Vs = new Ch(), Mh = [".jpeg", ".jpg", ".png", ".webp", ".avif"], Th = [
|
|
|
9601
9601
|
"image/avif"
|
|
9602
9602
|
];
|
|
9603
9603
|
async function Ph(i) {
|
|
9604
|
-
const t = await
|
|
9604
|
+
const t = await Y.get().fetch(i);
|
|
9605
9605
|
if (!t.ok)
|
|
9606
9606
|
throw new Error(`[loadImageBitmap] Failed to fetch ${i}: ${t.status} ${t.statusText}`);
|
|
9607
9607
|
const e = await t.blob();
|
|
@@ -9619,7 +9619,7 @@ const sn = {
|
|
|
9619
9619
|
crossOrigin: "anonymous"
|
|
9620
9620
|
},
|
|
9621
9621
|
test(i) {
|
|
9622
|
-
return
|
|
9622
|
+
return he(i, Th) || le(i, Mh);
|
|
9623
9623
|
},
|
|
9624
9624
|
async load(i, t, e) {
|
|
9625
9625
|
var n;
|
|
@@ -9629,13 +9629,13 @@ const sn = {
|
|
|
9629
9629
|
a(s);
|
|
9630
9630
|
};
|
|
9631
9631
|
});
|
|
9632
|
-
const r = new
|
|
9632
|
+
const r = new Be({
|
|
9633
9633
|
resource: s,
|
|
9634
9634
|
alphaMode: "premultiply-alpha-on-upload",
|
|
9635
|
-
resolution: ((n = t.data) == null ? void 0 : n.resolution) ||
|
|
9635
|
+
resolution: ((n = t.data) == null ? void 0 : n.resolution) || rs(i),
|
|
9636
9636
|
...t.data
|
|
9637
9637
|
});
|
|
9638
|
-
return
|
|
9638
|
+
return ns(r, e, i);
|
|
9639
9639
|
},
|
|
9640
9640
|
unload(i) {
|
|
9641
9641
|
i.destroy(!0);
|
|
@@ -9672,14 +9672,14 @@ const Bh = {
|
|
|
9672
9672
|
},
|
|
9673
9673
|
config: null,
|
|
9674
9674
|
test(i) {
|
|
9675
|
-
const t =
|
|
9675
|
+
const t = he(i, kh), e = le(i, rn);
|
|
9676
9676
|
return t || e;
|
|
9677
9677
|
},
|
|
9678
9678
|
async load(i, t, e) {
|
|
9679
9679
|
var h, c;
|
|
9680
9680
|
const s = {
|
|
9681
|
-
|
|
9682
|
-
resolution: ((h = t.data) == null ? void 0 : h.resolution) ||
|
|
9681
|
+
...$e.defaultOptions,
|
|
9682
|
+
resolution: ((h = t.data) == null ? void 0 : h.resolution) || rs(i),
|
|
9683
9683
|
alphaMode: ((c = t.data) == null ? void 0 : c.alphaMode) || await Pr(),
|
|
9684
9684
|
...t.data
|
|
9685
9685
|
}, r = document.createElement("video"), n = {
|
|
@@ -9700,12 +9700,12 @@ const Bh = {
|
|
|
9700
9700
|
o = i.slice(5, i.indexOf(";"));
|
|
9701
9701
|
else if (!i.startsWith("blob:")) {
|
|
9702
9702
|
const l = i.split("?")[0].slice(i.lastIndexOf(".") + 1).toLowerCase();
|
|
9703
|
-
o =
|
|
9703
|
+
o = $e.MIME_TYPES[l] || `video/${l}`;
|
|
9704
9704
|
}
|
|
9705
9705
|
return a.src = i, o && (a.type = o), new Promise((l) => {
|
|
9706
9706
|
const u = async () => {
|
|
9707
|
-
const d = new
|
|
9708
|
-
r.removeEventListener("canplay", u), t.data.preload && await Eh(r), l(
|
|
9707
|
+
const d = new $e({ ...s, resource: r });
|
|
9708
|
+
r.removeEventListener("canplay", u), t.data.preload && await Eh(r), l(ns(d, e, i));
|
|
9709
9709
|
};
|
|
9710
9710
|
r.addEventListener("canplay", u), r.appendChild(a);
|
|
9711
9711
|
});
|
|
@@ -9719,19 +9719,19 @@ const Bh = {
|
|
|
9719
9719
|
parse: (i) => {
|
|
9720
9720
|
var t;
|
|
9721
9721
|
return {
|
|
9722
|
-
resolution: parseFloat(((t =
|
|
9722
|
+
resolution: parseFloat(((t = oe.RETINA_PREFIX.exec(i)) == null ? void 0 : t[1]) ?? "1"),
|
|
9723
9723
|
format: i.split(".").pop(),
|
|
9724
9724
|
src: i
|
|
9725
9725
|
};
|
|
9726
9726
|
}
|
|
9727
9727
|
}, Fh = {
|
|
9728
9728
|
extension: B.ResolveParser,
|
|
9729
|
-
test: (i) =>
|
|
9729
|
+
test: (i) => oe.RETINA_PREFIX.test(i) && i.endsWith(".json"),
|
|
9730
9730
|
parse: nn.parse
|
|
9731
9731
|
};
|
|
9732
9732
|
class Lh {
|
|
9733
9733
|
constructor() {
|
|
9734
|
-
this._detections = [], this._initialized = !1, this.resolver = new
|
|
9734
|
+
this._detections = [], this._initialized = !1, this.resolver = new oe(), this.loader = new eo(), this.cache = rt, this._backgroundLoader = new ja(this.loader), this._backgroundLoader.active = !0, this.reset();
|
|
9735
9735
|
}
|
|
9736
9736
|
/**
|
|
9737
9737
|
* Best practice is to call this function before any loading commences
|
|
@@ -9807,7 +9807,7 @@ class Lh {
|
|
|
9807
9807
|
}
|
|
9808
9808
|
async load(t, e) {
|
|
9809
9809
|
this._initialized || await this.init();
|
|
9810
|
-
const s =
|
|
9810
|
+
const s = Ke(t), r = gt(t).map((o) => {
|
|
9811
9811
|
if (typeof o != "string") {
|
|
9812
9812
|
const h = this.resolver.getAlias(o);
|
|
9813
9813
|
return h.some((c) => !this.resolver.hasKey(c)) && this.add(o), Array.isArray(h) ? h[0] : h;
|
|
@@ -10106,7 +10106,7 @@ dt.add(
|
|
|
10106
10106
|
nn,
|
|
10107
10107
|
Fh
|
|
10108
10108
|
);
|
|
10109
|
-
const
|
|
10109
|
+
const js = {
|
|
10110
10110
|
loader: B.LoadParser,
|
|
10111
10111
|
resolver: B.ResolveParser,
|
|
10112
10112
|
cache: B.CacheParser,
|
|
@@ -10114,7 +10114,7 @@ const Xs = {
|
|
|
10114
10114
|
};
|
|
10115
10115
|
dt.handle(B.Asset, (i) => {
|
|
10116
10116
|
const t = i.ref;
|
|
10117
|
-
Object.entries(
|
|
10117
|
+
Object.entries(js).filter(([e]) => !!t[e]).forEach(([e, s]) => dt.add(Object.assign(
|
|
10118
10118
|
t[e],
|
|
10119
10119
|
// Allow the function to optionally define it's own
|
|
10120
10120
|
// ExtensionMetadata, the use cases here is priority for LoaderParsers
|
|
@@ -10122,9 +10122,9 @@ dt.handle(B.Asset, (i) => {
|
|
|
10122
10122
|
)));
|
|
10123
10123
|
}, (i) => {
|
|
10124
10124
|
const t = i.ref;
|
|
10125
|
-
Object.keys(
|
|
10125
|
+
Object.keys(js).filter((e) => !!t[e]).forEach((e) => dt.remove(t[e]));
|
|
10126
10126
|
});
|
|
10127
|
-
class
|
|
10127
|
+
class Ze extends O {
|
|
10128
10128
|
/**
|
|
10129
10129
|
* @param options - Options for the Graphics.
|
|
10130
10130
|
*/
|
|
@@ -10396,7 +10396,7 @@ class Je extends O {
|
|
|
10396
10396
|
* @returns - A clone of the graphics object
|
|
10397
10397
|
*/
|
|
10398
10398
|
clone(t = !1) {
|
|
10399
|
-
return t ? new
|
|
10399
|
+
return t ? new Ze(this._context.clone()) : (this._ownedContext = null, new Ze(this._context));
|
|
10400
10400
|
}
|
|
10401
10401
|
// -------- v7 deprecations ---------
|
|
10402
10402
|
/**
|
|
@@ -10406,7 +10406,7 @@ class Je extends O {
|
|
|
10406
10406
|
* @deprecated since 8.0.0 Use {@link Graphics#setStrokeStyle} instead
|
|
10407
10407
|
*/
|
|
10408
10408
|
lineStyle(t, e, s) {
|
|
10409
|
-
|
|
10409
|
+
q($, "Graphics#lineStyle is no longer needed. Use Graphics#setStrokeStyle to set the stroke style.");
|
|
10410
10410
|
const r = {};
|
|
10411
10411
|
return t && (r.width = t), e && (r.color = e), s && (r.alpha = s), this.context.strokeStyle = r, this;
|
|
10412
10412
|
}
|
|
@@ -10416,7 +10416,7 @@ class Je extends O {
|
|
|
10416
10416
|
* @deprecated since 8.0.0 Use {@link Graphics#fill} instead
|
|
10417
10417
|
*/
|
|
10418
10418
|
beginFill(t, e) {
|
|
10419
|
-
|
|
10419
|
+
q($, "Graphics#beginFill is no longer needed. Use Graphics#fill to fill the shape with the desired style.");
|
|
10420
10420
|
const s = {};
|
|
10421
10421
|
return t && (s.color = t), e && (s.alpha = e), this.context.fillStyle = s, this;
|
|
10422
10422
|
}
|
|
@@ -10424,7 +10424,7 @@ class Je extends O {
|
|
|
10424
10424
|
* @deprecated since 8.0.0 Use {@link Graphics#fill} instead
|
|
10425
10425
|
*/
|
|
10426
10426
|
endFill() {
|
|
10427
|
-
|
|
10427
|
+
q($, "Graphics#endFill is no longer needed. Use Graphics#fill to fill the shape with the desired style."), this.context.fill();
|
|
10428
10428
|
const t = this.context.strokeStyle;
|
|
10429
10429
|
return (t.width !== Dt.defaultStrokeStyle.width || t.color !== Dt.defaultStrokeStyle.color || t.alpha !== Dt.defaultStrokeStyle.alpha) && this.context.stroke(), this;
|
|
10430
10430
|
}
|
|
@@ -10433,45 +10433,45 @@ class Je extends O {
|
|
|
10433
10433
|
* @deprecated since 8.0.0 Use {@link Graphics#circle} instead
|
|
10434
10434
|
*/
|
|
10435
10435
|
drawCircle(...t) {
|
|
10436
|
-
return
|
|
10436
|
+
return q($, "Graphics#drawCircle has been renamed to Graphics#circle"), this._callContextMethod("circle", t);
|
|
10437
10437
|
}
|
|
10438
10438
|
/**
|
|
10439
10439
|
* @param {...any} args
|
|
10440
10440
|
* @deprecated since 8.0.0 Use {@link Graphics#ellipse} instead
|
|
10441
10441
|
*/
|
|
10442
10442
|
drawEllipse(...t) {
|
|
10443
|
-
return
|
|
10443
|
+
return q($, "Graphics#drawEllipse has been renamed to Graphics#ellipse"), this._callContextMethod("ellipse", t);
|
|
10444
10444
|
}
|
|
10445
10445
|
/**
|
|
10446
10446
|
* @param {...any} args
|
|
10447
10447
|
* @deprecated since 8.0.0 Use {@link Graphics#poly} instead
|
|
10448
10448
|
*/
|
|
10449
10449
|
drawPolygon(...t) {
|
|
10450
|
-
return
|
|
10450
|
+
return q($, "Graphics#drawPolygon has been renamed to Graphics#poly"), this._callContextMethod("poly", t);
|
|
10451
10451
|
}
|
|
10452
10452
|
/**
|
|
10453
10453
|
* @param {...any} args
|
|
10454
10454
|
* @deprecated since 8.0.0 Use {@link Graphics#rect} instead
|
|
10455
10455
|
*/
|
|
10456
10456
|
drawRect(...t) {
|
|
10457
|
-
return
|
|
10457
|
+
return q($, "Graphics#drawRect has been renamed to Graphics#rect"), this._callContextMethod("rect", t);
|
|
10458
10458
|
}
|
|
10459
10459
|
/**
|
|
10460
10460
|
* @param {...any} args
|
|
10461
10461
|
* @deprecated since 8.0.0 Use {@link Graphics#roundRect} instead
|
|
10462
10462
|
*/
|
|
10463
10463
|
drawRoundedRect(...t) {
|
|
10464
|
-
return
|
|
10464
|
+
return q($, "Graphics#drawRoundedRect has been renamed to Graphics#roundRect"), this._callContextMethod("roundRect", t);
|
|
10465
10465
|
}
|
|
10466
10466
|
/**
|
|
10467
10467
|
* @param {...any} args
|
|
10468
10468
|
* @deprecated since 8.0.0 Use {@link Graphics#star} instead
|
|
10469
10469
|
*/
|
|
10470
10470
|
drawStar(...t) {
|
|
10471
|
-
return
|
|
10471
|
+
return q($, "Graphics#drawStar has been renamed to Graphics#star"), this._callContextMethod("star", t);
|
|
10472
10472
|
}
|
|
10473
10473
|
}
|
|
10474
|
-
class
|
|
10474
|
+
class Re extends xt {
|
|
10475
10475
|
/**
|
|
10476
10476
|
* @param textures - An array of {@link Texture} or frame
|
|
10477
10477
|
* objects that make up the animation.
|
|
@@ -10486,7 +10486,7 @@ class Be extends xt {
|
|
|
10486
10486
|
}
|
|
10487
10487
|
/** Plays the AnimatedSprite. */
|
|
10488
10488
|
play() {
|
|
10489
|
-
this._playing || (this._playing = !0, this._autoUpdate && !this._isConnectedToTicker && (ot.shared.add(this.update, this,
|
|
10489
|
+
this._playing || (this._playing = !0, this._autoUpdate && !this._isConnectedToTicker && (ot.shared.add(this.update, this, Te.HIGH), this._isConnectedToTicker = !0));
|
|
10490
10490
|
}
|
|
10491
10491
|
/**
|
|
10492
10492
|
* Stops the AnimatedSprite and goes to a specific frame.
|
|
@@ -10540,7 +10540,7 @@ class Be extends xt {
|
|
|
10540
10540
|
const e = [];
|
|
10541
10541
|
for (let s = 0; s < t.length; ++s)
|
|
10542
10542
|
e.push(L.from(t[s]));
|
|
10543
|
-
return new
|
|
10543
|
+
return new Re(e);
|
|
10544
10544
|
}
|
|
10545
10545
|
/**
|
|
10546
10546
|
* A short hand way of creating an AnimatedSprite from an array of image ids.
|
|
@@ -10551,7 +10551,7 @@ class Be extends xt {
|
|
|
10551
10551
|
const e = [];
|
|
10552
10552
|
for (let s = 0; s < t.length; ++s)
|
|
10553
10553
|
e.push(L.from(t[s]));
|
|
10554
|
-
return new
|
|
10554
|
+
return new Re(e);
|
|
10555
10555
|
}
|
|
10556
10556
|
/**
|
|
10557
10557
|
* The total number of frames in the AnimatedSprite. This is the same as number of textures
|
|
@@ -10761,7 +10761,7 @@ class Dh extends O {
|
|
|
10761
10761
|
}
|
|
10762
10762
|
function Uh(i, t) {
|
|
10763
10763
|
let e = i[0] ?? {};
|
|
10764
|
-
return (typeof e == "string" || i[1]) && (
|
|
10764
|
+
return (typeof e == "string" || i[1]) && (q($, `use new ${t}({ text: "hi!", style }) instead`), e = {
|
|
10765
10765
|
text: e,
|
|
10766
10766
|
style: i[1]
|
|
10767
10767
|
}), e;
|
|
@@ -10784,7 +10784,7 @@ function Gh(i) {
|
|
|
10784
10784
|
}
|
|
10785
10785
|
return `${i.fontStyle} ${i.fontVariant} ${i.fontWeight} ${t} ${e.join(",")}`;
|
|
10786
10786
|
}
|
|
10787
|
-
const
|
|
10787
|
+
const Ti = {
|
|
10788
10788
|
// TextMetrics requires getImageData readback for measuring fonts.
|
|
10789
10789
|
willReadFrequently: !0
|
|
10790
10790
|
}, wt = class T {
|
|
@@ -10799,7 +10799,7 @@ const Pi = {
|
|
|
10799
10799
|
static get experimentalLetterSpacingSupported() {
|
|
10800
10800
|
let t = T._experimentalLetterSpacingSupported;
|
|
10801
10801
|
if (t !== void 0) {
|
|
10802
|
-
const e =
|
|
10802
|
+
const e = Y.get().getCanvasRenderingContext2D().prototype;
|
|
10803
10803
|
t = T._experimentalLetterSpacingSupported = "letterSpacing" in e || "textLetterSpacing" in e;
|
|
10804
10804
|
}
|
|
10805
10805
|
return t;
|
|
@@ -10873,7 +10873,7 @@ const Pi = {
|
|
|
10873
10873
|
* @returns New string with new lines applied where required
|
|
10874
10874
|
*/
|
|
10875
10875
|
static _wordWrap(t, e, s = T._canvas) {
|
|
10876
|
-
const r = s.getContext("2d",
|
|
10876
|
+
const r = s.getContext("2d", Ti);
|
|
10877
10877
|
let n = 0, a = "", o = "";
|
|
10878
10878
|
const h = /* @__PURE__ */ Object.create(null), { letterSpacing: c, whiteSpace: l } = e, u = T._collapseSpaces(l), d = T._collapseNewlines(l);
|
|
10879
10879
|
let p = !u;
|
|
@@ -11091,12 +11091,12 @@ const Pi = {
|
|
|
11091
11091
|
if (!T.__canvas) {
|
|
11092
11092
|
let t;
|
|
11093
11093
|
try {
|
|
11094
|
-
const e = new OffscreenCanvas(0, 0), s = e.getContext("2d",
|
|
11094
|
+
const e = new OffscreenCanvas(0, 0), s = e.getContext("2d", Ti);
|
|
11095
11095
|
if (s != null && s.measureText)
|
|
11096
11096
|
return T.__canvas = e, e;
|
|
11097
|
-
t =
|
|
11097
|
+
t = Y.get().createCanvas();
|
|
11098
11098
|
} catch {
|
|
11099
|
-
t =
|
|
11099
|
+
t = Y.get().createCanvas();
|
|
11100
11100
|
}
|
|
11101
11101
|
t.width = t.height = 10, T.__canvas = t;
|
|
11102
11102
|
}
|
|
@@ -11107,7 +11107,7 @@ const Pi = {
|
|
|
11107
11107
|
* @ignore
|
|
11108
11108
|
*/
|
|
11109
11109
|
static get _context() {
|
|
11110
|
-
return T.__context || (T.__context = T._canvas.getContext("2d",
|
|
11110
|
+
return T.__context || (T.__context = T._canvas.getContext("2d", Ti)), T.__context;
|
|
11111
11111
|
}
|
|
11112
11112
|
};
|
|
11113
11113
|
wt.METRICS_STRING = "|ÉqÅ";
|
|
@@ -11161,7 +11161,7 @@ wt._breakingSpaces = [
|
|
|
11161
11161
|
];
|
|
11162
11162
|
wt._measurementCache = {};
|
|
11163
11163
|
let an = wt;
|
|
11164
|
-
const
|
|
11164
|
+
const Xs = [
|
|
11165
11165
|
"_fontFamily",
|
|
11166
11166
|
"_fontStyle",
|
|
11167
11167
|
"_fontSize",
|
|
@@ -11183,8 +11183,8 @@ const $s = [
|
|
|
11183
11183
|
function zh(i) {
|
|
11184
11184
|
const t = [];
|
|
11185
11185
|
let e = 0;
|
|
11186
|
-
for (let s = 0; s <
|
|
11187
|
-
const r =
|
|
11186
|
+
for (let s = 0; s < Xs.length; s++) {
|
|
11187
|
+
const r = Xs[s];
|
|
11188
11188
|
t[e++] = i[r];
|
|
11189
11189
|
}
|
|
11190
11190
|
return e = on(i._fill, t, e), e = Hh(i._stroke, t, e), t.join("-");
|
|
@@ -11196,10 +11196,10 @@ function on(i, t, e) {
|
|
|
11196
11196
|
function Hh(i, t, e) {
|
|
11197
11197
|
return i && (e = on(i, t, e), t[e++] = i.width, t[e++] = i.alignment, t[e++] = i.cap, t[e++] = i.join, t[e++] = i.miterLimit), e;
|
|
11198
11198
|
}
|
|
11199
|
-
const
|
|
11199
|
+
const as = class Qt extends Bt {
|
|
11200
11200
|
constructor(t = {}) {
|
|
11201
11201
|
super(), Wh(t);
|
|
11202
|
-
const e = { ...
|
|
11202
|
+
const e = { ...Qt.defaultTextStyle, ...t };
|
|
11203
11203
|
for (const s in e) {
|
|
11204
11204
|
const r = s;
|
|
11205
11205
|
this[r] = e[s];
|
|
@@ -11229,10 +11229,10 @@ const os = class te extends Bt {
|
|
|
11229
11229
|
}
|
|
11230
11230
|
set dropShadow(t) {
|
|
11231
11231
|
t !== null && typeof t == "object" ? this._dropShadow = {
|
|
11232
|
-
...
|
|
11232
|
+
...Qt.defaultDropShadow,
|
|
11233
11233
|
...t
|
|
11234
11234
|
} : this._dropShadow = t ? {
|
|
11235
|
-
...
|
|
11235
|
+
...Qt.defaultDropShadow
|
|
11236
11236
|
} : null, this.update();
|
|
11237
11237
|
}
|
|
11238
11238
|
/** The font family, can be a single font name, or a list of names where the first is the preferred font. */
|
|
@@ -11383,7 +11383,7 @@ const os = class te extends Bt {
|
|
|
11383
11383
|
}
|
|
11384
11384
|
/** Resets all properties to the default values */
|
|
11385
11385
|
reset() {
|
|
11386
|
-
const t =
|
|
11386
|
+
const t = Qt.defaultTextStyle;
|
|
11387
11387
|
for (const e in t)
|
|
11388
11388
|
this[e] = t[e];
|
|
11389
11389
|
}
|
|
@@ -11395,7 +11395,7 @@ const os = class te extends Bt {
|
|
|
11395
11395
|
* @returns New cloned TextStyle object
|
|
11396
11396
|
*/
|
|
11397
11397
|
clone() {
|
|
11398
|
-
return new
|
|
11398
|
+
return new Qt({
|
|
11399
11399
|
align: this.align,
|
|
11400
11400
|
breakWords: this.breakWords,
|
|
11401
11401
|
dropShadow: this.dropShadow,
|
|
@@ -11432,7 +11432,7 @@ const os = class te extends Bt {
|
|
|
11432
11432
|
this._fill = null, this._stroke = null, this.dropShadow = null, this._originalStroke = null, this._originalFill = null;
|
|
11433
11433
|
}
|
|
11434
11434
|
};
|
|
11435
|
-
|
|
11435
|
+
as.defaultDropShadow = {
|
|
11436
11436
|
/** Set alpha for the drop shadow */
|
|
11437
11437
|
alpha: 1,
|
|
11438
11438
|
/** Set a angle of the drop shadow */
|
|
@@ -11444,7 +11444,7 @@ os.defaultDropShadow = {
|
|
|
11444
11444
|
/** Set a distance of the drop shadow */
|
|
11445
11445
|
distance: 5
|
|
11446
11446
|
};
|
|
11447
|
-
|
|
11447
|
+
as.defaultTextStyle = {
|
|
11448
11448
|
/**
|
|
11449
11449
|
* See {@link TextStyle.align}
|
|
11450
11450
|
* @type {'left'|'center'|'right'|'justify'}
|
|
@@ -11514,7 +11514,7 @@ os.defaultTextStyle = {
|
|
|
11514
11514
|
/** See {@link TextStyle.wordWrapWidth} */
|
|
11515
11515
|
wordWrapWidth: 100
|
|
11516
11516
|
};
|
|
11517
|
-
let hn =
|
|
11517
|
+
let hn = as;
|
|
11518
11518
|
function Wh(i) {
|
|
11519
11519
|
const t = i;
|
|
11520
11520
|
if (typeof t.dropShadow == "boolean" && t.dropShadow) {
|
|
@@ -11528,7 +11528,7 @@ function Wh(i) {
|
|
|
11528
11528
|
};
|
|
11529
11529
|
}
|
|
11530
11530
|
if (t.strokeThickness !== void 0) {
|
|
11531
|
-
|
|
11531
|
+
q($, "strokeThickness is now a part of stroke");
|
|
11532
11532
|
const e = t.stroke;
|
|
11533
11533
|
i.stroke = {
|
|
11534
11534
|
color: e,
|
|
@@ -11536,7 +11536,7 @@ function Wh(i) {
|
|
|
11536
11536
|
};
|
|
11537
11537
|
}
|
|
11538
11538
|
if (Array.isArray(t.fill)) {
|
|
11539
|
-
|
|
11539
|
+
q($, "gradient fill is now a fill pattern: `new FillGradient(...)`");
|
|
11540
11540
|
const e = new tn(0, 0, 0, i.fontSize * 1.7), s = t.fill.map((r) => J.shared.setValue(r).toNumber());
|
|
11541
11541
|
s.forEach((r, n) => {
|
|
11542
11542
|
const a = t.fillGradientStops[n] ?? n / s.length;
|
|
@@ -11546,7 +11546,7 @@ function Wh(i) {
|
|
|
11546
11546
|
};
|
|
11547
11547
|
}
|
|
11548
11548
|
}
|
|
11549
|
-
class
|
|
11549
|
+
class Je extends Dh {
|
|
11550
11550
|
constructor(...t) {
|
|
11551
11551
|
const e = Uh(t, "Text");
|
|
11552
11552
|
super(e, hn), this.renderPipeId = "text";
|
|
@@ -11560,14 +11560,14 @@ class Qe extends Dh {
|
|
|
11560
11560
|
}
|
|
11561
11561
|
}
|
|
11562
11562
|
dt.add(vn, An);
|
|
11563
|
-
const Ut = 0.02 * 1e3, Nh = (i) => i.name == "jump", Yh = (i) => i.name == "color",
|
|
11564
|
-
function
|
|
11563
|
+
const Ut = 0.02 * 1e3, Nh = (i) => i.name == "jump", Yh = (i) => i.name == "color", Vh = (i) => i.name == "grow", jh = (i) => i.name == "dash", Xh = (i) => i.name == "sprite", $h = (i) => i.name == "add_jump_hits", qh = (i) => i.name == "resurrect";
|
|
11564
|
+
function Qe(i) {
|
|
11565
11565
|
"@babel/helpers - typeof";
|
|
11566
|
-
return
|
|
11566
|
+
return Qe = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
11567
11567
|
return typeof t;
|
|
11568
11568
|
} : function(t) {
|
|
11569
11569
|
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
11570
|
-
},
|
|
11570
|
+
}, Qe(i);
|
|
11571
11571
|
}
|
|
11572
11572
|
var Kh = /^\s+/, Zh = /\s+$/;
|
|
11573
11573
|
function P(i, t) {
|
|
@@ -11609,7 +11609,7 @@ P.prototype = {
|
|
|
11609
11609
|
return this._a = ln(t), this._roundA = Math.round(100 * this._a) / 100, this;
|
|
11610
11610
|
},
|
|
11611
11611
|
toHsv: function() {
|
|
11612
|
-
var t =
|
|
11612
|
+
var t = qs(this._r, this._g, this._b);
|
|
11613
11613
|
return {
|
|
11614
11614
|
h: t.h * 360,
|
|
11615
11615
|
s: t.s,
|
|
@@ -11618,11 +11618,11 @@ P.prototype = {
|
|
|
11618
11618
|
};
|
|
11619
11619
|
},
|
|
11620
11620
|
toHsvString: function() {
|
|
11621
|
-
var t =
|
|
11621
|
+
var t = qs(this._r, this._g, this._b), e = Math.round(t.h * 360), s = Math.round(t.s * 100), r = Math.round(t.v * 100);
|
|
11622
11622
|
return this._a == 1 ? "hsv(" + e + ", " + s + "%, " + r + "%)" : "hsva(" + e + ", " + s + "%, " + r + "%, " + this._roundA + ")";
|
|
11623
11623
|
},
|
|
11624
11624
|
toHsl: function() {
|
|
11625
|
-
var t =
|
|
11625
|
+
var t = $s(this._r, this._g, this._b);
|
|
11626
11626
|
return {
|
|
11627
11627
|
h: t.h * 360,
|
|
11628
11628
|
s: t.s,
|
|
@@ -11631,11 +11631,11 @@ P.prototype = {
|
|
|
11631
11631
|
};
|
|
11632
11632
|
},
|
|
11633
11633
|
toHslString: function() {
|
|
11634
|
-
var t =
|
|
11634
|
+
var t = $s(this._r, this._g, this._b), e = Math.round(t.h * 360), s = Math.round(t.s * 100), r = Math.round(t.l * 100);
|
|
11635
11635
|
return this._a == 1 ? "hsl(" + e + ", " + s + "%, " + r + "%)" : "hsla(" + e + ", " + s + "%, " + r + "%, " + this._roundA + ")";
|
|
11636
11636
|
},
|
|
11637
11637
|
toHex: function(t) {
|
|
11638
|
-
return
|
|
11638
|
+
return Ks(this._r, this._g, this._b, t);
|
|
11639
11639
|
},
|
|
11640
11640
|
toHexString: function(t) {
|
|
11641
11641
|
return "#" + this.toHex(t);
|
|
@@ -11669,13 +11669,13 @@ P.prototype = {
|
|
|
11669
11669
|
return this._a == 1 ? "rgb(" + Math.round(G(this._r, 255) * 100) + "%, " + Math.round(G(this._g, 255) * 100) + "%, " + Math.round(G(this._b, 255) * 100) + "%)" : "rgba(" + Math.round(G(this._r, 255) * 100) + "%, " + Math.round(G(this._g, 255) * 100) + "%, " + Math.round(G(this._b, 255) * 100) + "%, " + this._roundA + ")";
|
|
11670
11670
|
},
|
|
11671
11671
|
toName: function() {
|
|
11672
|
-
return this._a === 0 ? "transparent" : this._a < 1 ? !1 : pl[
|
|
11672
|
+
return this._a === 0 ? "transparent" : this._a < 1 ? !1 : pl[Ks(this._r, this._g, this._b, !0)] || !1;
|
|
11673
11673
|
},
|
|
11674
11674
|
toFilter: function(t) {
|
|
11675
|
-
var e = "#" +
|
|
11675
|
+
var e = "#" + Zs(this._r, this._g, this._b, this._a), s = e, r = this._gradientType ? "GradientType = 1, " : "";
|
|
11676
11676
|
if (t) {
|
|
11677
11677
|
var n = P(t);
|
|
11678
|
-
s = "#" +
|
|
11678
|
+
s = "#" + Zs(n._r, n._g, n._b, n._a);
|
|
11679
11679
|
}
|
|
11680
11680
|
return "progid:DXImageTransform.Microsoft.gradient(" + r + "startColorstr=" + e + ",endColorstr=" + s + ")";
|
|
11681
11681
|
},
|
|
@@ -11733,17 +11733,17 @@ P.prototype = {
|
|
|
11733
11733
|
// return this._applyCombination(polyad, [number]);
|
|
11734
11734
|
// },
|
|
11735
11735
|
triad: function() {
|
|
11736
|
-
return this._applyCombination(
|
|
11736
|
+
return this._applyCombination(Js, [3]);
|
|
11737
11737
|
},
|
|
11738
11738
|
tetrad: function() {
|
|
11739
|
-
return this._applyCombination(
|
|
11739
|
+
return this._applyCombination(Js, [4]);
|
|
11740
11740
|
}
|
|
11741
11741
|
};
|
|
11742
11742
|
P.fromRatio = function(i, t) {
|
|
11743
|
-
if (
|
|
11743
|
+
if (Qe(i) == "object") {
|
|
11744
11744
|
var e = {};
|
|
11745
11745
|
for (var s in i)
|
|
11746
|
-
i.hasOwnProperty(s) && (s === "a" ? e[s] = i[s] : e[s] =
|
|
11746
|
+
i.hasOwnProperty(s) && (s === "a" ? e[s] = i[s] : e[s] = be(i[s]));
|
|
11747
11747
|
i = e;
|
|
11748
11748
|
}
|
|
11749
11749
|
return P(i, t);
|
|
@@ -11754,7 +11754,7 @@ function Jh(i) {
|
|
|
11754
11754
|
g: 0,
|
|
11755
11755
|
b: 0
|
|
11756
11756
|
}, e = 1, s = null, r = null, n = null, a = !1, o = !1;
|
|
11757
|
-
return typeof i == "string" && (i = _l(i)),
|
|
11757
|
+
return typeof i == "string" && (i = _l(i)), Qe(i) == "object" && (Pt(i.r) && Pt(i.g) && Pt(i.b) ? (t = Qh(i.r, i.g, i.b), a = !0, o = String(i.r).substr(-1) === "%" ? "prgb" : "rgb") : Pt(i.h) && Pt(i.s) && Pt(i.v) ? (s = be(i.s), r = be(i.v), t = el(i.h, s, r), a = !0, o = "hsv") : Pt(i.h) && Pt(i.s) && Pt(i.l) && (s = be(i.s), n = be(i.l), t = tl(i.h, s, n), a = !0, o = "hsl"), i.hasOwnProperty("a") && (e = i.a)), e = ln(e), {
|
|
11758
11758
|
ok: a,
|
|
11759
11759
|
format: i.format || o,
|
|
11760
11760
|
r: Math.min(255, Math.max(t.r, 0)),
|
|
@@ -11770,7 +11770,7 @@ function Qh(i, t, e) {
|
|
|
11770
11770
|
b: G(e, 255) * 255
|
|
11771
11771
|
};
|
|
11772
11772
|
}
|
|
11773
|
-
function
|
|
11773
|
+
function $s(i, t, e) {
|
|
11774
11774
|
i = G(i, 255), t = G(t, 255), e = G(e, 255);
|
|
11775
11775
|
var s = Math.max(i, t, e), r = Math.min(i, t, e), n, a, o = (s + r) / 2;
|
|
11776
11776
|
if (s == r)
|
|
@@ -11814,7 +11814,7 @@ function tl(i, t, e) {
|
|
|
11814
11814
|
b: n * 255
|
|
11815
11815
|
};
|
|
11816
11816
|
}
|
|
11817
|
-
function
|
|
11817
|
+
function qs(i, t, e) {
|
|
11818
11818
|
i = G(i, 255), t = G(t, 255), e = G(e, 255);
|
|
11819
11819
|
var s = Math.max(i, t, e), r = Math.min(i, t, e), n, a, o = s, h = s - r;
|
|
11820
11820
|
if (a = s === 0 ? 0 : h / s, s == r)
|
|
@@ -11848,7 +11848,7 @@ function el(i, t, e) {
|
|
|
11848
11848
|
b: u * 255
|
|
11849
11849
|
};
|
|
11850
11850
|
}
|
|
11851
|
-
function
|
|
11851
|
+
function Ks(i, t, e, s) {
|
|
11852
11852
|
var r = [_t(Math.round(i).toString(16)), _t(Math.round(t).toString(16)), _t(Math.round(e).toString(16))];
|
|
11853
11853
|
return s && r[0].charAt(0) == r[0].charAt(1) && r[1].charAt(0) == r[1].charAt(1) && r[2].charAt(0) == r[2].charAt(1) ? r[0].charAt(0) + r[1].charAt(0) + r[2].charAt(0) : r.join("");
|
|
11854
11854
|
}
|
|
@@ -11856,7 +11856,7 @@ function il(i, t, e, s, r) {
|
|
|
11856
11856
|
var n = [_t(Math.round(i).toString(16)), _t(Math.round(t).toString(16)), _t(Math.round(e).toString(16)), _t(cn(s))];
|
|
11857
11857
|
return r && n[0].charAt(0) == n[0].charAt(1) && n[1].charAt(0) == n[1].charAt(1) && n[2].charAt(0) == n[2].charAt(1) && n[3].charAt(0) == n[3].charAt(1) ? n[0].charAt(0) + n[1].charAt(0) + n[2].charAt(0) + n[3].charAt(0) : n.join("");
|
|
11858
11858
|
}
|
|
11859
|
-
function
|
|
11859
|
+
function Zs(i, t, e, s) {
|
|
11860
11860
|
var r = [_t(cn(s)), _t(Math.round(i).toString(16)), _t(Math.round(t).toString(16)), _t(Math.round(e).toString(16))];
|
|
11861
11861
|
return r.join("");
|
|
11862
11862
|
}
|
|
@@ -11873,12 +11873,12 @@ P.random = function() {
|
|
|
11873
11873
|
function sl(i, t) {
|
|
11874
11874
|
t = t === 0 ? 0 : t || 10;
|
|
11875
11875
|
var e = P(i).toHsl();
|
|
11876
|
-
return e.s -= t / 100, e.s =
|
|
11876
|
+
return e.s -= t / 100, e.s = ri(e.s), P(e);
|
|
11877
11877
|
}
|
|
11878
11878
|
function rl(i, t) {
|
|
11879
11879
|
t = t === 0 ? 0 : t || 10;
|
|
11880
11880
|
var e = P(i).toHsl();
|
|
11881
|
-
return e.s += t / 100, e.s =
|
|
11881
|
+
return e.s += t / 100, e.s = ri(e.s), P(e);
|
|
11882
11882
|
}
|
|
11883
11883
|
function nl(i) {
|
|
11884
11884
|
return P(i).desaturate(100);
|
|
@@ -11886,7 +11886,7 @@ function nl(i) {
|
|
|
11886
11886
|
function al(i, t) {
|
|
11887
11887
|
t = t === 0 ? 0 : t || 10;
|
|
11888
11888
|
var e = P(i).toHsl();
|
|
11889
|
-
return e.l += t / 100, e.l =
|
|
11889
|
+
return e.l += t / 100, e.l = ri(e.l), P(e);
|
|
11890
11890
|
}
|
|
11891
11891
|
function ol(i, t) {
|
|
11892
11892
|
t = t === 0 ? 0 : t || 10;
|
|
@@ -11896,7 +11896,7 @@ function ol(i, t) {
|
|
|
11896
11896
|
function hl(i, t) {
|
|
11897
11897
|
t = t === 0 ? 0 : t || 10;
|
|
11898
11898
|
var e = P(i).toHsl();
|
|
11899
|
-
return e.l -= t / 100, e.l =
|
|
11899
|
+
return e.l -= t / 100, e.l = ri(e.l), P(e);
|
|
11900
11900
|
}
|
|
11901
11901
|
function ll(i, t) {
|
|
11902
11902
|
var e = P(i).toHsl(), s = (e.h + t) % 360;
|
|
@@ -11906,7 +11906,7 @@ function cl(i) {
|
|
|
11906
11906
|
var t = P(i).toHsl();
|
|
11907
11907
|
return t.h = (t.h + 180) % 360, P(t);
|
|
11908
11908
|
}
|
|
11909
|
-
function
|
|
11909
|
+
function Js(i, t) {
|
|
11910
11910
|
if (isNaN(t) || t <= 0)
|
|
11911
11911
|
throw new Error("Argument to polyad must be a positive number");
|
|
11912
11912
|
for (var e = P(i).toHsl(), s = [P(i)], r = 360 / t, n = 1; n < t; n++)
|
|
@@ -11986,7 +11986,7 @@ P.mostReadable = function(i, t, e) {
|
|
|
11986
11986
|
size: h
|
|
11987
11987
|
}) || !a ? s : (e.includeFallbackColors = !1, P.mostReadable(i, ["#fff", "#000"], e));
|
|
11988
11988
|
};
|
|
11989
|
-
var
|
|
11989
|
+
var Yi = P.names = {
|
|
11990
11990
|
aliceblue: "f0f8ff",
|
|
11991
11991
|
antiquewhite: "faebd7",
|
|
11992
11992
|
aqua: "0ff",
|
|
@@ -12136,7 +12136,7 @@ var ji = P.names = {
|
|
|
12136
12136
|
whitesmoke: "f5f5f5",
|
|
12137
12137
|
yellow: "ff0",
|
|
12138
12138
|
yellowgreen: "9acd32"
|
|
12139
|
-
}, pl = P.hexNames = ml(
|
|
12139
|
+
}, pl = P.hexNames = ml(Yi);
|
|
12140
12140
|
function ml(i) {
|
|
12141
12141
|
var t = {};
|
|
12142
12142
|
for (var e in i)
|
|
@@ -12151,7 +12151,7 @@ function G(i, t) {
|
|
|
12151
12151
|
var e = yl(i);
|
|
12152
12152
|
return i = Math.min(t, Math.max(0, parseFloat(i))), e && (i = parseInt(i * t, 10) / 100), Math.abs(i - t) < 1e-6 ? 1 : i % t / parseFloat(t);
|
|
12153
12153
|
}
|
|
12154
|
-
function
|
|
12154
|
+
function ri(i) {
|
|
12155
12155
|
return Math.min(1, Math.max(0, i));
|
|
12156
12156
|
}
|
|
12157
12157
|
function lt(i) {
|
|
@@ -12166,13 +12166,13 @@ function yl(i) {
|
|
|
12166
12166
|
function _t(i) {
|
|
12167
12167
|
return i.length == 1 ? "0" + i : "" + i;
|
|
12168
12168
|
}
|
|
12169
|
-
function
|
|
12169
|
+
function be(i) {
|
|
12170
12170
|
return i <= 1 && (i = i * 100 + "%"), i;
|
|
12171
12171
|
}
|
|
12172
12172
|
function cn(i) {
|
|
12173
12173
|
return Math.round(parseFloat(i) * 255).toString(16);
|
|
12174
12174
|
}
|
|
12175
|
-
function
|
|
12175
|
+
function Qs(i) {
|
|
12176
12176
|
return lt(i) / 255;
|
|
12177
12177
|
}
|
|
12178
12178
|
var mt = function() {
|
|
@@ -12197,8 +12197,8 @@ function Pt(i) {
|
|
|
12197
12197
|
function _l(i) {
|
|
12198
12198
|
i = i.replace(Kh, "").replace(Zh, "").toLowerCase();
|
|
12199
12199
|
var t = !1;
|
|
12200
|
-
if (
|
|
12201
|
-
i =
|
|
12200
|
+
if (Yi[i])
|
|
12201
|
+
i = Yi[i], t = !0;
|
|
12202
12202
|
else if (i == "transparent")
|
|
12203
12203
|
return {
|
|
12204
12204
|
r: 0,
|
|
@@ -12239,7 +12239,7 @@ function _l(i) {
|
|
|
12239
12239
|
r: lt(e[1]),
|
|
12240
12240
|
g: lt(e[2]),
|
|
12241
12241
|
b: lt(e[3]),
|
|
12242
|
-
a:
|
|
12242
|
+
a: Qs(e[4]),
|
|
12243
12243
|
format: t ? "name" : "hex8"
|
|
12244
12244
|
} : (e = mt.hex6.exec(i)) ? {
|
|
12245
12245
|
r: lt(e[1]),
|
|
@@ -12250,7 +12250,7 @@ function _l(i) {
|
|
|
12250
12250
|
r: lt(e[1] + "" + e[1]),
|
|
12251
12251
|
g: lt(e[2] + "" + e[2]),
|
|
12252
12252
|
b: lt(e[3] + "" + e[3]),
|
|
12253
|
-
a:
|
|
12253
|
+
a: Qs(e[4] + "" + e[4]),
|
|
12254
12254
|
format: t ? "name" : "hex8"
|
|
12255
12255
|
} : (e = mt.hex3.exec(i)) ? {
|
|
12256
12256
|
r: lt(e[1] + "" + e[1]),
|
|
@@ -12269,7 +12269,7 @@ function xl(i) {
|
|
|
12269
12269
|
size: e
|
|
12270
12270
|
};
|
|
12271
12271
|
}
|
|
12272
|
-
var
|
|
12272
|
+
var Me = Object.freeze({
|
|
12273
12273
|
Linear: Object.freeze({
|
|
12274
12274
|
None: function(i) {
|
|
12275
12275
|
return i;
|
|
@@ -12388,13 +12388,13 @@ var Te = Object.freeze({
|
|
|
12388
12388
|
}),
|
|
12389
12389
|
Bounce: Object.freeze({
|
|
12390
12390
|
In: function(i) {
|
|
12391
|
-
return 1 -
|
|
12391
|
+
return 1 - Me.Bounce.Out(1 - i);
|
|
12392
12392
|
},
|
|
12393
12393
|
Out: function(i) {
|
|
12394
12394
|
return i < 1 / 2.75 ? 7.5625 * i * i : i < 2 / 2.75 ? 7.5625 * (i -= 1.5 / 2.75) * i + 0.75 : i < 2.5 / 2.75 ? 7.5625 * (i -= 2.25 / 2.75) * i + 0.9375 : 7.5625 * (i -= 2.625 / 2.75) * i + 0.984375;
|
|
12395
12395
|
},
|
|
12396
12396
|
InOut: function(i) {
|
|
12397
|
-
return i < 0.5 ?
|
|
12397
|
+
return i < 0.5 ? Me.Bounce.In(i * 2) * 0.5 : Me.Bounce.Out(i * 2 - 1) * 0.5 + 0.5;
|
|
12398
12398
|
}
|
|
12399
12399
|
}),
|
|
12400
12400
|
generatePow: function(i) {
|
|
@@ -12410,7 +12410,7 @@ var Te = Object.freeze({
|
|
|
12410
12410
|
}
|
|
12411
12411
|
};
|
|
12412
12412
|
}
|
|
12413
|
-
}),
|
|
12413
|
+
}), we = function() {
|
|
12414
12414
|
return performance.now();
|
|
12415
12415
|
}, bl = (
|
|
12416
12416
|
/** @class */
|
|
@@ -12430,7 +12430,7 @@ var Te = Object.freeze({
|
|
|
12430
12430
|
}, i.prototype.remove = function(t) {
|
|
12431
12431
|
delete this._tweens[t.getId()], delete this._tweensAddedDuringUpdate[t.getId()];
|
|
12432
12432
|
}, i.prototype.update = function(t, e) {
|
|
12433
|
-
t === void 0 && (t =
|
|
12433
|
+
t === void 0 && (t = we()), e === void 0 && (e = !1);
|
|
12434
12434
|
var s = Object.keys(this._tweens);
|
|
12435
12435
|
if (s.length === 0)
|
|
12436
12436
|
return !1;
|
|
@@ -12445,18 +12445,18 @@ var Te = Object.freeze({
|
|
|
12445
12445
|
return !0;
|
|
12446
12446
|
}, i;
|
|
12447
12447
|
}()
|
|
12448
|
-
),
|
|
12448
|
+
), ee = {
|
|
12449
12449
|
Linear: function(i, t) {
|
|
12450
|
-
var e = i.length - 1, s = e * t, r = Math.floor(s), n =
|
|
12450
|
+
var e = i.length - 1, s = e * t, r = Math.floor(s), n = ee.Utils.Linear;
|
|
12451
12451
|
return t < 0 ? n(i[0], i[1], s) : t > 1 ? n(i[e], i[e - 1], e - s) : n(i[r], i[r + 1 > e ? e : r + 1], s - r);
|
|
12452
12452
|
},
|
|
12453
12453
|
Bezier: function(i, t) {
|
|
12454
|
-
for (var e = 0, s = i.length - 1, r = Math.pow, n =
|
|
12454
|
+
for (var e = 0, s = i.length - 1, r = Math.pow, n = ee.Utils.Bernstein, a = 0; a <= s; a++)
|
|
12455
12455
|
e += r(1 - t, s - a) * r(t, a) * i[a] * n(s, a);
|
|
12456
12456
|
return e;
|
|
12457
12457
|
},
|
|
12458
12458
|
CatmullRom: function(i, t) {
|
|
12459
|
-
var e = i.length - 1, s = e * t, r = Math.floor(s), n =
|
|
12459
|
+
var e = i.length - 1, s = e * t, r = Math.floor(s), n = ee.Utils.CatmullRom;
|
|
12460
12460
|
return i[0] === i[e] ? (t < 0 && (r = Math.floor(s = e * (1 + t))), n(i[(r - 1 + e) % e], i[r], i[(r + 1) % e], i[(r + 2) % e], s - r)) : t < 0 ? i[0] - (n(i[0], i[0], i[1], i[1], -s) - i[0]) : t > 1 ? i[e] - (n(i[e], i[e], i[e - 1], i[e - 1], s - e) - i[e]) : n(i[r ? r - 1 : 0], i[r], i[e < r + 1 ? e : r + 1], i[e < r + 2 ? e : r + 2], s - r);
|
|
12461
12461
|
},
|
|
12462
12462
|
Utils: {
|
|
@@ -12464,7 +12464,7 @@ var Te = Object.freeze({
|
|
|
12464
12464
|
return (t - i) * e + i;
|
|
12465
12465
|
},
|
|
12466
12466
|
Bernstein: function(i, t) {
|
|
12467
|
-
var e =
|
|
12467
|
+
var e = ee.Utils.Factorial;
|
|
12468
12468
|
return e(i) / e(t) / e(i - t);
|
|
12469
12469
|
},
|
|
12470
12470
|
Factorial: /* @__PURE__ */ function() {
|
|
@@ -12496,7 +12496,7 @@ var Te = Object.freeze({
|
|
|
12496
12496
|
/** @class */
|
|
12497
12497
|
function() {
|
|
12498
12498
|
function i(t, e) {
|
|
12499
|
-
e === void 0 && (e = Vi), this._object = t, this._group = e, this._isPaused = !1, this._pauseStart = 0, this._valuesStart = {}, this._valuesEnd = {}, this._valuesStartRepeat = {}, this._duration = 1e3, this._isDynamic = !1, this._initialRepeat = 0, this._repeat = 0, this._yoyo = !1, this._isPlaying = !1, this._reversed = !1, this._delayTime = 0, this._startTime = 0, this._easingFunction =
|
|
12499
|
+
e === void 0 && (e = Vi), this._object = t, this._group = e, this._isPaused = !1, this._pauseStart = 0, this._valuesStart = {}, this._valuesEnd = {}, this._valuesStartRepeat = {}, this._duration = 1e3, this._isDynamic = !1, this._initialRepeat = 0, this._repeat = 0, this._yoyo = !1, this._isPlaying = !1, this._reversed = !1, this._delayTime = 0, this._startTime = 0, this._easingFunction = Me.Linear.None, this._interpolationFunction = ee.Linear, this._chainedTweens = [], this._onStartCallbackFired = !1, this._onEveryStartCallbackFired = !1, this._id = wl.nextId(), this._isChainStopped = !1, this._propertiesAreSetUp = !1, this._goToEnd = !1;
|
|
12500
12500
|
}
|
|
12501
12501
|
return i.prototype.getId = function() {
|
|
12502
12502
|
return this._id;
|
|
@@ -12515,7 +12515,7 @@ var Te = Object.freeze({
|
|
|
12515
12515
|
}, i.prototype.dynamic = function(t) {
|
|
12516
12516
|
return t === void 0 && (t = !1), this._isDynamic = t, this;
|
|
12517
12517
|
}, i.prototype.start = function(t, e) {
|
|
12518
|
-
if (t === void 0 && (t =
|
|
12518
|
+
if (t === void 0 && (t = we()), e === void 0 && (e = !1), this._isPlaying)
|
|
12519
12519
|
return this;
|
|
12520
12520
|
if (this._group && this._group.add(this), this._repeat = this._initialRepeat, this._reversed) {
|
|
12521
12521
|
this._reversed = !1;
|
|
@@ -12575,9 +12575,9 @@ var Te = Object.freeze({
|
|
|
12575
12575
|
}, i.prototype.end = function() {
|
|
12576
12576
|
return this._goToEnd = !0, this.update(1 / 0), this;
|
|
12577
12577
|
}, i.prototype.pause = function(t) {
|
|
12578
|
-
return t === void 0 && (t =
|
|
12578
|
+
return t === void 0 && (t = we()), this._isPaused || !this._isPlaying ? this : (this._isPaused = !0, this._pauseStart = t, this._group && this._group.remove(this), this);
|
|
12579
12579
|
}, i.prototype.resume = function(t) {
|
|
12580
|
-
return t === void 0 && (t =
|
|
12580
|
+
return t === void 0 && (t = we()), !this._isPaused || !this._isPlaying ? this : (this._isPaused = !1, this._startTime += t - this._pauseStart, this._pauseStart = 0, this._group && this._group.add(this), this);
|
|
12581
12581
|
}, i.prototype.stopChainedTweens = function() {
|
|
12582
12582
|
for (var t = 0, e = this._chainedTweens.length; t < e; t++)
|
|
12583
12583
|
this._chainedTweens[t].stop();
|
|
@@ -12593,9 +12593,9 @@ var Te = Object.freeze({
|
|
|
12593
12593
|
}, i.prototype.yoyo = function(t) {
|
|
12594
12594
|
return t === void 0 && (t = !1), this._yoyo = t, this;
|
|
12595
12595
|
}, i.prototype.easing = function(t) {
|
|
12596
|
-
return t === void 0 && (t =
|
|
12596
|
+
return t === void 0 && (t = Me.Linear.None), this._easingFunction = t, this;
|
|
12597
12597
|
}, i.prototype.interpolation = function(t) {
|
|
12598
|
-
return t === void 0 && (t =
|
|
12598
|
+
return t === void 0 && (t = ee.Linear), this._interpolationFunction = t, this;
|
|
12599
12599
|
}, i.prototype.chain = function() {
|
|
12600
12600
|
for (var t = [], e = 0; e < arguments.length; e++)
|
|
12601
12601
|
t[e] = arguments[e];
|
|
@@ -12614,7 +12614,7 @@ var Te = Object.freeze({
|
|
|
12614
12614
|
return this._onStopCallback = t, this;
|
|
12615
12615
|
}, i.prototype.update = function(t, e) {
|
|
12616
12616
|
var s;
|
|
12617
|
-
if (t === void 0 && (t =
|
|
12617
|
+
if (t === void 0 && (t = we()), e === void 0 && (e = !0), this._isPaused)
|
|
12618
12618
|
return !0;
|
|
12619
12619
|
var r = this._startTime + this._duration;
|
|
12620
12620
|
if (!this._goToEnd && !this._isPlaying) {
|
|
@@ -12695,7 +12695,7 @@ class vl {
|
|
|
12695
12695
|
this.timers = e;
|
|
12696
12696
|
}
|
|
12697
12697
|
}
|
|
12698
|
-
const
|
|
12698
|
+
const ji = new vl();
|
|
12699
12699
|
class Al {
|
|
12700
12700
|
constructor() {
|
|
12701
12701
|
w(this, "assets", {});
|
|
@@ -12726,7 +12726,7 @@ class Sl {
|
|
|
12726
12726
|
return;
|
|
12727
12727
|
if (this.sprites[t])
|
|
12728
12728
|
return this.sprites[t];
|
|
12729
|
-
const s = await yt.load(e.image), r = new
|
|
12729
|
+
const s = await yt.load(e.image), r = new Fi(s, e.sprite);
|
|
12730
12730
|
return await r.parse(), this.sprites[t] = {
|
|
12731
12731
|
sheet: r,
|
|
12732
12732
|
data: {
|
|
@@ -12742,7 +12742,7 @@ class Sl {
|
|
|
12742
12742
|
const o = a.toString(), h = t + "_" + o, c = e.textures[h], l = e.data.frames[h].duration;
|
|
12743
12743
|
r.push({ texture: c, time: l });
|
|
12744
12744
|
}
|
|
12745
|
-
const n = new
|
|
12745
|
+
const n = new Re(r);
|
|
12746
12746
|
return n.texture.source.scaleMode = "nearest", n;
|
|
12747
12747
|
}
|
|
12748
12748
|
}
|
|
@@ -12762,7 +12762,7 @@ class Sl {
|
|
|
12762
12762
|
const u = l.toString(), d = e.name + "_" + o.name + "_" + u, p = s.textures[d], f = s.data.frames[d].duration;
|
|
12763
12763
|
h.push({ texture: p, time: f });
|
|
12764
12764
|
}
|
|
12765
|
-
const c = new
|
|
12765
|
+
const c = new Re(h);
|
|
12766
12766
|
c.texture.source.scaleMode = "nearest", a[o.name] = c;
|
|
12767
12767
|
}
|
|
12768
12768
|
n.name && (r[n.name] = a);
|
|
@@ -12770,7 +12770,7 @@ class Sl {
|
|
|
12770
12770
|
return r;
|
|
12771
12771
|
}
|
|
12772
12772
|
}
|
|
12773
|
-
const
|
|
12773
|
+
const ti = new Sl();
|
|
12774
12774
|
var qt = {}, dn = {}, Rt = {};
|
|
12775
12775
|
Object.defineProperty(Rt, "__esModule", {
|
|
12776
12776
|
value: !0
|
|
@@ -12809,66 +12809,66 @@ var Tl = function(t, e) {
|
|
|
12809
12809
|
};
|
|
12810
12810
|
};
|
|
12811
12811
|
Rt.loop = Tl;
|
|
12812
|
-
var
|
|
12813
|
-
Object.defineProperty(
|
|
12812
|
+
var V = {};
|
|
12813
|
+
Object.defineProperty(V, "__esModule", {
|
|
12814
12814
|
value: !0
|
|
12815
12815
|
});
|
|
12816
|
-
|
|
12816
|
+
V.readBits = V.readArray = V.readUnsigned = V.readString = V.peekBytes = V.readBytes = V.peekByte = V.readByte = V.buildStream = void 0;
|
|
12817
12817
|
var Pl = function(t) {
|
|
12818
12818
|
return {
|
|
12819
12819
|
data: t,
|
|
12820
12820
|
pos: 0
|
|
12821
12821
|
};
|
|
12822
12822
|
};
|
|
12823
|
-
|
|
12823
|
+
V.buildStream = Pl;
|
|
12824
12824
|
var fn = function() {
|
|
12825
12825
|
return function(t) {
|
|
12826
12826
|
return t.data[t.pos++];
|
|
12827
12827
|
};
|
|
12828
12828
|
};
|
|
12829
|
-
|
|
12829
|
+
V.readByte = fn;
|
|
12830
12830
|
var kl = function() {
|
|
12831
12831
|
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
|
|
12832
12832
|
return function(e) {
|
|
12833
12833
|
return e.data[e.pos + t];
|
|
12834
12834
|
};
|
|
12835
12835
|
};
|
|
12836
|
-
|
|
12837
|
-
var
|
|
12836
|
+
V.peekByte = kl;
|
|
12837
|
+
var ni = function(t) {
|
|
12838
12838
|
return function(e) {
|
|
12839
12839
|
return e.data.subarray(e.pos, e.pos += t);
|
|
12840
12840
|
};
|
|
12841
12841
|
};
|
|
12842
|
-
|
|
12842
|
+
V.readBytes = ni;
|
|
12843
12843
|
var Il = function(t) {
|
|
12844
12844
|
return function(e) {
|
|
12845
12845
|
return e.data.subarray(e.pos, e.pos + t);
|
|
12846
12846
|
};
|
|
12847
12847
|
};
|
|
12848
|
-
|
|
12848
|
+
V.peekBytes = Il;
|
|
12849
12849
|
var El = function(t) {
|
|
12850
12850
|
return function(e) {
|
|
12851
|
-
return Array.from(
|
|
12851
|
+
return Array.from(ni(t)(e)).map(function(s) {
|
|
12852
12852
|
return String.fromCharCode(s);
|
|
12853
12853
|
}).join("");
|
|
12854
12854
|
};
|
|
12855
12855
|
};
|
|
12856
|
-
|
|
12856
|
+
V.readString = El;
|
|
12857
12857
|
var Rl = function(t) {
|
|
12858
12858
|
return function(e) {
|
|
12859
|
-
var s =
|
|
12859
|
+
var s = ni(2)(e);
|
|
12860
12860
|
return t ? (s[1] << 8) + s[0] : (s[0] << 8) + s[1];
|
|
12861
12861
|
};
|
|
12862
12862
|
};
|
|
12863
|
-
|
|
12863
|
+
V.readUnsigned = Rl;
|
|
12864
12864
|
var Bl = function(t, e) {
|
|
12865
12865
|
return function(s, r, n) {
|
|
12866
|
-
for (var a = typeof e == "function" ? e(s, r, n) : e, o =
|
|
12866
|
+
for (var a = typeof e == "function" ? e(s, r, n) : e, o = ni(t), h = new Array(a), c = 0; c < a; c++)
|
|
12867
12867
|
h[c] = o(s);
|
|
12868
12868
|
return h;
|
|
12869
12869
|
};
|
|
12870
12870
|
};
|
|
12871
|
-
|
|
12871
|
+
V.readArray = Bl;
|
|
12872
12872
|
var Fl = function(t, e, s) {
|
|
12873
12873
|
for (var r = 0, n = 0; n < s; n++)
|
|
12874
12874
|
r += t[e + n] && Math.pow(2, s - n - 1);
|
|
@@ -12883,12 +12883,12 @@ var Fl = function(t, e, s) {
|
|
|
12883
12883
|
}, {});
|
|
12884
12884
|
};
|
|
12885
12885
|
};
|
|
12886
|
-
|
|
12886
|
+
V.readBits = Ll;
|
|
12887
12887
|
(function(i) {
|
|
12888
12888
|
Object.defineProperty(i, "__esModule", {
|
|
12889
12889
|
value: !0
|
|
12890
12890
|
}), i.default = void 0;
|
|
12891
|
-
var t = Rt, e =
|
|
12891
|
+
var t = Rt, e = V, s = {
|
|
12892
12892
|
blocks: function(d) {
|
|
12893
12893
|
for (var p = 0, f = [], g = d.data.length, m = 0, y = (0, e.readByte)()(d); y !== p && y; y = (0, e.readByte)()(d)) {
|
|
12894
12894
|
if (d.pos + y >= g) {
|
|
@@ -13066,11 +13066,11 @@ Y.readBits = Ll;
|
|
|
13066
13066
|
], l = c;
|
|
13067
13067
|
i.default = l;
|
|
13068
13068
|
})(dn);
|
|
13069
|
-
var
|
|
13070
|
-
Object.defineProperty(
|
|
13069
|
+
var ai = {};
|
|
13070
|
+
Object.defineProperty(ai, "__esModule", {
|
|
13071
13071
|
value: !0
|
|
13072
13072
|
});
|
|
13073
|
-
|
|
13073
|
+
ai.deinterlace = void 0;
|
|
13074
13074
|
var Dl = function(t, e) {
|
|
13075
13075
|
for (var s = new Array(t.length), r = t.length / e, n = function(d, p) {
|
|
13076
13076
|
var f = t.slice(p * e, (p + 1) * e);
|
|
@@ -13080,12 +13080,12 @@ var Dl = function(t, e) {
|
|
|
13080
13080
|
n(l, h), h++;
|
|
13081
13081
|
return s;
|
|
13082
13082
|
};
|
|
13083
|
-
|
|
13084
|
-
var
|
|
13085
|
-
Object.defineProperty(
|
|
13083
|
+
ai.deinterlace = Dl;
|
|
13084
|
+
var oi = {};
|
|
13085
|
+
Object.defineProperty(oi, "__esModule", {
|
|
13086
13086
|
value: !0
|
|
13087
13087
|
});
|
|
13088
|
-
|
|
13088
|
+
oi.lzw = void 0;
|
|
13089
13089
|
var Ul = function(t, e, s) {
|
|
13090
13090
|
var r = 4096, n = -1, a = s, o, h, c, l, u, d, p, k, f, g, S, m, M, C, A, v, y = new Array(s), _ = new Array(r), x = new Array(r), b = new Array(r + 1);
|
|
13091
13091
|
for (m = t, h = 1 << m, u = h + 1, o = h + 2, p = n, l = m + 1, c = (1 << l) - 1, f = 0; f < h; f++)
|
|
@@ -13117,18 +13117,18 @@ var Ul = function(t, e, s) {
|
|
|
13117
13117
|
y[g] = 0;
|
|
13118
13118
|
return y;
|
|
13119
13119
|
};
|
|
13120
|
-
|
|
13120
|
+
oi.lzw = Ul;
|
|
13121
13121
|
Object.defineProperty(qt, "__esModule", {
|
|
13122
13122
|
value: !0
|
|
13123
13123
|
});
|
|
13124
|
-
var pn = qt.decompressFrames = qt.decompressFrame = mn = qt.parseGIF = void 0, Ol = Nl(dn), Gl = Rt, zl =
|
|
13124
|
+
var pn = qt.decompressFrames = qt.decompressFrame = mn = qt.parseGIF = void 0, Ol = Nl(dn), Gl = Rt, zl = V, Hl = ai, Wl = oi;
|
|
13125
13125
|
function Nl(i) {
|
|
13126
13126
|
return i && i.__esModule ? i : { default: i };
|
|
13127
13127
|
}
|
|
13128
13128
|
var Yl = function(t) {
|
|
13129
13129
|
var e = new Uint8Array(t);
|
|
13130
13130
|
return (0, Gl.parse)((0, zl.buildStream)(e), Ol.default);
|
|
13131
|
-
}, mn = qt.parseGIF = Yl,
|
|
13131
|
+
}, mn = qt.parseGIF = Yl, Vl = function(t) {
|
|
13132
13132
|
for (var e = t.pixels.length, s = new Uint8ClampedArray(e * 4), r = 0; r < e; r++) {
|
|
13133
13133
|
var n = r * 4, a = t.pixels[r], o = t.colorTable[a] || [0, 0, 0];
|
|
13134
13134
|
s[n] = o[0], s[n + 1] = o[1], s[n + 2] = o[2], s[n + 3] = a !== t.transparentIndex ? 255 : 0;
|
|
@@ -13150,25 +13150,25 @@ var Yl = function(t) {
|
|
|
13150
13150
|
height: t.image.descriptor.height
|
|
13151
13151
|
}
|
|
13152
13152
|
};
|
|
13153
|
-
return r.descriptor.lct && r.descriptor.lct.exists ? o.colorTable = r.lct : o.colorTable = e, t.gce && (o.delay = (t.gce.delay || 10) * 10, o.disposalType = t.gce.extras.disposal, t.gce.extras.transparentColorGiven && (o.transparentIndex = t.gce.transparentColorIndex)), s && (o.patch =
|
|
13153
|
+
return r.descriptor.lct && r.descriptor.lct.exists ? o.colorTable = r.lct : o.colorTable = e, t.gce && (o.delay = (t.gce.delay || 10) * 10, o.disposalType = t.gce.extras.disposal, t.gce.extras.transparentColorGiven && (o.transparentIndex = t.gce.transparentColorIndex)), s && (o.patch = Vl(o)), o;
|
|
13154
13154
|
};
|
|
13155
13155
|
qt.decompressFrame = gn;
|
|
13156
|
-
var
|
|
13156
|
+
var jl = function(t, e) {
|
|
13157
13157
|
return t.frames.filter(function(s) {
|
|
13158
13158
|
return s.image;
|
|
13159
13159
|
}).map(function(s) {
|
|
13160
13160
|
return gn(s, t.gct, e);
|
|
13161
13161
|
});
|
|
13162
13162
|
};
|
|
13163
|
-
pn = qt.decompressFrames =
|
|
13164
|
-
const
|
|
13163
|
+
pn = qt.decompressFrames = jl;
|
|
13164
|
+
const ve = class extends xt {
|
|
13165
13165
|
constructor(i, t) {
|
|
13166
13166
|
super(L.EMPTY), this.animationSpeed = 1, this.loop = !0, this.duration = 0, this.autoPlay = !0, this.dirty = !1, this._currentFrame = 0, this._autoUpdate = !1, this._isConnectedToTicker = !1, this._playing = !1, this._currentTime = 0, this.onRender = () => this.updateFrame();
|
|
13167
13167
|
const { scaleMode: e, width: s, height: r, ...n } = Object.assign(
|
|
13168
13168
|
{},
|
|
13169
|
-
|
|
13169
|
+
ve.defaultOptions,
|
|
13170
13170
|
t
|
|
13171
|
-
), a =
|
|
13171
|
+
), a = Y.get().createCanvas(s, r), o = a.getContext("2d");
|
|
13172
13172
|
this.texture = L.from(a), this.texture.source.scaleMode = e, this.duration = i[i.length - 1].end, this._frames = i, this._context = o, this._playing = !1, this._currentTime = 0, this._isConnectedToTicker = !1, Object.assign(this, n), this.currentFrame = 0, n.autoPlay && this.play();
|
|
13173
13173
|
}
|
|
13174
13174
|
static fromBuffer(i, t) {
|
|
@@ -13180,11 +13180,11 @@ const Ae = class extends xt {
|
|
|
13180
13180
|
y = _.gce ?? y, "image" in _ && !("gce" in _) && (_.gce = y);
|
|
13181
13181
|
}, s = mn(i);
|
|
13182
13182
|
e(s);
|
|
13183
|
-
const r = pn(s, !0), n = [], a =
|
|
13183
|
+
const r = pn(s, !0), n = [], a = Y.get().createCanvas(s.lsd.width, s.lsd.height), o = a.getContext("2d", {
|
|
13184
13184
|
willReadFrequently: !0
|
|
13185
|
-
}), h =
|
|
13185
|
+
}), h = Y.get().createCanvas(), c = h.getContext("2d");
|
|
13186
13186
|
let l = 0, u = null;
|
|
13187
|
-
const { fps: d } = Object.assign({},
|
|
13187
|
+
const { fps: d } = Object.assign({}, ve.defaultOptions, t), p = 1e3 / d;
|
|
13188
13188
|
for (let m = 0; m < r.length; m++) {
|
|
13189
13189
|
const {
|
|
13190
13190
|
disposalType: y = 2,
|
|
@@ -13204,13 +13204,13 @@ const Ae = class extends xt {
|
|
|
13204
13204
|
}
|
|
13205
13205
|
a.width = a.height = 0, h.width = h.height = 0;
|
|
13206
13206
|
const { width: f, height: g } = s.lsd;
|
|
13207
|
-
return new
|
|
13207
|
+
return new ve(n, { width: f, height: g, ...t });
|
|
13208
13208
|
}
|
|
13209
13209
|
stop() {
|
|
13210
13210
|
this._playing && (this._playing = !1, this._autoUpdate && this._isConnectedToTicker && (ot.shared.remove(this.update, this), this._isConnectedToTicker = !1));
|
|
13211
13211
|
}
|
|
13212
13212
|
play() {
|
|
13213
|
-
this._playing || (this._playing = !0, this._autoUpdate && !this._isConnectedToTicker && (ot.shared.add(this.update, this,
|
|
13213
|
+
this._playing || (this._playing = !0, this._autoUpdate && !this._isConnectedToTicker && (ot.shared.add(this.update, this, Te.HIGH), this._isConnectedToTicker = !0), !this.loop && this.currentFrame === this._frames.length - 1 && (this._currentTime = 0));
|
|
13214
13214
|
}
|
|
13215
13215
|
get progress() {
|
|
13216
13216
|
return this._currentTime / this.duration;
|
|
@@ -13258,7 +13258,7 @@ const Ae = class extends xt {
|
|
|
13258
13258
|
this._context = i, this._frames = i, this.onComplete = i, this.onFrameChange = i, this.onLoop = i;
|
|
13259
13259
|
}
|
|
13260
13260
|
clone() {
|
|
13261
|
-
const i = new
|
|
13261
|
+
const i = new ve([...this._frames], {
|
|
13262
13262
|
autoUpdate: this._autoUpdate,
|
|
13263
13263
|
loop: this.loop,
|
|
13264
13264
|
autoPlay: this.autoPlay,
|
|
@@ -13273,8 +13273,8 @@ const Ae = class extends xt {
|
|
|
13273
13273
|
return i.dirty = !0, i;
|
|
13274
13274
|
}
|
|
13275
13275
|
};
|
|
13276
|
-
let
|
|
13277
|
-
|
|
13276
|
+
let os = ve;
|
|
13277
|
+
os.defaultOptions = {
|
|
13278
13278
|
scaleMode: "linear",
|
|
13279
13279
|
fps: 30,
|
|
13280
13280
|
loop: !0,
|
|
@@ -13296,8 +13296,8 @@ const Xl = {
|
|
|
13296
13296
|
name: "gifLoader",
|
|
13297
13297
|
test: (i) => bt.extname(i) === ".gif",
|
|
13298
13298
|
load: async (i, t) => {
|
|
13299
|
-
const s = await (await
|
|
13300
|
-
return
|
|
13299
|
+
const s = await (await Y.get().fetch(i)).arrayBuffer();
|
|
13300
|
+
return os.fromBuffer(s, t == null ? void 0 : t.data);
|
|
13301
13301
|
},
|
|
13302
13302
|
unload: async (i) => {
|
|
13303
13303
|
i.destroy();
|
|
@@ -13305,7 +13305,7 @@ const Xl = {
|
|
|
13305
13305
|
}
|
|
13306
13306
|
};
|
|
13307
13307
|
dt.add(Xl);
|
|
13308
|
-
const
|
|
13308
|
+
const tr = {};
|
|
13309
13309
|
class $l {
|
|
13310
13310
|
constructor() {
|
|
13311
13311
|
w(this, "container", new O());
|
|
@@ -13316,7 +13316,7 @@ class $l {
|
|
|
13316
13316
|
w(this, "timer");
|
|
13317
13317
|
}
|
|
13318
13318
|
async add(t) {
|
|
13319
|
-
const e =
|
|
13319
|
+
const e = tr[t];
|
|
13320
13320
|
let s;
|
|
13321
13321
|
if (e)
|
|
13322
13322
|
s = e.clone();
|
|
@@ -13325,7 +13325,7 @@ class $l {
|
|
|
13325
13325
|
switch (n) {
|
|
13326
13326
|
case "image/gif": {
|
|
13327
13327
|
const a = await r.arrayBuffer();
|
|
13328
|
-
s =
|
|
13328
|
+
s = os.fromBuffer(a), tr[t] = s;
|
|
13329
13329
|
break;
|
|
13330
13330
|
}
|
|
13331
13331
|
case "image/png": {
|
|
@@ -13357,7 +13357,7 @@ class ql {
|
|
|
13357
13357
|
constructor(t) {
|
|
13358
13358
|
w(this, "container", new O());
|
|
13359
13359
|
w(this, "animated", new O());
|
|
13360
|
-
w(this, "text", new
|
|
13360
|
+
w(this, "text", new Je({
|
|
13361
13361
|
text: void 0,
|
|
13362
13362
|
style: {
|
|
13363
13363
|
fontFamily: "Custom Font",
|
|
@@ -13400,7 +13400,7 @@ class ql {
|
|
|
13400
13400
|
y: t.y - this.padding - t.height * t.anchor.y,
|
|
13401
13401
|
w: t.width + this.padding * 2,
|
|
13402
13402
|
h: t.height + this.padding * 2
|
|
13403
|
-
}, s = 20, r = 5, n = new
|
|
13403
|
+
}, s = 20, r = 5, n = new Ze();
|
|
13404
13404
|
return n.moveTo(e.x + this.borderRadius, e.y), n.quadraticCurveTo(
|
|
13405
13405
|
e.x,
|
|
13406
13406
|
e.y,
|
|
@@ -13473,7 +13473,7 @@ class ql {
|
|
|
13473
13473
|
}
|
|
13474
13474
|
class Kl {
|
|
13475
13475
|
constructor() {
|
|
13476
|
-
w(this, "text", new
|
|
13476
|
+
w(this, "text", new Je({
|
|
13477
13477
|
text: void 0,
|
|
13478
13478
|
style: {
|
|
13479
13479
|
fontFamily: "Custom Font",
|
|
@@ -13522,7 +13522,7 @@ class Zl {
|
|
|
13522
13522
|
const e = this.sprites[this.currentTag];
|
|
13523
13523
|
for (const s in e) {
|
|
13524
13524
|
const r = e[s];
|
|
13525
|
-
if (t.play && r.update(
|
|
13525
|
+
if (t.play && r.update(N.ticker), t.color) {
|
|
13526
13526
|
for (const n in t.color)
|
|
13527
13527
|
if (n == s) {
|
|
13528
13528
|
const a = t.color[n];
|
|
@@ -13541,7 +13541,7 @@ class Jl {
|
|
|
13541
13541
|
w(this, "sprite");
|
|
13542
13542
|
w(this, "opacityStep", 0.1);
|
|
13543
13543
|
w(this, "shadowStep", 50);
|
|
13544
|
-
|
|
13544
|
+
N.stage.addChild(this.container), this.container.zIndex = -100;
|
|
13545
13545
|
}
|
|
13546
13546
|
setSprite(t) {
|
|
13547
13547
|
this.sprite = t;
|
|
@@ -13579,7 +13579,7 @@ const Ql = async (i) => {
|
|
|
13579
13579
|
t(void 0);
|
|
13580
13580
|
}, i)
|
|
13581
13581
|
);
|
|
13582
|
-
},
|
|
13582
|
+
}, er = {
|
|
13583
13583
|
fontFamily: "Custom Font",
|
|
13584
13584
|
fontSize: 14,
|
|
13585
13585
|
fill: "white",
|
|
@@ -13592,20 +13592,20 @@ const Ql = async (i) => {
|
|
|
13592
13592
|
};
|
|
13593
13593
|
class tc {
|
|
13594
13594
|
constructor() {
|
|
13595
|
-
w(this, "
|
|
13596
|
-
w(this, "killText", new
|
|
13595
|
+
w(this, "container", new O());
|
|
13596
|
+
w(this, "killText", new Je({
|
|
13597
13597
|
text: void 0,
|
|
13598
|
-
style:
|
|
13598
|
+
style: er
|
|
13599
13599
|
}));
|
|
13600
13600
|
w(this, "killSprite");
|
|
13601
|
-
w(this, "jumpText", new
|
|
13601
|
+
w(this, "jumpText", new Je({
|
|
13602
13602
|
text: void 0,
|
|
13603
|
-
style:
|
|
13603
|
+
style: er
|
|
13604
13604
|
}));
|
|
13605
13605
|
w(this, "jumpSprite");
|
|
13606
13606
|
w(this, "kills", 0);
|
|
13607
13607
|
w(this, "jumps", 0);
|
|
13608
|
-
this.
|
|
13608
|
+
this.container.zIndex = 100, this.killSprite = this.createSprite("skull"), this.killText.anchor.set(0, 0.5), this.jumpSprite = this.createSprite("weight"), this.jumpText.anchor.set(0, 0.5);
|
|
13609
13609
|
}
|
|
13610
13610
|
addJumps(t) {
|
|
13611
13611
|
this.jumps += t, this.draw();
|
|
@@ -13625,12 +13625,12 @@ class tc {
|
|
|
13625
13625
|
this.kills > 0 && (t.push(this.killSprite), t.push(this.killText), this.killText.text = this.kills), this.jumps > 0 && (t.push(this.jumpSprite), t.push(this.jumpText), this.jumpText.text = this.jumps);
|
|
13626
13626
|
const e = 4;
|
|
13627
13627
|
let r = -(t.reduce((n, a) => n + a.width, 0) + e * (t.length - 1)) / 2;
|
|
13628
|
-
this.
|
|
13628
|
+
this.container.removeChildren();
|
|
13629
13629
|
for (const n of t)
|
|
13630
|
-
n.position.set(r, 0), r += n.width + e, this.
|
|
13630
|
+
n.position.set(r, 0), r += n.width + e, this.container.addChild(n);
|
|
13631
13631
|
}
|
|
13632
13632
|
update(t) {
|
|
13633
|
-
this.
|
|
13633
|
+
this.container.position.x = t.position.x ?? this.container.position.x, this.container.position.y = t.position.y ?? this.container.position.y;
|
|
13634
13634
|
}
|
|
13635
13635
|
}
|
|
13636
13636
|
const ec = (i, t) => i.x < t.x + t.w && i.x + i.w > t.x && i.y < t.y + t.h && i.y + i.h > t.y, ic = (i, t, e) => {
|
|
@@ -13641,7 +13641,7 @@ const ec = (i, t) => i.x < t.x + t.w && i.x + i.w > t.x && i.y < t.y + t.h && i.
|
|
|
13641
13641
|
};
|
|
13642
13642
|
return ec(s, t) ? i.y + i.h < t.y && s.y + s.h >= t.y : !1;
|
|
13643
13643
|
};
|
|
13644
|
-
class
|
|
13644
|
+
class ir {
|
|
13645
13645
|
constructor() {
|
|
13646
13646
|
w(this, "container", new O());
|
|
13647
13647
|
w(this, "userState", {});
|
|
@@ -13684,11 +13684,10 @@ class Qt {
|
|
|
13684
13684
|
w(this, "fadeTween");
|
|
13685
13685
|
w(this, "scaleTween");
|
|
13686
13686
|
w(this, "offset", 0);
|
|
13687
|
-
|
|
13688
|
-
|
|
13689
|
-
|
|
13690
|
-
}
|
|
13691
|
-
this.container.addChild(this.name.text), this.container.addChild(this.info.containter), this.container.addChild(this.emoteSpitter.container), this.container.addChild(this.message.container), this.container.sortableChildren = !0;
|
|
13687
|
+
this.container.addChild(this.name.text), this.container.addChild(this.info.container), this.container.addChild(this.emoteSpitter.container), this.container.addChild(this.message.container), this.container.sortableChildren = !0;
|
|
13688
|
+
}
|
|
13689
|
+
get screenBounds() {
|
|
13690
|
+
return { left: this.offset, right: N.renderer.width - this.offset };
|
|
13692
13691
|
}
|
|
13693
13692
|
getCenterOffsetY() {
|
|
13694
13693
|
return this.sprite ? this.sprite.data.collider.h / 2 * this.getScale() : 0;
|
|
@@ -13733,7 +13732,7 @@ class Qt {
|
|
|
13733
13732
|
spawn(t = { isFalling: !1 }) {
|
|
13734
13733
|
if (!this.sprite)
|
|
13735
13734
|
return;
|
|
13736
|
-
const e = this.sprite.data.collider, s = this.sprite.data.size, r = -(e.y + e.h - s.h / 2), n = t.isFalling ? r :
|
|
13735
|
+
const e = this.sprite.data.collider, s = this.sprite.data.size, r = -(e.y + e.h - s.h / 2), n = t.isFalling ? r : N.renderer.height, a = s.w * this.getScale(), o = t.positionX != null ? t.positionX * this.screenBounds.right : Math.random() * (this.screenBounds.right - a) + a / 2, h = n * this.getScale();
|
|
13737
13736
|
if (this.container.x = o, this.container.y = h, this.state.direction = Math.random() > 0.5 ? 1 : -1, !t.isFalling) {
|
|
13738
13737
|
const c = ct.zIndexEvotarMin(this.container.zIndex);
|
|
13739
13738
|
this.state.zIndex = c, this.container.alpha = 0, this.spawnTween = new $t(this.container).to({ alpha: 1 }, 500).onComplete(t.onComplete).start();
|
|
@@ -13768,11 +13767,11 @@ class Qt {
|
|
|
13768
13767
|
}
|
|
13769
13768
|
async setSprite(t) {
|
|
13770
13769
|
if (t && t != this.state.sprite) {
|
|
13771
|
-
const e = await
|
|
13770
|
+
const e = await ti.getSpriteData(t);
|
|
13772
13771
|
if (!e)
|
|
13773
13772
|
return;
|
|
13774
13773
|
this.sprite && this.container.removeChild(this.sprite.container), this.state.sprite = t;
|
|
13775
|
-
const s =
|
|
13774
|
+
const s = ti.getAnimatedSprites(t);
|
|
13776
13775
|
this.sprite = new Zl(s, e.data), this.container.addChild(this.sprite.container), this.trail.setSprite(this.sprite), this.setAnimationState(this.animationState, !0);
|
|
13777
13776
|
}
|
|
13778
13777
|
}
|
|
@@ -13800,7 +13799,7 @@ class Qt {
|
|
|
13800
13799
|
const r = this.runSpeed * this.state.direction;
|
|
13801
13800
|
this.velocity.x = r * Ut;
|
|
13802
13801
|
}
|
|
13803
|
-
this.velocity.y = this.velocity.y + this.gravity, e.x += this.velocity.x, e.y += this.velocity.y, this.isOnGround(e.y) && (this.velocity.y = 0, this.velocity.x = 0, e.y =
|
|
13802
|
+
this.velocity.y = this.velocity.y + this.gravity, e.x += this.velocity.x, e.y += this.velocity.y, this.isOnGround(e.y) && (this.velocity.y = 0, this.velocity.x = 0, e.y = N.renderer.height, this.animationState == Q.Fall && (this.setAnimationState(Q.Land), this.landTimer = new It(200, () => {
|
|
13804
13803
|
this.setAnimationState(Q.Idle), this.isJumping = !1, this.isHitJumping = !1;
|
|
13805
13804
|
}))), this.velocity.y > 0 && this.setAnimationState(Q.Fall);
|
|
13806
13805
|
}
|
|
@@ -13841,7 +13840,7 @@ class Qt {
|
|
|
13841
13840
|
}
|
|
13842
13841
|
}), this.message.update({
|
|
13843
13842
|
position: {
|
|
13844
|
-
y: this.info.
|
|
13843
|
+
y: this.info.container.position.y - this.info.container.height - 6
|
|
13845
13844
|
}
|
|
13846
13845
|
}), this.emoteSpitter.update({
|
|
13847
13846
|
position: {
|
|
@@ -13866,7 +13865,7 @@ class Qt {
|
|
|
13866
13865
|
});
|
|
13867
13866
|
}
|
|
13868
13867
|
isOnGround(t) {
|
|
13869
|
-
return t >
|
|
13868
|
+
return t > N.renderer.height;
|
|
13870
13869
|
}
|
|
13871
13870
|
addMessage(t) {
|
|
13872
13871
|
var e;
|
|
@@ -13882,9 +13881,9 @@ class Qt {
|
|
|
13882
13881
|
}
|
|
13883
13882
|
class sc {
|
|
13884
13883
|
play(t, e, s) {
|
|
13885
|
-
const r = yt.get(t), n =
|
|
13886
|
-
n && (
|
|
13887
|
-
|
|
13884
|
+
const r = yt.get(t), n = ti.createAnimatedSprite(t, r);
|
|
13885
|
+
n && (N.stage.addChild(n), n.zIndex = 1e3, n.scale.set(s, s), n.position.set(e.x, e.y), n.anchor.set(0.5, 0.5), n.loop = !1, n.texture.source.scaleMode = "nearest", n.play(), n.onComplete = () => {
|
|
13886
|
+
N.stage.removeChild(n);
|
|
13888
13887
|
});
|
|
13889
13888
|
}
|
|
13890
13889
|
}
|
|
@@ -13904,7 +13903,7 @@ class nc {
|
|
|
13904
13903
|
this.sprite = xt.from(s);
|
|
13905
13904
|
}
|
|
13906
13905
|
isOnGround(t) {
|
|
13907
|
-
return t >
|
|
13906
|
+
return t > N.renderer.height;
|
|
13908
13907
|
}
|
|
13909
13908
|
update() {
|
|
13910
13909
|
var e;
|
|
@@ -13913,7 +13912,7 @@ class nc {
|
|
|
13913
13912
|
x: this.container.position.x,
|
|
13914
13913
|
y: this.container.position.y
|
|
13915
13914
|
};
|
|
13916
|
-
this.velocity.y = this.velocity.y + this.gravity, t.x += this.velocity.x, t.y += this.velocity.y, this.isOnGround(t.y) && (this.velocity.y = 0, this.velocity.x = 0, t.y =
|
|
13915
|
+
this.velocity.y = this.velocity.y + this.gravity, t.x += this.velocity.x, t.y += this.velocity.y, this.isOnGround(t.y) && (this.velocity.y = 0, this.velocity.x = 0, t.y = N.renderer.height), this.container.position.set(t.x, t.y);
|
|
13917
13916
|
}
|
|
13918
13917
|
despawn(t = !1, e = () => {
|
|
13919
13918
|
}) {
|
|
@@ -13946,6 +13945,7 @@ const ac = 1e3 * 60 * 5;
|
|
|
13946
13945
|
class oc {
|
|
13947
13946
|
constructor() {
|
|
13948
13947
|
w(this, "viewers", {});
|
|
13948
|
+
w(this, "viewerArray", []);
|
|
13949
13949
|
w(this, "tombstones", []);
|
|
13950
13950
|
w(this, "raiders", []);
|
|
13951
13951
|
w(this, "recentEvotarActivity", {});
|
|
@@ -13969,27 +13969,33 @@ class oc {
|
|
|
13969
13969
|
return Object.values(this.viewers).concat(this.raiders);
|
|
13970
13970
|
}
|
|
13971
13971
|
async spawnViewerEvotar(t, e, s) {
|
|
13972
|
-
const r = new
|
|
13973
|
-
|
|
13972
|
+
const r = new ir();
|
|
13973
|
+
if (this.addViewer(t, r), N.settings.maxEvotars && this.viewerArray.length > N.settings.maxEvotars) {
|
|
13974
|
+
const n = this.viewerArray.shift(), a = n != null ? this.viewers[n] : void 0;
|
|
13975
|
+
n && a && this.deleteViewer(n, a);
|
|
13976
|
+
}
|
|
13977
|
+
return await r.setProps(e), r.spawn(s), this.recentEvotarActivity[t] = performance.now(), r;
|
|
13974
13978
|
}
|
|
13975
13979
|
async processRaid(t) {
|
|
13976
|
-
if (!
|
|
13980
|
+
if (!N.settings.fallingRaiders)
|
|
13977
13981
|
return;
|
|
13978
13982
|
const e = 1 / t.viewers.count * 5e3;
|
|
13979
|
-
|
|
13980
|
-
|
|
13981
|
-
|
|
13983
|
+
let s = t.viewers.count;
|
|
13984
|
+
N.settings.maxEvotars && (s = Math.min(s, N.settings.maxEvotars));
|
|
13985
|
+
for (let o = 0; o < t.viewers.count; o++) {
|
|
13986
|
+
const h = new ir();
|
|
13987
|
+
await h.setProps({
|
|
13982
13988
|
isAnonymous: !0,
|
|
13983
13989
|
zIndex: -1,
|
|
13984
13990
|
sprite: t.viewers.sprite,
|
|
13985
13991
|
color: new J(t.broadcaster.info.color)
|
|
13986
|
-
}),
|
|
13987
|
-
this.addRaider(
|
|
13988
|
-
}),
|
|
13989
|
-
this.despawnRaider(
|
|
13992
|
+
}), ji.add(e * o, () => {
|
|
13993
|
+
this.addRaider(h), h.spawn({ isFalling: !0 });
|
|
13994
|
+
}), ji.add(o * e + 6e4, () => {
|
|
13995
|
+
this.despawnRaider(h);
|
|
13990
13996
|
});
|
|
13991
13997
|
}
|
|
13992
|
-
const
|
|
13998
|
+
const r = this.viewers[t.broadcaster.id], n = {
|
|
13993
13999
|
...this.prepareEvotarProps(
|
|
13994
14000
|
t.broadcaster.info.displayName,
|
|
13995
14001
|
t.broadcaster.info.color,
|
|
@@ -13997,15 +14003,17 @@ class oc {
|
|
|
13997
14003
|
),
|
|
13998
14004
|
scale: 2,
|
|
13999
14005
|
isImmortal: !0
|
|
14000
|
-
},
|
|
14001
|
-
|
|
14002
|
-
|
|
14006
|
+
}, a = async () => {
|
|
14007
|
+
await this.spawnViewerEvotar(t.broadcaster.id, n, {
|
|
14008
|
+
isFalling: !0,
|
|
14009
|
+
positionX: 0.5
|
|
14010
|
+
});
|
|
14003
14011
|
};
|
|
14004
|
-
this.recentEvotarActivity[t.broadcaster.id] = performance.now(),
|
|
14012
|
+
this.recentEvotarActivity[t.broadcaster.id] = performance.now(), r ? r.despawn({
|
|
14005
14013
|
onComplete: () => {
|
|
14006
|
-
|
|
14014
|
+
a();
|
|
14007
14015
|
}
|
|
14008
|
-
}) :
|
|
14016
|
+
}) : a();
|
|
14009
14017
|
}
|
|
14010
14018
|
despawnTombStone(t) {
|
|
14011
14019
|
const e = this.tombstones.find((s) => s.evotar == t);
|
|
@@ -14035,15 +14043,15 @@ class oc {
|
|
|
14035
14043
|
n && this.despawnViewer(e, n);
|
|
14036
14044
|
}
|
|
14037
14045
|
}
|
|
14038
|
-
if (
|
|
14046
|
+
if (N.settings.showAnonymousEvotars) {
|
|
14039
14047
|
for (const e of t)
|
|
14040
14048
|
if (!this.viewers[e.userId]) {
|
|
14041
14049
|
const r = {
|
|
14042
14050
|
name: e.name,
|
|
14043
14051
|
isAnonymous: !this.hasActivity(e.userId),
|
|
14044
14052
|
sprite: "default"
|
|
14045
|
-
}
|
|
14046
|
-
this.
|
|
14053
|
+
};
|
|
14054
|
+
await this.spawnViewerEvotar(e.userId, r, {});
|
|
14047
14055
|
}
|
|
14048
14056
|
}
|
|
14049
14057
|
}
|
|
@@ -14051,11 +14059,11 @@ class oc {
|
|
|
14051
14059
|
if (Nh(t) && e.jump({
|
|
14052
14060
|
velocityX: t.data.velocityX,
|
|
14053
14061
|
velocityY: t.data.velocityY
|
|
14054
|
-
}),
|
|
14062
|
+
}), jh(t) && e.dash({ force: t.data.force }), Yh(t)) {
|
|
14055
14063
|
const s = P(t.data.color);
|
|
14056
14064
|
s && s.isValid() && e.setUserProps({ color: new J(t.data.color) });
|
|
14057
14065
|
}
|
|
14058
|
-
|
|
14066
|
+
Vh(t) && e.scale({
|
|
14059
14067
|
value: t.data.scale,
|
|
14060
14068
|
duration: t.data.duration
|
|
14061
14069
|
}), Xh(t) && e.setSprite(t.data.sprite), $h(t) && e.addJumpHit(t.data.count), qh(t) && e.resurrect();
|
|
@@ -14078,17 +14086,12 @@ class oc {
|
|
|
14078
14086
|
t.info.color,
|
|
14079
14087
|
t.info.sprite
|
|
14080
14088
|
);
|
|
14081
|
-
|
|
14082
|
-
|
|
14083
|
-
|
|
14084
|
-
|
|
14085
|
-
|
|
14086
|
-
|
|
14087
|
-
const n = this.viewers[t.userId];
|
|
14088
|
-
n && this.doAction(t, n);
|
|
14089
|
-
}
|
|
14090
|
-
});
|
|
14091
|
-
}
|
|
14089
|
+
e ? (await e.setProps(s), this.doAction(t, e)) : await this.spawnViewerEvotar(t.userId, s, {
|
|
14090
|
+
onComplete: () => {
|
|
14091
|
+
const r = this.viewers[t.userId];
|
|
14092
|
+
r && this.doAction(t, r);
|
|
14093
|
+
}
|
|
14094
|
+
});
|
|
14092
14095
|
}
|
|
14093
14096
|
async processMessage(t) {
|
|
14094
14097
|
const e = this.prepareEvotarProps(
|
|
@@ -14100,8 +14103,10 @@ class oc {
|
|
|
14100
14103
|
if (s)
|
|
14101
14104
|
s.setProps(e);
|
|
14102
14105
|
else {
|
|
14103
|
-
const r =
|
|
14104
|
-
s =
|
|
14106
|
+
const r = N.settings.fallingEvotars ? !this.hasActivity(t.userId) : !1;
|
|
14107
|
+
s = await this.spawnViewerEvotar(t.userId, e, {
|
|
14108
|
+
isFalling: r
|
|
14109
|
+
});
|
|
14105
14110
|
}
|
|
14106
14111
|
this.recentEvotarActivity[t.userId] = performance.now(), t.message && s.addMessage(t.message), t.emotes.length > 0 && s.spitEmotes(t.emotes);
|
|
14107
14112
|
}
|
|
@@ -14114,13 +14119,13 @@ class oc {
|
|
|
14114
14119
|
this.addTombStone(e), e.spawn();
|
|
14115
14120
|
}
|
|
14116
14121
|
addTombStone(t) {
|
|
14117
|
-
|
|
14122
|
+
N.stage.addChild(t.container), this.tombstones.push(t);
|
|
14118
14123
|
}
|
|
14119
14124
|
deleteTombStone(t) {
|
|
14120
|
-
|
|
14125
|
+
N.stage.removeChild(t.container), this.tombstones = this.tombstones.filter((e) => e != t);
|
|
14121
14126
|
}
|
|
14122
14127
|
addViewer(t, e) {
|
|
14123
|
-
this.subscriptions.forEach((s) => s.onAdd(e)), this.viewers[t] = e;
|
|
14128
|
+
this.subscriptions.forEach((s) => s.onAdd(e)), this.viewers[t] = e, this.viewerArray.push(t);
|
|
14124
14129
|
}
|
|
14125
14130
|
deleteViewer(t, e) {
|
|
14126
14131
|
this.subscriptions.forEach((s) => s.onDelete(e)), delete this.viewers[t];
|
|
@@ -14149,7 +14154,7 @@ class hc {
|
|
|
14149
14154
|
w(this, "ticker");
|
|
14150
14155
|
}
|
|
14151
14156
|
async initialize(t, e) {
|
|
14152
|
-
|
|
14157
|
+
ti.initialize(e.spriteLoaderFn), un.initialize(e.sounds), e.font && await yt.load({
|
|
14153
14158
|
src: e.font,
|
|
14154
14159
|
data: { family: "Custom Font" }
|
|
14155
14160
|
});
|
|
@@ -14158,7 +14163,7 @@ class hc {
|
|
|
14158
14163
|
alias: s,
|
|
14159
14164
|
src: e.assets[s]
|
|
14160
14165
|
});
|
|
14161
|
-
await yt.load(["skull", "weight", "poof", "rip1", "rip2"]), this.ticker = new ot(), this.ticker.deltaTime = Ut * 0.06, this.renderer = await
|
|
14166
|
+
await yt.load(["skull", "weight", "poof", "rip1", "rip2"]), this.ticker = new ot(), this.ticker.deltaTime = Ut * 0.06, this.renderer = await Va({
|
|
14162
14167
|
preference: "webgl"
|
|
14163
14168
|
}), await this.renderer.init({
|
|
14164
14169
|
width: t.clientWidth,
|
|
@@ -14177,10 +14182,10 @@ class hc {
|
|
|
14177
14182
|
this.settings = t;
|
|
14178
14183
|
}
|
|
14179
14184
|
update() {
|
|
14180
|
-
|
|
14185
|
+
ji.tick(), ct.update(), this.renderer.render(this.stage);
|
|
14181
14186
|
}
|
|
14182
14187
|
}
|
|
14183
|
-
const
|
|
14188
|
+
const N = new hc();
|
|
14184
14189
|
class fc {
|
|
14185
14190
|
constructor(t, e) {
|
|
14186
14191
|
w(this, "isRendered", !1);
|
|
@@ -14194,19 +14199,19 @@ class fc {
|
|
|
14194
14199
|
return ct;
|
|
14195
14200
|
}
|
|
14196
14201
|
updateSettings(t) {
|
|
14197
|
-
|
|
14202
|
+
N.updateSettings(t);
|
|
14198
14203
|
}
|
|
14199
14204
|
async run() {
|
|
14200
14205
|
if (this.isRendered)
|
|
14201
14206
|
return;
|
|
14202
14207
|
this.isRendered = !0, await (async () => {
|
|
14203
|
-
await
|
|
14208
|
+
await N.initialize(this.root, this.options), performance.now();
|
|
14204
14209
|
let e = -1;
|
|
14205
14210
|
const r = 1e3 / 60;
|
|
14206
14211
|
requestAnimationFrame(n);
|
|
14207
14212
|
function n(a = performance.now()) {
|
|
14208
14213
|
const o = a - e | 0;
|
|
14209
|
-
o > r && (e = a - o % r,
|
|
14214
|
+
o > r && (e = a - o % r, N.update()), requestAnimationFrame(n);
|
|
14210
14215
|
}
|
|
14211
14216
|
})();
|
|
14212
14217
|
}
|
|
@@ -14216,51 +14221,51 @@ export {
|
|
|
14216
14221
|
Gr as A,
|
|
14217
14222
|
at as B,
|
|
14218
14223
|
O as C,
|
|
14219
|
-
|
|
14224
|
+
Y as D,
|
|
14220
14225
|
B as E,
|
|
14221
|
-
|
|
14226
|
+
Ss as F,
|
|
14222
14227
|
aa as G,
|
|
14223
|
-
|
|
14228
|
+
_i as H,
|
|
14224
14229
|
J as I,
|
|
14225
14230
|
gr as J,
|
|
14226
|
-
|
|
14227
|
-
|
|
14231
|
+
q as K,
|
|
14232
|
+
$ as L,
|
|
14228
14233
|
D as M,
|
|
14229
14234
|
To as N,
|
|
14230
|
-
|
|
14235
|
+
ne as O,
|
|
14231
14236
|
st as P,
|
|
14232
14237
|
gh as Q,
|
|
14233
14238
|
tt as R,
|
|
14234
14239
|
Fo as S,
|
|
14235
14240
|
ot as T,
|
|
14236
|
-
|
|
14241
|
+
Te as U,
|
|
14237
14242
|
tn as V,
|
|
14238
14243
|
Gh as W,
|
|
14239
14244
|
an as X,
|
|
14240
|
-
|
|
14245
|
+
Be as Y,
|
|
14241
14246
|
rt as Z,
|
|
14242
14247
|
hn as _,
|
|
14243
14248
|
Bt as a,
|
|
14244
14249
|
Xr as a0,
|
|
14245
14250
|
Zt as a1,
|
|
14246
14251
|
bt as a2,
|
|
14247
|
-
|
|
14248
|
-
|
|
14252
|
+
ks as a3,
|
|
14253
|
+
Ze as a4,
|
|
14249
14254
|
Ln as a5,
|
|
14250
14255
|
qr as a6,
|
|
14251
14256
|
fc as a7,
|
|
14252
14257
|
Nh as a8,
|
|
14253
14258
|
Yh as a9,
|
|
14254
|
-
|
|
14255
|
-
|
|
14259
|
+
Vh as aa,
|
|
14260
|
+
jh as ab,
|
|
14256
14261
|
Xh as ac,
|
|
14257
14262
|
$h as ad,
|
|
14258
14263
|
qh as ae,
|
|
14259
|
-
|
|
14264
|
+
Ee as b,
|
|
14260
14265
|
wa as c,
|
|
14261
14266
|
Dr as d,
|
|
14262
14267
|
dt as e,
|
|
14263
|
-
|
|
14268
|
+
Fs as f,
|
|
14264
14269
|
Eo as g,
|
|
14265
14270
|
Mr as h,
|
|
14266
14271
|
Ot as i,
|
|
@@ -14272,7 +14277,7 @@ export {
|
|
|
14272
14277
|
Lo as o,
|
|
14273
14278
|
Io as p,
|
|
14274
14279
|
kt as q,
|
|
14275
|
-
|
|
14280
|
+
jn as r,
|
|
14276
14281
|
pr as s,
|
|
14277
14282
|
St as t,
|
|
14278
14283
|
et as u,
|
|
@@ -14280,5 +14285,5 @@ export {
|
|
|
14280
14285
|
it as w,
|
|
14281
14286
|
Aa as x,
|
|
14282
14287
|
Ha as y,
|
|
14283
|
-
|
|
14288
|
+
Ts as z
|
|
14284
14289
|
};
|