modern-canvas 0.14.23 → 0.14.24
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/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineProperty as ts, Observable as ue, Reactivable as rs, parseColor as oi, property as h, isGradient as ni, isColorFillObject as Gr, clearUndef as ss, idGenerator as is, normalizeFill as li, isNone as
|
|
1
|
+
import { defineProperty as ts, Observable as ue, Reactivable as rs, parseColor as oi, property as h, isGradient as ni, isColorFillObject as Gr, clearUndef as ss, idGenerator as is, normalizeFill as li, isNone as z, normalizeBackground as ci, normalizeForeground as hi, normalizeOutline as ui, normalizeShadow as di, normalizeShape as fi, getDefaultStyle as pi, normalizeText as _i, normalizeTextContent as mi, getDefaultTextStyle as gi, getDefaultLayoutStyle as vi, RawWeakMap as bi } from "modern-idoc";
|
|
2
2
|
import { fonts as yi } from "modern-font";
|
|
3
3
|
import { extend as xi } from "colord";
|
|
4
4
|
import wi from "colord/plugins/names";
|
|
@@ -91,7 +91,7 @@ async function as(r) {
|
|
|
91
91
|
);
|
|
92
92
|
});
|
|
93
93
|
}
|
|
94
|
-
const yr = Math.PI,
|
|
94
|
+
const yr = Math.PI, G = yr * 2;
|
|
95
95
|
function $r(r) {
|
|
96
96
|
return !(r & r - 1) && !!r;
|
|
97
97
|
}
|
|
@@ -157,7 +157,7 @@ function os(r, e, t = {}) {
|
|
|
157
157
|
n.normalizedIntValue = n.intValue / 100;
|
|
158
158
|
break;
|
|
159
159
|
case "rad":
|
|
160
|
-
n.normalizedIntValue = n.intValue /
|
|
160
|
+
n.normalizedIntValue = n.intValue / G;
|
|
161
161
|
break;
|
|
162
162
|
case "deg":
|
|
163
163
|
n.normalizedIntValue = n.intValue / 360;
|
|
@@ -533,11 +533,11 @@ class le extends ue {
|
|
|
533
533
|
const { dim: d } = t;
|
|
534
534
|
switch (e) {
|
|
535
535
|
case "*":
|
|
536
|
-
for (let
|
|
536
|
+
for (let f = 0; f < d; f++) {
|
|
537
537
|
let m = 0;
|
|
538
|
-
for (let
|
|
539
|
-
|
|
540
|
-
u[
|
|
538
|
+
for (let p = 0; p < i; p++)
|
|
539
|
+
p < d && (m += n[f * i + p] * (l[p] ?? 0));
|
|
540
|
+
u[f] = m;
|
|
541
541
|
}
|
|
542
542
|
break;
|
|
543
543
|
default:
|
|
@@ -547,20 +547,20 @@ class le extends ue {
|
|
|
547
547
|
switch (e) {
|
|
548
548
|
case "*":
|
|
549
549
|
for (let d = 0; d < i; d++)
|
|
550
|
-
for (let
|
|
551
|
-
const m =
|
|
552
|
-
let
|
|
550
|
+
for (let f = 0; f < a; f++) {
|
|
551
|
+
const m = f * i;
|
|
552
|
+
let p = 0;
|
|
553
553
|
for (let _ = 0; _ < a; _++) {
|
|
554
554
|
const g = m + _, v = _ * i + d;
|
|
555
|
-
|
|
555
|
+
p += n[g] * (l[v] ?? 0);
|
|
556
556
|
}
|
|
557
|
-
u[m + d] =
|
|
557
|
+
u[m + d] = p;
|
|
558
558
|
}
|
|
559
559
|
break;
|
|
560
560
|
case "=":
|
|
561
561
|
for (let d = 0; d < o; d++) {
|
|
562
|
-
const
|
|
563
|
-
|
|
562
|
+
const f = l[d];
|
|
563
|
+
f !== void 0 && (n[d] = f);
|
|
564
564
|
}
|
|
565
565
|
return this._onUpdate(n), this.emit("update", n), this;
|
|
566
566
|
default:
|
|
@@ -633,8 +633,8 @@ class Q extends ue {
|
|
|
633
633
|
case "*":
|
|
634
634
|
for (let u = 0; u < i; u++) {
|
|
635
635
|
let d = 0;
|
|
636
|
-
for (let
|
|
637
|
-
d += a[u] * o[
|
|
636
|
+
for (let f = 0; f < i; f++)
|
|
637
|
+
d += a[u] * o[f * c + u];
|
|
638
638
|
l[u] = d;
|
|
639
639
|
}
|
|
640
640
|
break;
|
|
@@ -1006,7 +1006,7 @@ class Qi extends le {
|
|
|
1006
1006
|
super(4, 4, e);
|
|
1007
1007
|
}
|
|
1008
1008
|
}
|
|
1009
|
-
const
|
|
1009
|
+
const fr = yr / 180, uc = 180 / yr;
|
|
1010
1010
|
function ce(r, e, t) {
|
|
1011
1011
|
return Math.max(e, Math.min(r, t));
|
|
1012
1012
|
}
|
|
@@ -1031,7 +1031,7 @@ class ea extends Q {
|
|
|
1031
1031
|
super(4), this.set(e, t, s, i);
|
|
1032
1032
|
}
|
|
1033
1033
|
}
|
|
1034
|
-
class
|
|
1034
|
+
class fs extends le {
|
|
1035
1035
|
constructor(e) {
|
|
1036
1036
|
super(4, 5, e);
|
|
1037
1037
|
}
|
|
@@ -1289,12 +1289,12 @@ class ps extends le {
|
|
|
1289
1289
|
return new ea(e[4] / 255, e[9] / 255, e[14] / 255, e[19] / 255);
|
|
1290
1290
|
}
|
|
1291
1291
|
}
|
|
1292
|
-
class
|
|
1292
|
+
class fc extends le {
|
|
1293
1293
|
constructor(e) {
|
|
1294
1294
|
super(2, 2, e);
|
|
1295
1295
|
}
|
|
1296
1296
|
}
|
|
1297
|
-
class
|
|
1297
|
+
class ps extends le {
|
|
1298
1298
|
constructor(e) {
|
|
1299
1299
|
super(3, 3, e);
|
|
1300
1300
|
}
|
|
@@ -1309,7 +1309,7 @@ class fs extends le {
|
|
|
1309
1309
|
n,
|
|
1310
1310
|
l,
|
|
1311
1311
|
c
|
|
1312
|
-
] = this._array, u = c * a - o * l, d = o * n - c * i,
|
|
1312
|
+
] = this._array, u = c * a - o * l, d = o * n - c * i, f = l * i - a * n, m = e * u + t * d + s * f;
|
|
1313
1313
|
if (m === 0)
|
|
1314
1314
|
return this.set([
|
|
1315
1315
|
0,
|
|
@@ -1322,17 +1322,17 @@ class fs extends le {
|
|
|
1322
1322
|
0,
|
|
1323
1323
|
0
|
|
1324
1324
|
]);
|
|
1325
|
-
const
|
|
1325
|
+
const p = 1 / m;
|
|
1326
1326
|
return this.set([
|
|
1327
|
-
u *
|
|
1328
|
-
(s * l - c * t) *
|
|
1329
|
-
(o * t - s * a) *
|
|
1330
|
-
d *
|
|
1331
|
-
(c * e - s * n) *
|
|
1332
|
-
(s * i - o * e) *
|
|
1333
|
-
|
|
1334
|
-
(t * n - l * e) *
|
|
1335
|
-
(a * e - t * i) *
|
|
1327
|
+
u * p,
|
|
1328
|
+
(s * l - c * t) * p,
|
|
1329
|
+
(o * t - s * a) * p,
|
|
1330
|
+
d * p,
|
|
1331
|
+
(c * e - s * n) * p,
|
|
1332
|
+
(s * i - o * e) * p,
|
|
1333
|
+
f * p,
|
|
1334
|
+
(t * n - l * e) * p,
|
|
1335
|
+
(a * e - t * i) * p
|
|
1336
1336
|
]);
|
|
1337
1337
|
}
|
|
1338
1338
|
}
|
|
@@ -1342,7 +1342,7 @@ class Dt extends ee {
|
|
|
1342
1342
|
*/
|
|
1343
1343
|
rotation;
|
|
1344
1344
|
get rotationDegrees() {
|
|
1345
|
-
return this.rotation /
|
|
1345
|
+
return this.rotation / fr;
|
|
1346
1346
|
}
|
|
1347
1347
|
constructor(...e) {
|
|
1348
1348
|
let t, s;
|
|
@@ -1354,12 +1354,12 @@ class Dt extends ee {
|
|
|
1354
1354
|
{
|
|
1355
1355
|
const s = (l, c) => Math.abs(l.x * c.x + l.y * c.y), i = (l) => {
|
|
1356
1356
|
const { width: c, height: u, rotation: d = 0 } = l;
|
|
1357
|
-
let
|
|
1358
|
-
|
|
1359
|
-
const m =
|
|
1357
|
+
let f = d / fr;
|
|
1358
|
+
f = -f % 180;
|
|
1359
|
+
const m = f / 180 * Math.PI, p = { x: Math.cos(m), y: -Math.sin(m) }, _ = { x: Math.sin(m), y: Math.cos(m) };
|
|
1360
1360
|
return {
|
|
1361
|
-
axis: [
|
|
1362
|
-
projectionRadius: (g) => c / 2 * s(g,
|
|
1361
|
+
axis: [p, _],
|
|
1362
|
+
projectionRadius: (g) => c / 2 * s(g, p) + u / 2 * s(g, _)
|
|
1363
1363
|
};
|
|
1364
1364
|
}, a = i(this), o = i(e), n = {
|
|
1365
1365
|
x: this.left + this.width / 2 - (e.left + e.width / 2),
|
|
@@ -1393,7 +1393,7 @@ class Dt extends ee {
|
|
|
1393
1393
|
return new Dt(this.toJSON());
|
|
1394
1394
|
}
|
|
1395
1395
|
}
|
|
1396
|
-
class ta extends
|
|
1396
|
+
class ta extends ps {
|
|
1397
1397
|
constructor(e = 0, t = 0, s = 0, i = 0, a = !1) {
|
|
1398
1398
|
super(), this._x = e, this._y = t, this._width = s, this._height = i, this._flipY = a, this._performUpdateArray();
|
|
1399
1399
|
}
|
|
@@ -1424,7 +1424,7 @@ class ta extends fs {
|
|
|
1424
1424
|
]);
|
|
1425
1425
|
}
|
|
1426
1426
|
}
|
|
1427
|
-
class M extends
|
|
1427
|
+
class M extends ps {
|
|
1428
1428
|
static _t2d = /* @__PURE__ */ new M();
|
|
1429
1429
|
premultiply(e) {
|
|
1430
1430
|
return e.multiply(this, this);
|
|
@@ -1522,7 +1522,7 @@ class M extends fs {
|
|
|
1522
1522
|
return a && this.rotateX(a), o && this.rotateY(o), n && this.rotateZ(n), this;
|
|
1523
1523
|
}
|
|
1524
1524
|
_rotateToScale(e) {
|
|
1525
|
-
const t = e /
|
|
1525
|
+
const t = e / G;
|
|
1526
1526
|
return t <= 0.5 ? t * -4 + 1 : (t - 1) * 4 + 1;
|
|
1527
1527
|
}
|
|
1528
1528
|
_rotate3d(e, t, s, i) {
|
|
@@ -1533,8 +1533,8 @@ class M extends fs {
|
|
|
1533
1533
|
if (e === 0 && t === 0)
|
|
1534
1534
|
return [0, 0, i];
|
|
1535
1535
|
{
|
|
1536
|
-
const a = Math.cos(i), o = Math.sin(i), n = a + e * e * (1 - a), l = e * t * (1 - a) - s * o, c = e * s * (1 - a) + t * o, u = a + t * t * (1 - a), d = t * s * (1 - a) - e * o,
|
|
1537
|
-
return [m,
|
|
1536
|
+
const a = Math.cos(i), o = Math.sin(i), n = a + e * e * (1 - a), l = e * t * (1 - a) - s * o, c = e * s * (1 - a) + t * o, u = a + t * t * (1 - a), d = t * s * (1 - a) - e * o, f = a + s * s * (1 - a), m = -Math.atan2(-d, u), p = -Math.atan2(c, Math.sqrt(d * d + f * f)), _ = -Math.atan2(-l, n);
|
|
1537
|
+
return [m, p, _];
|
|
1538
1538
|
}
|
|
1539
1539
|
}
|
|
1540
1540
|
makeRotation(e) {
|
|
@@ -1558,7 +1558,7 @@ class M extends fs {
|
|
|
1558
1558
|
rotation: 0
|
|
1559
1559
|
}) {
|
|
1560
1560
|
const { a: s, b: i, c: a, d: o, tx: n, ty: l } = this.toObject(), c = -Math.atan2(-a, o), u = Math.atan2(i, s), d = Math.abs(c + u);
|
|
1561
|
-
return d < 1e-5 || Math.abs(
|
|
1561
|
+
return d < 1e-5 || Math.abs(G - d) < 1e-5 ? (t.rotation = u, t.skew.x = t.skew.y = 0) : (t.rotation = 0, t.skew.x = c, t.skew.y = u), t.scale.x = Math.sqrt(s * s + i * i), t.scale.y = Math.sqrt(a * a + o * o), t.position.x = n + (e.x * s + e.y * a), t.position.y = l + (e.x * i + e.y * o), t;
|
|
1562
1562
|
}
|
|
1563
1563
|
apply(e, t) {
|
|
1564
1564
|
t = t || new O();
|
|
@@ -1592,7 +1592,7 @@ class M extends fs {
|
|
|
1592
1592
|
return { a: e, c: t, tx: s, b: i, d: a, ty: o, tz: n };
|
|
1593
1593
|
}
|
|
1594
1594
|
}
|
|
1595
|
-
class
|
|
1595
|
+
class pc extends Q {
|
|
1596
1596
|
constructor() {
|
|
1597
1597
|
super(3);
|
|
1598
1598
|
}
|
|
@@ -1777,20 +1777,20 @@ function ha(r, e) {
|
|
|
1777
1777
|
${r}` : r;
|
|
1778
1778
|
}
|
|
1779
1779
|
const ua = {}, da = {};
|
|
1780
|
-
function
|
|
1780
|
+
function fa(r, { name: e = "program" }, t = !0) {
|
|
1781
1781
|
e = e.replace(/\s+/g, "-"), e += t ? "-fragment" : "-vertex";
|
|
1782
1782
|
const s = t ? ua : da;
|
|
1783
1783
|
return s[e] ? (s[e]++, e += `-${s[e]}`) : s[e] = 1, r.includes("#define SHADER_NAME") ? r : `${`#define SHADER_NAME ${e}`}
|
|
1784
1784
|
${r}`;
|
|
1785
1785
|
}
|
|
1786
|
-
function
|
|
1786
|
+
function pa(r, e) {
|
|
1787
1787
|
return e ? r.replace("#version 300 es", "") : r;
|
|
1788
1788
|
}
|
|
1789
1789
|
const et = /* @__PURE__ */ Object.create(null), tr = {
|
|
1790
|
-
stripVersion:
|
|
1790
|
+
stripVersion: pa,
|
|
1791
1791
|
ensurePrecision: ca,
|
|
1792
1792
|
addProgramDefines: la,
|
|
1793
|
-
setProgramName:
|
|
1793
|
+
setProgramName: fa,
|
|
1794
1794
|
insertVersion: ha
|
|
1795
1795
|
};
|
|
1796
1796
|
class ot {
|
|
@@ -2016,11 +2016,11 @@ class ba extends W {
|
|
|
2016
2016
|
throw new Error(`Failed to link program: ${t.getProgramInfoLog(s.native)}`);
|
|
2017
2017
|
const o = /* @__PURE__ */ Object.create(null), n = !/^[ \t]*#[ \t]*version[ \t]+300[ \t]+es[ \t]*$/m.test(e.vertex);
|
|
2018
2018
|
for (let u = t.getProgramParameter(s.native, t.ACTIVE_ATTRIBUTES), d = 0; d < u; d++) {
|
|
2019
|
-
const
|
|
2020
|
-
if (!
|
|
2019
|
+
const f = t.getActiveAttrib(s.native, d);
|
|
2020
|
+
if (!f || f.name.startsWith("gl_"))
|
|
2021
2021
|
continue;
|
|
2022
|
-
const m = va(t,
|
|
2023
|
-
o[
|
|
2022
|
+
const m = va(t, f.type);
|
|
2023
|
+
o[f.name] = {
|
|
2024
2024
|
location: 0,
|
|
2025
2025
|
format: m,
|
|
2026
2026
|
stride: Ot(m).stride,
|
|
@@ -2041,17 +2041,17 @@ class ba extends W {
|
|
|
2041
2041
|
e.attributes = o;
|
|
2042
2042
|
const c = /* @__PURE__ */ Object.create(null);
|
|
2043
2043
|
for (let u = t.getProgramParameter(s.native, t.ACTIVE_UNIFORMS), d = 0; d < u; d++) {
|
|
2044
|
-
const
|
|
2045
|
-
if (!
|
|
2044
|
+
const f = t.getActiveUniform(s.native, d);
|
|
2045
|
+
if (!f)
|
|
2046
2046
|
continue;
|
|
2047
|
-
const m =
|
|
2047
|
+
const m = f.name.replace(/\[.*?\]$/, ""), p = gs(t, f.type), _ = f.size;
|
|
2048
2048
|
c[m] = {
|
|
2049
2049
|
name: m,
|
|
2050
2050
|
index: d,
|
|
2051
|
-
type:
|
|
2051
|
+
type: p,
|
|
2052
2052
|
size: _,
|
|
2053
|
-
isArray: !!
|
|
2054
|
-
value: _a(
|
|
2053
|
+
isArray: !!f.name.match(/\[.*?\]$/),
|
|
2054
|
+
value: _a(p, _)
|
|
2055
2055
|
};
|
|
2056
2056
|
}
|
|
2057
2057
|
return e.uniforms = c, t.deleteShader(i), t.deleteShader(a), s;
|
|
@@ -2076,63 +2076,63 @@ ${s.getShaderInfoLog(i)}`);
|
|
|
2076
2076
|
const l = i[n], c = o[n];
|
|
2077
2077
|
if (!c)
|
|
2078
2078
|
continue;
|
|
2079
|
-
const { type: u, isArray: d, value:
|
|
2080
|
-
if (
|
|
2079
|
+
const { type: u, isArray: d, value: f, name: m } = c;
|
|
2080
|
+
if (f === l)
|
|
2081
2081
|
continue;
|
|
2082
2082
|
c.value = l;
|
|
2083
|
-
const
|
|
2083
|
+
const p = t.getUniformLocation(a.native, m);
|
|
2084
2084
|
switch (u) {
|
|
2085
2085
|
case "float":
|
|
2086
|
-
d ? t.uniform1fv(
|
|
2086
|
+
d ? t.uniform1fv(p, l) : t.uniform1f(p, l);
|
|
2087
2087
|
break;
|
|
2088
2088
|
case "uint":
|
|
2089
|
-
d ? t.uniform1uiv(
|
|
2089
|
+
d ? t.uniform1uiv(p, l) : t.uniform1ui(p, l);
|
|
2090
2090
|
break;
|
|
2091
2091
|
case "bool":
|
|
2092
2092
|
case "int":
|
|
2093
2093
|
case "sampler2D":
|
|
2094
2094
|
case "samplerCube":
|
|
2095
2095
|
case "sampler2DArray":
|
|
2096
|
-
d ? t.uniform1iv(
|
|
2096
|
+
d ? t.uniform1iv(p, l) : t.uniform1i(p, l);
|
|
2097
2097
|
break;
|
|
2098
2098
|
case "bvec2":
|
|
2099
2099
|
case "ivec2":
|
|
2100
|
-
t.uniform2iv(
|
|
2100
|
+
t.uniform2iv(p, l);
|
|
2101
2101
|
break;
|
|
2102
2102
|
case "uvec2":
|
|
2103
|
-
t.uniform2uiv(
|
|
2103
|
+
t.uniform2uiv(p, l);
|
|
2104
2104
|
break;
|
|
2105
2105
|
case "vec2":
|
|
2106
|
-
t.uniform2fv(
|
|
2106
|
+
t.uniform2fv(p, l);
|
|
2107
2107
|
break;
|
|
2108
2108
|
case "bvec3":
|
|
2109
2109
|
case "ivec3":
|
|
2110
|
-
t.uniform3iv(
|
|
2110
|
+
t.uniform3iv(p, l);
|
|
2111
2111
|
break;
|
|
2112
2112
|
case "uvec3":
|
|
2113
|
-
t.uniform3uiv(
|
|
2113
|
+
t.uniform3uiv(p, l);
|
|
2114
2114
|
break;
|
|
2115
2115
|
case "vec3":
|
|
2116
|
-
t.uniform3fv(
|
|
2116
|
+
t.uniform3fv(p, l);
|
|
2117
2117
|
break;
|
|
2118
2118
|
case "bvec4":
|
|
2119
2119
|
case "ivec4":
|
|
2120
|
-
t.uniform4iv(
|
|
2120
|
+
t.uniform4iv(p, l);
|
|
2121
2121
|
break;
|
|
2122
2122
|
case "uvec4":
|
|
2123
|
-
t.uniform4uiv(
|
|
2123
|
+
t.uniform4uiv(p, l);
|
|
2124
2124
|
break;
|
|
2125
2125
|
case "vec4":
|
|
2126
|
-
t.uniform4fv(
|
|
2126
|
+
t.uniform4fv(p, l);
|
|
2127
2127
|
break;
|
|
2128
2128
|
case "mat2":
|
|
2129
|
-
t.uniformMatrix2fv(
|
|
2129
|
+
t.uniformMatrix2fv(p, !1, l);
|
|
2130
2130
|
break;
|
|
2131
2131
|
case "mat3":
|
|
2132
|
-
t.uniformMatrix3fv(
|
|
2132
|
+
t.uniformMatrix3fv(p, !1, l);
|
|
2133
2133
|
break;
|
|
2134
2134
|
case "mat4":
|
|
2135
|
-
t.uniformMatrix4fv(
|
|
2135
|
+
t.uniformMatrix4fv(p, !1, l);
|
|
2136
2136
|
break;
|
|
2137
2137
|
}
|
|
2138
2138
|
}
|
|
@@ -2411,9 +2411,9 @@ ${Array.from({ length: e }, (l, c) => {
|
|
|
2411
2411
|
const i = this._renderer.texture.maxTextureImageUnits, a = this._getBufferData(e), o = new Float32Array(a), n = new Uint8Array(a), l = this._getIndexBufferData(t);
|
|
2412
2412
|
let c = 0, u = 0;
|
|
2413
2413
|
const d = [];
|
|
2414
|
-
let
|
|
2415
|
-
for (let
|
|
2416
|
-
const k = s[C].texture, me = C ===
|
|
2414
|
+
let f = 0;
|
|
2415
|
+
for (let p = s.length, _ = { id: ++f }, g = [], v = /* @__PURE__ */ new Map(), w = 0, S = 0, C = 0; C < p; C++) {
|
|
2416
|
+
const k = s[C].texture, me = C === p - 1;
|
|
2417
2417
|
if (!k || v.has(k)) {
|
|
2418
2418
|
if (!me)
|
|
2419
2419
|
continue;
|
|
@@ -2432,7 +2432,7 @@ ${Array.from({ length: e }, (l, c) => {
|
|
|
2432
2432
|
clipOutsideUv: ei,
|
|
2433
2433
|
roundPixels: ti
|
|
2434
2434
|
} = s[ge];
|
|
2435
|
-
S < ge && _.blendMode !== zr && (_.size = u - _.start, d.push(_), S = ge, _ = { id: ++
|
|
2435
|
+
S < ge && _.blendMode !== zr && (_.size = u - _.start, d.push(_), S = ge, _ = { id: ++f }, _.textures = g, _.start = u);
|
|
2436
2436
|
const { width: Yt, height: Kt } = Qs, ri = c / this._vertexSize, si = (Fr ? v.get(Fr) : 255) ?? 255, ii = ti ? 1 : 0, ai = ei ? 1 : 0;
|
|
2437
2437
|
let xt, wt;
|
|
2438
2438
|
for (let Zt = qt.length, J = 0; J < Zt; J += 2) {
|
|
@@ -2444,12 +2444,12 @@ ${Array.from({ length: e }, (l, c) => {
|
|
|
2444
2444
|
l[u++] = ri + Br[J];
|
|
2445
2445
|
_.blendMode = zr;
|
|
2446
2446
|
}
|
|
2447
|
-
S = C + 1, _.size = u - _.start, d.push(_), _ = { id: ++
|
|
2447
|
+
S = C + 1, _.size = u - _.start, d.push(_), _ = { id: ++f }, g = [], v = /* @__PURE__ */ new Map();
|
|
2448
2448
|
}
|
|
2449
2449
|
}
|
|
2450
2450
|
const m = this._getShader(i);
|
|
2451
2451
|
m.update(o, l);
|
|
2452
|
-
for (let
|
|
2452
|
+
for (let p = d.length, _ = 0; _ < p; _++) {
|
|
2453
2453
|
const g = d[_], { start: v = 0, textures: w, textureLocationMap: S } = g;
|
|
2454
2454
|
for (let C = w.length, k = 0; k < C; k++) {
|
|
2455
2455
|
const me = w[k], ge = S.get(me);
|
|
@@ -2512,7 +2512,7 @@ class Pa extends W {
|
|
|
2512
2512
|
"x" in s && this._renderer.scissor.pop(), "render" in s && (this._renderer.flush(), a !== 0 ? this._renderer.stencil.bind(D.renderingMaskRemove, a) : (this._renderer.clear(it.stencil), this._renderer.stencil.bind(D.disabled, a)), a--, s.render(this._renderer), this._renderer.flush(), this._renderer.stencil.bind(D.maskActive, a), this._renderer.colorMask.bind(15)), this._maskStackHash[i] = a;
|
|
2513
2513
|
}
|
|
2514
2514
|
}
|
|
2515
|
-
var
|
|
2515
|
+
var pr = /* @__PURE__ */ ((r) => (r[r.RGBA = 6408] = "RGBA", r[r.RGB = 6407] = "RGB", r[r.RG = 33319] = "RG", r[r.RED = 6403] = "RED", r[r.RGBA_INTEGER = 36249] = "RGBA_INTEGER", r[r.RGB_INTEGER = 36248] = "RGB_INTEGER", r[r.RG_INTEGER = 33320] = "RG_INTEGER", r[r.RED_INTEGER = 36244] = "RED_INTEGER", r[r.ALPHA = 6406] = "ALPHA", r[r.LUMINANCE = 6409] = "LUMINANCE", r[r.LUMINANCE_ALPHA = 6410] = "LUMINANCE_ALPHA", r[r.DEPTH_COMPONENT = 6402] = "DEPTH_COMPONENT", r[r.DEPTH_STENCIL = 34041] = "DEPTH_STENCIL", r))(pr || {}), vs = /* @__PURE__ */ ((r) => (r[r.TEXTURE_2D = 3553] = "TEXTURE_2D", r[r.TEXTURE_CUBE_MAP = 34067] = "TEXTURE_CUBE_MAP", r[r.TEXTURE_2D_ARRAY = 35866] = "TEXTURE_2D_ARRAY", r[r.TEXTURE_CUBE_MAP_POSITIVE_X = 34069] = "TEXTURE_CUBE_MAP_POSITIVE_X", r[r.TEXTURE_CUBE_MAP_NEGATIVE_X = 34070] = "TEXTURE_CUBE_MAP_NEGATIVE_X", r[r.TEXTURE_CUBE_MAP_POSITIVE_Y = 34071] = "TEXTURE_CUBE_MAP_POSITIVE_Y", r[r.TEXTURE_CUBE_MAP_NEGATIVE_Y = 34072] = "TEXTURE_CUBE_MAP_NEGATIVE_Y", r[r.TEXTURE_CUBE_MAP_POSITIVE_Z = 34073] = "TEXTURE_CUBE_MAP_POSITIVE_Z", r[r.TEXTURE_CUBE_MAP_NEGATIVE_Z = 34074] = "TEXTURE_CUBE_MAP_NEGATIVE_Z", r))(vs || {}), y = /* @__PURE__ */ ((r) => (r[r.UNSIGNED_BYTE = 5121] = "UNSIGNED_BYTE", r[r.UNSIGNED_SHORT = 5123] = "UNSIGNED_SHORT", r[r.UNSIGNED_SHORT_5_6_5 = 33635] = "UNSIGNED_SHORT_5_6_5", r[r.UNSIGNED_SHORT_4_4_4_4 = 32819] = "UNSIGNED_SHORT_4_4_4_4", r[r.UNSIGNED_SHORT_5_5_5_1 = 32820] = "UNSIGNED_SHORT_5_5_5_1", r[r.UNSIGNED_INT = 5125] = "UNSIGNED_INT", r[r.UNSIGNED_INT_10F_11F_11F_REV = 35899] = "UNSIGNED_INT_10F_11F_11F_REV", r[r.UNSIGNED_INT_2_10_10_10_REV = 33640] = "UNSIGNED_INT_2_10_10_10_REV", r[r.UNSIGNED_INT_24_8 = 34042] = "UNSIGNED_INT_24_8", r[r.UNSIGNED_INT_5_9_9_9_REV = 35902] = "UNSIGNED_INT_5_9_9_9_REV", r[r.BYTE = 5120] = "BYTE", r[r.SHORT = 5122] = "SHORT", r[r.INT = 5124] = "INT", r[r.FLOAT = 5126] = "FLOAT", r[r.FLOAT_32_UNSIGNED_INT_24_8_REV = 36269] = "FLOAT_32_UNSIGNED_INT_24_8_REV", r[r.HALF_FLOAT = 36193] = "HALF_FLOAT", r))(y || {});
|
|
2516
2516
|
class Ea {
|
|
2517
2517
|
constructor(e) {
|
|
2518
2518
|
this.native = e;
|
|
@@ -2522,8 +2522,8 @@ class Ea {
|
|
|
2522
2522
|
height = -1;
|
|
2523
2523
|
mipmap = !1;
|
|
2524
2524
|
type = y.UNSIGNED_BYTE;
|
|
2525
|
-
internalFormat =
|
|
2526
|
-
format =
|
|
2525
|
+
internalFormat = pr.RGBA;
|
|
2526
|
+
format = pr.RGBA;
|
|
2527
2527
|
}
|
|
2528
2528
|
function Sa(r) {
|
|
2529
2529
|
return {
|
|
@@ -2787,9 +2787,9 @@ function Oa(r, e, t, s, i, a, o, n) {
|
|
|
2787
2787
|
addressModeV: c = "repeat",
|
|
2788
2788
|
addressModeW: u = "repeat",
|
|
2789
2789
|
magFilter: d = "linear",
|
|
2790
|
-
minFilter:
|
|
2790
|
+
minFilter: f = "linear",
|
|
2791
2791
|
mipmapFilter: m = "linear",
|
|
2792
|
-
maxAnisotropy:
|
|
2792
|
+
maxAnisotropy: p = 0,
|
|
2793
2793
|
compare: _
|
|
2794
2794
|
} = r, g = a;
|
|
2795
2795
|
if (!n || l !== "repeat" || c !== "repeat" || u !== "repeat") {
|
|
@@ -2798,13 +2798,13 @@ function Oa(r, e, t, s, i, a, o, n) {
|
|
|
2798
2798
|
}
|
|
2799
2799
|
if ((!n || d !== "linear") && e[i](g, e.TEXTURE_MAG_FILTER, Kr[d]), t) {
|
|
2800
2800
|
if (!n || m !== "linear") {
|
|
2801
|
-
const v = Aa[
|
|
2801
|
+
const v = Aa[f][m];
|
|
2802
2802
|
e[i](g, e.TEXTURE_MIN_FILTER, v);
|
|
2803
2803
|
}
|
|
2804
2804
|
} else
|
|
2805
|
-
e[i](g, e.TEXTURE_MIN_FILTER, Kr[
|
|
2806
|
-
if (s &&
|
|
2807
|
-
const v = Math.min(
|
|
2805
|
+
e[i](g, e.TEXTURE_MIN_FILTER, Kr[f]);
|
|
2806
|
+
if (s && p > 1) {
|
|
2807
|
+
const v = Math.min(p, e.getParameter(s.MAX_TEXTURE_MAX_ANISOTROPY_EXT));
|
|
2808
2808
|
e[i](g, s.TEXTURE_MAX_ANISOTROPY_EXT, v);
|
|
2809
2809
|
}
|
|
2810
2810
|
_ && e[i](g, e.TEXTURE_COMPARE_FUNC, Ca[_]);
|
|
@@ -3143,26 +3143,26 @@ class Ba extends W {
|
|
|
3143
3143
|
const l = a[n], c = l.buffer, u = i.getGlBuffer(c), d = t.attributes[n];
|
|
3144
3144
|
if (d) {
|
|
3145
3145
|
o !== u && (i.bind(c), o = u);
|
|
3146
|
-
const
|
|
3147
|
-
s.enableVertexAttribArray(
|
|
3148
|
-
const m = Ot(l.format),
|
|
3146
|
+
const f = d.location;
|
|
3147
|
+
s.enableVertexAttribArray(f);
|
|
3148
|
+
const m = Ot(l.format), p = ka(l.format);
|
|
3149
3149
|
if (d.format?.substring(1, 4) === "int" ? s.vertexAttribIPointer(
|
|
3150
|
-
p,
|
|
3151
|
-
m.size,
|
|
3152
3150
|
f,
|
|
3151
|
+
m.size,
|
|
3152
|
+
p,
|
|
3153
3153
|
l.stride ?? 0,
|
|
3154
3154
|
l.start ?? 0
|
|
3155
3155
|
) : s.vertexAttribPointer(
|
|
3156
|
-
p,
|
|
3157
|
-
m.size,
|
|
3158
3156
|
f,
|
|
3157
|
+
m.size,
|
|
3158
|
+
p,
|
|
3159
3159
|
m.normalized,
|
|
3160
3160
|
l.stride ?? 0,
|
|
3161
3161
|
l.start ?? 0
|
|
3162
3162
|
), l.instance)
|
|
3163
3163
|
if (this.hasInstance) {
|
|
3164
3164
|
const _ = l.divisor ?? 1;
|
|
3165
|
-
s.vertexAttribDivisor(
|
|
3165
|
+
s.vertexAttribDivisor(f, _);
|
|
3166
3166
|
} else
|
|
3167
3167
|
throw new Error("geometry error, GPU Instancing is not supported on this device");
|
|
3168
3168
|
}
|
|
@@ -3228,15 +3228,15 @@ class La extends W {
|
|
|
3228
3228
|
}
|
|
3229
3229
|
}
|
|
3230
3230
|
function Tt(r, e, t) {
|
|
3231
|
-
const [s, i, a, o, n, l, c, u, d] = r,
|
|
3232
|
-
return { x:
|
|
3231
|
+
const [s, i, a, o, n, l, c, u, d] = r, f = s * e + o * t + c, m = i * e + n * t + u, p = a * e + l * t + d;
|
|
3232
|
+
return { x: f / p, y: m / p };
|
|
3233
3233
|
}
|
|
3234
3234
|
function Fa(r, e) {
|
|
3235
|
-
const { x: t, y: s, width: i, height: a } = e, o = Tt(r, t, s), n = Tt(r, t + i, s), l = Tt(r, t + i, s + a), c = Tt(r, t, s + a), u = [o, n, l, c], d = u.map((v) => v.x),
|
|
3235
|
+
const { x: t, y: s, width: i, height: a } = e, o = Tt(r, t, s), n = Tt(r, t + i, s), l = Tt(r, t + i, s + a), c = Tt(r, t, s + a), u = [o, n, l, c], d = u.map((v) => v.x), f = u.map((v) => v.y), m = Math.min(...d), p = Math.max(...d), _ = Math.min(...f), g = Math.max(...f);
|
|
3236
3236
|
return {
|
|
3237
3237
|
x: m,
|
|
3238
3238
|
y: _,
|
|
3239
|
-
width:
|
|
3239
|
+
width: p - m,
|
|
3240
3240
|
height: g - _
|
|
3241
3241
|
};
|
|
3242
3242
|
}
|
|
@@ -4302,7 +4302,7 @@ class $t extends x {
|
|
|
4302
4302
|
const a = i.getContext("2d");
|
|
4303
4303
|
if (!a)
|
|
4304
4304
|
throw new Error("Failed to parse linear gradient, get canvas context is null.");
|
|
4305
|
-
const { angle: o = 0, stops: n } = e, l = t, c = s, u = l / 2, d = c / 2,
|
|
4305
|
+
const { angle: o = 0, stops: n } = e, l = t, c = s, u = l / 2, d = c / 2, f = (o + 90) * Math.PI / 180, m = Math.sin(f), p = -Math.cos(f), _ = Math.abs(l * Math.sin(f)) + Math.abs(c * Math.cos(f)), g = u - m * (_ / 2), v = d - p * (_ / 2), w = u + m * (_ / 2), S = d + p * (_ / 2), C = a.createLinearGradient(g, v, w, S);
|
|
4306
4306
|
for (const me of n) C.addColorStop(me.offset, me.color);
|
|
4307
4307
|
a.fillStyle = C, a.fillRect(0, 0, l, c);
|
|
4308
4308
|
const k = a.getImageData(0, 0, i.width, i.height);
|
|
@@ -4617,7 +4617,7 @@ class uo {
|
|
|
4617
4617
|
return [...this.default];
|
|
4618
4618
|
}
|
|
4619
4619
|
}
|
|
4620
|
-
class
|
|
4620
|
+
class fo extends Ee {
|
|
4621
4621
|
constructor(e) {
|
|
4622
4622
|
return super(), this.parent = e, new Proxy(this, {
|
|
4623
4623
|
get: (t, s, i) => Reflect.has(t, s) || String(s).startsWith("_") ? Reflect.get(t, s, i) : t.getProperty(String(s)),
|
|
@@ -4637,10 +4637,10 @@ class po extends Ee {
|
|
|
4637
4637
|
return { internalKey: `____${e}` };
|
|
4638
4638
|
}
|
|
4639
4639
|
}
|
|
4640
|
-
var
|
|
4640
|
+
var po = Object.defineProperty, _o = Object.getOwnPropertyDescriptor, se = (r, e, t, s) => {
|
|
4641
4641
|
for (var i = s > 1 ? void 0 : s ? _o(e, t) : e, a = r.length - 1, o; a >= 0; a--)
|
|
4642
4642
|
(o = r[a]) && (i = (s ? o(e, t, i) : o(i)) || i);
|
|
4643
|
-
return s && i &&
|
|
4643
|
+
return s && i && po(e, t, i), i;
|
|
4644
4644
|
};
|
|
4645
4645
|
const Jr = {};
|
|
4646
4646
|
function mo(r) {
|
|
@@ -4648,7 +4648,7 @@ function mo(r) {
|
|
|
4648
4648
|
return e++, Jr[r] = e, e;
|
|
4649
4649
|
}
|
|
4650
4650
|
let I = class extends Ee {
|
|
4651
|
-
_meta = new
|
|
4651
|
+
_meta = new fo(this);
|
|
4652
4652
|
get meta() {
|
|
4653
4653
|
return this._meta;
|
|
4654
4654
|
}
|
|
@@ -5260,8 +5260,8 @@ let Ge = class extends q {
|
|
|
5260
5260
|
1 + -a / e.height
|
|
5261
5261
|
), l = new Float32Array(o.length);
|
|
5262
5262
|
for (let c = o.length, u = 0; u < c; u += 2) {
|
|
5263
|
-
const { x: d, y:
|
|
5264
|
-
l[u] = d, l[u + 1] =
|
|
5263
|
+
const { x: d, y: f } = n.apply({ x: o[u], y: o[u + 1] });
|
|
5264
|
+
l[u] = d, l[u + 1] = f;
|
|
5265
5265
|
}
|
|
5266
5266
|
return r.uvs = l, e.texture;
|
|
5267
5267
|
}
|
|
@@ -5394,7 +5394,7 @@ Le([
|
|
|
5394
5394
|
X = Le([
|
|
5395
5395
|
b("Viewport")
|
|
5396
5396
|
], X);
|
|
5397
|
-
var Po = Object.defineProperty, Eo = Object.getOwnPropertyDescriptor,
|
|
5397
|
+
var Po = Object.defineProperty, Eo = Object.getOwnPropertyDescriptor, pt = (r, e, t, s) => {
|
|
5398
5398
|
for (var i = s > 1 ? void 0 : s ? Eo(e, t) : e, a = r.length - 1, o; a >= 0; a--)
|
|
5399
5399
|
(o = r[a]) && (i = (s ? o(e, t, i) : o(i)) || i);
|
|
5400
5400
|
return s && i && Po(e, t, i), i;
|
|
@@ -5586,19 +5586,19 @@ let T = class extends q {
|
|
|
5586
5586
|
}));
|
|
5587
5587
|
}
|
|
5588
5588
|
};
|
|
5589
|
-
|
|
5589
|
+
pt([
|
|
5590
5590
|
h({ internal: !0 })
|
|
5591
5591
|
], T.prototype, "material", 2);
|
|
5592
|
-
|
|
5592
|
+
pt([
|
|
5593
5593
|
h()
|
|
5594
5594
|
], T.prototype, "effectMode", 2);
|
|
5595
|
-
|
|
5595
|
+
pt([
|
|
5596
5596
|
h()
|
|
5597
5597
|
], T.prototype, "glsl", 2);
|
|
5598
|
-
|
|
5598
|
+
pt([
|
|
5599
5599
|
h()
|
|
5600
5600
|
], T.prototype, "glslSrc", 2);
|
|
5601
|
-
T =
|
|
5601
|
+
T = pt([
|
|
5602
5602
|
b("Effect")
|
|
5603
5603
|
], T);
|
|
5604
5604
|
class So {
|
|
@@ -5652,20 +5652,10 @@ let xe = class extends I {
|
|
|
5652
5652
|
}
|
|
5653
5653
|
return this;
|
|
5654
5654
|
}
|
|
5655
|
-
_updateProperty(r, e, t) {
|
|
5656
|
-
switch (super._updateProperty(r, e, t), r) {
|
|
5657
|
-
case "startTime":
|
|
5658
|
-
this.startTime = Math.min(e, this.endTime);
|
|
5659
|
-
break;
|
|
5660
|
-
case "endTime":
|
|
5661
|
-
this.endTime = e || Number.MAX_SAFE_INTEGER;
|
|
5662
|
-
break;
|
|
5663
|
-
}
|
|
5664
|
-
}
|
|
5665
5655
|
addTime(r) {
|
|
5666
|
-
const e = this.
|
|
5656
|
+
const e = this.endTime, t = Math.min(this.startTime, this.endTime);
|
|
5667
5657
|
let s = this.currentTime;
|
|
5668
|
-
return s = s + r, this.loop && s >
|
|
5658
|
+
return s = s + r, this.loop && s > e && (s = t + s % e), s = ce(s, t, e), this.currentTime = s, this.emit("updateCurrentTime", s, r), this;
|
|
5669
5659
|
}
|
|
5670
5660
|
_process(r) {
|
|
5671
5661
|
super._process(r), this.paused || this.addTime(r);
|
|
@@ -5713,7 +5703,7 @@ var Oo = Object.defineProperty, Te = (r, e, t, s) => {
|
|
|
5713
5703
|
(o = r[a]) && (i = o(e, t, i) || i);
|
|
5714
5704
|
return i && Oo(e, t, i), i;
|
|
5715
5705
|
};
|
|
5716
|
-
class
|
|
5706
|
+
class fe extends wr {
|
|
5717
5707
|
input = new Zi();
|
|
5718
5708
|
renderStack = new So();
|
|
5719
5709
|
root = new _r().setTree(this);
|
|
@@ -5762,28 +5752,28 @@ class pe extends wr {
|
|
|
5762
5752
|
}
|
|
5763
5753
|
Te([
|
|
5764
5754
|
h({ alias: "root.msaa" })
|
|
5765
|
-
],
|
|
5755
|
+
], fe.prototype, "msaa");
|
|
5766
5756
|
Te([
|
|
5767
5757
|
h({ fallback: !1 })
|
|
5768
|
-
],
|
|
5758
|
+
], fe.prototype, "pixelate");
|
|
5769
5759
|
Te([
|
|
5770
5760
|
h({ fallback: !1 })
|
|
5771
|
-
],
|
|
5761
|
+
], fe.prototype, "roundPixels");
|
|
5772
5762
|
Te([
|
|
5773
5763
|
h()
|
|
5774
|
-
],
|
|
5764
|
+
], fe.prototype, "backgroundColor");
|
|
5775
5765
|
Te([
|
|
5776
5766
|
h({ internal: !0, fallback: !1 })
|
|
5777
|
-
],
|
|
5767
|
+
], fe.prototype, "debug");
|
|
5778
5768
|
Te([
|
|
5779
5769
|
h({ internal: !0, fallback: !1 })
|
|
5780
|
-
],
|
|
5770
|
+
], fe.prototype, "processPaused");
|
|
5781
5771
|
Te([
|
|
5782
5772
|
h({ internal: !0, default: () => yi })
|
|
5783
|
-
],
|
|
5773
|
+
], fe.prototype, "fonts");
|
|
5784
5774
|
Te([
|
|
5785
5775
|
h({ internal: !0, default: () => new xe() })
|
|
5786
|
-
],
|
|
5776
|
+
], fe.prototype, "timeline");
|
|
5787
5777
|
var Do = Object.getOwnPropertyDescriptor, Io = (r, e, t, s) => {
|
|
5788
5778
|
for (var i = s > 1 ? void 0 : s ? Do(e, t) : e, a = r.length - 1, o; a >= 0; a--)
|
|
5789
5779
|
(o = r[a]) && (i = o(i) || i);
|
|
@@ -5847,8 +5837,8 @@ let Ie = class extends Ge {
|
|
|
5847
5837
|
const { a: e, c: t, tx: s, b: i, d: a, ty: o } = this.globalTransform.toObject(), n = r.vertices.slice(), l = r.transformVertex ?? (() => {
|
|
5848
5838
|
});
|
|
5849
5839
|
let c, u;
|
|
5850
|
-
for (let d = n.length,
|
|
5851
|
-
c = n[
|
|
5840
|
+
for (let d = n.length, f = 0; f < d; f += 2)
|
|
5841
|
+
c = n[f], u = n[f + 1], n[f] = e * c + t * u + s, n[f + 1] = i * c + a * u + o, l(n, f);
|
|
5852
5842
|
return n;
|
|
5853
5843
|
}
|
|
5854
5844
|
_relayout(r) {
|
|
@@ -6021,7 +6011,7 @@ const Qr = {
|
|
|
6021
6011
|
sepia: 0
|
|
6022
6012
|
};
|
|
6023
6013
|
function gc(r) {
|
|
6024
|
-
const e = new
|
|
6014
|
+
const e = new fs();
|
|
6025
6015
|
if (r === "none")
|
|
6026
6016
|
return e;
|
|
6027
6017
|
const t = zt(r).reduce((s, { name: i, args: a }) => (s[i] = a[0].normalizedIntValue, s), {});
|
|
@@ -6032,7 +6022,7 @@ function gc(r) {
|
|
|
6032
6022
|
const i = t[s];
|
|
6033
6023
|
switch (s) {
|
|
6034
6024
|
case "hue-rotate":
|
|
6035
|
-
e.hueRotate(i *
|
|
6025
|
+
e.hueRotate(i * G);
|
|
6036
6026
|
break;
|
|
6037
6027
|
case "saturate":
|
|
6038
6028
|
e.saturate(i);
|
|
@@ -6095,23 +6085,23 @@ function Bo(r, e, t, s = new M()) {
|
|
|
6095
6085
|
s.scale3d(o[0], o[1] ?? o[0], o[2] ?? o[1] ?? o[0]);
|
|
6096
6086
|
break;
|
|
6097
6087
|
case "rotate":
|
|
6098
|
-
s.rotate(o[0] *
|
|
6088
|
+
s.rotate(o[0] * G);
|
|
6099
6089
|
break;
|
|
6100
6090
|
case "rotateX":
|
|
6101
|
-
s.rotateX(o[0] *
|
|
6091
|
+
s.rotateX(o[0] * G);
|
|
6102
6092
|
break;
|
|
6103
6093
|
case "rotateY":
|
|
6104
|
-
s.rotateY(o[0] *
|
|
6094
|
+
s.rotateY(o[0] * G);
|
|
6105
6095
|
break;
|
|
6106
6096
|
case "rotateZ":
|
|
6107
|
-
s.rotateZ(o[0] *
|
|
6097
|
+
s.rotateZ(o[0] * G);
|
|
6108
6098
|
break;
|
|
6109
6099
|
case "rotate3d":
|
|
6110
6100
|
s.rotate3d(
|
|
6111
|
-
o[0] *
|
|
6112
|
-
(o[1] ?? o[0]) *
|
|
6113
|
-
(o[2] ?? o[1] ?? o[0]) *
|
|
6114
|
-
(o[3] ?? o[2] ?? o[1] ?? o[0]) *
|
|
6101
|
+
o[0] * G,
|
|
6102
|
+
(o[1] ?? o[0]) * G,
|
|
6103
|
+
(o[2] ?? o[1] ?? o[0]) * G,
|
|
6104
|
+
(o[3] ?? o[2] ?? o[1] ?? o[0]) * G
|
|
6115
6105
|
);
|
|
6116
6106
|
break;
|
|
6117
6107
|
case "skew":
|
|
@@ -6146,7 +6136,7 @@ function Lo(r) {
|
|
|
6146
6136
|
}
|
|
6147
6137
|
});
|
|
6148
6138
|
}
|
|
6149
|
-
var Es = Object.defineProperty, Fo = Object.getOwnPropertyDescriptor, zo = (r, e, t) => e in r ? Es(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t,
|
|
6139
|
+
var Es = Object.defineProperty, Fo = Object.getOwnPropertyDescriptor, zo = (r, e, t) => e in r ? Es(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, pe = (r, e, t, s) => {
|
|
6150
6140
|
for (var i = s > 1 ? void 0 : s ? Fo(e, t) : e, a = r.length - 1, o; a >= 0; a--)
|
|
6151
6141
|
(o = r[a]) && (i = (s ? o(e, t, i) : o(i)) || i);
|
|
6152
6142
|
return s && i && Es(e, t, i), i;
|
|
@@ -6208,31 +6198,31 @@ void main(void) {
|
|
|
6208
6198
|
}`
|
|
6209
6199
|
}
|
|
6210
6200
|
}));
|
|
6211
|
-
|
|
6201
|
+
pe([
|
|
6212
6202
|
h({ fallback: 1 })
|
|
6213
6203
|
], j.prototype, "saturation", 2);
|
|
6214
|
-
|
|
6204
|
+
pe([
|
|
6215
6205
|
h({ fallback: 1 })
|
|
6216
6206
|
], j.prototype, "contrast", 2);
|
|
6217
|
-
|
|
6207
|
+
pe([
|
|
6218
6208
|
h({ fallback: 1 })
|
|
6219
6209
|
], j.prototype, "brightness", 2);
|
|
6220
|
-
|
|
6210
|
+
pe([
|
|
6221
6211
|
h({ fallback: 1 })
|
|
6222
6212
|
], j.prototype, "red", 2);
|
|
6223
|
-
|
|
6213
|
+
pe([
|
|
6224
6214
|
h({ fallback: 1 })
|
|
6225
6215
|
], j.prototype, "green", 2);
|
|
6226
|
-
|
|
6216
|
+
pe([
|
|
6227
6217
|
h({ fallback: 1 })
|
|
6228
6218
|
], j.prototype, "blue", 2);
|
|
6229
|
-
|
|
6219
|
+
pe([
|
|
6230
6220
|
h({ fallback: 1 })
|
|
6231
6221
|
], j.prototype, "alpha", 2);
|
|
6232
|
-
|
|
6222
|
+
pe([
|
|
6233
6223
|
h({ fallback: 1 })
|
|
6234
6224
|
], j.prototype, "gamma", 2);
|
|
6235
|
-
j =
|
|
6225
|
+
j = pe([
|
|
6236
6226
|
b("ColorAdjustEffect")
|
|
6237
6227
|
], j);
|
|
6238
6228
|
var Ss = Object.defineProperty, Vo = Object.getOwnPropertyDescriptor, $o = (r, e, t) => e in r ? Ss(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, Ts = (r, e, t, s) => {
|
|
@@ -6241,7 +6231,7 @@ var Ss = Object.defineProperty, Vo = Object.getOwnPropertyDescriptor, $o = (r, e
|
|
|
6241
6231
|
return s && i && Ss(e, t, i), i;
|
|
6242
6232
|
}, Ho = (r, e, t) => $o(r, e + "", t);
|
|
6243
6233
|
let $e = class extends T {
|
|
6244
|
-
_colorMatrix = new
|
|
6234
|
+
_colorMatrix = new fs();
|
|
6245
6235
|
constructor(r, e = []) {
|
|
6246
6236
|
super(), this.setProperties(r).append(e);
|
|
6247
6237
|
}
|
|
@@ -6257,7 +6247,7 @@ let $e = class extends T {
|
|
|
6257
6247
|
switch (i) {
|
|
6258
6248
|
case "hue-rotate":
|
|
6259
6249
|
case "hueRotate":
|
|
6260
|
-
s.hueRotate(o[0] *
|
|
6250
|
+
s.hueRotate(o[0] * G);
|
|
6261
6251
|
break;
|
|
6262
6252
|
case "saturate":
|
|
6263
6253
|
s.saturate(o[0]);
|
|
@@ -7052,12 +7042,12 @@ Us([
|
|
|
7052
7042
|
lt = Us([
|
|
7053
7043
|
b("EmbossEffect")
|
|
7054
7044
|
], lt);
|
|
7055
|
-
var Bs = Object.defineProperty,
|
|
7056
|
-
for (var i = s > 1 ? void 0 : s ?
|
|
7045
|
+
var Bs = Object.defineProperty, fn = Object.getOwnPropertyDescriptor, pn = (r, e, t) => e in r ? Bs(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, ie = (r, e, t, s) => {
|
|
7046
|
+
for (var i = s > 1 ? void 0 : s ? fn(e, t) : e, a = r.length - 1, o; a >= 0; a--)
|
|
7057
7047
|
(o = r[a]) && (i = (s ? o(e, t, i) : o(i)) || i);
|
|
7058
7048
|
return s && i && Bs(e, t, i), i;
|
|
7059
|
-
}, _n = (r, e, t) =>
|
|
7060
|
-
let
|
|
7049
|
+
}, _n = (r, e, t) => pn(r, e + "", t);
|
|
7050
|
+
let V = class extends T {
|
|
7061
7051
|
_canvas;
|
|
7062
7052
|
_texture;
|
|
7063
7053
|
_sizes;
|
|
@@ -7081,7 +7071,7 @@ let G = class extends T {
|
|
|
7081
7071
|
this._needsRedraw || (this._needsRedraw = !0, this.redraw());
|
|
7082
7072
|
const t = e.width, s = e.height, i = this.direction * (Math.PI / 180), a = Math.sin(i), o = Math.cos(i);
|
|
7083
7073
|
e.redraw(r, () => {
|
|
7084
|
-
this._texture.activate(r, 1), P.draw(r,
|
|
7074
|
+
this._texture.activate(r, 1), P.draw(r, V.material, {
|
|
7085
7075
|
sampler: 0,
|
|
7086
7076
|
filterClamp: [0, 0, 1, 1],
|
|
7087
7077
|
filterArea: [t, s, 0, 0],
|
|
@@ -7100,7 +7090,7 @@ let G = class extends T {
|
|
|
7100
7090
|
});
|
|
7101
7091
|
}
|
|
7102
7092
|
};
|
|
7103
|
-
_n(
|
|
7093
|
+
_n(V, "material", new E({
|
|
7104
7094
|
gl: {
|
|
7105
7095
|
vertex: `in vec2 position;
|
|
7106
7096
|
in vec2 uv;
|
|
@@ -7207,34 +7197,34 @@ void main(void) {
|
|
|
7207
7197
|
}));
|
|
7208
7198
|
ie([
|
|
7209
7199
|
h({ fallback: 10 })
|
|
7210
|
-
],
|
|
7200
|
+
], V.prototype, "slices", 2);
|
|
7211
7201
|
ie([
|
|
7212
7202
|
h({ fallback: 512 })
|
|
7213
|
-
],
|
|
7203
|
+
], V.prototype, "sampleSize", 2);
|
|
7214
7204
|
ie([
|
|
7215
7205
|
h({ fallback: 100 })
|
|
7216
|
-
],
|
|
7206
|
+
], V.prototype, "offset", 2);
|
|
7217
7207
|
ie([
|
|
7218
7208
|
h({ fallback: 0 })
|
|
7219
|
-
],
|
|
7209
|
+
], V.prototype, "direction", 2);
|
|
7220
7210
|
ie([
|
|
7221
7211
|
h({ fallback: 2 })
|
|
7222
|
-
],
|
|
7212
|
+
], V.prototype, "fillMode", 2);
|
|
7223
7213
|
ie([
|
|
7224
7214
|
h({ fallback: 0 })
|
|
7225
|
-
],
|
|
7215
|
+
], V.prototype, "seed", 2);
|
|
7226
7216
|
ie([
|
|
7227
7217
|
h({ default: () => [2, 2] })
|
|
7228
|
-
],
|
|
7218
|
+
], V.prototype, "red", 2);
|
|
7229
7219
|
ie([
|
|
7230
7220
|
h({ default: () => [-10, 4] })
|
|
7231
|
-
],
|
|
7221
|
+
], V.prototype, "green", 2);
|
|
7232
7222
|
ie([
|
|
7233
7223
|
h({ default: () => [10, -4] })
|
|
7234
|
-
],
|
|
7235
|
-
|
|
7224
|
+
], V.prototype, "blue", 2);
|
|
7225
|
+
V = ie([
|
|
7236
7226
|
b("GlitchEffect")
|
|
7237
|
-
],
|
|
7227
|
+
], V);
|
|
7238
7228
|
var Ls = Object.defineProperty, mn = Object.getOwnPropertyDescriptor, gn = (r, e, t) => e in r ? Ls(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, Ae = (r, e, t, s) => {
|
|
7239
7229
|
for (var i = s > 1 ? void 0 : s ? mn(e, t) : e, a = r.length - 1, o; a >= 0; a--)
|
|
7240
7230
|
(o = r[a]) && (i = (s ? o(e, t, i) : o(i)) || i);
|
|
@@ -7927,12 +7917,12 @@ function kt(r, e) {
|
|
|
7927
7917
|
1 / Math.abs(1 + (-v - S))
|
|
7928
7918
|
), o = !0;
|
|
7929
7919
|
}
|
|
7930
|
-
const { a: l, c, tx: u, b: d, d:
|
|
7931
|
-
let
|
|
7920
|
+
const { a: l, c, tx: u, b: d, d: f, ty: m } = n.toObject();
|
|
7921
|
+
let p, _;
|
|
7932
7922
|
return {
|
|
7933
7923
|
clipOutsideUv: o,
|
|
7934
7924
|
transformUv: (g, v) => {
|
|
7935
|
-
|
|
7925
|
+
p = g[v], _ = g[v + 1], g[v] = l * p + c * _ + u, g[v + 1] = d * p + f * _ + m;
|
|
7936
7926
|
}
|
|
7937
7927
|
};
|
|
7938
7928
|
}
|
|
@@ -7952,7 +7942,7 @@ class F extends Ee {
|
|
|
7952
7942
|
}
|
|
7953
7943
|
setProperties(e) {
|
|
7954
7944
|
return this._setProperties(
|
|
7955
|
-
|
|
7945
|
+
z(e) ? void 0 : li(e)
|
|
7956
7946
|
);
|
|
7957
7947
|
}
|
|
7958
7948
|
_updateProperty(e, t, s) {
|
|
@@ -7981,7 +7971,7 @@ class F extends Ee {
|
|
|
7981
7971
|
Math.floor(this.parent.size.width),
|
|
7982
7972
|
Math.floor(this.parent.size.height)
|
|
7983
7973
|
);
|
|
7984
|
-
else if (
|
|
7974
|
+
else if (z(this.image))
|
|
7985
7975
|
this.animatedTexture = void 0, this.texture = void 0;
|
|
7986
7976
|
else if (this.parent.tree?.log(`load image ${this.image}`), this.image !== "viewport") {
|
|
7987
7977
|
let e = this.image.split("?")[0].endsWith(".gif");
|
|
@@ -8074,7 +8064,7 @@ var Bn = Object.defineProperty, Ln = (r, e, t, s) => {
|
|
|
8074
8064
|
class Xs extends F {
|
|
8075
8065
|
setProperties(e) {
|
|
8076
8066
|
return super._setProperties(
|
|
8077
|
-
|
|
8067
|
+
z(e) ? void 0 : ci(e)
|
|
8078
8068
|
);
|
|
8079
8069
|
}
|
|
8080
8070
|
_updateProperty(e, t, s) {
|
|
@@ -8092,7 +8082,7 @@ var Fn = Object.defineProperty, zn = (r, e, t, s) => {
|
|
|
8092
8082
|
class js extends F {
|
|
8093
8083
|
setProperties(e) {
|
|
8094
8084
|
return super._setProperties(
|
|
8095
|
-
|
|
8085
|
+
z(e) ? void 0 : hi(e)
|
|
8096
8086
|
);
|
|
8097
8087
|
}
|
|
8098
8088
|
_updateProperty(e, t, s) {
|
|
@@ -8110,7 +8100,7 @@ var Gn = Object.defineProperty, gt = (r, e, t, s) => {
|
|
|
8110
8100
|
class Ke extends F {
|
|
8111
8101
|
setProperties(e) {
|
|
8112
8102
|
return super._setProperties(
|
|
8113
|
-
|
|
8103
|
+
z(e) ? void 0 : ui(e)
|
|
8114
8104
|
);
|
|
8115
8105
|
}
|
|
8116
8106
|
_updateProperty(e, t, s) {
|
|
@@ -8160,7 +8150,7 @@ class Ze extends Ee {
|
|
|
8160
8150
|
}
|
|
8161
8151
|
setProperties(e) {
|
|
8162
8152
|
return super.setProperties(
|
|
8163
|
-
|
|
8153
|
+
z(e) ? void 0 : di(e)
|
|
8164
8154
|
);
|
|
8165
8155
|
}
|
|
8166
8156
|
_updateProperty(e, t, s) {
|
|
@@ -8206,7 +8196,7 @@ class Je extends Ee {
|
|
|
8206
8196
|
_path2DSet = new Pi();
|
|
8207
8197
|
setProperties(e) {
|
|
8208
8198
|
return super.setProperties(
|
|
8209
|
-
|
|
8199
|
+
z(e) ? void 0 : fi(e)
|
|
8210
8200
|
);
|
|
8211
8201
|
}
|
|
8212
8202
|
_updateProperty(e, t, s) {
|
|
@@ -8276,7 +8266,7 @@ class Ws extends de {
|
|
|
8276
8266
|
}
|
|
8277
8267
|
}
|
|
8278
8268
|
const es = {
|
|
8279
|
-
...
|
|
8269
|
+
...pi(),
|
|
8280
8270
|
left: 0,
|
|
8281
8271
|
top: 0,
|
|
8282
8272
|
width: 0,
|
|
@@ -8294,6 +8284,13 @@ class ae extends Ee {
|
|
|
8294
8284
|
super(), this.parent = e, this.base = new Ti(), this.base.setPropertyAccessor(this);
|
|
8295
8285
|
}
|
|
8296
8286
|
base;
|
|
8287
|
+
get innerText() {
|
|
8288
|
+
return this._innerText;
|
|
8289
|
+
}
|
|
8290
|
+
set innerText(e) {
|
|
8291
|
+
this.setContent(e);
|
|
8292
|
+
}
|
|
8293
|
+
_innerText = "";
|
|
8297
8294
|
_autoDrawMode;
|
|
8298
8295
|
_autoDrawThreshold = 100;
|
|
8299
8296
|
_texture = new xs({
|
|
@@ -8302,7 +8299,7 @@ class ae extends Ee {
|
|
|
8302
8299
|
_textureMap = /* @__PURE__ */ new Map();
|
|
8303
8300
|
setProperties(e) {
|
|
8304
8301
|
return super.setProperties(
|
|
8305
|
-
|
|
8302
|
+
z(e) ? void 0 : _i(e)
|
|
8306
8303
|
);
|
|
8307
8304
|
}
|
|
8308
8305
|
_updateProperty(e, t, s) {
|
|
@@ -8321,6 +8318,7 @@ class ae extends Ee {
|
|
|
8321
8318
|
this.update(), this._updateTextureMap();
|
|
8322
8319
|
break;
|
|
8323
8320
|
}
|
|
8321
|
+
e === "content" && (this._innerText = this.getStringContent());
|
|
8324
8322
|
}
|
|
8325
8323
|
update() {
|
|
8326
8324
|
this.base.fonts = this.base.fonts ?? this.parent.tree?.fonts, this.base.update();
|
|
@@ -8362,7 +8360,7 @@ class ae extends Ee {
|
|
|
8362
8360
|
e.linearGradient ?? e.radialGradient,
|
|
8363
8361
|
t.width,
|
|
8364
8362
|
t.height
|
|
8365
|
-
) :
|
|
8363
|
+
) : z(e.image) ? void 0 : (this.parent.tree?.log(`load image ${e.image}`), await $.texture.load(e.image));
|
|
8366
8364
|
}
|
|
8367
8365
|
setContent(e) {
|
|
8368
8366
|
this.content = mi(e);
|
|
@@ -8381,9 +8379,9 @@ class ae extends Ee {
|
|
|
8381
8379
|
if (e.scale.x > 0 && e.scale.y > 0)
|
|
8382
8380
|
return;
|
|
8383
8381
|
const t = e.scale.x * e.scale.y, s = e.pivot, i = new M().translate(-s.x, -s.y).scale(t > 0 ? 1 : -1, 1).translate(s.x, s.y), { a, c: o, tx: n, b: l, d: c, ty: u } = i.toObject();
|
|
8384
|
-
let d,
|
|
8385
|
-
return (m,
|
|
8386
|
-
d = m[
|
|
8382
|
+
let d, f;
|
|
8383
|
+
return (m, p) => {
|
|
8384
|
+
d = m[p], f = m[p + 1], m[p] = a * d + o * f + n, m[p + 1] = l * d + c * f + u;
|
|
8387
8385
|
};
|
|
8388
8386
|
}
|
|
8389
8387
|
useTextureDraw() {
|
|
@@ -8396,7 +8394,7 @@ class ae extends Ee {
|
|
|
8396
8394
|
const i = s.getMeta();
|
|
8397
8395
|
if (i instanceof Ri) {
|
|
8398
8396
|
const a = i.parent.index, o = i.parent.parent.index;
|
|
8399
|
-
if (s.style.fill && !
|
|
8397
|
+
if (s.style.fill && !z(s.style.fill))
|
|
8400
8398
|
if (typeof s.style.fill == "object") {
|
|
8401
8399
|
const n = s.style.fill, l = this._textureMap.get(`${o}.${a}.fill`) ?? this._textureMap.get(`${o}.fill`) ?? this._textureMap.get("fill");
|
|
8402
8400
|
n.enabled !== !1 && (l || n.color) && (e.addPath(s), e.style = { ...s.style }, e.fillStyle = l?.texture ?? n.color, e.fill({
|
|
@@ -8415,7 +8413,7 @@ class ae extends Ee {
|
|
|
8415
8413
|
e.addPath(s), e.style = { ...s.style }, e.fill({
|
|
8416
8414
|
transformVertex: this._createTransformVertex()
|
|
8417
8415
|
});
|
|
8418
|
-
if (s.style.stroke && !
|
|
8416
|
+
if (s.style.stroke && !z(s.style.stroke))
|
|
8419
8417
|
if (typeof s.style.stroke == "object") {
|
|
8420
8418
|
const n = s.style.stroke, l = this._textureMap.get(`${o}.${a}.outline`) ?? this._textureMap.get(`${o}.outline`) ?? this._textureMap.get("outline");
|
|
8421
8419
|
n.enabled !== !1 && (l || n.color) && (n.width === void 0 || n.width) && (e.addPath(s), e.style = { ...s.style }, e.lineWidth = n.width || 1, e.strokeStyle = l?.texture ?? n.color, e.lineCap = n.lineCap, e.lineJoin = n.lineJoin, e.stroke({
|
|
@@ -8444,11 +8442,11 @@ class ae extends Ee {
|
|
|
8444
8442
|
_textureDraw(e) {
|
|
8445
8443
|
const { left: t = 0, top: s = 0, width: i, height: a } = this.base.boundingBox;
|
|
8446
8444
|
e.fillStyle = this._texture, e.rect(t, s, i, a);
|
|
8447
|
-
const o = new M().translate(-t, -s).scale(1 / i, 1 / a), { a: n, c: l, tx: c, b: u, d, ty:
|
|
8448
|
-
let m,
|
|
8445
|
+
const o = new M().translate(-t, -s).scale(1 / i, 1 / a), { a: n, c: l, tx: c, b: u, d, ty: f } = o.toObject();
|
|
8446
|
+
let m, p;
|
|
8449
8447
|
e.fill({
|
|
8450
8448
|
transformUv: (_, g) => {
|
|
8451
|
-
m = _[g],
|
|
8449
|
+
m = _[g], p = _[g + 1], _[g] = n * m + l * p + c, _[g + 1] = u * m + d * p + f;
|
|
8452
8450
|
},
|
|
8453
8451
|
transformVertex: this._createTransformVertex()
|
|
8454
8452
|
});
|
|
@@ -8865,7 +8863,8 @@ let Pe = class extends Ie {
|
|
|
8865
8863
|
set shadow(r) {
|
|
8866
8864
|
this._shadow.resetProperties().setProperties(r);
|
|
8867
8865
|
}
|
|
8868
|
-
|
|
8866
|
+
_colorFilterEffect;
|
|
8867
|
+
_maskEffect;
|
|
8869
8868
|
constructor(r, e = []) {
|
|
8870
8869
|
super(), this.setProperties(r).append(e);
|
|
8871
8870
|
}
|
|
@@ -8898,7 +8897,7 @@ let Pe = class extends Ie {
|
|
|
8898
8897
|
this.updateGlobalDisplay();
|
|
8899
8898
|
break;
|
|
8900
8899
|
case "rotate":
|
|
8901
|
-
this.rotation = e *
|
|
8900
|
+
this.rotation = e * fr;
|
|
8902
8901
|
break;
|
|
8903
8902
|
case "scaleX":
|
|
8904
8903
|
this.scale.x = e, this.text.isValid() && (e ^ t) < 0 && this.requestDraw();
|
|
@@ -8935,10 +8934,10 @@ let Pe = class extends Ie {
|
|
|
8935
8934
|
this.visible = e === "visible";
|
|
8936
8935
|
break;
|
|
8937
8936
|
case "filter":
|
|
8938
|
-
|
|
8937
|
+
this._updateStyleFilter(e);
|
|
8939
8938
|
break;
|
|
8940
8939
|
case "maskImage":
|
|
8941
|
-
this.
|
|
8940
|
+
this._updateStyleMaskImage(e);
|
|
8942
8941
|
break;
|
|
8943
8942
|
case "backgroundColor":
|
|
8944
8943
|
this.background.color = e;
|
|
@@ -8962,7 +8961,7 @@ let Pe = class extends Ie {
|
|
|
8962
8961
|
this._overflowHidden = e === "hidden";
|
|
8963
8962
|
break;
|
|
8964
8963
|
case "pointerEvents":
|
|
8965
|
-
this._allowPointerEvents = !
|
|
8964
|
+
this._allowPointerEvents = !z(e);
|
|
8966
8965
|
break;
|
|
8967
8966
|
case "borderRadius":
|
|
8968
8967
|
this.requestDraw();
|
|
@@ -8997,18 +8996,17 @@ let Pe = class extends Ie {
|
|
|
8997
8996
|
const e = this.getParent();
|
|
8998
8997
|
this._parentGlobalDisplay !== e?.globalDisplay && this.updateGlobalDisplay(), this.flexbox.update(), super._process(r);
|
|
8999
8998
|
}
|
|
9000
|
-
|
|
9001
|
-
|
|
8999
|
+
_updateStyleFilter(r) {
|
|
9000
|
+
z(r) ? (this._colorFilterEffect?.remove(), this._colorFilterEffect = void 0) : (this._colorFilterEffect || (this._colorFilterEffect = new $e({
|
|
9001
|
+
name: "styleFilter",
|
|
9002
|
+
internalMode: "front"
|
|
9003
|
+
}), this.append(this._colorFilterEffect)), this._colorFilterEffect.filter = r);
|
|
9002
9004
|
}
|
|
9003
|
-
|
|
9004
|
-
|
|
9005
|
-
|
|
9006
|
-
|
|
9007
|
-
|
|
9008
|
-
} else {
|
|
9009
|
-
const t = this.getNode(e);
|
|
9010
|
-
t && this.removeChild(t);
|
|
9011
|
-
}
|
|
9005
|
+
_updateStyleMaskImage(r) {
|
|
9006
|
+
z(r) ? (this._maskEffect?.remove(), this._maskEffect = void 0) : (this._maskEffect || (this._maskEffect = new Me({
|
|
9007
|
+
name: "styleMaskImage",
|
|
9008
|
+
internalMode: "back"
|
|
9009
|
+
}), this.append(this._maskEffect)), this._maskEffect.image = r);
|
|
9012
9010
|
}
|
|
9013
9011
|
updateGlobalTransform() {
|
|
9014
9012
|
super.updateGlobalTransform(), this._updateMask();
|
|
@@ -9265,11 +9263,11 @@ var sl = Object.defineProperty, il = Object.getOwnPropertyDescriptor, jt = (r, e
|
|
|
9265
9263
|
};
|
|
9266
9264
|
const al = (r) => r, ol = yt(0.25, 0.1, 0.25, 1), nl = yt(0.42, 0, 1, 1), ll = yt(0, 0, 0.58, 1), cl = yt(0.42, 0, 0.58, 1);
|
|
9267
9265
|
function yt(r, e, t, s) {
|
|
9268
|
-
const a = 3 * r - 3 * t + 1, o = 3 * t - 6 * r, n = 3 * r, l = 3 * e - 3 * s + 1, c = 3 * s - 6 * e, u = 3 * e, d = (_) => (3 * a * _ + 2 * o) * _ + n,
|
|
9269
|
-
function
|
|
9266
|
+
const a = 3 * r - 3 * t + 1, o = 3 * t - 6 * r, n = 3 * r, l = 3 * e - 3 * s + 1, c = 3 * s - 6 * e, u = 3 * e, d = (_) => (3 * a * _ + 2 * o) * _ + n, f = (_) => ((a * _ + o) * _ + n) * _, m = (_) => ((l * _ + c) * _ + u) * _;
|
|
9267
|
+
function p(_) {
|
|
9270
9268
|
let g = _, v, w;
|
|
9271
9269
|
for (let k = 0; k < 8; k++) {
|
|
9272
|
-
if (w =
|
|
9270
|
+
if (w = f(g) - _, Math.abs(w) < 1e-6)
|
|
9273
9271
|
return g;
|
|
9274
9272
|
if (v = d(g), Math.abs(v) < 1e-6)
|
|
9275
9273
|
break;
|
|
@@ -9277,13 +9275,13 @@ function yt(r, e, t, s) {
|
|
|
9277
9275
|
}
|
|
9278
9276
|
let S = 1, C = 0;
|
|
9279
9277
|
for (g = _; S > C; ) {
|
|
9280
|
-
if (w =
|
|
9278
|
+
if (w = f(g) - _, Math.abs(w) < 1e-6)
|
|
9281
9279
|
return g;
|
|
9282
9280
|
w > 0 ? S = g : C = g, g = (S + C) / 2;
|
|
9283
9281
|
}
|
|
9284
9282
|
return g;
|
|
9285
9283
|
}
|
|
9286
|
-
return (_) => m(
|
|
9284
|
+
return (_) => m(p(_));
|
|
9287
9285
|
}
|
|
9288
9286
|
const ur = {
|
|
9289
9287
|
linear: al,
|
|
@@ -9395,11 +9393,11 @@ let ut = class extends q {
|
|
|
9395
9393
|
const {
|
|
9396
9394
|
offset: u,
|
|
9397
9395
|
easing: d
|
|
9398
|
-
} = t,
|
|
9399
|
-
return e.forEach((m,
|
|
9400
|
-
(!(
|
|
9396
|
+
} = t, f = { ...t.props };
|
|
9397
|
+
return e.forEach((m, p) => {
|
|
9398
|
+
(!(p in f) || f[p] === null) && (f[p] = m), (!(p in c) || c[p] === null) && (c[p] = m);
|
|
9401
9399
|
}), [
|
|
9402
|
-
{ offset: u, easing: d, props:
|
|
9400
|
+
{ offset: u, easing: d, props: f },
|
|
9403
9401
|
{ offset: n, easing: l, props: c }
|
|
9404
9402
|
];
|
|
9405
9403
|
}
|
|
@@ -9408,20 +9406,20 @@ let ut = class extends q {
|
|
|
9408
9406
|
return null;
|
|
9409
9407
|
}
|
|
9410
9408
|
_commitStyle(r, e, t, s, i) {
|
|
9411
|
-
const { offset: a, easing: o, props: n } = s, { offset: l, props: c } = i, u = l - a, d = o((r - a) / u),
|
|
9409
|
+
const { offset: a, easing: o, props: n } = s, { offset: l, props: c } = i, u = l - a, d = o((r - a) / u), f = {
|
|
9412
9410
|
width: e.size.x,
|
|
9413
9411
|
height: e.size.y,
|
|
9414
9412
|
fontSize: e.style.fontSize
|
|
9415
9413
|
};
|
|
9416
|
-
t.forEach((m,
|
|
9414
|
+
t.forEach((m, p) => {
|
|
9417
9415
|
e.onUpdateStyleProperty(
|
|
9418
|
-
|
|
9416
|
+
p,
|
|
9419
9417
|
this._getDiffValue(
|
|
9420
|
-
|
|
9421
|
-
n[
|
|
9422
|
-
c[
|
|
9418
|
+
p,
|
|
9419
|
+
n[p],
|
|
9420
|
+
c[p],
|
|
9423
9421
|
d,
|
|
9424
|
-
|
|
9422
|
+
f
|
|
9425
9423
|
),
|
|
9426
9424
|
void 0
|
|
9427
9425
|
);
|
|
@@ -9440,16 +9438,16 @@ let ut = class extends q {
|
|
|
9440
9438
|
a = Et(r, String(e), i), o = Et(r, String(t), i);
|
|
9441
9439
|
if (Array.isArray(a) && Array.isArray(o)) {
|
|
9442
9440
|
const n = /* @__PURE__ */ new Set(), l = {}, c = {};
|
|
9443
|
-
a.forEach(({ name: d, args:
|
|
9444
|
-
l[d] =
|
|
9445
|
-
}), o.forEach(({ name: d, args:
|
|
9446
|
-
c[d] =
|
|
9441
|
+
a.forEach(({ name: d, args: f }) => {
|
|
9442
|
+
l[d] = f, n.add(d);
|
|
9443
|
+
}), o.forEach(({ name: d, args: f }) => {
|
|
9444
|
+
c[d] = f, n.add(d);
|
|
9447
9445
|
});
|
|
9448
9446
|
let u = "";
|
|
9449
9447
|
return n.forEach((d) => {
|
|
9450
|
-
const
|
|
9451
|
-
u += `${d}(${Array.from({ length:
|
|
9452
|
-
const v = m?.[g], w =
|
|
9448
|
+
const f = Math.max(l[d]?.length ?? 0, c[d]?.length ?? 0), m = l[d], p = c[d];
|
|
9449
|
+
u += `${d}(${Array.from({ length: f }, (_, g) => {
|
|
9450
|
+
const v = m?.[g], w = p?.[g], S = v?.normalizedIntValue ?? 0, C = w?.normalizedIntValue ?? 0;
|
|
9453
9451
|
return Number.isNaN(S) || Number.isNaN(C) ? w?.value ?? 0 : A(S, C, s);
|
|
9454
9452
|
}).join(", ")}) `;
|
|
9455
9453
|
}), u;
|
|
@@ -9833,7 +9831,7 @@ class Oe extends Zs {
|
|
|
9833
9831
|
e.setValueAtTime ? e.setValueAtTime(t, this._context.currentTime) : e.value = t;
|
|
9834
9832
|
}
|
|
9835
9833
|
}
|
|
9836
|
-
class
|
|
9834
|
+
class fl extends ue {
|
|
9837
9835
|
_audio = null;
|
|
9838
9836
|
_sourceNode = null;
|
|
9839
9837
|
_gain = null;
|
|
@@ -9988,7 +9986,7 @@ class pl extends ue {
|
|
|
9988
9986
|
super.destroy(), this._stop(), this._gain?.disconnect(), this._gain = null, this._audio?.context.off("refresh", this.refresh), this._audio?.context.off("refreshPaused", this.refreshPaused), this._audio = null, this._processors.forEach((e) => e.disconnect()), this._processors.length = 0, this._end = 0, this._playbackRate = 1, this._volume = 1, this._loop = !1, this._elapsed = 0, this._duration = 0, this._paused = !1, this._muted = !1, this._pausedReal = !1;
|
|
9989
9987
|
}
|
|
9990
9988
|
}
|
|
9991
|
-
class
|
|
9989
|
+
class pl extends Zs {
|
|
9992
9990
|
constructor(e) {
|
|
9993
9991
|
const t = Oe.audioContext, s = t.createBufferSource(), i = t.createGain(), a = t.createAnalyser();
|
|
9994
9992
|
s.connect(a), a.connect(i), i.connect(Oe.instance.destination), super(a, i), this.parent = e, this._sourceNode = s, this.gain = i, this.analyser = a;
|
|
@@ -10035,7 +10033,7 @@ class fl extends Zs {
|
|
|
10035
10033
|
return s.buffer = t.buffer, s.loop = t.loop, e.setParamValue(s.playbackRate, t.playbackRate.value), s.connect(i), i.connect(this.destination), { source: s, gain: i };
|
|
10036
10034
|
}
|
|
10037
10035
|
createSound() {
|
|
10038
|
-
return new
|
|
10036
|
+
return new fl();
|
|
10039
10037
|
}
|
|
10040
10038
|
}
|
|
10041
10039
|
var _l = Object.defineProperty, ml = Object.getOwnPropertyDescriptor, gl = (r, e, t) => e in r ? _l(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, vl = (r, e, t, s) => {
|
|
@@ -10046,7 +10044,7 @@ var _l = Object.defineProperty, ml = Object.getOwnPropertyDescriptor, gl = (r, e
|
|
|
10046
10044
|
let De = class extends q {
|
|
10047
10045
|
_sounds = [];
|
|
10048
10046
|
/** PlatformAudio */
|
|
10049
|
-
_platformAudio = Li ? new
|
|
10047
|
+
_platformAudio = Li ? new pl(this) : new hl(this);
|
|
10050
10048
|
get platformAudio() {
|
|
10051
10049
|
return this._platformAudio;
|
|
10052
10050
|
}
|
|
@@ -10242,13 +10240,13 @@ let dt = class extends Pe {
|
|
|
10242
10240
|
a.fillStyle = this.color;
|
|
10243
10241
|
const o = e.getChannelData(0), n = Math.ceil(o.length / s), l = i / 2;
|
|
10244
10242
|
for (let c = 1, u = -1, d = 0; d < s; d++) {
|
|
10245
|
-
for (let
|
|
10246
|
-
const m = o[d * n +
|
|
10243
|
+
for (let f = 0; f < n; f++) {
|
|
10244
|
+
const m = o[d * n + f];
|
|
10247
10245
|
m < c && (c = m), m > u && (u = m);
|
|
10248
10246
|
}
|
|
10249
10247
|
if (!this.gap || d % (this.gap * 2) === 0) {
|
|
10250
|
-
const
|
|
10251
|
-
a.fillRect(
|
|
10248
|
+
const f = d, m = (1 + c) * l, p = this.gap || 1, _ = Math.max(1, (u - c) * l);
|
|
10249
|
+
a.fillRect(f, m, p, _), c = 1, u = -1;
|
|
10252
10250
|
}
|
|
10253
10251
|
}
|
|
10254
10252
|
this._src?.requestUpdate("source"), this.requestDraw();
|
|
@@ -10288,14 +10286,14 @@ let Bt = class extends Ve {
|
|
|
10288
10286
|
for (let w = 1; w < o; w++)
|
|
10289
10287
|
g -= v, u.push(g);
|
|
10290
10288
|
}
|
|
10291
|
-
const d = 1 / n,
|
|
10292
|
-
let
|
|
10289
|
+
const d = 1 / n, f = 1 / l, m = [];
|
|
10290
|
+
let p;
|
|
10293
10291
|
const _ = o - 1;
|
|
10294
10292
|
for (let g = 0; g < _; g++)
|
|
10295
|
-
|
|
10293
|
+
p = u[g] + 0.5, m[0] = p * d, m[1] = p * f, c.push({
|
|
10296
10294
|
offset: m
|
|
10297
10295
|
});
|
|
10298
|
-
|
|
10296
|
+
p = u[_] + 0.5, m[0] = p * d, m[1] = p * f, c.push({
|
|
10299
10297
|
offset: m
|
|
10300
10298
|
}), c.forEach((g) => {
|
|
10301
10299
|
P.draw(r, Bt.material, {
|
|
@@ -10389,36 +10387,36 @@ var Il = Object.defineProperty, Ml = Object.getOwnPropertyDescriptor, Nl = (r, e
|
|
|
10389
10387
|
(o = r[a]) && (i = o(i) || i);
|
|
10390
10388
|
return i;
|
|
10391
10389
|
}, Ul = (r, e, t) => Nl(r, e + "", t);
|
|
10392
|
-
let
|
|
10390
|
+
let ft = class extends Ve {
|
|
10393
10391
|
blur = 100;
|
|
10394
10392
|
gradientBlur = 600;
|
|
10395
10393
|
apply(r, e) {
|
|
10396
10394
|
const t = this.currentTimeProgress;
|
|
10397
10395
|
let s, i;
|
|
10398
10396
|
t < 0.5 ? (s = 0, i = (0.5 - t) / 0.5) : (s = 1, i = (t - 0.5) / 0.5);
|
|
10399
|
-
const a = e.width, o = e.height, n = [0, o / 2], l = [600, o / 2], c = [a, o], u = l[0] - n[0], d = l[1] - n[1],
|
|
10400
|
-
P.draw(r,
|
|
10397
|
+
const a = e.width, o = e.height, n = [0, o / 2], l = [600, o / 2], c = [a, o], u = l[0] - n[0], d = l[1] - n[1], f = Math.sqrt(u * u + d * d);
|
|
10398
|
+
P.draw(r, ft.material, {
|
|
10401
10399
|
sampler: s,
|
|
10402
10400
|
progress: i,
|
|
10403
10401
|
blur: this.blur,
|
|
10404
10402
|
gradientBlur: this.gradientBlur,
|
|
10405
10403
|
start: n,
|
|
10406
10404
|
end: l,
|
|
10407
|
-
delta: [u /
|
|
10405
|
+
delta: [u / f, d / f],
|
|
10408
10406
|
texSize: c
|
|
10409
|
-
}), P.draw(r,
|
|
10407
|
+
}), P.draw(r, ft.material, {
|
|
10410
10408
|
sampler: s,
|
|
10411
10409
|
progress: i,
|
|
10412
10410
|
blur: this.blur,
|
|
10413
10411
|
gradientBlur: this.gradientBlur,
|
|
10414
10412
|
start: n,
|
|
10415
10413
|
end: l,
|
|
10416
|
-
delta: [-d /
|
|
10414
|
+
delta: [-d / f, u / f],
|
|
10417
10415
|
texSize: c
|
|
10418
10416
|
});
|
|
10419
10417
|
}
|
|
10420
10418
|
};
|
|
10421
|
-
Ul(
|
|
10419
|
+
Ul(ft, "material", new E({
|
|
10422
10420
|
gl: {
|
|
10423
10421
|
vertex: `attribute vec2 position;
|
|
10424
10422
|
attribute vec2 uv;
|
|
@@ -10468,9 +10466,9 @@ void main(void) {
|
|
|
10468
10466
|
}`
|
|
10469
10467
|
}
|
|
10470
10468
|
}));
|
|
10471
|
-
|
|
10469
|
+
ft = kl([
|
|
10472
10470
|
b("TiltShiftTransition")
|
|
10473
|
-
],
|
|
10471
|
+
], ft);
|
|
10474
10472
|
var Bl = Object.defineProperty, Ll = Object.getOwnPropertyDescriptor, Fl = (r, e, t) => e in r ? Bl(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, zl = (r, e, t, s) => {
|
|
10475
10473
|
for (var i = s > 1 ? void 0 : s ? Ll(e, t) : e, a = r.length - 1, o; a >= 0; a--)
|
|
10476
10474
|
(o = r[a]) && (i = o(i) || i);
|
|
@@ -10782,7 +10780,7 @@ const Fe = {
|
|
|
10782
10780
|
preserveDrawingBuffer: !1,
|
|
10783
10781
|
powerPreference: "default"
|
|
10784
10782
|
};
|
|
10785
|
-
class Ur extends
|
|
10783
|
+
class Ur extends fe {
|
|
10786
10784
|
renderer;
|
|
10787
10785
|
get view() {
|
|
10788
10786
|
return this.renderer.view;
|
|
@@ -10958,18 +10956,18 @@ async function ec(r) {
|
|
|
10958
10956
|
preserveDrawingBuffer: !0
|
|
10959
10957
|
}), U.resetProperties(), U.setProperties(c), U.debug = e, U.fonts = t, U.timeline.currentTime = 0, U.resize(s, i, !0), U.root.removeChildren(), U.root.append(a), await n?.(U), await U.waitAndRender(), o.length && await new Promise((u) => {
|
|
10960
10958
|
let d = 0;
|
|
10961
|
-
const
|
|
10962
|
-
async function
|
|
10963
|
-
if (d ===
|
|
10959
|
+
const f = o.length, m = o[f - 1];
|
|
10960
|
+
async function p() {
|
|
10961
|
+
if (d === f)
|
|
10964
10962
|
return u();
|
|
10965
10963
|
const _ = o[d++], v = (o[d] || _) - _;
|
|
10966
10964
|
U.timeline.currentTime = _, U.render(), await l?.(U.toPixels(), {
|
|
10967
10965
|
currentTime: _,
|
|
10968
10966
|
duration: v,
|
|
10969
10967
|
progress: m !== 0 ? _ / m : 1
|
|
10970
|
-
}), requestAnimationFrame(
|
|
10968
|
+
}), requestAnimationFrame(p);
|
|
10971
10969
|
}
|
|
10972
|
-
|
|
10970
|
+
p();
|
|
10973
10971
|
}), U.toCanvas2D();
|
|
10974
10972
|
}
|
|
10975
10973
|
async function yc(r) {
|
|
@@ -10995,13 +10993,13 @@ export {
|
|
|
10995
10993
|
ne as Color,
|
|
10996
10994
|
j as ColorAdjustEffect,
|
|
10997
10995
|
$e as ColorFilterEffect,
|
|
10998
|
-
|
|
10996
|
+
fs as ColorMatrix,
|
|
10999
10997
|
He as ColorOverlayEffect,
|
|
11000
10998
|
Xe as ColorRemoveEffect,
|
|
11001
10999
|
je as ColorReplaceEffect,
|
|
11002
11000
|
Er as ColorTexture,
|
|
11003
11001
|
Ee as CoreObject,
|
|
11004
|
-
|
|
11002
|
+
fr as DEG_TO_RAD,
|
|
11005
11003
|
hs as DEVICE_PIXEL_RATIO,
|
|
11006
11004
|
Y as DrawboardEffect,
|
|
11007
11005
|
re as DropShadowEffect,
|
|
@@ -11039,7 +11037,7 @@ export {
|
|
|
11039
11037
|
Ga as GlStencilSystem,
|
|
11040
11038
|
W as GlSystem,
|
|
11041
11039
|
Va as GlViewportSystem,
|
|
11042
|
-
|
|
11040
|
+
V as GlitchEffect,
|
|
11043
11041
|
K as GodrayEffect,
|
|
11044
11042
|
$t as GradientTexture,
|
|
11045
11043
|
hl as HTMLAudio,
|
|
@@ -11062,17 +11060,17 @@ export {
|
|
|
11062
11060
|
Me as MaskEffect,
|
|
11063
11061
|
E as Material,
|
|
11064
11062
|
le as Matrix,
|
|
11065
|
-
|
|
11066
|
-
|
|
11063
|
+
fc as Matrix2,
|
|
11064
|
+
ps as Matrix3,
|
|
11067
11065
|
Qi as Matrix4,
|
|
11068
|
-
|
|
11066
|
+
fo as Meta,
|
|
11069
11067
|
ds as MouseInputEvent,
|
|
11070
11068
|
I as Node,
|
|
11071
11069
|
Ie as Node2D,
|
|
11072
11070
|
Dt as Obb2D,
|
|
11073
11071
|
L as OutlineEffect,
|
|
11074
11072
|
yr as PI,
|
|
11075
|
-
|
|
11073
|
+
G as PI_2,
|
|
11076
11074
|
ht as PixelateEffect,
|
|
11077
11075
|
oo as PixelsTexture,
|
|
11078
11076
|
qi as PointerInputEvent,
|
|
@@ -11098,13 +11096,13 @@ export {
|
|
|
11098
11096
|
Bi as SUPPORTS_WEBKIT_OFFLINE_AUDIO_CONTEXT,
|
|
11099
11097
|
Li as SUPPORTS_WEB_AUDIO,
|
|
11100
11098
|
ki as SUPPORTS_WHEEL_EVENTS,
|
|
11101
|
-
|
|
11099
|
+
fe as SceneTree,
|
|
11102
11100
|
Xl as TextLoader,
|
|
11103
11101
|
x as Texture2D,
|
|
11104
11102
|
jl as TextureLoader,
|
|
11105
11103
|
qs as TextureRect2D,
|
|
11106
11104
|
B as Ticker,
|
|
11107
|
-
|
|
11105
|
+
ft as TiltShiftTransition,
|
|
11108
11106
|
xe as Timeline,
|
|
11109
11107
|
q as TimelineNode,
|
|
11110
11108
|
M as Transform2D,
|
|
@@ -11115,7 +11113,7 @@ export {
|
|
|
11115
11113
|
Mt as UvMaterial,
|
|
11116
11114
|
Q as Vector,
|
|
11117
11115
|
O as Vector2,
|
|
11118
|
-
|
|
11116
|
+
pc as Vector3,
|
|
11119
11117
|
ea as Vector4,
|
|
11120
11118
|
H as VertexAttribute,
|
|
11121
11119
|
ye as VertexBuffer,
|
|
@@ -11124,9 +11122,9 @@ export {
|
|
|
11124
11122
|
co as VideoTexture,
|
|
11125
11123
|
X as Viewport,
|
|
11126
11124
|
Tr as ViewportTexture,
|
|
11127
|
-
|
|
11125
|
+
pl as WebAudio,
|
|
11128
11126
|
Oe as WebAudioContext,
|
|
11129
|
-
|
|
11127
|
+
fl as WebSound,
|
|
11130
11128
|
Yi as WheelInputEvent,
|
|
11131
11129
|
_r as Window,
|
|
11132
11130
|
we as ZoomBlurEffect,
|