modern-canvas 0.27.11 → 0.27.13

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
@@ -555,7 +555,13 @@ var ht = class e {
555
555
  destroy() {
556
556
  this.destroyed || (this.destroyed = !0, this._destroy(), this.emit("destroy"), this.removeAllListeners());
557
557
  }
558
- }, St = class extends w {}, Ct = class extends St {}, wt = class e {
558
+ }, St = class extends w {}, Ct = class extends St {};
559
+ //#endregion
560
+ //#region src/core/math/Aabb2D.ts
561
+ function wt(e) {
562
+ return Number.isFinite(e) ? e : 0;
563
+ }
564
+ var Tt = class e {
559
565
  get x() {
560
566
  return this.min.x;
561
567
  }
@@ -629,10 +635,10 @@ var ht = class e {
629
635
  this._updateMax = this._updateMax.bind(this), this._updateSize = this._updateSize.bind(this), this.min = new y(t.x, t.y, this._updateMax), this.size = new y(n.x, n.y, this._updateMax), this.max = new y(t.x + n.x, t.y + n.y, this._updateSize);
630
636
  }
631
637
  _updateSize() {
632
- return this.size.set(this.max.x - this.min.x, this.max.y - this.min.y), this;
638
+ return this.size.set(wt(this.max.x - this.min.x), wt(this.max.y - this.min.y)), this;
633
639
  }
634
640
  _updateMax() {
635
- return this.max.set(this.min.x + this.size.x, this.min.y + this.size.y), this;
641
+ return this.max.set(wt(this.min.x + this.size.x), wt(this.min.y + this.size.y)), this;
636
642
  }
637
643
  overlap(e, t) {
638
644
  switch (t) {
@@ -772,7 +778,7 @@ var T = class {
772
778
  this.a
773
779
  ];
774
780
  }
775
- }, Tt = Se / 180, Et = 180 / Se;
781
+ }, Et = Se / 180, Dt = 180 / Se;
776
782
  function E(e, t, n) {
777
783
  return Math.max(t, Math.min(e, n));
778
784
  }
@@ -781,7 +787,7 @@ function D(e, t, n) {
781
787
  }
782
788
  //#endregion
783
789
  //#region src/core/math/ColorMatrix.ts
784
- var Dt = class {
790
+ var Ot = class {
785
791
  _array = /* @__PURE__ */ new Float32Array(20);
786
792
  constructor() {
787
793
  this.identity();
@@ -1037,10 +1043,10 @@ var Dt = class {
1037
1043
  toArray() {
1038
1044
  return this._array;
1039
1045
  }
1040
- }, Ot = class e extends wt {
1046
+ }, kt = class e extends Tt {
1041
1047
  rotation;
1042
1048
  get rotationDegrees() {
1043
- return this.rotation / Tt;
1049
+ return this.rotation / Et;
1044
1050
  }
1045
1051
  constructor(...e) {
1046
1052
  let t, n;
@@ -1050,7 +1056,7 @@ var Dt = class {
1050
1056
  if (!this.rotation && (!("rotation" in e) || !e.rotation)) return super.overlap(e, t);
1051
1057
  {
1052
1058
  let t = (e, t) => Math.abs(e.x * t.x + e.y * t.y), n = (e) => {
1053
- let { width: n, height: r, rotation: i = 0 } = e, a = i / Tt;
1059
+ let { width: n, height: r, rotation: i = 0 } = e, a = i / Et;
1054
1060
  a = -a % 180;
1055
1061
  let o = a / 180 * Math.PI, s = {
1056
1062
  x: Math.cos(o),
@@ -1092,7 +1098,7 @@ var Dt = class {
1092
1098
  clone() {
1093
1099
  return new e(this.toJSON());
1094
1100
  }
1095
- }, kt = class {
1101
+ }, At = class {
1096
1102
  _array;
1097
1103
  x = 0;
1098
1104
  y = 0;
@@ -1129,7 +1135,7 @@ function k(e, t, n, r) {
1129
1135
  }
1130
1136
  //#endregion
1131
1137
  //#region src/core/os/MainLoop.ts
1132
- var At = class extends w {
1138
+ var jt = class extends w {
1133
1139
  _starting = !1;
1134
1140
  _nextDeltaTime = 0;
1135
1141
  _startedProcess;
@@ -1159,12 +1165,12 @@ var At = class extends w {
1159
1165
  super._destroy(), this.stop();
1160
1166
  }
1161
1167
  };
1162
- k([_({ fallback: 60 }), O("design:type", Number)], At.prototype, "fps", void 0), k([_({ fallback: 1 }), O("design:type", Number)], At.prototype, "speed", void 0);
1168
+ k([_({ fallback: 60 }), O("design:type", Number)], jt.prototype, "fps", void 0), k([_({ fallback: 1 }), O("design:type", Number)], jt.prototype, "speed", void 0);
1163
1169
  //#endregion
1164
1170
  //#region src/core/reactivity.ts
1165
- var jt = "__v_skip";
1166
- function Mt(e) {
1167
- return !Object.prototype.hasOwnProperty.call(e, jt) && Object.isExtensible(e) && Object.defineProperty(e, jt, {
1171
+ var Mt = "__v_skip";
1172
+ function Nt(e) {
1173
+ return !Object.prototype.hasOwnProperty.call(e, Mt) && Object.isExtensible(e) && Object.defineProperty(e, Mt, {
1168
1174
  configurable: !0,
1169
1175
  enumerable: !1,
1170
1176
  value: !0
@@ -1172,14 +1178,14 @@ function Mt(e) {
1172
1178
  }
1173
1179
  //#endregion
1174
1180
  //#region src/core/renderers/gl/Batch2DEffect.ts
1175
- var Nt = 1, Pt = 2;
1176
- function Ft(e) {
1181
+ var Pt = 1, Ft = 2;
1182
+ function It(e) {
1177
1183
  return Math.min(255, Math.max(1, Math.round(e * 32) + 128));
1178
1184
  }
1179
- var It = {
1185
+ var Lt = {
1180
1186
  name: "strokeFeather",
1181
1187
  fragment: "if (mod(floor(vFlags * 0.5), 2.0) > 0.5) {\n float w = 1.0 / max(fwidth(vUv.y), 1e-6);\n float d = min(vUv.y, 1.0 - vUv.y) * w;\n color *= clamp(d + 0.5, 0.0, 1.0) * clamp(w, 0.0, 1.0);\n }"
1182
- }, Lt = {
1188
+ }, Rt = {
1183
1189
  name: "flowStreak",
1184
1190
  uniformDecls: "uniform vec3 uFlowColor;\nuniform float uFlowPeriod;",
1185
1191
  uniformDefaults: {
@@ -1192,11 +1198,11 @@ var It = {
1192
1198
  },
1193
1199
  fragment: "if (vParam > 0.5) {\n float speed = (vParam - 128.0) / 32.0;\n float b = fract((uTime * speed - vUv.x / uFlowPeriod) * (speed < 0.0 ? -1.0 : 1.0));\n float s = b > 0.5 ? b - 1.0 : b;\n float streak = smoothstep(-0.045, -0.01, s) * (1.0 - smoothstep(0.02, 0.18, s));\n\n float w = 1.0 / max(fwidth(vUv.y), 1e-6);\n float px = abs(vUv.y - 0.5) * w;\n float corePx = w * 0.25;\n float core = clamp(corePx - px + 0.5, 0.0, 1.0);\n float halo = 1.0 - smoothstep(corePx, w * 0.5, px);\n\n vec4 line = color * core;\n line.rgb = mix(line.rgb, uFlowColor * line.a, streak);\n float glowA = streak * halo * (1.0 - core) * 0.55 * color.a;\n color = line + vec4(uFlowColor * glowA, glowA);\n }",
1194
1200
  fragmentGl1: "if (vParam > 0.5) {\n float speed = (vParam - 128.0) / 32.0;\n float b = fract((uTime * speed - vUv.x / uFlowPeriod) * (speed < 0.0 ? -1.0 : 1.0));\n float s = b > 0.5 ? b - 1.0 : b;\n float streak = smoothstep(-0.045, -0.01, s) * (1.0 - smoothstep(0.02, 0.18, s));\n color.rgb = mix(color.rgb, uFlowColor * color.a, streak);\n }"
1195
- }, Rt = /* @__PURE__ */ function(e) {
1201
+ }, zt = /* @__PURE__ */ function(e) {
1196
1202
  return e[e.elementArrayBuffer = 34963] = "elementArrayBuffer", e[e.arrayBuffer = 34962] = "arrayBuffer", e[e.uniformBuffer = 35345] = "uniformBuffer", e;
1197
- }({}), zt = class {
1203
+ }({}), Bt = class {
1198
1204
  native;
1199
- target = Rt.arrayBuffer;
1205
+ target = zt.arrayBuffer;
1200
1206
  byteLength = 0;
1201
1207
  dirty = !0;
1202
1208
  constructor(e) {
@@ -1204,7 +1210,7 @@ var It = {
1204
1210
  }
1205
1211
  }, A = /* @__PURE__ */ function(e) {
1206
1212
  return e[e.mapRead = 1] = "mapRead", e[e.mapWrite = 2] = "mapWrite", e[e.copySrc = 4] = "copySrc", e[e.copyDst = 8] = "copyDst", e[e.index = 16] = "index", e[e.vertex = 32] = "vertex", e[e.uniform = 64] = "uniform", e[e.storage = 128] = "storage", e[e.indirect = 256] = "indirect", e[e.queryResolve = 512] = "queryResolve", e[e.static = 1024] = "static", e;
1207
- }({}), Bt = class extends n {
1213
+ }({}), Vt = class extends n {
1208
1214
  screen = {
1209
1215
  x: 0,
1210
1216
  y: 0,
@@ -1223,12 +1229,12 @@ var It = {
1223
1229
  this.view && (this.view.width = Math.floor(e * this.pixelRatio), this.view.height = Math.floor(t * this.pixelRatio)), this.screen.width = e, this.screen.height = t, n && this.view && (this.view.style.width = `${e}px`, this.view.style.height = `${t}px`);
1224
1230
  }
1225
1231
  };
1226
- k([_({ fallback: Xe }), O("design:type", Number)], Bt.prototype, "pixelRatio", void 0), k([_({ internal: !0 }), O("design:type", typeof HTMLCanvasElement > "u" ? Object : HTMLCanvasElement)], Bt.prototype, "view", void 0);
1232
+ k([_({ fallback: Xe }), O("design:type", Number)], Vt.prototype, "pixelRatio", void 0), k([_({ internal: !0 }), O("design:type", typeof HTMLCanvasElement > "u" ? Object : HTMLCanvasElement)], Vt.prototype, "view", void 0);
1227
1233
  //#endregion
1228
1234
  //#region src/core/renderers/shared/shader/UniformGroup.ts
1229
- var Vt = 0, Ht = class {
1235
+ var Ht = 0, Ut = class {
1230
1236
  isUniformGroup = !0;
1231
- uid = ++Vt;
1237
+ uid = ++Ht;
1232
1238
  uniforms;
1233
1239
  ubo;
1234
1240
  isStatic;
@@ -1239,10 +1245,10 @@ var Vt = 0, Ht = class {
1239
1245
  update() {
1240
1246
  this._dirtyId++;
1241
1247
  }
1242
- }, Ut = Object.create(null), Wt = Object.create(null);
1243
- function Gt(e, t) {
1244
- let n = Wt[e];
1245
- return n === void 0 && (Ut[t] === void 0 && (Ut[t] = 1), Wt[e] = n = Ut[t]++), n;
1248
+ }, Wt = Object.create(null), Gt = Object.create(null);
1249
+ function Kt(e, t) {
1250
+ let n = Gt[e];
1251
+ return n === void 0 && (Wt[t] === void 0 && (Wt[t] = 1), Gt[e] = n = Wt[t]++), n;
1246
1252
  }
1247
1253
  //#endregion
1248
1254
  //#region src/core/renderers/gl/system/GlSystem.ts
@@ -1260,7 +1266,7 @@ var j = class extends e {
1260
1266
  _setup() {}
1261
1267
  flush() {}
1262
1268
  reset() {}
1263
- }, Kt = class extends j {
1269
+ }, qt = class extends j {
1264
1270
  install(e) {
1265
1271
  super.install(e), e.buffer = this;
1266
1272
  }
@@ -1270,8 +1276,8 @@ var j = class extends e {
1270
1276
  return this.glBuffers.get(e.instanceId) || this._createGlBuffer(e);
1271
1277
  }
1272
1278
  _createGlBuffer(e) {
1273
- let t = this._gl, n = new zt(t.createBuffer()), r = Rt.arrayBuffer;
1274
- return e.usage & A.index ? r = Rt.elementArrayBuffer : e.usage & A.uniform && (r = Rt.uniformBuffer), n.target = r, this.glBuffers.set(e.instanceId, n), this.buffers.get(e.instanceId) || ("on" in e && (e.on("updateProperty", (e) => {
1279
+ let t = this._gl, n = new Bt(t.createBuffer()), r = zt.arrayBuffer;
1280
+ return e.usage & A.index ? r = zt.elementArrayBuffer : e.usage & A.uniform && (r = zt.uniformBuffer), n.target = r, this.glBuffers.set(e.instanceId, n), this.buffers.get(e.instanceId) || ("on" in e && (e.on("updateProperty", (e) => {
1275
1281
  switch (e) {
1276
1282
  case "usage":
1277
1283
  case "data":
@@ -1309,13 +1315,13 @@ var j = class extends e {
1309
1315
  }
1310
1316
  this.buffers.clear(), this.glBuffers.clear();
1311
1317
  }
1312
- }, qt;
1313
- function Jt() {
1314
- return qt ||= "mediump", qt;
1318
+ }, Jt;
1319
+ function Yt() {
1320
+ return Jt ||= "mediump", Jt;
1315
1321
  }
1316
1322
  //#endregion
1317
1323
  //#region src/core/renderers/gl/shader/preprocessors/addProgramDefines.ts
1318
- function Yt(e, t, n) {
1324
+ function Xt(e, t, n) {
1319
1325
  return t ? e : n ? (e = e.replace("out vec4 finalColor;", ""), `#ifdef GL_ES
1320
1326
  #define in varying
1321
1327
  #define finalColor gl_FragColor
@@ -1329,7 +1335,7 @@ ${e}`;
1329
1335
  }
1330
1336
  //#endregion
1331
1337
  //#region src/core/renderers/gl/shader/preprocessors/ensurePrecision.ts
1332
- function Xt(e, t, n) {
1338
+ function Zt(e, t, n) {
1333
1339
  let r = n ? t.maxSupportedFragmentPrecision : t.maxSupportedVertexPrecision;
1334
1340
  if (e.substring(0, 9) !== "precision") {
1335
1341
  let i = n ? t.requestedFragmentPrecision : t.requestedVertexPrecision;
@@ -1339,31 +1345,31 @@ function Xt(e, t, n) {
1339
1345
  }
1340
1346
  //#endregion
1341
1347
  //#region src/core/renderers/gl/shader/preprocessors/insertVersion.ts
1342
- function Zt(e, t) {
1348
+ function Qt(e, t) {
1343
1349
  return t ? `#version 300 es\n${e}` : e;
1344
1350
  }
1345
1351
  //#endregion
1346
1352
  //#region src/core/renderers/gl/shader/preprocessors/setProgramName.ts
1347
- var Qt = {}, $t = {};
1348
- function en(e, { name: t = "program" }, n = !0) {
1353
+ var $t = {}, en = {};
1354
+ function tn(e, { name: t = "program" }, n = !0) {
1349
1355
  t = t.replace(/\s+/g, "-"), t += n ? "-fragment" : "-vertex";
1350
- let r = n ? Qt : $t;
1356
+ let r = n ? $t : en;
1351
1357
  return r[t] ? (r[t]++, t += `-${r[t]}`) : r[t] = 1, e.includes("#define SHADER_NAME") ? e : `${`#define SHADER_NAME ${t}`}\n${e}`;
1352
1358
  }
1353
1359
  //#endregion
1354
1360
  //#region src/core/renderers/gl/shader/preprocessors/stripVersion.ts
1355
- function tn(e, t) {
1361
+ function nn(e, t) {
1356
1362
  return t ? e.replace("#version 300 es", "") : e;
1357
1363
  }
1358
1364
  //#endregion
1359
1365
  //#region src/core/renderers/gl/shader/GlProgram.ts
1360
- var nn = Object.create(null), rn = {
1361
- stripVersion: tn,
1362
- ensurePrecision: Xt,
1363
- addProgramDefines: Yt,
1364
- setProgramName: en,
1365
- insertVersion: Zt
1366
- }, an = class e {
1366
+ var rn = Object.create(null), an = {
1367
+ stripVersion: nn,
1368
+ ensurePrecision: Zt,
1369
+ addProgramDefines: Xt,
1370
+ setProgramName: tn,
1371
+ insertVersion: Qt
1372
+ }, on = class e {
1367
1373
  static defaultOptions = {
1368
1374
  preferredVertexPrecision: "highp",
1369
1375
  preferredFragmentPrecision: "mediump"
@@ -1386,25 +1392,25 @@ var nn = Object.create(null), rn = {
1386
1392
  requestedFragmentPrecision: t.preferredFragmentPrecision,
1387
1393
  requestedVertexPrecision: t.preferredVertexPrecision,
1388
1394
  maxSupportedVertexPrecision: "highp",
1389
- maxSupportedFragmentPrecision: Jt()
1395
+ maxSupportedFragmentPrecision: Yt()
1390
1396
  },
1391
1397
  setProgramName: { name: t.name },
1392
1398
  addProgramDefines: i,
1393
1399
  insertVersion: i
1394
1400
  };
1395
- Object.keys(rn).forEach((e) => {
1401
+ Object.keys(an).forEach((e) => {
1396
1402
  let t = a[e];
1397
- n = rn[e](n, t, !0), r = rn[e](r, t, !1);
1398
- }), this.fragment = n, this.vertex = r, this.transformFeedbackVaryings = t.transformFeedbackVaryings, this.id = Gt(`${r}:${n}`, "GlProgram");
1403
+ n = an[e](n, t, !0), r = an[e](r, t, !1);
1404
+ }), this.fragment = n, this.vertex = r, this.transformFeedbackVaryings = t.transformFeedbackVaryings, this.id = Kt(`${r}:${n}`, "GlProgram");
1399
1405
  }
1400
1406
  destroy() {
1401
- this.fragment = "", this.vertex = "", this.attributes = Object.create(null), this.uniforms = Object.create(null), this.transformFeedbackVaryings = void 0, this._cacheKey && delete nn[this._cacheKey];
1407
+ this.fragment = "", this.vertex = "", this.attributes = Object.create(null), this.uniforms = Object.create(null), this.transformFeedbackVaryings = void 0, this._cacheKey && delete rn[this._cacheKey];
1402
1408
  }
1403
1409
  static from(t) {
1404
1410
  let n = `${t.vertex}:${t.fragment}`;
1405
- return nn[n] || (nn[n] = new e(t), nn[n]._cacheKey = n), nn[n];
1411
+ return rn[n] || (rn[n] = new e(t), rn[n]._cacheKey = n), rn[n];
1406
1412
  }
1407
- }, on = {
1413
+ }, sn = {
1408
1414
  uint8x2: {
1409
1415
  size: 2,
1410
1416
  stride: 2,
@@ -1556,19 +1562,19 @@ var nn = Object.create(null), rn = {
1556
1562
  normalized: !1
1557
1563
  }
1558
1564
  };
1559
- function sn(e) {
1560
- return on[e] ?? on.float32;
1565
+ function cn(e) {
1566
+ return sn[e] ?? sn.float32;
1561
1567
  }
1562
1568
  //#endregion
1563
1569
  //#region src/core/renderers/gl/shader/GlProgramData.ts
1564
- var cn = class {
1570
+ var ln = class {
1565
1571
  native;
1566
1572
  uniformDirtyGroups = Object.create(null);
1567
1573
  uniforms = Object.create(null);
1568
1574
  constructor(e) {
1569
1575
  this.native = e;
1570
1576
  }
1571
- }, ln, un = {
1577
+ }, un, dn = {
1572
1578
  FLOAT: "float",
1573
1579
  FLOAT_VEC2: "vec2",
1574
1580
  FLOAT_VEC3: "vec3",
@@ -1597,7 +1603,7 @@ var cn = class {
1597
1603
  SAMPLER_2D_ARRAY: "sampler2DArray",
1598
1604
  INT_SAMPLER_2D_ARRAY: "sampler2DArray",
1599
1605
  UNSIGNED_INT_SAMPLER_2D_ARRAY: "sampler2DArray"
1600
- }, dn = {
1606
+ }, fn = {
1601
1607
  float: "float32",
1602
1608
  vec2: "float32x2",
1603
1609
  vec3: "float32x3",
@@ -1615,29 +1621,29 @@ var cn = class {
1615
1621
  bvec3: "uint32x3",
1616
1622
  bvec4: "uint32x4"
1617
1623
  };
1618
- function fn(e, t) {
1619
- if (!ln) {
1620
- let t = Object.keys(un);
1621
- ln = {};
1624
+ function pn(e, t) {
1625
+ if (!un) {
1626
+ let t = Object.keys(dn);
1627
+ un = {};
1622
1628
  for (let n = 0; n < t.length; ++n) {
1623
1629
  let r = t[n];
1624
- ln[e[r]] = un[r];
1630
+ un[e[r]] = dn[r];
1625
1631
  }
1626
1632
  }
1627
- return ln[t];
1633
+ return un[t];
1628
1634
  }
1629
- function pn(e, t) {
1630
- return dn[fn(e, t)] || "float32";
1635
+ function mn(e, t) {
1636
+ return fn[pn(e, t)] || "float32";
1631
1637
  }
1632
1638
  //#endregion
1633
1639
  //#region src/core/renderers/gl/shader/GlShaderSystem.ts
1634
- var mn = class extends j {
1640
+ var hn = class extends j {
1635
1641
  install(e) {
1636
1642
  super.install(e), e.shader = this;
1637
1643
  }
1638
1644
  glProgramDatas = /* @__PURE__ */ new Map();
1639
1645
  currentProgram = null;
1640
- globalUniforms = new Ht({
1646
+ globalUniforms = new Ut({
1641
1647
  projectionMatrix: new Float32Array([
1642
1648
  1,
1643
1649
  0,
@@ -1678,7 +1684,7 @@ var mn = class extends j {
1678
1684
  return this.glProgramDatas.get(e.id) || this._createGlProgramData(e);
1679
1685
  }
1680
1686
  _createGlProgramData(e) {
1681
- let t = this._gl, n = new cn(t.createProgram());
1687
+ let t = this._gl, n = new ln(t.createProgram());
1682
1688
  this.glProgramDatas.set(e.id, n), this.useProgram(e);
1683
1689
  let r = this._createGlShader(e.vertex, t.VERTEX_SHADER), i = this._createGlShader(e.fragment, t.FRAGMENT_SHADER);
1684
1690
  if (t.attachShader(n.native, r), t.attachShader(n.native, i), t.linkProgram(n.native), !t.getProgramParameter(n.native, t.LINK_STATUS)) throw Error(`Failed to link program: ${t.getProgramInfoLog(n.native)}`);
@@ -1686,11 +1692,11 @@ var mn = class extends j {
1686
1692
  for (let e = t.getProgramParameter(n.native, t.ACTIVE_ATTRIBUTES), r = 0; r < e; r++) {
1687
1693
  let e = t.getActiveAttrib(n.native, r);
1688
1694
  if (!e || e.name.startsWith("gl_")) continue;
1689
- let i = pn(t, e.type);
1695
+ let i = mn(t, e.type);
1690
1696
  a[e.name] = {
1691
1697
  location: 0,
1692
1698
  format: i,
1693
- stride: sn(i).stride,
1699
+ stride: cn(i).stride,
1694
1700
  offset: 0,
1695
1701
  instance: !1,
1696
1702
  start: 0
@@ -1707,7 +1713,7 @@ var mn = class extends j {
1707
1713
  for (let e = t.getProgramParameter(n.native, t.ACTIVE_UNIFORMS), r = 0; r < e; r++) {
1708
1714
  let e = t.getActiveUniform(n.native, r);
1709
1715
  if (!e) continue;
1710
- let i = e.name.replace(/\[.*?\]$/, ""), a = fn(t, e.type), o = e.size;
1716
+ let i = e.name.replace(/\[.*?\]$/, ""), a = pn(t, e.type), o = e.size;
1711
1717
  c[i] = {
1712
1718
  name: i,
1713
1719
  index: r,
@@ -1742,7 +1748,7 @@ var mn = class extends j {
1742
1748
  let { type: s, isArray: c, name: l } = o;
1743
1749
  o.location === void 0 && (o.location = n.getUniformLocation(e.native, l));
1744
1750
  let u = o.location;
1745
- if (hn(o.value, a)) switch (o.value = gn(o.value, a), s) {
1751
+ if (gn(o.value, a)) switch (o.value = _n(o.value, a), s) {
1746
1752
  case "float":
1747
1753
  c ? n.uniform1fv(u, a) : n.uniform1f(u, a);
1748
1754
  break;
@@ -1829,7 +1835,7 @@ var mn = class extends j {
1829
1835
  super.destroy(), this.bind(null);
1830
1836
  }
1831
1837
  };
1832
- function hn(e, t) {
1838
+ function gn(e, t) {
1833
1839
  if (typeof t == "object" && t) {
1834
1840
  let n = t.length;
1835
1841
  if (typeof e != "object" || !e || e.length !== n) return !0;
@@ -1838,7 +1844,7 @@ function hn(e, t) {
1838
1844
  }
1839
1845
  return e !== t;
1840
1846
  }
1841
- function gn(e, t) {
1847
+ function _n(e, t) {
1842
1848
  if (typeof t == "object" && t) {
1843
1849
  let n = t.length;
1844
1850
  if (typeof e == "object" && e && e.length === n) {
@@ -1851,10 +1857,10 @@ function gn(e, t) {
1851
1857
  }
1852
1858
  //#endregion
1853
1859
  //#region src/core/renderers/gl/state/GlBlendMode.ts
1854
- var _n = /* @__PURE__ */ function(e) {
1860
+ var vn = /* @__PURE__ */ function(e) {
1855
1861
  return e.normal = "normal", e.add = "add", e.multiply = "multiply", e.screen = "screen", e.none = "none", e.normalNpm = "normalNpm", e.addNpm = "add_npm", e.screenNpm = "screenNpm", e.srcIn = "srcIn", e.srcOut = "srcOut", e.srcAtop = "srcAtop", e.dstOver = "dstOver", e.dstIn = "dstIn", e.dstOut = "dstOut", e.dstAtop = "dstAtop", e.xor = "xor", e.subtract = "subtract", e;
1856
1862
  }({});
1857
- function vn(e) {
1863
+ function yn(e) {
1858
1864
  return {
1859
1865
  normal: [e.ONE, e.ONE_MINUS_SRC_ALPHA],
1860
1866
  add: [e.ONE, e.ONE],
@@ -1909,7 +1915,7 @@ function vn(e) {
1909
1915
  }
1910
1916
  //#endregion
1911
1917
  //#region src/core/renderers/gl/state/GlStateSystem.ts
1912
- var yn = class e {
1918
+ var bn = class e {
1913
1919
  static _properties = [
1914
1920
  "blend",
1915
1921
  "offsets",
@@ -1936,14 +1942,14 @@ var yn = class e {
1936
1942
  let t = new e();
1937
1943
  return t.depthTest = !1, t.blend = !0, t;
1938
1944
  }
1939
- _blendMode = _n.normal;
1945
+ _blendMode = vn.normal;
1940
1946
  _polygonOffset = 0;
1941
1947
  bitmap = 0;
1942
1948
  get blendMode() {
1943
1949
  return this._blendMode;
1944
1950
  }
1945
1951
  set blendMode(e) {
1946
- this.blend = e !== _n.none, this._blendMode = e;
1952
+ this.blend = e !== vn.none, this._blendMode = e;
1947
1953
  }
1948
1954
  get polygonOffset() {
1949
1955
  return this._polygonOffset;
@@ -1955,19 +1961,19 @@ var yn = class e {
1955
1961
  if (e) for (let t in e) this[t] = e[t];
1956
1962
  }
1957
1963
  };
1958
- yn._init();
1959
- var bn = class extends j {
1964
+ bn._init();
1965
+ var xn = class extends j {
1960
1966
  install(e) {
1961
1967
  super.install(e), e.state = this;
1962
1968
  }
1963
1969
  _blendEq = !1;
1964
- _setters = yn._properties.map((e) => this[`set${e.replace(/^\S/, (e) => e.toUpperCase())}`]);
1970
+ _setters = bn._properties.map((e) => this[`set${e.replace(/^\S/, (e) => e.toUpperCase())}`]);
1965
1971
  boundStateBitmap = 0;
1966
1972
  boundBlendMode;
1967
1973
  blendModes;
1968
- defaultState = new yn({ blend: !0 });
1974
+ defaultState = new bn({ blend: !0 });
1969
1975
  _updateContext(e) {
1970
- super._updateContext(e), this.blendModes = vn(e);
1976
+ super._updateContext(e), this.blendModes = yn(e);
1971
1977
  }
1972
1978
  toggle(e, t) {
1973
1979
  this._renderer.gl[t ? "enable" : "disable"](e);
@@ -2010,20 +2016,20 @@ var bn = class extends j {
2010
2016
  }
2011
2017
  reset() {
2012
2018
  super.reset();
2013
- let e = (1 << yn._properties.length) - 1;
2019
+ let e = (1 << bn._properties.length) - 1;
2014
2020
  this.boundStateBitmap = ~this.defaultState.bitmap & e, this.boundBlendMode = void 0, this._blendEq = !0, this.bind(this.defaultState);
2015
2021
  }
2016
- }, xn = 5, Sn = 64, Cn = class extends j {
2022
+ }, Sn = 5, Cn = 64, wn = class extends j {
2017
2023
  install(e) {
2018
2024
  super.install(e), e.batch2D = this;
2019
2025
  }
2020
- _state = yn.for2D();
2026
+ _state = bn.for2D();
2021
2027
  _batchSize = 4096 * 4;
2022
2028
  _batchables = [];
2023
2029
  _vertexCount = 0;
2024
2030
  _indexCount = 0;
2025
2031
  _programs = /* @__PURE__ */ new Map();
2026
- _effects = [It, Lt];
2032
+ _effects = [Lt, Rt];
2027
2033
  _effectsRevision = 0;
2028
2034
  effectUniforms = {};
2029
2035
  registerEffect(e) {
@@ -2052,7 +2058,7 @@ var bn = class extends j {
2052
2058
  return {
2053
2059
  shader: {
2054
2060
  instanceId: mt(),
2055
- glProgram: new an({
2061
+ glProgram: new on({
2056
2062
  vertex: `${n}precision highp float;
2057
2063
  in vec2 aPosition;
2058
2064
  in vec2 aUv;
@@ -2135,7 +2141,7 @@ void main(void) {
2135
2141
  };
2136
2142
  }
2137
2143
  _getSlot() {
2138
- let e = Math.min(this._slotIndex++, Sn - 1), t = this._slots[e];
2144
+ let e = Math.min(this._slotIndex++, Cn - 1), t = this._slots[e];
2139
2145
  if (!t) {
2140
2146
  let n = {
2141
2147
  instanceId: mt(),
@@ -2196,8 +2202,8 @@ void main(void) {
2196
2202
  if (super.flush(), this._vertexCount === 0) return;
2197
2203
  let e = this._vertexCount, t = this._indexCount, n = this._batchables;
2198
2204
  this._batchables = [], this._vertexCount = 0, this._indexCount = 0;
2199
- let r = this._renderer.texture.maxTextureImageUnits, i = this._getProgram(r), a = this._slotIndex >= Sn, o = this._getSlot(), s = this._effects.some((e) => e.name === "flowStreak" && e.uvNormalized), c = o.refs, l = !a && o.drawCalls.length > 0 && o.effectsRevision === this._effectsRevision && c.length === n.length * xn;
2200
- if (l) for (let e = 0, t = 0, r = n.length; t < r; t++, e += xn) {
2205
+ let r = this._renderer.texture.maxTextureImageUnits, i = this._getProgram(r), a = this._slotIndex >= Cn, o = this._getSlot(), s = this._effects.some((e) => e.name === "flowStreak" && e.uvNormalized), c = o.refs, l = !a && o.drawCalls.length > 0 && o.effectsRevision === this._effectsRevision && c.length === n.length * Sn;
2206
+ if (l) for (let e = 0, t = 0, r = n.length; t < r; t++, e += Sn) {
2201
2207
  let r = n[t];
2202
2208
  if (c[e] !== (r.__source ?? r) || c[e + 1] !== r.texture || c[e + 2] !== r.uvs || c[e + 3] !== r.size || c[e + 4] !== r.roundPixels) {
2203
2209
  l = !1;
@@ -2213,7 +2219,7 @@ void main(void) {
2213
2219
  c.push(e.__source ?? e, e.texture, e.uvs, e.size, e.roundPixels);
2214
2220
  }
2215
2221
  let u = e * this._vertexSize * 4;
2216
- (!o.attrData || o.attrData.byteLength < u) && (o.attrData = new ArrayBuffer(wn(u)), o.f32 = new Float32Array(o.attrData), o.u8 = new Uint8Array(o.attrData)), (!o.indexData || o.indexData.length < t) && (o.indexData = new Uint32Array(wn(t)));
2222
+ (!o.attrData || o.attrData.byteLength < u) && (o.attrData = new ArrayBuffer(Tn(u)), o.f32 = new Float32Array(o.attrData), o.u8 = new Uint8Array(o.attrData)), (!o.indexData || o.indexData.length < t) && (o.indexData = new Uint32Array(Tn(t)));
2217
2223
  let d = o.f32, f = o.u8, p = o.indexData, m = 0, h = 0, g = [], ee = 0;
2218
2224
  for (let e = n.length, t = { id: ++ee }, i = [], a = /* @__PURE__ */ new Map(), o = 0, c = 0, l = 0; l < e; l++) {
2219
2225
  let u = n[l].texture, te = l === e - 1;
@@ -2226,7 +2232,7 @@ void main(void) {
2226
2232
  let { indices: r, vertices: o, uvs: l = /* @__PURE__ */ new Float32Array(), size: u = {
2227
2233
  width: 0,
2228
2234
  height: 0
2229
- }, texture: te, blendMode: ne = _n.normal, clipOutsideUv: re, roundPixels: ie, modulate: ae = [
2235
+ }, texture: te, blendMode: ne = vn.normal, clipOutsideUv: re, roundPixels: ie, modulate: ae = [
2230
2236
  255,
2231
2237
  255,
2232
2238
  255,
@@ -2257,10 +2263,10 @@ void main(void) {
2257
2263
  super.reset(), this._slots = [], this._slotIndex = 0, this._batchables = [], this._vertexCount = 0, this._indexCount = 0;
2258
2264
  }
2259
2265
  };
2260
- function wn(e) {
2266
+ function Tn(e) {
2261
2267
  return e += +(e === 0), --e, e |= e >>> 1, e |= e >>> 2, e |= e >>> 4, e |= e >>> 8, e |= e >>> 16, e + 1;
2262
2268
  }
2263
- function Tn(e) {
2269
+ function En(e) {
2264
2270
  let t = (e > 65535) << 4;
2265
2271
  e >>>= t;
2266
2272
  let n = (e > 255) << 3;
@@ -2270,9 +2276,9 @@ function Tn(e) {
2270
2276
  //#region src/core/renderers/gl/const.ts
2271
2277
  var M = /* @__PURE__ */ function(e) {
2272
2278
  return e[e.disabled = 0] = "disabled", e[e.renderingMaskAdd = 1] = "renderingMaskAdd", e[e.maskActive = 2] = "maskActive", e[e.inverseMaskActive = 3] = "inverseMaskActive", e[e.renderingMaskRemove = 4] = "renderingMaskRemove", e[e.none = 5] = "none", e;
2273
- }({}), En = /* @__PURE__ */ function(e) {
2279
+ }({}), Dn = /* @__PURE__ */ function(e) {
2274
2280
  return e[e.none = 0] = "none", e[e.color = 16384] = "color", e[e.stencil = 1024] = "stencil", e[e.depth = 256] = "depth", e[e.colorDepth = 16640] = "colorDepth", e[e.colorStencil = 17408] = "colorStencil", e[e.depthStencil = 1280] = "depthStencil", e[e.all = 17664] = "all", e;
2275
- }({}), Dn = class extends j {
2281
+ }({}), On = class extends j {
2276
2282
  install(e) {
2277
2283
  super.install(e), e.mask = this;
2278
2284
  }
@@ -2297,10 +2303,10 @@ var M = /* @__PURE__ */ function(e) {
2297
2303
  let t = this.stack.pop();
2298
2304
  if (!t || t.source !== e) return;
2299
2305
  let { mask: n } = t, r = this._renderer.renderTarget.current?.instanceId ?? -1, i = this._maskStackHash[r] ?? 0;
2300
- "x" in n ? this._renderer.scissor.pop() : "render" in n && (this._renderer.flush(), i === 0 ? (this._renderer.clear(En.stencil), this._renderer.stencil.bind(M.disabled, i)) : this._renderer.stencil.bind(M.renderingMaskRemove, i), i--, n.render(this._renderer), this._renderer.flush(), this._renderer.stencil.bind(M.maskActive, i), this._renderer.colorMask.bind(15)), this._maskStackHash[r] = i;
2306
+ "x" in n ? this._renderer.scissor.pop() : "render" in n && (this._renderer.flush(), i === 0 ? (this._renderer.clear(Dn.stencil), this._renderer.stencil.bind(M.disabled, i)) : this._renderer.stencil.bind(M.renderingMaskRemove, i), i--, n.render(this._renderer), this._renderer.flush(), this._renderer.stencil.bind(M.maskActive, i), this._renderer.colorMask.bind(15)), this._maskStackHash[r] = i;
2301
2307
  }
2302
- }, On = [];
2303
- On[M.none] = {}, On[M.disabled] = {}, On[M.renderingMaskAdd] = {
2308
+ }, kn = [];
2309
+ kn[M.none] = {}, kn[M.disabled] = {}, kn[M.renderingMaskAdd] = {
2304
2310
  stencilFront: {
2305
2311
  compare: "equal",
2306
2312
  passOp: "increment-clamp"
@@ -2309,7 +2315,7 @@ On[M.none] = {}, On[M.disabled] = {}, On[M.renderingMaskAdd] = {
2309
2315
  compare: "equal",
2310
2316
  passOp: "increment-clamp"
2311
2317
  }
2312
- }, On[M.renderingMaskRemove] = {
2318
+ }, kn[M.renderingMaskRemove] = {
2313
2319
  stencilFront: {
2314
2320
  compare: "equal",
2315
2321
  passOp: "decrement-clamp"
@@ -2318,7 +2324,7 @@ On[M.none] = {}, On[M.disabled] = {}, On[M.renderingMaskAdd] = {
2318
2324
  compare: "equal",
2319
2325
  passOp: "decrement-clamp"
2320
2326
  }
2321
- }, On[M.maskActive] = {
2327
+ }, kn[M.maskActive] = {
2322
2328
  stencilFront: {
2323
2329
  compare: "equal",
2324
2330
  passOp: "keep"
@@ -2327,7 +2333,7 @@ On[M.none] = {}, On[M.disabled] = {}, On[M.renderingMaskAdd] = {
2327
2333
  compare: "equal",
2328
2334
  passOp: "keep"
2329
2335
  }
2330
- }, On[M.inverseMaskActive] = {
2336
+ }, kn[M.inverseMaskActive] = {
2331
2337
  stencilFront: {
2332
2338
  compare: "not-equal",
2333
2339
  passOp: "keep"
@@ -2337,7 +2343,7 @@ On[M.none] = {}, On[M.disabled] = {}, On[M.renderingMaskAdd] = {
2337
2343
  passOp: "keep"
2338
2344
  }
2339
2345
  };
2340
- var kn = class extends j {
2346
+ var An = class extends j {
2341
2347
  install(e) {
2342
2348
  super.install(e), e.stencil = this;
2343
2349
  }
@@ -2389,7 +2395,7 @@ var kn = class extends j {
2389
2395
  }
2390
2396
  };
2391
2397
  bind(e, t) {
2392
- let n = this.current[this._renderer.renderTarget.current?.instanceId ?? -1], r = this._gl, i = On[e], a = this._cache;
2398
+ let n = this.current[this._renderer.renderTarget.current?.instanceId ?? -1], r = this._gl, i = kn[e], a = this._cache;
2393
2399
  if (n.stencilMode = e, n.refCount = t, e === M.disabled) {
2394
2400
  this._cache.enabled && (this._cache.enabled = !1, r.disable(r.STENCIL_TEST));
2395
2401
  return;
@@ -2399,8 +2405,8 @@ var kn = class extends j {
2399
2405
  destroy() {
2400
2406
  super.destroy(), this._renderer.renderTarget.off("updateRenderTarget", this._updateRenderTarget);
2401
2407
  }
2402
- }, An = class extends j {
2403
- current = new wt(0, 0, 0, 0);
2408
+ }, jn = class extends j {
2409
+ current = new Tt(0, 0, 0, 0);
2404
2410
  install(e) {
2405
2411
  super.install(e), e.viewport = this;
2406
2412
  }
@@ -2408,7 +2414,7 @@ var kn = class extends j {
2408
2414
  let t = this.current, n = Math.floor(e.x), r = Math.floor(e.y), i = Math.floor(e.width), a = Math.floor(e.height);
2409
2415
  t.x === n && t.y === r && t.width === i && t.height === a || (this._gl.viewport(n, r, i, a), t.x = n, t.y = r, t.width = i, t.height = a);
2410
2416
  }
2411
- }, jn = class {
2417
+ }, Mn = class {
2412
2418
  framebuffer;
2413
2419
  width = -1;
2414
2420
  height = -1;
@@ -2419,7 +2425,7 @@ var kn = class extends j {
2419
2425
  constructor(e) {
2420
2426
  this.framebuffer = e;
2421
2427
  }
2422
- }, Mn = class extends j {
2428
+ }, Nn = class extends j {
2423
2429
  install(e) {
2424
2430
  super.install(e), e.renderTarget = this;
2425
2431
  }
@@ -2429,7 +2435,7 @@ var kn = class extends j {
2429
2435
  _msaaSamples = [];
2430
2436
  _hasMRT = !0;
2431
2437
  _writeDepthTexture = !0;
2432
- projection = new kt();
2438
+ projection = new At();
2433
2439
  get _sampleCount() {
2434
2440
  return Math.min(4, this._msaaSamples[0] || 4);
2435
2441
  }
@@ -2468,7 +2474,7 @@ var kn = class extends j {
2468
2474
  return this.glRenderTargets.get(e.instanceId) || this._createGlRenderTarget(e);
2469
2475
  }
2470
2476
  _createGlRenderTarget(e) {
2471
- let t = this._gl, n = new jn(t.createFramebuffer());
2477
+ let t = this._gl, n = new Mn(t.createFramebuffer());
2472
2478
  return this.glRenderTargets.set(e.instanceId, n), this.renderTargets.get(e.instanceId) || (this.renderTargets.set(e.instanceId, e), this._update(e, n), "on" in e && (e.on("updateProperty", (t) => {
2473
2479
  switch (t) {
2474
2480
  case "width":
@@ -2545,28 +2551,28 @@ var kn = class extends j {
2545
2551
  reset() {
2546
2552
  super.reset(), this._renderer.contextLost || this.glRenderTargets.forEach((e) => this.destroyGpuRenderTarget(e)), this.renderTargets.clear(), this.glRenderTargets.clear(), this.current = null, this._msaaSamples.length = 0;
2547
2553
  }
2548
- }, Nn = /* @__PURE__ */ function(e) {
2554
+ }, Pn = /* @__PURE__ */ function(e) {
2549
2555
  return e[e.RGBA = 6408] = "RGBA", e[e.RGB = 6407] = "RGB", e[e.RG = 33319] = "RG", e[e.RED = 6403] = "RED", e[e.RGBA_INTEGER = 36249] = "RGBA_INTEGER", e[e.RGB_INTEGER = 36248] = "RGB_INTEGER", e[e.RG_INTEGER = 33320] = "RG_INTEGER", e[e.RED_INTEGER = 36244] = "RED_INTEGER", e[e.ALPHA = 6406] = "ALPHA", e[e.LUMINANCE = 6409] = "LUMINANCE", e[e.LUMINANCE_ALPHA = 6410] = "LUMINANCE_ALPHA", e[e.DEPTH_COMPONENT = 6402] = "DEPTH_COMPONENT", e[e.DEPTH_STENCIL = 34041] = "DEPTH_STENCIL", e;
2550
- }({}), Pn = /* @__PURE__ */ function(e) {
2556
+ }({}), Fn = /* @__PURE__ */ function(e) {
2551
2557
  return e[e.TEXTURE_2D = 3553] = "TEXTURE_2D", e[e.TEXTURE_CUBE_MAP = 34067] = "TEXTURE_CUBE_MAP", e[e.TEXTURE_2D_ARRAY = 35866] = "TEXTURE_2D_ARRAY", e[e.TEXTURE_CUBE_MAP_POSITIVE_X = 34069] = "TEXTURE_CUBE_MAP_POSITIVE_X", e[e.TEXTURE_CUBE_MAP_NEGATIVE_X = 34070] = "TEXTURE_CUBE_MAP_NEGATIVE_X", e[e.TEXTURE_CUBE_MAP_POSITIVE_Y = 34071] = "TEXTURE_CUBE_MAP_POSITIVE_Y", e[e.TEXTURE_CUBE_MAP_NEGATIVE_Y = 34072] = "TEXTURE_CUBE_MAP_NEGATIVE_Y", e[e.TEXTURE_CUBE_MAP_POSITIVE_Z = 34073] = "TEXTURE_CUBE_MAP_POSITIVE_Z", e[e.TEXTURE_CUBE_MAP_NEGATIVE_Z = 34074] = "TEXTURE_CUBE_MAP_NEGATIVE_Z", e;
2552
2558
  }({}), N = /* @__PURE__ */ function(e) {
2553
2559
  return e[e.UNSIGNED_BYTE = 5121] = "UNSIGNED_BYTE", e[e.UNSIGNED_SHORT = 5123] = "UNSIGNED_SHORT", e[e.UNSIGNED_SHORT_5_6_5 = 33635] = "UNSIGNED_SHORT_5_6_5", e[e.UNSIGNED_SHORT_4_4_4_4 = 32819] = "UNSIGNED_SHORT_4_4_4_4", e[e.UNSIGNED_SHORT_5_5_5_1 = 32820] = "UNSIGNED_SHORT_5_5_5_1", e[e.UNSIGNED_INT = 5125] = "UNSIGNED_INT", e[e.UNSIGNED_INT_10F_11F_11F_REV = 35899] = "UNSIGNED_INT_10F_11F_11F_REV", e[e.UNSIGNED_INT_2_10_10_10_REV = 33640] = "UNSIGNED_INT_2_10_10_10_REV", e[e.UNSIGNED_INT_24_8 = 34042] = "UNSIGNED_INT_24_8", e[e.UNSIGNED_INT_5_9_9_9_REV = 35902] = "UNSIGNED_INT_5_9_9_9_REV", e[e.BYTE = 5120] = "BYTE", e[e.SHORT = 5122] = "SHORT", e[e.INT = 5124] = "INT", e[e.FLOAT = 5126] = "FLOAT", e[e.FLOAT_32_UNSIGNED_INT_24_8_REV = 36269] = "FLOAT_32_UNSIGNED_INT_24_8_REV", e[e.HALF_FLOAT = 36193] = "HALF_FLOAT", e;
2554
- }({}), Fn = class {
2560
+ }({}), In = class {
2555
2561
  native;
2556
- target = Pn.TEXTURE_2D;
2562
+ target = Fn.TEXTURE_2D;
2557
2563
  width = -1;
2558
2564
  height = -1;
2559
2565
  mipmap = !1;
2560
2566
  type = N.UNSIGNED_BYTE;
2561
- internalFormat = Nn.RGBA;
2562
- format = Nn.RGBA;
2567
+ internalFormat = Pn.RGBA;
2568
+ format = Pn.RGBA;
2563
2569
  constructor(e) {
2564
2570
  this.native = e;
2565
2571
  }
2566
2572
  };
2567
2573
  //#endregion
2568
2574
  //#region src/core/renderers/gl/texture/mapFormatToGlFormat.ts
2569
- function In(e) {
2575
+ function Ln(e) {
2570
2576
  return {
2571
2577
  r8unorm: e.RED,
2572
2578
  r8snorm: e.RED,
@@ -2614,7 +2620,7 @@ function In(e) {
2614
2620
  }
2615
2621
  //#endregion
2616
2622
  //#region src/core/renderers/gl/texture/mapFormatToGlInternalFormat.ts
2617
- function Ln(e, t) {
2623
+ function Rn(e, t) {
2618
2624
  let n = {}, r = e.RGBA;
2619
2625
  return e instanceof WebGLRenderingContext ? t.srgb && (n = {
2620
2626
  "rgba8unorm-srgb": t.srgb.SRGB8_ALPHA8_EXT,
@@ -2730,7 +2736,7 @@ function Ln(e, t) {
2730
2736
  }
2731
2737
  //#endregion
2732
2738
  //#region src/core/renderers/gl/texture/mapFormatToGlType.ts
2733
- function Rn(e) {
2739
+ function zn(e) {
2734
2740
  return {
2735
2741
  r8unorm: e.UNSIGNED_BYTE,
2736
2742
  r8snorm: e.BYTE,
@@ -2778,7 +2784,7 @@ function Rn(e) {
2778
2784
  }
2779
2785
  //#endregion
2780
2786
  //#region src/core/renderers/gl/texture/updateTextureStyle.ts
2781
- var zn = {
2787
+ var Bn = {
2782
2788
  linear: {
2783
2789
  linear: 9987,
2784
2790
  nearest: 9985
@@ -2787,10 +2793,10 @@ var zn = {
2787
2793
  linear: 9986,
2788
2794
  nearest: 9984
2789
2795
  }
2790
- }, Bn = {
2796
+ }, Vn = {
2791
2797
  linear: 9729,
2792
2798
  nearest: 9728
2793
- }, Vn = {
2799
+ }, Hn = {
2794
2800
  never: 512,
2795
2801
  less: 513,
2796
2802
  equal: 514,
@@ -2799,32 +2805,32 @@ var zn = {
2799
2805
  "not-equal": 517,
2800
2806
  "greater-equal": 518,
2801
2807
  always: 519
2802
- }, Hn = {
2808
+ }, Un = {
2803
2809
  "clamp-to-edge": 33071,
2804
2810
  repeat: 10497,
2805
2811
  "mirror-repeat": 33648
2806
2812
  };
2807
- function Un(e, t, n, r, i, a, o, s) {
2813
+ function Wn(e, t, n, r, i, a, o, s) {
2808
2814
  let { addressModeU: c = "repeat", addressModeV: l = "repeat", addressModeW: u = "repeat", magFilter: d = "linear", minFilter: f = "linear", mipmapFilter: p = "linear", maxAnisotropy: m = 0, compare: h } = e, g = a;
2809
2815
  if (!s || c !== "repeat" || l !== "repeat" || u !== "repeat") {
2810
- let e = Hn[o ? "clamp-to-edge" : c], n = Hn[o ? "clamp-to-edge" : l], r = Hn[o ? "clamp-to-edge" : u];
2816
+ let e = Un[o ? "clamp-to-edge" : c], n = Un[o ? "clamp-to-edge" : l], r = Un[o ? "clamp-to-edge" : u];
2811
2817
  t[i](g, t.TEXTURE_WRAP_S, e), t[i](g, t.TEXTURE_WRAP_T, n), t.TEXTURE_WRAP_R && t[i](g, t.TEXTURE_WRAP_R, r);
2812
2818
  }
2813
- if ((!s || d !== "linear") && t[i](g, t.TEXTURE_MAG_FILTER, Bn[d]), n) {
2819
+ if ((!s || d !== "linear") && t[i](g, t.TEXTURE_MAG_FILTER, Vn[d]), n) {
2814
2820
  if (!s || p !== "linear") {
2815
- let e = zn[f][p];
2821
+ let e = Bn[f][p];
2816
2822
  t[i](g, t.TEXTURE_MIN_FILTER, e);
2817
2823
  }
2818
- } else t[i](g, t.TEXTURE_MIN_FILTER, Bn[f]);
2824
+ } else t[i](g, t.TEXTURE_MIN_FILTER, Vn[f]);
2819
2825
  if (r && m > 1) {
2820
2826
  let e = Math.min(m, t.getParameter(r.MAX_TEXTURE_MAX_ANISOTROPY_EXT));
2821
2827
  t[i](g, r.TEXTURE_MAX_ANISOTROPY_EXT, e);
2822
2828
  }
2823
- h && t[i](g, t.TEXTURE_COMPARE_FUNC, Vn[h]);
2829
+ h && t[i](g, t.TEXTURE_COMPARE_FUNC, Hn[h]);
2824
2830
  }
2825
2831
  //#endregion
2826
2832
  //#region src/core/renderers/gl/texture/uploaders/index.ts
2827
- var Wn = {
2833
+ var Gn = {
2828
2834
  buffer: {
2829
2835
  id: "buffer",
2830
2836
  upload: (e, t, n) => {
@@ -2838,8 +2844,8 @@ var Wn = {
2838
2844
  c < o || l < s ? ((i !== o || a !== s) && n.texImage2D(t.target, 0, t.internalFormat, o, s, 0, t.format, t.type, null), r === 2 ? n.texSubImage2D(n.TEXTURE_2D, 0, 0, 0, c, l, t.format, t.type, e.source) : n.texSubImage2D(n.TEXTURE_2D, 0, 0, 0, t.format, t.type, e.source)) : i === o && a === s ? n.texSubImage2D(n.TEXTURE_2D, 0, 0, 0, t.format, t.type, e.source) : r === 2 ? n.texImage2D(t.target, 0, t.internalFormat, o, s, 0, t.format, t.type, e.source) : n.texImage2D(t.target, 0, t.internalFormat, t.format, t.type, e.source), t.width = o, t.height = s;
2839
2845
  }
2840
2846
  }
2841
- }, Gn = class extends j {
2842
- uploaders = { ...Wn };
2847
+ }, Kn = class extends j {
2848
+ uploaders = { ...Gn };
2843
2849
  textures = /* @__PURE__ */ new Map();
2844
2850
  glTextures = /* @__PURE__ */ new Map();
2845
2851
  _mapFormatToInternalFormat = Object.create(null);
@@ -2854,14 +2860,14 @@ var Wn = {
2854
2860
  super.install(e), e.texture = this;
2855
2861
  }
2856
2862
  _updateContext(e) {
2857
- super._updateContext(e), Object.keys(this._mapFormatToInternalFormat).length || (this._mapFormatToInternalFormat = Ln(e, this._renderer.extensions), this._mapFormatToType = Rn(e), this._mapFormatToFormat = In(e)), this.maxTextureSize = e.getParameter(e.MAX_TEXTURE_SIZE), this.maxTextureImageUnits = e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS);
2863
+ super._updateContext(e), Object.keys(this._mapFormatToInternalFormat).length || (this._mapFormatToInternalFormat = Rn(e, this._renderer.extensions), this._mapFormatToType = zn(e), this._mapFormatToFormat = Ln(e)), this.maxTextureSize = e.getParameter(e.MAX_TEXTURE_SIZE), this.maxTextureImageUnits = e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS);
2858
2864
  for (let e = 0; e < this.maxTextureImageUnits; e++) this.unbind(e);
2859
2865
  }
2860
2866
  getGlTexture(e) {
2861
2867
  return this.glTextures.get(e.instanceId) || this._createGlTexture(e);
2862
2868
  }
2863
2869
  _createGlTexture(e) {
2864
- let t = this._gl, n = new Fn(t.createTexture());
2870
+ let t = this._gl, n = new In(t.createTexture());
2865
2871
  if (t.bindTexture(n.target, n.native), n.type = this._mapFormatToType[e.format], n.internalFormat = this._mapFormatToInternalFormat[e.format], n.format = this._mapFormatToFormat[e.format], this.glTextures.set(e.instanceId, n), e.mipmap && (this._renderer.supports.nonPowOf2mipmaps || e.isPowerOfTwo)) {
2866
2872
  let t = Math.max(e.pixelWidth ?? e.width, e.pixelHeight ?? e.height);
2867
2873
  e.mipLevelCount = Math.floor(Math.log2(t)) + 1;
@@ -2921,7 +2927,7 @@ var Wn = {
2921
2927
  }
2922
2928
  updateStyle(e, t = !1) {
2923
2929
  let n = this._gl;
2924
- Un(e, n, e.mipLevelCount > 1, this._renderer.extensions.anisotropicFiltering, "texParameteri", n.TEXTURE_2D, !this._renderer.supports.nonPowOf2wrapping && !e.isPowerOfTwo, t);
2930
+ Wn(e, n, e.mipLevelCount > 1, this._renderer.extensions.anisotropicFiltering, "texParameteri", n.TEXTURE_2D, !this._renderer.supports.nonPowOf2wrapping && !e.isPowerOfTwo, t);
2925
2931
  }
2926
2932
  updateGpuTexture(e) {
2927
2933
  this.bind(e);
@@ -2936,7 +2942,7 @@ var Wn = {
2936
2942
  let e = this._gl;
2937
2943
  this._renderer.contextLost || this.glTextures.forEach((t) => e.deleteTexture(t.native)), this.textures.clear(), this.glTextures.clear(), this._location = 0, this.current.length = 0, this._premultiplyAlpha = !1, this._renderer.contextLost || e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL, this._premultiplyAlpha);
2938
2944
  }
2939
- }, Kn = {
2945
+ }, qn = {
2940
2946
  uint8x2: N.UNSIGNED_BYTE,
2941
2947
  uint8x4: N.UNSIGNED_BYTE,
2942
2948
  sint8x2: N.BYTE,
@@ -2968,18 +2974,18 @@ var Wn = {
2968
2974
  sint32x3: N.INT,
2969
2975
  sint32x4: N.INT
2970
2976
  };
2971
- function qn(e) {
2972
- return Kn[e] ?? Kn.float32;
2977
+ function Jn(e) {
2978
+ return qn[e] ?? qn.float32;
2973
2979
  }
2974
2980
  //#endregion
2975
2981
  //#region src/core/renderers/gl/geometry/GlGeometrySystem.ts
2976
- var Jn = {
2982
+ var Yn = {
2977
2983
  "point-list": 0,
2978
2984
  "line-list": 1,
2979
2985
  "line-strip": 3,
2980
2986
  "triangle-list": 4,
2981
2987
  "triangle-strip": 5
2982
- }, Yn = class extends j {
2988
+ }, Xn = class extends j {
2983
2989
  _geometryVaoHash = {};
2984
2990
  hasInstance = !1;
2985
2991
  current = null;
@@ -3018,11 +3024,11 @@ var Jn = {
3018
3024
  }
3019
3025
  for (let e in r) {
3020
3026
  let t = r[e];
3021
- i[t.buffer.instanceId] += sn(t.format).stride;
3027
+ i[t.buffer.instanceId] += cn(t.format).stride;
3022
3028
  }
3023
3029
  for (let e in r) {
3024
3030
  let t = r[e];
3025
- t.stride ??= i[t.buffer.instanceId], t.start ??= a[t.buffer.instanceId], a[t.buffer.instanceId] += sn(t.format).stride;
3031
+ t.stride ??= i[t.buffer.instanceId], t.start ??= a[t.buffer.instanceId], a[t.buffer.instanceId] += cn(t.format).stride;
3026
3032
  }
3027
3033
  }
3028
3034
  _createVao(e, t) {
@@ -3057,7 +3063,7 @@ var Jn = {
3057
3063
  a !== c && (r.bind(s), a = c);
3058
3064
  let e = l.location;
3059
3065
  n.enableVertexAttribArray(e);
3060
- let t = sn(o.format), i = qn(o.format);
3066
+ let t = cn(o.format), i = Jn(o.format);
3061
3067
  if (l.format?.substring(1, 4) === "int" ? n.vertexAttribIPointer(e, t.size, i, o.stride ?? 0, o.start ?? 0) : n.vertexAttribPointer(e, t.size, i, t.normalized, o.stride ?? 0, o.start ?? 0), o.instance) if (this.hasInstance) {
3062
3068
  let t = o.divisor ?? 1;
3063
3069
  n.vertexAttribDivisor(e, t);
@@ -3090,7 +3096,7 @@ var Jn = {
3090
3096
  let { topology: t, size: n, start: r = 0, instanceCount: i } = e, { gl: a } = this._renderer, o = this.current;
3091
3097
  if (!o) return this;
3092
3098
  t = t || o.topology || "triangle-list";
3093
- let s = Jn[t];
3099
+ let s = Yn[t];
3094
3100
  if (i = i || o.instanceCount || 1, o.indexBuffer) {
3095
3101
  n ||= o.indexBuffer.data.length;
3096
3102
  let e = o.indexBuffer.data.BYTES_PER_ELEMENT, t = e === 2 ? a.UNSIGNED_SHORT : a.UNSIGNED_INT;
@@ -3111,7 +3117,7 @@ var Jn = {
3111
3117
  }
3112
3118
  this._geometryVaoHash = {}, this.current = null, this.currentVao = null;
3113
3119
  }
3114
- }, Xn = class extends j {
3120
+ }, Zn = class extends j {
3115
3121
  install(e) {
3116
3122
  super.install(e), e.colorMask = this;
3117
3123
  }
@@ -3122,19 +3128,19 @@ var Jn = {
3122
3128
  };
3123
3129
  //#endregion
3124
3130
  //#region src/core/renderers/gl/GlScissorSystem.ts
3125
- function Zn(e, t, n) {
3131
+ function Qn(e, t, n) {
3126
3132
  let [r, i, a, o, s, c, l, u, d] = e, f = r * t + o * n + l, p = i * t + s * n + u, m = a * t + c * n + d;
3127
3133
  return {
3128
3134
  x: f / m,
3129
3135
  y: p / m
3130
3136
  };
3131
3137
  }
3132
- function Qn(e, t) {
3138
+ function $n(e, t) {
3133
3139
  let { x: n, y: r, width: i, height: a } = t, o = [
3134
- Zn(e, n, r),
3135
- Zn(e, n + i, r),
3136
- Zn(e, n + i, r + a),
3137
- Zn(e, n, r + a)
3140
+ Qn(e, n, r),
3141
+ Qn(e, n + i, r),
3142
+ Qn(e, n + i, r + a),
3143
+ Qn(e, n, r + a)
3138
3144
  ], s = o.map((e) => e.x), c = o.map((e) => e.y), l = Math.min(...s), u = Math.max(...s), d = Math.min(...c), f = Math.max(...c);
3139
3145
  return {
3140
3146
  x: l,
@@ -3143,7 +3149,7 @@ function Qn(e, t) {
3143
3149
  height: f - d
3144
3150
  };
3145
3151
  }
3146
- function $n(e, t) {
3152
+ function er(e, t) {
3147
3153
  let n = Math.max(e.x, t.x), r = Math.max(e.y, t.y), i = Math.min(e.x + e.width, t.x + t.width), a = Math.min(e.y + e.height, t.y + t.height);
3148
3154
  return {
3149
3155
  x: n,
@@ -3152,7 +3158,7 @@ function $n(e, t) {
3152
3158
  height: Math.max(0, a - r)
3153
3159
  };
3154
3160
  }
3155
- var er = class extends j {
3161
+ var tr = class extends j {
3156
3162
  install(e) {
3157
3163
  super.install(e), e.scissor = this;
3158
3164
  }
@@ -3176,7 +3182,7 @@ var er = class extends j {
3176
3182
  y: e.y,
3177
3183
  width: e.width,
3178
3184
  height: e.height
3179
- }, i = n ? $n(n, r) : r;
3185
+ }, i = n ? er(n, r) : r;
3180
3186
  t.stack.push(i), this.bind(i);
3181
3187
  }
3182
3188
  pop() {
@@ -3187,28 +3193,28 @@ var er = class extends j {
3187
3193
  let t = this._gl;
3188
3194
  if (e) {
3189
3195
  t.enable(t.SCISSOR_TEST);
3190
- let { pixelRatio: n, viewport: r } = this._renderer, { viewMatrix: i } = this._renderer.shader.uniforms, { x: a, y: o, width: s, height: c } = Qn(i, e), l = r.current.height / n - (o + c);
3196
+ let { pixelRatio: n, viewport: r } = this._renderer, { viewMatrix: i } = this._renderer.shader.uniforms, { x: a, y: o, width: s, height: c } = $n(i, e), l = r.current.height / n - (o + c);
3191
3197
  t.scissor(a * n, l * n, s * n, c * n);
3192
3198
  } else t.disable(t.SCISSOR_TEST);
3193
3199
  }
3194
3200
  destroy() {
3195
3201
  super.destroy(), this._renderer.renderTarget.off("updateRenderTarget", this._updateRenderTarget);
3196
3202
  }
3197
- }, tr = class extends Bt {
3203
+ }, nr = class extends Vt {
3198
3204
  contextLost = !1;
3199
3205
  _systems = [
3200
- new Gn(),
3201
- new Kt(),
3202
- new mn(),
3203
- new Yn(),
3204
- new Mn(),
3205
- new bn(),
3206
- new Dn(),
3206
+ new Kn(),
3207
+ new qt(),
3208
+ new hn(),
3207
3209
  new Xn(),
3208
- new kn(),
3209
- new er(),
3210
- new Cn(),
3211
- new An()
3210
+ new Nn(),
3211
+ new xn(),
3212
+ new On(),
3213
+ new Zn(),
3214
+ new An(),
3215
+ new tr(),
3216
+ new wn(),
3217
+ new jn()
3212
3218
  ];
3213
3219
  bindPoints = /* @__PURE__ */ new Map();
3214
3220
  supports = {
@@ -3302,8 +3308,8 @@ var er = class extends j {
3302
3308
  height: this.screen.height * this.pixelRatio
3303
3309
  });
3304
3310
  }
3305
- clear(e = En.all) {
3306
- typeof e == "boolean" && (e = e ? En.all : En.none), e && this.gl.clear(e);
3311
+ clear(e = Dn.all) {
3312
+ typeof e == "boolean" && (e = e ? Dn.all : Dn.none), e && this.gl.clear(e);
3307
3313
  }
3308
3314
  reset() {
3309
3315
  this._systems.forEach((e) => e.reset());
@@ -3320,7 +3326,7 @@ var er = class extends j {
3320
3326
  for (let e = 0; e < i; e += a) c.set(s.subarray(e, e + a), o - e);
3321
3327
  return c;
3322
3328
  }
3323
- }, nr = class {}, rr = class extends nr {
3329
+ }, rr = class {}, ir = class extends rr {
3324
3330
  install(e) {
3325
3331
  let t = async (e) => {
3326
3332
  let { parseFont: t } = await import("modern-font");
@@ -3334,15 +3340,15 @@ var er = class extends j {
3334
3340
  e.register(n, t);
3335
3341
  }), e.font = this, this;
3336
3342
  }
3337
- }, ir = class extends Ct {
3343
+ }, ar = class extends Ct {
3338
3344
  constructor(e) {
3339
3345
  super(), this.setProperties(e);
3340
3346
  }
3341
3347
  };
3342
- k([_({ fallback: A.index }), O("design:type", A === void 0 ? Object : A)], ir.prototype, "usage", void 0), k([_({ default: () => /* @__PURE__ */ new Uint32Array() }), O("design:type", Object)], ir.prototype, "data", void 0);
3348
+ k([_({ fallback: A.index }), O("design:type", A === void 0 ? Object : A)], ar.prototype, "usage", void 0), k([_({ default: () => /* @__PURE__ */ new Uint32Array() }), O("design:type", Object)], ar.prototype, "data", void 0);
3343
3349
  //#endregion
3344
3350
  //#region src/scene/resources/geometries/Geometry.ts
3345
- var ar = class extends Ct {
3351
+ var or = class extends Ct {
3346
3352
  constructor(e = {}) {
3347
3353
  super(), this.setProperties(e);
3348
3354
  }
@@ -3350,7 +3356,7 @@ var ar = class extends Ct {
3350
3356
  e.flush(), t.activate(e, n), e.geometry.bind(this, t.glProgram), e.geometry.draw(), e.geometry.unbind();
3351
3357
  }
3352
3358
  };
3353
- k([_({ fallback: "triangle-list" }), O("design:type", Object)], ar.prototype, "topology", void 0), k([_({ default: () => ({}) }), O("design:type", typeof Record > "u" ? Object : Record)], ar.prototype, "attributes", void 0), k([_({ default: () => new ir() }), O("design:type", ir === void 0 ? Object : ir)], ar.prototype, "indexBuffer", void 0), k([_({ fallback: 1 }), O("design:type", Number)], ar.prototype, "instanceCount", void 0);
3359
+ k([_({ fallback: "triangle-list" }), O("design:type", Object)], or.prototype, "topology", void 0), k([_({ default: () => ({}) }), O("design:type", typeof Record > "u" ? Object : Record)], or.prototype, "attributes", void 0), k([_({ default: () => new ar() }), O("design:type", ar === void 0 ? Object : ar)], or.prototype, "indexBuffer", void 0), k([_({ fallback: 1 }), O("design:type", Number)], or.prototype, "instanceCount", void 0);
3354
3360
  //#endregion
3355
3361
  //#region src/scene/resources/geometries/VertexBuffer.ts
3356
3362
  var P = class extends Ct {
@@ -3369,7 +3375,7 @@ var F = class extends Ct {
3369
3375
  k([_({ default: () => new P() }), O("design:type", P === void 0 ? Object : P)], F.prototype, "buffer", void 0), k([_({ fallback: "float32" }), O("design:type", Object)], F.prototype, "format", void 0), k([_(), O("design:type", Boolean)], F.prototype, "instance", void 0), k([_(), O("design:type", Number)], F.prototype, "stride", void 0), k([_(), O("design:type", Number)], F.prototype, "offset", void 0), k([_(), O("design:type", Number)], F.prototype, "start", void 0), k([_(), O("design:type", Number)], F.prototype, "divisor", void 0);
3370
3376
  //#endregion
3371
3377
  //#region src/scene/resources/geometries/QuadGeometry.ts
3372
- var or = class extends ar {
3378
+ var sr = class extends or {
3373
3379
  constructor() {
3374
3380
  super({
3375
3381
  topology: "triangle-strip",
@@ -3386,7 +3392,7 @@ var or = class extends ar {
3386
3392
  1
3387
3393
  ]) })
3388
3394
  }) },
3389
- indexBuffer: new ir({ data: new Uint32Array([
3395
+ indexBuffer: new ar({ data: new Uint32Array([
3390
3396
  0,
3391
3397
  1,
3392
3398
  3,
@@ -3397,7 +3403,7 @@ var or = class extends ar {
3397
3403
  };
3398
3404
  //#endregion
3399
3405
  //#region src/scene/resources/materials/Material.ts
3400
- function sr() {
3406
+ function cr() {
3401
3407
  return {
3402
3408
  projectionMatrix: new Float32Array([
3403
3409
  1,
@@ -3435,7 +3441,7 @@ var I = class extends Ct {
3435
3441
  constructor(e = {}) {
3436
3442
  super();
3437
3443
  let { uniforms: t, gl: n } = e;
3438
- t && (this.uniforms = t), this.glProgram = new an({
3444
+ t && (this.uniforms = t), this.glProgram = new on({
3439
3445
  vertex: "in vec2 position;\nuniform mat3 projectionMatrix;\nuniform mat3 modelViewMatrix;\nvoid main(void) {\n gl_Position = vec4((projectionMatrix * modelViewMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}",
3440
3446
  fragment: "uniform vec4 tint;\nvoid main(void) {\n gl_FragColor = tint;\n}",
3441
3447
  ...n
@@ -3448,13 +3454,13 @@ var I = class extends Ct {
3448
3454
  }, e.shader.updateUniforms(this);
3449
3455
  }
3450
3456
  };
3451
- k([_({ default: sr }), O("design:type", typeof Record > "u" ? Object : Record)], I.prototype, "uniforms", void 0);
3457
+ k([_({ default: cr }), O("design:type", typeof Record > "u" ? Object : Record)], I.prototype, "uniforms", void 0);
3452
3458
  //#endregion
3453
3459
  //#region src/scene/resources/materials/EffectMaterial.ts
3454
- var cr = /^uniform \w+ (.+?);\s*\/\/\s*=\s*([^;]+?)[\s;]*$/gm, lr = /vec(\d)\((.*)\)/;
3455
- function ur(e) {
3460
+ var lr = /^uniform \w+ (.+?);\s*\/\/\s*=\s*([^;]+?)[\s;]*$/gm, ur = /vec(\d)\((.*)\)/;
3461
+ function dr(e) {
3456
3462
  e = e.trim();
3457
- let t = e.match(lr);
3463
+ let t = e.match(ur);
3458
3464
  if (t) {
3459
3465
  let e = Array.from({ length: Number(t[1]) }, () => 0);
3460
3466
  return t[2].split(",").forEach((t, n) => {
@@ -3463,7 +3469,7 @@ function ur(e) {
3463
3469
  }
3464
3470
  return Number(e);
3465
3471
  }
3466
- var dr = class e extends I {
3472
+ var fr = class e extends I {
3467
3473
  static RE = {
3468
3474
  getColor: /\sgetColor\s*\(/,
3469
3475
  getFromColor: /\sgetFromColor\s*\(/,
@@ -3499,12 +3505,12 @@ ${t}${n.transform ? "\nvoid main(void) { gl_FragColor = transform(vUv); }" : n.t
3499
3505
  progress: 0
3500
3506
  }
3501
3507
  }), this.has = n;
3502
- let r = t.matchAll(cr);
3508
+ let r = t.matchAll(lr);
3503
3509
  for (let e of r) e[1] && e[2] && e[1].split(",").forEach((t) => {
3504
- this.uniforms[t.trim()] = ur(e[2]);
3510
+ this.uniforms[t.trim()] = dr(e[2]);
3505
3511
  });
3506
3512
  }
3507
- }, fr = class extends I {
3513
+ }, pr = class extends I {
3508
3514
  static _instance;
3509
3515
  static get instance() {
3510
3516
  return this._instance ??= new this();
@@ -3543,7 +3549,7 @@ ${t}${n.transform ? "\nvoid main(void) { gl_FragColor = transform(vUv); }" : n.t
3543
3549
  }
3544
3550
  });
3545
3551
  }
3546
- }, pr = class extends I {
3552
+ }, mr = class extends I {
3547
3553
  static _instance;
3548
3554
  static get instance() {
3549
3555
  return this._instance ??= new this();
@@ -3587,12 +3593,12 @@ ${t}${n.transform ? "\nvoid main(void) { gl_FragColor = transform(vUv); }" : n.t
3587
3593
  }
3588
3594
  });
3589
3595
  }
3590
- }, L = class extends ar {
3596
+ }, L = class extends or {
3591
3597
  static _instance;
3592
3598
  static get instance() {
3593
3599
  return this._instance ??= new this();
3594
3600
  }
3595
- static draw(e, t = pr.instance, n) {
3601
+ static draw(e, t = mr.instance, n) {
3596
3602
  this.instance.draw(e, t, n);
3597
3603
  }
3598
3604
  constructor() {
@@ -3625,7 +3631,7 @@ ${t}${n.transform ? "\nvoid main(void) { gl_FragColor = transform(vUv); }" : n.t
3625
3631
  ]) })
3626
3632
  })
3627
3633
  },
3628
- indexBuffer: new ir({ data: new Uint32Array([
3634
+ indexBuffer: new ar({ data: new Uint32Array([
3629
3635
  0,
3630
3636
  1,
3631
3637
  2,
@@ -3635,7 +3641,7 @@ ${t}${n.transform ? "\nvoid main(void) { gl_FragColor = transform(vUv); }" : n.t
3635
3641
  ]) })
3636
3642
  });
3637
3643
  }
3638
- }, mr = class extends ar {
3644
+ }, hr = class extends or {
3639
3645
  positionBuffer;
3640
3646
  uvBuffer;
3641
3647
  constructor(e) {
@@ -3652,7 +3658,7 @@ ${t}${n.transform ? "\nvoid main(void) { gl_FragColor = transform(vUv); }" : n.t
3652
3658
  buffer: n
3653
3659
  })
3654
3660
  },
3655
- indexBuffer: new ir({ data: /* @__PURE__ */ new Uint32Array() })
3661
+ indexBuffer: new ar({ data: /* @__PURE__ */ new Uint32Array() })
3656
3662
  }), this.positionBuffer = t, this.uvBuffer = n;
3657
3663
  }
3658
3664
  }, R = class extends Ct {
@@ -3786,7 +3792,7 @@ var z = class extends Ct {
3786
3792
  k([_({ fallback: "unknown" }), O("design:type", String)], z.prototype, "uploadMethodId", void 0), k([_({ internal: !0 }), O("design:type", Object)], z.prototype, "source", void 0), k([_({ fallback: 0 }), O("design:type", Number)], z.prototype, "width", void 0), k([_({ fallback: 0 }), O("design:type", Number)], z.prototype, "height", void 0), k([_({ fallback: 1 }), O("design:type", Number)], z.prototype, "pixelRatio", void 0), k([_({ fallback: "bgra8unorm" }), O("design:type", Object)], z.prototype, "format", void 0), k([_({ fallback: "premultiply-alpha-on-upload" }), O("design:type", Object)], z.prototype, "alphaMode", void 0), k([_({ fallback: 1 }), O("design:type", Number)], z.prototype, "mipLevelCount", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], z.prototype, "mipmap", void 0), k([_({ fallback: "clamp-to-edge" }), O("design:type", Object)], z.prototype, "addressModeU", void 0), k([_({ fallback: "clamp-to-edge" }), O("design:type", Object)], z.prototype, "addressModeV", void 0), k([_({ fallback: "clamp-to-edge" }), O("design:type", Object)], z.prototype, "addressModeW", void 0), k([_({ fallback: "linear" }), O("design:type", Object)], z.prototype, "magFilter", void 0), k([_({ fallback: "linear" }), O("design:type", Object)], z.prototype, "minFilter", void 0), k([_({ fallback: "linear" }), O("design:type", Object)], z.prototype, "mipmapFilter", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], z.prototype, "isPowerOfTwo", void 0);
3787
3793
  //#endregion
3788
3794
  //#region src/scene/resources/textures/AnimatedTexture.ts
3789
- var hr = class extends Ct {
3795
+ var gr = class extends Ct {
3790
3796
  frames;
3791
3797
  frameIndex = 0;
3792
3798
  get currentFrame() {
@@ -3811,7 +3817,7 @@ var hr = class extends Ct {
3811
3817
  e.texture.destroy();
3812
3818
  });
3813
3819
  }
3814
- }, gr = class extends z {
3820
+ }, _r = class extends z {
3815
3821
  constructor(e = {}) {
3816
3822
  super({
3817
3823
  pixelRatio: 2,
@@ -3831,7 +3837,7 @@ var hr = class extends Ct {
3831
3837
  }
3832
3838
  super._updateProperty(e, t, n);
3833
3839
  }
3834
- }, _r = class e extends z {
3840
+ }, vr = class e extends z {
3835
3841
  static _cached = /* @__PURE__ */ new Map();
3836
3842
  static get(t) {
3837
3843
  let n = new T(t), r = n.toHex(), i = this._cached.get(r);
@@ -3852,12 +3858,12 @@ var hr = class extends Ct {
3852
3858
  mipmap: !0
3853
3859
  });
3854
3860
  }
3855
- }, B = 2048, vr = 2, yr = class {
3861
+ }, B = 2048, yr = 2, br = class {
3856
3862
  superSample = 2;
3857
3863
  _pages = [];
3858
3864
  _slots = /* @__PURE__ */ new Map();
3859
3865
  _newPage() {
3860
- let e = new gr({
3866
+ let e = new _r({
3861
3867
  pixelRatio: 1,
3862
3868
  mipmap: !0
3863
3869
  });
@@ -3867,8 +3873,8 @@ var hr = class extends Ct {
3867
3873
  let n = {
3868
3874
  texture: e,
3869
3875
  ctx: t.getContext("2d"),
3870
- penX: vr,
3871
- penY: vr,
3876
+ penX: yr,
3877
+ penY: yr,
3872
3878
  rowH: 0
3873
3879
  };
3874
3880
  return this._pages.push(n), n;
@@ -3876,11 +3882,11 @@ var hr = class extends Ct {
3876
3882
  acquire(e, t, n, r) {
3877
3883
  let i = this._slots.get(e);
3878
3884
  if (i !== void 0) return i;
3879
- let a = this.superSample, o = Math.ceil(t * a), s = Math.ceil(n * a), c = o + vr * 2, l = s + vr * 2;
3885
+ let a = this.superSample, o = Math.ceil(t * a), s = Math.ceil(n * a), c = o + yr * 2, l = s + yr * 2;
3880
3886
  if (c > B || l > B) return this._slots.set(e, null), null;
3881
3887
  let u = this._pages[this._pages.length - 1] ?? this._newPage();
3882
- u.penX + c > B && (u.penX = vr, u.penY += u.rowH + vr, u.rowH = 0), u.penY + l > B && (u = this._newPage());
3883
- let d = u.penX + vr, f = u.penY + vr, p = u.ctx;
3888
+ u.penX + c > B && (u.penX = yr, u.penY += u.rowH + yr, u.rowH = 0), u.penY + l > B && (u = this._newPage());
3889
+ let d = u.penX + yr, f = u.penY + yr, p = u.ctx;
3884
3890
  p.save(), p.setTransform(a, 0, 0, a, d, f), p.beginPath(), r(p), p.restore(), u.texture.requestUpdate("source"), u.penX += c, u.rowH = Math.max(u.rowH, l);
3885
3891
  let m = {
3886
3892
  texture: u.texture,
@@ -3895,7 +3901,7 @@ var hr = class extends Ct {
3895
3901
  for (let e of this._pages) e.texture.destroy();
3896
3902
  this._pages.length = 0, this._slots.clear();
3897
3903
  }
3898
- }, br = new yr(), xr = class e extends z {
3904
+ }, xr = new br(), Sr = class e extends z {
3899
3905
  static test(e) {
3900
3906
  return u(e);
3901
3907
  }
@@ -3929,7 +3935,7 @@ var hr = class extends Ct {
3929
3935
  constructor(t, n, r) {
3930
3936
  super(e.linearGradient(t, n, r));
3931
3937
  }
3932
- }, Sr = class extends z {
3938
+ }, Cr = class extends z {
3933
3939
  constructor(e = {}) {
3934
3940
  super({
3935
3941
  ...e,
@@ -3939,7 +3945,7 @@ var hr = class extends Ct {
3939
3945
  };
3940
3946
  //#endregion
3941
3947
  //#region src/scene/resources/textures/VideoTexture.ts
3942
- function Cr(e) {
3948
+ function wr(e) {
3943
3949
  return {
3944
3950
  autoLoad: !!(e?.autoLoad ?? !0),
3945
3951
  autoPlay: !!(e?.autoPlay ?? !1),
@@ -3950,7 +3956,7 @@ function Cr(e) {
3950
3956
  playsinline: !!(e?.playsinline ?? !0)
3951
3957
  };
3952
3958
  }
3953
- var wr = class e extends z {
3959
+ var Tr = class e extends z {
3954
3960
  static mimeTypes = new Map(Object.entries({
3955
3961
  ogv: "video/ogg",
3956
3962
  mov: "video/quicktime",
@@ -4012,7 +4018,7 @@ var wr = class e extends z {
4012
4018
  _reject;
4013
4019
  _seekResolves = [];
4014
4020
  constructor(t, n) {
4015
- let r = Cr(n);
4021
+ let r = wr(n);
4016
4022
  if (!Qe(t)) {
4017
4023
  typeof t == "string" && (t = [t]);
4018
4024
  let n = t[0].src || t[0];
@@ -4109,13 +4115,13 @@ var wr = class e extends z {
4109
4115
  k([_({
4110
4116
  internal: !0,
4111
4117
  fallback: !0
4112
- }), O("design:type", Boolean)], wr.prototype, "autoUpdate", void 0), k([_({
4118
+ }), O("design:type", Boolean)], Tr.prototype, "autoUpdate", void 0), k([_({
4113
4119
  internal: !0,
4114
4120
  fallback: 0
4115
- }), O("design:type", Number)], wr.prototype, "fps", void 0);
4121
+ }), O("design:type", Number)], Tr.prototype, "fps", void 0);
4116
4122
  //#endregion
4117
4123
  //#region src/scene/resources/textures/ViewportTexture.ts
4118
- var Tr = class extends z {}, Er = class extends ue {
4124
+ var Er = class extends z {}, Dr = class extends ue {
4119
4125
  fillStyle;
4120
4126
  fillRule;
4121
4127
  strokeStyle;
@@ -4130,7 +4136,7 @@ var Tr = class extends z {}, Er = class extends ue {
4130
4136
  _draws = [];
4131
4137
  _triCache = [];
4132
4138
  _parseDrawStyle(e) {
4133
- return e ? e instanceof z ? { texture: e } : { texture: _r.get(e) } : {};
4139
+ return e ? e instanceof z ? { texture: e } : { texture: vr.get(e) } : {};
4134
4140
  }
4135
4141
  stroke(e) {
4136
4142
  if (!this.curves.length) return;
@@ -4219,7 +4225,7 @@ var Tr = class extends z {}, Er = class extends ue {
4219
4225
  });
4220
4226
  continue;
4221
4227
  }
4222
- let { path: r, ...i } = t, a = i.type === "stroke" ? i.lineStyle : void 0, o = i.type === "stroke", s = o ? i.flow : void 0, c = o && (!i.texture || i.texture instanceof _r), l = o && (!!s || c), u = `${i.type}|${r.toData()}|${a ? `${a.width},${a.cap},${a.join},${a.alignment},${a.miterLimit}` : ""}${l ? "|uv" : ""}`, d = this._triCache[n];
4228
+ let { path: r, ...i } = t, a = i.type === "stroke" ? i.lineStyle : void 0, o = i.type === "stroke", s = o ? i.flow : void 0, c = o && (!i.texture || i.texture instanceof vr), l = o && (!!s || c), u = `${i.type}|${r.toData()}|${a ? `${a.width},${a.cap},${a.join},${a.alignment},${a.miterLimit}` : ""}${l ? "|uv" : ""}`, d = this._triCache[n];
4223
4229
  if (!d || d.sig !== u) {
4224
4230
  let e = [], t = [], a = l ? [] : void 0;
4225
4231
  i.type === "fill" ? r.fillTriangulate({
@@ -4245,7 +4251,7 @@ var Tr = class extends z {}, Er = class extends ue {
4245
4251
  indices: d.indices,
4246
4252
  meshUvs: d.uvs ?? i.meshUvs,
4247
4253
  effectFlags: c && d.uvs && !s ? 2 : 0,
4248
- effectParam: s && d.uvs ? Ft(s) : 0
4254
+ effectParam: s && d.uvs ? It(s) : 0
4249
4255
  });
4250
4256
  }
4251
4257
  return this._triCache.length = this._draws.length, e;
@@ -4253,7 +4259,7 @@ var Tr = class extends z {}, Er = class extends ue {
4253
4259
  destroy() {
4254
4260
  this.reset(), this._triCache.length = 0;
4255
4261
  }
4256
- }, Dr = class {
4262
+ }, Or = class {
4257
4263
  front = [];
4258
4264
  default = [];
4259
4265
  back = [];
@@ -4296,7 +4302,7 @@ var Tr = class extends z {}, Er = class extends ue {
4296
4302
  toJSON() {
4297
4303
  return [...this.default];
4298
4304
  }
4299
- }, Or = class extends w {
4305
+ }, kr = class extends w {
4300
4306
  parent;
4301
4307
  getPropertyDeclarations() {
4302
4308
  super.getPropertyDeclarations();
@@ -4315,22 +4321,22 @@ var Tr = class extends z {}, Er = class extends ue {
4315
4321
  deleteProperty: (e, t) => Reflect.has(e, t) || String(t).startsWith("_") ? Reflect.deleteProperty(e, t) : (e.setProperty(String(t), void 0), !0)
4316
4322
  });
4317
4323
  }
4318
- }, kr, Ar = {};
4319
- function jr(e) {
4320
- let t = Ar[e] ?? 0;
4321
- return t++, Ar[e] = t, t;
4324
+ }, Ar, jr = {};
4325
+ function Mr(e) {
4326
+ let t = jr[e] ?? 0;
4327
+ return t++, jr[e] = t, t;
4322
4328
  }
4323
- var V = kr = class extends w {
4329
+ var V = Ar = class extends w {
4324
4330
  static parse(e, t = "Node") {
4325
4331
  if (Array.isArray(e)) return e.map((e) => this.parse(e));
4326
- let { is: n, meta: r = {}, children: i, ...a } = e, o = new ((ye.get(n ?? r.inCanvasIs ?? t)) ?? kr)({
4332
+ let { is: n, meta: r = {}, children: i, ...a } = e, o = new ((ye.get(n ?? r.inCanvasIs ?? t)) ?? Ar)({
4327
4333
  ...a,
4328
4334
  meta: r
4329
4335
  });
4330
4336
  return i?.forEach((e) => o.appendChild(this.parse(e))), o;
4331
4337
  }
4332
4338
  _mask;
4333
- _meta = new Or(this);
4339
+ _meta = new kr(this);
4334
4340
  get meta() {
4335
4341
  return this._meta;
4336
4342
  }
@@ -4353,7 +4359,7 @@ var V = kr = class extends w {
4353
4359
  }).append(t), this.on("treeEnter", this._onTreeEnter).on("treeExit", this._onTreeExit).on("parented", this._onParented).on("unparented", this._onUnparented).on("ready", this._onReady).on("process", this._onProcess), this.updateProcessable(), this.updateRenderable();
4354
4360
  }
4355
4361
  _defaultName() {
4356
- return `@${this.is}@${jr(this.is)}`;
4362
+ return `@${this.is}@${Mr(this.is)}`;
4357
4363
  }
4358
4364
  setProperties(e) {
4359
4365
  if (e) {
@@ -4420,7 +4426,7 @@ var V = kr = class extends w {
4420
4426
  }
4421
4427
  return this;
4422
4428
  }
4423
- _children = new Dr();
4429
+ _children = new Or();
4424
4430
  get children() {
4425
4431
  return this._children.default;
4426
4432
  }
@@ -4580,7 +4586,7 @@ var V = kr = class extends w {
4580
4586
  append(...e) {
4581
4587
  let t;
4582
4588
  t = Array.isArray(e[0]) ? e[0] : e, t.forEach((e) => {
4583
- e instanceof kr ? this.appendChild(e) : this.appendChild(kr.parse(e));
4589
+ e instanceof Ar ? this.appendChild(e) : this.appendChild(Ar.parse(e));
4584
4590
  });
4585
4591
  }
4586
4592
  before(...e) {
@@ -4686,7 +4692,7 @@ var V = kr = class extends w {
4686
4692
  k([_({ default: () => c() }), O("design:type", String)], V.prototype, "id", void 0), k([_({ default: () => c() }), O("design:type", String)], V.prototype, "name", void 0), k([_({ fallback: "inherit" }), O("design:type", Object)], V.prototype, "processMode", void 0), k([_({ fallback: "default" }), O("design:type", Object)], V.prototype, "processSortMode", void 0), k([_({ fallback: "inherit" }), O("design:type", Object)], V.prototype, "renderMode", void 0), k([_({ fallback: "inherit" }), O("design:type", Object)], V.prototype, "inputMode", void 0), k([_({ fallback: "default" }), O("design:type", Object)], V.prototype, "internalMode", void 0), k([_({
4687
4693
  internal: !0,
4688
4694
  default: !0
4689
- }), O("design:type", Boolean)], V.prototype, "needsRender", void 0), V = kr = k([x("Node"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], V);
4695
+ }), O("design:type", Boolean)], V.prototype, "needsRender", void 0), V = Ar = k([x("Node"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], V);
4690
4696
  //#endregion
4691
4697
  //#region src/scene/main/TimelineNode.ts
4692
4698
  var H = class extends V {
@@ -4774,15 +4780,15 @@ var H = class extends V {
4774
4780
  k([_({ fallback: !1 }), O("design:type", Boolean)], H.prototype, "loop", void 0), k([_({ fallback: 0 }), O("design:type", Number)], H.prototype, "delay", void 0), k([_({ fallback: 0 }), O("design:type", Number)], H.prototype, "duration", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], H.prototype, "paused", void 0), H = k([x("TimelineNode"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], H);
4775
4781
  //#endregion
4776
4782
  //#region src/scene/main/CanvasItem.ts
4777
- var Mr = [], Nr = 0;
4778
- function Pr() {
4779
- Nr = 0;
4783
+ var Nr = [], Pr = 0;
4784
+ function Fr() {
4785
+ Pr = 0;
4780
4786
  }
4781
- function Fr(e, t, n, r) {
4782
- let i = Mr[Nr];
4783
- return i || (i = {}, Mr[Nr] = i), Nr++, Object.assign(i, e), i.roundPixels = t, i.size = n, i.texture = r, i.__source = e, i;
4787
+ function Ir(e, t, n, r) {
4788
+ let i = Nr[Pr];
4789
+ return i || (i = {}, Nr[Pr] = i), Pr++, Object.assign(i, e), i.roundPixels = t, i.size = n, i.texture = r, i.__source = e, i;
4784
4790
  }
4785
- var Ir = class extends H {
4791
+ var Lr = class extends H {
4786
4792
  _blendMode;
4787
4793
  _parentGlobalVisible;
4788
4794
  _globalVisible;
@@ -4800,7 +4806,7 @@ var Ir = class extends H {
4800
4806
  255,
4801
4807
  255
4802
4808
  ];
4803
- context = new Er();
4809
+ context = new Dr();
4804
4810
  _resetContext = !0;
4805
4811
  needsDraw = !0;
4806
4812
  needsLayout = !1;
@@ -4931,7 +4937,7 @@ var Ir = class extends H {
4931
4937
  return;
4932
4938
  }
4933
4939
  let t = this._tree?.pixelate, n = this._tree?.roundPixels, r = this._batchables;
4934
- for (let i, a, o = r.length, s = 0; s < o; s++) i = r[s], a = i.texture, a instanceof Tr && (a = this._handleViewportTexture(i)), e.batch2D.render(Fr(i, n, t ? i.size : void 0, a));
4940
+ for (let i, a, o = r.length, s = 0; s < o; s++) i = r[s], a = i.texture, a instanceof Er && (a = this._handleViewportTexture(i)), e.batch2D.render(Ir(i, n, t ? i.size : void 0, a));
4935
4941
  super._render(e);
4936
4942
  }
4937
4943
  _cullsRender() {
@@ -4941,13 +4947,13 @@ var Ir = class extends H {
4941
4947
  super._destroy(), this.context.destroy(), this._drawBatchables = [], this._layoutBatchables = [], this._batchables = [];
4942
4948
  }
4943
4949
  };
4944
- k([_(), O("design:type", Object)], Ir.prototype, "blendMode", void 0), k([_({
4950
+ k([_(), O("design:type", Object)], Lr.prototype, "blendMode", void 0), k([_({
4945
4951
  internal: !0,
4946
4952
  fallback: !0
4947
- }), O("design:type", Boolean)], Ir.prototype, "visible", void 0), k([_({
4953
+ }), O("design:type", Boolean)], Lr.prototype, "visible", void 0), k([_({
4948
4954
  internal: !0,
4949
4955
  fallback: 1
4950
- }), O("design:type", Number)], Ir.prototype, "opacity", void 0), Ir = k([x("CanvasItem"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Ir);
4956
+ }), O("design:type", Number)], Lr.prototype, "opacity", void 0), Lr = k([x("CanvasItem"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Lr);
4951
4957
  //#endregion
4952
4958
  //#region src/scene/main/Viewport.ts
4953
4959
  var U = class extends V {
@@ -5000,7 +5006,7 @@ var U = class extends V {
5000
5006
  return !1;
5001
5007
  }
5002
5008
  activateWithCopy(e, t) {
5003
- this.resize(t.width, t.height), this.activate(e) && (e.clear(), t.texture.activate(e, 0), L.draw(e, pr.instance, { sampler: 0 }));
5009
+ this.resize(t.width, t.height), this.activate(e) && (e.clear(), t.texture.activate(e, 0), L.draw(e, mr.instance, { sampler: 0 }));
5004
5010
  }
5005
5011
  renderStart(e, t) {
5006
5012
  this.activate(e, t) && e.clear();
@@ -5013,7 +5019,7 @@ var U = class extends V {
5013
5019
  this.renderStart(e), super.render(e, t), this.renderEnd(e, n);
5014
5020
  }
5015
5021
  getRect() {
5016
- return new wt(this.x, this.y, this.width, this.height);
5022
+ return new Tt(this.x, this.y, this.width, this.height);
5017
5023
  }
5018
5024
  toCanvasGlobal(e, t) {
5019
5025
  return this.canvasTransform.applyAffineInverse(e, t);
@@ -5051,7 +5057,7 @@ var W = class extends H {
5051
5057
  _updateProperty(e, t, n) {
5052
5058
  switch (super._updateProperty(e, t, n), e) {
5053
5059
  case "glsl": {
5054
- let e = new dr(t);
5060
+ let e = new fr(t);
5055
5061
  !this.effectMode && e.has.transition && (this.effectMode = "transition"), this.material = e;
5056
5062
  break;
5057
5063
  }
@@ -5086,7 +5092,7 @@ var W = class extends H {
5086
5092
  }
5087
5093
  }
5088
5094
  getRect() {
5089
- return new wt(this._rect);
5095
+ return new Tt(this._rect);
5090
5096
  }
5091
5097
  _processParent() {
5092
5098
  let e = this._tree?.renderStack;
@@ -5259,7 +5265,7 @@ var W = class extends H {
5259
5265
  k([_({ internal: !0 }), O("design:type", Object)], W.prototype, "material", void 0), k([_(), O("design:type", Object)], W.prototype, "effectMode", void 0), k([_(), O("design:type", String)], W.prototype, "glsl", void 0), k([_(), O("design:type", String)], W.prototype, "glslSrc", void 0), W = k([x("Effect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], W);
5260
5266
  //#endregion
5261
5267
  //#region src/scene/main/RenderStack.ts
5262
- var Lr = class {
5268
+ var Rr = class {
5263
5269
  currentCall;
5264
5270
  calls = [];
5265
5271
  createCall(e) {
@@ -5284,7 +5290,7 @@ var Lr = class {
5284
5290
  });
5285
5291
  }), this.reset();
5286
5292
  }
5287
- }, Rr, zr = Rr = class extends V {
5293
+ }, zr, Br = zr = class extends V {
5288
5294
  currentTime = 0;
5289
5295
  playing = !1;
5290
5296
  playbackRate = 1;
@@ -5305,7 +5311,7 @@ var Lr = class {
5305
5311
  }
5306
5312
  static from(e, t = !1) {
5307
5313
  let [n, r] = e ? Array.isArray(e) ? e : [0, e] : [];
5308
- return new Rr({
5314
+ return new zr({
5309
5315
  startTime: n,
5310
5316
  endTime: r,
5311
5317
  loop: t
@@ -5351,10 +5357,10 @@ var Lr = class {
5351
5357
  super._process(e), this.paused || this.addTime(e);
5352
5358
  }
5353
5359
  };
5354
- k([_({ fallback: 0 }), O("design:type", Number)], zr.prototype, "startTime", void 0), k([_({ fallback: 2 ** 53 - 1 }), O("design:type", Number)], zr.prototype, "endTime", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], zr.prototype, "loop", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], zr.prototype, "paused", void 0), zr = Rr = k([x("Timeline"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial])], zr);
5360
+ k([_({ fallback: 0 }), O("design:type", Number)], Br.prototype, "startTime", void 0), k([_({ fallback: 2 ** 53 - 1 }), O("design:type", Number)], Br.prototype, "endTime", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], Br.prototype, "loop", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], Br.prototype, "paused", void 0), Br = zr = k([x("Timeline"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial])], Br);
5355
5361
  //#endregion
5356
5362
  //#region src/scene/main/Window.ts
5357
- var Br = class extends U {
5363
+ var Vr = class extends U {
5358
5364
  constructor() {
5359
5365
  super(), this.renderTargets.forEach((e) => e.isRoot = !0);
5360
5366
  }
@@ -5365,17 +5371,17 @@ var Br = class extends U {
5365
5371
  super.flush(e), this.finish(e);
5366
5372
  }
5367
5373
  };
5368
- Br = k([x("Window", {
5374
+ Vr = k([x("Window", {
5369
5375
  processMode: "always",
5370
5376
  renderMode: "always"
5371
- }), O("design:paramtypes", [])], Br);
5377
+ }), O("design:paramtypes", [])], Vr);
5372
5378
  //#endregion
5373
5379
  //#region src/scene/main/SceneTree.ts
5374
- var G = class extends At {
5380
+ var G = class extends jt {
5375
5381
  input = new xt();
5376
- renderStack = new Lr();
5377
- root = new Br().setTree(this);
5378
- timeline = new zr().setTree(this);
5382
+ renderStack = new Rr();
5383
+ root = new Vr().setTree(this);
5384
+ timeline = new Br().setTree(this);
5379
5385
  imagePipelineResolver;
5380
5386
  nodeMap = /* @__PURE__ */ new Map();
5381
5387
  _boundFonts;
@@ -5457,12 +5463,12 @@ var G = class extends At {
5457
5463
  this.renderStack.reset(), this.timeline.emit("process", e), this.emit("processing"), this.root.emit("process", e), this.emit("processed");
5458
5464
  }
5459
5465
  _render(e) {
5460
- this.emit("rendering"), Pr(), e.batch2D.beginFrame(), this._flowColorArray && (e.batch2D.effectUniforms.uFlowColor = this._flowColorArray), this.flowPeriod && (e.batch2D.effectUniforms.uFlowPeriod = this.flowPeriod), this.renderStack.render(e), this._renderScreen(e), this.emit("rendered");
5466
+ this.emit("rendering"), Fr(), e.batch2D.beginFrame(), this._flowColorArray && (e.batch2D.effectUniforms.uFlowColor = this._flowColorArray), this.flowPeriod && (e.batch2D.effectUniforms.uFlowPeriod = this.flowPeriod), this.renderStack.render(e), this._renderScreen(e), this.emit("rendered");
5461
5467
  }
5462
5468
  _renderScreen(e) {
5463
5469
  this.root.finish(e), e.state.reset(), e.renderTarget.unbind(), this.backgroundColor && e.gl.clearColor(...this._backgroundColor.toArray()), e.clear(), this.backgroundColor && e.gl.clearColor(0, 0, 0, 0);
5464
5470
  let t = this.root.texture;
5465
- t.activate(e, 0), this.fxaa ? L.draw(e, fr.instance, {
5471
+ t.activate(e, 0), this.fxaa ? L.draw(e, pr.instance, {
5466
5472
  sampler: 0,
5467
5473
  texelSize: [1 / (t.pixelWidth || t.width || 1), 1 / (t.pixelHeight || t.height || 1)]
5468
5474
  }) : L.draw(e), t.inactivate(e);
@@ -5483,18 +5489,18 @@ k([_({ alias: "root.msaa" }), O("design:type", Boolean)], G.prototype, "msaa", v
5483
5489
  }), O("design:type", Object)], G.prototype, "fonts", void 0);
5484
5490
  //#endregion
5485
5491
  //#region src/scene/main/Transition.ts
5486
- var Vr = class extends W {
5492
+ var Hr = class extends W {
5487
5493
  constructor(e, t = []) {
5488
5494
  super(), this.setProperties(e).append(t);
5489
5495
  }
5490
5496
  };
5491
- Vr = k([x("Transition", {
5497
+ Hr = k([x("Transition", {
5492
5498
  effectMode: "transition",
5493
5499
  duration: 2e3
5494
- }), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Vr);
5500
+ }), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Hr);
5495
5501
  //#endregion
5496
5502
  //#region src/scene/2d/Node2D.ts
5497
- var Hr = new v(), Ur = class extends Ir {
5503
+ var Ur = new v(), Wr = class extends Lr {
5498
5504
  rotation = 0;
5499
5505
  position = new y(0, 0, () => this.updateGlobalTransform());
5500
5506
  contentOffset = new y(0, 0, () => this.updateGlobalTransform());
@@ -5525,7 +5531,7 @@ var Hr = new v(), Ur = class extends Ir {
5525
5531
  let s = o.x, c = o.y;
5526
5532
  if (this.globalPosition.set(t.x + this.position.x - s, t.y + this.position.y - c), this.globalScale.set(n.x * this.scale.x, n.y * this.scale.y), this.globalSkew.set(r.x * this.skew.x, r.y * this.skew.y), this.globalRotation = i + this.rotation, s !== 0 || c !== 0) {
5527
5533
  let t = e.globalTransform;
5528
- Hr.copyFrom(t), Hr.tx = t.tx - s * t.a - c * t.c, Hr.ty = t.ty - s * t.b - c * t.d, this.globalTransform.appendFrom(this.transform, Hr);
5534
+ Ur.copyFrom(t), Ur.tx = t.tx - s * t.a - c * t.c, Ur.ty = t.ty - s * t.b - c * t.d, this.globalTransform.appendFrom(this.transform, Ur);
5529
5535
  } else this.globalTransform.appendFrom(this.transform, e.globalTransform);
5530
5536
  } else this.globalPosition.copyFrom(this.position), this.globalScale.copyFrom(this.scale), this.globalSkew.copyFrom(this.skew), this.globalRotation = this.rotation, this.globalTransform.copyFrom(this.transform);
5531
5537
  this.requestLayout(), this.emit("updateGlobalTransform");
@@ -5552,10 +5558,10 @@ var Hr = new v(), Ur = class extends Ir {
5552
5558
  super._destroy(), this.position.destroy(), this.scale.destroy(), this.skew.destroy(), this.pivot.destroy(), this.extraTransform.destroy(), this.transform.destroy(), this.globalPosition.destroy(), this.globalScale.destroy(), this.globalSkew.destroy(), this.globalTransform.destroy();
5553
5559
  }
5554
5560
  };
5555
- Ur = k([x("Node2D"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Ur);
5561
+ Wr = k([x("Node2D"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Wr);
5556
5562
  //#endregion
5557
5563
  //#region src/scene/2d/Camera2D.ts
5558
- var Wr = class extends Ur {
5564
+ var Gr = class extends Wr {
5559
5565
  canvasTransform = new v();
5560
5566
  _screenOffset = {
5561
5567
  x: 0,
@@ -5702,16 +5708,16 @@ var Wr = class extends Ur {
5702
5708
  k([_({
5703
5709
  internal: !0,
5704
5710
  fallback: !1
5705
- }), O("design:type", Boolean)], Wr.prototype, "spaceKey", void 0), k([_({
5711
+ }), O("design:type", Boolean)], Gr.prototype, "spaceKey", void 0), k([_({
5706
5712
  internal: !0,
5707
5713
  fallback: !1
5708
- }), O("design:type", Boolean)], Wr.prototype, "grabbing", void 0), Wr = k([x("Camera2D", {
5714
+ }), O("design:type", Boolean)], Gr.prototype, "grabbing", void 0), Gr = k([x("Camera2D", {
5709
5715
  processMode: "disabled",
5710
5716
  renderMode: "disabled"
5711
- }), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Wr);
5717
+ }), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Gr);
5712
5718
  //#endregion
5713
5719
  //#region src/scene/2d/element/connectionRouter.ts
5714
- function Gr(e, t) {
5720
+ function Kr(e, t) {
5715
5721
  return Math.abs(e) >= Math.abs(t) ? {
5716
5722
  x: Math.sign(e) || 1,
5717
5723
  y: 0
@@ -5720,11 +5726,11 @@ function Gr(e, t) {
5720
5726
  y: Math.sign(t) || 1
5721
5727
  };
5722
5728
  }
5723
- function Kr(e, t, n, r = {}) {
5729
+ function qr(e, t, n, r = {}) {
5724
5730
  let i = t.point, a = n.point, o = new ue();
5725
5731
  switch (e) {
5726
5732
  case "curved": {
5727
- let e = t.dir ?? Gr(a.x - i.x, a.y - i.y), s = n.dir ?? Gr(i.x - a.x, i.y - a.y), c = a.x - i.x, l = a.y - i.y, u = Math.hypot(c, l) || 1, d = c / u, f = l / u, p = Math.max((r.stub ?? 16) * 2, u * .4), m = (e, t, n, r) => Math.max(.1, (1 + e * n + t * r) / 2), h = p * m(e.x, e.y, d, f), g = p * m(s.x, s.y, -d, -f), ee = i.x + e.x * h, te = i.y + e.y * h, ne = a.x + s.x * g, re = a.y + s.y * g;
5733
+ let e = t.dir ?? Kr(a.x - i.x, a.y - i.y), s = n.dir ?? Kr(i.x - a.x, i.y - a.y), c = a.x - i.x, l = a.y - i.y, u = Math.hypot(c, l) || 1, d = c / u, f = l / u, p = Math.max((r.stub ?? 16) * 2, u * .4), m = (e, t, n, r) => Math.max(.1, (1 + e * n + t * r) / 2), h = p * m(e.x, e.y, d, f), g = p * m(s.x, s.y, -d, -f), ee = i.x + e.x * h, te = i.y + e.y * h, ne = a.x + s.x * g, re = a.y + s.y * g;
5728
5734
  for (let e = 0; e <= 32; e++) {
5729
5735
  let t = e / 32, n = 1 - t, r = n * n * n, s = 3 * n * n * t, c = 3 * n * t * t, l = t * t * t, u = r * i.x + s * ee + c * ne + l * a.x, d = r * i.y + s * te + c * re + l * a.y;
5730
5736
  e === 0 ? o.moveTo(u, d) : o.lineTo(u, d);
@@ -5732,7 +5738,7 @@ function Kr(e, t, n, r = {}) {
5732
5738
  break;
5733
5739
  }
5734
5740
  case "orthogonal": {
5735
- let e = Jr(t, n, r);
5741
+ let e = Yr(t, n, r);
5736
5742
  for (let t = 0; t < e.length; t++) t === 0 ? o.moveTo(e[t].x, e[t].y) : o.lineTo(e[t].x, e[t].y);
5737
5743
  break;
5738
5744
  }
@@ -5742,11 +5748,11 @@ function Kr(e, t, n, r = {}) {
5742
5748
  }
5743
5749
  return o;
5744
5750
  }
5745
- function qr(e) {
5746
- return Gr(e.x, e.y);
5751
+ function Jr(e) {
5752
+ return Kr(e.x, e.y);
5747
5753
  }
5748
- function Jr(e, t, n) {
5749
- let r = e.point, i = t.point, a = n.stub ?? 16, o = qr(e.dir ?? Gr(i.x - r.x, i.y - r.y)), s = qr(t.dir ?? Gr(r.x - i.x, r.y - i.y)), c = {
5754
+ function Yr(e, t, n) {
5755
+ let r = e.point, i = t.point, a = n.stub ?? 16, o = Jr(e.dir ?? Kr(i.x - r.x, i.y - r.y)), s = Jr(t.dir ?? Kr(r.x - i.x, r.y - i.y)), c = {
5750
5756
  x: r.x + o.x * a,
5751
5757
  y: r.y + o.y * a
5752
5758
  }, l = {
@@ -5758,12 +5764,12 @@ function Jr(e, t, n) {
5758
5764
  x: r.x,
5759
5765
  y: r.y
5760
5766
  }, c];
5761
- return d.push(...Xr(c, o, l, s, a, u)), d.push(l, {
5767
+ return d.push(...Zr(c, o, l, s, a, u)), d.push(l, {
5762
5768
  x: i.x,
5763
5769
  y: i.y
5764
- }), Zr(d);
5770
+ }), Qr(d);
5765
5771
  }
5766
- function Yr(e, t, n, r, i) {
5772
+ function Xr(e, t, n, r, i) {
5767
5773
  let a = Infinity, o = -Infinity, s = t === "y" ? "x" : "y";
5768
5774
  for (let e of r) {
5769
5775
  let r = e.min[s], i = r + e.size[s];
@@ -5774,7 +5780,7 @@ function Yr(e, t, n, r, i) {
5774
5780
  }
5775
5781
  return e > a && e < o ? a - i : e;
5776
5782
  }
5777
- function Xr(e, t, n, r, i, a = []) {
5783
+ function Zr(e, t, n, r, i, a = []) {
5778
5784
  let o = t.y === 0;
5779
5785
  if (o === (r.y === 0)) {
5780
5786
  if (o) {
@@ -5789,7 +5795,7 @@ function Xr(e, t, n, r, i, a = []) {
5789
5795
  }];
5790
5796
  }
5791
5797
  let o = Math.abs(e.y - n.y) < .001 ? e.y + i : (e.y + n.y) / 2;
5792
- return o = Yr(o, "y", [Math.min(e.x, n.x), Math.max(e.x, n.x)], a, i), [{
5798
+ return o = Xr(o, "y", [Math.min(e.x, n.x), Math.max(e.x, n.x)], a, i), [{
5793
5799
  x: e.x,
5794
5800
  y: o
5795
5801
  }, {
@@ -5808,7 +5814,7 @@ function Xr(e, t, n, r, i, a = []) {
5808
5814
  }];
5809
5815
  }
5810
5816
  let s = Math.abs(e.x - n.x) < .001 ? e.x + i : (e.x + n.x) / 2;
5811
- return s = Yr(s, "x", [Math.min(e.y, n.y), Math.max(e.y, n.y)], a, i), [{
5817
+ return s = Xr(s, "x", [Math.min(e.y, n.y), Math.max(e.y, n.y)], a, i), [{
5812
5818
  x: s,
5813
5819
  y: e.y
5814
5820
  }, {
@@ -5835,7 +5841,7 @@ function Xr(e, t, n, r, i, a = []) {
5835
5841
  y: l.y
5836
5842
  }];
5837
5843
  }
5838
- function Zr(e) {
5844
+ function Qr(e) {
5839
5845
  let t = [];
5840
5846
  for (let n = 0; n < e.length; n++) {
5841
5847
  let r = e[n], i = t[t.length - 1];
@@ -5845,7 +5851,7 @@ function Zr(e) {
5845
5851
  }
5846
5852
  //#endregion
5847
5853
  //#region src/css/parseCssFilter.ts
5848
- var Qr = {
5854
+ var $r = {
5849
5855
  brightness: 1,
5850
5856
  contrast: 1,
5851
5857
  grayscale: 0,
@@ -5855,12 +5861,12 @@ var Qr = {
5855
5861
  saturate: 1,
5856
5862
  sepia: 0
5857
5863
  };
5858
- function $r(e) {
5859
- let t = new Dt();
5864
+ function ei(e) {
5865
+ let t = new Ot();
5860
5866
  if (e === "none") return t;
5861
5867
  let n = je(e).reduce((e, { name: t, args: n }) => (e[t] = n[0].normalizedIntValue, e), {});
5862
- Object.keys(Qr).forEach((e) => {
5863
- n[e] = n[e] ?? Qr[e];
5868
+ Object.keys($r).forEach((e) => {
5869
+ n[e] = n[e] ?? $r[e];
5864
5870
  });
5865
5871
  for (let e in n) {
5866
5872
  let r = n[e];
@@ -5895,7 +5901,7 @@ function $r(e) {
5895
5901
  }
5896
5902
  //#endregion
5897
5903
  //#region src/css/parseCssTransformOrigin.ts
5898
- function ei(e) {
5904
+ function ti(e) {
5899
5905
  let [t, n = t] = e.split(" ");
5900
5906
  return [t, n].map((e) => {
5901
5907
  switch (e = e.trim(), e) {
@@ -5910,9 +5916,9 @@ function ei(e) {
5910
5916
  }
5911
5917
  //#endregion
5912
5918
  //#region src/scene/effects/ColorAdjustEffect.ts
5913
- var ti, K = class extends W {
5919
+ var ni, K = class extends W {
5914
5920
  static {
5915
- ti = this;
5921
+ ni = this;
5916
5922
  }
5917
5923
  static material = new I({ gl: {
5918
5924
  vertex: "precision mediump float;\nattribute vec2 position;\nattribute vec2 uv;\nvarying vec2 vUv;\nvoid main() {\n gl_Position = vec4(position, 0.0, 1.0);\n vUv = uv;\n}",
@@ -5923,7 +5929,7 @@ var ti, K = class extends W {
5923
5929
  }
5924
5930
  apply(e, t) {
5925
5931
  t.redraw(e, () => {
5926
- L.draw(e, ti.material, {
5932
+ L.draw(e, ni.material, {
5927
5933
  sampler: 0,
5928
5934
  saturation: this.saturation,
5929
5935
  contrast: this.contrast,
@@ -5937,18 +5943,18 @@ var ti, K = class extends W {
5937
5943
  });
5938
5944
  }
5939
5945
  };
5940
- k([_({ fallback: 1 }), O("design:type", Number)], K.prototype, "saturation", void 0), k([_({ fallback: 1 }), O("design:type", Number)], K.prototype, "contrast", void 0), k([_({ fallback: 1 }), O("design:type", Number)], K.prototype, "brightness", void 0), k([_({ fallback: 1 }), O("design:type", Number)], K.prototype, "red", void 0), k([_({ fallback: 1 }), O("design:type", Number)], K.prototype, "green", void 0), k([_({ fallback: 1 }), O("design:type", Number)], K.prototype, "blue", void 0), k([_({ fallback: 1 }), O("design:type", Number)], K.prototype, "alpha", void 0), k([_({ fallback: 1 }), O("design:type", Number)], K.prototype, "gamma", void 0), K = ti = k([x("ColorAdjustEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], K);
5946
+ k([_({ fallback: 1 }), O("design:type", Number)], K.prototype, "saturation", void 0), k([_({ fallback: 1 }), O("design:type", Number)], K.prototype, "contrast", void 0), k([_({ fallback: 1 }), O("design:type", Number)], K.prototype, "brightness", void 0), k([_({ fallback: 1 }), O("design:type", Number)], K.prototype, "red", void 0), k([_({ fallback: 1 }), O("design:type", Number)], K.prototype, "green", void 0), k([_({ fallback: 1 }), O("design:type", Number)], K.prototype, "blue", void 0), k([_({ fallback: 1 }), O("design:type", Number)], K.prototype, "alpha", void 0), k([_({ fallback: 1 }), O("design:type", Number)], K.prototype, "gamma", void 0), K = ni = k([x("ColorAdjustEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], K);
5941
5947
  //#endregion
5942
5948
  //#region src/scene/effects/ColorFilterEffect.ts
5943
- var ni, ri = class extends W {
5949
+ var ri, ii = class extends W {
5944
5950
  static {
5945
- ni = this;
5951
+ ri = this;
5946
5952
  }
5947
5953
  static material = new I({ gl: {
5948
5954
  vertex: "attribute vec2 position;\nattribute vec2 uv;\nout vec2 vUv;\nvoid main() {\n gl_Position = vec4(position, 0.0, 1.0);\n vUv = uv;\n}",
5949
5955
  fragment: "in vec2 vUv;\nuniform sampler2D sampler;\nuniform float m[20];\n\nvoid main(void) {\n vec4 c = texture2D(sampler, vUv);\n if (c.a > 0.0) {\n c.rgb /= c.a;\n }\n gl_FragColor = vec4(\n m[0] * c.r + m[1] * c.g + m[2] * c.b + m[3] * c.a + m[4] / 255.0,\n m[5] * c.r + m[6] * c.g + m[7] * c.b + m[8] * c.a + m[9] / 255.0,\n m[10] * c.r + m[11] * c.g + m[12] * c.b + m[13] * c.a + m[14] / 255.0,\n m[15] * c.r + m[16] * c.g + m[17] * c.b + m[18] * c.a + m[19] / 255.0\n );\n}"
5950
5956
  } });
5951
- _colorMatrix = new Dt();
5957
+ _colorMatrix = new Ot();
5952
5958
  constructor(e, t = []) {
5953
5959
  super(), this.setProperties(e).append(t);
5954
5960
  }
@@ -5992,25 +5998,25 @@ var ni, ri = class extends W {
5992
5998
  break;
5993
5999
  }
5994
6000
  }), t.redraw(e, () => {
5995
- L.draw(e, ni.material, {
6001
+ L.draw(e, ri.material, {
5996
6002
  sampler: 0,
5997
6003
  m: r.toArray()
5998
6004
  });
5999
6005
  });
6000
6006
  }
6001
6007
  };
6002
- k([_(), O("design:type", String)], ri.prototype, "filter", void 0), ri = ni = k([x("ColorFilterEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], ri);
6008
+ k([_(), O("design:type", String)], ii.prototype, "filter", void 0), ii = ri = k([x("ColorFilterEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], ii);
6003
6009
  //#endregion
6004
6010
  //#region src/scene/effects/ColorOverlayEffect.ts
6005
- var ii, ai = 50, oi = class extends W {
6011
+ var ai, oi = 50, si = class extends W {
6006
6012
  static {
6007
- ii = this;
6013
+ ai = this;
6008
6014
  }
6009
6015
  static material = new I({ gl: {
6010
6016
  vertex: "precision mediump float;\nattribute vec2 position;\nattribute vec2 uv;\nvarying vec2 vUv;\nvoid main() {\n gl_Position = vec4(position, 0.0, 1.0);\n vUv = uv;\n}",
6011
6017
  fragment: `precision mediump float;
6012
6018
  uniform sampler2D sampler;
6013
- uniform vec4 colors[${ai}];
6019
+ uniform vec4 colors[${oi}];
6014
6020
  varying vec2 vUv;
6015
6021
 
6016
6022
  float calcWidth() {
@@ -6019,7 +6025,7 @@ float calcWidth() {
6019
6025
 
6020
6026
  int calcCount() {
6021
6027
  int count = 0;
6022
- for (int i = 0; i < ${ai}; i++) {
6028
+ for (int i = 0; i < ${oi}; i++) {
6023
6029
  if (colors[i] != vec4(0,0,0,0)){
6024
6030
  count++;
6025
6031
  }
@@ -6031,7 +6037,7 @@ vec4 calcColor(float x) {
6031
6037
  float perUnit = calcWidth() / float(calcCount());
6032
6038
  int index = int(x / perUnit);
6033
6039
 
6034
- for(int i=0; i<${ai}; i++){
6040
+ for(int i=0; i<${oi}; i++){
6035
6041
  if(i==index){
6036
6042
  return colors[i];
6037
6043
  }
@@ -6057,25 +6063,25 @@ void main(void) {
6057
6063
  let t = this._color.toArray();
6058
6064
  return t[3] = this.alpha, t;
6059
6065
  });
6060
- for (; t.length < ai;) t.push([
6066
+ for (; t.length < oi;) t.push([
6061
6067
  0,
6062
6068
  0,
6063
6069
  0,
6064
6070
  0
6065
6071
  ]);
6066
- L.draw(e, ii.material, {
6072
+ L.draw(e, ai.material, {
6067
6073
  sampler: 0,
6068
- colors: t.slice(0, ai).flatMap((e) => e)
6074
+ colors: t.slice(0, oi).flatMap((e) => e)
6069
6075
  });
6070
6076
  });
6071
6077
  }
6072
6078
  };
6073
- k([_({ default: () => [] }), O("design:type", Array)], oi.prototype, "colors", void 0), k([_({ fallback: .5 }), O("design:type", Number)], oi.prototype, "alpha", void 0), oi = ii = k([x("ColorOverlayEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], oi);
6079
+ k([_({ default: () => [] }), O("design:type", Array)], si.prototype, "colors", void 0), k([_({ fallback: .5 }), O("design:type", Number)], si.prototype, "alpha", void 0), si = ai = k([x("ColorOverlayEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], si);
6074
6080
  //#endregion
6075
6081
  //#region src/scene/effects/ColorRemoveEffect.ts
6076
- var si, ci = class extends W {
6082
+ var ci, li = class extends W {
6077
6083
  static {
6078
- si = this;
6084
+ ci = this;
6079
6085
  }
6080
6086
  static material = new I({ gl: {
6081
6087
  vertex: "precision mediump float;\nattribute vec2 position;\nattribute vec2 uv;\nvarying vec2 vUv;\nvoid main() {\n gl_Position = vec4(position, 0.0, 1.0);\n vUv = uv;\n}",
@@ -6095,7 +6101,7 @@ var si, ci = class extends W {
6095
6101
  r.slice(0, 50).forEach((e, t) => {
6096
6102
  n[t * 3] = e[0], n[t * 3 + 1] = e[1], n[t * 3 + 2] = e[2];
6097
6103
  }), t.redraw(e, () => {
6098
- L.draw(e, si.material, {
6104
+ L.draw(e, ci.material, {
6099
6105
  sampler: 0,
6100
6106
  epsilon: this.epsilon,
6101
6107
  originalColors: n
@@ -6103,19 +6109,19 @@ var si, ci = class extends W {
6103
6109
  });
6104
6110
  }
6105
6111
  };
6106
- k([_({ default: () => [] }), O("design:type", Array)], ci.prototype, "colors", void 0), k([_({ fallback: .5 }), O("design:type", Number)], ci.prototype, "epsilon", void 0), ci = si = k([x("ColorRemoveEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], ci);
6112
+ k([_({ default: () => [] }), O("design:type", Array)], li.prototype, "colors", void 0), k([_({ fallback: .5 }), O("design:type", Number)], li.prototype, "epsilon", void 0), li = ci = k([x("ColorRemoveEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], li);
6107
6113
  //#endregion
6108
6114
  //#region src/scene/effects/ColorReplaceEffect.ts
6109
- var li, ui = 50, di = class extends W {
6115
+ var ui, di = 50, fi = class extends W {
6110
6116
  static {
6111
- li = this;
6117
+ ui = this;
6112
6118
  }
6113
6119
  static material = new I({ gl: {
6114
6120
  vertex: "precision mediump float;\nattribute vec2 position;\nattribute vec2 uv;\nvarying vec2 vUv;\nvoid main() {\n gl_Position = vec4(position, 0.0, 1.0);\n vUv = uv;\n}",
6115
6121
  fragment: `varying vec2 vUv;
6116
6122
  uniform sampler2D sampler;
6117
6123
  uniform float epsilon;
6118
- const int MAX_COLORS = ${ui};
6124
+ const int MAX_COLORS = ${di};
6119
6125
  uniform vec3 originalColors[MAX_COLORS];
6120
6126
  uniform vec3 targetColors[MAX_COLORS];
6121
6127
 
@@ -6152,8 +6158,8 @@ void main(void) {
6152
6158
  this._color.value = e[0];
6153
6159
  let t = this._color.toArray().slice(0, 3);
6154
6160
  return this._color.value = e[1], [t, this._color.toArray().slice(0, 3)];
6155
- }), r = this.epsilon, i = new Float32Array(ui * 3), a = new Float32Array(ui * 3);
6156
- for (; n.length < ui;) n.push([[
6161
+ }), r = this.epsilon, i = new Float32Array(di * 3), a = new Float32Array(di * 3);
6162
+ for (; n.length < di;) n.push([[
6157
6163
  -1,
6158
6164
  0,
6159
6165
  0
@@ -6163,10 +6169,10 @@ void main(void) {
6163
6169
  0,
6164
6170
  1
6165
6171
  ]]);
6166
- n.slice(0, ui).forEach(([e, t], n) => {
6172
+ n.slice(0, di).forEach(([e, t], n) => {
6167
6173
  i[n * 3] = e[0], i[n * 3 + 1] = e[1], i[n * 3 + 2] = e[2], a[n * 3] = t[0], a[n * 3 + 1] = t[1], a[n * 3 + 2] = t[2];
6168
6174
  }), t.redraw(e, () => {
6169
- L.draw(e, li.material, {
6175
+ L.draw(e, ui.material, {
6170
6176
  sampler: 0,
6171
6177
  epsilon: r,
6172
6178
  originalColors: i,
@@ -6175,19 +6181,19 @@ void main(void) {
6175
6181
  });
6176
6182
  }
6177
6183
  };
6178
- k([_({ default: () => [] }), O("design:type", Array)], di.prototype, "colors", void 0), k([_({ fallback: .05 }), O("design:type", Number)], di.prototype, "epsilon", void 0), di = li = k([x("ColorReplaceEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], di);
6184
+ k([_({ default: () => [] }), O("design:type", Array)], fi.prototype, "colors", void 0), k([_({ fallback: .05 }), O("design:type", Number)], fi.prototype, "epsilon", void 0), fi = ui = k([x("ColorReplaceEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], fi);
6179
6185
  //#endregion
6180
6186
  //#region src/scene/effects/DrawboardEffect.frag?raw
6181
- var fi = "precision highp float;\n\nin vec2 vUv;\nuniform sampler2D uTexture;\nuniform vec2 inputSize;\nuniform vec2 zoom;\nuniform vec2 translate;\nuniform float gridScale;\nuniform vec2 gridSize;\nuniform int checkerboard;\nuniform int checkerboardStyle;\n// 背景底纹颜色(明暗由主题解析后传入,引擎不再区分 dark 变体):\n// checkerboardColor —— 底色(网格底格 / 点阵底)\n// checkerboardDotColor —— 点色(点阵的圆点)\nuniform vec3 checkerboardColor;\nuniform vec3 checkerboardDotColor;\nuniform float dotColorDiff;\nuniform int pixelGrid;\nuniform int watermark;\nuniform sampler2D watermarkTexture;\nuniform vec2 watermarkSize;\nuniform vec2 watermarkOffset;\nuniform vec2 watermarkSpacing;\nuniform float watermarkRotation;\nuniform float watermarkAlpha;\n\nconst float VIEWPORT_SPACE_MIN_DOT_RADIUS = 0.5;\nconst float CANVAS_SPACE_DOT_RADIUS = 1.;\nconst float CANVAS_SPACE_DOT_GRID_SIZE_PX = 16.;\n\n// 远距淡出:缩放低于 DOT_FADE_END 起点阵开始渐隐,到 DOT_FADE_START 完全隐藏\n// (避免缩得很远时点糊成一片,Figma/FigJam/Miro 同法:点的可见度随 zoom 衰减)。\nconst float DOT_FADE_START = 0.04;\nconst float DOT_FADE_END = 0.10;\n\nconst int CHECKERBOARD_STYLE_NONE = 0;\nconst int CHECKERBOARD_STYLE_GRID = 1;\nconst int CHECKERBOARD_STYLE_DOTS = 2;\n\nfloat _round(float val) {\n return floor(val + .5);\n}\n\nvec2 _round(vec2 pt) {\n return floor(pt + .5);\n}\n\nfloat scaledGridSize(float zoomScale) {\n if (zoomScale < 0.03125) {\n return 32.0 * CANVAS_SPACE_DOT_GRID_SIZE_PX;\n }\n else if (zoomScale < 0.0625) {\n return 16.0 * CANVAS_SPACE_DOT_GRID_SIZE_PX;\n }\n else if (zoomScale < 0.125) {\n return 8.0 * CANVAS_SPACE_DOT_GRID_SIZE_PX;\n }\n else if (zoomScale < 0.25) {\n return 4.0 * CANVAS_SPACE_DOT_GRID_SIZE_PX;\n }\n else if (zoomScale < 0.5) {\n return 2.0 * CANVAS_SPACE_DOT_GRID_SIZE_PX;\n }\n else {\n return CANVAS_SPACE_DOT_GRID_SIZE_PX;\n }\n}\n\nvec4 renderCheckerboard(vec2 coord, vec4 color) {\n vec3 bg;\n if (checkerboardStyle == CHECKERBOARD_STYLE_GRID) {\n // 棋盘:两格用底色与其轻微压暗,保持细腻网格感(明暗全由 checkerboardColor 决定)。\n vec2 fractValue = fract(coord * vec2(gridScale) * zoom) - 0.5;\n bg = fractValue.x * fractValue.y < 0.0 ? checkerboardColor : checkerboardColor * 0.96;\n }\n else if (checkerboardStyle == CHECKERBOARD_STYLE_DOTS) {\n // 点阵:底色 checkerboardColor + 圆点 checkerboardDotColor(放大时按 dotColorDiff 提亮)。\n float zoomScale = zoom.x;\n float gridPixelSize = scaledGridSize(zoomScale);\n float zoomInterpolationFactor = smoothstep(0.5, 1.0, zoomScale);\n vec3 dotColor = checkerboardDotColor + vec3(dotColorDiff * zoomInterpolationFactor);\n vec2 nearestGridPoint = _round(coord / gridPixelSize) * gridPixelSize;\n float canvasSpaceDist = length(coord - nearestGridPoint);\n float viewportSpaceDist = canvasSpaceDist * zoomScale;\n float viewportSpaceDotRadius = max(VIEWPORT_SPACE_MIN_DOT_RADIUS, CANVAS_SPACE_DOT_RADIUS * zoomScale);\n float dist = 1.0 - smoothstep(0., 1., (viewportSpaceDist - viewportSpaceDotRadius + .5));\n // 远距淡出:zoomScale 越低点越淡,低于 DOT_FADE_START 完全隐去(回落到纯底色)。\n dist *= smoothstep(DOT_FADE_START, DOT_FADE_END, zoomScale);\n bg = mix(checkerboardColor, dotColor, dist);\n }\n else {\n bg = checkerboardColor;\n }\n return vec4(bg * (1.0 - color.a) + color.rgb, 1);\n}\n\nvec4 renderPixelGrid(vec2 coord, vec4 color) {\n vec3 rgb = color.rgb;\n vec2 corner = fract(coord);\n float gridWeight = max(float(corner.x < gridSize.x), float(corner.y < gridSize.y));\n vec3 gridColor;\n vec3 weights = vec3(0.299, 0.587, 0.114);\n float c2 = dot(rgb * rgb, weights);\n float luminance = sqrt(c2);\n if (luminance > 0.5) {\n float target = (luminance - 0.05) / luminance;\n gridColor = rgb * target;\n }\n else {\n float target = luminance * 0.8 + 0.15;\n float c1 = dot(rgb, weights);\n float a = 1.0 - 2.0 * c1 + c2;\n float b = c2 - c1;\n gridColor = mix(rgb, vec3(1), (b + sqrt(b * b - a * (c2 - target * target))) / a);\n }\n return vec4(mix(rgb, gridColor, gridWeight), color.a);\n}\n\nvec4 renderWatermark(vec2 coord, vec4 color) {\n float hw = watermarkSize.x * 0.5;\n float hh = watermarkSize.y * 0.5;\n float c = cos(-watermarkRotation);\n float s = sin(-watermarkRotation);\n vec2 blockSize = watermarkSize + watermarkSpacing;\n vec2 tiles = max(floor(inputSize / blockSize), vec2(1.0));\n vec2 gridCoverage = tiles * blockSize;\n vec2 startPos = watermarkOffset;\n vec2 localPix = coord - startPos;\n vec2 blockIndex = floor(localPix / blockSize);\n vec2 wmCenter = startPos + blockIndex * blockSize + watermarkSize * 0.5 + watermarkSpacing / 2.0;\n vec2 local = coord - wmCenter;\n vec2 inv = vec2(\n local.x * c + local.y * s,\n -local.x * s + local.y * c\n );\n if (inv.x >= -hw && inv.x <= hw && inv.y >= -hh && inv.y <= hh) {\n vec2 wmUV = (inv + vec2(hw, hh)) / watermarkSize;\n vec4 wmColor = texture(watermarkTexture, wmUV);\n float alpha = wmColor.a * watermarkAlpha;\n return mix(color, wmColor, alpha);\n } else {\n return color;\n }\n}\n\nvoid main(void) {\n vec4 color = texture(uTexture, vUv);\n vec2 coord = vec2(vUv.x, 1.0 - vUv.y);\n coord = (coord * inputSize - translate) / zoom;\n if (checkerboard > 0) {\n color = renderCheckerboard(coord, color);\n }\n if (watermark > 0) {\n color = renderWatermark(coord, color);\n }\n if (pixelGrid > 0) {\n color = renderPixelGrid(coord, color);\n }\n gl_FragColor = color;\n}\n", pi, q = class extends W {
6187
+ var pi = "precision highp float;\n\nin vec2 vUv;\nuniform sampler2D uTexture;\nuniform vec2 inputSize;\nuniform vec2 zoom;\nuniform vec2 translate;\nuniform float gridScale;\nuniform vec2 gridSize;\nuniform int checkerboard;\nuniform int checkerboardStyle;\n// 背景底纹颜色(明暗由主题解析后传入,引擎不再区分 dark 变体):\n// checkerboardColor —— 底色(网格底格 / 点阵底)\n// checkerboardDotColor —— 点色(点阵的圆点)\nuniform vec3 checkerboardColor;\nuniform vec3 checkerboardDotColor;\nuniform float dotColorDiff;\nuniform int pixelGrid;\nuniform int watermark;\nuniform sampler2D watermarkTexture;\nuniform vec2 watermarkSize;\nuniform vec2 watermarkOffset;\nuniform vec2 watermarkSpacing;\nuniform float watermarkRotation;\nuniform float watermarkAlpha;\n\nconst float VIEWPORT_SPACE_MIN_DOT_RADIUS = 0.5;\nconst float CANVAS_SPACE_DOT_RADIUS = 1.;\nconst float CANVAS_SPACE_DOT_GRID_SIZE_PX = 16.;\n\n// 远距淡出:缩放低于 DOT_FADE_END 起点阵开始渐隐,到 DOT_FADE_START 完全隐藏\n// (避免缩得很远时点糊成一片,Figma/FigJam/Miro 同法:点的可见度随 zoom 衰减)。\nconst float DOT_FADE_START = 0.04;\nconst float DOT_FADE_END = 0.10;\n\nconst int CHECKERBOARD_STYLE_NONE = 0;\nconst int CHECKERBOARD_STYLE_GRID = 1;\nconst int CHECKERBOARD_STYLE_DOTS = 2;\n\nfloat _round(float val) {\n return floor(val + .5);\n}\n\nvec2 _round(vec2 pt) {\n return floor(pt + .5);\n}\n\nfloat scaledGridSize(float zoomScale) {\n if (zoomScale < 0.03125) {\n return 32.0 * CANVAS_SPACE_DOT_GRID_SIZE_PX;\n }\n else if (zoomScale < 0.0625) {\n return 16.0 * CANVAS_SPACE_DOT_GRID_SIZE_PX;\n }\n else if (zoomScale < 0.125) {\n return 8.0 * CANVAS_SPACE_DOT_GRID_SIZE_PX;\n }\n else if (zoomScale < 0.25) {\n return 4.0 * CANVAS_SPACE_DOT_GRID_SIZE_PX;\n }\n else if (zoomScale < 0.5) {\n return 2.0 * CANVAS_SPACE_DOT_GRID_SIZE_PX;\n }\n else {\n return CANVAS_SPACE_DOT_GRID_SIZE_PX;\n }\n}\n\nvec4 renderCheckerboard(vec2 coord, vec4 color) {\n vec3 bg;\n if (checkerboardStyle == CHECKERBOARD_STYLE_GRID) {\n // 棋盘:两格用底色与其轻微压暗,保持细腻网格感(明暗全由 checkerboardColor 决定)。\n vec2 fractValue = fract(coord * vec2(gridScale) * zoom) - 0.5;\n bg = fractValue.x * fractValue.y < 0.0 ? checkerboardColor : checkerboardColor * 0.96;\n }\n else if (checkerboardStyle == CHECKERBOARD_STYLE_DOTS) {\n // 点阵:底色 checkerboardColor + 圆点 checkerboardDotColor(放大时按 dotColorDiff 提亮)。\n float zoomScale = zoom.x;\n float gridPixelSize = scaledGridSize(zoomScale);\n float zoomInterpolationFactor = smoothstep(0.5, 1.0, zoomScale);\n vec3 dotColor = checkerboardDotColor + vec3(dotColorDiff * zoomInterpolationFactor);\n vec2 nearestGridPoint = _round(coord / gridPixelSize) * gridPixelSize;\n float canvasSpaceDist = length(coord - nearestGridPoint);\n float viewportSpaceDist = canvasSpaceDist * zoomScale;\n float viewportSpaceDotRadius = max(VIEWPORT_SPACE_MIN_DOT_RADIUS, CANVAS_SPACE_DOT_RADIUS * zoomScale);\n float dist = 1.0 - smoothstep(0., 1., (viewportSpaceDist - viewportSpaceDotRadius + .5));\n // 远距淡出:zoomScale 越低点越淡,低于 DOT_FADE_START 完全隐去(回落到纯底色)。\n dist *= smoothstep(DOT_FADE_START, DOT_FADE_END, zoomScale);\n bg = mix(checkerboardColor, dotColor, dist);\n }\n else {\n bg = checkerboardColor;\n }\n return vec4(bg * (1.0 - color.a) + color.rgb, 1);\n}\n\nvec4 renderPixelGrid(vec2 coord, vec4 color) {\n vec3 rgb = color.rgb;\n vec2 corner = fract(coord);\n float gridWeight = max(float(corner.x < gridSize.x), float(corner.y < gridSize.y));\n vec3 gridColor;\n vec3 weights = vec3(0.299, 0.587, 0.114);\n float c2 = dot(rgb * rgb, weights);\n float luminance = sqrt(c2);\n if (luminance > 0.5) {\n float target = (luminance - 0.05) / luminance;\n gridColor = rgb * target;\n }\n else {\n float target = luminance * 0.8 + 0.15;\n float c1 = dot(rgb, weights);\n float a = 1.0 - 2.0 * c1 + c2;\n float b = c2 - c1;\n gridColor = mix(rgb, vec3(1), (b + sqrt(b * b - a * (c2 - target * target))) / a);\n }\n return vec4(mix(rgb, gridColor, gridWeight), color.a);\n}\n\nvec4 renderWatermark(vec2 coord, vec4 color) {\n float hw = watermarkSize.x * 0.5;\n float hh = watermarkSize.y * 0.5;\n float c = cos(-watermarkRotation);\n float s = sin(-watermarkRotation);\n vec2 blockSize = watermarkSize + watermarkSpacing;\n vec2 tiles = max(floor(inputSize / blockSize), vec2(1.0));\n vec2 gridCoverage = tiles * blockSize;\n vec2 startPos = watermarkOffset;\n vec2 localPix = coord - startPos;\n vec2 blockIndex = floor(localPix / blockSize);\n vec2 wmCenter = startPos + blockIndex * blockSize + watermarkSize * 0.5 + watermarkSpacing / 2.0;\n vec2 local = coord - wmCenter;\n vec2 inv = vec2(\n local.x * c + local.y * s,\n -local.x * s + local.y * c\n );\n if (inv.x >= -hw && inv.x <= hw && inv.y >= -hh && inv.y <= hh) {\n vec2 wmUV = (inv + vec2(hw, hh)) / watermarkSize;\n vec4 wmColor = texture(watermarkTexture, wmUV);\n float alpha = wmColor.a * watermarkAlpha;\n return mix(color, wmColor, alpha);\n } else {\n return color;\n }\n}\n\nvoid main(void) {\n vec4 color = texture(uTexture, vUv);\n vec2 coord = vec2(vUv.x, 1.0 - vUv.y);\n coord = (coord * inputSize - translate) / zoom;\n if (checkerboard > 0) {\n color = renderCheckerboard(coord, color);\n }\n if (watermark > 0) {\n color = renderWatermark(coord, color);\n }\n if (pixelGrid > 0) {\n color = renderPixelGrid(coord, color);\n }\n gl_FragColor = color;\n}\n", mi, q = class extends W {
6182
6188
  static {
6183
- pi = this;
6189
+ mi = this;
6184
6190
  }
6185
6191
  _watermark;
6186
6192
  _color = new T("#f2f3f5");
6187
6193
  _dotColor = new T("#c8ccd4");
6188
6194
  static material = new I({ gl: {
6189
6195
  vertex: "attribute vec2 position;\nin vec2 uv;\nuniform mat3 projectionMatrix;\nuniform mat3 viewMatrix;\nout vec2 vUv;\nvoid main() {\n gl_Position = vec4(position.xy, 0.0, 1.0);\n vUv = uv;\n}",
6190
- fragment: fi
6196
+ fragment: pi
6191
6197
  } });
6192
6198
  constructor(e, t = []) {
6193
6199
  super(), this.setProperties(e).append(t);
@@ -6222,7 +6228,7 @@ var fi = "precision highp float;\n\nin vec2 vUv;\nuniform sampler2D uTexture;\nu
6222
6228
  t.redraw(e, () => {
6223
6229
  this._watermark ? this._watermark.activate(e, 1) : e.texture.unbind(1);
6224
6230
  let n = e.shader.uniforms.viewMatrix, r = this._watermark ? [this.watermarkWidth, this.watermarkWidth * this._watermark.height / this._watermark.width] : [0, 0], i = Math.max(r[0], r[1]), [a, o, s] = this._color.toArray(), [c, l, u] = this._dotColor.toArray();
6225
- L.draw(e, pi.material, {
6231
+ L.draw(e, mi.material, {
6226
6232
  uTexture: 0,
6227
6233
  inputSize: [t.width, t.height],
6228
6234
  zoom: [n[0], n[4]],
@@ -6254,20 +6260,20 @@ var fi = "precision highp float;\n\nin vec2 vUv;\nuniform sampler2D uTexture;\nu
6254
6260
  });
6255
6261
  }
6256
6262
  };
6257
- k([_({ fallback: !1 }), O("design:type", Boolean)], q.prototype, "checkerboard", void 0), k([_({ fallback: "grid" }), O("design:type", Object)], q.prototype, "checkerboardStyle", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], q.prototype, "pixelGrid", void 0), k([_({ fallback: "#f2f3f5" }), O("design:type", String)], q.prototype, "checkerboardColor", void 0), k([_({ fallback: "#c8ccd4" }), O("design:type", String)], q.prototype, "checkerboardDotColor", void 0), k([_({ fallback: .06 }), O("design:type", Number)], q.prototype, "dotColorDiff", void 0), k([_(), O("design:type", String)], q.prototype, "watermark", void 0), k([_({ fallback: 100 }), O("design:type", Number)], q.prototype, "watermarkWidth", void 0), k([_({ fallback: .05 }), O("design:type", Number)], q.prototype, "watermarkAlpha", void 0), k([_({ fallback: .5236 }), O("design:type", Number)], q.prototype, "watermarkRotation", void 0), q = pi = k([x("DrawboardEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], q);
6263
+ k([_({ fallback: !1 }), O("design:type", Boolean)], q.prototype, "checkerboard", void 0), k([_({ fallback: "grid" }), O("design:type", Object)], q.prototype, "checkerboardStyle", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], q.prototype, "pixelGrid", void 0), k([_({ fallback: "#f2f3f5" }), O("design:type", String)], q.prototype, "checkerboardColor", void 0), k([_({ fallback: "#c8ccd4" }), O("design:type", String)], q.prototype, "checkerboardDotColor", void 0), k([_({ fallback: .06 }), O("design:type", Number)], q.prototype, "dotColorDiff", void 0), k([_(), O("design:type", String)], q.prototype, "watermark", void 0), k([_({ fallback: 100 }), O("design:type", Number)], q.prototype, "watermarkWidth", void 0), k([_({ fallback: .05 }), O("design:type", Number)], q.prototype, "watermarkAlpha", void 0), k([_({ fallback: .5236 }), O("design:type", Number)], q.prototype, "watermarkRotation", void 0), q = mi = k([x("DrawboardEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], q);
6258
6264
  //#endregion
6259
6265
  //#region src/scene/effects/GaussianBlurEffect.ts
6260
- var mi, hi = "varying vec2 vUv[9];\nuniform sampler2D sampler;\n\nvoid main(void) {\n gl_FragColor = vec4(0.0);\n float flag = 0.0;\n for (int i = 0; i < 9; i++) {\n vec2 uv = vUv[i];\n if (uv.x < 0.0 || uv.x > 1.0 || uv.y < 0.0 || uv.y > 1.0) {\n flag = 1.0;\n break;\n }\n }\n if (flag == 1.0) {\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.028532;\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.067234;\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.124009;\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.179044;\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.20236;\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.179044;\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.124009;\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.067234;\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.028532;\n } else {\n gl_FragColor += texture2D(sampler, vUv[0]) * 0.028532;\n gl_FragColor += texture2D(sampler, vUv[1]) * 0.067234;\n gl_FragColor += texture2D(sampler, vUv[2]) * 0.124009;\n gl_FragColor += texture2D(sampler, vUv[3]) * 0.179044;\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.20236;\n gl_FragColor += texture2D(sampler, vUv[5]) * 0.179044;\n gl_FragColor += texture2D(sampler, vUv[6]) * 0.124009;\n gl_FragColor += texture2D(sampler, vUv[7]) * 0.067234;\n gl_FragColor += texture2D(sampler, vUv[8]) * 0.028532;\n }\n}", gi = class extends W {
6266
+ var hi, gi = "varying vec2 vUv[9];\nuniform sampler2D sampler;\n\nvoid main(void) {\n gl_FragColor = vec4(0.0);\n float flag = 0.0;\n for (int i = 0; i < 9; i++) {\n vec2 uv = vUv[i];\n if (uv.x < 0.0 || uv.x > 1.0 || uv.y < 0.0 || uv.y > 1.0) {\n flag = 1.0;\n break;\n }\n }\n if (flag == 1.0) {\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.028532;\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.067234;\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.124009;\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.179044;\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.20236;\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.179044;\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.124009;\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.067234;\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.028532;\n } else {\n gl_FragColor += texture2D(sampler, vUv[0]) * 0.028532;\n gl_FragColor += texture2D(sampler, vUv[1]) * 0.067234;\n gl_FragColor += texture2D(sampler, vUv[2]) * 0.124009;\n gl_FragColor += texture2D(sampler, vUv[3]) * 0.179044;\n gl_FragColor += texture2D(sampler, vUv[4]) * 0.20236;\n gl_FragColor += texture2D(sampler, vUv[5]) * 0.179044;\n gl_FragColor += texture2D(sampler, vUv[6]) * 0.124009;\n gl_FragColor += texture2D(sampler, vUv[7]) * 0.067234;\n gl_FragColor += texture2D(sampler, vUv[8]) * 0.028532;\n }\n}", _i = class extends W {
6261
6267
  static {
6262
- mi = this;
6268
+ hi = this;
6263
6269
  }
6264
6270
  static materialX = new I({ gl: {
6265
6271
  vertex: "attribute vec2 position;\nattribute vec2 uv;\nuniform float uStrength;\nvarying vec2 vUv[9];\n\nvoid main(void) {\n gl_Position = vec4(position, 0, 1);\n vUv[0] = uv + vec2(-4.0 * uStrength, 0.0);\n vUv[1] = uv + vec2(-3.0 * uStrength, 0.0);\n vUv[2] = uv + vec2(-2.0 * uStrength, 0.0);\n vUv[3] = uv + vec2(-1.0 * uStrength, 0.0);\n vUv[4] = uv + vec2(0.0 * uStrength, 0.0);\n vUv[5] = uv + vec2(1.0 * uStrength, 0.0);\n vUv[6] = uv + vec2(2.0 * uStrength, 0.0);\n vUv[7] = uv + vec2(3.0 * uStrength, 0.0);\n vUv[8] = uv + vec2(4.0 * uStrength, 0.0);\n}",
6266
- fragment: hi
6272
+ fragment: gi
6267
6273
  } });
6268
6274
  static materialY = new I({ gl: {
6269
6275
  vertex: "attribute vec2 position;\nattribute vec2 uv;\nuniform float uStrength;\nvarying vec2 vUv[9];\n\nvoid main(void) {\n gl_Position = vec4(position, 0, 1);\n vUv[0] = uv + vec2(0.0, -4.0 * uStrength);\n vUv[1] = uv + vec2(0.0, -3.0 * uStrength);\n vUv[2] = uv + vec2(0.0, -2.0 * uStrength);\n vUv[3] = uv + vec2(0.0, -1.0 * uStrength);\n vUv[4] = uv + vec2(0.0, 0.0 * uStrength);\n vUv[5] = uv + vec2(0.0, 1.0 * uStrength);\n vUv[6] = uv + vec2(0.0, 2.0 * uStrength);\n vUv[7] = uv + vec2(0.0, 3.0 * uStrength);\n vUv[8] = uv + vec2(0.0, 4.0 * uStrength);\n}",
6270
- fragment: hi
6276
+ fragment: gi
6271
6277
  } });
6272
6278
  constructor(e, t = []) {
6273
6279
  super(), this.setProperties(e).append(t);
@@ -6275,31 +6281,31 @@ var mi, hi = "varying vec2 vUv[9];\nuniform sampler2D sampler;\n\nvoid main(void
6275
6281
  apply(e, t) {
6276
6282
  let n = 1 / t.width, r = 1 / t.height, i = Math.max(this.quality, 1);
6277
6283
  for (let r = 0; r < i; r++) t.redraw(e, () => {
6278
- L.draw(e, mi.materialX, {
6284
+ L.draw(e, hi.materialX, {
6279
6285
  sampler: 0,
6280
6286
  uStrength: n * (this.strength / i)
6281
6287
  });
6282
6288
  });
6283
6289
  for (let n = 0; n < i; n++) t.redraw(e, () => {
6284
- L.draw(e, mi.materialY, {
6290
+ L.draw(e, hi.materialY, {
6285
6291
  sampler: 0,
6286
6292
  uStrength: r * (this.strength / i)
6287
6293
  });
6288
6294
  });
6289
6295
  }
6290
6296
  };
6291
- k([_({ fallback: 4 }), O("design:type", Number)], gi.prototype, "strength", void 0), k([_({ fallback: 3 }), O("design:type", Number)], gi.prototype, "quality", void 0), gi = mi = k([x("GaussianBlurEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], gi);
6297
+ k([_({ fallback: 4 }), O("design:type", Number)], _i.prototype, "strength", void 0), k([_({ fallback: 3 }), O("design:type", Number)], _i.prototype, "quality", void 0), _i = hi = k([x("GaussianBlurEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], _i);
6292
6298
  //#endregion
6293
6299
  //#region src/scene/effects/DropShadowEffect.ts
6294
- var _i, vi = class extends W {
6300
+ var vi, yi = class extends W {
6295
6301
  static {
6296
- _i = this;
6302
+ vi = this;
6297
6303
  }
6298
6304
  static material = new I({ gl: {
6299
6305
  vertex: "precision mediump float;\nattribute vec2 position;\nattribute vec2 uv;\nvarying vec2 vUv;\nvoid main() {\n gl_Position = vec4(position, 0.0, 1.0);\n vUv = uv;\n}",
6300
6306
  fragment: "precision highp float;\nvarying vec2 vUv;\nuniform sampler2D sampler;\nuniform float uAlpha;\nuniform vec3 uColor;\nuniform vec2 uOffset;\nuniform vec4 uInputSize;\n\nvoid main(void) {\n vec4 sample = texture2D(sampler, vUv + uOffset * uInputSize.zw);\n sample.rgb = uColor.rgb * sample.a;\n sample *= uAlpha;\n gl_FragColor = sample;\n}"
6301
6307
  } });
6302
- blurEffect = new gi();
6308
+ blurEffect = new _i();
6303
6309
  viewport3 = new U();
6304
6310
  _color = new T();
6305
6311
  constructor(e, t = []) {
@@ -6307,7 +6313,7 @@ var _i, vi = class extends W {
6307
6313
  }
6308
6314
  apply(e, t) {
6309
6315
  this.viewport3.activateWithCopy(e, t), this.viewport3.redraw(e, () => {
6310
- this._color.value = this.color, L.draw(e, _i.material, {
6316
+ this._color.value = this.color, L.draw(e, vi.material, {
6311
6317
  sampler: 0,
6312
6318
  uAlpha: this._color.a,
6313
6319
  uColor: this._color.toArray().slice(0, 3),
@@ -6320,16 +6326,16 @@ var _i, vi = class extends W {
6320
6326
  ]
6321
6327
  });
6322
6328
  }), this.blurEffect.strength = this.blur, this.blurEffect.apply(e, this.viewport3), t.redraw(e, () => {
6323
- this.viewport3.texture.activate(e, 1), L.draw(e, pr.instance, { sampler: 1 }), this.shadowOnly || L.draw(e, pr.instance, { sampler: 0 }), e.texture.unbind(1);
6329
+ this.viewport3.texture.activate(e, 1), L.draw(e, mr.instance, { sampler: 1 }), this.shadowOnly || L.draw(e, mr.instance, { sampler: 0 }), e.texture.unbind(1);
6324
6330
  });
6325
6331
  }
6326
6332
  };
6327
- k([_({ fallback: "#000000FF" }), O("design:type", Object)], vi.prototype, "color", void 0), k([_({ fallback: 4 }), O("design:type", Number)], vi.prototype, "blur", void 0), k([_({ fallback: 4 }), O("design:type", Number)], vi.prototype, "offsetX", void 0), k([_({ fallback: 4 }), O("design:type", Number)], vi.prototype, "offsetY", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], vi.prototype, "shadowOnly", void 0), vi = _i = k([x("DropShadowEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], vi);
6333
+ k([_({ fallback: "#000000FF" }), O("design:type", Object)], yi.prototype, "color", void 0), k([_({ fallback: 4 }), O("design:type", Number)], yi.prototype, "blur", void 0), k([_({ fallback: 4 }), O("design:type", Number)], yi.prototype, "offsetX", void 0), k([_({ fallback: 4 }), O("design:type", Number)], yi.prototype, "offsetY", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], yi.prototype, "shadowOnly", void 0), yi = vi = k([x("DropShadowEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], yi);
6328
6334
  //#endregion
6329
6335
  //#region src/scene/effects/EmbossEffect.ts
6330
- var yi, bi = class extends W {
6336
+ var bi, xi = class extends W {
6331
6337
  static {
6332
- yi = this;
6338
+ bi = this;
6333
6339
  }
6334
6340
  static material = new I({ gl: {
6335
6341
  vertex: "precision mediump float;\nattribute vec2 position;\nattribute vec2 uv;\nvarying vec2 vUv;\nvoid main() {\n gl_Position = vec4(position, 0.0, 1.0);\n vUv = uv;\n}",
@@ -6340,7 +6346,7 @@ var yi, bi = class extends W {
6340
6346
  }
6341
6347
  apply(e, t) {
6342
6348
  t.redraw(e, () => {
6343
- L.draw(e, yi.material, {
6349
+ L.draw(e, bi.material, {
6344
6350
  sampler: 0,
6345
6351
  strength: this.strength,
6346
6352
  inputSize: [
@@ -6353,12 +6359,12 @@ var yi, bi = class extends W {
6353
6359
  });
6354
6360
  }
6355
6361
  };
6356
- k([_({ fallback: 5 }), O("design:type", Number)], bi.prototype, "strength", void 0), bi = yi = k([x("EmbossEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], bi);
6362
+ k([_({ fallback: 5 }), O("design:type", Number)], xi.prototype, "strength", void 0), xi = bi = k([x("EmbossEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], xi);
6357
6363
  //#endregion
6358
6364
  //#region src/scene/effects/GlitchEffect.ts
6359
- var xi, J = class extends W {
6365
+ var Si, J = class extends W {
6360
6366
  static {
6361
- xi = this;
6367
+ Si = this;
6362
6368
  }
6363
6369
  static material = new I({ gl: {
6364
6370
  vertex: "in vec2 position;\nin vec2 uv;\nout vec2 vUv;\nvoid main() {\n gl_Position = vec4(position, 0.0, 1.0);\n vUv = uv;\n}",
@@ -6390,7 +6396,7 @@ var xi, J = class extends W {
6390
6396
  this._needsRedraw || (this._needsRedraw = !0, this.redraw());
6391
6397
  let n = t.width, r = t.height, i = this.direction * (Math.PI / 180), a = Math.sin(i), o = Math.cos(i);
6392
6398
  t.redraw(e, () => {
6393
- this._texture.activate(e, 1), L.draw(e, xi.material, {
6399
+ this._texture.activate(e, 1), L.draw(e, Si.material, {
6394
6400
  sampler: 0,
6395
6401
  filterClamp: [
6396
6402
  0,
@@ -6419,12 +6425,12 @@ var xi, J = class extends W {
6419
6425
  });
6420
6426
  }
6421
6427
  };
6422
- k([_({ fallback: 10 }), O("design:type", Number)], J.prototype, "slices", void 0), k([_({ fallback: 512 }), O("design:type", Number)], J.prototype, "sampleSize", void 0), k([_({ fallback: 100 }), O("design:type", Number)], J.prototype, "offset", void 0), k([_({ fallback: 0 }), O("design:type", Number)], J.prototype, "direction", void 0), k([_({ fallback: 2 }), O("design:type", Number)], J.prototype, "fillMode", void 0), k([_({ fallback: 0 }), O("design:type", Number)], J.prototype, "seed", void 0), k([_({ default: () => [2, 2] }), O("design:type", Array)], J.prototype, "red", void 0), k([_({ default: () => [-10, 4] }), O("design:type", Array)], J.prototype, "green", void 0), k([_({ default: () => [10, -4] }), O("design:type", Array)], J.prototype, "blue", void 0), J = xi = k([x("GlitchEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], J);
6428
+ k([_({ fallback: 10 }), O("design:type", Number)], J.prototype, "slices", void 0), k([_({ fallback: 512 }), O("design:type", Number)], J.prototype, "sampleSize", void 0), k([_({ fallback: 100 }), O("design:type", Number)], J.prototype, "offset", void 0), k([_({ fallback: 0 }), O("design:type", Number)], J.prototype, "direction", void 0), k([_({ fallback: 2 }), O("design:type", Number)], J.prototype, "fillMode", void 0), k([_({ fallback: 0 }), O("design:type", Number)], J.prototype, "seed", void 0), k([_({ default: () => [2, 2] }), O("design:type", Array)], J.prototype, "red", void 0), k([_({ default: () => [-10, 4] }), O("design:type", Array)], J.prototype, "green", void 0), k([_({ default: () => [10, -4] }), O("design:type", Array)], J.prototype, "blue", void 0), J = Si = k([x("GlitchEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], J);
6423
6429
  //#endregion
6424
6430
  //#region src/scene/effects/GodrayEffect.ts
6425
- var Si, Ci = "vec3 mod289(vec3 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 mod289(vec4 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 permute(vec4 x) {\n return mod289(((x * 34.0) + 1.0) * x);\n}\nvec4 taylorInvSqrt(vec4 r) {\n return 1.79284291400159 - 0.85373472095314 * r;\n}\nvec3 fade(vec3 t) {\n return t * t * t * (t * (t * 6.0 - 15.0) + 10.0);\n}\n// Classic Perlin noise, periodic variant\nfloat pnoise(vec3 P, vec3 rep) {\n vec3 Pi0 = mod(floor(P), rep); // Integer part, modulo period\n vec3 Pi1 = mod(Pi0 + vec3(1.0), rep); // Integer part + 1, mod period\n Pi0 = mod289(Pi0);\n Pi1 = mod289(Pi1);\n vec3 Pf0 = fract(P); // Fractional part for interpolation\n vec3 Pf1 = Pf0 - vec3(1.0); // Fractional part - 1.0\n vec4 ix = vec4(Pi0.x, Pi1.x, Pi0.x, Pi1.x);\n vec4 iy = vec4(Pi0.yy, Pi1.yy);\n vec4 iz0 = Pi0.zzzz;\n vec4 iz1 = Pi1.zzzz;\n vec4 ixy = permute(permute(ix) + iy);\n vec4 ixy0 = permute(ixy + iz0);\n vec4 ixy1 = permute(ixy + iz1);\n vec4 gx0 = ixy0 * (1.0 / 7.0);\n vec4 gy0 = fract(floor(gx0) * (1.0 / 7.0)) - 0.5;\n gx0 = fract(gx0);\n vec4 gz0 = vec4(0.5) - abs(gx0) - abs(gy0);\n vec4 sz0 = step(gz0, vec4(0.0));\n gx0 -= sz0 * (step(0.0, gx0) - 0.5);\n gy0 -= sz0 * (step(0.0, gy0) - 0.5);\n vec4 gx1 = ixy1 * (1.0 / 7.0);\n vec4 gy1 = fract(floor(gx1) * (1.0 / 7.0)) - 0.5;\n gx1 = fract(gx1);\n vec4 gz1 = vec4(0.5) - abs(gx1) - abs(gy1);\n vec4 sz1 = step(gz1, vec4(0.0));\n gx1 -= sz1 * (step(0.0, gx1) - 0.5);\n gy1 -= sz1 * (step(0.0, gy1) - 0.5);\n vec3 g000 = vec3(gx0.x, gy0.x, gz0.x);\n vec3 g100 = vec3(gx0.y, gy0.y, gz0.y);\n vec3 g010 = vec3(gx0.z, gy0.z, gz0.z);\n vec3 g110 = vec3(gx0.w, gy0.w, gz0.w);\n vec3 g001 = vec3(gx1.x, gy1.x, gz1.x);\n vec3 g101 = vec3(gx1.y, gy1.y, gz1.y);\n vec3 g011 = vec3(gx1.z, gy1.z, gz1.z);\n vec3 g111 = vec3(gx1.w, gy1.w, gz1.w);\n vec4 norm0 = taylorInvSqrt(vec4(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110)));\n g000 *= norm0.x;\n g010 *= norm0.y;\n g100 *= norm0.z;\n g110 *= norm0.w;\n vec4 norm1 = taylorInvSqrt(vec4(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111)));\n g001 *= norm1.x;\n g011 *= norm1.y;\n g101 *= norm1.z;\n g111 *= norm1.w;\n float n000 = dot(g000, Pf0);\n float n100 = dot(g100, vec3(Pf1.x, Pf0.yz));\n float n010 = dot(g010, vec3(Pf0.x, Pf1.y, Pf0.z));\n float n110 = dot(g110, vec3(Pf1.xy, Pf0.z));\n float n001 = dot(g001, vec3(Pf0.xy, Pf1.z));\n float n101 = dot(g101, vec3(Pf1.x, Pf0.y, Pf1.z));\n float n011 = dot(g011, vec3(Pf0.x, Pf1.yz));\n float n111 = dot(g111, Pf1);\n vec3 fade_xyz = fade(Pf0);\n vec4 n_z = mix(vec4(n000, n100, n010, n110), vec4(n001, n101, n011, n111), fade_xyz.z);\n vec2 n_yz = mix(n_z.xy, n_z.zw, fade_xyz.y);\n float n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x);\n return 2.2 * n_xyz;\n}\nfloat turb(vec3 P, vec3 rep, float lacunarity, float gain) {\n float sum = 0.0;\n float sc = 1.0;\n float totalgain = 1.0;\n for (float i = 0.0; i < 6.0; i++) {\n sum += totalgain * pnoise(P * sc, rep);\n sc *= lacunarity;\n totalgain *= gain;\n }\n return abs(sum);\n}", wi = class extends W {
6431
+ var Ci, wi = "vec3 mod289(vec3 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 mod289(vec4 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 permute(vec4 x) {\n return mod289(((x * 34.0) + 1.0) * x);\n}\nvec4 taylorInvSqrt(vec4 r) {\n return 1.79284291400159 - 0.85373472095314 * r;\n}\nvec3 fade(vec3 t) {\n return t * t * t * (t * (t * 6.0 - 15.0) + 10.0);\n}\n// Classic Perlin noise, periodic variant\nfloat pnoise(vec3 P, vec3 rep) {\n vec3 Pi0 = mod(floor(P), rep); // Integer part, modulo period\n vec3 Pi1 = mod(Pi0 + vec3(1.0), rep); // Integer part + 1, mod period\n Pi0 = mod289(Pi0);\n Pi1 = mod289(Pi1);\n vec3 Pf0 = fract(P); // Fractional part for interpolation\n vec3 Pf1 = Pf0 - vec3(1.0); // Fractional part - 1.0\n vec4 ix = vec4(Pi0.x, Pi1.x, Pi0.x, Pi1.x);\n vec4 iy = vec4(Pi0.yy, Pi1.yy);\n vec4 iz0 = Pi0.zzzz;\n vec4 iz1 = Pi1.zzzz;\n vec4 ixy = permute(permute(ix) + iy);\n vec4 ixy0 = permute(ixy + iz0);\n vec4 ixy1 = permute(ixy + iz1);\n vec4 gx0 = ixy0 * (1.0 / 7.0);\n vec4 gy0 = fract(floor(gx0) * (1.0 / 7.0)) - 0.5;\n gx0 = fract(gx0);\n vec4 gz0 = vec4(0.5) - abs(gx0) - abs(gy0);\n vec4 sz0 = step(gz0, vec4(0.0));\n gx0 -= sz0 * (step(0.0, gx0) - 0.5);\n gy0 -= sz0 * (step(0.0, gy0) - 0.5);\n vec4 gx1 = ixy1 * (1.0 / 7.0);\n vec4 gy1 = fract(floor(gx1) * (1.0 / 7.0)) - 0.5;\n gx1 = fract(gx1);\n vec4 gz1 = vec4(0.5) - abs(gx1) - abs(gy1);\n vec4 sz1 = step(gz1, vec4(0.0));\n gx1 -= sz1 * (step(0.0, gx1) - 0.5);\n gy1 -= sz1 * (step(0.0, gy1) - 0.5);\n vec3 g000 = vec3(gx0.x, gy0.x, gz0.x);\n vec3 g100 = vec3(gx0.y, gy0.y, gz0.y);\n vec3 g010 = vec3(gx0.z, gy0.z, gz0.z);\n vec3 g110 = vec3(gx0.w, gy0.w, gz0.w);\n vec3 g001 = vec3(gx1.x, gy1.x, gz1.x);\n vec3 g101 = vec3(gx1.y, gy1.y, gz1.y);\n vec3 g011 = vec3(gx1.z, gy1.z, gz1.z);\n vec3 g111 = vec3(gx1.w, gy1.w, gz1.w);\n vec4 norm0 = taylorInvSqrt(vec4(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110)));\n g000 *= norm0.x;\n g010 *= norm0.y;\n g100 *= norm0.z;\n g110 *= norm0.w;\n vec4 norm1 = taylorInvSqrt(vec4(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111)));\n g001 *= norm1.x;\n g011 *= norm1.y;\n g101 *= norm1.z;\n g111 *= norm1.w;\n float n000 = dot(g000, Pf0);\n float n100 = dot(g100, vec3(Pf1.x, Pf0.yz));\n float n010 = dot(g010, vec3(Pf0.x, Pf1.y, Pf0.z));\n float n110 = dot(g110, vec3(Pf1.xy, Pf0.z));\n float n001 = dot(g001, vec3(Pf0.xy, Pf1.z));\n float n101 = dot(g101, vec3(Pf1.x, Pf0.y, Pf1.z));\n float n011 = dot(g011, vec3(Pf0.x, Pf1.yz));\n float n111 = dot(g111, Pf1);\n vec3 fade_xyz = fade(Pf0);\n vec4 n_z = mix(vec4(n000, n100, n010, n110), vec4(n001, n101, n011, n111), fade_xyz.z);\n vec2 n_yz = mix(n_z.xy, n_z.zw, fade_xyz.y);\n float n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x);\n return 2.2 * n_xyz;\n}\nfloat turb(vec3 P, vec3 rep, float lacunarity, float gain) {\n float sum = 0.0;\n float sc = 1.0;\n float totalgain = 1.0;\n for (float i = 0.0; i < 6.0; i++) {\n sum += totalgain * pnoise(P * sc, rep);\n sc *= lacunarity;\n totalgain *= gain;\n }\n return abs(sum);\n}", Ti = class extends W {
6426
6432
  static {
6427
- Si = this;
6433
+ Ci = this;
6428
6434
  }
6429
6435
  static material = new I({ gl: {
6430
6436
  vertex: "precision mediump float;\nattribute vec2 position;\nattribute vec2 uv;\nvarying vec2 vUv;\nvoid main() {\n gl_Position = vec4(position, 0.0, 1.0);\n vUv = uv;\n}",
@@ -6439,7 +6445,7 @@ uniform float uTime;
6439
6445
  uniform vec3 uRay;
6440
6446
  uniform vec4 uInputSize;
6441
6447
 
6442
- ${Ci}
6448
+ ${wi}
6443
6449
 
6444
6450
  void main(void) {
6445
6451
  bool uParallel = uParallel > 0.5;
@@ -6478,7 +6484,7 @@ void main(void) {
6478
6484
  apply(e, t) {
6479
6485
  let n = this.angle * (Math.PI / 180), r = this.parallel ? [Math.cos(n), Math.sin(n)] : this.center;
6480
6486
  t.redraw(e, () => {
6481
- L.draw(e, Si.material, {
6487
+ L.draw(e, Ci.material, {
6482
6488
  sampler: 0,
6483
6489
  uDimensions: [t.width, t.height],
6484
6490
  uParallel: +!!this.parallel,
@@ -6500,15 +6506,15 @@ void main(void) {
6500
6506
  });
6501
6507
  }
6502
6508
  };
6503
- k([_({ fallback: 0 }), O("design:type", Number)], wi.prototype, "time", void 0), k([_({ fallback: 30 }), O("design:type", Number)], wi.prototype, "angle", void 0), k([_({ fallback: .5 }), O("design:type", Number)], wi.prototype, "gain", void 0), k([_({ fallback: 2.5 }), O("design:type", Number)], wi.prototype, "lacunarity", void 0), k([_({ fallback: !0 }), O("design:type", Boolean)], wi.prototype, "parallel", void 0), k([_({ default: () => [0, 0] }), O("design:type", Array)], wi.prototype, "center", void 0), k([_({ fallback: 1 }), O("design:type", Number)], wi.prototype, "alpha", void 0), wi = Si = k([x("GodrayEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], wi);
6509
+ k([_({ fallback: 0 }), O("design:type", Number)], Ti.prototype, "time", void 0), k([_({ fallback: 30 }), O("design:type", Number)], Ti.prototype, "angle", void 0), k([_({ fallback: .5 }), O("design:type", Number)], Ti.prototype, "gain", void 0), k([_({ fallback: 2.5 }), O("design:type", Number)], Ti.prototype, "lacunarity", void 0), k([_({ fallback: !0 }), O("design:type", Boolean)], Ti.prototype, "parallel", void 0), k([_({ default: () => [0, 0] }), O("design:type", Array)], Ti.prototype, "center", void 0), k([_({ fallback: 1 }), O("design:type", Number)], Ti.prototype, "alpha", void 0), Ti = Ci = k([x("GodrayEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Ti);
6504
6510
  //#endregion
6505
6511
  //#region src/scene/effects/KawaseBlurEffect.ts
6506
- var Ti = "varying vec2 vUv;\nuniform sampler2D sampler;\nuniform vec2 uOffset;\n\nvoid main(void) {\n vec4 color = vec4(0.0);\n color += texture2D(sampler, vec2(vUv.x - uOffset.x, vUv.y + uOffset.y));\n color += texture2D(sampler, vec2(vUv.x + uOffset.x, vUv.y + uOffset.y));\n color += texture2D(sampler, vec2(vUv.x + uOffset.x, vUv.y - uOffset.y));\n color += texture2D(sampler, vec2(vUv.x - uOffset.x, vUv.y - uOffset.y));\n color *= 0.25;\n gl_FragColor = color;\n}", Ei = "precision highp float;\nvarying vec2 vUv;\nuniform sampler2D sampler;\nuniform vec2 uOffset;\nuniform vec4 uInputClamp;\nvoid main(void) {\n vec4 color = vec4(0.0);\n color += texture2D(sampler, clamp(vec2(vUv.x - uOffset.x, vUv.y + uOffset.y), uInputClamp.xy, uInputClamp.zw));\n color += texture2D(sampler, clamp(vec2(vUv.x + uOffset.x, vUv.y + uOffset.y), uInputClamp.xy, uInputClamp.zw));\n color += texture2D(sampler, clamp(vec2(vUv.x + uOffset.x, vUv.y - uOffset.y), uInputClamp.xy, uInputClamp.zw));\n color += texture2D(sampler, clamp(vec2(vUv.x - uOffset.x, vUv.y - uOffset.y), uInputClamp.xy, uInputClamp.zw));\n color *= 0.25;\n gl_FragColor = color;\n}", Di = class extends W {
6512
+ var Ei = "varying vec2 vUv;\nuniform sampler2D sampler;\nuniform vec2 uOffset;\n\nvoid main(void) {\n vec4 color = vec4(0.0);\n color += texture2D(sampler, vec2(vUv.x - uOffset.x, vUv.y + uOffset.y));\n color += texture2D(sampler, vec2(vUv.x + uOffset.x, vUv.y + uOffset.y));\n color += texture2D(sampler, vec2(vUv.x + uOffset.x, vUv.y - uOffset.y));\n color += texture2D(sampler, vec2(vUv.x - uOffset.x, vUv.y - uOffset.y));\n color *= 0.25;\n gl_FragColor = color;\n}", Di = "precision highp float;\nvarying vec2 vUv;\nuniform sampler2D sampler;\nuniform vec2 uOffset;\nuniform vec4 uInputClamp;\nvoid main(void) {\n vec4 color = vec4(0.0);\n color += texture2D(sampler, clamp(vec2(vUv.x - uOffset.x, vUv.y + uOffset.y), uInputClamp.xy, uInputClamp.zw));\n color += texture2D(sampler, clamp(vec2(vUv.x + uOffset.x, vUv.y + uOffset.y), uInputClamp.xy, uInputClamp.zw));\n color += texture2D(sampler, clamp(vec2(vUv.x + uOffset.x, vUv.y - uOffset.y), uInputClamp.xy, uInputClamp.zw));\n color += texture2D(sampler, clamp(vec2(vUv.x - uOffset.x, vUv.y - uOffset.y), uInputClamp.xy, uInputClamp.zw));\n color *= 0.25;\n gl_FragColor = color;\n}", Oi = class extends W {
6507
6513
  _kernels = [0];
6508
6514
  constructor(e, t = []) {
6509
6515
  super(), this.material = new I({ gl: {
6510
6516
  vertex: "precision mediump float;\nattribute vec2 position;\nattribute vec2 uv;\nvarying vec2 vUv;\nvoid main() {\n gl_Position = vec4(position, 0.0, 1.0);\n vUv = uv;\n}",
6511
- fragment: e?.clamp ? Ei : Ti
6517
+ fragment: e?.clamp ? Di : Ei
6512
6518
  } }), this.setProperties(e).append(t), this._generateKernels();
6513
6519
  }
6514
6520
  _updateProperty(e, t, n) {
@@ -6546,12 +6552,12 @@ var Ti = "varying vec2 vUv;\nuniform sampler2D sampler;\nuniform vec2 uOffset;\n
6546
6552
  });
6547
6553
  }
6548
6554
  };
6549
- k([_({ fallback: 4 }), O("design:type", Number)], Di.prototype, "strength", void 0), k([_({ fallback: 3 }), O("design:type", Number)], Di.prototype, "quality", void 0), k([_({ default: () => [1, 1] }), O("design:type", Array)], Di.prototype, "pixelSize", void 0), Di = k([x("KawaseBlurEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Di);
6555
+ k([_({ fallback: 4 }), O("design:type", Number)], Oi.prototype, "strength", void 0), k([_({ fallback: 3 }), O("design:type", Number)], Oi.prototype, "quality", void 0), k([_({ default: () => [1, 1] }), O("design:type", Array)], Oi.prototype, "pixelSize", void 0), Oi = k([x("KawaseBlurEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Oi);
6550
6556
  //#endregion
6551
6557
  //#region src/scene/effects/MaskEffect.ts
6552
- var Oi, ki = class extends W {
6558
+ var ki, Ai = class extends W {
6553
6559
  static {
6554
- Oi = this;
6560
+ ki = this;
6555
6561
  }
6556
6562
  static material = new I({ gl: {
6557
6563
  vertex: "attribute vec2 position;\nin vec2 uv;\nout vec2 vUv;\nvoid main() {\n gl_Position = vec4(position, 0.0, 1.0);\n vUv = uv;\n}",
@@ -6573,7 +6579,7 @@ var Oi, ki = class extends W {
6573
6579
  }
6574
6580
  apply(e, t, n) {
6575
6581
  this.texture && t.redraw(e, () => {
6576
- this.texture.activate(e, 1), L.draw(e, Oi.material, {
6582
+ this.texture.activate(e, 1), L.draw(e, ki.material, {
6577
6583
  sampler: 0,
6578
6584
  mask: 1,
6579
6585
  rotation: n.target?.globalRotation ?? 0
@@ -6581,23 +6587,23 @@ var Oi, ki = class extends W {
6581
6587
  });
6582
6588
  }
6583
6589
  };
6584
- k([_({ fallback: "" }), O("design:type", String)], ki.prototype, "image", void 0), ki = Oi = k([x("MaskEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], ki);
6590
+ k([_({ fallback: "" }), O("design:type", String)], Ai.prototype, "image", void 0), Ai = ki = k([x("MaskEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Ai);
6585
6591
  //#endregion
6586
6592
  //#region src/scene/effects/OutlineEffect.ts
6587
- var Ai, ji = "precision highp float;\nvarying vec2 vUv;\nuniform sampler2D sampler;\nuniform vec2 uThickness;\nuniform vec3 uColor;\nuniform float uAlpha;\nuniform float uKnockout;\nuniform vec4 uInputClamp;\n\nconst float DOUBLE_PI = 2. * 3.14159265358979323846264;\nconst float ANGLE_STEP = {ANGLE_STEP};\n\nfloat outlineMaxAlphaAtPos(vec2 pos) {\n if (uThickness.x == 0. || uThickness.y == 0.) {\n return 0.;\n }\n vec4 displacedColor;\n vec2 displacedPos;\n float maxAlpha = 0.;\n for (float angle = 0.; angle <= DOUBLE_PI; angle += ANGLE_STEP) {\n displacedPos.x = vUv.x + uThickness.x * cos(angle);\n displacedPos.y = vUv.y + uThickness.y * sin(angle);\n displacedColor = texture2D(sampler, clamp(displacedPos, uInputClamp.xy, uInputClamp.zw));\n maxAlpha = max(maxAlpha, displacedColor.a);\n }\n return maxAlpha;\n}\n\nvoid main(void) {\n vec4 sourceColor = texture2D(sampler, vUv);\n vec4 contentColor = sourceColor * float(uKnockout < 0.5);\n float outlineAlpha = uAlpha * outlineMaxAlphaAtPos(vUv.xy) * (1.-sourceColor.a);\n vec4 outlineColor = vec4(vec3(uColor) * outlineAlpha, outlineAlpha);\n gl_FragColor = contentColor + outlineColor;\n}", Mi = class extends W {
6593
+ var ji, Mi = "precision highp float;\nvarying vec2 vUv;\nuniform sampler2D sampler;\nuniform vec2 uThickness;\nuniform vec3 uColor;\nuniform float uAlpha;\nuniform float uKnockout;\nuniform vec4 uInputClamp;\n\nconst float DOUBLE_PI = 2. * 3.14159265358979323846264;\nconst float ANGLE_STEP = {ANGLE_STEP};\n\nfloat outlineMaxAlphaAtPos(vec2 pos) {\n if (uThickness.x == 0. || uThickness.y == 0.) {\n return 0.;\n }\n vec4 displacedColor;\n vec2 displacedPos;\n float maxAlpha = 0.;\n for (float angle = 0.; angle <= DOUBLE_PI; angle += ANGLE_STEP) {\n displacedPos.x = vUv.x + uThickness.x * cos(angle);\n displacedPos.y = vUv.y + uThickness.y * sin(angle);\n displacedColor = texture2D(sampler, clamp(displacedPos, uInputClamp.xy, uInputClamp.zw));\n maxAlpha = max(maxAlpha, displacedColor.a);\n }\n return maxAlpha;\n}\n\nvoid main(void) {\n vec4 sourceColor = texture2D(sampler, vUv);\n vec4 contentColor = sourceColor * float(uKnockout < 0.5);\n float outlineAlpha = uAlpha * outlineMaxAlphaAtPos(vUv.xy) * (1.-sourceColor.a);\n vec4 outlineColor = vec4(vec3(uColor) * outlineAlpha, outlineAlpha);\n gl_FragColor = contentColor + outlineColor;\n}", Ni = class extends W {
6588
6594
  static {
6589
- Ai = this;
6595
+ ji = this;
6590
6596
  }
6591
6597
  static MIN_SAMPLES = 1;
6592
6598
  static MAX_SAMPLES = 100;
6593
6599
  static getAngleStep(e) {
6594
- return Number.parseFloat((Math.PI * 2 / Math.max(e * Ai.MAX_SAMPLES, Ai.MIN_SAMPLES)).toFixed(7));
6600
+ return Number.parseFloat((Math.PI * 2 / Math.max(e * ji.MAX_SAMPLES, ji.MIN_SAMPLES)).toFixed(7));
6595
6601
  }
6596
6602
  _color = new T();
6597
6603
  constructor(e, t = []) {
6598
6604
  super(), this.setProperties(e).append(t), this.material = new I({ gl: {
6599
6605
  vertex: "precision mediump float;\nattribute vec2 position;\nattribute vec2 uv;\nvarying vec2 vUv;\nvoid main() {\n gl_Position = vec4(position, 0.0, 1.0);\n vUv = uv;\n}",
6600
- fragment: ji.replace(/\{ANGLE_STEP\}/, Ai.getAngleStep(this.quality).toFixed(7))
6606
+ fragment: Mi.replace(/\{ANGLE_STEP\}/, ji.getAngleStep(this.quality).toFixed(7))
6601
6607
  } });
6602
6608
  }
6603
6609
  apply(e, t) {
@@ -6607,7 +6613,7 @@ var Ai, ji = "precision highp float;\nvarying vec2 vUv;\nuniform sampler2D sampl
6607
6613
  uThickness: [this.width / t.width, this.width / t.height],
6608
6614
  uColor: this._color.toArray().slice(0, 3),
6609
6615
  uAlpha: this.opacity === 1 ? this._color.a : this.opacity,
6610
- uAngleStep: Ai.getAngleStep(this.quality),
6616
+ uAngleStep: ji.getAngleStep(this.quality),
6611
6617
  uKnockout: +!!this.knockout,
6612
6618
  uInputClamp: [
6613
6619
  0,
@@ -6619,12 +6625,12 @@ var Ai, ji = "precision highp float;\nvarying vec2 vUv;\nuniform sampler2D sampl
6619
6625
  });
6620
6626
  }
6621
6627
  };
6622
- k([_({ fallback: "#000000ff" }), O("design:type", Object)], Mi.prototype, "color", void 0), k([_({ fallback: 1 }), O("design:type", Number)], Mi.prototype, "width", void 0), k([_({ fallback: "solid" }), O("design:type", String)], Mi.prototype, "style", void 0), k([_(), O("design:type", Object)], Mi.prototype, "image", void 0), k([_({ fallback: 1 }), O("design:type", Number)], Mi.prototype, "opacity", void 0), k([_({ fallback: .1 }), O("design:type", Number)], Mi.prototype, "quality", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], Mi.prototype, "knockout", void 0), Mi = Ai = k([x("OutlineEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Mi);
6628
+ k([_({ fallback: "#000000ff" }), O("design:type", Object)], Ni.prototype, "color", void 0), k([_({ fallback: 1 }), O("design:type", Number)], Ni.prototype, "width", void 0), k([_({ fallback: "solid" }), O("design:type", String)], Ni.prototype, "style", void 0), k([_(), O("design:type", Object)], Ni.prototype, "image", void 0), k([_({ fallback: 1 }), O("design:type", Number)], Ni.prototype, "opacity", void 0), k([_({ fallback: .1 }), O("design:type", Number)], Ni.prototype, "quality", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], Ni.prototype, "knockout", void 0), Ni = ji = k([x("OutlineEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Ni);
6623
6629
  //#endregion
6624
6630
  //#region src/scene/effects/PixelateEffect.ts
6625
- var Ni, Pi = class extends W {
6631
+ var Pi, Fi = class extends W {
6626
6632
  static {
6627
- Ni = this;
6633
+ Pi = this;
6628
6634
  }
6629
6635
  static material = new I({ gl: {
6630
6636
  vertex: "attribute vec2 position;\nattribute vec2 uv;\nvarying vec2 vUv;\nvoid main() {\n gl_Position = vec4(position, 0.0, 1.0);\n vUv = uv;\n}",
@@ -6640,16 +6646,16 @@ var Ni, Pi = class extends W {
6640
6646
  offset: [(r[0] + i[0]) / t.width, 1 - (r[1] + i[1]) / t.height],
6641
6647
  step: [this.strength * r[0] / t.width, this.strength * r[1] / t.height]
6642
6648
  };
6643
- L.draw(e, Ni.material, a);
6649
+ L.draw(e, Pi.material, a);
6644
6650
  });
6645
6651
  }
6646
6652
  };
6647
- k([_({ fallback: 10 }), O("design:type", Number)], Pi.prototype, "strength", void 0), Pi = Ni = k([x("PixelateEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Pi);
6653
+ k([_({ fallback: 10 }), O("design:type", Number)], Fi.prototype, "strength", void 0), Fi = Pi = k([x("PixelateEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Fi);
6648
6654
  //#endregion
6649
6655
  //#region src/scene/effects/ZoomBlurEffect.ts
6650
- var Fi, Ii = class extends W {
6656
+ var Ii, Li = class extends W {
6651
6657
  static {
6652
- Fi = this;
6658
+ Ii = this;
6653
6659
  }
6654
6660
  static material = new I({ gl: {
6655
6661
  vertex: "attribute vec2 position;\nattribute vec2 uv;\nvarying vec2 vUv;\nvoid main() {\n gl_Position = vec4(position, 0.0, 1.0);\n vUv = uv;\n}",
@@ -6660,7 +6666,7 @@ var Fi, Ii = class extends W {
6660
6666
  }
6661
6667
  apply(e, t) {
6662
6668
  t.redraw(e, () => {
6663
- L.draw(e, Fi.material, {
6669
+ L.draw(e, Ii.material, {
6664
6670
  sampler: 0,
6665
6671
  uCenter: [t.width / 2, t.height / 2],
6666
6672
  uInnerRadius: this.innerRadius,
@@ -6676,10 +6682,10 @@ var Fi, Ii = class extends W {
6676
6682
  });
6677
6683
  }
6678
6684
  };
6679
- k([_(), O("design:type", Array)], Ii.prototype, "center", void 0), k([_({ fallback: 20 }), O("design:type", Number)], Ii.prototype, "innerRadius", void 0), k([_({ fallback: -1 }), O("design:type", Number)], Ii.prototype, "radius", void 0), k([_({ fallback: .1 }), O("design:type", Number)], Ii.prototype, "strength", void 0), Ii = Fi = k([x("ZoomBlurEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Ii);
6685
+ k([_(), O("design:type", Array)], Li.prototype, "center", void 0), k([_({ fallback: 20 }), O("design:type", Number)], Li.prototype, "innerRadius", void 0), k([_({ fallback: -1 }), O("design:type", Number)], Li.prototype, "radius", void 0), k([_({ fallback: .1 }), O("design:type", Number)], Li.prototype, "strength", void 0), Li = Ii = k([x("ZoomBlurEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Li);
6680
6686
  //#endregion
6681
6687
  //#region src/scene/2d/element/utils.ts
6682
- function Li(e, t) {
6688
+ function Ri(e, t) {
6683
6689
  let { x: n, y: r, width: i, height: a } = t, o = !1, s = new v().translate(-n, -r).scale(1 / i, 1 / a);
6684
6690
  if (e.cropRect) {
6685
6691
  let { left: t = 0, top: n = 0, right: r = 0, bottom: i = 0 } = e.cropRect;
@@ -6735,7 +6741,7 @@ var Y = class extends w {
6735
6741
  }
6736
6742
  }
6737
6743
  async loadTexture() {
6738
- if (this.linearGradient || this.radialGradient) this.texture = new xr(this.linearGradient ?? this.radialGradient, Math.floor(this._parent.size.width), Math.floor(this._parent.size.height));
6744
+ if (this.linearGradient || this.radialGradient) this.texture = new Sr(this.linearGradient ?? this.radialGradient, Math.floor(this._parent.size.width), Math.floor(this._parent.size.height));
6739
6745
  else if (d(this.image)) this.animatedTexture = void 0, this.texture = void 0;
6740
6746
  else if (this._parent.tree?.log(`load image ${this.image}`), this.image !== "viewport") {
6741
6747
  let e = this.image.split("?")[0].endsWith(".gif"), t = this.image, n = await $.loadBy(t, async () => {
@@ -6784,17 +6790,20 @@ var Y = class extends w {
6784
6790
  isValid() {
6785
6791
  return !!(this.enabled && (this.texture || this.animatedTexture || this.color || this.image === "viewport"));
6786
6792
  }
6793
+ _resolveThemeColor(e) {
6794
+ return this._parent.tree?.resolveThemeColor(e) ?? e;
6795
+ }
6787
6796
  draw() {
6788
6797
  let { width: e, height: t } = this._parent.size, n = this._parent.context, r = { size: {
6789
6798
  width: e,
6790
6799
  height: t
6791
6800
  } };
6792
- if (this.image === "viewport") n.fillStyle = new Tr();
6801
+ if (this.image === "viewport") n.fillStyle = new Er();
6793
6802
  else {
6794
6803
  let i = this.animatedTexture?.currentFrame.texture ?? this.texture;
6795
6804
  r = {
6796
6805
  ...r,
6797
- ...Li(this, this.tile && i ? {
6806
+ ...Ri(this, this.tile && i ? {
6798
6807
  x: 0,
6799
6808
  y: 0,
6800
6809
  width: i.sourceWidth,
@@ -6805,7 +6814,7 @@ var Y = class extends w {
6805
6814
  width: e,
6806
6815
  height: t
6807
6816
  })
6808
- }, n.fillStyle = i ?? this.color ?? "#000000FF";
6817
+ }, n.fillStyle = i ?? this._resolveThemeColor(this.color) ?? "#000000FF";
6809
6818
  }
6810
6819
  n.fill(r);
6811
6820
  }
@@ -6833,7 +6842,7 @@ var Y = class extends w {
6833
6842
  k([_({ fallback: !0 }), O("design:type", Boolean)], Y.prototype, "enabled", void 0), k([_(), O("design:type", Object)], Y.prototype, "color", void 0), k([_(), O("design:type", Object)], Y.prototype, "image", void 0), k([_(), O("design:type", Object)], Y.prototype, "linearGradient", void 0), k([_(), O("design:type", Object)], Y.prototype, "radialGradient", void 0), k([_(), O("design:type", Object)], Y.prototype, "cropRect", void 0), k([_(), O("design:type", Object)], Y.prototype, "stretchRect", void 0), k([_(), O("design:type", Object)], Y.prototype, "dpi", void 0), k([_(), O("design:type", Object)], Y.prototype, "rotateWithShape", void 0), k([_(), O("design:type", Object)], Y.prototype, "tile", void 0), k([_(), O("design:type", Object)], Y.prototype, "opacity", void 0), k([_(), O("design:type", Object)], Y.prototype, "imagePipelines", void 0);
6834
6843
  //#endregion
6835
6844
  //#region src/scene/2d/element/Element2DBackground.ts
6836
- var Ri = class extends Y {
6845
+ var zi = class extends Y {
6837
6846
  setProperties(e) {
6838
6847
  return super._setProperties(d(e) ? void 0 : f(e));
6839
6848
  }
@@ -6845,14 +6854,14 @@ var Ri = class extends Y {
6845
6854
  }
6846
6855
  }
6847
6856
  };
6848
- k([_(), O("design:type", Object)], Ri.prototype, "fillWithShape", void 0);
6857
+ k([_(), O("design:type", Object)], zi.prototype, "fillWithShape", void 0);
6849
6858
  //#endregion
6850
6859
  //#region src/scene/2d/element/Element2DChart.ts
6851
- var zi;
6852
- function Bi() {
6853
- return zi ||= import("echarts").then((e) => e?.init ? e : e?.default).catch(() => void 0), zi;
6860
+ var Bi;
6861
+ function Vi() {
6862
+ return Bi ||= import("echarts").then((e) => e?.init ? e : e?.default).catch(() => void 0), Bi;
6854
6863
  }
6855
- function Vi(e) {
6864
+ function Hi(e) {
6856
6865
  if (!e) return { show: !1 };
6857
6866
  switch (e) {
6858
6867
  case "bottom": return {
@@ -6875,7 +6884,7 @@ function Vi(e) {
6875
6884
  };
6876
6885
  }
6877
6886
  }
6878
- var Hi = class extends w {
6887
+ var Ui = class extends w {
6879
6888
  _parent;
6880
6889
  _instance;
6881
6890
  _container;
@@ -6918,7 +6927,7 @@ var Hi = class extends w {
6918
6927
  this._teardown(), this._parent.requestDraw();
6919
6928
  return;
6920
6929
  }
6921
- let n = await Bi();
6930
+ let n = await Vi();
6922
6931
  if (!n) {
6923
6932
  console.warn("[modern-canvas] chart rendering requires the optional \"echarts\" dependency (e.g. `pnpm add echarts`)"), this._renderPlaceholder(e, t);
6924
6933
  return;
@@ -6943,7 +6952,7 @@ var Hi = class extends w {
6943
6952
  }), this._instance.setOption(this._toOption(), !0), !this._texture) {
6944
6953
  let e = this._container.querySelector("canvas");
6945
6954
  if (!e) return;
6946
- this._texture = new gr({
6955
+ this._texture = new _r({
6947
6956
  source: e,
6948
6957
  pixelRatio: 1
6949
6958
  });
@@ -6956,7 +6965,7 @@ var Hi = class extends w {
6956
6965
  let n = document.createElement("canvas");
6957
6966
  n.width = Math.ceil(e), n.height = Math.ceil(t);
6958
6967
  let r = n.getContext("2d");
6959
- r && (r.fillStyle = "#f3f4f6", r.fillRect(0, 0, e, t), r.strokeStyle = "#d1d5db", r.setLineDash([6, 4]), r.strokeRect(1, 1, e - 2, t - 2), r.fillStyle = "#9ca3af", r.font = "14px sans-serif", r.textAlign = "center", r.textBaseline = "middle", r.fillText("图表需安装 echarts", e / 2, t / 2), this._texture ? this._texture.source = n : this._texture = new gr({
6968
+ r && (r.fillStyle = "#f3f4f6", r.fillRect(0, 0, e, t), r.strokeStyle = "#d1d5db", r.setLineDash([6, 4]), r.strokeRect(1, 1, e - 2, t - 2), r.fillStyle = "#9ca3af", r.font = "14px sans-serif", r.textAlign = "center", r.textBaseline = "middle", r.fillText("图表需安装 echarts", e / 2, t / 2), this._texture ? this._texture.source = n : this._texture = new _r({
6960
6969
  source: n,
6961
6970
  pixelRatio: 1
6962
6971
  }), this._texture.requestUpdate("source"), this._parent.requestDraw());
@@ -6977,7 +6986,7 @@ var Hi = class extends w {
6977
6986
  text: this.title,
6978
6987
  left: "center"
6979
6988
  } : void 0,
6980
- legend: Vi(this.legend),
6989
+ legend: Hi(this.legend),
6981
6990
  tooltip: {}
6982
6991
  };
6983
6992
  if (n) {
@@ -7021,10 +7030,10 @@ var Hi = class extends w {
7021
7030
  this._teardown();
7022
7031
  }
7023
7032
  };
7024
- k([_({ fallback: !0 }), O("design:type", Boolean)], Hi.prototype, "enabled", void 0), k([_({ fallback: "column" }), O("design:type", Object)], Hi.prototype, "type", void 0), k([_(), O("design:type", Object)], Hi.prototype, "grouping", void 0), k([_({ fallback: () => [] }), O("design:type", Object)], Hi.prototype, "categories", void 0), k([_({ fallback: () => [] }), O("design:type", Object)], Hi.prototype, "series", void 0), k([_(), O("design:type", Object)], Hi.prototype, "title", void 0), k([_(), O("design:type", Object)], Hi.prototype, "legend", void 0), k([_(), O("design:type", Object)], Hi.prototype, "categoryAxis", void 0), k([_(), O("design:type", Object)], Hi.prototype, "valueAxis", void 0);
7033
+ k([_({ fallback: !0 }), O("design:type", Boolean)], Ui.prototype, "enabled", void 0), k([_({ fallback: "column" }), O("design:type", Object)], Ui.prototype, "type", void 0), k([_(), O("design:type", Object)], Ui.prototype, "grouping", void 0), k([_({ fallback: () => [] }), O("design:type", Object)], Ui.prototype, "categories", void 0), k([_({ fallback: () => [] }), O("design:type", Object)], Ui.prototype, "series", void 0), k([_(), O("design:type", Object)], Ui.prototype, "title", void 0), k([_(), O("design:type", Object)], Ui.prototype, "legend", void 0), k([_(), O("design:type", Object)], Ui.prototype, "categoryAxis", void 0), k([_(), O("design:type", Object)], Ui.prototype, "valueAxis", void 0);
7025
7034
  //#endregion
7026
7035
  //#region src/scene/2d/element/Element2DComments.ts
7027
- var Ui = class extends w {
7036
+ var Wi = class extends w {
7028
7037
  parent;
7029
7038
  constructor(e) {
7030
7039
  super(), this.parent = e;
@@ -7058,12 +7067,12 @@ var Ui = class extends w {
7058
7067
  isValid() {
7059
7068
  return Object.values(this._properties).some(Boolean);
7060
7069
  }
7061
- }, Wi = 8, Gi = class extends w {
7070
+ }, Gi = 8, Ki = class extends w {
7062
7071
  _parent;
7063
7072
  _routeSig;
7064
7073
  _routePath;
7065
7074
  _keyTargets = [void 0, void 0];
7066
- _routeKey = Array.from({ length: Wi * 2 }, () => NaN);
7075
+ _routeKey = Array.from({ length: Gi * 2 }, () => NaN);
7067
7076
  _keyMode;
7068
7077
  _keyAnchors = [
7069
7078
  void 0,
@@ -7119,14 +7128,14 @@ var Ui = class extends w {
7119
7128
  _writeKey(e, t) {
7120
7129
  let n = this._routeKey;
7121
7130
  if (!e) {
7122
- n.fill(-1, t, t + Wi);
7131
+ n.fill(-1, t, t + Gi);
7123
7132
  return;
7124
7133
  }
7125
7134
  let r = e.globalAabb;
7126
7135
  n[t] = e.transformDirtyId ?? -1, n[t + 1] = e.size?.x ?? -1, n[t + 2] = e.size?.y ?? -1, n[t + 3] = e.shape?.connectionPointsDirtyId ?? -1, n[t + 4] = r?.min.x ?? -1, n[t + 5] = r?.min.y ?? -1, n[t + 6] = r?.size.x ?? -1, n[t + 7] = r?.size.y ?? -1;
7127
7136
  }
7128
7137
  _storeKey(e, t) {
7129
- this._writeKey(e, 0), this._writeKey(t, Wi), this._keyTargets[0] = e, this._keyTargets[1] = t, this._keyMode = this.mode, this._keyAnchors[0] = this.start?.id, this._keyAnchors[1] = this.start?.idx, this._keyAnchors[2] = this.end?.id, this._keyAnchors[3] = this.end?.idx, this._keyRevision = dt(), this._keyValid = !0;
7138
+ this._writeKey(e, 0), this._writeKey(t, Gi), this._keyTargets[0] = e, this._keyTargets[1] = t, this._keyMode = this.mode, this._keyAnchors[0] = this.start?.id, this._keyAnchors[1] = this.start?.idx, this._keyAnchors[2] = this.end?.id, this._keyAnchors[3] = this.end?.idx, this._keyRevision = dt(), this._keyValid = !0;
7130
7139
  }
7131
7140
  resolveAnchor(e) {
7132
7141
  return this.resolveEndpoint(e)?.point;
@@ -7147,12 +7156,12 @@ var Ui = class extends w {
7147
7156
  let n = t.shape.connectionPoints?.find((t) => t.idx === e.idx);
7148
7157
  if (n) {
7149
7158
  let e = t.globalTransform.apply(new y(n.x * t.size.x, n.y * t.size.y)), i;
7150
- return i = n.ang === void 0 ? Gr(n.x - .5, n.y - .5) : {
7159
+ return i = n.ang === void 0 ? Kr(n.x - .5, n.y - .5) : {
7151
7160
  x: Math.cos(n.ang),
7152
7161
  y: Math.sin(n.ang)
7153
7162
  }, {
7154
7163
  point: e,
7155
- dir: Ki(i, t.globalRotation),
7164
+ dir: qi(i, t.globalRotation),
7156
7165
  bbox: r
7157
7166
  };
7158
7167
  }
@@ -7172,18 +7181,18 @@ var Ui = class extends w {
7172
7181
  if (this._keyValid && this._keyRevision === dt() && this._anchorsMatch()) return this._routePath;
7173
7182
  this._refreshTargets();
7174
7183
  let e = this._startTarget, t = this._endTarget;
7175
- if (this._keyValid && this._anchorsMatch() && e === this._keyTargets[0] && t === this._keyTargets[1] && this._keyMatches(e, 0) && this._keyMatches(t, Wi)) return this._keyRevision = dt(), this._routePath;
7184
+ if (this._keyValid && this._anchorsMatch() && e === this._keyTargets[0] && t === this._keyTargets[1] && this._keyMatches(e, 0) && this._keyMatches(t, Gi)) return this._keyRevision = dt(), this._routePath;
7176
7185
  let n = this.resolveEndpoint(this.start, e), r = this.resolveEndpoint(this.end, t);
7177
7186
  if (this._storeKey(e, t), !n && !r) {
7178
7187
  this._routeSig = void 0, this._routePath = void 0;
7179
7188
  return;
7180
7189
  }
7181
7190
  let i = (e) => e ? `${e.point.x},${e.point.y},${e.dir?.x ?? ""},${e.dir?.y ?? ""}` : "-", a = `${this.mode}|${i(n)}|${i(r)}`;
7182
- return (a !== this._routeSig || !this._routePath) && (this._routeSig = a, this._routePath = Kr(this.mode, n ?? r, r ?? n)), this._routePath;
7191
+ return (a !== this._routeSig || !this._routePath) && (this._routeSig = a, this._routePath = qr(this.mode, n ?? r, r ?? n)), this._routePath;
7183
7192
  }
7184
7193
  };
7185
- k([_(), O("design:type", Object)], Gi.prototype, "start", void 0), k([_(), O("design:type", Object)], Gi.prototype, "end", void 0), k([_({ fallback: "straight" }), O("design:type", Object)], Gi.prototype, "mode", void 0), k([_({ fallback: .5 }), O("design:type", Number)], Gi.prototype, "labelPosition", void 0);
7186
- function Ki(e, t) {
7194
+ k([_(), O("design:type", Object)], Ki.prototype, "start", void 0), k([_(), O("design:type", Object)], Ki.prototype, "end", void 0), k([_({ fallback: "straight" }), O("design:type", Object)], Ki.prototype, "mode", void 0), k([_({ fallback: .5 }), O("design:type", Number)], Ki.prototype, "labelPosition", void 0);
7195
+ function qi(e, t) {
7187
7196
  if (!t) return e;
7188
7197
  let n = Math.cos(t), r = Math.sin(t);
7189
7198
  return {
@@ -7193,7 +7202,7 @@ function Ki(e, t) {
7193
7202
  }
7194
7203
  //#endregion
7195
7204
  //#region src/scene/2d/element/Element2DForeground.ts
7196
- var qi = class extends Y {
7205
+ var Ji = class extends Y {
7197
7206
  setProperties(e) {
7198
7207
  return super._setProperties(d(e) ? void 0 : ee(e));
7199
7208
  }
@@ -7201,14 +7210,14 @@ var qi = class extends Y {
7201
7210
  super._updateProperty(e, t, n), e === "fillWithShape" && this._parent.requestDraw();
7202
7211
  }
7203
7212
  };
7204
- k([_(), O("design:type", Object)], qi.prototype, "fillWithShape", void 0);
7213
+ k([_(), O("design:type", Object)], Ji.prototype, "fillWithShape", void 0);
7205
7214
  //#endregion
7206
7215
  //#region src/scene/2d/element/Element2DOutline.ts
7207
- var Ji = {
7216
+ var Yi = {
7208
7217
  sm: 4,
7209
7218
  md: 6,
7210
7219
  lg: 8
7211
- }, Yi = class extends Y {
7220
+ }, Xi = class extends Y {
7212
7221
  setProperties(e) {
7213
7222
  return super._setProperties(d(e) ? void 0 : te(e));
7214
7223
  }
@@ -7235,7 +7244,7 @@ var Ji = {
7235
7244
  }
7236
7245
  draw() {
7237
7246
  let { width: e, height: t } = this._parent.size, n = this._parent.context;
7238
- this.image === "viewport" ? n.strokeStyle = new Tr() : n.strokeStyle = this.texture ?? this._resolveThemeColor(this.color) ?? "#000000FF", n.lineWidth = (this.width || 1) * (this.widthBoost || 1), n.lineCap = this.lineCap, n.lineJoin = this.lineJoin, n.lineFlow = this.flow, n.stroke({ ...Li(this, {
7247
+ this.image === "viewport" ? n.strokeStyle = new Er() : n.strokeStyle = this.texture ?? this._resolveThemeColor(this.color) ?? "#000000FF", n.lineWidth = (this.width || 1) * (this.widthBoost || 1), n.lineCap = this.lineCap, n.lineJoin = this.lineJoin, n.lineFlow = this.flow, n.stroke({ ...Ri(this, {
7239
7248
  x: 0,
7240
7249
  y: 0,
7241
7250
  width: e,
@@ -7258,7 +7267,7 @@ var Ji = {
7258
7267
  _fillEnd(e, t, n, r, i) {
7259
7268
  let a = e.x - t.x, o = e.y - t.y, s = Math.hypot(a, o);
7260
7269
  if (s < .001) return;
7261
- let c = a / s, l = o / s, u = Ji[String(n.width ?? n.height ?? "md")] ?? 6, d = this._parent.context, f = this._resolveThemeColor(n.color) ?? i;
7270
+ let c = a / s, l = o / s, u = Yi[String(n.width ?? n.height ?? "md")] ?? 6, d = this._parent.context, f = this._resolveThemeColor(n.color) ?? i;
7262
7271
  if (n.type === "bar") {
7263
7272
  let t = r * u * .6, n = Math.max(r * .9, 1.5), i = 0, a = 0;
7264
7273
  Math.abs(c) >= Math.abs(l) ? i = Math.sign(c) || 1 : a = Math.sign(l) || 1;
@@ -7270,10 +7279,10 @@ var Ji = {
7270
7279
  d.fillStyle = f, d.moveTo(e.x, e.y).lineTo(h + ee, g + te).lineTo(h - ee, g - te).closePath().fill();
7271
7280
  }
7272
7281
  };
7273
- k([_(), O("design:type", Object)], Yi.prototype, "color", void 0), k([_(), O("design:type", Object)], Yi.prototype, "width", void 0), k([_({ fallback: "solid" }), O("design:type", Object)], Yi.prototype, "style", void 0), k([_({ fallback: "butt" }), O("design:type", Object)], Yi.prototype, "lineCap", void 0), k([_({ fallback: "miter" }), O("design:type", Object)], Yi.prototype, "lineJoin", void 0), k([_(), O("design:type", Object)], Yi.prototype, "headEnd", void 0), k([_(), O("design:type", Object)], Yi.prototype, "tailEnd", void 0), k([_({ internal: !0 }), O("design:type", Number)], Yi.prototype, "flow", void 0), k([_({ internal: !0 }), O("design:type", Number)], Yi.prototype, "widthBoost", void 0);
7282
+ k([_(), O("design:type", Object)], Xi.prototype, "color", void 0), k([_(), O("design:type", Object)], Xi.prototype, "width", void 0), k([_({ fallback: "solid" }), O("design:type", Object)], Xi.prototype, "style", void 0), k([_({ fallback: "butt" }), O("design:type", Object)], Xi.prototype, "lineCap", void 0), k([_({ fallback: "miter" }), O("design:type", Object)], Xi.prototype, "lineJoin", void 0), k([_(), O("design:type", Object)], Xi.prototype, "headEnd", void 0), k([_(), O("design:type", Object)], Xi.prototype, "tailEnd", void 0), k([_({ internal: !0 }), O("design:type", Number)], Xi.prototype, "flow", void 0), k([_({ internal: !0 }), O("design:type", Number)], Xi.prototype, "widthBoost", void 0);
7274
7283
  //#endregion
7275
7284
  //#region src/scene/2d/element/Element2DShadow.ts
7276
- var Xi = class extends w {
7285
+ var Zi = class extends w {
7277
7286
  _parent;
7278
7287
  constructor(e) {
7279
7288
  super(), this._parent = e;
@@ -7294,13 +7303,13 @@ var Xi = class extends w {
7294
7303
  }
7295
7304
  updateEffect() {
7296
7305
  let e = "__$shadow", t = this._parent.getNode(e);
7297
- this.enabled && (this.blur || this.offsetX || this.offsetY) ? (t || (t = new vi({ name: e }), this._parent.appendChild(t, "back")), t.setProperties(this.getProperties())) : t && this._parent.removeChild(t);
7306
+ this.enabled && (this.blur || this.offsetX || this.offsetY) ? (t || (t = new yi({ name: e }), this._parent.appendChild(t, "back")), t.setProperties(this.getProperties())) : t && this._parent.removeChild(t);
7298
7307
  }
7299
7308
  };
7300
- k([_({ fallback: !0 }), O("design:type", Boolean)], Xi.prototype, "enabled", void 0), k([_({ fallback: "#000000FF" }), O("design:type", Object)], Xi.prototype, "color", void 0), k([_({ fallback: 0 }), O("design:type", Object)], Xi.prototype, "blur", void 0), k([_({ fallback: 0 }), O("design:type", Object)], Xi.prototype, "offsetY", void 0), k([_({ fallback: 0 }), O("design:type", Object)], Xi.prototype, "offsetX", void 0);
7309
+ k([_({ fallback: !0 }), O("design:type", Boolean)], Zi.prototype, "enabled", void 0), k([_({ fallback: "#000000FF" }), O("design:type", Object)], Zi.prototype, "color", void 0), k([_({ fallback: 0 }), O("design:type", Object)], Zi.prototype, "blur", void 0), k([_({ fallback: 0 }), O("design:type", Object)], Zi.prototype, "offsetY", void 0), k([_({ fallback: 0 }), O("design:type", Object)], Zi.prototype, "offsetX", void 0);
7301
7310
  //#endregion
7302
7311
  //#region src/scene/2d/element/Element2DShape.ts
7303
- var Zi = class extends w {
7312
+ var Qi = class extends w {
7304
7313
  _parent;
7305
7314
  connectionPointsDirtyId = 0;
7306
7315
  _path2DSet = new de();
@@ -7403,24 +7412,24 @@ var Zi = class extends w {
7403
7412
  t && n && (r ? e.roundRect(0, 0, t, n, r) : e.rect(0, 0, t, n));
7404
7413
  }
7405
7414
  };
7406
- k([_({ fallback: !0 }), O("design:type", Boolean)], Zi.prototype, "enabled", void 0), k([_(), O("design:type", Object)], Zi.prototype, "preset", void 0), k([_(), O("design:type", Object)], Zi.prototype, "svg", void 0), k([_(), O("design:type", Object)], Zi.prototype, "viewBox", void 0), k([_(), O("design:type", Object)], Zi.prototype, "paths", void 0), k([_(), O("design:type", Object)], Zi.prototype, "connectionPoints", void 0);
7415
+ k([_({ fallback: !0 }), O("design:type", Boolean)], Qi.prototype, "enabled", void 0), k([_(), O("design:type", Object)], Qi.prototype, "preset", void 0), k([_(), O("design:type", Object)], Qi.prototype, "svg", void 0), k([_(), O("design:type", Object)], Qi.prototype, "viewBox", void 0), k([_(), O("design:type", Object)], Qi.prototype, "paths", void 0), k([_(), O("design:type", Object)], Qi.prototype, "connectionPoints", void 0);
7407
7416
  //#endregion
7408
7417
  //#region src/scene/2d/element/Element2DStyle.ts
7409
- var Qi = class extends Ct {
7418
+ var $i = class extends Ct {
7410
7419
  constructor(e) {
7411
7420
  super(), this.setProperties(e);
7412
7421
  }
7413
- }, $i = {
7422
+ }, ea = {
7414
7423
  ...o(),
7415
7424
  left: 0,
7416
7425
  top: 0,
7417
7426
  width: 0,
7418
7427
  height: 0
7419
7428
  };
7420
- for (let e in $i) i(Qi, e, { fallback: $i[e] });
7429
+ for (let e in ea) i($i, e, { fallback: ea[e] });
7421
7430
  //#endregion
7422
7431
  //#region src/scene/2d/element/Element2DTable.ts
7423
- var ea = 100, ta = 40, na = class extends w {
7432
+ var ta = 100, na = 40, ra = class extends w {
7424
7433
  _parent;
7425
7434
  _cellNodes = /* @__PURE__ */ new Map();
7426
7435
  _cellSnapshots = /* @__PURE__ */ new Map();
@@ -7451,10 +7460,10 @@ var ea = 100, ta = 40, na = class extends w {
7451
7460
  return !!(this.enabled && this.cells.length);
7452
7461
  }
7453
7462
  get gridWidth() {
7454
- return this.columns.reduce((e, t) => e + (t.width || ea), 0);
7463
+ return this.columns.reduce((e, t) => e + (t.width || ta), 0);
7455
7464
  }
7456
7465
  get gridHeight() {
7457
- return this.rows.reduce((e, t) => e + (t.height || ta), 0);
7466
+ return this.rows.reduce((e, t) => e + (t.height || na), 0);
7458
7467
  }
7459
7468
  update() {
7460
7469
  if (this._dirty = !1, !this.isValid()) {
@@ -7464,9 +7473,9 @@ var ea = 100, ta = 40, na = class extends w {
7464
7473
  let { columns: e, rows: t, cells: n } = this, r = e.length, i = t.length;
7465
7474
  for (let e of n) r = Math.max(r, e.col + (e.colSpan || 1)), i = Math.max(i, e.row + (e.rowSpan || 1));
7466
7475
  let a = [0];
7467
- for (let t = 0; t < r; t++) a.push(a[t] + (e[t]?.width || ea));
7476
+ for (let t = 0; t < r; t++) a.push(a[t] + (e[t]?.width || ta));
7468
7477
  let o = [0];
7469
- for (let e = 0; e < i; e++) o.push(o[e] + (t[e]?.height || ta));
7478
+ for (let e = 0; e < i; e++) o.push(o[e] + (t[e]?.height || na));
7470
7479
  this._parent.size.set(a[e.length] ?? 0, o[t.length] ?? 0);
7471
7480
  let s = /* @__PURE__ */ new Set();
7472
7481
  for (let e of n) {
@@ -7503,19 +7512,19 @@ var ea = 100, ta = 40, na = class extends w {
7503
7512
  this._clearCells();
7504
7513
  }
7505
7514
  };
7506
- k([_({ fallback: !0 }), O("design:type", Boolean)], na.prototype, "enabled", void 0), k([_({ fallback: () => [] }), O("design:type", Object)], na.prototype, "columns", void 0), k([_({ fallback: () => [] }), O("design:type", Object)], na.prototype, "rows", void 0), k([_({ fallback: () => [] }), O("design:type", Object)], na.prototype, "cells", void 0);
7515
+ k([_({ fallback: !0 }), O("design:type", Boolean)], ra.prototype, "enabled", void 0), k([_({ fallback: () => [] }), O("design:type", Object)], ra.prototype, "columns", void 0), k([_({ fallback: () => [] }), O("design:type", Object)], ra.prototype, "rows", void 0), k([_({ fallback: () => [] }), O("design:type", Object)], ra.prototype, "cells", void 0);
7507
7516
  //#endregion
7508
7517
  //#region src/scene/2d/element/Element2DText.ts
7509
- var ra = 2, ia = 64, aa = 0;
7510
- function oa() {
7511
- if (aa) return aa;
7518
+ var ia = 2, aa = 64, oa = 0;
7519
+ function sa() {
7520
+ if (oa) return oa;
7512
7521
  try {
7513
7522
  let e = C(), t = e.getContext("webgl2") || e.getContext("webgl");
7514
- aa = t && t.getParameter(t.MAX_TEXTURE_SIZE) || 4096;
7523
+ oa = t && t.getParameter(t.MAX_TEXTURE_SIZE) || 4096;
7515
7524
  } catch {
7516
- aa = 4096;
7525
+ oa = 4096;
7517
7526
  }
7518
- return aa;
7527
+ return oa;
7519
7528
  }
7520
7529
  var X = class extends w {
7521
7530
  _parent;
@@ -7530,11 +7539,11 @@ var X = class extends w {
7530
7539
  _autoDrawMode;
7531
7540
  _atlasEligible = !1;
7532
7541
  _textureStale = !0;
7533
- _texture = new gr({ mipmap: !0 });
7542
+ _texture = new _r({ mipmap: !0 });
7534
7543
  _tiles = [];
7535
7544
  _textureMap = /* @__PURE__ */ new Map();
7536
7545
  constructor(e) {
7537
- super(), this._parent = e, this.base = Mt(new ve()), this.base.setPropertyAccessor(this);
7546
+ super(), this._parent = e, this.base = Nt(new ve()), this.base.setPropertyAccessor(this);
7538
7547
  }
7539
7548
  setProperties(e) {
7540
7549
  return super.setProperties(d(e) ? void 0 : ae(e));
@@ -7604,7 +7613,7 @@ var X = class extends w {
7604
7613
  }
7605
7614
  _rasterTexture() {
7606
7615
  this._resolveBaseThemeColors();
7607
- let e = Math.ceil(this.base.boundingBox.width), t = Math.ceil(this.base.boundingBox.height), n = ra, r = Math.floor((oa() - ia) / n);
7616
+ let e = Math.ceil(this.base.boundingBox.width), t = Math.ceil(this.base.boundingBox.height), n = ia, r = Math.floor((sa() - aa) / n);
7608
7617
  if (e <= r && t <= r) {
7609
7618
  this._releaseTiles();
7610
7619
  let r = this._texture;
@@ -7622,7 +7631,7 @@ var X = class extends w {
7622
7631
  for (let o = 0; o < a; o++) for (let a = 0; a < i; a++) {
7623
7632
  let i = a * r, c = o * r, l = Math.min(r, e - i), u = Math.min(r, t - c), d = this._tiles[s];
7624
7633
  d || (d = {
7625
- texture: new gr({ mipmap: !0 }),
7634
+ texture: new _r({ mipmap: !0 }),
7626
7635
  x: i,
7627
7636
  y: c,
7628
7637
  w: l,
@@ -7670,7 +7679,7 @@ var X = class extends w {
7670
7679
  }), this._parent.requestDraw());
7671
7680
  }
7672
7681
  async _loadTexture(e, t) {
7673
- return e.linearGradient || e.radialGradient ? new xr(e.linearGradient ?? e.radialGradient, t.width, t.height) : d(e.image) ? void 0 : (this._parent.tree?.log(`load image ${e.image}`), await $.texture.load(e.image));
7682
+ return e.linearGradient || e.radialGradient ? new Sr(e.linearGradient ?? e.radialGradient, t.width, t.height) : d(e.image) ? void 0 : (this._parent.tree?.log(`load image ${e.image}`), await $.texture.load(e.image));
7674
7683
  }
7675
7684
  setContent(e) {
7676
7685
  this.content = oe(e);
@@ -7699,7 +7708,7 @@ var X = class extends w {
7699
7708
  if (n.style.fill && !d(n.style.fill)) if (typeof n.style.fill == "object") {
7700
7709
  let r = n.style.fill, o = this._textureMap.get(`${a}.${i}.fill`) ?? this._textureMap.get(`${a}.fill`) ?? this._textureMap.get("fill");
7701
7710
  r.enabled !== !1 && (o || r.color) && (e.addPath(n), e.style = { ...n.style }, e.fillStyle = o?.texture ?? this._resolveThemeColor(r.color), e.fill({
7702
- ...Li(r, o?.box ?? {
7711
+ ...Ri(r, o?.box ?? {
7703
7712
  x: 0,
7704
7713
  y: 0,
7705
7714
  width: this._parent.size.width,
@@ -7711,7 +7720,7 @@ var X = class extends w {
7711
7720
  if (n.style.stroke && !d(n.style.stroke)) if (typeof n.style.stroke == "object") {
7712
7721
  let r = n.style.stroke, o = this._textureMap.get(`${a}.${i}.outline`) ?? this._textureMap.get(`${a}.outline`) ?? this._textureMap.get("outline");
7713
7722
  r.enabled !== !1 && (o || r.color) && (r.width === void 0 || r.width) && (e.addPath(n), e.style = { ...n.style }, e.lineWidth = r.width || 1, e.strokeStyle = o?.texture ?? this._resolveThemeColor(r.color), e.lineCap = r.lineCap, e.lineJoin = r.lineJoin, e.stroke({
7714
- ...Li(r, o?.box ?? {
7723
+ ...Ri(r, o?.box ?? {
7715
7724
  x: 0,
7716
7725
  y: 0,
7717
7726
  width: this._parent.size.width,
@@ -7747,7 +7756,7 @@ var X = class extends w {
7747
7756
  "listStyle",
7748
7757
  "highlight"
7749
7758
  ]) if (this.base.plugins.get(e)?.pathSet?.paths?.length) return !1;
7750
- let e = 2048 / br.superSample / 1.5, t = this.base.characters;
7759
+ let e = 2048 / xr.superSample / 1.5, t = this.base.characters;
7751
7760
  for (let n = 0; n < t.length; n++) {
7752
7761
  let r = t[n].computedStyle;
7753
7762
  if (typeof r.color != "string" || r.fontSize > e) return !1;
@@ -7755,7 +7764,7 @@ var X = class extends w {
7755
7764
  return !0;
7756
7765
  }
7757
7766
  _atlasDraw(e) {
7758
- let t = br, n = this.base.characters, r = /* @__PURE__ */ new Map();
7767
+ let t = xr, n = this.base.characters, r = /* @__PURE__ */ new Map();
7759
7768
  for (let e = 0; e < n.length; e++) {
7760
7769
  let i = n[e], a = i.glyphBox;
7761
7770
  if (!a || a.width <= 0 || a.height <= 0) continue;
@@ -7801,11 +7810,11 @@ var Z = {
7801
7810
  horizontal: 6,
7802
7811
  vertical: 7,
7803
7812
  all: 8
7804
- }, sa = {
7813
+ }, ca = {
7805
7814
  column: 0,
7806
7815
  row: 1,
7807
7816
  all: 2
7808
- }, ca = {
7817
+ }, la = {
7809
7818
  auto: 0,
7810
7819
  "flex-start": 1,
7811
7820
  center: 2,
@@ -7815,74 +7824,74 @@ var Z = {
7815
7824
  "space-between": 6,
7816
7825
  "space-around": 7,
7817
7826
  "space-evenly": 8
7818
- }, la = {
7827
+ }, ua = {
7819
7828
  flex: 0,
7820
7829
  none: 1,
7821
7830
  contents: 2
7822
- }, ua = {
7831
+ }, da = {
7823
7832
  inherit: 0,
7824
7833
  ltr: 1,
7825
7834
  rtl: 2
7826
- }, da = {
7835
+ }, fa = {
7827
7836
  column: 0,
7828
7837
  "column-reverse": 1,
7829
7838
  row: 2,
7830
7839
  "row-reverse": 3
7831
- }, fa = {
7840
+ }, pa = {
7832
7841
  "no-wrap": 0,
7833
7842
  wrap: 1,
7834
7843
  "Wrap-reverse": 2
7835
- }, pa = {
7844
+ }, ma = {
7836
7845
  "flex-start": 0,
7837
7846
  center: 1,
7838
7847
  "flex-end": 2,
7839
7848
  "space-between": 3,
7840
7849
  "space-around": 4,
7841
7850
  "space-evenly": 5
7842
- }, ma = {
7851
+ }, ha = {
7843
7852
  visible: 0,
7844
7853
  hidden: 1,
7845
7854
  scroll: 2
7846
- }, ha = {
7855
+ }, ga = {
7847
7856
  static: 0,
7848
7857
  relative: 1,
7849
7858
  absolute: 2
7850
- }, ga = {
7859
+ }, _a = {
7851
7860
  "border-box": 0,
7852
7861
  "content-box": 1
7853
- }, _a = class e {
7862
+ }, va = class e {
7854
7863
  _parent;
7855
7864
  static _yoga;
7856
7865
  static async load() {
7857
7866
  let { loadYoga: e } = await import("yoga-layout/load");
7858
7867
  this._yoga = await e();
7859
7868
  }
7860
- node = e._yoga ? Mt(e._yoga.Node.create()) : void 0;
7869
+ node = e._yoga ? Nt(e._yoga.Node.create()) : void 0;
7861
7870
  constructor(e) {
7862
7871
  this._parent = e, this._addChild = this._addChild.bind(this), this._removeChild = this._removeChild.bind(this), this._parent.on("addChild", this._addChild), this._parent.on("removeChild", this._removeChild);
7863
7872
  }
7864
7873
  _addChild(e, t) {
7865
- if (e instanceof Da && e.flexbox.node && this.node) {
7874
+ if (e instanceof Oa && e.flexbox.node && this.node) {
7866
7875
  this.node.insertChild(e.flexbox.node, t);
7867
7876
  let n = e.style.getProperties();
7868
7877
  for (let t in n) e.flexbox.updateStyleProperty(t, n[t]);
7869
7878
  }
7870
7879
  }
7871
7880
  _removeChild(e, t) {
7872
- e instanceof Da && e.flexbox.node && this.node && this.node.removeChild(e.flexbox.node);
7881
+ e instanceof Oa && e.flexbox.node && this.node && this.node.removeChild(e.flexbox.node);
7873
7882
  }
7874
7883
  updateStyleProperty(e, t) {
7875
7884
  let n = this.node;
7876
7885
  if (n) {
7877
7886
  switch (e) {
7878
7887
  case "alignContent":
7879
- n.setAlignContent(t ? ca[t] ?? ca["flex-start"] : ca["flex-start"]);
7888
+ n.setAlignContent(t ? la[t] ?? la["flex-start"] : la["flex-start"]);
7880
7889
  break;
7881
7890
  case "alignItems":
7882
- n.setAlignItems(t ? ca[t] ?? ca["flex-start"] : ca["flex-start"]);
7891
+ n.setAlignItems(t ? la[t] ?? la["flex-start"] : la["flex-start"]);
7883
7892
  break;
7884
7893
  case "alignSelf":
7885
- n.setAlignSelf(t ? ca[t] ?? ca["flex-start"] : ca["flex-start"]);
7894
+ n.setAlignSelf(t ? la[t] ?? la["flex-start"] : la["flex-start"]);
7886
7895
  break;
7887
7896
  case "aspectRatio":
7888
7897
  n.setAspectRatio(t);
@@ -7903,10 +7912,10 @@ var Z = {
7903
7912
  n.setBorder(Z.all, this._parent.style.borderWidth);
7904
7913
  break;
7905
7914
  case "direction":
7906
- n.setDirection(t ? ua[t] ?? ua.inherit : ua.inherit);
7915
+ n.setDirection(t ? da[t] ?? da.inherit : da.inherit);
7907
7916
  break;
7908
7917
  case "display":
7909
- n.setDisplay(t ? la[t] ?? la.flex : la.flex);
7918
+ n.setDisplay(t ? ua[t] ?? ua.flex : ua.flex);
7910
7919
  break;
7911
7920
  case "flex":
7912
7921
  n.setFlex(t);
@@ -7915,7 +7924,7 @@ var Z = {
7915
7924
  n.setFlexBasis(t);
7916
7925
  break;
7917
7926
  case "flexDirection":
7918
- n.setFlexDirection(t ? da[t] ?? da.row : da.row);
7927
+ n.setFlexDirection(t ? fa[t] ?? fa.row : fa.row);
7919
7928
  break;
7920
7929
  case "flexGrow":
7921
7930
  n.setFlexGrow(t);
@@ -7924,16 +7933,16 @@ var Z = {
7924
7933
  n.setFlexShrink(t);
7925
7934
  break;
7926
7935
  case "flexWrap":
7927
- n.setFlexWrap(t ? fa[t] ?? fa.wrap : fa.wrap);
7936
+ n.setFlexWrap(t ? pa[t] ?? pa.wrap : pa.wrap);
7928
7937
  break;
7929
7938
  case "height":
7930
7939
  n.setHeight(t);
7931
7940
  break;
7932
7941
  case "justifyContent":
7933
- n.setJustifyContent(t ? pa[t] ?? pa["flex-start"] : pa["flex-start"]);
7942
+ n.setJustifyContent(t ? ma[t] ?? ma["flex-start"] : ma["flex-start"]);
7934
7943
  break;
7935
7944
  case "gap":
7936
- t !== void 0 && n.setGap(sa.all, t);
7945
+ t !== void 0 && n.setGap(ca.all, t);
7937
7946
  break;
7938
7947
  case "marginTop":
7939
7948
  n.setMargin(Z.top, t);
@@ -7963,7 +7972,7 @@ var Z = {
7963
7972
  n.setMinWidth(t);
7964
7973
  break;
7965
7974
  case "overflow":
7966
- n.setOverflow(t ? ma[t] ?? ma.visible : ma.visible);
7975
+ n.setOverflow(t ? ha[t] ?? ha.visible : ha.visible);
7967
7976
  break;
7968
7977
  case "paddingTop":
7969
7978
  n.setPadding(Z.top, t);
@@ -7993,10 +8002,10 @@ var Z = {
7993
8002
  n.setPosition(Z.right, t);
7994
8003
  break;
7995
8004
  case "position":
7996
- n.setPositionType(t ? ha[t] ?? ha.relative : ha.relative);
8005
+ n.setPositionType(t ? ga[t] ?? ga.relative : ga.relative);
7997
8006
  break;
7998
8007
  case "boxSizing":
7999
- n.setBoxSizing(t ? ga[t] ?? ga["content-box"] : ga["content-box"]);
8008
+ n.setBoxSizing(t ? _a[t] ?? _a["content-box"] : _a["content-box"]);
8000
8009
  break;
8001
8010
  case "width":
8002
8011
  n.setWidth(t);
@@ -8007,7 +8016,7 @@ var Z = {
8007
8016
  }
8008
8017
  update() {
8009
8018
  let e = this._parent, t = this.node;
8010
- if (e.getParent()?.flexbox?.update(), e.globalDisplay === "flex" && t && (t.isDirty() && t.calculateLayout(void 0, void 0, ua.ltr), t.hasNewLayout())) {
8019
+ if (e.getParent()?.flexbox?.update(), e.globalDisplay === "flex" && t && (t.isDirty() && t.calculateLayout(void 0, void 0, da.ltr), t.hasNewLayout())) {
8011
8020
  let { left: n, top: r, width: i, height: a } = t.getComputedLayout(), o = e.getParent()?.globalDisplay === "flex", s = o ? n : Number(e.style.left) || 0, c = o ? r : Number(e.style.top) || 0, l = o || typeof e.style.width != "number" ? i : e.style.width, u = o || typeof e.style.height != "number" ? a : e.style.height;
8012
8021
  (!Number.isNaN(s) && s !== e.position.x || !Number.isNaN(c) && c !== e.position.y) && e.position.set(s, c), !Number.isNaN(l) && !Number.isNaN(u) && (l !== e.size.x || u !== e.size.y) && e.size.set(l, u), t.markLayoutSeen();
8013
8022
  }
@@ -8015,22 +8024,22 @@ var Z = {
8015
8024
  destroy() {
8016
8025
  this.node?.free(), this.node = void 0;
8017
8026
  }
8018
- }, va = new Set(Object.keys(a())), ya = new Set(Object.keys(s())), ba = /* @__PURE__ */ new Set(["left", "top"]), xa = new y(), Sa = [
8027
+ }, ya = new Set(Object.keys(a())), ba = new Set(Object.keys(s())), xa = /* @__PURE__ */ new Set(["left", "top"]), Sa = new y(), Ca = [
8019
8028
  [0, 0],
8020
8029
  [1, 0],
8021
8030
  [1, 1],
8022
8031
  [0, 1]
8023
- ], Ca = 6, wa = 2, Ta = 24, Q = {
8032
+ ], wa = 6, Ta = 2, Ea = 24, Q = {
8024
8033
  x: 0,
8025
8034
  y: 0
8026
8035
  };
8027
- function Ea(e, t, n) {
8036
+ function Da(e, t, n) {
8028
8037
  return e < t ? t : e > n ? n : e;
8029
8038
  }
8030
- var Da = class extends Ur {
8031
- flexbox = new _a(this);
8032
- aabb = new wt();
8033
- globalAabb = new wt();
8039
+ var Oa = class extends Wr {
8040
+ flexbox = new va(this);
8041
+ aabb = new Tt();
8042
+ globalAabb = new Tt();
8034
8043
  _parentGlobalDisplay;
8035
8044
  _globalDisplay;
8036
8045
  get globalDisplay() {
@@ -8049,7 +8058,7 @@ var Da = class extends Ur {
8049
8058
  v: void 0,
8050
8059
  h: void 0
8051
8060
  };
8052
- _style = new Qi().on("updateProperty", (...e) => {
8061
+ _style = new $i().on("updateProperty", (...e) => {
8053
8062
  this.onUpdateStyleProperty(e[0], e[1], e[2]);
8054
8063
  });
8055
8064
  get style() {
@@ -8063,14 +8072,14 @@ var Da = class extends Ur {
8063
8072
  this._endBatch();
8064
8073
  }
8065
8074
  }
8066
- _background = new Ri(this);
8075
+ _background = new zi(this);
8067
8076
  get background() {
8068
8077
  return this._background;
8069
8078
  }
8070
8079
  set background(e) {
8071
8080
  this._background.resetProperties().setProperties(e);
8072
8081
  }
8073
- _shape = new Zi(this);
8082
+ _shape = new Qi(this);
8074
8083
  get shape() {
8075
8084
  return this._shape;
8076
8085
  }
@@ -8084,14 +8093,14 @@ var Da = class extends Ur {
8084
8093
  set fill(e) {
8085
8094
  this._fill.resetProperties().setProperties(e);
8086
8095
  }
8087
- _outline = new Yi(this);
8096
+ _outline = new Xi(this);
8088
8097
  get outline() {
8089
8098
  return this._outline;
8090
8099
  }
8091
8100
  set outline(e) {
8092
8101
  this._outline.resetProperties().setProperties(e);
8093
8102
  }
8094
- _foreground = new qi(this);
8103
+ _foreground = new Ji(this);
8095
8104
  get foreground() {
8096
8105
  return this._foreground;
8097
8106
  }
@@ -8105,35 +8114,35 @@ var Da = class extends Ur {
8105
8114
  set text(e) {
8106
8115
  this._text.resetProperties().setProperties(e);
8107
8116
  }
8108
- _shadow = new Xi(this);
8117
+ _shadow = new Zi(this);
8109
8118
  get shadow() {
8110
8119
  return this._shadow;
8111
8120
  }
8112
8121
  set shadow(e) {
8113
8122
  this._shadow.resetProperties().setProperties(e);
8114
8123
  }
8115
- _connection = new Gi(this);
8124
+ _connection = new Ki(this);
8116
8125
  get connection() {
8117
8126
  return this._connection;
8118
8127
  }
8119
8128
  set connection(e) {
8120
8129
  this._connection.resetProperties().setProperties(e);
8121
8130
  }
8122
- _table = new na(this);
8131
+ _table = new ra(this);
8123
8132
  get table() {
8124
8133
  return this._table;
8125
8134
  }
8126
8135
  set table(e) {
8127
8136
  this._table.resetProperties().setProperties(e);
8128
8137
  }
8129
- _chart = new Hi(this);
8138
+ _chart = new Ui(this);
8130
8139
  get chart() {
8131
8140
  return this._chart;
8132
8141
  }
8133
8142
  set chart(e) {
8134
8143
  this._chart.resetProperties().setProperties(e);
8135
8144
  }
8136
- _comments = new Ui(this);
8145
+ _comments = new Wi(this);
8137
8146
  get comments() {
8138
8147
  return this._comments;
8139
8148
  }
@@ -8229,7 +8238,7 @@ var Da = class extends Ur {
8229
8238
  this._updateGlobalDisplay();
8230
8239
  break;
8231
8240
  case "rotate":
8232
- this.rotation = (t || 0) * Tt, this.updateGlobalTransform();
8241
+ this.rotation = (t || 0) * Et, this.updateGlobalTransform();
8233
8242
  break;
8234
8243
  case "scaleX":
8235
8244
  this.scale.x = t, this.text.isValid() && (t ^ n) < 0 && this.requestDraw();
@@ -8250,7 +8259,7 @@ var Da = class extends Ur {
8250
8259
  }), this.extraTransform.translate(this.pivot.x, this.pivot.y), this.updateGlobalTransform();
8251
8260
  break;
8252
8261
  case "transformOrigin": {
8253
- let e = ei(t ?? "");
8262
+ let e = ti(t ?? "");
8254
8263
  this.pivot.set(e[0] * this.size.width, e[1] * this.size.height);
8255
8264
  break;
8256
8265
  }
@@ -8294,7 +8303,7 @@ var Da = class extends Ur {
8294
8303
  this.requestDraw();
8295
8304
  break;
8296
8305
  }
8297
- if ((ya.has(e) || va.has(e)) && !ba.has(e) && this.text.isValid() && (this._batchDepth > 0 ? this._pendingTextUpdate = !0 : this.text.update()), this.globalDisplay === "flex") this.flexbox.updateStyleProperty(e, t);
8306
+ if ((ba.has(e) || ya.has(e)) && !xa.has(e) && this.text.isValid() && (this._batchDepth > 0 ? this._pendingTextUpdate = !0 : this.text.update()), this.globalDisplay === "flex") this.flexbox.updateStyleProperty(e, t);
8298
8307
  else switch (e) {
8299
8308
  case "left":
8300
8309
  this.position.x = Number(t);
@@ -8347,10 +8356,10 @@ var Da = class extends Ur {
8347
8356
  }
8348
8357
  _intersectsViewport(e) {
8349
8358
  let t = e.canvasTransform, n = e.width, r = e.height, i = Infinity, a = -Infinity, o = Infinity, s = -Infinity;
8350
- for (let [e, c] of Sa) t.applyAffineInverse({
8359
+ for (let [e, c] of Ca) t.applyAffineInverse({
8351
8360
  x: e * n,
8352
8361
  y: c * r
8353
- }, xa), i = Math.min(i, xa.x), a = Math.max(a, xa.x), o = Math.min(o, xa.y), s = Math.max(s, xa.y);
8362
+ }, Sa), i = Math.min(i, Sa.x), a = Math.max(a, Sa.x), o = Math.min(o, Sa.y), s = Math.max(s, Sa.y);
8354
8363
  let c = a - i, l = s - o, { min: u, size: d } = this.globalAabb;
8355
8364
  return !(u.x > a + c || u.x + d.x < i - c || u.y > s + l || u.y + d.y < o - l);
8356
8365
  }
@@ -8365,13 +8374,13 @@ var Da = class extends Ur {
8365
8374
  }
8366
8375
  _applyColorFilter() {
8367
8376
  let e = [this._styleFilter, this._elementFilter].filter(Boolean).join(" ").trim();
8368
- e ? (this._colorFilterEffect || (this._colorFilterEffect = new ri({
8377
+ e ? (this._colorFilterEffect || (this._colorFilterEffect = new ii({
8369
8378
  name: "styleFilter",
8370
8379
  internalMode: "front"
8371
8380
  }), this.append(this._colorFilterEffect)), this._colorFilterEffect.filter = e) : (this._colorFilterEffect?.remove(), this._colorFilterEffect = void 0, this.requestRender());
8372
8381
  }
8373
8382
  _updateStyleMaskImage(e) {
8374
- d(e) ? (this._maskEffect?.remove(), this._maskEffect = void 0, this.requestRender()) : (this._maskEffect || (this._maskEffect = new ki({
8383
+ d(e) ? (this._maskEffect?.remove(), this._maskEffect = void 0, this.requestRender()) : (this._maskEffect || (this._maskEffect = new Ai({
8375
8384
  name: "styleMaskImage",
8376
8385
  internalMode: "back"
8377
8386
  }), this.append(this._maskEffect)), this._maskEffect.image = e);
@@ -8426,11 +8435,11 @@ var Da = class extends Ur {
8426
8435
  }
8427
8436
  getObb() {
8428
8437
  let e = this.pivot, t = this.transform.apply(e).sub(e);
8429
- return new Ot(this._getPointArray().map((e) => (e.x += t.x, e.y += t.y, e)), this.rotation);
8438
+ return new kt(this._getPointArray().map((e) => (e.x += t.x, e.y += t.y, e)), this.rotation);
8430
8439
  }
8431
8440
  getGlobalObb() {
8432
8441
  let e = this.pivot, t = this.globalScale, n = this.globalTransform.apply(e).sub(e);
8433
- return new Ot(this._getPointArray().map((r) => ({
8442
+ return new kt(this._getPointArray().map((r) => ({
8434
8443
  x: e.x + (r.x - e.x) * t.x + n.x,
8435
8444
  y: e.y + (r.y - e.y) * t.y + n.y
8436
8445
  })), this.globalRotation);
@@ -8478,9 +8487,9 @@ var Da = class extends Ur {
8478
8487
  if (!n) return;
8479
8488
  let r = n.x.max > n.x.min, i = n.y.max > n.y.min;
8480
8489
  if (!r && !i) return;
8481
- let a = this.globalAabb, o = Ca / e, s = Ca / t, c = wa / e, l = wa / t, u = this.contentOffset, d = {};
8490
+ let a = this.globalAabb, o = wa / e, s = wa / t, c = Ta / e, l = Ta / t, u = this.contentOffset, d = {};
8482
8491
  if (i) {
8483
- let e = a.size.y - l * 2 - (r ? s + l : 0), i = Math.max(Ta / t, Math.min(e, e * this.size.height / n.content.h)), f = n.y.max - n.y.min, p = f > 0 ? (u.y - n.y.min) / f : 0;
8492
+ let e = a.size.y - l * 2 - (r ? s + l : 0), i = Math.max(Ea / t, Math.min(e, e * this.size.height / n.content.h)), f = n.y.max - n.y.min, p = f > 0 ? (u.y - n.y.min) / f : 0;
8484
8493
  d.v = {
8485
8494
  x: a.min.x + a.size.x - c - o,
8486
8495
  y: a.min.y + l + p * (e - i),
@@ -8492,7 +8501,7 @@ var Da = class extends Ur {
8492
8501
  };
8493
8502
  }
8494
8503
  if (r) {
8495
- let t = a.size.x - c * 2 - (i ? o + c : 0), r = Math.max(Ta / e, Math.min(t, t * this.size.width / n.content.w)), f = n.x.max - n.x.min, p = f > 0 ? (u.x - n.x.min) / f : 0;
8504
+ let t = a.size.x - c * 2 - (i ? o + c : 0), r = Math.max(Ea / e, Math.min(t, t * this.size.width / n.content.w)), f = n.x.max - n.x.min, p = f > 0 ? (u.x - n.x.min) / f : 0;
8496
8505
  d.h = {
8497
8506
  x: a.min.x + c + p * (t - r),
8498
8507
  y: a.min.y + a.size.y - l - s,
@@ -8548,7 +8557,7 @@ var Da = class extends Ur {
8548
8557
  2,
8549
8558
  3
8550
8559
  ]),
8551
- texture: _r.get("#000000"),
8560
+ texture: vr.get("#000000"),
8552
8561
  modulate: [
8553
8562
  255,
8554
8563
  255,
@@ -8565,7 +8574,7 @@ var Da = class extends Ur {
8565
8574
  let r = this._scrollbarDrag;
8566
8575
  if (t === "pointermove") {
8567
8576
  let t = r.axis === "y" ? n.screenY : n.screenX;
8568
- return r.travel > 0 && (this.contentOffset[r.axis] = Ea(r.startOffset + (t - r.startScreen) / r.travel * r.span, r.min, r.min + r.span)), e.stopPropagation(), !0;
8577
+ return r.travel > 0 && (this.contentOffset[r.axis] = Da(r.startOffset + (t - r.startScreen) / r.travel * r.span, r.min, r.min + r.span)), e.stopPropagation(), !0;
8569
8578
  }
8570
8579
  return t === "pointerup" ? (this._scrollbarDrag = void 0, e.stopPropagation(), !0) : !1;
8571
8580
  }
@@ -8654,10 +8663,10 @@ var Da = class extends Ur {
8654
8663
  super._destroy(), this.flexbox.destroy(), this.aabb.destroy(), this.globalAabb.destroy(), this.size.destroy(), this.style.destroy(), this.background.destroy(), this.shape.destroy(), this.fill.destroy(), this.outline.destroy(), this.text.destroy(), this.foreground.destroy(), this.shadow.destroy(), this.connection.destroy(), this.comments.destroy(), this._colorFilterEffect = void 0, this._maskEffect = void 0;
8655
8664
  }
8656
8665
  };
8657
- Da = k([x("Element2D"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Da);
8666
+ Oa = k([x("Element2D"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Oa);
8658
8667
  //#endregion
8659
8668
  //#region src/scene/2d/TextureRect2D.ts
8660
- var Oa = class extends Da {
8669
+ var ka = class extends Oa {
8661
8670
  texture;
8662
8671
  region;
8663
8672
  constructor(e, t = []) {
@@ -8680,8 +8689,8 @@ var Oa = class extends Da {
8680
8689
  } });
8681
8690
  }
8682
8691
  }
8683
- }, ka = class extends Oa {
8684
- texture = new gr();
8692
+ }, Aa = class extends ka {
8693
+ texture = new _r();
8685
8694
  animation;
8686
8695
  _lastTime = NaN;
8687
8696
  constructor(e, t = []) {
@@ -8711,10 +8720,10 @@ var Oa = class extends Da {
8711
8720
  this.currentTime !== this._lastTime && (this._lastTime = this.currentTime, this.animation?.goToAndStop(this.currentTime, !1), this.texture.requestUpdate("source"), this.requestDraw()), super._process(e);
8712
8721
  }
8713
8722
  };
8714
- k([_({ fallback: "" }), O("design:type", String)], ka.prototype, "src", void 0), ka = k([x("Lottie2D"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], ka);
8723
+ k([_({ fallback: "" }), O("design:type", String)], Aa.prototype, "src", void 0), Aa = k([x("Lottie2D"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Aa);
8715
8724
  //#endregion
8716
8725
  //#region src/scene/2d/Mesh2D.ts
8717
- var Aa = class extends Da {
8726
+ var ja = class extends Oa {
8718
8727
  texture;
8719
8728
  _vertices = /* @__PURE__ */ new Float32Array();
8720
8729
  _uvs = /* @__PURE__ */ new Float32Array();
@@ -8745,7 +8754,7 @@ var Aa = class extends Da {
8745
8754
  _drawContent() {
8746
8755
  this.texture?.isValid() && this._indices.length && this._vertices.length && (this.context.fillStyle = this.texture, this.context.drawMesh(this._vertices, this._uvs, this._indices));
8747
8756
  }
8748
- }, ja = class extends Da {
8757
+ }, Ma = class extends Oa {
8749
8758
  constructor(e, t = []) {
8750
8759
  super(), this.setProperties(e).append(t);
8751
8760
  }
@@ -8768,10 +8777,10 @@ var Aa = class extends Da {
8768
8777
  this.context.rect(0, 0, e, t), this.context.strokeStyle = "#00FF00", this.context.stroke(), this._drawCircle(0, 0), this._drawCircle(e, t), this._drawCircle(0, t), this._drawEllipse(0, t / 2), this._drawCircle(e, 0), this._drawEllipse(e, t / 2);
8769
8778
  }
8770
8779
  };
8771
- k([_({ fallback: 6 }), O("design:type", Number)], ja.prototype, "handleSize", void 0);
8780
+ k([_({ fallback: 6 }), O("design:type", Number)], Ma.prototype, "handleSize", void 0);
8772
8781
  //#endregion
8773
8782
  //#region src/scene/2d/Video2D.ts
8774
- var Ma = class extends Oa {
8783
+ var Na = class extends ka {
8775
8784
  get videoDuration() {
8776
8785
  return (this.texture?.duration ?? 0) * 1e3;
8777
8786
  }
@@ -8820,15 +8829,15 @@ var Ma = class extends Oa {
8820
8829
  super._process(e), this._updateVideoCurrentTime();
8821
8830
  }
8822
8831
  };
8823
- k([_({ fallback: "" }), O("design:type", String)], Ma.prototype, "src", void 0), k([_({ fallback: !0 }), O("design:type", Boolean)], Ma.prototype, "loop", void 0), Ma = k([x("Video2D"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Ma);
8832
+ k([_({ fallback: "" }), O("design:type", String)], Na.prototype, "src", void 0), k([_({ fallback: !0 }), O("design:type", Boolean)], Na.prototype, "loop", void 0), Na = k([x("Video2D"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Na);
8824
8833
  //#endregion
8825
8834
  //#region src/scene/animation/Animation.ts
8826
- function Na(e) {
8835
+ function Pa(e) {
8827
8836
  if (e == null) return 0;
8828
8837
  let t = String(e).trim(), n = Number.parseFloat(t);
8829
8838
  return Number.isNaN(n) ? 0 : n / 100;
8830
8839
  }
8831
- function Pa(e, t) {
8840
+ function Fa(e, t) {
8832
8841
  let n = t * 180 / Math.PI;
8833
8842
  if (e == null || e === "auto") return n;
8834
8843
  let r = String(e).trim();
@@ -8837,11 +8846,11 @@ function Pa(e, t) {
8837
8846
  let i = Number.parseFloat(r);
8838
8847
  return Number.isNaN(i) ? n : i;
8839
8848
  }
8840
- function Fa(e) {
8849
+ function Ia(e) {
8841
8850
  let t = e.trim(), n = /^path\((.*)\)$/s.exec(t);
8842
8851
  return n && (t = n[1].trim()), t.length >= 2 && (t[0] === "\"" || t[0] === "'") && t[t.length - 1] === t[0] && (t = t.slice(1, -1)), t.trim();
8843
8852
  }
8844
- function Ia(e, t, n, r) {
8853
+ function La(e, t, n, r) {
8845
8854
  let i = 1e-6, a = 3 * e - 3 * n + 1, o = 3 * n - 6 * e, s = 3 * e, c = 3 * t - 3 * r + 1, l = 3 * r - 6 * t, u = 3 * t, d = (e) => (3 * a * e + 2 * o) * e + s, f = (e) => ((a * e + o) * e + s) * e, p = (e) => ((c * e + l) * e + u) * e;
8846
8855
  function m(e) {
8847
8856
  let t = e, n, r;
@@ -8861,7 +8870,7 @@ function Ia(e, t, n, r) {
8861
8870
  }
8862
8871
  return (e) => p(m(e));
8863
8872
  }
8864
- var La = {
8873
+ var Ra = {
8865
8874
  linear: [
8866
8875
  0,
8867
8876
  0,
@@ -8928,7 +8937,7 @@ var La = {
8928
8937
  .355,
8929
8938
  1
8930
8939
  ]
8931
- }, Ra = Object.fromEntries(Object.entries(La).map(([e, [t, n, r, i]]) => [e, Ia(t, n, r, i)])), za = class extends H {
8940
+ }, za = Object.fromEntries(Object.entries(Ra).map(([e, [t, n, r, i]]) => [e, La(t, n, r, i)])), Ba = class extends H {
8932
8941
  _keyframes = [];
8933
8942
  _isFirstUpdatePosition = !1;
8934
8943
  _cachedProps = new t();
@@ -8964,7 +8973,7 @@ var La = {
8964
8973
  e = [this.getParent()].filter(Boolean);
8965
8974
  break;
8966
8975
  }
8967
- return e.filter((e) => e instanceof Da);
8976
+ return e.filter((e) => e instanceof Oa);
8968
8977
  }
8969
8978
  _updateKeyframes() {
8970
8979
  this._pathMeasures.clear();
@@ -9015,14 +9024,14 @@ var La = {
9015
9024
  });
9016
9025
  }
9017
9026
  _parseEasing(e) {
9018
- if (!e) return Ra.linear;
9019
- if (e in Ra) return Ra[e];
9027
+ if (!e) return za.linear;
9028
+ if (e in za) return za[e];
9020
9029
  let t = /cubic-bezier\((.+)\)/.exec(e);
9021
9030
  if (t) {
9022
9031
  let e = t[1].split(",").map((e) => Number(e));
9023
- if (e.length === 4 && e.every((e) => !Number.isNaN(e))) return Ia(e[0], e[1], e[2], e[3]);
9032
+ if (e.length === 4 && e.every((e) => !Number.isNaN(e))) return La(e[0], e[1], e[2], e[3]);
9024
9033
  }
9025
- return Ra.linear;
9034
+ return za.linear;
9026
9035
  }
9027
9036
  _parseKeyframes(e, t) {
9028
9037
  let n, r = this._keyframes;
@@ -9057,7 +9066,7 @@ var La = {
9057
9066
  });
9058
9067
  }
9059
9068
  _commitOffsetPath(e, t, n, r, i, a) {
9060
- let o = Fa(t);
9069
+ let o = Ia(t);
9061
9070
  if (!o) return;
9062
9071
  let s = this._pathMeasures.get(o);
9063
9072
  if (!s) {
@@ -9068,7 +9077,7 @@ var La = {
9068
9077
  startY: t.y
9069
9078
  }, this._pathMeasures.set(o, s);
9070
9079
  }
9071
- let c = E(D(Na(r.offsetDistance ?? i.offsetDistance), Na(i.offsetDistance ?? r.offsetDistance), a), 0, 1), { position: l, angle: u } = s.measure.getPosTanAtProgress(c), d = l.x - s.startX, f = l.y - s.startY, p = Pa(i.offsetRotate ?? r.offsetRotate, u), m = n.get("transform");
9080
+ let c = E(D(Pa(r.offsetDistance ?? i.offsetDistance), Pa(i.offsetDistance ?? r.offsetDistance), a), 0, 1), { position: l, angle: u } = s.measure.getPosTanAtProgress(c), d = l.x - s.startX, f = l.y - s.startY, p = Fa(i.offsetRotate ?? r.offsetRotate, u), m = n.get("transform");
9072
9081
  e.onUpdateStyleProperty("transform", `${m ? `${m} ` : ""}translate(${d}px, ${f}px) rotate(${p}deg)`, void 0);
9073
9082
  }
9074
9083
  _getDiffValue(e, t, n, r, i) {
@@ -9115,14 +9124,14 @@ var La = {
9115
9124
  });
9116
9125
  }
9117
9126
  };
9118
- k([_({ fallback: "parent" }), O("design:type", Object)], za.prototype, "effectMode", void 0), k([_({ default: () => [] }), O("design:type", Array)], za.prototype, "keyframes", void 0), k([_(), O("design:type", Object)], za.prototype, "easing", void 0), za = k([x("Animation", {
9127
+ k([_({ fallback: "parent" }), O("design:type", Object)], Ba.prototype, "effectMode", void 0), k([_({ default: () => [] }), O("design:type", Array)], Ba.prototype, "keyframes", void 0), k([_(), O("design:type", Object)], Ba.prototype, "easing", void 0), Ba = k([x("Animation", {
9119
9128
  renderMode: "disabled",
9120
9129
  processSortMode: "parent-before",
9121
9130
  duration: 2e3
9122
- }), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], za);
9131
+ }), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Ba);
9123
9132
  //#endregion
9124
9133
  //#region src/scene/audio/html/HTMLAudioContext.ts
9125
- var Ba = class t extends e {
9134
+ var Va = class t extends e {
9126
9135
  static _instance;
9127
9136
  static get instance() {
9128
9137
  return this._instance ||= new t(), this._instance;
@@ -9152,7 +9161,7 @@ var Ba = class t extends e {
9152
9161
  togglePause() {
9153
9162
  return this.paused = !this.paused, this.refreshPaused(), this.paused;
9154
9163
  }
9155
- }, Va = class t extends e {
9164
+ }, Ha = class t extends e {
9156
9165
  static PADDING = .1;
9157
9166
  _source = null;
9158
9167
  _audio = null;
@@ -9279,7 +9288,7 @@ var Ba = class t extends e {
9279
9288
  let e = this._source;
9280
9289
  e && (e.onended = null, e.onplay = null, e.onpause = null, this._stop()), this._source = null, this._playbackRate = 1, this._volume = 1, this._loop = !1, this._end = 0, this._start = 0, this._duration = 0, this._playing = !1, this._pausedReal = !1, this._paused = !1, this._muted = !1, this._audio &&= (this._audio.context.off("refresh", this.refresh), this._audio.context.off("refreshPaused", this.refreshPaused), null);
9281
9290
  }
9282
- }, Ha = class {
9291
+ }, Ua = class {
9283
9292
  parent;
9284
9293
  source = new globalThis.Audio();
9285
9294
  _src = "";
@@ -9296,7 +9305,7 @@ var Ba = class t extends e {
9296
9305
  return !!this.source && this.source.readyState === 4;
9297
9306
  }
9298
9307
  get context() {
9299
- return Ba.instance;
9308
+ return Va.instance;
9300
9309
  }
9301
9310
  constructor(e) {
9302
9311
  this.parent = e;
@@ -9307,9 +9316,9 @@ var Ba = class t extends e {
9307
9316
  });
9308
9317
  }
9309
9318
  createSound() {
9310
- return new Va();
9319
+ return new Ha();
9311
9320
  }
9312
- }, Ua = class extends e {
9321
+ }, Wa = class extends e {
9313
9322
  _input;
9314
9323
  _output;
9315
9324
  _processers = [];
@@ -9331,7 +9340,7 @@ var Ba = class t extends e {
9331
9340
  get destination() {
9332
9341
  return this._input;
9333
9342
  }
9334
- }, Wa = class {
9343
+ }, Ga = class {
9335
9344
  destination;
9336
9345
  source;
9337
9346
  constructor(e, t = null) {
@@ -9346,21 +9355,21 @@ var Ba = class t extends e {
9346
9355
  };
9347
9356
  //#endregion
9348
9357
  //#region src/scene/audio/web/WebAudioContext.ts
9349
- function Ga() {
9358
+ function Ka() {
9350
9359
  if (Ue) return new AudioContext();
9351
9360
  if (We) {
9352
9361
  let e = globalThis.webkitAudioContext;
9353
9362
  return new e();
9354
9363
  } else throw Error("Failed to createAudioContext");
9355
9364
  }
9356
- function Ka(e, t, n) {
9365
+ function qa(e, t, n) {
9357
9366
  if (Ge) return new OfflineAudioContext(e, t, n);
9358
9367
  if (Ke) {
9359
9368
  let r = globalThis.webkitOfflineAudioContext;
9360
9369
  return new r(e, t, n);
9361
9370
  } else throw Error("Failed to createOfflineAudioContext");
9362
9371
  }
9363
- var qa = class e extends Ua {
9372
+ var Ja = class e extends Wa {
9364
9373
  static _instance;
9365
9374
  static get instance() {
9366
9375
  return this._instance ||= new e(), this._instance;
@@ -9401,7 +9410,7 @@ var qa = class e extends Ua {
9401
9410
  _compressor;
9402
9411
  _analyser;
9403
9412
  constructor() {
9404
- let e = Ga(), t = Ka(1, 2, Ge ? Math.max(8e3, Math.min(96e3, e.sampleRate)) : 44100), n = e.createDynamicsCompressor(), r = e.createAnalyser();
9413
+ let e = Ka(), t = qa(1, 2, Ge ? Math.max(8e3, Math.min(96e3, e.sampleRate)) : 44100), n = e.createDynamicsCompressor(), r = e.createAnalyser();
9405
9414
  r.connect(n), n.connect(e.destination), super(r, n), this._context = e, this._offlineContext = t, this._compressor = n, this._analyser = r, this._locked = e.state === "suspended" && (Be || Ve), Je && (this._locked && (this._unlock(), document.addEventListener("mousedown", this._unlock, !0), document.addEventListener("touchstart", this._unlock, !0), document.addEventListener("touchend", this._unlock, !0)), globalThis.addEventListener("focus", this._onFocus), globalThis.addEventListener("blur", this._onBlur));
9406
9415
  }
9407
9416
  _onFocus() {
@@ -9442,7 +9451,7 @@ var qa = class e extends Ua {
9442
9451
  setParamValue(e, t) {
9443
9452
  e.setValueAtTime ? e.setValueAtTime(t, this._context.currentTime) : e.value = t;
9444
9453
  }
9445
- }, Ja = class extends e {
9454
+ }, Ya = class extends e {
9446
9455
  _audio = null;
9447
9456
  _sourceNode = null;
9448
9457
  _gain = null;
@@ -9575,7 +9584,7 @@ var qa = class e extends Ua {
9575
9584
  destroy() {
9576
9585
  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;
9577
9586
  }
9578
- }, Ya = class extends Ua {
9587
+ }, Xa = class extends Wa {
9579
9588
  parent;
9580
9589
  _sourceBuffer;
9581
9590
  _sourceNode;
@@ -9583,7 +9592,7 @@ var qa = class e extends Ua {
9583
9592
  gain;
9584
9593
  analyser;
9585
9594
  get context() {
9586
- return qa.instance;
9595
+ return Ja.instance;
9587
9596
  }
9588
9597
  get isPlayable() {
9589
9598
  return !!this._sourceNode.buffer;
@@ -9598,8 +9607,8 @@ var qa = class e extends Ua {
9598
9607
  this._sourceNode.buffer = e;
9599
9608
  }
9600
9609
  constructor(e) {
9601
- let t = qa.audioContext, n = t.createBufferSource(), r = t.createGain(), i = t.createAnalyser();
9602
- n.connect(i), i.connect(r), r.connect(qa.instance.destination), super(i, r), this.parent = e, this._sourceNode = n, this.gain = r, this.analyser = i;
9610
+ let t = Ja.audioContext, n = t.createBufferSource(), r = t.createGain(), i = t.createAnalyser();
9611
+ n.connect(i), i.connect(r), r.connect(Ja.instance.destination), super(i, r), this.parent = e, this._sourceNode = n, this.gain = r, this.analyser = i;
9603
9612
  }
9604
9613
  async load() {
9605
9614
  return this._sourceLoad ||= new Promise((e) => {
@@ -9612,7 +9621,7 @@ var qa = class e extends Ua {
9612
9621
  });
9613
9622
  }
9614
9623
  _decode(e) {
9615
- return Promise.resolve(e instanceof AudioBuffer ? e : qa.decode(e)).then((e) => (this.parent.isLoaded = !0, this.buffer = e, e));
9624
+ return Promise.resolve(e instanceof AudioBuffer ? e : Ja.decode(e)).then((e) => (this.parent.isLoaded = !0, this.buffer = e, e));
9616
9625
  }
9617
9626
  cloneSource() {
9618
9627
  let e = this.context, t = this._sourceNode, n = e.audioContext.createBufferSource(), r = e.audioContext.createGain();
@@ -9622,15 +9631,15 @@ var qa = class e extends Ua {
9622
9631
  };
9623
9632
  }
9624
9633
  createSound() {
9625
- return new Ja();
9634
+ return new Ya();
9626
9635
  }
9627
- }, Xa, Za = class extends H {
9636
+ }, Za, Qa = class extends H {
9628
9637
  static {
9629
- Xa = this;
9638
+ Za = this;
9630
9639
  }
9631
9640
  static _soundPool = [];
9632
9641
  _sounds = [];
9633
- _platformAudio = qe ? new Ya(this) : new Ha(this);
9642
+ _platformAudio = qe ? new Xa(this) : new Ua(this);
9634
9643
  get platformAudio() {
9635
9644
  return this._platformAudio;
9636
9645
  }
@@ -9723,7 +9732,7 @@ var qa = class e extends Ua {
9723
9732
  this._sounds.length = 0;
9724
9733
  }
9725
9734
  _createSound() {
9726
- return Xa._soundPool.length > 0 ? Xa._soundPool.pop().init(this._platformAudio) : this._platformAudio.createSound().init(this._platformAudio);
9735
+ return Za._soundPool.length > 0 ? Za._soundPool.pop().init(this._platformAudio) : this._platformAudio.createSound().init(this._platformAudio);
9727
9736
  }
9728
9737
  refresh() {
9729
9738
  for (let e = this._sounds.length, t = 0; t < e; t++) this._sounds[t].refresh();
@@ -9739,7 +9748,7 @@ var qa = class e extends Ua {
9739
9748
  this._recycleSound(e);
9740
9749
  };
9741
9750
  _recycleSound(e) {
9742
- e.destroy(), Xa._soundPool.includes(e) || Xa._soundPool.push(e);
9751
+ e.destroy(), Za._soundPool.includes(e) || Za._soundPool.push(e);
9743
9752
  }
9744
9753
  _prevTime = 0;
9745
9754
  _timer = 0;
@@ -9755,10 +9764,10 @@ var qa = class e extends Ua {
9755
9764
  }, 100);
9756
9765
  }
9757
9766
  };
9758
- Za = Xa = k([x("Audio"), O("design:paramtypes", [Object])], Za);
9767
+ Qa = Za = k([x("Audio"), O("design:paramtypes", [Object])], Qa);
9759
9768
  //#endregion
9760
9769
  //#region src/scene/audio/AudioSpectrum.ts
9761
- var Qa = class extends Ur {}, $a = class extends Da {
9770
+ var $a = class extends Wr {}, eo = class extends Oa {
9762
9771
  _audioBuffer;
9763
9772
  _src = (() => {
9764
9773
  let e = C();
@@ -9782,7 +9791,7 @@ var Qa = class extends Ur {}, $a = class extends Da {
9782
9791
  }
9783
9792
  }
9784
9793
  async _loadSrc(e) {
9785
- await globalThis.fetch(e).then((e) => e.arrayBuffer()).then((e) => qa.decode(e)).then((e) => {
9794
+ await globalThis.fetch(e).then((e) => e.arrayBuffer()).then((e) => Ja.decode(e)).then((e) => {
9786
9795
  this._audioBuffer = e, this.syncTexture(!0);
9787
9796
  });
9788
9797
  }
@@ -9817,12 +9826,12 @@ var Qa = class extends Ur {}, $a = class extends Da {
9817
9826
  this.syncTexture(), super._process(e);
9818
9827
  }
9819
9828
  };
9820
- k([_(), O("design:type", Object)], $a.prototype, "src", void 0), k([_({ fallback: 0 }), O("design:type", Number)], $a.prototype, "gap", void 0), k([_({ fallback: "#000000" }), O("design:type", String)], $a.prototype, "color", void 0), $a = k([x("AudioWaveform"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial])], $a);
9829
+ k([_(), O("design:type", Object)], eo.prototype, "src", void 0), k([_({ fallback: 0 }), O("design:type", Number)], eo.prototype, "gap", void 0), k([_({ fallback: "#000000" }), O("design:type", String)], eo.prototype, "color", void 0), eo = k([x("AudioWaveform"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial])], eo);
9821
9830
  //#endregion
9822
9831
  //#region src/scene/transitions/KawaseTransition.ts
9823
- var eo, to = class extends Vr {
9832
+ var to, no = class extends Hr {
9824
9833
  static {
9825
- eo = this;
9834
+ to = this;
9826
9835
  }
9827
9836
  blur = 10;
9828
9837
  quality = 10;
@@ -9841,7 +9850,7 @@ var eo, to = class extends Vr {
9841
9850
  let d = 1 / s, f = 1 / c, p = [], m, h = o - 1;
9842
9851
  for (let e = 0; e < h; e++) m = u[e] + .5, p[0] = m * d, p[1] = m * f, l.push({ offset: p });
9843
9852
  m = u[h] + .5, p[0] = m * d, p[1] = m * f, l.push({ offset: p }), l.forEach((t) => {
9844
- L.draw(e, eo.material, {
9853
+ L.draw(e, to.material, {
9845
9854
  sampler: r,
9846
9855
  progress: i,
9847
9856
  ...t
@@ -9849,31 +9858,31 @@ var eo, to = class extends Vr {
9849
9858
  });
9850
9859
  }
9851
9860
  };
9852
- to = eo = k([x("KawaseTransition")], to);
9861
+ no = to = k([x("KawaseTransition")], no);
9853
9862
  //#endregion
9854
9863
  //#region src/scene/transitions/LeftEraseTransition.ts
9855
- var no, ro = class extends Vr {
9864
+ var ro, io = class extends Hr {
9856
9865
  static {
9857
- no = this;
9866
+ ro = this;
9858
9867
  }
9859
9868
  static material = new I({ gl: {
9860
9869
  vertex: "attribute vec2 position;\nattribute vec2 uv;\nvarying vec2 vUv;\nvoid main() {\n gl_Position = vec4(position, 0.0, 1.0);\n vUv = uv;\n}",
9861
9870
  fragment: "precision highp float;\nvarying vec2 vUv;\nuniform float progress;\nuniform sampler2D previous;\nuniform sampler2D next;\n\nfloat easeInOutQuint(float t) {\n return t < 0.5 ? 16.0*t*t*t*t*t : 1.0+16.0*(--t)*t*t*t*t;\n}\n\nvoid main() {\n vec4 src1Color = texture2D(previous, vUv);\n vec4 src2Color = texture2D(next, vUv);\n float mProgress = 1.0 - progress;\n float mixPercent = 0.0;\n if (vUv.x <= mProgress) {\n mixPercent = 1.0;\n }\n gl_FragColor = mix(src2Color, src1Color, mixPercent);\n}"
9862
9871
  } });
9863
9872
  apply(e) {
9864
- L.draw(e, no.material, {
9873
+ L.draw(e, ro.material, {
9865
9874
  previous: 0,
9866
9875
  next: 1,
9867
9876
  progress: this.currentTimeProgress
9868
9877
  });
9869
9878
  }
9870
9879
  };
9871
- ro = no = k([x("LeftEraseTransition")], ro);
9880
+ io = ro = k([x("LeftEraseTransition")], io);
9872
9881
  //#endregion
9873
9882
  //#region src/scene/transitions/TiltShiftTransition.ts
9874
- var io, ao = class extends Vr {
9883
+ var ao, oo = class extends Hr {
9875
9884
  static {
9876
- io = this;
9885
+ ao = this;
9877
9886
  }
9878
9887
  blur = 100;
9879
9888
  gradientBlur = 600;
@@ -9885,7 +9894,7 @@ var io, ao = class extends Vr {
9885
9894
  let n = this.currentTimeProgress, r, i;
9886
9895
  n < .5 ? (r = 0, i = (.5 - n) / .5) : (r = 1, i = (n - .5) / .5);
9887
9896
  let a = t.width, o = t.height, s = [0, o / 2], c = [600, o / 2], l = [a, o], u = c[0] - s[0], d = c[1] - s[1], f = Math.sqrt(u * u + d * d);
9888
- L.draw(e, io.material, {
9897
+ L.draw(e, ao.material, {
9889
9898
  sampler: r,
9890
9899
  progress: i,
9891
9900
  blur: this.blur,
@@ -9894,7 +9903,7 @@ var io, ao = class extends Vr {
9894
9903
  end: c,
9895
9904
  delta: [u / f, d / f],
9896
9905
  texSize: l
9897
- }), L.draw(e, io.material, {
9906
+ }), L.draw(e, ao.material, {
9898
9907
  sampler: r,
9899
9908
  progress: i,
9900
9909
  blur: this.blur,
@@ -9906,12 +9915,12 @@ var io, ao = class extends Vr {
9906
9915
  });
9907
9916
  }
9908
9917
  };
9909
- ao = io = k([x("TiltShiftTransition")], ao);
9918
+ oo = ao = k([x("TiltShiftTransition")], oo);
9910
9919
  //#endregion
9911
9920
  //#region src/scene/transitions/TwistTransition.ts
9912
- var oo, so = class extends Vr {
9921
+ var so, co = class extends Hr {
9913
9922
  static {
9914
- oo = this;
9923
+ so = this;
9915
9924
  }
9916
9925
  radius;
9917
9926
  angle = 4;
@@ -9925,7 +9934,7 @@ var oo, so = class extends Vr {
9925
9934
  let n = this.currentTimeProgress, r, i;
9926
9935
  n < .5 ? (r = 0, i = (.5 - n) / .5) : (r = 1, i = (n - .5) / .5);
9927
9936
  let a = t.width, o = t.height;
9928
- L.draw(e, oo.material, {
9937
+ L.draw(e, so.material, {
9929
9938
  sampler: r,
9930
9939
  progress: i,
9931
9940
  filterArea: [
@@ -9941,16 +9950,16 @@ var oo, so = class extends Vr {
9941
9950
  });
9942
9951
  }
9943
9952
  };
9944
- so = oo = k([x("TwistTransition")], so);
9953
+ co = so = k([x("TwistTransition")], co);
9945
9954
  //#endregion
9946
9955
  //#region src/asset/loaders/GifLoader.ts
9947
- var co = class extends nr {
9956
+ var lo = class extends rr {
9948
9957
  install(e) {
9949
9958
  let t = async (t) => {
9950
9959
  let { decodeFrames: n } = await import("modern-gif");
9951
- return await t.arrayBuffer().then((t) => n(t, e.gifWorkerUrl ? { workerUrl: e.gifWorkerUrl } : void 0)).then((e) => new hr(e.map((e) => ({
9960
+ return await t.arrayBuffer().then((t) => n(t, e.gifWorkerUrl ? { workerUrl: e.gifWorkerUrl } : void 0)).then((e) => new gr(e.map((e) => ({
9952
9961
  duration: e.delay,
9953
- texture: new Sr({
9962
+ texture: new Cr({
9954
9963
  source: e.data,
9955
9964
  width: e.width,
9956
9965
  height: e.height
@@ -9961,14 +9970,14 @@ var co = class extends nr {
9961
9970
  e.register(n, t);
9962
9971
  }), e.gif = this, this;
9963
9972
  }
9964
- }, lo = class extends nr {
9973
+ }, uo = class extends rr {
9965
9974
  install(e) {
9966
9975
  let t = async (e) => JSON.parse(await e.text());
9967
9976
  return this.load = (n) => typeof n == "string" ? e.loadBy(n).then(t) : t(n), ["application/json"].forEach((n) => {
9968
9977
  e.register(n, t);
9969
9978
  }), e.json = this, this;
9970
9979
  }
9971
- }, uo = class extends nr {
9980
+ }, fo = class extends rr {
9972
9981
  install(e) {
9973
9982
  return this.load = async (t, n) => (await import("lottie-web").then((e) => e.default)).loadAnimation({
9974
9983
  container: null,
@@ -9979,12 +9988,12 @@ var co = class extends nr {
9979
9988
  animationData: await e.loadBy(t, () => e.fetch(t).then((e) => e.json()))
9980
9989
  }), e.lottie = this, this;
9981
9990
  }
9982
- }, fo = class extends nr {
9991
+ }, po = class extends rr {
9983
9992
  install(e) {
9984
9993
  let t = async (e) => e.text();
9985
9994
  return this.load = (n) => typeof n == "string" ? e.loadBy(n).then(t) : t(n), e.text = this, this;
9986
9995
  }
9987
- }, po = class extends nr {
9996
+ }, mo = class extends rr {
9988
9997
  install(e) {
9989
9998
  let t = (t) => e.fetchImageBitmap(t, { premultiplyAlpha: "premultiply" }).then((e) => new z({
9990
9999
  source: e,
@@ -10008,14 +10017,14 @@ var co = class extends nr {
10008
10017
  e.register(n, t);
10009
10018
  }), e.texture = this, this;
10010
10019
  }
10011
- }, mo = class extends nr {
10020
+ }, ho = class extends rr {
10012
10021
  install(e) {
10013
10022
  return this.load = (t) => e.awaitBy(async () => {
10014
- let n = await new wr(t).load();
10023
+ let n = await new Tr(t).load();
10015
10024
  return e.emit("loaded", t, n), n;
10016
10025
  }), e.video = this, this;
10017
10026
  }
10018
- }, ho = Object.entries({
10027
+ }, go = Object.entries({
10019
10028
  "font/woff": ["woff"],
10020
10029
  "font/ttf": ["ttf"],
10021
10030
  "font/otf": ["otf"],
@@ -10031,31 +10040,31 @@ var co = class extends nr {
10031
10040
  "image/webp": ["webp"],
10032
10041
  "application/json": ["json"]
10033
10042
  });
10034
- function go(e) {
10035
- for (let [t, n] of ho) if (n.includes(e)) return t;
10036
- }
10037
10043
  function _o(e) {
10044
+ for (let [t, n] of go) if (n.includes(e)) return t;
10045
+ }
10046
+ function vo(e) {
10038
10047
  let t;
10039
10048
  if (e.startsWith("data:")) t = e.match(/^data:(.+?);/)?.[1];
10040
10049
  else if (e.startsWith("http")) {
10041
10050
  let n = e.split(/[#?]/)[0].split(".").pop()?.trim();
10042
- n && (t = go(n));
10051
+ n && (t = _o(n));
10043
10052
  }
10044
10053
  return t;
10045
10054
  }
10046
10055
  //#endregion
10047
10056
  //#region src/asset/Assets.ts
10048
- var vo = "WeakRef" in globalThis, yo = class extends e {
10057
+ var yo = "WeakRef" in globalThis, bo = class extends e {
10049
10058
  defaultHandler = (e) => e;
10050
10059
  _handlers = /* @__PURE__ */ new Map();
10051
10060
  _handleing = /* @__PURE__ */ new Map();
10052
10061
  _handled = /* @__PURE__ */ new Map();
10053
- _gc = vo ? new FinalizationRegistry((e) => {
10062
+ _gc = yo ? new FinalizationRegistry((e) => {
10054
10063
  let t = this.get(e);
10055
10064
  t && "destroy" in t && t.destroy(), this._handled.delete(e);
10056
10065
  }) : void 0;
10057
10066
  constructor() {
10058
- super(), vo || S.on(this.gc.bind(this), { sort: 2 });
10067
+ super(), yo || S.on(this.gc.bind(this), { sort: 2 });
10059
10068
  }
10060
10069
  use(e) {
10061
10070
  return e.install(this), this;
@@ -10104,11 +10113,11 @@ var vo = "WeakRef" in globalThis, yo = class extends e {
10104
10113
  }
10105
10114
  get(e) {
10106
10115
  let t = this._handled.get(e);
10107
- return vo && t instanceof WeakRef && (t = t.deref(), t || this._handleing.delete(e)), t;
10116
+ return yo && t instanceof WeakRef && (t = t.deref(), t || this._handleing.delete(e)), t;
10108
10117
  }
10109
10118
  set(e, t) {
10110
10119
  let n = t;
10111
- vo && typeof t == "object" && (this._gc.register(t, e), n = new WeakRef(t)), this._handled.set(e, n), t && typeof t.on == "function" && t.on("destroy", () => {
10120
+ yo && typeof t == "object" && (this._gc.register(t, e), n = new WeakRef(t)), this._handled.set(e, n), t && typeof t.on == "function" && t.on("destroy", () => {
10112
10121
  this.get(e) === t && this._handled.delete(e);
10113
10122
  });
10114
10123
  }
@@ -10128,7 +10137,7 @@ var vo = "WeakRef" in globalThis, yo = class extends e {
10128
10137
  return this._handleing.set(e, i), i;
10129
10138
  }
10130
10139
  async load(e, t) {
10131
- let n = await this.loadBy(e), r = _o(e);
10140
+ let n = await this.loadBy(e), r = vo(e);
10132
10141
  return r === void 0 && (r = n.type?.split(";")[0] ?? void 0), ((r ? this._handlers.get(r) : void 0) ?? this.defaultHandler)(n, t);
10133
10142
  }
10134
10143
  async waitUntilLoad() {
@@ -10142,14 +10151,14 @@ var vo = "WeakRef" in globalThis, yo = class extends e {
10142
10151
  n && "destroy" in n && n.destroy();
10143
10152
  }), this._handled.clear();
10144
10153
  }
10145
- }, $ = new yo().use(new rr()).use(new co()).use(new lo()).use(new uo()).use(new fo()).use(new po()).use(new mo()), bo = {
10154
+ }, $ = new bo().use(new ir()).use(new lo()).use(new uo()).use(new fo()).use(new po()).use(new mo()).use(new ho()), xo = {
10146
10155
  alpha: !0,
10147
10156
  stencil: !0,
10148
10157
  antialias: !1,
10149
10158
  premultipliedAlpha: !0,
10150
10159
  preserveDrawingBuffer: !1,
10151
10160
  powerPreference: "default"
10152
- }, xo = class extends G {
10161
+ }, So = class extends G {
10153
10162
  renderer;
10154
10163
  get view() {
10155
10164
  return this.renderer.view;
@@ -10180,7 +10189,7 @@ var vo = "WeakRef" in globalThis, yo = class extends e {
10180
10189
  this._flowEffect = e, this.renderer.batch2D.registerEffect(e ? {
10181
10190
  ...e,
10182
10191
  name: "flowStreak"
10183
- } : Lt);
10192
+ } : Rt);
10184
10193
  }
10185
10194
  _resizeObserver = Ie ? new ResizeObserver((e) => {
10186
10195
  let t = e[0];
@@ -10191,13 +10200,13 @@ var vo = "WeakRef" in globalThis, yo = class extends e {
10191
10200
  }) : void 0;
10192
10201
  constructor(e = {}) {
10193
10202
  let { view: t, width: n, height: r, pixelRatio: i = Xe, autoResize: a, data: o } = e;
10194
- super(), this.renderer = new tr(t, {
10195
- alpha: e.alpha ?? bo.alpha,
10196
- stencil: e.stencil ?? bo.stencil,
10197
- antialias: e.antialias ?? bo.antialias,
10198
- premultipliedAlpha: e.premultipliedAlpha ?? bo.premultipliedAlpha,
10199
- preserveDrawingBuffer: e.preserveDrawingBuffer ?? bo.preserveDrawingBuffer,
10200
- powerPreference: e.powerPreference ?? bo.powerPreference
10203
+ super(), this.renderer = new nr(t, {
10204
+ alpha: e.alpha ?? xo.alpha,
10205
+ stencil: e.stencil ?? xo.stencil,
10206
+ antialias: e.antialias ?? xo.antialias,
10207
+ premultipliedAlpha: e.premultipliedAlpha ?? xo.premultipliedAlpha,
10208
+ preserveDrawingBuffer: e.preserveDrawingBuffer ?? xo.preserveDrawingBuffer,
10209
+ powerPreference: e.powerPreference ?? xo.powerPreference
10201
10210
  }), this._setupInput(), this.pixelRatio = i, a ? !t && this.renderer.view && (this.renderer.view.style.width = "100%", this.renderer.view.style.height = "100%") : this.resize(n || this.gl.drawingBufferWidth || this.view?.clientWidth || 200, r || this.gl.drawingBufferHeight || this.view?.clientHeight || 200, !t), this.setProperties(e), o && this.root.append(o);
10202
10211
  }
10203
10212
  _updateProperty(e, t, n) {
@@ -10316,22 +10325,22 @@ var vo = "WeakRef" in globalThis, yo = class extends e {
10316
10325
  super._destroy(), this._resizeObserver?.disconnect(), this.renderer.destroy();
10317
10326
  }
10318
10327
  };
10319
- k([_({ fallback: !1 }), O("design:type", Boolean)], xo.prototype, "autoResize", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], xo.prototype, "autoStart", void 0);
10328
+ k([_({ fallback: !1 }), O("design:type", Boolean)], So.prototype, "autoResize", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], So.prototype, "autoStart", void 0);
10320
10329
  //#endregion
10321
10330
  //#region src/render.ts
10322
- var So, Co = [], wo = !1;
10323
- function To() {
10324
- return So ??= new xo({
10331
+ var Co, wo = [], To = !1;
10332
+ function Eo() {
10333
+ return Co ??= new So({
10325
10334
  pixelRatio: 1,
10326
10335
  width: 1,
10327
10336
  height: 1,
10328
10337
  preserveDrawingBuffer: !0
10329
10338
  });
10330
10339
  }
10331
- async function Eo(e = 100) {
10332
- if (!wo) {
10333
- for (wo = !0; Co.length;) {
10334
- let t = Co.shift();
10340
+ async function Do(e = 100) {
10341
+ if (!To) {
10342
+ for (To = !0; wo.length;) {
10343
+ let t = wo.shift();
10335
10344
  if (t) try {
10336
10345
  await t();
10337
10346
  } catch (e) {
@@ -10339,11 +10348,11 @@ async function Eo(e = 100) {
10339
10348
  }
10340
10349
  else await new Promise((t) => setTimeout(t, e));
10341
10350
  }
10342
- wo = !1;
10351
+ To = !1;
10343
10352
  }
10344
10353
  }
10345
- async function Do(e) {
10346
- let { debug: t = !1, fonts: n, width: r, height: i, data: a, keyframes: o = [], imagePipelineResolver: s, onBefore: c, onKeyframe: l, ...u } = e, d = Math.max(1, Math.floor(r)), f = Math.max(1, Math.floor(i)), p = To();
10354
+ async function Oo(e) {
10355
+ let { debug: t = !1, fonts: n, width: r, height: i, data: a, keyframes: o = [], imagePipelineResolver: s, onBefore: c, onKeyframe: l, ...u } = e, d = Math.max(1, Math.floor(r)), f = Math.max(1, Math.floor(i)), p = Eo();
10347
10356
  if (p.resetProperties(), p.setProperties(u), p.debug = t, p.fonts = n, p.timeline.currentTime = 0, p.resizeForExport(d, f), p.imagePipelineResolver = s, p.root.removeChildren(!0), p.root.append(a), await c?.(p), await p.waitUntilProcessed(), o.length) {
10348
10357
  let e = o.length, t = o[e - 1];
10349
10358
  for (let n = 0; n < e; n++) {
@@ -10361,27 +10370,27 @@ async function Do(e) {
10361
10370
  toCanvas2D: () => p.toCanvas2D(new ImageData(m, d, f))
10362
10371
  };
10363
10372
  }
10364
- async function Oo(e) {
10373
+ async function ko(e) {
10365
10374
  return new Promise((t, n) => {
10366
- Co.push(async () => {
10375
+ wo.push(async () => {
10367
10376
  try {
10368
- t(await Do(e).then((e) => e.toCanvas2D()));
10377
+ t(await Oo(e).then((e) => e.toCanvas2D()));
10369
10378
  } catch (e) {
10370
10379
  n(e);
10371
10380
  }
10372
- }), Eo();
10381
+ }), Do();
10373
10382
  });
10374
10383
  }
10375
- async function ko(e) {
10384
+ async function Ao(e) {
10376
10385
  return new Promise((t, n) => {
10377
- Co.push(async () => {
10386
+ wo.push(async () => {
10378
10387
  try {
10379
- t(await Do(e).then((e) => e.pixels));
10388
+ t(await Oo(e).then((e) => e.pixels));
10380
10389
  } catch (e) {
10381
10390
  n(e);
10382
10391
  }
10383
- }), Eo();
10392
+ }), Do();
10384
10393
  });
10385
10394
  }
10386
10395
  //#endregion
10387
- export { wt as Aabb2D, hr as AnimatedTexture, za as Animation, yo as Assets, Za as Audio, Ua as AudioPipeline, Wa as AudioProcessor, Qa as AudioSpectrum, $a as AudioWaveform, A as BufferUsage, Wr as Camera2D, Er as CanvasContext, Ir as CanvasItem, gr as CanvasTexture, T as Color, K as ColorAdjustEffect, ri as ColorFilterEffect, Dt as ColorMatrix, oi as ColorOverlayEffect, ci as ColorRemoveEffect, di as ColorReplaceEffect, _r as ColorTexture, w as CoreObject, Tt as DEG_TO_RAD, Xe as DEVICE_PIXEL_RATIO, q as DrawboardEffect, vi as DropShadowEffect, W as Effect, dr as EffectMaterial, Da as Element2D, Ri as Element2DBackground, Hi as Element2DChart, Ui as Element2DComments, Gi as Element2DConnection, Y as Element2DFill, qi as Element2DForeground, Yi as Element2DOutline, Xi as Element2DShadow, Zi as Element2DShape, Qi as Element2DStyle, na as Element2DTable, X as Element2DText, bi as EmbossEffect, xo as Engine, Nt as FLAG_CLIP_OUTSIDE_UV, Pt as FLAG_STROKE_AA, _a as Flexbox, rr as FontLoader, fr as FxaaMaterial, gi as GaussianBlurEffect, ar as Geometry, co as GifLoader, Cn as GlBatch2DSystem, _n as GlBlendMode, zt as GlBuffer, Kt as GlBufferSystem, Rt as GlBufferTarget, Dn as GlMaskSystem, an as GlProgram, jn as GlRenderTarget, Mn as GlRenderTargetSystem, mn as GlShaderSystem, yn as GlState, bn as GlStateSystem, kn as GlStencilSystem, j as GlSystem, An as GlViewportSystem, J as GlitchEffect, yr as GlyphAtlas, wi as GodrayEffect, xr as GradientTexture, Ha as HTMLAudio, Ba as HTMLAudioContext, Va as HTMLSound, Je as IN_BROWSER, Ye as IN_MAC_OS, ir as IndexBuffer, xt as Input, ht as InputEvent, lo as JsonLoader, Di as KawaseBlurEffect, to as KawaseTransition, gt as KeyboardInputEvent, ro as LeftEraseTransition, nr as Loader, ka as Lottie2D, uo as LottieLoader, At as MainLoop, ki as MaskEffect, I as Material, Aa as Mesh2D, Or as Meta, _t as MouseInputEvent, V as Node, Ur as Node2D, Ot as Obb2D, Mi as OutlineEffect, Se as PI, Ce as PI_2, Pi as PixelateEffect, Sr as PixelsTexture, vt as PointerInputEvent, kt as Projection2D, or as QuadGeometry, L as QuadUvGeometry, Et as RAD_TO_DEG, St as RefCounted, R as RenderTarget, Bt as Renderer, Ct as Resource, Ue as SUPPORTS_AUDIO_CONTEXT, Ve as SUPPORTS_CLICK_EVENTS, He as SUPPORTS_CREATE_IMAGE_BITMAP, Fe as SUPPORTS_IMAGE_BITMAP, ze as SUPPORTS_MOUSE_EVENTS, Ge as SUPPORTS_OFFLINE_AUDIO_CONTEXT, Le as SUPPORTS_POINTER_EVENTS, Ie as SUPPORTS_RESIZE_OBSERVER, Be as SUPPORTS_TOUCH_EVENTS, Pe as SUPPORTS_WEBGL2, We as SUPPORTS_WEBKIT_AUDIO_CONTEXT, Ke as SUPPORTS_WEBKIT_OFFLINE_AUDIO_CONTEXT, qe as SUPPORTS_WEB_AUDIO, Re as SUPPORTS_WHEEL_EVENTS, G as SceneTree, fo as TextLoader, z as Texture2D, po as TextureLoader, Oa as TextureRect2D, S as Ticker, ao as TiltShiftTransition, zr as Timeline, H as TimelineNode, ja as TransformRect2D, Vr as Transition, so as TwistTransition, Ht as UniformGroup, mr as UvGeometry, pr as UvMaterial, F as VertexAttribute, P as VertexBuffer, Ma as Video2D, mo as VideoLoader, wr as VideoTexture, U as Viewport, Tr as ViewportTexture, Ya as WebAudio, qa as WebAudioContext, tr as WebGLRenderer, Ja as WebSound, yt as WheelInputEvent, Br as Window, Ii as ZoomBlurEffect, ca as alignMap, $ as assets, Gr as axisDir, ga as boxSizingMap, ft as bumpGeometryRevision, E as clamp, Ei as clampFrag, C as createHTMLCanvas, Gt as createIdFromString, be as createNode, lt as crossOrigin, La as cssEasingPresets, Ia as cubicBezier, x as customNode, ye as customNodes, bo as defaultOptions, ct as determineCrossOrigin, ua as directionMap, la as displayMap, Z as edgeMap, Ft as encodeFlowSpeed, da as flexDirectionMap, fa as flexWrapMap, Lt as flowStreakEffect, Ti as frag, dt as geometryRevision, it as getCanvasFactory, ke as getDefaultCssPropertyValue, st as getGlContextProvider, To as getRenderEngine, sa as gutterMap, mt as instanceId, et as isCanvasElement, Ze as isElementNode, $e as isImageElement, we as isPow2, Qe as isVideoElement, tt as isWebgl2, pa as justifyMap, D as lerp, Tn as log2, vn as mapGlBlendModes, Mt as markRaw, wn as nextPow2, xe as nextTick, ma as overflowMap, $r as parseCssFilter, je as parseCssFunctions, Ae as parseCssProperty, ei as parseCssTransformOrigin, Te as planExportTiles, ha as positionTypeMap, Oo as render, ko as renderPixels, Pr as resetBatchPool, Kr as routeConnection, rt as setCanvasFactory, ot as setGlContextProvider, br as sharedGlyphAtlas, On as stencilModeMap, It as strokeFeatherEffect };
10396
+ export { Tt as Aabb2D, gr as AnimatedTexture, Ba as Animation, bo as Assets, Qa as Audio, Wa as AudioPipeline, Ga as AudioProcessor, $a as AudioSpectrum, eo as AudioWaveform, A as BufferUsage, Gr as Camera2D, Dr as CanvasContext, Lr as CanvasItem, _r as CanvasTexture, T as Color, K as ColorAdjustEffect, ii as ColorFilterEffect, Ot as ColorMatrix, si as ColorOverlayEffect, li as ColorRemoveEffect, fi as ColorReplaceEffect, vr as ColorTexture, w as CoreObject, Et as DEG_TO_RAD, Xe as DEVICE_PIXEL_RATIO, q as DrawboardEffect, yi as DropShadowEffect, W as Effect, fr as EffectMaterial, Oa as Element2D, zi as Element2DBackground, Ui as Element2DChart, Wi as Element2DComments, Ki as Element2DConnection, Y as Element2DFill, Ji as Element2DForeground, Xi as Element2DOutline, Zi as Element2DShadow, Qi as Element2DShape, $i as Element2DStyle, ra as Element2DTable, X as Element2DText, xi as EmbossEffect, So as Engine, Pt as FLAG_CLIP_OUTSIDE_UV, Ft as FLAG_STROKE_AA, va as Flexbox, ir as FontLoader, pr as FxaaMaterial, _i as GaussianBlurEffect, or as Geometry, lo as GifLoader, wn as GlBatch2DSystem, vn as GlBlendMode, Bt as GlBuffer, qt as GlBufferSystem, zt as GlBufferTarget, On as GlMaskSystem, on as GlProgram, Mn as GlRenderTarget, Nn as GlRenderTargetSystem, hn as GlShaderSystem, bn as GlState, xn as GlStateSystem, An as GlStencilSystem, j as GlSystem, jn as GlViewportSystem, J as GlitchEffect, br as GlyphAtlas, Ti as GodrayEffect, Sr as GradientTexture, Ua as HTMLAudio, Va as HTMLAudioContext, Ha as HTMLSound, Je as IN_BROWSER, Ye as IN_MAC_OS, ar as IndexBuffer, xt as Input, ht as InputEvent, uo as JsonLoader, Oi as KawaseBlurEffect, no as KawaseTransition, gt as KeyboardInputEvent, io as LeftEraseTransition, rr as Loader, Aa as Lottie2D, fo as LottieLoader, jt as MainLoop, Ai as MaskEffect, I as Material, ja as Mesh2D, kr as Meta, _t as MouseInputEvent, V as Node, Wr as Node2D, kt as Obb2D, Ni as OutlineEffect, Se as PI, Ce as PI_2, Fi as PixelateEffect, Cr as PixelsTexture, vt as PointerInputEvent, At as Projection2D, sr as QuadGeometry, L as QuadUvGeometry, Dt as RAD_TO_DEG, St as RefCounted, R as RenderTarget, Vt as Renderer, Ct as Resource, Ue as SUPPORTS_AUDIO_CONTEXT, Ve as SUPPORTS_CLICK_EVENTS, He as SUPPORTS_CREATE_IMAGE_BITMAP, Fe as SUPPORTS_IMAGE_BITMAP, ze as SUPPORTS_MOUSE_EVENTS, Ge as SUPPORTS_OFFLINE_AUDIO_CONTEXT, Le as SUPPORTS_POINTER_EVENTS, Ie as SUPPORTS_RESIZE_OBSERVER, Be as SUPPORTS_TOUCH_EVENTS, Pe as SUPPORTS_WEBGL2, We as SUPPORTS_WEBKIT_AUDIO_CONTEXT, Ke as SUPPORTS_WEBKIT_OFFLINE_AUDIO_CONTEXT, qe as SUPPORTS_WEB_AUDIO, Re as SUPPORTS_WHEEL_EVENTS, G as SceneTree, po as TextLoader, z as Texture2D, mo as TextureLoader, ka as TextureRect2D, S as Ticker, oo as TiltShiftTransition, Br as Timeline, H as TimelineNode, Ma as TransformRect2D, Hr as Transition, co as TwistTransition, Ut as UniformGroup, hr as UvGeometry, mr as UvMaterial, F as VertexAttribute, P as VertexBuffer, Na as Video2D, ho as VideoLoader, Tr as VideoTexture, U as Viewport, Er as ViewportTexture, Xa as WebAudio, Ja as WebAudioContext, nr as WebGLRenderer, Ya as WebSound, yt as WheelInputEvent, Vr as Window, Li as ZoomBlurEffect, la as alignMap, $ as assets, Kr as axisDir, _a as boxSizingMap, ft as bumpGeometryRevision, E as clamp, Di as clampFrag, C as createHTMLCanvas, Kt as createIdFromString, be as createNode, lt as crossOrigin, Ra as cssEasingPresets, La as cubicBezier, x as customNode, ye as customNodes, xo as defaultOptions, ct as determineCrossOrigin, da as directionMap, ua as displayMap, Z as edgeMap, It as encodeFlowSpeed, fa as flexDirectionMap, pa as flexWrapMap, Rt as flowStreakEffect, Ei as frag, dt as geometryRevision, it as getCanvasFactory, ke as getDefaultCssPropertyValue, st as getGlContextProvider, Eo as getRenderEngine, ca as gutterMap, mt as instanceId, et as isCanvasElement, Ze as isElementNode, $e as isImageElement, we as isPow2, Qe as isVideoElement, tt as isWebgl2, ma as justifyMap, D as lerp, En as log2, yn as mapGlBlendModes, Nt as markRaw, Tn as nextPow2, xe as nextTick, ha as overflowMap, ei as parseCssFilter, je as parseCssFunctions, Ae as parseCssProperty, ti as parseCssTransformOrigin, Te as planExportTiles, ga as positionTypeMap, ko as render, Ao as renderPixels, Fr as resetBatchPool, qr as routeConnection, rt as setCanvasFactory, ot as setGlContextProvider, xr as sharedGlyphAtlas, kn as stencilModeMap, Lt as strokeFeatherEffect };