modern-canvas 0.26.1 → 0.26.3

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
@@ -546,7 +546,7 @@ var dt = class e {
546
546
  destroy() {
547
547
  this.destroyed || (this.destroyed = !0, this._destroy(), this.emit("destroy"), this.removeAllListeners());
548
548
  }
549
- }, vt = class extends T {}, E = class extends vt {}, yt = class e {
549
+ }, vt = class extends T {}, yt = class extends vt {}, bt = class e {
550
550
  get x() {
551
551
  return this.min.x;
552
552
  }
@@ -680,7 +680,7 @@ var dt = class e {
680
680
  //#endregion
681
681
  //#region src/core/math/Color.ts
682
682
  pe([me]);
683
- var bt = class {
683
+ var xt = class {
684
684
  get value() {
685
685
  return this._value;
686
686
  }
@@ -763,16 +763,16 @@ var bt = class {
763
763
  this.a
764
764
  ];
765
765
  }
766
- }, xt = xe / 180, St = 180 / xe;
767
- function D(e, t, n) {
766
+ }, St = xe / 180, Ct = 180 / xe;
767
+ function E(e, t, n) {
768
768
  return Math.max(t, Math.min(e, n));
769
769
  }
770
- function O(e, t, n) {
770
+ function D(e, t, n) {
771
771
  return (1 - n) * e + n * t;
772
772
  }
773
773
  //#endregion
774
774
  //#region src/core/math/ColorMatrix.ts
775
- var Ct = class {
775
+ var wt = class {
776
776
  _array = /* @__PURE__ */ new Float32Array(20);
777
777
  constructor() {
778
778
  this.identity();
@@ -902,7 +902,7 @@ var Ct = class {
902
902
  ]);
903
903
  }
904
904
  invert(e = 1) {
905
- let t = O(1, -1, e), n = O(0, 255, e);
905
+ let t = D(1, -1, e), n = D(0, 255, e);
906
906
  return this.multiply([
907
907
  t,
908
908
  0,
@@ -927,21 +927,21 @@ var Ct = class {
927
927
  ]);
928
928
  }
929
929
  sepia(e = 1) {
930
- let t = D(e, 0, 1);
930
+ let t = E(e, 0, 1);
931
931
  return this.multiply([
932
- O(1, .393, t),
933
- O(0, .7689999, t),
934
- O(0, .18899999, t),
932
+ D(1, .393, t),
933
+ D(0, .7689999, t),
934
+ D(0, .18899999, t),
935
935
  0,
936
936
  0,
937
- O(0, .349, t),
938
- O(1, .6859999, t),
939
- O(0, .16799999, t),
937
+ D(0, .349, t),
938
+ D(1, .6859999, t),
939
+ D(0, .16799999, t),
940
940
  0,
941
941
  0,
942
- O(0, .272, t),
943
- O(0, .5339999, t),
944
- O(1, .13099999, t),
942
+ D(0, .272, t),
943
+ D(0, .5339999, t),
944
+ D(1, .13099999, t),
945
945
  0,
946
946
  0,
947
947
  0,
@@ -976,7 +976,7 @@ var Ct = class {
976
976
  ]);
977
977
  }
978
978
  grayscale(e = 1) {
979
- let t = D(e, 0, 1), n = O(1, .3, t), r = O(0, .3, t), i = O(1, .59, t), a = O(0, .59, t), o = O(1, .11, t), s = O(0, .11, t);
979
+ let t = E(e, 0, 1), n = D(1, .3, t), r = D(0, .3, t), i = D(1, .59, t), a = D(0, .59, t), o = D(1, .11, t), s = D(0, .11, t);
980
980
  return this.multiply([
981
981
  n,
982
982
  a,
@@ -1028,10 +1028,10 @@ var Ct = class {
1028
1028
  toArray() {
1029
1029
  return this._array;
1030
1030
  }
1031
- }, wt = class e extends yt {
1031
+ }, Tt = class e extends bt {
1032
1032
  rotation;
1033
1033
  get rotationDegrees() {
1034
- return this.rotation / xt;
1034
+ return this.rotation / St;
1035
1035
  }
1036
1036
  constructor(...e) {
1037
1037
  let t, n;
@@ -1041,7 +1041,7 @@ var Ct = class {
1041
1041
  if (!this.rotation && (!("rotation" in e) || !e.rotation)) return super.overlap(e, t);
1042
1042
  {
1043
1043
  let t = (e, t) => Math.abs(e.x * t.x + e.y * t.y), n = (e) => {
1044
- let { width: n, height: r, rotation: i = 0 } = e, a = i / xt;
1044
+ let { width: n, height: r, rotation: i = 0 } = e, a = i / St;
1045
1045
  a = -a % 180;
1046
1046
  let o = a / 180 * Math.PI, s = {
1047
1047
  x: Math.cos(o),
@@ -1083,7 +1083,7 @@ var Ct = class {
1083
1083
  clone() {
1084
1084
  return new e(this.toJSON());
1085
1085
  }
1086
- }, Tt = class {
1086
+ }, Et = class {
1087
1087
  _array;
1088
1088
  x = 0;
1089
1089
  y = 0;
@@ -1107,12 +1107,12 @@ var Ct = class {
1107
1107
  };
1108
1108
  //#endregion
1109
1109
  //#region \0@oxc-project+runtime@0.137.0/helpers/esm/decorateMetadata.js
1110
- function k(e, t) {
1110
+ function O(e, t) {
1111
1111
  if (typeof Reflect == "object" && typeof Reflect.metadata == "function") return Reflect.metadata(e, t);
1112
1112
  }
1113
1113
  //#endregion
1114
1114
  //#region \0@oxc-project+runtime@0.137.0/helpers/esm/decorate.js
1115
- function A(e, t, n, r) {
1115
+ function k(e, t, n, r) {
1116
1116
  var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
1117
1117
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
1118
1118
  else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
@@ -1120,7 +1120,7 @@ function A(e, t, n, r) {
1120
1120
  }
1121
1121
  //#endregion
1122
1122
  //#region src/core/os/MainLoop.ts
1123
- var Et = class extends T {
1123
+ var Dt = class extends T {
1124
1124
  _starting = !1;
1125
1125
  _nextDeltaTime = 0;
1126
1126
  _startedProcess;
@@ -1150,12 +1150,12 @@ var Et = class extends T {
1150
1150
  super._destroy(), this.stop();
1151
1151
  }
1152
1152
  };
1153
- A([_({ fallback: 60 }), k("design:type", Number)], Et.prototype, "fps", void 0), A([_({ fallback: 1 }), k("design:type", Number)], Et.prototype, "speed", void 0);
1153
+ k([_({ fallback: 60 }), O("design:type", Number)], Dt.prototype, "fps", void 0), k([_({ fallback: 1 }), O("design:type", Number)], Dt.prototype, "speed", void 0);
1154
1154
  //#endregion
1155
1155
  //#region src/core/reactivity.ts
1156
- var Dt = "__v_skip";
1157
- function Ot(e) {
1158
- return !Object.prototype.hasOwnProperty.call(e, Dt) && Object.isExtensible(e) && Object.defineProperty(e, Dt, {
1156
+ var Ot = "__v_skip";
1157
+ function kt(e) {
1158
+ return !Object.prototype.hasOwnProperty.call(e, Ot) && Object.isExtensible(e) && Object.defineProperty(e, Ot, {
1159
1159
  configurable: !0,
1160
1160
  enumerable: !1,
1161
1161
  value: !0
@@ -1163,19 +1163,19 @@ function Ot(e) {
1163
1163
  }
1164
1164
  //#endregion
1165
1165
  //#region src/core/renderers/gl/buffer/const.ts
1166
- var kt = /* @__PURE__ */ function(e) {
1166
+ var At = /* @__PURE__ */ function(e) {
1167
1167
  return e[e.elementArrayBuffer = 34963] = "elementArrayBuffer", e[e.arrayBuffer = 34962] = "arrayBuffer", e[e.uniformBuffer = 35345] = "uniformBuffer", e;
1168
- }({}), At = class {
1168
+ }({}), jt = class {
1169
1169
  native;
1170
- target = kt.arrayBuffer;
1170
+ target = At.arrayBuffer;
1171
1171
  byteLength = 0;
1172
1172
  dirty = !0;
1173
1173
  constructor(e) {
1174
1174
  this.native = e;
1175
1175
  }
1176
- }, j = /* @__PURE__ */ function(e) {
1176
+ }, A = /* @__PURE__ */ function(e) {
1177
1177
  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;
1178
- }({}), jt = class extends n {
1178
+ }({}), Mt = class extends n {
1179
1179
  screen = {
1180
1180
  x: 0,
1181
1181
  y: 0,
@@ -1194,12 +1194,12 @@ var kt = /* @__PURE__ */ function(e) {
1194
1194
  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`);
1195
1195
  }
1196
1196
  };
1197
- A([_({ fallback: Ye }), k("design:type", Number)], jt.prototype, "pixelRatio", void 0), A([_({ internal: !0 }), k("design:type", typeof HTMLCanvasElement > "u" ? Object : HTMLCanvasElement)], jt.prototype, "view", void 0);
1197
+ k([_({ fallback: Ye }), O("design:type", Number)], Mt.prototype, "pixelRatio", void 0), k([_({ internal: !0 }), O("design:type", typeof HTMLCanvasElement > "u" ? Object : HTMLCanvasElement)], Mt.prototype, "view", void 0);
1198
1198
  //#endregion
1199
1199
  //#region src/core/renderers/shared/shader/UniformGroup.ts
1200
- var Mt = 0, Nt = class {
1200
+ var Nt = 0, Pt = class {
1201
1201
  isUniformGroup = !0;
1202
- uid = ++Mt;
1202
+ uid = ++Nt;
1203
1203
  uniforms;
1204
1204
  ubo;
1205
1205
  isStatic;
@@ -1210,14 +1210,14 @@ var Mt = 0, Nt = class {
1210
1210
  update() {
1211
1211
  this._dirtyId++;
1212
1212
  }
1213
- }, Pt = Object.create(null), Ft = Object.create(null);
1214
- function It(e, t) {
1215
- let n = Ft[e];
1216
- return n === void 0 && (Pt[t] === void 0 && (Pt[t] = 1), Ft[e] = n = Pt[t]++), n;
1213
+ }, Ft = Object.create(null), It = Object.create(null);
1214
+ function Lt(e, t) {
1215
+ let n = It[e];
1216
+ return n === void 0 && (Ft[t] === void 0 && (Ft[t] = 1), It[e] = n = Ft[t]++), n;
1217
1217
  }
1218
1218
  //#endregion
1219
1219
  //#region src/core/renderers/gl/system/GlSystem.ts
1220
- var M = class extends e {
1220
+ var j = class extends e {
1221
1221
  get _gl() {
1222
1222
  return this._renderer.gl;
1223
1223
  }
@@ -1231,7 +1231,7 @@ var M = class extends e {
1231
1231
  _setup() {}
1232
1232
  flush() {}
1233
1233
  reset() {}
1234
- }, Lt = class extends M {
1234
+ }, Rt = class extends j {
1235
1235
  install(e) {
1236
1236
  super.install(e), e.buffer = this;
1237
1237
  }
@@ -1241,8 +1241,8 @@ var M = class extends e {
1241
1241
  return this.glBuffers.get(e.instanceId) || this._createGlBuffer(e);
1242
1242
  }
1243
1243
  _createGlBuffer(e) {
1244
- let t = this._gl, n = new At(t.createBuffer()), r = kt.arrayBuffer;
1245
- return e.usage & j.index ? r = kt.elementArrayBuffer : e.usage & j.uniform && (r = kt.uniformBuffer), n.target = r, this.glBuffers.set(e.instanceId, n), this.buffers.get(e.instanceId) || ("on" in e && (e.on("updateProperty", (e) => {
1244
+ let t = this._gl, n = new jt(t.createBuffer()), r = At.arrayBuffer;
1245
+ return e.usage & A.index ? r = At.elementArrayBuffer : e.usage & A.uniform && (r = At.uniformBuffer), n.target = r, this.glBuffers.set(e.instanceId, n), this.buffers.get(e.instanceId) || ("on" in e && (e.on("updateProperty", (e) => {
1246
1246
  switch (e) {
1247
1247
  case "usage":
1248
1248
  case "data":
@@ -1265,7 +1265,7 @@ var M = class extends e {
1265
1265
  n.dirty = !1;
1266
1266
  let { _gl: r } = this, { usage: i, data: a } = e;
1267
1267
  r.bindBuffer(n.target, n.native);
1268
- let o = i & j.static ? r.STATIC_DRAW : r.DYNAMIC_DRAW;
1268
+ let o = i & A.static ? r.STATIC_DRAW : r.DYNAMIC_DRAW;
1269
1269
  if (a) if (n.byteLength >= a.byteLength) {
1270
1270
  let e = a.length * a.BYTES_PER_ELEMENT;
1271
1271
  r.bufferSubData(n.target, 0, a, 0, e / a.BYTES_PER_ELEMENT);
@@ -1280,13 +1280,13 @@ var M = class extends e {
1280
1280
  }
1281
1281
  this.buffers.clear(), this.glBuffers.clear();
1282
1282
  }
1283
- }, Rt;
1284
- function zt() {
1285
- return Rt ||= "mediump", Rt;
1283
+ }, zt;
1284
+ function Bt() {
1285
+ return zt ||= "mediump", zt;
1286
1286
  }
1287
1287
  //#endregion
1288
1288
  //#region src/core/renderers/gl/shader/preprocessors/addProgramDefines.ts
1289
- function Bt(e, t, n) {
1289
+ function Vt(e, t, n) {
1290
1290
  return t ? e : n ? (e = e.replace("out vec4 finalColor;", ""), `#ifdef GL_ES
1291
1291
  #define in varying
1292
1292
  #define finalColor gl_FragColor
@@ -1300,7 +1300,7 @@ ${e}`;
1300
1300
  }
1301
1301
  //#endregion
1302
1302
  //#region src/core/renderers/gl/shader/preprocessors/ensurePrecision.ts
1303
- function Vt(e, t, n) {
1303
+ function Ht(e, t, n) {
1304
1304
  let r = n ? t.maxSupportedFragmentPrecision : t.maxSupportedVertexPrecision;
1305
1305
  if (e.substring(0, 9) !== "precision") {
1306
1306
  let i = n ? t.requestedFragmentPrecision : t.requestedVertexPrecision;
@@ -1310,31 +1310,31 @@ function Vt(e, t, n) {
1310
1310
  }
1311
1311
  //#endregion
1312
1312
  //#region src/core/renderers/gl/shader/preprocessors/insertVersion.ts
1313
- function Ht(e, t) {
1313
+ function Ut(e, t) {
1314
1314
  return t ? `#version 300 es\n${e}` : e;
1315
1315
  }
1316
1316
  //#endregion
1317
1317
  //#region src/core/renderers/gl/shader/preprocessors/setProgramName.ts
1318
- var Ut = {}, Wt = {};
1319
- function Gt(e, { name: t = "program" }, n = !0) {
1318
+ var Wt = {}, Gt = {};
1319
+ function Kt(e, { name: t = "program" }, n = !0) {
1320
1320
  t = t.replace(/\s+/g, "-"), t += n ? "-fragment" : "-vertex";
1321
- let r = n ? Ut : Wt;
1321
+ let r = n ? Wt : Gt;
1322
1322
  return r[t] ? (r[t]++, t += `-${r[t]}`) : r[t] = 1, e.includes("#define SHADER_NAME") ? e : `${`#define SHADER_NAME ${t}`}\n${e}`;
1323
1323
  }
1324
1324
  //#endregion
1325
1325
  //#region src/core/renderers/gl/shader/preprocessors/stripVersion.ts
1326
- function Kt(e, t) {
1326
+ function qt(e, t) {
1327
1327
  return t ? e.replace("#version 300 es", "") : e;
1328
1328
  }
1329
1329
  //#endregion
1330
1330
  //#region src/core/renderers/gl/shader/GlProgram.ts
1331
- var qt = Object.create(null), Jt = {
1332
- stripVersion: Kt,
1333
- ensurePrecision: Vt,
1334
- addProgramDefines: Bt,
1335
- setProgramName: Gt,
1336
- insertVersion: Ht
1337
- }, Yt = class e {
1331
+ var Jt = Object.create(null), Yt = {
1332
+ stripVersion: qt,
1333
+ ensurePrecision: Ht,
1334
+ addProgramDefines: Vt,
1335
+ setProgramName: Kt,
1336
+ insertVersion: Ut
1337
+ }, Xt = class e {
1338
1338
  static defaultOptions = {
1339
1339
  preferredVertexPrecision: "highp",
1340
1340
  preferredFragmentPrecision: "mediump"
@@ -1357,25 +1357,25 @@ var qt = Object.create(null), Jt = {
1357
1357
  requestedFragmentPrecision: t.preferredFragmentPrecision,
1358
1358
  requestedVertexPrecision: t.preferredVertexPrecision,
1359
1359
  maxSupportedVertexPrecision: "highp",
1360
- maxSupportedFragmentPrecision: zt()
1360
+ maxSupportedFragmentPrecision: Bt()
1361
1361
  },
1362
1362
  setProgramName: { name: t.name },
1363
1363
  addProgramDefines: i,
1364
1364
  insertVersion: i
1365
1365
  };
1366
- Object.keys(Jt).forEach((e) => {
1366
+ Object.keys(Yt).forEach((e) => {
1367
1367
  let t = a[e];
1368
- n = Jt[e](n, t, !0), r = Jt[e](r, t, !1);
1369
- }), this.fragment = n, this.vertex = r, this.transformFeedbackVaryings = t.transformFeedbackVaryings, this.id = It(`${r}:${n}`, "GlProgram");
1368
+ n = Yt[e](n, t, !0), r = Yt[e](r, t, !1);
1369
+ }), this.fragment = n, this.vertex = r, this.transformFeedbackVaryings = t.transformFeedbackVaryings, this.id = Lt(`${r}:${n}`, "GlProgram");
1370
1370
  }
1371
1371
  destroy() {
1372
- this.fragment = "", this.vertex = "", this.attributes = Object.create(null), this.uniforms = Object.create(null), this.transformFeedbackVaryings = void 0, this._cacheKey && delete qt[this._cacheKey];
1372
+ this.fragment = "", this.vertex = "", this.attributes = Object.create(null), this.uniforms = Object.create(null), this.transformFeedbackVaryings = void 0, this._cacheKey && delete Jt[this._cacheKey];
1373
1373
  }
1374
1374
  static from(t) {
1375
1375
  let n = `${t.vertex}:${t.fragment}`;
1376
- return qt[n] || (qt[n] = new e(t), qt[n]._cacheKey = n), qt[n];
1376
+ return Jt[n] || (Jt[n] = new e(t), Jt[n]._cacheKey = n), Jt[n];
1377
1377
  }
1378
- }, Xt = {
1378
+ }, Zt = {
1379
1379
  uint8x2: {
1380
1380
  size: 2,
1381
1381
  stride: 2,
@@ -1527,19 +1527,19 @@ var qt = Object.create(null), Jt = {
1527
1527
  normalized: !1
1528
1528
  }
1529
1529
  };
1530
- function Zt(e) {
1531
- return Xt[e] ?? Xt.float32;
1530
+ function Qt(e) {
1531
+ return Zt[e] ?? Zt.float32;
1532
1532
  }
1533
1533
  //#endregion
1534
1534
  //#region src/core/renderers/gl/shader/GlProgramData.ts
1535
- var Qt = class {
1535
+ var $t = class {
1536
1536
  native;
1537
1537
  uniformDirtyGroups = Object.create(null);
1538
1538
  uniforms = Object.create(null);
1539
1539
  constructor(e) {
1540
1540
  this.native = e;
1541
1541
  }
1542
- }, $t, en = {
1542
+ }, en, tn = {
1543
1543
  FLOAT: "float",
1544
1544
  FLOAT_VEC2: "vec2",
1545
1545
  FLOAT_VEC3: "vec3",
@@ -1568,7 +1568,7 @@ var Qt = class {
1568
1568
  SAMPLER_2D_ARRAY: "sampler2DArray",
1569
1569
  INT_SAMPLER_2D_ARRAY: "sampler2DArray",
1570
1570
  UNSIGNED_INT_SAMPLER_2D_ARRAY: "sampler2DArray"
1571
- }, tn = {
1571
+ }, nn = {
1572
1572
  float: "float32",
1573
1573
  vec2: "float32x2",
1574
1574
  vec3: "float32x3",
@@ -1586,29 +1586,29 @@ var Qt = class {
1586
1586
  bvec3: "uint32x3",
1587
1587
  bvec4: "uint32x4"
1588
1588
  };
1589
- function nn(e, t) {
1590
- if (!$t) {
1591
- let t = Object.keys(en);
1592
- $t = {};
1589
+ function rn(e, t) {
1590
+ if (!en) {
1591
+ let t = Object.keys(tn);
1592
+ en = {};
1593
1593
  for (let n = 0; n < t.length; ++n) {
1594
1594
  let r = t[n];
1595
- $t[e[r]] = en[r];
1595
+ en[e[r]] = tn[r];
1596
1596
  }
1597
1597
  }
1598
- return $t[t];
1598
+ return en[t];
1599
1599
  }
1600
- function rn(e, t) {
1601
- return tn[nn(e, t)] || "float32";
1600
+ function an(e, t) {
1601
+ return nn[rn(e, t)] || "float32";
1602
1602
  }
1603
1603
  //#endregion
1604
1604
  //#region src/core/renderers/gl/shader/GlShaderSystem.ts
1605
- var an = class extends M {
1605
+ var on = class extends j {
1606
1606
  install(e) {
1607
1607
  super.install(e), e.shader = this;
1608
1608
  }
1609
1609
  glProgramDatas = /* @__PURE__ */ new Map();
1610
1610
  currentProgram = null;
1611
- globalUniforms = new Nt({
1611
+ globalUniforms = new Pt({
1612
1612
  projectionMatrix: new Float32Array([
1613
1613
  1,
1614
1614
  0,
@@ -1649,7 +1649,7 @@ var an = class extends M {
1649
1649
  return this.glProgramDatas.get(e.id) || this._createGlProgramData(e);
1650
1650
  }
1651
1651
  _createGlProgramData(e) {
1652
- let t = this._gl, n = new Qt(t.createProgram());
1652
+ let t = this._gl, n = new $t(t.createProgram());
1653
1653
  this.glProgramDatas.set(e.id, n), this.useProgram(e);
1654
1654
  let r = this._createGlShader(e.vertex, t.VERTEX_SHADER), i = this._createGlShader(e.fragment, t.FRAGMENT_SHADER);
1655
1655
  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)}`);
@@ -1657,11 +1657,11 @@ var an = class extends M {
1657
1657
  for (let e = t.getProgramParameter(n.native, t.ACTIVE_ATTRIBUTES), r = 0; r < e; r++) {
1658
1658
  let e = t.getActiveAttrib(n.native, r);
1659
1659
  if (!e || e.name.startsWith("gl_")) continue;
1660
- let i = rn(t, e.type);
1660
+ let i = an(t, e.type);
1661
1661
  a[e.name] = {
1662
1662
  location: 0,
1663
1663
  format: i,
1664
- stride: Zt(i).stride,
1664
+ stride: Qt(i).stride,
1665
1665
  offset: 0,
1666
1666
  instance: !1,
1667
1667
  start: 0
@@ -1678,7 +1678,7 @@ var an = class extends M {
1678
1678
  for (let e = t.getProgramParameter(n.native, t.ACTIVE_UNIFORMS), r = 0; r < e; r++) {
1679
1679
  let e = t.getActiveUniform(n.native, r);
1680
1680
  if (!e) continue;
1681
- let i = e.name.replace(/\[.*?\]$/, ""), a = nn(t, e.type), o = e.size;
1681
+ let i = e.name.replace(/\[.*?\]$/, ""), a = rn(t, e.type), o = e.size;
1682
1682
  c[i] = {
1683
1683
  name: i,
1684
1684
  index: r,
@@ -1713,7 +1713,7 @@ var an = class extends M {
1713
1713
  let { type: s, isArray: c, name: l } = o;
1714
1714
  o.location === void 0 && (o.location = n.getUniformLocation(e.native, l));
1715
1715
  let u = o.location;
1716
- if (on(o.value, a)) switch (o.value = sn(o.value, a), s) {
1716
+ if (sn(o.value, a)) switch (o.value = cn(o.value, a), s) {
1717
1717
  case "float":
1718
1718
  c ? n.uniform1fv(u, a) : n.uniform1f(u, a);
1719
1719
  break;
@@ -1800,7 +1800,7 @@ var an = class extends M {
1800
1800
  super.destroy(), this.bind(null);
1801
1801
  }
1802
1802
  };
1803
- function on(e, t) {
1803
+ function sn(e, t) {
1804
1804
  if (typeof t == "object" && t) {
1805
1805
  let n = t.length;
1806
1806
  if (typeof e != "object" || !e || e.length !== n) return !0;
@@ -1809,7 +1809,7 @@ function on(e, t) {
1809
1809
  }
1810
1810
  return e !== t;
1811
1811
  }
1812
- function sn(e, t) {
1812
+ function cn(e, t) {
1813
1813
  if (typeof t == "object" && t) {
1814
1814
  let n = t.length;
1815
1815
  if (typeof e == "object" && e && e.length === n) {
@@ -1822,10 +1822,10 @@ function sn(e, t) {
1822
1822
  }
1823
1823
  //#endregion
1824
1824
  //#region src/core/renderers/gl/state/GlBlendMode.ts
1825
- var cn = /* @__PURE__ */ function(e) {
1825
+ var ln = /* @__PURE__ */ function(e) {
1826
1826
  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;
1827
1827
  }({});
1828
- function ln(e) {
1828
+ function un(e) {
1829
1829
  return {
1830
1830
  normal: [e.ONE, e.ONE_MINUS_SRC_ALPHA],
1831
1831
  add: [e.ONE, e.ONE],
@@ -1880,7 +1880,7 @@ function ln(e) {
1880
1880
  }
1881
1881
  //#endregion
1882
1882
  //#region src/core/renderers/gl/state/GlStateSystem.ts
1883
- var un = class e {
1883
+ var dn = class e {
1884
1884
  static _properties = [
1885
1885
  "blend",
1886
1886
  "offsets",
@@ -1907,14 +1907,14 @@ var un = class e {
1907
1907
  let t = new e();
1908
1908
  return t.depthTest = !1, t.blend = !0, t;
1909
1909
  }
1910
- _blendMode = cn.normal;
1910
+ _blendMode = ln.normal;
1911
1911
  _polygonOffset = 0;
1912
1912
  bitmap = 0;
1913
1913
  get blendMode() {
1914
1914
  return this._blendMode;
1915
1915
  }
1916
1916
  set blendMode(e) {
1917
- this.blend = e !== cn.none, this._blendMode = e;
1917
+ this.blend = e !== ln.none, this._blendMode = e;
1918
1918
  }
1919
1919
  get polygonOffset() {
1920
1920
  return this._polygonOffset;
@@ -1926,19 +1926,19 @@ var un = class e {
1926
1926
  if (e) for (let t in e) this[t] = e[t];
1927
1927
  }
1928
1928
  };
1929
- un._init();
1930
- var dn = class extends M {
1929
+ dn._init();
1930
+ var fn = class extends j {
1931
1931
  install(e) {
1932
1932
  super.install(e), e.state = this;
1933
1933
  }
1934
1934
  _blendEq = !1;
1935
- _setters = un._properties.map((e) => this[`set${e.replace(/^\S/, (e) => e.toUpperCase())}`]);
1935
+ _setters = dn._properties.map((e) => this[`set${e.replace(/^\S/, (e) => e.toUpperCase())}`]);
1936
1936
  boundStateBitmap = 0;
1937
1937
  boundBlendMode;
1938
1938
  blendModes;
1939
- defaultState = new un({ blend: !0 });
1939
+ defaultState = new dn({ blend: !0 });
1940
1940
  _updateContext(e) {
1941
- super._updateContext(e), this.blendModes = ln(e);
1941
+ super._updateContext(e), this.blendModes = un(e);
1942
1942
  }
1943
1943
  toggle(e, t) {
1944
1944
  this._renderer.gl[t ? "enable" : "disable"](e);
@@ -1981,14 +1981,14 @@ var dn = class extends M {
1981
1981
  }
1982
1982
  reset() {
1983
1983
  super.reset();
1984
- let e = (1 << un._properties.length) - 1;
1984
+ let e = (1 << dn._properties.length) - 1;
1985
1985
  this.boundStateBitmap = ~this.defaultState.bitmap & e, this.boundBlendMode = void 0, this._blendEq = !0, this.bind(this.defaultState);
1986
1986
  }
1987
- }, fn = class extends M {
1987
+ }, pn = class extends j {
1988
1988
  install(e) {
1989
1989
  super.install(e), e.batch2D = this;
1990
1990
  }
1991
- _state = un.for2D();
1991
+ _state = dn.for2D();
1992
1992
  _batchSize = 4096 * 4;
1993
1993
  _batchables = [];
1994
1994
  _vertexCount = 0;
@@ -2010,7 +2010,7 @@ var dn = class extends M {
2010
2010
  _createShader(e) {
2011
2011
  let t = this._renderer, n = {
2012
2012
  instanceId: ut(),
2013
- glProgram: new Yt({
2013
+ glProgram: new Xt({
2014
2014
  vertex: "precision highp float;\nin vec2 aPosition;\nin vec2 aUv;\nin vec4 aTextureParams;\nin vec4 aModulate;\n\nuniform vec2 size;\nuniform mat3 projectionMatrix;\nuniform mat3 viewMatrix;\n\nout float vTextureId;\nout float vClipOutsideUv;\nout vec2 vUv;\nout vec4 vModulate;\n\nvec2 roundPixels(vec2 position, vec2 targetSize) {\n return (floor(((position * 0.5 + 0.5) * targetSize) + 0.5) / targetSize) * 2.0 - 1.0;\n}\n\nvoid main(void) {\n mat3 modelMatrix = mat3(\n 1.0, 0.0, 0.0,\n 0.0, 1.0, 0.0,\n 0.0, 0.0, 1.0\n );\n mat3 modelViewProjectionMatrix = projectionMatrix * viewMatrix * modelMatrix;\n gl_Position = vec4((modelViewProjectionMatrix * vec3(aPosition, 1.0)).xy, 0.0, 1.0);\n vTextureId = aTextureParams.x;\n vClipOutsideUv = aTextureParams.y;\n if (aTextureParams.z == 1.) {\n gl_Position.xy = roundPixels(gl_Position.xy, size);\n }\n vUv = aUv;\n vModulate = aModulate;\n}",
2015
2015
  fragment: `precision highp float;
2016
2016
  in float vTextureId;
@@ -2040,11 +2040,11 @@ void main(void) {
2040
2040
  })
2041
2041
  }, r = {
2042
2042
  instanceId: ut(),
2043
- usage: j.vertex,
2043
+ usage: A.vertex,
2044
2044
  data: /* @__PURE__ */ new Float32Array()
2045
2045
  }, i = {
2046
2046
  instanceId: ut(),
2047
- usage: j.index,
2047
+ usage: A.index,
2048
2048
  data: /* @__PURE__ */ new Uint32Array()
2049
2049
  }, a = {
2050
2050
  instanceId: ut(),
@@ -2087,7 +2087,7 @@ void main(void) {
2087
2087
  let { indices: r, vertices: p, uvs: h = /* @__PURE__ */ new Float32Array(), size: g = {
2088
2088
  width: 0,
2089
2089
  height: 0
2090
- }, texture: ee, blendMode: te = cn.normal, clipOutsideUv: ne, roundPixels: re, modulate: ie = [
2090
+ }, texture: ee, blendMode: te = ln.normal, clipOutsideUv: ne, roundPixels: re, modulate: ie = [
2091
2091
  255,
2092
2092
  255,
2093
2093
  255,
@@ -2117,22 +2117,22 @@ void main(void) {
2117
2117
  }
2118
2118
  }
2119
2119
  _getBufferData(e) {
2120
- let t = pn(Math.ceil(e / 8)), n = mn(t), r = t * 8;
2120
+ let t = mn(Math.ceil(e / 8)), n = hn(t), r = t * 8;
2121
2121
  this._attributeBuffer.length <= n && (this._attributeBuffer.length = n + 1);
2122
2122
  let i = this._attributeBuffer[n];
2123
2123
  return i || (this._attributeBuffer[n] = i = /* @__PURE__ */ new ArrayBuffer(r * this._vertexSize * 4)), i;
2124
2124
  }
2125
2125
  _getIndexBufferData(e) {
2126
- let t = pn(Math.ceil(e / 12)), n = mn(t), r = t * 12;
2126
+ let t = mn(Math.ceil(e / 12)), n = hn(t), r = t * 12;
2127
2127
  this._indexBuffers.length <= n && (this._indexBuffers.length = n + 1);
2128
2128
  let i = this._indexBuffers[n];
2129
2129
  return i || (this._indexBuffers[n] = i = new Uint32Array(r)), i;
2130
2130
  }
2131
2131
  };
2132
- function pn(e) {
2132
+ function mn(e) {
2133
2133
  return e += +(e === 0), --e, e |= e >>> 1, e |= e >>> 2, e |= e >>> 4, e |= e >>> 8, e |= e >>> 16, e + 1;
2134
2134
  }
2135
- function mn(e) {
2135
+ function hn(e) {
2136
2136
  let t = (e > 65535) << 4;
2137
2137
  e >>>= t;
2138
2138
  let n = (e > 255) << 3;
@@ -2140,11 +2140,11 @@ function mn(e) {
2140
2140
  }
2141
2141
  //#endregion
2142
2142
  //#region src/core/renderers/gl/const.ts
2143
- var N = /* @__PURE__ */ function(e) {
2143
+ var M = /* @__PURE__ */ function(e) {
2144
2144
  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;
2145
- }({}), hn = /* @__PURE__ */ function(e) {
2145
+ }({}), gn = /* @__PURE__ */ function(e) {
2146
2146
  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;
2147
- }({}), gn = class extends M {
2147
+ }({}), _n = class extends j {
2148
2148
  install(e) {
2149
2149
  super.install(e), e.mask = this;
2150
2150
  }
@@ -2163,16 +2163,16 @@ var N = /* @__PURE__ */ function(e) {
2163
2163
  };
2164
2164
  this.stack.push(n);
2165
2165
  let r = this._renderer.renderTarget.current?.instanceId ?? -1, i = this._maskStackHash[r] ?? 0;
2166
- "x" in t ? this._renderer.scissor.push(t) : "render" in t && (this._renderer.flush(), this._renderer.renderTarget.ensureDepthStencil(), this._renderer.stencil.bind(N.renderingMaskAdd, i), this._renderer.colorMask.bind(0), i++, t.render(this._renderer), this._renderer.flush(), this._renderer.stencil.bind(N.maskActive, i), this._renderer.colorMask.bind(15)), this._maskStackHash[r] = i;
2166
+ "x" in t ? this._renderer.scissor.push(t) : "render" in t && (this._renderer.flush(), this._renderer.renderTarget.ensureDepthStencil(), this._renderer.stencil.bind(M.renderingMaskAdd, i), this._renderer.colorMask.bind(0), i++, t.render(this._renderer), this._renderer.flush(), this._renderer.stencil.bind(M.maskActive, i), this._renderer.colorMask.bind(15)), this._maskStackHash[r] = i;
2167
2167
  }
2168
2168
  pop(e) {
2169
2169
  let t = this.stack.pop();
2170
2170
  if (!t || t.source !== e) return;
2171
2171
  let { mask: n } = t, r = this._renderer.renderTarget.current?.instanceId ?? -1, i = this._maskStackHash[r] ?? 0;
2172
- "x" in n ? this._renderer.scissor.pop() : "render" in n && (this._renderer.flush(), i === 0 ? (this._renderer.clear(hn.stencil), this._renderer.stencil.bind(N.disabled, i)) : this._renderer.stencil.bind(N.renderingMaskRemove, i), i--, n.render(this._renderer), this._renderer.flush(), this._renderer.stencil.bind(N.maskActive, i), this._renderer.colorMask.bind(15)), this._maskStackHash[r] = i;
2172
+ "x" in n ? this._renderer.scissor.pop() : "render" in n && (this._renderer.flush(), i === 0 ? (this._renderer.clear(gn.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;
2173
2173
  }
2174
- }, _n = [];
2175
- _n[N.none] = {}, _n[N.disabled] = {}, _n[N.renderingMaskAdd] = {
2174
+ }, vn = [];
2175
+ vn[M.none] = {}, vn[M.disabled] = {}, vn[M.renderingMaskAdd] = {
2176
2176
  stencilFront: {
2177
2177
  compare: "equal",
2178
2178
  passOp: "increment-clamp"
@@ -2181,7 +2181,7 @@ _n[N.none] = {}, _n[N.disabled] = {}, _n[N.renderingMaskAdd] = {
2181
2181
  compare: "equal",
2182
2182
  passOp: "increment-clamp"
2183
2183
  }
2184
- }, _n[N.renderingMaskRemove] = {
2184
+ }, vn[M.renderingMaskRemove] = {
2185
2185
  stencilFront: {
2186
2186
  compare: "equal",
2187
2187
  passOp: "decrement-clamp"
@@ -2190,7 +2190,7 @@ _n[N.none] = {}, _n[N.disabled] = {}, _n[N.renderingMaskAdd] = {
2190
2190
  compare: "equal",
2191
2191
  passOp: "decrement-clamp"
2192
2192
  }
2193
- }, _n[N.maskActive] = {
2193
+ }, vn[M.maskActive] = {
2194
2194
  stencilFront: {
2195
2195
  compare: "equal",
2196
2196
  passOp: "keep"
@@ -2199,7 +2199,7 @@ _n[N.none] = {}, _n[N.disabled] = {}, _n[N.renderingMaskAdd] = {
2199
2199
  compare: "equal",
2200
2200
  passOp: "keep"
2201
2201
  }
2202
- }, _n[N.inverseMaskActive] = {
2202
+ }, vn[M.inverseMaskActive] = {
2203
2203
  stencilFront: {
2204
2204
  compare: "not-equal",
2205
2205
  passOp: "keep"
@@ -2209,17 +2209,17 @@ _n[N.none] = {}, _n[N.disabled] = {}, _n[N.renderingMaskAdd] = {
2209
2209
  passOp: "keep"
2210
2210
  }
2211
2211
  };
2212
- var vn = class extends M {
2212
+ var yn = class extends j {
2213
2213
  install(e) {
2214
2214
  super.install(e), e.stencil = this;
2215
2215
  }
2216
2216
  _cache = {
2217
2217
  enabled: !1,
2218
- stencilMode: N.none,
2218
+ stencilMode: M.none,
2219
2219
  refCount: 0
2220
2220
  };
2221
2221
  current = { [-1]: {
2222
- stencilMode: N.disabled,
2222
+ stencilMode: M.disabled,
2223
2223
  refCount: 0
2224
2224
  } };
2225
2225
  _passOpMap;
@@ -2249,20 +2249,20 @@ var vn = class extends M {
2249
2249
  super._setup(), this._renderer.renderTarget.on("updateRenderTarget", this._updateRenderTarget);
2250
2250
  }
2251
2251
  reset() {
2252
- this._cache.enabled = !1, this._cache.stencilMode = N.none, this._cache.refCount = 0;
2252
+ this._cache.enabled = !1, this._cache.stencilMode = M.none, this._cache.refCount = 0;
2253
2253
  }
2254
2254
  _updateRenderTarget = (e) => {
2255
2255
  if (e) {
2256
2256
  let t = this.current[e.instanceId];
2257
2257
  t ||= this.current[e.instanceId] = {
2258
- stencilMode: N.disabled,
2258
+ stencilMode: M.disabled,
2259
2259
  refCount: 0
2260
2260
  }, this.bind(t.stencilMode, t.refCount);
2261
2261
  }
2262
2262
  };
2263
2263
  bind(e, t) {
2264
- let n = this.current[this._renderer.renderTarget.current?.instanceId ?? -1], r = this._gl, i = _n[e], a = this._cache;
2265
- if (n.stencilMode = e, n.refCount = t, e === N.disabled) {
2264
+ let n = this.current[this._renderer.renderTarget.current?.instanceId ?? -1], r = this._gl, i = vn[e], a = this._cache;
2265
+ if (n.stencilMode = e, n.refCount = t, e === M.disabled) {
2266
2266
  this._cache.enabled && (this._cache.enabled = !1, r.disable(r.STENCIL_TEST));
2267
2267
  return;
2268
2268
  }
@@ -2271,8 +2271,8 @@ var vn = class extends M {
2271
2271
  destroy() {
2272
2272
  super.destroy(), this._renderer.renderTarget.off("updateRenderTarget", this._updateRenderTarget);
2273
2273
  }
2274
- }, yn = class extends M {
2275
- current = new yt(0, 0, 0, 0);
2274
+ }, bn = class extends j {
2275
+ current = new bt(0, 0, 0, 0);
2276
2276
  install(e) {
2277
2277
  super.install(e), e.viewport = this;
2278
2278
  }
@@ -2280,7 +2280,7 @@ var vn = class extends M {
2280
2280
  let t = this.current, n = Math.floor(e.x), r = Math.floor(e.y), i = Math.floor(e.width), a = Math.floor(e.height);
2281
2281
  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);
2282
2282
  }
2283
- }, bn = class {
2283
+ }, xn = class {
2284
2284
  framebuffer;
2285
2285
  width = -1;
2286
2286
  height = -1;
@@ -2291,7 +2291,7 @@ var vn = class extends M {
2291
2291
  constructor(e) {
2292
2292
  this.framebuffer = e;
2293
2293
  }
2294
- }, xn = class extends M {
2294
+ }, Sn = class extends j {
2295
2295
  install(e) {
2296
2296
  super.install(e), e.renderTarget = this;
2297
2297
  }
@@ -2301,7 +2301,7 @@ var vn = class extends M {
2301
2301
  _msaaSamples = [];
2302
2302
  _hasMRT = !0;
2303
2303
  _writeDepthTexture = !0;
2304
- projection = new Tt();
2304
+ projection = new Et();
2305
2305
  _updateContext(e) {
2306
2306
  if (super._updateContext(e), this._hasMRT = !0, this._writeDepthTexture = !0, this._renderer.version === 1) {
2307
2307
  let t = this._renderer.extensions.drawBuffers, n = this._renderer.extensions.depthTexture;
@@ -2337,7 +2337,7 @@ var vn = class extends M {
2337
2337
  return this.glRenderTargets.get(e.instanceId) || this._createGlRenderTarget(e);
2338
2338
  }
2339
2339
  _createGlRenderTarget(e) {
2340
- let t = this._gl, n = new bn(t.createFramebuffer());
2340
+ let t = this._gl, n = new xn(t.createFramebuffer());
2341
2341
  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) => {
2342
2342
  switch (t) {
2343
2343
  case "width":
@@ -2414,28 +2414,28 @@ var vn = class extends M {
2414
2414
  reset() {
2415
2415
  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;
2416
2416
  }
2417
- }, Sn = /* @__PURE__ */ function(e) {
2417
+ }, Cn = /* @__PURE__ */ function(e) {
2418
2418
  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;
2419
- }({}), Cn = /* @__PURE__ */ function(e) {
2419
+ }({}), wn = /* @__PURE__ */ function(e) {
2420
2420
  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;
2421
- }({}), P = /* @__PURE__ */ function(e) {
2421
+ }({}), N = /* @__PURE__ */ function(e) {
2422
2422
  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;
2423
- }({}), wn = class {
2423
+ }({}), Tn = class {
2424
2424
  native;
2425
- target = Cn.TEXTURE_2D;
2425
+ target = wn.TEXTURE_2D;
2426
2426
  width = -1;
2427
2427
  height = -1;
2428
2428
  mipmap = !1;
2429
- type = P.UNSIGNED_BYTE;
2430
- internalFormat = Sn.RGBA;
2431
- format = Sn.RGBA;
2429
+ type = N.UNSIGNED_BYTE;
2430
+ internalFormat = Cn.RGBA;
2431
+ format = Cn.RGBA;
2432
2432
  constructor(e) {
2433
2433
  this.native = e;
2434
2434
  }
2435
2435
  };
2436
2436
  //#endregion
2437
2437
  //#region src/core/renderers/gl/texture/mapFormatToGlFormat.ts
2438
- function Tn(e) {
2438
+ function En(e) {
2439
2439
  return {
2440
2440
  r8unorm: e.RED,
2441
2441
  r8snorm: e.RED,
@@ -2483,7 +2483,7 @@ function Tn(e) {
2483
2483
  }
2484
2484
  //#endregion
2485
2485
  //#region src/core/renderers/gl/texture/mapFormatToGlInternalFormat.ts
2486
- function En(e, t) {
2486
+ function Dn(e, t) {
2487
2487
  let n = {}, r = e.RGBA;
2488
2488
  return e instanceof WebGLRenderingContext ? t.srgb && (n = {
2489
2489
  "rgba8unorm-srgb": t.srgb.SRGB8_ALPHA8_EXT,
@@ -2599,7 +2599,7 @@ function En(e, t) {
2599
2599
  }
2600
2600
  //#endregion
2601
2601
  //#region src/core/renderers/gl/texture/mapFormatToGlType.ts
2602
- function Dn(e) {
2602
+ function On(e) {
2603
2603
  return {
2604
2604
  r8unorm: e.UNSIGNED_BYTE,
2605
2605
  r8snorm: e.BYTE,
@@ -2647,7 +2647,7 @@ function Dn(e) {
2647
2647
  }
2648
2648
  //#endregion
2649
2649
  //#region src/core/renderers/gl/texture/updateTextureStyle.ts
2650
- var On = {
2650
+ var kn = {
2651
2651
  linear: {
2652
2652
  linear: 9987,
2653
2653
  nearest: 9985
@@ -2656,10 +2656,10 @@ var On = {
2656
2656
  linear: 9986,
2657
2657
  nearest: 9984
2658
2658
  }
2659
- }, kn = {
2659
+ }, An = {
2660
2660
  linear: 9729,
2661
2661
  nearest: 9728
2662
- }, An = {
2662
+ }, jn = {
2663
2663
  never: 512,
2664
2664
  less: 513,
2665
2665
  equal: 514,
@@ -2668,32 +2668,32 @@ var On = {
2668
2668
  "not-equal": 517,
2669
2669
  "greater-equal": 518,
2670
2670
  always: 519
2671
- }, jn = {
2671
+ }, Mn = {
2672
2672
  "clamp-to-edge": 33071,
2673
2673
  repeat: 10497,
2674
2674
  "mirror-repeat": 33648
2675
2675
  };
2676
- function Mn(e, t, n, r, i, a, o, s) {
2676
+ function Nn(e, t, n, r, i, a, o, s) {
2677
2677
  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;
2678
2678
  if (!s || c !== "repeat" || l !== "repeat" || u !== "repeat") {
2679
- let e = jn[o ? "clamp-to-edge" : c], n = jn[o ? "clamp-to-edge" : l], r = jn[o ? "clamp-to-edge" : u];
2679
+ let e = Mn[o ? "clamp-to-edge" : c], n = Mn[o ? "clamp-to-edge" : l], r = Mn[o ? "clamp-to-edge" : u];
2680
2680
  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);
2681
2681
  }
2682
- if ((!s || d !== "linear") && t[i](g, t.TEXTURE_MAG_FILTER, kn[d]), n) {
2682
+ if ((!s || d !== "linear") && t[i](g, t.TEXTURE_MAG_FILTER, An[d]), n) {
2683
2683
  if (!s || p !== "linear") {
2684
- let e = On[f][p];
2684
+ let e = kn[f][p];
2685
2685
  t[i](g, t.TEXTURE_MIN_FILTER, e);
2686
2686
  }
2687
- } else t[i](g, t.TEXTURE_MIN_FILTER, kn[f]);
2687
+ } else t[i](g, t.TEXTURE_MIN_FILTER, An[f]);
2688
2688
  if (r && m > 1) {
2689
2689
  let e = Math.min(m, t.getParameter(r.MAX_TEXTURE_MAX_ANISOTROPY_EXT));
2690
2690
  t[i](g, r.TEXTURE_MAX_ANISOTROPY_EXT, e);
2691
2691
  }
2692
- h && t[i](g, t.TEXTURE_COMPARE_FUNC, An[h]);
2692
+ h && t[i](g, t.TEXTURE_COMPARE_FUNC, jn[h]);
2693
2693
  }
2694
2694
  //#endregion
2695
2695
  //#region src/core/renderers/gl/texture/uploaders/index.ts
2696
- var Nn = {
2696
+ var Pn = {
2697
2697
  buffer: {
2698
2698
  id: "buffer",
2699
2699
  upload: (e, t, n) => {
@@ -2707,8 +2707,8 @@ var Nn = {
2707
2707
  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;
2708
2708
  }
2709
2709
  }
2710
- }, Pn = class extends M {
2711
- uploaders = { ...Nn };
2710
+ }, Fn = class extends j {
2711
+ uploaders = { ...Pn };
2712
2712
  textures = /* @__PURE__ */ new Map();
2713
2713
  glTextures = /* @__PURE__ */ new Map();
2714
2714
  _mapFormatToInternalFormat = Object.create(null);
@@ -2723,14 +2723,14 @@ var Nn = {
2723
2723
  super.install(e), e.texture = this;
2724
2724
  }
2725
2725
  _updateContext(e) {
2726
- super._updateContext(e), Object.keys(this._mapFormatToInternalFormat).length || (this._mapFormatToInternalFormat = En(e, this._renderer.extensions), this._mapFormatToType = Dn(e), this._mapFormatToFormat = Tn(e)), this.maxTextureSize = e.getParameter(e.MAX_TEXTURE_SIZE), this.maxTextureImageUnits = e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS);
2726
+ super._updateContext(e), Object.keys(this._mapFormatToInternalFormat).length || (this._mapFormatToInternalFormat = Dn(e, this._renderer.extensions), this._mapFormatToType = On(e), this._mapFormatToFormat = En(e)), this.maxTextureSize = e.getParameter(e.MAX_TEXTURE_SIZE), this.maxTextureImageUnits = e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS);
2727
2727
  for (let e = 0; e < this.maxTextureImageUnits; e++) this.unbind(e);
2728
2728
  }
2729
2729
  getGlTexture(e) {
2730
2730
  return this.glTextures.get(e.instanceId) || this._createGlTexture(e);
2731
2731
  }
2732
2732
  _createGlTexture(e) {
2733
- let t = this._gl, n = new wn(t.createTexture());
2733
+ let t = this._gl, n = new Tn(t.createTexture());
2734
2734
  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)) {
2735
2735
  let t = Math.max(e.pixelWidth ?? e.width, e.pixelHeight ?? e.height);
2736
2736
  e.mipLevelCount = Math.floor(Math.log2(t)) + 1;
@@ -2790,7 +2790,7 @@ var Nn = {
2790
2790
  }
2791
2791
  updateStyle(e, t = !1) {
2792
2792
  let n = this._gl;
2793
- Mn(e, n, e.mipLevelCount > 1, this._renderer.extensions.anisotropicFiltering, "texParameteri", n.TEXTURE_2D, !this._renderer.supports.nonPowOf2wrapping && !e.isPowerOfTwo, t);
2793
+ Nn(e, n, e.mipLevelCount > 1, this._renderer.extensions.anisotropicFiltering, "texParameteri", n.TEXTURE_2D, !this._renderer.supports.nonPowOf2wrapping && !e.isPowerOfTwo, t);
2794
2794
  }
2795
2795
  updateGpuTexture(e) {
2796
2796
  this.bind(e);
@@ -2805,50 +2805,50 @@ var Nn = {
2805
2805
  let e = this._gl;
2806
2806
  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);
2807
2807
  }
2808
- }, Fn = {
2809
- uint8x2: P.UNSIGNED_BYTE,
2810
- uint8x4: P.UNSIGNED_BYTE,
2811
- sint8x2: P.BYTE,
2812
- sint8x4: P.BYTE,
2813
- unorm8x2: P.UNSIGNED_BYTE,
2814
- unorm8x4: P.UNSIGNED_BYTE,
2815
- snorm8x2: P.BYTE,
2816
- snorm8x4: P.BYTE,
2817
- uint16x2: P.UNSIGNED_SHORT,
2818
- uint16x4: P.UNSIGNED_SHORT,
2819
- sint16x2: P.SHORT,
2820
- sint16x4: P.SHORT,
2821
- unorm16x2: P.UNSIGNED_SHORT,
2822
- unorm16x4: P.UNSIGNED_SHORT,
2823
- snorm16x2: P.SHORT,
2824
- snorm16x4: P.SHORT,
2825
- float16x2: P.HALF_FLOAT,
2826
- float16x4: P.HALF_FLOAT,
2827
- float32: P.FLOAT,
2828
- float32x2: P.FLOAT,
2829
- float32x3: P.FLOAT,
2830
- float32x4: P.FLOAT,
2831
- uint32: P.UNSIGNED_INT,
2832
- uint32x2: P.UNSIGNED_INT,
2833
- uint32x3: P.UNSIGNED_INT,
2834
- uint32x4: P.UNSIGNED_INT,
2835
- sint32: P.INT,
2836
- sint32x2: P.INT,
2837
- sint32x3: P.INT,
2838
- sint32x4: P.INT
2808
+ }, In = {
2809
+ uint8x2: N.UNSIGNED_BYTE,
2810
+ uint8x4: N.UNSIGNED_BYTE,
2811
+ sint8x2: N.BYTE,
2812
+ sint8x4: N.BYTE,
2813
+ unorm8x2: N.UNSIGNED_BYTE,
2814
+ unorm8x4: N.UNSIGNED_BYTE,
2815
+ snorm8x2: N.BYTE,
2816
+ snorm8x4: N.BYTE,
2817
+ uint16x2: N.UNSIGNED_SHORT,
2818
+ uint16x4: N.UNSIGNED_SHORT,
2819
+ sint16x2: N.SHORT,
2820
+ sint16x4: N.SHORT,
2821
+ unorm16x2: N.UNSIGNED_SHORT,
2822
+ unorm16x4: N.UNSIGNED_SHORT,
2823
+ snorm16x2: N.SHORT,
2824
+ snorm16x4: N.SHORT,
2825
+ float16x2: N.HALF_FLOAT,
2826
+ float16x4: N.HALF_FLOAT,
2827
+ float32: N.FLOAT,
2828
+ float32x2: N.FLOAT,
2829
+ float32x3: N.FLOAT,
2830
+ float32x4: N.FLOAT,
2831
+ uint32: N.UNSIGNED_INT,
2832
+ uint32x2: N.UNSIGNED_INT,
2833
+ uint32x3: N.UNSIGNED_INT,
2834
+ uint32x4: N.UNSIGNED_INT,
2835
+ sint32: N.INT,
2836
+ sint32x2: N.INT,
2837
+ sint32x3: N.INT,
2838
+ sint32x4: N.INT
2839
2839
  };
2840
- function In(e) {
2841
- return Fn[e] ?? Fn.float32;
2840
+ function Ln(e) {
2841
+ return In[e] ?? In.float32;
2842
2842
  }
2843
2843
  //#endregion
2844
2844
  //#region src/core/renderers/gl/geometry/GlGeometrySystem.ts
2845
- var Ln = {
2845
+ var Rn = {
2846
2846
  "point-list": 0,
2847
2847
  "line-list": 1,
2848
2848
  "line-strip": 3,
2849
2849
  "triangle-list": 4,
2850
2850
  "triangle-strip": 5
2851
- }, Rn = class extends M {
2851
+ }, zn = class extends j {
2852
2852
  _geometryVaoHash = {};
2853
2853
  hasInstance = !1;
2854
2854
  current = null;
@@ -2887,11 +2887,11 @@ var Ln = {
2887
2887
  }
2888
2888
  for (let e in r) {
2889
2889
  let t = r[e];
2890
- i[t.buffer.instanceId] += Zt(t.format).stride;
2890
+ i[t.buffer.instanceId] += Qt(t.format).stride;
2891
2891
  }
2892
2892
  for (let e in r) {
2893
2893
  let t = r[e];
2894
- t.stride ??= i[t.buffer.instanceId], t.start ??= a[t.buffer.instanceId], a[t.buffer.instanceId] += Zt(t.format).stride;
2894
+ t.stride ??= i[t.buffer.instanceId], t.start ??= a[t.buffer.instanceId], a[t.buffer.instanceId] += Qt(t.format).stride;
2895
2895
  }
2896
2896
  }
2897
2897
  _createVao(e, t) {
@@ -2926,7 +2926,7 @@ var Ln = {
2926
2926
  a !== c && (r.bind(s), a = c);
2927
2927
  let e = l.location;
2928
2928
  n.enableVertexAttribArray(e);
2929
- let t = Zt(o.format), i = In(o.format);
2929
+ let t = Qt(o.format), i = Ln(o.format);
2930
2930
  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) {
2931
2931
  let t = o.divisor ?? 1;
2932
2932
  n.vertexAttribDivisor(e, t);
@@ -2959,7 +2959,7 @@ var Ln = {
2959
2959
  let { topology: t, size: n, start: r = 0, instanceCount: i } = e, { gl: a } = this._renderer, o = this.current;
2960
2960
  if (!o) return this;
2961
2961
  t = t || o.topology || "triangle-list";
2962
- let s = Ln[t];
2962
+ let s = Rn[t];
2963
2963
  if (i = i || o.instanceCount || 1, o.indexBuffer) {
2964
2964
  n ||= o.indexBuffer.data.length;
2965
2965
  let e = o.indexBuffer.data.BYTES_PER_ELEMENT, t = e === 2 ? a.UNSIGNED_SHORT : a.UNSIGNED_INT;
@@ -2980,7 +2980,7 @@ var Ln = {
2980
2980
  }
2981
2981
  this._geometryVaoHash = {}, this.current = null, this.currentVao = null;
2982
2982
  }
2983
- }, zn = class extends M {
2983
+ }, Bn = class extends j {
2984
2984
  install(e) {
2985
2985
  super.install(e), e.colorMask = this;
2986
2986
  }
@@ -2991,19 +2991,19 @@ var Ln = {
2991
2991
  };
2992
2992
  //#endregion
2993
2993
  //#region src/core/renderers/gl/GlScissorSystem.ts
2994
- function Bn(e, t, n) {
2994
+ function Vn(e, t, n) {
2995
2995
  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;
2996
2996
  return {
2997
2997
  x: f / m,
2998
2998
  y: p / m
2999
2999
  };
3000
3000
  }
3001
- function Vn(e, t) {
3001
+ function Hn(e, t) {
3002
3002
  let { x: n, y: r, width: i, height: a } = t, o = [
3003
- Bn(e, n, r),
3004
- Bn(e, n + i, r),
3005
- Bn(e, n + i, r + a),
3006
- Bn(e, n, r + a)
3003
+ Vn(e, n, r),
3004
+ Vn(e, n + i, r),
3005
+ Vn(e, n + i, r + a),
3006
+ Vn(e, n, r + a)
3007
3007
  ], 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);
3008
3008
  return {
3009
3009
  x: l,
@@ -3012,7 +3012,7 @@ function Vn(e, t) {
3012
3012
  height: f - d
3013
3013
  };
3014
3014
  }
3015
- function Hn(e, t) {
3015
+ function Un(e, t) {
3016
3016
  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);
3017
3017
  return {
3018
3018
  x: n,
@@ -3021,7 +3021,7 @@ function Hn(e, t) {
3021
3021
  height: Math.max(0, a - r)
3022
3022
  };
3023
3023
  }
3024
- var Un = class extends M {
3024
+ var Wn = class extends j {
3025
3025
  install(e) {
3026
3026
  super.install(e), e.scissor = this;
3027
3027
  }
@@ -3045,7 +3045,7 @@ var Un = class extends M {
3045
3045
  y: e.y,
3046
3046
  width: e.width,
3047
3047
  height: e.height
3048
- }, i = n ? Hn(n, r) : r;
3048
+ }, i = n ? Un(n, r) : r;
3049
3049
  t.stack.push(i), this.bind(i);
3050
3050
  }
3051
3051
  pop() {
@@ -3056,28 +3056,28 @@ var Un = class extends M {
3056
3056
  let t = this._gl;
3057
3057
  if (e) {
3058
3058
  t.enable(t.SCISSOR_TEST);
3059
- let { pixelRatio: n, viewport: r } = this._renderer, { viewMatrix: i } = this._renderer.shader.uniforms, { x: a, y: o, width: s, height: c } = Vn(i, e), l = r.current.height / n - (o + c);
3059
+ let { pixelRatio: n, viewport: r } = this._renderer, { viewMatrix: i } = this._renderer.shader.uniforms, { x: a, y: o, width: s, height: c } = Hn(i, e), l = r.current.height / n - (o + c);
3060
3060
  t.scissor(a * n, l * n, s * n, c * n);
3061
3061
  } else t.disable(t.SCISSOR_TEST);
3062
3062
  }
3063
3063
  destroy() {
3064
3064
  super.destroy(), this._renderer.renderTarget.off("updateRenderTarget", this._updateRenderTarget);
3065
3065
  }
3066
- }, Wn = class extends jt {
3066
+ }, Gn = class extends Mt {
3067
3067
  contextLost = !1;
3068
3068
  _systems = [
3069
- new Pn(),
3070
- new Lt(),
3071
- new an(),
3072
- new Rn(),
3073
- new xn(),
3074
- new dn(),
3075
- new gn(),
3069
+ new Fn(),
3070
+ new Rt(),
3071
+ new on(),
3076
3072
  new zn(),
3077
- new vn(),
3078
- new Un(),
3073
+ new Sn(),
3079
3074
  new fn(),
3080
- new yn()
3075
+ new _n(),
3076
+ new Bn(),
3077
+ new yn(),
3078
+ new Wn(),
3079
+ new pn(),
3080
+ new bn()
3081
3081
  ];
3082
3082
  bindPoints = /* @__PURE__ */ new Map();
3083
3083
  supports = {
@@ -3171,8 +3171,8 @@ var Un = class extends M {
3171
3171
  height: this.screen.height * this.pixelRatio
3172
3172
  });
3173
3173
  }
3174
- clear(e = hn.all) {
3175
- typeof e == "boolean" && (e = e ? hn.all : hn.none), e && this.gl.clear(e);
3174
+ clear(e = gn.all) {
3175
+ typeof e == "boolean" && (e = e ? gn.all : gn.none), e && this.gl.clear(e);
3176
3176
  }
3177
3177
  reset() {
3178
3178
  this._systems.forEach((e) => e.reset());
@@ -3189,7 +3189,7 @@ var Un = class extends M {
3189
3189
  for (let e = 0; e < i; e += a) c.set(s.subarray(e, e + a), o - e);
3190
3190
  return c;
3191
3191
  }
3192
- }, Gn = class {}, Kn = class extends Gn {
3192
+ }, Kn = class {}, qn = class extends Kn {
3193
3193
  install(e) {
3194
3194
  let t = async (e) => {
3195
3195
  let { parseFont: t } = await import("modern-font");
@@ -3203,15 +3203,15 @@ var Un = class extends M {
3203
3203
  e.register(n, t);
3204
3204
  }), e.font = this, this;
3205
3205
  }
3206
- }, qn = class extends E {
3206
+ }, Jn = class extends yt {
3207
3207
  constructor(e) {
3208
3208
  super(), this.setProperties(e);
3209
3209
  }
3210
3210
  };
3211
- A([_({ fallback: j.index }), k("design:type", j === void 0 ? Object : j)], qn.prototype, "usage", void 0), A([_({ default: () => /* @__PURE__ */ new Uint32Array() }), k("design:type", Object)], qn.prototype, "data", void 0);
3211
+ k([_({ fallback: A.index }), O("design:type", A === void 0 ? Object : A)], Jn.prototype, "usage", void 0), k([_({ default: () => /* @__PURE__ */ new Uint32Array() }), O("design:type", Object)], Jn.prototype, "data", void 0);
3212
3212
  //#endregion
3213
3213
  //#region src/scene/resources/geometries/Geometry.ts
3214
- var Jn = class extends E {
3214
+ var Yn = class extends yt {
3215
3215
  constructor(e = {}) {
3216
3216
  super(), this.setProperties(e);
3217
3217
  }
@@ -3219,32 +3219,32 @@ var Jn = class extends E {
3219
3219
  e.flush(), t.activate(e, n), e.geometry.bind(this, t.glProgram), e.geometry.draw(), e.geometry.unbind();
3220
3220
  }
3221
3221
  };
3222
- A([_({ fallback: "triangle-list" }), k("design:type", Object)], Jn.prototype, "topology", void 0), A([_({ default: () => ({}) }), k("design:type", typeof Record > "u" ? Object : Record)], Jn.prototype, "attributes", void 0), A([_({ default: () => new qn() }), k("design:type", qn === void 0 ? Object : qn)], Jn.prototype, "indexBuffer", void 0), A([_({ fallback: 1 }), k("design:type", Number)], Jn.prototype, "instanceCount", void 0);
3222
+ k([_({ fallback: "triangle-list" }), O("design:type", Object)], Yn.prototype, "topology", void 0), k([_({ default: () => ({}) }), O("design:type", typeof Record > "u" ? Object : Record)], Yn.prototype, "attributes", void 0), k([_({ default: () => new Jn() }), O("design:type", Jn === void 0 ? Object : Jn)], Yn.prototype, "indexBuffer", void 0), k([_({ fallback: 1 }), O("design:type", Number)], Yn.prototype, "instanceCount", void 0);
3223
3223
  //#endregion
3224
3224
  //#region src/scene/resources/geometries/VertexBuffer.ts
3225
- var F = class extends E {
3225
+ var P = class extends yt {
3226
3226
  constructor(e) {
3227
3227
  super(), this.setProperties(e);
3228
3228
  }
3229
3229
  };
3230
- A([_({ fallback: j.vertex }), k("design:type", j === void 0 ? Object : j)], F.prototype, "usage", void 0), A([_({ default: () => /* @__PURE__ */ new Float32Array() }), k("design:type", Object)], F.prototype, "data", void 0);
3230
+ k([_({ fallback: A.vertex }), O("design:type", A === void 0 ? Object : A)], P.prototype, "usage", void 0), k([_({ default: () => /* @__PURE__ */ new Float32Array() }), O("design:type", Object)], P.prototype, "data", void 0);
3231
3231
  //#endregion
3232
3232
  //#region src/scene/resources/geometries/VertexAttribute.ts
3233
- var I = class extends E {
3233
+ var F = class extends yt {
3234
3234
  constructor(e) {
3235
3235
  super(), this.setProperties(e);
3236
3236
  }
3237
3237
  };
3238
- A([_({ default: () => new F() }), k("design:type", F === void 0 ? Object : F)], I.prototype, "buffer", void 0), A([_({ fallback: "float32" }), k("design:type", Object)], I.prototype, "format", void 0), A([_(), k("design:type", Boolean)], I.prototype, "instance", void 0), A([_(), k("design:type", Number)], I.prototype, "stride", void 0), A([_(), k("design:type", Number)], I.prototype, "offset", void 0), A([_(), k("design:type", Number)], I.prototype, "start", void 0), A([_(), k("design:type", Number)], I.prototype, "divisor", void 0);
3238
+ 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);
3239
3239
  //#endregion
3240
3240
  //#region src/scene/resources/geometries/QuadGeometry.ts
3241
- var Yn = class extends Jn {
3241
+ var Xn = class extends Yn {
3242
3242
  constructor() {
3243
3243
  super({
3244
3244
  topology: "triangle-strip",
3245
- attributes: { position: new I({
3245
+ attributes: { position: new F({
3246
3246
  format: "float32x2",
3247
- buffer: new F({ data: new Float32Array([
3247
+ buffer: new P({ data: new Float32Array([
3248
3248
  0,
3249
3249
  0,
3250
3250
  1,
@@ -3255,7 +3255,7 @@ var Yn = class extends Jn {
3255
3255
  1
3256
3256
  ]) })
3257
3257
  }) },
3258
- indexBuffer: new qn({ data: new Uint32Array([
3258
+ indexBuffer: new Jn({ data: new Uint32Array([
3259
3259
  0,
3260
3260
  1,
3261
3261
  3,
@@ -3266,7 +3266,7 @@ var Yn = class extends Jn {
3266
3266
  };
3267
3267
  //#endregion
3268
3268
  //#region src/scene/resources/materials/Material.ts
3269
- function Xn() {
3269
+ function Zn() {
3270
3270
  return {
3271
3271
  projectionMatrix: new Float32Array([
3272
3272
  1,
@@ -3298,13 +3298,13 @@ function Xn() {
3298
3298
  ])
3299
3299
  };
3300
3300
  }
3301
- var L = class extends E {
3301
+ var I = class extends yt {
3302
3302
  static instance = new this();
3303
3303
  glProgram;
3304
3304
  constructor(e = {}) {
3305
3305
  super();
3306
3306
  let { uniforms: t, gl: n } = e;
3307
- t && (this.uniforms = t), this.glProgram = new Yt({
3307
+ t && (this.uniforms = t), this.glProgram = new Xt({
3308
3308
  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}",
3309
3309
  fragment: "uniform vec4 tint;\nvoid main(void) {\n gl_FragColor = tint;\n}",
3310
3310
  ...n
@@ -3317,13 +3317,13 @@ var L = class extends E {
3317
3317
  }, e.shader.updateUniforms(this);
3318
3318
  }
3319
3319
  };
3320
- A([_({ default: Xn }), k("design:type", typeof Record > "u" ? Object : Record)], L.prototype, "uniforms", void 0);
3320
+ k([_({ default: Zn }), O("design:type", typeof Record > "u" ? Object : Record)], I.prototype, "uniforms", void 0);
3321
3321
  //#endregion
3322
3322
  //#region src/scene/resources/materials/EffectMaterial.ts
3323
- var Zn = /^uniform \w+ (.+?);\s*\/\/\s*=\s*([^;]+?)[\s;]*$/gm, Qn = /vec(\d)\((.*)\)/;
3324
- function $n(e) {
3323
+ var Qn = /^uniform \w+ (.+?);\s*\/\/\s*=\s*([^;]+?)[\s;]*$/gm, $n = /vec(\d)\((.*)\)/;
3324
+ function er(e) {
3325
3325
  e = e.trim();
3326
- let t = e.match(Qn);
3326
+ let t = e.match($n);
3327
3327
  if (t) {
3328
3328
  let e = Array.from({ length: Number(t[1]) }, () => 0);
3329
3329
  return t[2].split(",").forEach((t, n) => {
@@ -3332,7 +3332,7 @@ function $n(e) {
3332
3332
  }
3333
3333
  return Number(e);
3334
3334
  }
3335
- var er = class e extends L {
3335
+ var tr = class e extends I {
3336
3336
  static RE = {
3337
3337
  getColor: /\sgetColor\s*\(/,
3338
3338
  getFromColor: /\sgetFromColor\s*\(/,
@@ -3368,12 +3368,12 @@ ${t}${n.transform ? "\nvoid main(void) { gl_FragColor = transform(vUv); }" : n.t
3368
3368
  progress: 0
3369
3369
  }
3370
3370
  }), this.has = n;
3371
- let r = t.matchAll(Zn);
3371
+ let r = t.matchAll(Qn);
3372
3372
  for (let e of r) e[1] && e[2] && e[1].split(",").forEach((t) => {
3373
- this.uniforms[t.trim()] = $n(e[2]);
3373
+ this.uniforms[t.trim()] = er(e[2]);
3374
3374
  });
3375
3375
  }
3376
- }, tr = class extends L {
3376
+ }, nr = class extends I {
3377
3377
  static _instance;
3378
3378
  static get instance() {
3379
3379
  return this._instance ??= new this();
@@ -3417,20 +3417,20 @@ ${t}${n.transform ? "\nvoid main(void) { gl_FragColor = transform(vUv); }" : n.t
3417
3417
  }
3418
3418
  });
3419
3419
  }
3420
- }, R = class extends Jn {
3420
+ }, L = class extends Yn {
3421
3421
  static _instance;
3422
3422
  static get instance() {
3423
3423
  return this._instance ??= new this();
3424
3424
  }
3425
- static draw(e, t = tr.instance, n) {
3425
+ static draw(e, t = nr.instance, n) {
3426
3426
  this.instance.draw(e, t, n);
3427
3427
  }
3428
3428
  constructor() {
3429
3429
  super({
3430
3430
  attributes: {
3431
- position: new I({
3431
+ position: new F({
3432
3432
  format: "float32x2",
3433
- buffer: new F({ data: new Float32Array([
3433
+ buffer: new P({ data: new Float32Array([
3434
3434
  -1,
3435
3435
  -1,
3436
3436
  1,
@@ -3441,9 +3441,9 @@ ${t}${n.transform ? "\nvoid main(void) { gl_FragColor = transform(vUv); }" : n.t
3441
3441
  1
3442
3442
  ]) })
3443
3443
  }),
3444
- uv: new I({
3444
+ uv: new F({
3445
3445
  format: "float32x2",
3446
- buffer: new F({ data: new Float32Array([
3446
+ buffer: new P({ data: new Float32Array([
3447
3447
  0,
3448
3448
  0,
3449
3449
  1,
@@ -3455,7 +3455,7 @@ ${t}${n.transform ? "\nvoid main(void) { gl_FragColor = transform(vUv); }" : n.t
3455
3455
  ]) })
3456
3456
  })
3457
3457
  },
3458
- indexBuffer: new qn({ data: new Uint32Array([
3458
+ indexBuffer: new Jn({ data: new Uint32Array([
3459
3459
  0,
3460
3460
  1,
3461
3461
  2,
@@ -3465,27 +3465,27 @@ ${t}${n.transform ? "\nvoid main(void) { gl_FragColor = transform(vUv); }" : n.t
3465
3465
  ]) })
3466
3466
  });
3467
3467
  }
3468
- }, nr = class extends Jn {
3468
+ }, rr = class extends Yn {
3469
3469
  positionBuffer;
3470
3470
  uvBuffer;
3471
3471
  constructor(e) {
3472
- let t = new F({ data: /* @__PURE__ */ new Float32Array() }), n = new F({ data: /* @__PURE__ */ new Float32Array() });
3472
+ let t = new P({ data: /* @__PURE__ */ new Float32Array() }), n = new P({ data: /* @__PURE__ */ new Float32Array() });
3473
3473
  super({
3474
3474
  ...e,
3475
3475
  attributes: {
3476
- position: new I({
3476
+ position: new F({
3477
3477
  format: "float32x2",
3478
3478
  buffer: t
3479
3479
  }),
3480
- uv: new I({
3480
+ uv: new F({
3481
3481
  format: "float32x2",
3482
3482
  buffer: n
3483
3483
  })
3484
3484
  },
3485
- indexBuffer: new qn({ data: /* @__PURE__ */ new Uint32Array() })
3485
+ indexBuffer: new Jn({ data: /* @__PURE__ */ new Uint32Array() })
3486
3486
  }), this.positionBuffer = t, this.uvBuffer = n;
3487
3487
  }
3488
- }, z = class extends E {
3488
+ }, R = class extends yt {
3489
3489
  get valid() {
3490
3490
  return !!(this.width && this.height);
3491
3491
  }
@@ -3499,10 +3499,10 @@ ${t}${n.transform ? "\nvoid main(void) { gl_FragColor = transform(vUv); }" : n.t
3499
3499
  super._destroy(), this.colorTextures.forEach((e) => e.destroy());
3500
3500
  }
3501
3501
  };
3502
- A([_({ fallback: !1 }), k("design:type", Boolean)], z.prototype, "isRoot", void 0), A([_({ fallback: 0 }), k("design:type", Number)], z.prototype, "x", void 0), A([_({ fallback: 0 }), k("design:type", Number)], z.prototype, "y", void 0), A([_({ fallback: 0 }), k("design:type", Number)], z.prototype, "width", void 0), A([_({ fallback: 0 }), k("design:type", Number)], z.prototype, "height", void 0), A([_({ fallback: 0 }), k("design:type", Number)], z.prototype, "mipLevel", void 0), A([_({ fallback: !1 }), k("design:type", Boolean)], z.prototype, "msaa", void 0), A([_({ default: () => [new B()] }), k("design:type", Array)], z.prototype, "colorTextures", void 0);
3502
+ k([_({ fallback: !1 }), O("design:type", Boolean)], R.prototype, "isRoot", void 0), k([_({ fallback: 0 }), O("design:type", Number)], R.prototype, "x", void 0), k([_({ fallback: 0 }), O("design:type", Number)], R.prototype, "y", void 0), k([_({ fallback: 0 }), O("design:type", Number)], R.prototype, "width", void 0), k([_({ fallback: 0 }), O("design:type", Number)], R.prototype, "height", void 0), k([_({ fallback: 0 }), O("design:type", Number)], R.prototype, "mipLevel", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], R.prototype, "msaa", void 0), k([_({ default: () => [new z()] }), O("design:type", Array)], R.prototype, "colorTextures", void 0);
3503
3503
  //#endregion
3504
3504
  //#region src/scene/resources/textures/Texture2D.ts
3505
- var B = class extends E {
3505
+ var z = class extends yt {
3506
3506
  static get EMPTY() {
3507
3507
  return new this({
3508
3508
  width: 1,
@@ -3613,10 +3613,10 @@ var B = class extends E {
3613
3613
  super._destroy(), Pe && this.source instanceof ImageBitmap && this.source.close();
3614
3614
  }
3615
3615
  };
3616
- A([_({ fallback: "unknown" }), k("design:type", String)], B.prototype, "uploadMethodId", void 0), A([_({ internal: !0 }), k("design:type", Object)], B.prototype, "source", void 0), A([_({ fallback: 0 }), k("design:type", Number)], B.prototype, "width", void 0), A([_({ fallback: 0 }), k("design:type", Number)], B.prototype, "height", void 0), A([_({ fallback: 1 }), k("design:type", Number)], B.prototype, "pixelRatio", void 0), A([_({ fallback: "bgra8unorm" }), k("design:type", Object)], B.prototype, "format", void 0), A([_({ fallback: "premultiply-alpha-on-upload" }), k("design:type", Object)], B.prototype, "alphaMode", void 0), A([_({ fallback: 1 }), k("design:type", Number)], B.prototype, "mipLevelCount", void 0), A([_({ fallback: !1 }), k("design:type", Boolean)], B.prototype, "mipmap", void 0), A([_({ fallback: "clamp-to-edge" }), k("design:type", Object)], B.prototype, "addressModeU", void 0), A([_({ fallback: "clamp-to-edge" }), k("design:type", Object)], B.prototype, "addressModeV", void 0), A([_({ fallback: "clamp-to-edge" }), k("design:type", Object)], B.prototype, "addressModeW", void 0), A([_({ fallback: "linear" }), k("design:type", Object)], B.prototype, "magFilter", void 0), A([_({ fallback: "linear" }), k("design:type", Object)], B.prototype, "minFilter", void 0), A([_({ fallback: "linear" }), k("design:type", Object)], B.prototype, "mipmapFilter", void 0), A([_({ fallback: !1 }), k("design:type", Boolean)], B.prototype, "isPowerOfTwo", void 0);
3616
+ 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);
3617
3617
  //#endregion
3618
3618
  //#region src/scene/resources/textures/AnimatedTexture.ts
3619
- var rr = class extends E {
3619
+ var ir = class extends yt {
3620
3620
  frames;
3621
3621
  frameIndex = 0;
3622
3622
  get currentFrame() {
@@ -3626,7 +3626,7 @@ var rr = class extends E {
3626
3626
  super();
3627
3627
  let t;
3628
3628
  if (Array.isArray(e)) t = e;
3629
- else if (e instanceof B) t = [{
3629
+ else if (e instanceof z) t = [{
3630
3630
  texture: e,
3631
3631
  duration: 0
3632
3632
  }];
@@ -3641,7 +3641,7 @@ var rr = class extends E {
3641
3641
  e.texture.destroy();
3642
3642
  });
3643
3643
  }
3644
- }, ir = class extends B {
3644
+ }, ar = class extends z {
3645
3645
  constructor(e = {}) {
3646
3646
  super({
3647
3647
  pixelRatio: 2,
@@ -3661,14 +3661,14 @@ var rr = class extends E {
3661
3661
  }
3662
3662
  super._updateProperty(e, t, n);
3663
3663
  }
3664
- }, ar = class e extends B {
3664
+ }, or = class e extends z {
3665
3665
  static _cached = /* @__PURE__ */ new Map();
3666
3666
  static get(t) {
3667
- let n = new bt(t), r = n.toHex(), i = this._cached.get(r);
3667
+ let n = new xt(t), r = n.toHex(), i = this._cached.get(r);
3668
3668
  return i || (i = new e(n), this._cached.set(r, i)), i;
3669
3669
  }
3670
3670
  constructor(e) {
3671
- let t = e instanceof bt ? e : new bt(e);
3671
+ let t = e instanceof xt ? e : new xt(e);
3672
3672
  super({
3673
3673
  width: 1,
3674
3674
  height: 1,
@@ -3682,23 +3682,23 @@ var rr = class extends E {
3682
3682
  mipmap: !0
3683
3683
  });
3684
3684
  }
3685
- }, V = 2048, or = 2, sr = class {
3685
+ }, B = 2048, sr = 2, cr = class {
3686
3686
  superSample = 2;
3687
3687
  _pages = [];
3688
3688
  _slots = /* @__PURE__ */ new Map();
3689
3689
  _newPage() {
3690
- let e = new ir({
3690
+ let e = new ar({
3691
3691
  pixelRatio: 1,
3692
3692
  mipmap: !0
3693
3693
  });
3694
- e.width = V, e.height = V;
3695
- let t = e.source ?? w(V, V);
3696
- t.width = V, t.height = V;
3694
+ e.width = B, e.height = B;
3695
+ let t = e.source ?? w(B, B);
3696
+ t.width = B, t.height = B;
3697
3697
  let n = {
3698
3698
  texture: e,
3699
3699
  ctx: t.getContext("2d"),
3700
- penX: or,
3701
- penY: or,
3700
+ penX: sr,
3701
+ penY: sr,
3702
3702
  rowH: 0
3703
3703
  };
3704
3704
  return this._pages.push(n), n;
@@ -3706,18 +3706,18 @@ var rr = class extends E {
3706
3706
  acquire(e, t, n, r) {
3707
3707
  let i = this._slots.get(e);
3708
3708
  if (i !== void 0) return i;
3709
- let a = this.superSample, o = Math.ceil(t * a), s = Math.ceil(n * a), c = o + or * 2, l = s + or * 2;
3710
- if (c > V || l > V) return this._slots.set(e, null), null;
3709
+ let a = this.superSample, o = Math.ceil(t * a), s = Math.ceil(n * a), c = o + sr * 2, l = s + sr * 2;
3710
+ if (c > B || l > B) return this._slots.set(e, null), null;
3711
3711
  let u = this._pages[this._pages.length - 1] ?? this._newPage();
3712
- u.penX + c > V && (u.penX = or, u.penY += u.rowH + or, u.rowH = 0), u.penY + l > V && (u = this._newPage());
3713
- let d = u.penX + or, f = u.penY + or, p = u.ctx;
3712
+ u.penX + c > B && (u.penX = sr, u.penY += u.rowH + sr, u.rowH = 0), u.penY + l > B && (u = this._newPage());
3713
+ let d = u.penX + sr, f = u.penY + sr, p = u.ctx;
3714
3714
  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);
3715
3715
  let m = {
3716
3716
  texture: u.texture,
3717
- u0: d / V,
3718
- v0: f / V,
3719
- u1: (d + t * a) / V,
3720
- v1: (f + n * a) / V
3717
+ u0: d / B,
3718
+ v0: f / B,
3719
+ u1: (d + t * a) / B,
3720
+ v1: (f + n * a) / B
3721
3721
  };
3722
3722
  return this._slots.set(e, m), m;
3723
3723
  }
@@ -3725,7 +3725,7 @@ var rr = class extends E {
3725
3725
  for (let e of this._pages) e.texture.destroy();
3726
3726
  this._pages.length = 0, this._slots.clear();
3727
3727
  }
3728
- }, cr = new sr(), lr = class e extends B {
3728
+ }, lr = new cr(), ur = class e extends z {
3729
3729
  static test(e) {
3730
3730
  return u(e);
3731
3731
  }
@@ -3759,7 +3759,7 @@ var rr = class extends E {
3759
3759
  constructor(t, n, r) {
3760
3760
  super(e.linearGradient(t, n, r));
3761
3761
  }
3762
- }, ur = class extends B {
3762
+ }, dr = class extends z {
3763
3763
  constructor(e = {}) {
3764
3764
  super({
3765
3765
  ...e,
@@ -3769,7 +3769,7 @@ var rr = class extends E {
3769
3769
  };
3770
3770
  //#endregion
3771
3771
  //#region src/scene/resources/textures/VideoTexture.ts
3772
- function dr(e) {
3772
+ function fr(e) {
3773
3773
  return {
3774
3774
  autoLoad: !!(e?.autoLoad ?? !0),
3775
3775
  autoPlay: !!(e?.autoPlay ?? !1),
@@ -3780,7 +3780,7 @@ function dr(e) {
3780
3780
  playsinline: !!(e?.playsinline ?? !0)
3781
3781
  };
3782
3782
  }
3783
- var fr = class e extends B {
3783
+ var pr = class e extends z {
3784
3784
  static mimeTypes = new Map(Object.entries({
3785
3785
  ogv: "video/ogg",
3786
3786
  mov: "video/quicktime",
@@ -3842,7 +3842,7 @@ var fr = class e extends B {
3842
3842
  _reject;
3843
3843
  _seekResolves = [];
3844
3844
  constructor(t, n) {
3845
- let r = dr(n);
3845
+ let r = fr(n);
3846
3846
  if (!Ze(t)) {
3847
3847
  typeof t == "string" && (t = [t]);
3848
3848
  let n = t[0].src || t[0];
@@ -3935,16 +3935,16 @@ var fr = class e extends B {
3935
3935
  e && (e.removeEventListener("play", this._onPlayStart), e.removeEventListener("pause", this._onPlayStop), e.removeEventListener("seeked", this._onSeeked), e.removeEventListener("canplay", this._onCanPlay), e.removeEventListener("canplaythrough", this._onCanPlay), e.removeEventListener("error", this._onError, !0), e.pause(), e.src = "", e.load());
3936
3936
  }
3937
3937
  };
3938
- A([_({
3938
+ k([_({
3939
3939
  internal: !0,
3940
3940
  fallback: !0
3941
- }), k("design:type", Boolean)], fr.prototype, "autoUpdate", void 0), A([_({
3941
+ }), O("design:type", Boolean)], pr.prototype, "autoUpdate", void 0), k([_({
3942
3942
  internal: !0,
3943
3943
  fallback: 0
3944
- }), k("design:type", Number)], fr.prototype, "fps", void 0);
3944
+ }), O("design:type", Number)], pr.prototype, "fps", void 0);
3945
3945
  //#endregion
3946
3946
  //#region src/scene/resources/textures/ViewportTexture.ts
3947
- var pr = class extends B {}, mr = class extends v {
3947
+ var mr = class extends z {}, hr = class extends v {
3948
3948
  fillStyle;
3949
3949
  fillRule;
3950
3950
  strokeStyle;
@@ -3958,7 +3958,7 @@ var pr = class extends B {}, mr = class extends v {
3958
3958
  _draws = [];
3959
3959
  _triCache = [];
3960
3960
  _parseDrawStyle(e) {
3961
- return e ? e instanceof B ? { texture: e } : { texture: ar.get(e) } : {};
3961
+ return e ? e instanceof z ? { texture: e } : { texture: or.get(e) } : {};
3962
3962
  }
3963
3963
  stroke(e) {
3964
3964
  if (!this.curves.length) return;
@@ -4075,7 +4075,7 @@ var pr = class extends B {}, mr = class extends v {
4075
4075
  destroy() {
4076
4076
  this.reset(), this._triCache.length = 0;
4077
4077
  }
4078
- }, hr = class {
4078
+ }, gr = class {
4079
4079
  front = [];
4080
4080
  default = [];
4081
4081
  back = [];
@@ -4118,7 +4118,7 @@ var pr = class extends B {}, mr = class extends v {
4118
4118
  toJSON() {
4119
4119
  return [...this.default];
4120
4120
  }
4121
- }, gr = class extends T {
4121
+ }, _r = class extends T {
4122
4122
  parent;
4123
4123
  getPropertyDeclarations() {
4124
4124
  super.getPropertyDeclarations();
@@ -4137,22 +4137,22 @@ var pr = class extends B {}, mr = class extends v {
4137
4137
  deleteProperty: (e, t) => Reflect.has(e, t) || String(t).startsWith("_") ? Reflect.deleteProperty(e, t) : (e.setProperty(String(t), void 0), !0)
4138
4138
  });
4139
4139
  }
4140
- }, _r, vr = {};
4141
- function yr(e) {
4142
- let t = vr[e] ?? 0;
4143
- return t++, vr[e] = t, t;
4140
+ }, vr, yr = {};
4141
+ function br(e) {
4142
+ let t = yr[e] ?? 0;
4143
+ return t++, yr[e] = t, t;
4144
4144
  }
4145
- var H = _r = class extends T {
4145
+ var V = vr = class extends T {
4146
4146
  static parse(e, t = "Node") {
4147
4147
  if (Array.isArray(e)) return e.map((e) => this.parse(e));
4148
- let { is: n, meta: r = {}, children: i, ...a } = e, o = new ((ve.get(n ?? r.inCanvasIs ?? t)) ?? _r)({
4148
+ let { is: n, meta: r = {}, children: i, ...a } = e, o = new ((ve.get(n ?? r.inCanvasIs ?? t)) ?? vr)({
4149
4149
  ...a,
4150
4150
  meta: r
4151
4151
  });
4152
4152
  return i?.forEach((e) => o.appendChild(this.parse(e))), o;
4153
4153
  }
4154
4154
  _mask;
4155
- _meta = new gr(this);
4155
+ _meta = new _r(this);
4156
4156
  get meta() {
4157
4157
  return this._meta;
4158
4158
  }
@@ -4175,7 +4175,7 @@ var H = _r = class extends T {
4175
4175
  }).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();
4176
4176
  }
4177
4177
  _defaultName() {
4178
- return `@${this.is}@${yr(this.is)}`;
4178
+ return `@${this.is}@${br(this.is)}`;
4179
4179
  }
4180
4180
  setProperties(e) {
4181
4181
  if (e) {
@@ -4242,7 +4242,7 @@ var H = _r = class extends T {
4242
4242
  }
4243
4243
  return this;
4244
4244
  }
4245
- _children = new hr();
4245
+ _children = new gr();
4246
4246
  get children() {
4247
4247
  return this._children.default;
4248
4248
  }
@@ -4402,7 +4402,7 @@ var H = _r = class extends T {
4402
4402
  append(...e) {
4403
4403
  let t;
4404
4404
  t = Array.isArray(e[0]) ? e[0] : e, t.forEach((e) => {
4405
- e instanceof _r ? this.appendChild(e) : this.appendChild(_r.parse(e));
4405
+ e instanceof vr ? this.appendChild(e) : this.appendChild(vr.parse(e));
4406
4406
  });
4407
4407
  }
4408
4408
  before(...e) {
@@ -4505,13 +4505,13 @@ var H = _r = class extends T {
4505
4505
  });
4506
4506
  }
4507
4507
  };
4508
- A([_({ default: () => c() }), k("design:type", String)], H.prototype, "id", void 0), A([_({ default: () => c() }), k("design:type", String)], H.prototype, "name", void 0), A([_({ fallback: "inherit" }), k("design:type", Object)], H.prototype, "processMode", void 0), A([_({ fallback: "default" }), k("design:type", Object)], H.prototype, "processSortMode", void 0), A([_({ fallback: "inherit" }), k("design:type", Object)], H.prototype, "renderMode", void 0), A([_({ fallback: "inherit" }), k("design:type", Object)], H.prototype, "inputMode", void 0), A([_({ fallback: "default" }), k("design:type", Object)], H.prototype, "internalMode", void 0), A([_({
4508
+ 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([_({
4509
4509
  internal: !0,
4510
4510
  default: !0
4511
- }), k("design:type", Boolean)], H.prototype, "needsRender", void 0), H = _r = A([S("Node"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], H);
4511
+ }), O("design:type", Boolean)], V.prototype, "needsRender", void 0), V = vr = k([S("Node"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], V);
4512
4512
  //#endregion
4513
4513
  //#region src/scene/main/TimelineNode.ts
4514
- var U = class extends H {
4514
+ var H = class extends V {
4515
4515
  insideTimeRange = !1;
4516
4516
  get _timeline() {
4517
4517
  return this._tree?.timeline;
@@ -4547,7 +4547,7 @@ var U = class extends H {
4547
4547
  return this._globalStartTime + this._globalDuration;
4548
4548
  }
4549
4549
  get currentTimeProgress() {
4550
- return this._duration ? D(this._currentTime / this._duration, 0, 1) : 0;
4550
+ return this._duration ? E(this._currentTime / this._duration, 0, 1) : 0;
4551
4551
  }
4552
4552
  isInsideTimeRange() {
4553
4553
  let e = this._currentTime;
@@ -4593,18 +4593,18 @@ var U = class extends H {
4593
4593
  super._process(e), this._updateCurrentTime();
4594
4594
  }
4595
4595
  };
4596
- A([_({ fallback: !1 }), k("design:type", Boolean)], U.prototype, "loop", void 0), A([_({ fallback: 0 }), k("design:type", Number)], U.prototype, "delay", void 0), A([_({ fallback: 0 }), k("design:type", Number)], U.prototype, "duration", void 0), A([_({ fallback: !1 }), k("design:type", Boolean)], U.prototype, "paused", void 0), U = A([S("TimelineNode"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], U);
4596
+ 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([S("TimelineNode"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], H);
4597
4597
  //#endregion
4598
4598
  //#region src/scene/main/CanvasItem.ts
4599
- var br = [], xr = 0;
4600
- function Sr() {
4601
- xr = 0;
4599
+ var xr = [], Sr = 0;
4600
+ function Cr() {
4601
+ Sr = 0;
4602
4602
  }
4603
- function Cr(e, t, n, r) {
4604
- let i = br[xr];
4605
- return i || (i = {}, br[xr] = i), xr++, Object.assign(i, e), i.roundPixels = t, i.size = n, i.texture = r, i;
4603
+ function wr(e, t, n, r) {
4604
+ let i = xr[Sr];
4605
+ return i || (i = {}, xr[Sr] = i), Sr++, Object.assign(i, e), i.roundPixels = t, i.size = n, i.texture = r, i;
4606
4606
  }
4607
- var wr = class extends U {
4607
+ var Tr = class extends H {
4608
4608
  _blendMode;
4609
4609
  _parentGlobalVisible;
4610
4610
  _globalVisible;
@@ -4622,7 +4622,7 @@ var wr = class extends U {
4622
4622
  255,
4623
4623
  255
4624
4624
  ];
4625
- context = new mr();
4625
+ context = new hr();
4626
4626
  _resetContext = !0;
4627
4627
  needsDraw = !0;
4628
4628
  needsLayout = !1;
@@ -4684,7 +4684,7 @@ var wr = class extends U {
4684
4684
  }
4685
4685
  _updateGlobalOpacity() {
4686
4686
  this._parentGlobalOpacity = this.getParent()?.opacity;
4687
- let e = D(this.opacity, 0, 1) * (this._parentGlobalOpacity ?? 1);
4687
+ let e = E(this.opacity, 0, 1) * (this._parentGlobalOpacity ?? 1);
4688
4688
  this._globalOpacity !== e && (this._globalOpacity = e, this._updateModulate(), this.requestPaint(), this.updateRenderable());
4689
4689
  }
4690
4690
  _draw() {
@@ -4753,7 +4753,7 @@ var wr = class extends U {
4753
4753
  return;
4754
4754
  }
4755
4755
  let t = this._tree?.pixelate, n = this._tree?.roundPixels, r = this._batchables;
4756
- for (let i, a, o = r.length, s = 0; s < o; s++) i = r[s], a = i.texture, a instanceof pr && (a = this._handleViewportTexture(i)), e.batch2D.render(Cr(i, n, t ? i.size : void 0, a));
4756
+ for (let i, a, o = r.length, s = 0; s < o; s++) i = r[s], a = i.texture, a instanceof mr && (a = this._handleViewportTexture(i)), e.batch2D.render(wr(i, n, t ? i.size : void 0, a));
4757
4757
  super._render(e);
4758
4758
  }
4759
4759
  _cullsRender() {
@@ -4763,19 +4763,19 @@ var wr = class extends U {
4763
4763
  super._destroy(), this.context.destroy(), this._drawBatchables = [], this._layoutBatchables = [], this._batchables = [];
4764
4764
  }
4765
4765
  };
4766
- A([_(), k("design:type", Object)], wr.prototype, "blendMode", void 0), A([_({
4766
+ k([_(), O("design:type", Object)], Tr.prototype, "blendMode", void 0), k([_({
4767
4767
  internal: !0,
4768
4768
  fallback: !0
4769
- }), k("design:type", Boolean)], wr.prototype, "visible", void 0), A([_({
4769
+ }), O("design:type", Boolean)], Tr.prototype, "visible", void 0), k([_({
4770
4770
  internal: !0,
4771
4771
  fallback: 1
4772
- }), k("design:type", Number)], wr.prototype, "opacity", void 0), wr = A([S("CanvasItem"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], wr);
4772
+ }), O("design:type", Number)], Tr.prototype, "opacity", void 0), Tr = k([S("CanvasItem"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Tr);
4773
4773
  //#endregion
4774
4774
  //#region src/scene/main/Viewport.ts
4775
- var W = class extends H {
4775
+ var U = class extends V {
4776
4776
  canvasTransform = new b();
4777
4777
  renderTargetIndex = 0;
4778
- renderTargets = [new z(), new z()];
4778
+ renderTargets = [new R(), new R()];
4779
4779
  get valid() {
4780
4780
  return !!(this.width && this.height);
4781
4781
  }
@@ -4822,7 +4822,7 @@ var W = class extends H {
4822
4822
  return !1;
4823
4823
  }
4824
4824
  activateWithCopy(e, t) {
4825
- this.resize(t.width, t.height), this.activate(e) && (e.clear(), t.texture.activate(e, 0), R.draw(e, tr.instance, { sampler: 0 }));
4825
+ this.resize(t.width, t.height), this.activate(e) && (e.clear(), t.texture.activate(e, 0), L.draw(e, nr.instance, { sampler: 0 }));
4826
4826
  }
4827
4827
  renderStart(e, t) {
4828
4828
  this.activate(e, t) && e.clear();
@@ -4835,7 +4835,7 @@ var W = class extends H {
4835
4835
  this.renderStart(e), super.render(e, t), this.renderEnd(e, n);
4836
4836
  }
4837
4837
  getRect() {
4838
- return new yt(this.x, this.y, this.width, this.height);
4838
+ return new bt(this.x, this.y, this.width, this.height);
4839
4839
  }
4840
4840
  toCanvasGlobal(e, t) {
4841
4841
  return this.canvasTransform.applyAffineInverse(e, t);
@@ -4847,16 +4847,16 @@ var W = class extends H {
4847
4847
  super._destroy(), this.canvasTransform.destroy(), this.renderTargets.forEach((e) => e.destroy());
4848
4848
  }
4849
4849
  };
4850
- A([_({ fallback: 0 }), k("design:type", Number)], W.prototype, "x", void 0), A([_({ fallback: 0 }), k("design:type", Number)], W.prototype, "y", void 0), A([_({ fallback: 0 }), k("design:type", Number)], W.prototype, "width", void 0), A([_({ fallback: 0 }), k("design:type", Number)], W.prototype, "height", void 0), A([_({ fallback: 0 }), k("design:type", Number)], W.prototype, "mipLevel", void 0), A([_({ fallback: !1 }), k("design:type", Boolean)], W.prototype, "msaa", void 0), W = A([S("Viewport")], W);
4850
+ k([_({ fallback: 0 }), O("design:type", Number)], U.prototype, "x", void 0), k([_({ fallback: 0 }), O("design:type", Number)], U.prototype, "y", void 0), k([_({ fallback: 0 }), O("design:type", Number)], U.prototype, "width", void 0), k([_({ fallback: 0 }), O("design:type", Number)], U.prototype, "height", void 0), k([_({ fallback: 0 }), O("design:type", Number)], U.prototype, "mipLevel", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], U.prototype, "msaa", void 0), U = k([S("Viewport")], U);
4851
4851
  //#endregion
4852
4852
  //#region src/scene/main/Effect.ts
4853
- var G = class extends U {
4853
+ var W = class extends H {
4854
4854
  material;
4855
4855
  get _effectMode() {
4856
4856
  return this.effectMode ?? "parent";
4857
4857
  }
4858
- viewport1 = new W();
4859
- viewport2 = new W();
4858
+ viewport1 = new U();
4859
+ viewport2 = new U();
4860
4860
  _renderId = 0;
4861
4861
  _renderViewport;
4862
4862
  _previousSibling;
@@ -4873,7 +4873,7 @@ var G = class extends U {
4873
4873
  _updateProperty(e, t, n) {
4874
4874
  switch (super._updateProperty(e, t, n), e) {
4875
4875
  case "glsl": {
4876
- let e = new er(t);
4876
+ let e = new tr(t);
4877
4877
  !this.effectMode && e.has.transition && (this.effectMode = "transition"), this.material = e;
4878
4878
  break;
4879
4879
  }
@@ -4908,7 +4908,7 @@ var G = class extends U {
4908
4908
  }
4909
4909
  }
4910
4910
  getRect() {
4911
- return new yt(this._rect);
4911
+ return new bt(this._rect);
4912
4912
  }
4913
4913
  _processParent() {
4914
4914
  let e = this._tree?.renderStack;
@@ -5061,13 +5061,13 @@ var G = class extends U {
5061
5061
  }
5062
5062
  apply(e, t, n) {
5063
5063
  this.material && (n?.redraw ? t.redraw(e, () => {
5064
- R.draw(e, this.material, {
5064
+ L.draw(e, this.material, {
5065
5065
  from: 0,
5066
5066
  to: 1,
5067
5067
  progress: this.currentTimeProgress,
5068
5068
  ratio: t.width / t.height
5069
5069
  });
5070
- }) : R.draw(e, this.material, {
5070
+ }) : L.draw(e, this.material, {
5071
5071
  from: 0,
5072
5072
  to: 1,
5073
5073
  progress: this.currentTimeProgress,
@@ -5078,10 +5078,10 @@ var G = class extends U {
5078
5078
  super._destroy(), this.viewport1.destroy(), this.viewport2.destroy();
5079
5079
  }
5080
5080
  };
5081
- A([_({ internal: !0 }), k("design:type", Object)], G.prototype, "material", void 0), A([_(), k("design:type", Object)], G.prototype, "effectMode", void 0), A([_(), k("design:type", String)], G.prototype, "glsl", void 0), A([_(), k("design:type", String)], G.prototype, "glslSrc", void 0), G = A([S("Effect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], G);
5081
+ 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([S("Effect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], W);
5082
5082
  //#endregion
5083
5083
  //#region src/scene/main/RenderStack.ts
5084
- var Tr = class {
5084
+ var Er = class {
5085
5085
  currentCall;
5086
5086
  calls = [];
5087
5087
  createCall(e) {
@@ -5106,7 +5106,7 @@ var Tr = class {
5106
5106
  });
5107
5107
  }), this.reset();
5108
5108
  }
5109
- }, Er, Dr = Er = class extends H {
5109
+ }, Dr, Or = Dr = class extends V {
5110
5110
  currentTime = 0;
5111
5111
  playing = !1;
5112
5112
  playbackRate = 1;
@@ -5127,7 +5127,7 @@ var Tr = class {
5127
5127
  }
5128
5128
  static from(e, t = !1) {
5129
5129
  let [n, r] = e ? Array.isArray(e) ? e : [0, e] : [];
5130
- return new Er({
5130
+ return new Dr({
5131
5131
  startTime: n,
5132
5132
  endTime: r,
5133
5133
  loop: t
@@ -5145,7 +5145,7 @@ var Tr = class {
5145
5145
  }
5146
5146
  addTime(e) {
5147
5147
  let t = this.endTime, n = Math.min(this.startTime, this.endTime), r = t - n, i = this.currentTime + e;
5148
- return this.loop && r > 0 && i > t && (i = n + (i - n) % r), i = D(i, n, t), this.currentTime = i, this.emit("updateCurrentTime", i, e), this;
5148
+ return this.loop && r > 0 && i > t && (i = n + (i - n) % r), i = E(i, n, t), this.currentTime = i, this.emit("updateCurrentTime", i, e), this;
5149
5149
  }
5150
5150
  play(e) {
5151
5151
  return e?.rate !== void 0 && (this._rate = e.rate), e?.loopMode !== void 0 && (this.loopMode = e.loopMode), this._direction = 1, (!Number.isFinite(this.currentTime) || this.currentTime >= this.endTime) && (this.currentTime = Math.min(this.startTime, this.endTime)), this.playing = !0, this.playbackRate = this._rate * this._direction, this;
@@ -5173,10 +5173,10 @@ var Tr = class {
5173
5173
  super._process(e), this.paused || this.addTime(e);
5174
5174
  }
5175
5175
  };
5176
- A([_({ fallback: 0 }), k("design:type", Number)], Dr.prototype, "startTime", void 0), A([_({ fallback: 2 ** 53 - 1 }), k("design:type", Number)], Dr.prototype, "endTime", void 0), A([_({ fallback: !1 }), k("design:type", Boolean)], Dr.prototype, "loop", void 0), A([_({ fallback: !1 }), k("design:type", Boolean)], Dr.prototype, "paused", void 0), Dr = Er = A([S("Timeline"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial])], Dr);
5176
+ k([_({ fallback: 0 }), O("design:type", Number)], Or.prototype, "startTime", void 0), k([_({ fallback: 2 ** 53 - 1 }), O("design:type", Number)], Or.prototype, "endTime", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], Or.prototype, "loop", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], Or.prototype, "paused", void 0), Or = Dr = k([S("Timeline"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial])], Or);
5177
5177
  //#endregion
5178
5178
  //#region src/scene/main/Window.ts
5179
- var Or = class extends W {
5179
+ var kr = class extends U {
5180
5180
  constructor() {
5181
5181
  super(), this.renderTargets.forEach((e) => e.isRoot = !0);
5182
5182
  }
@@ -5187,23 +5187,23 @@ var Or = class extends W {
5187
5187
  super.flush(e), this.finish(e);
5188
5188
  }
5189
5189
  };
5190
- Or = A([S("Window", {
5190
+ kr = k([S("Window", {
5191
5191
  processMode: "always",
5192
5192
  renderMode: "always"
5193
- }), k("design:paramtypes", [])], Or);
5193
+ }), O("design:paramtypes", [])], kr);
5194
5194
  //#endregion
5195
5195
  //#region src/scene/main/SceneTree.ts
5196
- var kr = class extends Et {
5196
+ var Ar = class extends Dt {
5197
5197
  input = new _t();
5198
- renderStack = new Tr();
5199
- root = new Or().setTree(this);
5200
- timeline = new Dr().setTree(this);
5198
+ renderStack = new Er();
5199
+ root = new kr().setTree(this);
5200
+ timeline = new Or().setTree(this);
5201
5201
  imagePipelineResolver;
5202
5202
  nodeMap = /* @__PURE__ */ new Map();
5203
5203
  _boundFonts;
5204
5204
  _textRemeasureScheduled = !1;
5205
5205
  _onFontLoad = () => this._scheduleTextRemeasure();
5206
- _backgroundColor = new bt();
5206
+ _backgroundColor = new xt();
5207
5207
  _previousViewport;
5208
5208
  _currentViewport;
5209
5209
  getPreviousViewport() {
@@ -5256,41 +5256,41 @@ var kr = class extends Et {
5256
5256
  this.renderStack.reset(), this.timeline.emit("process", e), this.emit("processing"), this.root.emit("process", e), this.emit("processed");
5257
5257
  }
5258
5258
  _render(e) {
5259
- this.emit("rendering"), Sr(), this.renderStack.render(e), this._renderScreen(e), this.emit("rendered");
5259
+ this.emit("rendering"), Cr(), this.renderStack.render(e), this._renderScreen(e), this.emit("rendered");
5260
5260
  }
5261
5261
  _renderScreen(e) {
5262
5262
  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);
5263
5263
  let t = this.root.texture;
5264
- t.activate(e, 0), R.draw(e), t.inactivate(e);
5264
+ t.activate(e, 0), L.draw(e), t.inactivate(e);
5265
5265
  }
5266
5266
  _destroy() {
5267
5267
  super._destroy(), this._bindFonts(void 0), this.root.destroy(), this.input.destroy(), this.nodeMap.clear();
5268
5268
  }
5269
5269
  };
5270
- A([_({ alias: "root.msaa" }), k("design:type", Boolean)], kr.prototype, "msaa", void 0), A([_({ fallback: !1 }), k("design:type", Boolean)], kr.prototype, "pixelate", void 0), A([_({ fallback: !1 }), k("design:type", Boolean)], kr.prototype, "roundPixels", void 0), A([_(), k("design:type", Object)], kr.prototype, "backgroundColor", void 0), A([_({
5270
+ k([_({ alias: "root.msaa" }), O("design:type", Boolean)], Ar.prototype, "msaa", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], Ar.prototype, "pixelate", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], Ar.prototype, "roundPixels", void 0), k([_(), O("design:type", Object)], Ar.prototype, "backgroundColor", void 0), k([_({
5271
5271
  internal: !0,
5272
5272
  fallback: !1
5273
- }), k("design:type", Boolean)], kr.prototype, "debug", void 0), A([_({
5273
+ }), O("design:type", Boolean)], Ar.prototype, "debug", void 0), k([_({
5274
5274
  internal: !0,
5275
5275
  fallback: !1
5276
- }), k("design:type", Boolean)], kr.prototype, "processPaused", void 0), A([_({
5276
+ }), O("design:type", Boolean)], Ar.prototype, "processPaused", void 0), k([_({
5277
5277
  internal: !0,
5278
5278
  default: () => he
5279
- }), k("design:type", Object)], kr.prototype, "fonts", void 0);
5279
+ }), O("design:type", Object)], Ar.prototype, "fonts", void 0);
5280
5280
  //#endregion
5281
5281
  //#region src/scene/main/Transition.ts
5282
- var Ar = class extends G {
5282
+ var jr = class extends W {
5283
5283
  constructor(e, t = []) {
5284
5284
  super(), this.setProperties(e).append(t);
5285
5285
  }
5286
5286
  };
5287
- Ar = A([S("Transition", {
5287
+ jr = k([S("Transition", {
5288
5288
  effectMode: "transition",
5289
5289
  duration: 2e3
5290
- }), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Ar);
5290
+ }), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], jr);
5291
5291
  //#endregion
5292
5292
  //#region src/scene/2d/Node2D.ts
5293
- var jr = class extends wr {
5293
+ var Mr = class extends Tr {
5294
5294
  rotation = 0;
5295
5295
  position = new x(0, 0, () => this.updateGlobalTransform());
5296
5296
  scale = new x(1, 1, () => this.updateGlobalTransform());
@@ -5342,10 +5342,10 @@ var jr = class extends wr {
5342
5342
  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();
5343
5343
  }
5344
5344
  };
5345
- jr = A([S("Node2D"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], jr);
5345
+ Mr = k([S("Node2D"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Mr);
5346
5346
  //#endregion
5347
5347
  //#region src/scene/2d/Camera2D.ts
5348
- var Mr = class extends jr {
5348
+ var Nr = class extends Mr {
5349
5349
  canvasTransform = new b();
5350
5350
  _screenOffset = {
5351
5351
  x: 0,
@@ -5386,7 +5386,7 @@ var Mr = class extends jr {
5386
5386
  return this.setZoom(this._zoom.x + e, this._zoom.y + t);
5387
5387
  }
5388
5388
  setZoom(e, t = e) {
5389
- return this._zoom.set(D(e, this._minZoom.x, this._maxZoom.x), D(t, this._minZoom.y, this._maxZoom.y)), this;
5389
+ return this._zoom.set(E(e, this._minZoom.x, this._maxZoom.x), E(t, this._minZoom.y, this._maxZoom.y)), this;
5390
5390
  }
5391
5391
  setZoomAtOrigin(e, t, n) {
5392
5392
  let r;
@@ -5489,19 +5489,19 @@ var Mr = class extends jr {
5489
5489
  };
5490
5490
  }
5491
5491
  };
5492
- A([_({
5492
+ k([_({
5493
5493
  internal: !0,
5494
5494
  fallback: !1
5495
- }), k("design:type", Boolean)], Mr.prototype, "spaceKey", void 0), A([_({
5495
+ }), O("design:type", Boolean)], Nr.prototype, "spaceKey", void 0), k([_({
5496
5496
  internal: !0,
5497
5497
  fallback: !1
5498
- }), k("design:type", Boolean)], Mr.prototype, "grabbing", void 0), Mr = A([S("Camera2D", {
5498
+ }), O("design:type", Boolean)], Nr.prototype, "grabbing", void 0), Nr = k([S("Camera2D", {
5499
5499
  processMode: "disabled",
5500
5500
  renderMode: "disabled"
5501
- }), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Mr);
5501
+ }), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Nr);
5502
5502
  //#endregion
5503
5503
  //#region src/scene/2d/element/connectionRouter.ts
5504
- function Nr(e, t) {
5504
+ function Pr(e, t) {
5505
5505
  return Math.abs(e) >= Math.abs(t) ? {
5506
5506
  x: Math.sign(e) || 1,
5507
5507
  y: 0
@@ -5510,11 +5510,11 @@ function Nr(e, t) {
5510
5510
  y: Math.sign(t) || 1
5511
5511
  };
5512
5512
  }
5513
- function Pr(e, t, n, r = {}) {
5513
+ function Fr(e, t, n, r = {}) {
5514
5514
  let i = t.point, a = n.point, o = new v();
5515
5515
  switch (e) {
5516
5516
  case "curved": {
5517
- let e = t.dir ?? Nr(a.x - i.x, a.y - i.y), s = n.dir ?? Nr(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;
5517
+ let e = t.dir ?? Pr(a.x - i.x, a.y - i.y), s = n.dir ?? Pr(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;
5518
5518
  for (let e = 0; e <= 32; e++) {
5519
5519
  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;
5520
5520
  e === 0 ? o.moveTo(u, d) : o.lineTo(u, d);
@@ -5522,7 +5522,7 @@ function Pr(e, t, n, r = {}) {
5522
5522
  break;
5523
5523
  }
5524
5524
  case "orthogonal": {
5525
- let e = Ir(t, n, r);
5525
+ let e = Lr(t, n, r);
5526
5526
  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);
5527
5527
  break;
5528
5528
  }
@@ -5532,11 +5532,11 @@ function Pr(e, t, n, r = {}) {
5532
5532
  }
5533
5533
  return o;
5534
5534
  }
5535
- function Fr(e) {
5536
- return Nr(e.x, e.y);
5535
+ function Ir(e) {
5536
+ return Pr(e.x, e.y);
5537
5537
  }
5538
- function Ir(e, t, n) {
5539
- let r = e.point, i = t.point, a = n.stub ?? 16, o = Fr(e.dir ?? Nr(i.x - r.x, i.y - r.y)), s = Fr(t.dir ?? Nr(r.x - i.x, r.y - i.y)), c = {
5538
+ function Lr(e, t, n) {
5539
+ let r = e.point, i = t.point, a = n.stub ?? 16, o = Ir(e.dir ?? Pr(i.x - r.x, i.y - r.y)), s = Ir(t.dir ?? Pr(r.x - i.x, r.y - i.y)), c = {
5540
5540
  x: r.x + o.x * a,
5541
5541
  y: r.y + o.y * a
5542
5542
  }, l = {
@@ -5548,12 +5548,12 @@ function Ir(e, t, n) {
5548
5548
  x: r.x,
5549
5549
  y: r.y
5550
5550
  }, c];
5551
- return d.push(...Rr(c, o, l, s, a, u)), d.push(l, {
5551
+ return d.push(...zr(c, o, l, s, a, u)), d.push(l, {
5552
5552
  x: i.x,
5553
5553
  y: i.y
5554
- }), zr(d);
5554
+ }), Br(d);
5555
5555
  }
5556
- function Lr(e, t, n, r, i) {
5556
+ function Rr(e, t, n, r, i) {
5557
5557
  let a = Infinity, o = -Infinity, s = t === "y" ? "x" : "y";
5558
5558
  for (let e of r) {
5559
5559
  let r = e.min[s], i = r + e.size[s];
@@ -5564,7 +5564,7 @@ function Lr(e, t, n, r, i) {
5564
5564
  }
5565
5565
  return e > a && e < o ? a - i : e;
5566
5566
  }
5567
- function Rr(e, t, n, r, i, a = []) {
5567
+ function zr(e, t, n, r, i, a = []) {
5568
5568
  let o = t.y === 0;
5569
5569
  if (o === (r.y === 0)) {
5570
5570
  if (o) {
@@ -5579,7 +5579,7 @@ function Rr(e, t, n, r, i, a = []) {
5579
5579
  }];
5580
5580
  }
5581
5581
  let o = Math.abs(e.y - n.y) < .001 ? e.y + i : (e.y + n.y) / 2;
5582
- return o = Lr(o, "y", [Math.min(e.x, n.x), Math.max(e.x, n.x)], a, i), [{
5582
+ return o = Rr(o, "y", [Math.min(e.x, n.x), Math.max(e.x, n.x)], a, i), [{
5583
5583
  x: e.x,
5584
5584
  y: o
5585
5585
  }, {
@@ -5598,7 +5598,7 @@ function Rr(e, t, n, r, i, a = []) {
5598
5598
  }];
5599
5599
  }
5600
5600
  let s = Math.abs(e.x - n.x) < .001 ? e.x + i : (e.x + n.x) / 2;
5601
- return s = Lr(s, "x", [Math.min(e.y, n.y), Math.max(e.y, n.y)], a, i), [{
5601
+ return s = Rr(s, "x", [Math.min(e.y, n.y), Math.max(e.y, n.y)], a, i), [{
5602
5602
  x: s,
5603
5603
  y: e.y
5604
5604
  }, {
@@ -5625,7 +5625,7 @@ function Rr(e, t, n, r, i, a = []) {
5625
5625
  y: l.y
5626
5626
  }];
5627
5627
  }
5628
- function zr(e) {
5628
+ function Br(e) {
5629
5629
  let t = [];
5630
5630
  for (let n = 0; n < e.length; n++) {
5631
5631
  let r = e[n], i = t[t.length - 1];
@@ -5635,7 +5635,7 @@ function zr(e) {
5635
5635
  }
5636
5636
  //#endregion
5637
5637
  //#region src/css/parseCssFilter.ts
5638
- var Br = {
5638
+ var Vr = {
5639
5639
  brightness: 1,
5640
5640
  contrast: 1,
5641
5641
  grayscale: 0,
@@ -5645,12 +5645,12 @@ var Br = {
5645
5645
  saturate: 1,
5646
5646
  sepia: 0
5647
5647
  };
5648
- function Vr(e) {
5649
- let t = new Ct();
5648
+ function Hr(e) {
5649
+ let t = new wt();
5650
5650
  if (e === "none") return t;
5651
5651
  let n = Ae(e).reduce((e, { name: t, args: n }) => (e[t] = n[0].normalizedIntValue, e), {});
5652
- Object.keys(Br).forEach((e) => {
5653
- n[e] = n[e] ?? Br[e];
5652
+ Object.keys(Vr).forEach((e) => {
5653
+ n[e] = n[e] ?? Vr[e];
5654
5654
  });
5655
5655
  for (let e in n) {
5656
5656
  let r = n[e];
@@ -5685,7 +5685,7 @@ function Vr(e) {
5685
5685
  }
5686
5686
  //#endregion
5687
5687
  //#region src/css/parseCssTransformOrigin.ts
5688
- function Hr(e) {
5688
+ function Ur(e) {
5689
5689
  let [t, n = t] = e.split(" ");
5690
5690
  return [t, n].map((e) => {
5691
5691
  switch (e = e.trim(), e) {
@@ -5700,11 +5700,11 @@ function Hr(e) {
5700
5700
  }
5701
5701
  //#endregion
5702
5702
  //#region src/scene/effects/ColorAdjustEffect.ts
5703
- var Ur, K = class extends G {
5703
+ var Wr, G = class extends W {
5704
5704
  static {
5705
- Ur = this;
5705
+ Wr = this;
5706
5706
  }
5707
- static material = new L({ gl: {
5707
+ static material = new I({ gl: {
5708
5708
  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}",
5709
5709
  fragment: "varying vec2 vUv;\nuniform sampler2D sampler;\nuniform float gamma;\nuniform float contrast;\nuniform float saturation;\nuniform float brightness;\nuniform float red;\nuniform float green;\nuniform float blue;\nuniform float alpha;\n\nvoid main(void) {\n vec4 c = texture2D(sampler, vUv);\n if (c.a > 0.0) {\n c.rgb /= c.a;\n vec3 rgb = pow(c.rgb, vec3(1. / gamma));\n rgb = mix(vec3(.5), mix(vec3(dot(vec3(.2125, .7154, .0721), rgb)), rgb, saturation), contrast);\n rgb.r *= red;\n rgb.g *= green;\n rgb.b *= blue;\n c.rgb = rgb * brightness;\n c.rgb *= c.a;\n }\n gl_FragColor = c * alpha;\n}"
5710
5710
  } });
@@ -5713,7 +5713,7 @@ var Ur, K = class extends G {
5713
5713
  }
5714
5714
  apply(e, t) {
5715
5715
  t.redraw(e, () => {
5716
- R.draw(e, Ur.material, {
5716
+ L.draw(e, Wr.material, {
5717
5717
  sampler: 0,
5718
5718
  saturation: this.saturation,
5719
5719
  contrast: this.contrast,
@@ -5727,18 +5727,18 @@ var Ur, K = class extends G {
5727
5727
  });
5728
5728
  }
5729
5729
  };
5730
- A([_({ fallback: 1 }), k("design:type", Number)], K.prototype, "saturation", void 0), A([_({ fallback: 1 }), k("design:type", Number)], K.prototype, "contrast", void 0), A([_({ fallback: 1 }), k("design:type", Number)], K.prototype, "brightness", void 0), A([_({ fallback: 1 }), k("design:type", Number)], K.prototype, "red", void 0), A([_({ fallback: 1 }), k("design:type", Number)], K.prototype, "green", void 0), A([_({ fallback: 1 }), k("design:type", Number)], K.prototype, "blue", void 0), A([_({ fallback: 1 }), k("design:type", Number)], K.prototype, "alpha", void 0), A([_({ fallback: 1 }), k("design:type", Number)], K.prototype, "gamma", void 0), K = Ur = A([S("ColorAdjustEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], K);
5730
+ k([_({ fallback: 1 }), O("design:type", Number)], G.prototype, "saturation", void 0), k([_({ fallback: 1 }), O("design:type", Number)], G.prototype, "contrast", void 0), k([_({ fallback: 1 }), O("design:type", Number)], G.prototype, "brightness", void 0), k([_({ fallback: 1 }), O("design:type", Number)], G.prototype, "red", void 0), k([_({ fallback: 1 }), O("design:type", Number)], G.prototype, "green", void 0), k([_({ fallback: 1 }), O("design:type", Number)], G.prototype, "blue", void 0), k([_({ fallback: 1 }), O("design:type", Number)], G.prototype, "alpha", void 0), k([_({ fallback: 1 }), O("design:type", Number)], G.prototype, "gamma", void 0), G = Wr = k([S("ColorAdjustEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], G);
5731
5731
  //#endregion
5732
5732
  //#region src/scene/effects/ColorFilterEffect.ts
5733
- var Wr, Gr = class extends G {
5733
+ var Gr, Kr = class extends W {
5734
5734
  static {
5735
- Wr = this;
5735
+ Gr = this;
5736
5736
  }
5737
- static material = new L({ gl: {
5737
+ static material = new I({ gl: {
5738
5738
  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}",
5739
5739
  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}"
5740
5740
  } });
5741
- _colorMatrix = new Ct();
5741
+ _colorMatrix = new wt();
5742
5742
  constructor(e, t = []) {
5743
5743
  super(), this.setProperties(e).append(t);
5744
5744
  }
@@ -5782,25 +5782,25 @@ var Wr, Gr = class extends G {
5782
5782
  break;
5783
5783
  }
5784
5784
  }), t.redraw(e, () => {
5785
- R.draw(e, Wr.material, {
5785
+ L.draw(e, Gr.material, {
5786
5786
  sampler: 0,
5787
5787
  m: r.toArray()
5788
5788
  });
5789
5789
  });
5790
5790
  }
5791
5791
  };
5792
- A([_(), k("design:type", String)], Gr.prototype, "filter", void 0), Gr = Wr = A([S("ColorFilterEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Gr);
5792
+ k([_(), O("design:type", String)], Kr.prototype, "filter", void 0), Kr = Gr = k([S("ColorFilterEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Kr);
5793
5793
  //#endregion
5794
5794
  //#region src/scene/effects/ColorOverlayEffect.ts
5795
- var Kr, qr = 50, Jr = class extends G {
5795
+ var qr, Jr = 50, Yr = class extends W {
5796
5796
  static {
5797
- Kr = this;
5797
+ qr = this;
5798
5798
  }
5799
- static material = new L({ gl: {
5799
+ static material = new I({ gl: {
5800
5800
  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}",
5801
5801
  fragment: `precision mediump float;
5802
5802
  uniform sampler2D sampler;
5803
- uniform vec4 colors[${qr}];
5803
+ uniform vec4 colors[${Jr}];
5804
5804
  varying vec2 vUv;
5805
5805
 
5806
5806
  float calcWidth() {
@@ -5809,7 +5809,7 @@ float calcWidth() {
5809
5809
 
5810
5810
  int calcCount() {
5811
5811
  int count = 0;
5812
- for (int i = 0; i < ${qr}; i++) {
5812
+ for (int i = 0; i < ${Jr}; i++) {
5813
5813
  if (colors[i] != vec4(0,0,0,0)){
5814
5814
  count++;
5815
5815
  }
@@ -5821,7 +5821,7 @@ vec4 calcColor(float x) {
5821
5821
  float perUnit = calcWidth() / float(calcCount());
5822
5822
  int index = int(x / perUnit);
5823
5823
 
5824
- for(int i=0; i<${qr}; i++){
5824
+ for(int i=0; i<${Jr}; i++){
5825
5825
  if(i==index){
5826
5826
  return colors[i];
5827
5827
  }
@@ -5836,7 +5836,7 @@ void main(void) {
5836
5836
  gl_FragColor = vec4(mix(color.rgb, mask.rgb, color.a * mask.a), color.a);
5837
5837
  }`
5838
5838
  } });
5839
- _color = new bt();
5839
+ _color = new xt();
5840
5840
  constructor(e, t = []) {
5841
5841
  super(), this.setProperties(e).append(t);
5842
5842
  }
@@ -5847,31 +5847,31 @@ void main(void) {
5847
5847
  let t = this._color.toArray();
5848
5848
  return t[3] = this.alpha, t;
5849
5849
  });
5850
- for (; t.length < qr;) t.push([
5850
+ for (; t.length < Jr;) t.push([
5851
5851
  0,
5852
5852
  0,
5853
5853
  0,
5854
5854
  0
5855
5855
  ]);
5856
- R.draw(e, Kr.material, {
5856
+ L.draw(e, qr.material, {
5857
5857
  sampler: 0,
5858
- colors: t.slice(0, qr).flatMap((e) => e)
5858
+ colors: t.slice(0, Jr).flatMap((e) => e)
5859
5859
  });
5860
5860
  });
5861
5861
  }
5862
5862
  };
5863
- A([_({ default: () => [] }), k("design:type", Array)], Jr.prototype, "colors", void 0), A([_({ fallback: .5 }), k("design:type", Number)], Jr.prototype, "alpha", void 0), Jr = Kr = A([S("ColorOverlayEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Jr);
5863
+ k([_({ default: () => [] }), O("design:type", Array)], Yr.prototype, "colors", void 0), k([_({ fallback: .5 }), O("design:type", Number)], Yr.prototype, "alpha", void 0), Yr = qr = k([S("ColorOverlayEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Yr);
5864
5864
  //#endregion
5865
5865
  //#region src/scene/effects/ColorRemoveEffect.ts
5866
- var Yr, Xr = class extends G {
5866
+ var Xr, Zr = class extends W {
5867
5867
  static {
5868
- Yr = this;
5868
+ Xr = this;
5869
5869
  }
5870
- static material = new L({ gl: {
5870
+ static material = new I({ gl: {
5871
5871
  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}",
5872
5872
  fragment: "varying vec2 vUv;\nuniform sampler2D sampler;\nuniform float epsilon;\nconst int MAX_COLORS = 50;\nuniform vec3 originalColors[MAX_COLORS];\n\nvoid main(void) {\n vec4 color = texture2D(sampler, vUv);\n\n for (int i = 0; i < MAX_COLORS; i++) {\n vec3 origColor = originalColors[i];\n if (origColor.r < 0.0) {\n break;\n }\n vec3 colorDiff = origColor - color.rgb;\n if (length(colorDiff) < epsilon) {\n gl_FragColor = vec4(0, 0, 0, 0);\n return;\n }\n }\n\n gl_FragColor = color;\n}"
5873
5873
  } });
5874
- _color = new bt();
5874
+ _color = new xt();
5875
5875
  constructor(e, t = []) {
5876
5876
  super(), this.setProperties(e).append(t);
5877
5877
  }
@@ -5885,7 +5885,7 @@ var Yr, Xr = class extends G {
5885
5885
  r.slice(0, 50).forEach((e, t) => {
5886
5886
  n[t * 3] = e[0], n[t * 3 + 1] = e[1], n[t * 3 + 2] = e[2];
5887
5887
  }), t.redraw(e, () => {
5888
- R.draw(e, Yr.material, {
5888
+ L.draw(e, Xr.material, {
5889
5889
  sampler: 0,
5890
5890
  epsilon: this.epsilon,
5891
5891
  originalColors: n
@@ -5893,19 +5893,19 @@ var Yr, Xr = class extends G {
5893
5893
  });
5894
5894
  }
5895
5895
  };
5896
- A([_({ default: () => [] }), k("design:type", Array)], Xr.prototype, "colors", void 0), A([_({ fallback: .5 }), k("design:type", Number)], Xr.prototype, "epsilon", void 0), Xr = Yr = A([S("ColorRemoveEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Xr);
5896
+ k([_({ default: () => [] }), O("design:type", Array)], Zr.prototype, "colors", void 0), k([_({ fallback: .5 }), O("design:type", Number)], Zr.prototype, "epsilon", void 0), Zr = Xr = k([S("ColorRemoveEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Zr);
5897
5897
  //#endregion
5898
5898
  //#region src/scene/effects/ColorReplaceEffect.ts
5899
- var Zr, Qr = 50, $r = class extends G {
5899
+ var Qr, $r = 50, ei = class extends W {
5900
5900
  static {
5901
- Zr = this;
5901
+ Qr = this;
5902
5902
  }
5903
- static material = new L({ gl: {
5903
+ static material = new I({ gl: {
5904
5904
  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}",
5905
5905
  fragment: `varying vec2 vUv;
5906
5906
  uniform sampler2D sampler;
5907
5907
  uniform float epsilon;
5908
- const int MAX_COLORS = ${Qr};
5908
+ const int MAX_COLORS = ${$r};
5909
5909
  uniform vec3 originalColors[MAX_COLORS];
5910
5910
  uniform vec3 targetColors[MAX_COLORS];
5911
5911
 
@@ -5933,7 +5933,7 @@ void main(void) {
5933
5933
  }
5934
5934
  }`
5935
5935
  } });
5936
- _color = new bt();
5936
+ _color = new xt();
5937
5937
  constructor(e, t = []) {
5938
5938
  super(), this.setProperties(e).append(t);
5939
5939
  }
@@ -5942,8 +5942,8 @@ void main(void) {
5942
5942
  this._color.value = e[0];
5943
5943
  let t = this._color.toArray().slice(0, 3);
5944
5944
  return this._color.value = e[1], [t, this._color.toArray().slice(0, 3)];
5945
- }), r = this.epsilon, i = new Float32Array(Qr * 3), a = new Float32Array(Qr * 3);
5946
- for (; n.length < Qr;) n.push([[
5945
+ }), r = this.epsilon, i = new Float32Array($r * 3), a = new Float32Array($r * 3);
5946
+ for (; n.length < $r;) n.push([[
5947
5947
  -1,
5948
5948
  0,
5949
5949
  0
@@ -5953,10 +5953,10 @@ void main(void) {
5953
5953
  0,
5954
5954
  1
5955
5955
  ]]);
5956
- n.slice(0, Qr).forEach(([e, t], n) => {
5956
+ n.slice(0, $r).forEach(([e, t], n) => {
5957
5957
  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];
5958
5958
  }), t.redraw(e, () => {
5959
- R.draw(e, Zr.material, {
5959
+ L.draw(e, Qr.material, {
5960
5960
  sampler: 0,
5961
5961
  epsilon: r,
5962
5962
  originalColors: i,
@@ -5965,17 +5965,17 @@ void main(void) {
5965
5965
  });
5966
5966
  }
5967
5967
  };
5968
- A([_({ default: () => [] }), k("design:type", Array)], $r.prototype, "colors", void 0), A([_({ fallback: .05 }), k("design:type", Number)], $r.prototype, "epsilon", void 0), $r = Zr = A([S("ColorReplaceEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], $r);
5968
+ k([_({ default: () => [] }), O("design:type", Array)], ei.prototype, "colors", void 0), k([_({ fallback: .05 }), O("design:type", Number)], ei.prototype, "epsilon", void 0), ei = Qr = k([S("ColorReplaceEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], ei);
5969
5969
  //#endregion
5970
5970
  //#region src/scene/effects/DrawboardEffect.frag?raw
5971
- var ei = "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;\nuniform float dotBackgroundBaseColor;\nuniform float dotBackgroundZoomedOutColor;\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\nconst int CHECKERBOARD_STYLE_NONE = 0;\nconst int CHECKERBOARD_STYLE_GRID = 1;\nconst int CHECKERBOARD_STYLE_GRID_DARK = 2;\nconst int CHECKERBOARD_STYLE_DOTS = 3;\nconst int CHECKERBOARD_STYLE_DOTS_DARK = 4;\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 float value;\n if (checkerboardStyle == CHECKERBOARD_STYLE_GRID) {\n vec2 fractValue = fract(coord * vec2(gridScale) * zoom) - 0.5;\n value = fractValue.x * fractValue.y < 0.0 ? 1.0 : 0.95;\n }\n else if (checkerboardStyle == CHECKERBOARD_STYLE_GRID_DARK) {\n vec2 fractValue = fract(coord * vec2(gridScale) * zoom) - 0.5;\n value = fractValue.x * fractValue.y < 0.0 ? 0.12 : 0.17;\n }\n else if (checkerboardStyle == CHECKERBOARD_STYLE_DOTS || checkerboardStyle == CHECKERBOARD_STYLE_DOTS_DARK) {\n // light vs dark dots share this path; the base/dot colours are supplied as\n // uniforms (set per style on the CPU side), so only the values differ.\n float zoomScale = zoom.x;\n float gridPixelSize = scaledGridSize(zoomScale);\n float zoomInterpolationFactor = smoothstep(0.5, 1.0, zoomScale);\n float dotColor = dotBackgroundZoomedOutColor + 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 value = mix(dotBackgroundBaseColor, dotColor, dist);\n }\n return vec4(value * (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", ti, q = class extends G {
5971
+ var ti = "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;\nuniform float dotBackgroundBaseColor;\nuniform float dotBackgroundZoomedOutColor;\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\nconst int CHECKERBOARD_STYLE_NONE = 0;\nconst int CHECKERBOARD_STYLE_GRID = 1;\nconst int CHECKERBOARD_STYLE_GRID_DARK = 2;\nconst int CHECKERBOARD_STYLE_DOTS = 3;\nconst int CHECKERBOARD_STYLE_DOTS_DARK = 4;\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 float value;\n if (checkerboardStyle == CHECKERBOARD_STYLE_GRID) {\n vec2 fractValue = fract(coord * vec2(gridScale) * zoom) - 0.5;\n value = fractValue.x * fractValue.y < 0.0 ? 1.0 : 0.95;\n }\n else if (checkerboardStyle == CHECKERBOARD_STYLE_GRID_DARK) {\n vec2 fractValue = fract(coord * vec2(gridScale) * zoom) - 0.5;\n value = fractValue.x * fractValue.y < 0.0 ? 0.12 : 0.17;\n }\n else if (checkerboardStyle == CHECKERBOARD_STYLE_DOTS || checkerboardStyle == CHECKERBOARD_STYLE_DOTS_DARK) {\n // light vs dark dots share this path; the base/dot colours are supplied as\n // uniforms (set per style on the CPU side), so only the values differ.\n float zoomScale = zoom.x;\n float gridPixelSize = scaledGridSize(zoomScale);\n float zoomInterpolationFactor = smoothstep(0.5, 1.0, zoomScale);\n float dotColor = dotBackgroundZoomedOutColor + 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 value = mix(dotBackgroundBaseColor, dotColor, dist);\n }\n return vec4(value * (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", ni, K = class extends W {
5972
5972
  static {
5973
- ti = this;
5973
+ ni = this;
5974
5974
  }
5975
5975
  _watermark;
5976
- static material = new L({ gl: {
5976
+ static material = new I({ gl: {
5977
5977
  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}",
5978
- fragment: ei
5978
+ fragment: ti
5979
5979
  } });
5980
5980
  constructor(e, t = []) {
5981
5981
  super(), this.setProperties(e).append(t);
@@ -6024,7 +6024,7 @@ var ei = "precision highp float;\n\nin vec2 vUv;\nuniform sampler2D uTexture;\nu
6024
6024
  zoomedOut: this.dotColor ?? a.zoomedOut,
6025
6025
  diff: this.dotZoomDiff ?? a.diff
6026
6026
  };
6027
- R.draw(e, ti.material, {
6027
+ L.draw(e, ni.material, {
6028
6028
  uTexture: 0,
6029
6029
  inputSize: [t.width, t.height],
6030
6030
  zoom: [n[0], n[4]],
@@ -6048,20 +6048,20 @@ var ei = "precision highp float;\n\nin vec2 vUv;\nuniform sampler2D uTexture;\nu
6048
6048
  });
6049
6049
  }
6050
6050
  };
6051
- A([_({ fallback: !1 }), k("design:type", Boolean)], q.prototype, "checkerboard", void 0), A([_({ fallback: "grid" }), k("design:type", Object)], q.prototype, "checkerboardStyle", void 0), A([_({ fallback: !1 }), k("design:type", Boolean)], q.prototype, "pixelGrid", void 0), A([_(), k("design:type", Number)], q.prototype, "dotBaseColor", void 0), A([_(), k("design:type", Number)], q.prototype, "dotColor", void 0), A([_(), k("design:type", Number)], q.prototype, "dotZoomDiff", void 0), A([_(), k("design:type", String)], q.prototype, "watermark", void 0), A([_({ fallback: 100 }), k("design:type", Number)], q.prototype, "watermarkWidth", void 0), A([_({ fallback: .05 }), k("design:type", Number)], q.prototype, "watermarkAlpha", void 0), A([_({ fallback: .5236 }), k("design:type", Number)], q.prototype, "watermarkRotation", void 0), q = ti = A([S("DrawboardEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], q);
6051
+ k([_({ fallback: !1 }), O("design:type", Boolean)], K.prototype, "checkerboard", void 0), k([_({ fallback: "grid" }), O("design:type", Object)], K.prototype, "checkerboardStyle", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], K.prototype, "pixelGrid", void 0), k([_(), O("design:type", Number)], K.prototype, "dotBaseColor", void 0), k([_(), O("design:type", Number)], K.prototype, "dotColor", void 0), k([_(), O("design:type", Number)], K.prototype, "dotZoomDiff", void 0), k([_(), O("design:type", String)], K.prototype, "watermark", void 0), k([_({ fallback: 100 }), O("design:type", Number)], K.prototype, "watermarkWidth", void 0), k([_({ fallback: .05 }), O("design:type", Number)], K.prototype, "watermarkAlpha", void 0), k([_({ fallback: .5236 }), O("design:type", Number)], K.prototype, "watermarkRotation", void 0), K = ni = k([S("DrawboardEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], K);
6052
6052
  //#endregion
6053
6053
  //#region src/scene/effects/GaussianBlurEffect.ts
6054
- var ni, ri = "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}", ii = class extends G {
6054
+ var ri, ii = "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}", ai = class extends W {
6055
6055
  static {
6056
- ni = this;
6056
+ ri = this;
6057
6057
  }
6058
- static materialX = new L({ gl: {
6058
+ static materialX = new I({ gl: {
6059
6059
  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}",
6060
- fragment: ri
6060
+ fragment: ii
6061
6061
  } });
6062
- static materialY = new L({ gl: {
6062
+ static materialY = new I({ gl: {
6063
6063
  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}",
6064
- fragment: ri
6064
+ fragment: ii
6065
6065
  } });
6066
6066
  constructor(e, t = []) {
6067
6067
  super(), this.setProperties(e).append(t);
@@ -6069,39 +6069,39 @@ var ni, ri = "varying vec2 vUv[9];\nuniform sampler2D sampler;\n\nvoid main(void
6069
6069
  apply(e, t) {
6070
6070
  let n = 1 / t.width, r = 1 / t.height, i = Math.max(this.quality, 1);
6071
6071
  for (let r = 0; r < i; r++) t.redraw(e, () => {
6072
- R.draw(e, ni.materialX, {
6072
+ L.draw(e, ri.materialX, {
6073
6073
  sampler: 0,
6074
6074
  uStrength: n * (this.strength / i)
6075
6075
  });
6076
6076
  });
6077
6077
  for (let n = 0; n < i; n++) t.redraw(e, () => {
6078
- R.draw(e, ni.materialY, {
6078
+ L.draw(e, ri.materialY, {
6079
6079
  sampler: 0,
6080
6080
  uStrength: r * (this.strength / i)
6081
6081
  });
6082
6082
  });
6083
6083
  }
6084
6084
  };
6085
- A([_({ fallback: 4 }), k("design:type", Number)], ii.prototype, "strength", void 0), A([_({ fallback: 3 }), k("design:type", Number)], ii.prototype, "quality", void 0), ii = ni = A([S("GaussianBlurEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], ii);
6085
+ k([_({ fallback: 4 }), O("design:type", Number)], ai.prototype, "strength", void 0), k([_({ fallback: 3 }), O("design:type", Number)], ai.prototype, "quality", void 0), ai = ri = k([S("GaussianBlurEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], ai);
6086
6086
  //#endregion
6087
6087
  //#region src/scene/effects/DropShadowEffect.ts
6088
- var ai, oi = class extends G {
6088
+ var oi, si = class extends W {
6089
6089
  static {
6090
- ai = this;
6090
+ oi = this;
6091
6091
  }
6092
- static material = new L({ gl: {
6092
+ static material = new I({ gl: {
6093
6093
  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}",
6094
6094
  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}"
6095
6095
  } });
6096
- blurEffect = new ii();
6097
- viewport3 = new W();
6098
- _color = new bt();
6096
+ blurEffect = new ai();
6097
+ viewport3 = new U();
6098
+ _color = new xt();
6099
6099
  constructor(e, t = []) {
6100
6100
  super(), this.setProperties(e).append(t);
6101
6101
  }
6102
6102
  apply(e, t) {
6103
6103
  this.viewport3.activateWithCopy(e, t), this.viewport3.redraw(e, () => {
6104
- this._color.value = this.color, R.draw(e, ai.material, {
6104
+ this._color.value = this.color, L.draw(e, oi.material, {
6105
6105
  sampler: 0,
6106
6106
  uAlpha: this._color.a,
6107
6107
  uColor: this._color.toArray().slice(0, 3),
@@ -6114,18 +6114,18 @@ var ai, oi = class extends G {
6114
6114
  ]
6115
6115
  });
6116
6116
  }), this.blurEffect.strength = this.blur, this.blurEffect.apply(e, this.viewport3), t.redraw(e, () => {
6117
- this.viewport3.texture.activate(e, 1), R.draw(e, tr.instance, { sampler: 1 }), this.shadowOnly || R.draw(e, tr.instance, { sampler: 0 }), e.texture.unbind(1);
6117
+ this.viewport3.texture.activate(e, 1), L.draw(e, nr.instance, { sampler: 1 }), this.shadowOnly || L.draw(e, nr.instance, { sampler: 0 }), e.texture.unbind(1);
6118
6118
  });
6119
6119
  }
6120
6120
  };
6121
- A([_({ fallback: "#000000FF" }), k("design:type", Object)], oi.prototype, "color", void 0), A([_({ fallback: 4 }), k("design:type", Number)], oi.prototype, "blur", void 0), A([_({ fallback: 4 }), k("design:type", Number)], oi.prototype, "offsetX", void 0), A([_({ fallback: 4 }), k("design:type", Number)], oi.prototype, "offsetY", void 0), A([_({ fallback: !1 }), k("design:type", Boolean)], oi.prototype, "shadowOnly", void 0), oi = ai = A([S("DropShadowEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], oi);
6121
+ k([_({ fallback: "#000000FF" }), O("design:type", Object)], si.prototype, "color", void 0), k([_({ fallback: 4 }), O("design:type", Number)], si.prototype, "blur", void 0), k([_({ fallback: 4 }), O("design:type", Number)], si.prototype, "offsetX", void 0), k([_({ fallback: 4 }), O("design:type", Number)], si.prototype, "offsetY", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], si.prototype, "shadowOnly", void 0), si = oi = k([S("DropShadowEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], si);
6122
6122
  //#endregion
6123
6123
  //#region src/scene/effects/EmbossEffect.ts
6124
- var si, ci = class extends G {
6124
+ var ci, li = class extends W {
6125
6125
  static {
6126
- si = this;
6126
+ ci = this;
6127
6127
  }
6128
- static material = new L({ gl: {
6128
+ static material = new I({ gl: {
6129
6129
  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}",
6130
6130
  fragment: "precision mediump float;\nuniform sampler2D sampler;\nuniform vec4 inputSize;\nuniform float strength;\nvarying vec2 vUv;\n\nvoid main(void) {\n vec2 onePixel = inputSize.zw;\n vec4 color;\n color.rgb = vec3(0.5);\n color -= texture2D(sampler, vUv - onePixel) * strength;\n color += texture2D(sampler, vUv + onePixel) * strength;\n color.rgb = vec3((color.r + color.g + color.b) / 3.0);\n float alpha = texture2D(sampler, vUv).a;\n gl_FragColor = vec4(color.rgb * alpha, alpha);\n}"
6131
6131
  } });
@@ -6134,7 +6134,7 @@ var si, ci = class extends G {
6134
6134
  }
6135
6135
  apply(e, t) {
6136
6136
  t.redraw(e, () => {
6137
- R.draw(e, si.material, {
6137
+ L.draw(e, ci.material, {
6138
6138
  sampler: 0,
6139
6139
  strength: this.strength,
6140
6140
  inputSize: [
@@ -6147,14 +6147,14 @@ var si, ci = class extends G {
6147
6147
  });
6148
6148
  }
6149
6149
  };
6150
- A([_({ fallback: 5 }), k("design:type", Number)], ci.prototype, "strength", void 0), ci = si = A([S("EmbossEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], ci);
6150
+ k([_({ fallback: 5 }), O("design:type", Number)], li.prototype, "strength", void 0), li = ci = k([S("EmbossEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], li);
6151
6151
  //#endregion
6152
6152
  //#region src/scene/effects/GlitchEffect.ts
6153
- var li, J = class extends G {
6153
+ var ui, q = class extends W {
6154
6154
  static {
6155
- li = this;
6155
+ ui = this;
6156
6156
  }
6157
- static material = new L({ gl: {
6157
+ static material = new I({ gl: {
6158
6158
  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}",
6159
6159
  fragment: "\nin vec2 vUv;\nuniform sampler2D sampler;\n\nuniform vec4 filterArea;\nuniform vec4 filterClamp;\nuniform vec2 dimensions;\nuniform float aspect;\n\nuniform sampler2D displacementMap;\nuniform float offset;\nuniform float sinDir;\nuniform float cosDir;\nuniform int fillMode;\n\nuniform float seed;\nuniform vec2 red;\nuniform vec2 green;\nuniform vec2 blue;\n\nconst int TRANSPARENT = 0;\nconst int ORIGINAL = 1;\nconst int LOOP = 2;\nconst int CLAMP = 3;\nconst int MIRROR = 4;\n\nvoid main(void) {\n vec2 coord = (vUv * filterArea.xy) / dimensions;\n\n if (coord.x > 1.0 || coord.y > 1.0) {\n return;\n }\n\n float cx = coord.x - 0.5;\n float cy = (coord.y - 0.5) * aspect;\n float ny = (-sinDir * cx + cosDir * cy) / aspect + 0.5;\n\n // displacementMap: repeat\n // ny = ny > 1.0 ? ny - 1.0 : (ny < 0.0 ? 1.0 + ny : ny);\n\n // displacementMap: mirror\n ny = ny > 1.0 ? 2.0 - ny : (ny < 0.0 ? -ny : ny);\n\n vec4 dc = texture(displacementMap, vec2(0.5, ny));\n\n float displacement = (dc.r - dc.g) * (offset / filterArea.x);\n\n coord = vUv + vec2(cosDir * displacement, sinDir * displacement * aspect);\n\n if (fillMode == CLAMP) {\n coord = clamp(coord, filterClamp.xy, filterClamp.zw);\n } else {\n if (coord.x > filterClamp.z) {\n if (fillMode == TRANSPARENT) {\n discard;\n } else if (fillMode == LOOP) {\n coord.x -= filterClamp.z;\n } else if (fillMode == MIRROR) {\n coord.x = filterClamp.z * 2.0 - coord.x;\n }\n } else if (coord.x < filterClamp.x) {\n if (fillMode == TRANSPARENT) {\n discard;\n } else if (fillMode == LOOP) {\n coord.x += filterClamp.z;\n } else if (fillMode == MIRROR) {\n coord.x *= -filterClamp.z;\n }\n }\n\n if (coord.y > filterClamp.w) {\n if (fillMode == TRANSPARENT) {\n discard;\n } else if (fillMode == LOOP) {\n coord.y -= filterClamp.w;\n } else if (fillMode == MIRROR) {\n coord.y = filterClamp.w * 2.0 - coord.y;\n }\n } else if (coord.y < filterClamp.y) {\n if (fillMode == TRANSPARENT) {\n discard;\n } else if (fillMode == LOOP) {\n coord.y += filterClamp.w;\n } else if (fillMode == MIRROR) {\n coord.y *= -filterClamp.w;\n }\n }\n }\n\n gl_FragColor.r = texture(sampler, coord + red * (1.0 - seed * 0.4) / filterArea.xy).r;\n gl_FragColor.g = texture(sampler, coord + green * (1.0 - seed * 0.3) / filterArea.xy).g;\n gl_FragColor.b = texture(sampler, coord + blue * (1.0 - seed * 0.2) / filterArea.xy).b;\n gl_FragColor.a = texture(sampler, coord).a;\n}"
6160
6160
  } });
@@ -6167,7 +6167,7 @@ var li, J = class extends G {
6167
6167
  super(), this.setProperties(e).append(t);
6168
6168
  let n = w(4, this.sampleSize);
6169
6169
  if (!n) throw Error("GlitchEffect requires a canvas; call setCanvasFactory() in non-browser environments.");
6170
- this._canvas = n, this._texture = new B(this._canvas), this._sizes = new Float32Array(this.slices), this._offsets = new Float32Array(this.slices);
6170
+ this._canvas = n, this._texture = new z(this._canvas), this._sizes = new Float32Array(this.slices), this._offsets = new Float32Array(this.slices);
6171
6171
  }
6172
6172
  redraw() {
6173
6173
  let e = this.sampleSize, t = this._texture, n = this._canvas.getContext("2d");
@@ -6184,7 +6184,7 @@ var li, J = class extends G {
6184
6184
  this._needsRedraw || (this._needsRedraw = !0, this.redraw());
6185
6185
  let n = t.width, r = t.height, i = this.direction * (Math.PI / 180), a = Math.sin(i), o = Math.cos(i);
6186
6186
  t.redraw(e, () => {
6187
- this._texture.activate(e, 1), R.draw(e, li.material, {
6187
+ this._texture.activate(e, 1), L.draw(e, ui.material, {
6188
6188
  sampler: 0,
6189
6189
  filterClamp: [
6190
6190
  0,
@@ -6213,14 +6213,14 @@ var li, J = class extends G {
6213
6213
  });
6214
6214
  }
6215
6215
  };
6216
- A([_({ fallback: 10 }), k("design:type", Number)], J.prototype, "slices", void 0), A([_({ fallback: 512 }), k("design:type", Number)], J.prototype, "sampleSize", void 0), A([_({ fallback: 100 }), k("design:type", Number)], J.prototype, "offset", void 0), A([_({ fallback: 0 }), k("design:type", Number)], J.prototype, "direction", void 0), A([_({ fallback: 2 }), k("design:type", Number)], J.prototype, "fillMode", void 0), A([_({ fallback: 0 }), k("design:type", Number)], J.prototype, "seed", void 0), A([_({ default: () => [2, 2] }), k("design:type", Array)], J.prototype, "red", void 0), A([_({ default: () => [-10, 4] }), k("design:type", Array)], J.prototype, "green", void 0), A([_({ default: () => [10, -4] }), k("design:type", Array)], J.prototype, "blue", void 0), J = li = A([S("GlitchEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], J);
6216
+ k([_({ fallback: 10 }), O("design:type", Number)], q.prototype, "slices", void 0), k([_({ fallback: 512 }), O("design:type", Number)], q.prototype, "sampleSize", void 0), k([_({ fallback: 100 }), O("design:type", Number)], q.prototype, "offset", void 0), k([_({ fallback: 0 }), O("design:type", Number)], q.prototype, "direction", void 0), k([_({ fallback: 2 }), O("design:type", Number)], q.prototype, "fillMode", void 0), k([_({ fallback: 0 }), O("design:type", Number)], q.prototype, "seed", void 0), k([_({ default: () => [2, 2] }), O("design:type", Array)], q.prototype, "red", void 0), k([_({ default: () => [-10, 4] }), O("design:type", Array)], q.prototype, "green", void 0), k([_({ default: () => [10, -4] }), O("design:type", Array)], q.prototype, "blue", void 0), q = ui = k([S("GlitchEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], q);
6217
6217
  //#endregion
6218
6218
  //#region src/scene/effects/GodrayEffect.ts
6219
- var ui, di = "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}", fi = class extends G {
6219
+ var di, fi = "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}", pi = class extends W {
6220
6220
  static {
6221
- ui = this;
6221
+ di = this;
6222
6222
  }
6223
- static material = new L({ gl: {
6223
+ static material = new I({ gl: {
6224
6224
  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}",
6225
6225
  fragment: `precision highp float;
6226
6226
  varying vec2 vUv;
@@ -6233,7 +6233,7 @@ uniform float uTime;
6233
6233
  uniform vec3 uRay;
6234
6234
  uniform vec4 uInputSize;
6235
6235
 
6236
- ${di}
6236
+ ${fi}
6237
6237
 
6238
6238
  void main(void) {
6239
6239
  bool uParallel = uParallel > 0.5;
@@ -6272,7 +6272,7 @@ void main(void) {
6272
6272
  apply(e, t) {
6273
6273
  let n = this.angle * (Math.PI / 180), r = this.parallel ? [Math.cos(n), Math.sin(n)] : this.center;
6274
6274
  t.redraw(e, () => {
6275
- R.draw(e, ui.material, {
6275
+ L.draw(e, di.material, {
6276
6276
  sampler: 0,
6277
6277
  uDimensions: [t.width, t.height],
6278
6278
  uParallel: +!!this.parallel,
@@ -6294,15 +6294,15 @@ void main(void) {
6294
6294
  });
6295
6295
  }
6296
6296
  };
6297
- A([_({ fallback: 0 }), k("design:type", Number)], fi.prototype, "time", void 0), A([_({ fallback: 30 }), k("design:type", Number)], fi.prototype, "angle", void 0), A([_({ fallback: .5 }), k("design:type", Number)], fi.prototype, "gain", void 0), A([_({ fallback: 2.5 }), k("design:type", Number)], fi.prototype, "lacunarity", void 0), A([_({ fallback: !0 }), k("design:type", Boolean)], fi.prototype, "parallel", void 0), A([_({ default: () => [0, 0] }), k("design:type", Array)], fi.prototype, "center", void 0), A([_({ fallback: 1 }), k("design:type", Number)], fi.prototype, "alpha", void 0), fi = ui = A([S("GodrayEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], fi);
6297
+ k([_({ fallback: 0 }), O("design:type", Number)], pi.prototype, "time", void 0), k([_({ fallback: 30 }), O("design:type", Number)], pi.prototype, "angle", void 0), k([_({ fallback: .5 }), O("design:type", Number)], pi.prototype, "gain", void 0), k([_({ fallback: 2.5 }), O("design:type", Number)], pi.prototype, "lacunarity", void 0), k([_({ fallback: !0 }), O("design:type", Boolean)], pi.prototype, "parallel", void 0), k([_({ default: () => [0, 0] }), O("design:type", Array)], pi.prototype, "center", void 0), k([_({ fallback: 1 }), O("design:type", Number)], pi.prototype, "alpha", void 0), pi = di = k([S("GodrayEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], pi);
6298
6298
  //#endregion
6299
6299
  //#region src/scene/effects/KawaseBlurEffect.ts
6300
- var pi = "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}", mi = "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}", hi = class extends G {
6300
+ var mi = "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}", hi = "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}", gi = class extends W {
6301
6301
  _kernels = [0];
6302
6302
  constructor(e, t = []) {
6303
- super(), this.material = new L({ gl: {
6303
+ super(), this.material = new I({ gl: {
6304
6304
  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}",
6305
- fragment: e?.clamp ? mi : pi
6305
+ fragment: e?.clamp ? hi : mi
6306
6306
  } }), this.setProperties(e).append(t), this._generateKernels();
6307
6307
  }
6308
6308
  _updateProperty(e, t, n) {
@@ -6326,7 +6326,7 @@ var pi = "varying vec2 vUv;\nuniform sampler2D sampler;\nuniform vec2 uOffset;\n
6326
6326
  this._kernels.forEach((i) => {
6327
6327
  let a = i + .5;
6328
6328
  t.redraw(e, () => {
6329
- R.draw(e, this.material, {
6329
+ L.draw(e, this.material, {
6330
6330
  sampler: 0,
6331
6331
  uOffset: [a * n, a * r],
6332
6332
  uInputClamp: [
@@ -6340,14 +6340,14 @@ var pi = "varying vec2 vUv;\nuniform sampler2D sampler;\nuniform vec2 uOffset;\n
6340
6340
  });
6341
6341
  }
6342
6342
  };
6343
- A([_({ fallback: 4 }), k("design:type", Number)], hi.prototype, "strength", void 0), A([_({ fallback: 3 }), k("design:type", Number)], hi.prototype, "quality", void 0), A([_({ default: () => [1, 1] }), k("design:type", Array)], hi.prototype, "pixelSize", void 0), hi = A([S("KawaseBlurEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], hi);
6343
+ k([_({ fallback: 4 }), O("design:type", Number)], gi.prototype, "strength", void 0), k([_({ fallback: 3 }), O("design:type", Number)], gi.prototype, "quality", void 0), k([_({ default: () => [1, 1] }), O("design:type", Array)], gi.prototype, "pixelSize", void 0), gi = k([S("KawaseBlurEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], gi);
6344
6344
  //#endregion
6345
6345
  //#region src/scene/effects/MaskEffect.ts
6346
- var gi, _i = class extends G {
6346
+ var _i, vi = class extends W {
6347
6347
  static {
6348
- gi = this;
6348
+ _i = this;
6349
6349
  }
6350
- static material = new L({ gl: {
6350
+ static material = new I({ gl: {
6351
6351
  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}",
6352
6352
  fragment: "in vec2 vUv;\n\nuniform sampler2D sampler;\nuniform sampler2D mask;\nuniform float rotation;\n\nvec2 rotateUV(vec2 uv, float angle) {\n uv -= 0.5;\n float cosAngle = cos(angle);\n float sinAngle = sin(angle);\n mat2 rotationMatrix = mat2(\n cosAngle, -sinAngle,\n sinAngle, cosAngle\n );\n uv = rotationMatrix * uv;\n uv += 0.5;\n return uv;\n}\n\nvoid main(void) {\n vec4 color = texture(sampler, vUv);\n vec4 maskColor = texture(mask, rotateUV(vUv, rotation));\n gl_FragColor = mix(vec4(0.), color, maskColor.a);\n}"
6353
6353
  } });
@@ -6367,7 +6367,7 @@ var gi, _i = class extends G {
6367
6367
  }
6368
6368
  apply(e, t, n) {
6369
6369
  this.texture && t.redraw(e, () => {
6370
- this.texture.activate(e, 1), R.draw(e, gi.material, {
6370
+ this.texture.activate(e, 1), L.draw(e, _i.material, {
6371
6371
  sampler: 0,
6372
6372
  mask: 1,
6373
6373
  rotation: n.target?.globalRotation ?? 0
@@ -6375,33 +6375,33 @@ var gi, _i = class extends G {
6375
6375
  });
6376
6376
  }
6377
6377
  };
6378
- A([_({ fallback: "" }), k("design:type", String)], _i.prototype, "image", void 0), _i = gi = A([S("MaskEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], _i);
6378
+ k([_({ fallback: "" }), O("design:type", String)], vi.prototype, "image", void 0), vi = _i = k([S("MaskEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], vi);
6379
6379
  //#endregion
6380
6380
  //#region src/scene/effects/OutlineEffect.ts
6381
- var vi, yi = "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}", bi = class extends G {
6381
+ var yi, bi = "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}", xi = class extends W {
6382
6382
  static {
6383
- vi = this;
6383
+ yi = this;
6384
6384
  }
6385
6385
  static MIN_SAMPLES = 1;
6386
6386
  static MAX_SAMPLES = 100;
6387
6387
  static getAngleStep(e) {
6388
- return Number.parseFloat((Math.PI * 2 / Math.max(e * vi.MAX_SAMPLES, vi.MIN_SAMPLES)).toFixed(7));
6388
+ return Number.parseFloat((Math.PI * 2 / Math.max(e * yi.MAX_SAMPLES, yi.MIN_SAMPLES)).toFixed(7));
6389
6389
  }
6390
- _color = new bt();
6390
+ _color = new xt();
6391
6391
  constructor(e, t = []) {
6392
- super(), this.setProperties(e).append(t), this.material = new L({ gl: {
6392
+ super(), this.setProperties(e).append(t), this.material = new I({ gl: {
6393
6393
  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}",
6394
- fragment: yi.replace(/\{ANGLE_STEP\}/, vi.getAngleStep(this.quality).toFixed(7))
6394
+ fragment: bi.replace(/\{ANGLE_STEP\}/, yi.getAngleStep(this.quality).toFixed(7))
6395
6395
  } });
6396
6396
  }
6397
6397
  apply(e, t) {
6398
6398
  t.redraw(e, () => {
6399
- this._color.value = this.color, R.draw(e, this.material, {
6399
+ this._color.value = this.color, L.draw(e, this.material, {
6400
6400
  sampler: 0,
6401
6401
  uThickness: [this.width / t.width, this.width / t.height],
6402
6402
  uColor: this._color.toArray().slice(0, 3),
6403
6403
  uAlpha: this.opacity === 1 ? this._color.a : this.opacity,
6404
- uAngleStep: vi.getAngleStep(this.quality),
6404
+ uAngleStep: yi.getAngleStep(this.quality),
6405
6405
  uKnockout: +!!this.knockout,
6406
6406
  uInputClamp: [
6407
6407
  0,
@@ -6413,14 +6413,14 @@ var vi, yi = "precision highp float;\nvarying vec2 vUv;\nuniform sampler2D sampl
6413
6413
  });
6414
6414
  }
6415
6415
  };
6416
- A([_({ fallback: "#000000ff" }), k("design:type", Object)], bi.prototype, "color", void 0), A([_({ fallback: 1 }), k("design:type", Number)], bi.prototype, "width", void 0), A([_({ fallback: "solid" }), k("design:type", String)], bi.prototype, "style", void 0), A([_(), k("design:type", Object)], bi.prototype, "image", void 0), A([_({ fallback: 1 }), k("design:type", Number)], bi.prototype, "opacity", void 0), A([_({ fallback: .1 }), k("design:type", Number)], bi.prototype, "quality", void 0), A([_({ fallback: !1 }), k("design:type", Boolean)], bi.prototype, "knockout", void 0), bi = vi = A([S("OutlineEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], bi);
6416
+ k([_({ fallback: "#000000ff" }), O("design:type", Object)], xi.prototype, "color", void 0), k([_({ fallback: 1 }), O("design:type", Number)], xi.prototype, "width", void 0), k([_({ fallback: "solid" }), O("design:type", String)], xi.prototype, "style", void 0), k([_(), O("design:type", Object)], xi.prototype, "image", void 0), k([_({ fallback: 1 }), O("design:type", Number)], xi.prototype, "opacity", void 0), k([_({ fallback: .1 }), O("design:type", Number)], xi.prototype, "quality", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], xi.prototype, "knockout", void 0), xi = yi = k([S("OutlineEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], xi);
6417
6417
  //#endregion
6418
6418
  //#region src/scene/effects/PixelateEffect.ts
6419
- var xi, Si = class extends G {
6419
+ var Si, Ci = class extends W {
6420
6420
  static {
6421
- xi = this;
6421
+ Si = this;
6422
6422
  }
6423
- static material = new L({ gl: {
6423
+ static material = new I({ gl: {
6424
6424
  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}",
6425
6425
  fragment: "precision highp float;\nvarying vec2 vUv;\nuniform sampler2D sampler;\nuniform vec2 offset;\nuniform vec2 step;\n\nvoid main(void) {\n vec2 uv = vUv;\n uv = floor((uv - offset) / step) * step + offset + step / 2.0;\n gl_FragColor = texture2D(sampler, uv);\n}"
6426
6426
  } });
@@ -6434,18 +6434,18 @@ var xi, Si = class extends G {
6434
6434
  offset: [(r[0] + i[0]) / t.width, 1 - (r[1] + i[1]) / t.height],
6435
6435
  step: [this.strength * r[0] / t.width, this.strength * r[1] / t.height]
6436
6436
  };
6437
- R.draw(e, xi.material, a);
6437
+ L.draw(e, Si.material, a);
6438
6438
  });
6439
6439
  }
6440
6440
  };
6441
- A([_({ fallback: 10 }), k("design:type", Number)], Si.prototype, "strength", void 0), Si = xi = A([S("PixelateEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Si);
6441
+ k([_({ fallback: 10 }), O("design:type", Number)], Ci.prototype, "strength", void 0), Ci = Si = k([S("PixelateEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Ci);
6442
6442
  //#endregion
6443
6443
  //#region src/scene/effects/ZoomBlurEffect.ts
6444
- var Ci, wi = class extends G {
6444
+ var wi, Ti = class extends W {
6445
6445
  static {
6446
- Ci = this;
6446
+ wi = this;
6447
6447
  }
6448
- static material = new L({ gl: {
6448
+ static material = new I({ gl: {
6449
6449
  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}",
6450
6450
  fragment: "varying vec2 vUv;\nuniform sampler2D sampler;\nuniform vec4 uInputSize;\n\nuniform vec2 uCenter;\nuniform float uStrength;\nuniform float uInnerRadius;\nuniform float uRadius;\n\nconst float MAX_KERNEL_SIZE = 32.0;\n\nhighp float rand(vec2 co, float seed) {\n const highp float a = 12.9898, b = 78.233, c = 43758.5453;\n highp float dt = dot(co + seed, vec2(a, b)), sn = mod(dt, 3.14159);\n return fract(sin(sn) * c + seed);\n}\n\nvoid main() {\n float minGradient = uInnerRadius * 0.3;\n float innerRadius1 = (uInnerRadius + minGradient * 0.5) / uInputSize.x;\n\n float gradient = uRadius * 0.3;\n float radius1 = (uRadius - gradient * 0.5) / uInputSize.x;\n\n float countLimit = MAX_KERNEL_SIZE;\n\n vec2 dir = vec2(uCenter.xy / uInputSize.xy - vUv);\n float dist = length(vec2(dir.x, dir.y * uInputSize.y / uInputSize.x));\n\n float strength1 = uStrength;\n\n float delta = 0.0;\n float gap;\n if (dist < innerRadius1) {\n delta = innerRadius1 - dist;\n gap = minGradient;\n } else if (radius1 >= 0.0 && dist > radius1) { // radius1 < 0 means it's infinity\n delta = dist - radius1;\n gap = gradient;\n }\n\n if (delta > 0.0) {\n float normalCount = gap / uInputSize.x;\n delta = (normalCount - delta) / normalCount;\n countLimit *= delta;\n strength1 *= delta;\n if (countLimit < 1.0) {\n gl_FragColor = texture2D(sampler, vUv);\n return;\n }\n }\n\n float offset = rand(vUv, 0.0);\n\n float total = 0.0;\n vec4 color = vec4(0.0);\n\n dir *= strength1;\n\n for (float t = 0.0; t < MAX_KERNEL_SIZE; t++) {\n float percent = (t + offset) / MAX_KERNEL_SIZE;\n float weight = 4.0 * (percent - percent * percent);\n vec2 p = vUv + dir * percent;\n color += texture2D(sampler, p) * weight;\n total += weight;\n\n if (t > countLimit){\n break;\n }\n }\n\n color /= total;\n\n gl_FragColor = color;\n}"
6451
6451
  } });
@@ -6454,7 +6454,7 @@ var Ci, wi = class extends G {
6454
6454
  }
6455
6455
  apply(e, t) {
6456
6456
  t.redraw(e, () => {
6457
- R.draw(e, Ci.material, {
6457
+ L.draw(e, wi.material, {
6458
6458
  sampler: 0,
6459
6459
  uCenter: [t.width / 2, t.height / 2],
6460
6460
  uInnerRadius: this.innerRadius,
@@ -6470,10 +6470,10 @@ var Ci, wi = class extends G {
6470
6470
  });
6471
6471
  }
6472
6472
  };
6473
- A([_(), k("design:type", Array)], wi.prototype, "center", void 0), A([_({ fallback: 20 }), k("design:type", Number)], wi.prototype, "innerRadius", void 0), A([_({ fallback: -1 }), k("design:type", Number)], wi.prototype, "radius", void 0), A([_({ fallback: .1 }), k("design:type", Number)], wi.prototype, "strength", void 0), wi = Ci = A([S("ZoomBlurEffect"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], wi);
6473
+ k([_(), O("design:type", Array)], Ti.prototype, "center", void 0), k([_({ fallback: 20 }), O("design:type", Number)], Ti.prototype, "innerRadius", void 0), k([_({ fallback: -1 }), O("design:type", Number)], Ti.prototype, "radius", void 0), k([_({ fallback: .1 }), O("design:type", Number)], Ti.prototype, "strength", void 0), Ti = wi = k([S("ZoomBlurEffect"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], Ti);
6474
6474
  //#endregion
6475
6475
  //#region src/scene/2d/element/utils.ts
6476
- function Ti(e, t) {
6476
+ function Ei(e, t) {
6477
6477
  let { x: n, y: r, width: i, height: a } = t, o = !1, s = new b().translate(-n, -r).scale(1 / i, 1 / a);
6478
6478
  if (e.cropRect) {
6479
6479
  let { left: t = 0, top: n = 0, right: r = 0, bottom: i = 0 } = e.cropRect;
@@ -6495,7 +6495,7 @@ function Ti(e, t) {
6495
6495
  }
6496
6496
  //#endregion
6497
6497
  //#region src/scene/2d/element/Element2DFill.ts
6498
- var Y = class extends T {
6498
+ var J = class extends T {
6499
6499
  _parent;
6500
6500
  texture;
6501
6501
  animatedTexture;
@@ -6529,7 +6529,7 @@ var Y = class extends T {
6529
6529
  }
6530
6530
  }
6531
6531
  async loadTexture() {
6532
- if (this.linearGradient || this.radialGradient) this.texture = new lr(this.linearGradient ?? this.radialGradient, Math.floor(this._parent.size.width), Math.floor(this._parent.size.height));
6532
+ if (this.linearGradient || this.radialGradient) this.texture = new ur(this.linearGradient ?? this.radialGradient, Math.floor(this._parent.size.width), Math.floor(this._parent.size.height));
6533
6533
  else if (d(this.image)) this.animatedTexture = void 0, this.texture = void 0;
6534
6534
  else if (this._parent.tree?.log(`load image ${this.image}`), this.image !== "viewport") {
6535
6535
  let e = this.image.split("?")[0].endsWith(".gif"), t = this.image, n = await $.loadBy(t, async () => {
@@ -6548,7 +6548,7 @@ var Y = class extends T {
6548
6548
  let i = await n(t, r);
6549
6549
  if (i) return this._pipelineImageToCanvas(i);
6550
6550
  });
6551
- r && (this.texture = new B({
6551
+ r && (this.texture = new z({
6552
6552
  source: r,
6553
6553
  width: r.width,
6554
6554
  height: r.height,
@@ -6583,12 +6583,12 @@ var Y = class extends T {
6583
6583
  width: e,
6584
6584
  height: t
6585
6585
  } };
6586
- if (this.image === "viewport") n.fillStyle = new pr();
6586
+ if (this.image === "viewport") n.fillStyle = new mr();
6587
6587
  else {
6588
6588
  let i = this.animatedTexture?.currentFrame.texture ?? this.texture;
6589
6589
  r = {
6590
6590
  ...r,
6591
- ...Ti(this, this.tile && i ? {
6591
+ ...Ei(this, this.tile && i ? {
6592
6592
  x: 0,
6593
6593
  y: 0,
6594
6594
  width: i.sourceWidth,
@@ -6624,10 +6624,10 @@ var Y = class extends T {
6624
6624
  this.updateFrameIndex();
6625
6625
  }
6626
6626
  };
6627
- A([_({ fallback: !0 }), k("design:type", Boolean)], Y.prototype, "enabled", void 0), A([_(), k("design:type", Object)], Y.prototype, "color", void 0), A([_(), k("design:type", Object)], Y.prototype, "image", void 0), A([_(), k("design:type", Object)], Y.prototype, "linearGradient", void 0), A([_(), k("design:type", Object)], Y.prototype, "radialGradient", void 0), A([_(), k("design:type", Object)], Y.prototype, "cropRect", void 0), A([_(), k("design:type", Object)], Y.prototype, "stretchRect", void 0), A([_(), k("design:type", Object)], Y.prototype, "dpi", void 0), A([_(), k("design:type", Object)], Y.prototype, "rotateWithShape", void 0), A([_(), k("design:type", Object)], Y.prototype, "tile", void 0), A([_(), k("design:type", Object)], Y.prototype, "opacity", void 0), A([_(), k("design:type", Object)], Y.prototype, "imagePipelines", void 0);
6627
+ k([_({ fallback: !0 }), O("design:type", Boolean)], J.prototype, "enabled", void 0), k([_(), O("design:type", Object)], J.prototype, "color", void 0), k([_(), O("design:type", Object)], J.prototype, "image", void 0), k([_(), O("design:type", Object)], J.prototype, "linearGradient", void 0), k([_(), O("design:type", Object)], J.prototype, "radialGradient", void 0), k([_(), O("design:type", Object)], J.prototype, "cropRect", void 0), k([_(), O("design:type", Object)], J.prototype, "stretchRect", void 0), k([_(), O("design:type", Object)], J.prototype, "dpi", void 0), k([_(), O("design:type", Object)], J.prototype, "rotateWithShape", void 0), k([_(), O("design:type", Object)], J.prototype, "tile", void 0), k([_(), O("design:type", Object)], J.prototype, "opacity", void 0), k([_(), O("design:type", Object)], J.prototype, "imagePipelines", void 0);
6628
6628
  //#endregion
6629
6629
  //#region src/scene/2d/element/Element2DBackground.ts
6630
- var Ei = class extends Y {
6630
+ var Di = class extends J {
6631
6631
  setProperties(e) {
6632
6632
  return super._setProperties(d(e) ? void 0 : f(e));
6633
6633
  }
@@ -6639,14 +6639,14 @@ var Ei = class extends Y {
6639
6639
  }
6640
6640
  }
6641
6641
  };
6642
- A([_(), k("design:type", Object)], Ei.prototype, "fillWithShape", void 0);
6642
+ k([_(), O("design:type", Object)], Di.prototype, "fillWithShape", void 0);
6643
6643
  //#endregion
6644
6644
  //#region src/scene/2d/element/Element2DChart.ts
6645
- var Di;
6646
- function Oi() {
6647
- return Di ||= import("echarts").then((e) => e?.init ? e : e?.default).catch(() => void 0), Di;
6645
+ var Oi;
6646
+ function ki() {
6647
+ return Oi ||= import("echarts").then((e) => e?.init ? e : e?.default).catch(() => void 0), Oi;
6648
6648
  }
6649
- function ki(e) {
6649
+ function Ai(e) {
6650
6650
  if (!e) return { show: !1 };
6651
6651
  switch (e) {
6652
6652
  case "bottom": return {
@@ -6669,7 +6669,7 @@ function ki(e) {
6669
6669
  };
6670
6670
  }
6671
6671
  }
6672
- var X = class extends T {
6672
+ var Y = class extends T {
6673
6673
  _parent;
6674
6674
  _instance;
6675
6675
  _container;
@@ -6712,7 +6712,7 @@ var X = class extends T {
6712
6712
  this._teardown(), this._parent.requestDraw();
6713
6713
  return;
6714
6714
  }
6715
- let n = await Oi();
6715
+ let n = await ki();
6716
6716
  if (!n) {
6717
6717
  console.warn("[modern-canvas] chart rendering requires the optional \"echarts\" dependency (e.g. `pnpm add echarts`)"), this._renderPlaceholder(e, t);
6718
6718
  return;
@@ -6737,7 +6737,7 @@ var X = class extends T {
6737
6737
  }), this._instance.setOption(this._toOption(), !0), !this._texture) {
6738
6738
  let e = this._container.querySelector("canvas");
6739
6739
  if (!e) return;
6740
- this._texture = new ir({
6740
+ this._texture = new ar({
6741
6741
  source: e,
6742
6742
  pixelRatio: 1
6743
6743
  });
@@ -6750,7 +6750,7 @@ var X = class extends T {
6750
6750
  let n = document.createElement("canvas");
6751
6751
  n.width = Math.ceil(e), n.height = Math.ceil(t);
6752
6752
  let r = n.getContext("2d");
6753
- 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 ir({
6753
+ 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 ar({
6754
6754
  source: n,
6755
6755
  pixelRatio: 1
6756
6756
  }), this._texture.requestUpdate("source"), this._parent.requestDraw());
@@ -6771,7 +6771,7 @@ var X = class extends T {
6771
6771
  text: this.title,
6772
6772
  left: "center"
6773
6773
  } : void 0,
6774
- legend: ki(this.legend),
6774
+ legend: Ai(this.legend),
6775
6775
  tooltip: {}
6776
6776
  };
6777
6777
  if (n) {
@@ -6815,10 +6815,10 @@ var X = class extends T {
6815
6815
  this._teardown();
6816
6816
  }
6817
6817
  };
6818
- A([_({ fallback: !0 }), k("design:type", Boolean)], X.prototype, "enabled", void 0), A([_({ fallback: "column" }), k("design:type", Object)], X.prototype, "type", void 0), A([_(), k("design:type", Object)], X.prototype, "grouping", void 0), A([_({ fallback: () => [] }), k("design:type", Object)], X.prototype, "categories", void 0), A([_({ fallback: () => [] }), k("design:type", Object)], X.prototype, "series", void 0), A([_(), k("design:type", Object)], X.prototype, "title", void 0), A([_(), k("design:type", Object)], X.prototype, "legend", void 0), A([_(), k("design:type", Object)], X.prototype, "categoryAxis", void 0), A([_(), k("design:type", Object)], X.prototype, "valueAxis", void 0);
6818
+ k([_({ fallback: !0 }), O("design:type", Boolean)], Y.prototype, "enabled", void 0), k([_({ fallback: "column" }), O("design:type", Object)], Y.prototype, "type", void 0), k([_(), O("design:type", Object)], Y.prototype, "grouping", void 0), k([_({ fallback: () => [] }), O("design:type", Object)], Y.prototype, "categories", void 0), k([_({ fallback: () => [] }), O("design:type", Object)], Y.prototype, "series", void 0), k([_(), O("design:type", Object)], Y.prototype, "title", void 0), k([_(), O("design:type", Object)], Y.prototype, "legend", void 0), k([_(), O("design:type", Object)], Y.prototype, "categoryAxis", void 0), k([_(), O("design:type", Object)], Y.prototype, "valueAxis", void 0);
6819
6819
  //#endregion
6820
6820
  //#region src/scene/2d/element/Element2DComments.ts
6821
- var Ai = class extends T {
6821
+ var ji = class extends T {
6822
6822
  parent;
6823
6823
  constructor(e) {
6824
6824
  super(), this.parent = e;
@@ -6852,7 +6852,7 @@ var Ai = class extends T {
6852
6852
  isValid() {
6853
6853
  return Object.values(this._properties).some(Boolean);
6854
6854
  }
6855
- }, ji = class extends T {
6855
+ }, Mi = class extends T {
6856
6856
  _parent;
6857
6857
  _routeSig;
6858
6858
  _routePath;
@@ -6895,12 +6895,12 @@ var Ai = class extends T {
6895
6895
  let n = t.shape.connectionPoints?.find((t) => t.idx === e.idx);
6896
6896
  if (n) {
6897
6897
  let e = t.globalTransform.apply(new x(n.x * t.size.x, n.y * t.size.y)), i;
6898
- return i = n.ang === void 0 ? Nr(n.x - .5, n.y - .5) : {
6898
+ return i = n.ang === void 0 ? Pr(n.x - .5, n.y - .5) : {
6899
6899
  x: Math.cos(n.ang),
6900
6900
  y: Math.sin(n.ang)
6901
6901
  }, {
6902
6902
  point: e,
6903
- dir: Mi(i, t.globalRotation),
6903
+ dir: Ni(i, t.globalRotation),
6904
6904
  bbox: r
6905
6905
  };
6906
6906
  }
@@ -6923,11 +6923,11 @@ var Ai = class extends T {
6923
6923
  return;
6924
6924
  }
6925
6925
  let n = (e) => e ? `${e.point.x},${e.point.y},${e.dir?.x ?? ""},${e.dir?.y ?? ""}` : "-", r = `${this.mode}|${n(e)}|${n(t)}`;
6926
- return (r !== this._routeSig || !this._routePath) && (this._routeSig = r, this._routePath = Pr(this.mode, e ?? t, t ?? e)), this._routePath;
6926
+ return (r !== this._routeSig || !this._routePath) && (this._routeSig = r, this._routePath = Fr(this.mode, e ?? t, t ?? e)), this._routePath;
6927
6927
  }
6928
6928
  };
6929
- A([_(), k("design:type", Object)], ji.prototype, "start", void 0), A([_(), k("design:type", Object)], ji.prototype, "end", void 0), A([_({ fallback: "straight" }), k("design:type", Object)], ji.prototype, "mode", void 0), A([_({ fallback: .5 }), k("design:type", Number)], ji.prototype, "labelPosition", void 0);
6930
- function Mi(e, t) {
6929
+ k([_(), O("design:type", Object)], Mi.prototype, "start", void 0), k([_(), O("design:type", Object)], Mi.prototype, "end", void 0), k([_({ fallback: "straight" }), O("design:type", Object)], Mi.prototype, "mode", void 0), k([_({ fallback: .5 }), O("design:type", Number)], Mi.prototype, "labelPosition", void 0);
6930
+ function Ni(e, t) {
6931
6931
  if (!t) return e;
6932
6932
  let n = Math.cos(t), r = Math.sin(t);
6933
6933
  return {
@@ -6937,7 +6937,7 @@ function Mi(e, t) {
6937
6937
  }
6938
6938
  //#endregion
6939
6939
  //#region src/scene/2d/element/Element2DForeground.ts
6940
- var Ni = class extends Y {
6940
+ var Pi = class extends J {
6941
6941
  setProperties(e) {
6942
6942
  return super._setProperties(d(e) ? void 0 : ee(e));
6943
6943
  }
@@ -6945,14 +6945,14 @@ var Ni = class extends Y {
6945
6945
  super._updateProperty(e, t, n), e === "fillWithShape" && this._parent.requestDraw();
6946
6946
  }
6947
6947
  };
6948
- A([_(), k("design:type", Object)], Ni.prototype, "fillWithShape", void 0);
6948
+ k([_(), O("design:type", Object)], Pi.prototype, "fillWithShape", void 0);
6949
6949
  //#endregion
6950
6950
  //#region src/scene/2d/element/Element2DOutline.ts
6951
- var Pi = {
6951
+ var Fi = {
6952
6952
  sm: 4,
6953
6953
  md: 6,
6954
6954
  lg: 8
6955
- }, Fi = class extends Y {
6955
+ }, Ii = class extends J {
6956
6956
  setProperties(e) {
6957
6957
  return super._setProperties(d(e) ? void 0 : te(e));
6958
6958
  }
@@ -6974,7 +6974,7 @@ var Pi = {
6974
6974
  }
6975
6975
  draw() {
6976
6976
  let { width: e, height: t } = this._parent.size, n = this._parent.context;
6977
- this.image === "viewport" ? n.strokeStyle = new pr() : n.strokeStyle = this.texture ?? this.color ?? "#000000FF", n.lineWidth = this.width || 1, n.lineCap = this.lineCap, n.lineJoin = this.lineJoin, n.stroke({ ...Ti(this, {
6977
+ this.image === "viewport" ? n.strokeStyle = new mr() : n.strokeStyle = this.texture ?? this.color ?? "#000000FF", n.lineWidth = this.width || 1, n.lineCap = this.lineCap, n.lineJoin = this.lineJoin, n.stroke({ ...Ei(this, {
6978
6978
  x: 0,
6979
6979
  y: 0,
6980
6980
  width: e,
@@ -6997,14 +6997,22 @@ var Pi = {
6997
6997
  _fillEnd(e, t, n, r, i) {
6998
6998
  let a = e.x - t.x, o = e.y - t.y, s = Math.hypot(a, o);
6999
6999
  if (s < .001) return;
7000
- let c = Pi[String(n.width ?? n.height ?? "md")] ?? 6, l = r * c, u = r * c * .5, d = a / s, f = o / s, p = e.x - d * l, m = e.y - f * l, h = -f * u, g = d * u, ee = this._parent.context;
7001
- ee.fillStyle = i, ee.moveTo(e.x, e.y).lineTo(p + h, m + g).lineTo(p - h, m - g).closePath().fill();
7000
+ let c = a / s, l = o / s, u = Fi[String(n.width ?? n.height ?? "md")] ?? 6, d = this._parent.context, f = n.color ?? i;
7001
+ if (n.type === "bar") {
7002
+ let t = r * u * .6, n = Math.max(r * .9, 1.5), i = 0, a = 0;
7003
+ Math.abs(c) >= Math.abs(l) ? i = Math.sign(c) || 1 : a = Math.sign(l) || 1;
7004
+ let o = -a * t, s = i * t, p = n / 2 * i, m = n / 2 * a;
7005
+ d.fillStyle = f, d.moveTo(e.x + o - p, e.y + s - m).lineTo(e.x - o - p, e.y - s - m).lineTo(e.x - o + p, e.y - s + m).lineTo(e.x + o + p, e.y + s + m).closePath().fill();
7006
+ return;
7007
+ }
7008
+ let p = r * u, m = r * u * .5, h = e.x - c * p, g = e.y - l * p, ee = -l * m, te = c * m;
7009
+ d.fillStyle = f, d.moveTo(e.x, e.y).lineTo(h + ee, g + te).lineTo(h - ee, g - te).closePath().fill();
7002
7010
  }
7003
7011
  };
7004
- A([_(), k("design:type", Object)], Fi.prototype, "color", void 0), A([_(), k("design:type", Object)], Fi.prototype, "width", void 0), A([_({ fallback: "solid" }), k("design:type", Object)], Fi.prototype, "style", void 0), A([_({ fallback: "butt" }), k("design:type", Object)], Fi.prototype, "lineCap", void 0), A([_({ fallback: "miter" }), k("design:type", Object)], Fi.prototype, "lineJoin", void 0), A([_(), k("design:type", Object)], Fi.prototype, "headEnd", void 0), A([_(), k("design:type", Object)], Fi.prototype, "tailEnd", void 0);
7012
+ k([_(), O("design:type", Object)], Ii.prototype, "color", void 0), k([_(), O("design:type", Object)], Ii.prototype, "width", void 0), k([_({ fallback: "solid" }), O("design:type", Object)], Ii.prototype, "style", void 0), k([_({ fallback: "butt" }), O("design:type", Object)], Ii.prototype, "lineCap", void 0), k([_({ fallback: "miter" }), O("design:type", Object)], Ii.prototype, "lineJoin", void 0), k([_(), O("design:type", Object)], Ii.prototype, "headEnd", void 0), k([_(), O("design:type", Object)], Ii.prototype, "tailEnd", void 0);
7005
7013
  //#endregion
7006
7014
  //#region src/scene/2d/element/Element2DShadow.ts
7007
- var Ii = class extends T {
7015
+ var Li = class extends T {
7008
7016
  _parent;
7009
7017
  constructor(e) {
7010
7018
  super(), this._parent = e;
@@ -7025,13 +7033,13 @@ var Ii = class extends T {
7025
7033
  }
7026
7034
  updateEffect() {
7027
7035
  let e = "__$shadow", t = this._parent.getNode(e);
7028
- this.enabled && (this.blur || this.offsetX || this.offsetY) ? (t || (t = new oi({ name: e }), this._parent.appendChild(t, "back")), t.setProperties(this.getProperties())) : t && this._parent.removeChild(t);
7036
+ this.enabled && (this.blur || this.offsetX || this.offsetY) ? (t || (t = new si({ name: e }), this._parent.appendChild(t, "back")), t.setProperties(this.getProperties())) : t && this._parent.removeChild(t);
7029
7037
  }
7030
7038
  };
7031
- A([_({ fallback: !0 }), k("design:type", Boolean)], Ii.prototype, "enabled", void 0), A([_({ fallback: "#000000FF" }), k("design:type", Object)], Ii.prototype, "color", void 0), A([_({ fallback: 0 }), k("design:type", Object)], Ii.prototype, "blur", void 0), A([_({ fallback: 0 }), k("design:type", Object)], Ii.prototype, "offsetY", void 0), A([_({ fallback: 0 }), k("design:type", Object)], Ii.prototype, "offsetX", void 0);
7039
+ k([_({ fallback: !0 }), O("design:type", Boolean)], Li.prototype, "enabled", void 0), k([_({ fallback: "#000000FF" }), O("design:type", Object)], Li.prototype, "color", void 0), k([_({ fallback: 0 }), O("design:type", Object)], Li.prototype, "blur", void 0), k([_({ fallback: 0 }), O("design:type", Object)], Li.prototype, "offsetY", void 0), k([_({ fallback: 0 }), O("design:type", Object)], Li.prototype, "offsetX", void 0);
7032
7040
  //#endregion
7033
7041
  //#region src/scene/2d/element/Element2DShape.ts
7034
- var Li = class extends T {
7042
+ var Ri = class extends T {
7035
7043
  _parent;
7036
7044
  _path2DSet = new ue();
7037
7045
  _localPath;
@@ -7130,24 +7138,24 @@ var Li = class extends T {
7130
7138
  t && n && (r ? e.roundRect(0, 0, t, n, r) : e.rect(0, 0, t, n));
7131
7139
  }
7132
7140
  };
7133
- A([_({ fallback: !0 }), k("design:type", Boolean)], Li.prototype, "enabled", void 0), A([_(), k("design:type", Object)], Li.prototype, "preset", void 0), A([_(), k("design:type", Object)], Li.prototype, "svg", void 0), A([_(), k("design:type", Object)], Li.prototype, "viewBox", void 0), A([_(), k("design:type", Object)], Li.prototype, "paths", void 0), A([_(), k("design:type", Object)], Li.prototype, "connectionPoints", void 0);
7141
+ k([_({ fallback: !0 }), O("design:type", Boolean)], Ri.prototype, "enabled", void 0), k([_(), O("design:type", Object)], Ri.prototype, "preset", void 0), k([_(), O("design:type", Object)], Ri.prototype, "svg", void 0), k([_(), O("design:type", Object)], Ri.prototype, "viewBox", void 0), k([_(), O("design:type", Object)], Ri.prototype, "paths", void 0), k([_(), O("design:type", Object)], Ri.prototype, "connectionPoints", void 0);
7134
7142
  //#endregion
7135
7143
  //#region src/scene/2d/element/Element2DStyle.ts
7136
- var Ri = class extends E {
7144
+ var zi = class extends yt {
7137
7145
  constructor(e) {
7138
7146
  super(), this.setProperties(e);
7139
7147
  }
7140
- }, zi = {
7148
+ }, Bi = {
7141
7149
  ...o(),
7142
7150
  left: 0,
7143
7151
  top: 0,
7144
7152
  width: 0,
7145
7153
  height: 0
7146
7154
  };
7147
- for (let e in zi) i(Ri, e, { fallback: zi[e] });
7155
+ for (let e in Bi) i(zi, e, { fallback: Bi[e] });
7148
7156
  //#endregion
7149
7157
  //#region src/scene/2d/element/Element2DTable.ts
7150
- var Bi = 100, Vi = 40, Hi = class extends T {
7158
+ var Vi = 100, Hi = 40, Ui = class extends T {
7151
7159
  _parent;
7152
7160
  _cellNodes = /* @__PURE__ */ new Map();
7153
7161
  _cellSnapshots = /* @__PURE__ */ new Map();
@@ -7178,10 +7186,10 @@ var Bi = 100, Vi = 40, Hi = class extends T {
7178
7186
  return !!(this.enabled && this.cells.length);
7179
7187
  }
7180
7188
  get gridWidth() {
7181
- return this.columns.reduce((e, t) => e + (t.width || Bi), 0);
7189
+ return this.columns.reduce((e, t) => e + (t.width || Vi), 0);
7182
7190
  }
7183
7191
  get gridHeight() {
7184
- return this.rows.reduce((e, t) => e + (t.height || Vi), 0);
7192
+ return this.rows.reduce((e, t) => e + (t.height || Hi), 0);
7185
7193
  }
7186
7194
  update() {
7187
7195
  if (this._dirty = !1, !this.isValid()) {
@@ -7191,9 +7199,9 @@ var Bi = 100, Vi = 40, Hi = class extends T {
7191
7199
  let { columns: e, rows: t, cells: n } = this, r = e.length, i = t.length;
7192
7200
  for (let e of n) r = Math.max(r, e.col + (e.colSpan || 1)), i = Math.max(i, e.row + (e.rowSpan || 1));
7193
7201
  let a = [0];
7194
- for (let t = 0; t < r; t++) a.push(a[t] + (e[t]?.width || Bi));
7202
+ for (let t = 0; t < r; t++) a.push(a[t] + (e[t]?.width || Vi));
7195
7203
  let o = [0];
7196
- for (let e = 0; e < i; e++) o.push(o[e] + (t[e]?.height || Vi));
7204
+ for (let e = 0; e < i; e++) o.push(o[e] + (t[e]?.height || Hi));
7197
7205
  this._parent.size.set(a[e.length] ?? 0, o[t.length] ?? 0);
7198
7206
  let s = /* @__PURE__ */ new Set();
7199
7207
  for (let e of n) {
@@ -7207,7 +7215,7 @@ var Bi = 100, Vi = 40, Hi = class extends T {
7207
7215
  }, r = `${JSON.stringify(e)}|${n.left},${n.top},${n.width},${n.height}`;
7208
7216
  if (this._cellNodes.has(t) && this._cellSnapshots.get(t) === r) continue;
7209
7217
  let i = this._cellNodes.get(t);
7210
- i || (i = H.parse({ is: "Element2D" }, "Element2D"), this._parent.appendChild(i, "back"), this._cellNodes.set(t, i)), this._applyCell(i, e, n), this._cellSnapshots.set(t, r);
7218
+ i || (i = V.parse({ is: "Element2D" }, "Element2D"), this._parent.appendChild(i, "back"), this._cellNodes.set(t, i)), this._applyCell(i, e, n), this._cellSnapshots.set(t, r);
7211
7219
  }
7212
7220
  for (let [e, t] of this._cellNodes) s.has(e) || (this._parent.removeChild(t), t.destroy(), this._cellNodes.delete(e), this._cellSnapshots.delete(e));
7213
7221
  this._parent.requestDraw();
@@ -7219,7 +7227,7 @@ var Bi = 100, Vi = 40, Hi = class extends T {
7219
7227
  }, e.background = t.background;
7220
7228
  for (let t of [...e.getChildren(!0)]) e.removeChild(t), t.destroy();
7221
7229
  t.children?.forEach((t) => {
7222
- e.appendChild(H.parse(t, "Element2D"));
7230
+ e.appendChild(V.parse(t, "Element2D"));
7223
7231
  });
7224
7232
  }
7225
7233
  _clearCells() {
@@ -7230,21 +7238,21 @@ var Bi = 100, Vi = 40, Hi = class extends T {
7230
7238
  this._clearCells();
7231
7239
  }
7232
7240
  };
7233
- A([_({ fallback: !0 }), k("design:type", Boolean)], Hi.prototype, "enabled", void 0), A([_({ fallback: () => [] }), k("design:type", Object)], Hi.prototype, "columns", void 0), A([_({ fallback: () => [] }), k("design:type", Object)], Hi.prototype, "rows", void 0), A([_({ fallback: () => [] }), k("design:type", Object)], Hi.prototype, "cells", void 0);
7241
+ k([_({ fallback: !0 }), O("design:type", Boolean)], Ui.prototype, "enabled", void 0), k([_({ fallback: () => [] }), O("design:type", Object)], Ui.prototype, "columns", void 0), k([_({ fallback: () => [] }), O("design:type", Object)], Ui.prototype, "rows", void 0), k([_({ fallback: () => [] }), O("design:type", Object)], Ui.prototype, "cells", void 0);
7234
7242
  //#endregion
7235
7243
  //#region src/scene/2d/element/Element2DText.ts
7236
- var Ui = 2, Wi = 64, Gi = 0;
7237
- function Ki() {
7238
- if (Gi) return Gi;
7244
+ var Wi = 2, Gi = 64, Ki = 0;
7245
+ function qi() {
7246
+ if (Ki) return Ki;
7239
7247
  try {
7240
7248
  let e = w(), t = e.getContext("webgl2") || e.getContext("webgl");
7241
- Gi = t && t.getParameter(t.MAX_TEXTURE_SIZE) || 4096;
7249
+ Ki = t && t.getParameter(t.MAX_TEXTURE_SIZE) || 4096;
7242
7250
  } catch {
7243
- Gi = 4096;
7251
+ Ki = 4096;
7244
7252
  }
7245
- return Gi;
7253
+ return Ki;
7246
7254
  }
7247
- var Z = class extends T {
7255
+ var X = class extends T {
7248
7256
  _parent;
7249
7257
  base;
7250
7258
  get textContent() {
@@ -7257,11 +7265,11 @@ var Z = class extends T {
7257
7265
  _autoDrawMode;
7258
7266
  _atlasEligible = !1;
7259
7267
  _textureStale = !0;
7260
- _texture = new ir({ mipmap: !0 });
7268
+ _texture = new ar({ mipmap: !0 });
7261
7269
  _tiles = [];
7262
7270
  _textureMap = /* @__PURE__ */ new Map();
7263
7271
  constructor(e) {
7264
- super(), this._parent = e, this.base = Ot(new _e()), this.base.setPropertyAccessor(this);
7272
+ super(), this._parent = e, this.base = kt(new _e()), this.base.setPropertyAccessor(this);
7265
7273
  }
7266
7274
  setProperties(e) {
7267
7275
  return super.setProperties(d(e) ? void 0 : ae(e));
@@ -7297,14 +7305,16 @@ var Z = class extends T {
7297
7305
  });
7298
7306
  }
7299
7307
  update() {
7300
- if (this.base.fonts = this.base.fonts ?? this._parent.tree?.fonts, this.base.update(), this._atlasEligible = this._computeAtlasEligible(), this._atlasEligible) {
7308
+ this.base.fonts = this.base.fonts ?? this._parent.tree?.fonts, this.base.update();
7309
+ let e = this.base.boundingBox, t = this._parent.size;
7310
+ if (e && (e.left < 0 || e.top < 0 || e.left + e.width > t.width || e.top + e.height > t.height) && this._parent.updateContentAabb(), this._atlasEligible = this._computeAtlasEligible(), this._atlasEligible) {
7301
7311
  this._releaseTiles(), this._textureStale = !0, this._parent.requestDraw();
7302
7312
  return;
7303
7313
  }
7304
7314
  this._rasterTexture(), this._parent.requestDraw();
7305
7315
  }
7306
7316
  _rasterTexture() {
7307
- let e = Math.ceil(this.base.boundingBox.width), t = Math.ceil(this.base.boundingBox.height), n = Ui, r = Math.floor((Ki() - Wi) / n);
7317
+ let e = Math.ceil(this.base.boundingBox.width), t = Math.ceil(this.base.boundingBox.height), n = Wi, r = Math.floor((qi() - Gi) / n);
7308
7318
  if (e <= r && t <= r) {
7309
7319
  this._releaseTiles();
7310
7320
  let r = this._texture;
@@ -7322,7 +7332,7 @@ var Z = class extends T {
7322
7332
  for (let o = 0; o < a; o++) for (let a = 0; a < i; a++) {
7323
7333
  let i = a * r, c = o * r, l = Math.min(r, e - i), u = Math.min(r, t - c), d = this._tiles[s];
7324
7334
  d || (d = {
7325
- texture: new ir({ mipmap: !0 }),
7335
+ texture: new ar({ mipmap: !0 }),
7326
7336
  x: i,
7327
7337
  y: c,
7328
7338
  w: l,
@@ -7370,7 +7380,7 @@ var Z = class extends T {
7370
7380
  }), this._parent.requestDraw());
7371
7381
  }
7372
7382
  async _loadTexture(e, t) {
7373
- return e.linearGradient || e.radialGradient ? new lr(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));
7383
+ return e.linearGradient || e.radialGradient ? new ur(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));
7374
7384
  }
7375
7385
  setContent(e) {
7376
7386
  this.content = oe(e);
@@ -7399,7 +7409,7 @@ var Z = class extends T {
7399
7409
  if (n.style.fill && !d(n.style.fill)) if (typeof n.style.fill == "object") {
7400
7410
  let r = n.style.fill, o = this._textureMap.get(`${a}.${i}.fill`) ?? this._textureMap.get(`${a}.fill`) ?? this._textureMap.get("fill");
7401
7411
  r.enabled !== !1 && (o || r.color) && (e.addPath(n), e.style = { ...n.style }, e.fillStyle = o?.texture ?? r.color, e.fill({
7402
- ...Ti(r, o?.box ?? {
7412
+ ...Ei(r, o?.box ?? {
7403
7413
  x: 0,
7404
7414
  y: 0,
7405
7415
  width: this._parent.size.width,
@@ -7411,7 +7421,7 @@ var Z = class extends T {
7411
7421
  if (n.style.stroke && !d(n.style.stroke)) if (typeof n.style.stroke == "object") {
7412
7422
  let r = n.style.stroke, o = this._textureMap.get(`${a}.${i}.outline`) ?? this._textureMap.get(`${a}.outline`) ?? this._textureMap.get("outline");
7413
7423
  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 ?? r.color, e.lineCap = r.lineCap, e.lineJoin = r.lineJoin, e.stroke({
7414
- ...Ti(r, o?.box ?? {
7424
+ ...Ei(r, o?.box ?? {
7415
7425
  x: 0,
7416
7426
  y: 0,
7417
7427
  width: this._parent.size.width,
@@ -7441,7 +7451,13 @@ var Z = class extends T {
7441
7451
  }
7442
7452
  _computeAtlasEligible() {
7443
7453
  if (this.drawMode === "texture" || this.drawMode === "path" || this.effects?.length || this.outline?.width || this.deformation && !d(this.deformation) && this.deformation.type || this.fill && !d(this.fill) || this.content.some((e) => e.fragments.some((e) => !!(e.highlightImage || e.highlight?.image || e.fill && !d(e.fill))))) return !1;
7444
- let e = 2048 / cr.superSample / 1.5, t = this.base.characters;
7454
+ for (let e of [
7455
+ "background",
7456
+ "textDecoration",
7457
+ "listStyle",
7458
+ "highlight"
7459
+ ]) if (this.base.plugins.get(e)?.pathSet?.paths?.length) return !1;
7460
+ let e = 2048 / lr.superSample / 1.5, t = this.base.characters;
7445
7461
  for (let n = 0; n < t.length; n++) {
7446
7462
  let r = t[n].computedStyle;
7447
7463
  if (typeof r.color != "string" || r.fontSize > e) return !1;
@@ -7449,7 +7465,7 @@ var Z = class extends T {
7449
7465
  return !0;
7450
7466
  }
7451
7467
  _atlasDraw(e) {
7452
- let t = cr, n = this.base.characters, r = /* @__PURE__ */ new Map();
7468
+ let t = lr, n = this.base.characters, r = /* @__PURE__ */ new Map();
7453
7469
  for (let e = 0; e < n.length; e++) {
7454
7470
  let i = n[e], a = i.glyphBox;
7455
7471
  if (!a || a.width <= 0 || a.height <= 0) continue;
@@ -7482,10 +7498,10 @@ var Z = class extends T {
7482
7498
  }
7483
7499
  process(e) {}
7484
7500
  };
7485
- A([_({ fallback: !0 }), k("design:type", Object)], Z.prototype, "enabled", void 0), A([_({ fallback: () => [] }), k("design:type", Object)], Z.prototype, "content", void 0), A([_({ alias: "_parent.style.json" }), k("design:type", Object)], Z.prototype, "style", void 0), A([_(), k("design:type", Object)], Z.prototype, "effects", void 0), A([_(), k("design:type", Object)], Z.prototype, "fill", void 0), A([_(), k("design:type", Object)], Z.prototype, "outline", void 0), A([_(), k("design:type", Object)], Z.prototype, "deformation", void 0), A([_({ alias: "base.measureDom" }), k("design:type", typeof HTMLElement > "u" ? Object : HTMLElement)], Z.prototype, "measureDom", void 0), A([_({ alias: "base.fonts" }), k("design:type", Object)], Z.prototype, "fonts", void 0), A([_({ fallback: "auto" }), k("design:type", Object)], Z.prototype, "drawMode", void 0);
7501
+ k([_({ fallback: !0 }), O("design:type", Object)], X.prototype, "enabled", void 0), k([_({ fallback: () => [] }), O("design:type", Object)], X.prototype, "content", void 0), k([_({ alias: "_parent.style.json" }), O("design:type", Object)], X.prototype, "style", void 0), k([_(), O("design:type", Object)], X.prototype, "effects", void 0), k([_(), O("design:type", Object)], X.prototype, "fill", void 0), k([_(), O("design:type", Object)], X.prototype, "outline", void 0), k([_(), O("design:type", Object)], X.prototype, "deformation", void 0), k([_({ alias: "base.measureDom" }), O("design:type", typeof HTMLElement > "u" ? Object : HTMLElement)], X.prototype, "measureDom", void 0), k([_({ alias: "base.fonts" }), O("design:type", Object)], X.prototype, "fonts", void 0), k([_({ fallback: "auto" }), O("design:type", Object)], X.prototype, "drawMode", void 0);
7486
7502
  //#endregion
7487
7503
  //#region src/scene/2d/element/Flexbox.ts
7488
- var Q = {
7504
+ var Z = {
7489
7505
  left: 0,
7490
7506
  top: 1,
7491
7507
  right: 2,
@@ -7495,11 +7511,11 @@ var Q = {
7495
7511
  horizontal: 6,
7496
7512
  vertical: 7,
7497
7513
  all: 8
7498
- }, qi = {
7514
+ }, Ji = {
7499
7515
  column: 0,
7500
7516
  row: 1,
7501
7517
  all: 2
7502
- }, Ji = {
7518
+ }, Q = {
7503
7519
  auto: 0,
7504
7520
  "flex-start": 1,
7505
7521
  center: 2,
@@ -7551,7 +7567,7 @@ var Q = {
7551
7567
  let { loadYoga: e } = await import("yoga-layout/load");
7552
7568
  this._yoga = await e();
7553
7569
  }
7554
- node = e._yoga ? Ot(e._yoga.Node.create()) : void 0;
7570
+ node = e._yoga ? kt(e._yoga.Node.create()) : void 0;
7555
7571
  constructor(e) {
7556
7572
  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);
7557
7573
  }
@@ -7570,31 +7586,31 @@ var Q = {
7570
7586
  if (n) {
7571
7587
  switch (e) {
7572
7588
  case "alignContent":
7573
- n.setAlignContent(t ? Ji[t] ?? Ji["flex-start"] : Ji["flex-start"]);
7589
+ n.setAlignContent(t ? Q[t] ?? Q["flex-start"] : Q["flex-start"]);
7574
7590
  break;
7575
7591
  case "alignItems":
7576
- n.setAlignItems(t ? Ji[t] ?? Ji["flex-start"] : Ji["flex-start"]);
7592
+ n.setAlignItems(t ? Q[t] ?? Q["flex-start"] : Q["flex-start"]);
7577
7593
  break;
7578
7594
  case "alignSelf":
7579
- n.setAlignSelf(t ? Ji[t] ?? Ji["flex-start"] : Ji["flex-start"]);
7595
+ n.setAlignSelf(t ? Q[t] ?? Q["flex-start"] : Q["flex-start"]);
7580
7596
  break;
7581
7597
  case "aspectRatio":
7582
7598
  n.setAspectRatio(t);
7583
7599
  break;
7584
7600
  case "borderTop":
7585
- n.setBorder(Q.top, this._parent.style.borderWidth);
7601
+ n.setBorder(Z.top, this._parent.style.borderWidth);
7586
7602
  break;
7587
7603
  case "borderBottom":
7588
- n.setBorder(Q.bottom, this._parent.style.borderWidth);
7604
+ n.setBorder(Z.bottom, this._parent.style.borderWidth);
7589
7605
  break;
7590
7606
  case "borderLeft":
7591
- n.setBorder(Q.left, this._parent.style.borderWidth);
7607
+ n.setBorder(Z.left, this._parent.style.borderWidth);
7592
7608
  break;
7593
7609
  case "borderRight":
7594
- n.setBorder(Q.right, this._parent.style.borderWidth);
7610
+ n.setBorder(Z.right, this._parent.style.borderWidth);
7595
7611
  break;
7596
7612
  case "border":
7597
- n.setBorder(Q.all, this._parent.style.borderWidth);
7613
+ n.setBorder(Z.all, this._parent.style.borderWidth);
7598
7614
  break;
7599
7615
  case "direction":
7600
7616
  n.setDirection(t ? Xi[t] ?? Xi.inherit : Xi.inherit);
@@ -7627,22 +7643,22 @@ var Q = {
7627
7643
  n.setJustifyContent(t ? $i[t] ?? $i["flex-start"] : $i["flex-start"]);
7628
7644
  break;
7629
7645
  case "gap":
7630
- t !== void 0 && n.setGap(qi.all, t);
7646
+ t !== void 0 && n.setGap(Ji.all, t);
7631
7647
  break;
7632
7648
  case "marginTop":
7633
- n.setMargin(Q.top, t);
7649
+ n.setMargin(Z.top, t);
7634
7650
  break;
7635
7651
  case "marginBottom":
7636
- n.setMargin(Q.bottom, t);
7652
+ n.setMargin(Z.bottom, t);
7637
7653
  break;
7638
7654
  case "marginLeft":
7639
- n.setMargin(Q.left, t);
7655
+ n.setMargin(Z.left, t);
7640
7656
  break;
7641
7657
  case "marginRight":
7642
- n.setMargin(Q.right, t);
7658
+ n.setMargin(Z.right, t);
7643
7659
  break;
7644
7660
  case "margin":
7645
- n.setMargin(Q.all, t);
7661
+ n.setMargin(Z.all, t);
7646
7662
  break;
7647
7663
  case "maxHeight":
7648
7664
  n.setMaxHeight(t);
@@ -7660,31 +7676,31 @@ var Q = {
7660
7676
  n.setOverflow(t ? ea[t] ?? ea.visible : ea.visible);
7661
7677
  break;
7662
7678
  case "paddingTop":
7663
- n.setPadding(Q.top, t);
7679
+ n.setPadding(Z.top, t);
7664
7680
  break;
7665
7681
  case "paddingBottom":
7666
- n.setPadding(Q.bottom, t);
7682
+ n.setPadding(Z.bottom, t);
7667
7683
  break;
7668
7684
  case "paddingLeft":
7669
- n.setPadding(Q.left, t);
7685
+ n.setPadding(Z.left, t);
7670
7686
  break;
7671
7687
  case "paddingRight":
7672
- n.setPadding(Q.right, t);
7688
+ n.setPadding(Z.right, t);
7673
7689
  break;
7674
7690
  case "padding":
7675
- n.setPadding(Q.all, t);
7691
+ n.setPadding(Z.all, t);
7676
7692
  break;
7677
7693
  case "top":
7678
- n.setPosition(Q.top, t);
7694
+ n.setPosition(Z.top, t);
7679
7695
  break;
7680
7696
  case "bottom":
7681
- n.setPosition(Q.bottom, t);
7697
+ n.setPosition(Z.bottom, t);
7682
7698
  break;
7683
7699
  case "left":
7684
- n.setPosition(Q.left, t);
7700
+ n.setPosition(Z.left, t);
7685
7701
  break;
7686
7702
  case "right":
7687
- n.setPosition(Q.right, t);
7703
+ n.setPosition(Z.right, t);
7688
7704
  break;
7689
7705
  case "position":
7690
7706
  n.setPositionType(t ? ta[t] ?? ta.relative : ta.relative);
@@ -7714,10 +7730,10 @@ var Q = {
7714
7730
  [1, 0],
7715
7731
  [1, 1],
7716
7732
  [0, 1]
7717
- ], la = class extends jr {
7733
+ ], la = class extends Mr {
7718
7734
  flexbox = new ra(this);
7719
- aabb = new yt();
7720
- globalAabb = new yt();
7735
+ aabb = new bt();
7736
+ globalAabb = new bt();
7721
7737
  _parentGlobalDisplay;
7722
7738
  _globalDisplay;
7723
7739
  get globalDisplay() {
@@ -7728,7 +7744,7 @@ var Q = {
7728
7744
  });
7729
7745
  _allowPointerEvents = !0;
7730
7746
  _overflowHidden = !1;
7731
- _style = new Ri().on("updateProperty", (...e) => {
7747
+ _style = new zi().on("updateProperty", (...e) => {
7732
7748
  this.onUpdateStyleProperty(e[0], e[1], e[2]);
7733
7749
  });
7734
7750
  get style() {
@@ -7742,77 +7758,77 @@ var Q = {
7742
7758
  this._endBatch();
7743
7759
  }
7744
7760
  }
7745
- _background = new Ei(this);
7761
+ _background = new Di(this);
7746
7762
  get background() {
7747
7763
  return this._background;
7748
7764
  }
7749
7765
  set background(e) {
7750
7766
  this._background.resetProperties().setProperties(e);
7751
7767
  }
7752
- _shape = new Li(this);
7768
+ _shape = new Ri(this);
7753
7769
  get shape() {
7754
7770
  return this._shape;
7755
7771
  }
7756
7772
  set shape(e) {
7757
7773
  this._shape.resetProperties().setProperties(e);
7758
7774
  }
7759
- _fill = new Y(this);
7775
+ _fill = new J(this);
7760
7776
  get fill() {
7761
7777
  return this._fill;
7762
7778
  }
7763
7779
  set fill(e) {
7764
7780
  this._fill.resetProperties().setProperties(e);
7765
7781
  }
7766
- _outline = new Fi(this);
7782
+ _outline = new Ii(this);
7767
7783
  get outline() {
7768
7784
  return this._outline;
7769
7785
  }
7770
7786
  set outline(e) {
7771
7787
  this._outline.resetProperties().setProperties(e);
7772
7788
  }
7773
- _foreground = new Ni(this);
7789
+ _foreground = new Pi(this);
7774
7790
  get foreground() {
7775
7791
  return this._foreground;
7776
7792
  }
7777
7793
  set foreground(e) {
7778
7794
  this._foreground.resetProperties().setProperties(e);
7779
7795
  }
7780
- _text = new Z(this);
7796
+ _text = new X(this);
7781
7797
  get text() {
7782
7798
  return this._text;
7783
7799
  }
7784
7800
  set text(e) {
7785
7801
  this._text.resetProperties().setProperties(e);
7786
7802
  }
7787
- _shadow = new Ii(this);
7803
+ _shadow = new Li(this);
7788
7804
  get shadow() {
7789
7805
  return this._shadow;
7790
7806
  }
7791
7807
  set shadow(e) {
7792
7808
  this._shadow.resetProperties().setProperties(e);
7793
7809
  }
7794
- _connection = new ji(this);
7810
+ _connection = new Mi(this);
7795
7811
  get connection() {
7796
7812
  return this._connection;
7797
7813
  }
7798
7814
  set connection(e) {
7799
7815
  this._connection.resetProperties().setProperties(e);
7800
7816
  }
7801
- _table = new Hi(this);
7817
+ _table = new Ui(this);
7802
7818
  get table() {
7803
7819
  return this._table;
7804
7820
  }
7805
7821
  set table(e) {
7806
7822
  this._table.resetProperties().setProperties(e);
7807
7823
  }
7808
- _chart = new X(this);
7824
+ _chart = new Y(this);
7809
7825
  get chart() {
7810
7826
  return this._chart;
7811
7827
  }
7812
7828
  set chart(e) {
7813
7829
  this._chart.resetProperties().setProperties(e);
7814
7830
  }
7815
- _comments = new Ai(this);
7831
+ _comments = new ji(this);
7816
7832
  get comments() {
7817
7833
  return this._comments;
7818
7834
  }
@@ -7845,6 +7861,9 @@ var Q = {
7845
7861
  _updateTransform() {
7846
7862
  super._updateTransform(), this._updateAabb();
7847
7863
  }
7864
+ updateContentAabb() {
7865
+ this._updateAabb(), this._updateGlobalAabb();
7866
+ }
7848
7867
  _updateAabb() {
7849
7868
  let { a: e, b: t, c: n, d: r, tx: i, ty: a } = this.transform, o = [], s = [];
7850
7869
  this._getPointArray().forEach((c) => {
@@ -7905,7 +7924,7 @@ var Q = {
7905
7924
  this._updateGlobalDisplay();
7906
7925
  break;
7907
7926
  case "rotate":
7908
- this.rotation = (t || 0) * xt, this.updateGlobalTransform();
7927
+ this.rotation = (t || 0) * St, this.updateGlobalTransform();
7909
7928
  break;
7910
7929
  case "scaleX":
7911
7930
  this.scale.x = t, this.text.isValid() && (t ^ n) < 0 && this.requestDraw();
@@ -7926,7 +7945,7 @@ var Q = {
7926
7945
  }), this.extraTransform.translate(this.pivot.x, this.pivot.y), this.updateGlobalTransform();
7927
7946
  break;
7928
7947
  case "transformOrigin": {
7929
- let e = Hr(t ?? "");
7948
+ let e = Ur(t ?? "");
7930
7949
  this.pivot.set(e[0] * this.size.width, e[1] * this.size.height);
7931
7950
  break;
7932
7951
  }
@@ -8032,19 +8051,43 @@ var Q = {
8032
8051
  }
8033
8052
  _applyColorFilter() {
8034
8053
  let e = [this._styleFilter, this._elementFilter].filter(Boolean).join(" ").trim();
8035
- e ? (this._colorFilterEffect || (this._colorFilterEffect = new Gr({
8054
+ e ? (this._colorFilterEffect || (this._colorFilterEffect = new Kr({
8036
8055
  name: "styleFilter",
8037
8056
  internalMode: "front"
8038
8057
  }), this.append(this._colorFilterEffect)), this._colorFilterEffect.filter = e) : (this._colorFilterEffect?.remove(), this._colorFilterEffect = void 0, this.requestRender());
8039
8058
  }
8040
8059
  _updateStyleMaskImage(e) {
8041
- d(e) ? (this._maskEffect?.remove(), this._maskEffect = void 0, this.requestRender()) : (this._maskEffect || (this._maskEffect = new _i({
8060
+ d(e) ? (this._maskEffect?.remove(), this._maskEffect = void 0, this.requestRender()) : (this._maskEffect || (this._maskEffect = new vi({
8042
8061
  name: "styleMaskImage",
8043
8062
  internalMode: "back"
8044
8063
  }), this.append(this._maskEffect)), this._maskEffect.image = e);
8045
8064
  }
8046
8065
  _getPointArray() {
8047
8066
  let { width: e, height: t } = this.size;
8067
+ if (this._text.isValid()) {
8068
+ let n = this._text.base.boundingBox;
8069
+ if (n && (n.left < 0 || n.top < 0 || n.left + n.width > e || n.top + n.height > t)) {
8070
+ let r = Math.min(0, n.left), i = Math.min(0, n.top), a = Math.max(e, n.left + n.width), o = Math.max(t, n.top + n.height);
8071
+ return [
8072
+ {
8073
+ x: r,
8074
+ y: i
8075
+ },
8076
+ {
8077
+ x: r,
8078
+ y: o
8079
+ },
8080
+ {
8081
+ x: a,
8082
+ y: i
8083
+ },
8084
+ {
8085
+ x: a,
8086
+ y: o
8087
+ }
8088
+ ];
8089
+ }
8090
+ }
8048
8091
  return [
8049
8092
  {
8050
8093
  x: 0,
@@ -8069,11 +8112,11 @@ var Q = {
8069
8112
  }
8070
8113
  getObb() {
8071
8114
  let e = this.pivot, t = this.transform.apply(e).sub(e);
8072
- return new wt(this._getPointArray().map((e) => (e.x += t.x, e.y += t.y, e)), this.rotation);
8115
+ return new Tt(this._getPointArray().map((e) => (e.x += t.x, e.y += t.y, e)), this.rotation);
8073
8116
  }
8074
8117
  getGlobalObb() {
8075
8118
  let e = this.pivot, t = this.globalTransform.apply(e).sub(e);
8076
- return new wt(this._getPointArray().map((e) => (e.x += t.x, e.y += t.y, e)), this.globalRotation);
8119
+ return new Tt(this._getPointArray().map((e) => (e.x += t.x, e.y += t.y, e)), this.globalRotation);
8077
8120
  }
8078
8121
  _draw() {
8079
8122
  super._draw(), this._background.isValid() && (this._shape.draw(!this._background.fillWithShape), this._background.draw()), this._fill.isValid() && (this._shape.draw(), this._fill.draw()), this._outline.isValid() && (this._shape.draw(), this._outline.draw()), this._foreground.isValid() && (this._shape.draw(!this._foreground.fillWithShape), this._foreground.draw()), this._text.isValid() && this._text.draw(), this._chart.isValid() && this._chart.draw(), this._drawContent();
@@ -8128,7 +8171,7 @@ var Q = {
8128
8171
  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;
8129
8172
  }
8130
8173
  };
8131
- la = A([S("Element2D"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], la);
8174
+ la = k([S("Element2D"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], la);
8132
8175
  //#endregion
8133
8176
  //#region src/scene/2d/TextureRect2D.ts
8134
8177
  var ua = class extends la {
@@ -8155,7 +8198,7 @@ var ua = class extends la {
8155
8198
  }
8156
8199
  }
8157
8200
  }, da = class extends ua {
8158
- texture = new ir();
8201
+ texture = new ar();
8159
8202
  animation;
8160
8203
  _lastTime = NaN;
8161
8204
  constructor(e, t = []) {
@@ -8185,7 +8228,7 @@ var ua = class extends la {
8185
8228
  this.currentTime !== this._lastTime && (this._lastTime = this.currentTime, this.animation?.goToAndStop(this.currentTime, !1), this.texture.requestUpdate("source"), this.requestDraw()), super._process(e);
8186
8229
  }
8187
8230
  };
8188
- A([_({ fallback: "" }), k("design:type", String)], da.prototype, "src", void 0), da = A([S("Lottie2D"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], da);
8231
+ k([_({ fallback: "" }), O("design:type", String)], da.prototype, "src", void 0), da = k([S("Lottie2D"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], da);
8189
8232
  //#endregion
8190
8233
  //#region src/scene/2d/Mesh2D.ts
8191
8234
  var fa = class extends la {
@@ -8232,17 +8275,17 @@ var fa = class extends la {
8232
8275
  }
8233
8276
  }
8234
8277
  _drawCircle(e, t) {
8235
- this.context.arc(e, t, this.handleSize, 0, Math.PI * 2, !0), this.context.fillStyle = B.WHITE, this.context.fill(), this.context.arc(e, t, this.handleSize, 0, Math.PI * 2, !0), this.context.strokeStyle = "rgba(0, 0, 0, 0.2)", this.context.stroke();
8278
+ this.context.arc(e, t, this.handleSize, 0, Math.PI * 2, !0), this.context.fillStyle = z.WHITE, this.context.fill(), this.context.arc(e, t, this.handleSize, 0, Math.PI * 2, !0), this.context.strokeStyle = "rgba(0, 0, 0, 0.2)", this.context.stroke();
8236
8279
  }
8237
8280
  _drawEllipse(e, t) {
8238
- this.context.roundRect(e - this.handleSize, t - this.handleSize * 2, this.handleSize * 2, this.handleSize * 4, this.handleSize), this.context.fillStyle = B.WHITE, this.context.fill(), this.context.roundRect(e - this.handleSize, t - this.handleSize * 2, this.handleSize * 2, this.handleSize * 4, this.handleSize), this.context.strokeStyle = "rgba(0, 0, 0, 0.2)", this.context.stroke();
8281
+ this.context.roundRect(e - this.handleSize, t - this.handleSize * 2, this.handleSize * 2, this.handleSize * 4, this.handleSize), this.context.fillStyle = z.WHITE, this.context.fill(), this.context.roundRect(e - this.handleSize, t - this.handleSize * 2, this.handleSize * 2, this.handleSize * 4, this.handleSize), this.context.strokeStyle = "rgba(0, 0, 0, 0.2)", this.context.stroke();
8239
8282
  }
8240
8283
  _draw() {
8241
8284
  let { width: e, height: t } = this.getRect();
8242
8285
  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);
8243
8286
  }
8244
8287
  };
8245
- A([_({ fallback: 6 }), k("design:type", Number)], pa.prototype, "handleSize", void 0);
8288
+ k([_({ fallback: 6 }), O("design:type", Number)], pa.prototype, "handleSize", void 0);
8246
8289
  //#endregion
8247
8290
  //#region src/scene/2d/Video2D.ts
8248
8291
  var ma = class extends ua {
@@ -8285,16 +8328,16 @@ var ma = class extends ua {
8285
8328
  }
8286
8329
  let n = Math.max(0, this.currentTime % t) / 1e3, r = this._timeline, i = r?.playbackRate ?? 1;
8287
8330
  if (r?.playing && i > 0) {
8288
- e.muted = !0, e.loop = this.loop, e.playbackRate = D(i, .0625, 16), e.paused && e.isReady && e.play();
8331
+ e.muted = !0, e.loop = this.loop, e.playbackRate = E(i, .0625, 16), e.paused && e.isReady && e.play();
8289
8332
  let t = Math.abs(e.currentTime - n);
8290
- !e.seeking && t > Math.max(.3, D(i, 1, 16) * .2) && (e.currentTime = n);
8333
+ !e.seeking && t > Math.max(.3, E(i, 1, 16) * .2) && (e.currentTime = n);
8291
8334
  } else e.paused || e.pause(), !e.isPlaying && !e.seeking && e.currentTime !== n && (e.currentTime = n, $.awaitBy(() => e.waitSeek(this._loadAbort?.signal)));
8292
8335
  }
8293
8336
  _process(e) {
8294
8337
  super._process(e), this._updateVideoCurrentTime();
8295
8338
  }
8296
8339
  };
8297
- A([_({ fallback: "" }), k("design:type", String)], ma.prototype, "src", void 0), ma = A([S("Video2D"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], ma);
8340
+ k([_({ fallback: "" }), O("design:type", String)], ma.prototype, "src", void 0), ma = k([S("Video2D"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], ma);
8298
8341
  //#endregion
8299
8342
  //#region src/scene/animation/Animation.ts
8300
8343
  function ha(e) {
@@ -8402,7 +8445,7 @@ var ya = {
8402
8445
  .355,
8403
8446
  1
8404
8447
  ]
8405
- }, ba = Object.fromEntries(Object.entries(ya).map(([e, [t, n, r, i]]) => [e, va(t, n, r, i)])), xa = class extends U {
8448
+ }, ba = Object.fromEntries(Object.entries(ya).map(([e, [t, n, r, i]]) => [e, va(t, n, r, i)])), xa = class extends H {
8406
8449
  _keyframes = [];
8407
8450
  _isFirstUpdatePosition = !1;
8408
8451
  _cachedProps = new t();
@@ -8471,7 +8514,7 @@ var ya = {
8471
8514
  }
8472
8515
  let e = this._getTargets(), t = 1 / e.length, n = this.currentTimeProgress;
8473
8516
  e.forEach((e, r) => {
8474
- let i = t === 1 ? n : D(Math.max(0, n - t * r) / t, 0, 1), a = this._cachedProps.get(e);
8517
+ let i = t === 1 ? n : E(Math.max(0, n - t * r) / t, 0, 1), a = this._cachedProps.get(e);
8475
8518
  if (!a) return;
8476
8519
  let o = this._parseKeyframes(i, a);
8477
8520
  o?.length && this._commitStyle(i, e, a, o[0], o[1]);
@@ -8542,7 +8585,7 @@ var ya = {
8542
8585
  startY: t.y
8543
8586
  }, this._pathMeasures.set(o, s);
8544
8587
  }
8545
- let c = D(O(ha(r.offsetDistance ?? i.offsetDistance), ha(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 = ga(i.offsetRotate ?? r.offsetRotate, u), m = n.get("transform");
8588
+ let c = E(D(ha(r.offsetDistance ?? i.offsetDistance), ha(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 = ga(i.offsetRotate ?? r.offsetRotate, u), m = n.get("transform");
8546
8589
  e.onUpdateStyleProperty("transform", `${m ? `${m} ` : ""}translate(${d}px, ${f}px) rotate(${p}deg)`, void 0);
8547
8590
  }
8548
8591
  _getDiffValue(e, t, n, r, i) {
@@ -8563,10 +8606,10 @@ var ya = {
8563
8606
  let a = Math.max(t[e]?.length ?? 0, n[e]?.length ?? 0), o = t[e], s = n[e];
8564
8607
  i += `${e}(${Array.from({ length: a }, (e, t) => {
8565
8608
  let n = o?.[t], i = s?.[t], a = n?.normalizedIntValue ?? 0, c = i?.normalizedIntValue ?? 0;
8566
- return Number.isNaN(a) || Number.isNaN(c) ? i?.value ?? 0 : O(a, c, r);
8609
+ return Number.isNaN(a) || Number.isNaN(c) ? i?.value ?? 0 : D(a, c, r);
8567
8610
  }).join(", ")}) `;
8568
8611
  }), i;
8569
- } else if (!Array.isArray(a) && !Array.isArray(o)) return Number.isNaN(a.normalizedIntValue) || Number.isNaN(o.normalizedIntValue) ? o.value : O(a.normalizedIntValue, o.normalizedIntValue, r);
8612
+ } else if (!Array.isArray(a) && !Array.isArray(o)) return Number.isNaN(a.normalizedIntValue) || Number.isNaN(o.normalizedIntValue) ? o.value : D(a.normalizedIntValue, o.normalizedIntValue, r);
8570
8613
  }
8571
8614
  isPlaying() {
8572
8615
  return !this.paused && this.isInsideTimeRange();
@@ -8589,11 +8632,11 @@ var ya = {
8589
8632
  });
8590
8633
  }
8591
8634
  };
8592
- A([_({ fallback: "parent" }), k("design:type", Object)], xa.prototype, "effectMode", void 0), A([_({ default: () => [] }), k("design:type", Array)], xa.prototype, "keyframes", void 0), A([_(), k("design:type", Object)], xa.prototype, "easing", void 0), xa = A([S("Animation", {
8635
+ k([_({ fallback: "parent" }), O("design:type", Object)], xa.prototype, "effectMode", void 0), k([_({ default: () => [] }), O("design:type", Array)], xa.prototype, "keyframes", void 0), k([_(), O("design:type", Object)], xa.prototype, "easing", void 0), xa = k([S("Animation", {
8593
8636
  renderMode: "disabled",
8594
8637
  processSortMode: "parent-before",
8595
8638
  duration: 2e3
8596
- }), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], xa);
8639
+ }), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial, Array])], xa);
8597
8640
  //#endregion
8598
8641
  //#region src/scene/audio/html/HTMLAudioContext.ts
8599
8642
  var Sa = class t extends e {
@@ -9098,7 +9141,7 @@ var ka = class e extends Ta {
9098
9141
  createSound() {
9099
9142
  return new Aa();
9100
9143
  }
9101
- }, Ma, Na = class extends U {
9144
+ }, Ma, Na = class extends H {
9102
9145
  static {
9103
9146
  Ma = this;
9104
9147
  }
@@ -9229,14 +9272,14 @@ var ka = class e extends Ta {
9229
9272
  }, 100);
9230
9273
  }
9231
9274
  };
9232
- Na = Ma = A([S("Audio"), k("design:paramtypes", [Object])], Na);
9275
+ Na = Ma = k([S("Audio"), O("design:paramtypes", [Object])], Na);
9233
9276
  //#endregion
9234
9277
  //#region src/scene/audio/AudioSpectrum.ts
9235
- var Pa = class extends jr {}, Fa = class extends la {
9278
+ var Pa = class extends Mr {}, Fa = class extends la {
9236
9279
  _audioBuffer;
9237
9280
  _src = (() => {
9238
9281
  let e = w();
9239
- return e ? new B({ source: e }) : void 0;
9282
+ return e ? new z({ source: e }) : void 0;
9240
9283
  })();
9241
9284
  _needsUpdateTexture = !1;
9242
9285
  constructor(e = {}) {
@@ -9291,16 +9334,16 @@ var Pa = class extends jr {}, Fa = class extends la {
9291
9334
  this.syncTexture(), super._process(e);
9292
9335
  }
9293
9336
  };
9294
- A([_(), k("design:type", Object)], Fa.prototype, "src", void 0), A([_({ fallback: 0 }), k("design:type", Number)], Fa.prototype, "gap", void 0), A([_({ fallback: "#000000" }), k("design:type", String)], Fa.prototype, "color", void 0), Fa = A([S("AudioWaveform"), k("design:paramtypes", [typeof Partial > "u" ? Object : Partial])], Fa);
9337
+ k([_(), O("design:type", Object)], Fa.prototype, "src", void 0), k([_({ fallback: 0 }), O("design:type", Number)], Fa.prototype, "gap", void 0), k([_({ fallback: "#000000" }), O("design:type", String)], Fa.prototype, "color", void 0), Fa = k([S("AudioWaveform"), O("design:paramtypes", [typeof Partial > "u" ? Object : Partial])], Fa);
9295
9338
  //#endregion
9296
9339
  //#region src/scene/transitions/KawaseTransition.ts
9297
- var Ia, La = class extends Ar {
9340
+ var Ia, La = class extends jr {
9298
9341
  static {
9299
9342
  Ia = this;
9300
9343
  }
9301
9344
  blur = 10;
9302
9345
  quality = 10;
9303
- static material = new L({ gl: {
9346
+ static material = new I({ gl: {
9304
9347
  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}",
9305
9348
  fragment: "precision highp float;\nin vec2 vUv;\nuniform sampler2D sampler;\nuniform vec2 offset;\nuniform float progress;\n\nvoid main(void) {\n vec2 offset1 = vec2(offset.x - progress * offset.x, offset.y - progress * offset.y);\n vec4 color = vec4(0.0);\n color += texture(sampler, vec2(vUv.x - offset1.x, vUv.y + offset1.y));\n color += texture(sampler, vec2(vUv.x + offset1.x, vUv.y + offset1.y));\n color += texture(sampler, vec2(vUv.x + offset1.x, vUv.y - offset1.y));\n color += texture(sampler, vec2(vUv.x - offset1.x, vUv.y - offset1.y));\n color *= 0.25;\n gl_FragColor = color;\n}"
9306
9349
  } });
@@ -9315,7 +9358,7 @@ var Ia, La = class extends Ar {
9315
9358
  let d = 1 / s, f = 1 / c, p = [], m, h = o - 1;
9316
9359
  for (let e = 0; e < h; e++) m = u[e] + .5, p[0] = m * d, p[1] = m * f, l.push({ offset: p });
9317
9360
  m = u[h] + .5, p[0] = m * d, p[1] = m * f, l.push({ offset: p }), l.forEach((t) => {
9318
- R.draw(e, Ia.material, {
9361
+ L.draw(e, Ia.material, {
9319
9362
  sampler: r,
9320
9363
  progress: i,
9321
9364
  ...t
@@ -9323,35 +9366,35 @@ var Ia, La = class extends Ar {
9323
9366
  });
9324
9367
  }
9325
9368
  };
9326
- La = Ia = A([S("KawaseTransition")], La);
9369
+ La = Ia = k([S("KawaseTransition")], La);
9327
9370
  //#endregion
9328
9371
  //#region src/scene/transitions/LeftEraseTransition.ts
9329
- var Ra, za = class extends Ar {
9372
+ var Ra, za = class extends jr {
9330
9373
  static {
9331
9374
  Ra = this;
9332
9375
  }
9333
- static material = new L({ gl: {
9376
+ static material = new I({ gl: {
9334
9377
  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}",
9335
9378
  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}"
9336
9379
  } });
9337
9380
  apply(e) {
9338
- R.draw(e, Ra.material, {
9381
+ L.draw(e, Ra.material, {
9339
9382
  previous: 0,
9340
9383
  next: 1,
9341
9384
  progress: this.currentTimeProgress
9342
9385
  });
9343
9386
  }
9344
9387
  };
9345
- za = Ra = A([S("LeftEraseTransition")], za);
9388
+ za = Ra = k([S("LeftEraseTransition")], za);
9346
9389
  //#endregion
9347
9390
  //#region src/scene/transitions/TiltShiftTransition.ts
9348
- var Ba, Va = class extends Ar {
9391
+ var Ba, Va = class extends jr {
9349
9392
  static {
9350
9393
  Ba = this;
9351
9394
  }
9352
9395
  blur = 100;
9353
9396
  gradientBlur = 600;
9354
- static material = new L({ gl: {
9397
+ static material = new I({ gl: {
9355
9398
  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}",
9356
9399
  fragment: "precision highp float;\nvarying vec2 vUv;\nuniform sampler2D sampler;\nuniform float blur;\nuniform float gradientBlur;\nuniform vec2 start;\nuniform vec2 end;\nuniform vec2 delta;\nuniform vec2 texSize;\nuniform float progress;\n\nfloat random(vec3 scale, float seed) {\n return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + seed);\n}\n\nvoid main(void) {\n float blur1 = blur - progress * blur;\n float gradientBlur1 = progress * gradientBlur;\n\n vec4 color = vec4(0.0);\n float total = 0.0;\n float offset = random(vec3(12.9898, 78.233, 151.7182), 0.0);\n vec2 normal = normalize(vec2(start.y - end.y, end.x - start.x));\n float radius = smoothstep(0.0, 1.0, abs(dot(vUv * texSize - start, normal)) / gradientBlur1) * blur1;\n\n for (float t = -30.0; t <= 30.0; t++) {\n float percent = (t + offset - 0.5) / 30.0;\n float weight = 1.0 - abs(percent);\n vec4 sample1 = texture2D(sampler, vUv + delta / texSize * percent * radius);\n sample1.rgb *= sample1.a;\n color += sample1 * weight;\n total += weight;\n }\n\n color /= total;\n color.rgb /= color.a + 0.00001;\n\n gl_FragColor = color;\n}"
9357
9400
  } });
@@ -9359,7 +9402,7 @@ var Ba, Va = class extends Ar {
9359
9402
  let n = this.currentTimeProgress, r, i;
9360
9403
  n < .5 ? (r = 0, i = (.5 - n) / .5) : (r = 1, i = (n - .5) / .5);
9361
9404
  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);
9362
- R.draw(e, Ba.material, {
9405
+ L.draw(e, Ba.material, {
9363
9406
  sampler: r,
9364
9407
  progress: i,
9365
9408
  blur: this.blur,
@@ -9368,7 +9411,7 @@ var Ba, Va = class extends Ar {
9368
9411
  end: c,
9369
9412
  delta: [u / f, d / f],
9370
9413
  texSize: l
9371
- }), R.draw(e, Ba.material, {
9414
+ }), L.draw(e, Ba.material, {
9372
9415
  sampler: r,
9373
9416
  progress: i,
9374
9417
  blur: this.blur,
@@ -9380,10 +9423,10 @@ var Ba, Va = class extends Ar {
9380
9423
  });
9381
9424
  }
9382
9425
  };
9383
- Va = Ba = A([S("TiltShiftTransition")], Va);
9426
+ Va = Ba = k([S("TiltShiftTransition")], Va);
9384
9427
  //#endregion
9385
9428
  //#region src/scene/transitions/TwistTransition.ts
9386
- var Ha, Ua = class extends Ar {
9429
+ var Ha, Ua = class extends jr {
9387
9430
  static {
9388
9431
  Ha = this;
9389
9432
  }
@@ -9391,7 +9434,7 @@ var Ha, Ua = class extends Ar {
9391
9434
  angle = 4;
9392
9435
  padding = 20;
9393
9436
  offset;
9394
- static material = new L({ gl: {
9437
+ static material = new I({ gl: {
9395
9438
  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}",
9396
9439
  fragment: "precision highp float;\nvarying vec2 vUv;\nuniform sampler2D sampler;\nuniform float radius;\nuniform float angle;\nuniform vec2 offset;\nuniform vec4 filterArea;\nuniform float progress;\n\nvec2 mapCoord(vec2 coord) {\n coord -= filterArea.zw;\n coord *= filterArea.xy;\n return coord;\n}\n\nvec2 unmapCoord(vec2 coord) {\n coord -= filterArea.zw;\n coord /= filterArea.xy;\n return coord;\n}\n\nvec2 twist(vec2 coord, float radius) {\n coord -= offset;\n float dist = length(coord);\n if (dist < radius) {\n float ratioDist = (radius - dist) / radius;\n float angleMod = ratioDist * ratioDist * angle;\n float s = sin(angleMod);\n float c = cos(angleMod);\n coord = vec2(coord.x * c - coord.y * s, coord.x * s + coord.y * c);\n }\n coord += offset;\n return coord;\n}\n\nvoid main(void) {\n vec2 coord = mapCoord(vUv);\n coord = twist(coord, radius - (progress * radius));\n coord = unmapCoord(coord);\n gl_FragColor = texture2D(sampler, coord);\n}"
9397
9440
  } });
@@ -9399,7 +9442,7 @@ var Ha, Ua = class extends Ar {
9399
9442
  let n = this.currentTimeProgress, r, i;
9400
9443
  n < .5 ? (r = 0, i = (.5 - n) / .5) : (r = 1, i = (n - .5) / .5);
9401
9444
  let a = t.width, o = t.height;
9402
- R.draw(e, Ha.material, {
9445
+ L.draw(e, Ha.material, {
9403
9446
  sampler: r,
9404
9447
  progress: i,
9405
9448
  filterArea: [
@@ -9415,16 +9458,16 @@ var Ha, Ua = class extends Ar {
9415
9458
  });
9416
9459
  }
9417
9460
  };
9418
- Ua = Ha = A([S("TwistTransition")], Ua);
9461
+ Ua = Ha = k([S("TwistTransition")], Ua);
9419
9462
  //#endregion
9420
9463
  //#region src/asset/loaders/GifLoader.ts
9421
- var Wa = class extends Gn {
9464
+ var Wa = class extends Kn {
9422
9465
  install(e) {
9423
9466
  let t = async (t) => {
9424
9467
  let { decodeFrames: n } = await import("modern-gif");
9425
- return await t.arrayBuffer().then((t) => n(t, e.gifWorkerUrl ? { workerUrl: e.gifWorkerUrl } : void 0)).then((e) => new rr(e.map((e) => ({
9468
+ return await t.arrayBuffer().then((t) => n(t, e.gifWorkerUrl ? { workerUrl: e.gifWorkerUrl } : void 0)).then((e) => new ir(e.map((e) => ({
9426
9469
  duration: e.delay,
9427
- texture: new ur({
9470
+ texture: new dr({
9428
9471
  source: e.data,
9429
9472
  width: e.width,
9430
9473
  height: e.height
@@ -9435,14 +9478,14 @@ var Wa = class extends Gn {
9435
9478
  e.register(n, t);
9436
9479
  }), e.gif = this, this;
9437
9480
  }
9438
- }, Ga = class extends Gn {
9481
+ }, Ga = class extends Kn {
9439
9482
  install(e) {
9440
9483
  let t = async (e) => JSON.parse(await e.text());
9441
9484
  return this.load = (n) => typeof n == "string" ? e.loadBy(n).then(t) : t(n), ["application/json"].forEach((n) => {
9442
9485
  e.register(n, t);
9443
9486
  }), e.json = this, this;
9444
9487
  }
9445
- }, Ka = class extends Gn {
9488
+ }, Ka = class extends Kn {
9446
9489
  install(e) {
9447
9490
  return this.load = async (t, n) => (await import("lottie-web").then((e) => e.default)).loadAnimation({
9448
9491
  container: null,
@@ -9453,14 +9496,14 @@ var Wa = class extends Gn {
9453
9496
  animationData: await e.loadBy(t, () => e.fetch(t).then((e) => e.json()))
9454
9497
  }), e.lottie = this, this;
9455
9498
  }
9456
- }, qa = class extends Gn {
9499
+ }, qa = class extends Kn {
9457
9500
  install(e) {
9458
9501
  let t = async (e) => e.text();
9459
9502
  return this.load = (n) => typeof n == "string" ? e.loadBy(n).then(t) : t(n), e.text = this, this;
9460
9503
  }
9461
- }, Ja = class extends Gn {
9504
+ }, Ja = class extends Kn {
9462
9505
  install(e) {
9463
- let t = (t) => e.fetchImageBitmap(t, { premultiplyAlpha: "premultiply" }).then((e) => new B({
9506
+ let t = (t) => e.fetchImageBitmap(t, { premultiplyAlpha: "premultiply" }).then((e) => new z({
9464
9507
  source: e,
9465
9508
  uploadMethodId: "image",
9466
9509
  mipmap: !0,
@@ -9482,9 +9525,9 @@ var Wa = class extends Gn {
9482
9525
  e.register(n, t);
9483
9526
  }), e.texture = this, this;
9484
9527
  }
9485
- }, Ya = class extends Gn {
9528
+ }, Ya = class extends Kn {
9486
9529
  install(e) {
9487
- return this.load = (t) => e.awaitBy(() => new fr(t).load()), e.video = this, this;
9530
+ return this.load = (t) => e.awaitBy(() => new pr(t).load()), e.video = this, this;
9488
9531
  }
9489
9532
  }, Xa = Object.entries({
9490
9533
  "font/woff": ["woff"],
@@ -9608,14 +9651,14 @@ var $a = "WeakRef" in globalThis, eo = class extends e {
9608
9651
  n && "destroy" in n && n.destroy();
9609
9652
  }), this._handled.clear();
9610
9653
  }
9611
- }, $ = new eo().use(new Kn()).use(new Wa()).use(new Ga()).use(new Ka()).use(new qa()).use(new Ja()).use(new Ya()), to = {
9654
+ }, $ = new eo().use(new qn()).use(new Wa()).use(new Ga()).use(new Ka()).use(new qa()).use(new Ja()).use(new Ya()), to = {
9612
9655
  alpha: !0,
9613
9656
  stencil: !0,
9614
9657
  antialias: !1,
9615
9658
  premultipliedAlpha: !0,
9616
9659
  preserveDrawingBuffer: !1,
9617
9660
  powerPreference: "default"
9618
- }, no = class extends kr {
9661
+ }, no = class extends Ar {
9619
9662
  renderer;
9620
9663
  get view() {
9621
9664
  return this.renderer.view;
@@ -9647,7 +9690,7 @@ var $a = "WeakRef" in globalThis, eo = class extends e {
9647
9690
  }) : void 0;
9648
9691
  constructor(e = {}) {
9649
9692
  let { view: t, width: n, height: r, pixelRatio: i = Ye, autoResize: a, data: o } = e;
9650
- super(), this.renderer = new Wn(t, {
9693
+ super(), this.renderer = new Gn(t, {
9651
9694
  alpha: to.alpha ?? e.alpha,
9652
9695
  stencil: to.stencil ?? e.stencil,
9653
9696
  antialias: to.antialias ?? e.antialias,
@@ -9772,7 +9815,7 @@ var $a = "WeakRef" in globalThis, eo = class extends e {
9772
9815
  super._destroy(), this._resizeObserver?.disconnect(), this.renderer.destroy();
9773
9816
  }
9774
9817
  };
9775
- A([_({ fallback: !1 }), k("design:type", Boolean)], no.prototype, "autoResize", void 0), A([_({ fallback: !1 }), k("design:type", Boolean)], no.prototype, "autoStart", void 0);
9818
+ k([_({ fallback: !1 }), O("design:type", Boolean)], no.prototype, "autoResize", void 0), k([_({ fallback: !1 }), O("design:type", Boolean)], no.prototype, "autoStart", void 0);
9776
9819
  //#endregion
9777
9820
  //#region src/render.ts
9778
9821
  var ro, io = [], ao = !1;
@@ -9840,4 +9883,4 @@ async function uo(e) {
9840
9883
  });
9841
9884
  }
9842
9885
  //#endregion
9843
- export { yt as Aabb2D, rr as AnimatedTexture, xa as Animation, eo as Assets, Na as Audio, Ta as AudioPipeline, Ea as AudioProcessor, Pa as AudioSpectrum, Fa as AudioWaveform, j as BufferUsage, Mr as Camera2D, mr as CanvasContext, wr as CanvasItem, ir as CanvasTexture, bt as Color, K as ColorAdjustEffect, Gr as ColorFilterEffect, Ct as ColorMatrix, Jr as ColorOverlayEffect, Xr as ColorRemoveEffect, $r as ColorReplaceEffect, ar as ColorTexture, T as CoreObject, xt as DEG_TO_RAD, Ye as DEVICE_PIXEL_RATIO, q as DrawboardEffect, oi as DropShadowEffect, G as Effect, er as EffectMaterial, la as Element2D, Ei as Element2DBackground, X as Element2DChart, Ai as Element2DComments, ji as Element2DConnection, Y as Element2DFill, Ni as Element2DForeground, Fi as Element2DOutline, Ii as Element2DShadow, Li as Element2DShape, Ri as Element2DStyle, Hi as Element2DTable, Z as Element2DText, ci as EmbossEffect, no as Engine, ra as Flexbox, Kn as FontLoader, ii as GaussianBlurEffect, Jn as Geometry, Wa as GifLoader, fn as GlBatch2DSystem, cn as GlBlendMode, At as GlBuffer, Lt as GlBufferSystem, kt as GlBufferTarget, gn as GlMaskSystem, Yt as GlProgram, bn as GlRenderTarget, xn as GlRenderTargetSystem, an as GlShaderSystem, un as GlState, dn as GlStateSystem, vn as GlStencilSystem, M as GlSystem, yn as GlViewportSystem, J as GlitchEffect, sr as GlyphAtlas, fi as GodrayEffect, lr as GradientTexture, wa as HTMLAudio, Sa as HTMLAudioContext, Ca as HTMLSound, qe as IN_BROWSER, Je as IN_MAC_OS, qn as IndexBuffer, _t as Input, dt as InputEvent, Ga as JsonLoader, hi as KawaseBlurEffect, La as KawaseTransition, ft as KeyboardInputEvent, za as LeftEraseTransition, Gn as Loader, da as Lottie2D, Ka as LottieLoader, Et as MainLoop, _i as MaskEffect, L as Material, fa as Mesh2D, gr as Meta, pt as MouseInputEvent, H as Node, jr as Node2D, wt as Obb2D, bi as OutlineEffect, xe as PI, Se as PI_2, Si as PixelateEffect, ur as PixelsTexture, mt as PointerInputEvent, Tt as Projection2D, Yn as QuadGeometry, R as QuadUvGeometry, St as RAD_TO_DEG, vt as RefCounted, z as RenderTarget, jt as Renderer, E as Resource, He as SUPPORTS_AUDIO_CONTEXT, Be as SUPPORTS_CLICK_EVENTS, Ve as SUPPORTS_CREATE_IMAGE_BITMAP, Pe as SUPPORTS_IMAGE_BITMAP, Re as SUPPORTS_MOUSE_EVENTS, We as SUPPORTS_OFFLINE_AUDIO_CONTEXT, Ie as SUPPORTS_POINTER_EVENTS, Fe as SUPPORTS_RESIZE_OBSERVER, ze as SUPPORTS_TOUCH_EVENTS, Ne as SUPPORTS_WEBGL2, Ue as SUPPORTS_WEBKIT_AUDIO_CONTEXT, Ge as SUPPORTS_WEBKIT_OFFLINE_AUDIO_CONTEXT, Ke as SUPPORTS_WEB_AUDIO, Le as SUPPORTS_WHEEL_EVENTS, kr as SceneTree, qa as TextLoader, B as Texture2D, Ja as TextureLoader, ua as TextureRect2D, C as Ticker, Va as TiltShiftTransition, Dr as Timeline, U as TimelineNode, pa as TransformRect2D, Ar as Transition, Ua as TwistTransition, Nt as UniformGroup, nr as UvGeometry, tr as UvMaterial, I as VertexAttribute, F as VertexBuffer, ma as Video2D, Ya as VideoLoader, fr as VideoTexture, W as Viewport, pr as ViewportTexture, ja as WebAudio, ka as WebAudioContext, Wn as WebGLRenderer, Aa as WebSound, ht as WheelInputEvent, Or as Window, wi as ZoomBlurEffect, Ji as alignMap, $ as assets, Nr as axisDir, na as boxSizingMap, D as clamp, mi as clampFrag, w as createHTMLCanvas, It as createIdFromString, ye as createNode, ct as crossOrigin, ya as cssEasingPresets, va as cubicBezier, S as customNode, ve as customNodes, to as defaultOptions, st as determineCrossOrigin, Xi as directionMap, Yi as displayMap, Q as edgeMap, Zi as flexDirectionMap, Qi as flexWrapMap, pi as frag, rt as getCanvasFactory, Oe as getDefaultCssPropertyValue, ot as getGlContextProvider, oo as getRenderEngine, qi as gutterMap, ut as instanceId, $e as isCanvasElement, Xe as isElementNode, Qe as isImageElement, Ce as isPow2, Ze as isVideoElement, et as isWebgl2, $i as justifyMap, O as lerp, mn as log2, ln as mapGlBlendModes, Ot as markRaw, pn as nextPow2, be as nextTick, ea as overflowMap, Vr as parseCssFilter, Ae as parseCssFunctions, ke as parseCssProperty, Hr as parseCssTransformOrigin, we as planExportTiles, ta as positionTypeMap, lo as render, uo as renderPixels, Sr as resetBatchPool, Pr as routeConnection, nt as setCanvasFactory, at as setGlContextProvider, cr as sharedGlyphAtlas, _n as stencilModeMap };
9886
+ export { bt as Aabb2D, ir as AnimatedTexture, xa as Animation, eo as Assets, Na as Audio, Ta as AudioPipeline, Ea as AudioProcessor, Pa as AudioSpectrum, Fa as AudioWaveform, A as BufferUsage, Nr as Camera2D, hr as CanvasContext, Tr as CanvasItem, ar as CanvasTexture, xt as Color, G as ColorAdjustEffect, Kr as ColorFilterEffect, wt as ColorMatrix, Yr as ColorOverlayEffect, Zr as ColorRemoveEffect, ei as ColorReplaceEffect, or as ColorTexture, T as CoreObject, St as DEG_TO_RAD, Ye as DEVICE_PIXEL_RATIO, K as DrawboardEffect, si as DropShadowEffect, W as Effect, tr as EffectMaterial, la as Element2D, Di as Element2DBackground, Y as Element2DChart, ji as Element2DComments, Mi as Element2DConnection, J as Element2DFill, Pi as Element2DForeground, Ii as Element2DOutline, Li as Element2DShadow, Ri as Element2DShape, zi as Element2DStyle, Ui as Element2DTable, X as Element2DText, li as EmbossEffect, no as Engine, ra as Flexbox, qn as FontLoader, ai as GaussianBlurEffect, Yn as Geometry, Wa as GifLoader, pn as GlBatch2DSystem, ln as GlBlendMode, jt as GlBuffer, Rt as GlBufferSystem, At as GlBufferTarget, _n as GlMaskSystem, Xt as GlProgram, xn as GlRenderTarget, Sn as GlRenderTargetSystem, on as GlShaderSystem, dn as GlState, fn as GlStateSystem, yn as GlStencilSystem, j as GlSystem, bn as GlViewportSystem, q as GlitchEffect, cr as GlyphAtlas, pi as GodrayEffect, ur as GradientTexture, wa as HTMLAudio, Sa as HTMLAudioContext, Ca as HTMLSound, qe as IN_BROWSER, Je as IN_MAC_OS, Jn as IndexBuffer, _t as Input, dt as InputEvent, Ga as JsonLoader, gi as KawaseBlurEffect, La as KawaseTransition, ft as KeyboardInputEvent, za as LeftEraseTransition, Kn as Loader, da as Lottie2D, Ka as LottieLoader, Dt as MainLoop, vi as MaskEffect, I as Material, fa as Mesh2D, _r as Meta, pt as MouseInputEvent, V as Node, Mr as Node2D, Tt as Obb2D, xi as OutlineEffect, xe as PI, Se as PI_2, Ci as PixelateEffect, dr as PixelsTexture, mt as PointerInputEvent, Et as Projection2D, Xn as QuadGeometry, L as QuadUvGeometry, Ct as RAD_TO_DEG, vt as RefCounted, R as RenderTarget, Mt as Renderer, yt as Resource, He as SUPPORTS_AUDIO_CONTEXT, Be as SUPPORTS_CLICK_EVENTS, Ve as SUPPORTS_CREATE_IMAGE_BITMAP, Pe as SUPPORTS_IMAGE_BITMAP, Re as SUPPORTS_MOUSE_EVENTS, We as SUPPORTS_OFFLINE_AUDIO_CONTEXT, Ie as SUPPORTS_POINTER_EVENTS, Fe as SUPPORTS_RESIZE_OBSERVER, ze as SUPPORTS_TOUCH_EVENTS, Ne as SUPPORTS_WEBGL2, Ue as SUPPORTS_WEBKIT_AUDIO_CONTEXT, Ge as SUPPORTS_WEBKIT_OFFLINE_AUDIO_CONTEXT, Ke as SUPPORTS_WEB_AUDIO, Le as SUPPORTS_WHEEL_EVENTS, Ar as SceneTree, qa as TextLoader, z as Texture2D, Ja as TextureLoader, ua as TextureRect2D, C as Ticker, Va as TiltShiftTransition, Or as Timeline, H as TimelineNode, pa as TransformRect2D, jr as Transition, Ua as TwistTransition, Pt as UniformGroup, rr as UvGeometry, nr as UvMaterial, F as VertexAttribute, P as VertexBuffer, ma as Video2D, Ya as VideoLoader, pr as VideoTexture, U as Viewport, mr as ViewportTexture, ja as WebAudio, ka as WebAudioContext, Gn as WebGLRenderer, Aa as WebSound, ht as WheelInputEvent, kr as Window, Ti as ZoomBlurEffect, Q as alignMap, $ as assets, Pr as axisDir, na as boxSizingMap, E as clamp, hi as clampFrag, w as createHTMLCanvas, Lt as createIdFromString, ye as createNode, ct as crossOrigin, ya as cssEasingPresets, va as cubicBezier, S as customNode, ve as customNodes, to as defaultOptions, st as determineCrossOrigin, Xi as directionMap, Yi as displayMap, Z as edgeMap, Zi as flexDirectionMap, Qi as flexWrapMap, mi as frag, rt as getCanvasFactory, Oe as getDefaultCssPropertyValue, ot as getGlContextProvider, oo as getRenderEngine, Ji as gutterMap, ut as instanceId, $e as isCanvasElement, Xe as isElementNode, Qe as isImageElement, Ce as isPow2, Ze as isVideoElement, et as isWebgl2, $i as justifyMap, D as lerp, hn as log2, un as mapGlBlendModes, kt as markRaw, mn as nextPow2, be as nextTick, ea as overflowMap, Hr as parseCssFilter, Ae as parseCssFunctions, ke as parseCssProperty, Ur as parseCssTransformOrigin, we as planExportTiles, ta as positionTypeMap, lo as render, uo as renderPixels, Cr as resetBatchPool, Fr as routeConnection, nt as setCanvasFactory, at as setGlContextProvider, lr as sharedGlyphAtlas, vn as stencilModeMap };