modern-canvas 0.4.21 → 0.4.22

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.cjs CHANGED
@@ -2155,13 +2155,13 @@ class Vector3 extends Vector {
2155
2155
  }
2156
2156
  }
2157
2157
 
2158
- var __defProp$J = Object.defineProperty;
2159
- var __decorateClass$R = (decorators, target, key, kind) => {
2158
+ var __defProp$L = Object.defineProperty;
2159
+ var __decorateClass$T = (decorators, target, key, kind) => {
2160
2160
  var result = void 0 ;
2161
2161
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
2162
2162
  if (decorator = decorators[i])
2163
2163
  result = (decorator(target, key, result) ) || result;
2164
- if (result) __defProp$J(target, key, result);
2164
+ if (result) __defProp$L(target, key, result);
2165
2165
  return result;
2166
2166
  };
2167
2167
  class MainLoop extends CoreObject {
@@ -2204,10 +2204,10 @@ class MainLoop extends CoreObject {
2204
2204
  this.stop();
2205
2205
  }
2206
2206
  }
2207
- __decorateClass$R([
2207
+ __decorateClass$T([
2208
2208
  property({ default: 24 })
2209
2209
  ], MainLoop.prototype, "fps");
2210
- __decorateClass$R([
2210
+ __decorateClass$T([
2211
2211
  property({ default: 1 })
2212
2212
  ], MainLoop.prototype, "speed");
2213
2213
 
@@ -4509,13 +4509,13 @@ class Geometry extends Resource {
4509
4509
  }
4510
4510
  }
4511
4511
 
4512
- var __defProp$I = Object.defineProperty;
4513
- var __decorateClass$Q = (decorators, target, key, kind) => {
4512
+ var __defProp$K = Object.defineProperty;
4513
+ var __decorateClass$S = (decorators, target, key, kind) => {
4514
4514
  var result = void 0 ;
4515
4515
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
4516
4516
  if (decorator = decorators[i])
4517
4517
  result = (decorator(target, key, result) ) || result;
4518
- if (result) __defProp$I(target, key, result);
4518
+ if (result) __defProp$K(target, key, result);
4519
4519
  return result;
4520
4520
  };
4521
4521
  class IndexBuffer extends Resource {
@@ -4559,20 +4559,20 @@ class IndexBuffer extends Resource {
4559
4559
  return result;
4560
4560
  }
4561
4561
  }
4562
- __decorateClass$Q([
4562
+ __decorateClass$S([
4563
4563
  protectedProperty({ default: null })
4564
4564
  ], IndexBuffer.prototype, "data");
4565
- __decorateClass$Q([
4565
+ __decorateClass$S([
4566
4566
  protectedProperty({ default: false })
4567
4567
  ], IndexBuffer.prototype, "dynamic");
4568
4568
 
4569
- var __defProp$H = Object.defineProperty;
4570
- var __decorateClass$P = (decorators, target, key, kind) => {
4569
+ var __defProp$J = Object.defineProperty;
4570
+ var __decorateClass$R = (decorators, target, key, kind) => {
4571
4571
  var result = void 0 ;
4572
4572
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
4573
4573
  if (decorator = decorators[i])
4574
4574
  result = (decorator(target, key, result) ) || result;
4575
- if (result) __defProp$H(target, key, result);
4575
+ if (result) __defProp$J(target, key, result);
4576
4576
  return result;
4577
4577
  };
4578
4578
  class VertexBuffer extends Resource {
@@ -4616,20 +4616,20 @@ class VertexBuffer extends Resource {
4616
4616
  return result;
4617
4617
  }
4618
4618
  }
4619
- __decorateClass$P([
4619
+ __decorateClass$R([
4620
4620
  protectedProperty({ default: null })
4621
4621
  ], VertexBuffer.prototype, "data");
4622
- __decorateClass$P([
4622
+ __decorateClass$R([
4623
4623
  protectedProperty({ default: false })
4624
4624
  ], VertexBuffer.prototype, "dynamic");
4625
4625
 
4626
- var __defProp$G = Object.defineProperty;
4627
- var __decorateClass$O = (decorators, target, key, kind) => {
4626
+ var __defProp$I = Object.defineProperty;
4627
+ var __decorateClass$Q = (decorators, target, key, kind) => {
4628
4628
  var result = void 0 ;
4629
4629
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
4630
4630
  if (decorator = decorators[i])
4631
4631
  result = (decorator(target, key, result) ) || result;
4632
- if (result) __defProp$G(target, key, result);
4632
+ if (result) __defProp$I(target, key, result);
4633
4633
  return result;
4634
4634
  };
4635
4635
  class VertexAttribute extends Resource {
@@ -4666,25 +4666,25 @@ class VertexAttribute extends Resource {
4666
4666
  return result;
4667
4667
  }
4668
4668
  }
4669
- __decorateClass$O([
4669
+ __decorateClass$Q([
4670
4670
  protectedProperty()
4671
4671
  ], VertexAttribute.prototype, "buffer");
4672
- __decorateClass$O([
4672
+ __decorateClass$Q([
4673
4673
  protectedProperty({ default: 0 })
4674
4674
  ], VertexAttribute.prototype, "size");
4675
- __decorateClass$O([
4675
+ __decorateClass$Q([
4676
4676
  protectedProperty({ default: false })
4677
4677
  ], VertexAttribute.prototype, "normalized");
4678
- __decorateClass$O([
4678
+ __decorateClass$Q([
4679
4679
  protectedProperty({ default: "float" })
4680
4680
  ], VertexAttribute.prototype, "type");
4681
- __decorateClass$O([
4681
+ __decorateClass$Q([
4682
4682
  protectedProperty()
4683
4683
  ], VertexAttribute.prototype, "stride");
4684
- __decorateClass$O([
4684
+ __decorateClass$Q([
4685
4685
  protectedProperty()
4686
4686
  ], VertexAttribute.prototype, "offset");
4687
- __decorateClass$O([
4687
+ __decorateClass$Q([
4688
4688
  protectedProperty()
4689
4689
  ], VertexAttribute.prototype, "divisor");
4690
4690
 
@@ -4928,13 +4928,13 @@ class UvGeometry extends Geometry {
4928
4928
  }
4929
4929
  }
4930
4930
 
4931
- var __defProp$F = Object.defineProperty;
4932
- var __decorateClass$N = (decorators, target, key, kind) => {
4931
+ var __defProp$H = Object.defineProperty;
4932
+ var __decorateClass$P = (decorators, target, key, kind) => {
4933
4933
  var result = void 0 ;
4934
4934
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
4935
4935
  if (decorator = decorators[i])
4936
4936
  result = (decorator(target, key, result) ) || result;
4937
- if (result) __defProp$F(target, key, result);
4937
+ if (result) __defProp$H(target, key, result);
4938
4938
  return result;
4939
4939
  };
4940
4940
  class Texture2D extends Resource {
@@ -5060,22 +5060,22 @@ class Texture2D extends Resource {
5060
5060
  }
5061
5061
  }
5062
5062
  }
5063
- __decorateClass$N([
5063
+ __decorateClass$P([
5064
5064
  protectedProperty()
5065
5065
  ], Texture2D.prototype, "source");
5066
- __decorateClass$N([
5066
+ __decorateClass$P([
5067
5067
  property({ default: 0 })
5068
5068
  ], Texture2D.prototype, "width");
5069
- __decorateClass$N([
5069
+ __decorateClass$P([
5070
5070
  property({ default: 0 })
5071
5071
  ], Texture2D.prototype, "height");
5072
- __decorateClass$N([
5072
+ __decorateClass$P([
5073
5073
  property({ default: "linear" })
5074
5074
  ], Texture2D.prototype, "filterMode");
5075
- __decorateClass$N([
5075
+ __decorateClass$P([
5076
5076
  property({ default: "clamp_to_edge" })
5077
5077
  ], Texture2D.prototype, "wrapMode");
5078
- __decorateClass$N([
5078
+ __decorateClass$P([
5079
5079
  property({ default: 1 })
5080
5080
  ], Texture2D.prototype, "pixelRatio");
5081
5081
 
@@ -5105,13 +5105,13 @@ class AnimatedTexture extends Resource {
5105
5105
  }
5106
5106
  }
5107
5107
 
5108
- var __defProp$E = Object.defineProperty;
5109
- var __decorateClass$M = (decorators, target, key, kind) => {
5108
+ var __defProp$G = Object.defineProperty;
5109
+ var __decorateClass$O = (decorators, target, key, kind) => {
5110
5110
  var result = void 0 ;
5111
5111
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
5112
5112
  if (decorator = decorators[i])
5113
5113
  result = (decorator(target, key, result) ) || result;
5114
- if (result) __defProp$E(target, key, result);
5114
+ if (result) __defProp$G(target, key, result);
5115
5115
  return result;
5116
5116
  };
5117
5117
  class CanvasTexture extends Texture2D {
@@ -5130,7 +5130,7 @@ class CanvasTexture extends Texture2D {
5130
5130
  super._updateProperty(key, value, oldValue, declaration);
5131
5131
  }
5132
5132
  }
5133
- __decorateClass$M([
5133
+ __decorateClass$O([
5134
5134
  property({ default: 2 })
5135
5135
  ], CanvasTexture.prototype, "pixelRatio");
5136
5136
 
@@ -5292,13 +5292,13 @@ class PixelsTexture extends Texture2D {
5292
5292
  }
5293
5293
  }
5294
5294
 
5295
- var __defProp$D = Object.defineProperty;
5296
- var __decorateClass$L = (decorators, target, key, kind) => {
5295
+ var __defProp$F = Object.defineProperty;
5296
+ var __decorateClass$N = (decorators, target, key, kind) => {
5297
5297
  var result = void 0 ;
5298
5298
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
5299
5299
  if (decorator = decorators[i])
5300
5300
  result = (decorator(target, key, result) ) || result;
5301
- if (result) __defProp$D(target, key, result);
5301
+ if (result) __defProp$F(target, key, result);
5302
5302
  return result;
5303
5303
  };
5304
5304
  function resolveOptions(options) {
@@ -5542,10 +5542,10 @@ const _VideoTexture = class _VideoTexture extends Texture2D {
5542
5542
  }
5543
5543
  }
5544
5544
  };
5545
- __decorateClass$L([
5545
+ __decorateClass$N([
5546
5546
  protectedProperty({ default: true })
5547
5547
  ], _VideoTexture.prototype, "autoUpdate");
5548
- __decorateClass$L([
5548
+ __decorateClass$N([
5549
5549
  protectedProperty({ default: 0 })
5550
5550
  ], _VideoTexture.prototype, "fps");
5551
5551
  let VideoTexture = _VideoTexture;
@@ -5554,14 +5554,14 @@ class ViewportTexture extends PixelsTexture {
5554
5554
  //
5555
5555
  }
5556
5556
 
5557
- var __defProp$C = Object.defineProperty;
5557
+ var __defProp$E = Object.defineProperty;
5558
5558
  var __getOwnPropDesc$I = Object.getOwnPropertyDescriptor;
5559
- var __decorateClass$K = (decorators, target, key, kind) => {
5559
+ var __decorateClass$M = (decorators, target, key, kind) => {
5560
5560
  var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$I(target, key) : target;
5561
5561
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
5562
5562
  if (decorator = decorators[i])
5563
5563
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
5564
- if (kind && result) __defProp$C(target, key, result);
5564
+ if (kind && result) __defProp$E(target, key, result);
5565
5565
  return result;
5566
5566
  };
5567
5567
  const tagUidMap = {};
@@ -6066,36 +6066,36 @@ exports.Node = class Node extends CoreObject {
6066
6066
  return node;
6067
6067
  }
6068
6068
  };
6069
- __decorateClass$K([
6069
+ __decorateClass$M([
6070
6070
  protectedProperty()
6071
6071
  ], exports.Node.prototype, "name", 2);
6072
- __decorateClass$K([
6072
+ __decorateClass$M([
6073
6073
  property()
6074
6074
  ], exports.Node.prototype, "mask", 2);
6075
- __decorateClass$K([
6075
+ __decorateClass$M([
6076
6076
  property({ default: "inherit" })
6077
6077
  ], exports.Node.prototype, "processMode", 2);
6078
- __decorateClass$K([
6078
+ __decorateClass$M([
6079
6079
  property({ default: "default" })
6080
6080
  ], exports.Node.prototype, "processSortMode", 2);
6081
- __decorateClass$K([
6081
+ __decorateClass$M([
6082
6082
  property({ default: "inherit" })
6083
6083
  ], exports.Node.prototype, "renderMode", 2);
6084
- __decorateClass$K([
6084
+ __decorateClass$M([
6085
6085
  property({ default: "default" })
6086
6086
  ], exports.Node.prototype, "internalMode", 2);
6087
- exports.Node = __decorateClass$K([
6087
+ exports.Node = __decorateClass$M([
6088
6088
  customNode("Node")
6089
6089
  ], exports.Node);
6090
6090
 
6091
- var __defProp$B = Object.defineProperty;
6091
+ var __defProp$D = Object.defineProperty;
6092
6092
  var __getOwnPropDesc$H = Object.getOwnPropertyDescriptor;
6093
- var __decorateClass$J = (decorators, target, key, kind) => {
6093
+ var __decorateClass$L = (decorators, target, key, kind) => {
6094
6094
  var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$H(target, key) : target;
6095
6095
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
6096
6096
  if (decorator = decorators[i])
6097
6097
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
6098
- if (kind && result) __defProp$B(target, key, result);
6098
+ if (kind && result) __defProp$D(target, key, result);
6099
6099
  return result;
6100
6100
  };
6101
6101
  exports.TimelineNode = class TimelineNode extends exports.Node {
@@ -6155,30 +6155,30 @@ exports.TimelineNode = class TimelineNode extends exports.Node {
6155
6155
  this._updateCurrentTime();
6156
6156
  }
6157
6157
  };
6158
- __decorateClass$J([
6158
+ __decorateClass$L([
6159
6159
  property({ default: 0 })
6160
6160
  ], exports.TimelineNode.prototype, "delay", 2);
6161
- __decorateClass$J([
6161
+ __decorateClass$L([
6162
6162
  property({ default: 0 })
6163
6163
  ], exports.TimelineNode.prototype, "duration", 2);
6164
- __decorateClass$J([
6164
+ __decorateClass$L([
6165
6165
  property({ default: false })
6166
6166
  ], exports.TimelineNode.prototype, "paused", 2);
6167
- __decorateClass$J([
6167
+ __decorateClass$L([
6168
6168
  protectedProperty()
6169
6169
  ], exports.TimelineNode.prototype, "insideTimeRange", 2);
6170
- exports.TimelineNode = __decorateClass$J([
6170
+ exports.TimelineNode = __decorateClass$L([
6171
6171
  customNode("TimelineNode")
6172
6172
  ], exports.TimelineNode);
6173
6173
 
6174
- var __defProp$A = Object.defineProperty;
6174
+ var __defProp$C = Object.defineProperty;
6175
6175
  var __getOwnPropDesc$G = Object.getOwnPropertyDescriptor;
6176
- var __decorateClass$I = (decorators, target, key, kind) => {
6176
+ var __decorateClass$K = (decorators, target, key, kind) => {
6177
6177
  var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$G(target, key) : target;
6178
6178
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
6179
6179
  if (decorator = decorators[i])
6180
6180
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
6181
- if (kind && result) __defProp$A(target, key, result);
6181
+ if (kind && result) __defProp$C(target, key, result);
6182
6182
  return result;
6183
6183
  };
6184
6184
  exports.Viewport = class Viewport extends exports.Node {
@@ -6316,30 +6316,30 @@ exports.Viewport = class Viewport extends exports.Node {
6316
6316
  return this._projection.toArray(transpose);
6317
6317
  }
6318
6318
  };
6319
- __decorateClass$I([
6319
+ __decorateClass$K([
6320
6320
  property({ default: 0 })
6321
6321
  ], exports.Viewport.prototype, "x", 2);
6322
- __decorateClass$I([
6322
+ __decorateClass$K([
6323
6323
  property({ default: 0 })
6324
6324
  ], exports.Viewport.prototype, "y", 2);
6325
- __decorateClass$I([
6325
+ __decorateClass$K([
6326
6326
  property({ default: 0 })
6327
6327
  ], exports.Viewport.prototype, "width", 2);
6328
- __decorateClass$I([
6328
+ __decorateClass$K([
6329
6329
  property({ default: 0 })
6330
6330
  ], exports.Viewport.prototype, "height", 2);
6331
- exports.Viewport = __decorateClass$I([
6331
+ exports.Viewport = __decorateClass$K([
6332
6332
  customNode("Viewport")
6333
6333
  ], exports.Viewport);
6334
6334
 
6335
- var __defProp$z = Object.defineProperty;
6335
+ var __defProp$B = Object.defineProperty;
6336
6336
  var __getOwnPropDesc$F = Object.getOwnPropertyDescriptor;
6337
- var __decorateClass$H = (decorators, target, key, kind) => {
6337
+ var __decorateClass$J = (decorators, target, key, kind) => {
6338
6338
  var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$F(target, key) : target;
6339
6339
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
6340
6340
  if (decorator = decorators[i])
6341
6341
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
6342
- if (kind && result) __defProp$z(target, key, result);
6342
+ if (kind && result) __defProp$B(target, key, result);
6343
6343
  return result;
6344
6344
  };
6345
6345
  exports.Effect = class Effect extends exports.TimelineNode {
@@ -6580,151 +6580,34 @@ exports.Effect = class Effect extends exports.TimelineNode {
6580
6580
  }
6581
6581
  }
6582
6582
  };
6583
- __decorateClass$H([
6583
+ __decorateClass$J([
6584
6584
  protectedProperty()
6585
6585
  ], exports.Effect.prototype, "material", 2);
6586
- __decorateClass$H([
6586
+ __decorateClass$J([
6587
6587
  property()
6588
6588
  ], exports.Effect.prototype, "effectMode", 2);
6589
- __decorateClass$H([
6589
+ __decorateClass$J([
6590
6590
  property({ default: "" })
6591
6591
  ], exports.Effect.prototype, "glsl", 2);
6592
- __decorateClass$H([
6592
+ __decorateClass$J([
6593
6593
  property({ default: "" })
6594
6594
  ], exports.Effect.prototype, "glslSrc", 2);
6595
- exports.Effect = __decorateClass$H([
6595
+ exports.Effect = __decorateClass$J([
6596
6596
  customNode("Effect")
6597
6597
  ], exports.Effect);
6598
6598
 
6599
- var __defProp$y = Object.defineProperty;
6599
+ var __defProp$A = Object.defineProperty;
6600
6600
  var __getOwnPropDesc$E = Object.getOwnPropertyDescriptor;
6601
- var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6602
- var __decorateClass$G = (decorators, target, key, kind) => {
6601
+ var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$A(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6602
+ var __decorateClass$I = (decorators, target, key, kind) => {
6603
6603
  var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$E(target, key) : target;
6604
6604
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
6605
6605
  if (decorator = decorators[i])
6606
6606
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
6607
- if (kind && result) __defProp$y(target, key, result);
6608
- return result;
6609
- };
6610
- var __publicField$i = (obj, key, value) => __defNormalProp$i(obj, typeof key !== "symbol" ? key + "" : key, value);
6611
- const frag$2 = `varying vec2 vUv[9];
6612
- uniform sampler2D sampler;
6613
-
6614
- void main(void) {
6615
- gl_FragColor = vec4(0.0);
6616
- float flag = 0.0;
6617
- for (int i = 0; i < 9; i++) {
6618
- vec2 uv = vUv[i];
6619
- if (uv.x < 0.0 || uv.x > 1.0 || uv.y < 0.0 || uv.y > 1.0) {
6620
- flag = 1.0;
6621
- break;
6622
- }
6623
- }
6624
- if (flag == 1.0) {
6625
- gl_FragColor += texture2D(sampler, vUv[4]) * 0.028532;
6626
- gl_FragColor += texture2D(sampler, vUv[4]) * 0.067234;
6627
- gl_FragColor += texture2D(sampler, vUv[4]) * 0.124009;
6628
- gl_FragColor += texture2D(sampler, vUv[4]) * 0.179044;
6629
- gl_FragColor += texture2D(sampler, vUv[4]) * 0.20236;
6630
- gl_FragColor += texture2D(sampler, vUv[4]) * 0.179044;
6631
- gl_FragColor += texture2D(sampler, vUv[4]) * 0.124009;
6632
- gl_FragColor += texture2D(sampler, vUv[4]) * 0.067234;
6633
- gl_FragColor += texture2D(sampler, vUv[4]) * 0.028532;
6634
- } else {
6635
- gl_FragColor += texture2D(sampler, vUv[0]) * 0.028532;
6636
- gl_FragColor += texture2D(sampler, vUv[1]) * 0.067234;
6637
- gl_FragColor += texture2D(sampler, vUv[2]) * 0.124009;
6638
- gl_FragColor += texture2D(sampler, vUv[3]) * 0.179044;
6639
- gl_FragColor += texture2D(sampler, vUv[4]) * 0.20236;
6640
- gl_FragColor += texture2D(sampler, vUv[5]) * 0.179044;
6641
- gl_FragColor += texture2D(sampler, vUv[6]) * 0.124009;
6642
- gl_FragColor += texture2D(sampler, vUv[7]) * 0.067234;
6643
- gl_FragColor += texture2D(sampler, vUv[8]) * 0.028532;
6644
- }
6645
- }`;
6646
- exports.BlurEffect = class BlurEffect extends exports.Effect {
6647
- constructor(properties, children = []) {
6648
- super();
6649
- this.setProperties(properties).append(children);
6650
- }
6651
- apply(renderer, source) {
6652
- source.redraw(renderer, () => {
6653
- QuadUvGeometry.draw(renderer, exports.BlurEffect.materialX, {
6654
- sampler: 0,
6655
- strength: 1 / source.width * this.strength / this.quality
6656
- });
6657
- });
6658
- source.redraw(renderer, () => {
6659
- QuadUvGeometry.draw(renderer, exports.BlurEffect.materialY, {
6660
- sampler: 0,
6661
- strength: 1 / source.height * this.strength / this.quality
6662
- });
6663
- });
6664
- }
6665
- };
6666
- __publicField$i(exports.BlurEffect, "materialX", new Material({
6667
- vert: `attribute vec2 position;
6668
- attribute vec2 uv;
6669
- varying vec2 vUv[9];
6670
- uniform float strength;
6671
-
6672
- void main(void) {
6673
- gl_Position = vec4(position, 0, 1);
6674
- vUv[0] = uv + vec2(-4.0 * strength, 0.0);
6675
- vUv[1] = uv + vec2(-3.0 * strength, 0.0);
6676
- vUv[2] = uv + vec2(-2.0 * strength, 0.0);
6677
- vUv[3] = uv + vec2(-1.0 * strength, 0.0);
6678
- vUv[4] = uv + vec2(0.0 * strength, 0.0);
6679
- vUv[5] = uv + vec2(1.0 * strength, 0.0);
6680
- vUv[6] = uv + vec2(2.0 * strength, 0.0);
6681
- vUv[7] = uv + vec2(3.0 * strength, 0.0);
6682
- vUv[8] = uv + vec2(4.0 * strength, 0.0);
6683
- }`,
6684
- frag: frag$2
6685
- }));
6686
- __publicField$i(exports.BlurEffect, "materialY", new Material({
6687
- vert: `attribute vec2 position;
6688
- attribute vec2 uv;
6689
- uniform float strength;
6690
- varying vec2 vUv[9];
6691
-
6692
- void main(void) {
6693
- gl_Position = vec4(position, 0, 1);
6694
- vUv[0] = uv + vec2(0.0, -4.0 * strength);
6695
- vUv[1] = uv + vec2(0.0, -3.0 * strength);
6696
- vUv[2] = uv + vec2(0.0, -2.0 * strength);
6697
- vUv[3] = uv + vec2(0.0, -1.0 * strength);
6698
- vUv[4] = uv + vec2(0.0, 0.0 * strength);
6699
- vUv[5] = uv + vec2(0.0, 1.0 * strength);
6700
- vUv[6] = uv + vec2(0.0, 2.0 * strength);
6701
- vUv[7] = uv + vec2(0.0, 3.0 * strength);
6702
- vUv[8] = uv + vec2(0.0, 4.0 * strength);
6703
- }`,
6704
- frag: frag$2
6705
- }));
6706
- __decorateClass$G([
6707
- property({ default: 4 })
6708
- ], exports.BlurEffect.prototype, "strength", 2);
6709
- __decorateClass$G([
6710
- property({ default: 3 })
6711
- ], exports.BlurEffect.prototype, "quality", 2);
6712
- exports.BlurEffect = __decorateClass$G([
6713
- customNode("BlurEffect")
6714
- ], exports.BlurEffect);
6715
-
6716
- var __defProp$x = Object.defineProperty;
6717
- var __getOwnPropDesc$D = Object.getOwnPropertyDescriptor;
6718
- var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6719
- var __decorateClass$F = (decorators, target, key, kind) => {
6720
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$D(target, key) : target;
6721
- for (var i = decorators.length - 1, decorator; i >= 0; i--)
6722
- if (decorator = decorators[i])
6723
- result = (kind ? decorator(target, key, result) : decorator(result)) || result;
6724
- if (kind && result) __defProp$x(target, key, result);
6607
+ if (kind && result) __defProp$A(target, key, result);
6725
6608
  return result;
6726
6609
  };
6727
- var __publicField$h = (obj, key, value) => __defNormalProp$h(obj, key + "" , value);
6610
+ var __publicField$i = (obj, key, value) => __defNormalProp$i(obj, key + "" , value);
6728
6611
  exports.ColorAdjustEffect = class ColorAdjustEffect extends exports.Effect {
6729
6612
  constructor(properties, children = []) {
6730
6613
  super();
@@ -6746,7 +6629,7 @@ exports.ColorAdjustEffect = class ColorAdjustEffect extends exports.Effect {
6746
6629
  });
6747
6630
  }
6748
6631
  };
6749
- __publicField$h(exports.ColorAdjustEffect, "material", new Material({
6632
+ __publicField$i(exports.ColorAdjustEffect, "material", new Material({
6750
6633
  vert: `precision mediump float;
6751
6634
  attribute vec2 position;
6752
6635
  attribute vec2 uv;
@@ -6781,46 +6664,46 @@ void main(void) {
6781
6664
  gl_FragColor = c * alpha;
6782
6665
  }`
6783
6666
  }));
6784
- __decorateClass$F([
6667
+ __decorateClass$I([
6785
6668
  property({ default: 1 })
6786
6669
  ], exports.ColorAdjustEffect.prototype, "saturation", 2);
6787
- __decorateClass$F([
6670
+ __decorateClass$I([
6788
6671
  property({ default: 1 })
6789
6672
  ], exports.ColorAdjustEffect.prototype, "contrast", 2);
6790
- __decorateClass$F([
6673
+ __decorateClass$I([
6791
6674
  property({ default: 1 })
6792
6675
  ], exports.ColorAdjustEffect.prototype, "brightness", 2);
6793
- __decorateClass$F([
6676
+ __decorateClass$I([
6794
6677
  property({ default: 1 })
6795
6678
  ], exports.ColorAdjustEffect.prototype, "red", 2);
6796
- __decorateClass$F([
6679
+ __decorateClass$I([
6797
6680
  property({ default: 1 })
6798
6681
  ], exports.ColorAdjustEffect.prototype, "green", 2);
6799
- __decorateClass$F([
6682
+ __decorateClass$I([
6800
6683
  property({ default: 1 })
6801
6684
  ], exports.ColorAdjustEffect.prototype, "blue", 2);
6802
- __decorateClass$F([
6685
+ __decorateClass$I([
6803
6686
  property({ default: 1 })
6804
6687
  ], exports.ColorAdjustEffect.prototype, "alpha", 2);
6805
- __decorateClass$F([
6688
+ __decorateClass$I([
6806
6689
  property({ default: 1 })
6807
6690
  ], exports.ColorAdjustEffect.prototype, "gamma", 2);
6808
- exports.ColorAdjustEffect = __decorateClass$F([
6691
+ exports.ColorAdjustEffect = __decorateClass$I([
6809
6692
  customNode("ColorAdjustEffect")
6810
6693
  ], exports.ColorAdjustEffect);
6811
6694
 
6812
- var __defProp$w = Object.defineProperty;
6813
- var __getOwnPropDesc$C = Object.getOwnPropertyDescriptor;
6814
- var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6815
- var __decorateClass$E = (decorators, target, key, kind) => {
6816
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$C(target, key) : target;
6695
+ var __defProp$z = Object.defineProperty;
6696
+ var __getOwnPropDesc$D = Object.getOwnPropertyDescriptor;
6697
+ var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6698
+ var __decorateClass$H = (decorators, target, key, kind) => {
6699
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$D(target, key) : target;
6817
6700
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
6818
6701
  if (decorator = decorators[i])
6819
6702
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
6820
- if (kind && result) __defProp$w(target, key, result);
6703
+ if (kind && result) __defProp$z(target, key, result);
6821
6704
  return result;
6822
6705
  };
6823
- var __publicField$g = (obj, key, value) => __defNormalProp$g(obj, key + "" , value);
6706
+ var __publicField$h = (obj, key, value) => __defNormalProp$h(obj, key + "" , value);
6824
6707
  exports.ColorFilterEffect = class ColorFilterEffect extends exports.Effect {
6825
6708
  _colorMatrix = new ColorMatrix();
6826
6709
  constructor(properties, children = []) {
@@ -6870,7 +6753,7 @@ exports.ColorFilterEffect = class ColorFilterEffect extends exports.Effect {
6870
6753
  });
6871
6754
  }
6872
6755
  };
6873
- __publicField$g(exports.ColorFilterEffect, "material", new Material({
6756
+ __publicField$h(exports.ColorFilterEffect, "material", new Material({
6874
6757
  vert: `precision mediump float;
6875
6758
  attribute vec2 position;
6876
6759
  attribute vec2 uv;
@@ -6897,25 +6780,25 @@ void main(void) {
6897
6780
  );
6898
6781
  }`
6899
6782
  }));
6900
- __decorateClass$E([
6783
+ __decorateClass$H([
6901
6784
  property()
6902
6785
  ], exports.ColorFilterEffect.prototype, "filter", 2);
6903
- exports.ColorFilterEffect = __decorateClass$E([
6786
+ exports.ColorFilterEffect = __decorateClass$H([
6904
6787
  customNode("ColorFilterEffect")
6905
6788
  ], exports.ColorFilterEffect);
6906
6789
 
6907
- var __defProp$v = Object.defineProperty;
6908
- var __getOwnPropDesc$B = Object.getOwnPropertyDescriptor;
6909
- var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6910
- var __decorateClass$D = (decorators, target, key, kind) => {
6911
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$B(target, key) : target;
6790
+ var __defProp$y = Object.defineProperty;
6791
+ var __getOwnPropDesc$C = Object.getOwnPropertyDescriptor;
6792
+ var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6793
+ var __decorateClass$G = (decorators, target, key, kind) => {
6794
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$C(target, key) : target;
6912
6795
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
6913
6796
  if (decorator = decorators[i])
6914
6797
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
6915
- if (kind && result) __defProp$v(target, key, result);
6798
+ if (kind && result) __defProp$y(target, key, result);
6916
6799
  return result;
6917
6800
  };
6918
- var __publicField$f = (obj, key, value) => __defNormalProp$f(obj, key + "" , value);
6801
+ var __publicField$g = (obj, key, value) => __defNormalProp$g(obj, key + "" , value);
6919
6802
  const MAX_COLORS$1 = 50;
6920
6803
  exports.ColorOverlayEffect = class ColorOverlayEffect extends exports.Effect {
6921
6804
  _color = new Color();
@@ -6941,7 +6824,7 @@ exports.ColorOverlayEffect = class ColorOverlayEffect extends exports.Effect {
6941
6824
  });
6942
6825
  }
6943
6826
  };
6944
- __publicField$f(exports.ColorOverlayEffect, "material", new Material({
6827
+ __publicField$g(exports.ColorOverlayEffect, "material", new Material({
6945
6828
  vert: `precision mediump float;
6946
6829
  attribute vec2 position;
6947
6830
  attribute vec2 uv;
@@ -6988,28 +6871,28 @@ void main(void) {
6988
6871
  gl_FragColor = vec4(mix(color.rgb, mask.rgb, color.a * mask.a), color.a);
6989
6872
  }`
6990
6873
  }));
6991
- __decorateClass$D([
6874
+ __decorateClass$G([
6992
6875
  property({ default: [] })
6993
6876
  ], exports.ColorOverlayEffect.prototype, "colors", 2);
6994
- __decorateClass$D([
6877
+ __decorateClass$G([
6995
6878
  property({ default: 0.5 })
6996
6879
  ], exports.ColorOverlayEffect.prototype, "alpha", 2);
6997
- exports.ColorOverlayEffect = __decorateClass$D([
6880
+ exports.ColorOverlayEffect = __decorateClass$G([
6998
6881
  customNode("ColorOverlayEffect")
6999
6882
  ], exports.ColorOverlayEffect);
7000
6883
 
7001
- var __defProp$u = Object.defineProperty;
7002
- var __getOwnPropDesc$A = Object.getOwnPropertyDescriptor;
7003
- var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7004
- var __decorateClass$C = (decorators, target, key, kind) => {
7005
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$A(target, key) : target;
6884
+ var __defProp$x = Object.defineProperty;
6885
+ var __getOwnPropDesc$B = Object.getOwnPropertyDescriptor;
6886
+ var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6887
+ var __decorateClass$F = (decorators, target, key, kind) => {
6888
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$B(target, key) : target;
7006
6889
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
7007
6890
  if (decorator = decorators[i])
7008
6891
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
7009
- if (kind && result) __defProp$u(target, key, result);
6892
+ if (kind && result) __defProp$x(target, key, result);
7010
6893
  return result;
7011
6894
  };
7012
- var __publicField$e = (obj, key, value) => __defNormalProp$e(obj, key + "" , value);
6895
+ var __publicField$f = (obj, key, value) => __defNormalProp$f(obj, key + "" , value);
7013
6896
  exports.ColorRemoveEffect = class ColorRemoveEffect extends exports.Effect {
7014
6897
  _color = new Color();
7015
6898
  constructor(properties, children = []) {
@@ -7040,7 +6923,7 @@ exports.ColorRemoveEffect = class ColorRemoveEffect extends exports.Effect {
7040
6923
  });
7041
6924
  }
7042
6925
  };
7043
- __publicField$e(exports.ColorRemoveEffect, "material", new Material({
6926
+ __publicField$f(exports.ColorRemoveEffect, "material", new Material({
7044
6927
  vert: `precision mediump float;
7045
6928
  attribute vec2 position;
7046
6929
  attribute vec2 uv;
@@ -7073,28 +6956,28 @@ void main(void) {
7073
6956
  gl_FragColor = color;
7074
6957
  }`
7075
6958
  }));
7076
- __decorateClass$C([
6959
+ __decorateClass$F([
7077
6960
  property({ default: [] })
7078
6961
  ], exports.ColorRemoveEffect.prototype, "colors", 2);
7079
- __decorateClass$C([
6962
+ __decorateClass$F([
7080
6963
  property({ default: 0.5 })
7081
6964
  ], exports.ColorRemoveEffect.prototype, "epsilon", 2);
7082
- exports.ColorRemoveEffect = __decorateClass$C([
6965
+ exports.ColorRemoveEffect = __decorateClass$F([
7083
6966
  customNode("ColorRemoveEffect")
7084
6967
  ], exports.ColorRemoveEffect);
7085
6968
 
7086
- var __defProp$t = Object.defineProperty;
7087
- var __getOwnPropDesc$z = Object.getOwnPropertyDescriptor;
7088
- var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7089
- var __decorateClass$B = (decorators, target, key, kind) => {
7090
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$z(target, key) : target;
6969
+ var __defProp$w = Object.defineProperty;
6970
+ var __getOwnPropDesc$A = Object.getOwnPropertyDescriptor;
6971
+ var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6972
+ var __decorateClass$E = (decorators, target, key, kind) => {
6973
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$A(target, key) : target;
7091
6974
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
7092
6975
  if (decorator = decorators[i])
7093
6976
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
7094
- if (kind && result) __defProp$t(target, key, result);
6977
+ if (kind && result) __defProp$w(target, key, result);
7095
6978
  return result;
7096
6979
  };
7097
- var __publicField$d = (obj, key, value) => __defNormalProp$d(obj, key + "" , value);
6980
+ var __publicField$e = (obj, key, value) => __defNormalProp$e(obj, key + "" , value);
7098
6981
  const MAX_COLORS = 50;
7099
6982
  exports.ColorReplaceEffect = class ColorReplaceEffect extends exports.Effect {
7100
6983
  _color = new Color();
@@ -7140,7 +7023,7 @@ exports.ColorReplaceEffect = class ColorReplaceEffect extends exports.Effect {
7140
7023
  });
7141
7024
  }
7142
7025
  };
7143
- __publicField$d(exports.ColorReplaceEffect, "material", new Material({
7026
+ __publicField$e(exports.ColorReplaceEffect, "material", new Material({
7144
7027
  vert: `precision mediump float;
7145
7028
  attribute vec2 position;
7146
7029
  attribute vec2 uv;
@@ -7180,13 +7063,13 @@ void main(void) {
7180
7063
  }
7181
7064
  }`
7182
7065
  }));
7183
- __decorateClass$B([
7066
+ __decorateClass$E([
7184
7067
  property({ default: [] })
7185
7068
  ], exports.ColorReplaceEffect.prototype, "colors", 2);
7186
- __decorateClass$B([
7069
+ __decorateClass$E([
7187
7070
  property({ default: 0.05 })
7188
7071
  ], exports.ColorReplaceEffect.prototype, "epsilon", 2);
7189
- exports.ColorReplaceEffect = __decorateClass$B([
7072
+ exports.ColorReplaceEffect = __decorateClass$E([
7190
7073
  customNode("ColorReplaceEffect")
7191
7074
  ], exports.ColorReplaceEffect);
7192
7075
 
@@ -7353,14 +7236,14 @@ class CanvasContext extends modernPath2d.Path2D {
7353
7236
  }
7354
7237
  }
7355
7238
 
7356
- var __defProp$s = Object.defineProperty;
7357
- var __getOwnPropDesc$y = Object.getOwnPropertyDescriptor;
7358
- var __decorateClass$A = (decorators, target, key, kind) => {
7359
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$y(target, key) : target;
7239
+ var __defProp$v = Object.defineProperty;
7240
+ var __getOwnPropDesc$z = Object.getOwnPropertyDescriptor;
7241
+ var __decorateClass$D = (decorators, target, key, kind) => {
7242
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$z(target, key) : target;
7360
7243
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
7361
7244
  if (decorator = decorators[i])
7362
7245
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
7363
- if (kind && result) __defProp$s(target, key, result);
7246
+ if (kind && result) __defProp$v(target, key, result);
7364
7247
  return result;
7365
7248
  };
7366
7249
  exports.CanvasItem = class CanvasItem extends exports.TimelineNode {
@@ -7522,19 +7405,19 @@ exports.CanvasItem = class CanvasItem extends exports.TimelineNode {
7522
7405
  super._render(renderer);
7523
7406
  }
7524
7407
  };
7525
- __decorateClass$A([
7408
+ __decorateClass$D([
7526
7409
  property()
7527
7410
  ], exports.CanvasItem.prototype, "modulate", 2);
7528
- __decorateClass$A([
7411
+ __decorateClass$D([
7529
7412
  property()
7530
7413
  ], exports.CanvasItem.prototype, "blendMode", 2);
7531
- __decorateClass$A([
7414
+ __decorateClass$D([
7532
7415
  protectedProperty({ default: true })
7533
7416
  ], exports.CanvasItem.prototype, "visible", 2);
7534
- __decorateClass$A([
7417
+ __decorateClass$D([
7535
7418
  protectedProperty({ default: 1 })
7536
7419
  ], exports.CanvasItem.prototype, "opacity", 2);
7537
- exports.CanvasItem = __decorateClass$A([
7420
+ exports.CanvasItem = __decorateClass$D([
7538
7421
  customNode("CanvasItem")
7539
7422
  ], exports.CanvasItem);
7540
7423
 
@@ -7564,14 +7447,14 @@ class RenderStack {
7564
7447
  }
7565
7448
  }
7566
7449
 
7567
- var __defProp$r = Object.defineProperty;
7568
- var __getOwnPropDesc$x = Object.getOwnPropertyDescriptor;
7569
- var __decorateClass$z = (decorators, target, key, kind) => {
7570
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$x(target, key) : target;
7450
+ var __defProp$u = Object.defineProperty;
7451
+ var __getOwnPropDesc$y = Object.getOwnPropertyDescriptor;
7452
+ var __decorateClass$C = (decorators, target, key, kind) => {
7453
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$y(target, key) : target;
7571
7454
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
7572
7455
  if (decorator = decorators[i])
7573
7456
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
7574
- if (kind && result) __defProp$r(target, key, result);
7457
+ if (kind && result) __defProp$u(target, key, result);
7575
7458
  return result;
7576
7459
  };
7577
7460
  exports.Timeline = class Timeline extends exports.Node {
@@ -7616,29 +7499,29 @@ exports.Timeline = class Timeline extends exports.Node {
7616
7499
  this.addTime(delta);
7617
7500
  }
7618
7501
  };
7619
- __decorateClass$z([
7502
+ __decorateClass$C([
7620
7503
  property({ default: 0 })
7621
7504
  ], exports.Timeline.prototype, "startTime", 2);
7622
- __decorateClass$z([
7505
+ __decorateClass$C([
7623
7506
  property({ default: 0 })
7624
7507
  ], exports.Timeline.prototype, "currentTime", 2);
7625
- __decorateClass$z([
7508
+ __decorateClass$C([
7626
7509
  property({ default: Number.MAX_SAFE_INTEGER })
7627
7510
  ], exports.Timeline.prototype, "endTime", 2);
7628
- __decorateClass$z([
7511
+ __decorateClass$C([
7629
7512
  property({ default: false })
7630
7513
  ], exports.Timeline.prototype, "loop", 2);
7631
- exports.Timeline = __decorateClass$z([
7514
+ exports.Timeline = __decorateClass$C([
7632
7515
  customNode("Timeline")
7633
7516
  ], exports.Timeline);
7634
7517
 
7635
- var __defProp$q = Object.defineProperty;
7636
- var __decorateClass$y = (decorators, target, key, kind) => {
7518
+ var __defProp$t = Object.defineProperty;
7519
+ var __decorateClass$B = (decorators, target, key, kind) => {
7637
7520
  var result = void 0 ;
7638
7521
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
7639
7522
  if (decorator = decorators[i])
7640
7523
  result = (decorator(target, key, result) ) || result;
7641
- if (result) __defProp$q(target, key, result);
7524
+ if (result) __defProp$t(target, key, result);
7642
7525
  return result;
7643
7526
  };
7644
7527
  class SceneTree extends MainLoop {
@@ -7711,19 +7594,19 @@ class SceneTree extends MainLoop {
7711
7594
  this.input.removeEventListeners();
7712
7595
  }
7713
7596
  }
7714
- __decorateClass$y([
7597
+ __decorateClass$B([
7715
7598
  property({ default: false })
7716
7599
  ], SceneTree.prototype, "processPaused");
7717
- __decorateClass$y([
7600
+ __decorateClass$B([
7718
7601
  property()
7719
7602
  ], SceneTree.prototype, "backgroundColor");
7720
- __decorateClass$y([
7603
+ __decorateClass$B([
7721
7604
  protectedProperty({ default: false })
7722
7605
  ], SceneTree.prototype, "debug");
7723
7606
 
7724
- var __getOwnPropDesc$w = Object.getOwnPropertyDescriptor;
7725
- var __decorateClass$x = (decorators, target, key, kind) => {
7726
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$w(target, key) : target;
7607
+ var __getOwnPropDesc$x = Object.getOwnPropertyDescriptor;
7608
+ var __decorateClass$A = (decorators, target, key, kind) => {
7609
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$x(target, key) : target;
7727
7610
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
7728
7611
  if (decorator = decorators[i])
7729
7612
  result = (decorator(result)) || result;
@@ -7735,7 +7618,7 @@ exports.Transition = class Transition extends exports.Effect {
7735
7618
  this.setProperties(properties).append(children);
7736
7619
  }
7737
7620
  };
7738
- exports.Transition = __decorateClass$x([
7621
+ exports.Transition = __decorateClass$A([
7739
7622
  customNode("Transition", {
7740
7623
  effectMode: "transition",
7741
7624
  processMode: "pausable",
@@ -7743,156 +7626,144 @@ exports.Transition = __decorateClass$x([
7743
7626
  })
7744
7627
  ], exports.Transition);
7745
7628
 
7746
- var __defProp$p = Object.defineProperty;
7747
- var __getOwnPropDesc$v = Object.getOwnPropertyDescriptor;
7748
- var __decorateClass$w = (decorators, target, key, kind) => {
7749
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$v(target, key) : target;
7629
+ var __defProp$s = Object.defineProperty;
7630
+ var __getOwnPropDesc$w = Object.getOwnPropertyDescriptor;
7631
+ var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7632
+ var __decorateClass$z = (decorators, target, key, kind) => {
7633
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$w(target, key) : target;
7750
7634
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
7751
7635
  if (decorator = decorators[i])
7752
7636
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
7753
- if (kind && result) __defProp$p(target, key, result);
7637
+ if (kind && result) __defProp$s(target, key, result);
7754
7638
  return result;
7755
7639
  };
7756
- const frag$1 = `varying vec2 vUv;
7640
+ var __publicField$d = (obj, key, value) => __defNormalProp$d(obj, typeof key !== "symbol" ? key + "" : key, value);
7641
+ const frag$2 = `varying vec2 vUv[9];
7757
7642
  uniform sampler2D sampler;
7758
- uniform vec2 uOffset;
7759
7643
 
7760
7644
  void main(void) {
7761
- vec4 color = vec4(0.0);
7762
- color += texture2D(sampler, vec2(vUv.x - uOffset.x, vUv.y + uOffset.y));
7763
- color += texture2D(sampler, vec2(vUv.x + uOffset.x, vUv.y + uOffset.y));
7764
- color += texture2D(sampler, vec2(vUv.x + uOffset.x, vUv.y - uOffset.y));
7765
- color += texture2D(sampler, vec2(vUv.x - uOffset.x, vUv.y - uOffset.y));
7766
- color *= 0.25;
7767
- gl_FragColor = color;
7768
- }`;
7769
- const clampFrag = `precision highp float;
7770
- varying vec2 vUv;
7771
- uniform sampler2D sampler;
7772
- uniform vec2 uOffset;
7773
- uniform vec4 uInputClamp;
7774
- void main(void) {
7775
- vec4 color = vec4(0.0);
7776
- color += texture2D(sampler, clamp(vec2(vUv.x - uOffset.x, vUv.y + uOffset.y), uInputClamp.xy, uInputClamp.zw));
7777
- color += texture2D(sampler, clamp(vec2(vUv.x + uOffset.x, vUv.y + uOffset.y), uInputClamp.xy, uInputClamp.zw));
7778
- color += texture2D(sampler, clamp(vec2(vUv.x + uOffset.x, vUv.y - uOffset.y), uInputClamp.xy, uInputClamp.zw));
7779
- color += texture2D(sampler, clamp(vec2(vUv.x - uOffset.x, vUv.y - uOffset.y), uInputClamp.xy, uInputClamp.zw));
7780
- color *= 0.25;
7781
- gl_FragColor = color;
7645
+ gl_FragColor = vec4(0.0);
7646
+ float flag = 0.0;
7647
+ for (int i = 0; i < 9; i++) {
7648
+ vec2 uv = vUv[i];
7649
+ if (uv.x < 0.0 || uv.x > 1.0 || uv.y < 0.0 || uv.y > 1.0) {
7650
+ flag = 1.0;
7651
+ break;
7652
+ }
7653
+ }
7654
+ if (flag == 1.0) {
7655
+ gl_FragColor += texture2D(sampler, vUv[4]) * 0.028532;
7656
+ gl_FragColor += texture2D(sampler, vUv[4]) * 0.067234;
7657
+ gl_FragColor += texture2D(sampler, vUv[4]) * 0.124009;
7658
+ gl_FragColor += texture2D(sampler, vUv[4]) * 0.179044;
7659
+ gl_FragColor += texture2D(sampler, vUv[4]) * 0.20236;
7660
+ gl_FragColor += texture2D(sampler, vUv[4]) * 0.179044;
7661
+ gl_FragColor += texture2D(sampler, vUv[4]) * 0.124009;
7662
+ gl_FragColor += texture2D(sampler, vUv[4]) * 0.067234;
7663
+ gl_FragColor += texture2D(sampler, vUv[4]) * 0.028532;
7664
+ } else {
7665
+ gl_FragColor += texture2D(sampler, vUv[0]) * 0.028532;
7666
+ gl_FragColor += texture2D(sampler, vUv[1]) * 0.067234;
7667
+ gl_FragColor += texture2D(sampler, vUv[2]) * 0.124009;
7668
+ gl_FragColor += texture2D(sampler, vUv[3]) * 0.179044;
7669
+ gl_FragColor += texture2D(sampler, vUv[4]) * 0.20236;
7670
+ gl_FragColor += texture2D(sampler, vUv[5]) * 0.179044;
7671
+ gl_FragColor += texture2D(sampler, vUv[6]) * 0.124009;
7672
+ gl_FragColor += texture2D(sampler, vUv[7]) * 0.067234;
7673
+ gl_FragColor += texture2D(sampler, vUv[8]) * 0.028532;
7674
+ }
7782
7675
  }`;
7783
- exports.KawaseBlurEffect = class KawaseBlurEffect extends exports.Effect {
7784
- material;
7785
- _kernels = [0];
7676
+ exports.GaussianBlurEffect = class GaussianBlurEffect extends exports.Effect {
7786
7677
  constructor(properties, children = []) {
7787
7678
  super();
7788
- this.material = new Material({
7789
- vert: `precision mediump float;
7790
- attribute vec2 position;
7791
- attribute vec2 uv;
7792
- varying vec2 vUv;
7793
- void main() {
7794
- gl_Position = vec4(position, 0.0, 1.0);
7795
- vUv = uv;
7796
- }`,
7797
- frag: properties?.clamp ? clampFrag : frag$1
7798
- });
7799
7679
  this.setProperties(properties).append(children);
7800
- this._generateKernels();
7801
- }
7802
- _updateProperty(key, value, oldValue, declaration) {
7803
- super._updateProperty(key, value, oldValue, declaration);
7804
- switch (key) {
7805
- case "quality":
7806
- case "strength":
7807
- this._generateKernels();
7808
- break;
7809
- }
7810
- }
7811
- /** Auto generate kernels by blur & quality */
7812
- _generateKernels() {
7813
- const blur = Math.max(1, Math.round(this.strength));
7814
- const quality = Math.max(1, Math.round(this.quality));
7815
- const kernels = [blur];
7816
- if (blur > 0) {
7817
- let k = blur;
7818
- const step = blur / quality;
7819
- for (let i = 1; i < quality; i++) {
7820
- k -= step;
7821
- kernels.push(k);
7822
- }
7823
- }
7824
- this._kernels = kernels;
7825
7680
  }
7826
7681
  apply(renderer, source) {
7827
- const uvX = this.pixelSize[0] / source.width;
7828
- const uvY = this.pixelSize[1] / source.height;
7829
- let offset;
7830
- if (this.quality === 1 || this.strength === 0) {
7831
- offset = this._kernels[0] + 0.5;
7682
+ const sx = 1 / source.width;
7683
+ const sy = 1 / source.height;
7684
+ const quality = Math.max(this.quality, 1);
7685
+ for (let i = 0; i < quality; i++) {
7832
7686
  source.redraw(renderer, () => {
7833
- QuadUvGeometry.draw(renderer, this.material, {
7687
+ QuadUvGeometry.draw(renderer, exports.GaussianBlurEffect.materialX, {
7834
7688
  sampler: 0,
7835
- uOffset: [
7836
- offset * uvX,
7837
- offset * uvY
7838
- ],
7839
- uInputClamp: [0, 0, 1, 1]
7689
+ uStrength: sx * (this.strength / quality)
7840
7690
  });
7841
7691
  });
7842
- } else {
7843
- const last = this.quality - 1;
7844
- for (let i = 0; i < last; i++) {
7845
- offset = this._kernels[i] + 0.5;
7846
- source.redraw(renderer, () => {
7847
- QuadUvGeometry.draw(renderer, this.material, {
7848
- sampler: 0,
7849
- uOffset: [
7850
- offset * uvX,
7851
- offset * uvY
7852
- ],
7853
- uInputClamp: [0, 0, 1, 1]
7854
- });
7692
+ }
7693
+ for (let i = 0; i < quality; i++) {
7694
+ source.redraw(renderer, () => {
7695
+ QuadUvGeometry.draw(renderer, exports.GaussianBlurEffect.materialY, {
7696
+ sampler: 0,
7697
+ uStrength: sy * (this.strength / quality)
7855
7698
  });
7856
- }
7857
- offset = this._kernels[last] + 0.5;
7858
- QuadUvGeometry.draw(renderer, this.material, {
7859
- sampler: 0,
7860
- uOffset: [
7861
- offset * uvX,
7862
- offset * uvY
7863
- ],
7864
- uInputClamp: [0, 0, 1, 1]
7865
7699
  });
7866
7700
  }
7867
7701
  }
7868
7702
  };
7869
- __decorateClass$w([
7703
+ __publicField$d(exports.GaussianBlurEffect, "materialX", new Material({
7704
+ vert: `attribute vec2 position;
7705
+ attribute vec2 uv;
7706
+ uniform float uStrength;
7707
+ varying vec2 vUv[9];
7708
+
7709
+ void main(void) {
7710
+ gl_Position = vec4(position, 0, 1);
7711
+ vUv[0] = uv + vec2(-4.0 * uStrength, 0.0);
7712
+ vUv[1] = uv + vec2(-3.0 * uStrength, 0.0);
7713
+ vUv[2] = uv + vec2(-2.0 * uStrength, 0.0);
7714
+ vUv[3] = uv + vec2(-1.0 * uStrength, 0.0);
7715
+ vUv[4] = uv + vec2(0.0 * uStrength, 0.0);
7716
+ vUv[5] = uv + vec2(1.0 * uStrength, 0.0);
7717
+ vUv[6] = uv + vec2(2.0 * uStrength, 0.0);
7718
+ vUv[7] = uv + vec2(3.0 * uStrength, 0.0);
7719
+ vUv[8] = uv + vec2(4.0 * uStrength, 0.0);
7720
+ }`,
7721
+ frag: frag$2
7722
+ }));
7723
+ __publicField$d(exports.GaussianBlurEffect, "materialY", new Material({
7724
+ vert: `attribute vec2 position;
7725
+ attribute vec2 uv;
7726
+ uniform float uStrength;
7727
+ varying vec2 vUv[9];
7728
+
7729
+ void main(void) {
7730
+ gl_Position = vec4(position, 0, 1);
7731
+ vUv[0] = uv + vec2(0.0, -4.0 * uStrength);
7732
+ vUv[1] = uv + vec2(0.0, -3.0 * uStrength);
7733
+ vUv[2] = uv + vec2(0.0, -2.0 * uStrength);
7734
+ vUv[3] = uv + vec2(0.0, -1.0 * uStrength);
7735
+ vUv[4] = uv + vec2(0.0, 0.0 * uStrength);
7736
+ vUv[5] = uv + vec2(0.0, 1.0 * uStrength);
7737
+ vUv[6] = uv + vec2(0.0, 2.0 * uStrength);
7738
+ vUv[7] = uv + vec2(0.0, 3.0 * uStrength);
7739
+ vUv[8] = uv + vec2(0.0, 4.0 * uStrength);
7740
+ }`,
7741
+ frag: frag$2
7742
+ }));
7743
+ __decorateClass$z([
7870
7744
  property({ default: 4 })
7871
- ], exports.KawaseBlurEffect.prototype, "strength", 2);
7872
- __decorateClass$w([
7745
+ ], exports.GaussianBlurEffect.prototype, "strength", 2);
7746
+ __decorateClass$z([
7873
7747
  property({ default: 3 })
7874
- ], exports.KawaseBlurEffect.prototype, "quality", 2);
7875
- __decorateClass$w([
7876
- property({ default: [1, 1] })
7877
- ], exports.KawaseBlurEffect.prototype, "pixelSize", 2);
7878
- exports.KawaseBlurEffect = __decorateClass$w([
7879
- customNode("KawaseBlurEffect")
7880
- ], exports.KawaseBlurEffect);
7748
+ ], exports.GaussianBlurEffect.prototype, "quality", 2);
7749
+ exports.GaussianBlurEffect = __decorateClass$z([
7750
+ customNode("GaussianBlurEffect")
7751
+ ], exports.GaussianBlurEffect);
7881
7752
 
7882
- var __defProp$o = Object.defineProperty;
7883
- var __getOwnPropDesc$u = Object.getOwnPropertyDescriptor;
7884
- var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$o(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7885
- var __decorateClass$v = (decorators, target, key, kind) => {
7886
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$u(target, key) : target;
7753
+ var __defProp$r = Object.defineProperty;
7754
+ var __getOwnPropDesc$v = Object.getOwnPropertyDescriptor;
7755
+ var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7756
+ var __decorateClass$y = (decorators, target, key, kind) => {
7757
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$v(target, key) : target;
7887
7758
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
7888
7759
  if (decorator = decorators[i])
7889
7760
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
7890
- if (kind && result) __defProp$o(target, key, result);
7761
+ if (kind && result) __defProp$r(target, key, result);
7891
7762
  return result;
7892
7763
  };
7893
7764
  var __publicField$c = (obj, key, value) => __defNormalProp$c(obj, key + "" , value);
7894
7765
  exports.DropShadowEffect = class DropShadowEffect extends exports.Effect {
7895
- kawaseBlurEffect = new exports.KawaseBlurEffect();
7766
+ blurEffect = new exports.GaussianBlurEffect();
7896
7767
  viewport3 = new exports.Viewport();
7897
7768
  _color = new Color();
7898
7769
  constructor(properties, children = []) {
@@ -7905,16 +7776,14 @@ exports.DropShadowEffect = class DropShadowEffect extends exports.Effect {
7905
7776
  this._color.value = this.color;
7906
7777
  QuadUvGeometry.draw(renderer, exports.DropShadowEffect.material, {
7907
7778
  sampler: 0,
7908
- uAlpha: this.alpha,
7779
+ uAlpha: this._color.a,
7909
7780
  uColor: this._color.toArray().slice(0, 3),
7910
- uOffset: [-this.offset[0], this.offset[1]],
7781
+ uOffset: [-this.offsetX, this.offsetY],
7911
7782
  uInputSize: [source.width, source.height, 1 / source.width, 1 / source.height]
7912
7783
  });
7913
7784
  });
7914
- this.kawaseBlurEffect.strength = this.blur;
7915
- this.kawaseBlurEffect.quality = this.quality;
7916
- this.kawaseBlurEffect.pixelSize = this.pixelSize;
7917
- this.kawaseBlurEffect.apply(renderer, this.viewport3);
7785
+ this.blurEffect.strength = this.blur;
7786
+ this.blurEffect.apply(renderer, this.viewport3);
7918
7787
  source.redraw(renderer, () => {
7919
7788
  this.viewport3.texture.activate(renderer, 1);
7920
7789
  QuadUvGeometry.draw(renderer, UvMaterial.instance, {
@@ -7953,40 +7822,34 @@ void main(void) {
7953
7822
  gl_FragColor = sample;
7954
7823
  }`
7955
7824
  }));
7956
- __decorateClass$v([
7957
- property({ default: [4, 4] })
7958
- ], exports.DropShadowEffect.prototype, "offset", 2);
7959
- __decorateClass$v([
7825
+ __decorateClass$y([
7960
7826
  property({ default: 0 })
7961
7827
  ], exports.DropShadowEffect.prototype, "color", 2);
7962
- __decorateClass$v([
7963
- property({ default: 1 })
7964
- ], exports.DropShadowEffect.prototype, "alpha", 2);
7965
- __decorateClass$v([
7966
- property({ default: false })
7967
- ], exports.DropShadowEffect.prototype, "shadowOnly", 2);
7968
- __decorateClass$v([
7969
- property({ default: 2 })
7828
+ __decorateClass$y([
7829
+ property({ default: 4 })
7970
7830
  ], exports.DropShadowEffect.prototype, "blur", 2);
7971
- __decorateClass$v([
7831
+ __decorateClass$y([
7972
7832
  property({ default: 4 })
7973
- ], exports.DropShadowEffect.prototype, "quality", 2);
7974
- __decorateClass$v([
7975
- property({ default: [1, 1] })
7976
- ], exports.DropShadowEffect.prototype, "pixelSize", 2);
7977
- exports.DropShadowEffect = __decorateClass$v([
7833
+ ], exports.DropShadowEffect.prototype, "offsetX", 2);
7834
+ __decorateClass$y([
7835
+ property({ default: 4 })
7836
+ ], exports.DropShadowEffect.prototype, "offsetY", 2);
7837
+ __decorateClass$y([
7838
+ property({ default: false })
7839
+ ], exports.DropShadowEffect.prototype, "shadowOnly", 2);
7840
+ exports.DropShadowEffect = __decorateClass$y([
7978
7841
  customNode("DropShadowEffect")
7979
7842
  ], exports.DropShadowEffect);
7980
7843
 
7981
- var __defProp$n = Object.defineProperty;
7982
- var __getOwnPropDesc$t = Object.getOwnPropertyDescriptor;
7983
- var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7984
- var __decorateClass$u = (decorators, target, key, kind) => {
7985
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$t(target, key) : target;
7844
+ var __defProp$q = Object.defineProperty;
7845
+ var __getOwnPropDesc$u = Object.getOwnPropertyDescriptor;
7846
+ var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7847
+ var __decorateClass$x = (decorators, target, key, kind) => {
7848
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$u(target, key) : target;
7986
7849
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
7987
7850
  if (decorator = decorators[i])
7988
7851
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
7989
- if (kind && result) __defProp$n(target, key, result);
7852
+ if (kind && result) __defProp$q(target, key, result);
7990
7853
  return result;
7991
7854
  };
7992
7855
  var __publicField$b = (obj, key, value) => __defNormalProp$b(obj, key + "" , value);
@@ -8031,22 +7894,22 @@ void main(void) {
8031
7894
  gl_FragColor = vec4(color.rgb * alpha, alpha);
8032
7895
  }`
8033
7896
  }));
8034
- __decorateClass$u([
7897
+ __decorateClass$x([
8035
7898
  property({ default: 5 })
8036
7899
  ], exports.EmbossEffect.prototype, "strength", 2);
8037
- exports.EmbossEffect = __decorateClass$u([
7900
+ exports.EmbossEffect = __decorateClass$x([
8038
7901
  customNode("EmbossEffect")
8039
7902
  ], exports.EmbossEffect);
8040
7903
 
8041
- var __defProp$m = Object.defineProperty;
8042
- var __getOwnPropDesc$s = Object.getOwnPropertyDescriptor;
8043
- var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8044
- var __decorateClass$t = (decorators, target, key, kind) => {
8045
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$s(target, key) : target;
7904
+ var __defProp$p = Object.defineProperty;
7905
+ var __getOwnPropDesc$t = Object.getOwnPropertyDescriptor;
7906
+ var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7907
+ var __decorateClass$w = (decorators, target, key, kind) => {
7908
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$t(target, key) : target;
8046
7909
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
8047
7910
  if (decorator = decorators[i])
8048
7911
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
8049
- if (kind && result) __defProp$m(target, key, result);
7912
+ if (kind && result) __defProp$p(target, key, result);
8050
7913
  return result;
8051
7914
  };
8052
7915
  var __publicField$a = (obj, key, value) => __defNormalProp$a(obj, key + "" , value);
@@ -8220,46 +8083,46 @@ void main(void) {
8220
8083
  gl_FragColor.a = texture2D(sampler, coord).a;
8221
8084
  }`
8222
8085
  }));
8223
- __decorateClass$t([
8086
+ __decorateClass$w([
8224
8087
  property({ default: 10 })
8225
8088
  ], exports.GlitchEffect.prototype, "slices", 2);
8226
- __decorateClass$t([
8089
+ __decorateClass$w([
8227
8090
  property({ default: 512 })
8228
8091
  ], exports.GlitchEffect.prototype, "sampleSize", 2);
8229
- __decorateClass$t([
8092
+ __decorateClass$w([
8230
8093
  property({ default: 100 })
8231
8094
  ], exports.GlitchEffect.prototype, "offset", 2);
8232
- __decorateClass$t([
8095
+ __decorateClass$w([
8233
8096
  property({ default: 0 })
8234
8097
  ], exports.GlitchEffect.prototype, "direction", 2);
8235
- __decorateClass$t([
8098
+ __decorateClass$w([
8236
8099
  property({ default: 2 })
8237
8100
  ], exports.GlitchEffect.prototype, "fillMode", 2);
8238
- __decorateClass$t([
8101
+ __decorateClass$w([
8239
8102
  property({ default: 0 })
8240
8103
  ], exports.GlitchEffect.prototype, "seed", 2);
8241
- __decorateClass$t([
8104
+ __decorateClass$w([
8242
8105
  property({ default: [2, 2] })
8243
8106
  ], exports.GlitchEffect.prototype, "red", 2);
8244
- __decorateClass$t([
8107
+ __decorateClass$w([
8245
8108
  property({ default: [-10, 4] })
8246
8109
  ], exports.GlitchEffect.prototype, "green", 2);
8247
- __decorateClass$t([
8110
+ __decorateClass$w([
8248
8111
  property({ default: [10, -4] })
8249
8112
  ], exports.GlitchEffect.prototype, "blue", 2);
8250
- exports.GlitchEffect = __decorateClass$t([
8113
+ exports.GlitchEffect = __decorateClass$w([
8251
8114
  customNode("GlitchEffect")
8252
8115
  ], exports.GlitchEffect);
8253
8116
 
8254
- var __defProp$l = Object.defineProperty;
8255
- var __getOwnPropDesc$r = Object.getOwnPropertyDescriptor;
8256
- var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8257
- var __decorateClass$s = (decorators, target, key, kind) => {
8258
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$r(target, key) : target;
8117
+ var __defProp$o = Object.defineProperty;
8118
+ var __getOwnPropDesc$s = Object.getOwnPropertyDescriptor;
8119
+ var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$o(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8120
+ var __decorateClass$v = (decorators, target, key, kind) => {
8121
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$s(target, key) : target;
8259
8122
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
8260
8123
  if (decorator = decorators[i])
8261
8124
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
8262
- if (kind && result) __defProp$l(target, key, result);
8125
+ if (kind && result) __defProp$o(target, key, result);
8263
8126
  return result;
8264
8127
  };
8265
8128
  var __publicField$9 = (obj, key, value) => __defNormalProp$9(obj, key + "" , value);
@@ -8437,40 +8300,151 @@ void main(void) {
8437
8300
  gl_FragColor = vec4(color.rgb + mist.rgb, color.a);
8438
8301
  }`
8439
8302
  }));
8440
- __decorateClass$s([
8303
+ __decorateClass$v([
8441
8304
  property({ default: 0 })
8442
8305
  ], exports.GodrayEffect.prototype, "time", 2);
8443
- __decorateClass$s([
8306
+ __decorateClass$v([
8444
8307
  property({ default: 30 })
8445
8308
  ], exports.GodrayEffect.prototype, "angle", 2);
8446
- __decorateClass$s([
8309
+ __decorateClass$v([
8447
8310
  property({ default: 0.5 })
8448
8311
  ], exports.GodrayEffect.prototype, "gain", 2);
8449
- __decorateClass$s([
8312
+ __decorateClass$v([
8450
8313
  property({ default: 2.5 })
8451
8314
  ], exports.GodrayEffect.prototype, "lacunarity", 2);
8452
- __decorateClass$s([
8315
+ __decorateClass$v([
8453
8316
  property({ default: true })
8454
8317
  ], exports.GodrayEffect.prototype, "parallel", 2);
8455
- __decorateClass$s([
8318
+ __decorateClass$v([
8456
8319
  property({ default: [0, 0] })
8457
8320
  ], exports.GodrayEffect.prototype, "center", 2);
8458
- __decorateClass$s([
8321
+ __decorateClass$v([
8459
8322
  property({ default: 1 })
8460
8323
  ], exports.GodrayEffect.prototype, "alpha", 2);
8461
- exports.GodrayEffect = __decorateClass$s([
8324
+ exports.GodrayEffect = __decorateClass$v([
8462
8325
  customNode("GodrayEffect")
8463
8326
  ], exports.GodrayEffect);
8464
8327
 
8465
- var __defProp$k = Object.defineProperty;
8328
+ var __defProp$n = Object.defineProperty;
8329
+ var __getOwnPropDesc$r = Object.getOwnPropertyDescriptor;
8330
+ var __decorateClass$u = (decorators, target, key, kind) => {
8331
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$r(target, key) : target;
8332
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
8333
+ if (decorator = decorators[i])
8334
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
8335
+ if (kind && result) __defProp$n(target, key, result);
8336
+ return result;
8337
+ };
8338
+ const frag$1 = `varying vec2 vUv;
8339
+ uniform sampler2D sampler;
8340
+ uniform vec2 uOffset;
8341
+
8342
+ void main(void) {
8343
+ vec4 color = vec4(0.0);
8344
+ color += texture2D(sampler, vec2(vUv.x - uOffset.x, vUv.y + uOffset.y));
8345
+ color += texture2D(sampler, vec2(vUv.x + uOffset.x, vUv.y + uOffset.y));
8346
+ color += texture2D(sampler, vec2(vUv.x + uOffset.x, vUv.y - uOffset.y));
8347
+ color += texture2D(sampler, vec2(vUv.x - uOffset.x, vUv.y - uOffset.y));
8348
+ color *= 0.25;
8349
+ gl_FragColor = color;
8350
+ }`;
8351
+ const clampFrag = `precision highp float;
8352
+ varying vec2 vUv;
8353
+ uniform sampler2D sampler;
8354
+ uniform vec2 uOffset;
8355
+ uniform vec4 uInputClamp;
8356
+ void main(void) {
8357
+ vec4 color = vec4(0.0);
8358
+ color += texture2D(sampler, clamp(vec2(vUv.x - uOffset.x, vUv.y + uOffset.y), uInputClamp.xy, uInputClamp.zw));
8359
+ color += texture2D(sampler, clamp(vec2(vUv.x + uOffset.x, vUv.y + uOffset.y), uInputClamp.xy, uInputClamp.zw));
8360
+ color += texture2D(sampler, clamp(vec2(vUv.x + uOffset.x, vUv.y - uOffset.y), uInputClamp.xy, uInputClamp.zw));
8361
+ color += texture2D(sampler, clamp(vec2(vUv.x - uOffset.x, vUv.y - uOffset.y), uInputClamp.xy, uInputClamp.zw));
8362
+ color *= 0.25;
8363
+ gl_FragColor = color;
8364
+ }`;
8365
+ exports.KawaseBlurEffect = class KawaseBlurEffect extends exports.Effect {
8366
+ material;
8367
+ _kernels = [0];
8368
+ constructor(properties, children = []) {
8369
+ super();
8370
+ this.material = new Material({
8371
+ vert: `precision mediump float;
8372
+ attribute vec2 position;
8373
+ attribute vec2 uv;
8374
+ varying vec2 vUv;
8375
+ void main() {
8376
+ gl_Position = vec4(position, 0.0, 1.0);
8377
+ vUv = uv;
8378
+ }`,
8379
+ frag: properties?.clamp ? clampFrag : frag$1
8380
+ });
8381
+ this.setProperties(properties).append(children);
8382
+ this._generateKernels();
8383
+ }
8384
+ _updateProperty(key, value, oldValue, declaration) {
8385
+ super._updateProperty(key, value, oldValue, declaration);
8386
+ switch (key) {
8387
+ case "quality":
8388
+ case "strength":
8389
+ this._generateKernels();
8390
+ break;
8391
+ }
8392
+ }
8393
+ /** Auto generate kernels by blur & quality */
8394
+ _generateKernels() {
8395
+ const blur = Math.max(1, Math.round(this.strength));
8396
+ const quality = Math.max(1, Math.round(this.quality));
8397
+ const kernels = [blur];
8398
+ if (blur > 0) {
8399
+ let k = blur;
8400
+ const step = blur / quality;
8401
+ for (let i = 1; i < quality; i++) {
8402
+ k -= step;
8403
+ kernels.push(k);
8404
+ }
8405
+ }
8406
+ this._kernels = kernels;
8407
+ }
8408
+ apply(renderer, source) {
8409
+ const uvX = this.pixelSize[0] / source.width;
8410
+ const uvY = this.pixelSize[1] / source.height;
8411
+ this._kernels.forEach((kernel) => {
8412
+ const offset = kernel + 0.5;
8413
+ source.redraw(renderer, () => {
8414
+ QuadUvGeometry.draw(renderer, this.material, {
8415
+ sampler: 0,
8416
+ uOffset: [
8417
+ offset * uvX,
8418
+ offset * uvY
8419
+ ],
8420
+ uInputClamp: [0, 0, 1, 1]
8421
+ });
8422
+ });
8423
+ });
8424
+ }
8425
+ };
8426
+ __decorateClass$u([
8427
+ property({ default: 4 })
8428
+ ], exports.KawaseBlurEffect.prototype, "strength", 2);
8429
+ __decorateClass$u([
8430
+ property({ default: 3 })
8431
+ ], exports.KawaseBlurEffect.prototype, "quality", 2);
8432
+ __decorateClass$u([
8433
+ property({ default: [1, 1] })
8434
+ ], exports.KawaseBlurEffect.prototype, "pixelSize", 2);
8435
+ exports.KawaseBlurEffect = __decorateClass$u([
8436
+ customNode("KawaseBlurEffect")
8437
+ ], exports.KawaseBlurEffect);
8438
+
8439
+ var __defProp$m = Object.defineProperty;
8466
8440
  var __getOwnPropDesc$q = Object.getOwnPropertyDescriptor;
8467
- var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8468
- var __decorateClass$r = (decorators, target, key, kind) => {
8441
+ var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8442
+ var __decorateClass$t = (decorators, target, key, kind) => {
8469
8443
  var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$q(target, key) : target;
8470
8444
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
8471
8445
  if (decorator = decorators[i])
8472
8446
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
8473
- if (kind && result) __defProp$k(target, key, result);
8447
+ if (kind && result) __defProp$m(target, key, result);
8474
8448
  return result;
8475
8449
  };
8476
8450
  var __publicField$8 = (obj, key, value) => __defNormalProp$8(obj, key + "" , value);
@@ -8559,25 +8533,25 @@ void main(void) {
8559
8533
  }
8560
8534
  }`
8561
8535
  }));
8562
- __decorateClass$r([
8536
+ __decorateClass$t([
8563
8537
  protectedProperty()
8564
8538
  ], exports.MaskEffect.prototype, "texture", 2);
8565
- __decorateClass$r([
8539
+ __decorateClass$t([
8566
8540
  property({ default: "" })
8567
8541
  ], exports.MaskEffect.prototype, "src", 2);
8568
- exports.MaskEffect = __decorateClass$r([
8542
+ exports.MaskEffect = __decorateClass$t([
8569
8543
  customNode("MaskEffect")
8570
8544
  ], exports.MaskEffect);
8571
8545
 
8572
- var __defProp$j = Object.defineProperty;
8546
+ var __defProp$l = Object.defineProperty;
8573
8547
  var __getOwnPropDesc$p = Object.getOwnPropertyDescriptor;
8574
- var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8575
- var __decorateClass$q = (decorators, target, key, kind) => {
8548
+ var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8549
+ var __decorateClass$s = (decorators, target, key, kind) => {
8576
8550
  var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$p(target, key) : target;
8577
8551
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
8578
8552
  if (decorator = decorators[i])
8579
8553
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
8580
- if (kind && result) __defProp$j(target, key, result);
8554
+ if (kind && result) __defProp$l(target, key, result);
8581
8555
  return result;
8582
8556
  };
8583
8557
  var __publicField$7 = (obj, key, value) => __defNormalProp$7(obj, typeof key !== "symbol" ? key + "" : key, value);
@@ -8651,11 +8625,11 @@ void main() {
8651
8625
  QuadUvGeometry.draw(renderer, this.material, {
8652
8626
  sampler: 0,
8653
8627
  uThickness: [
8654
- this.thickness / source.width,
8655
- this.thickness / source.height
8628
+ this.width / source.width,
8629
+ this.width / source.height
8656
8630
  ],
8657
8631
  uColor: this._color.toArray().slice(0, 3),
8658
- uAlpha: this.alpha,
8632
+ uAlpha: this.opacity !== 1 ? this.opacity : this._color.a,
8659
8633
  uAngleStep: exports.OutlineEffect.getAngleStep(this.quality),
8660
8634
  uKnockout: this.knockout ? 1 : 0,
8661
8635
  uInputClamp: [0, 0, 1, 1]
@@ -8665,34 +8639,40 @@ void main() {
8665
8639
  };
8666
8640
  __publicField$7(exports.OutlineEffect, "MIN_SAMPLES", 1);
8667
8641
  __publicField$7(exports.OutlineEffect, "MAX_SAMPLES", 100);
8668
- __decorateClass$q([
8669
- property({ default: 1 })
8670
- ], exports.OutlineEffect.prototype, "thickness", 2);
8671
- __decorateClass$q([
8642
+ __decorateClass$s([
8672
8643
  property({ default: 0 })
8673
8644
  ], exports.OutlineEffect.prototype, "color", 2);
8674
- __decorateClass$q([
8645
+ __decorateClass$s([
8675
8646
  property({ default: 1 })
8676
- ], exports.OutlineEffect.prototype, "alpha", 2);
8677
- __decorateClass$q([
8647
+ ], exports.OutlineEffect.prototype, "width", 2);
8648
+ __decorateClass$s([
8649
+ property({ default: "solid" })
8650
+ ], exports.OutlineEffect.prototype, "style", 2);
8651
+ __decorateClass$s([
8652
+ property()
8653
+ ], exports.OutlineEffect.prototype, "image", 2);
8654
+ __decorateClass$s([
8655
+ property({ default: 1 })
8656
+ ], exports.OutlineEffect.prototype, "opacity", 2);
8657
+ __decorateClass$s([
8678
8658
  property({ default: 0.1 })
8679
8659
  ], exports.OutlineEffect.prototype, "quality", 2);
8680
- __decorateClass$q([
8660
+ __decorateClass$s([
8681
8661
  property({ default: false })
8682
8662
  ], exports.OutlineEffect.prototype, "knockout", 2);
8683
- exports.OutlineEffect = __decorateClass$q([
8663
+ exports.OutlineEffect = __decorateClass$s([
8684
8664
  customNode("OutlineEffect")
8685
8665
  ], exports.OutlineEffect);
8686
8666
 
8687
- var __defProp$i = Object.defineProperty;
8667
+ var __defProp$k = Object.defineProperty;
8688
8668
  var __getOwnPropDesc$o = Object.getOwnPropertyDescriptor;
8689
- var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8690
- var __decorateClass$p = (decorators, target, key, kind) => {
8669
+ var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8670
+ var __decorateClass$r = (decorators, target, key, kind) => {
8691
8671
  var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$o(target, key) : target;
8692
8672
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
8693
8673
  if (decorator = decorators[i])
8694
8674
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
8695
- if (kind && result) __defProp$i(target, key, result);
8675
+ if (kind && result) __defProp$k(target, key, result);
8696
8676
  return result;
8697
8677
  };
8698
8678
  var __publicField$6 = (obj, key, value) => __defNormalProp$6(obj, key + "" , value);
@@ -8748,22 +8728,22 @@ void main(void) {
8748
8728
  gl_FragColor = texture2D(sampler, coord);
8749
8729
  }`
8750
8730
  }));
8751
- __decorateClass$p([
8731
+ __decorateClass$r([
8752
8732
  property({ default: 10 })
8753
8733
  ], exports.PixelateEffect.prototype, "strength", 2);
8754
- exports.PixelateEffect = __decorateClass$p([
8734
+ exports.PixelateEffect = __decorateClass$r([
8755
8735
  customNode("PixelateEffect")
8756
8736
  ], exports.PixelateEffect);
8757
8737
 
8758
- var __defProp$h = Object.defineProperty;
8738
+ var __defProp$j = Object.defineProperty;
8759
8739
  var __getOwnPropDesc$n = Object.getOwnPropertyDescriptor;
8760
- var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8761
- var __decorateClass$o = (decorators, target, key, kind) => {
8740
+ var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8741
+ var __decorateClass$q = (decorators, target, key, kind) => {
8762
8742
  var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$n(target, key) : target;
8763
8743
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
8764
8744
  if (decorator = decorators[i])
8765
8745
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
8766
- if (kind && result) __defProp$h(target, key, result);
8746
+ if (kind && result) __defProp$j(target, key, result);
8767
8747
  return result;
8768
8748
  };
8769
8749
  var __publicField$5 = (obj, key, value) => __defNormalProp$5(obj, key + "" , value);
@@ -8772,11 +8752,18 @@ exports.ZoomBlurEffect = class ZoomBlurEffect extends exports.Effect {
8772
8752
  super();
8773
8753
  this.setProperties(properties).append(children);
8774
8754
  }
8775
- apply(renderer, source) {
8755
+ apply(renderer, source, context) {
8756
+ let center = this.center;
8757
+ if (context.targetArea) {
8758
+ center = [
8759
+ (context.targetArea[0] + context.targetArea[2] / 2) * source.width,
8760
+ (context.targetArea[1] + context.targetArea[3] / 2) * source.height
8761
+ ];
8762
+ }
8776
8763
  source.redraw(renderer, () => {
8777
8764
  QuadUvGeometry.draw(renderer, exports.ZoomBlurEffect.material, {
8778
8765
  sampler: 0,
8779
- uCenter: this.center ?? [source.width / 2, source.height / 2],
8766
+ uCenter: center ?? [source.width / 2, source.height / 2],
8780
8767
  uInnerRadius: this.innerRadius,
8781
8768
  uRadius: this.radius,
8782
8769
  uStrength: this.strength,
@@ -8869,22 +8856,134 @@ void main() {
8869
8856
  gl_FragColor = color;
8870
8857
  }`
8871
8858
  }));
8872
- __decorateClass$o([
8859
+ __decorateClass$q([
8873
8860
  property()
8874
8861
  ], exports.ZoomBlurEffect.prototype, "center", 2);
8875
- __decorateClass$o([
8862
+ __decorateClass$q([
8876
8863
  property({ default: 20 })
8877
8864
  ], exports.ZoomBlurEffect.prototype, "innerRadius", 2);
8878
- __decorateClass$o([
8865
+ __decorateClass$q([
8879
8866
  property({ default: -1 })
8880
8867
  ], exports.ZoomBlurEffect.prototype, "radius", 2);
8881
- __decorateClass$o([
8868
+ __decorateClass$q([
8882
8869
  property({ default: 0.1 })
8883
8870
  ], exports.ZoomBlurEffect.prototype, "strength", 2);
8884
- exports.ZoomBlurEffect = __decorateClass$o([
8871
+ exports.ZoomBlurEffect = __decorateClass$q([
8885
8872
  customNode("ZoomBlurEffect")
8886
8873
  ], exports.ZoomBlurEffect);
8887
8874
 
8875
+ var __defProp$i = Object.defineProperty;
8876
+ var __decorateClass$p = (decorators, target, key, kind) => {
8877
+ var result = void 0 ;
8878
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
8879
+ if (decorator = decorators[i])
8880
+ result = (decorator(target, key, result) ) || result;
8881
+ if (result) __defProp$i(target, key, result);
8882
+ return result;
8883
+ };
8884
+ class BaseElement2DOutline extends CoreObject {
8885
+ constructor(parent) {
8886
+ super();
8887
+ this.parent = parent;
8888
+ }
8889
+ _updateProperty(key, value, oldValue, declaration) {
8890
+ super._updateProperty(key, value, oldValue, declaration);
8891
+ switch (key) {
8892
+ case "color":
8893
+ case "width":
8894
+ case "style":
8895
+ case "image":
8896
+ case "opacity":
8897
+ this.updateEffect();
8898
+ break;
8899
+ }
8900
+ }
8901
+ updateEffect() {
8902
+ const name = "__$outline";
8903
+ let effect = this.parent.getNode(name);
8904
+ if (this.width) {
8905
+ if (!effect) {
8906
+ effect = new exports.OutlineEffect({ name });
8907
+ this.parent.appendChild(effect, "back");
8908
+ }
8909
+ effect.setProperties(this.getProperties());
8910
+ } else {
8911
+ if (effect) {
8912
+ this.parent.removeChild(effect);
8913
+ }
8914
+ }
8915
+ }
8916
+ }
8917
+ __decorateClass$p([
8918
+ property({ default: "#000000" })
8919
+ ], BaseElement2DOutline.prototype, "color");
8920
+ __decorateClass$p([
8921
+ property({ default: 0 })
8922
+ ], BaseElement2DOutline.prototype, "width");
8923
+ __decorateClass$p([
8924
+ property({ default: "solid" })
8925
+ ], BaseElement2DOutline.prototype, "style");
8926
+ __decorateClass$p([
8927
+ property()
8928
+ ], BaseElement2DOutline.prototype, "image");
8929
+ __decorateClass$p([
8930
+ property({ default: 1 })
8931
+ ], BaseElement2DOutline.prototype, "opacity");
8932
+
8933
+ var __defProp$h = Object.defineProperty;
8934
+ var __decorateClass$o = (decorators, target, key, kind) => {
8935
+ var result = void 0 ;
8936
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
8937
+ if (decorator = decorators[i])
8938
+ result = (decorator(target, key, result) ) || result;
8939
+ if (result) __defProp$h(target, key, result);
8940
+ return result;
8941
+ };
8942
+ class BaseElement2DShadow extends CoreObject {
8943
+ constructor(parent) {
8944
+ super();
8945
+ this.parent = parent;
8946
+ }
8947
+ _updateProperty(key, value, oldValue, declaration) {
8948
+ super._updateProperty(key, value, oldValue, declaration);
8949
+ switch (key) {
8950
+ case "color":
8951
+ case "blur":
8952
+ case "offsetX":
8953
+ case "offsetY":
8954
+ this.updateEffect();
8955
+ break;
8956
+ }
8957
+ }
8958
+ updateEffect() {
8959
+ const name = "__$shadow";
8960
+ let effect = this.parent.getNode(name);
8961
+ if (this.blur || this.offsetX || this.offsetY) {
8962
+ if (!effect) {
8963
+ effect = new exports.DropShadowEffect({ name });
8964
+ this.parent.appendChild(effect, "back");
8965
+ }
8966
+ effect.setProperties(this.getProperties());
8967
+ } else {
8968
+ if (effect) {
8969
+ this.parent.removeChild(effect);
8970
+ }
8971
+ }
8972
+ }
8973
+ }
8974
+ __decorateClass$o([
8975
+ property({ default: "#000000" })
8976
+ ], BaseElement2DShadow.prototype, "color");
8977
+ __decorateClass$o([
8978
+ property({ default: 0 })
8979
+ ], BaseElement2DShadow.prototype, "blur");
8980
+ __decorateClass$o([
8981
+ property({ default: 0 })
8982
+ ], BaseElement2DShadow.prototype, "offsetY");
8983
+ __decorateClass$o([
8984
+ property({ default: 0 })
8985
+ ], BaseElement2DShadow.prototype, "offsetX");
8986
+
8888
8987
  class BaseElement2DStyle extends Resource {
8889
8988
  _backgroundColor = new Color();
8890
8989
  constructor(properties) {
@@ -9026,6 +9125,8 @@ exports.BaseElement2D = class BaseElement2D extends exports.Node2D {
9026
9125
  this._style?.off("updateProperty", cb);
9027
9126
  this._style = style;
9028
9127
  }
9128
+ shadow = new BaseElement2DShadow(this);
9129
+ outline = new BaseElement2DOutline(this);
9029
9130
  constructor(properties, nodes = []) {
9030
9131
  super();
9031
9132
  this._updateStyleProperty = this._updateStyleProperty.bind(this);
@@ -9034,8 +9135,10 @@ exports.BaseElement2D = class BaseElement2D extends exports.Node2D {
9034
9135
  }
9035
9136
  setProperties(properties) {
9036
9137
  if (properties) {
9037
- const { style, ...restProperties } = properties;
9138
+ const { style, shadow, outline, ...restProperties } = properties;
9038
9139
  style && this.style.setProperties(style);
9140
+ shadow && this.shadow.setProperties(shadow);
9141
+ outline && this.outline.setProperties(outline);
9039
9142
  super.setProperties(restProperties);
9040
9143
  }
9041
9144
  return this;
@@ -9092,9 +9195,6 @@ exports.BaseElement2D = class BaseElement2D extends exports.Node2D {
9092
9195
  case "filter":
9093
9196
  this.requestRepaint();
9094
9197
  break;
9095
- case "boxShadow":
9096
- this._updateBoxShadow();
9097
- break;
9098
9198
  case "maskImage":
9099
9199
  this._updateMaskImage();
9100
9200
  break;
@@ -9103,20 +9203,6 @@ exports.BaseElement2D = class BaseElement2D extends exports.Node2D {
9103
9203
  break;
9104
9204
  }
9105
9205
  }
9106
- _updateBoxShadow() {
9107
- const nodePath = "__$style.shadow";
9108
- if (this.style.boxShadow !== "none") {
9109
- const node = this.getNode(nodePath);
9110
- if (node) ; else {
9111
- this.appendChild(new exports.DropShadowEffect({ name: nodePath }), "back");
9112
- }
9113
- } else {
9114
- const node = this.getNode(nodePath);
9115
- if (node) {
9116
- this.removeChild(node);
9117
- }
9118
- }
9119
- }
9120
9206
  _updateMaskImage() {
9121
9207
  const nodePath = "__$style.maskImage";
9122
9208
  const maskImage = this.style.maskImage;
@@ -9319,6 +9405,8 @@ exports.BaseElement2D = class BaseElement2D extends exports.Node2D {
9319
9405
  ...json,
9320
9406
  props: {
9321
9407
  style: this.style.toJSON(),
9408
+ shadow: this.shadow.toJSON(),
9409
+ outline: this.outline.toJSON(),
9322
9410
  ...json.props
9323
9411
  }
9324
9412
  };