modern-canvas 0.2.1 → 0.2.2

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
@@ -2204,13 +2204,13 @@ class Vector3 extends Vector {
2204
2204
  }
2205
2205
  }
2206
2206
 
2207
- var __defProp$I = Object.defineProperty;
2208
- var __decorateClass$I = (decorators, target, key, kind) => {
2207
+ var __defProp$L = Object.defineProperty;
2208
+ var __decorateClass$L = (decorators, target, key, kind) => {
2209
2209
  var result = undefined ;
2210
2210
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
2211
2211
  if (decorator = decorators[i])
2212
2212
  result = (decorator(target, key, result) ) || result;
2213
- if (result) __defProp$I(target, key, result);
2213
+ if (result) __defProp$L(target, key, result);
2214
2214
  return result;
2215
2215
  };
2216
2216
  class MainLoop extends CoreObject {
@@ -2251,10 +2251,10 @@ class MainLoop extends CoreObject {
2251
2251
  }
2252
2252
  }
2253
2253
  }
2254
- __decorateClass$I([
2254
+ __decorateClass$L([
2255
2255
  property({ default: 24 })
2256
2256
  ], MainLoop.prototype, "fps");
2257
- __decorateClass$I([
2257
+ __decorateClass$L([
2258
2258
  property({ default: 1 })
2259
2259
  ], MainLoop.prototype, "speed");
2260
2260
 
@@ -4398,13 +4398,13 @@ class Geometry extends Resource {
4398
4398
  }
4399
4399
  }
4400
4400
 
4401
- var __defProp$H = Object.defineProperty;
4402
- var __decorateClass$H = (decorators, target, key, kind) => {
4401
+ var __defProp$K = Object.defineProperty;
4402
+ var __decorateClass$K = (decorators, target, key, kind) => {
4403
4403
  var result = undefined ;
4404
4404
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
4405
4405
  if (decorator = decorators[i])
4406
4406
  result = (decorator(target, key, result) ) || result;
4407
- if (result) __defProp$H(target, key, result);
4407
+ if (result) __defProp$K(target, key, result);
4408
4408
  return result;
4409
4409
  };
4410
4410
  class IndexBuffer extends Resource {
@@ -4448,20 +4448,20 @@ class IndexBuffer extends Resource {
4448
4448
  return result;
4449
4449
  }
4450
4450
  }
4451
- __decorateClass$H([
4451
+ __decorateClass$K([
4452
4452
  protectedProperty({ default: null })
4453
4453
  ], IndexBuffer.prototype, "data");
4454
- __decorateClass$H([
4454
+ __decorateClass$K([
4455
4455
  protectedProperty({ default: false })
4456
4456
  ], IndexBuffer.prototype, "dynamic");
4457
4457
 
4458
- var __defProp$G = Object.defineProperty;
4459
- var __decorateClass$G = (decorators, target, key, kind) => {
4458
+ var __defProp$J = Object.defineProperty;
4459
+ var __decorateClass$J = (decorators, target, key, kind) => {
4460
4460
  var result = undefined ;
4461
4461
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
4462
4462
  if (decorator = decorators[i])
4463
4463
  result = (decorator(target, key, result) ) || result;
4464
- if (result) __defProp$G(target, key, result);
4464
+ if (result) __defProp$J(target, key, result);
4465
4465
  return result;
4466
4466
  };
4467
4467
  class VertexBuffer extends Resource {
@@ -4505,20 +4505,20 @@ class VertexBuffer extends Resource {
4505
4505
  return result;
4506
4506
  }
4507
4507
  }
4508
- __decorateClass$G([
4508
+ __decorateClass$J([
4509
4509
  protectedProperty({ default: null })
4510
4510
  ], VertexBuffer.prototype, "data");
4511
- __decorateClass$G([
4511
+ __decorateClass$J([
4512
4512
  protectedProperty({ default: false })
4513
4513
  ], VertexBuffer.prototype, "dynamic");
4514
4514
 
4515
- var __defProp$F = Object.defineProperty;
4516
- var __decorateClass$F = (decorators, target, key, kind) => {
4515
+ var __defProp$I = Object.defineProperty;
4516
+ var __decorateClass$I = (decorators, target, key, kind) => {
4517
4517
  var result = undefined ;
4518
4518
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
4519
4519
  if (decorator = decorators[i])
4520
4520
  result = (decorator(target, key, result) ) || result;
4521
- if (result) __defProp$F(target, key, result);
4521
+ if (result) __defProp$I(target, key, result);
4522
4522
  return result;
4523
4523
  };
4524
4524
  class VertexAttribute extends Resource {
@@ -4555,25 +4555,25 @@ class VertexAttribute extends Resource {
4555
4555
  return result;
4556
4556
  }
4557
4557
  }
4558
- __decorateClass$F([
4558
+ __decorateClass$I([
4559
4559
  protectedProperty()
4560
4560
  ], VertexAttribute.prototype, "buffer");
4561
- __decorateClass$F([
4561
+ __decorateClass$I([
4562
4562
  protectedProperty({ default: 0 })
4563
4563
  ], VertexAttribute.prototype, "size");
4564
- __decorateClass$F([
4564
+ __decorateClass$I([
4565
4565
  protectedProperty({ default: false })
4566
4566
  ], VertexAttribute.prototype, "normalized");
4567
- __decorateClass$F([
4567
+ __decorateClass$I([
4568
4568
  protectedProperty({ default: "float" })
4569
4569
  ], VertexAttribute.prototype, "type");
4570
- __decorateClass$F([
4570
+ __decorateClass$I([
4571
4571
  protectedProperty()
4572
4572
  ], VertexAttribute.prototype, "stride");
4573
- __decorateClass$F([
4573
+ __decorateClass$I([
4574
4574
  protectedProperty()
4575
4575
  ], VertexAttribute.prototype, "offset");
4576
- __decorateClass$F([
4576
+ __decorateClass$I([
4577
4577
  protectedProperty()
4578
4578
  ], VertexAttribute.prototype, "divisor");
4579
4579
 
@@ -4823,13 +4823,13 @@ class UvGeometry extends Geometry {
4823
4823
  }
4824
4824
  }
4825
4825
 
4826
- var __defProp$E = Object.defineProperty;
4827
- var __decorateClass$E = (decorators, target, key, kind) => {
4826
+ var __defProp$H = Object.defineProperty;
4827
+ var __decorateClass$H = (decorators, target, key, kind) => {
4828
4828
  var result = undefined ;
4829
4829
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
4830
4830
  if (decorator = decorators[i])
4831
4831
  result = (decorator(target, key, result) ) || result;
4832
- if (result) __defProp$E(target, key, result);
4832
+ if (result) __defProp$H(target, key, result);
4833
4833
  return result;
4834
4834
  };
4835
4835
  const style2DFilterDefault = {
@@ -5042,64 +5042,64 @@ class CanvasItemStyle extends Resource {
5042
5042
  return m;
5043
5043
  }
5044
5044
  }
5045
- __decorateClass$E([
5045
+ __decorateClass$H([
5046
5046
  property()
5047
5047
  ], CanvasItemStyle.prototype, "backgroundColor");
5048
- __decorateClass$E([
5048
+ __decorateClass$H([
5049
5049
  property()
5050
5050
  ], CanvasItemStyle.prototype, "backgroundImage");
5051
- __decorateClass$E([
5051
+ __decorateClass$H([
5052
5052
  property({ default: "" })
5053
5053
  ], CanvasItemStyle.prototype, "filter");
5054
- __decorateClass$E([
5054
+ __decorateClass$H([
5055
5055
  property({ default: "inherit" })
5056
5056
  ], CanvasItemStyle.prototype, "direction");
5057
- __decorateClass$E([
5057
+ __decorateClass$H([
5058
5058
  property({ default: "#000000" })
5059
5059
  ], CanvasItemStyle.prototype, "shadowColor");
5060
- __decorateClass$E([
5060
+ __decorateClass$H([
5061
5061
  property({ default: 0 })
5062
5062
  ], CanvasItemStyle.prototype, "shadowOffsetX");
5063
- __decorateClass$E([
5063
+ __decorateClass$H([
5064
5064
  property({ default: 0 })
5065
5065
  ], CanvasItemStyle.prototype, "shadowOffsetY");
5066
- __decorateClass$E([
5066
+ __decorateClass$H([
5067
5067
  property({ default: 0 })
5068
5068
  ], CanvasItemStyle.prototype, "shadowBlur");
5069
- __decorateClass$E([
5069
+ __decorateClass$H([
5070
5070
  property({ default: 1 })
5071
5071
  ], CanvasItemStyle.prototype, "opacity");
5072
- __decorateClass$E([
5072
+ __decorateClass$H([
5073
5073
  property({ default: 0 })
5074
5074
  ], CanvasItemStyle.prototype, "borderWidth");
5075
- __decorateClass$E([
5075
+ __decorateClass$H([
5076
5076
  property({ default: 0 })
5077
5077
  ], CanvasItemStyle.prototype, "borderRadius");
5078
- __decorateClass$E([
5078
+ __decorateClass$H([
5079
5079
  property({ default: "#000000" })
5080
5080
  ], CanvasItemStyle.prototype, "borderColor");
5081
- __decorateClass$E([
5081
+ __decorateClass$H([
5082
5082
  property({ default: "none" })
5083
5083
  ], CanvasItemStyle.prototype, "borderStyle");
5084
- __decorateClass$E([
5084
+ __decorateClass$H([
5085
5085
  property({ default: 0 })
5086
5086
  ], CanvasItemStyle.prototype, "outlineWidth");
5087
- __decorateClass$E([
5087
+ __decorateClass$H([
5088
5088
  property({ default: 0 })
5089
5089
  ], CanvasItemStyle.prototype, "outlineOffset");
5090
- __decorateClass$E([
5090
+ __decorateClass$H([
5091
5091
  property({ default: "#000000" })
5092
5092
  ], CanvasItemStyle.prototype, "outlineColor");
5093
- __decorateClass$E([
5093
+ __decorateClass$H([
5094
5094
  property({ default: "none" })
5095
5095
  ], CanvasItemStyle.prototype, "outlineStyle");
5096
- __decorateClass$E([
5096
+ __decorateClass$H([
5097
5097
  property({ default: "visible" })
5098
5098
  ], CanvasItemStyle.prototype, "visibility");
5099
- __decorateClass$E([
5099
+ __decorateClass$H([
5100
5100
  property({ default: "visible" })
5101
5101
  ], CanvasItemStyle.prototype, "overflow");
5102
- __decorateClass$E([
5102
+ __decorateClass$H([
5103
5103
  property({ default: "auto" })
5104
5104
  ], CanvasItemStyle.prototype, "pointerEvents");
5105
5105
  const transformStyle = modernIdoc.getDefaultTransformStyle();
@@ -5111,13 +5111,13 @@ for (const key in textStyle) {
5111
5111
  defineProperty(CanvasItemStyle, key, { default: textStyle[key] });
5112
5112
  }
5113
5113
 
5114
- var __defProp$D = Object.defineProperty;
5115
- var __decorateClass$D = (decorators, target, key, kind) => {
5114
+ var __defProp$G = Object.defineProperty;
5115
+ var __decorateClass$G = (decorators, target, key, kind) => {
5116
5116
  var result = undefined ;
5117
5117
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
5118
5118
  if (decorator = decorators[i])
5119
5119
  result = (decorator(target, key, result) ) || result;
5120
- if (result) __defProp$D(target, key, result);
5120
+ if (result) __defProp$G(target, key, result);
5121
5121
  return result;
5122
5122
  };
5123
5123
  class Texture2D extends Resource {
@@ -5243,32 +5243,32 @@ class Texture2D extends Resource {
5243
5243
  }
5244
5244
  }
5245
5245
  }
5246
- __decorateClass$D([
5246
+ __decorateClass$G([
5247
5247
  protectedProperty()
5248
5248
  ], Texture2D.prototype, "source");
5249
- __decorateClass$D([
5249
+ __decorateClass$G([
5250
5250
  property({ default: 0 })
5251
5251
  ], Texture2D.prototype, "width");
5252
- __decorateClass$D([
5252
+ __decorateClass$G([
5253
5253
  property({ default: 0 })
5254
5254
  ], Texture2D.prototype, "height");
5255
- __decorateClass$D([
5255
+ __decorateClass$G([
5256
5256
  property({ default: "linear" })
5257
5257
  ], Texture2D.prototype, "filterMode");
5258
- __decorateClass$D([
5258
+ __decorateClass$G([
5259
5259
  property({ default: "clamp_to_edge" })
5260
5260
  ], Texture2D.prototype, "wrapMode");
5261
- __decorateClass$D([
5261
+ __decorateClass$G([
5262
5262
  property({ default: 1 })
5263
5263
  ], Texture2D.prototype, "pixelRatio");
5264
5264
 
5265
- var __defProp$C = Object.defineProperty;
5266
- var __decorateClass$C = (decorators, target, key, kind) => {
5265
+ var __defProp$F = Object.defineProperty;
5266
+ var __decorateClass$F = (decorators, target, key, kind) => {
5267
5267
  var result = undefined ;
5268
5268
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
5269
5269
  if (decorator = decorators[i])
5270
5270
  result = (decorator(target, key, result) ) || result;
5271
- if (result) __defProp$C(target, key, result);
5271
+ if (result) __defProp$F(target, key, result);
5272
5272
  return result;
5273
5273
  };
5274
5274
  class CanvasTexture extends Texture2D {
@@ -5287,7 +5287,7 @@ class CanvasTexture extends Texture2D {
5287
5287
  super._updateProperty(key, value, oldValue, declaration);
5288
5288
  }
5289
5289
  }
5290
- __decorateClass$C([
5290
+ __decorateClass$F([
5291
5291
  property({ default: 2 })
5292
5292
  ], CanvasTexture.prototype, "pixelRatio");
5293
5293
 
@@ -5445,13 +5445,13 @@ class PixelsTexture extends Texture2D {
5445
5445
  }
5446
5446
  }
5447
5447
 
5448
- var __defProp$B = Object.defineProperty;
5449
- var __decorateClass$B = (decorators, target, key, kind) => {
5448
+ var __defProp$E = Object.defineProperty;
5449
+ var __decorateClass$E = (decorators, target, key, kind) => {
5450
5450
  var result = undefined ;
5451
5451
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
5452
5452
  if (decorator = decorators[i])
5453
5453
  result = (decorator(target, key, result) ) || result;
5454
- if (result) __defProp$B(target, key, result);
5454
+ if (result) __defProp$E(target, key, result);
5455
5455
  return result;
5456
5456
  };
5457
5457
  function resolveOptions(options) {
@@ -5695,10 +5695,10 @@ const _VideoTexture = class _VideoTexture extends Texture2D {
5695
5695
  }
5696
5696
  }
5697
5697
  };
5698
- __decorateClass$B([
5698
+ __decorateClass$E([
5699
5699
  protectedProperty({ default: true })
5700
5700
  ], _VideoTexture.prototype, "autoUpdate");
5701
- __decorateClass$B([
5701
+ __decorateClass$E([
5702
5702
  protectedProperty({ default: 0 })
5703
5703
  ], _VideoTexture.prototype, "fps");
5704
5704
  let VideoTexture = _VideoTexture;
@@ -5868,14 +5868,14 @@ class CanvasContext extends modernPath2d.Path2D {
5868
5868
  }
5869
5869
  }
5870
5870
 
5871
- var __defProp$A = Object.defineProperty;
5872
- var __getOwnPropDesc$z = Object.getOwnPropertyDescriptor;
5873
- var __decorateClass$A = (decorators, target, key, kind) => {
5874
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$z(target, key) : target;
5871
+ var __defProp$D = Object.defineProperty;
5872
+ var __getOwnPropDesc$C = Object.getOwnPropertyDescriptor;
5873
+ var __decorateClass$D = (decorators, target, key, kind) => {
5874
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$C(target, key) : target;
5875
5875
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
5876
5876
  if (decorator = decorators[i])
5877
5877
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
5878
- if (kind && result) __defProp$A(target, key, result);
5878
+ if (kind && result) __defProp$D(target, key, result);
5879
5879
  return result;
5880
5880
  };
5881
5881
  exports.Node = class Node extends CoreObject {
@@ -6300,33 +6300,33 @@ exports.Node = class Node extends CoreObject {
6300
6300
  return node;
6301
6301
  }
6302
6302
  };
6303
- __decorateClass$A([
6303
+ __decorateClass$D([
6304
6304
  property()
6305
6305
  ], exports.Node.prototype, "name", 2);
6306
- __decorateClass$A([
6306
+ __decorateClass$D([
6307
6307
  property()
6308
6308
  ], exports.Node.prototype, "mask", 2);
6309
- __decorateClass$A([
6309
+ __decorateClass$D([
6310
6310
  property({ default: "inherit" })
6311
6311
  ], exports.Node.prototype, "processMode", 2);
6312
- __decorateClass$A([
6312
+ __decorateClass$D([
6313
6313
  property({ default: "inherit" })
6314
6314
  ], exports.Node.prototype, "renderMode", 2);
6315
- __decorateClass$A([
6315
+ __decorateClass$D([
6316
6316
  property({ default: "default" })
6317
6317
  ], exports.Node.prototype, "internalMode", 2);
6318
- exports.Node = __decorateClass$A([
6318
+ exports.Node = __decorateClass$D([
6319
6319
  customNode("Node")
6320
6320
  ], exports.Node);
6321
6321
 
6322
- var __defProp$z = Object.defineProperty;
6323
- var __getOwnPropDesc$y = Object.getOwnPropertyDescriptor;
6324
- var __decorateClass$z = (decorators, target, key, kind) => {
6325
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$y(target, key) : target;
6322
+ var __defProp$C = Object.defineProperty;
6323
+ var __getOwnPropDesc$B = Object.getOwnPropertyDescriptor;
6324
+ var __decorateClass$C = (decorators, target, key, kind) => {
6325
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$B(target, key) : target;
6326
6326
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
6327
6327
  if (decorator = decorators[i])
6328
6328
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
6329
- if (kind && result) __defProp$z(target, key, result);
6329
+ if (kind && result) __defProp$C(target, key, result);
6330
6330
  return result;
6331
6331
  };
6332
6332
  exports.TimelineNode = class TimelineNode extends exports.Node {
@@ -6385,27 +6385,27 @@ exports.TimelineNode = class TimelineNode extends exports.Node {
6385
6385
  super._process(delta);
6386
6386
  }
6387
6387
  };
6388
- __decorateClass$z([
6388
+ __decorateClass$C([
6389
6389
  property({ default: 0 })
6390
6390
  ], exports.TimelineNode.prototype, "delay", 2);
6391
- __decorateClass$z([
6391
+ __decorateClass$C([
6392
6392
  property({ default: 0 })
6393
6393
  ], exports.TimelineNode.prototype, "duration", 2);
6394
- __decorateClass$z([
6394
+ __decorateClass$C([
6395
6395
  property({ default: false })
6396
6396
  ], exports.TimelineNode.prototype, "paused", 2);
6397
- exports.TimelineNode = __decorateClass$z([
6397
+ exports.TimelineNode = __decorateClass$C([
6398
6398
  customNode("TimelineNode")
6399
6399
  ], exports.TimelineNode);
6400
6400
 
6401
- var __defProp$y = Object.defineProperty;
6402
- var __getOwnPropDesc$x = Object.getOwnPropertyDescriptor;
6403
- var __decorateClass$y = (decorators, target, key, kind) => {
6404
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$x(target, key) : target;
6401
+ var __defProp$B = Object.defineProperty;
6402
+ var __getOwnPropDesc$A = Object.getOwnPropertyDescriptor;
6403
+ var __decorateClass$B = (decorators, target, key, kind) => {
6404
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$A(target, key) : target;
6405
6405
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
6406
6406
  if (decorator = decorators[i])
6407
6407
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
6408
- if (kind && result) __defProp$y(target, key, result);
6408
+ if (kind && result) __defProp$B(target, key, result);
6409
6409
  return result;
6410
6410
  };
6411
6411
  exports.CanvasItem = class CanvasItem extends exports.TimelineNode {
@@ -6423,10 +6423,11 @@ exports.CanvasItem = class CanvasItem extends exports.TimelineNode {
6423
6423
  }
6424
6424
  /** @internal */
6425
6425
  opacity = 1;
6426
+ visible = true;
6426
6427
  _parentOpacity;
6428
+ _parentVisible;
6427
6429
  _modulate = new Color(4294967295);
6428
6430
  _backgroundImage;
6429
- _computedVisible = true;
6430
6431
  // Batch render
6431
6432
  context = new CanvasContext();
6432
6433
  _resetContext = true;
@@ -6460,9 +6461,6 @@ exports.CanvasItem = class CanvasItem extends exports.TimelineNode {
6460
6461
  this._modulate.value = value;
6461
6462
  this.requestRepaint();
6462
6463
  break;
6463
- case "visible":
6464
- this._updateVisible();
6465
- break;
6466
6464
  }
6467
6465
  }
6468
6466
  // eslint-disable-next-line unused-imports/no-unused-vars
@@ -6484,7 +6482,7 @@ exports.CanvasItem = class CanvasItem extends exports.TimelineNode {
6484
6482
  this.requestRedraw();
6485
6483
  break;
6486
6484
  case "visibility":
6487
- this.visible = value === "visible";
6485
+ this._updateVisible();
6488
6486
  break;
6489
6487
  }
6490
6488
  }
@@ -6501,27 +6499,31 @@ exports.CanvasItem = class CanvasItem extends exports.TimelineNode {
6501
6499
  this.requestRedraw();
6502
6500
  }
6503
6501
  _updateOpacity() {
6504
- const opacity = this.style.getComputedOpacity() * (this._parent?.opacity ?? 1);
6502
+ const opacity = this.style.getComputedOpacity() * (this.getParent()?.opacity ?? 1);
6505
6503
  if (this.opacity !== opacity) {
6506
6504
  this.opacity = opacity;
6507
6505
  this.requestRepaint();
6508
6506
  }
6509
6507
  }
6508
+ _updateCurrentTime(force = false) {
6509
+ super._updateCurrentTime(force);
6510
+ this._updateVisible();
6511
+ }
6510
6512
  _updateVisible() {
6511
- let visible = this.visible ?? this._parent?._computedVisible ?? true;
6513
+ let visible = this.style.visibility === "visible" && (this.getParent()?.visible ?? true);
6512
6514
  if (visible && !this.isInsideTimeRange()) {
6513
6515
  visible = false;
6514
6516
  }
6515
- this._computedVisible = visible;
6517
+ this.visible = visible;
6516
6518
  }
6517
6519
  show() {
6518
- this.visible = true;
6520
+ this.style.visibility = "visible";
6519
6521
  }
6520
6522
  hide() {
6521
- this.visible = false;
6523
+ this.style.visibility = "hidden";
6522
6524
  }
6523
6525
  isVisibleInTree() {
6524
- return this.opacity > 0 && this._computedVisible;
6526
+ return this.opacity > 0 && this.visible;
6525
6527
  }
6526
6528
  canRender() {
6527
6529
  return super.canRender() && this.isVisibleInTree();
@@ -6536,10 +6538,13 @@ exports.CanvasItem = class CanvasItem extends exports.TimelineNode {
6536
6538
  this._repainting = true;
6537
6539
  }
6538
6540
  _process(delta) {
6539
- this._updateVisible();
6540
- const parentOpacity = this._parent?.opacity;
6541
- if (parentOpacity !== this._parentOpacity) {
6542
- this._parentOpacity = parentOpacity;
6541
+ const parent = this.getParent();
6542
+ if (this._parentVisible !== parent?.visible) {
6543
+ this._parentVisible = parent?.visible;
6544
+ this._updateVisible();
6545
+ }
6546
+ if (this._parentOpacity !== parent?.opacity) {
6547
+ this._parentOpacity = parent?.opacity;
6543
6548
  this._updateOpacity();
6544
6549
  }
6545
6550
  super._process(delta);
@@ -6658,16 +6663,13 @@ exports.CanvasItem = class CanvasItem extends exports.TimelineNode {
6658
6663
  };
6659
6664
  }
6660
6665
  };
6661
- __decorateClass$y([
6662
- property({ default: true })
6663
- ], exports.CanvasItem.prototype, "visible", 2);
6664
- __decorateClass$y([
6666
+ __decorateClass$B([
6665
6667
  property()
6666
6668
  ], exports.CanvasItem.prototype, "modulate", 2);
6667
- __decorateClass$y([
6669
+ __decorateClass$B([
6668
6670
  property()
6669
6671
  ], exports.CanvasItem.prototype, "blendMode", 2);
6670
- exports.CanvasItem = __decorateClass$y([
6672
+ exports.CanvasItem = __decorateClass$B([
6671
6673
  customNode("CanvasItem")
6672
6674
  ], exports.CanvasItem);
6673
6675
 
@@ -6697,14 +6699,14 @@ class RenderStack extends exports.Node {
6697
6699
  }
6698
6700
  }
6699
6701
 
6700
- var __defProp$x = Object.defineProperty;
6701
- var __getOwnPropDesc$w = Object.getOwnPropertyDescriptor;
6702
- var __decorateClass$x = (decorators, target, key, kind) => {
6703
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$w(target, key) : target;
6702
+ var __defProp$A = Object.defineProperty;
6703
+ var __getOwnPropDesc$z = Object.getOwnPropertyDescriptor;
6704
+ var __decorateClass$A = (decorators, target, key, kind) => {
6705
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$z(target, key) : target;
6704
6706
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
6705
6707
  if (decorator = decorators[i])
6706
6708
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
6707
- if (kind && result) __defProp$x(target, key, result);
6709
+ if (kind && result) __defProp$A(target, key, result);
6708
6710
  return result;
6709
6711
  };
6710
6712
  exports.Timeline = class Timeline extends exports.Node {
@@ -6749,30 +6751,30 @@ exports.Timeline = class Timeline extends exports.Node {
6749
6751
  this.addTime(delta);
6750
6752
  }
6751
6753
  };
6752
- __decorateClass$x([
6754
+ __decorateClass$A([
6753
6755
  property({ default: 0 })
6754
6756
  ], exports.Timeline.prototype, "startTime", 2);
6755
- __decorateClass$x([
6757
+ __decorateClass$A([
6756
6758
  property({ default: 0 })
6757
6759
  ], exports.Timeline.prototype, "currentTime", 2);
6758
- __decorateClass$x([
6760
+ __decorateClass$A([
6759
6761
  property({ default: Number.MAX_SAFE_INTEGER })
6760
6762
  ], exports.Timeline.prototype, "endTime", 2);
6761
- __decorateClass$x([
6763
+ __decorateClass$A([
6762
6764
  property({ default: false })
6763
6765
  ], exports.Timeline.prototype, "loop", 2);
6764
- exports.Timeline = __decorateClass$x([
6766
+ exports.Timeline = __decorateClass$A([
6765
6767
  customNode("Timeline")
6766
6768
  ], exports.Timeline);
6767
6769
 
6768
- var __defProp$w = Object.defineProperty;
6769
- var __getOwnPropDesc$v = Object.getOwnPropertyDescriptor;
6770
- var __decorateClass$w = (decorators, target, key, kind) => {
6771
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$v(target, key) : target;
6770
+ var __defProp$z = Object.defineProperty;
6771
+ var __getOwnPropDesc$y = Object.getOwnPropertyDescriptor;
6772
+ var __decorateClass$z = (decorators, target, key, kind) => {
6773
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$y(target, key) : target;
6772
6774
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
6773
6775
  if (decorator = decorators[i])
6774
6776
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
6775
- if (kind && result) __defProp$w(target, key, result);
6777
+ if (kind && result) __defProp$z(target, key, result);
6776
6778
  return result;
6777
6779
  };
6778
6780
  exports.Viewport = class Viewport extends exports.Node {
@@ -6910,29 +6912,29 @@ exports.Viewport = class Viewport extends exports.Node {
6910
6912
  return this._projection.toArray(transpose);
6911
6913
  }
6912
6914
  };
6913
- __decorateClass$w([
6915
+ __decorateClass$z([
6914
6916
  property({ default: 0 })
6915
6917
  ], exports.Viewport.prototype, "x", 2);
6916
- __decorateClass$w([
6918
+ __decorateClass$z([
6917
6919
  property({ default: 0 })
6918
6920
  ], exports.Viewport.prototype, "y", 2);
6919
- __decorateClass$w([
6921
+ __decorateClass$z([
6920
6922
  property({ default: 0 })
6921
6923
  ], exports.Viewport.prototype, "width", 2);
6922
- __decorateClass$w([
6924
+ __decorateClass$z([
6923
6925
  property({ default: 0 })
6924
6926
  ], exports.Viewport.prototype, "height", 2);
6925
- exports.Viewport = __decorateClass$w([
6927
+ exports.Viewport = __decorateClass$z([
6926
6928
  customNode("Viewport")
6927
6929
  ], exports.Viewport);
6928
6930
 
6929
- var __defProp$v = Object.defineProperty;
6930
- var __decorateClass$v = (decorators, target, key, kind) => {
6931
+ var __defProp$y = Object.defineProperty;
6932
+ var __decorateClass$y = (decorators, target, key, kind) => {
6931
6933
  var result = undefined ;
6932
6934
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
6933
6935
  if (decorator = decorators[i])
6934
6936
  result = (decorator(target, key, result) ) || result;
6935
- if (result) __defProp$v(target, key, result);
6937
+ if (result) __defProp$y(target, key, result);
6936
6938
  return result;
6937
6939
  };
6938
6940
  class SceneTree extends MainLoop {
@@ -6993,21 +6995,21 @@ class SceneTree extends MainLoop {
6993
6995
  renderer.texture.unbind(texture);
6994
6996
  }
6995
6997
  }
6996
- __decorateClass$v([
6998
+ __decorateClass$y([
6997
6999
  property({ default: false })
6998
7000
  ], SceneTree.prototype, "paused");
6999
- __decorateClass$v([
7001
+ __decorateClass$y([
7000
7002
  property()
7001
7003
  ], SceneTree.prototype, "backgroundColor");
7002
7004
 
7003
- var __defProp$u = Object.defineProperty;
7004
- var __getOwnPropDesc$u = Object.getOwnPropertyDescriptor;
7005
- var __decorateClass$u = (decorators, target, key, kind) => {
7006
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$u(target, key) : target;
7005
+ var __defProp$x = Object.defineProperty;
7006
+ var __getOwnPropDesc$x = Object.getOwnPropertyDescriptor;
7007
+ var __decorateClass$x = (decorators, target, key, kind) => {
7008
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$x(target, key) : target;
7007
7009
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
7008
7010
  if (decorator = decorators[i])
7009
7011
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
7010
- if (kind && result) __defProp$u(target, key, result);
7012
+ if (kind && result) __defProp$x(target, key, result);
7011
7013
  return result;
7012
7014
  };
7013
7015
  exports.Node2D = class Node2D extends exports.CanvasItem {
@@ -7139,18 +7141,18 @@ exports.Node2D = class Node2D extends exports.CanvasItem {
7139
7141
  );
7140
7142
  }
7141
7143
  };
7142
- exports.Node2D = __decorateClass$u([
7144
+ exports.Node2D = __decorateClass$x([
7143
7145
  customNode("Node2D")
7144
7146
  ], exports.Node2D);
7145
7147
 
7146
- var __defProp$t = Object.defineProperty;
7147
- var __getOwnPropDesc$t = Object.getOwnPropertyDescriptor;
7148
- var __decorateClass$t = (decorators, target, key, kind) => {
7149
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$t(target, key) : target;
7148
+ var __defProp$w = Object.defineProperty;
7149
+ var __getOwnPropDesc$w = Object.getOwnPropertyDescriptor;
7150
+ var __decorateClass$w = (decorators, target, key, kind) => {
7151
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$w(target, key) : target;
7150
7152
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
7151
7153
  if (decorator = decorators[i])
7152
7154
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
7153
- if (kind && result) __defProp$t(target, key, result);
7155
+ if (kind && result) __defProp$w(target, key, result);
7154
7156
  return result;
7155
7157
  };
7156
7158
  function proxy(options) {
@@ -7195,61 +7197,61 @@ exports.Graphics2D = class Graphics2D extends exports.Node2D {
7195
7197
  return this;
7196
7198
  }
7197
7199
  };
7198
- __decorateClass$t([
7200
+ __decorateClass$w([
7199
7201
  proxy()
7200
7202
  ], exports.Graphics2D.prototype, "lineCap", 2);
7201
- __decorateClass$t([
7203
+ __decorateClass$w([
7202
7204
  proxy()
7203
7205
  ], exports.Graphics2D.prototype, "lineJoin", 2);
7204
- __decorateClass$t([
7206
+ __decorateClass$w([
7205
7207
  proxy()
7206
7208
  ], exports.Graphics2D.prototype, "fillStyle", 2);
7207
- __decorateClass$t([
7209
+ __decorateClass$w([
7208
7210
  proxy()
7209
7211
  ], exports.Graphics2D.prototype, "strokeStyle", 2);
7210
- __decorateClass$t([
7212
+ __decorateClass$w([
7211
7213
  proxy()
7212
7214
  ], exports.Graphics2D.prototype, "lineWidth", 2);
7213
- __decorateClass$t([
7215
+ __decorateClass$w([
7214
7216
  proxy()
7215
7217
  ], exports.Graphics2D.prototype, "miterLimit", 2);
7216
- __decorateClass$t([
7218
+ __decorateClass$w([
7217
7219
  proxy({ method: true })
7218
7220
  ], exports.Graphics2D.prototype, "rect", 2);
7219
- __decorateClass$t([
7221
+ __decorateClass$w([
7220
7222
  proxy({ method: true, redraw: true })
7221
7223
  ], exports.Graphics2D.prototype, "fillRect", 2);
7222
- __decorateClass$t([
7224
+ __decorateClass$w([
7223
7225
  proxy({ method: true, redraw: true })
7224
7226
  ], exports.Graphics2D.prototype, "strokeRect", 2);
7225
- __decorateClass$t([
7227
+ __decorateClass$w([
7226
7228
  proxy({ method: true })
7227
7229
  ], exports.Graphics2D.prototype, "roundRect", 2);
7228
- __decorateClass$t([
7230
+ __decorateClass$w([
7229
7231
  proxy({ method: true })
7230
7232
  ], exports.Graphics2D.prototype, "ellipse", 2);
7231
- __decorateClass$t([
7233
+ __decorateClass$w([
7232
7234
  proxy({ method: true })
7233
7235
  ], exports.Graphics2D.prototype, "arc", 2);
7234
- __decorateClass$t([
7236
+ __decorateClass$w([
7235
7237
  proxy({ method: true })
7236
7238
  ], exports.Graphics2D.prototype, "beginPath", 2);
7237
- __decorateClass$t([
7239
+ __decorateClass$w([
7238
7240
  proxy({ method: true })
7239
7241
  ], exports.Graphics2D.prototype, "moveTo", 2);
7240
- __decorateClass$t([
7242
+ __decorateClass$w([
7241
7243
  proxy({ method: true })
7242
7244
  ], exports.Graphics2D.prototype, "lineTo", 2);
7243
- __decorateClass$t([
7245
+ __decorateClass$w([
7244
7246
  proxy({ method: true })
7245
7247
  ], exports.Graphics2D.prototype, "closePath", 2);
7246
- __decorateClass$t([
7248
+ __decorateClass$w([
7247
7249
  proxy({ method: true, redraw: true })
7248
7250
  ], exports.Graphics2D.prototype, "fill", 2);
7249
- __decorateClass$t([
7251
+ __decorateClass$w([
7250
7252
  proxy({ method: true, redraw: true })
7251
7253
  ], exports.Graphics2D.prototype, "stroke", 2);
7252
- exports.Graphics2D = __decorateClass$t([
7254
+ exports.Graphics2D = __decorateClass$w([
7253
7255
  customNode("Graphics2D")
7254
7256
  ], exports.Graphics2D);
7255
7257
 
@@ -7279,14 +7281,14 @@ class Image2DResource extends Resource {
7279
7281
  }
7280
7282
  }
7281
7283
 
7282
- var __defProp$s = Object.defineProperty;
7283
- var __getOwnPropDesc$s = Object.getOwnPropertyDescriptor;
7284
- var __decorateClass$s = (decorators, target, key, kind) => {
7285
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$s(target, key) : target;
7284
+ var __defProp$v = Object.defineProperty;
7285
+ var __getOwnPropDesc$v = Object.getOwnPropertyDescriptor;
7286
+ var __decorateClass$v = (decorators, target, key, kind) => {
7287
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$v(target, key) : target;
7286
7288
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
7287
7289
  if (decorator = decorators[i])
7288
7290
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
7289
- if (kind && result) __defProp$s(target, key, result);
7291
+ if (kind && result) __defProp$v(target, key, result);
7290
7292
  return result;
7291
7293
  };
7292
7294
  exports.Image2D = class Image2D extends exports.Node2D {
@@ -7420,16 +7422,16 @@ exports.Image2D = class Image2D extends exports.Node2D {
7420
7422
  );
7421
7423
  }
7422
7424
  };
7423
- __decorateClass$s([
7425
+ __decorateClass$v([
7424
7426
  protectedProperty()
7425
7427
  ], exports.Image2D.prototype, "resource", 2);
7426
- __decorateClass$s([
7428
+ __decorateClass$v([
7427
7429
  property({ default: false })
7428
7430
  ], exports.Image2D.prototype, "gif", 2);
7429
- __decorateClass$s([
7431
+ __decorateClass$v([
7430
7432
  property({ default: "" })
7431
7433
  ], exports.Image2D.prototype, "src", 2);
7432
- exports.Image2D = __decorateClass$s([
7434
+ exports.Image2D = __decorateClass$v([
7433
7435
  customNode("Image2D")
7434
7436
  ], exports.Image2D);
7435
7437
 
@@ -7463,14 +7465,14 @@ class TextureRect2D extends exports.Node2D {
7463
7465
  }
7464
7466
  }
7465
7467
 
7466
- var __defProp$r = Object.defineProperty;
7467
- var __getOwnPropDesc$r = Object.getOwnPropertyDescriptor;
7468
- var __decorateClass$r = (decorators, target, key, kind) => {
7469
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$r(target, key) : target;
7468
+ var __defProp$u = Object.defineProperty;
7469
+ var __getOwnPropDesc$u = Object.getOwnPropertyDescriptor;
7470
+ var __decorateClass$u = (decorators, target, key, kind) => {
7471
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$u(target, key) : target;
7470
7472
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
7471
7473
  if (decorator = decorators[i])
7472
7474
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
7473
- if (kind && result) __defProp$r(target, key, result);
7475
+ if (kind && result) __defProp$u(target, key, result);
7474
7476
  return result;
7475
7477
  };
7476
7478
  exports.Lottie2D = class Lottie2D extends TextureRect2D {
@@ -7513,21 +7515,21 @@ exports.Lottie2D = class Lottie2D extends TextureRect2D {
7513
7515
  super._process(delta);
7514
7516
  }
7515
7517
  };
7516
- __decorateClass$r([
7518
+ __decorateClass$u([
7517
7519
  property({ default: "" })
7518
7520
  ], exports.Lottie2D.prototype, "src", 2);
7519
- exports.Lottie2D = __decorateClass$r([
7521
+ exports.Lottie2D = __decorateClass$u([
7520
7522
  customNode("Lottie2D")
7521
7523
  ], exports.Lottie2D);
7522
7524
 
7523
- var __defProp$q = Object.defineProperty;
7524
- var __getOwnPropDesc$q = Object.getOwnPropertyDescriptor;
7525
- var __decorateClass$q = (decorators, target, key, kind) => {
7526
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$q(target, key) : target;
7525
+ var __defProp$t = Object.defineProperty;
7526
+ var __getOwnPropDesc$t = Object.getOwnPropertyDescriptor;
7527
+ var __decorateClass$t = (decorators, target, key, kind) => {
7528
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$t(target, key) : target;
7527
7529
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
7528
7530
  if (decorator = decorators[i])
7529
7531
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
7530
- if (kind && result) __defProp$q(target, key, result);
7532
+ if (kind && result) __defProp$t(target, key, result);
7531
7533
  return result;
7532
7534
  };
7533
7535
  const textStyles = new Set(Object.keys(modernText.textDefaultStyle));
@@ -7665,33 +7667,33 @@ exports.Text2D = class Text2D extends TextureRect2D {
7665
7667
  }
7666
7668
  }
7667
7669
  };
7668
- __decorateClass$q([
7670
+ __decorateClass$t([
7669
7671
  property({ default: false })
7670
7672
  ], exports.Text2D.prototype, "split", 2);
7671
- __decorateClass$q([
7673
+ __decorateClass$t([
7672
7674
  property({ default: "" })
7673
7675
  ], exports.Text2D.prototype, "content", 2);
7674
- __decorateClass$q([
7676
+ __decorateClass$t([
7675
7677
  property()
7676
7678
  ], exports.Text2D.prototype, "effects", 2);
7677
- __decorateClass$q([
7679
+ __decorateClass$t([
7678
7680
  protectedProperty()
7679
7681
  ], exports.Text2D.prototype, "measureDom", 2);
7680
- __decorateClass$q([
7682
+ __decorateClass$t([
7681
7683
  protectedProperty()
7682
7684
  ], exports.Text2D.prototype, "fonts", 2);
7683
- exports.Text2D = __decorateClass$q([
7685
+ exports.Text2D = __decorateClass$t([
7684
7686
  customNode("Text2D")
7685
7687
  ], exports.Text2D);
7686
7688
 
7687
- var __defProp$p = Object.defineProperty;
7688
- var __getOwnPropDesc$p = Object.getOwnPropertyDescriptor;
7689
- var __decorateClass$p = (decorators, target, key, kind) => {
7690
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$p(target, key) : target;
7689
+ var __defProp$s = Object.defineProperty;
7690
+ var __getOwnPropDesc$s = Object.getOwnPropertyDescriptor;
7691
+ var __decorateClass$s = (decorators, target, key, kind) => {
7692
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$s(target, key) : target;
7691
7693
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
7692
7694
  if (decorator = decorators[i])
7693
7695
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
7694
- if (kind && result) __defProp$p(target, key, result);
7696
+ if (kind && result) __defProp$s(target, key, result);
7695
7697
  return result;
7696
7698
  };
7697
7699
  exports.Video2D = class Video2D extends TextureRect2D {
@@ -7744,21 +7746,21 @@ exports.Video2D = class Video2D extends TextureRect2D {
7744
7746
  super._process(delta);
7745
7747
  }
7746
7748
  };
7747
- __decorateClass$p([
7749
+ __decorateClass$s([
7748
7750
  property({ default: "" })
7749
7751
  ], exports.Video2D.prototype, "src", 2);
7750
- exports.Video2D = __decorateClass$p([
7752
+ exports.Video2D = __decorateClass$s([
7751
7753
  customNode("Video2D")
7752
7754
  ], exports.Video2D);
7753
7755
 
7754
- var __defProp$o = Object.defineProperty;
7755
- var __getOwnPropDesc$o = Object.getOwnPropertyDescriptor;
7756
- var __decorateClass$o = (decorators, target, key, kind) => {
7757
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$o(target, key) : target;
7756
+ var __defProp$r = Object.defineProperty;
7757
+ var __getOwnPropDesc$r = Object.getOwnPropertyDescriptor;
7758
+ var __decorateClass$r = (decorators, target, key, kind) => {
7759
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$r(target, key) : target;
7758
7760
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
7759
7761
  if (decorator = decorators[i])
7760
7762
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
7761
- if (kind && result) __defProp$o(target, key, result);
7763
+ if (kind && result) __defProp$r(target, key, result);
7762
7764
  return result;
7763
7765
  };
7764
7766
  const linear = (amount) => amount;
@@ -8070,19 +8072,19 @@ exports.Animation = class Animation extends exports.TimelineNode {
8070
8072
  });
8071
8073
  }
8072
8074
  };
8073
- __decorateClass$o([
8075
+ __decorateClass$r([
8074
8076
  property({ default: "parent" })
8075
8077
  ], exports.Animation.prototype, "animationMode", 2);
8076
- __decorateClass$o([
8078
+ __decorateClass$r([
8077
8079
  property({ default: false })
8078
8080
  ], exports.Animation.prototype, "loop", 2);
8079
- __decorateClass$o([
8081
+ __decorateClass$r([
8080
8082
  property({ default: [] })
8081
8083
  ], exports.Animation.prototype, "keyframes", 2);
8082
- __decorateClass$o([
8084
+ __decorateClass$r([
8083
8085
  property()
8084
8086
  ], exports.Animation.prototype, "easing", 2);
8085
- exports.Animation = __decorateClass$o([
8087
+ exports.Animation = __decorateClass$r([
8086
8088
  customNode("Animation", {
8087
8089
  renderMode: "disabled",
8088
8090
  processMode: "disabled",
@@ -8965,15 +8967,15 @@ class WebAudio extends AudioPipeline {
8965
8967
  }
8966
8968
  }
8967
8969
 
8968
- var __defProp$n = Object.defineProperty;
8969
- var __getOwnPropDesc$n = Object.getOwnPropertyDescriptor;
8970
- var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8971
- var __decorateClass$n = (decorators, target, key, kind) => {
8972
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$n(target, key) : target;
8970
+ var __defProp$q = Object.defineProperty;
8971
+ var __getOwnPropDesc$q = Object.getOwnPropertyDescriptor;
8972
+ var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8973
+ var __decorateClass$q = (decorators, target, key, kind) => {
8974
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$q(target, key) : target;
8973
8975
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
8974
8976
  if (decorator = decorators[i])
8975
8977
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
8976
- if (kind && result) __defProp$n(target, key, result);
8978
+ if (kind && result) __defProp$q(target, key, result);
8977
8979
  return result;
8978
8980
  };
8979
8981
  var __publicField$h = (obj, key, value) => __defNormalProp$h(obj, key + "" , value);
@@ -9181,7 +9183,7 @@ exports.Audio = class Audio extends exports.TimelineNode {
9181
9183
  }
9182
9184
  };
9183
9185
  __publicField$h(exports.Audio, "_soundPool", []);
9184
- exports.Audio = __decorateClass$n([
9186
+ exports.Audio = __decorateClass$q([
9185
9187
  customNode("Audio")
9186
9188
  ], exports.Audio);
9187
9189
 
@@ -9189,14 +9191,14 @@ class AudioSpectrum extends exports.Node2D {
9189
9191
  //
9190
9192
  }
9191
9193
 
9192
- var __defProp$m = Object.defineProperty;
9193
- var __getOwnPropDesc$m = Object.getOwnPropertyDescriptor;
9194
- var __decorateClass$m = (decorators, target, key, kind) => {
9195
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$m(target, key) : target;
9194
+ var __defProp$p = Object.defineProperty;
9195
+ var __getOwnPropDesc$p = Object.getOwnPropertyDescriptor;
9196
+ var __decorateClass$p = (decorators, target, key, kind) => {
9197
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$p(target, key) : target;
9196
9198
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
9197
9199
  if (decorator = decorators[i])
9198
9200
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
9199
- if (kind && result) __defProp$m(target, key, result);
9201
+ if (kind && result) __defProp$p(target, key, result);
9200
9202
  return result;
9201
9203
  };
9202
9204
  exports.AudioWaveform = class AudioWaveform extends exports.Node2D {
@@ -9290,27 +9292,27 @@ exports.AudioWaveform = class AudioWaveform extends exports.Node2D {
9290
9292
  }
9291
9293
  }
9292
9294
  };
9293
- __decorateClass$m([
9295
+ __decorateClass$p([
9294
9296
  property()
9295
9297
  ], exports.AudioWaveform.prototype, "src", 2);
9296
- __decorateClass$m([
9298
+ __decorateClass$p([
9297
9299
  property()
9298
9300
  ], exports.AudioWaveform.prototype, "gap", 2);
9299
- __decorateClass$m([
9301
+ __decorateClass$p([
9300
9302
  property()
9301
9303
  ], exports.AudioWaveform.prototype, "color", 2);
9302
- exports.AudioWaveform = __decorateClass$m([
9304
+ exports.AudioWaveform = __decorateClass$p([
9303
9305
  customNode("AudioWaveform")
9304
9306
  ], exports.AudioWaveform);
9305
9307
 
9306
- var __defProp$l = Object.defineProperty;
9307
- var __getOwnPropDesc$l = Object.getOwnPropertyDescriptor;
9308
- var __decorateClass$l = (decorators, target, key, kind) => {
9309
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$l(target, key) : target;
9308
+ var __defProp$o = Object.defineProperty;
9309
+ var __getOwnPropDesc$o = Object.getOwnPropertyDescriptor;
9310
+ var __decorateClass$o = (decorators, target, key, kind) => {
9311
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$o(target, key) : target;
9310
9312
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
9311
9313
  if (decorator = decorators[i])
9312
9314
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
9313
- if (kind && result) __defProp$l(target, key, result);
9315
+ if (kind && result) __defProp$o(target, key, result);
9314
9316
  return result;
9315
9317
  };
9316
9318
  exports.Effect = class Effect extends exports.TimelineNode {
@@ -9328,11 +9330,11 @@ exports.Effect = class Effect extends exports.TimelineNode {
9328
9330
  /** Temporary nodes for transition */
9329
9331
  _previousSibling;
9330
9332
  _nextSibling;
9331
- constructor(options) {
9333
+ constructor(properties, children = []) {
9332
9334
  super();
9333
9335
  this._onProcessing = this._onProcessing.bind(this);
9334
9336
  this._onNodeProcessed = this._onNodeProcessed.bind(this);
9335
- this.setProperties(options);
9337
+ this.setProperties(properties).append(children);
9336
9338
  }
9337
9339
  _updateProperty(key, value, oldValue, declaration) {
9338
9340
  super._updateProperty(key, value, oldValue, declaration);
@@ -9547,31 +9549,31 @@ exports.Effect = class Effect extends exports.TimelineNode {
9547
9549
  }
9548
9550
  }
9549
9551
  };
9550
- __decorateClass$l([
9552
+ __decorateClass$o([
9551
9553
  protectedProperty()
9552
9554
  ], exports.Effect.prototype, "material", 2);
9553
- __decorateClass$l([
9555
+ __decorateClass$o([
9554
9556
  property()
9555
9557
  ], exports.Effect.prototype, "mode", 2);
9556
- __decorateClass$l([
9558
+ __decorateClass$o([
9557
9559
  property({ default: "" })
9558
9560
  ], exports.Effect.prototype, "glsl", 2);
9559
- __decorateClass$l([
9561
+ __decorateClass$o([
9560
9562
  property({ default: "" })
9561
9563
  ], exports.Effect.prototype, "glslSrc", 2);
9562
- exports.Effect = __decorateClass$l([
9564
+ exports.Effect = __decorateClass$o([
9563
9565
  customNode("Effect")
9564
9566
  ], exports.Effect);
9565
9567
 
9566
- var __defProp$k = Object.defineProperty;
9567
- var __getOwnPropDesc$k = Object.getOwnPropertyDescriptor;
9568
- var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9569
- var __decorateClass$k = (decorators, target, key, kind) => {
9570
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$k(target, key) : target;
9568
+ var __defProp$n = Object.defineProperty;
9569
+ var __getOwnPropDesc$n = Object.getOwnPropertyDescriptor;
9570
+ var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9571
+ var __decorateClass$n = (decorators, target, key, kind) => {
9572
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$n(target, key) : target;
9571
9573
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
9572
9574
  if (decorator = decorators[i])
9573
9575
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
9574
- if (kind && result) __defProp$k(target, key, result);
9576
+ if (kind && result) __defProp$n(target, key, result);
9575
9577
  return result;
9576
9578
  };
9577
9579
  var __publicField$g = (obj, key, value) => __defNormalProp$g(obj, typeof key !== "symbol" ? key + "" : key, value);
@@ -9668,25 +9670,25 @@ __publicField$g(exports.BlurEffect, "materialY", new Material({
9668
9670
  vert: vertY,
9669
9671
  frag
9670
9672
  }));
9671
- __decorateClass$k([
9673
+ __decorateClass$n([
9672
9674
  property({ default: 8 })
9673
9675
  ], exports.BlurEffect.prototype, "strength", 2);
9674
- __decorateClass$k([
9676
+ __decorateClass$n([
9675
9677
  property({ default: 4 })
9676
9678
  ], exports.BlurEffect.prototype, "quality", 2);
9677
- exports.BlurEffect = __decorateClass$k([
9679
+ exports.BlurEffect = __decorateClass$n([
9678
9680
  customNode("BlurEffect")
9679
9681
  ], exports.BlurEffect);
9680
9682
 
9681
- var __defProp$j = Object.defineProperty;
9682
- var __getOwnPropDesc$j = Object.getOwnPropertyDescriptor;
9683
- var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9684
- var __decorateClass$j = (decorators, target, key, kind) => {
9685
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$j(target, key) : target;
9683
+ var __defProp$m = Object.defineProperty;
9684
+ var __getOwnPropDesc$m = Object.getOwnPropertyDescriptor;
9685
+ var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9686
+ var __decorateClass$m = (decorators, target, key, kind) => {
9687
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$m(target, key) : target;
9686
9688
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
9687
9689
  if (decorator = decorators[i])
9688
9690
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
9689
- if (kind && result) __defProp$j(target, key, result);
9691
+ if (kind && result) __defProp$m(target, key, result);
9690
9692
  return result;
9691
9693
  };
9692
9694
  var __publicField$f = (obj, key, value) => __defNormalProp$f(obj, key + "" , value);
@@ -9750,43 +9752,43 @@ void main(void) {
9750
9752
  gl_FragColor = c * alpha;
9751
9753
  }`
9752
9754
  }));
9753
- __decorateClass$j([
9755
+ __decorateClass$m([
9754
9756
  property()
9755
9757
  ], exports.ColorAdjustEffect.prototype, "saturation", 2);
9756
- __decorateClass$j([
9758
+ __decorateClass$m([
9757
9759
  property()
9758
9760
  ], exports.ColorAdjustEffect.prototype, "contrast", 2);
9759
- __decorateClass$j([
9761
+ __decorateClass$m([
9760
9762
  property()
9761
9763
  ], exports.ColorAdjustEffect.prototype, "brightness", 2);
9762
- __decorateClass$j([
9764
+ __decorateClass$m([
9763
9765
  property()
9764
9766
  ], exports.ColorAdjustEffect.prototype, "red", 2);
9765
- __decorateClass$j([
9767
+ __decorateClass$m([
9766
9768
  property()
9767
9769
  ], exports.ColorAdjustEffect.prototype, "green", 2);
9768
- __decorateClass$j([
9770
+ __decorateClass$m([
9769
9771
  property()
9770
9772
  ], exports.ColorAdjustEffect.prototype, "blue", 2);
9771
- __decorateClass$j([
9773
+ __decorateClass$m([
9772
9774
  property()
9773
9775
  ], exports.ColorAdjustEffect.prototype, "alpha", 2);
9774
- __decorateClass$j([
9776
+ __decorateClass$m([
9775
9777
  property()
9776
9778
  ], exports.ColorAdjustEffect.prototype, "gamma", 2);
9777
- exports.ColorAdjustEffect = __decorateClass$j([
9779
+ exports.ColorAdjustEffect = __decorateClass$m([
9778
9780
  customNode("ColorAdjustEffect")
9779
9781
  ], exports.ColorAdjustEffect);
9780
9782
 
9781
- var __defProp$i = Object.defineProperty;
9782
- var __getOwnPropDesc$i = Object.getOwnPropertyDescriptor;
9783
- var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9784
- var __decorateClass$i = (decorators, target, key, kind) => {
9785
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$i(target, key) : target;
9783
+ var __defProp$l = Object.defineProperty;
9784
+ var __getOwnPropDesc$l = Object.getOwnPropertyDescriptor;
9785
+ var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9786
+ var __decorateClass$l = (decorators, target, key, kind) => {
9787
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$l(target, key) : target;
9786
9788
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
9787
9789
  if (decorator = decorators[i])
9788
9790
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
9789
- if (kind && result) __defProp$i(target, key, result);
9791
+ if (kind && result) __defProp$l(target, key, result);
9790
9792
  return result;
9791
9793
  };
9792
9794
  var __publicField$e = (obj, key, value) => __defNormalProp$e(obj, key + "" , value);
@@ -9866,22 +9868,22 @@ void main(void) {
9866
9868
  );
9867
9869
  }`
9868
9870
  }));
9869
- __decorateClass$i([
9871
+ __decorateClass$l([
9870
9872
  property({ default: "" })
9871
9873
  ], exports.ColorFilterEffect.prototype, "filter", 2);
9872
- exports.ColorFilterEffect = __decorateClass$i([
9874
+ exports.ColorFilterEffect = __decorateClass$l([
9873
9875
  customNode("ColorFilterEffect")
9874
9876
  ], exports.ColorFilterEffect);
9875
9877
 
9876
- var __defProp$h = Object.defineProperty;
9877
- var __getOwnPropDesc$h = Object.getOwnPropertyDescriptor;
9878
- var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9879
- var __decorateClass$h = (decorators, target, key, kind) => {
9880
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$h(target, key) : target;
9878
+ var __defProp$k = Object.defineProperty;
9879
+ var __getOwnPropDesc$k = Object.getOwnPropertyDescriptor;
9880
+ var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9881
+ var __decorateClass$k = (decorators, target, key, kind) => {
9882
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$k(target, key) : target;
9881
9883
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
9882
9884
  if (decorator = decorators[i])
9883
9885
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
9884
- if (kind && result) __defProp$h(target, key, result);
9886
+ if (kind && result) __defProp$k(target, key, result);
9885
9887
  return result;
9886
9888
  };
9887
9889
  var __publicField$d = (obj, key, value) => __defNormalProp$d(obj, key + "" , value);
@@ -9955,25 +9957,25 @@ void main(void) {
9955
9957
  gl_FragColor = vec4(mix(color.rgb, mask.rgb, color.a * mask.a), color.a);
9956
9958
  }`
9957
9959
  }));
9958
- __decorateClass$h([
9960
+ __decorateClass$k([
9959
9961
  property()
9960
9962
  ], exports.ColorOverlayEffect.prototype, "colors", 2);
9961
- __decorateClass$h([
9963
+ __decorateClass$k([
9962
9964
  property()
9963
9965
  ], exports.ColorOverlayEffect.prototype, "alpha", 2);
9964
- exports.ColorOverlayEffect = __decorateClass$h([
9966
+ exports.ColorOverlayEffect = __decorateClass$k([
9965
9967
  customNode("ColorOverlayEffect")
9966
9968
  ], exports.ColorOverlayEffect);
9967
9969
 
9968
- var __defProp$g = Object.defineProperty;
9969
- var __getOwnPropDesc$g = Object.getOwnPropertyDescriptor;
9970
- var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9971
- var __decorateClass$g = (decorators, target, key, kind) => {
9972
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$g(target, key) : target;
9970
+ var __defProp$j = Object.defineProperty;
9971
+ var __getOwnPropDesc$j = Object.getOwnPropertyDescriptor;
9972
+ var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9973
+ var __decorateClass$j = (decorators, target, key, kind) => {
9974
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$j(target, key) : target;
9973
9975
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
9974
9976
  if (decorator = decorators[i])
9975
9977
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
9976
- if (kind && result) __defProp$g(target, key, result);
9978
+ if (kind && result) __defProp$j(target, key, result);
9977
9979
  return result;
9978
9980
  };
9979
9981
  var __publicField$c = (obj, key, value) => __defNormalProp$c(obj, key + "" , value);
@@ -10038,25 +10040,25 @@ void main(void) {
10038
10040
  gl_FragColor = color;
10039
10041
  }`
10040
10042
  }));
10041
- __decorateClass$g([
10043
+ __decorateClass$j([
10042
10044
  property()
10043
10045
  ], exports.ColorRemoveEffect.prototype, "colors", 2);
10044
- __decorateClass$g([
10046
+ __decorateClass$j([
10045
10047
  property()
10046
10048
  ], exports.ColorRemoveEffect.prototype, "epsilon", 2);
10047
- exports.ColorRemoveEffect = __decorateClass$g([
10049
+ exports.ColorRemoveEffect = __decorateClass$j([
10048
10050
  customNode("ColorRemoveEffect")
10049
10051
  ], exports.ColorRemoveEffect);
10050
10052
 
10051
- var __defProp$f = Object.defineProperty;
10052
- var __getOwnPropDesc$f = Object.getOwnPropertyDescriptor;
10053
- var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10054
- var __decorateClass$f = (decorators, target, key, kind) => {
10055
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$f(target, key) : target;
10053
+ var __defProp$i = Object.defineProperty;
10054
+ var __getOwnPropDesc$i = Object.getOwnPropertyDescriptor;
10055
+ var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10056
+ var __decorateClass$i = (decorators, target, key, kind) => {
10057
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$i(target, key) : target;
10056
10058
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
10057
10059
  if (decorator = decorators[i])
10058
10060
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
10059
- if (kind && result) __defProp$f(target, key, result);
10061
+ if (kind && result) __defProp$i(target, key, result);
10060
10062
  return result;
10061
10063
  };
10062
10064
  var __publicField$b = (obj, key, value) => __defNormalProp$b(obj, key + "" , value);
@@ -10143,25 +10145,25 @@ void main(void) {
10143
10145
  }
10144
10146
  }`
10145
10147
  }));
10146
- __decorateClass$f([
10148
+ __decorateClass$i([
10147
10149
  property()
10148
10150
  ], exports.ColorReplaceEffect.prototype, "colors", 2);
10149
- __decorateClass$f([
10151
+ __decorateClass$i([
10150
10152
  property()
10151
10153
  ], exports.ColorReplaceEffect.prototype, "epsilon", 2);
10152
- exports.ColorReplaceEffect = __decorateClass$f([
10154
+ exports.ColorReplaceEffect = __decorateClass$i([
10153
10155
  customNode("ColorReplaceEffect")
10154
10156
  ], exports.ColorReplaceEffect);
10155
10157
 
10156
- var __defProp$e = Object.defineProperty;
10157
- var __getOwnPropDesc$e = Object.getOwnPropertyDescriptor;
10158
- var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10159
- var __decorateClass$e = (decorators, target, key, kind) => {
10160
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$e(target, key) : target;
10158
+ var __defProp$h = Object.defineProperty;
10159
+ var __getOwnPropDesc$h = Object.getOwnPropertyDescriptor;
10160
+ var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10161
+ var __decorateClass$h = (decorators, target, key, kind) => {
10162
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$h(target, key) : target;
10161
10163
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
10162
10164
  if (decorator = decorators[i])
10163
10165
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
10164
- if (kind && result) __defProp$e(target, key, result);
10166
+ if (kind && result) __defProp$h(target, key, result);
10165
10167
  return result;
10166
10168
  };
10167
10169
  var __publicField$a = (obj, key, value) => __defNormalProp$a(obj, key + "" , value);
@@ -10207,22 +10209,22 @@ void main(void) {
10207
10209
  gl_FragColor = vec4(color.rgb * alpha, alpha);
10208
10210
  }`
10209
10211
  }));
10210
- __decorateClass$e([
10212
+ __decorateClass$h([
10211
10213
  property()
10212
10214
  ], exports.EmbossEffect.prototype, "strength", 2);
10213
- exports.EmbossEffect = __decorateClass$e([
10215
+ exports.EmbossEffect = __decorateClass$h([
10214
10216
  customNode("EmbossEffect")
10215
10217
  ], exports.EmbossEffect);
10216
10218
 
10217
- var __defProp$d = Object.defineProperty;
10218
- var __getOwnPropDesc$d = Object.getOwnPropertyDescriptor;
10219
- var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10220
- var __decorateClass$d = (decorators, target, key, kind) => {
10221
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$d(target, key) : target;
10219
+ var __defProp$g = Object.defineProperty;
10220
+ var __getOwnPropDesc$g = Object.getOwnPropertyDescriptor;
10221
+ var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10222
+ var __decorateClass$g = (decorators, target, key, kind) => {
10223
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$g(target, key) : target;
10222
10224
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
10223
10225
  if (decorator = decorators[i])
10224
10226
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
10225
- if (kind && result) __defProp$d(target, key, result);
10227
+ if (kind && result) __defProp$g(target, key, result);
10226
10228
  return result;
10227
10229
  };
10228
10230
  var __publicField$9 = (obj, key, value) => __defNormalProp$9(obj, key + "" , value);
@@ -10404,46 +10406,46 @@ void main(void) {
10404
10406
  gl_FragColor.a = texture2D(sampler, coord).a;
10405
10407
  }`
10406
10408
  }));
10407
- __decorateClass$d([
10409
+ __decorateClass$g([
10408
10410
  property()
10409
10411
  ], exports.GlitchEffect.prototype, "slices", 2);
10410
- __decorateClass$d([
10412
+ __decorateClass$g([
10411
10413
  property()
10412
10414
  ], exports.GlitchEffect.prototype, "sampleSize", 2);
10413
- __decorateClass$d([
10415
+ __decorateClass$g([
10414
10416
  property()
10415
10417
  ], exports.GlitchEffect.prototype, "offset", 2);
10416
- __decorateClass$d([
10418
+ __decorateClass$g([
10417
10419
  property()
10418
10420
  ], exports.GlitchEffect.prototype, "direction", 2);
10419
- __decorateClass$d([
10421
+ __decorateClass$g([
10420
10422
  property()
10421
10423
  ], exports.GlitchEffect.prototype, "fillMode", 2);
10422
- __decorateClass$d([
10424
+ __decorateClass$g([
10423
10425
  property()
10424
10426
  ], exports.GlitchEffect.prototype, "seed", 2);
10425
- __decorateClass$d([
10427
+ __decorateClass$g([
10426
10428
  property()
10427
10429
  ], exports.GlitchEffect.prototype, "red", 2);
10428
- __decorateClass$d([
10430
+ __decorateClass$g([
10429
10431
  property()
10430
10432
  ], exports.GlitchEffect.prototype, "green", 2);
10431
- __decorateClass$d([
10433
+ __decorateClass$g([
10432
10434
  property()
10433
10435
  ], exports.GlitchEffect.prototype, "blue", 2);
10434
- exports.GlitchEffect = __decorateClass$d([
10436
+ exports.GlitchEffect = __decorateClass$g([
10435
10437
  customNode("GlitchEffect")
10436
10438
  ], exports.GlitchEffect);
10437
10439
 
10438
- var __defProp$c = Object.defineProperty;
10439
- var __getOwnPropDesc$c = Object.getOwnPropertyDescriptor;
10440
- var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10441
- var __decorateClass$c = (decorators, target, key, kind) => {
10442
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$c(target, key) : target;
10440
+ var __defProp$f = Object.defineProperty;
10441
+ var __getOwnPropDesc$f = Object.getOwnPropertyDescriptor;
10442
+ var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10443
+ var __decorateClass$f = (decorators, target, key, kind) => {
10444
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$f(target, key) : target;
10443
10445
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
10444
10446
  if (decorator = decorators[i])
10445
10447
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
10446
- if (kind && result) __defProp$c(target, key, result);
10448
+ if (kind && result) __defProp$f(target, key, result);
10447
10449
  return result;
10448
10450
  };
10449
10451
  var __publicField$8 = (obj, key, value) => __defNormalProp$8(obj, key + "" , value);
@@ -10605,37 +10607,37 @@ void main(void) {
10605
10607
  gl_FragColor = vec4(color.rgb + mist.rgb, color.a);
10606
10608
  }`
10607
10609
  }));
10608
- __decorateClass$c([
10610
+ __decorateClass$f([
10609
10611
  property()
10610
10612
  ], exports.GodrayEffect.prototype, "angle", 2);
10611
- __decorateClass$c([
10613
+ __decorateClass$f([
10612
10614
  property()
10613
10615
  ], exports.GodrayEffect.prototype, "gain", 2);
10614
- __decorateClass$c([
10616
+ __decorateClass$f([
10615
10617
  property()
10616
10618
  ], exports.GodrayEffect.prototype, "lacunarity", 2);
10617
- __decorateClass$c([
10619
+ __decorateClass$f([
10618
10620
  property()
10619
10621
  ], exports.GodrayEffect.prototype, "parallel", 2);
10620
- __decorateClass$c([
10622
+ __decorateClass$f([
10621
10623
  property()
10622
10624
  ], exports.GodrayEffect.prototype, "center", 2);
10623
- __decorateClass$c([
10625
+ __decorateClass$f([
10624
10626
  property()
10625
10627
  ], exports.GodrayEffect.prototype, "alpha", 2);
10626
- exports.GodrayEffect = __decorateClass$c([
10628
+ exports.GodrayEffect = __decorateClass$f([
10627
10629
  customNode("GodrayEffect")
10628
10630
  ], exports.GodrayEffect);
10629
10631
 
10630
- var __defProp$b = Object.defineProperty;
10631
- var __getOwnPropDesc$b = Object.getOwnPropertyDescriptor;
10632
- var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10633
- var __decorateClass$b = (decorators, target, key, kind) => {
10634
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$b(target, key) : target;
10632
+ var __defProp$e = Object.defineProperty;
10633
+ var __getOwnPropDesc$e = Object.getOwnPropertyDescriptor;
10634
+ var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10635
+ var __decorateClass$e = (decorators, target, key, kind) => {
10636
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$e(target, key) : target;
10635
10637
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
10636
10638
  if (decorator = decorators[i])
10637
10639
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
10638
- if (kind && result) __defProp$b(target, key, result);
10640
+ if (kind && result) __defProp$e(target, key, result);
10639
10641
  return result;
10640
10642
  };
10641
10643
  var __publicField$7 = (obj, key, value) => __defNormalProp$7(obj, key + "" , value);
@@ -10720,19 +10722,19 @@ void main(void) {
10720
10722
  gl_FragColor = color;
10721
10723
  }`
10722
10724
  }));
10723
- exports.KawaseEffect = __decorateClass$b([
10725
+ exports.KawaseEffect = __decorateClass$e([
10724
10726
  customNode("KawaseEffect")
10725
10727
  ], exports.KawaseEffect);
10726
10728
 
10727
- var __defProp$a = Object.defineProperty;
10728
- var __getOwnPropDesc$a = Object.getOwnPropertyDescriptor;
10729
- var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10730
- var __decorateClass$a = (decorators, target, key, kind) => {
10731
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$a(target, key) : target;
10729
+ var __defProp$d = Object.defineProperty;
10730
+ var __getOwnPropDesc$d = Object.getOwnPropertyDescriptor;
10731
+ var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10732
+ var __decorateClass$d = (decorators, target, key, kind) => {
10733
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$d(target, key) : target;
10732
10734
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
10733
10735
  if (decorator = decorators[i])
10734
10736
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
10735
- if (kind && result) __defProp$a(target, key, result);
10737
+ if (kind && result) __defProp$d(target, key, result);
10736
10738
  return result;
10737
10739
  };
10738
10740
  var __publicField$6 = (obj, key, value) => __defNormalProp$6(obj, key + "" , value);
@@ -10774,27 +10776,27 @@ void main() {
10774
10776
  gl_FragColor = mix(src2Color, src1Color, mixPercent);
10775
10777
  }`
10776
10778
  }));
10777
- exports.LeftEraseEffect = __decorateClass$a([
10779
+ exports.LeftEraseEffect = __decorateClass$d([
10778
10780
  customNode("LeftEraseEffect")
10779
10781
  ], exports.LeftEraseEffect);
10780
10782
 
10781
- var __defProp$9 = Object.defineProperty;
10782
- var __getOwnPropDesc$9 = Object.getOwnPropertyDescriptor;
10783
- var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10784
- var __decorateClass$9 = (decorators, target, key, kind) => {
10785
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$9(target, key) : target;
10783
+ var __defProp$c = Object.defineProperty;
10784
+ var __getOwnPropDesc$c = Object.getOwnPropertyDescriptor;
10785
+ var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10786
+ var __decorateClass$c = (decorators, target, key, kind) => {
10787
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$c(target, key) : target;
10786
10788
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
10787
10789
  if (decorator = decorators[i])
10788
10790
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
10789
- if (kind && result) __defProp$9(target, key, result);
10791
+ if (kind && result) __defProp$c(target, key, result);
10790
10792
  return result;
10791
10793
  };
10792
10794
  var __publicField$5 = (obj, key, value) => __defNormalProp$5(obj, key + "" , value);
10793
10795
  exports.MaskEffect = class MaskEffect extends exports.Effect {
10794
10796
  texture;
10795
- constructor(options) {
10797
+ constructor(properties, children = []) {
10796
10798
  super();
10797
- this.setProperties(options);
10799
+ this.setProperties(properties).append(children);
10798
10800
  }
10799
10801
  async load() {
10800
10802
  this.texture = undefined;
@@ -10860,25 +10862,25 @@ void main(void) {
10860
10862
  }
10861
10863
  }`
10862
10864
  }));
10863
- __decorateClass$9([
10865
+ __decorateClass$c([
10864
10866
  protectedProperty()
10865
10867
  ], exports.MaskEffect.prototype, "texture", 2);
10866
- __decorateClass$9([
10868
+ __decorateClass$c([
10867
10869
  property({ default: "" })
10868
10870
  ], exports.MaskEffect.prototype, "src", 2);
10869
- exports.MaskEffect = __decorateClass$9([
10871
+ exports.MaskEffect = __decorateClass$c([
10870
10872
  customNode("MaskEffect")
10871
10873
  ], exports.MaskEffect);
10872
10874
 
10873
- var __defProp$8 = Object.defineProperty;
10874
- var __getOwnPropDesc$8 = Object.getOwnPropertyDescriptor;
10875
- var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10876
- var __decorateClass$8 = (decorators, target, key, kind) => {
10877
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$8(target, key) : target;
10875
+ var __defProp$b = Object.defineProperty;
10876
+ var __getOwnPropDesc$b = Object.getOwnPropertyDescriptor;
10877
+ var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10878
+ var __decorateClass$b = (decorators, target, key, kind) => {
10879
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$b(target, key) : target;
10878
10880
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
10879
10881
  if (decorator = decorators[i])
10880
10882
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
10881
- if (kind && result) __defProp$8(target, key, result);
10883
+ if (kind && result) __defProp$b(target, key, result);
10882
10884
  return result;
10883
10885
  };
10884
10886
  var __publicField$4 = (obj, key, value) => __defNormalProp$4(obj, key + "" , value);
@@ -10935,22 +10937,22 @@ void main(void) {
10935
10937
  gl_FragColor = texture2D(sampler, coord);
10936
10938
  }`
10937
10939
  }));
10938
- __decorateClass$8([
10940
+ __decorateClass$b([
10939
10941
  property()
10940
10942
  ], exports.PixelateEffect.prototype, "size", 2);
10941
- exports.PixelateEffect = __decorateClass$8([
10943
+ exports.PixelateEffect = __decorateClass$b([
10942
10944
  customNode("PixelateEffect")
10943
10945
  ], exports.PixelateEffect);
10944
10946
 
10945
- var __defProp$7 = Object.defineProperty;
10946
- var __getOwnPropDesc$7 = Object.getOwnPropertyDescriptor;
10947
- var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10948
- var __decorateClass$7 = (decorators, target, key, kind) => {
10949
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$7(target, key) : target;
10947
+ var __defProp$a = Object.defineProperty;
10948
+ var __getOwnPropDesc$a = Object.getOwnPropertyDescriptor;
10949
+ var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10950
+ var __decorateClass$a = (decorators, target, key, kind) => {
10951
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$a(target, key) : target;
10950
10952
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
10951
10953
  if (decorator = decorators[i])
10952
10954
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
10953
- if (kind && result) __defProp$7(target, key, result);
10955
+ if (kind && result) __defProp$a(target, key, result);
10954
10956
  return result;
10955
10957
  };
10956
10958
  var __publicField$3 = (obj, key, value) => __defNormalProp$3(obj, key + "" , value);
@@ -11003,19 +11005,19 @@ void main(void) {
11003
11005
  gl_FragColor = sample;
11004
11006
  }`
11005
11007
  }));
11006
- exports.ShadowEffect = __decorateClass$7([
11008
+ exports.ShadowEffect = __decorateClass$a([
11007
11009
  customNode("ShadowEffect")
11008
11010
  ], exports.ShadowEffect);
11009
11011
 
11010
- var __defProp$6 = Object.defineProperty;
11011
- var __getOwnPropDesc$6 = Object.getOwnPropertyDescriptor;
11012
- var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
11013
- var __decorateClass$6 = (decorators, target, key, kind) => {
11014
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$6(target, key) : target;
11012
+ var __defProp$9 = Object.defineProperty;
11013
+ var __getOwnPropDesc$9 = Object.getOwnPropertyDescriptor;
11014
+ var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
11015
+ var __decorateClass$9 = (decorators, target, key, kind) => {
11016
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$9(target, key) : target;
11015
11017
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
11016
11018
  if (decorator = decorators[i])
11017
11019
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
11018
- if (kind && result) __defProp$6(target, key, result);
11020
+ if (kind && result) __defProp$9(target, key, result);
11019
11021
  return result;
11020
11022
  };
11021
11023
  var __publicField$2 = (obj, key, value) => __defNormalProp$2(obj, key + "" , value);
@@ -11111,19 +11113,19 @@ void main(void) {
11111
11113
  gl_FragColor = color;
11112
11114
  }`
11113
11115
  }));
11114
- exports.TiltShiftEffect = __decorateClass$6([
11116
+ exports.TiltShiftEffect = __decorateClass$9([
11115
11117
  customNode("TiltShiftEffect")
11116
11118
  ], exports.TiltShiftEffect);
11117
11119
 
11118
- var __defProp$5 = Object.defineProperty;
11119
- var __getOwnPropDesc$5 = Object.getOwnPropertyDescriptor;
11120
- var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
11121
- var __decorateClass$5 = (decorators, target, key, kind) => {
11122
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$5(target, key) : target;
11120
+ var __defProp$8 = Object.defineProperty;
11121
+ var __getOwnPropDesc$8 = Object.getOwnPropertyDescriptor;
11122
+ var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
11123
+ var __decorateClass$8 = (decorators, target, key, kind) => {
11124
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$8(target, key) : target;
11123
11125
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
11124
11126
  if (decorator = decorators[i])
11125
11127
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
11126
- if (kind && result) __defProp$5(target, key, result);
11128
+ if (kind && result) __defProp$8(target, key, result);
11127
11129
  return result;
11128
11130
  };
11129
11131
  var __publicField$1 = (obj, key, value) => __defNormalProp$1(obj, key + "" , value);
@@ -11206,19 +11208,19 @@ void main(void) {
11206
11208
  gl_FragColor = texture2D(sampler, coord);
11207
11209
  }`
11208
11210
  }));
11209
- exports.TwistEffect = __decorateClass$5([
11211
+ exports.TwistEffect = __decorateClass$8([
11210
11212
  customNode("TwistEffect")
11211
11213
  ], exports.TwistEffect);
11212
11214
 
11213
- var __defProp$4 = Object.defineProperty;
11214
- var __getOwnPropDesc$4 = Object.getOwnPropertyDescriptor;
11215
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
11216
- var __decorateClass$4 = (decorators, target, key, kind) => {
11217
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$4(target, key) : target;
11215
+ var __defProp$7 = Object.defineProperty;
11216
+ var __getOwnPropDesc$7 = Object.getOwnPropertyDescriptor;
11217
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
11218
+ var __decorateClass$7 = (decorators, target, key, kind) => {
11219
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$7(target, key) : target;
11218
11220
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
11219
11221
  if (decorator = decorators[i])
11220
11222
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
11221
- if (kind && result) __defProp$4(target, key, result);
11223
+ if (kind && result) __defProp$7(target, key, result);
11222
11224
  return result;
11223
11225
  };
11224
11226
  var __publicField = (obj, key, value) => __defNormalProp(obj, key + "" , value);
@@ -11324,30 +11326,30 @@ void main() {
11324
11326
  gl_FragColor = color;
11325
11327
  }`
11326
11328
  }));
11327
- __decorateClass$4([
11329
+ __decorateClass$7([
11328
11330
  property()
11329
11331
  ], exports.ZoomBlurEffect.prototype, "center", 2);
11330
- __decorateClass$4([
11332
+ __decorateClass$7([
11331
11333
  property()
11332
11334
  ], exports.ZoomBlurEffect.prototype, "innerRadius", 2);
11333
- __decorateClass$4([
11335
+ __decorateClass$7([
11334
11336
  property()
11335
11337
  ], exports.ZoomBlurEffect.prototype, "radius", 2);
11336
- __decorateClass$4([
11338
+ __decorateClass$7([
11337
11339
  property()
11338
11340
  ], exports.ZoomBlurEffect.prototype, "strength", 2);
11339
- exports.ZoomBlurEffect = __decorateClass$4([
11341
+ exports.ZoomBlurEffect = __decorateClass$7([
11340
11342
  customNode("ZoomBlurEffect")
11341
11343
  ], exports.ZoomBlurEffect);
11342
11344
 
11343
- var __defProp$3 = Object.defineProperty;
11344
- var __getOwnPropDesc$3 = Object.getOwnPropertyDescriptor;
11345
- var __decorateClass$3 = (decorators, target, key, kind) => {
11346
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$3(target, key) : target;
11345
+ var __defProp$6 = Object.defineProperty;
11346
+ var __getOwnPropDesc$6 = Object.getOwnPropertyDescriptor;
11347
+ var __decorateClass$6 = (decorators, target, key, kind) => {
11348
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$6(target, key) : target;
11347
11349
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
11348
11350
  if (decorator = decorators[i])
11349
11351
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
11350
- if (kind && result) __defProp$3(target, key, result);
11352
+ if (kind && result) __defProp$6(target, key, result);
11351
11353
  return result;
11352
11354
  };
11353
11355
  exports.Control = class Control extends exports.CanvasItem {
@@ -11407,18 +11409,73 @@ exports.Control = class Control extends exports.CanvasItem {
11407
11409
  return new Rect2(left, top, width, height);
11408
11410
  }
11409
11411
  };
11410
- exports.Control = __decorateClass$3([
11412
+ exports.Control = __decorateClass$6([
11411
11413
  customNode("Control")
11412
11414
  ], exports.Control);
11413
11415
 
11414
- var __defProp$2 = Object.defineProperty;
11415
- var __getOwnPropDesc$2 = Object.getOwnPropertyDescriptor;
11416
- var __decorateClass$2 = (decorators, target, key, kind) => {
11417
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$2(target, key) : target;
11416
+ var __defProp$5 = Object.defineProperty;
11417
+ var __getOwnPropDesc$5 = Object.getOwnPropertyDescriptor;
11418
+ var __decorateClass$5 = (decorators, target, key, kind) => {
11419
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$5(target, key) : target;
11418
11420
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
11419
11421
  if (decorator = decorators[i])
11420
11422
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
11421
- if (kind && result) __defProp$2(target, key, result);
11423
+ if (kind && result) __defProp$5(target, key, result);
11424
+ return result;
11425
+ };
11426
+ exports.Range = class Range extends exports.Control {
11427
+ constructor(properties, children = []) {
11428
+ super();
11429
+ this.setProperties(properties).append(children);
11430
+ }
11431
+ _updateProperty(key, value, oldValue, declaration) {
11432
+ super._updateProperty(key, value, oldValue, declaration);
11433
+ switch (key) {
11434
+ case "allowGreater":
11435
+ case "allowLesser":
11436
+ case "page":
11437
+ case "minValue":
11438
+ case "maxValue":
11439
+ case "step":
11440
+ case "value":
11441
+ this.requestRedraw();
11442
+ break;
11443
+ }
11444
+ }
11445
+ };
11446
+ __decorateClass$5([
11447
+ property({ default: false })
11448
+ ], exports.Range.prototype, "allowGreater", 2);
11449
+ __decorateClass$5([
11450
+ property({ default: false })
11451
+ ], exports.Range.prototype, "allowLesser", 2);
11452
+ __decorateClass$5([
11453
+ property({ default: 1 })
11454
+ ], exports.Range.prototype, "page", 2);
11455
+ __decorateClass$5([
11456
+ property({ default: 0 })
11457
+ ], exports.Range.prototype, "minValue", 2);
11458
+ __decorateClass$5([
11459
+ property({ default: 100 })
11460
+ ], exports.Range.prototype, "maxValue", 2);
11461
+ __decorateClass$5([
11462
+ property({ default: 0.01 })
11463
+ ], exports.Range.prototype, "step", 2);
11464
+ __decorateClass$5([
11465
+ property({ default: 0 })
11466
+ ], exports.Range.prototype, "value", 2);
11467
+ exports.Range = __decorateClass$5([
11468
+ customNode("Range")
11469
+ ], exports.Range);
11470
+
11471
+ var __defProp$4 = Object.defineProperty;
11472
+ var __getOwnPropDesc$4 = Object.getOwnPropertyDescriptor;
11473
+ var __decorateClass$4 = (decorators, target, key, kind) => {
11474
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$4(target, key) : target;
11475
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
11476
+ if (decorator = decorators[i])
11477
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
11478
+ if (kind && result) __defProp$4(target, key, result);
11422
11479
  return result;
11423
11480
  };
11424
11481
  exports.Ruler = class Ruler extends exports.Control {
@@ -11569,95 +11626,137 @@ exports.Ruler = class Ruler extends exports.Control {
11569
11626
  }
11570
11627
  }
11571
11628
  };
11572
- __decorateClass$2([
11629
+ __decorateClass$4([
11573
11630
  property({ default: 0 })
11574
11631
  ], exports.Ruler.prototype, "offsetX", 2);
11575
- __decorateClass$2([
11632
+ __decorateClass$4([
11576
11633
  property({ default: 0 })
11577
11634
  ], exports.Ruler.prototype, "offsetY", 2);
11578
- __decorateClass$2([
11635
+ __decorateClass$4([
11579
11636
  property({ default: 20 })
11580
11637
  ], exports.Ruler.prototype, "thickness", 2);
11581
- __decorateClass$2([
11638
+ __decorateClass$4([
11582
11639
  property({ default: 3 })
11583
11640
  ], exports.Ruler.prototype, "markHeight", 2);
11584
- __decorateClass$2([
11641
+ __decorateClass$4([
11585
11642
  property({ default: "#b2b6bc" })
11586
11643
  ], exports.Ruler.prototype, "color", 2);
11587
- __decorateClass$2([
11644
+ __decorateClass$4([
11588
11645
  property({ default: "#f9f9fa" })
11589
11646
  ], exports.Ruler.prototype, "markBackgroundColor", 2);
11590
- __decorateClass$2([
11647
+ __decorateClass$4([
11591
11648
  property({ default: "#b2b6bc" })
11592
11649
  ], exports.Ruler.prototype, "markColor", 2);
11593
- __decorateClass$2([
11650
+ __decorateClass$4([
11594
11651
  property({ default: 300 })
11595
11652
  ], exports.Ruler.prototype, "gap", 2);
11596
- __decorateClass$2([
11653
+ __decorateClass$4([
11597
11654
  property({ default: 1 })
11598
11655
  ], exports.Ruler.prototype, "scale", 2);
11599
- exports.Ruler = __decorateClass$2([
11656
+ exports.Ruler = __decorateClass$4([
11600
11657
  customNode("Ruler")
11601
11658
  ], exports.Ruler);
11602
11659
 
11603
- var __defProp$1 = Object.defineProperty;
11604
- var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
11605
- var __decorateClass$1 = (decorators, target, key, kind) => {
11606
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$1(target, key) : target;
11660
+ var __defProp$3 = Object.defineProperty;
11661
+ var __getOwnPropDesc$3 = Object.getOwnPropertyDescriptor;
11662
+ var __decorateClass$3 = (decorators, target, key, kind) => {
11663
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$3(target, key) : target;
11607
11664
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
11608
11665
  if (decorator = decorators[i])
11609
11666
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
11610
- if (kind && result) __defProp$1(target, key, result);
11667
+ if (kind && result) __defProp$3(target, key, result);
11611
11668
  return result;
11612
11669
  };
11613
- exports.ScrollBar = class ScrollBar extends exports.Control {
11670
+ exports.ScrollBar = class ScrollBar extends exports.Range {
11614
11671
  constructor(properties, children = []) {
11615
11672
  super();
11616
11673
  this.setProperties(properties).append(children);
11617
11674
  }
11618
- _parentUpdateRect() {
11619
- super._parentUpdateRect();
11620
- const rect = this._parent.getRect();
11621
- if (rect && rect.width && rect.height) {
11622
- if (this.direction === "vertical") {
11623
- this.style.width = 10;
11624
- this.style.height = rect.height - this.padding * 2;
11625
- this.style.left = rect.right - this.style.width;
11626
- this.style.top = this.padding;
11627
- } else {
11628
- this.style.height = 10;
11629
- this.style.width = rect.width - this.padding * 2;
11630
- this.style.left = this.padding;
11631
- this.style.top = rect.bottom - this.style.height;
11632
- }
11675
+ _updateStyleProperty(key, value, oldValue, declaration) {
11676
+ super._updateStyleProperty(key, value, oldValue, declaration);
11677
+ switch (key) {
11678
+ case "width":
11679
+ case "height":
11680
+ case "left":
11681
+ case "top":
11682
+ this.requestRedraw();
11683
+ break;
11633
11684
  }
11634
- this.requestRedraw();
11635
11685
  }
11636
11686
  _guiInput(event, key) {
11637
11687
  super._guiInput(event, key);
11638
11688
  }
11639
11689
  _draw() {
11640
- this.context.roundRect(
11641
- this.style.left,
11642
- this.style.top,
11643
- this.style.width,
11644
- this.style.height,
11645
- this.style.borderRadius ?? 20
11646
- );
11647
- this.context.fillStyle = 15;
11690
+ let left, top, width, height, radii;
11691
+ if (this.direction === "vertical") {
11692
+ width = 10;
11693
+ height = this.style.height * (this.page / (this.maxValue - this.minValue));
11694
+ left = this.style.left + this.style.width - width;
11695
+ top = this.style.height * (this.value / (this.maxValue - this.minValue));
11696
+ radii = width / 2;
11697
+ } else {
11698
+ width = this.style.width * (this.page / (this.maxValue - this.minValue));
11699
+ height = 10;
11700
+ left = this.style.width * (this.value / (this.maxValue - this.minValue));
11701
+ top = this.style.top + this.style.height - height;
11702
+ radii = height / 2;
11703
+ }
11704
+ this.context.roundRect(left, top, width, height, radii);
11705
+ this.context.fillStyle = 34;
11648
11706
  this.context.fill();
11649
11707
  }
11650
11708
  };
11651
- __decorateClass$1([
11709
+ __decorateClass$3([
11652
11710
  property({ default: "vertical" })
11653
11711
  ], exports.ScrollBar.prototype, "direction", 2);
11654
- __decorateClass$1([
11655
- property({ default: 10 })
11656
- ], exports.ScrollBar.prototype, "padding", 2);
11657
- exports.ScrollBar = __decorateClass$1([
11712
+ exports.ScrollBar = __decorateClass$3([
11658
11713
  customNode("ScrollBar")
11659
11714
  ], exports.ScrollBar);
11660
11715
 
11716
+ var __defProp$2 = Object.defineProperty;
11717
+ var __getOwnPropDesc$2 = Object.getOwnPropertyDescriptor;
11718
+ var __decorateClass$2 = (decorators, target, key, kind) => {
11719
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$2(target, key) : target;
11720
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
11721
+ if (decorator = decorators[i])
11722
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
11723
+ if (kind && result) __defProp$2(target, key, result);
11724
+ return result;
11725
+ };
11726
+ exports.XScrollBar = class XScrollBar extends exports.ScrollBar {
11727
+ constructor(properties, children = []) {
11728
+ super();
11729
+ this.setProperties(properties).append(children);
11730
+ }
11731
+ };
11732
+ exports.XScrollBar = __decorateClass$2([
11733
+ customNode("XScrollBar", {
11734
+ direction: "horizontal"
11735
+ })
11736
+ ], exports.XScrollBar);
11737
+
11738
+ var __defProp$1 = Object.defineProperty;
11739
+ var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
11740
+ var __decorateClass$1 = (decorators, target, key, kind) => {
11741
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$1(target, key) : target;
11742
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
11743
+ if (decorator = decorators[i])
11744
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
11745
+ if (kind && result) __defProp$1(target, key, result);
11746
+ return result;
11747
+ };
11748
+ exports.YScrollBar = class YScrollBar extends exports.ScrollBar {
11749
+ constructor(properties, children = []) {
11750
+ super();
11751
+ this.setProperties(properties).append(children);
11752
+ }
11753
+ };
11754
+ exports.YScrollBar = __decorateClass$1([
11755
+ customNode("YScrollBar", {
11756
+ direction: "vertical"
11757
+ })
11758
+ ], exports.YScrollBar);
11759
+
11661
11760
  var __defProp = Object.defineProperty;
11662
11761
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
11663
11762
  var __decorateClass = (decorators, target, key, kind) => {
@@ -11683,10 +11782,10 @@ exports.Scaler = class Scaler extends exports.Node {
11683
11782
  _updateProperty(key, value, oldValue, declaration) {
11684
11783
  super._updateProperty(key, value, oldValue, declaration);
11685
11784
  switch (key) {
11686
- case "scale":
11785
+ case "value":
11687
11786
  case "min":
11688
11787
  case "max": {
11689
- this.scale = clamp(this.min, this.scale, this.max);
11788
+ this.value = clamp(this.minValue, this.value, this.maxValue);
11690
11789
  this._updateScale();
11691
11790
  break;
11692
11791
  }
@@ -11695,9 +11794,9 @@ exports.Scaler = class Scaler extends exports.Node {
11695
11794
  _updateScale() {
11696
11795
  const target = this.target;
11697
11796
  if (target) {
11698
- target.style.scaleX = this.scale;
11699
- target.style.scaleY = this.scale;
11700
- this.emit("updateScale", this.scale);
11797
+ target.style.scaleX = this.value;
11798
+ target.style.scaleY = this.value;
11799
+ this.emit("updateScale", this.value);
11701
11800
  }
11702
11801
  }
11703
11802
  _onWheel(e) {
@@ -11710,7 +11809,7 @@ exports.Scaler = class Scaler extends exports.Node {
11710
11809
  e.preventDefault();
11711
11810
  let distance = e.deltaY / (e.ctrlKey ? 1 : 100);
11712
11811
  distance *= -0.015;
11713
- this.scale += distance;
11812
+ this.value += distance;
11714
11813
  }
11715
11814
  }
11716
11815
  _input(event, key) {
@@ -11724,13 +11823,13 @@ exports.Scaler = class Scaler extends exports.Node {
11724
11823
  };
11725
11824
  __decorateClass([
11726
11825
  property({ default: 1 })
11727
- ], exports.Scaler.prototype, "scale", 2);
11826
+ ], exports.Scaler.prototype, "value", 2);
11728
11827
  __decorateClass([
11729
11828
  property({ default: 0.05 })
11730
- ], exports.Scaler.prototype, "min", 2);
11829
+ ], exports.Scaler.prototype, "minValue", 2);
11731
11830
  __decorateClass([
11732
11831
  property({ default: 10 })
11733
- ], exports.Scaler.prototype, "max", 2);
11832
+ ], exports.Scaler.prototype, "maxValue", 2);
11734
11833
  exports.Scaler = __decorateClass([
11735
11834
  customNode("Scaler", {
11736
11835
  processMode: "disabled",
@@ -12106,31 +12205,49 @@ class CanvasEditor extends exports.Control {
12106
12205
  internalMode: "back"
12107
12206
  }).on("updateScale", (scale) => {
12108
12207
  this.ruler.scale = scale;
12208
+ const scrollHeight = this.drawboard.style.height * scale;
12209
+ const scrollWidth = this.drawboard.style.width * scale;
12210
+ if (scrollHeight > this.style.height) {
12211
+ this.yScrollBar.style.visibility = "visible";
12212
+ this.yScrollBar.maxValue = scrollHeight;
12213
+ this.yScrollBar.page = this.style.height;
12214
+ } else {
12215
+ this.yScrollBar.style.visibility = "hidden";
12216
+ }
12217
+ if (scrollWidth > this.style.width) {
12218
+ this.xScrollBar.style.visibility = "visible";
12219
+ this.xScrollBar.maxValue = scrollWidth;
12220
+ this.xScrollBar.page = this.style.width;
12221
+ } else {
12222
+ this.xScrollBar.style.visibility = "hidden";
12223
+ }
12109
12224
  });
12110
- xScrollBar = new exports.ScrollBar({
12225
+ xScrollBar = new exports.XScrollBar({
12111
12226
  internalMode: "back",
12112
- direction: "horizontal"
12227
+ style: {
12228
+ visibility: "hidden"
12229
+ }
12113
12230
  });
12114
- yScrollBar = new exports.ScrollBar({
12231
+ yScrollBar = new exports.YScrollBar({
12115
12232
  internalMode: "back",
12116
- direction: "vertical"
12233
+ style: {
12234
+ visibility: "hidden"
12235
+ }
12117
12236
  });
12118
12237
  drawboard = new exports.Node2D({
12119
12238
  name: "drawboard",
12120
12239
  style: {
12121
- left: 100,
12122
- top: 100,
12123
12240
  width: 500,
12124
12241
  height: 500,
12125
12242
  backgroundColor: 4294967295,
12126
12243
  overflow: "hidden",
12127
- borderStyle: "solid",
12128
- borderWidth: 2,
12129
- pointerEvents: "none",
12130
- transformOrigin: "left top"
12244
+ pointerEvents: "none"
12131
12245
  }
12132
12246
  }).append(
12133
- this.scaler
12247
+ this.scaler,
12248
+ new exports.ShadowEffect({
12249
+ internalMode: "back"
12250
+ })
12134
12251
  );
12135
12252
  ruler = new exports.Ruler({
12136
12253
  name: "ruler",
@@ -12153,6 +12270,19 @@ class CanvasEditor extends exports.Control {
12153
12270
  this._onPointerup = this._onPointerup.bind(this);
12154
12271
  this.append(this.ruler);
12155
12272
  }
12273
+ _updateStyleProperty(key, value, oldValue, declaration) {
12274
+ super._updateStyleProperty(key, value, oldValue, declaration);
12275
+ switch (key) {
12276
+ case "width":
12277
+ this.drawboard.style.left = (this.style.width - this.drawboard.style.width) / 2;
12278
+ this.ruler.offsetX = this.drawboard.style.left;
12279
+ break;
12280
+ case "height":
12281
+ this.drawboard.style.top = (this.style.height - this.drawboard.style.height) / 2;
12282
+ this.ruler.offsetY = this.drawboard.style.top;
12283
+ break;
12284
+ }
12285
+ }
12156
12286
  _guiInput(event, key) {
12157
12287
  super._guiInput(event, key);
12158
12288
  switch (key) {