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.mjs CHANGED
@@ -2198,13 +2198,13 @@ class Vector3 extends Vector {
2198
2198
  }
2199
2199
  }
2200
2200
 
2201
- var __defProp$I = Object.defineProperty;
2202
- var __decorateClass$I = (decorators, target, key, kind) => {
2201
+ var __defProp$L = Object.defineProperty;
2202
+ var __decorateClass$L = (decorators, target, key, kind) => {
2203
2203
  var result = undefined ;
2204
2204
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
2205
2205
  if (decorator = decorators[i])
2206
2206
  result = (decorator(target, key, result) ) || result;
2207
- if (result) __defProp$I(target, key, result);
2207
+ if (result) __defProp$L(target, key, result);
2208
2208
  return result;
2209
2209
  };
2210
2210
  class MainLoop extends CoreObject {
@@ -2245,10 +2245,10 @@ class MainLoop extends CoreObject {
2245
2245
  }
2246
2246
  }
2247
2247
  }
2248
- __decorateClass$I([
2248
+ __decorateClass$L([
2249
2249
  property({ default: 24 })
2250
2250
  ], MainLoop.prototype, "fps");
2251
- __decorateClass$I([
2251
+ __decorateClass$L([
2252
2252
  property({ default: 1 })
2253
2253
  ], MainLoop.prototype, "speed");
2254
2254
 
@@ -4392,13 +4392,13 @@ class Geometry extends Resource {
4392
4392
  }
4393
4393
  }
4394
4394
 
4395
- var __defProp$H = Object.defineProperty;
4396
- var __decorateClass$H = (decorators, target, key, kind) => {
4395
+ var __defProp$K = Object.defineProperty;
4396
+ var __decorateClass$K = (decorators, target, key, kind) => {
4397
4397
  var result = undefined ;
4398
4398
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
4399
4399
  if (decorator = decorators[i])
4400
4400
  result = (decorator(target, key, result) ) || result;
4401
- if (result) __defProp$H(target, key, result);
4401
+ if (result) __defProp$K(target, key, result);
4402
4402
  return result;
4403
4403
  };
4404
4404
  class IndexBuffer extends Resource {
@@ -4442,20 +4442,20 @@ class IndexBuffer extends Resource {
4442
4442
  return result;
4443
4443
  }
4444
4444
  }
4445
- __decorateClass$H([
4445
+ __decorateClass$K([
4446
4446
  protectedProperty({ default: null })
4447
4447
  ], IndexBuffer.prototype, "data");
4448
- __decorateClass$H([
4448
+ __decorateClass$K([
4449
4449
  protectedProperty({ default: false })
4450
4450
  ], IndexBuffer.prototype, "dynamic");
4451
4451
 
4452
- var __defProp$G = Object.defineProperty;
4453
- var __decorateClass$G = (decorators, target, key, kind) => {
4452
+ var __defProp$J = Object.defineProperty;
4453
+ var __decorateClass$J = (decorators, target, key, kind) => {
4454
4454
  var result = undefined ;
4455
4455
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
4456
4456
  if (decorator = decorators[i])
4457
4457
  result = (decorator(target, key, result) ) || result;
4458
- if (result) __defProp$G(target, key, result);
4458
+ if (result) __defProp$J(target, key, result);
4459
4459
  return result;
4460
4460
  };
4461
4461
  class VertexBuffer extends Resource {
@@ -4499,20 +4499,20 @@ class VertexBuffer extends Resource {
4499
4499
  return result;
4500
4500
  }
4501
4501
  }
4502
- __decorateClass$G([
4502
+ __decorateClass$J([
4503
4503
  protectedProperty({ default: null })
4504
4504
  ], VertexBuffer.prototype, "data");
4505
- __decorateClass$G([
4505
+ __decorateClass$J([
4506
4506
  protectedProperty({ default: false })
4507
4507
  ], VertexBuffer.prototype, "dynamic");
4508
4508
 
4509
- var __defProp$F = Object.defineProperty;
4510
- var __decorateClass$F = (decorators, target, key, kind) => {
4509
+ var __defProp$I = Object.defineProperty;
4510
+ var __decorateClass$I = (decorators, target, key, kind) => {
4511
4511
  var result = undefined ;
4512
4512
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
4513
4513
  if (decorator = decorators[i])
4514
4514
  result = (decorator(target, key, result) ) || result;
4515
- if (result) __defProp$F(target, key, result);
4515
+ if (result) __defProp$I(target, key, result);
4516
4516
  return result;
4517
4517
  };
4518
4518
  class VertexAttribute extends Resource {
@@ -4549,25 +4549,25 @@ class VertexAttribute extends Resource {
4549
4549
  return result;
4550
4550
  }
4551
4551
  }
4552
- __decorateClass$F([
4552
+ __decorateClass$I([
4553
4553
  protectedProperty()
4554
4554
  ], VertexAttribute.prototype, "buffer");
4555
- __decorateClass$F([
4555
+ __decorateClass$I([
4556
4556
  protectedProperty({ default: 0 })
4557
4557
  ], VertexAttribute.prototype, "size");
4558
- __decorateClass$F([
4558
+ __decorateClass$I([
4559
4559
  protectedProperty({ default: false })
4560
4560
  ], VertexAttribute.prototype, "normalized");
4561
- __decorateClass$F([
4561
+ __decorateClass$I([
4562
4562
  protectedProperty({ default: "float" })
4563
4563
  ], VertexAttribute.prototype, "type");
4564
- __decorateClass$F([
4564
+ __decorateClass$I([
4565
4565
  protectedProperty()
4566
4566
  ], VertexAttribute.prototype, "stride");
4567
- __decorateClass$F([
4567
+ __decorateClass$I([
4568
4568
  protectedProperty()
4569
4569
  ], VertexAttribute.prototype, "offset");
4570
- __decorateClass$F([
4570
+ __decorateClass$I([
4571
4571
  protectedProperty()
4572
4572
  ], VertexAttribute.prototype, "divisor");
4573
4573
 
@@ -4817,13 +4817,13 @@ class UvGeometry extends Geometry {
4817
4817
  }
4818
4818
  }
4819
4819
 
4820
- var __defProp$E = Object.defineProperty;
4821
- var __decorateClass$E = (decorators, target, key, kind) => {
4820
+ var __defProp$H = Object.defineProperty;
4821
+ var __decorateClass$H = (decorators, target, key, kind) => {
4822
4822
  var result = undefined ;
4823
4823
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
4824
4824
  if (decorator = decorators[i])
4825
4825
  result = (decorator(target, key, result) ) || result;
4826
- if (result) __defProp$E(target, key, result);
4826
+ if (result) __defProp$H(target, key, result);
4827
4827
  return result;
4828
4828
  };
4829
4829
  const style2DFilterDefault = {
@@ -5036,64 +5036,64 @@ class CanvasItemStyle extends Resource {
5036
5036
  return m;
5037
5037
  }
5038
5038
  }
5039
- __decorateClass$E([
5039
+ __decorateClass$H([
5040
5040
  property()
5041
5041
  ], CanvasItemStyle.prototype, "backgroundColor");
5042
- __decorateClass$E([
5042
+ __decorateClass$H([
5043
5043
  property()
5044
5044
  ], CanvasItemStyle.prototype, "backgroundImage");
5045
- __decorateClass$E([
5045
+ __decorateClass$H([
5046
5046
  property({ default: "" })
5047
5047
  ], CanvasItemStyle.prototype, "filter");
5048
- __decorateClass$E([
5048
+ __decorateClass$H([
5049
5049
  property({ default: "inherit" })
5050
5050
  ], CanvasItemStyle.prototype, "direction");
5051
- __decorateClass$E([
5051
+ __decorateClass$H([
5052
5052
  property({ default: "#000000" })
5053
5053
  ], CanvasItemStyle.prototype, "shadowColor");
5054
- __decorateClass$E([
5054
+ __decorateClass$H([
5055
5055
  property({ default: 0 })
5056
5056
  ], CanvasItemStyle.prototype, "shadowOffsetX");
5057
- __decorateClass$E([
5057
+ __decorateClass$H([
5058
5058
  property({ default: 0 })
5059
5059
  ], CanvasItemStyle.prototype, "shadowOffsetY");
5060
- __decorateClass$E([
5060
+ __decorateClass$H([
5061
5061
  property({ default: 0 })
5062
5062
  ], CanvasItemStyle.prototype, "shadowBlur");
5063
- __decorateClass$E([
5063
+ __decorateClass$H([
5064
5064
  property({ default: 1 })
5065
5065
  ], CanvasItemStyle.prototype, "opacity");
5066
- __decorateClass$E([
5066
+ __decorateClass$H([
5067
5067
  property({ default: 0 })
5068
5068
  ], CanvasItemStyle.prototype, "borderWidth");
5069
- __decorateClass$E([
5069
+ __decorateClass$H([
5070
5070
  property({ default: 0 })
5071
5071
  ], CanvasItemStyle.prototype, "borderRadius");
5072
- __decorateClass$E([
5072
+ __decorateClass$H([
5073
5073
  property({ default: "#000000" })
5074
5074
  ], CanvasItemStyle.prototype, "borderColor");
5075
- __decorateClass$E([
5075
+ __decorateClass$H([
5076
5076
  property({ default: "none" })
5077
5077
  ], CanvasItemStyle.prototype, "borderStyle");
5078
- __decorateClass$E([
5078
+ __decorateClass$H([
5079
5079
  property({ default: 0 })
5080
5080
  ], CanvasItemStyle.prototype, "outlineWidth");
5081
- __decorateClass$E([
5081
+ __decorateClass$H([
5082
5082
  property({ default: 0 })
5083
5083
  ], CanvasItemStyle.prototype, "outlineOffset");
5084
- __decorateClass$E([
5084
+ __decorateClass$H([
5085
5085
  property({ default: "#000000" })
5086
5086
  ], CanvasItemStyle.prototype, "outlineColor");
5087
- __decorateClass$E([
5087
+ __decorateClass$H([
5088
5088
  property({ default: "none" })
5089
5089
  ], CanvasItemStyle.prototype, "outlineStyle");
5090
- __decorateClass$E([
5090
+ __decorateClass$H([
5091
5091
  property({ default: "visible" })
5092
5092
  ], CanvasItemStyle.prototype, "visibility");
5093
- __decorateClass$E([
5093
+ __decorateClass$H([
5094
5094
  property({ default: "visible" })
5095
5095
  ], CanvasItemStyle.prototype, "overflow");
5096
- __decorateClass$E([
5096
+ __decorateClass$H([
5097
5097
  property({ default: "auto" })
5098
5098
  ], CanvasItemStyle.prototype, "pointerEvents");
5099
5099
  const transformStyle = getDefaultTransformStyle();
@@ -5105,13 +5105,13 @@ for (const key in textStyle) {
5105
5105
  defineProperty(CanvasItemStyle, key, { default: textStyle[key] });
5106
5106
  }
5107
5107
 
5108
- var __defProp$D = Object.defineProperty;
5109
- var __decorateClass$D = (decorators, target, key, kind) => {
5108
+ var __defProp$G = Object.defineProperty;
5109
+ var __decorateClass$G = (decorators, target, key, kind) => {
5110
5110
  var result = undefined ;
5111
5111
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
5112
5112
  if (decorator = decorators[i])
5113
5113
  result = (decorator(target, key, result) ) || result;
5114
- if (result) __defProp$D(target, key, result);
5114
+ if (result) __defProp$G(target, key, result);
5115
5115
  return result;
5116
5116
  };
5117
5117
  class Texture2D extends Resource {
@@ -5237,32 +5237,32 @@ class Texture2D extends Resource {
5237
5237
  }
5238
5238
  }
5239
5239
  }
5240
- __decorateClass$D([
5240
+ __decorateClass$G([
5241
5241
  protectedProperty()
5242
5242
  ], Texture2D.prototype, "source");
5243
- __decorateClass$D([
5243
+ __decorateClass$G([
5244
5244
  property({ default: 0 })
5245
5245
  ], Texture2D.prototype, "width");
5246
- __decorateClass$D([
5246
+ __decorateClass$G([
5247
5247
  property({ default: 0 })
5248
5248
  ], Texture2D.prototype, "height");
5249
- __decorateClass$D([
5249
+ __decorateClass$G([
5250
5250
  property({ default: "linear" })
5251
5251
  ], Texture2D.prototype, "filterMode");
5252
- __decorateClass$D([
5252
+ __decorateClass$G([
5253
5253
  property({ default: "clamp_to_edge" })
5254
5254
  ], Texture2D.prototype, "wrapMode");
5255
- __decorateClass$D([
5255
+ __decorateClass$G([
5256
5256
  property({ default: 1 })
5257
5257
  ], Texture2D.prototype, "pixelRatio");
5258
5258
 
5259
- var __defProp$C = Object.defineProperty;
5260
- var __decorateClass$C = (decorators, target, key, kind) => {
5259
+ var __defProp$F = Object.defineProperty;
5260
+ var __decorateClass$F = (decorators, target, key, kind) => {
5261
5261
  var result = undefined ;
5262
5262
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
5263
5263
  if (decorator = decorators[i])
5264
5264
  result = (decorator(target, key, result) ) || result;
5265
- if (result) __defProp$C(target, key, result);
5265
+ if (result) __defProp$F(target, key, result);
5266
5266
  return result;
5267
5267
  };
5268
5268
  class CanvasTexture extends Texture2D {
@@ -5281,7 +5281,7 @@ class CanvasTexture extends Texture2D {
5281
5281
  super._updateProperty(key, value, oldValue, declaration);
5282
5282
  }
5283
5283
  }
5284
- __decorateClass$C([
5284
+ __decorateClass$F([
5285
5285
  property({ default: 2 })
5286
5286
  ], CanvasTexture.prototype, "pixelRatio");
5287
5287
 
@@ -5439,13 +5439,13 @@ class PixelsTexture extends Texture2D {
5439
5439
  }
5440
5440
  }
5441
5441
 
5442
- var __defProp$B = Object.defineProperty;
5443
- var __decorateClass$B = (decorators, target, key, kind) => {
5442
+ var __defProp$E = Object.defineProperty;
5443
+ var __decorateClass$E = (decorators, target, key, kind) => {
5444
5444
  var result = undefined ;
5445
5445
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
5446
5446
  if (decorator = decorators[i])
5447
5447
  result = (decorator(target, key, result) ) || result;
5448
- if (result) __defProp$B(target, key, result);
5448
+ if (result) __defProp$E(target, key, result);
5449
5449
  return result;
5450
5450
  };
5451
5451
  function resolveOptions(options) {
@@ -5689,10 +5689,10 @@ const _VideoTexture = class _VideoTexture extends Texture2D {
5689
5689
  }
5690
5690
  }
5691
5691
  };
5692
- __decorateClass$B([
5692
+ __decorateClass$E([
5693
5693
  protectedProperty({ default: true })
5694
5694
  ], _VideoTexture.prototype, "autoUpdate");
5695
- __decorateClass$B([
5695
+ __decorateClass$E([
5696
5696
  protectedProperty({ default: 0 })
5697
5697
  ], _VideoTexture.prototype, "fps");
5698
5698
  let VideoTexture = _VideoTexture;
@@ -5862,14 +5862,14 @@ class CanvasContext extends Path2D {
5862
5862
  }
5863
5863
  }
5864
5864
 
5865
- var __defProp$A = Object.defineProperty;
5866
- var __getOwnPropDesc$z = Object.getOwnPropertyDescriptor;
5867
- var __decorateClass$A = (decorators, target, key, kind) => {
5868
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$z(target, key) : target;
5865
+ var __defProp$D = Object.defineProperty;
5866
+ var __getOwnPropDesc$C = Object.getOwnPropertyDescriptor;
5867
+ var __decorateClass$D = (decorators, target, key, kind) => {
5868
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$C(target, key) : target;
5869
5869
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
5870
5870
  if (decorator = decorators[i])
5871
5871
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
5872
- if (kind && result) __defProp$A(target, key, result);
5872
+ if (kind && result) __defProp$D(target, key, result);
5873
5873
  return result;
5874
5874
  };
5875
5875
  let Node = class extends CoreObject {
@@ -6294,33 +6294,33 @@ let Node = class extends CoreObject {
6294
6294
  return node;
6295
6295
  }
6296
6296
  };
6297
- __decorateClass$A([
6297
+ __decorateClass$D([
6298
6298
  property()
6299
6299
  ], Node.prototype, "name", 2);
6300
- __decorateClass$A([
6300
+ __decorateClass$D([
6301
6301
  property()
6302
6302
  ], Node.prototype, "mask", 2);
6303
- __decorateClass$A([
6303
+ __decorateClass$D([
6304
6304
  property({ default: "inherit" })
6305
6305
  ], Node.prototype, "processMode", 2);
6306
- __decorateClass$A([
6306
+ __decorateClass$D([
6307
6307
  property({ default: "inherit" })
6308
6308
  ], Node.prototype, "renderMode", 2);
6309
- __decorateClass$A([
6309
+ __decorateClass$D([
6310
6310
  property({ default: "default" })
6311
6311
  ], Node.prototype, "internalMode", 2);
6312
- Node = __decorateClass$A([
6312
+ Node = __decorateClass$D([
6313
6313
  customNode("Node")
6314
6314
  ], Node);
6315
6315
 
6316
- var __defProp$z = Object.defineProperty;
6317
- var __getOwnPropDesc$y = Object.getOwnPropertyDescriptor;
6318
- var __decorateClass$z = (decorators, target, key, kind) => {
6319
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$y(target, key) : target;
6316
+ var __defProp$C = Object.defineProperty;
6317
+ var __getOwnPropDesc$B = Object.getOwnPropertyDescriptor;
6318
+ var __decorateClass$C = (decorators, target, key, kind) => {
6319
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$B(target, key) : target;
6320
6320
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
6321
6321
  if (decorator = decorators[i])
6322
6322
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
6323
- if (kind && result) __defProp$z(target, key, result);
6323
+ if (kind && result) __defProp$C(target, key, result);
6324
6324
  return result;
6325
6325
  };
6326
6326
  let TimelineNode = class extends Node {
@@ -6379,27 +6379,27 @@ let TimelineNode = class extends Node {
6379
6379
  super._process(delta);
6380
6380
  }
6381
6381
  };
6382
- __decorateClass$z([
6382
+ __decorateClass$C([
6383
6383
  property({ default: 0 })
6384
6384
  ], TimelineNode.prototype, "delay", 2);
6385
- __decorateClass$z([
6385
+ __decorateClass$C([
6386
6386
  property({ default: 0 })
6387
6387
  ], TimelineNode.prototype, "duration", 2);
6388
- __decorateClass$z([
6388
+ __decorateClass$C([
6389
6389
  property({ default: false })
6390
6390
  ], TimelineNode.prototype, "paused", 2);
6391
- TimelineNode = __decorateClass$z([
6391
+ TimelineNode = __decorateClass$C([
6392
6392
  customNode("TimelineNode")
6393
6393
  ], TimelineNode);
6394
6394
 
6395
- var __defProp$y = Object.defineProperty;
6396
- var __getOwnPropDesc$x = Object.getOwnPropertyDescriptor;
6397
- var __decorateClass$y = (decorators, target, key, kind) => {
6398
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$x(target, key) : target;
6395
+ var __defProp$B = Object.defineProperty;
6396
+ var __getOwnPropDesc$A = Object.getOwnPropertyDescriptor;
6397
+ var __decorateClass$B = (decorators, target, key, kind) => {
6398
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$A(target, key) : target;
6399
6399
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
6400
6400
  if (decorator = decorators[i])
6401
6401
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
6402
- if (kind && result) __defProp$y(target, key, result);
6402
+ if (kind && result) __defProp$B(target, key, result);
6403
6403
  return result;
6404
6404
  };
6405
6405
  let CanvasItem = class extends TimelineNode {
@@ -6417,10 +6417,11 @@ let CanvasItem = class extends TimelineNode {
6417
6417
  }
6418
6418
  /** @internal */
6419
6419
  opacity = 1;
6420
+ visible = true;
6420
6421
  _parentOpacity;
6422
+ _parentVisible;
6421
6423
  _modulate = new Color(4294967295);
6422
6424
  _backgroundImage;
6423
- _computedVisible = true;
6424
6425
  // Batch render
6425
6426
  context = new CanvasContext();
6426
6427
  _resetContext = true;
@@ -6454,9 +6455,6 @@ let CanvasItem = class extends TimelineNode {
6454
6455
  this._modulate.value = value;
6455
6456
  this.requestRepaint();
6456
6457
  break;
6457
- case "visible":
6458
- this._updateVisible();
6459
- break;
6460
6458
  }
6461
6459
  }
6462
6460
  // eslint-disable-next-line unused-imports/no-unused-vars
@@ -6478,7 +6476,7 @@ let CanvasItem = class extends TimelineNode {
6478
6476
  this.requestRedraw();
6479
6477
  break;
6480
6478
  case "visibility":
6481
- this.visible = value === "visible";
6479
+ this._updateVisible();
6482
6480
  break;
6483
6481
  }
6484
6482
  }
@@ -6495,27 +6493,31 @@ let CanvasItem = class extends TimelineNode {
6495
6493
  this.requestRedraw();
6496
6494
  }
6497
6495
  _updateOpacity() {
6498
- const opacity = this.style.getComputedOpacity() * (this._parent?.opacity ?? 1);
6496
+ const opacity = this.style.getComputedOpacity() * (this.getParent()?.opacity ?? 1);
6499
6497
  if (this.opacity !== opacity) {
6500
6498
  this.opacity = opacity;
6501
6499
  this.requestRepaint();
6502
6500
  }
6503
6501
  }
6502
+ _updateCurrentTime(force = false) {
6503
+ super._updateCurrentTime(force);
6504
+ this._updateVisible();
6505
+ }
6504
6506
  _updateVisible() {
6505
- let visible = this.visible ?? this._parent?._computedVisible ?? true;
6507
+ let visible = this.style.visibility === "visible" && (this.getParent()?.visible ?? true);
6506
6508
  if (visible && !this.isInsideTimeRange()) {
6507
6509
  visible = false;
6508
6510
  }
6509
- this._computedVisible = visible;
6511
+ this.visible = visible;
6510
6512
  }
6511
6513
  show() {
6512
- this.visible = true;
6514
+ this.style.visibility = "visible";
6513
6515
  }
6514
6516
  hide() {
6515
- this.visible = false;
6517
+ this.style.visibility = "hidden";
6516
6518
  }
6517
6519
  isVisibleInTree() {
6518
- return this.opacity > 0 && this._computedVisible;
6520
+ return this.opacity > 0 && this.visible;
6519
6521
  }
6520
6522
  canRender() {
6521
6523
  return super.canRender() && this.isVisibleInTree();
@@ -6530,10 +6532,13 @@ let CanvasItem = class extends TimelineNode {
6530
6532
  this._repainting = true;
6531
6533
  }
6532
6534
  _process(delta) {
6533
- this._updateVisible();
6534
- const parentOpacity = this._parent?.opacity;
6535
- if (parentOpacity !== this._parentOpacity) {
6536
- this._parentOpacity = parentOpacity;
6535
+ const parent = this.getParent();
6536
+ if (this._parentVisible !== parent?.visible) {
6537
+ this._parentVisible = parent?.visible;
6538
+ this._updateVisible();
6539
+ }
6540
+ if (this._parentOpacity !== parent?.opacity) {
6541
+ this._parentOpacity = parent?.opacity;
6537
6542
  this._updateOpacity();
6538
6543
  }
6539
6544
  super._process(delta);
@@ -6652,16 +6657,13 @@ let CanvasItem = class extends TimelineNode {
6652
6657
  };
6653
6658
  }
6654
6659
  };
6655
- __decorateClass$y([
6656
- property({ default: true })
6657
- ], CanvasItem.prototype, "visible", 2);
6658
- __decorateClass$y([
6660
+ __decorateClass$B([
6659
6661
  property()
6660
6662
  ], CanvasItem.prototype, "modulate", 2);
6661
- __decorateClass$y([
6663
+ __decorateClass$B([
6662
6664
  property()
6663
6665
  ], CanvasItem.prototype, "blendMode", 2);
6664
- CanvasItem = __decorateClass$y([
6666
+ CanvasItem = __decorateClass$B([
6665
6667
  customNode("CanvasItem")
6666
6668
  ], CanvasItem);
6667
6669
 
@@ -6691,14 +6693,14 @@ class RenderStack extends Node {
6691
6693
  }
6692
6694
  }
6693
6695
 
6694
- var __defProp$x = Object.defineProperty;
6695
- var __getOwnPropDesc$w = Object.getOwnPropertyDescriptor;
6696
- var __decorateClass$x = (decorators, target, key, kind) => {
6697
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$w(target, key) : target;
6696
+ var __defProp$A = Object.defineProperty;
6697
+ var __getOwnPropDesc$z = Object.getOwnPropertyDescriptor;
6698
+ var __decorateClass$A = (decorators, target, key, kind) => {
6699
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$z(target, key) : target;
6698
6700
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
6699
6701
  if (decorator = decorators[i])
6700
6702
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
6701
- if (kind && result) __defProp$x(target, key, result);
6703
+ if (kind && result) __defProp$A(target, key, result);
6702
6704
  return result;
6703
6705
  };
6704
6706
  let Timeline = class extends Node {
@@ -6743,30 +6745,30 @@ let Timeline = class extends Node {
6743
6745
  this.addTime(delta);
6744
6746
  }
6745
6747
  };
6746
- __decorateClass$x([
6748
+ __decorateClass$A([
6747
6749
  property({ default: 0 })
6748
6750
  ], Timeline.prototype, "startTime", 2);
6749
- __decorateClass$x([
6751
+ __decorateClass$A([
6750
6752
  property({ default: 0 })
6751
6753
  ], Timeline.prototype, "currentTime", 2);
6752
- __decorateClass$x([
6754
+ __decorateClass$A([
6753
6755
  property({ default: Number.MAX_SAFE_INTEGER })
6754
6756
  ], Timeline.prototype, "endTime", 2);
6755
- __decorateClass$x([
6757
+ __decorateClass$A([
6756
6758
  property({ default: false })
6757
6759
  ], Timeline.prototype, "loop", 2);
6758
- Timeline = __decorateClass$x([
6760
+ Timeline = __decorateClass$A([
6759
6761
  customNode("Timeline")
6760
6762
  ], Timeline);
6761
6763
 
6762
- var __defProp$w = Object.defineProperty;
6763
- var __getOwnPropDesc$v = Object.getOwnPropertyDescriptor;
6764
- var __decorateClass$w = (decorators, target, key, kind) => {
6765
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$v(target, key) : target;
6764
+ var __defProp$z = Object.defineProperty;
6765
+ var __getOwnPropDesc$y = Object.getOwnPropertyDescriptor;
6766
+ var __decorateClass$z = (decorators, target, key, kind) => {
6767
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$y(target, key) : target;
6766
6768
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
6767
6769
  if (decorator = decorators[i])
6768
6770
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
6769
- if (kind && result) __defProp$w(target, key, result);
6771
+ if (kind && result) __defProp$z(target, key, result);
6770
6772
  return result;
6771
6773
  };
6772
6774
  let Viewport = class extends Node {
@@ -6904,29 +6906,29 @@ let Viewport = class extends Node {
6904
6906
  return this._projection.toArray(transpose);
6905
6907
  }
6906
6908
  };
6907
- __decorateClass$w([
6909
+ __decorateClass$z([
6908
6910
  property({ default: 0 })
6909
6911
  ], Viewport.prototype, "x", 2);
6910
- __decorateClass$w([
6912
+ __decorateClass$z([
6911
6913
  property({ default: 0 })
6912
6914
  ], Viewport.prototype, "y", 2);
6913
- __decorateClass$w([
6915
+ __decorateClass$z([
6914
6916
  property({ default: 0 })
6915
6917
  ], Viewport.prototype, "width", 2);
6916
- __decorateClass$w([
6918
+ __decorateClass$z([
6917
6919
  property({ default: 0 })
6918
6920
  ], Viewport.prototype, "height", 2);
6919
- Viewport = __decorateClass$w([
6921
+ Viewport = __decorateClass$z([
6920
6922
  customNode("Viewport")
6921
6923
  ], Viewport);
6922
6924
 
6923
- var __defProp$v = Object.defineProperty;
6924
- var __decorateClass$v = (decorators, target, key, kind) => {
6925
+ var __defProp$y = Object.defineProperty;
6926
+ var __decorateClass$y = (decorators, target, key, kind) => {
6925
6927
  var result = undefined ;
6926
6928
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
6927
6929
  if (decorator = decorators[i])
6928
6930
  result = (decorator(target, key, result) ) || result;
6929
- if (result) __defProp$v(target, key, result);
6931
+ if (result) __defProp$y(target, key, result);
6930
6932
  return result;
6931
6933
  };
6932
6934
  class SceneTree extends MainLoop {
@@ -6987,21 +6989,21 @@ class SceneTree extends MainLoop {
6987
6989
  renderer.texture.unbind(texture);
6988
6990
  }
6989
6991
  }
6990
- __decorateClass$v([
6992
+ __decorateClass$y([
6991
6993
  property({ default: false })
6992
6994
  ], SceneTree.prototype, "paused");
6993
- __decorateClass$v([
6995
+ __decorateClass$y([
6994
6996
  property()
6995
6997
  ], SceneTree.prototype, "backgroundColor");
6996
6998
 
6997
- var __defProp$u = Object.defineProperty;
6998
- var __getOwnPropDesc$u = Object.getOwnPropertyDescriptor;
6999
- var __decorateClass$u = (decorators, target, key, kind) => {
7000
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$u(target, key) : target;
6999
+ var __defProp$x = Object.defineProperty;
7000
+ var __getOwnPropDesc$x = Object.getOwnPropertyDescriptor;
7001
+ var __decorateClass$x = (decorators, target, key, kind) => {
7002
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$x(target, key) : target;
7001
7003
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
7002
7004
  if (decorator = decorators[i])
7003
7005
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
7004
- if (kind && result) __defProp$u(target, key, result);
7006
+ if (kind && result) __defProp$x(target, key, result);
7005
7007
  return result;
7006
7008
  };
7007
7009
  let Node2D = class extends CanvasItem {
@@ -7133,18 +7135,18 @@ let Node2D = class extends CanvasItem {
7133
7135
  );
7134
7136
  }
7135
7137
  };
7136
- Node2D = __decorateClass$u([
7138
+ Node2D = __decorateClass$x([
7137
7139
  customNode("Node2D")
7138
7140
  ], Node2D);
7139
7141
 
7140
- var __defProp$t = Object.defineProperty;
7141
- var __getOwnPropDesc$t = Object.getOwnPropertyDescriptor;
7142
- var __decorateClass$t = (decorators, target, key, kind) => {
7143
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$t(target, key) : target;
7142
+ var __defProp$w = Object.defineProperty;
7143
+ var __getOwnPropDesc$w = Object.getOwnPropertyDescriptor;
7144
+ var __decorateClass$w = (decorators, target, key, kind) => {
7145
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$w(target, key) : target;
7144
7146
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
7145
7147
  if (decorator = decorators[i])
7146
7148
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
7147
- if (kind && result) __defProp$t(target, key, result);
7149
+ if (kind && result) __defProp$w(target, key, result);
7148
7150
  return result;
7149
7151
  };
7150
7152
  function proxy(options) {
@@ -7189,61 +7191,61 @@ let Graphics2D = class extends Node2D {
7189
7191
  return this;
7190
7192
  }
7191
7193
  };
7192
- __decorateClass$t([
7194
+ __decorateClass$w([
7193
7195
  proxy()
7194
7196
  ], Graphics2D.prototype, "lineCap", 2);
7195
- __decorateClass$t([
7197
+ __decorateClass$w([
7196
7198
  proxy()
7197
7199
  ], Graphics2D.prototype, "lineJoin", 2);
7198
- __decorateClass$t([
7200
+ __decorateClass$w([
7199
7201
  proxy()
7200
7202
  ], Graphics2D.prototype, "fillStyle", 2);
7201
- __decorateClass$t([
7203
+ __decorateClass$w([
7202
7204
  proxy()
7203
7205
  ], Graphics2D.prototype, "strokeStyle", 2);
7204
- __decorateClass$t([
7206
+ __decorateClass$w([
7205
7207
  proxy()
7206
7208
  ], Graphics2D.prototype, "lineWidth", 2);
7207
- __decorateClass$t([
7209
+ __decorateClass$w([
7208
7210
  proxy()
7209
7211
  ], Graphics2D.prototype, "miterLimit", 2);
7210
- __decorateClass$t([
7212
+ __decorateClass$w([
7211
7213
  proxy({ method: true })
7212
7214
  ], Graphics2D.prototype, "rect", 2);
7213
- __decorateClass$t([
7215
+ __decorateClass$w([
7214
7216
  proxy({ method: true, redraw: true })
7215
7217
  ], Graphics2D.prototype, "fillRect", 2);
7216
- __decorateClass$t([
7218
+ __decorateClass$w([
7217
7219
  proxy({ method: true, redraw: true })
7218
7220
  ], Graphics2D.prototype, "strokeRect", 2);
7219
- __decorateClass$t([
7221
+ __decorateClass$w([
7220
7222
  proxy({ method: true })
7221
7223
  ], Graphics2D.prototype, "roundRect", 2);
7222
- __decorateClass$t([
7224
+ __decorateClass$w([
7223
7225
  proxy({ method: true })
7224
7226
  ], Graphics2D.prototype, "ellipse", 2);
7225
- __decorateClass$t([
7227
+ __decorateClass$w([
7226
7228
  proxy({ method: true })
7227
7229
  ], Graphics2D.prototype, "arc", 2);
7228
- __decorateClass$t([
7230
+ __decorateClass$w([
7229
7231
  proxy({ method: true })
7230
7232
  ], Graphics2D.prototype, "beginPath", 2);
7231
- __decorateClass$t([
7233
+ __decorateClass$w([
7232
7234
  proxy({ method: true })
7233
7235
  ], Graphics2D.prototype, "moveTo", 2);
7234
- __decorateClass$t([
7236
+ __decorateClass$w([
7235
7237
  proxy({ method: true })
7236
7238
  ], Graphics2D.prototype, "lineTo", 2);
7237
- __decorateClass$t([
7239
+ __decorateClass$w([
7238
7240
  proxy({ method: true })
7239
7241
  ], Graphics2D.prototype, "closePath", 2);
7240
- __decorateClass$t([
7242
+ __decorateClass$w([
7241
7243
  proxy({ method: true, redraw: true })
7242
7244
  ], Graphics2D.prototype, "fill", 2);
7243
- __decorateClass$t([
7245
+ __decorateClass$w([
7244
7246
  proxy({ method: true, redraw: true })
7245
7247
  ], Graphics2D.prototype, "stroke", 2);
7246
- Graphics2D = __decorateClass$t([
7248
+ Graphics2D = __decorateClass$w([
7247
7249
  customNode("Graphics2D")
7248
7250
  ], Graphics2D);
7249
7251
 
@@ -7273,14 +7275,14 @@ class Image2DResource extends Resource {
7273
7275
  }
7274
7276
  }
7275
7277
 
7276
- var __defProp$s = Object.defineProperty;
7277
- var __getOwnPropDesc$s = Object.getOwnPropertyDescriptor;
7278
- var __decorateClass$s = (decorators, target, key, kind) => {
7279
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$s(target, key) : target;
7278
+ var __defProp$v = Object.defineProperty;
7279
+ var __getOwnPropDesc$v = Object.getOwnPropertyDescriptor;
7280
+ var __decorateClass$v = (decorators, target, key, kind) => {
7281
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$v(target, key) : target;
7280
7282
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
7281
7283
  if (decorator = decorators[i])
7282
7284
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
7283
- if (kind && result) __defProp$s(target, key, result);
7285
+ if (kind && result) __defProp$v(target, key, result);
7284
7286
  return result;
7285
7287
  };
7286
7288
  let Image2D = class extends Node2D {
@@ -7414,16 +7416,16 @@ let Image2D = class extends Node2D {
7414
7416
  );
7415
7417
  }
7416
7418
  };
7417
- __decorateClass$s([
7419
+ __decorateClass$v([
7418
7420
  protectedProperty()
7419
7421
  ], Image2D.prototype, "resource", 2);
7420
- __decorateClass$s([
7422
+ __decorateClass$v([
7421
7423
  property({ default: false })
7422
7424
  ], Image2D.prototype, "gif", 2);
7423
- __decorateClass$s([
7425
+ __decorateClass$v([
7424
7426
  property({ default: "" })
7425
7427
  ], Image2D.prototype, "src", 2);
7426
- Image2D = __decorateClass$s([
7428
+ Image2D = __decorateClass$v([
7427
7429
  customNode("Image2D")
7428
7430
  ], Image2D);
7429
7431
 
@@ -7457,14 +7459,14 @@ class TextureRect2D extends Node2D {
7457
7459
  }
7458
7460
  }
7459
7461
 
7460
- var __defProp$r = Object.defineProperty;
7461
- var __getOwnPropDesc$r = Object.getOwnPropertyDescriptor;
7462
- var __decorateClass$r = (decorators, target, key, kind) => {
7463
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$r(target, key) : target;
7462
+ var __defProp$u = Object.defineProperty;
7463
+ var __getOwnPropDesc$u = Object.getOwnPropertyDescriptor;
7464
+ var __decorateClass$u = (decorators, target, key, kind) => {
7465
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$u(target, key) : target;
7464
7466
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
7465
7467
  if (decorator = decorators[i])
7466
7468
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
7467
- if (kind && result) __defProp$r(target, key, result);
7469
+ if (kind && result) __defProp$u(target, key, result);
7468
7470
  return result;
7469
7471
  };
7470
7472
  let Lottie2D = class extends TextureRect2D {
@@ -7507,21 +7509,21 @@ let Lottie2D = class extends TextureRect2D {
7507
7509
  super._process(delta);
7508
7510
  }
7509
7511
  };
7510
- __decorateClass$r([
7512
+ __decorateClass$u([
7511
7513
  property({ default: "" })
7512
7514
  ], Lottie2D.prototype, "src", 2);
7513
- Lottie2D = __decorateClass$r([
7515
+ Lottie2D = __decorateClass$u([
7514
7516
  customNode("Lottie2D")
7515
7517
  ], Lottie2D);
7516
7518
 
7517
- var __defProp$q = Object.defineProperty;
7518
- var __getOwnPropDesc$q = Object.getOwnPropertyDescriptor;
7519
- var __decorateClass$q = (decorators, target, key, kind) => {
7520
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$q(target, key) : target;
7519
+ var __defProp$t = Object.defineProperty;
7520
+ var __getOwnPropDesc$t = Object.getOwnPropertyDescriptor;
7521
+ var __decorateClass$t = (decorators, target, key, kind) => {
7522
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$t(target, key) : target;
7521
7523
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
7522
7524
  if (decorator = decorators[i])
7523
7525
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
7524
- if (kind && result) __defProp$q(target, key, result);
7526
+ if (kind && result) __defProp$t(target, key, result);
7525
7527
  return result;
7526
7528
  };
7527
7529
  const textStyles = new Set(Object.keys(textDefaultStyle));
@@ -7659,33 +7661,33 @@ let Text2D = class extends TextureRect2D {
7659
7661
  }
7660
7662
  }
7661
7663
  };
7662
- __decorateClass$q([
7664
+ __decorateClass$t([
7663
7665
  property({ default: false })
7664
7666
  ], Text2D.prototype, "split", 2);
7665
- __decorateClass$q([
7667
+ __decorateClass$t([
7666
7668
  property({ default: "" })
7667
7669
  ], Text2D.prototype, "content", 2);
7668
- __decorateClass$q([
7670
+ __decorateClass$t([
7669
7671
  property()
7670
7672
  ], Text2D.prototype, "effects", 2);
7671
- __decorateClass$q([
7673
+ __decorateClass$t([
7672
7674
  protectedProperty()
7673
7675
  ], Text2D.prototype, "measureDom", 2);
7674
- __decorateClass$q([
7676
+ __decorateClass$t([
7675
7677
  protectedProperty()
7676
7678
  ], Text2D.prototype, "fonts", 2);
7677
- Text2D = __decorateClass$q([
7679
+ Text2D = __decorateClass$t([
7678
7680
  customNode("Text2D")
7679
7681
  ], Text2D);
7680
7682
 
7681
- var __defProp$p = Object.defineProperty;
7682
- var __getOwnPropDesc$p = Object.getOwnPropertyDescriptor;
7683
- var __decorateClass$p = (decorators, target, key, kind) => {
7684
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$p(target, key) : target;
7683
+ var __defProp$s = Object.defineProperty;
7684
+ var __getOwnPropDesc$s = Object.getOwnPropertyDescriptor;
7685
+ var __decorateClass$s = (decorators, target, key, kind) => {
7686
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$s(target, key) : target;
7685
7687
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
7686
7688
  if (decorator = decorators[i])
7687
7689
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
7688
- if (kind && result) __defProp$p(target, key, result);
7690
+ if (kind && result) __defProp$s(target, key, result);
7689
7691
  return result;
7690
7692
  };
7691
7693
  let Video2D = class extends TextureRect2D {
@@ -7738,21 +7740,21 @@ let Video2D = class extends TextureRect2D {
7738
7740
  super._process(delta);
7739
7741
  }
7740
7742
  };
7741
- __decorateClass$p([
7743
+ __decorateClass$s([
7742
7744
  property({ default: "" })
7743
7745
  ], Video2D.prototype, "src", 2);
7744
- Video2D = __decorateClass$p([
7746
+ Video2D = __decorateClass$s([
7745
7747
  customNode("Video2D")
7746
7748
  ], Video2D);
7747
7749
 
7748
- var __defProp$o = Object.defineProperty;
7749
- var __getOwnPropDesc$o = Object.getOwnPropertyDescriptor;
7750
- var __decorateClass$o = (decorators, target, key, kind) => {
7751
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$o(target, key) : target;
7750
+ var __defProp$r = Object.defineProperty;
7751
+ var __getOwnPropDesc$r = Object.getOwnPropertyDescriptor;
7752
+ var __decorateClass$r = (decorators, target, key, kind) => {
7753
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$r(target, key) : target;
7752
7754
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
7753
7755
  if (decorator = decorators[i])
7754
7756
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
7755
- if (kind && result) __defProp$o(target, key, result);
7757
+ if (kind && result) __defProp$r(target, key, result);
7756
7758
  return result;
7757
7759
  };
7758
7760
  const linear = (amount) => amount;
@@ -8064,19 +8066,19 @@ let Animation = class extends TimelineNode {
8064
8066
  });
8065
8067
  }
8066
8068
  };
8067
- __decorateClass$o([
8069
+ __decorateClass$r([
8068
8070
  property({ default: "parent" })
8069
8071
  ], Animation.prototype, "animationMode", 2);
8070
- __decorateClass$o([
8072
+ __decorateClass$r([
8071
8073
  property({ default: false })
8072
8074
  ], Animation.prototype, "loop", 2);
8073
- __decorateClass$o([
8075
+ __decorateClass$r([
8074
8076
  property({ default: [] })
8075
8077
  ], Animation.prototype, "keyframes", 2);
8076
- __decorateClass$o([
8078
+ __decorateClass$r([
8077
8079
  property()
8078
8080
  ], Animation.prototype, "easing", 2);
8079
- Animation = __decorateClass$o([
8081
+ Animation = __decorateClass$r([
8080
8082
  customNode("Animation", {
8081
8083
  renderMode: "disabled",
8082
8084
  processMode: "disabled",
@@ -8959,15 +8961,15 @@ class WebAudio extends AudioPipeline {
8959
8961
  }
8960
8962
  }
8961
8963
 
8962
- var __defProp$n = Object.defineProperty;
8963
- var __getOwnPropDesc$n = Object.getOwnPropertyDescriptor;
8964
- var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8965
- var __decorateClass$n = (decorators, target, key, kind) => {
8966
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$n(target, key) : target;
8964
+ var __defProp$q = Object.defineProperty;
8965
+ var __getOwnPropDesc$q = Object.getOwnPropertyDescriptor;
8966
+ var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8967
+ var __decorateClass$q = (decorators, target, key, kind) => {
8968
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$q(target, key) : target;
8967
8969
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
8968
8970
  if (decorator = decorators[i])
8969
8971
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
8970
- if (kind && result) __defProp$n(target, key, result);
8972
+ if (kind && result) __defProp$q(target, key, result);
8971
8973
  return result;
8972
8974
  };
8973
8975
  var __publicField$h = (obj, key, value) => __defNormalProp$h(obj, key + "" , value);
@@ -9175,7 +9177,7 @@ let Audio = class extends TimelineNode {
9175
9177
  }
9176
9178
  };
9177
9179
  __publicField$h(Audio, "_soundPool", []);
9178
- Audio = __decorateClass$n([
9180
+ Audio = __decorateClass$q([
9179
9181
  customNode("Audio")
9180
9182
  ], Audio);
9181
9183
 
@@ -9183,14 +9185,14 @@ class AudioSpectrum extends Node2D {
9183
9185
  //
9184
9186
  }
9185
9187
 
9186
- var __defProp$m = Object.defineProperty;
9187
- var __getOwnPropDesc$m = Object.getOwnPropertyDescriptor;
9188
- var __decorateClass$m = (decorators, target, key, kind) => {
9189
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$m(target, key) : target;
9188
+ var __defProp$p = Object.defineProperty;
9189
+ var __getOwnPropDesc$p = Object.getOwnPropertyDescriptor;
9190
+ var __decorateClass$p = (decorators, target, key, kind) => {
9191
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$p(target, key) : target;
9190
9192
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
9191
9193
  if (decorator = decorators[i])
9192
9194
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
9193
- if (kind && result) __defProp$m(target, key, result);
9195
+ if (kind && result) __defProp$p(target, key, result);
9194
9196
  return result;
9195
9197
  };
9196
9198
  let AudioWaveform = class extends Node2D {
@@ -9284,27 +9286,27 @@ let AudioWaveform = class extends Node2D {
9284
9286
  }
9285
9287
  }
9286
9288
  };
9287
- __decorateClass$m([
9289
+ __decorateClass$p([
9288
9290
  property()
9289
9291
  ], AudioWaveform.prototype, "src", 2);
9290
- __decorateClass$m([
9292
+ __decorateClass$p([
9291
9293
  property()
9292
9294
  ], AudioWaveform.prototype, "gap", 2);
9293
- __decorateClass$m([
9295
+ __decorateClass$p([
9294
9296
  property()
9295
9297
  ], AudioWaveform.prototype, "color", 2);
9296
- AudioWaveform = __decorateClass$m([
9298
+ AudioWaveform = __decorateClass$p([
9297
9299
  customNode("AudioWaveform")
9298
9300
  ], AudioWaveform);
9299
9301
 
9300
- var __defProp$l = Object.defineProperty;
9301
- var __getOwnPropDesc$l = Object.getOwnPropertyDescriptor;
9302
- var __decorateClass$l = (decorators, target, key, kind) => {
9303
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$l(target, key) : target;
9302
+ var __defProp$o = Object.defineProperty;
9303
+ var __getOwnPropDesc$o = Object.getOwnPropertyDescriptor;
9304
+ var __decorateClass$o = (decorators, target, key, kind) => {
9305
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$o(target, key) : target;
9304
9306
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
9305
9307
  if (decorator = decorators[i])
9306
9308
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
9307
- if (kind && result) __defProp$l(target, key, result);
9309
+ if (kind && result) __defProp$o(target, key, result);
9308
9310
  return result;
9309
9311
  };
9310
9312
  let Effect = class extends TimelineNode {
@@ -9322,11 +9324,11 @@ let Effect = class extends TimelineNode {
9322
9324
  /** Temporary nodes for transition */
9323
9325
  _previousSibling;
9324
9326
  _nextSibling;
9325
- constructor(options) {
9327
+ constructor(properties, children = []) {
9326
9328
  super();
9327
9329
  this._onProcessing = this._onProcessing.bind(this);
9328
9330
  this._onNodeProcessed = this._onNodeProcessed.bind(this);
9329
- this.setProperties(options);
9331
+ this.setProperties(properties).append(children);
9330
9332
  }
9331
9333
  _updateProperty(key, value, oldValue, declaration) {
9332
9334
  super._updateProperty(key, value, oldValue, declaration);
@@ -9541,31 +9543,31 @@ let Effect = class extends TimelineNode {
9541
9543
  }
9542
9544
  }
9543
9545
  };
9544
- __decorateClass$l([
9546
+ __decorateClass$o([
9545
9547
  protectedProperty()
9546
9548
  ], Effect.prototype, "material", 2);
9547
- __decorateClass$l([
9549
+ __decorateClass$o([
9548
9550
  property()
9549
9551
  ], Effect.prototype, "mode", 2);
9550
- __decorateClass$l([
9552
+ __decorateClass$o([
9551
9553
  property({ default: "" })
9552
9554
  ], Effect.prototype, "glsl", 2);
9553
- __decorateClass$l([
9555
+ __decorateClass$o([
9554
9556
  property({ default: "" })
9555
9557
  ], Effect.prototype, "glslSrc", 2);
9556
- Effect = __decorateClass$l([
9558
+ Effect = __decorateClass$o([
9557
9559
  customNode("Effect")
9558
9560
  ], Effect);
9559
9561
 
9560
- var __defProp$k = Object.defineProperty;
9561
- var __getOwnPropDesc$k = Object.getOwnPropertyDescriptor;
9562
- var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9563
- var __decorateClass$k = (decorators, target, key, kind) => {
9564
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$k(target, key) : target;
9562
+ var __defProp$n = Object.defineProperty;
9563
+ var __getOwnPropDesc$n = Object.getOwnPropertyDescriptor;
9564
+ var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9565
+ var __decorateClass$n = (decorators, target, key, kind) => {
9566
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$n(target, key) : target;
9565
9567
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
9566
9568
  if (decorator = decorators[i])
9567
9569
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
9568
- if (kind && result) __defProp$k(target, key, result);
9570
+ if (kind && result) __defProp$n(target, key, result);
9569
9571
  return result;
9570
9572
  };
9571
9573
  var __publicField$g = (obj, key, value) => __defNormalProp$g(obj, typeof key !== "symbol" ? key + "" : key, value);
@@ -9662,25 +9664,25 @@ __publicField$g(BlurEffect, "materialY", new Material({
9662
9664
  vert: vertY,
9663
9665
  frag
9664
9666
  }));
9665
- __decorateClass$k([
9667
+ __decorateClass$n([
9666
9668
  property({ default: 8 })
9667
9669
  ], BlurEffect.prototype, "strength", 2);
9668
- __decorateClass$k([
9670
+ __decorateClass$n([
9669
9671
  property({ default: 4 })
9670
9672
  ], BlurEffect.prototype, "quality", 2);
9671
- BlurEffect = __decorateClass$k([
9673
+ BlurEffect = __decorateClass$n([
9672
9674
  customNode("BlurEffect")
9673
9675
  ], BlurEffect);
9674
9676
 
9675
- var __defProp$j = Object.defineProperty;
9676
- var __getOwnPropDesc$j = Object.getOwnPropertyDescriptor;
9677
- var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9678
- var __decorateClass$j = (decorators, target, key, kind) => {
9679
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$j(target, key) : target;
9677
+ var __defProp$m = Object.defineProperty;
9678
+ var __getOwnPropDesc$m = Object.getOwnPropertyDescriptor;
9679
+ var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9680
+ var __decorateClass$m = (decorators, target, key, kind) => {
9681
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$m(target, key) : target;
9680
9682
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
9681
9683
  if (decorator = decorators[i])
9682
9684
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
9683
- if (kind && result) __defProp$j(target, key, result);
9685
+ if (kind && result) __defProp$m(target, key, result);
9684
9686
  return result;
9685
9687
  };
9686
9688
  var __publicField$f = (obj, key, value) => __defNormalProp$f(obj, key + "" , value);
@@ -9744,43 +9746,43 @@ void main(void) {
9744
9746
  gl_FragColor = c * alpha;
9745
9747
  }`
9746
9748
  }));
9747
- __decorateClass$j([
9749
+ __decorateClass$m([
9748
9750
  property()
9749
9751
  ], ColorAdjustEffect.prototype, "saturation", 2);
9750
- __decorateClass$j([
9752
+ __decorateClass$m([
9751
9753
  property()
9752
9754
  ], ColorAdjustEffect.prototype, "contrast", 2);
9753
- __decorateClass$j([
9755
+ __decorateClass$m([
9754
9756
  property()
9755
9757
  ], ColorAdjustEffect.prototype, "brightness", 2);
9756
- __decorateClass$j([
9758
+ __decorateClass$m([
9757
9759
  property()
9758
9760
  ], ColorAdjustEffect.prototype, "red", 2);
9759
- __decorateClass$j([
9761
+ __decorateClass$m([
9760
9762
  property()
9761
9763
  ], ColorAdjustEffect.prototype, "green", 2);
9762
- __decorateClass$j([
9764
+ __decorateClass$m([
9763
9765
  property()
9764
9766
  ], ColorAdjustEffect.prototype, "blue", 2);
9765
- __decorateClass$j([
9767
+ __decorateClass$m([
9766
9768
  property()
9767
9769
  ], ColorAdjustEffect.prototype, "alpha", 2);
9768
- __decorateClass$j([
9770
+ __decorateClass$m([
9769
9771
  property()
9770
9772
  ], ColorAdjustEffect.prototype, "gamma", 2);
9771
- ColorAdjustEffect = __decorateClass$j([
9773
+ ColorAdjustEffect = __decorateClass$m([
9772
9774
  customNode("ColorAdjustEffect")
9773
9775
  ], ColorAdjustEffect);
9774
9776
 
9775
- var __defProp$i = Object.defineProperty;
9776
- var __getOwnPropDesc$i = Object.getOwnPropertyDescriptor;
9777
- var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9778
- var __decorateClass$i = (decorators, target, key, kind) => {
9779
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$i(target, key) : target;
9777
+ var __defProp$l = Object.defineProperty;
9778
+ var __getOwnPropDesc$l = Object.getOwnPropertyDescriptor;
9779
+ var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9780
+ var __decorateClass$l = (decorators, target, key, kind) => {
9781
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$l(target, key) : target;
9780
9782
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
9781
9783
  if (decorator = decorators[i])
9782
9784
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
9783
- if (kind && result) __defProp$i(target, key, result);
9785
+ if (kind && result) __defProp$l(target, key, result);
9784
9786
  return result;
9785
9787
  };
9786
9788
  var __publicField$e = (obj, key, value) => __defNormalProp$e(obj, key + "" , value);
@@ -9860,22 +9862,22 @@ void main(void) {
9860
9862
  );
9861
9863
  }`
9862
9864
  }));
9863
- __decorateClass$i([
9865
+ __decorateClass$l([
9864
9866
  property({ default: "" })
9865
9867
  ], ColorFilterEffect.prototype, "filter", 2);
9866
- ColorFilterEffect = __decorateClass$i([
9868
+ ColorFilterEffect = __decorateClass$l([
9867
9869
  customNode("ColorFilterEffect")
9868
9870
  ], ColorFilterEffect);
9869
9871
 
9870
- var __defProp$h = Object.defineProperty;
9871
- var __getOwnPropDesc$h = Object.getOwnPropertyDescriptor;
9872
- var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9873
- var __decorateClass$h = (decorators, target, key, kind) => {
9874
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$h(target, key) : target;
9872
+ var __defProp$k = Object.defineProperty;
9873
+ var __getOwnPropDesc$k = Object.getOwnPropertyDescriptor;
9874
+ var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9875
+ var __decorateClass$k = (decorators, target, key, kind) => {
9876
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$k(target, key) : target;
9875
9877
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
9876
9878
  if (decorator = decorators[i])
9877
9879
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
9878
- if (kind && result) __defProp$h(target, key, result);
9880
+ if (kind && result) __defProp$k(target, key, result);
9879
9881
  return result;
9880
9882
  };
9881
9883
  var __publicField$d = (obj, key, value) => __defNormalProp$d(obj, key + "" , value);
@@ -9949,25 +9951,25 @@ void main(void) {
9949
9951
  gl_FragColor = vec4(mix(color.rgb, mask.rgb, color.a * mask.a), color.a);
9950
9952
  }`
9951
9953
  }));
9952
- __decorateClass$h([
9954
+ __decorateClass$k([
9953
9955
  property()
9954
9956
  ], ColorOverlayEffect.prototype, "colors", 2);
9955
- __decorateClass$h([
9957
+ __decorateClass$k([
9956
9958
  property()
9957
9959
  ], ColorOverlayEffect.prototype, "alpha", 2);
9958
- ColorOverlayEffect = __decorateClass$h([
9960
+ ColorOverlayEffect = __decorateClass$k([
9959
9961
  customNode("ColorOverlayEffect")
9960
9962
  ], ColorOverlayEffect);
9961
9963
 
9962
- var __defProp$g = Object.defineProperty;
9963
- var __getOwnPropDesc$g = Object.getOwnPropertyDescriptor;
9964
- var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9965
- var __decorateClass$g = (decorators, target, key, kind) => {
9966
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$g(target, key) : target;
9964
+ var __defProp$j = Object.defineProperty;
9965
+ var __getOwnPropDesc$j = Object.getOwnPropertyDescriptor;
9966
+ var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9967
+ var __decorateClass$j = (decorators, target, key, kind) => {
9968
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$j(target, key) : target;
9967
9969
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
9968
9970
  if (decorator = decorators[i])
9969
9971
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
9970
- if (kind && result) __defProp$g(target, key, result);
9972
+ if (kind && result) __defProp$j(target, key, result);
9971
9973
  return result;
9972
9974
  };
9973
9975
  var __publicField$c = (obj, key, value) => __defNormalProp$c(obj, key + "" , value);
@@ -10032,25 +10034,25 @@ void main(void) {
10032
10034
  gl_FragColor = color;
10033
10035
  }`
10034
10036
  }));
10035
- __decorateClass$g([
10037
+ __decorateClass$j([
10036
10038
  property()
10037
10039
  ], ColorRemoveEffect.prototype, "colors", 2);
10038
- __decorateClass$g([
10040
+ __decorateClass$j([
10039
10041
  property()
10040
10042
  ], ColorRemoveEffect.prototype, "epsilon", 2);
10041
- ColorRemoveEffect = __decorateClass$g([
10043
+ ColorRemoveEffect = __decorateClass$j([
10042
10044
  customNode("ColorRemoveEffect")
10043
10045
  ], ColorRemoveEffect);
10044
10046
 
10045
- var __defProp$f = Object.defineProperty;
10046
- var __getOwnPropDesc$f = Object.getOwnPropertyDescriptor;
10047
- var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10048
- var __decorateClass$f = (decorators, target, key, kind) => {
10049
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$f(target, key) : target;
10047
+ var __defProp$i = Object.defineProperty;
10048
+ var __getOwnPropDesc$i = Object.getOwnPropertyDescriptor;
10049
+ var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10050
+ var __decorateClass$i = (decorators, target, key, kind) => {
10051
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$i(target, key) : target;
10050
10052
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
10051
10053
  if (decorator = decorators[i])
10052
10054
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
10053
- if (kind && result) __defProp$f(target, key, result);
10055
+ if (kind && result) __defProp$i(target, key, result);
10054
10056
  return result;
10055
10057
  };
10056
10058
  var __publicField$b = (obj, key, value) => __defNormalProp$b(obj, key + "" , value);
@@ -10137,25 +10139,25 @@ void main(void) {
10137
10139
  }
10138
10140
  }`
10139
10141
  }));
10140
- __decorateClass$f([
10142
+ __decorateClass$i([
10141
10143
  property()
10142
10144
  ], ColorReplaceEffect.prototype, "colors", 2);
10143
- __decorateClass$f([
10145
+ __decorateClass$i([
10144
10146
  property()
10145
10147
  ], ColorReplaceEffect.prototype, "epsilon", 2);
10146
- ColorReplaceEffect = __decorateClass$f([
10148
+ ColorReplaceEffect = __decorateClass$i([
10147
10149
  customNode("ColorReplaceEffect")
10148
10150
  ], ColorReplaceEffect);
10149
10151
 
10150
- var __defProp$e = Object.defineProperty;
10151
- var __getOwnPropDesc$e = Object.getOwnPropertyDescriptor;
10152
- var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10153
- var __decorateClass$e = (decorators, target, key, kind) => {
10154
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$e(target, key) : target;
10152
+ var __defProp$h = Object.defineProperty;
10153
+ var __getOwnPropDesc$h = Object.getOwnPropertyDescriptor;
10154
+ var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10155
+ var __decorateClass$h = (decorators, target, key, kind) => {
10156
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$h(target, key) : target;
10155
10157
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
10156
10158
  if (decorator = decorators[i])
10157
10159
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
10158
- if (kind && result) __defProp$e(target, key, result);
10160
+ if (kind && result) __defProp$h(target, key, result);
10159
10161
  return result;
10160
10162
  };
10161
10163
  var __publicField$a = (obj, key, value) => __defNormalProp$a(obj, key + "" , value);
@@ -10201,22 +10203,22 @@ void main(void) {
10201
10203
  gl_FragColor = vec4(color.rgb * alpha, alpha);
10202
10204
  }`
10203
10205
  }));
10204
- __decorateClass$e([
10206
+ __decorateClass$h([
10205
10207
  property()
10206
10208
  ], EmbossEffect.prototype, "strength", 2);
10207
- EmbossEffect = __decorateClass$e([
10209
+ EmbossEffect = __decorateClass$h([
10208
10210
  customNode("EmbossEffect")
10209
10211
  ], EmbossEffect);
10210
10212
 
10211
- var __defProp$d = Object.defineProperty;
10212
- var __getOwnPropDesc$d = Object.getOwnPropertyDescriptor;
10213
- var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10214
- var __decorateClass$d = (decorators, target, key, kind) => {
10215
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$d(target, key) : target;
10213
+ var __defProp$g = Object.defineProperty;
10214
+ var __getOwnPropDesc$g = Object.getOwnPropertyDescriptor;
10215
+ var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10216
+ var __decorateClass$g = (decorators, target, key, kind) => {
10217
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$g(target, key) : target;
10216
10218
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
10217
10219
  if (decorator = decorators[i])
10218
10220
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
10219
- if (kind && result) __defProp$d(target, key, result);
10221
+ if (kind && result) __defProp$g(target, key, result);
10220
10222
  return result;
10221
10223
  };
10222
10224
  var __publicField$9 = (obj, key, value) => __defNormalProp$9(obj, key + "" , value);
@@ -10398,46 +10400,46 @@ void main(void) {
10398
10400
  gl_FragColor.a = texture2D(sampler, coord).a;
10399
10401
  }`
10400
10402
  }));
10401
- __decorateClass$d([
10403
+ __decorateClass$g([
10402
10404
  property()
10403
10405
  ], GlitchEffect.prototype, "slices", 2);
10404
- __decorateClass$d([
10406
+ __decorateClass$g([
10405
10407
  property()
10406
10408
  ], GlitchEffect.prototype, "sampleSize", 2);
10407
- __decorateClass$d([
10409
+ __decorateClass$g([
10408
10410
  property()
10409
10411
  ], GlitchEffect.prototype, "offset", 2);
10410
- __decorateClass$d([
10412
+ __decorateClass$g([
10411
10413
  property()
10412
10414
  ], GlitchEffect.prototype, "direction", 2);
10413
- __decorateClass$d([
10415
+ __decorateClass$g([
10414
10416
  property()
10415
10417
  ], GlitchEffect.prototype, "fillMode", 2);
10416
- __decorateClass$d([
10418
+ __decorateClass$g([
10417
10419
  property()
10418
10420
  ], GlitchEffect.prototype, "seed", 2);
10419
- __decorateClass$d([
10421
+ __decorateClass$g([
10420
10422
  property()
10421
10423
  ], GlitchEffect.prototype, "red", 2);
10422
- __decorateClass$d([
10424
+ __decorateClass$g([
10423
10425
  property()
10424
10426
  ], GlitchEffect.prototype, "green", 2);
10425
- __decorateClass$d([
10427
+ __decorateClass$g([
10426
10428
  property()
10427
10429
  ], GlitchEffect.prototype, "blue", 2);
10428
- GlitchEffect = __decorateClass$d([
10430
+ GlitchEffect = __decorateClass$g([
10429
10431
  customNode("GlitchEffect")
10430
10432
  ], GlitchEffect);
10431
10433
 
10432
- var __defProp$c = Object.defineProperty;
10433
- var __getOwnPropDesc$c = Object.getOwnPropertyDescriptor;
10434
- var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10435
- var __decorateClass$c = (decorators, target, key, kind) => {
10436
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$c(target, key) : target;
10434
+ var __defProp$f = Object.defineProperty;
10435
+ var __getOwnPropDesc$f = Object.getOwnPropertyDescriptor;
10436
+ var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10437
+ var __decorateClass$f = (decorators, target, key, kind) => {
10438
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$f(target, key) : target;
10437
10439
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
10438
10440
  if (decorator = decorators[i])
10439
10441
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
10440
- if (kind && result) __defProp$c(target, key, result);
10442
+ if (kind && result) __defProp$f(target, key, result);
10441
10443
  return result;
10442
10444
  };
10443
10445
  var __publicField$8 = (obj, key, value) => __defNormalProp$8(obj, key + "" , value);
@@ -10599,37 +10601,37 @@ void main(void) {
10599
10601
  gl_FragColor = vec4(color.rgb + mist.rgb, color.a);
10600
10602
  }`
10601
10603
  }));
10602
- __decorateClass$c([
10604
+ __decorateClass$f([
10603
10605
  property()
10604
10606
  ], GodrayEffect.prototype, "angle", 2);
10605
- __decorateClass$c([
10607
+ __decorateClass$f([
10606
10608
  property()
10607
10609
  ], GodrayEffect.prototype, "gain", 2);
10608
- __decorateClass$c([
10610
+ __decorateClass$f([
10609
10611
  property()
10610
10612
  ], GodrayEffect.prototype, "lacunarity", 2);
10611
- __decorateClass$c([
10613
+ __decorateClass$f([
10612
10614
  property()
10613
10615
  ], GodrayEffect.prototype, "parallel", 2);
10614
- __decorateClass$c([
10616
+ __decorateClass$f([
10615
10617
  property()
10616
10618
  ], GodrayEffect.prototype, "center", 2);
10617
- __decorateClass$c([
10619
+ __decorateClass$f([
10618
10620
  property()
10619
10621
  ], GodrayEffect.prototype, "alpha", 2);
10620
- GodrayEffect = __decorateClass$c([
10622
+ GodrayEffect = __decorateClass$f([
10621
10623
  customNode("GodrayEffect")
10622
10624
  ], GodrayEffect);
10623
10625
 
10624
- var __defProp$b = Object.defineProperty;
10625
- var __getOwnPropDesc$b = Object.getOwnPropertyDescriptor;
10626
- var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10627
- var __decorateClass$b = (decorators, target, key, kind) => {
10628
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$b(target, key) : target;
10626
+ var __defProp$e = Object.defineProperty;
10627
+ var __getOwnPropDesc$e = Object.getOwnPropertyDescriptor;
10628
+ var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10629
+ var __decorateClass$e = (decorators, target, key, kind) => {
10630
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$e(target, key) : target;
10629
10631
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
10630
10632
  if (decorator = decorators[i])
10631
10633
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
10632
- if (kind && result) __defProp$b(target, key, result);
10634
+ if (kind && result) __defProp$e(target, key, result);
10633
10635
  return result;
10634
10636
  };
10635
10637
  var __publicField$7 = (obj, key, value) => __defNormalProp$7(obj, key + "" , value);
@@ -10714,19 +10716,19 @@ void main(void) {
10714
10716
  gl_FragColor = color;
10715
10717
  }`
10716
10718
  }));
10717
- KawaseEffect = __decorateClass$b([
10719
+ KawaseEffect = __decorateClass$e([
10718
10720
  customNode("KawaseEffect")
10719
10721
  ], KawaseEffect);
10720
10722
 
10721
- var __defProp$a = Object.defineProperty;
10722
- var __getOwnPropDesc$a = Object.getOwnPropertyDescriptor;
10723
- var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10724
- var __decorateClass$a = (decorators, target, key, kind) => {
10725
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$a(target, key) : target;
10723
+ var __defProp$d = Object.defineProperty;
10724
+ var __getOwnPropDesc$d = Object.getOwnPropertyDescriptor;
10725
+ var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10726
+ var __decorateClass$d = (decorators, target, key, kind) => {
10727
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$d(target, key) : target;
10726
10728
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
10727
10729
  if (decorator = decorators[i])
10728
10730
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
10729
- if (kind && result) __defProp$a(target, key, result);
10731
+ if (kind && result) __defProp$d(target, key, result);
10730
10732
  return result;
10731
10733
  };
10732
10734
  var __publicField$6 = (obj, key, value) => __defNormalProp$6(obj, key + "" , value);
@@ -10768,27 +10770,27 @@ void main() {
10768
10770
  gl_FragColor = mix(src2Color, src1Color, mixPercent);
10769
10771
  }`
10770
10772
  }));
10771
- LeftEraseEffect = __decorateClass$a([
10773
+ LeftEraseEffect = __decorateClass$d([
10772
10774
  customNode("LeftEraseEffect")
10773
10775
  ], LeftEraseEffect);
10774
10776
 
10775
- var __defProp$9 = Object.defineProperty;
10776
- var __getOwnPropDesc$9 = Object.getOwnPropertyDescriptor;
10777
- var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10778
- var __decorateClass$9 = (decorators, target, key, kind) => {
10779
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$9(target, key) : target;
10777
+ var __defProp$c = Object.defineProperty;
10778
+ var __getOwnPropDesc$c = Object.getOwnPropertyDescriptor;
10779
+ var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10780
+ var __decorateClass$c = (decorators, target, key, kind) => {
10781
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$c(target, key) : target;
10780
10782
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
10781
10783
  if (decorator = decorators[i])
10782
10784
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
10783
- if (kind && result) __defProp$9(target, key, result);
10785
+ if (kind && result) __defProp$c(target, key, result);
10784
10786
  return result;
10785
10787
  };
10786
10788
  var __publicField$5 = (obj, key, value) => __defNormalProp$5(obj, key + "" , value);
10787
10789
  let MaskEffect = class extends Effect {
10788
10790
  texture;
10789
- constructor(options) {
10791
+ constructor(properties, children = []) {
10790
10792
  super();
10791
- this.setProperties(options);
10793
+ this.setProperties(properties).append(children);
10792
10794
  }
10793
10795
  async load() {
10794
10796
  this.texture = undefined;
@@ -10854,25 +10856,25 @@ void main(void) {
10854
10856
  }
10855
10857
  }`
10856
10858
  }));
10857
- __decorateClass$9([
10859
+ __decorateClass$c([
10858
10860
  protectedProperty()
10859
10861
  ], MaskEffect.prototype, "texture", 2);
10860
- __decorateClass$9([
10862
+ __decorateClass$c([
10861
10863
  property({ default: "" })
10862
10864
  ], MaskEffect.prototype, "src", 2);
10863
- MaskEffect = __decorateClass$9([
10865
+ MaskEffect = __decorateClass$c([
10864
10866
  customNode("MaskEffect")
10865
10867
  ], MaskEffect);
10866
10868
 
10867
- var __defProp$8 = Object.defineProperty;
10868
- var __getOwnPropDesc$8 = Object.getOwnPropertyDescriptor;
10869
- var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10870
- var __decorateClass$8 = (decorators, target, key, kind) => {
10871
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$8(target, key) : target;
10869
+ var __defProp$b = Object.defineProperty;
10870
+ var __getOwnPropDesc$b = Object.getOwnPropertyDescriptor;
10871
+ var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10872
+ var __decorateClass$b = (decorators, target, key, kind) => {
10873
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$b(target, key) : target;
10872
10874
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
10873
10875
  if (decorator = decorators[i])
10874
10876
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
10875
- if (kind && result) __defProp$8(target, key, result);
10877
+ if (kind && result) __defProp$b(target, key, result);
10876
10878
  return result;
10877
10879
  };
10878
10880
  var __publicField$4 = (obj, key, value) => __defNormalProp$4(obj, key + "" , value);
@@ -10929,22 +10931,22 @@ void main(void) {
10929
10931
  gl_FragColor = texture2D(sampler, coord);
10930
10932
  }`
10931
10933
  }));
10932
- __decorateClass$8([
10934
+ __decorateClass$b([
10933
10935
  property()
10934
10936
  ], PixelateEffect.prototype, "size", 2);
10935
- PixelateEffect = __decorateClass$8([
10937
+ PixelateEffect = __decorateClass$b([
10936
10938
  customNode("PixelateEffect")
10937
10939
  ], PixelateEffect);
10938
10940
 
10939
- var __defProp$7 = Object.defineProperty;
10940
- var __getOwnPropDesc$7 = Object.getOwnPropertyDescriptor;
10941
- var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10942
- var __decorateClass$7 = (decorators, target, key, kind) => {
10943
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$7(target, key) : target;
10941
+ var __defProp$a = Object.defineProperty;
10942
+ var __getOwnPropDesc$a = Object.getOwnPropertyDescriptor;
10943
+ var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10944
+ var __decorateClass$a = (decorators, target, key, kind) => {
10945
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$a(target, key) : target;
10944
10946
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
10945
10947
  if (decorator = decorators[i])
10946
10948
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
10947
- if (kind && result) __defProp$7(target, key, result);
10949
+ if (kind && result) __defProp$a(target, key, result);
10948
10950
  return result;
10949
10951
  };
10950
10952
  var __publicField$3 = (obj, key, value) => __defNormalProp$3(obj, key + "" , value);
@@ -10997,19 +10999,19 @@ void main(void) {
10997
10999
  gl_FragColor = sample;
10998
11000
  }`
10999
11001
  }));
11000
- ShadowEffect = __decorateClass$7([
11002
+ ShadowEffect = __decorateClass$a([
11001
11003
  customNode("ShadowEffect")
11002
11004
  ], ShadowEffect);
11003
11005
 
11004
- var __defProp$6 = Object.defineProperty;
11005
- var __getOwnPropDesc$6 = Object.getOwnPropertyDescriptor;
11006
- var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
11007
- var __decorateClass$6 = (decorators, target, key, kind) => {
11008
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$6(target, key) : target;
11006
+ var __defProp$9 = Object.defineProperty;
11007
+ var __getOwnPropDesc$9 = Object.getOwnPropertyDescriptor;
11008
+ var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
11009
+ var __decorateClass$9 = (decorators, target, key, kind) => {
11010
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$9(target, key) : target;
11009
11011
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
11010
11012
  if (decorator = decorators[i])
11011
11013
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
11012
- if (kind && result) __defProp$6(target, key, result);
11014
+ if (kind && result) __defProp$9(target, key, result);
11013
11015
  return result;
11014
11016
  };
11015
11017
  var __publicField$2 = (obj, key, value) => __defNormalProp$2(obj, key + "" , value);
@@ -11105,19 +11107,19 @@ void main(void) {
11105
11107
  gl_FragColor = color;
11106
11108
  }`
11107
11109
  }));
11108
- TiltShiftEffect = __decorateClass$6([
11110
+ TiltShiftEffect = __decorateClass$9([
11109
11111
  customNode("TiltShiftEffect")
11110
11112
  ], TiltShiftEffect);
11111
11113
 
11112
- var __defProp$5 = Object.defineProperty;
11113
- var __getOwnPropDesc$5 = Object.getOwnPropertyDescriptor;
11114
- var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
11115
- var __decorateClass$5 = (decorators, target, key, kind) => {
11116
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$5(target, key) : target;
11114
+ var __defProp$8 = Object.defineProperty;
11115
+ var __getOwnPropDesc$8 = Object.getOwnPropertyDescriptor;
11116
+ var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
11117
+ var __decorateClass$8 = (decorators, target, key, kind) => {
11118
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$8(target, key) : target;
11117
11119
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
11118
11120
  if (decorator = decorators[i])
11119
11121
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
11120
- if (kind && result) __defProp$5(target, key, result);
11122
+ if (kind && result) __defProp$8(target, key, result);
11121
11123
  return result;
11122
11124
  };
11123
11125
  var __publicField$1 = (obj, key, value) => __defNormalProp$1(obj, key + "" , value);
@@ -11200,19 +11202,19 @@ void main(void) {
11200
11202
  gl_FragColor = texture2D(sampler, coord);
11201
11203
  }`
11202
11204
  }));
11203
- TwistEffect = __decorateClass$5([
11205
+ TwistEffect = __decorateClass$8([
11204
11206
  customNode("TwistEffect")
11205
11207
  ], TwistEffect);
11206
11208
 
11207
- var __defProp$4 = Object.defineProperty;
11208
- var __getOwnPropDesc$4 = Object.getOwnPropertyDescriptor;
11209
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
11210
- var __decorateClass$4 = (decorators, target, key, kind) => {
11211
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$4(target, key) : target;
11209
+ var __defProp$7 = Object.defineProperty;
11210
+ var __getOwnPropDesc$7 = Object.getOwnPropertyDescriptor;
11211
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
11212
+ var __decorateClass$7 = (decorators, target, key, kind) => {
11213
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$7(target, key) : target;
11212
11214
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
11213
11215
  if (decorator = decorators[i])
11214
11216
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
11215
- if (kind && result) __defProp$4(target, key, result);
11217
+ if (kind && result) __defProp$7(target, key, result);
11216
11218
  return result;
11217
11219
  };
11218
11220
  var __publicField = (obj, key, value) => __defNormalProp(obj, key + "" , value);
@@ -11318,30 +11320,30 @@ void main() {
11318
11320
  gl_FragColor = color;
11319
11321
  }`
11320
11322
  }));
11321
- __decorateClass$4([
11323
+ __decorateClass$7([
11322
11324
  property()
11323
11325
  ], ZoomBlurEffect.prototype, "center", 2);
11324
- __decorateClass$4([
11326
+ __decorateClass$7([
11325
11327
  property()
11326
11328
  ], ZoomBlurEffect.prototype, "innerRadius", 2);
11327
- __decorateClass$4([
11329
+ __decorateClass$7([
11328
11330
  property()
11329
11331
  ], ZoomBlurEffect.prototype, "radius", 2);
11330
- __decorateClass$4([
11332
+ __decorateClass$7([
11331
11333
  property()
11332
11334
  ], ZoomBlurEffect.prototype, "strength", 2);
11333
- ZoomBlurEffect = __decorateClass$4([
11335
+ ZoomBlurEffect = __decorateClass$7([
11334
11336
  customNode("ZoomBlurEffect")
11335
11337
  ], ZoomBlurEffect);
11336
11338
 
11337
- var __defProp$3 = Object.defineProperty;
11338
- var __getOwnPropDesc$3 = Object.getOwnPropertyDescriptor;
11339
- var __decorateClass$3 = (decorators, target, key, kind) => {
11340
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$3(target, key) : target;
11339
+ var __defProp$6 = Object.defineProperty;
11340
+ var __getOwnPropDesc$6 = Object.getOwnPropertyDescriptor;
11341
+ var __decorateClass$6 = (decorators, target, key, kind) => {
11342
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$6(target, key) : target;
11341
11343
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
11342
11344
  if (decorator = decorators[i])
11343
11345
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
11344
- if (kind && result) __defProp$3(target, key, result);
11346
+ if (kind && result) __defProp$6(target, key, result);
11345
11347
  return result;
11346
11348
  };
11347
11349
  let Control = class extends CanvasItem {
@@ -11401,18 +11403,73 @@ let Control = class extends CanvasItem {
11401
11403
  return new Rect2(left, top, width, height);
11402
11404
  }
11403
11405
  };
11404
- Control = __decorateClass$3([
11406
+ Control = __decorateClass$6([
11405
11407
  customNode("Control")
11406
11408
  ], Control);
11407
11409
 
11408
- var __defProp$2 = Object.defineProperty;
11409
- var __getOwnPropDesc$2 = Object.getOwnPropertyDescriptor;
11410
- var __decorateClass$2 = (decorators, target, key, kind) => {
11411
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$2(target, key) : target;
11410
+ var __defProp$5 = Object.defineProperty;
11411
+ var __getOwnPropDesc$5 = Object.getOwnPropertyDescriptor;
11412
+ var __decorateClass$5 = (decorators, target, key, kind) => {
11413
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$5(target, key) : target;
11412
11414
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
11413
11415
  if (decorator = decorators[i])
11414
11416
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
11415
- if (kind && result) __defProp$2(target, key, result);
11417
+ if (kind && result) __defProp$5(target, key, result);
11418
+ return result;
11419
+ };
11420
+ let Range = class extends Control {
11421
+ constructor(properties, children = []) {
11422
+ super();
11423
+ this.setProperties(properties).append(children);
11424
+ }
11425
+ _updateProperty(key, value, oldValue, declaration) {
11426
+ super._updateProperty(key, value, oldValue, declaration);
11427
+ switch (key) {
11428
+ case "allowGreater":
11429
+ case "allowLesser":
11430
+ case "page":
11431
+ case "minValue":
11432
+ case "maxValue":
11433
+ case "step":
11434
+ case "value":
11435
+ this.requestRedraw();
11436
+ break;
11437
+ }
11438
+ }
11439
+ };
11440
+ __decorateClass$5([
11441
+ property({ default: false })
11442
+ ], Range.prototype, "allowGreater", 2);
11443
+ __decorateClass$5([
11444
+ property({ default: false })
11445
+ ], Range.prototype, "allowLesser", 2);
11446
+ __decorateClass$5([
11447
+ property({ default: 1 })
11448
+ ], Range.prototype, "page", 2);
11449
+ __decorateClass$5([
11450
+ property({ default: 0 })
11451
+ ], Range.prototype, "minValue", 2);
11452
+ __decorateClass$5([
11453
+ property({ default: 100 })
11454
+ ], Range.prototype, "maxValue", 2);
11455
+ __decorateClass$5([
11456
+ property({ default: 0.01 })
11457
+ ], Range.prototype, "step", 2);
11458
+ __decorateClass$5([
11459
+ property({ default: 0 })
11460
+ ], Range.prototype, "value", 2);
11461
+ Range = __decorateClass$5([
11462
+ customNode("Range")
11463
+ ], Range);
11464
+
11465
+ var __defProp$4 = Object.defineProperty;
11466
+ var __getOwnPropDesc$4 = Object.getOwnPropertyDescriptor;
11467
+ var __decorateClass$4 = (decorators, target, key, kind) => {
11468
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$4(target, key) : target;
11469
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
11470
+ if (decorator = decorators[i])
11471
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
11472
+ if (kind && result) __defProp$4(target, key, result);
11416
11473
  return result;
11417
11474
  };
11418
11475
  let Ruler = class extends Control {
@@ -11563,95 +11620,137 @@ let Ruler = class extends Control {
11563
11620
  }
11564
11621
  }
11565
11622
  };
11566
- __decorateClass$2([
11623
+ __decorateClass$4([
11567
11624
  property({ default: 0 })
11568
11625
  ], Ruler.prototype, "offsetX", 2);
11569
- __decorateClass$2([
11626
+ __decorateClass$4([
11570
11627
  property({ default: 0 })
11571
11628
  ], Ruler.prototype, "offsetY", 2);
11572
- __decorateClass$2([
11629
+ __decorateClass$4([
11573
11630
  property({ default: 20 })
11574
11631
  ], Ruler.prototype, "thickness", 2);
11575
- __decorateClass$2([
11632
+ __decorateClass$4([
11576
11633
  property({ default: 3 })
11577
11634
  ], Ruler.prototype, "markHeight", 2);
11578
- __decorateClass$2([
11635
+ __decorateClass$4([
11579
11636
  property({ default: "#b2b6bc" })
11580
11637
  ], Ruler.prototype, "color", 2);
11581
- __decorateClass$2([
11638
+ __decorateClass$4([
11582
11639
  property({ default: "#f9f9fa" })
11583
11640
  ], Ruler.prototype, "markBackgroundColor", 2);
11584
- __decorateClass$2([
11641
+ __decorateClass$4([
11585
11642
  property({ default: "#b2b6bc" })
11586
11643
  ], Ruler.prototype, "markColor", 2);
11587
- __decorateClass$2([
11644
+ __decorateClass$4([
11588
11645
  property({ default: 300 })
11589
11646
  ], Ruler.prototype, "gap", 2);
11590
- __decorateClass$2([
11647
+ __decorateClass$4([
11591
11648
  property({ default: 1 })
11592
11649
  ], Ruler.prototype, "scale", 2);
11593
- Ruler = __decorateClass$2([
11650
+ Ruler = __decorateClass$4([
11594
11651
  customNode("Ruler")
11595
11652
  ], Ruler);
11596
11653
 
11597
- var __defProp$1 = Object.defineProperty;
11598
- var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
11599
- var __decorateClass$1 = (decorators, target, key, kind) => {
11600
- var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$1(target, key) : target;
11654
+ var __defProp$3 = Object.defineProperty;
11655
+ var __getOwnPropDesc$3 = Object.getOwnPropertyDescriptor;
11656
+ var __decorateClass$3 = (decorators, target, key, kind) => {
11657
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$3(target, key) : target;
11601
11658
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
11602
11659
  if (decorator = decorators[i])
11603
11660
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
11604
- if (kind && result) __defProp$1(target, key, result);
11661
+ if (kind && result) __defProp$3(target, key, result);
11605
11662
  return result;
11606
11663
  };
11607
- let ScrollBar = class extends Control {
11664
+ let ScrollBar = class extends Range {
11608
11665
  constructor(properties, children = []) {
11609
11666
  super();
11610
11667
  this.setProperties(properties).append(children);
11611
11668
  }
11612
- _parentUpdateRect() {
11613
- super._parentUpdateRect();
11614
- const rect = this._parent.getRect();
11615
- if (rect && rect.width && rect.height) {
11616
- if (this.direction === "vertical") {
11617
- this.style.width = 10;
11618
- this.style.height = rect.height - this.padding * 2;
11619
- this.style.left = rect.right - this.style.width;
11620
- this.style.top = this.padding;
11621
- } else {
11622
- this.style.height = 10;
11623
- this.style.width = rect.width - this.padding * 2;
11624
- this.style.left = this.padding;
11625
- this.style.top = rect.bottom - this.style.height;
11626
- }
11669
+ _updateStyleProperty(key, value, oldValue, declaration) {
11670
+ super._updateStyleProperty(key, value, oldValue, declaration);
11671
+ switch (key) {
11672
+ case "width":
11673
+ case "height":
11674
+ case "left":
11675
+ case "top":
11676
+ this.requestRedraw();
11677
+ break;
11627
11678
  }
11628
- this.requestRedraw();
11629
11679
  }
11630
11680
  _guiInput(event, key) {
11631
11681
  super._guiInput(event, key);
11632
11682
  }
11633
11683
  _draw() {
11634
- this.context.roundRect(
11635
- this.style.left,
11636
- this.style.top,
11637
- this.style.width,
11638
- this.style.height,
11639
- this.style.borderRadius ?? 20
11640
- );
11641
- this.context.fillStyle = 15;
11684
+ let left, top, width, height, radii;
11685
+ if (this.direction === "vertical") {
11686
+ width = 10;
11687
+ height = this.style.height * (this.page / (this.maxValue - this.minValue));
11688
+ left = this.style.left + this.style.width - width;
11689
+ top = this.style.height * (this.value / (this.maxValue - this.minValue));
11690
+ radii = width / 2;
11691
+ } else {
11692
+ width = this.style.width * (this.page / (this.maxValue - this.minValue));
11693
+ height = 10;
11694
+ left = this.style.width * (this.value / (this.maxValue - this.minValue));
11695
+ top = this.style.top + this.style.height - height;
11696
+ radii = height / 2;
11697
+ }
11698
+ this.context.roundRect(left, top, width, height, radii);
11699
+ this.context.fillStyle = 34;
11642
11700
  this.context.fill();
11643
11701
  }
11644
11702
  };
11645
- __decorateClass$1([
11703
+ __decorateClass$3([
11646
11704
  property({ default: "vertical" })
11647
11705
  ], ScrollBar.prototype, "direction", 2);
11648
- __decorateClass$1([
11649
- property({ default: 10 })
11650
- ], ScrollBar.prototype, "padding", 2);
11651
- ScrollBar = __decorateClass$1([
11706
+ ScrollBar = __decorateClass$3([
11652
11707
  customNode("ScrollBar")
11653
11708
  ], ScrollBar);
11654
11709
 
11710
+ var __defProp$2 = Object.defineProperty;
11711
+ var __getOwnPropDesc$2 = Object.getOwnPropertyDescriptor;
11712
+ var __decorateClass$2 = (decorators, target, key, kind) => {
11713
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$2(target, key) : target;
11714
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
11715
+ if (decorator = decorators[i])
11716
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
11717
+ if (kind && result) __defProp$2(target, key, result);
11718
+ return result;
11719
+ };
11720
+ let XScrollBar = class extends ScrollBar {
11721
+ constructor(properties, children = []) {
11722
+ super();
11723
+ this.setProperties(properties).append(children);
11724
+ }
11725
+ };
11726
+ XScrollBar = __decorateClass$2([
11727
+ customNode("XScrollBar", {
11728
+ direction: "horizontal"
11729
+ })
11730
+ ], XScrollBar);
11731
+
11732
+ var __defProp$1 = Object.defineProperty;
11733
+ var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
11734
+ var __decorateClass$1 = (decorators, target, key, kind) => {
11735
+ var result = kind > 1 ? undefined : kind ? __getOwnPropDesc$1(target, key) : target;
11736
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
11737
+ if (decorator = decorators[i])
11738
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
11739
+ if (kind && result) __defProp$1(target, key, result);
11740
+ return result;
11741
+ };
11742
+ let YScrollBar = class extends ScrollBar {
11743
+ constructor(properties, children = []) {
11744
+ super();
11745
+ this.setProperties(properties).append(children);
11746
+ }
11747
+ };
11748
+ YScrollBar = __decorateClass$1([
11749
+ customNode("YScrollBar", {
11750
+ direction: "vertical"
11751
+ })
11752
+ ], YScrollBar);
11753
+
11655
11754
  var __defProp = Object.defineProperty;
11656
11755
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
11657
11756
  var __decorateClass = (decorators, target, key, kind) => {
@@ -11677,10 +11776,10 @@ let Scaler = class extends Node {
11677
11776
  _updateProperty(key, value, oldValue, declaration) {
11678
11777
  super._updateProperty(key, value, oldValue, declaration);
11679
11778
  switch (key) {
11680
- case "scale":
11779
+ case "value":
11681
11780
  case "min":
11682
11781
  case "max": {
11683
- this.scale = clamp(this.min, this.scale, this.max);
11782
+ this.value = clamp(this.minValue, this.value, this.maxValue);
11684
11783
  this._updateScale();
11685
11784
  break;
11686
11785
  }
@@ -11689,9 +11788,9 @@ let Scaler = class extends Node {
11689
11788
  _updateScale() {
11690
11789
  const target = this.target;
11691
11790
  if (target) {
11692
- target.style.scaleX = this.scale;
11693
- target.style.scaleY = this.scale;
11694
- this.emit("updateScale", this.scale);
11791
+ target.style.scaleX = this.value;
11792
+ target.style.scaleY = this.value;
11793
+ this.emit("updateScale", this.value);
11695
11794
  }
11696
11795
  }
11697
11796
  _onWheel(e) {
@@ -11704,7 +11803,7 @@ let Scaler = class extends Node {
11704
11803
  e.preventDefault();
11705
11804
  let distance = e.deltaY / (e.ctrlKey ? 1 : 100);
11706
11805
  distance *= -0.015;
11707
- this.scale += distance;
11806
+ this.value += distance;
11708
11807
  }
11709
11808
  }
11710
11809
  _input(event, key) {
@@ -11718,13 +11817,13 @@ let Scaler = class extends Node {
11718
11817
  };
11719
11818
  __decorateClass([
11720
11819
  property({ default: 1 })
11721
- ], Scaler.prototype, "scale", 2);
11820
+ ], Scaler.prototype, "value", 2);
11722
11821
  __decorateClass([
11723
11822
  property({ default: 0.05 })
11724
- ], Scaler.prototype, "min", 2);
11823
+ ], Scaler.prototype, "minValue", 2);
11725
11824
  __decorateClass([
11726
11825
  property({ default: 10 })
11727
- ], Scaler.prototype, "max", 2);
11826
+ ], Scaler.prototype, "maxValue", 2);
11728
11827
  Scaler = __decorateClass([
11729
11828
  customNode("Scaler", {
11730
11829
  processMode: "disabled",
@@ -12100,31 +12199,49 @@ class CanvasEditor extends Control {
12100
12199
  internalMode: "back"
12101
12200
  }).on("updateScale", (scale) => {
12102
12201
  this.ruler.scale = scale;
12202
+ const scrollHeight = this.drawboard.style.height * scale;
12203
+ const scrollWidth = this.drawboard.style.width * scale;
12204
+ if (scrollHeight > this.style.height) {
12205
+ this.yScrollBar.style.visibility = "visible";
12206
+ this.yScrollBar.maxValue = scrollHeight;
12207
+ this.yScrollBar.page = this.style.height;
12208
+ } else {
12209
+ this.yScrollBar.style.visibility = "hidden";
12210
+ }
12211
+ if (scrollWidth > this.style.width) {
12212
+ this.xScrollBar.style.visibility = "visible";
12213
+ this.xScrollBar.maxValue = scrollWidth;
12214
+ this.xScrollBar.page = this.style.width;
12215
+ } else {
12216
+ this.xScrollBar.style.visibility = "hidden";
12217
+ }
12103
12218
  });
12104
- xScrollBar = new ScrollBar({
12219
+ xScrollBar = new XScrollBar({
12105
12220
  internalMode: "back",
12106
- direction: "horizontal"
12221
+ style: {
12222
+ visibility: "hidden"
12223
+ }
12107
12224
  });
12108
- yScrollBar = new ScrollBar({
12225
+ yScrollBar = new YScrollBar({
12109
12226
  internalMode: "back",
12110
- direction: "vertical"
12227
+ style: {
12228
+ visibility: "hidden"
12229
+ }
12111
12230
  });
12112
12231
  drawboard = new Node2D({
12113
12232
  name: "drawboard",
12114
12233
  style: {
12115
- left: 100,
12116
- top: 100,
12117
12234
  width: 500,
12118
12235
  height: 500,
12119
12236
  backgroundColor: 4294967295,
12120
12237
  overflow: "hidden",
12121
- borderStyle: "solid",
12122
- borderWidth: 2,
12123
- pointerEvents: "none",
12124
- transformOrigin: "left top"
12238
+ pointerEvents: "none"
12125
12239
  }
12126
12240
  }).append(
12127
- this.scaler
12241
+ this.scaler,
12242
+ new ShadowEffect({
12243
+ internalMode: "back"
12244
+ })
12128
12245
  );
12129
12246
  ruler = new Ruler({
12130
12247
  name: "ruler",
@@ -12147,6 +12264,19 @@ class CanvasEditor extends Control {
12147
12264
  this._onPointerup = this._onPointerup.bind(this);
12148
12265
  this.append(this.ruler);
12149
12266
  }
12267
+ _updateStyleProperty(key, value, oldValue, declaration) {
12268
+ super._updateStyleProperty(key, value, oldValue, declaration);
12269
+ switch (key) {
12270
+ case "width":
12271
+ this.drawboard.style.left = (this.style.width - this.drawboard.style.width) / 2;
12272
+ this.ruler.offsetX = this.drawboard.style.left;
12273
+ break;
12274
+ case "height":
12275
+ this.drawboard.style.top = (this.style.height - this.drawboard.style.height) / 2;
12276
+ this.ruler.offsetY = this.drawboard.style.top;
12277
+ break;
12278
+ }
12279
+ }
12150
12280
  _guiInput(event, key) {
12151
12281
  super._guiInput(event, key);
12152
12282
  switch (key) {
@@ -12417,4 +12547,4 @@ async function render(options) {
12417
12547
  });
12418
12548
  }
12419
12549
 
12420
- export { Animation, Assets, Audio, AudioPipeline, AudioProcessor, AudioSpectrum, AudioWaveform, BlurEffect, CanvasContext, CanvasEditor, CanvasItem, CanvasItemStyle, CanvasTexture, Color, ColorAdjustEffect, ColorFilterEffect, ColorMatrix, ColorOverlayEffect, ColorRemoveEffect, ColorReplaceEffect, ColorTexture, Control, CoreObject, DEG_TO_RAD, DEVICE_PIXEL_RATIO, Effect, EffectMaterial, EmbossEffect, Engine, EventEmitter, FontLoader, Geometry, GifLoader, GlitchEffect, GodrayEffect, Graphics2D, HTMLAudio, HTMLAudioContext, HTMLSound, IN_BROWSER, Image2D, Image2DResource, ImageTexture, IndexBuffer, Input, InputEvent, JsonLoader, KawaseEffect, LeftEraseEffect, Loader, Lottie2D, LottieLoader, MainLoop, MaskEffect, Material, Matrix, Matrix2, Matrix3, Matrix4, MouseInputEvent, Node, Node2D, PI, PI_2, PixelateEffect, PixelsTexture, PointerInputEvent, Projection2D, QuadGeometry, QuadUvGeometry, RAD_TO_DEG, RawWeakMap, Rect2, RefCounted, Renderer, Resource, Ruler, SUPPORTS_AUDIO_CONTEXT, SUPPORTS_CLICK_EVENTS, SUPPORTS_CREATE_IMAGE_BITMAP, SUPPORTS_IMAGE_BITMAP, SUPPORTS_MOUSE_EVENTS, SUPPORTS_OFFLINE_AUDIO_CONTEXT, SUPPORTS_POINTER_EVENTS, SUPPORTS_RESIZE_OBSERVER, SUPPORTS_TOUCH_EVENTS, SUPPORTS_WEBGL2, SUPPORTS_WEBKIT_AUDIO_CONTEXT, SUPPORTS_WEBKIT_OFFLINE_AUDIO_CONTEXT, SUPPORTS_WEB_AUDIO, SUPPORTS_WHEEL_EVENTS, Scaler, SceneTree, ScrollBar, ShadowEffect, Text2D, TextLoader, Texture2D, TextureLoader, TextureRect2D, Ticker, TiltShiftEffect, Timeline, TimelineNode, Transform2D, TwistEffect, UvGeometry, UvMaterial, Vector, Vector2, Vector3, Vector4, VertexAttribute, VertexBuffer, Video2D, VideoLoader, VideoTexture, Viewport, ViewportTexture, WebAudio, WebAudioContext, WebGLBatch2DModule, WebGLBlendMode, WebGLBufferModule, WebGLFramebufferModule, WebGLMaskModule, WebGLModule, WebGLProgramModule, WebGLRenderer, WebGLScissorModule, WebGLState, WebGLStateModule, WebGLStencilModule, WebGLTextureModule, WebGLVertexArrayModule, WebGLViewportModule, WebSound, WheelInputEvent, ZoomBlurEffect, assets, clamp, createHTMLCanvas, createNode, crossOrigin, cubicBezier, curves, customNode, customNodes, defaultOptions, defineProperty, determineCrossOrigin, ease, easeIn, easeInOut, easeOut, getDeclarations, getDefaultCssPropertyValue, isCanvasElement, isElementNode, isImageElement, isPow2, isVideoElement, isWebgl2, lerp, linear, log2, mapWebGLBlendModes, nextPow2, nextTick, parseCssFunctions, parseCssProperty, property, protectedProperty, render, timingFunctions, uid };
12550
+ export { Animation, Assets, Audio, AudioPipeline, AudioProcessor, AudioSpectrum, AudioWaveform, BlurEffect, CanvasContext, CanvasEditor, CanvasItem, CanvasItemStyle, CanvasTexture, Color, ColorAdjustEffect, ColorFilterEffect, ColorMatrix, ColorOverlayEffect, ColorRemoveEffect, ColorReplaceEffect, ColorTexture, Control, CoreObject, DEG_TO_RAD, DEVICE_PIXEL_RATIO, Effect, EffectMaterial, EmbossEffect, Engine, EventEmitter, FontLoader, Geometry, GifLoader, GlitchEffect, GodrayEffect, Graphics2D, HTMLAudio, HTMLAudioContext, HTMLSound, IN_BROWSER, Image2D, Image2DResource, ImageTexture, IndexBuffer, Input, InputEvent, JsonLoader, KawaseEffect, LeftEraseEffect, Loader, Lottie2D, LottieLoader, MainLoop, MaskEffect, Material, Matrix, Matrix2, Matrix3, Matrix4, MouseInputEvent, Node, Node2D, PI, PI_2, PixelateEffect, PixelsTexture, PointerInputEvent, Projection2D, QuadGeometry, QuadUvGeometry, RAD_TO_DEG, Range, RawWeakMap, Rect2, RefCounted, Renderer, Resource, Ruler, SUPPORTS_AUDIO_CONTEXT, SUPPORTS_CLICK_EVENTS, SUPPORTS_CREATE_IMAGE_BITMAP, SUPPORTS_IMAGE_BITMAP, SUPPORTS_MOUSE_EVENTS, SUPPORTS_OFFLINE_AUDIO_CONTEXT, SUPPORTS_POINTER_EVENTS, SUPPORTS_RESIZE_OBSERVER, SUPPORTS_TOUCH_EVENTS, SUPPORTS_WEBGL2, SUPPORTS_WEBKIT_AUDIO_CONTEXT, SUPPORTS_WEBKIT_OFFLINE_AUDIO_CONTEXT, SUPPORTS_WEB_AUDIO, SUPPORTS_WHEEL_EVENTS, Scaler, SceneTree, ScrollBar, ShadowEffect, Text2D, TextLoader, Texture2D, TextureLoader, TextureRect2D, Ticker, TiltShiftEffect, Timeline, TimelineNode, Transform2D, TwistEffect, UvGeometry, UvMaterial, Vector, Vector2, Vector3, Vector4, VertexAttribute, VertexBuffer, Video2D, VideoLoader, VideoTexture, Viewport, ViewportTexture, WebAudio, WebAudioContext, WebGLBatch2DModule, WebGLBlendMode, WebGLBufferModule, WebGLFramebufferModule, WebGLMaskModule, WebGLModule, WebGLProgramModule, WebGLRenderer, WebGLScissorModule, WebGLState, WebGLStateModule, WebGLStencilModule, WebGLTextureModule, WebGLVertexArrayModule, WebGLViewportModule, WebSound, WheelInputEvent, XScrollBar, YScrollBar, ZoomBlurEffect, assets, clamp, createHTMLCanvas, createNode, crossOrigin, cubicBezier, curves, customNode, customNodes, defaultOptions, defineProperty, determineCrossOrigin, ease, easeIn, easeInOut, easeOut, getDeclarations, getDefaultCssPropertyValue, isCanvasElement, isElementNode, isImageElement, isPow2, isVideoElement, isWebgl2, lerp, linear, log2, mapWebGLBlendModes, nextPow2, nextTick, parseCssFunctions, parseCssProperty, property, protectedProperty, render, timingFunctions, uid };