aoi-comp 1.0.6 → 1.0.8
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/{BufferResource-CVU-ZRRz.js → BufferResource-DPOGqxQ8.js} +8 -6
- package/dist/{CanvasPool-C3aVgvEX.js → CanvasPool-Btji3eOu.js} +1 -1
- package/dist/{Geometry-CN7W9DnD.js → Geometry-CmoUjYuy.js} +13 -12
- package/dist/{RenderTargetSystem-D_FiZPnb.js → RenderTargetSystem-BwBGe2Se.js} +252 -252
- package/dist/{browserAll-DqFkNC6q.js → browserAll-BIc-EcPU.js} +20 -20
- package/dist/{canvasUtils-D0KM_fKp.js → canvasUtils-BZU-qDXH.js} +1 -1
- package/dist/comps.js +20774 -3227
- package/dist/{getTextureBatchBindGroup-CLFTP_Vc.js → getTextureBatchBindGroup-B9kZnBNO.js} +1 -1
- package/dist/hooks-DVVg7e1H.js +527 -0
- package/dist/hooks.js +2 -2
- package/dist/index.js +1 -1
- package/dist/{init-DVXFVLyx.js → init-W_GeGJkn.js} +54 -47
- package/dist/{init-CIaGzij5.js → init-pj0uFHxN.js} +18 -18
- package/dist/{packages-Dd2mV9Xv.js → packages-B-izsU7O.js} +985 -718
- package/dist/style.css +1 -1
- package/dist/utils.js +2 -2
- package/dist/webworkerAll-CSNhSmU-.js +2 -0
- package/package.json +5 -4
- package/dist/CanvasRenderer-CVj7HTkL.js +0 -3460
- package/dist/WebGLRenderer-CurPxJtF.js +0 -2210
- package/dist/WebGPURenderer-CfiYFIN2.js +0 -1840
- package/dist/hooks-FYdXNEDe.js +0 -452
- package/dist/rolldown-runtime-CWhphoD1.js +0 -23
- package/dist/webworkerAll-XSXRmCFC.js +0 -2
|
@@ -1,3460 +0,0 @@
|
|
|
1
|
-
import { n as e } from "./rolldown-runtime-CWhphoD1.js";
|
|
2
|
-
import { $ as t, A as n, B as r, E as i, I as a, J as o, K as s, O as c, Q as l, R as u, S as d, V as f, X as p, Y as m, Z as h, b as g, et as _, it as v, l as y, nt as b, o as x, rt as S, tt as C, y as w, z as T } from "./Geometry-CN7W9DnD.js";
|
|
3
|
-
import { n as E, r as D, t as O } from "./canvasUtils-D0KM_fKp.js";
|
|
4
|
-
import { D as k, a as A, c as j, d as M, f as N, i as P, l as F, o as I, r as ee, s as te, t as ne, u as re } from "./RenderTargetSystem-D_FiZPnb.js";
|
|
5
|
-
import { t as ie } from "./getTextureBatchBindGroup-CLFTP_Vc.js";
|
|
6
|
-
//#region node_modules/.pnpm/earcut@3.2.3/node_modules/earcut/src/earcut.js
|
|
7
|
-
var L = /* @__PURE__ */ new Set(), R = !1;
|
|
8
|
-
function ae(e, t, n = 2) {
|
|
9
|
-
let r = t && t.length, i = r ? t[0] * n : e.length;
|
|
10
|
-
L.size && L.clear();
|
|
11
|
-
let a = oe(e, 0, i, n, !0), o = [];
|
|
12
|
-
if (!a || a.next === a.prev) return o;
|
|
13
|
-
let s = 0, c = 0, l = 0;
|
|
14
|
-
if (r && (a = ue(e, t, a, n)), e.length > 80 * n) {
|
|
15
|
-
s = e[0], c = e[1];
|
|
16
|
-
let t = s, r = c;
|
|
17
|
-
for (let a = n; a < i; a += n) {
|
|
18
|
-
let n = e[a], i = e[a + 1];
|
|
19
|
-
n < s && (s = n), i < c && (c = i), n > t && (t = n), i > r && (r = i);
|
|
20
|
-
}
|
|
21
|
-
l = Math.max(t - s, r - c), l = l === 0 ? 0 : 32767 / l;
|
|
22
|
-
}
|
|
23
|
-
return B(a, o, s, c, l), o;
|
|
24
|
-
}
|
|
25
|
-
function oe(e, t, n, r, i) {
|
|
26
|
-
let a = null;
|
|
27
|
-
if (i === We(e, t, n, r) > 0) for (let i = t; i < n; i += r) a = Ve(i / r | 0, e[i], e[i + 1], a);
|
|
28
|
-
else for (let i = n - r; i >= t; i -= r) a = Ve(i / r | 0, e[i], e[i + 1], a);
|
|
29
|
-
return a && Pe(a, a.next) && (He(a), a = a.next), a;
|
|
30
|
-
}
|
|
31
|
-
function z(e, t = e) {
|
|
32
|
-
let n = t === e, r = e, i;
|
|
33
|
-
do
|
|
34
|
-
i = !1, r !== r.next && (L.size === 0 || !L.has(r)) && (Pe(r, r.next) || K(r.prev, r, r.next) === 0) ? ((n || r === t) && (t = r.prev), R = !0, He(r), r = r.prev, i = !0) : (n || r !== t) && (r = r.next, i = !n);
|
|
35
|
-
while (i || r !== t);
|
|
36
|
-
return t;
|
|
37
|
-
}
|
|
38
|
-
function B(e, t, n, r, i) {
|
|
39
|
-
i && De(e, n, r, i);
|
|
40
|
-
let a = e, o = !1;
|
|
41
|
-
for (; e.prev !== e.next;) {
|
|
42
|
-
let s = e.prev, c = e.next;
|
|
43
|
-
if (K(s, e, c) < 0 && (i ? ce(e, n, r, i) : se(e))) {
|
|
44
|
-
t.push(s.i, e.i, c.i), He(e), e = c, a = c;
|
|
45
|
-
continue;
|
|
46
|
-
}
|
|
47
|
-
if (e = c, e === a) {
|
|
48
|
-
if (R = !1, e = z(e), R) {
|
|
49
|
-
a = e;
|
|
50
|
-
continue;
|
|
51
|
-
}
|
|
52
|
-
if (!o) {
|
|
53
|
-
e = V(e, t), a = e, o = !0;
|
|
54
|
-
continue;
|
|
55
|
-
}
|
|
56
|
-
H(e, t, n, r, i);
|
|
57
|
-
break;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
function se(e) {
|
|
62
|
-
let t = e.prev, n = e, r = e.next, i = t.x, a = n.x, o = r.x, s = t.y, c = n.y, l = r.y, u = Math.min(i, a, o), d = Math.min(s, c, l), f = Math.max(i, a, o), p = Math.max(s, c, l), m = r.next;
|
|
63
|
-
for (; m !== t;) {
|
|
64
|
-
if (m.x >= u && m.x <= f && m.y >= d && m.y <= p && !(i === m.x && s === m.y) && Me(i, s, a, c, o, l, m.x, m.y) && K(m.prev, m, m.next) >= 0) return !1;
|
|
65
|
-
m = m.next;
|
|
66
|
-
}
|
|
67
|
-
return !0;
|
|
68
|
-
}
|
|
69
|
-
function ce(e, t, n, r) {
|
|
70
|
-
let i = e.prev, a = e, o = e.next, s = i.x, c = a.x, l = o.x, u = i.y, d = a.y, f = o.y, p = Math.min(s, c, l), m = Math.min(u, d, f), h = Math.max(s, c, l), g = Math.max(u, d, f), _ = Ae(p, m, t, n, r), v = Ae(h, g, t, n, r), y = e.prevZ;
|
|
71
|
-
for (; y && y.z >= _;) {
|
|
72
|
-
if (y.x >= p && y.x <= h && y.y >= m && y.y <= g && y !== o && !(s === y.x && u === y.y) && Me(s, u, c, d, l, f, y.x, y.y) && K(y.prev, y, y.next) >= 0) return !1;
|
|
73
|
-
y = y.prevZ;
|
|
74
|
-
}
|
|
75
|
-
let b = e.nextZ;
|
|
76
|
-
for (; b && b.z <= v;) {
|
|
77
|
-
if (b.x >= p && b.x <= h && b.y >= m && b.y <= g && b !== o && !(s === b.x && u === b.y) && Me(s, u, c, d, l, f, b.x, b.y) && K(b.prev, b, b.next) >= 0) return !1;
|
|
78
|
-
b = b.nextZ;
|
|
79
|
-
}
|
|
80
|
-
return !0;
|
|
81
|
-
}
|
|
82
|
-
function V(e, t) {
|
|
83
|
-
let n = e, r = !1;
|
|
84
|
-
do {
|
|
85
|
-
let i = n.prev, a = n.next.next;
|
|
86
|
-
Fe(i, n, n.next, a, !1) && Re(i, a) && Re(a, i) && (t.push(i.i, n.i, a.i), He(n), He(n.next), n = e = a, r = !0), n = n.next;
|
|
87
|
-
} while (n !== e);
|
|
88
|
-
return r ? z(n) : n;
|
|
89
|
-
}
|
|
90
|
-
function H(e, t, n, r, i) {
|
|
91
|
-
let a = e;
|
|
92
|
-
do {
|
|
93
|
-
let e = a.next.next;
|
|
94
|
-
for (; e !== a.prev;) {
|
|
95
|
-
if (a.i !== e.i && Ne(a, e)) {
|
|
96
|
-
let o = Be(a, e);
|
|
97
|
-
a = z(a, a.next), o = z(o, o.next), B(a, t, n, r, i), B(o, t, n, r, i);
|
|
98
|
-
return;
|
|
99
|
-
}
|
|
100
|
-
e = e.next;
|
|
101
|
-
}
|
|
102
|
-
a = a.next;
|
|
103
|
-
} while (a !== e);
|
|
104
|
-
}
|
|
105
|
-
var le = !1;
|
|
106
|
-
function ue(e, t, n, r) {
|
|
107
|
-
let i = [];
|
|
108
|
-
for (let n = 0, a = t.length; n < a; n++) {
|
|
109
|
-
let o = oe(e, t[n] * r, n < a - 1 ? t[n + 1] * r : e.length, r, !1);
|
|
110
|
-
o === o.next && L.add(o), i.push(je(o));
|
|
111
|
-
}
|
|
112
|
-
i.sort(de), _e(e.length / r, t.length), ve(n, n), le = !0;
|
|
113
|
-
for (let e = 0; e < i.length; e++) n = fe(i[e], n);
|
|
114
|
-
return le = !1, z(n);
|
|
115
|
-
}
|
|
116
|
-
function de(e, t) {
|
|
117
|
-
return e.x - t.x || e.y - t.y || (e.next.y - e.y) / (e.next.x - e.x) - (t.next.y - t.y) / (t.next.x - t.x);
|
|
118
|
-
}
|
|
119
|
-
function fe(e, t) {
|
|
120
|
-
let n = Se(e, t);
|
|
121
|
-
if (!n) return t;
|
|
122
|
-
let r = Be(n, e), i = r.next;
|
|
123
|
-
return ve(n, i.next), z(r, r.next), z(n, n.next);
|
|
124
|
-
}
|
|
125
|
-
var pe = 16, U = /* @__PURE__ */ new Float64Array(), me = 0, he = [], ge = [];
|
|
126
|
-
function _e(e, t) {
|
|
127
|
-
let n = Math.ceil((e + 2 * t) / pe) + t + 2;
|
|
128
|
-
U.length < n * 4 && (U = new Float64Array(n * 4)), me = 0;
|
|
129
|
-
}
|
|
130
|
-
function ve(e, t) {
|
|
131
|
-
let n = e;
|
|
132
|
-
do {
|
|
133
|
-
let e = me++;
|
|
134
|
-
he[e] = n;
|
|
135
|
-
let r = Infinity, i = Infinity, a = -Infinity, o = -Infinity, s = 0;
|
|
136
|
-
do {
|
|
137
|
-
let t = n.next;
|
|
138
|
-
n.z = e, n.x < r && (r = n.x), n.x > a && (a = n.x), n.y < i && (i = n.y), n.y > o && (o = n.y), t.x < r && (r = t.x), t.x > a && (a = t.x), t.y < i && (i = t.y), t.y > o && (o = t.y), n = t;
|
|
139
|
-
} while (++s < pe && n !== t);
|
|
140
|
-
ge[e] = n;
|
|
141
|
-
let c = e * 4;
|
|
142
|
-
U[c] = r, U[c + 1] = i, U[c + 2] = a, U[c + 3] = o;
|
|
143
|
-
} while (n !== t);
|
|
144
|
-
}
|
|
145
|
-
function ye(e, t) {
|
|
146
|
-
let n = e.z * 4;
|
|
147
|
-
t.x < U[n] && (U[n] = t.x), t.y < U[n + 1] && (U[n + 1] = t.y), t.x > U[n + 2] && (U[n + 2] = t.x), t.y > U[n + 3] && (U[n + 3] = t.y);
|
|
148
|
-
}
|
|
149
|
-
function be(e) {
|
|
150
|
-
let t = ge[e];
|
|
151
|
-
for (; t.prev.next !== t;) t = t.next;
|
|
152
|
-
return ge[e] = t, t;
|
|
153
|
-
}
|
|
154
|
-
function xe(e) {
|
|
155
|
-
let t = he[e];
|
|
156
|
-
for (; t.prev.next !== t;) t = t.next;
|
|
157
|
-
return he[e] = t, t;
|
|
158
|
-
}
|
|
159
|
-
function Se(e, t) {
|
|
160
|
-
let n = t, r = e.x, i = e.y, a = -Infinity, o;
|
|
161
|
-
if (Pe(e, n)) return n;
|
|
162
|
-
for (let t = 0, s = 0; t < me; t++, s += 4) {
|
|
163
|
-
if (i < U[s + 1] || i > U[s + 3] || U[s] > r || U[s + 2] <= a) continue;
|
|
164
|
-
let c = be(t);
|
|
165
|
-
n = xe(t);
|
|
166
|
-
do {
|
|
167
|
-
if (n.prev.next === n) {
|
|
168
|
-
if (Pe(e, n.next)) return n.next;
|
|
169
|
-
if (i <= n.y && i >= n.next.y && n.next.y !== n.y) {
|
|
170
|
-
let e = n.x + (i - n.y) * (n.next.x - n.x) / (n.next.y - n.y);
|
|
171
|
-
if (e <= r && e > a && (a = e, o = n.x < n.next.x ? n : n.next, e === r)) return o;
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
n = n.next;
|
|
175
|
-
} while (n !== c);
|
|
176
|
-
}
|
|
177
|
-
if (!o) return null;
|
|
178
|
-
let s = o.x, c = o.y, l = Math.min(i, c), u = Math.max(i, c), d = Infinity;
|
|
179
|
-
for (let t = 0, f = 0; t < me; t++, f += 4) {
|
|
180
|
-
if (U[f + 2] < s || U[f] > r || U[f + 3] < l || U[f + 1] > u) continue;
|
|
181
|
-
let p = be(t);
|
|
182
|
-
n = xe(t);
|
|
183
|
-
do {
|
|
184
|
-
if (n.prev.next === n && r >= n.x && n.x >= s && r !== n.x && Me(i < c ? r : a, i, s, c, i < c ? a : r, i, n.x, n.y)) {
|
|
185
|
-
let t = Math.abs(i - n.y) / (r - n.x);
|
|
186
|
-
(Re(n, e) || n.y === i && n.next.y === i && n.next.x > r) && (t < d || t === d && (n.x > o.x || n.x === o.x && Ce(o, n))) && (o = n, d = t);
|
|
187
|
-
}
|
|
188
|
-
n = n.next;
|
|
189
|
-
} while (n !== p);
|
|
190
|
-
}
|
|
191
|
-
return o;
|
|
192
|
-
}
|
|
193
|
-
function Ce(e, t) {
|
|
194
|
-
return K(e.prev, e, t.prev) < 0 && K(t.next, e, e.next) < 0;
|
|
195
|
-
}
|
|
196
|
-
var W = [], we = [], G = /* @__PURE__ */ new Uint32Array(), Te = /* @__PURE__ */ new Uint32Array(), Ee = /* @__PURE__ */ new Uint32Array(256);
|
|
197
|
-
function De(e, t, n, r) {
|
|
198
|
-
let i = e, a = 0;
|
|
199
|
-
do
|
|
200
|
-
i.z = Ae(i.x, i.y, t, n, r), W[a++] = i, i = i.next;
|
|
201
|
-
while (i !== e);
|
|
202
|
-
Oe(a);
|
|
203
|
-
let o = null;
|
|
204
|
-
for (let e = 0; e < a; e++) {
|
|
205
|
-
let t = W[e];
|
|
206
|
-
t.prevZ = o, o && (o.nextZ = t), o = t;
|
|
207
|
-
}
|
|
208
|
-
o.nextZ = null;
|
|
209
|
-
}
|
|
210
|
-
function Oe(e) {
|
|
211
|
-
if (e <= 32) {
|
|
212
|
-
for (let t = 1; t < e; t++) {
|
|
213
|
-
let e = W[t], n = e.z, r = t - 1;
|
|
214
|
-
for (; r >= 0 && W[r].z > n;) W[r + 1] = W[r], r--;
|
|
215
|
-
W[r + 1] = e;
|
|
216
|
-
}
|
|
217
|
-
return;
|
|
218
|
-
}
|
|
219
|
-
G.length < e && (G = new Uint32Array(e), Te = new Uint32Array(e), we = Array(e));
|
|
220
|
-
for (let t = 0; t < e; t++) G[t] = W[t].z;
|
|
221
|
-
ke(e, W, G, we, Te, 0), ke(e, we, Te, W, G, 8), ke(e, W, G, we, Te, 16), ke(e, we, Te, W, G, 24);
|
|
222
|
-
}
|
|
223
|
-
function ke(e, t, n, r, i, a) {
|
|
224
|
-
Ee.fill(0);
|
|
225
|
-
for (let t = 0; t < e; t++) Ee[n[t] >>> a & 255]++;
|
|
226
|
-
let o = 0;
|
|
227
|
-
for (let e = 0; e < 256; e++) {
|
|
228
|
-
let t = Ee[e];
|
|
229
|
-
Ee[e] = o, o += t;
|
|
230
|
-
}
|
|
231
|
-
for (let o = 0; o < e; o++) {
|
|
232
|
-
let e = n[o], s = Ee[e >>> a & 255]++;
|
|
233
|
-
r[s] = t[o], i[s] = e;
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
function Ae(e, t, n, r, i) {
|
|
237
|
-
return e = (e - n) * i | 0, t = (t - r) * i | 0, e = (e | e << 8) & 16711935, e = (e | e << 4) & 252645135, e = (e | e << 2) & 858993459, e = (e | e << 1) & 1431655765, t = (t | t << 8) & 16711935, t = (t | t << 4) & 252645135, t = (t | t << 2) & 858993459, t = (t | t << 1) & 1431655765, e | t << 1;
|
|
238
|
-
}
|
|
239
|
-
function je(e) {
|
|
240
|
-
let t = e, n = e;
|
|
241
|
-
do
|
|
242
|
-
(t.x < n.x || t.x === n.x && t.y < n.y) && (n = t), t = t.next;
|
|
243
|
-
while (t !== e);
|
|
244
|
-
return n;
|
|
245
|
-
}
|
|
246
|
-
function Me(e, t, n, r, i, a, o, s) {
|
|
247
|
-
return (i - o) * (t - s) >= (e - o) * (a - s) && (e - o) * (r - s) >= (n - o) * (t - s) && (n - o) * (a - s) >= (i - o) * (r - s);
|
|
248
|
-
}
|
|
249
|
-
function Ne(e, t) {
|
|
250
|
-
let n = Pe(e, t) && K(e.prev, e, e.next) > 0 && K(t.prev, t, t.next) > 0;
|
|
251
|
-
return e.next.i !== t.i && (n || Re(e, t) && Re(t, e) && (K(e.prev, e, t.prev) !== 0 || K(e, t.prev, t) !== 0)) && !Le(e, t) && (n || ze(e, t));
|
|
252
|
-
}
|
|
253
|
-
function K(e, t, n) {
|
|
254
|
-
return (t.y - e.y) * (n.x - t.x) - (t.x - e.x) * (n.y - t.y);
|
|
255
|
-
}
|
|
256
|
-
function Pe(e, t) {
|
|
257
|
-
return e.x === t.x && e.y === t.y;
|
|
258
|
-
}
|
|
259
|
-
function Fe(e, t, n, r, i = !0) {
|
|
260
|
-
let a = K(e, t, n), o = K(e, t, r), s = K(n, r, e), c = K(n, r, t);
|
|
261
|
-
return (a > 0 && o < 0 || a < 0 && o > 0) && (s > 0 && c < 0 || s < 0 && c > 0) ? !0 : i ? !!(a === 0 && Ie(e, n, t) || o === 0 && Ie(e, r, t) || s === 0 && Ie(n, e, r) || c === 0 && Ie(n, t, r)) : !1;
|
|
262
|
-
}
|
|
263
|
-
function Ie(e, t, n) {
|
|
264
|
-
return t.x <= Math.max(e.x, n.x) && t.x >= Math.min(e.x, n.x) && t.y <= Math.max(e.y, n.y) && t.y >= Math.min(e.y, n.y);
|
|
265
|
-
}
|
|
266
|
-
function Le(e, t) {
|
|
267
|
-
let n = Math.min(e.x, t.x), r = Math.max(e.x, t.x), i = Math.min(e.y, t.y), a = Math.max(e.y, t.y), o = e;
|
|
268
|
-
do {
|
|
269
|
-
let s = o.next;
|
|
270
|
-
if (o.x > r && s.x > r || o.x < n && s.x < n || o.y > a && s.y > a || o.y < i && s.y < i) {
|
|
271
|
-
o = s;
|
|
272
|
-
continue;
|
|
273
|
-
}
|
|
274
|
-
if (o.i !== e.i && s.i !== e.i && o.i !== t.i && s.i !== t.i && Fe(o, s, e, t)) return !0;
|
|
275
|
-
o = s;
|
|
276
|
-
} while (o !== e);
|
|
277
|
-
return !1;
|
|
278
|
-
}
|
|
279
|
-
function Re(e, t) {
|
|
280
|
-
return K(e.prev, e, e.next) < 0 ? K(e, t, e.next) >= 0 && K(e, e.prev, t) >= 0 : K(e, t, e.prev) < 0 || K(e, e.next, t) < 0;
|
|
281
|
-
}
|
|
282
|
-
function ze(e, t) {
|
|
283
|
-
let n = e, r = !1, i = (e.x + t.x) / 2, a = (e.y + t.y) / 2;
|
|
284
|
-
do {
|
|
285
|
-
let e = n.next;
|
|
286
|
-
n.y > a != e.y > a && i < (e.x - n.x) * (a - n.y) / (e.y - n.y) + n.x && (r = !r), n = e;
|
|
287
|
-
} while (n !== e);
|
|
288
|
-
return r;
|
|
289
|
-
}
|
|
290
|
-
function Be(e, t) {
|
|
291
|
-
let n = Ue(e.i, e.x, e.y), r = Ue(t.i, t.x, t.y), i = e.next, a = t.prev;
|
|
292
|
-
return e.next = t, t.prev = e, n.next = i, i.prev = n, r.next = n, n.prev = r, a.next = r, r.prev = a, r;
|
|
293
|
-
}
|
|
294
|
-
function Ve(e, t, n, r) {
|
|
295
|
-
let i = Ue(e, t, n);
|
|
296
|
-
return r ? (i.next = r.next, i.prev = r, r.next.prev = i, r.next = i) : (i.prev = i, i.next = i), i;
|
|
297
|
-
}
|
|
298
|
-
function He(e) {
|
|
299
|
-
e.next.prev = e.prev, e.prev.next = e.next, e.prevZ && (e.prevZ.nextZ = e.nextZ), e.nextZ && (e.nextZ.prevZ = e.prevZ), le && ye(e.prev, e.next);
|
|
300
|
-
}
|
|
301
|
-
function Ue(e, t, n) {
|
|
302
|
-
return {
|
|
303
|
-
i: e,
|
|
304
|
-
x: t,
|
|
305
|
-
y: n,
|
|
306
|
-
prev: null,
|
|
307
|
-
next: null,
|
|
308
|
-
z: 0,
|
|
309
|
-
prevZ: null,
|
|
310
|
-
nextZ: null
|
|
311
|
-
};
|
|
312
|
-
}
|
|
313
|
-
function We(e, t, n, r) {
|
|
314
|
-
let i = 0;
|
|
315
|
-
for (let a = t, o = n - r; a < n; a += r) i += (e[o] - e[a]) * (e[a + 1] + e[o + 1]), o = a;
|
|
316
|
-
return i;
|
|
317
|
-
}
|
|
318
|
-
//#endregion
|
|
319
|
-
//#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/utils/utils.mjs
|
|
320
|
-
var Ge = ae.default || ae, Ke = {
|
|
321
|
-
a: 7,
|
|
322
|
-
c: 6,
|
|
323
|
-
h: 1,
|
|
324
|
-
l: 2,
|
|
325
|
-
m: 2,
|
|
326
|
-
q: 4,
|
|
327
|
-
s: 4,
|
|
328
|
-
t: 2,
|
|
329
|
-
v: 1,
|
|
330
|
-
z: 0
|
|
331
|
-
}, qe = /([astvzqmhlc])([^astvzqmhlc]*)/gi, Je = /-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;
|
|
332
|
-
function Ye(e) {
|
|
333
|
-
let t = [];
|
|
334
|
-
return e.replace(qe, (e, n, r) => {
|
|
335
|
-
let i = n.toLowerCase(), a = n, o = Xe(r);
|
|
336
|
-
for (i === "m" && o.length > 2 && (t.push([a, ...o.splice(0, 2)]), i = "l", a = a === "m" ? "l" : "L");;) {
|
|
337
|
-
if (o.length === Ke[i]) return t.push([a, ...o]), "";
|
|
338
|
-
if (o.length < Ke[i]) throw Error("malformed path data");
|
|
339
|
-
t.push([a, ...o.splice(0, Ke[i])]);
|
|
340
|
-
}
|
|
341
|
-
}), t;
|
|
342
|
-
}
|
|
343
|
-
function Xe(e) {
|
|
344
|
-
let t = e.match(Je);
|
|
345
|
-
return t ? t.map(Number) : [];
|
|
346
|
-
}
|
|
347
|
-
//#endregion
|
|
348
|
-
//#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/graphics/shared/svg/parseSVGPath.mjs
|
|
349
|
-
function Ze(e, t) {
|
|
350
|
-
let n = Ye(e), r = [], i = null, a = 0, o = 0;
|
|
351
|
-
for (let e = 0; e < n.length; e++) {
|
|
352
|
-
let s = n[e], c = s[0], l = s;
|
|
353
|
-
switch (c) {
|
|
354
|
-
case "M":
|
|
355
|
-
a = l[1], o = l[2], t.moveTo(a, o);
|
|
356
|
-
break;
|
|
357
|
-
case "m":
|
|
358
|
-
a += l[1], o += l[2], t.moveTo(a, o);
|
|
359
|
-
break;
|
|
360
|
-
case "H":
|
|
361
|
-
a = l[1], t.lineTo(a, o);
|
|
362
|
-
break;
|
|
363
|
-
case "h":
|
|
364
|
-
a += l[1], t.lineTo(a, o);
|
|
365
|
-
break;
|
|
366
|
-
case "V":
|
|
367
|
-
o = l[1], t.lineTo(a, o);
|
|
368
|
-
break;
|
|
369
|
-
case "v":
|
|
370
|
-
o += l[1], t.lineTo(a, o);
|
|
371
|
-
break;
|
|
372
|
-
case "L":
|
|
373
|
-
a = l[1], o = l[2], t.lineTo(a, o);
|
|
374
|
-
break;
|
|
375
|
-
case "l":
|
|
376
|
-
a += l[1], o += l[2], t.lineTo(a, o);
|
|
377
|
-
break;
|
|
378
|
-
case "C":
|
|
379
|
-
a = l[5], o = l[6], t.bezierCurveTo(l[1], l[2], l[3], l[4], a, o);
|
|
380
|
-
break;
|
|
381
|
-
case "c":
|
|
382
|
-
t.bezierCurveTo(a + l[1], o + l[2], a + l[3], o + l[4], a + l[5], o + l[6]), a += l[5], o += l[6];
|
|
383
|
-
break;
|
|
384
|
-
case "S":
|
|
385
|
-
a = l[3], o = l[4], t.bezierCurveToShort(l[1], l[2], a, o);
|
|
386
|
-
break;
|
|
387
|
-
case "s":
|
|
388
|
-
t.bezierCurveToShort(a + l[1], o + l[2], a + l[3], o + l[4]), a += l[3], o += l[4];
|
|
389
|
-
break;
|
|
390
|
-
case "Q":
|
|
391
|
-
a = l[3], o = l[4], t.quadraticCurveTo(l[1], l[2], a, o);
|
|
392
|
-
break;
|
|
393
|
-
case "q":
|
|
394
|
-
t.quadraticCurveTo(a + l[1], o + l[2], a + l[3], o + l[4]), a += l[3], o += l[4];
|
|
395
|
-
break;
|
|
396
|
-
case "T":
|
|
397
|
-
a = l[1], o = l[2], t.quadraticCurveToShort(a, o);
|
|
398
|
-
break;
|
|
399
|
-
case "t":
|
|
400
|
-
a += l[1], o += l[2], t.quadraticCurveToShort(a, o);
|
|
401
|
-
break;
|
|
402
|
-
case "A":
|
|
403
|
-
a = l[6], o = l[7], t.arcToSvg(l[1], l[2], l[3], l[4], l[5], a, o);
|
|
404
|
-
break;
|
|
405
|
-
case "a":
|
|
406
|
-
a += l[6], o += l[7], t.arcToSvg(l[1], l[2], l[3], l[4], l[5], a, o);
|
|
407
|
-
break;
|
|
408
|
-
case "Z":
|
|
409
|
-
case "z":
|
|
410
|
-
t.closePath(), r.length > 0 && (i = r.pop(), i ? (a = i.startX, o = i.startY) : (a = 0, o = 0)), i = null;
|
|
411
|
-
break;
|
|
412
|
-
default: u(`Unknown SVG path command: ${c}`);
|
|
413
|
-
}
|
|
414
|
-
c !== "Z" && c !== "z" && i === null && (i = {
|
|
415
|
-
startX: a,
|
|
416
|
-
startY: o
|
|
417
|
-
}, r.push(i));
|
|
418
|
-
}
|
|
419
|
-
return t;
|
|
420
|
-
}
|
|
421
|
-
//#endregion
|
|
422
|
-
//#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/maths/shapes/Circle.mjs
|
|
423
|
-
var Qe = class e {
|
|
424
|
-
constructor(e = 0, t = 0, n = 0) {
|
|
425
|
-
this.type = "circle", this.x = e, this.y = t, this.radius = n;
|
|
426
|
-
}
|
|
427
|
-
clone() {
|
|
428
|
-
return new e(this.x, this.y, this.radius);
|
|
429
|
-
}
|
|
430
|
-
contains(e, t) {
|
|
431
|
-
if (this.radius <= 0) return !1;
|
|
432
|
-
let n = this.radius * this.radius, r = this.x - e, i = this.y - t;
|
|
433
|
-
return r *= r, i *= i, r + i <= n;
|
|
434
|
-
}
|
|
435
|
-
strokeContains(e, t, n, r = .5) {
|
|
436
|
-
if (this.radius === 0) return !1;
|
|
437
|
-
let i = this.x - e, a = this.y - t, o = this.radius, s = (1 - r) * n, c = Math.sqrt(i * i + a * a);
|
|
438
|
-
return c <= o + s && c > o - (n - s);
|
|
439
|
-
}
|
|
440
|
-
getBounds(e) {
|
|
441
|
-
return e ||= new l(), e.x = this.x - this.radius, e.y = this.y - this.radius, e.width = this.radius * 2, e.height = this.radius * 2, e;
|
|
442
|
-
}
|
|
443
|
-
copyFrom(e) {
|
|
444
|
-
return this.x = e.x, this.y = e.y, this.radius = e.radius, this;
|
|
445
|
-
}
|
|
446
|
-
copyTo(e) {
|
|
447
|
-
return e.copyFrom(this), e;
|
|
448
|
-
}
|
|
449
|
-
toString() {
|
|
450
|
-
return `[pixi.js/math:Circle x=${this.x} y=${this.y} radius=${this.radius}]`;
|
|
451
|
-
}
|
|
452
|
-
}, $e = class e {
|
|
453
|
-
constructor(e = 0, t = 0, n = 0, r = 0) {
|
|
454
|
-
this.type = "ellipse", this.x = e, this.y = t, this.halfWidth = n, this.halfHeight = r;
|
|
455
|
-
}
|
|
456
|
-
clone() {
|
|
457
|
-
return new e(this.x, this.y, this.halfWidth, this.halfHeight);
|
|
458
|
-
}
|
|
459
|
-
contains(e, t) {
|
|
460
|
-
if (this.halfWidth <= 0 || this.halfHeight <= 0) return !1;
|
|
461
|
-
let n = (e - this.x) / this.halfWidth, r = (t - this.y) / this.halfHeight;
|
|
462
|
-
return n *= n, r *= r, n + r <= 1;
|
|
463
|
-
}
|
|
464
|
-
strokeContains(e, t, n, r = .5) {
|
|
465
|
-
let { halfWidth: i, halfHeight: a } = this;
|
|
466
|
-
if (i <= 0 || a <= 0) return !1;
|
|
467
|
-
let o = n * (1 - r), s = n - o, c = i - s, l = a - s, u = i + o, d = a + o, f = e - this.x, p = t - this.y, m = f * f / (c * c) + p * p / (l * l), h = f * f / (u * u) + p * p / (d * d);
|
|
468
|
-
return m > 1 && h <= 1;
|
|
469
|
-
}
|
|
470
|
-
getBounds(e) {
|
|
471
|
-
return e ||= new l(), e.x = this.x - this.halfWidth, e.y = this.y - this.halfHeight, e.width = this.halfWidth * 2, e.height = this.halfHeight * 2, e;
|
|
472
|
-
}
|
|
473
|
-
copyFrom(e) {
|
|
474
|
-
return this.x = e.x, this.y = e.y, this.halfWidth = e.halfWidth, this.halfHeight = e.halfHeight, this;
|
|
475
|
-
}
|
|
476
|
-
copyTo(e) {
|
|
477
|
-
return e.copyFrom(this), e;
|
|
478
|
-
}
|
|
479
|
-
toString() {
|
|
480
|
-
return `[pixi.js/math:Ellipse x=${this.x} y=${this.y} halfWidth=${this.halfWidth} halfHeight=${this.halfHeight}]`;
|
|
481
|
-
}
|
|
482
|
-
};
|
|
483
|
-
//#endregion
|
|
484
|
-
//#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/maths/misc/getOrientationOfPoints.mjs
|
|
485
|
-
function et(e) {
|
|
486
|
-
let t = e.length;
|
|
487
|
-
if (t < 6) return 1;
|
|
488
|
-
let n = 0;
|
|
489
|
-
for (let r = 0, i = e[t - 2], a = e[t - 1]; r < t; r += 2) {
|
|
490
|
-
let t = e[r], o = e[r + 1];
|
|
491
|
-
n += (t - i) * (o + a), i = t, a = o;
|
|
492
|
-
}
|
|
493
|
-
return n < 0 ? -1 : 1;
|
|
494
|
-
}
|
|
495
|
-
//#endregion
|
|
496
|
-
//#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/maths/misc/squaredDistanceToLineSegment.mjs
|
|
497
|
-
function tt(e, t, n, r, i, a) {
|
|
498
|
-
let o = e - n, s = t - r, c = i - n, l = a - r, u = o * c + s * l, d = c * c + l * l, f = -1;
|
|
499
|
-
d !== 0 && (f = u / d);
|
|
500
|
-
let p, m;
|
|
501
|
-
f < 0 ? (p = n, m = r) : f > 1 ? (p = i, m = a) : (p = n + f * c, m = r + f * l);
|
|
502
|
-
let h = e - p, g = t - m;
|
|
503
|
-
return h * h + g * g;
|
|
504
|
-
}
|
|
505
|
-
//#endregion
|
|
506
|
-
//#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/maths/shapes/Polygon.mjs
|
|
507
|
-
var nt, rt, it = class e {
|
|
508
|
-
constructor(...e) {
|
|
509
|
-
this.type = "polygon";
|
|
510
|
-
let t = Array.isArray(e[0]) ? e[0] : e;
|
|
511
|
-
if (typeof t[0] != "number") {
|
|
512
|
-
let e = [];
|
|
513
|
-
for (let n = 0, r = t.length; n < r; n++) e.push(t[n].x, t[n].y);
|
|
514
|
-
t = e;
|
|
515
|
-
}
|
|
516
|
-
this.points = t, this.closePath = !0;
|
|
517
|
-
}
|
|
518
|
-
isClockwise() {
|
|
519
|
-
let e = 0, t = this.points, n = t.length;
|
|
520
|
-
for (let r = 0; r < n; r += 2) {
|
|
521
|
-
let i = t[r], a = t[r + 1], o = t[(r + 2) % n], s = t[(r + 3) % n];
|
|
522
|
-
e += (o - i) * (s + a);
|
|
523
|
-
}
|
|
524
|
-
return e < 0;
|
|
525
|
-
}
|
|
526
|
-
containsPolygon(e) {
|
|
527
|
-
let t = this.getBounds(nt), n = e.getBounds(rt);
|
|
528
|
-
if (!t.containsRect(n)) return !1;
|
|
529
|
-
let r = e.points;
|
|
530
|
-
for (let e = 0; e < r.length; e += 2) {
|
|
531
|
-
let t = r[e], n = r[e + 1];
|
|
532
|
-
if (!this.contains(t, n)) return !1;
|
|
533
|
-
}
|
|
534
|
-
return !0;
|
|
535
|
-
}
|
|
536
|
-
clone() {
|
|
537
|
-
let t = this.points.slice(), n = new e(t);
|
|
538
|
-
return n.closePath = this.closePath, n;
|
|
539
|
-
}
|
|
540
|
-
contains(e, t) {
|
|
541
|
-
let n = !1, r = this.points.length / 2;
|
|
542
|
-
for (let i = 0, a = r - 1; i < r; a = i++) {
|
|
543
|
-
let r = this.points[i * 2], o = this.points[i * 2 + 1], s = this.points[a * 2], c = this.points[a * 2 + 1];
|
|
544
|
-
o > t != c > t && e < (s - r) * ((t - o) / (c - o)) + r && (n = !n);
|
|
545
|
-
}
|
|
546
|
-
return n;
|
|
547
|
-
}
|
|
548
|
-
strokeContains(e, t, n, r = .5) {
|
|
549
|
-
let { points: i } = this, a = n * (r === .5 ? r : (r - .5) * et(i) + .5), o = n - a, s = a * a, c = o * o, l = i.length - (this.closePath ? 0 : 2);
|
|
550
|
-
for (let n = 0; n < l; n += 2) {
|
|
551
|
-
let r = i[n], a = i[n + 1], o = i[(n + 2) % i.length], l = i[(n + 3) % i.length];
|
|
552
|
-
if (tt(e, t, r, a, o, l) <= (Math.sign((o - r) * (t - a) - (l - a) * (e - r)) < 0 ? s : c)) return !0;
|
|
553
|
-
}
|
|
554
|
-
return !1;
|
|
555
|
-
}
|
|
556
|
-
getBounds(e) {
|
|
557
|
-
e ||= new l();
|
|
558
|
-
let t = this.points, n = Infinity, r = -Infinity, i = Infinity, a = -Infinity;
|
|
559
|
-
for (let e = 0, o = t.length; e < o; e += 2) {
|
|
560
|
-
let o = t[e], s = t[e + 1];
|
|
561
|
-
n = o < n ? o : n, r = o > r ? o : r, i = s < i ? s : i, a = s > a ? s : a;
|
|
562
|
-
}
|
|
563
|
-
return e.x = n, e.width = r - n, e.y = i, e.height = a - i, e;
|
|
564
|
-
}
|
|
565
|
-
copyFrom(e) {
|
|
566
|
-
return this.points = e.points.slice(), this.closePath = e.closePath, this;
|
|
567
|
-
}
|
|
568
|
-
copyTo(e) {
|
|
569
|
-
return e.copyFrom(this), e;
|
|
570
|
-
}
|
|
571
|
-
toString() {
|
|
572
|
-
return `[pixi.js/math:PolygoncloseStroke=${this.closePath}points=${this.points.reduce((e, t) => `${e}, ${t}`, "")}]`;
|
|
573
|
-
}
|
|
574
|
-
get lastX() {
|
|
575
|
-
return this.points[this.points.length - 2];
|
|
576
|
-
}
|
|
577
|
-
get lastY() {
|
|
578
|
-
return this.points[this.points.length - 1];
|
|
579
|
-
}
|
|
580
|
-
get x() {
|
|
581
|
-
return o("8.11.0", "Polygon.lastX is deprecated, please use Polygon.lastX instead."), this.points[this.points.length - 2];
|
|
582
|
-
}
|
|
583
|
-
get y() {
|
|
584
|
-
return o("8.11.0", "Polygon.y is deprecated, please use Polygon.lastY instead."), this.points[this.points.length - 1];
|
|
585
|
-
}
|
|
586
|
-
get startX() {
|
|
587
|
-
return this.points[0];
|
|
588
|
-
}
|
|
589
|
-
get startY() {
|
|
590
|
-
return this.points[1];
|
|
591
|
-
}
|
|
592
|
-
}, at = (e, t, n, r, i, a, o) => {
|
|
593
|
-
let s = e - n, c = t - r, l = Math.sqrt(s * s + c * c);
|
|
594
|
-
return l >= i - a && l <= i + o;
|
|
595
|
-
}, ot = class e {
|
|
596
|
-
constructor(e = 0, t = 0, n = 0, r = 0, i = 20) {
|
|
597
|
-
this.type = "roundedRectangle", this.x = e, this.y = t, this.width = n, this.height = r, this.radius = i;
|
|
598
|
-
}
|
|
599
|
-
getBounds(e) {
|
|
600
|
-
return e ||= new l(), e.x = this.x, e.y = this.y, e.width = this.width, e.height = this.height, e;
|
|
601
|
-
}
|
|
602
|
-
clone() {
|
|
603
|
-
return new e(this.x, this.y, this.width, this.height, this.radius);
|
|
604
|
-
}
|
|
605
|
-
copyFrom(e) {
|
|
606
|
-
return this.x = e.x, this.y = e.y, this.width = e.width, this.height = e.height, this.radius = e.radius, this;
|
|
607
|
-
}
|
|
608
|
-
copyTo(e) {
|
|
609
|
-
return e.copyFrom(this), e;
|
|
610
|
-
}
|
|
611
|
-
contains(e, t) {
|
|
612
|
-
if (this.width <= 0 || this.height <= 0) return !1;
|
|
613
|
-
if (e >= this.x && e <= this.x + this.width && t >= this.y && t <= this.y + this.height) {
|
|
614
|
-
let n = Math.max(0, Math.min(this.radius, Math.min(this.width, this.height) / 2));
|
|
615
|
-
if (t >= this.y + n && t <= this.y + this.height - n || e >= this.x + n && e <= this.x + this.width - n) return !0;
|
|
616
|
-
let r = e - (this.x + n), i = t - (this.y + n), a = n * n;
|
|
617
|
-
if (r * r + i * i <= a || (r = e - (this.x + this.width - n), r * r + i * i <= a) || (i = t - (this.y + this.height - n), r * r + i * i <= a) || (r = e - (this.x + n), r * r + i * i <= a)) return !0;
|
|
618
|
-
}
|
|
619
|
-
return !1;
|
|
620
|
-
}
|
|
621
|
-
strokeContains(e, t, n, r = .5) {
|
|
622
|
-
let { x: i, y: a, width: o, height: s, radius: c } = this, l = n * (1 - r), u = n - l, d = i + c, f = a + c, p = o - c * 2, m = s - c * 2, h = i + o, g = a + s;
|
|
623
|
-
return (e >= i - l && e <= i + u || e >= h - u && e <= h + l) && t >= f && t <= f + m || (t >= a - l && t <= a + u || t >= g - u && t <= g + l) && e >= d && e <= d + p || e < d && t < f && at(e, t, d, f, c, u, l) || e > h - c && t < f && at(e, t, h - c, f, c, u, l) || e > h - c && t > g - c && at(e, t, h - c, g - c, c, u, l) || e < d && t > g - c && at(e, t, d, g - c, c, u, l);
|
|
624
|
-
}
|
|
625
|
-
toString() {
|
|
626
|
-
return `[pixi.js/math:RoundedRectangle x=${this.x} y=${this.y}width=${this.width} height=${this.height} radius=${this.radius}]`;
|
|
627
|
-
}
|
|
628
|
-
};
|
|
629
|
-
//#endregion
|
|
630
|
-
//#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/shared/geometry/utils/buildUvs.mjs
|
|
631
|
-
function st(e, t, n, r, i, a, o, s = null) {
|
|
632
|
-
let c = 0;
|
|
633
|
-
n *= t, i *= a;
|
|
634
|
-
let l = s.a, u = s.b, d = s.c, f = s.d, p = s.tx, m = s.ty;
|
|
635
|
-
for (; c < o;) {
|
|
636
|
-
let o = e[n], s = e[n + 1];
|
|
637
|
-
r[i] = l * o + d * s + p, r[i + 1] = u * o + f * s + m, i += a, n += t, c++;
|
|
638
|
-
}
|
|
639
|
-
}
|
|
640
|
-
function ct(e, t, n, r) {
|
|
641
|
-
let i = 0;
|
|
642
|
-
for (t *= n; i < r;) e[t] = 0, e[t + 1] = 0, t += n, i++;
|
|
643
|
-
}
|
|
644
|
-
//#endregion
|
|
645
|
-
//#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/shared/geometry/utils/transformVertices.mjs
|
|
646
|
-
function lt(e, t, n, r, i) {
|
|
647
|
-
let a = t.a, o = t.b, s = t.c, c = t.d, l = t.tx, u = t.ty;
|
|
648
|
-
n ||= 0, r ||= 2, i ||= e.length / r - n;
|
|
649
|
-
let d = n * r;
|
|
650
|
-
for (let t = 0; t < i; t++) {
|
|
651
|
-
let t = e[d], n = e[d + 1];
|
|
652
|
-
e[d] = a * t + s * n + l, e[d + 1] = o * t + c * n + u, d += r;
|
|
653
|
-
}
|
|
654
|
-
}
|
|
655
|
-
//#endregion
|
|
656
|
-
//#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/graphics/shared/BatchableGraphics.mjs
|
|
657
|
-
var ut = new _(), dt = class {
|
|
658
|
-
constructor() {
|
|
659
|
-
this.packAsQuad = !1, this.batcherName = "default", this.topology = "triangle-list", this.applyTransform = !0, this.roundPixels = 0, this._batcher = null, this._batch = null;
|
|
660
|
-
}
|
|
661
|
-
get uvs() {
|
|
662
|
-
return this.geometryData.uvs;
|
|
663
|
-
}
|
|
664
|
-
get positions() {
|
|
665
|
-
return this.geometryData.vertices;
|
|
666
|
-
}
|
|
667
|
-
get indices() {
|
|
668
|
-
return this.geometryData.indices;
|
|
669
|
-
}
|
|
670
|
-
get blendMode() {
|
|
671
|
-
return this.renderable && this.applyTransform ? this.renderable.groupBlendMode : "normal";
|
|
672
|
-
}
|
|
673
|
-
get color() {
|
|
674
|
-
let e = this.baseColor, t = e >> 16 | e & 65280 | (e & 255) << 16, r = this.renderable;
|
|
675
|
-
return r ? n(t, r.groupColor) + (this.alpha * r.groupAlpha * 255 << 24) : t + (this.alpha * 255 << 24);
|
|
676
|
-
}
|
|
677
|
-
get transform() {
|
|
678
|
-
return this.renderable?.groupTransform || ut;
|
|
679
|
-
}
|
|
680
|
-
copyTo(e) {
|
|
681
|
-
e.indexOffset = this.indexOffset, e.indexSize = this.indexSize, e.attributeOffset = this.attributeOffset, e.attributeSize = this.attributeSize, e.baseColor = this.baseColor, e.alpha = this.alpha, e.texture = this.texture, e.geometryData = this.geometryData, e.topology = this.topology;
|
|
682
|
-
}
|
|
683
|
-
reset() {
|
|
684
|
-
this.applyTransform = !0, this.renderable = null, this.topology = "triangle-list";
|
|
685
|
-
}
|
|
686
|
-
destroy() {
|
|
687
|
-
this.renderable = null, this.texture = null, this.geometryData = null, this._batcher = null, this._batch = null;
|
|
688
|
-
}
|
|
689
|
-
}, ft = {
|
|
690
|
-
extension: {
|
|
691
|
-
type: S.ShapeBuilder,
|
|
692
|
-
name: "circle"
|
|
693
|
-
},
|
|
694
|
-
build(e, t) {
|
|
695
|
-
let n, r, i, a, o, s;
|
|
696
|
-
if (e.type === "circle") {
|
|
697
|
-
let t = e;
|
|
698
|
-
if (o = s = t.radius, o <= 0) return !1;
|
|
699
|
-
n = t.x, r = t.y, i = a = 0;
|
|
700
|
-
} else if (e.type === "ellipse") {
|
|
701
|
-
let t = e;
|
|
702
|
-
if (o = t.halfWidth, s = t.halfHeight, o <= 0 || s <= 0) return !1;
|
|
703
|
-
n = t.x, r = t.y, i = a = 0;
|
|
704
|
-
} else {
|
|
705
|
-
let t = e, c = t.width / 2, l = t.height / 2;
|
|
706
|
-
n = t.x + c, r = t.y + l, o = s = Math.max(0, Math.min(t.radius, Math.min(c, l))), i = c - o, a = l - s;
|
|
707
|
-
}
|
|
708
|
-
if (i < 0 || a < 0) return !1;
|
|
709
|
-
let c = Math.ceil(2.3 * Math.sqrt(o + s)), l = c * 8 + (i ? 4 : 0) + (a ? 4 : 0);
|
|
710
|
-
if (l === 0) return !1;
|
|
711
|
-
if (c === 0) return t[0] = t[6] = n + i, t[1] = t[3] = r + a, t[2] = t[4] = n - i, t[5] = t[7] = r - a, !0;
|
|
712
|
-
let u = 0, d = c * 4 + (i ? 2 : 0) + 2, f = d, p = l, m = i + o, h = a, g = n + m, _ = n - m, v = r + h;
|
|
713
|
-
if (t[u++] = g, t[u++] = v, t[--d] = v, t[--d] = _, a) {
|
|
714
|
-
let e = r - h;
|
|
715
|
-
t[f++] = _, t[f++] = e, t[--p] = e, t[--p] = g;
|
|
716
|
-
}
|
|
717
|
-
for (let e = 1; e < c; e++) {
|
|
718
|
-
let l = Math.PI / 2 * (e / c), m = i + Math.cos(l) * o, h = a + Math.sin(l) * s, g = n + m, _ = n - m, v = r + h, y = r - h;
|
|
719
|
-
t[u++] = g, t[u++] = v, t[--d] = v, t[--d] = _, t[f++] = _, t[f++] = y, t[--p] = y, t[--p] = g;
|
|
720
|
-
}
|
|
721
|
-
m = i, h = a + s, g = n + m, _ = n - m, v = r + h;
|
|
722
|
-
let y = r - h;
|
|
723
|
-
return t[u++] = g, t[u++] = v, t[--p] = y, t[--p] = g, i && (t[u++] = _, t[u++] = v, t[--p] = y, t[--p] = _), !0;
|
|
724
|
-
},
|
|
725
|
-
triangulate(e, t, n, r, i, a) {
|
|
726
|
-
if (e.length === 0) return;
|
|
727
|
-
let o = 0, s = 0;
|
|
728
|
-
for (let t = 0; t < e.length; t += 2) o += e[t], s += e[t + 1];
|
|
729
|
-
o /= e.length / 2, s /= e.length / 2;
|
|
730
|
-
let c = r;
|
|
731
|
-
t[c * n] = o, t[c * n + 1] = s;
|
|
732
|
-
let l = c++;
|
|
733
|
-
for (let r = 0; r < e.length; r += 2) t[c * n] = e[r], t[c * n + 1] = e[r + 1], r > 0 && (i[a++] = c, i[a++] = l, i[a++] = c - 1), c++;
|
|
734
|
-
i[a++] = l + 1, i[a++] = l, i[a++] = c - 1;
|
|
735
|
-
}
|
|
736
|
-
}, pt = {
|
|
737
|
-
...ft,
|
|
738
|
-
extension: {
|
|
739
|
-
...ft.extension,
|
|
740
|
-
name: "ellipse"
|
|
741
|
-
}
|
|
742
|
-
}, mt = {
|
|
743
|
-
...ft,
|
|
744
|
-
extension: {
|
|
745
|
-
...ft.extension,
|
|
746
|
-
name: "roundedRectangle"
|
|
747
|
-
}
|
|
748
|
-
}, ht = 1e-4, gt = 1e-4;
|
|
749
|
-
//#endregion
|
|
750
|
-
//#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/graphics/shared/buildCommands/buildLine.mjs
|
|
751
|
-
function _t(e, t, n, r, i, a, o, s) {
|
|
752
|
-
let c = e - n * i, l = t - r * i, u = e + n * a, d = t + r * a, f, p;
|
|
753
|
-
o ? (f = r, p = -n) : (f = -r, p = n);
|
|
754
|
-
let m = c + f, h = l + p, g = u + f, _ = d + p;
|
|
755
|
-
return s.push(m, h), s.push(g, _), 2;
|
|
756
|
-
}
|
|
757
|
-
function q(e, t, n, r, i, a, o, s) {
|
|
758
|
-
let c = n - e, l = r - t, u = Math.atan2(c, l), d = Math.atan2(i - e, a - t);
|
|
759
|
-
s && u < d ? u += Math.PI * 2 : !s && u > d && (d += Math.PI * 2);
|
|
760
|
-
let f = u, p = d - u, m = Math.abs(p), h = Math.sqrt(c * c + l * l), g = (15 * m * Math.sqrt(h) / Math.PI >> 0) + 1, _ = p / g;
|
|
761
|
-
if (f += _, s) {
|
|
762
|
-
o.push(e, t), o.push(n, r);
|
|
763
|
-
for (let n = 1, r = f; n < g; n++, r += _) o.push(e, t), o.push(e + Math.sin(r) * h, t + Math.cos(r) * h);
|
|
764
|
-
o.push(e, t), o.push(i, a);
|
|
765
|
-
} else {
|
|
766
|
-
o.push(n, r), o.push(e, t);
|
|
767
|
-
for (let n = 1, r = f; n < g; n++, r += _) o.push(e + Math.sin(r) * h, t + Math.cos(r) * h), o.push(e, t);
|
|
768
|
-
o.push(i, a), o.push(e, t);
|
|
769
|
-
}
|
|
770
|
-
return g * 2;
|
|
771
|
-
}
|
|
772
|
-
function vt(e, t, n, r, i, a) {
|
|
773
|
-
let o = ht;
|
|
774
|
-
if (e.length === 0) return;
|
|
775
|
-
let s = t, c = s.alignment;
|
|
776
|
-
if (t.alignment !== .5) {
|
|
777
|
-
let t = et(e);
|
|
778
|
-
n && (t *= -1), c = (c - .5) * t + .5;
|
|
779
|
-
}
|
|
780
|
-
let l = new C(e[0], e[1]), u = new C(e[e.length - 2], e[e.length - 1]), d = r, f = Math.abs(l.x - u.x) < o && Math.abs(l.y - u.y) < o;
|
|
781
|
-
if (d) {
|
|
782
|
-
e = e.slice(), f && (e.pop(), e.pop(), u.set(e[e.length - 2], e[e.length - 1]));
|
|
783
|
-
let t = (l.x + u.x) * .5, n = (u.y + l.y) * .5;
|
|
784
|
-
e.unshift(t, n), e.push(t, n);
|
|
785
|
-
}
|
|
786
|
-
let p = i, m = e.length / 2, h = e.length, g = p.length / 2, _ = s.width / 2, v = _ * _, y = s.miterLimit * s.miterLimit, b = e[0], x = e[1], S = e[2], w = e[3], T = 0, E = 0, D = -(x - w), O = b - S, k = 0, A = 0, j = Math.sqrt(D * D + O * O);
|
|
787
|
-
D /= j, O /= j, D *= _, O *= _;
|
|
788
|
-
let M = c, N = (1 - M) * 2, P = M * 2;
|
|
789
|
-
d || (s.cap === "round" ? h += q(b - D * (N - P) * .5, x - O * (N - P) * .5, b - D * N, x - O * N, b + D * P, x + O * P, p, !0) + 2 : s.cap === "square" && (h += _t(b, x, D, O, N, P, !0, p))), p.push(b - D * N, x - O * N), p.push(b + D * P, x + O * P);
|
|
790
|
-
for (let t = 1; t < m - 1; ++t) {
|
|
791
|
-
b = e[(t - 1) * 2], x = e[(t - 1) * 2 + 1], S = e[t * 2], w = e[t * 2 + 1], T = e[(t + 1) * 2], E = e[(t + 1) * 2 + 1], D = -(x - w), O = b - S, j = Math.sqrt(D * D + O * O), D /= j, O /= j, D *= _, O *= _, k = -(w - E), A = S - T, j = Math.sqrt(k * k + A * A), k /= j, A /= j, k *= _, A *= _;
|
|
792
|
-
let n = S - b, r = x - w, i = S - T, a = E - w, o = n * i + r * a, c = r * i - a * n, l = c < 0;
|
|
793
|
-
if (Math.abs(c) < .001 * Math.abs(o)) {
|
|
794
|
-
p.push(S - D * N, w - O * N), p.push(S + D * P, w + O * P), o >= 0 && (s.join === "round" ? h += q(S, w, S - D * N, w - O * N, S - k * N, w - A * N, p, !1) + 4 : h += 2, p.push(S - k * P, w - A * P), p.push(S + k * N, w + A * N));
|
|
795
|
-
continue;
|
|
796
|
-
}
|
|
797
|
-
let u = (-D + b) * (-O + w) - (-D + S) * (-O + x), d = (-k + T) * (-A + w) - (-k + S) * (-A + E), f = (n * d - i * u) / c, m = (a * u - r * d) / c, g = (f - S) * (f - S) + (m - w) * (m - w), C = S + (f - S) * N, M = w + (m - w) * N, F = S - (f - S) * P, I = w - (m - w) * P, ee = Math.min(n * n + r * r, i * i + a * a), te = l ? N : P;
|
|
798
|
-
g <= ee + te * te * v ? s.join === "bevel" || g / v > y ? (l ? (p.push(C, M), p.push(S + D * P, w + O * P), p.push(C, M), p.push(S + k * P, w + A * P)) : (p.push(S - D * N, w - O * N), p.push(F, I), p.push(S - k * N, w - A * N), p.push(F, I)), h += 2) : s.join === "round" ? l ? (p.push(C, M), p.push(S + D * P, w + O * P), h += q(S, w, S + D * P, w + O * P, S + k * P, w + A * P, p, !0) + 4, p.push(C, M), p.push(S + k * P, w + A * P)) : (p.push(S - D * N, w - O * N), p.push(F, I), h += q(S, w, S - D * N, w - O * N, S - k * N, w - A * N, p, !1) + 4, p.push(S - k * N, w - A * N), p.push(F, I)) : (p.push(C, M), p.push(F, I)) : (p.push(S - D * N, w - O * N), p.push(S + D * P, w + O * P), s.join === "round" ? l ? h += q(S, w, S + D * P, w + O * P, S + k * P, w + A * P, p, !0) + 2 : h += q(S, w, S - D * N, w - O * N, S - k * N, w - A * N, p, !1) + 2 : s.join === "miter" && g / v <= y && (l ? (p.push(F, I), p.push(F, I)) : (p.push(C, M), p.push(C, M)), h += 2), p.push(S - k * N, w - A * N), p.push(S + k * P, w + A * P), h += 2);
|
|
799
|
-
}
|
|
800
|
-
b = e[(m - 2) * 2], x = e[(m - 2) * 2 + 1], S = e[(m - 1) * 2], w = e[(m - 1) * 2 + 1], D = -(x - w), O = b - S, j = Math.sqrt(D * D + O * O), D /= j, O /= j, D *= _, O *= _, p.push(S - D * N, w - O * N), p.push(S + D * P, w + O * P), d || (s.cap === "round" ? h += q(S - D * (N - P) * .5, w - O * (N - P) * .5, S - D * N, w - O * N, S + D * P, w + O * P, p, !1) + 2 : s.cap === "square" && (h += _t(S, w, D, O, N, P, !1, p)));
|
|
801
|
-
let F = gt * gt;
|
|
802
|
-
for (let e = g; e < h + g - 2; ++e) b = p[e * 2], x = p[e * 2 + 1], S = p[(e + 1) * 2], w = p[(e + 1) * 2 + 1], T = p[(e + 2) * 2], E = p[(e + 2) * 2 + 1], !(Math.abs(b * (w - E) + S * (E - x) + T * (x - w)) < F) && a.push(e, e + 1, e + 2);
|
|
803
|
-
}
|
|
804
|
-
//#endregion
|
|
805
|
-
//#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/graphics/shared/buildCommands/buildPixelLine.mjs
|
|
806
|
-
function yt(e, t, n, r) {
|
|
807
|
-
let i = ht;
|
|
808
|
-
if (e.length === 0) return;
|
|
809
|
-
let a = e[0], o = e[1], s = e[e.length - 2], c = e[e.length - 1], l = t || Math.abs(a - s) < i && Math.abs(o - c) < i, u = n, d = e.length / 2, f = u.length / 2;
|
|
810
|
-
for (let t = 0; t < d; t++) u.push(e[t * 2]), u.push(e[t * 2 + 1]);
|
|
811
|
-
for (let e = 0; e < d - 1; e++) r.push(f + e, f + e + 1);
|
|
812
|
-
l && r.push(f + d - 1, f);
|
|
813
|
-
}
|
|
814
|
-
//#endregion
|
|
815
|
-
//#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/graphics/shared/utils/triangulateWithHoles.mjs
|
|
816
|
-
function bt(e, t, n, r, i, a, o) {
|
|
817
|
-
let s = Ge(e, t, 2);
|
|
818
|
-
if (!s) return;
|
|
819
|
-
for (let e = 0; e < s.length; e += 3) a[o++] = s[e] + i, a[o++] = s[e + 1] + i, a[o++] = s[e + 2] + i;
|
|
820
|
-
let c = i * r;
|
|
821
|
-
for (let t = 0; t < e.length; t += 2) n[c] = e[t], n[c + 1] = e[t + 1], c += r;
|
|
822
|
-
}
|
|
823
|
-
//#endregion
|
|
824
|
-
//#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/graphics/shared/buildCommands/buildPolygon.mjs
|
|
825
|
-
var xt = [], St = {
|
|
826
|
-
extension: {
|
|
827
|
-
type: S.ShapeBuilder,
|
|
828
|
-
name: "polygon"
|
|
829
|
-
},
|
|
830
|
-
build(e, t) {
|
|
831
|
-
for (let n = 0; n < e.points.length; n++) t[n] = e.points[n];
|
|
832
|
-
return !0;
|
|
833
|
-
},
|
|
834
|
-
triangulate(e, t, n, r, i, a) {
|
|
835
|
-
bt(e, xt, t, n, r, i, a);
|
|
836
|
-
}
|
|
837
|
-
}, Ct = {
|
|
838
|
-
extension: {
|
|
839
|
-
type: S.ShapeBuilder,
|
|
840
|
-
name: "rectangle"
|
|
841
|
-
},
|
|
842
|
-
build(e, t) {
|
|
843
|
-
let n = e, r = n.x, i = n.y, a = n.width, o = n.height;
|
|
844
|
-
return a > 0 && o > 0 ? (t[0] = r, t[1] = i, t[2] = r + a, t[3] = i, t[4] = r + a, t[5] = i + o, t[6] = r, t[7] = i + o, !0) : !1;
|
|
845
|
-
},
|
|
846
|
-
triangulate(e, t, n, r, i, a) {
|
|
847
|
-
let o = 0;
|
|
848
|
-
r *= n, t[r + o] = e[0], t[r + o + 1] = e[1], o += n, t[r + o] = e[2], t[r + o + 1] = e[3], o += n, t[r + o] = e[6], t[r + o + 1] = e[7], o += n, t[r + o] = e[4], t[r + o + 1] = e[5], o += n;
|
|
849
|
-
let s = r / n;
|
|
850
|
-
i[a++] = s, i[a++] = s + 1, i[a++] = s + 2, i[a++] = s + 1, i[a++] = s + 3, i[a++] = s + 2;
|
|
851
|
-
}
|
|
852
|
-
}, wt = {
|
|
853
|
-
extension: {
|
|
854
|
-
type: S.ShapeBuilder,
|
|
855
|
-
name: "triangle"
|
|
856
|
-
},
|
|
857
|
-
build(e, t) {
|
|
858
|
-
return t[0] = e.x, t[1] = e.y, t[2] = e.x2, t[3] = e.y2, t[4] = e.x3, t[5] = e.y3, !0;
|
|
859
|
-
},
|
|
860
|
-
triangulate(e, t, n, r, i, a) {
|
|
861
|
-
let o = 0;
|
|
862
|
-
r *= n, t[r + o] = e[0], t[r + o + 1] = e[1], o += n, t[r + o] = e[2], t[r + o + 1] = e[3], o += n, t[r + o] = e[4], t[r + o + 1] = e[5];
|
|
863
|
-
let s = r / n;
|
|
864
|
-
i[a++] = s, i[a++] = s + 1, i[a++] = s + 2;
|
|
865
|
-
}
|
|
866
|
-
}, Tt = [{
|
|
867
|
-
offset: 0,
|
|
868
|
-
color: "white"
|
|
869
|
-
}, {
|
|
870
|
-
offset: 1,
|
|
871
|
-
color: "black"
|
|
872
|
-
}], Et = class e {
|
|
873
|
-
constructor(...t) {
|
|
874
|
-
this.uid = h("fillGradient"), this._tick = 0, this.type = "linear", this.colorStops = [];
|
|
875
|
-
let n = kt(t);
|
|
876
|
-
n = {
|
|
877
|
-
...n.type === "radial" ? e.defaultRadialOptions : e.defaultLinearOptions,
|
|
878
|
-
...s(n)
|
|
879
|
-
}, this._textureSize = n.textureSize, this._wrapMode = n.wrapMode, n.type === "radial" ? (this.center = n.center, this.outerCenter = n.outerCenter ?? this.center, this.innerRadius = n.innerRadius, this.outerRadius = n.outerRadius, this.scale = n.scale, this.rotation = n.rotation) : (this.start = n.start, this.end = n.end), this.textureSpace = n.textureSpace, this.type = n.type, n.colorStops.forEach((e) => {
|
|
880
|
-
this.addColorStop(e.offset, e.color);
|
|
881
|
-
});
|
|
882
|
-
}
|
|
883
|
-
addColorStop(e, t) {
|
|
884
|
-
return this.colorStops.push({
|
|
885
|
-
offset: e,
|
|
886
|
-
color: T.shared.setValue(t).toHexa()
|
|
887
|
-
}), this;
|
|
888
|
-
}
|
|
889
|
-
buildLinearGradient() {
|
|
890
|
-
if (this.texture) return;
|
|
891
|
-
let { x: e, y: t } = this.start, { x: n, y: r } = this.end, i = n - e, a = r - t, o = i < 0 || a < 0;
|
|
892
|
-
if (this._wrapMode === "clamp-to-edge") {
|
|
893
|
-
if (i < 0) {
|
|
894
|
-
let t = e;
|
|
895
|
-
e = n, n = t, i *= -1;
|
|
896
|
-
}
|
|
897
|
-
if (a < 0) {
|
|
898
|
-
let e = t;
|
|
899
|
-
t = r, r = e, a *= -1;
|
|
900
|
-
}
|
|
901
|
-
}
|
|
902
|
-
let s = this.colorStops.length ? this.colorStops : Tt, c = this._textureSize, { canvas: l, context: u } = Ot(c, 1), d = o ? u.createLinearGradient(this._textureSize, 0, 0, 0) : u.createLinearGradient(0, 0, this._textureSize, 0);
|
|
903
|
-
Dt(d, s), u.fillStyle = d, u.fillRect(0, 0, c, 1), this.texture = new f({ source: new D({
|
|
904
|
-
resource: l,
|
|
905
|
-
addressMode: this._wrapMode
|
|
906
|
-
}) });
|
|
907
|
-
let p = Math.sqrt(i * i + a * a), m = Math.atan2(a, i), h = new _();
|
|
908
|
-
h.scale(p / c, 1), h.rotate(m), h.translate(e, t), this.textureSpace === "local" && h.scale(c, c), this.transform = h;
|
|
909
|
-
}
|
|
910
|
-
buildGradient() {
|
|
911
|
-
this.texture || this._tick++, this.type === "linear" ? this.buildLinearGradient() : this.buildRadialGradient();
|
|
912
|
-
}
|
|
913
|
-
buildRadialGradient() {
|
|
914
|
-
if (this.texture) return;
|
|
915
|
-
let e = this.colorStops.length ? this.colorStops : Tt, t = this._textureSize, { canvas: n, context: r } = Ot(t, t), { x: i, y: a } = this.center, { x: o, y: s } = this.outerCenter, c = this.innerRadius, l = this.outerRadius, u = o - l, d = s - l, p = t / (l * 2), m = (i - u) * p, h = (a - d) * p, g = r.createRadialGradient(m, h, c * p, (o - u) * p, (s - d) * p, l * p);
|
|
916
|
-
Dt(g, e), r.fillStyle = e[e.length - 1].color, r.fillRect(0, 0, t, t), r.fillStyle = g, r.translate(m, h), r.rotate(this.rotation), r.scale(1, this.scale), r.translate(-m, -h), r.fillRect(0, 0, t, t), this.texture = new f({ source: new D({
|
|
917
|
-
resource: n,
|
|
918
|
-
addressMode: this._wrapMode
|
|
919
|
-
}) });
|
|
920
|
-
let v = new _();
|
|
921
|
-
this.textureSpace === "local" ? v.scale(2 * l, 2 * l) : v.scale(1 / p, 1 / p), v.translate(u, d), this.transform = v;
|
|
922
|
-
}
|
|
923
|
-
destroy() {
|
|
924
|
-
this.texture?.destroy(!0), this.texture = null, this.transform = null, this.colorStops = [], this.start = null, this.end = null, this.center = null, this.outerCenter = null;
|
|
925
|
-
}
|
|
926
|
-
get styleKey() {
|
|
927
|
-
return `fill-gradient-${this.uid}-${this._tick}`;
|
|
928
|
-
}
|
|
929
|
-
};
|
|
930
|
-
Et.defaultLinearOptions = {
|
|
931
|
-
start: {
|
|
932
|
-
x: 0,
|
|
933
|
-
y: 0
|
|
934
|
-
},
|
|
935
|
-
end: {
|
|
936
|
-
x: 0,
|
|
937
|
-
y: 1
|
|
938
|
-
},
|
|
939
|
-
colorStops: [],
|
|
940
|
-
textureSpace: "local",
|
|
941
|
-
type: "linear",
|
|
942
|
-
textureSize: 256,
|
|
943
|
-
wrapMode: "clamp-to-edge"
|
|
944
|
-
}, Et.defaultRadialOptions = {
|
|
945
|
-
center: {
|
|
946
|
-
x: .5,
|
|
947
|
-
y: .5
|
|
948
|
-
},
|
|
949
|
-
innerRadius: 0,
|
|
950
|
-
outerRadius: .5,
|
|
951
|
-
colorStops: [],
|
|
952
|
-
scale: 1,
|
|
953
|
-
rotation: 0,
|
|
954
|
-
textureSpace: "local",
|
|
955
|
-
type: "radial",
|
|
956
|
-
textureSize: 256,
|
|
957
|
-
wrapMode: "clamp-to-edge"
|
|
958
|
-
};
|
|
959
|
-
var J = Et;
|
|
960
|
-
function Dt(e, t) {
|
|
961
|
-
for (let n = 0; n < t.length; n++) {
|
|
962
|
-
let r = t[n];
|
|
963
|
-
e.addColorStop(r.offset, r.color);
|
|
964
|
-
}
|
|
965
|
-
}
|
|
966
|
-
function Ot(e, t) {
|
|
967
|
-
let n = g.get().createCanvas(e, t);
|
|
968
|
-
return {
|
|
969
|
-
canvas: n,
|
|
970
|
-
context: n.getContext("2d")
|
|
971
|
-
};
|
|
972
|
-
}
|
|
973
|
-
function kt(e) {
|
|
974
|
-
let t = e[0] ?? {};
|
|
975
|
-
return (typeof t == "number" || e[1]) && (o("8.5.2", "use options object instead"), t = {
|
|
976
|
-
type: "linear",
|
|
977
|
-
start: {
|
|
978
|
-
x: e[0],
|
|
979
|
-
y: e[1]
|
|
980
|
-
},
|
|
981
|
-
end: {
|
|
982
|
-
x: e[2],
|
|
983
|
-
y: e[3]
|
|
984
|
-
},
|
|
985
|
-
textureSpace: e[4],
|
|
986
|
-
textureSize: e[5] ?? J.defaultLinearOptions.textureSize
|
|
987
|
-
}), t;
|
|
988
|
-
}
|
|
989
|
-
//#endregion
|
|
990
|
-
//#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/graphics/shared/utils/generateTextureFillMatrix.mjs
|
|
991
|
-
var At = new _(), jt = new l(), Mt = new _();
|
|
992
|
-
function Nt(e, t, n, r) {
|
|
993
|
-
let i = t.matrix ? e.copyFrom(t.matrix).invert() : e.identity();
|
|
994
|
-
if (t.textureSpace === "local") {
|
|
995
|
-
let e = n.getBounds(jt);
|
|
996
|
-
t.width && e.pad(t.width);
|
|
997
|
-
let { x: r, y: a } = e, o = 1 / e.width, s = 1 / e.height, c = -r * o, l = -a * s, u = i.a, d = i.b, f = i.c, p = i.d;
|
|
998
|
-
i.a *= o, i.b *= o, i.c *= s, i.d *= s, i.tx = c * u + l * f + i.tx, i.ty = c * d + l * p + i.ty;
|
|
999
|
-
} else if (t.texture.rotate) {
|
|
1000
|
-
let { uvs: e, orig: n } = t.texture;
|
|
1001
|
-
i.scale(1 / n.width, 1 / n.height), i.prepend(Mt.set(e.x1 - e.x0, e.y1 - e.y0, e.x3 - e.x0, e.y3 - e.y0, e.x0, e.y0));
|
|
1002
|
-
} else i.translate(t.texture.frame.x, t.texture.frame.y), i.scale(1 / t.texture.source.width, 1 / t.texture.source.height);
|
|
1003
|
-
let a = t.texture.source.style;
|
|
1004
|
-
return !(t.fill instanceof J) && a.addressMode === "clamp-to-edge" && (a.addressMode = "repeat", a.update()), r && i.append(At.copyFrom(r).invert()), i;
|
|
1005
|
-
}
|
|
1006
|
-
//#endregion
|
|
1007
|
-
//#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/graphics/shared/utils/buildContextBatches.mjs
|
|
1008
|
-
var Y = {};
|
|
1009
|
-
v.handleByMap(S.ShapeBuilder, Y), v.add(Ct, St, wt, ft, pt, mt);
|
|
1010
|
-
var Pt = new l(), Ft = new _();
|
|
1011
|
-
function It(e, t) {
|
|
1012
|
-
let { geometryData: n, batches: r } = t;
|
|
1013
|
-
r.length = 0, n.indices.length = 0, n.vertices.length = 0, n.uvs.length = 0;
|
|
1014
|
-
for (let t = 0; t < e.instructions.length; t++) {
|
|
1015
|
-
let i = e.instructions[t];
|
|
1016
|
-
if (i.action === "texture") Lt(i.data, r, n);
|
|
1017
|
-
else if (i.action === "fill" || i.action === "stroke") {
|
|
1018
|
-
let e = i.action === "stroke", t = i.data.path.shapePath, a = i.data.style, o = i.data.hole;
|
|
1019
|
-
e && o && Rt(o.shapePath, a, !0, r, n), o && (t.shapePrimitives[t.shapePrimitives.length - 1].holes = o.shapePath.shapePrimitives), Rt(t, a, e, r, n);
|
|
1020
|
-
}
|
|
1021
|
-
}
|
|
1022
|
-
}
|
|
1023
|
-
function Lt(e, t, n) {
|
|
1024
|
-
let r = [], i = Y.rectangle, o = Pt;
|
|
1025
|
-
o.x = e.dx, o.y = e.dy, o.width = e.dw, o.height = e.dh;
|
|
1026
|
-
let s = e.transform;
|
|
1027
|
-
if (!i.build(o, r)) return;
|
|
1028
|
-
let { vertices: c, uvs: l, indices: u } = n, d = u.length, f = c.length / 2;
|
|
1029
|
-
s && lt(r, s), i.triangulate(r, c, 2, f, u, d);
|
|
1030
|
-
let p = e.image, m = p.uvs;
|
|
1031
|
-
l.push(m.x0, m.y0, m.x1, m.y1, m.x3, m.y3, m.x2, m.y2);
|
|
1032
|
-
let h = a.get(dt);
|
|
1033
|
-
h.indexOffset = d, h.indexSize = u.length - d, h.attributeOffset = f, h.attributeSize = c.length / 2 - f, h.baseColor = e.style, h.alpha = e.alpha, h.texture = p, h.geometryData = n, t.push(h);
|
|
1034
|
-
}
|
|
1035
|
-
function Rt(e, t, n, r, i) {
|
|
1036
|
-
let { vertices: o, uvs: s, indices: c } = i;
|
|
1037
|
-
e.shapePrimitives.forEach(({ shape: e, transform: l, holes: u }) => {
|
|
1038
|
-
let d = [], p = Y[e.type];
|
|
1039
|
-
if (!p.build(e, d)) return;
|
|
1040
|
-
let m = c.length, h = o.length / 2, g = "triangle-list";
|
|
1041
|
-
if (l && lt(d, l), n) {
|
|
1042
|
-
let n = e.closePath ?? !0, r = t;
|
|
1043
|
-
r.pixelLine ? (yt(d, n, o, c), g = "line-list") : vt(d, r, !1, n, o, c);
|
|
1044
|
-
} else if (u) {
|
|
1045
|
-
let e = [], t = d.slice();
|
|
1046
|
-
zt(u).forEach((n) => {
|
|
1047
|
-
e.push(t.length / 2), t.push(...n);
|
|
1048
|
-
}), bt(t, e, o, 2, h, c, m);
|
|
1049
|
-
} else p.triangulate(d, o, 2, h, c, m);
|
|
1050
|
-
let _ = s.length / 2, v = t.texture;
|
|
1051
|
-
if (v !== f.WHITE) {
|
|
1052
|
-
let n = Nt(Ft, t, e, l);
|
|
1053
|
-
st(o, 2, h, s, _, 2, o.length / 2 - h, n);
|
|
1054
|
-
} else ct(s, _, 2, o.length / 2 - h);
|
|
1055
|
-
let y = a.get(dt);
|
|
1056
|
-
y.indexOffset = m, y.indexSize = c.length - m, y.attributeOffset = h, y.attributeSize = o.length / 2 - h, y.baseColor = t.color, y.alpha = t.alpha, y.texture = v, y.geometryData = i, y.topology = g, r.push(y);
|
|
1057
|
-
});
|
|
1058
|
-
}
|
|
1059
|
-
function zt(e) {
|
|
1060
|
-
let t = [];
|
|
1061
|
-
for (let n = 0; n < e.length; n++) {
|
|
1062
|
-
let r = e[n].shape, i = [];
|
|
1063
|
-
Y[r.type].build(r, i) && t.push(i);
|
|
1064
|
-
}
|
|
1065
|
-
return t;
|
|
1066
|
-
}
|
|
1067
|
-
//#endregion
|
|
1068
|
-
//#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/graphics/shared/GraphicsContextSystem.mjs
|
|
1069
|
-
var Bt = class {
|
|
1070
|
-
constructor() {
|
|
1071
|
-
this.batches = [], this.geometryData = {
|
|
1072
|
-
vertices: [],
|
|
1073
|
-
uvs: [],
|
|
1074
|
-
indices: []
|
|
1075
|
-
};
|
|
1076
|
-
}
|
|
1077
|
-
reset() {
|
|
1078
|
-
this.batches && this.batches.forEach((e) => {
|
|
1079
|
-
a.return(e);
|
|
1080
|
-
}), this.graphicsData && a.return(this.graphicsData), this.isBatchable = !1, this.context = null, this.batches.length = 0, this.geometryData.indices.length = 0, this.geometryData.vertices.length = 0, this.geometryData.uvs.length = 0, this.graphicsData = null;
|
|
1081
|
-
}
|
|
1082
|
-
destroy() {
|
|
1083
|
-
this.reset(), this.batches = null, this.geometryData = null;
|
|
1084
|
-
}
|
|
1085
|
-
}, Vt = class {
|
|
1086
|
-
constructor() {
|
|
1087
|
-
this.instructions = new i();
|
|
1088
|
-
}
|
|
1089
|
-
init(e) {
|
|
1090
|
-
let t = e.maxTextures;
|
|
1091
|
-
this.batcher ? this.batcher._updateMaxTextures(t) : this.batcher = new N({ maxTextures: t }), this.instructions.reset();
|
|
1092
|
-
}
|
|
1093
|
-
get geometry() {
|
|
1094
|
-
return o(p, "GraphicsContextRenderData#geometry is deprecated, please use batcher.geometry instead."), this.batcher.geometry;
|
|
1095
|
-
}
|
|
1096
|
-
destroy() {
|
|
1097
|
-
this.batcher.destroy(), this.instructions.destroy(), this.batcher = null, this.instructions = null;
|
|
1098
|
-
}
|
|
1099
|
-
}, Ht = class e {
|
|
1100
|
-
constructor(e) {
|
|
1101
|
-
this._renderer = e, this._managedContexts = new M({
|
|
1102
|
-
renderer: e,
|
|
1103
|
-
type: "resource",
|
|
1104
|
-
name: "graphicsContext"
|
|
1105
|
-
});
|
|
1106
|
-
}
|
|
1107
|
-
init(t) {
|
|
1108
|
-
e.defaultOptions.bezierSmoothness = t?.bezierSmoothness ?? e.defaultOptions.bezierSmoothness;
|
|
1109
|
-
}
|
|
1110
|
-
getContextRenderData(e) {
|
|
1111
|
-
return e._gpuData[this._renderer.uid].graphicsData || this._initContextRenderData(e);
|
|
1112
|
-
}
|
|
1113
|
-
updateGpuContext(e) {
|
|
1114
|
-
let t = !!e._gpuData[this._renderer.uid], n = e._gpuData[this._renderer.uid] || this._initContext(e);
|
|
1115
|
-
if (e.dirty || !t) {
|
|
1116
|
-
t && n.reset(), It(e, n);
|
|
1117
|
-
let r = e.batchMode;
|
|
1118
|
-
e.customShader || r === "no-batch" ? n.isBatchable = !1 : r === "auto" ? n.isBatchable = n.geometryData.vertices.length < 400 : n.isBatchable = !0, e.dirty = !1;
|
|
1119
|
-
}
|
|
1120
|
-
return n;
|
|
1121
|
-
}
|
|
1122
|
-
getGpuContext(e) {
|
|
1123
|
-
return e._gpuData[this._renderer.uid] || this._initContext(e);
|
|
1124
|
-
}
|
|
1125
|
-
_initContextRenderData(e) {
|
|
1126
|
-
let t = a.get(Vt, { maxTextures: this._renderer.limits.maxBatchableTextures }), n = e._gpuData[this._renderer.uid], { batches: r, geometryData: i } = n;
|
|
1127
|
-
n.graphicsData = t;
|
|
1128
|
-
let o = i.vertices.length, s = i.indices.length;
|
|
1129
|
-
for (let e = 0; e < r.length; e++) r[e].applyTransform = !1;
|
|
1130
|
-
let c = t.batcher;
|
|
1131
|
-
c.ensureAttributeBuffer(o), c.ensureIndexBuffer(s), c.begin();
|
|
1132
|
-
for (let e = 0; e < r.length; e++) {
|
|
1133
|
-
let t = r[e];
|
|
1134
|
-
c.add(t);
|
|
1135
|
-
}
|
|
1136
|
-
c.finish(t.instructions);
|
|
1137
|
-
let l = c.geometry;
|
|
1138
|
-
l.indexBuffer.setDataWithSize(c.indexBuffer, c.indexSize, !0), l.buffers[0].setDataWithSize(c.attributeBuffer.float32View, c.attributeSize, !0);
|
|
1139
|
-
let u = c.batches;
|
|
1140
|
-
for (let e = 0; e < u.length; e++) {
|
|
1141
|
-
let t = u[e];
|
|
1142
|
-
t.bindGroup = ie(t.textures.textures, t.textures.count, this._renderer.limits.maxBatchableTextures);
|
|
1143
|
-
}
|
|
1144
|
-
return t;
|
|
1145
|
-
}
|
|
1146
|
-
_initContext(e) {
|
|
1147
|
-
let t = new Bt();
|
|
1148
|
-
return t.context = e, e._gpuData[this._renderer.uid] = t, this._managedContexts.add(e), t;
|
|
1149
|
-
}
|
|
1150
|
-
destroy() {
|
|
1151
|
-
this._managedContexts.destroy(), this._renderer = null;
|
|
1152
|
-
}
|
|
1153
|
-
};
|
|
1154
|
-
Ht.extension = {
|
|
1155
|
-
type: [S.WebGLSystem, S.WebGPUSystem],
|
|
1156
|
-
name: "graphicsContext"
|
|
1157
|
-
}, Ht.defaultOptions = { bezierSmoothness: .5 };
|
|
1158
|
-
var Ut = Ht, Wt = 8, Gt = 1.1920929e-7, Kt = 1;
|
|
1159
|
-
function qt(e, t, n, r, i, a, o, s, c, l) {
|
|
1160
|
-
let u = (Kt - Math.min(.99, Math.max(0, l ?? Ut.defaultOptions.bezierSmoothness))) / 1;
|
|
1161
|
-
return u *= u, Jt(t, n, r, i, a, o, s, c, e, u), e;
|
|
1162
|
-
}
|
|
1163
|
-
function Jt(e, t, n, r, i, a, o, s, c, l) {
|
|
1164
|
-
Yt(e, t, n, r, i, a, o, s, c, l, 0), c.push(o, s);
|
|
1165
|
-
}
|
|
1166
|
-
function Yt(e, t, n, r, i, a, o, s, c, l, u) {
|
|
1167
|
-
if (u > Wt) return;
|
|
1168
|
-
let d = (e + n) / 2, f = (t + r) / 2, p = (n + i) / 2, m = (r + a) / 2, h = (i + o) / 2, g = (a + s) / 2, _ = (d + p) / 2, v = (f + m) / 2, y = (p + h) / 2, b = (m + g) / 2, x = (_ + y) / 2, S = (v + b) / 2;
|
|
1169
|
-
if (u > 0) {
|
|
1170
|
-
let u = o - e, d = s - t, f = Math.abs((n - o) * d - (r - s) * u), p = Math.abs((i - o) * d - (a - s) * u);
|
|
1171
|
-
if (f > Gt && p > Gt) {
|
|
1172
|
-
if ((f + p) * (f + p) <= l * (u * u + d * d)) {
|
|
1173
|
-
c.push(x, S);
|
|
1174
|
-
return;
|
|
1175
|
-
}
|
|
1176
|
-
} else if (f > Gt) {
|
|
1177
|
-
if (f * f <= l * (u * u + d * d)) {
|
|
1178
|
-
c.push(x, S);
|
|
1179
|
-
return;
|
|
1180
|
-
}
|
|
1181
|
-
} else if (p > Gt) {
|
|
1182
|
-
if (p * p <= l * (u * u + d * d)) {
|
|
1183
|
-
c.push(x, S);
|
|
1184
|
-
return;
|
|
1185
|
-
}
|
|
1186
|
-
} else if (u = x - (e + o) / 2, d = S - (t + s) / 2, u * u + d * d <= l) {
|
|
1187
|
-
c.push(x, S);
|
|
1188
|
-
return;
|
|
1189
|
-
}
|
|
1190
|
-
}
|
|
1191
|
-
Yt(e, t, d, f, _, v, x, S, c, l, u + 1), Yt(x, S, y, b, h, g, o, s, c, l, u + 1);
|
|
1192
|
-
}
|
|
1193
|
-
//#endregion
|
|
1194
|
-
//#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/graphics/shared/buildCommands/buildAdaptiveQuadratic.mjs
|
|
1195
|
-
var Xt = 8, Zt = 1.1920929e-7, Qt = 1;
|
|
1196
|
-
function $t(e, t, n, r, i, a, o, s) {
|
|
1197
|
-
let c = (Qt - Math.min(.99, Math.max(0, s ?? Ut.defaultOptions.bezierSmoothness))) / 1;
|
|
1198
|
-
return c *= c, en(t, n, r, i, a, o, e, c), e;
|
|
1199
|
-
}
|
|
1200
|
-
function en(e, t, n, r, i, a, o, s) {
|
|
1201
|
-
tn(o, e, t, n, r, i, a, s, 0), o.push(i, a);
|
|
1202
|
-
}
|
|
1203
|
-
function tn(e, t, n, r, i, a, o, s, c) {
|
|
1204
|
-
if (c > Xt) return;
|
|
1205
|
-
let l = (t + r) / 2, u = (n + i) / 2, d = (r + a) / 2, f = (i + o) / 2, p = (l + d) / 2, m = (u + f) / 2, h = a - t, g = o - n, _ = Math.abs((r - a) * g - (i - o) * h);
|
|
1206
|
-
if (_ > Zt) {
|
|
1207
|
-
if (_ * _ <= s * (h * h + g * g)) {
|
|
1208
|
-
e.push(p, m);
|
|
1209
|
-
return;
|
|
1210
|
-
}
|
|
1211
|
-
} else if (h = p - (t + a) / 2, g = m - (n + o) / 2, h * h + g * g <= s) {
|
|
1212
|
-
e.push(p, m);
|
|
1213
|
-
return;
|
|
1214
|
-
}
|
|
1215
|
-
tn(e, t, n, l, u, p, m, s, c + 1), tn(e, p, m, d, f, a, o, s, c + 1);
|
|
1216
|
-
}
|
|
1217
|
-
//#endregion
|
|
1218
|
-
//#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/graphics/shared/buildCommands/buildArc.mjs
|
|
1219
|
-
function nn(e, t, n, r, i, a, o, s) {
|
|
1220
|
-
let c = Math.abs(i - a);
|
|
1221
|
-
(!o && i > a || o && a > i) && (c = 2 * Math.PI - c), s ||= Math.max(6, Math.floor(6 * r ** (1 / 3) * (c / Math.PI))), s = Math.max(s, 3);
|
|
1222
|
-
let l = c / s, u = i;
|
|
1223
|
-
l *= o ? -1 : 1;
|
|
1224
|
-
for (let i = 0; i < s + 1; i++) {
|
|
1225
|
-
let i = Math.cos(u), a = Math.sin(u), o = t + i * r, s = n + a * r;
|
|
1226
|
-
e.push(o, s), u += l;
|
|
1227
|
-
}
|
|
1228
|
-
}
|
|
1229
|
-
//#endregion
|
|
1230
|
-
//#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/graphics/shared/buildCommands/buildArcTo.mjs
|
|
1231
|
-
function rn(e, t, n, r, i, a) {
|
|
1232
|
-
let o = e[e.length - 2], s = e[e.length - 1] - n, c = o - t, l = i - n, u = r - t, d = Math.abs(s * u - c * l);
|
|
1233
|
-
if (d < 1e-8 || a === 0) {
|
|
1234
|
-
(e[e.length - 2] !== t || e[e.length - 1] !== n) && e.push(t, n);
|
|
1235
|
-
return;
|
|
1236
|
-
}
|
|
1237
|
-
let f = s * s + c * c, p = l * l + u * u, m = s * l + c * u, h = a * Math.sqrt(f) / d, g = a * Math.sqrt(p) / d, _ = h * m / f, v = g * m / p, y = h * u + g * c, b = h * l + g * s, x = c * (g + _), S = s * (g + _), C = u * (h + v), w = l * (h + v), T = Math.atan2(S - b, x - y), E = Math.atan2(w - b, C - y);
|
|
1238
|
-
nn(e, y + t, b + n, a, T, E, c * l > u * s);
|
|
1239
|
-
}
|
|
1240
|
-
//#endregion
|
|
1241
|
-
//#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/graphics/shared/buildCommands/buildArcToSvg.mjs
|
|
1242
|
-
var an = Math.PI * 2, on = {
|
|
1243
|
-
centerX: 0,
|
|
1244
|
-
centerY: 0,
|
|
1245
|
-
ang1: 0,
|
|
1246
|
-
ang2: 0
|
|
1247
|
-
}, sn = ({ x: e, y: t }, n, r, i, a, o, s, c) => {
|
|
1248
|
-
e *= n, t *= r;
|
|
1249
|
-
let l = i * e - a * t, u = a * e + i * t;
|
|
1250
|
-
return c.x = l + o, c.y = u + s, c;
|
|
1251
|
-
};
|
|
1252
|
-
function cn(e, t) {
|
|
1253
|
-
let n = t === -1.5707963267948966 ? -.551915024494 : 4 / 3 * Math.tan(t / 4), r = t === 1.5707963267948966 ? .551915024494 : n, i = Math.cos(e), a = Math.sin(e), o = Math.cos(e + t), s = Math.sin(e + t);
|
|
1254
|
-
return [
|
|
1255
|
-
{
|
|
1256
|
-
x: i - a * r,
|
|
1257
|
-
y: a + i * r
|
|
1258
|
-
},
|
|
1259
|
-
{
|
|
1260
|
-
x: o + s * r,
|
|
1261
|
-
y: s - o * r
|
|
1262
|
-
},
|
|
1263
|
-
{
|
|
1264
|
-
x: o,
|
|
1265
|
-
y: s
|
|
1266
|
-
}
|
|
1267
|
-
];
|
|
1268
|
-
}
|
|
1269
|
-
var ln = (e, t, n, r) => {
|
|
1270
|
-
let i = e * r - t * n < 0 ? -1 : 1, a = e * n + t * r;
|
|
1271
|
-
return a > 1 && (a = 1), a < -1 && (a = -1), i * Math.acos(a);
|
|
1272
|
-
}, un = (e, t, n, r, i, a, o, s, c, l, u, d, f) => {
|
|
1273
|
-
let p = i ** 2, m = a ** 2, h = u ** 2, g = d ** 2, _ = p * m - p * g - m * h;
|
|
1274
|
-
_ < 0 && (_ = 0), _ /= p * g + m * h, _ = Math.sqrt(_) * (o === s ? -1 : 1);
|
|
1275
|
-
let v = _ * i / a * d, y = _ * -a / i * u, b = l * v - c * y + (e + n) / 2, x = c * v + l * y + (t + r) / 2, S = (u - v) / i, C = (d - y) / a, w = (-u - v) / i, T = (-d - y) / a, E = ln(1, 0, S, C), D = ln(S, C, w, T);
|
|
1276
|
-
s === 0 && D > 0 && (D -= an), s === 1 && D < 0 && (D += an), f.centerX = b, f.centerY = x, f.ang1 = E, f.ang2 = D;
|
|
1277
|
-
};
|
|
1278
|
-
function dn(e, t, n, r, i, a, o, s = 0, c = 0, l = 0) {
|
|
1279
|
-
if (a === 0 || o === 0) return;
|
|
1280
|
-
let u = Math.sin(s * an / 360), d = Math.cos(s * an / 360), f = d * (t - r) / 2 + u * (n - i) / 2, p = -u * (t - r) / 2 + d * (n - i) / 2;
|
|
1281
|
-
if (f === 0 && p === 0) return;
|
|
1282
|
-
a = Math.abs(a), o = Math.abs(o);
|
|
1283
|
-
let m = f ** 2 / a ** 2 + p ** 2 / o ** 2;
|
|
1284
|
-
m > 1 && (a *= Math.sqrt(m), o *= Math.sqrt(m)), un(t, n, r, i, a, o, c, l, u, d, f, p, on);
|
|
1285
|
-
let { ang1: h, ang2: g } = on, { centerX: _, centerY: v } = on, y = Math.abs(g) / (an / 4);
|
|
1286
|
-
Math.abs(1 - y) < 1e-7 && (y = 1);
|
|
1287
|
-
let b = Math.max(Math.ceil(y), 1);
|
|
1288
|
-
g /= b;
|
|
1289
|
-
let x = e[e.length - 2], S = e[e.length - 1], C = {
|
|
1290
|
-
x: 0,
|
|
1291
|
-
y: 0
|
|
1292
|
-
};
|
|
1293
|
-
for (let t = 0; t < b; t++) {
|
|
1294
|
-
let t = cn(h, g), { x: n, y: r } = sn(t[0], a, o, d, u, _, v, C), { x: i, y: s } = sn(t[1], a, o, d, u, _, v, C), { x: c, y: l } = sn(t[2], a, o, d, u, _, v, C);
|
|
1295
|
-
qt(e, x, S, n, r, i, s, c, l), x = c, S = l, h += g;
|
|
1296
|
-
}
|
|
1297
|
-
}
|
|
1298
|
-
//#endregion
|
|
1299
|
-
//#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/graphics/shared/path/roundShape.mjs
|
|
1300
|
-
function fn(e, t, n) {
|
|
1301
|
-
let r = (e, t) => {
|
|
1302
|
-
let n = t.x - e.x, r = t.y - e.y, i = Math.sqrt(n * n + r * r);
|
|
1303
|
-
return {
|
|
1304
|
-
len: i,
|
|
1305
|
-
nx: n / i,
|
|
1306
|
-
ny: r / i
|
|
1307
|
-
};
|
|
1308
|
-
}, i = (t, n) => {
|
|
1309
|
-
t === 0 ? e.moveTo(n.x, n.y) : e.lineTo(n.x, n.y);
|
|
1310
|
-
}, a = t[t.length - 1];
|
|
1311
|
-
for (let o = 0; o < t.length; o++) {
|
|
1312
|
-
let s = t[o % t.length], c = s.radius ?? n;
|
|
1313
|
-
if (c <= 0) {
|
|
1314
|
-
i(o, s), a = s;
|
|
1315
|
-
continue;
|
|
1316
|
-
}
|
|
1317
|
-
let l = t[(o + 1) % t.length], u = r(s, a), d = r(s, l);
|
|
1318
|
-
if (u.len < 1e-4 || d.len < 1e-4) {
|
|
1319
|
-
i(o, s), a = s;
|
|
1320
|
-
continue;
|
|
1321
|
-
}
|
|
1322
|
-
let f = Math.asin(u.nx * d.ny - u.ny * d.nx), p = 1, m = !1;
|
|
1323
|
-
u.nx * d.nx - u.ny * -d.ny < 0 ? f < 0 ? f = Math.PI + f : (f = Math.PI - f, p = -1, m = !0) : f > 0 && (p = -1, m = !0);
|
|
1324
|
-
let h = f / 2, g, _ = Math.abs(Math.cos(h) * c / Math.sin(h));
|
|
1325
|
-
_ > Math.min(u.len / 2, d.len / 2) ? (_ = Math.min(u.len / 2, d.len / 2), g = Math.abs(_ * Math.sin(h) / Math.cos(h))) : g = c;
|
|
1326
|
-
let v = s.x + d.nx * _ + -d.ny * g * p, y = s.y + d.ny * _ + d.nx * g * p, b = Math.atan2(u.ny, u.nx) + Math.PI / 2 * p, x = Math.atan2(d.ny, d.nx) - Math.PI / 2 * p;
|
|
1327
|
-
o === 0 && e.moveTo(v + Math.cos(b) * g, y + Math.sin(b) * g), e.arc(v, y, g, b, x, m), a = s;
|
|
1328
|
-
}
|
|
1329
|
-
}
|
|
1330
|
-
function pn(e, t, n, r) {
|
|
1331
|
-
let i = (e, t) => Math.sqrt((e.x - t.x) ** 2 + (e.y - t.y) ** 2), a = (e, t, n) => ({
|
|
1332
|
-
x: e.x + (t.x - e.x) * n,
|
|
1333
|
-
y: e.y + (t.y - e.y) * n
|
|
1334
|
-
}), o = t.length;
|
|
1335
|
-
for (let s = 0; s < o; s++) {
|
|
1336
|
-
let c = t[(s + 1) % o], l = c.radius ?? n;
|
|
1337
|
-
if (l <= 0) {
|
|
1338
|
-
s === 0 ? e.moveTo(c.x, c.y) : e.lineTo(c.x, c.y);
|
|
1339
|
-
continue;
|
|
1340
|
-
}
|
|
1341
|
-
let u = t[s], d = t[(s + 2) % o], f = i(u, c), p;
|
|
1342
|
-
p = f < 1e-4 ? c : a(c, u, Math.min(f / 2, l) / f);
|
|
1343
|
-
let m = i(d, c), h;
|
|
1344
|
-
h = m < 1e-4 ? c : a(c, d, Math.min(m / 2, l) / m), s === 0 ? e.moveTo(p.x, p.y) : e.lineTo(p.x, p.y), e.quadraticCurveTo(c.x, c.y, h.x, h.y, r);
|
|
1345
|
-
}
|
|
1346
|
-
}
|
|
1347
|
-
//#endregion
|
|
1348
|
-
//#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/graphics/shared/path/ShapePath.mjs
|
|
1349
|
-
var mn = new l(), hn = class {
|
|
1350
|
-
constructor(e) {
|
|
1351
|
-
this.shapePrimitives = [], this._currentPoly = null, this._bounds = new r(), this._graphicsPath2D = e, this.signed = e.checkForHoles;
|
|
1352
|
-
}
|
|
1353
|
-
moveTo(e, t) {
|
|
1354
|
-
return this.startPoly(e, t), this;
|
|
1355
|
-
}
|
|
1356
|
-
lineTo(e, t) {
|
|
1357
|
-
this._ensurePoly();
|
|
1358
|
-
let n = this._currentPoly.points, r = n[n.length - 2], i = n[n.length - 1];
|
|
1359
|
-
return (r !== e || i !== t) && n.push(e, t), this;
|
|
1360
|
-
}
|
|
1361
|
-
arc(e, t, n, r, i, a) {
|
|
1362
|
-
this._ensurePoly(!1);
|
|
1363
|
-
let o = this._currentPoly.points;
|
|
1364
|
-
return nn(o, e, t, n, r, i, a), this;
|
|
1365
|
-
}
|
|
1366
|
-
arcTo(e, t, n, r, i) {
|
|
1367
|
-
this._ensurePoly();
|
|
1368
|
-
let a = this._currentPoly.points;
|
|
1369
|
-
return rn(a, e, t, n, r, i), this;
|
|
1370
|
-
}
|
|
1371
|
-
arcToSvg(e, t, n, r, i, a, o) {
|
|
1372
|
-
let s = this._currentPoly.points;
|
|
1373
|
-
return dn(s, this._currentPoly.lastX, this._currentPoly.lastY, a, o, e, t, n, r, i), this;
|
|
1374
|
-
}
|
|
1375
|
-
bezierCurveTo(e, t, n, r, i, a, o) {
|
|
1376
|
-
this._ensurePoly();
|
|
1377
|
-
let s = this._currentPoly;
|
|
1378
|
-
return qt(this._currentPoly.points, s.lastX, s.lastY, e, t, n, r, i, a, o), this;
|
|
1379
|
-
}
|
|
1380
|
-
quadraticCurveTo(e, t, n, r, i) {
|
|
1381
|
-
this._ensurePoly();
|
|
1382
|
-
let a = this._currentPoly;
|
|
1383
|
-
return $t(this._currentPoly.points, a.lastX, a.lastY, e, t, n, r, i), this;
|
|
1384
|
-
}
|
|
1385
|
-
closePath() {
|
|
1386
|
-
return this.endPoly(!0), this;
|
|
1387
|
-
}
|
|
1388
|
-
addPath(e, t) {
|
|
1389
|
-
this.endPoly(), t && !t.isIdentity() && (e = e.clone(!0), e.transform(t));
|
|
1390
|
-
let n = this.shapePrimitives, r = n.length;
|
|
1391
|
-
for (let t = 0; t < e.instructions.length; t++) {
|
|
1392
|
-
let n = e.instructions[t];
|
|
1393
|
-
this[n.action](...n.data);
|
|
1394
|
-
}
|
|
1395
|
-
if (e.checkForHoles && n.length - r > 1) {
|
|
1396
|
-
let e = null;
|
|
1397
|
-
for (let t = r; t < n.length; t++) {
|
|
1398
|
-
let r = n[t];
|
|
1399
|
-
if (r.shape.type === "polygon") {
|
|
1400
|
-
let i = r.shape, a = e?.shape;
|
|
1401
|
-
a && a.containsPolygon(i) ? (e.holes ||= [], e.holes.push(r), n.copyWithin(t, t + 1), n.length--, t--) : e = r;
|
|
1402
|
-
}
|
|
1403
|
-
}
|
|
1404
|
-
}
|
|
1405
|
-
return this;
|
|
1406
|
-
}
|
|
1407
|
-
finish(e = !1) {
|
|
1408
|
-
this.endPoly(e);
|
|
1409
|
-
}
|
|
1410
|
-
rect(e, t, n, r, i) {
|
|
1411
|
-
return this.drawShape(new l(e, t, n, r), i), this;
|
|
1412
|
-
}
|
|
1413
|
-
circle(e, t, n, r) {
|
|
1414
|
-
return this.drawShape(new Qe(e, t, n), r), this;
|
|
1415
|
-
}
|
|
1416
|
-
poly(e, t, n) {
|
|
1417
|
-
let r = new it(e);
|
|
1418
|
-
return r.closePath = t, this.drawShape(r, n), this;
|
|
1419
|
-
}
|
|
1420
|
-
regularPoly(e, t, n, r, i = 0, a) {
|
|
1421
|
-
r = Math.max(r | 0, 3);
|
|
1422
|
-
let o = -1 * Math.PI / 2 + i, s = Math.PI * 2 / r, c = [];
|
|
1423
|
-
for (let i = 0; i < r; i++) {
|
|
1424
|
-
let r = o - i * s;
|
|
1425
|
-
c.push(e + n * Math.cos(r), t + n * Math.sin(r));
|
|
1426
|
-
}
|
|
1427
|
-
return this.poly(c, !0, a), this;
|
|
1428
|
-
}
|
|
1429
|
-
roundPoly(e, t, n, r, i, a = 0, o) {
|
|
1430
|
-
if (r = Math.max(r | 0, 3), i <= 0) return this.regularPoly(e, t, n, r, a);
|
|
1431
|
-
let s = n * Math.sin(Math.PI / r) - .001;
|
|
1432
|
-
i = Math.min(i, s);
|
|
1433
|
-
let c = -1 * Math.PI / 2 + a, l = Math.PI * 2 / r, u = (r - 2) * Math.PI / r / 2;
|
|
1434
|
-
for (let a = 0; a < r; a++) {
|
|
1435
|
-
let r = a * l + c, s = e + n * Math.cos(r), d = t + n * Math.sin(r), f = r + Math.PI + u, p = r - Math.PI - u, m = s + i * Math.cos(f), h = d + i * Math.sin(f), g = s + i * Math.cos(p), _ = d + i * Math.sin(p);
|
|
1436
|
-
a === 0 ? this.moveTo(m, h) : this.lineTo(m, h), this.quadraticCurveTo(s, d, g, _, o);
|
|
1437
|
-
}
|
|
1438
|
-
return this.closePath();
|
|
1439
|
-
}
|
|
1440
|
-
roundShape(e, t, n = !1, r) {
|
|
1441
|
-
return e.length < 3 ? this : (n ? pn(this, e, t, r) : fn(this, e, t), this.closePath());
|
|
1442
|
-
}
|
|
1443
|
-
filletRect(e, t, n, r, i) {
|
|
1444
|
-
if (i === 0) return this.rect(e, t, n, r);
|
|
1445
|
-
let a = Math.min(n, r) / 2, o = Math.min(a, Math.max(-a, i)), s = e + n, c = t + r, l = o < 0 ? -o : 0, u = Math.abs(o);
|
|
1446
|
-
return this.moveTo(e, t + u).arcTo(e + l, t + l, e + u, t, u).lineTo(s - u, t).arcTo(s - l, t + l, s, t + u, u).lineTo(s, c - u).arcTo(s - l, c - l, e + n - u, c, u).lineTo(e + u, c).arcTo(e + l, c - l, e, c - u, u).closePath();
|
|
1447
|
-
}
|
|
1448
|
-
chamferRect(e, t, n, r, i, a) {
|
|
1449
|
-
if (i <= 0) return this.rect(e, t, n, r);
|
|
1450
|
-
let o = Math.min(i, Math.min(n, r) / 2), s = e + n, c = t + r, l = [
|
|
1451
|
-
e + o,
|
|
1452
|
-
t,
|
|
1453
|
-
s - o,
|
|
1454
|
-
t,
|
|
1455
|
-
s,
|
|
1456
|
-
t + o,
|
|
1457
|
-
s,
|
|
1458
|
-
c - o,
|
|
1459
|
-
s - o,
|
|
1460
|
-
c,
|
|
1461
|
-
e + o,
|
|
1462
|
-
c,
|
|
1463
|
-
e,
|
|
1464
|
-
c - o,
|
|
1465
|
-
e,
|
|
1466
|
-
t + o
|
|
1467
|
-
];
|
|
1468
|
-
for (let e = l.length - 1; e >= 2; e -= 2) l[e] === l[e - 2] && l[e - 1] === l[e - 3] && l.splice(e - 1, 2);
|
|
1469
|
-
return this.poly(l, !0, a);
|
|
1470
|
-
}
|
|
1471
|
-
ellipse(e, t, n, r, i) {
|
|
1472
|
-
return this.drawShape(new $e(e, t, n, r), i), this;
|
|
1473
|
-
}
|
|
1474
|
-
roundRect(e, t, n, r, i, a) {
|
|
1475
|
-
return this.drawShape(new ot(e, t, n, r, i), a), this;
|
|
1476
|
-
}
|
|
1477
|
-
drawShape(e, t) {
|
|
1478
|
-
return this.endPoly(), this.shapePrimitives.push({
|
|
1479
|
-
shape: e,
|
|
1480
|
-
transform: t
|
|
1481
|
-
}), this;
|
|
1482
|
-
}
|
|
1483
|
-
startPoly(e, t) {
|
|
1484
|
-
let n = this._currentPoly;
|
|
1485
|
-
return n && this.endPoly(), n = new it(), n.points.push(e, t), this._currentPoly = n, this;
|
|
1486
|
-
}
|
|
1487
|
-
endPoly(e = !1) {
|
|
1488
|
-
let t = this._currentPoly;
|
|
1489
|
-
return t && t.points.length > 2 && (t.closePath = e, this.shapePrimitives.push({ shape: t })), this._currentPoly = null, this;
|
|
1490
|
-
}
|
|
1491
|
-
_ensurePoly(e = !0) {
|
|
1492
|
-
if (!this._currentPoly && (this._currentPoly = new it(), e)) {
|
|
1493
|
-
let e = this.shapePrimitives[this.shapePrimitives.length - 1];
|
|
1494
|
-
if (e) {
|
|
1495
|
-
let t = e.shape.x, n = e.shape.y;
|
|
1496
|
-
if (e.transform && !e.transform.isIdentity()) {
|
|
1497
|
-
let r = e.transform, i = t;
|
|
1498
|
-
t = r.a * t + r.c * n + r.tx, n = r.b * i + r.d * n + r.ty;
|
|
1499
|
-
}
|
|
1500
|
-
this._currentPoly.points.push(t, n);
|
|
1501
|
-
} else this._currentPoly.points.push(0, 0);
|
|
1502
|
-
}
|
|
1503
|
-
}
|
|
1504
|
-
buildPath() {
|
|
1505
|
-
let e = this._graphicsPath2D;
|
|
1506
|
-
this.shapePrimitives.length = 0, this._currentPoly = null;
|
|
1507
|
-
for (let t = 0; t < e.instructions.length; t++) {
|
|
1508
|
-
let n = e.instructions[t];
|
|
1509
|
-
this[n.action](...n.data);
|
|
1510
|
-
}
|
|
1511
|
-
this.finish();
|
|
1512
|
-
}
|
|
1513
|
-
get bounds() {
|
|
1514
|
-
let e = this._bounds;
|
|
1515
|
-
e.clear();
|
|
1516
|
-
let t = this.shapePrimitives;
|
|
1517
|
-
for (let n = 0; n < t.length; n++) {
|
|
1518
|
-
let r = t[n], i = r.shape.getBounds(mn);
|
|
1519
|
-
r.transform ? e.addRect(i, r.transform) : e.addRect(i);
|
|
1520
|
-
}
|
|
1521
|
-
return e;
|
|
1522
|
-
}
|
|
1523
|
-
}, X = class e {
|
|
1524
|
-
constructor(e, t = !1) {
|
|
1525
|
-
this.instructions = [], this.uid = h("graphicsPath"), this._dirty = !0, this.checkForHoles = t, typeof e == "string" ? Ze(e, this) : this.instructions = e?.slice() ?? [];
|
|
1526
|
-
}
|
|
1527
|
-
get shapePath() {
|
|
1528
|
-
return this._shapePath ||= new hn(this), this._dirty && (this._dirty = !1, this._shapePath.buildPath()), this._shapePath;
|
|
1529
|
-
}
|
|
1530
|
-
addPath(e, t) {
|
|
1531
|
-
return e = e.clone(), this.instructions.push({
|
|
1532
|
-
action: "addPath",
|
|
1533
|
-
data: [e, t]
|
|
1534
|
-
}), this._dirty = !0, this;
|
|
1535
|
-
}
|
|
1536
|
-
arc(...e) {
|
|
1537
|
-
return this.instructions.push({
|
|
1538
|
-
action: "arc",
|
|
1539
|
-
data: e
|
|
1540
|
-
}), this._dirty = !0, this;
|
|
1541
|
-
}
|
|
1542
|
-
arcTo(...e) {
|
|
1543
|
-
return this.instructions.push({
|
|
1544
|
-
action: "arcTo",
|
|
1545
|
-
data: e
|
|
1546
|
-
}), this._dirty = !0, this;
|
|
1547
|
-
}
|
|
1548
|
-
arcToSvg(...e) {
|
|
1549
|
-
return this.instructions.push({
|
|
1550
|
-
action: "arcToSvg",
|
|
1551
|
-
data: e
|
|
1552
|
-
}), this._dirty = !0, this;
|
|
1553
|
-
}
|
|
1554
|
-
bezierCurveTo(...e) {
|
|
1555
|
-
return this.instructions.push({
|
|
1556
|
-
action: "bezierCurveTo",
|
|
1557
|
-
data: e
|
|
1558
|
-
}), this._dirty = !0, this;
|
|
1559
|
-
}
|
|
1560
|
-
bezierCurveToShort(e, t, n, r, i) {
|
|
1561
|
-
let a = this.instructions[this.instructions.length - 1], o = this.getLastPoint(C.shared), s = 0, c = 0;
|
|
1562
|
-
if (!a || a.action !== "bezierCurveTo") s = o.x, c = o.y;
|
|
1563
|
-
else {
|
|
1564
|
-
s = a.data[2], c = a.data[3];
|
|
1565
|
-
let e = o.x, t = o.y;
|
|
1566
|
-
s = e + (e - s), c = t + (t - c);
|
|
1567
|
-
}
|
|
1568
|
-
return this.instructions.push({
|
|
1569
|
-
action: "bezierCurveTo",
|
|
1570
|
-
data: [
|
|
1571
|
-
s,
|
|
1572
|
-
c,
|
|
1573
|
-
e,
|
|
1574
|
-
t,
|
|
1575
|
-
n,
|
|
1576
|
-
r,
|
|
1577
|
-
i
|
|
1578
|
-
]
|
|
1579
|
-
}), this._dirty = !0, this;
|
|
1580
|
-
}
|
|
1581
|
-
closePath() {
|
|
1582
|
-
return this.instructions.push({
|
|
1583
|
-
action: "closePath",
|
|
1584
|
-
data: []
|
|
1585
|
-
}), this._dirty = !0, this;
|
|
1586
|
-
}
|
|
1587
|
-
ellipse(...e) {
|
|
1588
|
-
return this.instructions.push({
|
|
1589
|
-
action: "ellipse",
|
|
1590
|
-
data: e
|
|
1591
|
-
}), this._dirty = !0, this;
|
|
1592
|
-
}
|
|
1593
|
-
lineTo(...e) {
|
|
1594
|
-
return this.instructions.push({
|
|
1595
|
-
action: "lineTo",
|
|
1596
|
-
data: e
|
|
1597
|
-
}), this._dirty = !0, this;
|
|
1598
|
-
}
|
|
1599
|
-
moveTo(...e) {
|
|
1600
|
-
return this.instructions.push({
|
|
1601
|
-
action: "moveTo",
|
|
1602
|
-
data: e
|
|
1603
|
-
}), this;
|
|
1604
|
-
}
|
|
1605
|
-
quadraticCurveTo(...e) {
|
|
1606
|
-
return this.instructions.push({
|
|
1607
|
-
action: "quadraticCurveTo",
|
|
1608
|
-
data: e
|
|
1609
|
-
}), this._dirty = !0, this;
|
|
1610
|
-
}
|
|
1611
|
-
quadraticCurveToShort(e, t, n) {
|
|
1612
|
-
let r = this.instructions[this.instructions.length - 1], i = this.getLastPoint(C.shared), a = 0, o = 0;
|
|
1613
|
-
if (!r || r.action !== "quadraticCurveTo") a = i.x, o = i.y;
|
|
1614
|
-
else {
|
|
1615
|
-
a = r.data[0], o = r.data[1];
|
|
1616
|
-
let e = i.x, t = i.y;
|
|
1617
|
-
a = e + (e - a), o = t + (t - o);
|
|
1618
|
-
}
|
|
1619
|
-
return this.instructions.push({
|
|
1620
|
-
action: "quadraticCurveTo",
|
|
1621
|
-
data: [
|
|
1622
|
-
a,
|
|
1623
|
-
o,
|
|
1624
|
-
e,
|
|
1625
|
-
t,
|
|
1626
|
-
n
|
|
1627
|
-
]
|
|
1628
|
-
}), this._dirty = !0, this;
|
|
1629
|
-
}
|
|
1630
|
-
rect(e, t, n, r, i) {
|
|
1631
|
-
return this.instructions.push({
|
|
1632
|
-
action: "rect",
|
|
1633
|
-
data: [
|
|
1634
|
-
e,
|
|
1635
|
-
t,
|
|
1636
|
-
n,
|
|
1637
|
-
r,
|
|
1638
|
-
i
|
|
1639
|
-
]
|
|
1640
|
-
}), this._dirty = !0, this;
|
|
1641
|
-
}
|
|
1642
|
-
circle(e, t, n, r) {
|
|
1643
|
-
return this.instructions.push({
|
|
1644
|
-
action: "circle",
|
|
1645
|
-
data: [
|
|
1646
|
-
e,
|
|
1647
|
-
t,
|
|
1648
|
-
n,
|
|
1649
|
-
r
|
|
1650
|
-
]
|
|
1651
|
-
}), this._dirty = !0, this;
|
|
1652
|
-
}
|
|
1653
|
-
roundRect(...e) {
|
|
1654
|
-
return this.instructions.push({
|
|
1655
|
-
action: "roundRect",
|
|
1656
|
-
data: e
|
|
1657
|
-
}), this._dirty = !0, this;
|
|
1658
|
-
}
|
|
1659
|
-
poly(...e) {
|
|
1660
|
-
return this.instructions.push({
|
|
1661
|
-
action: "poly",
|
|
1662
|
-
data: e
|
|
1663
|
-
}), this._dirty = !0, this;
|
|
1664
|
-
}
|
|
1665
|
-
regularPoly(...e) {
|
|
1666
|
-
return this.instructions.push({
|
|
1667
|
-
action: "regularPoly",
|
|
1668
|
-
data: e
|
|
1669
|
-
}), this._dirty = !0, this;
|
|
1670
|
-
}
|
|
1671
|
-
roundPoly(...e) {
|
|
1672
|
-
return this.instructions.push({
|
|
1673
|
-
action: "roundPoly",
|
|
1674
|
-
data: e
|
|
1675
|
-
}), this._dirty = !0, this;
|
|
1676
|
-
}
|
|
1677
|
-
roundShape(...e) {
|
|
1678
|
-
return this.instructions.push({
|
|
1679
|
-
action: "roundShape",
|
|
1680
|
-
data: e
|
|
1681
|
-
}), this._dirty = !0, this;
|
|
1682
|
-
}
|
|
1683
|
-
filletRect(...e) {
|
|
1684
|
-
return this.instructions.push({
|
|
1685
|
-
action: "filletRect",
|
|
1686
|
-
data: e
|
|
1687
|
-
}), this._dirty = !0, this;
|
|
1688
|
-
}
|
|
1689
|
-
chamferRect(...e) {
|
|
1690
|
-
return this.instructions.push({
|
|
1691
|
-
action: "chamferRect",
|
|
1692
|
-
data: e
|
|
1693
|
-
}), this._dirty = !0, this;
|
|
1694
|
-
}
|
|
1695
|
-
star(e, t, n, r, i, a, o) {
|
|
1696
|
-
i ||= r / 2;
|
|
1697
|
-
let s = -1 * Math.PI / 2 + a, c = n * 2, l = Math.PI * 2 / c, u = [];
|
|
1698
|
-
for (let n = 0; n < c; n++) {
|
|
1699
|
-
let a = n % 2 ? i : r, o = n * l + s;
|
|
1700
|
-
u.push(e + a * Math.cos(o), t + a * Math.sin(o));
|
|
1701
|
-
}
|
|
1702
|
-
return this.poly(u, !0, o), this;
|
|
1703
|
-
}
|
|
1704
|
-
clone(t = !1) {
|
|
1705
|
-
let n = new e();
|
|
1706
|
-
if (n.checkForHoles = this.checkForHoles, !t) n.instructions = this.instructions.slice();
|
|
1707
|
-
else for (let e = 0; e < this.instructions.length; e++) {
|
|
1708
|
-
let t = this.instructions[e];
|
|
1709
|
-
n.instructions.push({
|
|
1710
|
-
action: t.action,
|
|
1711
|
-
data: t.data.slice()
|
|
1712
|
-
});
|
|
1713
|
-
}
|
|
1714
|
-
return n;
|
|
1715
|
-
}
|
|
1716
|
-
clear() {
|
|
1717
|
-
return this.instructions.length = 0, this._dirty = !0, this;
|
|
1718
|
-
}
|
|
1719
|
-
transform(e) {
|
|
1720
|
-
if (e.isIdentity()) return this;
|
|
1721
|
-
let t = e.a, n = e.b, r = e.c, i = e.d, a = e.tx, o = e.ty, s = 0, c = 0, l = 0, d = 0, f = 0, p = 0, m = 0, h = 0;
|
|
1722
|
-
for (let g = 0; g < this.instructions.length; g++) {
|
|
1723
|
-
let _ = this.instructions[g], v = _.data;
|
|
1724
|
-
switch (_.action) {
|
|
1725
|
-
case "moveTo":
|
|
1726
|
-
case "lineTo":
|
|
1727
|
-
s = v[0], c = v[1], v[0] = t * s + r * c + a, v[1] = n * s + i * c + o;
|
|
1728
|
-
break;
|
|
1729
|
-
case "bezierCurveTo":
|
|
1730
|
-
l = v[0], d = v[1], f = v[2], p = v[3], s = v[4], c = v[5], v[0] = t * l + r * d + a, v[1] = n * l + i * d + o, v[2] = t * f + r * p + a, v[3] = n * f + i * p + o, v[4] = t * s + r * c + a, v[5] = n * s + i * c + o;
|
|
1731
|
-
break;
|
|
1732
|
-
case "quadraticCurveTo":
|
|
1733
|
-
l = v[0], d = v[1], s = v[2], c = v[3], v[0] = t * l + r * d + a, v[1] = n * l + i * d + o, v[2] = t * s + r * c + a, v[3] = n * s + i * c + o;
|
|
1734
|
-
break;
|
|
1735
|
-
case "arcToSvg":
|
|
1736
|
-
s = v[5], c = v[6], m = v[0], h = v[1], v[0] = t * m + r * h, v[1] = n * m + i * h, v[5] = t * s + r * c + a, v[6] = n * s + i * c + o;
|
|
1737
|
-
break;
|
|
1738
|
-
case "circle":
|
|
1739
|
-
v[4] = gn(v[3], e);
|
|
1740
|
-
break;
|
|
1741
|
-
case "rect":
|
|
1742
|
-
v[4] = gn(v[4], e);
|
|
1743
|
-
break;
|
|
1744
|
-
case "ellipse":
|
|
1745
|
-
v[8] = gn(v[8], e);
|
|
1746
|
-
break;
|
|
1747
|
-
case "roundRect":
|
|
1748
|
-
v[5] = gn(v[5], e);
|
|
1749
|
-
break;
|
|
1750
|
-
case "addPath":
|
|
1751
|
-
v[0].transform(e);
|
|
1752
|
-
break;
|
|
1753
|
-
case "poly":
|
|
1754
|
-
v[2] = gn(v[2], e);
|
|
1755
|
-
break;
|
|
1756
|
-
case "regularPoly":
|
|
1757
|
-
case "chamferRect":
|
|
1758
|
-
v[5] = gn(v[5], e);
|
|
1759
|
-
break;
|
|
1760
|
-
case "closePath": break;
|
|
1761
|
-
default:
|
|
1762
|
-
u("unknown transform action", _.action);
|
|
1763
|
-
break;
|
|
1764
|
-
}
|
|
1765
|
-
}
|
|
1766
|
-
return this._dirty = !0, this;
|
|
1767
|
-
}
|
|
1768
|
-
get bounds() {
|
|
1769
|
-
return this.shapePath.bounds;
|
|
1770
|
-
}
|
|
1771
|
-
getLastPoint(e) {
|
|
1772
|
-
let t = this.instructions.length - 1, n = this.instructions[t];
|
|
1773
|
-
if (!n) return e.x = 0, e.y = 0, e;
|
|
1774
|
-
for (; n.action === "closePath";) {
|
|
1775
|
-
if (t--, t < 0) return e.x = 0, e.y = 0, e;
|
|
1776
|
-
n = this.instructions[t];
|
|
1777
|
-
}
|
|
1778
|
-
switch (n.action) {
|
|
1779
|
-
case "moveTo":
|
|
1780
|
-
case "lineTo":
|
|
1781
|
-
e.x = n.data[0], e.y = n.data[1];
|
|
1782
|
-
break;
|
|
1783
|
-
case "quadraticCurveTo":
|
|
1784
|
-
e.x = n.data[2], e.y = n.data[3];
|
|
1785
|
-
break;
|
|
1786
|
-
case "bezierCurveTo":
|
|
1787
|
-
e.x = n.data[4], e.y = n.data[5];
|
|
1788
|
-
break;
|
|
1789
|
-
case "arc":
|
|
1790
|
-
case "arcToSvg":
|
|
1791
|
-
e.x = n.data[5], e.y = n.data[6];
|
|
1792
|
-
break;
|
|
1793
|
-
case "addPath":
|
|
1794
|
-
n.data[0].getLastPoint(e);
|
|
1795
|
-
break;
|
|
1796
|
-
}
|
|
1797
|
-
return e;
|
|
1798
|
-
}
|
|
1799
|
-
};
|
|
1800
|
-
function gn(e, t) {
|
|
1801
|
-
return e ? e.prepend(t) : t.clone();
|
|
1802
|
-
}
|
|
1803
|
-
//#endregion
|
|
1804
|
-
//#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/graphics/shared/svg/parseSVGFloatAttribute.mjs
|
|
1805
|
-
function Z(e, t, n) {
|
|
1806
|
-
let r = e.getAttribute(t);
|
|
1807
|
-
return r ? Number(r) : n;
|
|
1808
|
-
}
|
|
1809
|
-
//#endregion
|
|
1810
|
-
//#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/graphics/shared/svg/parseSVGDefinitions.mjs
|
|
1811
|
-
function _n(e, t) {
|
|
1812
|
-
let n = e.querySelectorAll("defs");
|
|
1813
|
-
for (let e = 0; e < n.length; e++) {
|
|
1814
|
-
let r = n[e];
|
|
1815
|
-
for (let e = 0; e < r.children.length; e++) {
|
|
1816
|
-
let n = r.children[e];
|
|
1817
|
-
switch (n.nodeName.toLowerCase()) {
|
|
1818
|
-
case "lineargradient":
|
|
1819
|
-
t.defs[n.id] = bn(n);
|
|
1820
|
-
break;
|
|
1821
|
-
case "radialgradient":
|
|
1822
|
-
t.defs[n.id] = xn(n);
|
|
1823
|
-
break;
|
|
1824
|
-
default: break;
|
|
1825
|
-
}
|
|
1826
|
-
}
|
|
1827
|
-
}
|
|
1828
|
-
}
|
|
1829
|
-
function Q(e, t, n) {
|
|
1830
|
-
let r = e.getAttribute(t);
|
|
1831
|
-
if (r?.trim().endsWith("%")) {
|
|
1832
|
-
let e = Number(r.trim().slice(0, -1));
|
|
1833
|
-
return Number.isNaN(e) ? n : e / 100;
|
|
1834
|
-
}
|
|
1835
|
-
return Z(e, t, n);
|
|
1836
|
-
}
|
|
1837
|
-
function vn(e) {
|
|
1838
|
-
return (e.getAttribute("gradientUnits") || "objectBoundingBox") === "objectBoundingBox" ? "local" : "global";
|
|
1839
|
-
}
|
|
1840
|
-
function yn(e) {
|
|
1841
|
-
let t = [];
|
|
1842
|
-
for (let n = 0; n < e.children.length; n++) {
|
|
1843
|
-
let r = e.children[n], i = Q(r, "offset", 0), a = T.shared.setValue(r.getAttribute("stop-color")).toNumber();
|
|
1844
|
-
t.push({
|
|
1845
|
-
offset: i,
|
|
1846
|
-
color: a
|
|
1847
|
-
});
|
|
1848
|
-
}
|
|
1849
|
-
return t;
|
|
1850
|
-
}
|
|
1851
|
-
function bn(e) {
|
|
1852
|
-
let t = Q(e, "x1", 0), n = Q(e, "y1", 0), r = Q(e, "x2", 1), i = Q(e, "y2", 0);
|
|
1853
|
-
return new J({
|
|
1854
|
-
type: "linear",
|
|
1855
|
-
start: {
|
|
1856
|
-
x: t,
|
|
1857
|
-
y: n
|
|
1858
|
-
},
|
|
1859
|
-
end: {
|
|
1860
|
-
x: r,
|
|
1861
|
-
y: i
|
|
1862
|
-
},
|
|
1863
|
-
textureSpace: vn(e),
|
|
1864
|
-
colorStops: yn(e)
|
|
1865
|
-
});
|
|
1866
|
-
}
|
|
1867
|
-
function xn(e) {
|
|
1868
|
-
let t = Q(e, "cx", .5), n = Q(e, "cy", .5), r = Q(e, "r", .5), i = Q(e, "fx", t), a = Q(e, "fy", n), o = Q(e, "fr", 0);
|
|
1869
|
-
return new J({
|
|
1870
|
-
type: "radial",
|
|
1871
|
-
center: {
|
|
1872
|
-
x: i,
|
|
1873
|
-
y: a
|
|
1874
|
-
},
|
|
1875
|
-
innerRadius: o,
|
|
1876
|
-
outerCenter: {
|
|
1877
|
-
x: t,
|
|
1878
|
-
y: n
|
|
1879
|
-
},
|
|
1880
|
-
outerRadius: r,
|
|
1881
|
-
textureSpace: vn(e),
|
|
1882
|
-
colorStops: yn(e)
|
|
1883
|
-
});
|
|
1884
|
-
}
|
|
1885
|
-
//#endregion
|
|
1886
|
-
//#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/graphics/shared/svg/utils/extractSvgUrlId.mjs
|
|
1887
|
-
function Sn(e) {
|
|
1888
|
-
let t = e.match(/url\s*\(\s*['"]?\s*#([^'"\s)]+)\s*['"]?\s*\)/i);
|
|
1889
|
-
return t ? t[1] : "";
|
|
1890
|
-
}
|
|
1891
|
-
//#endregion
|
|
1892
|
-
//#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/graphics/shared/svg/parseSVGStyle.mjs
|
|
1893
|
-
var Cn = {
|
|
1894
|
-
fill: {
|
|
1895
|
-
type: "paint",
|
|
1896
|
-
default: 0
|
|
1897
|
-
},
|
|
1898
|
-
"fill-opacity": {
|
|
1899
|
-
type: "number",
|
|
1900
|
-
default: 1
|
|
1901
|
-
},
|
|
1902
|
-
stroke: {
|
|
1903
|
-
type: "paint",
|
|
1904
|
-
default: 0
|
|
1905
|
-
},
|
|
1906
|
-
"stroke-width": {
|
|
1907
|
-
type: "number",
|
|
1908
|
-
default: 1
|
|
1909
|
-
},
|
|
1910
|
-
"stroke-opacity": {
|
|
1911
|
-
type: "number",
|
|
1912
|
-
default: 1
|
|
1913
|
-
},
|
|
1914
|
-
"stroke-linecap": {
|
|
1915
|
-
type: "string",
|
|
1916
|
-
default: "butt"
|
|
1917
|
-
},
|
|
1918
|
-
"stroke-linejoin": {
|
|
1919
|
-
type: "string",
|
|
1920
|
-
default: "miter"
|
|
1921
|
-
},
|
|
1922
|
-
"stroke-miterlimit": {
|
|
1923
|
-
type: "number",
|
|
1924
|
-
default: 10
|
|
1925
|
-
},
|
|
1926
|
-
"stroke-dasharray": {
|
|
1927
|
-
type: "string",
|
|
1928
|
-
default: "none"
|
|
1929
|
-
},
|
|
1930
|
-
"stroke-dashoffset": {
|
|
1931
|
-
type: "number",
|
|
1932
|
-
default: 0
|
|
1933
|
-
},
|
|
1934
|
-
opacity: {
|
|
1935
|
-
type: "number",
|
|
1936
|
-
default: 1
|
|
1937
|
-
}
|
|
1938
|
-
};
|
|
1939
|
-
function wn(e, t) {
|
|
1940
|
-
let n = e.getAttribute("style"), r = {}, i = {}, a = {
|
|
1941
|
-
strokeStyle: r,
|
|
1942
|
-
fillStyle: i,
|
|
1943
|
-
useFill: !1,
|
|
1944
|
-
useStroke: !1
|
|
1945
|
-
};
|
|
1946
|
-
for (let n in Cn) {
|
|
1947
|
-
let r = e.getAttribute(n);
|
|
1948
|
-
r && Tn(t, a, n, r.trim());
|
|
1949
|
-
}
|
|
1950
|
-
if (n) {
|
|
1951
|
-
let e = n.split(";");
|
|
1952
|
-
for (let n = 0; n < e.length; n++) {
|
|
1953
|
-
let [r, i] = e[n].trim().split(":");
|
|
1954
|
-
Cn[r] && Tn(t, a, r, i.trim());
|
|
1955
|
-
}
|
|
1956
|
-
}
|
|
1957
|
-
return {
|
|
1958
|
-
strokeStyle: a.useStroke ? r : null,
|
|
1959
|
-
fillStyle: a.useFill ? i : null,
|
|
1960
|
-
useFill: a.useFill,
|
|
1961
|
-
useStroke: a.useStroke
|
|
1962
|
-
};
|
|
1963
|
-
}
|
|
1964
|
-
function Tn(e, t, n, r) {
|
|
1965
|
-
switch (n) {
|
|
1966
|
-
case "stroke":
|
|
1967
|
-
if (r !== "none") {
|
|
1968
|
-
if (r.startsWith("url(")) {
|
|
1969
|
-
let n = Sn(r);
|
|
1970
|
-
t.strokeStyle.fill = e.defs[n];
|
|
1971
|
-
} else t.strokeStyle.color = T.shared.setValue(r).toNumber();
|
|
1972
|
-
t.useStroke = !0;
|
|
1973
|
-
}
|
|
1974
|
-
break;
|
|
1975
|
-
case "stroke-width":
|
|
1976
|
-
t.strokeStyle.width = Number(r);
|
|
1977
|
-
break;
|
|
1978
|
-
case "fill":
|
|
1979
|
-
if (r !== "none") {
|
|
1980
|
-
if (r.startsWith("url(")) {
|
|
1981
|
-
let n = Sn(r);
|
|
1982
|
-
t.fillStyle.fill = e.defs[n];
|
|
1983
|
-
} else t.fillStyle.color = T.shared.setValue(r).toNumber();
|
|
1984
|
-
t.useFill = !0;
|
|
1985
|
-
}
|
|
1986
|
-
break;
|
|
1987
|
-
case "fill-opacity":
|
|
1988
|
-
t.fillStyle.alpha = Number(r);
|
|
1989
|
-
break;
|
|
1990
|
-
case "stroke-opacity":
|
|
1991
|
-
t.strokeStyle.alpha = Number(r);
|
|
1992
|
-
break;
|
|
1993
|
-
case "opacity":
|
|
1994
|
-
t.fillStyle.alpha = Number(r), t.strokeStyle.alpha = Number(r);
|
|
1995
|
-
break;
|
|
1996
|
-
}
|
|
1997
|
-
}
|
|
1998
|
-
//#endregion
|
|
1999
|
-
//#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/graphics/shared/svg/utils/fillOperations.mjs
|
|
2000
|
-
function En(e) {
|
|
2001
|
-
if (e.length <= 2) return !0;
|
|
2002
|
-
let t = e.map((e) => e.area).sort((e, t) => t - e), [n, r] = t, i = t[t.length - 1], a = n / r, o = r / i;
|
|
2003
|
-
return !(a > 3 && o < 2);
|
|
2004
|
-
}
|
|
2005
|
-
//#endregion
|
|
2006
|
-
//#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/graphics/shared/svg/utils/pathOperations.mjs
|
|
2007
|
-
function Dn(e) {
|
|
2008
|
-
return e.split(/(?=[Mm])/).filter((e) => e.trim().length > 0);
|
|
2009
|
-
}
|
|
2010
|
-
function On(e) {
|
|
2011
|
-
let t = e.match(/[-+]?[0-9]*\.?[0-9]+/g);
|
|
2012
|
-
if (!t || t.length < 4) return 0;
|
|
2013
|
-
let n = t.map(Number), r = [], i = [];
|
|
2014
|
-
for (let e = 0; e < n.length; e += 2) e + 1 < n.length && (r.push(n[e]), i.push(n[e + 1]));
|
|
2015
|
-
if (r.length === 0 || i.length === 0) return 0;
|
|
2016
|
-
let a = Math.min(...r), o = Math.max(...r), s = Math.min(...i), c = Math.max(...i);
|
|
2017
|
-
return (o - a) * (c - s);
|
|
2018
|
-
}
|
|
2019
|
-
function kn(e, t) {
|
|
2020
|
-
let n = new X(e, !1);
|
|
2021
|
-
for (let e of n.instructions) t.instructions.push(e);
|
|
2022
|
-
}
|
|
2023
|
-
//#endregion
|
|
2024
|
-
//#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/graphics/shared/svg/SVGParser.mjs
|
|
2025
|
-
function An(e, t) {
|
|
2026
|
-
if (typeof e == "string") {
|
|
2027
|
-
let t = document.createElement("div");
|
|
2028
|
-
t.innerHTML = e.trim(), e = t.querySelector("svg");
|
|
2029
|
-
}
|
|
2030
|
-
let n = {
|
|
2031
|
-
context: t,
|
|
2032
|
-
defs: {},
|
|
2033
|
-
path: new X()
|
|
2034
|
-
};
|
|
2035
|
-
_n(e, n);
|
|
2036
|
-
let r = e.children, { fillStyle: i, strokeStyle: a } = wn(e, n);
|
|
2037
|
-
for (let e = 0; e < r.length; e++) {
|
|
2038
|
-
let t = r[e];
|
|
2039
|
-
t.nodeName.toLowerCase() !== "defs" && jn(t, n, i, a);
|
|
2040
|
-
}
|
|
2041
|
-
return t;
|
|
2042
|
-
}
|
|
2043
|
-
function jn(e, t, n, r) {
|
|
2044
|
-
let i = e.children, { fillStyle: a, strokeStyle: o } = wn(e, t);
|
|
2045
|
-
a && n ? n = {
|
|
2046
|
-
...n,
|
|
2047
|
-
...a
|
|
2048
|
-
} : a && (n = a), o && r ? r = {
|
|
2049
|
-
...r,
|
|
2050
|
-
...o
|
|
2051
|
-
} : o && (r = o);
|
|
2052
|
-
let s = !n && !r;
|
|
2053
|
-
s && (n = { color: 0 });
|
|
2054
|
-
let c, l, d, f, p, m, h, g, _, v, y, b, x, S, C, w, T;
|
|
2055
|
-
switch (e.nodeName.toLowerCase()) {
|
|
2056
|
-
case "path": {
|
|
2057
|
-
S = e.getAttribute("d");
|
|
2058
|
-
let i = e.getAttribute("fill-rule"), a = Dn(S), o = i === "evenodd", s = a.length > 1;
|
|
2059
|
-
if (o && s) {
|
|
2060
|
-
let e = a.map((e) => ({
|
|
2061
|
-
path: e,
|
|
2062
|
-
area: On(e)
|
|
2063
|
-
}));
|
|
2064
|
-
if (e.sort((e, t) => t.area - e.area), a.length > 3 || !En(e)) for (let i = 0; i < e.length; i++) {
|
|
2065
|
-
let a = e[i], o = i === 0;
|
|
2066
|
-
t.context.beginPath();
|
|
2067
|
-
let s = new X(void 0, !0);
|
|
2068
|
-
kn(a.path, s), t.context.path(s), o ? (n && t.context.fill(n), r && t.context.stroke(r)) : t.context.cut();
|
|
2069
|
-
}
|
|
2070
|
-
else for (let i = 0; i < e.length; i++) {
|
|
2071
|
-
let a = e[i], o = i % 2 == 1;
|
|
2072
|
-
t.context.beginPath();
|
|
2073
|
-
let s = new X(void 0, !0);
|
|
2074
|
-
kn(a.path, s), t.context.path(s), o ? t.context.cut() : (n && t.context.fill(n), r && t.context.stroke(r));
|
|
2075
|
-
}
|
|
2076
|
-
} else C = new X(S, !i || i === "evenodd"), t.context.path(C), n && t.context.fill(n), r && t.context.stroke(r);
|
|
2077
|
-
break;
|
|
2078
|
-
}
|
|
2079
|
-
case "circle":
|
|
2080
|
-
h = Z(e, "cx", 0), g = Z(e, "cy", 0), _ = Z(e, "r", 0), t.context.ellipse(h, g, _, _), n && t.context.fill(n), r && t.context.stroke(r);
|
|
2081
|
-
break;
|
|
2082
|
-
case "rect":
|
|
2083
|
-
c = Z(e, "x", 0), l = Z(e, "y", 0), w = Z(e, "width", 0), T = Z(e, "height", 0), v = Z(e, "rx", 0), y = Z(e, "ry", 0), v || y ? t.context.roundRect(c, l, w, T, v || y) : t.context.rect(c, l, w, T), n && t.context.fill(n), r && t.context.stroke(r);
|
|
2084
|
-
break;
|
|
2085
|
-
case "ellipse":
|
|
2086
|
-
h = Z(e, "cx", 0), g = Z(e, "cy", 0), v = Z(e, "rx", 0), y = Z(e, "ry", 0), t.context.beginPath(), t.context.ellipse(h, g, v, y), n && t.context.fill(n), r && t.context.stroke(r);
|
|
2087
|
-
break;
|
|
2088
|
-
case "line":
|
|
2089
|
-
d = Z(e, "x1", 0), f = Z(e, "y1", 0), p = Z(e, "x2", 0), m = Z(e, "y2", 0), t.context.beginPath(), t.context.moveTo(d, f), t.context.lineTo(p, m), r && t.context.stroke(r);
|
|
2090
|
-
break;
|
|
2091
|
-
case "polygon":
|
|
2092
|
-
x = e.getAttribute("points"), b = x.match(/-?\d+/g).map((e) => parseInt(e, 10)), t.context.poly(b, !0), n && t.context.fill(n), r && t.context.stroke(r);
|
|
2093
|
-
break;
|
|
2094
|
-
case "polyline":
|
|
2095
|
-
x = e.getAttribute("points"), b = x.match(/-?\d+/g).map((e) => parseInt(e, 10)), t.context.poly(b, !1), r && t.context.stroke(r);
|
|
2096
|
-
break;
|
|
2097
|
-
case "g":
|
|
2098
|
-
case "svg": break;
|
|
2099
|
-
default:
|
|
2100
|
-
u(`[SVG parser] <${e.nodeName}> elements unsupported`);
|
|
2101
|
-
break;
|
|
2102
|
-
}
|
|
2103
|
-
s && (n = null);
|
|
2104
|
-
for (let e = 0; e < i.length; e++) jn(i[e], t, n, r);
|
|
2105
|
-
}
|
|
2106
|
-
//#endregion
|
|
2107
|
-
//#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/graphics/shared/fill/FillPattern.mjs
|
|
2108
|
-
function Mn(e) {
|
|
2109
|
-
return e.texture !== void 0;
|
|
2110
|
-
}
|
|
2111
|
-
var Nn = {
|
|
2112
|
-
repeat: {
|
|
2113
|
-
addressModeU: "repeat",
|
|
2114
|
-
addressModeV: "repeat"
|
|
2115
|
-
},
|
|
2116
|
-
"repeat-x": {
|
|
2117
|
-
addressModeU: "repeat",
|
|
2118
|
-
addressModeV: "clamp-to-edge"
|
|
2119
|
-
},
|
|
2120
|
-
"repeat-y": {
|
|
2121
|
-
addressModeU: "clamp-to-edge",
|
|
2122
|
-
addressModeV: "repeat"
|
|
2123
|
-
},
|
|
2124
|
-
"no-repeat": {
|
|
2125
|
-
addressModeU: "clamp-to-edge",
|
|
2126
|
-
addressModeV: "clamp-to-edge"
|
|
2127
|
-
}
|
|
2128
|
-
}, Pn = class {
|
|
2129
|
-
constructor(e, t) {
|
|
2130
|
-
this.uid = h("fillPattern"), this._tick = 0, this.transform = new _();
|
|
2131
|
-
let n = Mn(e) ? e : {
|
|
2132
|
-
texture: e,
|
|
2133
|
-
repetition: t
|
|
2134
|
-
};
|
|
2135
|
-
this.texture = n.texture, this.textureSpace = n.textureSpace ?? "global";
|
|
2136
|
-
let r = n.repetition;
|
|
2137
|
-
r && (this.texture.source.style.addressModeU = Nn[r].addressModeU, this.texture.source.style.addressModeV = Nn[r].addressModeV);
|
|
2138
|
-
}
|
|
2139
|
-
setTransform(e) {
|
|
2140
|
-
if (e) {
|
|
2141
|
-
if (this.transform.equals(e)) return;
|
|
2142
|
-
this.transform.copyFrom(e);
|
|
2143
|
-
} else {
|
|
2144
|
-
if (this.transform.isIdentity()) return;
|
|
2145
|
-
this.transform.identity();
|
|
2146
|
-
}
|
|
2147
|
-
this._tick++;
|
|
2148
|
-
}
|
|
2149
|
-
get texture() {
|
|
2150
|
-
return this._texture;
|
|
2151
|
-
}
|
|
2152
|
-
set texture(e) {
|
|
2153
|
-
this._texture !== e && (this._texture = e, this._tick++);
|
|
2154
|
-
}
|
|
2155
|
-
get styleKey() {
|
|
2156
|
-
return `fill-pattern-${this.uid}-${this._tick}`;
|
|
2157
|
-
}
|
|
2158
|
-
destroy() {
|
|
2159
|
-
this.texture.destroy(!0), this.texture = null;
|
|
2160
|
-
}
|
|
2161
|
-
};
|
|
2162
|
-
//#endregion
|
|
2163
|
-
//#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/graphics/shared/utils/convertFillInputToFillStyle.mjs
|
|
2164
|
-
function Fn(e) {
|
|
2165
|
-
return T.isColorLike(e);
|
|
2166
|
-
}
|
|
2167
|
-
function In(e) {
|
|
2168
|
-
return e instanceof Pn;
|
|
2169
|
-
}
|
|
2170
|
-
function Ln(e) {
|
|
2171
|
-
return e instanceof J;
|
|
2172
|
-
}
|
|
2173
|
-
function Rn(e) {
|
|
2174
|
-
return e instanceof f;
|
|
2175
|
-
}
|
|
2176
|
-
function zn(e, t, n) {
|
|
2177
|
-
let r = T.shared.setValue(t ?? 0);
|
|
2178
|
-
return e.color = r.toNumber(), e.alpha = r.alpha === 1 ? n.alpha : r.alpha, e.texture = f.WHITE, {
|
|
2179
|
-
...n,
|
|
2180
|
-
...e
|
|
2181
|
-
};
|
|
2182
|
-
}
|
|
2183
|
-
function Bn(e, t, n) {
|
|
2184
|
-
return e.texture = t, {
|
|
2185
|
-
...n,
|
|
2186
|
-
...e
|
|
2187
|
-
};
|
|
2188
|
-
}
|
|
2189
|
-
function Vn(e, t, n) {
|
|
2190
|
-
return e.fill = t, e.color = 16777215, e.texture = t.texture, e.matrix = t.transform, e.textureSpace = t.textureSpace, {
|
|
2191
|
-
...n,
|
|
2192
|
-
...e
|
|
2193
|
-
};
|
|
2194
|
-
}
|
|
2195
|
-
function Hn(e, t, n) {
|
|
2196
|
-
return t.buildGradient(), e.fill = t, e.color = 16777215, e.texture = t.texture, e.matrix = t.transform, e.textureSpace = t.textureSpace, {
|
|
2197
|
-
...n,
|
|
2198
|
-
...e
|
|
2199
|
-
};
|
|
2200
|
-
}
|
|
2201
|
-
function Un(e, t) {
|
|
2202
|
-
let n = {
|
|
2203
|
-
...t,
|
|
2204
|
-
...e
|
|
2205
|
-
}, r = T.shared.setValue(n.color);
|
|
2206
|
-
return n.alpha *= r.alpha, n.color = r.toNumber(), n;
|
|
2207
|
-
}
|
|
2208
|
-
function Wn(e, t) {
|
|
2209
|
-
if (e == null) return null;
|
|
2210
|
-
let n = {}, r = e;
|
|
2211
|
-
return Fn(e) ? zn(n, e, t) : Rn(e) ? Bn(n, e, t) : In(e) ? Vn(n, e, t) : Ln(e) ? Hn(n, e, t) : r.fill && In(r.fill) ? Vn(r, r.fill, t) : r.fill && Ln(r.fill) ? Hn(r, r.fill, t) : Un(r, t);
|
|
2212
|
-
}
|
|
2213
|
-
function Gn(e, t) {
|
|
2214
|
-
let { width: n, alignment: r, miterLimit: i, cap: a, join: o, pixelLine: s, ...c } = t, l = Wn(e, c);
|
|
2215
|
-
return l ? {
|
|
2216
|
-
width: n,
|
|
2217
|
-
alignment: r,
|
|
2218
|
-
miterLimit: i,
|
|
2219
|
-
cap: a,
|
|
2220
|
-
join: o,
|
|
2221
|
-
pixelLine: s,
|
|
2222
|
-
...l
|
|
2223
|
-
} : null;
|
|
2224
|
-
}
|
|
2225
|
-
//#endregion
|
|
2226
|
-
//#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/graphics/shared/utils/getMaxMiterRatio.mjs
|
|
2227
|
-
function Kn(e, t) {
|
|
2228
|
-
let n = 1, r = e.shapePath.shapePrimitives;
|
|
2229
|
-
for (let e = 0; e < r.length; e++) {
|
|
2230
|
-
let i = r[e].shape;
|
|
2231
|
-
if (i.type !== "polygon") continue;
|
|
2232
|
-
let a = i.points, o = a.length;
|
|
2233
|
-
if (o < 6) continue;
|
|
2234
|
-
let s = i.closePath;
|
|
2235
|
-
for (let e = 0; e < o; e += 2) {
|
|
2236
|
-
if (!s && (e === 0 || e === o - 2)) continue;
|
|
2237
|
-
let r = (e - 2 + o) % o, i = (e + 2) % o, c = a[r], l = a[r + 1], u = a[e], d = a[e + 1], f = a[i], p = a[i + 1], m = c - u, h = l - d, g = f - u, _ = p - d, v = m * m + h * h, y = g * g + _ * _;
|
|
2238
|
-
if (v < 1e-12 || y < 1e-12) continue;
|
|
2239
|
-
let b = (m * g + h * _) / Math.sqrt(v * y);
|
|
2240
|
-
b < -1 ? b = -1 : b > 1 && (b = 1);
|
|
2241
|
-
let x = Math.sqrt((1 - b) * .5);
|
|
2242
|
-
if (x < 1e-6) continue;
|
|
2243
|
-
let S = Math.min(1 / x, t);
|
|
2244
|
-
S > n && (n = S);
|
|
2245
|
-
}
|
|
2246
|
-
}
|
|
2247
|
-
return n;
|
|
2248
|
-
}
|
|
2249
|
-
//#endregion
|
|
2250
|
-
//#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/graphics/shared/GraphicsContext.mjs
|
|
2251
|
-
var qn = new C(), Jn = new _(), Yn = class e extends b {
|
|
2252
|
-
constructor() {
|
|
2253
|
-
super(...arguments), this._gpuData = /* @__PURE__ */ Object.create(null), this.autoGarbageCollect = !0, this._gcLastUsed = -1, this.uid = h("graphicsContext"), this.dirty = !0, this.batchMode = "auto", this.instructions = [], this.destroyed = !1, this._activePath = new X(), this._transform = new _(), this._fillStyle = { ...e.defaultFillStyle }, this._strokeStyle = { ...e.defaultStrokeStyle }, this._stateStack = [], this._tick = 0, this._bounds = new r(), this._boundsDirty = !0;
|
|
2254
|
-
}
|
|
2255
|
-
clone() {
|
|
2256
|
-
let t = new e();
|
|
2257
|
-
return t.batchMode = this.batchMode, t.instructions = this.instructions.slice(), t._activePath = this._activePath.clone(), t._transform = this._transform.clone(), t._fillStyle = { ...this._fillStyle }, t._strokeStyle = { ...this._strokeStyle }, t._stateStack = this._stateStack.slice(), t._bounds = this._bounds.clone(), t._boundsDirty = !0, t;
|
|
2258
|
-
}
|
|
2259
|
-
get fillStyle() {
|
|
2260
|
-
return this._fillStyle;
|
|
2261
|
-
}
|
|
2262
|
-
set fillStyle(t) {
|
|
2263
|
-
this._fillStyle = Wn(t, e.defaultFillStyle);
|
|
2264
|
-
}
|
|
2265
|
-
get strokeStyle() {
|
|
2266
|
-
return this._strokeStyle;
|
|
2267
|
-
}
|
|
2268
|
-
set strokeStyle(t) {
|
|
2269
|
-
this._strokeStyle = Gn(t, e.defaultStrokeStyle);
|
|
2270
|
-
}
|
|
2271
|
-
setFillStyle(t) {
|
|
2272
|
-
return this._fillStyle = Wn(t, e.defaultFillStyle), this;
|
|
2273
|
-
}
|
|
2274
|
-
setStrokeStyle(t) {
|
|
2275
|
-
return this._strokeStyle = Wn(t, e.defaultStrokeStyle), this;
|
|
2276
|
-
}
|
|
2277
|
-
texture(e, t, n, r, i, a) {
|
|
2278
|
-
return this.instructions.push({
|
|
2279
|
-
action: "texture",
|
|
2280
|
-
data: {
|
|
2281
|
-
image: e,
|
|
2282
|
-
dx: n || 0,
|
|
2283
|
-
dy: r || 0,
|
|
2284
|
-
dw: i || e.frame.width,
|
|
2285
|
-
dh: a || e.frame.height,
|
|
2286
|
-
transform: this._transform.clone(),
|
|
2287
|
-
alpha: this._fillStyle.alpha,
|
|
2288
|
-
style: t || t === 0 ? T.shared.setValue(t).toNumber() : 16777215
|
|
2289
|
-
}
|
|
2290
|
-
}), this.onUpdate(), this;
|
|
2291
|
-
}
|
|
2292
|
-
beginPath() {
|
|
2293
|
-
return this._activePath = new X(), this;
|
|
2294
|
-
}
|
|
2295
|
-
fill(t, n) {
|
|
2296
|
-
let r, i = this.instructions[this.instructions.length - 1];
|
|
2297
|
-
return r = this._tick === 0 && i?.action === "stroke" ? i.data.path : this._activePath.clone(), r ? (t != null && (n !== void 0 && typeof t == "number" && (o(m, "GraphicsContext.fill(color, alpha) is deprecated, use GraphicsContext.fill({ color, alpha }) instead"), t = {
|
|
2298
|
-
color: t,
|
|
2299
|
-
alpha: n
|
|
2300
|
-
}), this._fillStyle = Wn(t, e.defaultFillStyle)), this.instructions.push({
|
|
2301
|
-
action: "fill",
|
|
2302
|
-
data: {
|
|
2303
|
-
style: this.fillStyle,
|
|
2304
|
-
path: r
|
|
2305
|
-
}
|
|
2306
|
-
}), this.onUpdate(), this._initNextPathLocation(), this._tick = 0, this) : this;
|
|
2307
|
-
}
|
|
2308
|
-
_initNextPathLocation() {
|
|
2309
|
-
let { x: e, y: t } = this._activePath.getLastPoint(C.shared);
|
|
2310
|
-
this._activePath.clear(), this._activePath.moveTo(e, t);
|
|
2311
|
-
}
|
|
2312
|
-
stroke(t) {
|
|
2313
|
-
let n, r = this.instructions[this.instructions.length - 1];
|
|
2314
|
-
return n = this._tick === 0 && r?.action === "fill" ? r.data.path : this._activePath.clone(), n ? (t != null && (this._strokeStyle = Gn(t, e.defaultStrokeStyle)), this.instructions.push({
|
|
2315
|
-
action: "stroke",
|
|
2316
|
-
data: {
|
|
2317
|
-
style: this.strokeStyle,
|
|
2318
|
-
path: n
|
|
2319
|
-
}
|
|
2320
|
-
}), this.onUpdate(), this._initNextPathLocation(), this._tick = 0, this) : this;
|
|
2321
|
-
}
|
|
2322
|
-
cut() {
|
|
2323
|
-
for (let e = 0; e < 2; e++) {
|
|
2324
|
-
let t = this.instructions[this.instructions.length - 1 - e], n = this._activePath.clone();
|
|
2325
|
-
if (t && (t.action === "stroke" || t.action === "fill")) if (t.data.hole) t.data.hole.addPath(n);
|
|
2326
|
-
else {
|
|
2327
|
-
t.data.hole = n;
|
|
2328
|
-
break;
|
|
2329
|
-
}
|
|
2330
|
-
}
|
|
2331
|
-
return this._initNextPathLocation(), this;
|
|
2332
|
-
}
|
|
2333
|
-
arc(e, t, n, r, i, a) {
|
|
2334
|
-
this._tick++;
|
|
2335
|
-
let o = this._transform;
|
|
2336
|
-
return this._activePath.arc(o.a * e + o.c * t + o.tx, o.b * e + o.d * t + o.ty, n, r, i, a), this;
|
|
2337
|
-
}
|
|
2338
|
-
arcTo(e, t, n, r, i) {
|
|
2339
|
-
this._tick++;
|
|
2340
|
-
let a = this._transform;
|
|
2341
|
-
return this._activePath.arcTo(a.a * e + a.c * t + a.tx, a.b * e + a.d * t + a.ty, a.a * n + a.c * r + a.tx, a.b * n + a.d * r + a.ty, i), this;
|
|
2342
|
-
}
|
|
2343
|
-
arcToSvg(e, t, n, r, i, a, o) {
|
|
2344
|
-
this._tick++;
|
|
2345
|
-
let s = this._transform;
|
|
2346
|
-
return this._activePath.arcToSvg(e, t, n, r, i, s.a * a + s.c * o + s.tx, s.b * a + s.d * o + s.ty), this;
|
|
2347
|
-
}
|
|
2348
|
-
bezierCurveTo(e, t, n, r, i, a, o) {
|
|
2349
|
-
this._tick++;
|
|
2350
|
-
let s = this._transform;
|
|
2351
|
-
return this._activePath.bezierCurveTo(s.a * e + s.c * t + s.tx, s.b * e + s.d * t + s.ty, s.a * n + s.c * r + s.tx, s.b * n + s.d * r + s.ty, s.a * i + s.c * a + s.tx, s.b * i + s.d * a + s.ty, o), this;
|
|
2352
|
-
}
|
|
2353
|
-
closePath() {
|
|
2354
|
-
return this._tick++, this._activePath?.closePath(), this;
|
|
2355
|
-
}
|
|
2356
|
-
ellipse(e, t, n, r) {
|
|
2357
|
-
return this._tick++, this._activePath.ellipse(e, t, n, r, this._transform.clone()), this;
|
|
2358
|
-
}
|
|
2359
|
-
circle(e, t, n) {
|
|
2360
|
-
return this._tick++, this._activePath.circle(e, t, n, this._transform.clone()), this;
|
|
2361
|
-
}
|
|
2362
|
-
path(e) {
|
|
2363
|
-
return this._tick++, this._activePath.addPath(e, this._transform.clone()), this;
|
|
2364
|
-
}
|
|
2365
|
-
lineTo(e, t) {
|
|
2366
|
-
this._tick++;
|
|
2367
|
-
let n = this._transform;
|
|
2368
|
-
return this._activePath.lineTo(n.a * e + n.c * t + n.tx, n.b * e + n.d * t + n.ty), this;
|
|
2369
|
-
}
|
|
2370
|
-
moveTo(e, t) {
|
|
2371
|
-
this._tick++;
|
|
2372
|
-
let n = this._transform, r = this._activePath.instructions, i = n.a * e + n.c * t + n.tx, a = n.b * e + n.d * t + n.ty;
|
|
2373
|
-
return r.length === 1 && r[0].action === "moveTo" ? (r[0].data[0] = i, r[0].data[1] = a, this) : (this._activePath.moveTo(i, a), this);
|
|
2374
|
-
}
|
|
2375
|
-
quadraticCurveTo(e, t, n, r, i) {
|
|
2376
|
-
this._tick++;
|
|
2377
|
-
let a = this._transform;
|
|
2378
|
-
return this._activePath.quadraticCurveTo(a.a * e + a.c * t + a.tx, a.b * e + a.d * t + a.ty, a.a * n + a.c * r + a.tx, a.b * n + a.d * r + a.ty, i), this;
|
|
2379
|
-
}
|
|
2380
|
-
rect(e, t, n, r) {
|
|
2381
|
-
return this._tick++, this._activePath.rect(e, t, n, r, this._transform.clone()), this;
|
|
2382
|
-
}
|
|
2383
|
-
roundRect(e, t, n, r, i) {
|
|
2384
|
-
return this._tick++, this._activePath.roundRect(e, t, n, r, i, this._transform.clone()), this;
|
|
2385
|
-
}
|
|
2386
|
-
poly(e, t) {
|
|
2387
|
-
return this._tick++, this._activePath.poly(e, t, this._transform.clone()), this;
|
|
2388
|
-
}
|
|
2389
|
-
regularPoly(e, t, n, r, i = 0, a) {
|
|
2390
|
-
return this._tick++, this._activePath.regularPoly(e, t, n, r, i, a), this;
|
|
2391
|
-
}
|
|
2392
|
-
roundPoly(e, t, n, r, i, a) {
|
|
2393
|
-
return this._tick++, this._activePath.roundPoly(e, t, n, r, i, a), this;
|
|
2394
|
-
}
|
|
2395
|
-
roundShape(e, t, n, r) {
|
|
2396
|
-
return this._tick++, this._activePath.roundShape(e, t, n, r), this;
|
|
2397
|
-
}
|
|
2398
|
-
filletRect(e, t, n, r, i) {
|
|
2399
|
-
return this._tick++, this._activePath.filletRect(e, t, n, r, i), this;
|
|
2400
|
-
}
|
|
2401
|
-
chamferRect(e, t, n, r, i, a) {
|
|
2402
|
-
return this._tick++, this._activePath.chamferRect(e, t, n, r, i, a), this;
|
|
2403
|
-
}
|
|
2404
|
-
star(e, t, n, r, i = 0, a = 0) {
|
|
2405
|
-
return this._tick++, this._activePath.star(e, t, n, r, i, a, this._transform.clone()), this;
|
|
2406
|
-
}
|
|
2407
|
-
svg(e) {
|
|
2408
|
-
return this._tick++, An(e, this), this;
|
|
2409
|
-
}
|
|
2410
|
-
restore() {
|
|
2411
|
-
let e = this._stateStack.pop();
|
|
2412
|
-
return e && (this._transform = e.transform, this._fillStyle = e.fillStyle, this._strokeStyle = e.strokeStyle), this;
|
|
2413
|
-
}
|
|
2414
|
-
save() {
|
|
2415
|
-
return this._stateStack.push({
|
|
2416
|
-
transform: this._transform.clone(),
|
|
2417
|
-
fillStyle: { ...this._fillStyle },
|
|
2418
|
-
strokeStyle: { ...this._strokeStyle }
|
|
2419
|
-
}), this;
|
|
2420
|
-
}
|
|
2421
|
-
getTransform() {
|
|
2422
|
-
return this._transform;
|
|
2423
|
-
}
|
|
2424
|
-
resetTransform() {
|
|
2425
|
-
return this._transform.identity(), this;
|
|
2426
|
-
}
|
|
2427
|
-
rotate(e) {
|
|
2428
|
-
return this._transform.rotate(e), this;
|
|
2429
|
-
}
|
|
2430
|
-
scale(e, t = e) {
|
|
2431
|
-
return this._transform.scale(e, t), this;
|
|
2432
|
-
}
|
|
2433
|
-
setTransform(e, t, n, r, i, a) {
|
|
2434
|
-
return e instanceof _ ? (this._transform.set(e.a, e.b, e.c, e.d, e.tx, e.ty), this) : (this._transform.set(e, t, n, r, i, a), this);
|
|
2435
|
-
}
|
|
2436
|
-
transform(e, t, n, r, i, a) {
|
|
2437
|
-
return e instanceof _ ? (this._transform.append(e), this) : (Jn.set(e, t, n, r, i, a), this._transform.append(Jn), this);
|
|
2438
|
-
}
|
|
2439
|
-
translate(e, t = e) {
|
|
2440
|
-
return this._transform.translate(e, t), this;
|
|
2441
|
-
}
|
|
2442
|
-
clear() {
|
|
2443
|
-
return this._activePath.clear(), this.instructions.length = 0, this.resetTransform(), this.onUpdate(), this;
|
|
2444
|
-
}
|
|
2445
|
-
onUpdate() {
|
|
2446
|
-
this._boundsDirty = !0, this.dirty = !0, this.emit("update", this, 16);
|
|
2447
|
-
}
|
|
2448
|
-
get bounds() {
|
|
2449
|
-
if (!this._boundsDirty) return this._bounds;
|
|
2450
|
-
this._boundsDirty = !1;
|
|
2451
|
-
let e = this._bounds;
|
|
2452
|
-
e.clear();
|
|
2453
|
-
for (let t = 0; t < this.instructions.length; t++) {
|
|
2454
|
-
let n = this.instructions[t], r = n.action;
|
|
2455
|
-
if (r === "fill") {
|
|
2456
|
-
let t = n.data;
|
|
2457
|
-
e.addBounds(t.path.bounds);
|
|
2458
|
-
} else if (r === "texture") {
|
|
2459
|
-
let t = n.data;
|
|
2460
|
-
e.addFrame(t.dx, t.dy, t.dx + t.dw, t.dy + t.dh, t.transform);
|
|
2461
|
-
}
|
|
2462
|
-
if (r === "stroke") {
|
|
2463
|
-
let t = n.data, r = t.style.alignment, i = t.style.width * (1 - r);
|
|
2464
|
-
t.style.join === "miter" && (i *= Kn(t.path, t.style.miterLimit));
|
|
2465
|
-
let a = t.path.bounds;
|
|
2466
|
-
e.addFrame(a.minX - i, a.minY - i, a.maxX + i, a.maxY + i);
|
|
2467
|
-
}
|
|
2468
|
-
}
|
|
2469
|
-
return e.isValid || e.set(0, 0, 0, 0), e;
|
|
2470
|
-
}
|
|
2471
|
-
containsPoint(e) {
|
|
2472
|
-
if (!this.bounds.containsPoint(e.x, e.y)) return !1;
|
|
2473
|
-
let t = this.instructions, n = !1;
|
|
2474
|
-
for (let r = 0; r < t.length; r++) {
|
|
2475
|
-
let i = t[r], a = i.data, o = a.path;
|
|
2476
|
-
if (!i.action || !o) continue;
|
|
2477
|
-
let s = a.style, c = o.shapePath.shapePrimitives;
|
|
2478
|
-
for (let t = 0; t < c.length; t++) {
|
|
2479
|
-
let r = c[t].shape;
|
|
2480
|
-
if (!s || !r) continue;
|
|
2481
|
-
let o = c[t].transform, l = o ? o.applyInverse(e, qn) : e;
|
|
2482
|
-
if (i.action === "fill") n = r.contains(l.x, l.y);
|
|
2483
|
-
else {
|
|
2484
|
-
let e = s;
|
|
2485
|
-
n = r.strokeContains(l.x, l.y, e.width, e.alignment);
|
|
2486
|
-
}
|
|
2487
|
-
let u = a.hole;
|
|
2488
|
-
if (u) {
|
|
2489
|
-
let e = u.shapePath?.shapePrimitives;
|
|
2490
|
-
if (e) for (let t = 0; t < e.length; t++) e[t].shape.contains(l.x, l.y) && (n = !1);
|
|
2491
|
-
}
|
|
2492
|
-
if (n) return !0;
|
|
2493
|
-
}
|
|
2494
|
-
}
|
|
2495
|
-
return n;
|
|
2496
|
-
}
|
|
2497
|
-
unload() {
|
|
2498
|
-
this.emit("unload", this);
|
|
2499
|
-
for (let e in this._gpuData) this._gpuData[e]?.destroy();
|
|
2500
|
-
this._gpuData = /* @__PURE__ */ Object.create(null);
|
|
2501
|
-
}
|
|
2502
|
-
destroy(e = !1) {
|
|
2503
|
-
if (!this.destroyed) {
|
|
2504
|
-
if (this.destroyed = !0, this._stateStack.length = 0, this._transform = null, this.unload(), this.emit("destroy", this), this.removeAllListeners(), typeof e == "boolean" ? e : e?.texture) {
|
|
2505
|
-
let t = typeof e == "boolean" ? e : e?.textureSource;
|
|
2506
|
-
this._fillStyle.texture && (this._fillStyle.fill && "uid" in this._fillStyle.fill ? this._fillStyle.fill.destroy() : this._fillStyle.texture.destroy(t)), this._strokeStyle.texture && (this._strokeStyle.fill && "uid" in this._strokeStyle.fill ? this._strokeStyle.fill.destroy() : this._strokeStyle.texture.destroy(t));
|
|
2507
|
-
}
|
|
2508
|
-
this._fillStyle = null, this._strokeStyle = null, this.instructions = null, this._activePath = null, this._bounds = null, this._stateStack = null, this.customShader = null, this._transform = null;
|
|
2509
|
-
}
|
|
2510
|
-
}
|
|
2511
|
-
};
|
|
2512
|
-
Yn.defaultFillStyle = {
|
|
2513
|
-
color: 16777215,
|
|
2514
|
-
alpha: 1,
|
|
2515
|
-
texture: f.WHITE,
|
|
2516
|
-
matrix: null,
|
|
2517
|
-
fill: null,
|
|
2518
|
-
textureSpace: "local"
|
|
2519
|
-
}, Yn.defaultStrokeStyle = {
|
|
2520
|
-
width: 1,
|
|
2521
|
-
color: 16777215,
|
|
2522
|
-
alpha: 1,
|
|
2523
|
-
alignment: .5,
|
|
2524
|
-
miterLimit: 10,
|
|
2525
|
-
cap: "butt",
|
|
2526
|
-
join: "miter",
|
|
2527
|
-
texture: f.WHITE,
|
|
2528
|
-
matrix: null,
|
|
2529
|
-
fill: null,
|
|
2530
|
-
textureSpace: "local",
|
|
2531
|
-
pixelLine: !1
|
|
2532
|
-
};
|
|
2533
|
-
var Xn = Yn, Zn = class {
|
|
2534
|
-
constructor() {
|
|
2535
|
-
this.isBatchable = !1;
|
|
2536
|
-
}
|
|
2537
|
-
reset() {
|
|
2538
|
-
this.isBatchable = !1, this.context = null, this.graphicsData &&= (this.graphicsData.destroy(), null);
|
|
2539
|
-
}
|
|
2540
|
-
destroy() {
|
|
2541
|
-
this.reset();
|
|
2542
|
-
}
|
|
2543
|
-
}, Qn = class {
|
|
2544
|
-
constructor() {
|
|
2545
|
-
this.instructions = new i();
|
|
2546
|
-
}
|
|
2547
|
-
init() {
|
|
2548
|
-
this.instructions.reset();
|
|
2549
|
-
}
|
|
2550
|
-
destroy() {
|
|
2551
|
-
this.instructions.destroy(), this.instructions = null;
|
|
2552
|
-
}
|
|
2553
|
-
}, $n = class e {
|
|
2554
|
-
constructor(e) {
|
|
2555
|
-
this._renderer = e, this._managedContexts = new M({
|
|
2556
|
-
renderer: e,
|
|
2557
|
-
type: "resource",
|
|
2558
|
-
name: "graphicsContext"
|
|
2559
|
-
});
|
|
2560
|
-
}
|
|
2561
|
-
init(t) {
|
|
2562
|
-
e.defaultOptions.bezierSmoothness = t?.bezierSmoothness ?? e.defaultOptions.bezierSmoothness;
|
|
2563
|
-
}
|
|
2564
|
-
getContextRenderData(e) {
|
|
2565
|
-
return this.getGpuContext(e).graphicsData || this._initContextRenderData(e);
|
|
2566
|
-
}
|
|
2567
|
-
updateGpuContext(e) {
|
|
2568
|
-
let t = e._gpuData, n = !!t[this._renderer.uid], r = t[this._renderer.uid] || this._initContext(e);
|
|
2569
|
-
return (e.dirty || !n) && (n && r.reset(), r.isBatchable = !1, e.dirty = !1), r;
|
|
2570
|
-
}
|
|
2571
|
-
getGpuContext(e) {
|
|
2572
|
-
return e._gpuData[this._renderer.uid] || this._initContext(e);
|
|
2573
|
-
}
|
|
2574
|
-
_initContextRenderData(e) {
|
|
2575
|
-
let t = new Qn(), n = this.getGpuContext(e);
|
|
2576
|
-
return n.graphicsData = t, t.init(), t;
|
|
2577
|
-
}
|
|
2578
|
-
_initContext(e) {
|
|
2579
|
-
let t = new Zn();
|
|
2580
|
-
return t.context = e, e._gpuData[this._renderer.uid] = t, this._managedContexts.add(e), t;
|
|
2581
|
-
}
|
|
2582
|
-
destroy() {
|
|
2583
|
-
this._managedContexts.destroy(), this._renderer = null;
|
|
2584
|
-
}
|
|
2585
|
-
};
|
|
2586
|
-
$n.extension = {
|
|
2587
|
-
type: [S.CanvasSystem],
|
|
2588
|
-
name: "graphicsContext"
|
|
2589
|
-
}, $n.defaultOptions = { bezierSmoothness: .5 };
|
|
2590
|
-
var er = $n, tr = class {
|
|
2591
|
-
constructor(e, t) {
|
|
2592
|
-
this.state = x.for2d(), this.renderer = e, this._adaptor = t, this.renderer.runners.contextChange.add(this), this._managedGraphics = new M({
|
|
2593
|
-
renderer: e,
|
|
2594
|
-
type: "renderable",
|
|
2595
|
-
priority: -1,
|
|
2596
|
-
name: "graphics"
|
|
2597
|
-
});
|
|
2598
|
-
}
|
|
2599
|
-
contextChange() {
|
|
2600
|
-
this._adaptor.contextChange(this.renderer);
|
|
2601
|
-
}
|
|
2602
|
-
validateRenderable(e) {
|
|
2603
|
-
return !1;
|
|
2604
|
-
}
|
|
2605
|
-
addRenderable(e, t) {
|
|
2606
|
-
this._managedGraphics.add(e), this.renderer.renderPipes.batch.break(t), t.add(e);
|
|
2607
|
-
}
|
|
2608
|
-
updateRenderable(e) {}
|
|
2609
|
-
execute(e) {
|
|
2610
|
-
e.isRenderable && this._adaptor.execute(this, e);
|
|
2611
|
-
}
|
|
2612
|
-
destroy() {
|
|
2613
|
-
this._managedGraphics.destroy(), this.renderer = null, this._adaptor.destroy(), this._adaptor = null;
|
|
2614
|
-
}
|
|
2615
|
-
};
|
|
2616
|
-
tr.extension = {
|
|
2617
|
-
type: [S.CanvasPipes],
|
|
2618
|
-
name: "graphics"
|
|
2619
|
-
};
|
|
2620
|
-
//#endregion
|
|
2621
|
-
//#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/graphics/shared/GraphicsPipe.mjs
|
|
2622
|
-
var nr = class {
|
|
2623
|
-
constructor() {
|
|
2624
|
-
this.batches = [], this.batched = !1;
|
|
2625
|
-
}
|
|
2626
|
-
destroy() {
|
|
2627
|
-
this.batches.forEach((e) => {
|
|
2628
|
-
a.return(e);
|
|
2629
|
-
}), this.batches.length = 0;
|
|
2630
|
-
}
|
|
2631
|
-
}, rr = class {
|
|
2632
|
-
constructor(e, t) {
|
|
2633
|
-
this.state = x.for2d(), this.renderer = e, this._adaptor = t, this.renderer.runners.contextChange.add(this), this._managedGraphics = new M({
|
|
2634
|
-
renderer: e,
|
|
2635
|
-
type: "renderable",
|
|
2636
|
-
priority: -1,
|
|
2637
|
-
name: "graphics"
|
|
2638
|
-
});
|
|
2639
|
-
}
|
|
2640
|
-
contextChange() {
|
|
2641
|
-
this._adaptor.contextChange(this.renderer);
|
|
2642
|
-
}
|
|
2643
|
-
validateRenderable(e) {
|
|
2644
|
-
let t = e.context, n = !!e._gpuData, r = this.renderer.graphicsContext.updateGpuContext(t);
|
|
2645
|
-
return !!(r.isBatchable || n !== r.isBatchable);
|
|
2646
|
-
}
|
|
2647
|
-
addRenderable(e, t) {
|
|
2648
|
-
let n = this.renderer.graphicsContext.updateGpuContext(e.context);
|
|
2649
|
-
e.didViewUpdate && this._rebuild(e), n.isBatchable ? this._addToBatcher(e, t) : (this.renderer.renderPipes.batch.break(t), t.add(e));
|
|
2650
|
-
}
|
|
2651
|
-
updateRenderable(e) {
|
|
2652
|
-
let t = this._getGpuDataForRenderable(e).batches;
|
|
2653
|
-
for (let e = 0; e < t.length; e++) {
|
|
2654
|
-
let n = t[e];
|
|
2655
|
-
n._batcher.updateElement(n);
|
|
2656
|
-
}
|
|
2657
|
-
}
|
|
2658
|
-
execute(e) {
|
|
2659
|
-
if (!e.isRenderable) return;
|
|
2660
|
-
let t = this.renderer, n = e.context;
|
|
2661
|
-
if (!t.graphicsContext.getGpuContext(n).batches.length) return;
|
|
2662
|
-
let r = n.customShader || this._adaptor.shader;
|
|
2663
|
-
this.state.blendMode = e.groupBlendMode;
|
|
2664
|
-
let i = r.resources.localUniforms.uniforms;
|
|
2665
|
-
i.uTransformMatrix = e.groupTransform, i.uRound = t._roundPixels | e._roundPixels, re(e.groupColorAlpha, i.uColor, 0), this._adaptor.execute(this, e);
|
|
2666
|
-
}
|
|
2667
|
-
_rebuild(e) {
|
|
2668
|
-
let t = this._getGpuDataForRenderable(e), n = this.renderer.graphicsContext.updateGpuContext(e.context);
|
|
2669
|
-
t.destroy(), n.isBatchable && this._updateBatchesForRenderable(e, t);
|
|
2670
|
-
}
|
|
2671
|
-
_addToBatcher(e, t) {
|
|
2672
|
-
let n = this.renderer.renderPipes.batch, r = this._getGpuDataForRenderable(e).batches;
|
|
2673
|
-
for (let e = 0; e < r.length; e++) {
|
|
2674
|
-
let i = r[e];
|
|
2675
|
-
n.addToBatch(i, t);
|
|
2676
|
-
}
|
|
2677
|
-
}
|
|
2678
|
-
_getGpuDataForRenderable(e) {
|
|
2679
|
-
return e._gpuData[this.renderer.uid] || this._initGpuDataForRenderable(e);
|
|
2680
|
-
}
|
|
2681
|
-
_initGpuDataForRenderable(e) {
|
|
2682
|
-
let t = new nr();
|
|
2683
|
-
return e._gpuData[this.renderer.uid] = t, this._managedGraphics.add(e), t;
|
|
2684
|
-
}
|
|
2685
|
-
_updateBatchesForRenderable(e, t) {
|
|
2686
|
-
let n = e.context, r = this.renderer.graphicsContext.getGpuContext(n), i = this.renderer._roundPixels | e._roundPixels;
|
|
2687
|
-
t.batches = r.batches.map((t) => {
|
|
2688
|
-
let n = a.get(dt);
|
|
2689
|
-
return t.copyTo(n), n.renderable = e, n.roundPixels = i, n;
|
|
2690
|
-
});
|
|
2691
|
-
}
|
|
2692
|
-
destroy() {
|
|
2693
|
-
this._managedGraphics.destroy(), this.renderer = null, this._adaptor.destroy(), this._adaptor = null, this.state = null;
|
|
2694
|
-
}
|
|
2695
|
-
};
|
|
2696
|
-
rr.extension = {
|
|
2697
|
-
type: [S.WebGLPipes, S.WebGPUPipes],
|
|
2698
|
-
name: "graphics"
|
|
2699
|
-
}, v.add(tr), v.add(rr), v.add(er), v.add(Ut);
|
|
2700
|
-
//#endregion
|
|
2701
|
-
//#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/graphics/shared/Graphics.mjs
|
|
2702
|
-
var ir = class e extends d {
|
|
2703
|
-
constructor(e) {
|
|
2704
|
-
e instanceof Xn && (e = { context: e });
|
|
2705
|
-
let { context: t, roundPixels: n, ...r } = e || {};
|
|
2706
|
-
super({
|
|
2707
|
-
label: "Graphics",
|
|
2708
|
-
...r
|
|
2709
|
-
}), this.renderPipeId = "graphics", t ? this.context = t : (this.context = this._ownedContext = new Xn(), this.context.autoGarbageCollect = this.autoGarbageCollect), this.didViewUpdate = !0, this.allowChildren = !1, this.roundPixels = n ?? !1;
|
|
2710
|
-
}
|
|
2711
|
-
set context(e) {
|
|
2712
|
-
e !== this._context && (this._context && (this._context.off("update", this.onViewUpdate, this), this._context.off("unload", this.unload, this)), this._context = e, this._context.on("update", this.onViewUpdate, this), this._context.on("unload", this.unload, this), this.onViewUpdate());
|
|
2713
|
-
}
|
|
2714
|
-
get context() {
|
|
2715
|
-
return this._context;
|
|
2716
|
-
}
|
|
2717
|
-
get bounds() {
|
|
2718
|
-
return this._context.bounds;
|
|
2719
|
-
}
|
|
2720
|
-
updateBounds() {}
|
|
2721
|
-
containsPoint(e) {
|
|
2722
|
-
return this._context.containsPoint(e);
|
|
2723
|
-
}
|
|
2724
|
-
destroy(e) {
|
|
2725
|
-
this._ownedContext && !e ? this._ownedContext.destroy(e) : (e === !0 || e?.context === !0) && this._context.destroy(e), this._context?.off("update", this.onViewUpdate, this), this._context?.off("unload", this.unload, this), this._ownedContext = null, this._context = null, super.destroy(e);
|
|
2726
|
-
}
|
|
2727
|
-
_onTouch(e) {
|
|
2728
|
-
this._gcLastUsed = e, this._context._gcLastUsed = e;
|
|
2729
|
-
}
|
|
2730
|
-
_callContextMethod(e, t) {
|
|
2731
|
-
return this.context[e](...t), this;
|
|
2732
|
-
}
|
|
2733
|
-
setFillStyle(...e) {
|
|
2734
|
-
return this._callContextMethod("setFillStyle", e);
|
|
2735
|
-
}
|
|
2736
|
-
setStrokeStyle(...e) {
|
|
2737
|
-
return this._callContextMethod("setStrokeStyle", e);
|
|
2738
|
-
}
|
|
2739
|
-
fill(...e) {
|
|
2740
|
-
return this._callContextMethod("fill", e);
|
|
2741
|
-
}
|
|
2742
|
-
stroke(...e) {
|
|
2743
|
-
return this._callContextMethod("stroke", e);
|
|
2744
|
-
}
|
|
2745
|
-
texture(...e) {
|
|
2746
|
-
return this._callContextMethod("texture", e);
|
|
2747
|
-
}
|
|
2748
|
-
beginPath() {
|
|
2749
|
-
return this._callContextMethod("beginPath", []);
|
|
2750
|
-
}
|
|
2751
|
-
cut() {
|
|
2752
|
-
return this._callContextMethod("cut", []);
|
|
2753
|
-
}
|
|
2754
|
-
arc(...e) {
|
|
2755
|
-
return this._callContextMethod("arc", e);
|
|
2756
|
-
}
|
|
2757
|
-
arcTo(...e) {
|
|
2758
|
-
return this._callContextMethod("arcTo", e);
|
|
2759
|
-
}
|
|
2760
|
-
arcToSvg(...e) {
|
|
2761
|
-
return this._callContextMethod("arcToSvg", e);
|
|
2762
|
-
}
|
|
2763
|
-
bezierCurveTo(...e) {
|
|
2764
|
-
return this._callContextMethod("bezierCurveTo", e);
|
|
2765
|
-
}
|
|
2766
|
-
closePath() {
|
|
2767
|
-
return this._callContextMethod("closePath", []);
|
|
2768
|
-
}
|
|
2769
|
-
ellipse(...e) {
|
|
2770
|
-
return this._callContextMethod("ellipse", e);
|
|
2771
|
-
}
|
|
2772
|
-
circle(...e) {
|
|
2773
|
-
return this._callContextMethod("circle", e);
|
|
2774
|
-
}
|
|
2775
|
-
path(...e) {
|
|
2776
|
-
return this._callContextMethod("path", e);
|
|
2777
|
-
}
|
|
2778
|
-
lineTo(...e) {
|
|
2779
|
-
return this._callContextMethod("lineTo", e);
|
|
2780
|
-
}
|
|
2781
|
-
moveTo(...e) {
|
|
2782
|
-
return this._callContextMethod("moveTo", e);
|
|
2783
|
-
}
|
|
2784
|
-
quadraticCurveTo(...e) {
|
|
2785
|
-
return this._callContextMethod("quadraticCurveTo", e);
|
|
2786
|
-
}
|
|
2787
|
-
rect(...e) {
|
|
2788
|
-
return this._callContextMethod("rect", e);
|
|
2789
|
-
}
|
|
2790
|
-
roundRect(...e) {
|
|
2791
|
-
return this._callContextMethod("roundRect", e);
|
|
2792
|
-
}
|
|
2793
|
-
poly(...e) {
|
|
2794
|
-
return this._callContextMethod("poly", e);
|
|
2795
|
-
}
|
|
2796
|
-
regularPoly(...e) {
|
|
2797
|
-
return this._callContextMethod("regularPoly", e);
|
|
2798
|
-
}
|
|
2799
|
-
roundPoly(...e) {
|
|
2800
|
-
return this._callContextMethod("roundPoly", e);
|
|
2801
|
-
}
|
|
2802
|
-
roundShape(...e) {
|
|
2803
|
-
return this._callContextMethod("roundShape", e);
|
|
2804
|
-
}
|
|
2805
|
-
filletRect(...e) {
|
|
2806
|
-
return this._callContextMethod("filletRect", e);
|
|
2807
|
-
}
|
|
2808
|
-
chamferRect(...e) {
|
|
2809
|
-
return this._callContextMethod("chamferRect", e);
|
|
2810
|
-
}
|
|
2811
|
-
star(...e) {
|
|
2812
|
-
return this._callContextMethod("star", e);
|
|
2813
|
-
}
|
|
2814
|
-
svg(...e) {
|
|
2815
|
-
return this._callContextMethod("svg", e);
|
|
2816
|
-
}
|
|
2817
|
-
restore(...e) {
|
|
2818
|
-
return this._callContextMethod("restore", e);
|
|
2819
|
-
}
|
|
2820
|
-
save() {
|
|
2821
|
-
return this._callContextMethod("save", []);
|
|
2822
|
-
}
|
|
2823
|
-
getTransform() {
|
|
2824
|
-
return this.context.getTransform();
|
|
2825
|
-
}
|
|
2826
|
-
resetTransform() {
|
|
2827
|
-
return this._callContextMethod("resetTransform", []);
|
|
2828
|
-
}
|
|
2829
|
-
rotateTransform(...e) {
|
|
2830
|
-
return this._callContextMethod("rotate", e);
|
|
2831
|
-
}
|
|
2832
|
-
scaleTransform(...e) {
|
|
2833
|
-
return this._callContextMethod("scale", e);
|
|
2834
|
-
}
|
|
2835
|
-
setTransform(...e) {
|
|
2836
|
-
return this._callContextMethod("setTransform", e);
|
|
2837
|
-
}
|
|
2838
|
-
transform(...e) {
|
|
2839
|
-
return this._callContextMethod("transform", e);
|
|
2840
|
-
}
|
|
2841
|
-
translateTransform(...e) {
|
|
2842
|
-
return this._callContextMethod("translate", e);
|
|
2843
|
-
}
|
|
2844
|
-
clear() {
|
|
2845
|
-
return this._callContextMethod("clear", []);
|
|
2846
|
-
}
|
|
2847
|
-
get fillStyle() {
|
|
2848
|
-
return this._context.fillStyle;
|
|
2849
|
-
}
|
|
2850
|
-
set fillStyle(e) {
|
|
2851
|
-
this._context.fillStyle = e;
|
|
2852
|
-
}
|
|
2853
|
-
get strokeStyle() {
|
|
2854
|
-
return this._context.strokeStyle;
|
|
2855
|
-
}
|
|
2856
|
-
set strokeStyle(e) {
|
|
2857
|
-
this._context.strokeStyle = e;
|
|
2858
|
-
}
|
|
2859
|
-
clone(t = !1) {
|
|
2860
|
-
return t ? new e(this._context.clone()) : (this._ownedContext = null, new e(this._context));
|
|
2861
|
-
}
|
|
2862
|
-
lineStyle(e, t, n) {
|
|
2863
|
-
o(m, "Graphics#lineStyle is no longer needed. Use Graphics#setStrokeStyle to set the stroke style.");
|
|
2864
|
-
let r = {};
|
|
2865
|
-
return e && (r.width = e), t && (r.color = t), n && (r.alpha = n), this.context.strokeStyle = r, this;
|
|
2866
|
-
}
|
|
2867
|
-
beginFill(e, t) {
|
|
2868
|
-
o(m, "Graphics#beginFill is no longer needed. Use Graphics#fill to fill the shape with the desired style.");
|
|
2869
|
-
let n = {};
|
|
2870
|
-
return e !== void 0 && (n.color = e), t !== void 0 && (n.alpha = t), this.context.fillStyle = n, this;
|
|
2871
|
-
}
|
|
2872
|
-
endFill() {
|
|
2873
|
-
o(m, "Graphics#endFill is no longer needed. Use Graphics#fill to fill the shape with the desired style."), this.context.fill();
|
|
2874
|
-
let e = this.context.strokeStyle;
|
|
2875
|
-
return (e.width !== Xn.defaultStrokeStyle.width || e.color !== Xn.defaultStrokeStyle.color || e.alpha !== Xn.defaultStrokeStyle.alpha) && this.context.stroke(), this;
|
|
2876
|
-
}
|
|
2877
|
-
drawCircle(...e) {
|
|
2878
|
-
return o(m, "Graphics#drawCircle has been renamed to Graphics#circle"), this._callContextMethod("circle", e);
|
|
2879
|
-
}
|
|
2880
|
-
drawEllipse(...e) {
|
|
2881
|
-
return o(m, "Graphics#drawEllipse has been renamed to Graphics#ellipse"), this._callContextMethod("ellipse", e);
|
|
2882
|
-
}
|
|
2883
|
-
drawPolygon(...e) {
|
|
2884
|
-
return o(m, "Graphics#drawPolygon has been renamed to Graphics#poly"), this._callContextMethod("poly", e);
|
|
2885
|
-
}
|
|
2886
|
-
drawRect(...e) {
|
|
2887
|
-
return o(m, "Graphics#drawRect has been renamed to Graphics#rect"), this._callContextMethod("rect", e);
|
|
2888
|
-
}
|
|
2889
|
-
drawRoundedRect(...e) {
|
|
2890
|
-
return o(m, "Graphics#drawRoundedRect has been renamed to Graphics#roundRect"), this._callContextMethod("roundRect", e);
|
|
2891
|
-
}
|
|
2892
|
-
drawStar(...e) {
|
|
2893
|
-
return o(m, "Graphics#drawStar has been renamed to Graphics#star"), this._callContextMethod("star", e);
|
|
2894
|
-
}
|
|
2895
|
-
}, ar = class e {
|
|
2896
|
-
static _getPatternRepeat(e, t) {
|
|
2897
|
-
let n = e && e !== "clamp-to-edge", r = t && t !== "clamp-to-edge";
|
|
2898
|
-
return n && r ? "repeat" : n ? "repeat-x" : r ? "repeat-y" : "no-repeat";
|
|
2899
|
-
}
|
|
2900
|
-
start(e, t, n) {}
|
|
2901
|
-
execute(r, i) {
|
|
2902
|
-
let a = i.elements;
|
|
2903
|
-
if (!a || !a.length) return;
|
|
2904
|
-
let o = r.renderer, s = o.canvasContext, l = s.activeContext;
|
|
2905
|
-
for (let r = 0; r < a.length; r++) {
|
|
2906
|
-
let u = a[r];
|
|
2907
|
-
if (!u.packAsQuad) continue;
|
|
2908
|
-
let d = u, f = d.texture, p = f ? O.getCanvasSource(f) : null;
|
|
2909
|
-
if (!p) continue;
|
|
2910
|
-
let m = f.source.style, h = s.smoothProperty, g = m.scaleMode !== "nearest";
|
|
2911
|
-
l[h] !== g && (l[h] = g), s.setBlendMode(i.blendMode);
|
|
2912
|
-
let _ = o.globalUniforms.globalUniformData?.worldColor ?? 4294967295, v = d.color, y = (_ >>> 24 & 255) / 255, b = (v >>> 24 & 255) / 255, x = o.filter?.alphaMultiplier ?? 1, S = y * b * x;
|
|
2913
|
-
if (S <= 0) continue;
|
|
2914
|
-
l.globalAlpha = S;
|
|
2915
|
-
let C = _ & 16777215, w = c(n(v & 16777215, C)), T = f.frame, E = m.addressModeU ?? m.addressMode, D = m.addressModeV ?? m.addressMode, k = e._getPatternRepeat(E, D), A = f.source._resolution ?? f.source.resolution ?? 1, j = d.renderable?.renderGroup?.isCachedAsTexture, M = T.x * A, N = T.y * A, P = T.width * A, F = T.height * A, I = d.bounds, ee = o.renderTarget.renderTarget.isRoot, te = I.minX, ne = I.minY, re = I.maxX - I.minX, ie = I.maxY - I.minY, L = f.rotate, R = f.uvs, ae = Math.min(R.x0, R.x1, R.x2, R.x3, R.y0, R.y1, R.y2, R.y3), oe = Math.max(R.x0, R.x1, R.x2, R.x3, R.y0, R.y1, R.y2, R.y3), z = k !== "no-repeat" && (ae < 0 || oe > 1), B = L && !(!z && (w !== 16777215 || L));
|
|
2916
|
-
B ? (e._tempPatternMatrix.copyFrom(d.transform), t.matrixAppendRotationInv(e._tempPatternMatrix, L, te, ne, re, ie), s.setContextTransform(e._tempPatternMatrix, d.roundPixels === 1, void 0, j && ee)) : s.setContextTransform(d.transform, d.roundPixels === 1, void 0, j && ee);
|
|
2917
|
-
let se = re, ce = ie, V = B ? 0 : te, H = B ? 0 : ne;
|
|
2918
|
-
if (!B && d.roundPixels === 1 && (V |= 0, H |= 0), z) {
|
|
2919
|
-
let t = p, n = w !== 16777215 && !L, r = T.width <= f.source.width && T.height <= f.source.height;
|
|
2920
|
-
n && r && (t = O.getTintedCanvas({ texture: f }, w));
|
|
2921
|
-
let i = l.createPattern(t, k);
|
|
2922
|
-
if (!i) continue;
|
|
2923
|
-
let a = se, o = ce;
|
|
2924
|
-
if (a === 0 || o === 0) continue;
|
|
2925
|
-
let s = 1 / a, c = 1 / o, u = (R.x1 - R.x0) * s, d = (R.y1 - R.y0) * s, m = (R.x3 - R.x0) * c, h = (R.y3 - R.y0) * c, g = R.x0 - u * V - m * H, _ = R.y0 - d * V - h * H, v = f.source.pixelWidth, y = f.source.pixelHeight;
|
|
2926
|
-
e._tempPatternMatrix.set(u * v, d * y, m * v, h * y, g * v, _ * y), O.applyPatternTransform(i, e._tempPatternMatrix), l.fillStyle = i, l.fillRect(V, H, se, ce);
|
|
2927
|
-
} else {
|
|
2928
|
-
let e = w !== 16777215 || L ? O.getTintedCanvas({ texture: f }, w) : p, t = e !== p;
|
|
2929
|
-
l.drawImage(e, t ? 0 : M, t ? 0 : N, t ? e.width : P, t ? e.height : F, V, H, se, ce);
|
|
2930
|
-
}
|
|
2931
|
-
}
|
|
2932
|
-
}
|
|
2933
|
-
};
|
|
2934
|
-
ar._tempPatternMatrix = new _(), ar.extension = {
|
|
2935
|
-
type: [S.CanvasPipesAdaptor],
|
|
2936
|
-
name: "batch"
|
|
2937
|
-
};
|
|
2938
|
-
var or = ar, sr = class {
|
|
2939
|
-
constructor(e) {
|
|
2940
|
-
this._colorStack = [], this._colorStackIndex = 0, this._currentColor = 0, this._renderer = e;
|
|
2941
|
-
}
|
|
2942
|
-
buildStart() {
|
|
2943
|
-
this._colorStack[0] = 15, this._colorStackIndex = 1, this._currentColor = 15;
|
|
2944
|
-
}
|
|
2945
|
-
push(e, t, n) {
|
|
2946
|
-
this._renderer.renderPipes.batch.break(n);
|
|
2947
|
-
let r = this._colorStack;
|
|
2948
|
-
r[this._colorStackIndex] = r[this._colorStackIndex - 1] & e.mask;
|
|
2949
|
-
let i = this._colorStack[this._colorStackIndex];
|
|
2950
|
-
i !== this._currentColor && (this._currentColor = i, n.add({
|
|
2951
|
-
renderPipeId: "colorMask",
|
|
2952
|
-
colorMask: i,
|
|
2953
|
-
canBundle: !1
|
|
2954
|
-
})), this._colorStackIndex++;
|
|
2955
|
-
}
|
|
2956
|
-
pop(e, t, n) {
|
|
2957
|
-
this._renderer.renderPipes.batch.break(n);
|
|
2958
|
-
let r = this._colorStack;
|
|
2959
|
-
this._colorStackIndex--;
|
|
2960
|
-
let i = r[this._colorStackIndex - 1];
|
|
2961
|
-
i !== this._currentColor && (this._currentColor = i, n.add({
|
|
2962
|
-
renderPipeId: "colorMask",
|
|
2963
|
-
colorMask: i,
|
|
2964
|
-
canBundle: !1
|
|
2965
|
-
}));
|
|
2966
|
-
}
|
|
2967
|
-
execute(e) {}
|
|
2968
|
-
destroy() {
|
|
2969
|
-
this._renderer = null, this._colorStack = null;
|
|
2970
|
-
}
|
|
2971
|
-
};
|
|
2972
|
-
sr.extension = {
|
|
2973
|
-
type: [S.CanvasPipes],
|
|
2974
|
-
name: "colorMask"
|
|
2975
|
-
};
|
|
2976
|
-
//#endregion
|
|
2977
|
-
//#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/mask/stencil/CanvasStencilMaskPipe.mjs
|
|
2978
|
-
function cr(e, t, n, r, i, a) {
|
|
2979
|
-
a = Math.max(0, Math.min(a, Math.min(r, i) / 2)), e.moveTo(t + a, n), e.lineTo(t + r - a, n), e.quadraticCurveTo(t + r, n, t + r, n + a), e.lineTo(t + r, n + i - a), e.quadraticCurveTo(t + r, n + i, t + r - a, n + i), e.lineTo(t + a, n + i), e.quadraticCurveTo(t, n + i, t, n + i - a), e.lineTo(t, n + a), e.quadraticCurveTo(t, n, t + a, n);
|
|
2980
|
-
}
|
|
2981
|
-
function lr(e, t) {
|
|
2982
|
-
switch (t.type) {
|
|
2983
|
-
case "rectangle": {
|
|
2984
|
-
let n = t;
|
|
2985
|
-
e.rect(n.x, n.y, n.width, n.height);
|
|
2986
|
-
break;
|
|
2987
|
-
}
|
|
2988
|
-
case "roundedRectangle": {
|
|
2989
|
-
let n = t;
|
|
2990
|
-
cr(e, n.x, n.y, n.width, n.height, n.radius);
|
|
2991
|
-
break;
|
|
2992
|
-
}
|
|
2993
|
-
case "circle": {
|
|
2994
|
-
let n = t;
|
|
2995
|
-
e.moveTo(n.x + n.radius, n.y), e.arc(n.x, n.y, n.radius, 0, Math.PI * 2);
|
|
2996
|
-
break;
|
|
2997
|
-
}
|
|
2998
|
-
case "ellipse": {
|
|
2999
|
-
let n = t;
|
|
3000
|
-
e.ellipse ? (e.moveTo(n.x + n.halfWidth, n.y), e.ellipse(n.x, n.y, n.halfWidth, n.halfHeight, 0, 0, Math.PI * 2)) : (e.save(), e.translate(n.x, n.y), e.scale(n.halfWidth, n.halfHeight), e.moveTo(1, 0), e.arc(0, 0, 1, 0, Math.PI * 2), e.restore());
|
|
3001
|
-
break;
|
|
3002
|
-
}
|
|
3003
|
-
case "triangle": {
|
|
3004
|
-
let n = t;
|
|
3005
|
-
e.moveTo(n.x, n.y), e.lineTo(n.x2, n.y2), e.lineTo(n.x3, n.y3), e.closePath();
|
|
3006
|
-
break;
|
|
3007
|
-
}
|
|
3008
|
-
default: {
|
|
3009
|
-
let n = t, r = n.points;
|
|
3010
|
-
if (!r?.length) break;
|
|
3011
|
-
e.moveTo(r[0], r[1]);
|
|
3012
|
-
for (let t = 2; t < r.length; t += 2) e.lineTo(r[t], r[t + 1]);
|
|
3013
|
-
n.closePath && e.closePath();
|
|
3014
|
-
break;
|
|
3015
|
-
}
|
|
3016
|
-
}
|
|
3017
|
-
}
|
|
3018
|
-
function ur(e, t, n) {
|
|
3019
|
-
let r = [], i = [], a = [];
|
|
3020
|
-
if (!Y[t.type]?.build(t, r)) return !1;
|
|
3021
|
-
vt(r, n, !1, t.closePath ?? !0, i, a);
|
|
3022
|
-
for (let t = 0; t < a.length; t += 3) {
|
|
3023
|
-
let n = a[t] * 2, r = a[t + 1] * 2, o = a[t + 2] * 2;
|
|
3024
|
-
e.moveTo(i[n], i[n + 1]), e.lineTo(i[r], i[r + 1]), e.lineTo(i[o], i[o + 1]), e.closePath();
|
|
3025
|
-
}
|
|
3026
|
-
return !0;
|
|
3027
|
-
}
|
|
3028
|
-
function dr(e, t) {
|
|
3029
|
-
if (!t?.length) return !1;
|
|
3030
|
-
for (let n = 0; n < t.length; n++) {
|
|
3031
|
-
let r = t[n];
|
|
3032
|
-
if (!r?.shape) continue;
|
|
3033
|
-
let i = r.transform, a = i && !i.isIdentity();
|
|
3034
|
-
a && (e.save(), e.transform(i.a, i.b, i.c, i.d, i.tx, i.ty)), lr(e, r.shape), a && e.restore();
|
|
3035
|
-
}
|
|
3036
|
-
return !0;
|
|
3037
|
-
}
|
|
3038
|
-
var fr = class {
|
|
3039
|
-
constructor(e) {
|
|
3040
|
-
this._warnedMaskTypes = /* @__PURE__ */ new Set(), this._canvasMaskStack = [], this._renderer = e;
|
|
3041
|
-
}
|
|
3042
|
-
push(e, t, n) {
|
|
3043
|
-
this._renderer.renderPipes.batch.break(n), n.add({
|
|
3044
|
-
renderPipeId: "stencilMask",
|
|
3045
|
-
action: "pushMaskBegin",
|
|
3046
|
-
mask: e,
|
|
3047
|
-
inverse: t._maskOptions.inverse,
|
|
3048
|
-
canBundle: !1
|
|
3049
|
-
});
|
|
3050
|
-
}
|
|
3051
|
-
pop(e, t, n) {
|
|
3052
|
-
this._renderer.renderPipes.batch.break(n), n.add({
|
|
3053
|
-
renderPipeId: "stencilMask",
|
|
3054
|
-
action: "popMaskEnd",
|
|
3055
|
-
mask: e,
|
|
3056
|
-
inverse: t._maskOptions.inverse,
|
|
3057
|
-
canBundle: !1
|
|
3058
|
-
});
|
|
3059
|
-
}
|
|
3060
|
-
execute(e) {
|
|
3061
|
-
if (e.action !== "pushMaskBegin" && e.action !== "popMaskEnd") return;
|
|
3062
|
-
let t = this._renderer, n = t.canvasContext, r = n?.activeContext;
|
|
3063
|
-
if (!r) return;
|
|
3064
|
-
if (e.action === "popMaskEnd") {
|
|
3065
|
-
this._canvasMaskStack.pop() && r.restore();
|
|
3066
|
-
return;
|
|
3067
|
-
}
|
|
3068
|
-
e.inverse && this._warnOnce("inverse", "CanvasRenderer: inverse masks are not supported on Canvas2D; ignoring inverse flag.");
|
|
3069
|
-
let i = e.mask.mask;
|
|
3070
|
-
if (!(i instanceof ir)) {
|
|
3071
|
-
this._warnOnce("nonGraphics", "CanvasRenderer: only Graphics masks are supported in Canvas2D; skipping mask."), this._canvasMaskStack.push(!1);
|
|
3072
|
-
return;
|
|
3073
|
-
}
|
|
3074
|
-
let a = i, o = a.context?.instructions;
|
|
3075
|
-
if (!o?.length) {
|
|
3076
|
-
this._canvasMaskStack.push(!1);
|
|
3077
|
-
return;
|
|
3078
|
-
}
|
|
3079
|
-
r.save(), n.setContextTransform(a.groupTransform, (t._roundPixels | a._roundPixels) === 1), r.beginPath();
|
|
3080
|
-
let s = !1, c = !1;
|
|
3081
|
-
for (let e = 0; e < o.length; e++) {
|
|
3082
|
-
let t = o[e], n = t.action;
|
|
3083
|
-
if (n !== "fill" && n !== "stroke") continue;
|
|
3084
|
-
let i = t.data, a = i?.path?.shapePath;
|
|
3085
|
-
if (!a?.shapePrimitives?.length) continue;
|
|
3086
|
-
let l = n === "stroke", u = a.shapePrimitives;
|
|
3087
|
-
for (let e = 0; e < u.length; e++) {
|
|
3088
|
-
let t = u[e];
|
|
3089
|
-
if (!t?.shape) continue;
|
|
3090
|
-
let n = t.transform, a = n && !n.isIdentity();
|
|
3091
|
-
a && (r.save(), r.transform(n.a, n.b, n.c, n.d, n.tx, n.ty)), l && i.style ? s = ur(r, t.shape, i.style) || s : (lr(r, t.shape), c = dr(r, t.holes) || c, s = !0), a && r.restore();
|
|
3092
|
-
}
|
|
3093
|
-
}
|
|
3094
|
-
if (!s) {
|
|
3095
|
-
r.restore(), this._canvasMaskStack.push(!1);
|
|
3096
|
-
return;
|
|
3097
|
-
}
|
|
3098
|
-
c ? r.clip("evenodd") : r.clip(), this._canvasMaskStack.push(!0);
|
|
3099
|
-
}
|
|
3100
|
-
destroy() {
|
|
3101
|
-
this._renderer = null, this._warnedMaskTypes = null, this._canvasMaskStack = null;
|
|
3102
|
-
}
|
|
3103
|
-
_warnOnce(e, t) {
|
|
3104
|
-
this._warnedMaskTypes.has(e) || (this._warnedMaskTypes.add(e), u(t));
|
|
3105
|
-
}
|
|
3106
|
-
};
|
|
3107
|
-
fr.extension = {
|
|
3108
|
-
type: [S.CanvasPipes],
|
|
3109
|
-
name: "stencilMask"
|
|
3110
|
-
};
|
|
3111
|
-
//#endregion
|
|
3112
|
-
//#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/canvas/utils/mapCanvasBlendModesToPixi.mjs
|
|
3113
|
-
var $ = "source-over";
|
|
3114
|
-
function pr() {
|
|
3115
|
-
let e = E(), t = /* @__PURE__ */ Object.create(null);
|
|
3116
|
-
return t.inherit = $, t.none = $, t.normal = "source-over", t.add = "lighter", t.multiply = e ? "multiply" : $, t.screen = e ? "screen" : $, t.overlay = e ? "overlay" : $, t.darken = e ? "darken" : $, t.lighten = e ? "lighten" : $, t["color-dodge"] = e ? "color-dodge" : $, t["color-burn"] = e ? "color-burn" : $, t["hard-light"] = e ? "hard-light" : $, t["soft-light"] = e ? "soft-light" : $, t.difference = e ? "difference" : $, t.exclusion = e ? "exclusion" : $, t.saturation = e ? "saturation" : $, t.color = e ? "color" : $, t.luminosity = e ? "luminosity" : $, t["linear-burn"] = e ? "color-burn" : $, t["linear-dodge"] = e ? "color-dodge" : $, t["linear-light"] = e ? "hard-light" : $, t["pin-light"] = e ? "hard-light" : $, t["vivid-light"] = e ? "hard-light" : $, t["hard-mix"] = $, t.negation = e ? "difference" : $, t["normal-npm"] = t.normal, t["add-npm"] = t.add, t["screen-npm"] = t.screen, t.erase = "destination-out", t.subtract = $, t.divide = $, t.min = $, t.max = $, t;
|
|
3117
|
-
}
|
|
3118
|
-
//#endregion
|
|
3119
|
-
//#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/canvas/CanvasContextSystem.mjs
|
|
3120
|
-
var mr = new _(), hr = class {
|
|
3121
|
-
constructor(e) {
|
|
3122
|
-
this.activeResolution = 1, this.smoothProperty = "imageSmoothingEnabled", this.blendModes = pr(), this._activeBlendMode = "normal", this._projTransform = null, this._outerBlend = !1, this._warnedBlendModes = /* @__PURE__ */ new Set(), this._renderer = e;
|
|
3123
|
-
}
|
|
3124
|
-
resolutionChange(e) {
|
|
3125
|
-
this.activeResolution = e;
|
|
3126
|
-
}
|
|
3127
|
-
init() {
|
|
3128
|
-
let e = this._renderer.background.alpha < 1;
|
|
3129
|
-
if (this.rootContext = this._renderer.canvas.getContext("2d", { alpha: e }), this.activeContext = this.rootContext, this.activeResolution = this._renderer.resolution, !this.rootContext.imageSmoothingEnabled) {
|
|
3130
|
-
let e = this.rootContext;
|
|
3131
|
-
e.webkitImageSmoothingEnabled ? this.smoothProperty = "webkitImageSmoothingEnabled" : e.mozImageSmoothingEnabled ? this.smoothProperty = "mozImageSmoothingEnabled" : e.oImageSmoothingEnabled ? this.smoothProperty = "oImageSmoothingEnabled" : e.msImageSmoothingEnabled && (this.smoothProperty = "msImageSmoothingEnabled");
|
|
3132
|
-
}
|
|
3133
|
-
}
|
|
3134
|
-
setContextTransform(e, t, n, r) {
|
|
3135
|
-
let i = r ? _.IDENTITY : this._renderer.globalUniforms.globalUniformData?.worldTransformMatrix || _.IDENTITY, a = mr;
|
|
3136
|
-
a.copyFrom(i), a.append(e);
|
|
3137
|
-
let o = this._projTransform, s = this.activeResolution;
|
|
3138
|
-
if (n ||= s, o) {
|
|
3139
|
-
let e = _.shared;
|
|
3140
|
-
e.copyFrom(a), e.prepend(o), a = e;
|
|
3141
|
-
}
|
|
3142
|
-
t ? this.activeContext.setTransform(a.a * n, a.b * n, a.c * n, a.d * n, a.tx * s | 0, a.ty * s | 0) : this.activeContext.setTransform(a.a * n, a.b * n, a.c * n, a.d * n, a.tx * s, a.ty * s);
|
|
3143
|
-
}
|
|
3144
|
-
clear(e, t) {
|
|
3145
|
-
let n = this.activeContext, r = this._renderer;
|
|
3146
|
-
if (n.clearRect(0, 0, r.width, r.height), e) {
|
|
3147
|
-
let i = T.shared.setValue(e);
|
|
3148
|
-
n.globalAlpha = t ?? i.alpha, n.fillStyle = i.toHex(), n.fillRect(0, 0, r.width, r.height), n.globalAlpha = 1;
|
|
3149
|
-
}
|
|
3150
|
-
}
|
|
3151
|
-
setBlendMode(e) {
|
|
3152
|
-
if (this._activeBlendMode === e) return;
|
|
3153
|
-
this._activeBlendMode = e, this._outerBlend = !1;
|
|
3154
|
-
let t = this.blendModes[e];
|
|
3155
|
-
if (!t) {
|
|
3156
|
-
this._warnedBlendModes.has(e) || (console.warn(`CanvasRenderer: blend mode "${e}" is not supported in Canvas2D; falling back to "source-over".`), this._warnedBlendModes.add(e)), this.activeContext.globalCompositeOperation = "source-over";
|
|
3157
|
-
return;
|
|
3158
|
-
}
|
|
3159
|
-
this.activeContext.globalCompositeOperation = t;
|
|
3160
|
-
}
|
|
3161
|
-
destroy() {
|
|
3162
|
-
this.rootContext = null, this.activeContext = null, this._warnedBlendModes.clear();
|
|
3163
|
-
}
|
|
3164
|
-
};
|
|
3165
|
-
hr.extension = {
|
|
3166
|
-
type: [S.CanvasSystem],
|
|
3167
|
-
name: "canvasContext"
|
|
3168
|
-
};
|
|
3169
|
-
//#endregion
|
|
3170
|
-
//#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/canvas/CanvasLimitsSystem.mjs
|
|
3171
|
-
var gr = class {
|
|
3172
|
-
constructor() {
|
|
3173
|
-
this.maxTextures = 16, this.maxBatchableTextures = 16, this.maxUniformBindings = 0;
|
|
3174
|
-
}
|
|
3175
|
-
init() {}
|
|
3176
|
-
};
|
|
3177
|
-
gr.extension = {
|
|
3178
|
-
type: [S.CanvasSystem],
|
|
3179
|
-
name: "limits"
|
|
3180
|
-
};
|
|
3181
|
-
//#endregion
|
|
3182
|
-
//#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/graphics/canvas/CanvasGraphicsAdaptor.mjs
|
|
3183
|
-
var _r = "#808080", vr = new _(), yr = new _(), br = new _(), xr = new _(), Sr = new _();
|
|
3184
|
-
function Cr(e, t, n) {
|
|
3185
|
-
e.beginPath();
|
|
3186
|
-
for (let r = 0; r < n.length; r += 3) {
|
|
3187
|
-
let i = n[r] * 2, a = n[r + 1] * 2, o = n[r + 2] * 2;
|
|
3188
|
-
e.moveTo(t[i], t[i + 1]), e.lineTo(t[a], t[a + 1]), e.lineTo(t[o], t[o + 1]), e.closePath();
|
|
3189
|
-
}
|
|
3190
|
-
e.fill();
|
|
3191
|
-
}
|
|
3192
|
-
function wr(e) {
|
|
3193
|
-
return `#${(e & 16777215).toString(16).padStart(6, "0")}`;
|
|
3194
|
-
}
|
|
3195
|
-
function Tr(e, t, n, r, i, a) {
|
|
3196
|
-
a = Math.max(0, Math.min(a, Math.min(r, i) / 2)), e.moveTo(t + a, n), e.lineTo(t + r - a, n), e.quadraticCurveTo(t + r, n, t + r, n + a), e.lineTo(t + r, n + i - a), e.quadraticCurveTo(t + r, n + i, t + r - a, n + i), e.lineTo(t + a, n + i), e.quadraticCurveTo(t, n + i, t, n + i - a), e.lineTo(t, n + a), e.quadraticCurveTo(t, n, t + a, n);
|
|
3197
|
-
}
|
|
3198
|
-
function Er(e, t) {
|
|
3199
|
-
switch (t.type) {
|
|
3200
|
-
case "rectangle": {
|
|
3201
|
-
let n = t;
|
|
3202
|
-
e.rect(n.x, n.y, n.width, n.height);
|
|
3203
|
-
break;
|
|
3204
|
-
}
|
|
3205
|
-
case "roundedRectangle": {
|
|
3206
|
-
let n = t;
|
|
3207
|
-
Tr(e, n.x, n.y, n.width, n.height, n.radius);
|
|
3208
|
-
break;
|
|
3209
|
-
}
|
|
3210
|
-
case "circle": {
|
|
3211
|
-
let n = t;
|
|
3212
|
-
e.arc(n.x, n.y, n.radius, 0, Math.PI * 2);
|
|
3213
|
-
break;
|
|
3214
|
-
}
|
|
3215
|
-
case "ellipse": {
|
|
3216
|
-
let n = t;
|
|
3217
|
-
e.ellipse ? e.ellipse(n.x, n.y, n.halfWidth, n.halfHeight, 0, 0, Math.PI * 2) : (e.save(), e.translate(n.x, n.y), e.scale(n.halfWidth, n.halfHeight), e.arc(0, 0, 1, 0, Math.PI * 2), e.restore());
|
|
3218
|
-
break;
|
|
3219
|
-
}
|
|
3220
|
-
case "triangle": {
|
|
3221
|
-
let n = t;
|
|
3222
|
-
e.moveTo(n.x, n.y), e.lineTo(n.x2, n.y2), e.lineTo(n.x3, n.y3), e.closePath();
|
|
3223
|
-
break;
|
|
3224
|
-
}
|
|
3225
|
-
default: {
|
|
3226
|
-
let n = t, r = n.points;
|
|
3227
|
-
if (!r?.length) break;
|
|
3228
|
-
e.moveTo(r[0], r[1]);
|
|
3229
|
-
for (let t = 2; t < r.length; t += 2) e.lineTo(r[t], r[t + 1]);
|
|
3230
|
-
n.closePath && e.closePath();
|
|
3231
|
-
break;
|
|
3232
|
-
}
|
|
3233
|
-
}
|
|
3234
|
-
}
|
|
3235
|
-
function Dr(e, t) {
|
|
3236
|
-
if (!t?.length) return !1;
|
|
3237
|
-
for (let n = 0; n < t.length; n++) {
|
|
3238
|
-
let r = t[n];
|
|
3239
|
-
if (!r?.shape) continue;
|
|
3240
|
-
let i = r.transform, a = i && !i.isIdentity();
|
|
3241
|
-
a && (e.save(), e.transform(i.a, i.b, i.c, i.d, i.tx, i.ty)), Er(e, r.shape), a && e.restore();
|
|
3242
|
-
}
|
|
3243
|
-
return !0;
|
|
3244
|
-
}
|
|
3245
|
-
function Or(e, t, n, r) {
|
|
3246
|
-
let i = e.fill;
|
|
3247
|
-
if (i instanceof J) {
|
|
3248
|
-
i.buildGradient();
|
|
3249
|
-
let a = i.texture;
|
|
3250
|
-
if (a) {
|
|
3251
|
-
let o = O.getTintedPattern(a, t), s = n ? xr.copyFrom(n).scale(a.source.pixelWidth, a.source.pixelHeight) : xr.copyFrom(i.transform);
|
|
3252
|
-
return r && !e.textureSpace && s.append(r), O.applyPatternTransform(o, s), o;
|
|
3253
|
-
}
|
|
3254
|
-
}
|
|
3255
|
-
if (i instanceof Pn) {
|
|
3256
|
-
let e = O.getTintedPattern(i.texture, t);
|
|
3257
|
-
return O.applyPatternTransform(e, i.transform, !1), e;
|
|
3258
|
-
}
|
|
3259
|
-
let a = e.texture;
|
|
3260
|
-
if (a && a !== f.WHITE) {
|
|
3261
|
-
if (!a.source.resource) return _r;
|
|
3262
|
-
let r = O.getTintedPattern(a, t), i = e.matrix;
|
|
3263
|
-
if (n) {
|
|
3264
|
-
let { resolution: e } = a.source;
|
|
3265
|
-
if (i = xr.copyFrom(n), a.rotate) {
|
|
3266
|
-
let { uvs: t, orig: n } = a;
|
|
3267
|
-
i.prepend(Sr.set(t.x1 - t.x0, t.y1 - t.y0, t.x3 - t.x0, t.y3 - t.y0, t.x0, t.y0).invert()).scale(n.width * e, n.height * e);
|
|
3268
|
-
} else i.scale(a.source.pixelWidth, a.source.pixelHeight).translate(-a.frame.x * e, -a.frame.y * e);
|
|
3269
|
-
}
|
|
3270
|
-
return O.applyPatternTransform(r, i), r;
|
|
3271
|
-
}
|
|
3272
|
-
return wr(t);
|
|
3273
|
-
}
|
|
3274
|
-
var kr = class {
|
|
3275
|
-
constructor() {
|
|
3276
|
-
this.shader = null;
|
|
3277
|
-
}
|
|
3278
|
-
contextChange(e) {}
|
|
3279
|
-
execute(e, r) {
|
|
3280
|
-
let i = e.renderer, a = i.canvasContext, o = a.activeContext, s = r.groupTransform, l = i.globalUniforms.globalUniformData?.worldColor ?? 4294967295, u = r.groupColorAlpha, d = (l >>> 24 & 255) / 255, p = (u >>> 24 & 255) / 255, m = i.filter?.alphaMultiplier ?? 1, h = d * p * m;
|
|
3281
|
-
if (h <= 0) return;
|
|
3282
|
-
let g = l & 16777215, _ = c(n(u & 16777215, g)), v = i._roundPixels | r._roundPixels;
|
|
3283
|
-
o.save(), a.setContextTransform(s, v === 1), a.setBlendMode(r.groupBlendMode);
|
|
3284
|
-
let y = r.context.instructions;
|
|
3285
|
-
for (let e = 0; e < y.length; e++) {
|
|
3286
|
-
let r = y[e];
|
|
3287
|
-
if (r.action === "texture") {
|
|
3288
|
-
let e = r.data, i = e.image, c = i ? O.getCanvasSource(i) : null;
|
|
3289
|
-
if (!c) continue;
|
|
3290
|
-
let l = e.alpha * h;
|
|
3291
|
-
if (l <= 0) continue;
|
|
3292
|
-
let u = n(e.style, _);
|
|
3293
|
-
o.globalAlpha = l;
|
|
3294
|
-
let d = c;
|
|
3295
|
-
u !== 16777215 && (d = O.getTintedCanvas({ texture: i }, u));
|
|
3296
|
-
let f = i.frame, p = i.source._resolution ?? i.source.resolution ?? 1, m = f.x * p, g = f.y * p, y = f.width * p, b = f.height * p;
|
|
3297
|
-
d !== c && (m = 0, g = 0);
|
|
3298
|
-
let x = e.transform, S = x && !x.isIdentity(), C = i.rotate;
|
|
3299
|
-
S || C ? (vr.copyFrom(s), S && vr.append(x), C && t.matrixAppendRotationInv(vr, C, e.dx, e.dy, e.dw, e.dh), a.setContextTransform(vr, v === 1)) : a.setContextTransform(s, v === 1), o.drawImage(d, m, g, d === c ? y : d.width, d === c ? b : d.height, C ? 0 : e.dx, C ? 0 : e.dy, e.dw, e.dh), (S || C) && a.setContextTransform(s, v === 1);
|
|
3300
|
-
continue;
|
|
3301
|
-
}
|
|
3302
|
-
let i = r.data, c = i?.path?.shapePath;
|
|
3303
|
-
if (!c?.shapePrimitives?.length) continue;
|
|
3304
|
-
let l = i.style, u = n(l.color, _), d = l.alpha * h;
|
|
3305
|
-
if (d <= 0) continue;
|
|
3306
|
-
let p = r.action === "stroke";
|
|
3307
|
-
if (o.globalAlpha = d, p) {
|
|
3308
|
-
let e = l;
|
|
3309
|
-
o.lineWidth = e.width, o.lineCap = e.cap, o.lineJoin = e.join, o.miterLimit = e.miterLimit;
|
|
3310
|
-
}
|
|
3311
|
-
let m = c.shapePrimitives;
|
|
3312
|
-
if (!p && i.hole?.shapePath?.shapePrimitives?.length) {
|
|
3313
|
-
let e = m[m.length - 1];
|
|
3314
|
-
e.holes = i.hole.shapePath.shapePrimitives;
|
|
3315
|
-
}
|
|
3316
|
-
for (let e = 0; e < m.length; e++) {
|
|
3317
|
-
let t = m[e];
|
|
3318
|
-
if (!t?.shape) continue;
|
|
3319
|
-
let n = t.transform, r = n && !n.isIdentity(), i = l.texture && l.texture !== f.WHITE, a = l.textureSpace === "global" ? n : null, c = Or(l, u, i ? Nt(yr, l, t.shape, a) : null, r ? br.copyFrom(s).append(n) : s);
|
|
3320
|
-
if (r && (o.save(), o.transform(n.a, n.b, n.c, n.d, n.tx, n.ty)), p) {
|
|
3321
|
-
let e = l;
|
|
3322
|
-
if (e.alignment !== .5 && !e.pixelLine) {
|
|
3323
|
-
let n = [], r = [], i = [];
|
|
3324
|
-
Y[t.shape.type]?.build(t.shape, n) ? (vt(n, e, !1, t.shape.closePath ?? !0, r, i), o.fillStyle = c, Cr(o, r, i)) : (o.strokeStyle = c, o.beginPath(), Er(o, t.shape), o.stroke());
|
|
3325
|
-
} else o.strokeStyle = c, o.beginPath(), Er(o, t.shape), o.stroke();
|
|
3326
|
-
} else o.fillStyle = c, o.beginPath(), Er(o, t.shape), Dr(o, t.holes) ? o.fill("evenodd") : o.fill();
|
|
3327
|
-
r && o.restore();
|
|
3328
|
-
}
|
|
3329
|
-
}
|
|
3330
|
-
o.restore();
|
|
3331
|
-
}
|
|
3332
|
-
destroy() {
|
|
3333
|
-
this.shader = null;
|
|
3334
|
-
}
|
|
3335
|
-
};
|
|
3336
|
-
kr.extension = {
|
|
3337
|
-
type: [S.CanvasPipesAdaptor],
|
|
3338
|
-
name: "graphics"
|
|
3339
|
-
};
|
|
3340
|
-
//#endregion
|
|
3341
|
-
//#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/canvas/renderTarget/CanvasRenderTargetAdaptor.mjs
|
|
3342
|
-
var Ar = class {
|
|
3343
|
-
init(e, t) {
|
|
3344
|
-
this._renderer = e, this._renderTargetSystem = t;
|
|
3345
|
-
}
|
|
3346
|
-
initGpuRenderTarget(e) {
|
|
3347
|
-
let t = e.colorTexture, { canvas: n, context: r } = this._ensureCanvas(t);
|
|
3348
|
-
return {
|
|
3349
|
-
canvas: n,
|
|
3350
|
-
context: r,
|
|
3351
|
-
width: n.width,
|
|
3352
|
-
height: n.height
|
|
3353
|
-
};
|
|
3354
|
-
}
|
|
3355
|
-
resizeGpuRenderTarget(e) {
|
|
3356
|
-
let t = e.colorTexture, { canvas: n } = this._ensureCanvas(t);
|
|
3357
|
-
n.width = e.pixelWidth, n.height = e.pixelHeight;
|
|
3358
|
-
}
|
|
3359
|
-
startRenderPass(e, t, n, r) {
|
|
3360
|
-
let i = this._renderTargetSystem.getGpuRenderTarget(e);
|
|
3361
|
-
this._renderer.canvasContext.activeContext = i.context, this._renderer.canvasContext.activeResolution = e.resolution, t && this.clear(e, t, n, r);
|
|
3362
|
-
}
|
|
3363
|
-
clear(e, t, n, r) {
|
|
3364
|
-
let i = this._renderTargetSystem.getGpuRenderTarget(e).context, a = r || {
|
|
3365
|
-
x: 0,
|
|
3366
|
-
y: 0,
|
|
3367
|
-
width: e.pixelWidth,
|
|
3368
|
-
height: e.pixelHeight
|
|
3369
|
-
};
|
|
3370
|
-
if (i.setTransform(1, 0, 0, 1, 0, 0), i.clearRect(a.x, a.y, a.width, a.height), n) {
|
|
3371
|
-
let e = T.shared.setValue(n);
|
|
3372
|
-
e.alpha > 0 && (i.globalAlpha = e.alpha, i.fillStyle = e.toHex(), i.fillRect(a.x, a.y, a.width, a.height), i.globalAlpha = 1);
|
|
3373
|
-
}
|
|
3374
|
-
}
|
|
3375
|
-
finishRenderPass() {}
|
|
3376
|
-
copyToTexture(e, t, n, r, i) {
|
|
3377
|
-
let a = this._renderTargetSystem.getGpuRenderTarget(e).canvas, o = t.source, { context: s } = this._ensureCanvas(o), c = i?.x ?? 0, l = i?.y ?? 0;
|
|
3378
|
-
return s.drawImage(a, n.x, n.y, r.width, r.height, c, l, r.width, r.height), o.update(), t;
|
|
3379
|
-
}
|
|
3380
|
-
copyDepthTexture(e, t, n, r, i) {
|
|
3381
|
-
u("[CanvasRenderTargetAdaptor] copyDepthTexture is not supported in the canvas renderer");
|
|
3382
|
-
}
|
|
3383
|
-
destroyGpuRenderTarget(e) {}
|
|
3384
|
-
_ensureCanvas(e) {
|
|
3385
|
-
let t = e.resource;
|
|
3386
|
-
(!t || !w.test(t)) && (t = g.get().createCanvas(e.pixelWidth, e.pixelHeight), e.resource = t), (t.width !== e.pixelWidth || t.height !== e.pixelHeight) && (t.width = e.pixelWidth, t.height = e.pixelHeight);
|
|
3387
|
-
let n = t.getContext("2d");
|
|
3388
|
-
return {
|
|
3389
|
-
canvas: t,
|
|
3390
|
-
context: n
|
|
3391
|
-
};
|
|
3392
|
-
}
|
|
3393
|
-
}, jr = class extends ne {
|
|
3394
|
-
constructor(e) {
|
|
3395
|
-
super(e), this.adaptor = new Ar(), this.adaptor.init(e, this);
|
|
3396
|
-
}
|
|
3397
|
-
};
|
|
3398
|
-
jr.extension = {
|
|
3399
|
-
type: [S.CanvasSystem],
|
|
3400
|
-
name: "renderTarget"
|
|
3401
|
-
};
|
|
3402
|
-
//#endregion
|
|
3403
|
-
//#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/canvas/texture/CanvasTextureSystem.mjs
|
|
3404
|
-
var Mr = class {
|
|
3405
|
-
constructor(e) {}
|
|
3406
|
-
init() {}
|
|
3407
|
-
initSource(e) {}
|
|
3408
|
-
generateCanvas(e) {
|
|
3409
|
-
let t = g.get().createCanvas(), n = t.getContext("2d"), r = O.getCanvasSource(e);
|
|
3410
|
-
if (!r) return t;
|
|
3411
|
-
let i = e.frame, a = e.source._resolution ?? e.source.resolution ?? 1, o = i.x * a, s = i.y * a, c = i.width * a, l = i.height * a;
|
|
3412
|
-
return t.width = Math.ceil(c), t.height = Math.ceil(l), n.drawImage(r, o, s, c, l, 0, 0, c, l), t;
|
|
3413
|
-
}
|
|
3414
|
-
getPixels(e) {
|
|
3415
|
-
let t = this.generateCanvas(e);
|
|
3416
|
-
return {
|
|
3417
|
-
pixels: t.getContext("2d", { willReadFrequently: !0 }).getImageData(0, 0, t.width, t.height).data,
|
|
3418
|
-
width: t.width,
|
|
3419
|
-
height: t.height
|
|
3420
|
-
};
|
|
3421
|
-
}
|
|
3422
|
-
destroy() {}
|
|
3423
|
-
};
|
|
3424
|
-
Mr.extension = {
|
|
3425
|
-
type: [S.CanvasSystem],
|
|
3426
|
-
name: "texture"
|
|
3427
|
-
};
|
|
3428
|
-
//#endregion
|
|
3429
|
-
//#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/canvas/CanvasRenderer.mjs
|
|
3430
|
-
var Nr = /* @__PURE__ */ e({ CanvasRenderer: () => Br }), Pr = [
|
|
3431
|
-
...ee,
|
|
3432
|
-
hr,
|
|
3433
|
-
gr,
|
|
3434
|
-
Mr,
|
|
3435
|
-
jr
|
|
3436
|
-
], Fr = [
|
|
3437
|
-
P,
|
|
3438
|
-
F,
|
|
3439
|
-
A,
|
|
3440
|
-
I,
|
|
3441
|
-
j,
|
|
3442
|
-
fr,
|
|
3443
|
-
sr,
|
|
3444
|
-
te
|
|
3445
|
-
], Ir = [or, kr], Lr = [], Rr = [], zr = [];
|
|
3446
|
-
v.handleByNamedList(S.CanvasSystem, Lr), v.handleByNamedList(S.CanvasPipes, Rr), v.handleByNamedList(S.CanvasPipesAdaptor, zr), v.add(...Pr, ...Fr, ...Ir);
|
|
3447
|
-
var Br = class extends k {
|
|
3448
|
-
constructor() {
|
|
3449
|
-
let e = {
|
|
3450
|
-
name: "canvas",
|
|
3451
|
-
type: y.CANVAS,
|
|
3452
|
-
systems: Lr,
|
|
3453
|
-
renderPipes: Rr,
|
|
3454
|
-
renderPipeAdaptors: zr
|
|
3455
|
-
};
|
|
3456
|
-
super(e);
|
|
3457
|
-
}
|
|
3458
|
-
};
|
|
3459
|
-
//#endregion
|
|
3460
|
-
export { Nr as t };
|