modern-canvas 0.21.1 → 0.21.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
@@ -5318,38 +5318,74 @@ function Br(e, t, n) {
5318
5318
  }, u = [{
5319
5319
  x: r.x,
5320
5320
  y: r.y
5321
- }, c], d = o.y === 0, f = s.y === 0;
5322
- if (d && f) {
5323
- let e = (c.x + l.x) / 2;
5324
- u.push({
5325
- x: e,
5326
- y: c.y
5327
- }, {
5328
- x: e,
5329
- y: l.y
5330
- });
5331
- } else if (!d && !f) {
5332
- let e = (c.y + l.y) / 2;
5333
- u.push({
5334
- x: c.x,
5335
- y: e
5336
- }, {
5337
- x: l.x,
5338
- y: e
5339
- });
5340
- } else d ? u.push({
5341
- x: l.x,
5342
- y: c.y
5343
- }) : u.push({
5344
- x: c.x,
5345
- y: l.y
5346
- });
5347
- return u.push(l, {
5321
+ }, c];
5322
+ return u.push(...Vr(c, o, l, s)), u.push(l, {
5348
5323
  x: i.x,
5349
5324
  y: i.y
5350
- }), Vr(u);
5325
+ }), Hr(u);
5351
5326
  }
5352
- function Vr(e) {
5327
+ function Vr(e, t, n, r) {
5328
+ let i = t.y === 0;
5329
+ if (i === (r.y === 0)) {
5330
+ if (i) {
5331
+ if (t.x === -r.x && (n.x - e.x) * t.x > 0) {
5332
+ let t = (e.x + n.x) / 2;
5333
+ return [{
5334
+ x: t,
5335
+ y: e.y
5336
+ }, {
5337
+ x: t,
5338
+ y: n.y
5339
+ }];
5340
+ }
5341
+ let i = (e.y + n.y) / 2;
5342
+ return [{
5343
+ x: e.x,
5344
+ y: i
5345
+ }, {
5346
+ x: n.x,
5347
+ y: i
5348
+ }];
5349
+ }
5350
+ if (t.y === -r.y && (n.y - e.y) * t.y > 0) {
5351
+ let t = (e.y + n.y) / 2;
5352
+ return [{
5353
+ x: e.x,
5354
+ y: t
5355
+ }, {
5356
+ x: n.x,
5357
+ y: t
5358
+ }];
5359
+ }
5360
+ let a = (e.x + n.x) / 2;
5361
+ return [{
5362
+ x: a,
5363
+ y: e.y
5364
+ }, {
5365
+ x: a,
5366
+ y: n.y
5367
+ }];
5368
+ }
5369
+ let [a, o, s, c] = i ? [
5370
+ e,
5371
+ t,
5372
+ n,
5373
+ r
5374
+ ] : [
5375
+ n,
5376
+ r,
5377
+ e,
5378
+ t
5379
+ ];
5380
+ return (s.x - a.x) * o.x >= 0 && (s.y - a.y) * c.y <= 0 ? [{
5381
+ x: s.x,
5382
+ y: a.y
5383
+ }] : [{
5384
+ x: a.x,
5385
+ y: s.y
5386
+ }];
5387
+ }
5388
+ function Hr(e) {
5353
5389
  let t = [];
5354
5390
  for (let n = 0; n < e.length; n++) {
5355
5391
  let r = e[n], i = t[t.length - 1];
@@ -5359,7 +5395,7 @@ function Vr(e) {
5359
5395
  }
5360
5396
  //#endregion
5361
5397
  //#region src/css/parseCssFilter.ts
5362
- var Hr = {
5398
+ var Ur = {
5363
5399
  brightness: 1,
5364
5400
  contrast: 1,
5365
5401
  grayscale: 0,
@@ -5369,12 +5405,12 @@ var Hr = {
5369
5405
  saturate: 1,
5370
5406
  sepia: 0
5371
5407
  };
5372
- function Ur(e) {
5408
+ function Wr(e) {
5373
5409
  let t = new vt();
5374
5410
  if (e === "none") return t;
5375
5411
  let n = De(e).reduce((e, { name: t, args: n }) => (e[t] = n[0].normalizedIntValue, e), {});
5376
- Object.keys(Hr).forEach((e) => {
5377
- n[e] = n[e] ?? Hr[e];
5412
+ Object.keys(Ur).forEach((e) => {
5413
+ n[e] = n[e] ?? Ur[e];
5378
5414
  });
5379
5415
  for (let e in n) {
5380
5416
  let r = n[e];
@@ -5409,7 +5445,7 @@ function Ur(e) {
5409
5445
  }
5410
5446
  //#endregion
5411
5447
  //#region src/css/parseCssTransformOrigin.ts
5412
- function Wr(e) {
5448
+ function Gr(e) {
5413
5449
  let [t, n = t] = e.split(" ");
5414
5450
  return [t, n].map((e) => {
5415
5451
  switch (e = e.trim(), e) {
@@ -5424,9 +5460,9 @@ function Wr(e) {
5424
5460
  }
5425
5461
  //#endregion
5426
5462
  //#region src/scene/effects/ColorAdjustEffect.ts
5427
- var Gr, Kr, U = class extends H {
5463
+ var Kr, qr, U = class extends H {
5428
5464
  static {
5429
- Kr = this;
5465
+ qr = this;
5430
5466
  }
5431
5467
  static material = new F({ gl: {
5432
5468
  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}",
@@ -5437,7 +5473,7 @@ var Gr, Kr, U = class extends H {
5437
5473
  }
5438
5474
  apply(e, t) {
5439
5475
  t.redraw(e, () => {
5440
- I.draw(e, Kr.material, {
5476
+ I.draw(e, qr.material, {
5441
5477
  sampler: 0,
5442
5478
  saturation: this.saturation,
5443
5479
  contrast: this.contrast,
@@ -5451,12 +5487,12 @@ var Gr, Kr, U = class extends H {
5451
5487
  });
5452
5488
  }
5453
5489
  };
5454
- O([_({ fallback: 1 }), D("design:type", Number)], U.prototype, "saturation", void 0), O([_({ fallback: 1 }), D("design:type", Number)], U.prototype, "contrast", void 0), O([_({ fallback: 1 }), D("design:type", Number)], U.prototype, "brightness", void 0), O([_({ fallback: 1 }), D("design:type", Number)], U.prototype, "red", void 0), O([_({ fallback: 1 }), D("design:type", Number)], U.prototype, "green", void 0), O([_({ fallback: 1 }), D("design:type", Number)], U.prototype, "blue", void 0), O([_({ fallback: 1 }), D("design:type", Number)], U.prototype, "alpha", void 0), O([_({ fallback: 1 }), D("design:type", Number)], U.prototype, "gamma", void 0), U = Kr = O([x("ColorAdjustEffect"), D("design:paramtypes", [typeof (Gr = typeof Partial < "u" && Partial) == "function" ? Gr : Object, Array])], U);
5490
+ O([_({ fallback: 1 }), D("design:type", Number)], U.prototype, "saturation", void 0), O([_({ fallback: 1 }), D("design:type", Number)], U.prototype, "contrast", void 0), O([_({ fallback: 1 }), D("design:type", Number)], U.prototype, "brightness", void 0), O([_({ fallback: 1 }), D("design:type", Number)], U.prototype, "red", void 0), O([_({ fallback: 1 }), D("design:type", Number)], U.prototype, "green", void 0), O([_({ fallback: 1 }), D("design:type", Number)], U.prototype, "blue", void 0), O([_({ fallback: 1 }), D("design:type", Number)], U.prototype, "alpha", void 0), O([_({ fallback: 1 }), D("design:type", Number)], U.prototype, "gamma", void 0), U = qr = O([x("ColorAdjustEffect"), D("design:paramtypes", [typeof (Kr = typeof Partial < "u" && Partial) == "function" ? Kr : Object, Array])], U);
5455
5491
  //#endregion
5456
5492
  //#region src/scene/effects/ColorFilterEffect.ts
5457
- var qr, Jr, Yr = class extends H {
5493
+ var Jr, Yr, Xr = class extends H {
5458
5494
  static {
5459
- Jr = this;
5495
+ Yr = this;
5460
5496
  }
5461
5497
  static material = new F({ gl: {
5462
5498
  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}",
@@ -5506,25 +5542,25 @@ var qr, Jr, Yr = class extends H {
5506
5542
  break;
5507
5543
  }
5508
5544
  }), t.redraw(e, () => {
5509
- I.draw(e, Jr.material, {
5545
+ I.draw(e, Yr.material, {
5510
5546
  sampler: 0,
5511
5547
  m: r.toArray()
5512
5548
  });
5513
5549
  });
5514
5550
  }
5515
5551
  };
5516
- O([_(), D("design:type", String)], Yr.prototype, "filter", void 0), Yr = Jr = O([x("ColorFilterEffect"), D("design:paramtypes", [typeof (qr = typeof Partial < "u" && Partial) == "function" ? qr : Object, Array])], Yr);
5552
+ O([_(), D("design:type", String)], Xr.prototype, "filter", void 0), Xr = Yr = O([x("ColorFilterEffect"), D("design:paramtypes", [typeof (Jr = typeof Partial < "u" && Partial) == "function" ? Jr : Object, Array])], Xr);
5517
5553
  //#endregion
5518
5554
  //#region src/scene/effects/ColorOverlayEffect.ts
5519
- var Xr, Zr, Qr = 50, $r = class extends H {
5555
+ var Zr, Qr, $r = 50, ei = class extends H {
5520
5556
  static {
5521
- Zr = this;
5557
+ Qr = this;
5522
5558
  }
5523
5559
  static material = new F({ gl: {
5524
5560
  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}",
5525
5561
  fragment: `precision mediump float;
5526
5562
  uniform sampler2D sampler;
5527
- uniform vec4 colors[${Qr}];
5563
+ uniform vec4 colors[${$r}];
5528
5564
  varying vec2 vUv;
5529
5565
 
5530
5566
  float calcWidth() {
@@ -5533,7 +5569,7 @@ float calcWidth() {
5533
5569
 
5534
5570
  int calcCount() {
5535
5571
  int count = 0;
5536
- for (int i = 0; i < ${Qr}; i++) {
5572
+ for (int i = 0; i < ${$r}; i++) {
5537
5573
  if (colors[i] != vec4(0,0,0,0)){
5538
5574
  count++;
5539
5575
  }
@@ -5545,7 +5581,7 @@ vec4 calcColor(float x) {
5545
5581
  float perUnit = calcWidth() / float(calcCount());
5546
5582
  int index = int(x / perUnit);
5547
5583
 
5548
- for(int i=0; i<${Qr}; i++){
5584
+ for(int i=0; i<${$r}; i++){
5549
5585
  if(i==index){
5550
5586
  return colors[i];
5551
5587
  }
@@ -5571,25 +5607,25 @@ void main(void) {
5571
5607
  let t = this._color.toArray();
5572
5608
  return t[3] = this.alpha, t;
5573
5609
  });
5574
- for (; t.length < Qr;) t.push([
5610
+ for (; t.length < $r;) t.push([
5575
5611
  0,
5576
5612
  0,
5577
5613
  0,
5578
5614
  0
5579
5615
  ]);
5580
- I.draw(e, Zr.material, {
5616
+ I.draw(e, Qr.material, {
5581
5617
  sampler: 0,
5582
- colors: t.slice(0, Qr).flatMap((e) => e)
5618
+ colors: t.slice(0, $r).flatMap((e) => e)
5583
5619
  });
5584
5620
  });
5585
5621
  }
5586
5622
  };
5587
- O([_({ default: () => [] }), D("design:type", Array)], $r.prototype, "colors", void 0), O([_({ fallback: .5 }), D("design:type", Number)], $r.prototype, "alpha", void 0), $r = Zr = O([x("ColorOverlayEffect"), D("design:paramtypes", [typeof (Xr = typeof Partial < "u" && Partial) == "function" ? Xr : Object, Array])], $r);
5623
+ O([_({ default: () => [] }), D("design:type", Array)], ei.prototype, "colors", void 0), O([_({ fallback: .5 }), D("design:type", Number)], ei.prototype, "alpha", void 0), ei = Qr = O([x("ColorOverlayEffect"), D("design:paramtypes", [typeof (Zr = typeof Partial < "u" && Partial) == "function" ? Zr : Object, Array])], ei);
5588
5624
  //#endregion
5589
5625
  //#region src/scene/effects/ColorRemoveEffect.ts
5590
- var ei, ti, ni = class extends H {
5626
+ var ti, ni, ri = class extends H {
5591
5627
  static {
5592
- ti = this;
5628
+ ni = this;
5593
5629
  }
5594
5630
  static material = new F({ gl: {
5595
5631
  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}",
@@ -5609,7 +5645,7 @@ var ei, ti, ni = class extends H {
5609
5645
  r.slice(0, 50).forEach((e, t) => {
5610
5646
  n[t * 3] = e[0], n[t * 3 + 1] = e[1], n[t * 3 + 2] = e[2];
5611
5647
  }), t.redraw(e, () => {
5612
- I.draw(e, ti.material, {
5648
+ I.draw(e, ni.material, {
5613
5649
  sampler: 0,
5614
5650
  epsilon: this.epsilon,
5615
5651
  originalColors: n
@@ -5617,19 +5653,19 @@ var ei, ti, ni = class extends H {
5617
5653
  });
5618
5654
  }
5619
5655
  };
5620
- O([_({ default: () => [] }), D("design:type", Array)], ni.prototype, "colors", void 0), O([_({ fallback: .5 }), D("design:type", Number)], ni.prototype, "epsilon", void 0), ni = ti = O([x("ColorRemoveEffect"), D("design:paramtypes", [typeof (ei = typeof Partial < "u" && Partial) == "function" ? ei : Object, Array])], ni);
5656
+ O([_({ default: () => [] }), D("design:type", Array)], ri.prototype, "colors", void 0), O([_({ fallback: .5 }), D("design:type", Number)], ri.prototype, "epsilon", void 0), ri = ni = O([x("ColorRemoveEffect"), D("design:paramtypes", [typeof (ti = typeof Partial < "u" && Partial) == "function" ? ti : Object, Array])], ri);
5621
5657
  //#endregion
5622
5658
  //#region src/scene/effects/ColorReplaceEffect.ts
5623
- var ri, ii, ai = 50, oi = class extends H {
5659
+ var ii, ai, oi = 50, si = class extends H {
5624
5660
  static {
5625
- ii = this;
5661
+ ai = this;
5626
5662
  }
5627
5663
  static material = new F({ gl: {
5628
5664
  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}",
5629
5665
  fragment: `varying vec2 vUv;
5630
5666
  uniform sampler2D sampler;
5631
5667
  uniform float epsilon;
5632
- const int MAX_COLORS = ${ai};
5668
+ const int MAX_COLORS = ${oi};
5633
5669
  uniform vec3 originalColors[MAX_COLORS];
5634
5670
  uniform vec3 targetColors[MAX_COLORS];
5635
5671
 
@@ -5666,8 +5702,8 @@ void main(void) {
5666
5702
  this._color.value = e[0];
5667
5703
  let t = this._color.toArray().slice(0, 3);
5668
5704
  return this._color.value = e[1], [t, this._color.toArray().slice(0, 3)];
5669
- }), r = this.epsilon, i = new Float32Array(ai * 3), a = new Float32Array(ai * 3);
5670
- for (; n.length < ai;) n.push([[
5705
+ }), r = this.epsilon, i = new Float32Array(oi * 3), a = new Float32Array(oi * 3);
5706
+ for (; n.length < oi;) n.push([[
5671
5707
  -1,
5672
5708
  0,
5673
5709
  0
@@ -5677,10 +5713,10 @@ void main(void) {
5677
5713
  0,
5678
5714
  1
5679
5715
  ]]);
5680
- n.slice(0, ai).forEach(([e, t], n) => {
5716
+ n.slice(0, oi).forEach(([e, t], n) => {
5681
5717
  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];
5682
5718
  }), t.redraw(e, () => {
5683
- I.draw(e, ii.material, {
5719
+ I.draw(e, ai.material, {
5684
5720
  sampler: 0,
5685
5721
  epsilon: r,
5686
5722
  originalColors: i,
@@ -5689,17 +5725,17 @@ void main(void) {
5689
5725
  });
5690
5726
  }
5691
5727
  };
5692
- O([_({ default: () => [] }), D("design:type", Array)], oi.prototype, "colors", void 0), O([_({ fallback: .05 }), D("design:type", Number)], oi.prototype, "epsilon", void 0), oi = ii = O([x("ColorReplaceEffect"), D("design:paramtypes", [typeof (ri = typeof Partial < "u" && Partial) == "function" ? ri : Object, Array])], oi);
5728
+ O([_({ default: () => [] }), D("design:type", Array)], si.prototype, "colors", void 0), O([_({ fallback: .05 }), D("design:type", Number)], si.prototype, "epsilon", void 0), si = ai = O([x("ColorReplaceEffect"), D("design:paramtypes", [typeof (ii = typeof Partial < "u" && Partial) == "function" ? ii : Object, Array])], si);
5693
5729
  //#endregion
5694
5730
  //#region src/scene/effects/DrawboardEffect.frag?raw
5695
- var si = "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;\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) {\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", ci, li, W = class extends H {
5731
+ var ci = "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;\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) {\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", li, ui, W = class extends H {
5696
5732
  static {
5697
- li = this;
5733
+ ui = this;
5698
5734
  }
5699
5735
  _watermark;
5700
5736
  static material = new F({ gl: {
5701
5737
  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}",
5702
- fragment: si
5738
+ fragment: ci
5703
5739
  } });
5704
5740
  constructor(e, t = []) {
5705
5741
  super(), this.setProperties(e).append(t);
@@ -5723,7 +5759,7 @@ var si = "precision highp float;\n\nin vec2 vUv;\nuniform sampler2D uTexture;\nu
5723
5759
  t.redraw(e, () => {
5724
5760
  this._watermark ? this._watermark.activate(e, 1) : e.texture.unbind(1);
5725
5761
  let n = e.shader.uniforms.viewMatrix, r = this._watermark ? [this.watermarkWidth, this.watermarkWidth * this._watermark.height / this._watermark.width] : [0, 0], i = Math.max(r[0], r[1]);
5726
- I.draw(e, li.material, {
5762
+ I.draw(e, ui.material, {
5727
5763
  uTexture: 0,
5728
5764
  inputSize: [t.width, t.height],
5729
5765
  zoom: [n[0], n[4]],
@@ -5747,20 +5783,20 @@ var si = "precision highp float;\n\nin vec2 vUv;\nuniform sampler2D uTexture;\nu
5747
5783
  });
5748
5784
  }
5749
5785
  };
5750
- O([_({ fallback: !1 }), D("design:type", Boolean)], W.prototype, "checkerboard", void 0), O([_({ fallback: "grid" }), D("design:type", Object)], W.prototype, "checkerboardStyle", void 0), O([_({ fallback: !1 }), D("design:type", Boolean)], W.prototype, "pixelGrid", void 0), O([_(), D("design:type", String)], W.prototype, "watermark", void 0), O([_({ fallback: 100 }), D("design:type", Number)], W.prototype, "watermarkWidth", void 0), O([_({ fallback: .05 }), D("design:type", Number)], W.prototype, "watermarkAlpha", void 0), O([_({ fallback: .5236 }), D("design:type", Number)], W.prototype, "watermarkRotation", void 0), W = li = O([x("DrawboardEffect"), D("design:paramtypes", [typeof (ci = typeof Partial < "u" && Partial) == "function" ? ci : Object, Array])], W);
5786
+ O([_({ fallback: !1 }), D("design:type", Boolean)], W.prototype, "checkerboard", void 0), O([_({ fallback: "grid" }), D("design:type", Object)], W.prototype, "checkerboardStyle", void 0), O([_({ fallback: !1 }), D("design:type", Boolean)], W.prototype, "pixelGrid", void 0), O([_(), D("design:type", String)], W.prototype, "watermark", void 0), O([_({ fallback: 100 }), D("design:type", Number)], W.prototype, "watermarkWidth", void 0), O([_({ fallback: .05 }), D("design:type", Number)], W.prototype, "watermarkAlpha", void 0), O([_({ fallback: .5236 }), D("design:type", Number)], W.prototype, "watermarkRotation", void 0), W = ui = O([x("DrawboardEffect"), D("design:paramtypes", [typeof (li = typeof Partial < "u" && Partial) == "function" ? li : Object, Array])], W);
5751
5787
  //#endregion
5752
5788
  //#region src/scene/effects/GaussianBlurEffect.ts
5753
- var ui, di, fi = "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}", pi = class extends H {
5789
+ var di, fi, pi = "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}", mi = class extends H {
5754
5790
  static {
5755
- di = this;
5791
+ fi = this;
5756
5792
  }
5757
5793
  static materialX = new F({ gl: {
5758
5794
  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}",
5759
- fragment: fi
5795
+ fragment: pi
5760
5796
  } });
5761
5797
  static materialY = new F({ gl: {
5762
5798
  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}",
5763
- fragment: fi
5799
+ fragment: pi
5764
5800
  } });
5765
5801
  constructor(e, t = []) {
5766
5802
  super(), this.setProperties(e).append(t);
@@ -5768,31 +5804,31 @@ var ui, di, fi = "varying vec2 vUv[9];\nuniform sampler2D sampler;\n\nvoid main(
5768
5804
  apply(e, t) {
5769
5805
  let n = 1 / t.width, r = 1 / t.height, i = Math.max(this.quality, 1);
5770
5806
  for (let r = 0; r < i; r++) t.redraw(e, () => {
5771
- I.draw(e, di.materialX, {
5807
+ I.draw(e, fi.materialX, {
5772
5808
  sampler: 0,
5773
5809
  uStrength: n * (this.strength / i)
5774
5810
  });
5775
5811
  });
5776
5812
  for (let n = 0; n < i; n++) t.redraw(e, () => {
5777
- I.draw(e, di.materialY, {
5813
+ I.draw(e, fi.materialY, {
5778
5814
  sampler: 0,
5779
5815
  uStrength: r * (this.strength / i)
5780
5816
  });
5781
5817
  });
5782
5818
  }
5783
5819
  };
5784
- O([_({ fallback: 4 }), D("design:type", Number)], pi.prototype, "strength", void 0), O([_({ fallback: 3 }), D("design:type", Number)], pi.prototype, "quality", void 0), pi = di = O([x("GaussianBlurEffect"), D("design:paramtypes", [typeof (ui = typeof Partial < "u" && Partial) == "function" ? ui : Object, Array])], pi);
5820
+ O([_({ fallback: 4 }), D("design:type", Number)], mi.prototype, "strength", void 0), O([_({ fallback: 3 }), D("design:type", Number)], mi.prototype, "quality", void 0), mi = fi = O([x("GaussianBlurEffect"), D("design:paramtypes", [typeof (di = typeof Partial < "u" && Partial) == "function" ? di : Object, Array])], mi);
5785
5821
  //#endregion
5786
5822
  //#region src/scene/effects/DropShadowEffect.ts
5787
- var mi, hi, gi = class extends H {
5823
+ var hi, gi, _i = class extends H {
5788
5824
  static {
5789
- hi = this;
5825
+ gi = this;
5790
5826
  }
5791
5827
  static material = new F({ gl: {
5792
5828
  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}",
5793
5829
  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}"
5794
5830
  } });
5795
- blurEffect = new pi();
5831
+ blurEffect = new mi();
5796
5832
  viewport3 = new V();
5797
5833
  _color = new T();
5798
5834
  constructor(e, t = []) {
@@ -5800,7 +5836,7 @@ var mi, hi, gi = class extends H {
5800
5836
  }
5801
5837
  apply(e, t) {
5802
5838
  this.viewport3.activateWithCopy(e, t), this.viewport3.redraw(e, () => {
5803
- this._color.value = this.color, I.draw(e, hi.material, {
5839
+ this._color.value = this.color, I.draw(e, gi.material, {
5804
5840
  sampler: 0,
5805
5841
  uAlpha: this._color.a,
5806
5842
  uColor: this._color.toArray().slice(0, 3),
@@ -5817,12 +5853,12 @@ var mi, hi, gi = class extends H {
5817
5853
  });
5818
5854
  }
5819
5855
  };
5820
- O([_({ fallback: "#000000FF" }), D("design:type", Object)], gi.prototype, "color", void 0), O([_({ fallback: 4 }), D("design:type", Number)], gi.prototype, "blur", void 0), O([_({ fallback: 4 }), D("design:type", Number)], gi.prototype, "offsetX", void 0), O([_({ fallback: 4 }), D("design:type", Number)], gi.prototype, "offsetY", void 0), O([_({ fallback: !1 }), D("design:type", Boolean)], gi.prototype, "shadowOnly", void 0), gi = hi = O([x("DropShadowEffect"), D("design:paramtypes", [typeof (mi = typeof Partial < "u" && Partial) == "function" ? mi : Object, Array])], gi);
5856
+ O([_({ fallback: "#000000FF" }), D("design:type", Object)], _i.prototype, "color", void 0), O([_({ fallback: 4 }), D("design:type", Number)], _i.prototype, "blur", void 0), O([_({ fallback: 4 }), D("design:type", Number)], _i.prototype, "offsetX", void 0), O([_({ fallback: 4 }), D("design:type", Number)], _i.prototype, "offsetY", void 0), O([_({ fallback: !1 }), D("design:type", Boolean)], _i.prototype, "shadowOnly", void 0), _i = gi = O([x("DropShadowEffect"), D("design:paramtypes", [typeof (hi = typeof Partial < "u" && Partial) == "function" ? hi : Object, Array])], _i);
5821
5857
  //#endregion
5822
5858
  //#region src/scene/effects/EmbossEffect.ts
5823
- var _i, vi, yi = class extends H {
5859
+ var vi, yi, bi = class extends H {
5824
5860
  static {
5825
- vi = this;
5861
+ yi = this;
5826
5862
  }
5827
5863
  static material = new F({ gl: {
5828
5864
  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}",
@@ -5833,7 +5869,7 @@ var _i, vi, yi = class extends H {
5833
5869
  }
5834
5870
  apply(e, t) {
5835
5871
  t.redraw(e, () => {
5836
- I.draw(e, vi.material, {
5872
+ I.draw(e, yi.material, {
5837
5873
  sampler: 0,
5838
5874
  strength: this.strength,
5839
5875
  inputSize: [
@@ -5846,12 +5882,12 @@ var _i, vi, yi = class extends H {
5846
5882
  });
5847
5883
  }
5848
5884
  };
5849
- O([_({ fallback: 5 }), D("design:type", Number)], yi.prototype, "strength", void 0), yi = vi = O([x("EmbossEffect"), D("design:paramtypes", [typeof (_i = typeof Partial < "u" && Partial) == "function" ? _i : Object, Array])], yi);
5885
+ O([_({ fallback: 5 }), D("design:type", Number)], bi.prototype, "strength", void 0), bi = yi = O([x("EmbossEffect"), D("design:paramtypes", [typeof (vi = typeof Partial < "u" && Partial) == "function" ? vi : Object, Array])], bi);
5850
5886
  //#endregion
5851
5887
  //#region src/scene/effects/GlitchEffect.ts
5852
- var bi, xi, G = class extends H {
5888
+ var xi, Si, G = class extends H {
5853
5889
  static {
5854
- xi = this;
5890
+ Si = this;
5855
5891
  }
5856
5892
  static material = new F({ gl: {
5857
5893
  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}",
@@ -5883,7 +5919,7 @@ var bi, xi, G = class extends H {
5883
5919
  this._needsRedraw || (this._needsRedraw = !0, this.redraw());
5884
5920
  let n = t.width, r = t.height, i = this.direction * (Math.PI / 180), a = Math.sin(i), o = Math.cos(i);
5885
5921
  t.redraw(e, () => {
5886
- this._texture.activate(e, 1), I.draw(e, xi.material, {
5922
+ this._texture.activate(e, 1), I.draw(e, Si.material, {
5887
5923
  sampler: 0,
5888
5924
  filterClamp: [
5889
5925
  0,
@@ -5912,12 +5948,12 @@ var bi, xi, G = class extends H {
5912
5948
  });
5913
5949
  }
5914
5950
  };
5915
- O([_({ fallback: 10 }), D("design:type", Number)], G.prototype, "slices", void 0), O([_({ fallback: 512 }), D("design:type", Number)], G.prototype, "sampleSize", void 0), O([_({ fallback: 100 }), D("design:type", Number)], G.prototype, "offset", void 0), O([_({ fallback: 0 }), D("design:type", Number)], G.prototype, "direction", void 0), O([_({ fallback: 2 }), D("design:type", Number)], G.prototype, "fillMode", void 0), O([_({ fallback: 0 }), D("design:type", Number)], G.prototype, "seed", void 0), O([_({ default: () => [2, 2] }), D("design:type", Array)], G.prototype, "red", void 0), O([_({ default: () => [-10, 4] }), D("design:type", Array)], G.prototype, "green", void 0), O([_({ default: () => [10, -4] }), D("design:type", Array)], G.prototype, "blue", void 0), G = xi = O([x("GlitchEffect"), D("design:paramtypes", [typeof (bi = typeof Partial < "u" && Partial) == "function" ? bi : Object, Array])], G);
5951
+ O([_({ fallback: 10 }), D("design:type", Number)], G.prototype, "slices", void 0), O([_({ fallback: 512 }), D("design:type", Number)], G.prototype, "sampleSize", void 0), O([_({ fallback: 100 }), D("design:type", Number)], G.prototype, "offset", void 0), O([_({ fallback: 0 }), D("design:type", Number)], G.prototype, "direction", void 0), O([_({ fallback: 2 }), D("design:type", Number)], G.prototype, "fillMode", void 0), O([_({ fallback: 0 }), D("design:type", Number)], G.prototype, "seed", void 0), O([_({ default: () => [2, 2] }), D("design:type", Array)], G.prototype, "red", void 0), O([_({ default: () => [-10, 4] }), D("design:type", Array)], G.prototype, "green", void 0), O([_({ default: () => [10, -4] }), D("design:type", Array)], G.prototype, "blue", void 0), G = Si = O([x("GlitchEffect"), D("design:paramtypes", [typeof (xi = typeof Partial < "u" && Partial) == "function" ? xi : Object, Array])], G);
5916
5952
  //#endregion
5917
5953
  //#region src/scene/effects/GodrayEffect.ts
5918
- var Si, Ci, wi = "vec3 mod289(vec3 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 mod289(vec4 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 permute(vec4 x) {\n return mod289(((x * 34.0) + 1.0) * x);\n}\nvec4 taylorInvSqrt(vec4 r) {\n return 1.79284291400159 - 0.85373472095314 * r;\n}\nvec3 fade(vec3 t) {\n return t * t * t * (t * (t * 6.0 - 15.0) + 10.0);\n}\n// Classic Perlin noise, periodic variant\nfloat pnoise(vec3 P, vec3 rep) {\n vec3 Pi0 = mod(floor(P), rep); // Integer part, modulo period\n vec3 Pi1 = mod(Pi0 + vec3(1.0), rep); // Integer part + 1, mod period\n Pi0 = mod289(Pi0);\n Pi1 = mod289(Pi1);\n vec3 Pf0 = fract(P); // Fractional part for interpolation\n vec3 Pf1 = Pf0 - vec3(1.0); // Fractional part - 1.0\n vec4 ix = vec4(Pi0.x, Pi1.x, Pi0.x, Pi1.x);\n vec4 iy = vec4(Pi0.yy, Pi1.yy);\n vec4 iz0 = Pi0.zzzz;\n vec4 iz1 = Pi1.zzzz;\n vec4 ixy = permute(permute(ix) + iy);\n vec4 ixy0 = permute(ixy + iz0);\n vec4 ixy1 = permute(ixy + iz1);\n vec4 gx0 = ixy0 * (1.0 / 7.0);\n vec4 gy0 = fract(floor(gx0) * (1.0 / 7.0)) - 0.5;\n gx0 = fract(gx0);\n vec4 gz0 = vec4(0.5) - abs(gx0) - abs(gy0);\n vec4 sz0 = step(gz0, vec4(0.0));\n gx0 -= sz0 * (step(0.0, gx0) - 0.5);\n gy0 -= sz0 * (step(0.0, gy0) - 0.5);\n vec4 gx1 = ixy1 * (1.0 / 7.0);\n vec4 gy1 = fract(floor(gx1) * (1.0 / 7.0)) - 0.5;\n gx1 = fract(gx1);\n vec4 gz1 = vec4(0.5) - abs(gx1) - abs(gy1);\n vec4 sz1 = step(gz1, vec4(0.0));\n gx1 -= sz1 * (step(0.0, gx1) - 0.5);\n gy1 -= sz1 * (step(0.0, gy1) - 0.5);\n vec3 g000 = vec3(gx0.x, gy0.x, gz0.x);\n vec3 g100 = vec3(gx0.y, gy0.y, gz0.y);\n vec3 g010 = vec3(gx0.z, gy0.z, gz0.z);\n vec3 g110 = vec3(gx0.w, gy0.w, gz0.w);\n vec3 g001 = vec3(gx1.x, gy1.x, gz1.x);\n vec3 g101 = vec3(gx1.y, gy1.y, gz1.y);\n vec3 g011 = vec3(gx1.z, gy1.z, gz1.z);\n vec3 g111 = vec3(gx1.w, gy1.w, gz1.w);\n vec4 norm0 = taylorInvSqrt(vec4(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110)));\n g000 *= norm0.x;\n g010 *= norm0.y;\n g100 *= norm0.z;\n g110 *= norm0.w;\n vec4 norm1 = taylorInvSqrt(vec4(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111)));\n g001 *= norm1.x;\n g011 *= norm1.y;\n g101 *= norm1.z;\n g111 *= norm1.w;\n float n000 = dot(g000, Pf0);\n float n100 = dot(g100, vec3(Pf1.x, Pf0.yz));\n float n010 = dot(g010, vec3(Pf0.x, Pf1.y, Pf0.z));\n float n110 = dot(g110, vec3(Pf1.xy, Pf0.z));\n float n001 = dot(g001, vec3(Pf0.xy, Pf1.z));\n float n101 = dot(g101, vec3(Pf1.x, Pf0.y, Pf1.z));\n float n011 = dot(g011, vec3(Pf0.x, Pf1.yz));\n float n111 = dot(g111, Pf1);\n vec3 fade_xyz = fade(Pf0);\n vec4 n_z = mix(vec4(n000, n100, n010, n110), vec4(n001, n101, n011, n111), fade_xyz.z);\n vec2 n_yz = mix(n_z.xy, n_z.zw, fade_xyz.y);\n float n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x);\n return 2.2 * n_xyz;\n}\nfloat turb(vec3 P, vec3 rep, float lacunarity, float gain) {\n float sum = 0.0;\n float sc = 1.0;\n float totalgain = 1.0;\n for (float i = 0.0; i < 6.0; i++) {\n sum += totalgain * pnoise(P * sc, rep);\n sc *= lacunarity;\n totalgain *= gain;\n }\n return abs(sum);\n}", K = class extends H {
5954
+ var Ci, wi, Ti = "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}", K = class extends H {
5919
5955
  static {
5920
- Ci = this;
5956
+ wi = this;
5921
5957
  }
5922
5958
  static material = new F({ gl: {
5923
5959
  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}",
@@ -5932,7 +5968,7 @@ uniform float uTime;
5932
5968
  uniform vec3 uRay;
5933
5969
  uniform vec4 uInputSize;
5934
5970
 
5935
- ${wi}
5971
+ ${Ti}
5936
5972
 
5937
5973
  void main(void) {
5938
5974
  bool uParallel = uParallel > 0.5;
@@ -5971,7 +6007,7 @@ void main(void) {
5971
6007
  apply(e, t) {
5972
6008
  let n = this.angle * (Math.PI / 180), r = this.parallel ? [Math.cos(n), Math.sin(n)] : this.center;
5973
6009
  t.redraw(e, () => {
5974
- I.draw(e, Ci.material, {
6010
+ I.draw(e, wi.material, {
5975
6011
  sampler: 0,
5976
6012
  uDimensions: [t.width, t.height],
5977
6013
  uParallel: +!!this.parallel,
@@ -5993,15 +6029,15 @@ void main(void) {
5993
6029
  });
5994
6030
  }
5995
6031
  };
5996
- O([_({ fallback: 0 }), D("design:type", Number)], K.prototype, "time", void 0), O([_({ fallback: 30 }), D("design:type", Number)], K.prototype, "angle", void 0), O([_({ fallback: .5 }), D("design:type", Number)], K.prototype, "gain", void 0), O([_({ fallback: 2.5 }), D("design:type", Number)], K.prototype, "lacunarity", void 0), O([_({ fallback: !0 }), D("design:type", Boolean)], K.prototype, "parallel", void 0), O([_({ default: () => [0, 0] }), D("design:type", Array)], K.prototype, "center", void 0), O([_({ fallback: 1 }), D("design:type", Number)], K.prototype, "alpha", void 0), K = Ci = O([x("GodrayEffect"), D("design:paramtypes", [typeof (Si = typeof Partial < "u" && Partial) == "function" ? Si : Object, Array])], K);
6032
+ O([_({ fallback: 0 }), D("design:type", Number)], K.prototype, "time", void 0), O([_({ fallback: 30 }), D("design:type", Number)], K.prototype, "angle", void 0), O([_({ fallback: .5 }), D("design:type", Number)], K.prototype, "gain", void 0), O([_({ fallback: 2.5 }), D("design:type", Number)], K.prototype, "lacunarity", void 0), O([_({ fallback: !0 }), D("design:type", Boolean)], K.prototype, "parallel", void 0), O([_({ default: () => [0, 0] }), D("design:type", Array)], K.prototype, "center", void 0), O([_({ fallback: 1 }), D("design:type", Number)], K.prototype, "alpha", void 0), K = wi = O([x("GodrayEffect"), D("design:paramtypes", [typeof (Ci = typeof Partial < "u" && Partial) == "function" ? Ci : Object, Array])], K);
5997
6033
  //#endregion
5998
6034
  //#region src/scene/effects/KawaseBlurEffect.ts
5999
- var Ti, Ei = "varying vec2 vUv;\nuniform sampler2D sampler;\nuniform vec2 uOffset;\n\nvoid main(void) {\n vec4 color = vec4(0.0);\n color += texture2D(sampler, vec2(vUv.x - uOffset.x, vUv.y + uOffset.y));\n color += texture2D(sampler, vec2(vUv.x + uOffset.x, vUv.y + uOffset.y));\n color += texture2D(sampler, vec2(vUv.x + uOffset.x, vUv.y - uOffset.y));\n color += texture2D(sampler, vec2(vUv.x - uOffset.x, vUv.y - uOffset.y));\n color *= 0.25;\n gl_FragColor = color;\n}", Di = "precision highp float;\nvarying vec2 vUv;\nuniform sampler2D sampler;\nuniform vec2 uOffset;\nuniform vec4 uInputClamp;\nvoid main(void) {\n vec4 color = vec4(0.0);\n color += texture2D(sampler, clamp(vec2(vUv.x - uOffset.x, vUv.y + uOffset.y), uInputClamp.xy, uInputClamp.zw));\n color += texture2D(sampler, clamp(vec2(vUv.x + uOffset.x, vUv.y + uOffset.y), uInputClamp.xy, uInputClamp.zw));\n color += texture2D(sampler, clamp(vec2(vUv.x + uOffset.x, vUv.y - uOffset.y), uInputClamp.xy, uInputClamp.zw));\n color += texture2D(sampler, clamp(vec2(vUv.x - uOffset.x, vUv.y - uOffset.y), uInputClamp.xy, uInputClamp.zw));\n color *= 0.25;\n gl_FragColor = color;\n}", Oi = class extends H {
6035
+ var Ei, Di = "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}", Oi = "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}", ki = class extends H {
6000
6036
  _kernels = [0];
6001
6037
  constructor(e, t = []) {
6002
6038
  super(), this.material = new F({ gl: {
6003
6039
  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}",
6004
- fragment: e?.clamp ? Di : Ei
6040
+ fragment: e?.clamp ? Oi : Di
6005
6041
  } }), this.setProperties(e).append(t), this._generateKernels();
6006
6042
  }
6007
6043
  _updateProperty(e, t, n) {
@@ -6039,12 +6075,12 @@ var Ti, Ei = "varying vec2 vUv;\nuniform sampler2D sampler;\nuniform vec2 uOffse
6039
6075
  });
6040
6076
  }
6041
6077
  };
6042
- O([_({ fallback: 4 }), D("design:type", Number)], Oi.prototype, "strength", void 0), O([_({ fallback: 3 }), D("design:type", Number)], Oi.prototype, "quality", void 0), O([_({ default: () => [1, 1] }), D("design:type", Array)], Oi.prototype, "pixelSize", void 0), Oi = O([x("KawaseBlurEffect"), D("design:paramtypes", [typeof (Ti = typeof Partial < "u" && Partial) == "function" ? Ti : Object, Array])], Oi);
6078
+ O([_({ fallback: 4 }), D("design:type", Number)], ki.prototype, "strength", void 0), O([_({ fallback: 3 }), D("design:type", Number)], ki.prototype, "quality", void 0), O([_({ default: () => [1, 1] }), D("design:type", Array)], ki.prototype, "pixelSize", void 0), ki = O([x("KawaseBlurEffect"), D("design:paramtypes", [typeof (Ei = typeof Partial < "u" && Partial) == "function" ? Ei : Object, Array])], ki);
6043
6079
  //#endregion
6044
6080
  //#region src/scene/effects/MaskEffect.ts
6045
- var ki, Ai, ji = class extends H {
6081
+ var Ai, ji, Mi = class extends H {
6046
6082
  static {
6047
- Ai = this;
6083
+ ji = this;
6048
6084
  }
6049
6085
  static material = new F({ gl: {
6050
6086
  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}",
@@ -6066,7 +6102,7 @@ var ki, Ai, ji = class extends H {
6066
6102
  }
6067
6103
  apply(e, t, n) {
6068
6104
  this.texture && t.redraw(e, () => {
6069
- this.texture.activate(e, 1), I.draw(e, Ai.material, {
6105
+ this.texture.activate(e, 1), I.draw(e, ji.material, {
6070
6106
  sampler: 0,
6071
6107
  mask: 1,
6072
6108
  rotation: n.target?.globalRotation ?? 0
@@ -6074,23 +6110,23 @@ var ki, Ai, ji = class extends H {
6074
6110
  });
6075
6111
  }
6076
6112
  };
6077
- O([_({ fallback: "" }), D("design:type", String)], ji.prototype, "image", void 0), ji = Ai = O([x("MaskEffect"), D("design:paramtypes", [typeof (ki = typeof Partial < "u" && Partial) == "function" ? ki : Object, Array])], ji);
6113
+ O([_({ fallback: "" }), D("design:type", String)], Mi.prototype, "image", void 0), Mi = ji = O([x("MaskEffect"), D("design:paramtypes", [typeof (Ai = typeof Partial < "u" && Partial) == "function" ? Ai : Object, Array])], Mi);
6078
6114
  //#endregion
6079
6115
  //#region src/scene/effects/OutlineEffect.ts
6080
- var Mi, Ni, Pi = "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}", q = class extends H {
6116
+ var Ni, Pi, Fi = "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}", q = class extends H {
6081
6117
  static {
6082
- Ni = this;
6118
+ Pi = this;
6083
6119
  }
6084
6120
  static MIN_SAMPLES = 1;
6085
6121
  static MAX_SAMPLES = 100;
6086
6122
  static getAngleStep(e) {
6087
- return Number.parseFloat((Math.PI * 2 / Math.max(e * Ni.MAX_SAMPLES, Ni.MIN_SAMPLES)).toFixed(7));
6123
+ return Number.parseFloat((Math.PI * 2 / Math.max(e * Pi.MAX_SAMPLES, Pi.MIN_SAMPLES)).toFixed(7));
6088
6124
  }
6089
6125
  _color = new T();
6090
6126
  constructor(e, t = []) {
6091
6127
  super(), this.setProperties(e).append(t), this.material = new F({ gl: {
6092
6128
  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}",
6093
- fragment: Pi.replace(/\{ANGLE_STEP\}/, Ni.getAngleStep(this.quality).toFixed(7))
6129
+ fragment: Fi.replace(/\{ANGLE_STEP\}/, Pi.getAngleStep(this.quality).toFixed(7))
6094
6130
  } });
6095
6131
  }
6096
6132
  apply(e, t) {
@@ -6100,7 +6136,7 @@ var Mi, Ni, Pi = "precision highp float;\nvarying vec2 vUv;\nuniform sampler2D s
6100
6136
  uThickness: [this.width / t.width, this.width / t.height],
6101
6137
  uColor: this._color.toArray().slice(0, 3),
6102
6138
  uAlpha: this.opacity === 1 ? this._color.a : this.opacity,
6103
- uAngleStep: Ni.getAngleStep(this.quality),
6139
+ uAngleStep: Pi.getAngleStep(this.quality),
6104
6140
  uKnockout: +!!this.knockout,
6105
6141
  uInputClamp: [
6106
6142
  0,
@@ -6112,12 +6148,12 @@ var Mi, Ni, Pi = "precision highp float;\nvarying vec2 vUv;\nuniform sampler2D s
6112
6148
  });
6113
6149
  }
6114
6150
  };
6115
- O([_({ fallback: "#000000ff" }), D("design:type", Object)], q.prototype, "color", void 0), O([_({ fallback: 1 }), D("design:type", Number)], q.prototype, "width", void 0), O([_({ fallback: "solid" }), D("design:type", String)], q.prototype, "style", void 0), O([_(), D("design:type", Object)], q.prototype, "image", void 0), O([_({ fallback: 1 }), D("design:type", Number)], q.prototype, "opacity", void 0), O([_({ fallback: .1 }), D("design:type", Number)], q.prototype, "quality", void 0), O([_({ fallback: !1 }), D("design:type", Boolean)], q.prototype, "knockout", void 0), q = Ni = O([x("OutlineEffect"), D("design:paramtypes", [typeof (Mi = typeof Partial < "u" && Partial) == "function" ? Mi : Object, Array])], q);
6151
+ O([_({ fallback: "#000000ff" }), D("design:type", Object)], q.prototype, "color", void 0), O([_({ fallback: 1 }), D("design:type", Number)], q.prototype, "width", void 0), O([_({ fallback: "solid" }), D("design:type", String)], q.prototype, "style", void 0), O([_(), D("design:type", Object)], q.prototype, "image", void 0), O([_({ fallback: 1 }), D("design:type", Number)], q.prototype, "opacity", void 0), O([_({ fallback: .1 }), D("design:type", Number)], q.prototype, "quality", void 0), O([_({ fallback: !1 }), D("design:type", Boolean)], q.prototype, "knockout", void 0), q = Pi = O([x("OutlineEffect"), D("design:paramtypes", [typeof (Ni = typeof Partial < "u" && Partial) == "function" ? Ni : Object, Array])], q);
6116
6152
  //#endregion
6117
6153
  //#region src/scene/effects/PixelateEffect.ts
6118
- var Fi, Ii, Li = class extends H {
6154
+ var Ii, Li, Ri = class extends H {
6119
6155
  static {
6120
- Ii = this;
6156
+ Li = this;
6121
6157
  }
6122
6158
  static material = new F({ gl: {
6123
6159
  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}",
@@ -6133,16 +6169,16 @@ var Fi, Ii, Li = class extends H {
6133
6169
  offset: [(r[0] + i[0]) / t.width, 1 - (r[1] + i[1]) / t.height],
6134
6170
  step: [this.strength * r[0] / t.width, this.strength * r[1] / t.height]
6135
6171
  };
6136
- I.draw(e, Ii.material, a);
6172
+ I.draw(e, Li.material, a);
6137
6173
  });
6138
6174
  }
6139
6175
  };
6140
- O([_({ fallback: 10 }), D("design:type", Number)], Li.prototype, "strength", void 0), Li = Ii = O([x("PixelateEffect"), D("design:paramtypes", [typeof (Fi = typeof Partial < "u" && Partial) == "function" ? Fi : Object, Array])], Li);
6176
+ O([_({ fallback: 10 }), D("design:type", Number)], Ri.prototype, "strength", void 0), Ri = Li = O([x("PixelateEffect"), D("design:paramtypes", [typeof (Ii = typeof Partial < "u" && Partial) == "function" ? Ii : Object, Array])], Ri);
6141
6177
  //#endregion
6142
6178
  //#region src/scene/effects/ZoomBlurEffect.ts
6143
- var Ri, zi, Bi = class extends H {
6179
+ var zi, Bi, Vi = class extends H {
6144
6180
  static {
6145
- zi = this;
6181
+ Bi = this;
6146
6182
  }
6147
6183
  static material = new F({ gl: {
6148
6184
  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}",
@@ -6153,7 +6189,7 @@ var Ri, zi, Bi = class extends H {
6153
6189
  }
6154
6190
  apply(e, t) {
6155
6191
  t.redraw(e, () => {
6156
- I.draw(e, zi.material, {
6192
+ I.draw(e, Bi.material, {
6157
6193
  sampler: 0,
6158
6194
  uCenter: [t.width / 2, t.height / 2],
6159
6195
  uInnerRadius: this.innerRadius,
@@ -6169,10 +6205,10 @@ var Ri, zi, Bi = class extends H {
6169
6205
  });
6170
6206
  }
6171
6207
  };
6172
- O([_(), D("design:type", Array)], Bi.prototype, "center", void 0), O([_({ fallback: 20 }), D("design:type", Number)], Bi.prototype, "innerRadius", void 0), O([_({ fallback: -1 }), D("design:type", Number)], Bi.prototype, "radius", void 0), O([_({ fallback: .1 }), D("design:type", Number)], Bi.prototype, "strength", void 0), Bi = zi = O([x("ZoomBlurEffect"), D("design:paramtypes", [typeof (Ri = typeof Partial < "u" && Partial) == "function" ? Ri : Object, Array])], Bi);
6208
+ O([_(), D("design:type", Array)], Vi.prototype, "center", void 0), O([_({ fallback: 20 }), D("design:type", Number)], Vi.prototype, "innerRadius", void 0), O([_({ fallback: -1 }), D("design:type", Number)], Vi.prototype, "radius", void 0), O([_({ fallback: .1 }), D("design:type", Number)], Vi.prototype, "strength", void 0), Vi = Bi = O([x("ZoomBlurEffect"), D("design:paramtypes", [typeof (zi = typeof Partial < "u" && Partial) == "function" ? zi : Object, Array])], Vi);
6173
6209
  //#endregion
6174
6210
  //#region src/scene/2d/element/utils.ts
6175
- function Vi(e, t) {
6211
+ function Hi(e, t) {
6176
6212
  let { x: n, y: r, width: i, height: a } = t, o = !1, s = new v().translate(-n, -r).scale(1 / i, 1 / a);
6177
6213
  if (e.cropRect) {
6178
6214
  let { left: t = 0, top: n = 0, right: r = 0, bottom: i = 0 } = e.cropRect;
@@ -6253,7 +6289,7 @@ var J = class extends C {
6253
6289
  let i = this.animatedTexture?.currentFrame.texture ?? this.texture;
6254
6290
  r = {
6255
6291
  ...r,
6256
- ...Vi(this, this.tile && i ? {
6292
+ ...Hi(this, this.tile && i ? {
6257
6293
  x: 0,
6258
6294
  y: 0,
6259
6295
  width: i.sourceWidth,
@@ -6292,7 +6328,7 @@ var J = class extends C {
6292
6328
  O([_({ fallback: !0 }), D("design:type", Boolean)], J.prototype, "enabled", void 0), O([_(), D("design:type", Object)], J.prototype, "color", void 0), O([_(), D("design:type", Object)], J.prototype, "image", void 0), O([_(), D("design:type", Object)], J.prototype, "linearGradient", void 0), O([_(), D("design:type", Object)], J.prototype, "radialGradient", void 0), O([_(), D("design:type", Object)], J.prototype, "cropRect", void 0), O([_(), D("design:type", Object)], J.prototype, "stretchRect", void 0), O([_(), D("design:type", Object)], J.prototype, "dpi", void 0), O([_(), D("design:type", Object)], J.prototype, "rotateWithShape", void 0), O([_(), D("design:type", Object)], J.prototype, "tile", void 0), O([_(), D("design:type", Object)], J.prototype, "opacity", void 0);
6293
6329
  //#endregion
6294
6330
  //#region src/scene/2d/element/Element2DBackground.ts
6295
- var Hi = class extends J {
6331
+ var Ui = class extends J {
6296
6332
  setProperties(e) {
6297
6333
  return super._setProperties(d(e) ? void 0 : f(e));
6298
6334
  }
@@ -6304,14 +6340,14 @@ var Hi = class extends J {
6304
6340
  }
6305
6341
  }
6306
6342
  };
6307
- O([_(), D("design:type", Object)], Hi.prototype, "fillWithShape", void 0);
6343
+ O([_(), D("design:type", Object)], Ui.prototype, "fillWithShape", void 0);
6308
6344
  //#endregion
6309
6345
  //#region src/scene/2d/element/Element2DChart.ts
6310
- var Ui;
6311
- function Wi() {
6312
- return Ui ||= import("echarts").then((e) => e?.init ? e : e?.default).catch(() => void 0), Ui;
6346
+ var Wi;
6347
+ function Gi() {
6348
+ return Wi ||= import("echarts").then((e) => e?.init ? e : e?.default).catch(() => void 0), Wi;
6313
6349
  }
6314
- function Gi(e) {
6350
+ function Ki(e) {
6315
6351
  if (!e) return { show: !1 };
6316
6352
  switch (e) {
6317
6353
  case "bottom": return {
@@ -6339,7 +6375,6 @@ var Y = class extends C {
6339
6375
  _instance;
6340
6376
  _container;
6341
6377
  _texture;
6342
- _node;
6343
6378
  _dirty = !1;
6344
6379
  _scheduled = !1;
6345
6380
  constructor(e) {
@@ -6378,7 +6413,7 @@ var Y = class extends C {
6378
6413
  this._teardown(), this._parent.requestDraw();
6379
6414
  return;
6380
6415
  }
6381
- let n = await Wi();
6416
+ let n = await Gi();
6382
6417
  if (!n) {
6383
6418
  console.warn("[modern-canvas] chart rendering requires the optional \"echarts\" dependency (e.g. `pnpm add echarts`)");
6384
6419
  return;
@@ -6401,33 +6436,33 @@ var Y = class extends C {
6401
6436
  width: e,
6402
6437
  height: t
6403
6438
  }), this._instance.setOption(this._toOption(), !0), !this._texture) {
6404
- let n = this._container.querySelector("canvas");
6405
- if (!n) return;
6439
+ let e = this._container.querySelector("canvas");
6440
+ if (!e) return;
6406
6441
  this._texture = new rr({
6407
- source: n,
6442
+ source: e,
6408
6443
  pixelRatio: 1
6409
6444
  });
6410
- let r = z.parse({
6411
- is: "TextureRect2D",
6412
- style: {
6413
- left: 0,
6414
- top: 0,
6415
- width: e,
6416
- height: t
6417
- }
6418
- }, "Element2D");
6419
- r.texture = this._texture, this._node = r, this._parent.appendChild(r, "back");
6420
6445
  }
6421
- this._node?.size.set(e, t), this._texture?.requestUpdate("source"), this._parent.requestDraw();
6446
+ this._texture.requestUpdate("source"), this._parent.requestDraw();
6422
6447
  }
6423
6448
  }
6449
+ draw() {
6450
+ let e = this._texture;
6451
+ if (!e?.isValid()) return;
6452
+ let { width: t, height: n } = this._parent.size, r = this._parent.context;
6453
+ this._parent.shape.draw(!0), r.fillStyle = e;
6454
+ let { a: i, c: a, tx: o, b: s, d: c, ty: l } = new v().scale(1 / t, 1 / n), u, d;
6455
+ r.fill({ transformUv: (e, t) => {
6456
+ u = e[t], d = e[t + 1], e[t] = i * u + a * d + o, e[t + 1] = s * u + c * d + l;
6457
+ } });
6458
+ }
6424
6459
  _toOption() {
6425
6460
  let { type: e, categories: t } = this, n = e === "pie" || e === "doughnut", r = e === "bar", i = this.grouping === "stacked" || this.grouping === "percentStacked", a = {
6426
6461
  title: this.title ? {
6427
6462
  text: this.title,
6428
6463
  left: "center"
6429
6464
  } : void 0,
6430
- legend: Gi(this.legend),
6465
+ legend: Ki(this.legend),
6431
6466
  tooltip: {}
6432
6467
  };
6433
6468
  if (n) {
@@ -6465,7 +6500,7 @@ var Y = class extends C {
6465
6500
  })), a;
6466
6501
  }
6467
6502
  _teardown() {
6468
- this._instance?.dispose(), this._instance = void 0, this._container = void 0, this._texture = void 0, this._node &&= (this._parent.removeChild(this._node), this._node.destroy(), void 0);
6503
+ this._instance?.dispose(), this._instance = void 0, this._container = void 0, this._texture = void 0;
6469
6504
  }
6470
6505
  _destroy() {
6471
6506
  this._teardown();
@@ -6474,7 +6509,7 @@ var Y = class extends C {
6474
6509
  O([_({ fallback: !0 }), D("design:type", Boolean)], Y.prototype, "enabled", void 0), O([_({ fallback: "column" }), D("design:type", Object)], Y.prototype, "type", void 0), O([_(), D("design:type", Object)], Y.prototype, "grouping", void 0), O([_({ fallback: () => [] }), D("design:type", Object)], Y.prototype, "categories", void 0), O([_({ fallback: () => [] }), D("design:type", Object)], Y.prototype, "series", void 0), O([_(), D("design:type", Object)], Y.prototype, "title", void 0), O([_(), D("design:type", Object)], Y.prototype, "legend", void 0), O([_(), D("design:type", Object)], Y.prototype, "categoryAxis", void 0), O([_(), D("design:type", Object)], Y.prototype, "valueAxis", void 0);
6475
6510
  //#endregion
6476
6511
  //#region src/scene/2d/element/Element2DConnection.ts
6477
- var Ki = class extends C {
6512
+ var qi = class extends C {
6478
6513
  _parent;
6479
6514
  _routeSig;
6480
6515
  _routePath;
@@ -6512,7 +6547,7 @@ var Ki = class extends C {
6512
6547
  y: Math.sin(n.ang)
6513
6548
  }, {
6514
6549
  point: e,
6515
- dir: qi(r, t.globalRotation)
6550
+ dir: Ji(r, t.globalRotation)
6516
6551
  };
6517
6552
  }
6518
6553
  }
@@ -6529,8 +6564,8 @@ var Ki = class extends C {
6529
6564
  return (r !== this._routeSig || !this._routePath) && (this._routeSig = r, this._routePath = Rr(this.mode, e ?? t, t ?? e)), this._routePath;
6530
6565
  }
6531
6566
  };
6532
- O([_(), D("design:type", Object)], Ki.prototype, "start", void 0), O([_(), D("design:type", Object)], Ki.prototype, "end", void 0), O([_({ fallback: "straight" }), D("design:type", Object)], Ki.prototype, "mode", void 0);
6533
- function qi(e, t) {
6567
+ O([_(), D("design:type", Object)], qi.prototype, "start", void 0), O([_(), D("design:type", Object)], qi.prototype, "end", void 0), O([_({ fallback: "straight" }), D("design:type", Object)], qi.prototype, "mode", void 0);
6568
+ function Ji(e, t) {
6534
6569
  if (!t) return e;
6535
6570
  let n = Math.cos(t), r = Math.sin(t);
6536
6571
  return {
@@ -6540,7 +6575,7 @@ function qi(e, t) {
6540
6575
  }
6541
6576
  //#endregion
6542
6577
  //#region src/scene/2d/element/Element2DForeground.ts
6543
- var Ji = class extends J {
6578
+ var Yi = class extends J {
6544
6579
  setProperties(e) {
6545
6580
  return super._setProperties(d(e) ? void 0 : g(e));
6546
6581
  }
@@ -6552,10 +6587,10 @@ var Ji = class extends J {
6552
6587
  }
6553
6588
  }
6554
6589
  };
6555
- O([_(), D("design:type", Object)], Ji.prototype, "fillWithShape", void 0);
6590
+ O([_(), D("design:type", Object)], Yi.prototype, "fillWithShape", void 0);
6556
6591
  //#endregion
6557
6592
  //#region src/scene/2d/element/Element2DOutline.ts
6558
- var Yi = class extends J {
6593
+ var Xi = class extends J {
6559
6594
  setProperties(e) {
6560
6595
  return super._setProperties(d(e) ? void 0 : ee(e));
6561
6596
  }
@@ -6575,7 +6610,7 @@ var Yi = class extends J {
6575
6610
  }
6576
6611
  draw() {
6577
6612
  let { width: e, height: t } = this._parent.size, n = this._parent.context;
6578
- this.image === "viewport" ? n.strokeStyle = new lr() : n.strokeStyle = this.texture ?? this.color ?? "#000000FF", n.lineWidth = this.width || 1, n.lineCap = this.lineCap, n.lineJoin = this.lineJoin, n.stroke({ ...Vi(this, {
6613
+ this.image === "viewport" ? n.strokeStyle = new lr() : n.strokeStyle = this.texture ?? this.color ?? "#000000FF", n.lineWidth = this.width || 1, n.lineCap = this.lineCap, n.lineJoin = this.lineJoin, n.stroke({ ...Hi(this, {
6579
6614
  x: 0,
6580
6615
  y: 0,
6581
6616
  width: e,
@@ -6583,10 +6618,10 @@ var Yi = class extends J {
6583
6618
  }) });
6584
6619
  }
6585
6620
  };
6586
- O([_(), D("design:type", Object)], Yi.prototype, "color", void 0), O([_(), D("design:type", Object)], Yi.prototype, "width", void 0), O([_({ fallback: "solid" }), D("design:type", Object)], Yi.prototype, "style", void 0), O([_({ fallback: "butt" }), D("design:type", Object)], Yi.prototype, "lineCap", void 0), O([_({ fallback: "miter" }), D("design:type", Object)], Yi.prototype, "lineJoin", void 0);
6621
+ O([_(), D("design:type", Object)], Xi.prototype, "color", void 0), O([_(), D("design:type", Object)], Xi.prototype, "width", void 0), O([_({ fallback: "solid" }), D("design:type", Object)], Xi.prototype, "style", void 0), O([_({ fallback: "butt" }), D("design:type", Object)], Xi.prototype, "lineCap", void 0), O([_({ fallback: "miter" }), D("design:type", Object)], Xi.prototype, "lineJoin", void 0);
6587
6622
  //#endregion
6588
6623
  //#region src/scene/2d/element/Element2DShadow.ts
6589
- var Xi = class extends C {
6624
+ var Zi = class extends C {
6590
6625
  _parent;
6591
6626
  constructor(e) {
6592
6627
  super(), this._parent = e;
@@ -6607,13 +6642,13 @@ var Xi = class extends C {
6607
6642
  }
6608
6643
  updateEffect() {
6609
6644
  let e = "__$shadow", t = this._parent.getNode(e);
6610
- this.enabled && (this.blur || this.offsetX || this.offsetY) ? (t || (t = new gi({ name: e }), this._parent.appendChild(t, "back")), t.setProperties(this.getProperties())) : t && this._parent.removeChild(t);
6645
+ this.enabled && (this.blur || this.offsetX || this.offsetY) ? (t || (t = new _i({ name: e }), this._parent.appendChild(t, "back")), t.setProperties(this.getProperties())) : t && this._parent.removeChild(t);
6611
6646
  }
6612
6647
  };
6613
- O([_({ fallback: !0 }), D("design:type", Boolean)], Xi.prototype, "enabled", void 0), O([_({ fallback: "#000000FF" }), D("design:type", Object)], Xi.prototype, "color", void 0), O([_({ fallback: 0 }), D("design:type", Object)], Xi.prototype, "blur", void 0), O([_({ fallback: 0 }), D("design:type", Object)], Xi.prototype, "offsetY", void 0), O([_({ fallback: 0 }), D("design:type", Object)], Xi.prototype, "offsetX", void 0);
6648
+ O([_({ fallback: !0 }), D("design:type", Boolean)], Zi.prototype, "enabled", void 0), O([_({ fallback: "#000000FF" }), D("design:type", Object)], Zi.prototype, "color", void 0), O([_({ fallback: 0 }), D("design:type", Object)], Zi.prototype, "blur", void 0), O([_({ fallback: 0 }), D("design:type", Object)], Zi.prototype, "offsetY", void 0), O([_({ fallback: 0 }), D("design:type", Object)], Zi.prototype, "offsetX", void 0);
6614
6649
  //#endregion
6615
6650
  //#region src/scene/2d/element/Element2DShape.ts
6616
- var Zi = class extends C {
6651
+ var Qi = class extends C {
6617
6652
  _parent;
6618
6653
  _path2DSet = new le();
6619
6654
  _localPath;
@@ -6711,24 +6746,24 @@ var Zi = class extends C {
6711
6746
  t && n && (r ? e.roundRect(0, 0, t, n, r) : e.rect(0, 0, t, n));
6712
6747
  }
6713
6748
  };
6714
- O([_({ fallback: !0 }), D("design:type", Boolean)], Zi.prototype, "enabled", void 0), O([_(), D("design:type", Object)], Zi.prototype, "preset", void 0), O([_(), D("design:type", Object)], Zi.prototype, "svg", void 0), O([_(), D("design:type", Object)], Zi.prototype, "viewBox", void 0), O([_(), D("design:type", Object)], Zi.prototype, "paths", void 0), O([_(), D("design:type", Object)], Zi.prototype, "connectionPoints", void 0);
6749
+ O([_({ fallback: !0 }), D("design:type", Boolean)], Qi.prototype, "enabled", void 0), O([_(), D("design:type", Object)], Qi.prototype, "preset", void 0), O([_(), D("design:type", Object)], Qi.prototype, "svg", void 0), O([_(), D("design:type", Object)], Qi.prototype, "viewBox", void 0), O([_(), D("design:type", Object)], Qi.prototype, "paths", void 0), O([_(), D("design:type", Object)], Qi.prototype, "connectionPoints", void 0);
6715
6750
  //#endregion
6716
6751
  //#region src/scene/2d/element/Element2DStyle.ts
6717
- var Qi = class extends w {
6752
+ var $i = class extends w {
6718
6753
  constructor(e) {
6719
6754
  super(), this.setProperties(e);
6720
6755
  }
6721
- }, $i = {
6756
+ }, ea = {
6722
6757
  ...o(),
6723
6758
  left: 0,
6724
6759
  top: 0,
6725
6760
  width: 0,
6726
6761
  height: 0
6727
6762
  };
6728
- for (let e in $i) i(Qi, e, { fallback: $i[e] });
6763
+ for (let e in ea) i($i, e, { fallback: ea[e] });
6729
6764
  //#endregion
6730
6765
  //#region src/scene/2d/element/Element2DTable.ts
6731
- var ea = 100, ta = 40, na = class extends C {
6766
+ var ta = 100, na = 40, ra = class extends C {
6732
6767
  _parent;
6733
6768
  _cellNodes = /* @__PURE__ */ new Map();
6734
6769
  _cellSnapshots = /* @__PURE__ */ new Map();
@@ -6759,10 +6794,10 @@ var ea = 100, ta = 40, na = class extends C {
6759
6794
  return !!(this.enabled && this.cells.length);
6760
6795
  }
6761
6796
  get gridWidth() {
6762
- return this.columns.reduce((e, t) => e + (t.width || ea), 0);
6797
+ return this.columns.reduce((e, t) => e + (t.width || ta), 0);
6763
6798
  }
6764
6799
  get gridHeight() {
6765
- return this.rows.reduce((e, t) => e + (t.height || ta), 0);
6800
+ return this.rows.reduce((e, t) => e + (t.height || na), 0);
6766
6801
  }
6767
6802
  update() {
6768
6803
  if (this._dirty = !1, !this.isValid()) {
@@ -6772,9 +6807,9 @@ var ea = 100, ta = 40, na = class extends C {
6772
6807
  let { columns: e, rows: t, cells: n } = this, r = e.length, i = t.length;
6773
6808
  for (let e of n) r = Math.max(r, e.col + (e.colSpan || 1)), i = Math.max(i, e.row + (e.rowSpan || 1));
6774
6809
  let a = [0];
6775
- for (let t = 0; t < r; t++) a.push(a[t] + (e[t]?.width || ea));
6810
+ for (let t = 0; t < r; t++) a.push(a[t] + (e[t]?.width || ta));
6776
6811
  let o = [0];
6777
- for (let e = 0; e < i; e++) o.push(o[e] + (t[e]?.height || ta));
6812
+ for (let e = 0; e < i; e++) o.push(o[e] + (t[e]?.height || na));
6778
6813
  this._parent.size.set(a[e.length] ?? 0, o[t.length] ?? 0);
6779
6814
  let s = /* @__PURE__ */ new Set();
6780
6815
  for (let e of n) {
@@ -6811,10 +6846,10 @@ var ea = 100, ta = 40, na = class extends C {
6811
6846
  this._clearCells();
6812
6847
  }
6813
6848
  };
6814
- O([_({ fallback: !0 }), D("design:type", Boolean)], na.prototype, "enabled", void 0), O([_({ fallback: () => [] }), D("design:type", Object)], na.prototype, "columns", void 0), O([_({ fallback: () => [] }), D("design:type", Object)], na.prototype, "rows", void 0), O([_({ fallback: () => [] }), D("design:type", Object)], na.prototype, "cells", void 0);
6849
+ O([_({ fallback: !0 }), D("design:type", Boolean)], ra.prototype, "enabled", void 0), O([_({ fallback: () => [] }), D("design:type", Object)], ra.prototype, "columns", void 0), O([_({ fallback: () => [] }), D("design:type", Object)], ra.prototype, "rows", void 0), O([_({ fallback: () => [] }), D("design:type", Object)], ra.prototype, "cells", void 0);
6815
6850
  //#endregion
6816
6851
  //#region src/scene/2d/element/Element2DText.ts
6817
- var ra, X = class extends C {
6852
+ var ia, X = class extends C {
6818
6853
  _parent;
6819
6854
  base;
6820
6855
  get textContent() {
@@ -6925,7 +6960,7 @@ var ra, X = class extends C {
6925
6960
  if (n.style.fill && !d(n.style.fill)) if (typeof n.style.fill == "object") {
6926
6961
  let r = n.style.fill, o = this._textureMap.get(`${a}.${i}.fill`) ?? this._textureMap.get(`${a}.fill`) ?? this._textureMap.get("fill");
6927
6962
  r.enabled !== !1 && (o || r.color) && (e.addPath(n), e.style = { ...n.style }, e.fillStyle = o?.texture ?? r.color, e.fill({
6928
- ...Vi(r, o?.box ?? {
6963
+ ...Hi(r, o?.box ?? {
6929
6964
  x: 0,
6930
6965
  y: 0,
6931
6966
  width: this._parent.size.width,
@@ -6937,7 +6972,7 @@ var ra, X = class extends C {
6937
6972
  if (n.style.stroke && !d(n.style.stroke)) if (typeof n.style.stroke == "object") {
6938
6973
  let r = n.style.stroke, o = this._textureMap.get(`${a}.${i}.outline`) ?? this._textureMap.get(`${a}.outline`) ?? this._textureMap.get("outline");
6939
6974
  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({
6940
- ...Vi(r, o?.box ?? {
6975
+ ...Hi(r, o?.box ?? {
6941
6976
  x: 0,
6942
6977
  y: 0,
6943
6978
  width: this._parent.size.width,
@@ -6967,7 +7002,7 @@ var ra, X = class extends C {
6967
7002
  }
6968
7003
  process(e) {}
6969
7004
  };
6970
- O([_({ fallback: !0 }), D("design:type", Object)], X.prototype, "enabled", void 0), O([_({ fallback: () => [] }), D("design:type", Object)], X.prototype, "content", void 0), O([_({ alias: "_parent.style.json" }), D("design:type", Object)], X.prototype, "style", void 0), O([_(), D("design:type", Object)], X.prototype, "effects", void 0), O([_(), D("design:type", Object)], X.prototype, "fill", void 0), O([_(), D("design:type", Object)], X.prototype, "outline", void 0), O([_({ alias: "base.measureDom" }), D("design:type", typeof (ra = typeof HTMLElement < "u" && HTMLElement) == "function" ? ra : Object)], X.prototype, "measureDom", void 0), O([_({ alias: "base.fonts" }), D("design:type", Object)], X.prototype, "fonts", void 0), O([_({ fallback: "auto" }), D("design:type", Object)], X.prototype, "drawMode", void 0);
7005
+ O([_({ fallback: !0 }), D("design:type", Object)], X.prototype, "enabled", void 0), O([_({ fallback: () => [] }), D("design:type", Object)], X.prototype, "content", void 0), O([_({ alias: "_parent.style.json" }), D("design:type", Object)], X.prototype, "style", void 0), O([_(), D("design:type", Object)], X.prototype, "effects", void 0), O([_(), D("design:type", Object)], X.prototype, "fill", void 0), O([_(), D("design:type", Object)], X.prototype, "outline", void 0), O([_({ alias: "base.measureDom" }), D("design:type", typeof (ia = typeof HTMLElement < "u" && HTMLElement) == "function" ? ia : Object)], X.prototype, "measureDom", void 0), O([_({ alias: "base.fonts" }), D("design:type", Object)], X.prototype, "fonts", void 0), O([_({ fallback: "auto" }), D("design:type", Object)], X.prototype, "drawMode", void 0);
6971
7006
  //#endregion
6972
7007
  //#region src/scene/2d/element/Flexbox.ts
6973
7008
  var Z = {
@@ -6980,7 +7015,7 @@ var Z = {
6980
7015
  horizontal: 6,
6981
7016
  vertical: 7,
6982
7017
  all: 8
6983
- }, ia = {
7018
+ }, aa = {
6984
7019
  column: 0,
6985
7020
  row: 1,
6986
7021
  all: 2
@@ -6994,42 +7029,42 @@ var Z = {
6994
7029
  "space-between": 6,
6995
7030
  "space-around": 7,
6996
7031
  "space-evenly": 8
6997
- }, aa = {
7032
+ }, oa = {
6998
7033
  flex: 0,
6999
7034
  none: 1,
7000
7035
  contents: 2
7001
- }, oa = {
7036
+ }, sa = {
7002
7037
  inherit: 0,
7003
7038
  ltr: 1,
7004
7039
  rtl: 2
7005
- }, sa = {
7040
+ }, ca = {
7006
7041
  column: 0,
7007
7042
  "column-reverse": 1,
7008
7043
  row: 2,
7009
7044
  "row-reverse": 3
7010
- }, ca = {
7045
+ }, la = {
7011
7046
  "no-wrap": 0,
7012
7047
  wrap: 1,
7013
7048
  "Wrap-reverse": 2
7014
- }, la = {
7049
+ }, ua = {
7015
7050
  "flex-start": 0,
7016
7051
  center: 1,
7017
7052
  "flex-end": 2,
7018
7053
  "space-between": 3,
7019
7054
  "space-around": 4,
7020
7055
  "space-evenly": 5
7021
- }, ua = {
7056
+ }, da = {
7022
7057
  visible: 0,
7023
7058
  hidden: 1,
7024
7059
  scroll: 2
7025
- }, da = {
7060
+ }, fa = {
7026
7061
  static: 0,
7027
7062
  relative: 1,
7028
7063
  absolute: 2
7029
- }, fa = {
7064
+ }, pa = {
7030
7065
  "border-box": 0,
7031
7066
  "content-box": 1
7032
- }, pa = class e {
7067
+ }, ma = class e {
7033
7068
  _parent;
7034
7069
  static _yoga;
7035
7070
  static async load() {
@@ -7041,14 +7076,14 @@ var Z = {
7041
7076
  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);
7042
7077
  }
7043
7078
  _addChild(e, t) {
7044
- if (e instanceof ya && e.flexbox.node && this.node) {
7079
+ if (e instanceof ba && e.flexbox.node && this.node) {
7045
7080
  this.node.insertChild(e.flexbox.node, t);
7046
7081
  let n = e.style.getProperties();
7047
7082
  for (let t in n) e.flexbox.updateStyleProperty(t, n[t]);
7048
7083
  }
7049
7084
  }
7050
7085
  _removeChild(e, t) {
7051
- e instanceof ya && e.flexbox.node && this.node && this.node.removeChild(e.flexbox.node);
7086
+ e instanceof ba && e.flexbox.node && this.node && this.node.removeChild(e.flexbox.node);
7052
7087
  }
7053
7088
  updateStyleProperty(e, t) {
7054
7089
  let n = this.node;
@@ -7082,10 +7117,10 @@ var Z = {
7082
7117
  n.setBorder(Z.all, this._parent.style.borderWidth);
7083
7118
  break;
7084
7119
  case "direction":
7085
- n.setDirection(t ? oa[t] ?? oa.inherit : oa.inherit);
7120
+ n.setDirection(t ? sa[t] ?? sa.inherit : sa.inherit);
7086
7121
  break;
7087
7122
  case "display":
7088
- n.setDisplay(t ? aa[t] ?? aa.flex : aa.flex);
7123
+ n.setDisplay(t ? oa[t] ?? oa.flex : oa.flex);
7089
7124
  break;
7090
7125
  case "flex":
7091
7126
  n.setFlex(t);
@@ -7094,7 +7129,7 @@ var Z = {
7094
7129
  n.setFlexBasis(t);
7095
7130
  break;
7096
7131
  case "flexDirection":
7097
- n.setFlexDirection(t ? sa[t] ?? sa.row : sa.row);
7132
+ n.setFlexDirection(t ? ca[t] ?? ca.row : ca.row);
7098
7133
  break;
7099
7134
  case "flexGrow":
7100
7135
  n.setFlexGrow(t);
@@ -7103,16 +7138,16 @@ var Z = {
7103
7138
  n.setFlexShrink(t);
7104
7139
  break;
7105
7140
  case "flexWrap":
7106
- n.setFlexWrap(t ? ca[t] ?? ca.wrap : ca.wrap);
7141
+ n.setFlexWrap(t ? la[t] ?? la.wrap : la.wrap);
7107
7142
  break;
7108
7143
  case "height":
7109
7144
  n.setHeight(t);
7110
7145
  break;
7111
7146
  case "justifyContent":
7112
- n.setJustifyContent(t ? la[t] ?? la["flex-start"] : la["flex-start"]);
7147
+ n.setJustifyContent(t ? ua[t] ?? ua["flex-start"] : ua["flex-start"]);
7113
7148
  break;
7114
7149
  case "gap":
7115
- t !== void 0 && n.setGap(ia.all, t);
7150
+ t !== void 0 && n.setGap(aa.all, t);
7116
7151
  break;
7117
7152
  case "marginTop":
7118
7153
  n.setMargin(Z.top, t);
@@ -7142,7 +7177,7 @@ var Z = {
7142
7177
  n.setMinWidth(t);
7143
7178
  break;
7144
7179
  case "overflow":
7145
- n.setOverflow(t ? ua[t] ?? ua.visible : ua.visible);
7180
+ n.setOverflow(t ? da[t] ?? da.visible : da.visible);
7146
7181
  break;
7147
7182
  case "paddingTop":
7148
7183
  n.setPadding(Z.top, t);
@@ -7172,10 +7207,10 @@ var Z = {
7172
7207
  n.setPosition(Z.right, t);
7173
7208
  break;
7174
7209
  case "position":
7175
- n.setPositionType(t ? da[t] ?? da.relative : da.relative);
7210
+ n.setPositionType(t ? fa[t] ?? fa.relative : fa.relative);
7176
7211
  break;
7177
7212
  case "boxSizing":
7178
- n.setBoxSizing(t ? fa[t] ?? fa["content-box"] : fa["content-box"]);
7213
+ n.setBoxSizing(t ? pa[t] ?? pa["content-box"] : pa["content-box"]);
7179
7214
  break;
7180
7215
  case "width":
7181
7216
  n.setWidth(t);
@@ -7186,7 +7221,7 @@ var Z = {
7186
7221
  }
7187
7222
  update() {
7188
7223
  let e = this._parent, t = this.node;
7189
- if (e.getParent()?.flexbox?.update(), e.globalDisplay === "flex" && t && (t.isDirty() && t.calculateLayout(void 0, void 0, oa.ltr), t.hasNewLayout())) {
7224
+ if (e.getParent()?.flexbox?.update(), e.globalDisplay === "flex" && t && (t.isDirty() && t.calculateLayout(void 0, void 0, sa.ltr), t.hasNewLayout())) {
7190
7225
  let { left: n, top: r, width: i, height: a } = t.getComputedLayout();
7191
7226
  (!Number.isNaN(n) && n !== e.position.x || !Number.isNaN(r) && r !== e.position.y) && e.position.set(n, r), (!Number.isNaN(i) && i !== e.size.x || !Number.isNaN(a) && a !== e.size.y) && e.size.set(i, a), t.markLayoutSeen();
7192
7227
  }
@@ -7194,13 +7229,13 @@ var Z = {
7194
7229
  destroy() {
7195
7230
  this.node?.free(), this.node = void 0;
7196
7231
  }
7197
- }, ma, ha = new Set(Object.keys(a())), ga = new Set(Object.keys(s())), _a = new y(), va = [
7232
+ }, ha, ga = new Set(Object.keys(a())), _a = new Set(Object.keys(s())), va = new y(), ya = [
7198
7233
  [0, 0],
7199
7234
  [1, 0],
7200
7235
  [1, 1],
7201
7236
  [0, 1]
7202
- ], ya = class extends Pr {
7203
- flexbox = new pa(this);
7237
+ ], ba = class extends Pr {
7238
+ flexbox = new ma(this);
7204
7239
  aabb = new mt();
7205
7240
  globalAabb = new mt();
7206
7241
  _parentGlobalDisplay;
@@ -7213,7 +7248,7 @@ var Z = {
7213
7248
  });
7214
7249
  _allowPointerEvents = !0;
7215
7250
  _overflowHidden = !1;
7216
- _style = new Qi().on("updateProperty", (...e) => {
7251
+ _style = new $i().on("updateProperty", (...e) => {
7217
7252
  this.onUpdateStyleProperty(e[0], e[1], e[2]);
7218
7253
  });
7219
7254
  get style() {
@@ -7227,14 +7262,14 @@ var Z = {
7227
7262
  this._endBatch();
7228
7263
  }
7229
7264
  }
7230
- _background = new Hi(this);
7265
+ _background = new Ui(this);
7231
7266
  get background() {
7232
7267
  return this._background;
7233
7268
  }
7234
7269
  set background(e) {
7235
7270
  this._background.resetProperties().setProperties(e);
7236
7271
  }
7237
- _shape = new Zi(this);
7272
+ _shape = new Qi(this);
7238
7273
  get shape() {
7239
7274
  return this._shape;
7240
7275
  }
@@ -7248,14 +7283,14 @@ var Z = {
7248
7283
  set fill(e) {
7249
7284
  this._fill.resetProperties().setProperties(e);
7250
7285
  }
7251
- _outline = new Yi(this);
7286
+ _outline = new Xi(this);
7252
7287
  get outline() {
7253
7288
  return this._outline;
7254
7289
  }
7255
7290
  set outline(e) {
7256
7291
  this._outline.resetProperties().setProperties(e);
7257
7292
  }
7258
- _foreground = new Ji(this);
7293
+ _foreground = new Yi(this);
7259
7294
  get foreground() {
7260
7295
  return this._foreground;
7261
7296
  }
@@ -7269,21 +7304,21 @@ var Z = {
7269
7304
  set text(e) {
7270
7305
  this._text.resetProperties().setProperties(e);
7271
7306
  }
7272
- _shadow = new Xi(this);
7307
+ _shadow = new Zi(this);
7273
7308
  get shadow() {
7274
7309
  return this._shadow;
7275
7310
  }
7276
7311
  set shadow(e) {
7277
7312
  this._shadow.resetProperties().setProperties(e);
7278
7313
  }
7279
- _connection = new Ki(this);
7314
+ _connection = new qi(this);
7280
7315
  get connection() {
7281
7316
  return this._connection;
7282
7317
  }
7283
7318
  set connection(e) {
7284
7319
  this._connection.resetProperties().setProperties(e);
7285
7320
  }
7286
- _table = new na(this);
7321
+ _table = new ra(this);
7287
7322
  get table() {
7288
7323
  return this._table;
7289
7324
  }
@@ -7396,7 +7431,7 @@ var Z = {
7396
7431
  }), this.extraTransform.translate(this.pivot.x, this.pivot.y), this.updateGlobalTransform();
7397
7432
  break;
7398
7433
  case "transformOrigin": {
7399
- let e = Wr(t ?? "");
7434
+ let e = Gr(t ?? "");
7400
7435
  this.pivot.set(e[0] * this.size.width, e[1] * this.size.height);
7401
7436
  break;
7402
7437
  }
@@ -7440,7 +7475,7 @@ var Z = {
7440
7475
  this.requestDraw();
7441
7476
  break;
7442
7477
  }
7443
- if ((ga.has(e) || ha.has(e)) && this.text.isValid() && (this._batchDepth > 0 ? this._pendingTextUpdate = !0 : this.text.update()), this.globalDisplay === "flex") this.flexbox.updateStyleProperty(e, t);
7478
+ if ((_a.has(e) || ga.has(e)) && this.text.isValid() && (this._batchDepth > 0 ? this._pendingTextUpdate = !0 : this.text.update()), this.globalDisplay === "flex") this.flexbox.updateStyleProperty(e, t);
7444
7479
  else switch (e) {
7445
7480
  case "left":
7446
7481
  this.position.x = Number(t);
@@ -7480,21 +7515,21 @@ var Z = {
7480
7515
  }
7481
7516
  _intersectsViewport(e) {
7482
7517
  let t = e.canvasTransform, n = e.width, r = e.height, i = Infinity, a = -Infinity, o = Infinity, s = -Infinity;
7483
- for (let [e, c] of va) t.applyAffineInverse({
7518
+ for (let [e, c] of ya) t.applyAffineInverse({
7484
7519
  x: e * n,
7485
7520
  y: c * r
7486
- }, _a), i = Math.min(i, _a.x), a = Math.max(a, _a.x), o = Math.min(o, _a.y), s = Math.max(s, _a.y);
7521
+ }, va), i = Math.min(i, va.x), a = Math.max(a, va.x), o = Math.min(o, va.y), s = Math.max(s, va.y);
7487
7522
  let c = a - i, l = s - o, { min: u, size: d } = this.globalAabb;
7488
7523
  return !(u.x > a + c || u.x + d.x < i - c || u.y > s + l || u.y + d.y < o - l);
7489
7524
  }
7490
7525
  _updateStyleFilter(e) {
7491
- d(e) ? (this._colorFilterEffect?.remove(), this._colorFilterEffect = void 0, this.requestRender()) : (this._colorFilterEffect || (this._colorFilterEffect = new Yr({
7526
+ d(e) ? (this._colorFilterEffect?.remove(), this._colorFilterEffect = void 0, this.requestRender()) : (this._colorFilterEffect || (this._colorFilterEffect = new Xr({
7492
7527
  name: "styleFilter",
7493
7528
  internalMode: "front"
7494
7529
  }), this.append(this._colorFilterEffect)), this._colorFilterEffect.filter = e);
7495
7530
  }
7496
7531
  _updateStyleMaskImage(e) {
7497
- d(e) ? (this._maskEffect?.remove(), this._maskEffect = void 0, this.requestRender()) : (this._maskEffect || (this._maskEffect = new ji({
7532
+ d(e) ? (this._maskEffect?.remove(), this._maskEffect = void 0, this.requestRender()) : (this._maskEffect || (this._maskEffect = new Mi({
7498
7533
  name: "styleMaskImage",
7499
7534
  internalMode: "back"
7500
7535
  }), this.append(this._maskEffect)), this._maskEffect.image = e);
@@ -7532,7 +7567,7 @@ var Z = {
7532
7567
  return new yt(this._getPointArray().map((e) => (e.x += t.x, e.y += t.y, e)), this.globalRotation);
7533
7568
  }
7534
7569
  _draw() {
7535
- 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._drawContent();
7570
+ 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();
7536
7571
  }
7537
7572
  _drawContent() {}
7538
7573
  input(e, t) {
@@ -7583,10 +7618,10 @@ var Z = {
7583
7618
  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._colorFilterEffect = void 0, this._maskEffect = void 0;
7584
7619
  }
7585
7620
  };
7586
- ya = O([x("Element2D"), D("design:paramtypes", [typeof (ma = typeof Partial < "u" && Partial) == "function" ? ma : Object, Array])], ya);
7621
+ ba = O([x("Element2D"), D("design:paramtypes", [typeof (ha = typeof Partial < "u" && Partial) == "function" ? ha : Object, Array])], ba);
7587
7622
  //#endregion
7588
7623
  //#region src/scene/2d/TextureRect2D.ts
7589
- var ba, xa = class extends ya {
7624
+ var xa = class extends ba {
7590
7625
  texture;
7591
7626
  constructor(e, t = []) {
7592
7627
  super(), this.setProperties(e).append(t);
@@ -7600,11 +7635,7 @@ var ba, xa = class extends ya {
7600
7635
  } });
7601
7636
  }
7602
7637
  }
7603
- };
7604
- xa = O([x("TextureRect2D"), D("design:paramtypes", [typeof (ba = typeof Partial < "u" && Partial) == "function" ? ba : Object, Array])], xa);
7605
- //#endregion
7606
- //#region src/scene/2d/Lottie2D.ts
7607
- var Sa, Ca = class extends xa {
7638
+ }, Sa, Ca = class extends xa {
7608
7639
  texture = new rr();
7609
7640
  animation;
7610
7641
  _lastTime = NaN;
@@ -7638,7 +7669,7 @@ var Sa, Ca = class extends xa {
7638
7669
  O([_({ fallback: "" }), D("design:type", String)], Ca.prototype, "src", void 0), Ca = O([x("Lottie2D"), D("design:paramtypes", [typeof (Sa = typeof Partial < "u" && Partial) == "function" ? Sa : Object, Array])], Ca);
7639
7670
  //#endregion
7640
7671
  //#region src/scene/2d/TransformRect2D.ts
7641
- var wa = class extends ya {
7672
+ var wa = class extends ba {
7642
7673
  constructor(e, t = []) {
7643
7674
  super(), this.setProperties(e).append(t);
7644
7675
  }
@@ -7769,7 +7800,7 @@ var Pa = {
7769
7800
  e = [this.getParent()].filter(Boolean);
7770
7801
  break;
7771
7802
  }
7772
- return e.filter((e) => e instanceof ya);
7803
+ return e.filter((e) => e instanceof ba);
7773
7804
  }
7774
7805
  _updateKeyframes() {
7775
7806
  let e = [], t = this.keyframes;
@@ -8541,7 +8572,7 @@ var Ua = class e extends za {
8541
8572
  qa = Ka = O([x("Audio"), D("design:paramtypes", [Object])], qa);
8542
8573
  //#endregion
8543
8574
  //#region src/scene/audio/AudioSpectrum.ts
8544
- var Ja = class extends Pr {}, Ya, Xa = class extends ya {
8575
+ var Ja = class extends Pr {}, Ya, Xa = class extends ba {
8545
8576
  _audioBuffer;
8546
8577
  _src = (() => {
8547
8578
  let e = tt();
@@ -9101,4 +9132,4 @@ async function Eo(e) {
9101
9132
  });
9102
9133
  }
9103
9134
  //#endregion
9104
- export { mt as Aabb2D, nr as AnimatedTexture, Fa as Animation, go as Assets, qa as Audio, za as AudioPipeline, Ba as AudioProcessor, Ja as AudioSpectrum, Xa as AudioWaveform, k as BufferUsage, Ir as Camera2D, ur as CanvasContext, Cr as CanvasItem, rr as CanvasTexture, T as Color, U as ColorAdjustEffect, Yr as ColorFilterEffect, vt as ColorMatrix, $r as ColorOverlayEffect, ni as ColorRemoveEffect, oi as ColorReplaceEffect, ir as ColorTexture, C as CoreObject, ht as DEG_TO_RAD, Ke as DEVICE_PIXEL_RATIO, W as DrawboardEffect, gi as DropShadowEffect, H as Effect, $n as EffectMaterial, ya as Element2D, Hi as Element2DBackground, Y as Element2DChart, Ki as Element2DConnection, J as Element2DFill, Ji as Element2DForeground, Yi as Element2DOutline, Xi as Element2DShadow, Zi as Element2DShape, Qi as Element2DStyle, na as Element2DTable, X as Element2DText, yi as EmbossEffect, vo as Engine, pa as Flexbox, zn as FontLoader, pi as GaussianBlurEffect, Wn as Geometry, ao as GifLoader, on as GlBatch2DSystem, tn as GlBlendMode, Ct as GlBuffer, jt as GlBufferSystem, St as GlBufferTarget, un as GlMaskSystem, Ut as GlProgram, mn as GlRenderTarget, hn as GlRenderTargetSystem, Qt as GlShaderSystem, rn as GlState, an as GlStateSystem, fn as GlStencilSystem, A as GlSystem, pn as GlViewportSystem, G as GlitchEffect, K as GodrayEffect, ar as GradientTexture, Ra as HTMLAudio, Ia as HTMLAudioContext, La as HTMLSound, We as IN_BROWSER, Ge as IN_MAC_OS, Vn as IndexBuffer, ft as Input, ot as InputEvent, oo as JsonLoader, Oi as KawaseBlurEffect, Qa as KawaseTransition, st as KeyboardInputEvent, eo as LeftEraseTransition, Rn as Loader, Ca as Lottie2D, so as LottieLoader, xt as MainLoop, ji as MaskEffect, F as Material, fr as Meta, ct as MouseInputEvent, z as Node, Pr as Node2D, yt as Obb2D, q as OutlineEffect, ye as PI, be as PI_2, Li as PixelateEffect, or as PixelsTexture, lt as PointerInputEvent, bt as Projection2D, qn as QuadGeometry, I as QuadUvGeometry, gt as RAD_TO_DEG, pt as RefCounted, L as RenderTarget, Tt as Renderer, w as Resource, ze as SUPPORTS_AUDIO_CONTEXT, Le as SUPPORTS_CLICK_EVENTS, Re as SUPPORTS_CREATE_IMAGE_BITMAP, je as SUPPORTS_IMAGE_BITMAP, Fe as SUPPORTS_MOUSE_EVENTS, Ve as SUPPORTS_OFFLINE_AUDIO_CONTEXT, Ne as SUPPORTS_POINTER_EVENTS, Me as SUPPORTS_RESIZE_OBSERVER, Ie as SUPPORTS_TOUCH_EVENTS, Ae as SUPPORTS_WEBGL2, Be as SUPPORTS_WEBKIT_AUDIO_CONTEXT, He as SUPPORTS_WEBKIT_OFFLINE_AUDIO_CONTEXT, Ue as SUPPORTS_WEB_AUDIO, Pe as SUPPORTS_WHEEL_EVENTS, Ar as SceneTree, co as TextLoader, R as Texture2D, lo as TextureLoader, xa as TextureRect2D, S as Ticker, no as TiltShiftTransition, Or as Timeline, B as TimelineNode, wa as TransformRect2D, Mr as Transition, io as TwistTransition, Dt as UniformGroup, tr as UvGeometry, er as UvMaterial, P as VertexAttribute, N as VertexBuffer, Ea as Video2D, uo as VideoLoader, cr as VideoTexture, V as Viewport, lr as ViewportTexture, Ga as WebAudio, Ua as WebAudioContext, Ln as WebGLRenderer, Wa as WebSound, ut as WheelInputEvent, kr as Window, Bi as ZoomBlurEffect, Q as alignMap, $ as assets, Lr as axisDir, fa as boxSizingMap, _t as clamp, Di as clampFrag, tt as createHTMLCanvas, At as createIdFromString, _e as createNode, rt as crossOrigin, Na as cubicBezier, x as customNode, ge as customNodes, _o as defaultOptions, nt as determineCrossOrigin, oa as directionMap, aa as displayMap, ka as ease, Aa as easeIn, Ma as easeInOut, ja as easeOut, Z as edgeMap, sa as flexDirectionMap, ca as flexWrapMap, Ei as frag, et as getCanvasFactory, Te as getDefaultCssPropertyValue, So as getRenderEngine, ia as gutterMap, at as instanceId, Xe as isCanvasElement, qe as isElementNode, Ye as isImageElement, xe as isPow2, Je as isVideoElement, Ze as isWebgl2, la as justifyMap, E as lerp, Oa as linear, cn as log2, nn as mapGlBlendModes, sn as nextPow2, ve as nextTick, ua as overflowMap, Ur as parseCssFilter, De as parseCssFunctions, Ee as parseCssProperty, Wr as parseCssTransformOrigin, da as positionTypeMap, To as render, Eo as renderPixels, xr as resetBatchPool, Rr as routeConnection, $e as setCanvasFactory, dn as stencilModeMap, Pa as timingFunctions };
9135
+ export { mt as Aabb2D, nr as AnimatedTexture, Fa as Animation, go as Assets, qa as Audio, za as AudioPipeline, Ba as AudioProcessor, Ja as AudioSpectrum, Xa as AudioWaveform, k as BufferUsage, Ir as Camera2D, ur as CanvasContext, Cr as CanvasItem, rr as CanvasTexture, T as Color, U as ColorAdjustEffect, Xr as ColorFilterEffect, vt as ColorMatrix, ei as ColorOverlayEffect, ri as ColorRemoveEffect, si as ColorReplaceEffect, ir as ColorTexture, C as CoreObject, ht as DEG_TO_RAD, Ke as DEVICE_PIXEL_RATIO, W as DrawboardEffect, _i as DropShadowEffect, H as Effect, $n as EffectMaterial, ba as Element2D, Ui as Element2DBackground, Y as Element2DChart, qi as Element2DConnection, J as Element2DFill, Yi as Element2DForeground, Xi as Element2DOutline, Zi as Element2DShadow, Qi as Element2DShape, $i as Element2DStyle, ra as Element2DTable, X as Element2DText, bi as EmbossEffect, vo as Engine, ma as Flexbox, zn as FontLoader, mi as GaussianBlurEffect, Wn as Geometry, ao as GifLoader, on as GlBatch2DSystem, tn as GlBlendMode, Ct as GlBuffer, jt as GlBufferSystem, St as GlBufferTarget, un as GlMaskSystem, Ut as GlProgram, mn as GlRenderTarget, hn as GlRenderTargetSystem, Qt as GlShaderSystem, rn as GlState, an as GlStateSystem, fn as GlStencilSystem, A as GlSystem, pn as GlViewportSystem, G as GlitchEffect, K as GodrayEffect, ar as GradientTexture, Ra as HTMLAudio, Ia as HTMLAudioContext, La as HTMLSound, We as IN_BROWSER, Ge as IN_MAC_OS, Vn as IndexBuffer, ft as Input, ot as InputEvent, oo as JsonLoader, ki as KawaseBlurEffect, Qa as KawaseTransition, st as KeyboardInputEvent, eo as LeftEraseTransition, Rn as Loader, Ca as Lottie2D, so as LottieLoader, xt as MainLoop, Mi as MaskEffect, F as Material, fr as Meta, ct as MouseInputEvent, z as Node, Pr as Node2D, yt as Obb2D, q as OutlineEffect, ye as PI, be as PI_2, Ri as PixelateEffect, or as PixelsTexture, lt as PointerInputEvent, bt as Projection2D, qn as QuadGeometry, I as QuadUvGeometry, gt as RAD_TO_DEG, pt as RefCounted, L as RenderTarget, Tt as Renderer, w as Resource, ze as SUPPORTS_AUDIO_CONTEXT, Le as SUPPORTS_CLICK_EVENTS, Re as SUPPORTS_CREATE_IMAGE_BITMAP, je as SUPPORTS_IMAGE_BITMAP, Fe as SUPPORTS_MOUSE_EVENTS, Ve as SUPPORTS_OFFLINE_AUDIO_CONTEXT, Ne as SUPPORTS_POINTER_EVENTS, Me as SUPPORTS_RESIZE_OBSERVER, Ie as SUPPORTS_TOUCH_EVENTS, Ae as SUPPORTS_WEBGL2, Be as SUPPORTS_WEBKIT_AUDIO_CONTEXT, He as SUPPORTS_WEBKIT_OFFLINE_AUDIO_CONTEXT, Ue as SUPPORTS_WEB_AUDIO, Pe as SUPPORTS_WHEEL_EVENTS, Ar as SceneTree, co as TextLoader, R as Texture2D, lo as TextureLoader, xa as TextureRect2D, S as Ticker, no as TiltShiftTransition, Or as Timeline, B as TimelineNode, wa as TransformRect2D, Mr as Transition, io as TwistTransition, Dt as UniformGroup, tr as UvGeometry, er as UvMaterial, P as VertexAttribute, N as VertexBuffer, Ea as Video2D, uo as VideoLoader, cr as VideoTexture, V as Viewport, lr as ViewportTexture, Ga as WebAudio, Ua as WebAudioContext, Ln as WebGLRenderer, Wa as WebSound, ut as WheelInputEvent, kr as Window, Vi as ZoomBlurEffect, Q as alignMap, $ as assets, Lr as axisDir, pa as boxSizingMap, _t as clamp, Oi as clampFrag, tt as createHTMLCanvas, At as createIdFromString, _e as createNode, rt as crossOrigin, Na as cubicBezier, x as customNode, ge as customNodes, _o as defaultOptions, nt as determineCrossOrigin, sa as directionMap, oa as displayMap, ka as ease, Aa as easeIn, Ma as easeInOut, ja as easeOut, Z as edgeMap, ca as flexDirectionMap, la as flexWrapMap, Di as frag, et as getCanvasFactory, Te as getDefaultCssPropertyValue, So as getRenderEngine, aa as gutterMap, at as instanceId, Xe as isCanvasElement, qe as isElementNode, Ye as isImageElement, xe as isPow2, Je as isVideoElement, Ze as isWebgl2, ua as justifyMap, E as lerp, Oa as linear, cn as log2, nn as mapGlBlendModes, sn as nextPow2, ve as nextTick, da as overflowMap, Wr as parseCssFilter, De as parseCssFunctions, Ee as parseCssProperty, Gr as parseCssTransformOrigin, fa as positionTypeMap, To as render, Eo as renderPixels, xr as resetBatchPool, Rr as routeConnection, $e as setCanvasFactory, dn as stencilModeMap, Pa as timingFunctions };