modern-canvas 0.5.2 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -12,26 +12,24 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
12
12
  const namesPlugin__default = /*#__PURE__*/_interopDefaultCompat(namesPlugin);
13
13
 
14
14
  const customNodes = /* @__PURE__ */ new Map();
15
- function customNode(tag, defaultProperties) {
15
+ function customNode(name, defaultProperties) {
16
16
  return function(constructor) {
17
- Object.defineProperty(constructor.prototype, "tag", {
18
- value: tag,
17
+ Object.defineProperty(constructor.prototype, "is", {
18
+ value: name,
19
19
  enumerable: true,
20
20
  configurable: true
21
21
  });
22
22
  if (defaultProperties) {
23
23
  Object.keys(defaultProperties).forEach((key) => {
24
- modernIdoc.defineProperty(constructor, key, { default: defaultProperties[key] });
24
+ modernIdoc.defineProperty(constructor.prototype, key, {
25
+ fallback: defaultProperties[key]
26
+ });
25
27
  });
26
28
  }
27
- customNodes.set(tag, constructor);
29
+ customNodes.set(name, constructor);
28
30
  };
29
31
  }
30
32
 
31
- function protectedProperty(options) {
32
- return modernIdoc.property({ ...options, protected: true });
33
- }
34
-
35
33
  function createNode(tag = "node", options = {}) {
36
34
  const Klass = customNodes.get(tag);
37
35
  if (!Klass) {
@@ -210,15 +208,50 @@ class EventEmitter {
210
208
  }
211
209
  }
212
210
 
213
- let UID$1 = 0;
211
+ let IID = 0;
214
212
  class CoreObject extends EventEmitter {
215
- instanceId = ++UID$1;
216
- _defaultProperties;
213
+ instanceId = ++IID;
214
+ _customPropertyAccessor;
215
+ _properties = /* @__PURE__ */ new Map();
217
216
  _updatedProperties = /* @__PURE__ */ new Map();
218
217
  _changedProperties = /* @__PURE__ */ new Set();
219
218
  _updatingPromise = Promise.resolve();
220
219
  _updating = false;
221
- is(target) {
220
+ useCustomPropertyAccessor(accessor) {
221
+ this._customPropertyAccessor = accessor;
222
+ this.getPropertyDeclarations().forEach((declaration, key) => {
223
+ const newValue = accessor.get(key, () => void 0);
224
+ const oldValue = this._properties.get(key);
225
+ if (newValue === void 0) {
226
+ if (oldValue !== void 0) {
227
+ accessor.set(key, oldValue);
228
+ }
229
+ } else if (newValue !== oldValue) {
230
+ this._properties.set(key, newValue);
231
+ this._updateProperty(key, newValue, oldValue, declaration);
232
+ this.emit("updateProperty", key, newValue, oldValue, declaration);
233
+ }
234
+ });
235
+ return this;
236
+ }
237
+ getter(key, context) {
238
+ if (context.declaration.protected) {
239
+ return this[context.internalKey];
240
+ } else {
241
+ return this._customPropertyAccessor ? this._customPropertyAccessor.get(key, () => this._properties.get(key)) : this._properties.get(key);
242
+ }
243
+ }
244
+ setter(key, value, context) {
245
+ if (context.declaration.protected) {
246
+ this[context.internalKey] = value;
247
+ } else {
248
+ if (this._customPropertyAccessor) {
249
+ this._customPropertyAccessor.set(key, value);
250
+ }
251
+ this._properties.set(key, value);
252
+ }
253
+ }
254
+ equal(target) {
222
255
  return Boolean(target && this.instanceId === target.instanceId);
223
256
  }
224
257
  async _enqueueUpdate() {
@@ -253,17 +286,6 @@ class CoreObject extends EventEmitter {
253
286
  getPropertyDeclaration(key) {
254
287
  return this.getPropertyDeclarations().get(key);
255
288
  }
256
- getDefaultProperties() {
257
- if (!this._defaultProperties) {
258
- this._defaultProperties = {};
259
- for (const [name, property] of this.getPropertyDeclarations()) {
260
- if (!property.protected && !property.alias) {
261
- this._defaultProperties[name] = typeof property.default === "function" ? property.default() : property.default;
262
- }
263
- }
264
- }
265
- return this._defaultProperties;
266
- }
267
289
  getProperty(key) {
268
290
  return this[key];
269
291
  }
@@ -292,10 +314,16 @@ class CoreObject extends EventEmitter {
292
314
  }
293
315
  resetProperties() {
294
316
  for (const [name, property] of this.getPropertyDeclarations()) {
295
- this.setProperty(name, property.default);
317
+ this.setProperty(
318
+ name,
319
+ typeof property.fallback === "function" ? property.fallback() : property.fallback
320
+ );
296
321
  }
297
322
  return this;
298
323
  }
324
+ onUpdateProperty(key, newValue, oldValue, declaration) {
325
+ this.requestUpdate(key, newValue, oldValue, declaration);
326
+ }
299
327
  requestUpdate(key, newValue, oldValue, declaration) {
300
328
  if (key !== void 0) {
301
329
  if (!Object.is(newValue, oldValue)) {
@@ -312,11 +340,12 @@ class CoreObject extends EventEmitter {
312
340
  this._updatingPromise = this._enqueueUpdate();
313
341
  }
314
342
  }
315
- toJSON() {
343
+ toPropsJSON() {
316
344
  const json = {};
317
- const properties = this.getProperties(Array.from(this._changedProperties));
318
- for (const key in properties) {
319
- const value = properties[key];
345
+ this._properties.forEach((value, key) => {
346
+ if (value === void 0) {
347
+ return;
348
+ }
320
349
  if (value && typeof value === "object") {
321
350
  if ("toJSON" in value && typeof value.toJSON === "function") {
322
351
  json[key] = value.toJSON();
@@ -326,9 +355,12 @@ class CoreObject extends EventEmitter {
326
355
  } else {
327
356
  json[key] = value;
328
357
  }
329
- }
358
+ });
330
359
  return json;
331
360
  }
361
+ toJSON() {
362
+ return this.toPropsJSON();
363
+ }
332
364
  clone() {
333
365
  return new this.constructor(this.toJSON());
334
366
  }
@@ -2121,13 +2153,13 @@ class Vector3 extends Vector {
2121
2153
  }
2122
2154
  }
2123
2155
 
2124
- var __defProp$R = Object.defineProperty;
2125
- var __decorateClass$Y = (decorators, target, key, kind) => {
2156
+ var __defProp$Q = Object.defineProperty;
2157
+ var __decorateClass$X = (decorators, target, key, kind) => {
2126
2158
  var result = void 0 ;
2127
2159
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
2128
2160
  if (decorator = decorators[i])
2129
2161
  result = (decorator(target, key, result) ) || result;
2130
- if (result) __defProp$R(target, key, result);
2162
+ if (result) __defProp$Q(target, key, result);
2131
2163
  return result;
2132
2164
  };
2133
2165
  class MainLoop extends CoreObject {
@@ -2170,11 +2202,11 @@ class MainLoop extends CoreObject {
2170
2202
  this.stop();
2171
2203
  }
2172
2204
  }
2173
- __decorateClass$Y([
2174
- modernIdoc.property({ default: 24 })
2205
+ __decorateClass$X([
2206
+ modernIdoc.property({ fallback: 24 })
2175
2207
  ], MainLoop.prototype, "fps");
2176
- __decorateClass$Y([
2177
- modernIdoc.property({ default: 1 })
2208
+ __decorateClass$X([
2209
+ modernIdoc.property({ fallback: 1 })
2178
2210
  ], MainLoop.prototype, "speed");
2179
2211
 
2180
2212
  class Renderer {
@@ -4475,13 +4507,13 @@ class Geometry extends Resource {
4475
4507
  }
4476
4508
  }
4477
4509
 
4478
- var __defProp$Q = Object.defineProperty;
4479
- var __decorateClass$X = (decorators, target, key, kind) => {
4510
+ var __defProp$P = Object.defineProperty;
4511
+ var __decorateClass$W = (decorators, target, key, kind) => {
4480
4512
  var result = void 0 ;
4481
4513
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
4482
4514
  if (decorator = decorators[i])
4483
4515
  result = (decorator(target, key, result) ) || result;
4484
- if (result) __defProp$Q(target, key, result);
4516
+ if (result) __defProp$P(target, key, result);
4485
4517
  return result;
4486
4518
  };
4487
4519
  class IndexBuffer extends Resource {
@@ -4525,20 +4557,20 @@ class IndexBuffer extends Resource {
4525
4557
  return result;
4526
4558
  }
4527
4559
  }
4528
- __decorateClass$X([
4529
- protectedProperty({ default: null })
4560
+ __decorateClass$W([
4561
+ modernIdoc.property({ protected: true, default: null })
4530
4562
  ], IndexBuffer.prototype, "data");
4531
- __decorateClass$X([
4532
- protectedProperty({ default: false })
4563
+ __decorateClass$W([
4564
+ modernIdoc.property({ protected: true, fallback: false })
4533
4565
  ], IndexBuffer.prototype, "dynamic");
4534
4566
 
4535
- var __defProp$P = Object.defineProperty;
4536
- var __decorateClass$W = (decorators, target, key, kind) => {
4567
+ var __defProp$O = Object.defineProperty;
4568
+ var __decorateClass$V = (decorators, target, key, kind) => {
4537
4569
  var result = void 0 ;
4538
4570
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
4539
4571
  if (decorator = decorators[i])
4540
4572
  result = (decorator(target, key, result) ) || result;
4541
- if (result) __defProp$P(target, key, result);
4573
+ if (result) __defProp$O(target, key, result);
4542
4574
  return result;
4543
4575
  };
4544
4576
  class VertexBuffer extends Resource {
@@ -4582,26 +4614,23 @@ class VertexBuffer extends Resource {
4582
4614
  return result;
4583
4615
  }
4584
4616
  }
4585
- __decorateClass$W([
4586
- protectedProperty({ default: null })
4617
+ __decorateClass$V([
4618
+ modernIdoc.property({ protected: true, default: null })
4587
4619
  ], VertexBuffer.prototype, "data");
4588
- __decorateClass$W([
4589
- protectedProperty({ default: false })
4620
+ __decorateClass$V([
4621
+ modernIdoc.property({ protected: true, fallback: false })
4590
4622
  ], VertexBuffer.prototype, "dynamic");
4591
4623
 
4592
- var __defProp$O = Object.defineProperty;
4593
- var __decorateClass$V = (decorators, target, key, kind) => {
4624
+ var __defProp$N = Object.defineProperty;
4625
+ var __decorateClass$U = (decorators, target, key, kind) => {
4594
4626
  var result = void 0 ;
4595
4627
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
4596
4628
  if (decorator = decorators[i])
4597
4629
  result = (decorator(target, key, result) ) || result;
4598
- if (result) __defProp$O(target, key, result);
4630
+ if (result) __defProp$N(target, key, result);
4599
4631
  return result;
4600
4632
  };
4601
4633
  class VertexAttribute extends Resource {
4602
- stride;
4603
- offset;
4604
- divisor;
4605
4634
  needsUpload = false;
4606
4635
  constructor(options) {
4607
4636
  super();
@@ -4632,26 +4661,26 @@ class VertexAttribute extends Resource {
4632
4661
  return result;
4633
4662
  }
4634
4663
  }
4635
- __decorateClass$V([
4636
- protectedProperty()
4664
+ __decorateClass$U([
4665
+ modernIdoc.property({ protected: true })
4637
4666
  ], VertexAttribute.prototype, "buffer");
4638
- __decorateClass$V([
4639
- protectedProperty({ default: 0 })
4667
+ __decorateClass$U([
4668
+ modernIdoc.property({ fallback: 0 })
4640
4669
  ], VertexAttribute.prototype, "size");
4641
- __decorateClass$V([
4642
- protectedProperty({ default: false })
4670
+ __decorateClass$U([
4671
+ modernIdoc.property({ fallback: false })
4643
4672
  ], VertexAttribute.prototype, "normalized");
4644
- __decorateClass$V([
4645
- protectedProperty({ default: "float" })
4673
+ __decorateClass$U([
4674
+ modernIdoc.property({ fallback: "float" })
4646
4675
  ], VertexAttribute.prototype, "type");
4647
- __decorateClass$V([
4648
- protectedProperty()
4676
+ __decorateClass$U([
4677
+ modernIdoc.property()
4649
4678
  ], VertexAttribute.prototype, "stride");
4650
- __decorateClass$V([
4651
- protectedProperty()
4679
+ __decorateClass$U([
4680
+ modernIdoc.property()
4652
4681
  ], VertexAttribute.prototype, "offset");
4653
- __decorateClass$V([
4654
- protectedProperty()
4682
+ __decorateClass$U([
4683
+ modernIdoc.property()
4655
4684
  ], VertexAttribute.prototype, "divisor");
4656
4685
 
4657
4686
  class QuadGeometry extends Geometry {
@@ -4894,13 +4923,13 @@ class UvGeometry extends Geometry {
4894
4923
  }
4895
4924
  }
4896
4925
 
4897
- var __defProp$N = Object.defineProperty;
4898
- var __decorateClass$U = (decorators, target, key, kind) => {
4926
+ var __defProp$M = Object.defineProperty;
4927
+ var __decorateClass$T = (decorators, target, key, kind) => {
4899
4928
  var result = void 0 ;
4900
4929
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
4901
4930
  if (decorator = decorators[i])
4902
4931
  result = (decorator(target, key, result) ) || result;
4903
- if (result) __defProp$N(target, key, result);
4932
+ if (result) __defProp$M(target, key, result);
4904
4933
  return result;
4905
4934
  };
4906
4935
  class Texture2D extends Resource {
@@ -5026,23 +5055,23 @@ class Texture2D extends Resource {
5026
5055
  }
5027
5056
  }
5028
5057
  }
5029
- __decorateClass$U([
5030
- protectedProperty()
5058
+ __decorateClass$T([
5059
+ modernIdoc.property({ protected: true })
5031
5060
  ], Texture2D.prototype, "source");
5032
- __decorateClass$U([
5033
- modernIdoc.property({ default: 0 })
5061
+ __decorateClass$T([
5062
+ modernIdoc.property({ fallback: 0 })
5034
5063
  ], Texture2D.prototype, "width");
5035
- __decorateClass$U([
5036
- modernIdoc.property({ default: 0 })
5064
+ __decorateClass$T([
5065
+ modernIdoc.property({ fallback: 0 })
5037
5066
  ], Texture2D.prototype, "height");
5038
- __decorateClass$U([
5039
- modernIdoc.property({ default: "linear" })
5067
+ __decorateClass$T([
5068
+ modernIdoc.property({ fallback: "linear" })
5040
5069
  ], Texture2D.prototype, "filterMode");
5041
- __decorateClass$U([
5042
- modernIdoc.property({ default: "clamp_to_edge" })
5070
+ __decorateClass$T([
5071
+ modernIdoc.property({ fallback: "clamp_to_edge" })
5043
5072
  ], Texture2D.prototype, "wrapMode");
5044
- __decorateClass$U([
5045
- modernIdoc.property({ default: 1 })
5073
+ __decorateClass$T([
5074
+ modernIdoc.property({ fallback: 1 })
5046
5075
  ], Texture2D.prototype, "pixelRatio");
5047
5076
 
5048
5077
  class AnimatedTexture extends Resource {
@@ -5071,13 +5100,13 @@ class AnimatedTexture extends Resource {
5071
5100
  }
5072
5101
  }
5073
5102
 
5074
- var __defProp$M = Object.defineProperty;
5075
- var __decorateClass$T = (decorators, target, key, kind) => {
5103
+ var __defProp$L = Object.defineProperty;
5104
+ var __decorateClass$S = (decorators, target, key, kind) => {
5076
5105
  var result = void 0 ;
5077
5106
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
5078
5107
  if (decorator = decorators[i])
5079
5108
  result = (decorator(target, key, result) ) || result;
5080
- if (result) __defProp$M(target, key, result);
5109
+ if (result) __defProp$L(target, key, result);
5081
5110
  return result;
5082
5111
  };
5083
5112
  class CanvasTexture extends Texture2D {
@@ -5096,8 +5125,8 @@ class CanvasTexture extends Texture2D {
5096
5125
  super._updateProperty(key, value, oldValue, declaration);
5097
5126
  }
5098
5127
  }
5099
- __decorateClass$T([
5100
- modernIdoc.property({ default: 2 })
5128
+ __decorateClass$S([
5129
+ modernIdoc.property()
5101
5130
  ], CanvasTexture.prototype, "pixelRatio");
5102
5131
 
5103
5132
  class ColorTexture extends Texture2D {
@@ -5116,6 +5145,8 @@ class GradientTexture extends Texture2D {
5116
5145
  return modernIdoc.isGradient(value);
5117
5146
  }
5118
5147
  static linearGradient(linearGradient, width, height) {
5148
+ width = width || 1;
5149
+ height = height || 1;
5119
5150
  const canvas = document.createElement("canvas");
5120
5151
  canvas.width = width;
5121
5152
  canvas.height = height;
@@ -5299,13 +5330,13 @@ class PixelsTexture extends Texture2D {
5299
5330
  }
5300
5331
  }
5301
5332
 
5302
- var __defProp$L = Object.defineProperty;
5303
- var __decorateClass$S = (decorators, target, key, kind) => {
5333
+ var __defProp$K = Object.defineProperty;
5334
+ var __decorateClass$R = (decorators, target, key, kind) => {
5304
5335
  var result = void 0 ;
5305
5336
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
5306
5337
  if (decorator = decorators[i])
5307
5338
  result = (decorator(target, key, result) ) || result;
5308
- if (result) __defProp$L(target, key, result);
5339
+ if (result) __defProp$K(target, key, result);
5309
5340
  return result;
5310
5341
  };
5311
5342
  function resolveOptions(options) {
@@ -5549,11 +5580,11 @@ const _VideoTexture = class _VideoTexture extends Texture2D {
5549
5580
  }
5550
5581
  }
5551
5582
  };
5552
- __decorateClass$S([
5553
- protectedProperty({ default: true })
5583
+ __decorateClass$R([
5584
+ modernIdoc.property({ protected: true, fallback: true })
5554
5585
  ], _VideoTexture.prototype, "autoUpdate");
5555
- __decorateClass$S([
5556
- protectedProperty({ default: 0 })
5586
+ __decorateClass$R([
5587
+ modernIdoc.property({ protected: true, fallback: 0 })
5557
5588
  ], _VideoTexture.prototype, "fps");
5558
5589
  let VideoTexture = _VideoTexture;
5559
5590
 
@@ -5611,22 +5642,22 @@ class Children extends Array {
5611
5642
  }
5612
5643
  }
5613
5644
 
5614
- var __defProp$K = Object.defineProperty;
5615
- var __getOwnPropDesc$I = Object.getOwnPropertyDescriptor;
5616
- var __decorateClass$R = (decorators, target, key, kind) => {
5617
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$I(target, key) : target;
5645
+ var __defProp$J = Object.defineProperty;
5646
+ var __getOwnPropDesc$H = Object.getOwnPropertyDescriptor;
5647
+ var __decorateClass$Q = (decorators, target, key, kind) => {
5648
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$H(target, key) : target;
5618
5649
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
5619
5650
  if (decorator = decorators[i])
5620
5651
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
5621
- if (kind && result) __defProp$K(target, key, result);
5652
+ if (kind && result) __defProp$J(target, key, result);
5622
5653
  return result;
5623
5654
  };
5624
- const tagUidMap = {};
5625
- function getTagUid(tag) {
5626
- let uid = tagUidMap[tag] ?? 0;
5627
- uid++;
5628
- tagUidMap[tag] = uid;
5629
- return uid;
5655
+ const iidMap = {};
5656
+ function getNodeIid(key) {
5657
+ let iid = iidMap[key] ?? 0;
5658
+ iid++;
5659
+ iidMap[key] = iid;
5660
+ return iid;
5630
5661
  }
5631
5662
  exports.Node = class Node extends CoreObject {
5632
5663
  _readyed = false;
@@ -5639,7 +5670,7 @@ exports.Node = class Node extends CoreObject {
5639
5670
  this._onReady = this._onReady.bind(this);
5640
5671
  this._onProcess = this._onProcess.bind(this);
5641
5672
  this.setProperties({
5642
- name: `${this.tag}:${getTagUid(this.tag)}`,
5673
+ name: `${this.is}:${getNodeIid(this.is)}`,
5643
5674
  ...properties
5644
5675
  }).append(nodes);
5645
5676
  this.on("treeEnter", this._onTreeEnter).on("treeExit", this._onTreeExit).on("parented", this._onParented).on("unparented", this._onUnparented).on("ready", this._onReady).on("process", this._onProcess);
@@ -5689,7 +5720,7 @@ exports.Node = class Node extends CoreObject {
5689
5720
  }
5690
5721
  setTree(tree) {
5691
5722
  const oldTree = this._tree;
5692
- if (!tree?.is(oldTree)) {
5723
+ if (!tree?.equal(oldTree)) {
5693
5724
  if (oldTree) {
5694
5725
  this.emit("treeExit", oldTree);
5695
5726
  }
@@ -5729,7 +5760,7 @@ exports.Node = class Node extends CoreObject {
5729
5760
  return this._parent;
5730
5761
  }
5731
5762
  setParent(parent) {
5732
- if (!this._parent?.is(parent)) {
5763
+ if (!this._parent?.equal(parent)) {
5733
5764
  const oldParent = this._parent;
5734
5765
  if (oldParent) {
5735
5766
  this.emit("unparented", oldParent);
@@ -5905,7 +5936,7 @@ exports.Node = class Node extends CoreObject {
5905
5936
  this.getNode(path)?.remove();
5906
5937
  }
5907
5938
  addSibling(sibling) {
5908
- if (this.is(sibling) || !this.hasParent() || sibling.hasParent()) {
5939
+ if (this.equal(sibling) || !this.hasParent() || sibling.hasParent()) {
5909
5940
  return this;
5910
5941
  }
5911
5942
  sibling.internalMode = this.internalMode;
@@ -5957,14 +5988,14 @@ exports.Node = class Node extends CoreObject {
5957
5988
  });
5958
5989
  }
5959
5990
  insertBefore(node, child) {
5960
- if (!child.hasParent() || !this.is(child.parent)) {
5991
+ if (!child.hasParent() || !this.equal(child.parent)) {
5961
5992
  return node;
5962
5993
  }
5963
5994
  this.moveChild(node, child.getIndex());
5964
5995
  return node;
5965
5996
  }
5966
5997
  appendChild(node, internalMode = node.internalMode) {
5967
- if (this.is(node) || node.hasParent()) {
5998
+ if (this.equal(node) || node.hasParent()) {
5968
5999
  return node;
5969
6000
  }
5970
6001
  switch (internalMode) {
@@ -5984,7 +6015,7 @@ exports.Node = class Node extends CoreObject {
5984
6015
  return node;
5985
6016
  }
5986
6017
  moveChild(node, toIndex, internalMode = node.internalMode) {
5987
- if (this.is(node) || node.hasParent() && !this.is(node.parent)) {
6018
+ if (this.equal(node) || node.hasParent() && !this.equal(node.parent)) {
5988
6019
  return this;
5989
6020
  }
5990
6021
  const fromArray = this._children.getInternal(node.internalMode);
@@ -6011,7 +6042,7 @@ exports.Node = class Node extends CoreObject {
6011
6042
  }
6012
6043
  removeChild(child) {
6013
6044
  const index = child.getIndex();
6014
- if (this.is(child.parent) && index > -1) {
6045
+ if (this.equal(child.parent) && index > -1) {
6015
6046
  this._children.getInternal(child.internalMode).splice(index, 1);
6016
6047
  child.setParent(void 0);
6017
6048
  this.emit("removeChild", child, index);
@@ -6069,61 +6100,64 @@ exports.Node = class Node extends CoreObject {
6069
6100
  }
6070
6101
  clone() {
6071
6102
  return new this.constructor(
6072
- this.toJSON().props,
6103
+ this.toPropsJSON(),
6073
6104
  this._children.internal
6074
6105
  );
6075
6106
  }
6076
6107
  toJSON() {
6077
6108
  return {
6078
- tag: this.tag,
6079
- props: super.toJSON(),
6109
+ ...super.toJSON(),
6110
+ is: this.is,
6080
6111
  children: [...this._children.map((child) => child.toJSON())]
6081
6112
  };
6082
6113
  }
6083
- static parse(JSON) {
6084
- if (Array.isArray(JSON)) {
6085
- return JSON.map((val) => this.parse(val));
6114
+ static parse(value) {
6115
+ if (Array.isArray(value)) {
6116
+ return value.map((val) => this.parse(val));
6086
6117
  }
6087
- const { tag, props, children } = JSON;
6088
- const NodeClass = customNodes.get(tag) ?? exports.Node;
6089
- const node = new NodeClass(props);
6118
+ const { is, props, children } = value;
6119
+ const Class = customNodes.get(is) ?? exports.Node;
6120
+ const node = new Class(props);
6090
6121
  children?.forEach((child) => node.appendChild(this.parse(child)));
6091
6122
  return node;
6092
6123
  }
6093
6124
  };
6094
- __decorateClass$R([
6095
- modernIdoc.property()
6125
+ __decorateClass$Q([
6126
+ modernIdoc.property({ fallback: modernIdoc.idGenerator() })
6127
+ ], exports.Node.prototype, "id", 2);
6128
+ __decorateClass$Q([
6129
+ modernIdoc.property({ fallback: modernIdoc.idGenerator() })
6096
6130
  ], exports.Node.prototype, "name", 2);
6097
- __decorateClass$R([
6098
- modernIdoc.property()
6099
- ], exports.Node.prototype, "mask", 2);
6100
- __decorateClass$R([
6101
- modernIdoc.property({ default: "inherit" })
6131
+ __decorateClass$Q([
6132
+ modernIdoc.property({ fallback: "inherit" })
6102
6133
  ], exports.Node.prototype, "processMode", 2);
6103
- __decorateClass$R([
6104
- modernIdoc.property({ default: "default" })
6134
+ __decorateClass$Q([
6135
+ modernIdoc.property({ fallback: "default" })
6105
6136
  ], exports.Node.prototype, "processSortMode", 2);
6106
- __decorateClass$R([
6107
- modernIdoc.property({ default: "inherit" })
6137
+ __decorateClass$Q([
6138
+ modernIdoc.property({ fallback: "inherit" })
6108
6139
  ], exports.Node.prototype, "renderMode", 2);
6109
- __decorateClass$R([
6110
- modernIdoc.property({ default: "default" })
6140
+ __decorateClass$Q([
6141
+ modernIdoc.property({ fallback: "default" })
6111
6142
  ], exports.Node.prototype, "internalMode", 2);
6112
- __decorateClass$R([
6143
+ __decorateClass$Q([
6113
6144
  modernIdoc.property({ default: () => ({}) })
6114
6145
  ], exports.Node.prototype, "meta", 2);
6115
- exports.Node = __decorateClass$R([
6146
+ __decorateClass$Q([
6147
+ modernIdoc.property({ protected: true })
6148
+ ], exports.Node.prototype, "mask", 2);
6149
+ exports.Node = __decorateClass$Q([
6116
6150
  customNode("Node")
6117
6151
  ], exports.Node);
6118
6152
 
6119
- var __defProp$J = Object.defineProperty;
6120
- var __getOwnPropDesc$H = Object.getOwnPropertyDescriptor;
6121
- var __decorateClass$Q = (decorators, target, key, kind) => {
6122
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$H(target, key) : target;
6153
+ var __defProp$I = Object.defineProperty;
6154
+ var __getOwnPropDesc$G = Object.getOwnPropertyDescriptor;
6155
+ var __decorateClass$P = (decorators, target, key, kind) => {
6156
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$G(target, key) : target;
6123
6157
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
6124
6158
  if (decorator = decorators[i])
6125
6159
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
6126
- if (kind && result) __defProp$J(target, key, result);
6160
+ if (kind && result) __defProp$I(target, key, result);
6127
6161
  return result;
6128
6162
  };
6129
6163
  exports.TimelineNode = class TimelineNode extends exports.Node {
@@ -6183,30 +6217,30 @@ exports.TimelineNode = class TimelineNode extends exports.Node {
6183
6217
  this._updateCurrentTime();
6184
6218
  }
6185
6219
  };
6186
- __decorateClass$Q([
6187
- modernIdoc.property({ default: 0 })
6220
+ __decorateClass$P([
6221
+ modernIdoc.property({ fallback: 0 })
6188
6222
  ], exports.TimelineNode.prototype, "delay", 2);
6189
- __decorateClass$Q([
6190
- modernIdoc.property({ default: 0 })
6223
+ __decorateClass$P([
6224
+ modernIdoc.property({ fallback: 0 })
6191
6225
  ], exports.TimelineNode.prototype, "duration", 2);
6192
- __decorateClass$Q([
6193
- modernIdoc.property({ default: false })
6226
+ __decorateClass$P([
6227
+ modernIdoc.property({ fallback: false })
6194
6228
  ], exports.TimelineNode.prototype, "paused", 2);
6195
- __decorateClass$Q([
6196
- protectedProperty()
6229
+ __decorateClass$P([
6230
+ modernIdoc.property({ protected: true, fallback: false })
6197
6231
  ], exports.TimelineNode.prototype, "insideTimeRange", 2);
6198
- exports.TimelineNode = __decorateClass$Q([
6232
+ exports.TimelineNode = __decorateClass$P([
6199
6233
  customNode("TimelineNode")
6200
6234
  ], exports.TimelineNode);
6201
6235
 
6202
- var __defProp$I = Object.defineProperty;
6203
- var __getOwnPropDesc$G = Object.getOwnPropertyDescriptor;
6204
- var __decorateClass$P = (decorators, target, key, kind) => {
6205
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$G(target, key) : target;
6236
+ var __defProp$H = Object.defineProperty;
6237
+ var __getOwnPropDesc$F = Object.getOwnPropertyDescriptor;
6238
+ var __decorateClass$O = (decorators, target, key, kind) => {
6239
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$F(target, key) : target;
6206
6240
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
6207
6241
  if (decorator = decorators[i])
6208
6242
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
6209
- if (kind && result) __defProp$I(target, key, result);
6243
+ if (kind && result) __defProp$H(target, key, result);
6210
6244
  return result;
6211
6245
  };
6212
6246
  exports.Viewport = class Viewport extends exports.Node {
@@ -6215,15 +6249,15 @@ exports.Viewport = class Viewport extends exports.Node {
6215
6249
  this.flipY = flipY;
6216
6250
  this._projection.flipY(flipY);
6217
6251
  }
6218
- get valid() {
6219
- return Boolean(this.width && this.height);
6220
- }
6221
6252
  _projection = new Projection2D();
6222
6253
  _framebufferIndex = 0;
6223
6254
  _framebuffers = [
6224
6255
  { texture: new ViewportTexture(), needsUpload: false },
6225
6256
  { texture: new ViewportTexture(), needsUpload: false }
6226
6257
  ];
6258
+ get valid() {
6259
+ return Boolean(this.width && this.height);
6260
+ }
6227
6261
  get framebuffer() {
6228
6262
  return this._framebuffers[this._framebufferIndex];
6229
6263
  }
@@ -6344,33 +6378,34 @@ exports.Viewport = class Viewport extends exports.Node {
6344
6378
  return this._projection.toArray(transpose);
6345
6379
  }
6346
6380
  };
6347
- __decorateClass$P([
6348
- modernIdoc.property({ default: 0 })
6381
+ __decorateClass$O([
6382
+ modernIdoc.property({ fallback: 0 })
6349
6383
  ], exports.Viewport.prototype, "x", 2);
6350
- __decorateClass$P([
6351
- modernIdoc.property({ default: 0 })
6384
+ __decorateClass$O([
6385
+ modernIdoc.property({ fallback: 0 })
6352
6386
  ], exports.Viewport.prototype, "y", 2);
6353
- __decorateClass$P([
6354
- modernIdoc.property({ default: 0 })
6387
+ __decorateClass$O([
6388
+ modernIdoc.property({ fallback: 0 })
6355
6389
  ], exports.Viewport.prototype, "width", 2);
6356
- __decorateClass$P([
6357
- modernIdoc.property({ default: 0 })
6390
+ __decorateClass$O([
6391
+ modernIdoc.property({ fallback: 0 })
6358
6392
  ], exports.Viewport.prototype, "height", 2);
6359
- exports.Viewport = __decorateClass$P([
6393
+ exports.Viewport = __decorateClass$O([
6360
6394
  customNode("Viewport")
6361
6395
  ], exports.Viewport);
6362
6396
 
6363
- var __defProp$H = Object.defineProperty;
6364
- var __getOwnPropDesc$F = Object.getOwnPropertyDescriptor;
6365
- var __decorateClass$O = (decorators, target, key, kind) => {
6366
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$F(target, key) : target;
6397
+ var __defProp$G = Object.defineProperty;
6398
+ var __getOwnPropDesc$E = Object.getOwnPropertyDescriptor;
6399
+ var __decorateClass$N = (decorators, target, key, kind) => {
6400
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$E(target, key) : target;
6367
6401
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
6368
6402
  if (decorator = decorators[i])
6369
6403
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
6370
- if (kind && result) __defProp$H(target, key, result);
6404
+ if (kind && result) __defProp$G(target, key, result);
6371
6405
  return result;
6372
6406
  };
6373
6407
  exports.Effect = class Effect extends exports.TimelineNode {
6408
+ material;
6374
6409
  get _effectMode() {
6375
6410
  return this.effectMode ?? "parent";
6376
6411
  }
@@ -6447,10 +6482,10 @@ exports.Effect = class Effect extends exports.TimelineNode {
6447
6482
  return;
6448
6483
  switch (this._effectMode) {
6449
6484
  case "transition":
6450
- if (node.is(this._previousSibling)) {
6485
+ if (node.equal(this._previousSibling)) {
6451
6486
  this._previousSibling = void 0;
6452
6487
  renderStack.push(this);
6453
- } else if (node.is(this._nextSibling)) {
6488
+ } else if (node.equal(this._nextSibling)) {
6454
6489
  this._nextSibling = void 0;
6455
6490
  renderStack.push(this);
6456
6491
  }
@@ -6468,7 +6503,7 @@ exports.Effect = class Effect extends exports.TimelineNode {
6468
6503
  let start;
6469
6504
  let end;
6470
6505
  calls.forEach((call, index) => {
6471
- if (call.renderable.is(this._parent) || call.renderable.parent?.is(this._parent)) {
6506
+ if (call.renderable.equal(this._parent) || call.renderable.parent?.equal(this._parent)) {
6472
6507
  start = start ?? index;
6473
6508
  end = index;
6474
6509
  }
@@ -6608,31 +6643,31 @@ exports.Effect = class Effect extends exports.TimelineNode {
6608
6643
  }
6609
6644
  }
6610
6645
  };
6611
- __decorateClass$O([
6612
- protectedProperty()
6646
+ __decorateClass$N([
6647
+ modernIdoc.property({ protected: true })
6613
6648
  ], exports.Effect.prototype, "material", 2);
6614
- __decorateClass$O([
6649
+ __decorateClass$N([
6615
6650
  modernIdoc.property()
6616
6651
  ], exports.Effect.prototype, "effectMode", 2);
6617
- __decorateClass$O([
6618
- modernIdoc.property({ default: "" })
6652
+ __decorateClass$N([
6653
+ modernIdoc.property()
6619
6654
  ], exports.Effect.prototype, "glsl", 2);
6620
- __decorateClass$O([
6621
- modernIdoc.property({ default: "" })
6655
+ __decorateClass$N([
6656
+ modernIdoc.property()
6622
6657
  ], exports.Effect.prototype, "glslSrc", 2);
6623
- exports.Effect = __decorateClass$O([
6658
+ exports.Effect = __decorateClass$N([
6624
6659
  customNode("Effect")
6625
6660
  ], exports.Effect);
6626
6661
 
6627
- var __defProp$G = Object.defineProperty;
6628
- var __getOwnPropDesc$E = Object.getOwnPropertyDescriptor;
6629
- var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$G(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6630
- var __decorateClass$N = (decorators, target, key, kind) => {
6631
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$E(target, key) : target;
6662
+ var __defProp$F = Object.defineProperty;
6663
+ var __getOwnPropDesc$D = Object.getOwnPropertyDescriptor;
6664
+ var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$F(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6665
+ var __decorateClass$M = (decorators, target, key, kind) => {
6666
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$D(target, key) : target;
6632
6667
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
6633
6668
  if (decorator = decorators[i])
6634
6669
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
6635
- if (kind && result) __defProp$G(target, key, result);
6670
+ if (kind && result) __defProp$F(target, key, result);
6636
6671
  return result;
6637
6672
  };
6638
6673
  var __publicField$i = (obj, key, value) => __defNormalProp$i(obj, key + "" , value);
@@ -6692,43 +6727,43 @@ void main(void) {
6692
6727
  gl_FragColor = c * alpha;
6693
6728
  }`
6694
6729
  }));
6695
- __decorateClass$N([
6696
- modernIdoc.property({ default: 1 })
6730
+ __decorateClass$M([
6731
+ modernIdoc.property()
6697
6732
  ], exports.ColorAdjustEffect.prototype, "saturation", 2);
6698
- __decorateClass$N([
6699
- modernIdoc.property({ default: 1 })
6733
+ __decorateClass$M([
6734
+ modernIdoc.property()
6700
6735
  ], exports.ColorAdjustEffect.prototype, "contrast", 2);
6701
- __decorateClass$N([
6702
- modernIdoc.property({ default: 1 })
6736
+ __decorateClass$M([
6737
+ modernIdoc.property()
6703
6738
  ], exports.ColorAdjustEffect.prototype, "brightness", 2);
6704
- __decorateClass$N([
6705
- modernIdoc.property({ default: 1 })
6739
+ __decorateClass$M([
6740
+ modernIdoc.property()
6706
6741
  ], exports.ColorAdjustEffect.prototype, "red", 2);
6707
- __decorateClass$N([
6708
- modernIdoc.property({ default: 1 })
6742
+ __decorateClass$M([
6743
+ modernIdoc.property()
6709
6744
  ], exports.ColorAdjustEffect.prototype, "green", 2);
6710
- __decorateClass$N([
6711
- modernIdoc.property({ default: 1 })
6745
+ __decorateClass$M([
6746
+ modernIdoc.property()
6712
6747
  ], exports.ColorAdjustEffect.prototype, "blue", 2);
6713
- __decorateClass$N([
6714
- modernIdoc.property({ default: 1 })
6748
+ __decorateClass$M([
6749
+ modernIdoc.property()
6715
6750
  ], exports.ColorAdjustEffect.prototype, "alpha", 2);
6716
- __decorateClass$N([
6717
- modernIdoc.property({ default: 1 })
6751
+ __decorateClass$M([
6752
+ modernIdoc.property()
6718
6753
  ], exports.ColorAdjustEffect.prototype, "gamma", 2);
6719
- exports.ColorAdjustEffect = __decorateClass$N([
6754
+ exports.ColorAdjustEffect = __decorateClass$M([
6720
6755
  customNode("ColorAdjustEffect")
6721
6756
  ], exports.ColorAdjustEffect);
6722
6757
 
6723
- var __defProp$F = Object.defineProperty;
6724
- var __getOwnPropDesc$D = Object.getOwnPropertyDescriptor;
6725
- var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$F(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6726
- var __decorateClass$M = (decorators, target, key, kind) => {
6727
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$D(target, key) : target;
6758
+ var __defProp$E = Object.defineProperty;
6759
+ var __getOwnPropDesc$C = Object.getOwnPropertyDescriptor;
6760
+ var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$E(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6761
+ var __decorateClass$L = (decorators, target, key, kind) => {
6762
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$C(target, key) : target;
6728
6763
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
6729
6764
  if (decorator = decorators[i])
6730
6765
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
6731
- if (kind && result) __defProp$F(target, key, result);
6766
+ if (kind && result) __defProp$E(target, key, result);
6732
6767
  return result;
6733
6768
  };
6734
6769
  var __publicField$h = (obj, key, value) => __defNormalProp$h(obj, key + "" , value);
@@ -6808,22 +6843,22 @@ void main(void) {
6808
6843
  );
6809
6844
  }`
6810
6845
  }));
6811
- __decorateClass$M([
6846
+ __decorateClass$L([
6812
6847
  modernIdoc.property()
6813
6848
  ], exports.ColorFilterEffect.prototype, "filter", 2);
6814
- exports.ColorFilterEffect = __decorateClass$M([
6849
+ exports.ColorFilterEffect = __decorateClass$L([
6815
6850
  customNode("ColorFilterEffect")
6816
6851
  ], exports.ColorFilterEffect);
6817
6852
 
6818
- var __defProp$E = Object.defineProperty;
6819
- var __getOwnPropDesc$C = Object.getOwnPropertyDescriptor;
6820
- var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$E(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6821
- var __decorateClass$L = (decorators, target, key, kind) => {
6822
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$C(target, key) : target;
6853
+ var __defProp$D = Object.defineProperty;
6854
+ var __getOwnPropDesc$B = Object.getOwnPropertyDescriptor;
6855
+ var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$D(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6856
+ var __decorateClass$K = (decorators, target, key, kind) => {
6857
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$B(target, key) : target;
6823
6858
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
6824
6859
  if (decorator = decorators[i])
6825
6860
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
6826
- if (kind && result) __defProp$E(target, key, result);
6861
+ if (kind && result) __defProp$D(target, key, result);
6827
6862
  return result;
6828
6863
  };
6829
6864
  var __publicField$g = (obj, key, value) => __defNormalProp$g(obj, key + "" , value);
@@ -6899,25 +6934,25 @@ void main(void) {
6899
6934
  gl_FragColor = vec4(mix(color.rgb, mask.rgb, color.a * mask.a), color.a);
6900
6935
  }`
6901
6936
  }));
6902
- __decorateClass$L([
6903
- modernIdoc.property({ default: () => [] })
6937
+ __decorateClass$K([
6938
+ modernIdoc.property()
6904
6939
  ], exports.ColorOverlayEffect.prototype, "colors", 2);
6905
- __decorateClass$L([
6906
- modernIdoc.property({ default: 0.5 })
6940
+ __decorateClass$K([
6941
+ modernIdoc.property()
6907
6942
  ], exports.ColorOverlayEffect.prototype, "alpha", 2);
6908
- exports.ColorOverlayEffect = __decorateClass$L([
6943
+ exports.ColorOverlayEffect = __decorateClass$K([
6909
6944
  customNode("ColorOverlayEffect")
6910
6945
  ], exports.ColorOverlayEffect);
6911
6946
 
6912
- var __defProp$D = Object.defineProperty;
6913
- var __getOwnPropDesc$B = Object.getOwnPropertyDescriptor;
6914
- var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$D(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6915
- var __decorateClass$K = (decorators, target, key, kind) => {
6916
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$B(target, key) : target;
6947
+ var __defProp$C = Object.defineProperty;
6948
+ var __getOwnPropDesc$A = Object.getOwnPropertyDescriptor;
6949
+ var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$C(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6950
+ var __decorateClass$J = (decorators, target, key, kind) => {
6951
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$A(target, key) : target;
6917
6952
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
6918
6953
  if (decorator = decorators[i])
6919
6954
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
6920
- if (kind && result) __defProp$D(target, key, result);
6955
+ if (kind && result) __defProp$C(target, key, result);
6921
6956
  return result;
6922
6957
  };
6923
6958
  var __publicField$f = (obj, key, value) => __defNormalProp$f(obj, key + "" , value);
@@ -6984,25 +7019,25 @@ void main(void) {
6984
7019
  gl_FragColor = color;
6985
7020
  }`
6986
7021
  }));
6987
- __decorateClass$K([
6988
- modernIdoc.property({ default: () => [] })
7022
+ __decorateClass$J([
7023
+ modernIdoc.property()
6989
7024
  ], exports.ColorRemoveEffect.prototype, "colors", 2);
6990
- __decorateClass$K([
6991
- modernIdoc.property({ default: 0.5 })
7025
+ __decorateClass$J([
7026
+ modernIdoc.property()
6992
7027
  ], exports.ColorRemoveEffect.prototype, "epsilon", 2);
6993
- exports.ColorRemoveEffect = __decorateClass$K([
7028
+ exports.ColorRemoveEffect = __decorateClass$J([
6994
7029
  customNode("ColorRemoveEffect")
6995
7030
  ], exports.ColorRemoveEffect);
6996
7031
 
6997
- var __defProp$C = Object.defineProperty;
6998
- var __getOwnPropDesc$A = Object.getOwnPropertyDescriptor;
6999
- var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$C(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7000
- var __decorateClass$J = (decorators, target, key, kind) => {
7001
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$A(target, key) : target;
7032
+ var __defProp$B = Object.defineProperty;
7033
+ var __getOwnPropDesc$z = Object.getOwnPropertyDescriptor;
7034
+ var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$B(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7035
+ var __decorateClass$I = (decorators, target, key, kind) => {
7036
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$z(target, key) : target;
7002
7037
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
7003
7038
  if (decorator = decorators[i])
7004
7039
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
7005
- if (kind && result) __defProp$C(target, key, result);
7040
+ if (kind && result) __defProp$B(target, key, result);
7006
7041
  return result;
7007
7042
  };
7008
7043
  var __publicField$e = (obj, key, value) => __defNormalProp$e(obj, key + "" , value);
@@ -7091,13 +7126,13 @@ void main(void) {
7091
7126
  }
7092
7127
  }`
7093
7128
  }));
7094
- __decorateClass$J([
7095
- modernIdoc.property({ default: [] })
7129
+ __decorateClass$I([
7130
+ modernIdoc.property()
7096
7131
  ], exports.ColorReplaceEffect.prototype, "colors", 2);
7097
- __decorateClass$J([
7098
- modernIdoc.property({ default: 0.05 })
7132
+ __decorateClass$I([
7133
+ modernIdoc.property()
7099
7134
  ], exports.ColorReplaceEffect.prototype, "epsilon", 2);
7100
- exports.ColorReplaceEffect = __decorateClass$J([
7135
+ exports.ColorReplaceEffect = __decorateClass$I([
7101
7136
  customNode("ColorReplaceEffect")
7102
7137
  ], exports.ColorReplaceEffect);
7103
7138
 
@@ -7252,14 +7287,14 @@ class CanvasContext extends modernPath2d.Path2D {
7252
7287
  }
7253
7288
  }
7254
7289
 
7255
- var __defProp$B = Object.defineProperty;
7256
- var __getOwnPropDesc$z = Object.getOwnPropertyDescriptor;
7257
- var __decorateClass$I = (decorators, target, key, kind) => {
7258
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$z(target, key) : target;
7290
+ var __defProp$A = Object.defineProperty;
7291
+ var __getOwnPropDesc$y = Object.getOwnPropertyDescriptor;
7292
+ var __decorateClass$H = (decorators, target, key, kind) => {
7293
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$y(target, key) : target;
7259
7294
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
7260
7295
  if (decorator = decorators[i])
7261
7296
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
7262
- if (kind && result) __defProp$B(target, key, result);
7297
+ if (kind && result) __defProp$A(target, key, result);
7263
7298
  return result;
7264
7299
  };
7265
7300
  exports.CanvasItem = class CanvasItem extends exports.TimelineNode {
@@ -7277,7 +7312,7 @@ exports.CanvasItem = class CanvasItem extends exports.TimelineNode {
7277
7312
  // Batch render
7278
7313
  context = new CanvasContext();
7279
7314
  _resetContext = true;
7280
- _redrawing = false;
7315
+ _redrawing = true;
7281
7316
  _relayouting = false;
7282
7317
  _repainting = false;
7283
7318
  _originalBatchables = [];
@@ -7346,16 +7381,16 @@ exports.CanvasItem = class CanvasItem extends exports.TimelineNode {
7346
7381
  this.emit("draw");
7347
7382
  }
7348
7383
  _redraw() {
7349
- this._tree?.log(this.name, "redrawing");
7384
+ this._tree?.log(this.name, "drawing");
7350
7385
  this._draw();
7351
7386
  return this.context.toBatchables();
7352
7387
  }
7353
7388
  _relayout(batchables) {
7354
- this._tree?.log(this.name, "relayouting");
7389
+ this._tree?.log(this.name, "layouting");
7355
7390
  return batchables;
7356
7391
  }
7357
7392
  _repaint(batchables) {
7358
- this._tree?.log(this.name, "repainting");
7393
+ this._tree?.log(this.name, "painting");
7359
7394
  return batchables.map((batchable) => {
7360
7395
  return {
7361
7396
  ...batchable,
@@ -7421,19 +7456,19 @@ exports.CanvasItem = class CanvasItem extends exports.TimelineNode {
7421
7456
  super._render(renderer);
7422
7457
  }
7423
7458
  };
7424
- __decorateClass$I([
7459
+ __decorateClass$H([
7425
7460
  modernIdoc.property()
7426
7461
  ], exports.CanvasItem.prototype, "modulate", 2);
7427
- __decorateClass$I([
7462
+ __decorateClass$H([
7428
7463
  modernIdoc.property()
7429
7464
  ], exports.CanvasItem.prototype, "blendMode", 2);
7430
- __decorateClass$I([
7431
- protectedProperty({ default: true })
7465
+ __decorateClass$H([
7466
+ modernIdoc.property({ protected: true, fallback: true })
7432
7467
  ], exports.CanvasItem.prototype, "visible", 2);
7433
- __decorateClass$I([
7434
- protectedProperty({ default: 1 })
7468
+ __decorateClass$H([
7469
+ modernIdoc.property({ protected: true, fallback: 1 })
7435
7470
  ], exports.CanvasItem.prototype, "opacity", 2);
7436
- exports.CanvasItem = __decorateClass$I([
7471
+ exports.CanvasItem = __decorateClass$H([
7437
7472
  customNode("CanvasItem")
7438
7473
  ], exports.CanvasItem);
7439
7474
 
@@ -7463,14 +7498,14 @@ class RenderStack {
7463
7498
  }
7464
7499
  }
7465
7500
 
7466
- var __defProp$A = Object.defineProperty;
7467
- var __getOwnPropDesc$y = Object.getOwnPropertyDescriptor;
7468
- var __decorateClass$H = (decorators, target, key, kind) => {
7469
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$y(target, key) : target;
7501
+ var __defProp$z = Object.defineProperty;
7502
+ var __getOwnPropDesc$x = Object.getOwnPropertyDescriptor;
7503
+ var __decorateClass$G = (decorators, target, key, kind) => {
7504
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$x(target, key) : target;
7470
7505
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
7471
7506
  if (decorator = decorators[i])
7472
7507
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
7473
- if (kind && result) __defProp$A(target, key, result);
7508
+ if (kind && result) __defProp$z(target, key, result);
7474
7509
  return result;
7475
7510
  };
7476
7511
  exports.Timeline = class Timeline extends exports.Node {
@@ -7515,29 +7550,29 @@ exports.Timeline = class Timeline extends exports.Node {
7515
7550
  this.addTime(delta);
7516
7551
  }
7517
7552
  };
7518
- __decorateClass$H([
7519
- modernIdoc.property({ default: 0 })
7553
+ __decorateClass$G([
7554
+ modernIdoc.property({ fallback: 0 })
7520
7555
  ], exports.Timeline.prototype, "startTime", 2);
7521
- __decorateClass$H([
7522
- modernIdoc.property({ default: 0 })
7556
+ __decorateClass$G([
7557
+ modernIdoc.property({ fallback: 0 })
7523
7558
  ], exports.Timeline.prototype, "currentTime", 2);
7524
- __decorateClass$H([
7525
- modernIdoc.property({ default: Number.MAX_SAFE_INTEGER })
7559
+ __decorateClass$G([
7560
+ modernIdoc.property({ fallback: Number.MAX_SAFE_INTEGER })
7526
7561
  ], exports.Timeline.prototype, "endTime", 2);
7527
- __decorateClass$H([
7528
- modernIdoc.property({ default: false })
7562
+ __decorateClass$G([
7563
+ modernIdoc.property({ fallback: false })
7529
7564
  ], exports.Timeline.prototype, "loop", 2);
7530
- exports.Timeline = __decorateClass$H([
7565
+ exports.Timeline = __decorateClass$G([
7531
7566
  customNode("Timeline")
7532
7567
  ], exports.Timeline);
7533
7568
 
7534
- var __defProp$z = Object.defineProperty;
7535
- var __decorateClass$G = (decorators, target, key, kind) => {
7569
+ var __defProp$y = Object.defineProperty;
7570
+ var __decorateClass$F = (decorators, target, key, kind) => {
7536
7571
  var result = void 0 ;
7537
7572
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
7538
7573
  if (decorator = decorators[i])
7539
7574
  result = (decorator(target, key, result) ) || result;
7540
- if (result) __defProp$z(target, key, result);
7575
+ if (result) __defProp$y(target, key, result);
7541
7576
  return result;
7542
7577
  };
7543
7578
  class SceneTree extends MainLoop {
@@ -7545,6 +7580,7 @@ class SceneTree extends MainLoop {
7545
7580
  renderStack = new RenderStack();
7546
7581
  root = new exports.Viewport(true).setTree(this);
7547
7582
  timeline;
7583
+ nodes = /* @__PURE__ */ new Map();
7548
7584
  _backgroundColor = new Color();
7549
7585
  _currentViewport;
7550
7586
  getCurrentViewport() {
@@ -7610,19 +7646,19 @@ class SceneTree extends MainLoop {
7610
7646
  this.input.removeEventListeners();
7611
7647
  }
7612
7648
  }
7613
- __decorateClass$G([
7614
- modernIdoc.property({ default: false })
7649
+ __decorateClass$F([
7650
+ modernIdoc.property({ fallback: false })
7615
7651
  ], SceneTree.prototype, "processPaused");
7616
- __decorateClass$G([
7652
+ __decorateClass$F([
7617
7653
  modernIdoc.property()
7618
7654
  ], SceneTree.prototype, "backgroundColor");
7619
- __decorateClass$G([
7620
- protectedProperty({ default: false })
7655
+ __decorateClass$F([
7656
+ modernIdoc.property({ protected: true, fallback: false })
7621
7657
  ], SceneTree.prototype, "debug");
7622
7658
 
7623
- var __getOwnPropDesc$x = Object.getOwnPropertyDescriptor;
7624
- var __decorateClass$F = (decorators, target, key, kind) => {
7625
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$x(target, key) : target;
7659
+ var __getOwnPropDesc$w = Object.getOwnPropertyDescriptor;
7660
+ var __decorateClass$E = (decorators, target, key, kind) => {
7661
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$w(target, key) : target;
7626
7662
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
7627
7663
  if (decorator = decorators[i])
7628
7664
  result = (decorator(result)) || result;
@@ -7634,7 +7670,7 @@ exports.Transition = class Transition extends exports.Effect {
7634
7670
  this.setProperties(properties).append(children);
7635
7671
  }
7636
7672
  };
7637
- exports.Transition = __decorateClass$F([
7673
+ exports.Transition = __decorateClass$E([
7638
7674
  customNode("Transition", {
7639
7675
  effectMode: "transition",
7640
7676
  processMode: "pausable",
@@ -7642,15 +7678,15 @@ exports.Transition = __decorateClass$F([
7642
7678
  })
7643
7679
  ], exports.Transition);
7644
7680
 
7645
- var __defProp$y = Object.defineProperty;
7646
- var __getOwnPropDesc$w = Object.getOwnPropertyDescriptor;
7647
- var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7648
- var __decorateClass$E = (decorators, target, key, kind) => {
7649
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$w(target, key) : target;
7681
+ var __defProp$x = Object.defineProperty;
7682
+ var __getOwnPropDesc$v = Object.getOwnPropertyDescriptor;
7683
+ var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7684
+ var __decorateClass$D = (decorators, target, key, kind) => {
7685
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$v(target, key) : target;
7650
7686
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
7651
7687
  if (decorator = decorators[i])
7652
7688
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
7653
- if (kind && result) __defProp$y(target, key, result);
7689
+ if (kind && result) __defProp$x(target, key, result);
7654
7690
  return result;
7655
7691
  };
7656
7692
  var __publicField$d = (obj, key, value) => __defNormalProp$d(obj, typeof key !== "symbol" ? key + "" : key, value);
@@ -7756,25 +7792,25 @@ void main(void) {
7756
7792
  }`,
7757
7793
  frag: frag$2
7758
7794
  }));
7759
- __decorateClass$E([
7795
+ __decorateClass$D([
7760
7796
  modernIdoc.property({ default: 4 })
7761
7797
  ], exports.GaussianBlurEffect.prototype, "strength", 2);
7762
- __decorateClass$E([
7798
+ __decorateClass$D([
7763
7799
  modernIdoc.property({ default: 3 })
7764
7800
  ], exports.GaussianBlurEffect.prototype, "quality", 2);
7765
- exports.GaussianBlurEffect = __decorateClass$E([
7801
+ exports.GaussianBlurEffect = __decorateClass$D([
7766
7802
  customNode("GaussianBlurEffect")
7767
7803
  ], exports.GaussianBlurEffect);
7768
7804
 
7769
- var __defProp$x = Object.defineProperty;
7770
- var __getOwnPropDesc$v = Object.getOwnPropertyDescriptor;
7771
- var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7772
- var __decorateClass$D = (decorators, target, key, kind) => {
7773
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$v(target, key) : target;
7805
+ var __defProp$w = Object.defineProperty;
7806
+ var __getOwnPropDesc$u = Object.getOwnPropertyDescriptor;
7807
+ var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7808
+ var __decorateClass$C = (decorators, target, key, kind) => {
7809
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$u(target, key) : target;
7774
7810
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
7775
7811
  if (decorator = decorators[i])
7776
7812
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
7777
- if (kind && result) __defProp$x(target, key, result);
7813
+ if (kind && result) __defProp$w(target, key, result);
7778
7814
  return result;
7779
7815
  };
7780
7816
  var __publicField$c = (obj, key, value) => __defNormalProp$c(obj, key + "" , value);
@@ -7838,34 +7874,34 @@ void main(void) {
7838
7874
  gl_FragColor = sample;
7839
7875
  }`
7840
7876
  }));
7841
- __decorateClass$D([
7842
- modernIdoc.property({ default: 0 })
7877
+ __decorateClass$C([
7878
+ modernIdoc.property()
7843
7879
  ], exports.DropShadowEffect.prototype, "color", 2);
7844
- __decorateClass$D([
7845
- modernIdoc.property({ default: 4 })
7880
+ __decorateClass$C([
7881
+ modernIdoc.property()
7846
7882
  ], exports.DropShadowEffect.prototype, "blur", 2);
7847
- __decorateClass$D([
7848
- modernIdoc.property({ default: 4 })
7883
+ __decorateClass$C([
7884
+ modernIdoc.property()
7849
7885
  ], exports.DropShadowEffect.prototype, "offsetX", 2);
7850
- __decorateClass$D([
7851
- modernIdoc.property({ default: 4 })
7886
+ __decorateClass$C([
7887
+ modernIdoc.property()
7852
7888
  ], exports.DropShadowEffect.prototype, "offsetY", 2);
7853
- __decorateClass$D([
7854
- modernIdoc.property({ default: false })
7889
+ __decorateClass$C([
7890
+ modernIdoc.property()
7855
7891
  ], exports.DropShadowEffect.prototype, "shadowOnly", 2);
7856
- exports.DropShadowEffect = __decorateClass$D([
7892
+ exports.DropShadowEffect = __decorateClass$C([
7857
7893
  customNode("DropShadowEffect")
7858
7894
  ], exports.DropShadowEffect);
7859
7895
 
7860
- var __defProp$w = Object.defineProperty;
7861
- var __getOwnPropDesc$u = Object.getOwnPropertyDescriptor;
7862
- var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7863
- var __decorateClass$C = (decorators, target, key, kind) => {
7864
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$u(target, key) : target;
7896
+ var __defProp$v = Object.defineProperty;
7897
+ var __getOwnPropDesc$t = Object.getOwnPropertyDescriptor;
7898
+ var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7899
+ var __decorateClass$B = (decorators, target, key, kind) => {
7900
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$t(target, key) : target;
7865
7901
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
7866
7902
  if (decorator = decorators[i])
7867
7903
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
7868
- if (kind && result) __defProp$w(target, key, result);
7904
+ if (kind && result) __defProp$v(target, key, result);
7869
7905
  return result;
7870
7906
  };
7871
7907
  var __publicField$b = (obj, key, value) => __defNormalProp$b(obj, key + "" , value);
@@ -7910,22 +7946,22 @@ void main(void) {
7910
7946
  gl_FragColor = vec4(color.rgb * alpha, alpha);
7911
7947
  }`
7912
7948
  }));
7913
- __decorateClass$C([
7914
- modernIdoc.property({ default: 5 })
7949
+ __decorateClass$B([
7950
+ modernIdoc.property()
7915
7951
  ], exports.EmbossEffect.prototype, "strength", 2);
7916
- exports.EmbossEffect = __decorateClass$C([
7952
+ exports.EmbossEffect = __decorateClass$B([
7917
7953
  customNode("EmbossEffect")
7918
7954
  ], exports.EmbossEffect);
7919
7955
 
7920
- var __defProp$v = Object.defineProperty;
7921
- var __getOwnPropDesc$t = Object.getOwnPropertyDescriptor;
7922
- var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7923
- var __decorateClass$B = (decorators, target, key, kind) => {
7924
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$t(target, key) : target;
7956
+ var __defProp$u = Object.defineProperty;
7957
+ var __getOwnPropDesc$s = Object.getOwnPropertyDescriptor;
7958
+ var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7959
+ var __decorateClass$A = (decorators, target, key, kind) => {
7960
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$s(target, key) : target;
7925
7961
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
7926
7962
  if (decorator = decorators[i])
7927
7963
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
7928
- if (kind && result) __defProp$v(target, key, result);
7964
+ if (kind && result) __defProp$u(target, key, result);
7929
7965
  return result;
7930
7966
  };
7931
7967
  var __publicField$a = (obj, key, value) => __defNormalProp$a(obj, key + "" , value);
@@ -8099,46 +8135,46 @@ void main(void) {
8099
8135
  gl_FragColor.a = texture2D(sampler, coord).a;
8100
8136
  }`
8101
8137
  }));
8102
- __decorateClass$B([
8103
- modernIdoc.property({ default: 10 })
8138
+ __decorateClass$A([
8139
+ modernIdoc.property()
8104
8140
  ], exports.GlitchEffect.prototype, "slices", 2);
8105
- __decorateClass$B([
8106
- modernIdoc.property({ default: 512 })
8141
+ __decorateClass$A([
8142
+ modernIdoc.property()
8107
8143
  ], exports.GlitchEffect.prototype, "sampleSize", 2);
8108
- __decorateClass$B([
8109
- modernIdoc.property({ default: 100 })
8144
+ __decorateClass$A([
8145
+ modernIdoc.property()
8110
8146
  ], exports.GlitchEffect.prototype, "offset", 2);
8111
- __decorateClass$B([
8112
- modernIdoc.property({ default: 0 })
8147
+ __decorateClass$A([
8148
+ modernIdoc.property()
8113
8149
  ], exports.GlitchEffect.prototype, "direction", 2);
8114
- __decorateClass$B([
8115
- modernIdoc.property({ default: 2 })
8150
+ __decorateClass$A([
8151
+ modernIdoc.property()
8116
8152
  ], exports.GlitchEffect.prototype, "fillMode", 2);
8117
- __decorateClass$B([
8118
- modernIdoc.property({ default: 0 })
8153
+ __decorateClass$A([
8154
+ modernIdoc.property()
8119
8155
  ], exports.GlitchEffect.prototype, "seed", 2);
8120
- __decorateClass$B([
8121
- modernIdoc.property({ default: [2, 2] })
8156
+ __decorateClass$A([
8157
+ modernIdoc.property()
8122
8158
  ], exports.GlitchEffect.prototype, "red", 2);
8123
- __decorateClass$B([
8124
- modernIdoc.property({ default: [-10, 4] })
8159
+ __decorateClass$A([
8160
+ modernIdoc.property()
8125
8161
  ], exports.GlitchEffect.prototype, "green", 2);
8126
- __decorateClass$B([
8127
- modernIdoc.property({ default: [10, -4] })
8162
+ __decorateClass$A([
8163
+ modernIdoc.property()
8128
8164
  ], exports.GlitchEffect.prototype, "blue", 2);
8129
- exports.GlitchEffect = __decorateClass$B([
8165
+ exports.GlitchEffect = __decorateClass$A([
8130
8166
  customNode("GlitchEffect")
8131
8167
  ], exports.GlitchEffect);
8132
8168
 
8133
- var __defProp$u = Object.defineProperty;
8134
- var __getOwnPropDesc$s = Object.getOwnPropertyDescriptor;
8135
- var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8136
- var __decorateClass$A = (decorators, target, key, kind) => {
8137
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$s(target, key) : target;
8169
+ var __defProp$t = Object.defineProperty;
8170
+ var __getOwnPropDesc$r = Object.getOwnPropertyDescriptor;
8171
+ var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8172
+ var __decorateClass$z = (decorators, target, key, kind) => {
8173
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$r(target, key) : target;
8138
8174
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
8139
8175
  if (decorator = decorators[i])
8140
8176
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
8141
- if (kind && result) __defProp$u(target, key, result);
8177
+ if (kind && result) __defProp$t(target, key, result);
8142
8178
  return result;
8143
8179
  };
8144
8180
  var __publicField$9 = (obj, key, value) => __defNormalProp$9(obj, key + "" , value);
@@ -8316,39 +8352,39 @@ void main(void) {
8316
8352
  gl_FragColor = vec4(color.rgb + mist.rgb, color.a);
8317
8353
  }`
8318
8354
  }));
8319
- __decorateClass$A([
8320
- modernIdoc.property({ default: 0 })
8355
+ __decorateClass$z([
8356
+ modernIdoc.property()
8321
8357
  ], exports.GodrayEffect.prototype, "time", 2);
8322
- __decorateClass$A([
8323
- modernIdoc.property({ default: 30 })
8358
+ __decorateClass$z([
8359
+ modernIdoc.property()
8324
8360
  ], exports.GodrayEffect.prototype, "angle", 2);
8325
- __decorateClass$A([
8326
- modernIdoc.property({ default: 0.5 })
8361
+ __decorateClass$z([
8362
+ modernIdoc.property()
8327
8363
  ], exports.GodrayEffect.prototype, "gain", 2);
8328
- __decorateClass$A([
8329
- modernIdoc.property({ default: 2.5 })
8364
+ __decorateClass$z([
8365
+ modernIdoc.property()
8330
8366
  ], exports.GodrayEffect.prototype, "lacunarity", 2);
8331
- __decorateClass$A([
8332
- modernIdoc.property({ default: true })
8367
+ __decorateClass$z([
8368
+ modernIdoc.property()
8333
8369
  ], exports.GodrayEffect.prototype, "parallel", 2);
8334
- __decorateClass$A([
8335
- modernIdoc.property({ default: () => [0, 0] })
8370
+ __decorateClass$z([
8371
+ modernIdoc.property()
8336
8372
  ], exports.GodrayEffect.prototype, "center", 2);
8337
- __decorateClass$A([
8338
- modernIdoc.property({ default: 1 })
8373
+ __decorateClass$z([
8374
+ modernIdoc.property()
8339
8375
  ], exports.GodrayEffect.prototype, "alpha", 2);
8340
- exports.GodrayEffect = __decorateClass$A([
8376
+ exports.GodrayEffect = __decorateClass$z([
8341
8377
  customNode("GodrayEffect")
8342
8378
  ], exports.GodrayEffect);
8343
8379
 
8344
- var __defProp$t = Object.defineProperty;
8345
- var __getOwnPropDesc$r = Object.getOwnPropertyDescriptor;
8346
- var __decorateClass$z = (decorators, target, key, kind) => {
8347
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$r(target, key) : target;
8380
+ var __defProp$s = Object.defineProperty;
8381
+ var __getOwnPropDesc$q = Object.getOwnPropertyDescriptor;
8382
+ var __decorateClass$y = (decorators, target, key, kind) => {
8383
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$q(target, key) : target;
8348
8384
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
8349
8385
  if (decorator = decorators[i])
8350
8386
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
8351
- if (kind && result) __defProp$t(target, key, result);
8387
+ if (kind && result) __defProp$s(target, key, result);
8352
8388
  return result;
8353
8389
  };
8354
8390
  const frag$1 = `varying vec2 vUv;
@@ -8379,7 +8415,6 @@ void main(void) {
8379
8415
  gl_FragColor = color;
8380
8416
  }`;
8381
8417
  exports.KawaseBlurEffect = class KawaseBlurEffect extends exports.Effect {
8382
- material;
8383
8418
  _kernels = [0];
8384
8419
  constructor(properties, children = []) {
8385
8420
  super();
@@ -8439,33 +8474,32 @@ void main() {
8439
8474
  });
8440
8475
  }
8441
8476
  };
8442
- __decorateClass$z([
8443
- modernIdoc.property({ default: 4 })
8477
+ __decorateClass$y([
8478
+ modernIdoc.property()
8444
8479
  ], exports.KawaseBlurEffect.prototype, "strength", 2);
8445
- __decorateClass$z([
8446
- modernIdoc.property({ default: 3 })
8480
+ __decorateClass$y([
8481
+ modernIdoc.property()
8447
8482
  ], exports.KawaseBlurEffect.prototype, "quality", 2);
8448
- __decorateClass$z([
8449
- modernIdoc.property({ default: [1, 1] })
8483
+ __decorateClass$y([
8484
+ modernIdoc.property()
8450
8485
  ], exports.KawaseBlurEffect.prototype, "pixelSize", 2);
8451
- exports.KawaseBlurEffect = __decorateClass$z([
8486
+ exports.KawaseBlurEffect = __decorateClass$y([
8452
8487
  customNode("KawaseBlurEffect")
8453
8488
  ], exports.KawaseBlurEffect);
8454
8489
 
8455
- var __defProp$s = Object.defineProperty;
8456
- var __getOwnPropDesc$q = Object.getOwnPropertyDescriptor;
8457
- var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8458
- var __decorateClass$y = (decorators, target, key, kind) => {
8459
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$q(target, key) : target;
8490
+ var __defProp$r = Object.defineProperty;
8491
+ var __getOwnPropDesc$p = Object.getOwnPropertyDescriptor;
8492
+ var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8493
+ var __decorateClass$x = (decorators, target, key, kind) => {
8494
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$p(target, key) : target;
8460
8495
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
8461
8496
  if (decorator = decorators[i])
8462
8497
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
8463
- if (kind && result) __defProp$s(target, key, result);
8498
+ if (kind && result) __defProp$r(target, key, result);
8464
8499
  return result;
8465
8500
  };
8466
8501
  var __publicField$8 = (obj, key, value) => __defNormalProp$8(obj, key + "" , value);
8467
8502
  exports.MaskEffect = class MaskEffect extends exports.Effect {
8468
- texture;
8469
8503
  constructor(properties, children = []) {
8470
8504
  super();
8471
8505
  this.setProperties(properties).append(children);
@@ -8549,25 +8583,25 @@ void main(void) {
8549
8583
  }
8550
8584
  }`
8551
8585
  }));
8552
- __decorateClass$y([
8553
- protectedProperty()
8586
+ __decorateClass$x([
8587
+ modernIdoc.property({ protected: true })
8554
8588
  ], exports.MaskEffect.prototype, "texture", 2);
8555
- __decorateClass$y([
8589
+ __decorateClass$x([
8556
8590
  modernIdoc.property({ default: "" })
8557
8591
  ], exports.MaskEffect.prototype, "src", 2);
8558
- exports.MaskEffect = __decorateClass$y([
8592
+ exports.MaskEffect = __decorateClass$x([
8559
8593
  customNode("MaskEffect")
8560
8594
  ], exports.MaskEffect);
8561
8595
 
8562
- var __defProp$r = Object.defineProperty;
8563
- var __getOwnPropDesc$p = Object.getOwnPropertyDescriptor;
8564
- var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8565
- var __decorateClass$x = (decorators, target, key, kind) => {
8566
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$p(target, key) : target;
8596
+ var __defProp$q = Object.defineProperty;
8597
+ var __getOwnPropDesc$o = Object.getOwnPropertyDescriptor;
8598
+ var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8599
+ var __decorateClass$w = (decorators, target, key, kind) => {
8600
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$o(target, key) : target;
8567
8601
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
8568
8602
  if (decorator = decorators[i])
8569
8603
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
8570
- if (kind && result) __defProp$r(target, key, result);
8604
+ if (kind && result) __defProp$q(target, key, result);
8571
8605
  return result;
8572
8606
  };
8573
8607
  var __publicField$7 = (obj, key, value) => __defNormalProp$7(obj, typeof key !== "symbol" ? key + "" : key, value);
@@ -8607,7 +8641,6 @@ void main(void) {
8607
8641
  gl_FragColor = contentColor + outlineColor;
8608
8642
  }`;
8609
8643
  exports.OutlineEffect = class OutlineEffect extends exports.Effect {
8610
- material;
8611
8644
  static getAngleStep(quality) {
8612
8645
  return Number.parseFloat(
8613
8646
  (Math.PI * 2 / Math.max(
@@ -8655,40 +8688,40 @@ void main() {
8655
8688
  };
8656
8689
  __publicField$7(exports.OutlineEffect, "MIN_SAMPLES", 1);
8657
8690
  __publicField$7(exports.OutlineEffect, "MAX_SAMPLES", 100);
8658
- __decorateClass$x([
8659
- modernIdoc.property({ default: 0 })
8691
+ __decorateClass$w([
8692
+ modernIdoc.property()
8660
8693
  ], exports.OutlineEffect.prototype, "color", 2);
8661
- __decorateClass$x([
8662
- modernIdoc.property({ default: 1 })
8694
+ __decorateClass$w([
8695
+ modernIdoc.property()
8663
8696
  ], exports.OutlineEffect.prototype, "width", 2);
8664
- __decorateClass$x([
8665
- modernIdoc.property({ default: "solid" })
8697
+ __decorateClass$w([
8698
+ modernIdoc.property()
8666
8699
  ], exports.OutlineEffect.prototype, "style", 2);
8667
- __decorateClass$x([
8700
+ __decorateClass$w([
8668
8701
  modernIdoc.property()
8669
8702
  ], exports.OutlineEffect.prototype, "image", 2);
8670
- __decorateClass$x([
8671
- modernIdoc.property({ default: 1 })
8703
+ __decorateClass$w([
8704
+ modernIdoc.property()
8672
8705
  ], exports.OutlineEffect.prototype, "opacity", 2);
8673
- __decorateClass$x([
8674
- modernIdoc.property({ default: 0.1 })
8706
+ __decorateClass$w([
8707
+ modernIdoc.property()
8675
8708
  ], exports.OutlineEffect.prototype, "quality", 2);
8676
- __decorateClass$x([
8677
- modernIdoc.property({ default: false })
8709
+ __decorateClass$w([
8710
+ modernIdoc.property()
8678
8711
  ], exports.OutlineEffect.prototype, "knockout", 2);
8679
- exports.OutlineEffect = __decorateClass$x([
8712
+ exports.OutlineEffect = __decorateClass$w([
8680
8713
  customNode("OutlineEffect")
8681
8714
  ], exports.OutlineEffect);
8682
8715
 
8683
- var __defProp$q = Object.defineProperty;
8684
- var __getOwnPropDesc$o = Object.getOwnPropertyDescriptor;
8685
- var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8686
- var __decorateClass$w = (decorators, target, key, kind) => {
8687
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$o(target, key) : target;
8716
+ var __defProp$p = Object.defineProperty;
8717
+ var __getOwnPropDesc$n = Object.getOwnPropertyDescriptor;
8718
+ var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8719
+ var __decorateClass$v = (decorators, target, key, kind) => {
8720
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$n(target, key) : target;
8688
8721
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
8689
8722
  if (decorator = decorators[i])
8690
8723
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
8691
- if (kind && result) __defProp$q(target, key, result);
8724
+ if (kind && result) __defProp$p(target, key, result);
8692
8725
  return result;
8693
8726
  };
8694
8727
  var __publicField$6 = (obj, key, value) => __defNormalProp$6(obj, key + "" , value);
@@ -8744,22 +8777,22 @@ void main(void) {
8744
8777
  gl_FragColor = texture2D(sampler, coord);
8745
8778
  }`
8746
8779
  }));
8747
- __decorateClass$w([
8748
- modernIdoc.property({ default: 10 })
8780
+ __decorateClass$v([
8781
+ modernIdoc.property()
8749
8782
  ], exports.PixelateEffect.prototype, "strength", 2);
8750
- exports.PixelateEffect = __decorateClass$w([
8783
+ exports.PixelateEffect = __decorateClass$v([
8751
8784
  customNode("PixelateEffect")
8752
8785
  ], exports.PixelateEffect);
8753
8786
 
8754
- var __defProp$p = Object.defineProperty;
8755
- var __getOwnPropDesc$n = Object.getOwnPropertyDescriptor;
8756
- var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8757
- var __decorateClass$v = (decorators, target, key, kind) => {
8758
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$n(target, key) : target;
8787
+ var __defProp$o = Object.defineProperty;
8788
+ var __getOwnPropDesc$m = Object.getOwnPropertyDescriptor;
8789
+ var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$o(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8790
+ var __decorateClass$u = (decorators, target, key, kind) => {
8791
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$m(target, key) : target;
8759
8792
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
8760
8793
  if (decorator = decorators[i])
8761
8794
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
8762
- if (kind && result) __defProp$p(target, key, result);
8795
+ if (kind && result) __defProp$o(target, key, result);
8763
8796
  return result;
8764
8797
  };
8765
8798
  var __publicField$5 = (obj, key, value) => __defNormalProp$5(obj, key + "" , value);
@@ -8872,29 +8905,29 @@ void main() {
8872
8905
  gl_FragColor = color;
8873
8906
  }`
8874
8907
  }));
8875
- __decorateClass$v([
8908
+ __decorateClass$u([
8876
8909
  modernIdoc.property()
8877
8910
  ], exports.ZoomBlurEffect.prototype, "center", 2);
8878
- __decorateClass$v([
8879
- modernIdoc.property({ default: 20 })
8911
+ __decorateClass$u([
8912
+ modernIdoc.property()
8880
8913
  ], exports.ZoomBlurEffect.prototype, "innerRadius", 2);
8881
- __decorateClass$v([
8882
- modernIdoc.property({ default: -1 })
8914
+ __decorateClass$u([
8915
+ modernIdoc.property()
8883
8916
  ], exports.ZoomBlurEffect.prototype, "radius", 2);
8884
- __decorateClass$v([
8885
- modernIdoc.property({ default: 0.1 })
8917
+ __decorateClass$u([
8918
+ modernIdoc.property()
8886
8919
  ], exports.ZoomBlurEffect.prototype, "strength", 2);
8887
- exports.ZoomBlurEffect = __decorateClass$v([
8920
+ exports.ZoomBlurEffect = __decorateClass$u([
8888
8921
  customNode("ZoomBlurEffect")
8889
8922
  ], exports.ZoomBlurEffect);
8890
8923
 
8891
- var __defProp$o = Object.defineProperty;
8892
- var __decorateClass$u = (decorators, target, key, kind) => {
8924
+ var __defProp$n = Object.defineProperty;
8925
+ var __decorateClass$t = (decorators, target, key, kind) => {
8893
8926
  var result = void 0 ;
8894
8927
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
8895
8928
  if (decorator = decorators[i])
8896
8929
  result = (decorator(target, key, result) ) || result;
8897
- if (result) __defProp$o(target, key, result);
8930
+ if (result) __defProp$n(target, key, result);
8898
8931
  return result;
8899
8932
  };
8900
8933
  class BaseElement2DFill extends CoreObject {
@@ -8939,6 +8972,7 @@ class BaseElement2DFill extends CoreObject {
8939
8972
  this.parent.size.height
8940
8973
  );
8941
8974
  } else if (!modernIdoc.isNone(this.image)) {
8975
+ this.parent.tree?.log(`load image ${this.image}`);
8942
8976
  return await assets.texture.load(this.image);
8943
8977
  } else {
8944
8978
  return void 0;
@@ -9001,47 +9035,47 @@ class BaseElement2DFill extends CoreObject {
9001
9035
  });
9002
9036
  }
9003
9037
  }
9004
- __decorateClass$u([
9005
- modernIdoc.property({ default: true })
9038
+ __decorateClass$t([
9039
+ modernIdoc.property({ fallback: true })
9006
9040
  ], BaseElement2DFill.prototype, "enabled");
9007
- __decorateClass$u([
9041
+ __decorateClass$t([
9008
9042
  modernIdoc.property()
9009
9043
  ], BaseElement2DFill.prototype, "color");
9010
- __decorateClass$u([
9044
+ __decorateClass$t([
9011
9045
  modernIdoc.property()
9012
9046
  ], BaseElement2DFill.prototype, "image");
9013
- __decorateClass$u([
9047
+ __decorateClass$t([
9014
9048
  modernIdoc.property()
9015
9049
  ], BaseElement2DFill.prototype, "linearGradient");
9016
- __decorateClass$u([
9050
+ __decorateClass$t([
9017
9051
  modernIdoc.property()
9018
9052
  ], BaseElement2DFill.prototype, "radialGradient");
9019
- __decorateClass$u([
9053
+ __decorateClass$t([
9020
9054
  modernIdoc.property()
9021
9055
  ], BaseElement2DFill.prototype, "cropRect");
9022
- __decorateClass$u([
9056
+ __decorateClass$t([
9023
9057
  modernIdoc.property()
9024
9058
  ], BaseElement2DFill.prototype, "stretchRect");
9025
- __decorateClass$u([
9059
+ __decorateClass$t([
9026
9060
  modernIdoc.property()
9027
9061
  ], BaseElement2DFill.prototype, "dpi");
9028
- __decorateClass$u([
9062
+ __decorateClass$t([
9029
9063
  modernIdoc.property()
9030
9064
  ], BaseElement2DFill.prototype, "rotateWithShape");
9031
- __decorateClass$u([
9065
+ __decorateClass$t([
9032
9066
  modernIdoc.property()
9033
9067
  ], BaseElement2DFill.prototype, "tile");
9034
- __decorateClass$u([
9068
+ __decorateClass$t([
9035
9069
  modernIdoc.property()
9036
9070
  ], BaseElement2DFill.prototype, "opacity");
9037
9071
 
9038
- var __defProp$n = Object.defineProperty;
9039
- var __decorateClass$t = (decorators, target, key, kind) => {
9072
+ var __defProp$m = Object.defineProperty;
9073
+ var __decorateClass$s = (decorators, target, key, kind) => {
9040
9074
  var result = void 0 ;
9041
9075
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
9042
9076
  if (decorator = decorators[i])
9043
9077
  result = (decorator(target, key, result) ) || result;
9044
- if (result) __defProp$n(target, key, result);
9078
+ if (result) __defProp$m(target, key, result);
9045
9079
  return result;
9046
9080
  };
9047
9081
  class BaseElement2DBackground extends BaseElement2DFill {
@@ -9051,17 +9085,17 @@ class BaseElement2DBackground extends BaseElement2DFill {
9051
9085
  );
9052
9086
  }
9053
9087
  }
9054
- __decorateClass$t([
9088
+ __decorateClass$s([
9055
9089
  modernIdoc.property()
9056
9090
  ], BaseElement2DBackground.prototype, "fillWithShape");
9057
9091
 
9058
- var __defProp$m = Object.defineProperty;
9059
- var __decorateClass$s = (decorators, target, key, kind) => {
9092
+ var __defProp$l = Object.defineProperty;
9093
+ var __decorateClass$r = (decorators, target, key, kind) => {
9060
9094
  var result = void 0 ;
9061
9095
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
9062
9096
  if (decorator = decorators[i])
9063
9097
  result = (decorator(target, key, result) ) || result;
9064
- if (result) __defProp$m(target, key, result);
9098
+ if (result) __defProp$l(target, key, result);
9065
9099
  return result;
9066
9100
  };
9067
9101
  class BaseElement2DForeground extends BaseElement2DFill {
@@ -9071,17 +9105,17 @@ class BaseElement2DForeground extends BaseElement2DFill {
9071
9105
  );
9072
9106
  }
9073
9107
  }
9074
- __decorateClass$s([
9108
+ __decorateClass$r([
9075
9109
  modernIdoc.property()
9076
9110
  ], BaseElement2DForeground.prototype, "fillWithShape");
9077
9111
 
9078
- var __defProp$l = Object.defineProperty;
9079
- var __decorateClass$r = (decorators, target, key, kind) => {
9112
+ var __defProp$k = Object.defineProperty;
9113
+ var __decorateClass$q = (decorators, target, key, kind) => {
9080
9114
  var result = void 0 ;
9081
9115
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
9082
9116
  if (decorator = decorators[i])
9083
9117
  result = (decorator(target, key, result) ) || result;
9084
- if (result) __defProp$l(target, key, result);
9118
+ if (result) __defProp$k(target, key, result);
9085
9119
  return result;
9086
9120
  };
9087
9121
  class BaseElement2DOutline extends BaseElement2DFill {
@@ -9114,26 +9148,23 @@ class BaseElement2DOutline extends BaseElement2DFill {
9114
9148
  ctx.stroke({ disableWrapMode });
9115
9149
  }
9116
9150
  }
9117
- __decorateClass$r([
9118
- modernIdoc.property({ default: true })
9119
- ], BaseElement2DOutline.prototype, "enabled");
9120
- __decorateClass$r([
9121
- modernIdoc.property({ default: 0 })
9151
+ __decorateClass$q([
9152
+ modernIdoc.property({ fallback: "#00000000" })
9122
9153
  ], BaseElement2DOutline.prototype, "color");
9123
- __decorateClass$r([
9124
- modernIdoc.property({ default: 0 })
9154
+ __decorateClass$q([
9155
+ modernIdoc.property({ fallback: 0 })
9125
9156
  ], BaseElement2DOutline.prototype, "width");
9126
- __decorateClass$r([
9127
- modernIdoc.property({ default: "solid" })
9157
+ __decorateClass$q([
9158
+ modernIdoc.property({ fallback: "solid" })
9128
9159
  ], BaseElement2DOutline.prototype, "style");
9129
9160
 
9130
- var __defProp$k = Object.defineProperty;
9131
- var __decorateClass$q = (decorators, target, key, kind) => {
9161
+ var __defProp$j = Object.defineProperty;
9162
+ var __decorateClass$p = (decorators, target, key, kind) => {
9132
9163
  var result = void 0 ;
9133
9164
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
9134
9165
  if (decorator = decorators[i])
9135
9166
  result = (decorator(target, key, result) ) || result;
9136
- if (result) __defProp$k(target, key, result);
9167
+ if (result) __defProp$j(target, key, result);
9137
9168
  return result;
9138
9169
  };
9139
9170
  class BaseElement2DShadow extends CoreObject {
@@ -9173,29 +9204,29 @@ class BaseElement2DShadow extends CoreObject {
9173
9204
  }
9174
9205
  }
9175
9206
  }
9176
- __decorateClass$q([
9177
- modernIdoc.property({ default: true })
9207
+ __decorateClass$p([
9208
+ modernIdoc.property({ fallback: true })
9178
9209
  ], BaseElement2DShadow.prototype, "enabled");
9179
- __decorateClass$q([
9180
- modernIdoc.property({ default: "#000000" })
9210
+ __decorateClass$p([
9211
+ modernIdoc.property({ fallback: "#000000FF" })
9181
9212
  ], BaseElement2DShadow.prototype, "color");
9182
- __decorateClass$q([
9183
- modernIdoc.property({ default: 0 })
9213
+ __decorateClass$p([
9214
+ modernIdoc.property({ fallback: 0 })
9184
9215
  ], BaseElement2DShadow.prototype, "blur");
9185
- __decorateClass$q([
9186
- modernIdoc.property({ default: 0 })
9216
+ __decorateClass$p([
9217
+ modernIdoc.property({ fallback: 0 })
9187
9218
  ], BaseElement2DShadow.prototype, "offsetY");
9188
- __decorateClass$q([
9189
- modernIdoc.property({ default: 0 })
9219
+ __decorateClass$p([
9220
+ modernIdoc.property({ fallback: 0 })
9190
9221
  ], BaseElement2DShadow.prototype, "offsetX");
9191
9222
 
9192
- var __defProp$j = Object.defineProperty;
9193
- var __decorateClass$p = (decorators, target, key, kind) => {
9223
+ var __defProp$i = Object.defineProperty;
9224
+ var __decorateClass$o = (decorators, target, key, kind) => {
9194
9225
  var result = void 0 ;
9195
9226
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
9196
9227
  if (decorator = decorators[i])
9197
9228
  result = (decorator(target, key, result) ) || result;
9198
- if (result) __defProp$j(target, key, result);
9229
+ if (result) __defProp$i(target, key, result);
9199
9230
  return result;
9200
9231
  };
9201
9232
  class BaseElement2DShape extends CoreObject {
@@ -9270,19 +9301,19 @@ class BaseElement2DShape extends CoreObject {
9270
9301
  }
9271
9302
  }
9272
9303
  }
9273
- __decorateClass$p([
9274
- modernIdoc.property({ default: true })
9304
+ __decorateClass$o([
9305
+ modernIdoc.property({ fallback: true })
9275
9306
  ], BaseElement2DShape.prototype, "enabled");
9276
- __decorateClass$p([
9307
+ __decorateClass$o([
9277
9308
  modernIdoc.property()
9278
9309
  ], BaseElement2DShape.prototype, "preset");
9279
- __decorateClass$p([
9310
+ __decorateClass$o([
9280
9311
  modernIdoc.property()
9281
9312
  ], BaseElement2DShape.prototype, "svg");
9282
- __decorateClass$p([
9313
+ __decorateClass$o([
9283
9314
  modernIdoc.property()
9284
9315
  ], BaseElement2DShape.prototype, "viewBox");
9285
- __decorateClass$p([
9316
+ __decorateClass$o([
9286
9317
  modernIdoc.property({ default: () => [] })
9287
9318
  ], BaseElement2DShape.prototype, "paths");
9288
9319
 
@@ -9293,23 +9324,18 @@ class BaseElement2DStyle extends Resource {
9293
9324
  }
9294
9325
  }
9295
9326
  const defaultStyles$1 = modernIdoc.getDefaultStyle();
9296
- delete defaultStyles$1.top;
9297
- delete defaultStyles$1.left;
9298
- delete defaultStyles$1.width;
9299
- delete defaultStyles$1.height;
9300
9327
  for (const key in defaultStyles$1) {
9301
- modernIdoc.defineProperty(BaseElement2DStyle, key, {
9302
- default: defaultStyles$1[key]
9303
- });
9328
+ const fallback = defaultStyles$1[key];
9329
+ modernIdoc.defineProperty(BaseElement2DStyle.prototype, key, { fallback });
9304
9330
  }
9305
9331
 
9306
- var __defProp$i = Object.defineProperty;
9307
- var __decorateClass$o = (decorators, target, key, kind) => {
9332
+ var __defProp$h = Object.defineProperty;
9333
+ var __decorateClass$n = (decorators, target, key, kind) => {
9308
9334
  var result = void 0 ;
9309
9335
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
9310
9336
  if (decorator = decorators[i])
9311
9337
  result = (decorator(target, key, result) ) || result;
9312
- if (result) __defProp$i(target, key, result);
9338
+ if (result) __defProp$h(target, key, result);
9313
9339
  return result;
9314
9340
  };
9315
9341
  class BaseElement2DText extends CoreObject {
@@ -9375,30 +9401,30 @@ class BaseElement2DText extends CoreObject {
9375
9401
  });
9376
9402
  }
9377
9403
  }
9378
- __decorateClass$o([
9379
- modernIdoc.property({ default: true })
9404
+ __decorateClass$n([
9405
+ modernIdoc.property({ fallback: true })
9380
9406
  ], BaseElement2DText.prototype, "enabled");
9381
- __decorateClass$o([
9382
- modernIdoc.property({ alias: "base.content" })
9407
+ __decorateClass$n([
9408
+ modernIdoc.property({ alias: "base.content", fallback: () => [] })
9383
9409
  ], BaseElement2DText.prototype, "content");
9384
- __decorateClass$o([
9410
+ __decorateClass$n([
9385
9411
  modernIdoc.property({ alias: "base.effects" })
9386
9412
  ], BaseElement2DText.prototype, "effects");
9387
- __decorateClass$o([
9388
- protectedProperty({ alias: "base.measureDOM" })
9413
+ __decorateClass$n([
9414
+ modernIdoc.property({ protected: true, alias: "base.measureDOM" })
9389
9415
  ], BaseElement2DText.prototype, "measureDOM");
9390
- __decorateClass$o([
9391
- protectedProperty({ alias: "base.fonts" })
9416
+ __decorateClass$n([
9417
+ modernIdoc.property({ protected: true, alias: "base.fonts" })
9392
9418
  ], BaseElement2DText.prototype, "fonts");
9393
9419
 
9394
- var __defProp$h = Object.defineProperty;
9395
- var __getOwnPropDesc$m = Object.getOwnPropertyDescriptor;
9396
- var __decorateClass$n = (decorators, target, key, kind) => {
9397
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$m(target, key) : target;
9420
+ var __defProp$g = Object.defineProperty;
9421
+ var __getOwnPropDesc$l = Object.getOwnPropertyDescriptor;
9422
+ var __decorateClass$m = (decorators, target, key, kind) => {
9423
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$l(target, key) : target;
9398
9424
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
9399
9425
  if (decorator = decorators[i])
9400
9426
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
9401
- if (kind && result) __defProp$h(target, key, result);
9427
+ if (kind && result) __defProp$g(target, key, result);
9402
9428
  return result;
9403
9429
  };
9404
9430
  exports.Node2D = class Node2D extends exports.CanvasItem {
@@ -9500,19 +9526,19 @@ exports.Node2D = class Node2D extends exports.CanvasItem {
9500
9526
  }
9501
9527
  }
9502
9528
  };
9503
- __decorateClass$n([
9504
- protectedProperty({ default: 0 })
9529
+ __decorateClass$m([
9530
+ modernIdoc.property({ protected: true, fallback: 0 })
9505
9531
  ], exports.Node2D.prototype, "rotation", 2);
9506
- __decorateClass$n([
9507
- protectedProperty({ default: 0 })
9532
+ __decorateClass$m([
9533
+ modernIdoc.property({ protected: true, fallback: 0 })
9508
9534
  ], exports.Node2D.prototype, "globalRotation", 2);
9509
- exports.Node2D = __decorateClass$n([
9535
+ exports.Node2D = __decorateClass$m([
9510
9536
  customNode("Node2D")
9511
9537
  ], exports.Node2D);
9512
9538
 
9513
- var __getOwnPropDesc$l = Object.getOwnPropertyDescriptor;
9514
- var __decorateClass$m = (decorators, target, key, kind) => {
9515
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$l(target, key) : target;
9539
+ var __getOwnPropDesc$k = Object.getOwnPropertyDescriptor;
9540
+ var __decorateClass$l = (decorators, target, key, kind) => {
9541
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$k(target, key) : target;
9516
9542
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
9517
9543
  if (decorator = decorators[i])
9518
9544
  result = (decorator(result)) || result;
@@ -9612,8 +9638,7 @@ exports.BaseElement2D = class BaseElement2D extends exports.Node2D {
9612
9638
  }
9613
9639
  return this;
9614
9640
  }
9615
- // eslint-disable-next-line unused-imports/no-unused-vars
9616
- _updateStyleProperty(key, value, oldValue, declaration) {
9641
+ _updateStyleProperty(key, value, _oldValue, _declaration) {
9617
9642
  switch (key) {
9618
9643
  case "width":
9619
9644
  case "height":
@@ -9762,27 +9787,27 @@ exports.BaseElement2D = class BaseElement2D extends exports.Node2D {
9762
9787
  this._text.updateMeasure();
9763
9788
  }
9764
9789
  if (this._background.canDraw()) {
9765
- this._tree?.log(this.name, "draw background");
9790
+ this._tree?.log(this.name, "background drawing");
9766
9791
  this._shape.drawRect();
9767
9792
  this._background.draw();
9768
9793
  }
9769
9794
  if (this._fill.canDraw()) {
9770
- this._tree?.log(this.name, "draw fill");
9795
+ this._tree?.log(this.name, "fill drawing");
9771
9796
  this._shape.draw();
9772
9797
  this._fill.draw();
9773
9798
  }
9774
9799
  if (this._outline.canDraw()) {
9775
- this._tree?.log(this.name, "draw outline");
9800
+ this._tree?.log(this.name, "outline drawing");
9776
9801
  this._shape.draw();
9777
9802
  this._outline.draw();
9778
9803
  }
9779
9804
  if (this._foreground.canDraw()) {
9780
- this._tree?.log(this.name, "draw foreground");
9805
+ this._tree?.log(this.name, "foreground drawing");
9781
9806
  this._shape.drawRect();
9782
9807
  this._foreground.draw();
9783
9808
  }
9784
9809
  if (this._text.canDraw()) {
9785
- this._tree?.log(this.name, "draw text");
9810
+ this._tree?.log(this.name, "text drawing");
9786
9811
  this._text.draw();
9787
9812
  }
9788
9813
  this._drawContent();
@@ -9837,24 +9862,22 @@ exports.BaseElement2D = class BaseElement2D extends exports.Node2D {
9837
9862
  }
9838
9863
  }
9839
9864
  toJSON() {
9840
- const json = super.toJSON();
9841
9865
  return {
9842
- ...json,
9843
- props: {
9844
- ...json.props,
9845
- style: this.style.toJSON(),
9846
- background: this.background.toJSON(),
9847
- shape: this.shape.toJSON(),
9848
- fill: this.fill.toJSON(),
9849
- outline: this.outline.toJSON(),
9850
- text: this.text.toJSON(),
9851
- foreground: this.foreground.toJSON(),
9852
- shadow: this.shadow.toJSON()
9853
- }
9866
+ is: this.is,
9867
+ ...this.toPropsJSON(),
9868
+ children: [...this._children.map((child) => child.toJSON())],
9869
+ style: this.style.toJSON(),
9870
+ background: this.background.toJSON(),
9871
+ shape: this.shape.toJSON(),
9872
+ fill: this.fill.toJSON(),
9873
+ outline: this.outline.toJSON(),
9874
+ text: this.text.toJSON(),
9875
+ foreground: this.foreground.toJSON(),
9876
+ shadow: this.shadow.toJSON()
9854
9877
  };
9855
9878
  }
9856
9879
  };
9857
- exports.BaseElement2D = __decorateClass$m([
9880
+ exports.BaseElement2D = __decorateClass$l([
9858
9881
  customNode("BaseElement2D")
9859
9882
  ], exports.BaseElement2D);
9860
9883
 
@@ -9871,12 +9894,12 @@ const defaultStyles = {
9871
9894
  height: 0
9872
9895
  };
9873
9896
  for (const key in defaultStyles) {
9874
- modernIdoc.defineProperty(Element2DStyle, key, { default: defaultStyles[key] });
9897
+ modernIdoc.defineProperty(Element2DStyle.prototype, key, { fallback: defaultStyles[key] });
9875
9898
  }
9876
9899
 
9877
- var __getOwnPropDesc$k = Object.getOwnPropertyDescriptor;
9878
- var __decorateClass$l = (decorators, target, key, kind) => {
9879
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$k(target, key) : target;
9900
+ var __getOwnPropDesc$j = Object.getOwnPropertyDescriptor;
9901
+ var __decorateClass$k = (decorators, target, key, kind) => {
9902
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$j(target, key) : target;
9880
9903
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
9881
9904
  if (decorator = decorators[i])
9882
9905
  result = (decorator(result)) || result;
@@ -9918,7 +9941,7 @@ exports.Element2D = class Element2D extends exports.BaseElement2D {
9918
9941
  }
9919
9942
  }
9920
9943
  };
9921
- exports.Element2D = __decorateClass$l([
9944
+ exports.Element2D = __decorateClass$k([
9922
9945
  customNode("Element2D")
9923
9946
  ], exports.Element2D);
9924
9947
 
@@ -10170,9 +10193,9 @@ class FlexLayout {
10170
10193
  }
10171
10194
  }
10172
10195
 
10173
- var __getOwnPropDesc$j = Object.getOwnPropertyDescriptor;
10174
- var __decorateClass$k = (decorators, target, key, kind) => {
10175
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$j(target, key) : target;
10196
+ var __getOwnPropDesc$i = Object.getOwnPropertyDescriptor;
10197
+ var __decorateClass$j = (decorators, target, key, kind) => {
10198
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$i(target, key) : target;
10176
10199
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
10177
10200
  if (decorator = decorators[i])
10178
10201
  result = (decorator(result)) || result;
@@ -10249,120 +10272,10 @@ exports.FlexElement2D = class FlexElement2D extends exports.BaseElement2D {
10249
10272
  }
10250
10273
  }
10251
10274
  };
10252
- exports.FlexElement2D = __decorateClass$k([
10275
+ exports.FlexElement2D = __decorateClass$j([
10253
10276
  customNode("FlexElement2D")
10254
10277
  ], exports.FlexElement2D);
10255
10278
 
10256
- var __defProp$g = Object.defineProperty;
10257
- var __getOwnPropDesc$i = Object.getOwnPropertyDescriptor;
10258
- var __decorateClass$j = (decorators, target, key, kind) => {
10259
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$i(target, key) : target;
10260
- for (var i = decorators.length - 1, decorator; i >= 0; i--)
10261
- if (decorator = decorators[i])
10262
- result = (kind ? decorator(target, key, result) : decorator(result)) || result;
10263
- if (kind && result) __defProp$g(target, key, result);
10264
- return result;
10265
- };
10266
- function proxy(options) {
10267
- return function(target, name) {
10268
- Object.defineProperty(target.constructor.prototype, name, {
10269
- get() {
10270
- if (options?.method) {
10271
- return (...args) => {
10272
- this.context[name].call(this.context, ...args);
10273
- options.redraw && this.requestRedraw();
10274
- return target;
10275
- };
10276
- }
10277
- return this.context[name];
10278
- },
10279
- set(value) {
10280
- this.context[name] = value;
10281
- },
10282
- configurable: true,
10283
- enumerable: true
10284
- });
10285
- };
10286
- }
10287
- exports.Graphics2D = class Graphics2D extends exports.Node2D {
10288
- _resetContext = false;
10289
- lineCap;
10290
- lineJoin;
10291
- fillStyle;
10292
- strokeStyle;
10293
- lineWidth;
10294
- miterLimit;
10295
- drawCircle(x, y, radius) {
10296
- this.arc(x + radius, y + radius, radius, 0, PI_2);
10297
- this.fill();
10298
- return this;
10299
- }
10300
- drawEllipse(x, y, width, height) {
10301
- const rx = width / 2;
10302
- const ry = height / 2;
10303
- this.ellipse(x + rx, y + ry, rx, ry, 0, 0, PI_2);
10304
- this.fill();
10305
- return this;
10306
- }
10307
- };
10308
- __decorateClass$j([
10309
- proxy()
10310
- ], exports.Graphics2D.prototype, "lineCap", 2);
10311
- __decorateClass$j([
10312
- proxy()
10313
- ], exports.Graphics2D.prototype, "lineJoin", 2);
10314
- __decorateClass$j([
10315
- proxy()
10316
- ], exports.Graphics2D.prototype, "fillStyle", 2);
10317
- __decorateClass$j([
10318
- proxy()
10319
- ], exports.Graphics2D.prototype, "strokeStyle", 2);
10320
- __decorateClass$j([
10321
- proxy()
10322
- ], exports.Graphics2D.prototype, "lineWidth", 2);
10323
- __decorateClass$j([
10324
- proxy()
10325
- ], exports.Graphics2D.prototype, "miterLimit", 2);
10326
- __decorateClass$j([
10327
- proxy({ method: true })
10328
- ], exports.Graphics2D.prototype, "rect", 2);
10329
- __decorateClass$j([
10330
- proxy({ method: true, redraw: true })
10331
- ], exports.Graphics2D.prototype, "fillRect", 2);
10332
- __decorateClass$j([
10333
- proxy({ method: true, redraw: true })
10334
- ], exports.Graphics2D.prototype, "strokeRect", 2);
10335
- __decorateClass$j([
10336
- proxy({ method: true })
10337
- ], exports.Graphics2D.prototype, "roundRect", 2);
10338
- __decorateClass$j([
10339
- proxy({ method: true })
10340
- ], exports.Graphics2D.prototype, "ellipse", 2);
10341
- __decorateClass$j([
10342
- proxy({ method: true })
10343
- ], exports.Graphics2D.prototype, "arc", 2);
10344
- __decorateClass$j([
10345
- proxy({ method: true })
10346
- ], exports.Graphics2D.prototype, "beginPath", 2);
10347
- __decorateClass$j([
10348
- proxy({ method: true })
10349
- ], exports.Graphics2D.prototype, "moveTo", 2);
10350
- __decorateClass$j([
10351
- proxy({ method: true })
10352
- ], exports.Graphics2D.prototype, "lineTo", 2);
10353
- __decorateClass$j([
10354
- proxy({ method: true })
10355
- ], exports.Graphics2D.prototype, "closePath", 2);
10356
- __decorateClass$j([
10357
- proxy({ method: true, redraw: true })
10358
- ], exports.Graphics2D.prototype, "fill", 2);
10359
- __decorateClass$j([
10360
- proxy({ method: true, redraw: true })
10361
- ], exports.Graphics2D.prototype, "stroke", 2);
10362
- exports.Graphics2D = __decorateClass$j([
10363
- customNode("Graphics2D")
10364
- ], exports.Graphics2D);
10365
-
10366
10279
  var __defProp$f = Object.defineProperty;
10367
10280
  var __getOwnPropDesc$h = Object.getOwnPropertyDescriptor;
10368
10281
  var __decorateClass$i = (decorators, target, key, kind) => {
@@ -10374,7 +10287,6 @@ var __decorateClass$i = (decorators, target, key, kind) => {
10374
10287
  return result;
10375
10288
  };
10376
10289
  exports.Image2D = class Image2D extends exports.Element2D {
10377
- texture;
10378
10290
  get currentFrameTexture() {
10379
10291
  return this.texture?.frames[this._frameIndex]?.texture;
10380
10292
  }
@@ -10508,16 +10420,16 @@ exports.Image2D = class Image2D extends exports.Element2D {
10508
10420
  }
10509
10421
  };
10510
10422
  __decorateClass$i([
10511
- protectedProperty()
10423
+ modernIdoc.property({ protected: true })
10512
10424
  ], exports.Image2D.prototype, "texture", 2);
10513
10425
  __decorateClass$i([
10514
- modernIdoc.property({ default: "" })
10426
+ modernIdoc.property({ fallback: "" })
10515
10427
  ], exports.Image2D.prototype, "src", 2);
10516
10428
  __decorateClass$i([
10517
10429
  modernIdoc.property()
10518
10430
  ], exports.Image2D.prototype, "srcRect", 2);
10519
10431
  __decorateClass$i([
10520
- modernIdoc.property({ default: false })
10432
+ modernIdoc.property({ fallback: false })
10521
10433
  ], exports.Image2D.prototype, "gif", 2);
10522
10434
  exports.Image2D = __decorateClass$i([
10523
10435
  customNode("Image2D")
@@ -10594,7 +10506,7 @@ exports.Lottie2D = class Lottie2D extends TextureRect2D {
10594
10506
  }
10595
10507
  };
10596
10508
  __decorateClass$h([
10597
- modernIdoc.property({ default: "" })
10509
+ modernIdoc.property({ fallback: "" })
10598
10510
  ], exports.Lottie2D.prototype, "src", 2);
10599
10511
  exports.Lottie2D = __decorateClass$h([
10600
10512
  customNode("Lottie2D")
@@ -10758,7 +10670,7 @@ exports.Text2D = class Text2D extends TextureRect2D {
10758
10670
  }
10759
10671
  };
10760
10672
  __decorateClass$g([
10761
- modernIdoc.property({ default: false })
10673
+ modernIdoc.property({ fallback: false })
10762
10674
  ], exports.Text2D.prototype, "split", 2);
10763
10675
  __decorateClass$g([
10764
10676
  modernIdoc.property({ alias: "base.content" })
@@ -10767,10 +10679,10 @@ __decorateClass$g([
10767
10679
  modernIdoc.property({ alias: "base.effects" })
10768
10680
  ], exports.Text2D.prototype, "effects", 2);
10769
10681
  __decorateClass$g([
10770
- protectedProperty({ alias: "base.measureDOM" })
10682
+ modernIdoc.property({ protected: true, alias: "base.measureDOM" })
10771
10683
  ], exports.Text2D.prototype, "measureDOM", 2);
10772
10684
  __decorateClass$g([
10773
- protectedProperty({ alias: "base.fonts" })
10685
+ modernIdoc.property({ protected: true, alias: "base.fonts" })
10774
10686
  ], exports.Text2D.prototype, "fonts", 2);
10775
10687
  exports.Text2D = __decorateClass$g([
10776
10688
  customNode("Text2D")
@@ -10829,7 +10741,7 @@ class TransformRect2D extends exports.Element2D {
10829
10741
  }
10830
10742
  }
10831
10743
  __decorateClass$f([
10832
- modernIdoc.property({ default: 6 })
10744
+ modernIdoc.property({ fallback: 6 })
10833
10745
  ], TransformRect2D.prototype, "handleSize");
10834
10746
 
10835
10747
  var __defProp$b = Object.defineProperty;
@@ -10893,7 +10805,7 @@ exports.Video2D = class Video2D extends TextureRect2D {
10893
10805
  }
10894
10806
  };
10895
10807
  __decorateClass$e([
10896
- modernIdoc.property({ default: "" })
10808
+ modernIdoc.property({ fallback: "" })
10897
10809
  ], exports.Video2D.prototype, "src", 2);
10898
10810
  exports.Video2D = __decorateClass$e([
10899
10811
  customNode("Video2D")
@@ -10967,7 +10879,6 @@ const timingFunctions = {
10967
10879
  easeInOut
10968
10880
  };
10969
10881
  exports.Animation = class Animation extends exports.TimelineNode {
10970
- easing;
10971
10882
  _keyframes = [];
10972
10883
  _isFirstUpdatePosition = false;
10973
10884
  _cachedProps = new modernIdoc.RawWeakMap();
@@ -11227,13 +11138,13 @@ exports.Animation = class Animation extends exports.TimelineNode {
11227
11138
  }
11228
11139
  };
11229
11140
  __decorateClass$d([
11230
- modernIdoc.property({ default: "parent" })
11141
+ modernIdoc.property()
11231
11142
  ], exports.Animation.prototype, "effectMode", 2);
11232
11143
  __decorateClass$d([
11233
- modernIdoc.property({ default: false })
11144
+ modernIdoc.property()
11234
11145
  ], exports.Animation.prototype, "loop", 2);
11235
11146
  __decorateClass$d([
11236
- modernIdoc.property({ default: () => [] })
11147
+ modernIdoc.property()
11237
11148
  ], exports.Animation.prototype, "keyframes", 2);
11238
11149
  __decorateClass$d([
11239
11150
  modernIdoc.property()
@@ -12356,9 +12267,6 @@ var __decorateClass$b = (decorators, target, key, kind) => {
12356
12267
  return result;
12357
12268
  };
12358
12269
  exports.AudioWaveform = class AudioWaveform extends exports.Element2D {
12359
- src;
12360
- gap = 0;
12361
- color = "#000000";
12362
12270
  _audioBuffer;
12363
12271
  _src = IN_BROWSER ? new Texture2D(document.createElement("canvas")) : void 0;
12364
12272
  _needsUpdateTexture = false;
@@ -12543,25 +12451,25 @@ exports.Range = class Range extends exports.Control {
12543
12451
  }
12544
12452
  };
12545
12453
  __decorateClass$9([
12546
- modernIdoc.property({ default: false })
12454
+ modernIdoc.property({ fallback: false })
12547
12455
  ], exports.Range.prototype, "allowGreater", 2);
12548
12456
  __decorateClass$9([
12549
- modernIdoc.property({ default: false })
12457
+ modernIdoc.property({ fallback: false })
12550
12458
  ], exports.Range.prototype, "allowLesser", 2);
12551
12459
  __decorateClass$9([
12552
- modernIdoc.property({ default: 1 })
12460
+ modernIdoc.property({ fallback: 1 })
12553
12461
  ], exports.Range.prototype, "page", 2);
12554
12462
  __decorateClass$9([
12555
- modernIdoc.property({ default: 0 })
12463
+ modernIdoc.property({ fallback: 0 })
12556
12464
  ], exports.Range.prototype, "minValue", 2);
12557
12465
  __decorateClass$9([
12558
- modernIdoc.property({ default: 100 })
12466
+ modernIdoc.property({ fallback: 100 })
12559
12467
  ], exports.Range.prototype, "maxValue", 2);
12560
12468
  __decorateClass$9([
12561
- modernIdoc.property({ default: 0.01 })
12469
+ modernIdoc.property({ fallback: 0.01 })
12562
12470
  ], exports.Range.prototype, "step", 2);
12563
12471
  __decorateClass$9([
12564
- modernIdoc.property({ default: 0 })
12472
+ modernIdoc.property({ fallback: 0 })
12565
12473
  ], exports.Range.prototype, "value", 2);
12566
12474
  exports.Range = __decorateClass$9([
12567
12475
  customNode("Range")
@@ -12723,31 +12631,31 @@ exports.Ruler = class Ruler extends exports.Control {
12723
12631
  }
12724
12632
  };
12725
12633
  __decorateClass$8([
12726
- modernIdoc.property({ default: 0 })
12634
+ modernIdoc.property({ fallback: 0 })
12727
12635
  ], exports.Ruler.prototype, "offsetX", 2);
12728
12636
  __decorateClass$8([
12729
- modernIdoc.property({ default: 0 })
12637
+ modernIdoc.property({ fallback: 0 })
12730
12638
  ], exports.Ruler.prototype, "offsetY", 2);
12731
12639
  __decorateClass$8([
12732
- modernIdoc.property({ default: 20 })
12640
+ modernIdoc.property({ fallback: 20 })
12733
12641
  ], exports.Ruler.prototype, "thickness", 2);
12734
12642
  __decorateClass$8([
12735
- modernIdoc.property({ default: 3 })
12643
+ modernIdoc.property({ fallback: 3 })
12736
12644
  ], exports.Ruler.prototype, "markHeight", 2);
12737
12645
  __decorateClass$8([
12738
- modernIdoc.property({ default: "#b2b6bc" })
12646
+ modernIdoc.property({ fallback: "#b2b6bc" })
12739
12647
  ], exports.Ruler.prototype, "color", 2);
12740
12648
  __decorateClass$8([
12741
- modernIdoc.property({ default: "#f9f9fa" })
12649
+ modernIdoc.property({ fallback: "#f9f9fa" })
12742
12650
  ], exports.Ruler.prototype, "markBackgroundColor", 2);
12743
12651
  __decorateClass$8([
12744
- modernIdoc.property({ default: "#b2b6bc" })
12652
+ modernIdoc.property({ fallback: "#b2b6bc" })
12745
12653
  ], exports.Ruler.prototype, "markColor", 2);
12746
12654
  __decorateClass$8([
12747
- modernIdoc.property({ default: 300 })
12655
+ modernIdoc.property({ fallback: 300 })
12748
12656
  ], exports.Ruler.prototype, "gap", 2);
12749
12657
  __decorateClass$8([
12750
- modernIdoc.property({ default: 1 })
12658
+ modernIdoc.property({ fallback: 1 })
12751
12659
  ], exports.Ruler.prototype, "gapScale", 2);
12752
12660
  exports.Ruler = __decorateClass$8([
12753
12661
  customNode("Ruler")
@@ -12820,7 +12728,7 @@ exports.ScrollBar = class ScrollBar extends exports.Range {
12820
12728
  }
12821
12729
  };
12822
12730
  __decorateClass$7([
12823
- modernIdoc.property({ default: "vertical" })
12731
+ modernIdoc.property({ fallback: "vertical" })
12824
12732
  ], exports.ScrollBar.prototype, "direction", 2);
12825
12733
  exports.ScrollBar = __decorateClass$7([
12826
12734
  customNode("ScrollBar")
@@ -12931,13 +12839,13 @@ exports.Scaler = class Scaler extends exports.Node {
12931
12839
  }
12932
12840
  };
12933
12841
  __decorateClass$4([
12934
- modernIdoc.property({ default: 1 })
12842
+ modernIdoc.property()
12935
12843
  ], exports.Scaler.prototype, "value", 2);
12936
12844
  __decorateClass$4([
12937
- modernIdoc.property({ default: 0.05 })
12845
+ modernIdoc.property()
12938
12846
  ], exports.Scaler.prototype, "minValue", 2);
12939
12847
  __decorateClass$4([
12940
- modernIdoc.property({ default: 10 })
12848
+ modernIdoc.property()
12941
12849
  ], exports.Scaler.prototype, "maxValue", 2);
12942
12850
  exports.Scaler = __decorateClass$4([
12943
12851
  customNode("Scaler", {
@@ -14227,7 +14135,6 @@ exports.parseCSSTransform = parseCSSTransform;
14227
14135
  exports.parseCSSTransformOrigin = parseCSSTransformOrigin;
14228
14136
  exports.parseCssFunctions = parseCssFunctions;
14229
14137
  exports.parseCssProperty = parseCssProperty;
14230
- exports.protectedProperty = protectedProperty;
14231
14138
  exports.render = render;
14232
14139
  exports.timingFunctions = timingFunctions;
14233
14140
  exports.uid = uid;