modern-canvas 0.5.2 → 0.6.2

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