x_ite 16.4.3 → 16.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/README.md +6 -6
  2. package/dist/assets/components/AnnotationComponent.js +1 -1
  3. package/dist/assets/components/AnnotationComponent.min.js +1 -1
  4. package/dist/assets/components/CADGeometryComponent.js +1 -1
  5. package/dist/assets/components/CADGeometryComponent.min.js +1 -1
  6. package/dist/assets/components/CubeMapTexturingComponent.js +2 -2
  7. package/dist/assets/components/CubeMapTexturingComponent.min.js +2 -2
  8. package/dist/assets/components/DISComponent.js +1 -1
  9. package/dist/assets/components/DISComponent.min.js +1 -1
  10. package/dist/assets/components/EventUtilitiesComponent.js +1 -1
  11. package/dist/assets/components/EventUtilitiesComponent.min.js +1 -1
  12. package/dist/assets/components/GaussianSplatsComponent.js +1 -1
  13. package/dist/assets/components/GaussianSplatsComponent.min.js +1 -1
  14. package/dist/assets/components/Geometry2DComponent.js +1 -1
  15. package/dist/assets/components/Geometry2DComponent.min.js +1 -1
  16. package/dist/assets/components/Geometry3DComponent.js +1 -1
  17. package/dist/assets/components/Geometry3DComponent.min.js +1 -1
  18. package/dist/assets/components/GeospatialComponent.js +1 -1
  19. package/dist/assets/components/GeospatialComponent.min.js +1 -1
  20. package/dist/assets/components/HAnimComponent.js +27 -13
  21. package/dist/assets/components/HAnimComponent.min.js +2 -2
  22. package/dist/assets/components/KeyDeviceSensorComponent.js +1 -1
  23. package/dist/assets/components/KeyDeviceSensorComponent.min.js +1 -1
  24. package/dist/assets/components/LayoutComponent.js +1 -1
  25. package/dist/assets/components/LayoutComponent.min.js +1 -1
  26. package/dist/assets/components/NURBSComponent.js +1 -1
  27. package/dist/assets/components/NURBSComponent.min.js +1 -1
  28. package/dist/assets/components/ParticleSystemsComponent.js +1 -1
  29. package/dist/assets/components/ParticleSystemsComponent.min.js +1 -1
  30. package/dist/assets/components/PickingComponent.js +1 -1
  31. package/dist/assets/components/PickingComponent.min.js +1 -1
  32. package/dist/assets/components/RigidBodyPhysicsComponent.js +1 -1
  33. package/dist/assets/components/RigidBodyPhysicsComponent.min.js +1 -1
  34. package/dist/assets/components/ScriptingComponent.js +1 -1
  35. package/dist/assets/components/ScriptingComponent.min.js +1 -1
  36. package/dist/assets/components/TextComponent.js +1 -1
  37. package/dist/assets/components/TextComponent.min.js +1 -1
  38. package/dist/assets/components/TextureProjectionComponent.js +1 -1
  39. package/dist/assets/components/TextureProjectionComponent.min.js +1 -1
  40. package/dist/assets/components/Texturing3DComponent.js +10 -10
  41. package/dist/assets/components/Texturing3DComponent.min.js +2 -2
  42. package/dist/assets/components/VolumeRenderingComponent.js +1 -1
  43. package/dist/assets/components/VolumeRenderingComponent.min.js +1 -1
  44. package/dist/assets/components/WebXRComponent.js +1 -1
  45. package/dist/assets/components/WebXRComponent.min.js +1 -1
  46. package/dist/assets/components/X_ITEComponent.js +1 -1
  47. package/dist/assets/components/X_ITEComponent.min.js +1 -1
  48. package/dist/example.html +1 -1
  49. package/dist/x_ite.css +1 -1
  50. package/dist/x_ite.d.ts +7 -3
  51. package/dist/x_ite.js +511 -458
  52. package/dist/x_ite.min.js +2 -2
  53. package/dist/x_ite.min.mjs +2 -2
  54. package/dist/x_ite.mjs +511 -458
  55. package/dist/x_ite.zip +0 -0
  56. package/package.json +2 -1
package/dist/x_ite.js CHANGED
@@ -1,4 +1,4 @@
1
- /* X_ITE v16.4.3 */
1
+ /* X_ITE v16.5.1 */
2
2
  (function webpackUniversalModuleDefinition(root, factory) {
3
3
  if(typeof exports === 'object' && typeof module === 'object')
4
4
  module.exports = factory();
@@ -12,7 +12,7 @@
12
12
  return /******/ (() => { // webpackBootstrap
13
13
  /******/ var __webpack_modules__ = ({
14
14
 
15
- /***/ 802
15
+ /***/ 971
16
16
  (module, exports) {
17
17
 
18
18
  var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*
@@ -1017,7 +1017,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
1017
1017
 
1018
1018
  /***/ },
1019
1019
 
1020
- /***/ 528
1020
+ /***/ 697
1021
1021
  (module) {
1022
1022
 
1023
1023
  (function webpackUniversalModuleDefinition(root, factory) {
@@ -2013,7 +2013,7 @@ return /******/ (function(modules) { // webpackBootstrap
2013
2013
 
2014
2014
  /***/ },
2015
2015
 
2016
- /***/ 628
2016
+ /***/ 617
2017
2017
  (module) {
2018
2018
 
2019
2019
  /**
@@ -7581,21 +7581,21 @@ Object .assign (Generator .prototype,
7581
7581
 
7582
7582
  return false;
7583
7583
  },
7584
- ImportedName (importedNode)
7584
+ ImportedName (importedNodeInstance)
7585
7585
  {
7586
7586
  const importedNames = this .importedNames .get (this .ExecutionContext ());
7587
7587
 
7588
- if (importedNames .has (importedNode))
7589
- return importedNames .get (importedNode);
7588
+ if (importedNames .has (importedNodeInstance))
7589
+ return importedNames .get (importedNodeInstance);
7590
7590
 
7591
7591
  const
7592
7592
  names = this .names .get (this .ExecutionContext ()),
7593
- newName = getUniqueName (names, importedNode .getImportedName ());
7593
+ newName = getUniqueName (names, importedNodeInstance .getName ());
7594
7594
 
7595
7595
  // Add to indices.
7596
7596
 
7597
7597
  names .add (newName);
7598
- importedNames .set (importedNode, newName);
7598
+ importedNames .set (importedNodeInstance, newName);
7599
7599
 
7600
7600
  return newName;
7601
7601
  },
@@ -7820,7 +7820,7 @@ Object .assign (Object .setPrototypeOf (JSONGenerator .prototype, X3DGenerator .
7820
7820
  },
7821
7821
  RemoveComma ()
7822
7822
  {
7823
- this .string = this .string .replace (/,\s*$/s, "");
7823
+ this .string = this .string .replace (/,\s*$/, "");
7824
7824
  },
7825
7825
  stringProperty (key, value, comma = true)
7826
7826
  {
@@ -8273,14 +8273,14 @@ Object .assign (X3DObject .prototype,
8273
8273
  {
8274
8274
  return this .constructor .typeName;
8275
8275
  },
8276
- setName (value)
8277
- {
8278
- this [_name] = value;
8279
- },
8280
8276
  getName ()
8281
8277
  {
8282
8278
  return this [_name];
8283
8279
  },
8280
+ setName (value)
8281
+ {
8282
+ this [_name] = value;
8283
+ },
8284
8284
  getDisplayName ()
8285
8285
  {
8286
8286
  return this [_name];
@@ -14361,14 +14361,14 @@ const SFNode_handler =
14361
14361
  {
14362
14362
  get (target, key)
14363
14363
  {
14364
- if (typeof key === "string")
14364
+ try
14365
14365
  {
14366
- const
14367
- node = target .getValue (),
14368
- field = node ?.getField (key, false);
14369
-
14370
- if (field)
14366
+ if (typeof key === "string")
14371
14367
  {
14368
+ const
14369
+ node = target .getValue (),
14370
+ field = node ?.getField (key);
14371
+
14372
14372
  // Specification conform would be: `accessType & X3DConstants .outputOnly`.
14373
14373
  // However, we also allow read access to initializeOnly fields.
14374
14374
  if (field .getAccessType () === Base_X3DConstants .inputOnly)
@@ -14377,19 +14377,21 @@ const SFNode_handler =
14377
14377
  return field .valueOf ();
14378
14378
  }
14379
14379
  }
14380
+ catch
14381
+ { }
14380
14382
 
14381
14383
  return Reflect .get (target, key);
14382
14384
  },
14383
14385
  set (target, key, value)
14384
14386
  {
14385
- if (typeof key === "string")
14387
+ try
14386
14388
  {
14387
- const
14388
- node = target .getValue (),
14389
- field = node ?.getField (key, false);
14390
-
14391
- if (field)
14389
+ if (typeof key === "string")
14392
14390
  {
14391
+ const
14392
+ node = target .getValue (),
14393
+ field = node ?.getField (key);
14394
+
14393
14395
  if (field .getAccessType () === Base_X3DConstants .outputOnly)
14394
14396
  return false;
14395
14397
 
@@ -14397,13 +14399,21 @@ const SFNode_handler =
14397
14399
  return true;
14398
14400
  }
14399
14401
  }
14402
+ catch
14403
+ { }
14400
14404
 
14401
14405
  return Reflect .set (target, key, value);
14402
14406
  },
14403
14407
  has (target, key)
14404
14408
  {
14405
- return Boolean (target .getValue () ?.getField (key, false))
14406
- || Reflect .has (target, key);
14409
+ try
14410
+ {
14411
+ return Boolean (target .getValue () ?.getField (key));
14412
+ }
14413
+ catch
14414
+ {
14415
+ return Reflect .has (target, key);
14416
+ }
14407
14417
  },
14408
14418
  ownKeys (target)
14409
14419
  {
@@ -18444,7 +18454,7 @@ Object .assign (Object .setPrototypeOf (X3DBaseNode .prototype, Base_X3DChildObj
18444
18454
  {
18445
18455
  return this [_fieldDefinitions];
18446
18456
  },
18447
- getField (name, _throw = true)
18457
+ getField (name)
18448
18458
  {
18449
18459
  const field = getFieldFromArray (this [_userDefinedFields], name)
18450
18460
  ?? getFieldFromArray (this [_predefinedFields], name);
@@ -18452,8 +18462,7 @@ Object .assign (Object .setPrototypeOf (X3DBaseNode .prototype, Base_X3DChildObj
18452
18462
  if (field)
18453
18463
  return field;
18454
18464
 
18455
- if (_throw)
18456
- throw new Error (`Unknown field '${name}' in node class ${this .getTypeName ()}.`);
18465
+ throw new Error (`Unknown field '${name}' in node class ${this .getTypeName ()}.`);
18457
18466
  },
18458
18467
  getFields ()
18459
18468
  {
@@ -18885,7 +18894,7 @@ const Legacy_default_ = Legacy;
18885
18894
 
18886
18895
  /* harmony default export */ const Browser_Legacy = (x_ite_Namespace .add ("Legacy", Legacy_default_));
18887
18896
  ;// ./src/x_ite/BROWSER_VERSION.js
18888
- const BROWSER_VERSION_default_ = "16.4.3";
18897
+ const BROWSER_VERSION_default_ = "16.5.1";
18889
18898
  ;
18890
18899
 
18891
18900
  /* harmony default export */ const BROWSER_VERSION = (x_ite_Namespace .add ("BROWSER_VERSION", BROWSER_VERSION_default_));
@@ -21398,6 +21407,7 @@ const URLs_default_ = URLs;
21398
21407
 
21399
21408
 
21400
21409
 
21410
+
21401
21411
  const _metaDataCallbacks = Symbol ();
21402
21412
 
21403
21413
  function X3DNode (executionContext)
@@ -21447,17 +21457,19 @@ Object .assign (Object .setPrototypeOf (X3DNode .prototype, Base_X3DBaseNode .pr
21447
21457
  else
21448
21458
  {
21449
21459
  // Make a copy for a X3DPrototypeInstance.
21450
-
21460
+
21451
21461
  const executionContext = instance .getBody ();
21452
21462
 
21453
21463
  // First try to get a named node with the node's name.
21454
21464
 
21455
- if (this .getName () .length)
21465
+ if (this .getName ())
21456
21466
  {
21457
- const namedNode = executionContext .getNamedNodes () .get (this .getName ());
21458
-
21459
- if (namedNode)
21460
- return namedNode .getValue ();
21467
+ try
21468
+ {
21469
+ return executionContext .getLocalNode (this .getName ()) .getValue ();
21470
+ }
21471
+ catch
21472
+ { }
21461
21473
  }
21462
21474
 
21463
21475
  // Create copy.
@@ -21468,7 +21480,7 @@ Object .assign (Object .setPrototypeOf (X3DNode .prototype, Base_X3DBaseNode .pr
21468
21480
  if (this .getNeedsName ())
21469
21481
  this .getExecutionContext () .updateNamedNode (this .getExecutionContext () .getUniqueName (), this);
21470
21482
 
21471
- if (this .getName () .length)
21483
+ if (this .getName ())
21472
21484
  executionContext .updateNamedNode (this .getName (), copy);
21473
21485
 
21474
21486
  // Default fields
@@ -21569,7 +21581,7 @@ Object .assign (Object .setPrototypeOf (X3DNode .prototype, Base_X3DBaseNode .pr
21569
21581
  },
21570
21582
  getNeedsName ()
21571
21583
  {
21572
- if (this .getName () .length)
21584
+ if (this .getName ())
21573
21585
  return false;
21574
21586
 
21575
21587
  if (this .getCloneCount () > 1)
@@ -22295,7 +22307,7 @@ Object .assign (Object .setPrototypeOf (X3DNode .prototype, Base_X3DBaseNode .pr
22295
22307
  if (cdata ?.length === 0)
22296
22308
  cdata = null;
22297
22309
 
22298
- if (!cdata ?.some (string => string .match (/^\s*(?:data|ecmascript|javascript|vrmlscript):/s)))
22310
+ if (!cdata ?.some (string => string .match (/^\s*(?:data|ecmascript|javascript|vrmlscript):/)))
22299
22311
  cdata = null;
22300
22312
 
22301
22313
  generator .IncIndent ();
@@ -22574,7 +22586,7 @@ Object .assign (Object .setPrototypeOf (X3DNode .prototype, Base_X3DBaseNode .pr
22574
22586
  if (sourceText ?.length !== 1)
22575
22587
  sourceText = null;
22576
22588
 
22577
- if (!sourceText ?.some (string => string .match (/^\s*(?:data|ecmascript|javascript|vrmlscript):/s)))
22589
+ if (!sourceText ?.some (string => string .match (/^\s*(?:data|ecmascript|javascript|vrmlscript):/)))
22578
22590
  sourceText = null;
22579
22591
 
22580
22592
  // Predefined fields
@@ -22793,22 +22805,47 @@ Object .assign (Object .setPrototypeOf (X3DNode .prototype, Base_X3DBaseNode .pr
22793
22805
 
22794
22806
  if (executionContext .isScene)
22795
22807
  {
22796
- // Remove exported node if any.
22808
+ // Collect imported nodes in parent context.
22809
+ // This must be done before the exported nodes are removed.
22810
+
22811
+ const
22812
+ parentContext = executionContext .getExecutionContext (),
22813
+ importedNodes = [ ];
22814
+
22815
+ if (parentContext)
22816
+ {
22817
+ for (const importedNode of parentContext .getImportedNodes ())
22818
+ {
22819
+ if (helper.try (() => importedNode .getExportedNode ()) === this)
22820
+ importedNodes .push (importedNode);
22821
+ }
22822
+ }
22823
+
22824
+ // Remove exported nodes if any.
22797
22825
 
22798
22826
  for (const exportedNode of Array .from (executionContext .getExportedNodes ()))
22799
22827
  {
22800
- if (exportedNode .getLocalNode () === this)
22801
- executionContext .removeExportedNode (exportedNode .getExportedName ());
22828
+ if (exportedNode .getLocalNode () !== this)
22829
+ continue;
22830
+
22831
+ executionContext .removeExportedNode (exportedNode .getExportedName ());
22802
22832
  }
22803
22833
 
22804
- // Remove imported node if any.
22834
+ // Update imported node instances in parent context if any.
22835
+ // This must be done after the exported nodes are removed.
22805
22836
 
22806
- const parentContext = executionContext .getExecutionContext ();
22837
+ for (const importedNode of importedNodes)
22838
+ importedNode .getInstance () .update ();
22807
22839
 
22808
- if (parentContext)
22840
+ // Update routes after the exported nodes are removed.
22841
+
22842
+ for (const field of this .getFields ())
22809
22843
  {
22810
- for (const importedNode of parentContext .getImportedNodes ())
22811
- importedNode .getExportedNode () .update ();
22844
+ for (const route of Array .from (field .getInputRoutes ()))
22845
+ route .reconnect ();
22846
+
22847
+ for (const route of Array .from (field .getOutputRoutes ()))
22848
+ route .reconnect ();
22812
22849
  }
22813
22850
  }
22814
22851
 
@@ -23953,146 +23990,121 @@ const NamedNodesArray_default_ = NamedNodesArray;
23953
23990
  ;
23954
23991
 
23955
23992
  /* harmony default export */ const Execution_NamedNodesArray = (x_ite_Namespace .add ("NamedNodesArray", NamedNodesArray_default_));
23956
- ;// ./src/x_ite/Components/Core/X3DImportedNodeProxy.js
23993
+ ;// ./src/x_ite/Components/Core/X3DImportedNodeInstance.js
23957
23994
 
23958
23995
 
23959
23996
 
23960
23997
 
23961
23998
 
23962
- const
23963
- _importedName = Symbol (),
23964
- _importedNode = Symbol (),
23965
- X3DImportedNodeProxy_type = Symbol (),
23966
- _functions = Symbol ();
23999
+ const _importedNode = Symbol ();
23967
24000
 
23968
- const X3DImportedNodeProxy_handler =
24001
+ const X3DImportedNodeInstance_handler =
23969
24002
  {
23970
24003
  get (target, key)
23971
24004
  {
23972
24005
  if (Reflect .has (target, key))
23973
24006
  return Reflect .get (target, key);
23974
24007
 
23975
- const node = target .getSharedNode ();
23976
-
23977
- if (node)
23978
- {
23979
- const property = Reflect .get (node, key);
23980
-
23981
- if (typeof property === "function")
23982
- {
23983
- return target [_functions] .get (key) ?? (() =>
23984
- {
23985
- const func = property .bind (node);
23986
-
23987
- target [_functions] .set (key, func);
24008
+ const exportedNode = helper.try (() => target [_importedNode] .getExportedNode ());
23988
24009
 
23989
- return func;
23990
- })();
23991
- }
23992
-
23993
- return property;
23994
- }
24010
+ if (exportedNode)
24011
+ return Reflect .get (exportedNode, key);
23995
24012
  },
23996
24013
  set (target, key, value)
23997
24014
  {
23998
24015
  if (Reflect .has (target, key))
23999
- {
24000
24016
  return Reflect .set (target, key, value);
24001
- }
24002
- else
24003
- {
24004
- const node = target .getSharedNode ();
24005
24017
 
24006
- if (node)
24007
- return Reflect .set (node, key, value);
24018
+ const exportedNode = helper.try (() => target [_importedNode] .getExportedNode ());
24008
24019
 
24009
- return false;
24010
- }
24020
+ if (exportedNode)
24021
+ return Reflect .set (exportedNode, key, value);
24022
+
24023
+ return false;
24011
24024
  },
24012
24025
  has (target, key)
24013
24026
  {
24027
+ const exportedNode = helper.try (() => target [_importedNode] .getExportedNode ());
24028
+
24014
24029
  return Reflect .has (target, key)
24015
- || Reflect .has (target .getSharedNode () ?? { }, key);
24030
+ || (exportedNode && Reflect .has (exportedNode, key));
24016
24031
  },
24017
24032
  ownKeys (target)
24018
24033
  {
24019
- return Array .from (new Set (Reflect .ownKeys (target)
24020
- .concat (Reflect .ownKeys (target .getSharedNode () ?? { }))));
24034
+ let keys = Reflect .ownKeys (target);
24035
+
24036
+ const exportedNode = helper.try (() => target [_importedNode] .getExportedNode ());
24037
+
24038
+ if (exportedNode)
24039
+ keys = keys .concat (Reflect .ownKeys (exportedNode));
24040
+
24041
+ return Array .from (new Set (keys));
24021
24042
  },
24022
24043
  getOwnPropertyDescriptor (target, key)
24023
24044
  {
24045
+ const exportedNode = helper.try (() => target [_importedNode] .getExportedNode ());
24046
+
24024
24047
  return Reflect .getOwnPropertyDescriptor (target, key)
24025
- ?? Reflect .getOwnPropertyDescriptor (target .getSharedNode () ?? { }, key);
24048
+ ?? (exportedNode && Reflect .getOwnPropertyDescriptor (exportedNode, key));
24026
24049
  },
24027
24050
  };
24028
24051
 
24029
- function X3DImportedNodeProxy (executionContext, importedName, type)
24052
+ function X3DImportedNodeInstance (executionContext, importedNode)
24030
24053
  {
24031
24054
  Core_X3DNode .call (this, executionContext);
24032
24055
 
24033
- const proxy = new Proxy (this, X3DImportedNodeProxy_handler);
24056
+ this .addType (Base_X3DConstants .X3DImportedNodeInstance);
24034
24057
 
24035
- this [_importedName] = importedName;
24036
- this [X3DImportedNodeProxy_type] = type;
24037
- this [_functions] = new Map ();
24058
+ // Private properties
24038
24059
 
24039
- this .setup ();
24060
+ this [_importedNode] = importedNode;
24040
24061
 
24041
- return proxy;
24062
+ // Return Proxy
24063
+
24064
+ return new Proxy (this, X3DImportedNodeInstance_handler);
24042
24065
  }
24043
24066
 
24044
- Object .assign (Object .setPrototypeOf (X3DImportedNodeProxy .prototype, Core_X3DNode .prototype),
24067
+ Object .assign (Object .setPrototypeOf (X3DImportedNodeInstance .prototype, Core_X3DNode .prototype),
24045
24068
  {
24046
24069
  initialize ()
24047
24070
  {
24048
24071
  Core_X3DNode .prototype .initialize .call (this);
24049
24072
 
24050
- this .getExecutionContext () .importedNodes .addInterest ("update", this);
24073
+ this [_importedNode] .getInlineNode () ._loadState .addInterest ("update", this);
24051
24074
 
24052
24075
  this .update ();
24053
24076
  },
24054
- getExtendedEventHandling ()
24077
+ update ()
24055
24078
  {
24056
- return false;
24079
+ if (this [_importedNode] .getInlineNode () .checkLoadState () === Base_X3DConstants .COMPLETE_STATE)
24080
+ helper.try (() => this [_importedNode] .getExportedNode ()) ?.addInterest ("addNodeEvent", this);
24081
+
24082
+ this ._typeName_changed ?.setValue (Date .now () / 1000);
24083
+
24084
+ Base_X3DChildObject .prototype .addEvent .call (this);
24057
24085
  },
24058
- setTypeHint (value)
24086
+ getExtendedEventHandling ()
24059
24087
  {
24060
- this [X3DImportedNodeProxy_type] ??= value;
24088
+ return false;
24061
24089
  },
24062
- getSharedNode ()
24090
+ getInnerNode ()
24063
24091
  {
24064
- return helper.try (() => this [_importedNode] .getSharedNode ()) ?? null;
24092
+ return this [_importedNode] .getExportedNode () .getInnerNode ();
24065
24093
  },
24066
24094
  getImportedNode ()
24067
24095
  {
24068
24096
  return this [_importedNode];
24069
24097
  },
24070
- getInnerNode ()
24071
- {
24072
- return this [_importedNode] .getSharedNode () .getInnerNode ();
24073
- },
24074
24098
  getName ()
24075
24099
  {
24076
- return this [_importedName];
24077
- },
24078
- setName (value)
24079
- {
24080
- this [_importedName] = value;
24081
-
24082
- this ._name_changed ?.setValue (Date .now () / 1000);
24100
+ return this [_importedNode] .getImportedName ();
24083
24101
  },
24084
24102
  ... Object .fromEntries ([
24085
- ["getComponentInfo", "componentInfo"],
24086
- ["getContainerField", "containerField"],
24087
- ["getSpecificationRange", "specificationRange"],
24088
- ["getTypeName", "typeName"],
24089
- ]
24090
- .map (([fn, property]) => [fn, function ()
24091
- {
24092
- return this .getSharedNode () ?.[fn] () ?? this .constructor [property];
24093
- }])),
24094
- ... Object .fromEntries ([
24103
+ "getTypeName",
24095
24104
  "getType",
24105
+ "getComponentInfo",
24106
+ "getContainerField",
24107
+ "getSpecificationRange",
24096
24108
  "getFieldDefinitions",
24097
24109
  "getPredefinedField",
24098
24110
  "getPredefinedFields",
@@ -24106,42 +24118,15 @@ Object .assign (Object .setPrototypeOf (X3DImportedNodeProxy .prototype, Core_X3
24106
24118
  ]
24107
24119
  .map (fn => [fn, function (... args)
24108
24120
  {
24109
- return this .getSharedNode () ?.[fn] (... args) ?? Core_X3DNode .prototype [fn] .call (this, ... args);
24121
+ return helper.try (() => this [_importedNode] .getExportedNode ()) ?.[fn] (... args)
24122
+ ?? Core_X3DNode .prototype [fn] .call (this, ... args);
24110
24123
  }])),
24111
- update ()
24112
- {
24113
- const importedNode = this .getExecutionContext () .getImportedNodes () .get (this [_importedName])
24114
- ?? null;
24115
-
24116
- this [_importedNode] ?.getInlineNode () ._loadState .removeInterest ("set_loadState__", this);
24117
-
24118
- this [_importedNode] = importedNode;
24119
-
24120
- this [_importedNode] ?.getInlineNode () ._loadState .addInterest ("set_loadState__", this);
24121
-
24122
- this .set_loadState__ ();
24123
- },
24124
- set_loadState__ ()
24125
- {
24126
- if (this [_importedNode] ?.getInlineNode () .checkLoadState () === Base_X3DConstants .COMPLETE_STATE)
24127
- {
24128
- const sharedNode = this .getSharedNode ();
24129
-
24130
- this [X3DImportedNodeProxy_type] = sharedNode ?.constructor ?? this [X3DImportedNodeProxy_type];
24131
-
24132
- sharedNode ?.addInterest ("addNodeEvent", this);
24133
- }
24134
-
24135
- this ._typeName_changed ?.setValue (Date .now () / 1000);
24136
-
24137
- Base_X3DChildObject .prototype .addEvent .call (this);
24138
- },
24139
24124
  toVRMLStream (generator)
24140
24125
  {
24141
24126
  generator .CheckSpace ();
24142
24127
  generator .string += "USE";
24143
24128
  generator .Space ();
24144
- generator .string += this [_importedName];
24129
+ generator .string += this [_importedNode] .getImportedName ();
24145
24130
  generator .NeedsSpace ();
24146
24131
  },
24147
24132
  toXMLStream (generator)
@@ -24151,36 +24136,48 @@ Object .assign (Object .setPrototypeOf (X3DImportedNodeProxy .prototype, Core_X3
24151
24136
  if (generator .html && this .getTypeName () === "Script")
24152
24137
  generator .attribute ("type", "model/x3d+xml");
24153
24138
 
24154
- generator .attribute ("USE", this [_importedName]);
24139
+ generator .attribute ("USE", this [_importedNode] .getImportedName ());
24155
24140
  generator .containerField (this .getContainerField ());
24156
24141
  generator .closeTag (this .getTypeName ());
24157
24142
  },
24158
24143
  toJSONStream (generator)
24159
24144
  {
24160
24145
  generator .beginObject (this .getTypeName (), false, true);
24161
- generator .stringProperty ("@USE", this [_importedName], false);
24146
+ generator .stringProperty ("@USE", this [_importedNode] .getImportedName (), false);
24162
24147
  generator .endObject ();
24163
24148
  generator .endObject ();
24164
24149
  },
24165
- });
24166
-
24167
- Object .defineProperties (X3DImportedNodeProxy .prototype,
24168
- {
24169
- constructor:
24150
+ dispose ()
24170
24151
  {
24171
- get ()
24152
+ const executionContext = this .getExecutionContext ();
24153
+
24154
+ for (const route of Array .from (executionContext .getRoutes ()))
24172
24155
  {
24173
- return this [X3DImportedNodeProxy_type] ?? Core_X3DNode;
24174
- },
24175
- }
24156
+ if (route .getSourceNode () === this)
24157
+ {
24158
+ executionContext .deleteRoute (route);
24159
+ continue;
24160
+ }
24161
+
24162
+ if (route .getDestinationNode () === this)
24163
+ {
24164
+ executionContext .deleteRoute (route);
24165
+ continue;
24166
+ }
24167
+ }
24168
+
24169
+ this .getImportedNode () .refreshInstance ();
24170
+
24171
+ Core_X3DNode .prototype .dispose .call (this);
24172
+ },
24176
24173
  });
24177
24174
 
24178
- Object .defineProperties (X3DImportedNodeProxy, Core_X3DNode .getStaticProperties ("X3DImportedNodeProxy", "Core", 2, "children", "4.1"));
24175
+ Object .defineProperties (X3DImportedNodeInstance, Core_X3DNode .getStaticProperties ("X3DImportedNodeInstance", "Core", 2, "children", "4.1"));
24179
24176
 
24180
- const X3DImportedNodeProxy_default_ = X3DImportedNodeProxy;
24177
+ const X3DImportedNodeInstance_default_ = X3DImportedNodeInstance;
24181
24178
  ;
24182
24179
 
24183
- /* harmony default export */ const Core_X3DImportedNodeProxy = (x_ite_Namespace .add ("X3DImportedNodeProxy", X3DImportedNodeProxy_default_));
24180
+ /* harmony default export */ const Core_X3DImportedNodeInstance = (x_ite_Namespace .add ("X3DImportedNodeInstance", X3DImportedNodeInstance_default_));
24184
24181
  ;// ./src/x_ite/Execution/X3DImportedNode.js
24185
24182
 
24186
24183
 
@@ -24190,20 +24187,23 @@ const
24190
24187
  X3DImportedNode_executionContext = Symbol (),
24191
24188
  _inlineNode = Symbol (),
24192
24189
  _exportedName = Symbol (),
24193
- X3DImportedNode_importedName = Symbol (),
24194
- _description = Symbol (),
24195
- _exportedNodes = Symbol ();
24190
+ _importedName = Symbol (),
24191
+ _instance = Symbol (),
24192
+ _description = Symbol ();
24196
24193
 
24197
24194
  function X3DImportedNode (executionContext, inlineNode, exportedName, importedName, description)
24198
24195
  {
24199
24196
  Base_X3DObject .call (this);
24200
24197
 
24198
+ // Private properties
24199
+
24201
24200
  this [X3DImportedNode_executionContext] = executionContext;
24202
24201
  this [_inlineNode] = inlineNode;
24203
24202
  this [_exportedName] = exportedName;
24204
- this [X3DImportedNode_importedName] = importedName;
24203
+ this [_importedName] = importedName;
24205
24204
  this [_description] = description;
24206
- this [_exportedNodes] = executionContext [_exportedNodes] ??= new Map ();
24205
+
24206
+ this .refreshInstance ();
24207
24207
  }
24208
24208
 
24209
24209
  Object .assign (Object .setPrototypeOf (X3DImportedNode .prototype, Base_X3DObject .prototype),
@@ -24220,27 +24220,7 @@ Object .assign (Object .setPrototypeOf (X3DImportedNode .prototype, Base_X3DObje
24220
24220
  {
24221
24221
  return this [_exportedName];
24222
24222
  },
24223
- getExportedNode (type)
24224
- {
24225
- const exportedNode = this [_exportedNodes] .get (this [X3DImportedNode_importedName]);
24226
-
24227
- exportedNode ?.setTypeHint (type);
24228
-
24229
- return exportedNode ?? this .createExportedNode (type);
24230
- },
24231
- createExportedNode (type)
24232
- {
24233
- const exportedNode = new Core_X3DImportedNodeProxy (this .getExecutionContext (), this [X3DImportedNode_importedName], type);
24234
-
24235
- this [_exportedNodes] .set (this [X3DImportedNode_importedName], exportedNode);
24236
-
24237
- return exportedNode;
24238
- },
24239
- updateExportedNode ()
24240
- {
24241
- this [_exportedNodes] .get (this [X3DImportedNode_importedName]) ?.update ();
24242
- },
24243
- getSharedNode ()
24223
+ getExportedNode ()
24244
24224
  {
24245
24225
  const exportedNode = this .getInlineNode () .getInternalScene () .getExportedNodes () .get (this [_exportedName]);
24246
24226
 
@@ -24251,20 +24231,26 @@ Object .assign (Object .setPrototypeOf (X3DImportedNode .prototype, Base_X3DObje
24251
24231
  },
24252
24232
  getImportedName ()
24253
24233
  {
24254
- return this [X3DImportedNode_importedName];
24234
+ return this [_importedName];
24255
24235
  },
24256
- [Symbol .for ("X_ITE.X3DImportedNode.setImportName")] (importedName)
24236
+ setImportName (importedName)
24257
24237
  {
24258
- const
24259
- exportedNode = this .getExportedNode (),
24260
- exportedNodes = this [_exportedNodes];
24238
+ this [_instance] .setName (importedName);
24261
24239
 
24262
- exportedNodes .delete (this [X3DImportedNode_importedName]);
24263
- exportedNodes .set (importedName, exportedNode);
24240
+ this [_importedName] = importedName;
24241
+ },
24242
+ getInstance ()
24243
+ {
24244
+ return this [_instance];
24245
+ },
24246
+ refreshInstance ()
24247
+ {
24248
+ if (this [_instance] && !this [X3DImportedNode_executionContext] .getImportedNodes () .has (this [_importedName]))
24249
+ return;
24264
24250
 
24265
- this [X3DImportedNode_importedName] = importedName;
24251
+ this [_instance] = new Core_X3DImportedNodeInstance (this [X3DImportedNode_executionContext], this);
24266
24252
 
24267
- exportedNode .setName (importedName);
24253
+ this [_instance] .setup ();
24268
24254
  },
24269
24255
  getDescription ()
24270
24256
  {
@@ -24279,9 +24265,9 @@ Object .assign (Object .setPrototypeOf (X3DImportedNode .prototype, Base_X3DObje
24279
24265
  if (!generator .ExistsNode (this .getInlineNode ()))
24280
24266
  throw new Error ("X3DImportedNode.toVRMLStream: Inline node does not exist.");
24281
24267
 
24282
- generator .AddRouteNode (this);
24268
+ generator .AddRouteNode (this .getInstance ());
24283
24269
 
24284
- const importedName = generator .ImportedName (this);
24270
+ const importedName = generator .ImportedName (this .getInstance ());
24285
24271
 
24286
24272
  generator .Indent ();
24287
24273
  generator .string += "IMPORT";
@@ -24313,9 +24299,9 @@ Object .assign (Object .setPrototypeOf (X3DImportedNode .prototype, Base_X3DObje
24313
24299
  if (!generator .ExistsNode (this .getInlineNode ()))
24314
24300
  throw new Error ("X3DImportedNode.toXMLStream: Inline node does not exist.");
24315
24301
 
24316
- generator .AddRouteNode (this);
24302
+ generator .AddRouteNode (this .getInstance ());
24317
24303
 
24318
- const importedName = generator .ImportedName (this);
24304
+ const importedName = generator .ImportedName (this .getInstance ());
24319
24305
 
24320
24306
  generator .openTag ("IMPORT");
24321
24307
  generator .attribute ("inlineDEF", generator .Name (this .getInlineNode ()));
@@ -24337,12 +24323,12 @@ Object .assign (Object .setPrototypeOf (X3DImportedNode .prototype, Base_X3DObje
24337
24323
  generator .TidyBreak ();
24338
24324
  generator .Indent ();
24339
24325
 
24340
- generator .AddRouteNode (this);
24326
+ generator .AddRouteNode (this .getInstance ());
24341
24327
  generator .beginObject ("IMPORT", false, true);
24342
24328
  generator .stringProperty ("@inlineDEF", generator .Name (this .getInlineNode ()), false);
24343
24329
  generator .stringProperty ("@importedDEF", this .getExportedName ());
24344
24330
 
24345
- const importedName = generator .ImportedName (this);
24331
+ const importedName = generator .ImportedName (this .getInstance ());
24346
24332
 
24347
24333
  if (importedName !== this .getExportedName ())
24348
24334
  generator .stringProperty ("@AS", importedName);
@@ -24355,20 +24341,9 @@ Object .assign (Object .setPrototypeOf (X3DImportedNode .prototype, Base_X3DObje
24355
24341
  },
24356
24342
  dispose ()
24357
24343
  {
24358
- for (const route of Array .from (this [X3DImportedNode_executionContext] .getRoutes ()))
24359
- {
24360
- if (route .getSourceNode () === this)
24361
- {
24362
- this [X3DImportedNode_executionContext] .deleteRoute (route);
24363
- continue;
24364
- }
24344
+ this [X3DImportedNode_executionContext] .removeImportedNode (this [_importedName]);
24365
24345
 
24366
- if (route .getDestinationNode () === this)
24367
- {
24368
- this [X3DImportedNode_executionContext] .deleteRoute (route);
24369
- continue;
24370
- }
24371
- }
24346
+ this .instance .dispose ();
24372
24347
 
24373
24348
  Base_X3DObject .prototype .dispose .call (this);
24374
24349
  },
@@ -24405,6 +24380,14 @@ Object .defineProperties (X3DImportedNode .prototype,
24405
24380
  get: X3DImportedNode .prototype .getImportedName,
24406
24381
  enumerable: true,
24407
24382
  },
24383
+ instance:
24384
+ {
24385
+ get ()
24386
+ {
24387
+ return Fields_SFNodeCache .get (this .getInstance ());
24388
+ },
24389
+ enumerable: true,
24390
+ },
24408
24391
  description:
24409
24392
  {
24410
24393
  get: X3DImportedNode .prototype .getDescription,
@@ -24766,11 +24749,14 @@ Object .assign (Object .setPrototypeOf (X3DPrototypeInstance .prototype, Core_X3
24766
24749
 
24767
24750
  this .set_live__ ();
24768
24751
 
24769
- this .importExternProtos (proto .getBody () .externprotos);
24770
- this .importProtos (proto .getBody () .protos);
24771
- this .copyRootNodes (proto .getBody () .rootNodes);
24772
- this .importImportedNodes (proto .getBody () .importedNodes);
24773
- this .copyRoutes (proto .getBody () .routes);
24752
+ const protoBody = proto .getBody ();
24753
+
24754
+ this .addExternProtos (protoBody .externprotos);
24755
+ this .addProtos (protoBody .protos);
24756
+ this .copyNamedNodes (protoBody .namedNodes);
24757
+ this .copyImportedNodes (protoBody .importedNodes);
24758
+ this .copyRootNodes (protoBody .rootNodes);
24759
+ this .copyRoutes (protoBody .routes);
24774
24760
 
24775
24761
  // Propagate events.
24776
24762
 
@@ -25030,20 +25016,25 @@ Object .assign (Object .setPrototypeOf (X3DPrototypeInstance .prototype, Core_X3
25030
25016
 
25031
25017
  return Core_X3DNode .prototype .isDefaultValue .call (this, field);
25032
25018
  },
25033
- importExternProtos (externprotos1)
25019
+ addExternProtos (externprotos1)
25034
25020
  {
25035
25021
  const externprotos2 = this [_body] .externprotos;
25036
25022
 
25037
25023
  for (const externproto of externprotos1)
25038
25024
  externprotos2 .add (externproto .getName (), externproto);
25039
25025
  },
25040
- importProtos (protos1)
25026
+ addProtos (protos1)
25041
25027
  {
25042
25028
  const protos2 = this [_body] .protos;
25043
25029
 
25044
25030
  for (const proto of protos1)
25045
25031
  protos2 .add (proto .getName (), proto);
25046
25032
  },
25033
+ copyNamedNodes (namedNodes)
25034
+ {
25035
+ for (const node of namedNodes)
25036
+ node .copy (this);
25037
+ },
25047
25038
  copyRootNodes (rootNodes1)
25048
25039
  {
25049
25040
  const rootNodes2 = this [_body] .getRootNodes ();
@@ -25051,15 +25042,17 @@ Object .assign (Object .setPrototypeOf (X3DPrototypeInstance .prototype, Core_X3
25051
25042
  for (const node of rootNodes1 .getValue ())
25052
25043
  rootNodes2 .push (node .copy (this));
25053
25044
  },
25054
- importImportedNodes (importedNodes)
25045
+ copyImportedNodes (importedNodes)
25055
25046
  {
25047
+ const body = this [_body];
25048
+
25056
25049
  for (const importedNode of importedNodes)
25057
25050
  {
25058
25051
  try
25059
25052
  {
25060
- const inlineNode = this [_body] .getNamedNode (importedNode .getInlineNode () .getName ());
25053
+ const inlineNode = body .getNamedNode (importedNode .getInlineNode () .getName ());
25061
25054
 
25062
- this [_body] .addImportedNode (inlineNode, importedNode .getExportedName (), importedNode .getImportedName ());
25055
+ body .addImportedNode (inlineNode, importedNode .getExportedName (), importedNode .getImportedName ());
25063
25056
  }
25064
25057
  catch (error)
25065
25058
  {
@@ -25069,19 +25062,17 @@ Object .assign (Object .setPrototypeOf (X3DPrototypeInstance .prototype, Core_X3
25069
25062
  },
25070
25063
  copyRoutes (routes)
25071
25064
  {
25065
+ const body = this [_body];
25066
+
25072
25067
  for (const route of routes)
25073
25068
  {
25074
25069
  try
25075
25070
  {
25076
- const sourceNode = route .getSourceNode () instanceof Core_X3DNode
25077
- ? this [_body] .getLocalNode (route .getSourceNode () .getName ())
25078
- : this [_body] .getLocalNode (route .getSourceNode () .getImportedName ());
25079
-
25080
- const destinationNode = route .getDestinationNode () instanceof Core_X3DNode
25081
- ? this [_body] .getLocalNode (route .getDestinationNode () .getName ())
25082
- : this [_body] .getLocalNode (route .getDestinationNode () .getImportedName ());
25071
+ const
25072
+ sourceNode = body .getLocalNode (route .getSourceNode () .getName ()),
25073
+ destinationNode = body .getLocalNode (route .getDestinationNode () .getName ());
25083
25074
 
25084
- this [_body] .addRoute (sourceNode, route .sourceField, destinationNode, route .destinationField);
25075
+ body .addRoute (sourceNode, route .sourceField, destinationNode, route .destinationField);
25085
25076
  }
25086
25077
  catch (error)
25087
25078
  {
@@ -26033,6 +26024,11 @@ Object .assign (X3DParser .prototype,
26033
26024
 
26034
26025
  return values;
26035
26026
  },
26027
+ checkColorName (color, name)
26028
+ {
26029
+ if (color .every (v => v === 1) && name .toLowerCase () !== "white" && name .match (/^[a-zA-Z]+$/))
26030
+ throw new Error ("Invalid color name.");
26031
+ },
26036
26032
  sanitizeName (name = "")
26037
26033
  {
26038
26034
  // NonIdFirstChar
@@ -26236,7 +26232,7 @@ class Placeholder extends Core_X3DNode
26236
26232
  localNode = this .#namedNodes .get (name) ?? this .#importedNodes .get (name);
26237
26233
 
26238
26234
  const node = localNode instanceof Execution_X3DImportedNode
26239
- ? localNode .getExportedNode (this .#type)
26235
+ ? localNode .getInstance ()
26240
26236
  : localNode;
26241
26237
 
26242
26238
  if (node)
@@ -26346,7 +26342,7 @@ const Grammar = Parser_Expressions ({
26346
26342
 
26347
26343
  // Values
26348
26344
  int32: /(?:0[xX][\da-fA-F]+)|(?:[+-]?\d+)/y,
26349
- double: /[+-]?(?:(?:(?:\d*\.\d+)|(?:\d+(?:\.)?))(?:[eE][+-]?\d+)?)/y,
26345
+ double: /(?!0[xX])[+-]?(?:(?:(?:\d*\.\d+)|(?:\d+(?:\.)?))(?:[eE][+-]?\d+)?)/y,
26350
26346
  doubleQuotes: /"/y,
26351
26347
  noDoubleQuotes: /[^"]+/y,
26352
26348
 
@@ -26448,6 +26444,9 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
26448
26444
  }
26449
26445
  catch (error)
26450
26446
  {
26447
+ if (DEVELOPMENT)
26448
+ console .error (error);
26449
+
26451
26450
  throw new Error (this .getError (error), { cause: error });
26452
26451
  }
26453
26452
  },
@@ -26601,6 +26600,9 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
26601
26600
  }
26602
26601
  catch (error)
26603
26602
  {
26603
+ if (DEVELOPMENT)
26604
+ console .error (error);
26605
+
26604
26606
  throw new Error (this .getError (error), { cause: error });
26605
26607
  }
26606
26608
  })
@@ -26955,11 +26957,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
26955
26957
 
26956
26958
  try
26957
26959
  {
26958
- const localNode = this .getExecutionContext () .getLocalNode (nodeNameId);
26959
-
26960
- return localNode instanceof Execution_X3DImportedNode
26961
- ? localNode .getExportedNode ()
26962
- : localNode .getValue ();
26960
+ return this .getExecutionContext () .getLocalNode (nodeNameId) .getValue ();
26963
26961
  }
26964
26962
  catch
26965
26963
  {
@@ -28000,7 +27998,9 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
28000
27998
 
28001
27999
  if (Grammar .HTMLColor .parse (this))
28002
28000
  {
28003
- const color = this .convertColor (this .result [0] .replace (/0x/i, "#"));
28001
+ const color = this .convertColor (this .result [0] .replace (/^0x/i, "#"));
28002
+
28003
+ this .checkColorName (color, this .result [0]);
28004
28004
 
28005
28005
  field .r = color [0];
28006
28006
  field .g = color [1];
@@ -28033,12 +28033,28 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
28033
28033
 
28034
28034
  return false;
28035
28035
  },
28036
+ sfColor: new x_ite_Fields .SFColor (),
28036
28037
  sfcolorValues (field)
28037
28038
  {
28038
28039
  const array = [ ];
28039
28040
 
28040
- while (this .double ())
28041
- array .push (this .value);
28041
+ for (;;)
28042
+ {
28043
+ if (this .double ())
28044
+ {
28045
+ array .push (this .value);
28046
+ continue;
28047
+ }
28048
+
28049
+ // Try parse HTML/CSS color values.
28050
+ if (this .sfcolorValue (this .sfColor))
28051
+ {
28052
+ array .push (... this .sfColor);
28053
+ continue;
28054
+ }
28055
+
28056
+ break;
28057
+ }
28042
28058
 
28043
28059
  field .setValue (array);
28044
28060
 
@@ -28081,7 +28097,9 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
28081
28097
 
28082
28098
  if (Grammar .HTMLColor .parse (this))
28083
28099
  {
28084
- const color = this .convertColor (this .result [0] .replace (/0x/i, "#"));
28100
+ const color = this .convertColor (this .result [0] .replace (/^0x/i, "#"));
28101
+
28102
+ this .checkColorName (color, this .result [0]);
28085
28103
 
28086
28104
  field .r = color [0];
28087
28105
  field .g = color [1];
@@ -28105,7 +28123,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
28105
28123
 
28106
28124
  if (Grammar .OpenBracket .parse (this))
28107
28125
  {
28108
- this .sfcolorValues (field);
28126
+ this .sfcolorrgbaValues (field);
28109
28127
 
28110
28128
  if (Grammar .CloseBracket .parse (this))
28111
28129
  return true;
@@ -28115,6 +28133,33 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
28115
28133
 
28116
28134
  return false;
28117
28135
  },
28136
+ sfColorRGBA: new x_ite_Fields .SFColorRGBA (),
28137
+ sfcolorrgbaValues (field)
28138
+ {
28139
+ const array = [ ];
28140
+
28141
+ for (;;)
28142
+ {
28143
+ if (this .double ())
28144
+ {
28145
+ array .push (this .value);
28146
+ continue;
28147
+ }
28148
+
28149
+ // Try parse HTML/CSS color values.
28150
+ if (this .sfcolorrgbaValue (this .sfColorRGBA))
28151
+ {
28152
+ array .push (... this .sfColorRGBA);
28153
+ continue;
28154
+ }
28155
+
28156
+ break;
28157
+ }
28158
+
28159
+ field .setValue (array);
28160
+
28161
+ return field .length !== 0;
28162
+ },
28118
28163
  sfdoubleValue (field)
28119
28164
  {
28120
28165
  if (this .double ())
@@ -29885,11 +29930,7 @@ Object .assign (Object .setPrototypeOf (XMLParser .prototype, Parser_X3DParser .
29885
29930
 
29886
29931
  try
29887
29932
  {
29888
- const localNode = this .getExecutionContext () .getLocalNode (name);
29889
-
29890
- const node = localNode instanceof Execution_X3DImportedNode
29891
- ? localNode .getExportedNode (type)
29892
- : localNode .getValue ();
29933
+ const node = this .getExecutionContext () .getLocalNode (name) .getValue ();
29893
29934
 
29894
29935
  this .checkNodeType (node, name, type, typeName);
29895
29936
  this .addNode (xmlElement, node);
@@ -29918,6 +29959,9 @@ Object .assign (Object .setPrototypeOf (XMLParser .prototype, Parser_X3DParser .
29918
29959
  },
29919
29960
  checkNodeType (node, name, type, typeName)
29920
29961
  {
29962
+ if (node instanceof Core_X3DImportedNodeInstance)
29963
+ return;
29964
+
29921
29965
  if (type === Core_X3DNode)
29922
29966
  return;
29923
29967
 
@@ -31192,7 +31236,7 @@ const Plane3_default_ = Plane3;
31192
31236
 
31193
31237
  /* harmony default export */ const Geometry_Plane3 = (x_ite_Namespace .add ("Plane3", Plane3_default_));
31194
31238
  ;// ./src/standard/Math/Geometry/Triangle3.js
31195
- /* provided dependency */ var libtess = __webpack_require__(628);
31239
+ /* provided dependency */ var libtess = __webpack_require__(617);
31196
31240
 
31197
31241
 
31198
31242
  const Triangle3 =
@@ -37886,7 +37930,7 @@ Object .assign (Object .setPrototypeOf (ImageTexture .prototype, Texturing_X3DTe
37886
37930
  {
37887
37931
  fileURL = new URL (fileURL);
37888
37932
 
37889
- if (fileURL .pathname .match (/\.ktx2?(?:\.gz)?$/) || fileURL .href .match (/^\s*data:image\/ktx2[;,]/s))
37933
+ if (fileURL .pathname .match (/\.ktx2?(?:\.gz)?$/) || fileURL .href .match (/^\s*data:image\/ktx2[;,]/))
37890
37934
  {
37891
37935
  this .setLinear (true);
37892
37936
  this .setMipMaps (false);
@@ -42776,10 +42820,14 @@ function eventsProcessed ()
42776
42820
  {
42777
42821
  if (childNode .getType () .at (-1) !== Base_X3DConstants .HAnimJoint)
42778
42822
  {
42779
- const segmentNode = scene .createNode ("HAnimSegment", false);
42823
+ const
42824
+ siteNode = scene .createNode ("HAnimSite", false),
42825
+ segmentNode = scene .createNode ("HAnimSegment", false);
42780
42826
 
42781
- segmentNode ._children .push (childNode);
42827
+ siteNode ._children .push (childNode);
42828
+ segmentNode ._children .push (siteNode);
42782
42829
 
42830
+ siteNode .setup ();
42783
42831
  segmentNode .setup ();
42784
42832
 
42785
42833
  return segmentNode;
@@ -47914,7 +47962,7 @@ const Bezier_default_ = Bezier;
47914
47962
 
47915
47963
  /* harmony default export */ const Algorithms_Bezier = (x_ite_Namespace .add ("Bezier", Bezier_default_));
47916
47964
  ;// ./src/x_ite/Parser/SVGParser.js
47917
- /* provided dependency */ var SVGParser_libtess = __webpack_require__(628);
47965
+ /* provided dependency */ var SVGParser_libtess = __webpack_require__(617);
47918
47966
 
47919
47967
 
47920
47968
 
@@ -50773,9 +50821,15 @@ class GoldenGate extends Parser_X3DParser
50773
50821
  if (string === undefined)
50774
50822
  return;
50775
50823
 
50776
- if (string .match (/^\s*$/s))
50824
+ // An empty string should result in an empty XML (encoding) scene.
50825
+ if (string .match (/^\s*$/))
50777
50826
  return "";
50778
50827
 
50828
+ // XML must start with markup. Do not try DOMParser on other input, because
50829
+ // some browsers (Firefox) log a parsing error to the console when it fails.
50830
+ if (!string .match (/^\s*</))
50831
+ return;
50832
+
50779
50833
  return helper.parseXML (string);
50780
50834
  }
50781
50835
  case "JSON":
@@ -51196,9 +51250,6 @@ class FileLoader
51196
51250
  {
51197
51251
  const scene = new Execution_X3DScene (this .browser);
51198
51252
 
51199
- if (!(this .node instanceof Execution_X3DWorld))
51200
- scene .setExecutionContext (this .executionContext);
51201
-
51202
51253
  scene .setWorldURL (new URL (worldURL, this .getBaseURL ()));
51203
51254
  scene .setup ();
51204
51255
 
@@ -51303,7 +51354,7 @@ class FileLoader
51303
51354
 
51304
51355
  // Script:
51305
51356
  {
51306
- const result = url .match (/^\s*(?:ecmascript|javascript|vrmlscript):/s);
51357
+ const result = url .match (/^\s*(?:ecmascript|javascript|vrmlscript):/);
51307
51358
 
51308
51359
  if (result)
51309
51360
  return await this .dataCallback (url .substring (result [0] .length));
@@ -51314,7 +51365,7 @@ class FileLoader
51314
51365
  // Handle data URLs that are not base64 decoded here:
51315
51366
  if (this .dataAsString)
51316
51367
  {
51317
- const result = url .match (/^\s*data:(.*?)(?:;charset=(.*?))?(?:;(base64))?,/s);
51368
+ const result = url .match (/^\s*data:(.*?)(?:;charset=(.*?))?(?:;(base64))?,/);
51318
51369
 
51319
51370
  if (result && result [3] !== "base64")
51320
51371
  {
@@ -51942,8 +51993,6 @@ const ProtoDeclarationArray_default_ = ProtoDeclarationArray;
51942
51993
 
51943
51994
 
51944
51995
 
51945
-
51946
-
51947
51996
  const
51948
51997
  X3DRoute_executionContext = Symbol (),
51949
51998
  _sourceNode = Symbol (),
@@ -51951,8 +52000,7 @@ const
51951
52000
  _sourceField = Symbol (),
51952
52001
  _destinationNode = Symbol (),
51953
52002
  _destinationFieldName = Symbol (),
51954
- _destinationField = Symbol (),
51955
- _disposed = Symbol ();
52003
+ _destinationField = Symbol ();
51956
52004
 
51957
52005
  function X3DRoute (executionContext, sourceNode, sourceFieldName, destinationNode, destinationFieldName)
51958
52006
  {
@@ -51964,11 +52012,11 @@ function X3DRoute (executionContext, sourceNode, sourceFieldName, destinationNod
51964
52012
  this [_destinationNode] = destinationNode;
51965
52013
  this [_destinationFieldName] = destinationFieldName;
51966
52014
 
51967
- if (sourceNode instanceof Execution_X3DImportedNode)
51968
- sourceNode .getInlineNode () ._loadState .addInterest ("reconnect", this);
52015
+ if (sourceNode instanceof Core_X3DImportedNodeInstance)
52016
+ sourceNode .getImportedNode () .getInlineNode () ._loadState .addInterest ("reconnect", this);
51969
52017
 
51970
- if (destinationNode instanceof Execution_X3DImportedNode)
51971
- destinationNode .getInlineNode () ._loadState .addInterest ("reconnect", this);
52018
+ if (destinationNode instanceof Core_X3DImportedNodeInstance)
52019
+ destinationNode .getImportedNode () .getInlineNode () ._loadState .addInterest ("reconnect", this);
51972
52020
 
51973
52021
  this .reconnect ();
51974
52022
  }
@@ -51979,17 +52027,8 @@ Object .assign (Object .setPrototypeOf (X3DRoute .prototype, Base_X3DObject .pro
51979
52027
  {
51980
52028
  return this [X3DRoute_executionContext];
51981
52029
  },
51982
- getRouteId ()
51983
- {
51984
- return X3DRoute .getRouteId (this [_sourceNode], this [_sourceFieldName], this [_destinationNode], this [_destinationFieldName]);
51985
- },
51986
52030
  getSourceNode ()
51987
52031
  {
51988
- /// SAI
51989
-
51990
- if (this [_sourceNode] instanceof Execution_X3DImportedNode)
51991
- return this [_sourceNode] .getExportedNode ();
51992
-
51993
52032
  return this [_sourceNode];
51994
52033
  },
51995
52034
  getSourceField ()
@@ -52010,11 +52049,6 @@ Object .assign (Object .setPrototypeOf (X3DRoute .prototype, Base_X3DObject .pro
52010
52049
  },
52011
52050
  getDestinationNode ()
52012
52051
  {
52013
- /// SAI
52014
-
52015
- if (this [_destinationNode] instanceof Execution_X3DImportedNode)
52016
- return this [_destinationNode] .getExportedNode ();
52017
-
52018
52052
  return this [_destinationNode];
52019
52053
  },
52020
52054
  getDestinationField ()
@@ -52041,10 +52075,10 @@ Object .assign (Object .setPrototypeOf (X3DRoute .prototype, Base_X3DObject .pro
52041
52075
  }
52042
52076
  catch (error)
52043
52077
  {
52044
- if ((this [_sourceNode] instanceof Core_X3DNode ||
52045
- this [_sourceNode] .getInlineNode () .checkLoadState () === Base_X3DConstants .COMPLETE_STATE) &&
52046
- (this [_destinationNode] instanceof Core_X3DNode ||
52047
- this [_destinationNode] .getInlineNode () .checkLoadState () === Base_X3DConstants .COMPLETE_STATE))
52078
+ if ((!(this [_sourceNode] instanceof Core_X3DImportedNodeInstance) ||
52079
+ this [_sourceNode] .getImportedNode () .getInlineNode () .checkLoadState () === Base_X3DConstants .COMPLETE_STATE) &&
52080
+ (!(this [_destinationNode] instanceof Core_X3DImportedNodeInstance) ||
52081
+ this [_destinationNode] .getImportedNode () .getInlineNode () .checkLoadState () === Base_X3DConstants .COMPLETE_STATE))
52048
52082
  {
52049
52083
  console .warn (error);
52050
52084
  }
@@ -52052,18 +52086,11 @@ Object .assign (Object .setPrototypeOf (X3DRoute .prototype, Base_X3DObject .pro
52052
52086
  },
52053
52087
  connect ()
52054
52088
  {
52055
- if (this [_disposed])
52056
- return;
52057
-
52058
52089
  const errors = [ ];
52059
52090
 
52060
52091
  try
52061
52092
  {
52062
- const sourceNode = this [_sourceNode] instanceof Core_X3DNode
52063
- ? this [_sourceNode]
52064
- : this [_sourceNode] .getExportedNode ();
52065
-
52066
- this [_sourceField] = sourceNode .getField (this [_sourceFieldName]);
52093
+ this [_sourceField] = this [_sourceNode] .getField (this [_sourceFieldName]);
52067
52094
  }
52068
52095
  catch (error)
52069
52096
  {
@@ -52072,11 +52099,7 @@ Object .assign (Object .setPrototypeOf (X3DRoute .prototype, Base_X3DObject .pro
52072
52099
 
52073
52100
  try
52074
52101
  {
52075
- const destinationNode = this [_destinationNode] instanceof Core_X3DNode
52076
- ? this [_destinationNode]
52077
- : this [_destinationNode] .getExportedNode ();
52078
-
52079
- this [_destinationField] = destinationNode .getField (this [_destinationFieldName]);
52102
+ this [_destinationField] = this [_destinationNode] .getField (this [_destinationFieldName]);
52080
52103
  }
52081
52104
  catch (error)
52082
52105
  {
@@ -52115,13 +52138,13 @@ Object .assign (Object .setPrototypeOf (X3DRoute .prototype, Base_X3DObject .pro
52115
52138
  if (!generator .ExistsRouteNode (this [_destinationNode]))
52116
52139
  throw new Error (`Destination node does not exist in scene graph.`);
52117
52140
 
52118
- const sourceNodeName = this [_sourceNode] instanceof Core_X3DNode
52119
- ? generator .Name (this [_sourceNode])
52120
- : generator .ImportedName (this [_sourceNode]);
52141
+ const sourceNodeName = this [_sourceNode] instanceof Core_X3DImportedNodeInstance
52142
+ ? generator .ImportedName (this [_sourceNode])
52143
+ : generator .Name (this [_sourceNode]);
52121
52144
 
52122
- const destinationNodeName = this [_destinationNode] instanceof Core_X3DNode
52123
- ? generator .Name (this [_destinationNode])
52124
- : generator .ImportedName (this [_destinationNode]);
52145
+ const destinationNodeName = this [_destinationNode] instanceof Core_X3DImportedNodeInstance
52146
+ ? generator .ImportedName (this [_destinationNode])
52147
+ : generator .Name (this [_destinationNode]);
52125
52148
 
52126
52149
  generator .Indent ();
52127
52150
  generator .string += "ROUTE";
@@ -52144,13 +52167,13 @@ Object .assign (Object .setPrototypeOf (X3DRoute .prototype, Base_X3DObject .pro
52144
52167
  if (!generator .ExistsRouteNode (this [_destinationNode]))
52145
52168
  throw new Error (`Destination node does not exist in scene graph.`);
52146
52169
 
52147
- const sourceNodeName = this [_sourceNode] instanceof Core_X3DNode
52148
- ? generator .Name (this [_sourceNode])
52149
- : generator .ImportedName (this [_sourceNode]);
52170
+ const sourceNodeName = this [_sourceNode] instanceof Core_X3DImportedNodeInstance
52171
+ ? generator .ImportedName (this [_sourceNode])
52172
+ : generator .Name (this [_sourceNode]);
52150
52173
 
52151
- const destinationNodeName = this [_destinationNode] instanceof Core_X3DNode
52152
- ? generator .Name (this [_destinationNode])
52153
- : generator .ImportedName (this [_destinationNode]);
52174
+ const destinationNodeName = this [_destinationNode] instanceof Core_X3DImportedNodeInstance
52175
+ ? generator .ImportedName (this [_destinationNode])
52176
+ : generator .Name (this [_destinationNode]);
52154
52177
 
52155
52178
  generator .openTag ("ROUTE");
52156
52179
  generator .attribute ("fromNode", sourceNodeName);
@@ -52167,13 +52190,13 @@ Object .assign (Object .setPrototypeOf (X3DRoute .prototype, Base_X3DObject .pro
52167
52190
  if (!generator .ExistsRouteNode (this [_destinationNode]))
52168
52191
  throw new Error (`Destination node does not exist in scene graph.`);
52169
52192
 
52170
- const sourceNodeName = this [_sourceNode] instanceof Core_X3DNode
52171
- ? generator .Name (this [_sourceNode])
52172
- : generator .ImportedName (this [_sourceNode]);
52193
+ const sourceNodeName = this [_sourceNode] instanceof Core_X3DImportedNodeInstance
52194
+ ? generator .ImportedName (this [_sourceNode])
52195
+ : generator .Name (this [_sourceNode]);
52173
52196
 
52174
- const destinationNodeName = this [_destinationNode] instanceof Core_X3DNode
52175
- ? generator .Name (this [_destinationNode])
52176
- : generator .ImportedName (this [_destinationNode]);
52197
+ const destinationNodeName = this [_destinationNode] instanceof Core_X3DImportedNodeInstance
52198
+ ? generator .ImportedName (this [_destinationNode])
52199
+ : generator .Name (this [_destinationNode]);
52177
52200
 
52178
52201
  generator .TidyBreak ();
52179
52202
  generator .Indent ();
@@ -52190,18 +52213,13 @@ Object .assign (Object .setPrototypeOf (X3DRoute .prototype, Base_X3DObject .pro
52190
52213
  },
52191
52214
  dispose ()
52192
52215
  {
52193
- if (this [_disposed])
52194
- return;
52195
-
52196
- this [_disposed] = true;
52197
-
52198
52216
  this .disconnect ();
52199
52217
 
52200
- if (this [_sourceNode] instanceof Execution_X3DImportedNode)
52201
- this [_sourceNode] .getInlineNode () ._loadState .removeInterest ("reconnect", this);
52218
+ if (this [_sourceNode] instanceof Core_X3DImportedNodeInstance)
52219
+ this [_sourceNode] .getImportedNode () .getInlineNode () ._loadState .removeInterest ("reconnect", this);
52202
52220
 
52203
- if (this [_destinationNode] instanceof Execution_X3DImportedNode)
52204
- this [_destinationNode] .getInlineNode () ._loadState .removeInterest ("reconnect", this);
52221
+ if (this [_destinationNode] instanceof Core_X3DImportedNodeInstance)
52222
+ this [_destinationNode] .getImportedNode () .getInlineNode () ._loadState .removeInterest ("reconnect", this);
52205
52223
 
52206
52224
  this [X3DRoute_executionContext] .deleteRoute (this);
52207
52225
 
@@ -52253,36 +52271,6 @@ Object .defineProperties (X3DRoute,
52253
52271
 
52254
52272
  Object .assign (X3DRoute,
52255
52273
  {
52256
- getRouteId (sourceNode, sourceFieldName, destinationNode, destinationFieldName)
52257
- {
52258
- const sourceField = sourceNode instanceof Core_X3DNode
52259
- ? sourceNode .getField (sourceFieldName)
52260
- : helper.try (() => sourceNode .getExportedNode () .getField (sourceFieldName));
52261
-
52262
- const destinationField = destinationNode instanceof Core_X3DNode
52263
- ? destinationNode .getField (destinationFieldName)
52264
- : helper.try (() => destinationNode .getExportedNode () .getField (destinationFieldName));
52265
-
52266
- X3DRoute .checkFields (sourceField, destinationField);
52267
-
52268
- if (sourceField)
52269
- {
52270
- sourceFieldName = sourceField .getName ();
52271
-
52272
- if (sourceField .getAccessType () === Base_X3DConstants .inputOutput)
52273
- sourceFieldName += "_changed";
52274
- }
52275
-
52276
- if (destinationField)
52277
- {
52278
- destinationFieldName = destinationField .getName ();
52279
-
52280
- if (destinationField .getAccessType () === Base_X3DConstants .inputOutput)
52281
- destinationFieldName = "set_" + destinationFieldName;
52282
- }
52283
-
52284
- return `${sourceNode .getId ()}.${sourceFieldName}.${destinationNode .getId ()}.${destinationFieldName}`;
52285
- },
52286
52274
  checkFields (sourceField, destinationField)
52287
52275
  {
52288
52276
  if (sourceField && destinationField)
@@ -52355,6 +52343,7 @@ const RouteArray_default_ = RouteArray;
52355
52343
 
52356
52344
 
52357
52345
 
52346
+
52358
52347
  const
52359
52348
  _outerNode = Symbol (),
52360
52349
  _namedNodes = Symbol (),
@@ -52563,10 +52552,13 @@ Object .assign (Object .setPrototypeOf (X3DExecutionContext .prototype, Base_X3D
52563
52552
  if (!node)
52564
52553
  throw new Error ("Couldn't add named node: node must be of type X3DNode.");
52565
52554
 
52555
+ if (node instanceof Core_X3DImportedNodeInstance)
52556
+ throw new Error ("Couldn't add named node: node cannot be of type X3DImportedNodeInstance.");
52557
+
52566
52558
  if (node .getExecutionContext () !== this)
52567
52559
  throw new Error ("Couldn't add named node: node does not belong to this execution context.");
52568
52560
 
52569
- if (name .length === 0)
52561
+ if (!name)
52570
52562
  throw new Error ("Couldn't add named node: node name is empty.");
52571
52563
 
52572
52564
  if (this [_namedNodes] .has (name))
@@ -52589,10 +52581,13 @@ Object .assign (Object .setPrototypeOf (X3DExecutionContext .prototype, Base_X3D
52589
52581
  if (!node)
52590
52582
  throw new Error ("Couldn't update named node: node must be of type X3DNode.");
52591
52583
 
52584
+ if (node instanceof Core_X3DImportedNodeInstance)
52585
+ throw new Error ("Couldn't add named node: node cannot be of type X3DImportedNodeInstance.");
52586
+
52592
52587
  if (node .getExecutionContext () !== this)
52593
52588
  throw new Error ("Couldn't update named node: node does not belong to this execution context.");
52594
52589
 
52595
- if (name .length === 0)
52590
+ if (!name)
52596
52591
  throw new Error ("Couldn't update named node: node name is empty.");
52597
52592
 
52598
52593
  // Remove named node.
@@ -52661,10 +52656,10 @@ Object .assign (Object .setPrototypeOf (X3DExecutionContext .prototype, Base_X3D
52661
52656
  if (inlineNode .getExecutionContext () !== this)
52662
52657
  throw new Error ("Couldn't update imported node: Inline node does not belong to this execution context.");
52663
52658
 
52664
- if (exportedName .length === 0)
52659
+ if (!exportedName)
52665
52660
  throw new Error ("Couldn't update imported node: exported name is empty.");
52666
52661
 
52667
- if (importedName .length === 0)
52662
+ if (!importedName)
52668
52663
  throw new Error ("Couldn't update imported node: imported name is empty.");
52669
52664
 
52670
52665
  // Update imported node.
@@ -52675,8 +52670,6 @@ Object .assign (Object .setPrototypeOf (X3DExecutionContext .prototype, Base_X3D
52675
52670
 
52676
52671
  this [_importedNodes] .add (importedName, importedNode);
52677
52672
 
52678
- importedNode .updateExportedNode ();
52679
-
52680
52673
  this ._sceneGraph_changed = Date .now () / 1000;
52681
52674
  },
52682
52675
  renameImportedNode (oldImportedName, newImportedName)
@@ -52689,7 +52682,7 @@ Object .assign (Object .setPrototypeOf (X3DExecutionContext .prototype, Base_X3D
52689
52682
  if (this [_importedNodes] .get (newImportedName))
52690
52683
  throw new Error ("Couldn't rename imported node: new imported name does already exists.");
52691
52684
 
52692
- importedNode [Symbol .for ("X_ITE.X3DImportedNode.setImportName")] (newImportedName);
52685
+ importedNode .setImportName (newImportedName);
52693
52686
 
52694
52687
  this [_importedNodes] .update (oldImportedName, newImportedName, importedNode);
52695
52688
 
@@ -52704,10 +52697,10 @@ Object .assign (Object .setPrototypeOf (X3DExecutionContext .prototype, Base_X3D
52704
52697
  if (!importedNode)
52705
52698
  return;
52706
52699
 
52707
- importedNode .dispose ();
52708
-
52709
52700
  this [_importedNodes] .remove (importedName);
52710
52701
 
52702
+ importedNode .dispose ();
52703
+
52711
52704
  this ._sceneGraph_changed = Date .now () / 1000;
52712
52705
  },
52713
52706
  getImportedNode (importedName)
@@ -52717,7 +52710,7 @@ Object .assign (Object .setPrototypeOf (X3DExecutionContext .prototype, Base_X3D
52717
52710
  const importedNode = this [_importedNodes] .get (importedName);
52718
52711
 
52719
52712
  if (importedNode)
52720
- return importedNode .exportedNode;
52713
+ return importedNode .instance;
52721
52714
 
52722
52715
  throw new Error (`Imported node '${importedName}' not found.`);
52723
52716
  },
@@ -52742,7 +52735,7 @@ Object .assign (Object .setPrototypeOf (X3DExecutionContext .prototype, Base_X3D
52742
52735
  const importedNode = this [_importedNodes] .get (name);
52743
52736
 
52744
52737
  if (importedNode)
52745
- return importedNode;
52738
+ return importedNode .instance;
52746
52739
 
52747
52740
  throw new Error (`Unknown named or imported node '${name}'.`);
52748
52741
  }
@@ -52752,28 +52745,19 @@ Object .assign (Object .setPrototypeOf (X3DExecutionContext .prototype, Base_X3D
52752
52745
  * @param {SFNode|X3DNode|X3DImportedNode} node
52753
52746
  * @returns either an X3DImportedNode if possible or X3DNode
52754
52747
  */
52755
- getLocalizedNode (node)
52748
+ getNodeOrImportedNode (node)
52756
52749
  {
52757
- node = Base_X3DCast (Base_X3DConstants .X3DNode, node, false)
52758
- ?? (node instanceof Execution_X3DImportedNode ? node : null);
52750
+ node = Base_X3DCast (Base_X3DConstants .X3DNode, node, false);
52759
52751
 
52760
52752
  if (!node)
52761
52753
  throw new Error ("Couldn't get localized node: node must be of type X3DNode.");
52762
52754
 
52763
- if (node .getExecutionContext () === this)
52764
- {
52765
- if (node instanceof Core_X3DImportedNodeProxy)
52766
- return node .getImportedNode ();
52767
-
52768
- return node;
52769
- }
52770
-
52771
52755
  for (const importedNode of this [_importedNodes])
52772
52756
  {
52773
52757
  try
52774
52758
  {
52775
- if (importedNode .getSharedNode () === node)
52776
- return importedNode;
52759
+ if (importedNode .getExportedNode () === node)
52760
+ return importedNode .getInstance ();
52777
52761
  }
52778
52762
  catch
52779
52763
  { }
@@ -52814,7 +52798,7 @@ Object .assign (Object .setPrototypeOf (X3DExecutionContext .prototype, Base_X3D
52814
52798
  if (this [_protos] .get (proto .getName ()) === proto)
52815
52799
  throw new Error (`Couldn't add proto declaration: proto '${proto .getName ()}' already added.`);
52816
52800
 
52817
- if (name .length === 0)
52801
+ if (!name)
52818
52802
  throw new Error ("Couldn't add proto declaration: proto name is empty.");
52819
52803
 
52820
52804
  if (this [_externprotos] .has (name))
@@ -52838,7 +52822,7 @@ Object .assign (Object .setPrototypeOf (X3DExecutionContext .prototype, Base_X3D
52838
52822
  if (proto .getExecutionContext () !== this)
52839
52823
  throw new Error ("Couldn't update proto declaration: proto does not belong to this execution context.");
52840
52824
 
52841
- if (name .length === 0)
52825
+ if (!name)
52842
52826
  throw new Error ("Couldn't update proto declaration: proto name is empty.");
52843
52827
 
52844
52828
  if (this [_externprotos] .has (name))
@@ -52895,7 +52879,7 @@ Object .assign (Object .setPrototypeOf (X3DExecutionContext .prototype, Base_X3D
52895
52879
  if (this [_externprotos] .get (externproto .getName ()) === externproto)
52896
52880
  throw new Error (`Couldn't add extern proto declaration: extern proto '${externproto .getName ()}' already added.`);
52897
52881
 
52898
- if (name .length === 0)
52882
+ if (!name)
52899
52883
  throw new Error ("Couldn't add extern proto declaration: extern proto name is empty.");
52900
52884
 
52901
52885
  if (this [_protos] .has (name))
@@ -52919,7 +52903,7 @@ Object .assign (Object .setPrototypeOf (X3DExecutionContext .prototype, Base_X3D
52919
52903
  if (externproto .getExecutionContext () !== this)
52920
52904
  throw new Error ("Couldn't update extern proto declaration: extern proto does not belong to this execution context.");
52921
52905
 
52922
- if (name .length === 0)
52906
+ if (!name)
52923
52907
  throw new Error ("Couldn't update extern proto declaration: extern proto name is empty.");
52924
52908
 
52925
52909
  if (this [_protos] .has (name))
@@ -52953,13 +52937,9 @@ Object .assign (Object .setPrototypeOf (X3DExecutionContext .prototype, Base_X3D
52953
52937
  {
52954
52938
  // Normalize arguments.
52955
52939
 
52956
- const
52957
- importedSourceNode = sourceNode instanceof Execution_X3DImportedNode ? sourceNode : null,
52958
- importedDestinationNode = destinationNode instanceof Execution_X3DImportedNode ? destinationNode : null;
52959
-
52960
- sourceNode = Base_X3DCast (Base_X3DConstants .X3DNode, sourceNode, false) ?? importedSourceNode;
52940
+ sourceNode = Base_X3DCast (Base_X3DConstants .X3DNode, sourceNode, false);
52961
52941
  sourceField = String (sourceField);
52962
- destinationNode = Base_X3DCast (Base_X3DConstants .X3DNode, destinationNode, false) ?? importedDestinationNode;
52942
+ destinationNode = Base_X3DCast (Base_X3DConstants .X3DNode, destinationNode, false);
52963
52943
  destinationField = String (destinationField);
52964
52944
 
52965
52945
  // Check nodes.
@@ -52972,14 +52952,11 @@ Object .assign (Object .setPrototypeOf (X3DExecutionContext .prototype, Base_X3D
52972
52952
 
52973
52953
  // Resolve imported source and destination node.
52974
52954
 
52975
- sourceNode = this .getLocalizedNode (sourceNode);
52976
- destinationNode = this .getLocalizedNode (destinationNode);
52955
+ sourceNode = this .getNodeOrImportedNode (sourceNode);
52956
+ destinationNode = this .getNodeOrImportedNode (destinationNode);
52977
52957
 
52978
52958
  // Add route.
52979
-
52980
- const
52981
- id = Routing_X3DRoute .getRouteId (sourceNode, sourceField, destinationNode, destinationField),
52982
- route = this [_routes] .get (id);
52959
+ const route = this .getRoute (sourceNode, sourceField, destinationNode, destinationField);
52983
52960
 
52984
52961
  if (route)
52985
52962
  {
@@ -52989,7 +52966,7 @@ Object .assign (Object .setPrototypeOf (X3DExecutionContext .prototype, Base_X3D
52989
52966
  {
52990
52967
  const route = new Routing_X3DRoute (this, sourceNode, sourceField, destinationNode, destinationField);
52991
52968
 
52992
- this [_routes] .add (id, route);
52969
+ this [_routes] .add (route .getId (), route);
52993
52970
 
52994
52971
  return route;
52995
52972
  }
@@ -53003,25 +52980,21 @@ Object .assign (Object .setPrototypeOf (X3DExecutionContext .prototype, Base_X3D
53003
52980
  if (!(route instanceof Routing_X3DRoute))
53004
52981
  return;
53005
52982
 
53006
- if (this [_routes] .get (route .getRouteId ()) !== route)
52983
+ if (!this .routes .has (route .getId ()))
53007
52984
  return;
53008
52985
 
53009
- this [_routes] .remove (route .getRouteId ());
52986
+ this [_routes] .remove (route .getId ());
53010
52987
 
53011
52988
  route .dispose ();
53012
52989
  },
53013
- getRoute (sourceNode, sourceField, destinationNode, destinationField)
52990
+ getRoute (sourceNode, sourceFieldName, destinationNode, destinationFieldName)
53014
52991
  {
53015
52992
  // Normalize arguments.
53016
52993
 
53017
- const
53018
- importedSourceNode = sourceNode instanceof Execution_X3DImportedNode ? sourceNode : null,
53019
- importedDestinationNode = destinationNode instanceof Execution_X3DImportedNode ? destinationNode : null;
53020
-
53021
- sourceNode = Base_X3DCast (Base_X3DConstants .X3DNode, sourceNode, false) ?? importedSourceNode;
53022
- sourceField = String (sourceField);
53023
- destinationNode = Base_X3DCast (Base_X3DConstants .X3DNode, destinationNode, false) ?? importedDestinationNode;
53024
- destinationField = String (destinationField);
52994
+ sourceNode = Base_X3DCast (Base_X3DConstants .X3DNode, sourceNode, false);
52995
+ sourceFieldName = String (sourceFieldName);
52996
+ destinationNode = Base_X3DCast (Base_X3DConstants .X3DNode, destinationNode, false);
52997
+ destinationFieldName = String (destinationFieldName);
53025
52998
 
53026
52999
  // Check nodes.
53027
53000
 
@@ -53033,12 +53006,69 @@ Object .assign (Object .setPrototypeOf (X3DExecutionContext .prototype, Base_X3D
53033
53006
 
53034
53007
  // Resolve imported source and destination node.
53035
53008
 
53036
- sourceNode = this .getLocalizedNode (sourceNode);
53037
- destinationNode = this .getLocalizedNode (destinationNode);
53009
+ sourceNode = this .getNodeOrImportedNode (sourceNode);
53010
+ destinationNode = this .getNodeOrImportedNode (destinationNode);
53011
+
53012
+ // Get fields if possible.
53013
+
53014
+ const sourceField = sourceNode instanceof Core_X3DImportedNodeInstance
53015
+ ? helper.try (() => sourceNode .getField (sourceFieldName))
53016
+ : sourceNode .getField (sourceFieldName);
53017
+
53018
+ const destinationField = destinationNode instanceof Core_X3DImportedNodeInstance
53019
+ ? helper.try (() => destinationNode .getField (destinationFieldName))
53020
+ : destinationNode .getField (destinationFieldName);
53021
+
53022
+ Routing_X3DRoute .checkFields (sourceField, destinationField);
53038
53023
 
53039
53024
  // Return route.
53040
53025
 
53041
- return this [_routes] .get (Routing_X3DRoute .getRouteId (sourceNode, sourceField, destinationNode, destinationField));
53026
+ return this [_routes] .find (route =>
53027
+ {
53028
+ if (route .getSourceNode () !== sourceNode)
53029
+ return false;
53030
+
53031
+ if (route .getDestinationNode () !== destinationNode)
53032
+ return false;
53033
+
53034
+ if (sourceField)
53035
+ {
53036
+ if (helper.try (() => sourceNode .getField (route .getSourceField ())) !== sourceField)
53037
+ return false;
53038
+ }
53039
+ else
53040
+ {
53041
+ if (sourceNode instanceof Core_X3DImportedNodeInstance)
53042
+ {
53043
+ if (route .getSourceField () !== sourceFieldName)
53044
+ return false;
53045
+ }
53046
+ else
53047
+ {
53048
+ return false;
53049
+ }
53050
+ }
53051
+
53052
+ if (destinationField)
53053
+ {
53054
+ if (helper.try (() => destinationNode .getField (route .getDestinationField ())) !== destinationField)
53055
+ return false;
53056
+ }
53057
+ else
53058
+ {
53059
+ if (destinationNode instanceof Core_X3DImportedNodeInstance)
53060
+ {
53061
+ if (route .getDestinationField () !== destinationFieldName)
53062
+ return false;
53063
+ }
53064
+ else
53065
+ {
53066
+ return false;
53067
+ }
53068
+ }
53069
+
53070
+ return true;
53071
+ });
53042
53072
  },
53043
53073
  getRoutes ()
53044
53074
  {
@@ -53604,6 +53634,12 @@ Object .assign (Object .setPrototypeOf (X3DExportedNode .prototype, Base_X3DObje
53604
53634
  generator .endObject ();
53605
53635
  generator .endObject ();
53606
53636
  },
53637
+ dispose ()
53638
+ {
53639
+ this [X3DExportedNode_executionContext] .removeExportedNode (this [X3DExportedNode_exportedName]);
53640
+
53641
+ Base_X3DObject .prototype .dispose .call (this);
53642
+ },
53607
53643
  });
53608
53644
 
53609
53645
  for (const key of Object .keys (X3DExportedNode .prototype))
@@ -53694,6 +53730,7 @@ const LATEST_VERSION_default_ = "4.1";
53694
53730
 
53695
53731
 
53696
53732
 
53733
+
53697
53734
  const
53698
53735
  _specificationVersion = Symbol (),
53699
53736
  _encoding = Symbol (),
@@ -53702,7 +53739,7 @@ const
53702
53739
  _worldURL = Symbol (),
53703
53740
  _units = Symbol (),
53704
53741
  _metadata = Symbol (),
53705
- X3DScene_exportedNodes = Symbol (),
53742
+ _exportedNodes = Symbol (),
53706
53743
  _loadingObjects = Symbol ();
53707
53744
 
53708
53745
  function X3DScene (browser)
@@ -53734,12 +53771,12 @@ function X3DScene (browser)
53734
53771
  this [_units] .add ("mass", new Configuration_UnitInfo ("mass", "kilogram", 1));
53735
53772
 
53736
53773
  this [_metadata] = [ ];
53737
- this [X3DScene_exportedNodes] = new Execution_ExportedNodesArray ();
53774
+ this [_exportedNodes] = new Execution_ExportedNodesArray ();
53738
53775
  this [_loadingObjects] = new Set ();
53739
53776
 
53740
53777
  this [_components] .addParent (this);
53741
53778
  this [_units] .addParent (this);
53742
- this [X3DScene_exportedNodes] .addParent (this);
53779
+ this [_exportedNodes] .addParent (this);
53743
53780
  }
53744
53781
 
53745
53782
  Object .assign (Object .setPrototypeOf (X3DScene .prototype, Execution_X3DExecutionContext .prototype),
@@ -53795,7 +53832,7 @@ Object .assign (Object .setPrototypeOf (X3DScene .prototype, Execution_X3DExecut
53795
53832
  hasComponent (name, level = 0)
53796
53833
  {
53797
53834
  if (name instanceof Configuration_ComponentInfo)
53798
- var { name, level } = name;
53835
+ ({ name, level } = name);
53799
53836
 
53800
53837
  const
53801
53838
  browser = this .getBrowser (),
@@ -53966,7 +54003,7 @@ Object .assign (Object .setPrototypeOf (X3DScene .prototype, Execution_X3DExecut
53966
54003
  {
53967
54004
  exportedName = String (exportedName);
53968
54005
 
53969
- if (this [X3DScene_exportedNodes] .has (exportedName))
54006
+ if (this [_exportedNodes] .has (exportedName))
53970
54007
  throw new Error (`Couldn't add exported node: exported name '${exportedName}' already in use.`);
53971
54008
 
53972
54009
  this .updateExportedNode (exportedName, node, description);
@@ -53979,18 +54016,21 @@ Object .assign (Object .setPrototypeOf (X3DScene .prototype, Execution_X3DExecut
53979
54016
  node = Base_X3DCast (Base_X3DConstants .X3DNode, node, false);
53980
54017
  description = String (description);
53981
54018
 
53982
- if (exportedName .length === 0)
53983
- throw new Error ("Couldn't update exported node: node exported name is empty.");
53984
-
53985
54019
  if (!node)
53986
54020
  throw new Error ("Couldn't update exported node: node must be of type X3DNode.");
53987
54021
 
53988
- //if (node .getExecutionContext () !== this)
53989
- // throw new Error ("Couldn't update exported node: node does not belong to this execution context.");
54022
+ if (node instanceof Core_X3DImportedNodeInstance)
54023
+ throw new Error ("Couldn't update exported node: node cannot be of type X3DImportedNodeInstance.");
54024
+
54025
+ if (node .getExecutionContext () !== this)
54026
+ throw new Error ("Couldn't update exported node: node does not belong to this execution context.");
54027
+
54028
+ if (!exportedName)
54029
+ throw new Error ("Couldn't update exported node: node exported name is empty.");
53990
54030
 
53991
54031
  const exportedNode = new Execution_X3DExportedNode (this, exportedName, node, description);
53992
54032
 
53993
- this [X3DScene_exportedNodes] .update (exportedName, exportedName, exportedNode);
54033
+ this [_exportedNodes] .update (exportedName, exportedName, exportedNode);
53994
54034
 
53995
54035
  this ._sceneGraph_changed = Date .now () / 1000;
53996
54036
  },
@@ -53998,7 +54038,14 @@ Object .assign (Object .setPrototypeOf (X3DScene .prototype, Execution_X3DExecut
53998
54038
  {
53999
54039
  exportedName = String (exportedName);
54000
54040
 
54001
- this [X3DScene_exportedNodes] .remove (exportedName);
54041
+ const exportedNode = this [_exportedNodes] .get (exportedName);
54042
+
54043
+ if (!exportedNode)
54044
+ return;
54045
+
54046
+ this [_exportedNodes] .remove (exportedName);
54047
+
54048
+ exportedNode .dispose ();
54002
54049
 
54003
54050
  this ._sceneGraph_changed = Date .now () / 1000;
54004
54051
  },
@@ -54006,7 +54053,7 @@ Object .assign (Object .setPrototypeOf (X3DScene .prototype, Execution_X3DExecut
54006
54053
  {
54007
54054
  exportedName = String (exportedName);
54008
54055
 
54009
- const exportedNode = this [X3DScene_exportedNodes] .get (exportedName);
54056
+ const exportedNode = this [_exportedNodes] .get (exportedName);
54010
54057
 
54011
54058
  if (exportedNode)
54012
54059
  return exportedNode .localNode;
@@ -54015,15 +54062,16 @@ Object .assign (Object .setPrototypeOf (X3DScene .prototype, Execution_X3DExecut
54015
54062
  },
54016
54063
  getExportedNodes ()
54017
54064
  {
54018
- return this [X3DScene_exportedNodes];
54065
+ return this [_exportedNodes];
54019
54066
  },
54020
54067
  getUniqueExportName (name)
54021
54068
  {
54022
- return getUniqueName (this [X3DScene_exportedNodes], name);
54069
+ return getUniqueName (this [_exportedNodes], name);
54023
54070
  },
54024
54071
  addRootNode (node)
54025
54072
  {
54026
- node = Fields_SFNodeCache .get (Base_X3DCast (Base_X3DConstants .X3DNode, node, false));
54073
+ node = Base_X3DCast (Base_X3DConstants .X3DNode, node, false);
54074
+ node &&= Fields_SFNodeCache .get (node);
54027
54075
 
54028
54076
  const rootNodes = this .getRootNodes ();
54029
54077
 
@@ -54034,7 +54082,8 @@ Object .assign (Object .setPrototypeOf (X3DScene .prototype, Execution_X3DExecut
54034
54082
  },
54035
54083
  removeRootNode (node)
54036
54084
  {
54037
- node = Fields_SFNodeCache .get (Base_X3DCast (Base_X3DConstants .X3DNode, node, false));
54085
+ node = Base_X3DCast (Base_X3DConstants .X3DNode, node, false);
54086
+ node &&= Fields_SFNodeCache .get (node);
54038
54087
 
54039
54088
  const rootNodes = this .getRootNodes ();
54040
54089
 
@@ -54295,7 +54344,7 @@ Object .assign (Object .setPrototypeOf (X3DScene .prototype, Execution_X3DExecut
54295
54344
 
54296
54345
  generator .endArray ();
54297
54346
 
54298
- headLastProperty = true;
54347
+ // headLastProperty = true;
54299
54348
  }
54300
54349
 
54301
54350
  // Head end
@@ -54624,6 +54673,7 @@ Fonts_add ("PT_Sans/PTSans-Italic.woff2", false, true);
54624
54673
 
54625
54674
 
54626
54675
 
54676
+
54627
54677
  const
54628
54678
  _instanceId = Symbol (),
54629
54679
  _element = Symbol (),
@@ -54687,7 +54737,9 @@ function X3DCoreContext (element)
54687
54737
  {
54688
54738
  const link = document .createElement ("link");
54689
54739
 
54690
- link .integrity = "sha384-r+Z33c1QviLoOgodJzYHRhRIxsvRFnZVj3GbeoohZ//iR51ZK8cK/Jq4mcMi8WV6";
54740
+ if (!DEVELOPMENT)
54741
+ link .integrity = "sha384-VPxo0vBo7nOYn5iBj9X6adcmFfaP8csYQCFin8ZxqaXZgqdt2cZzgydvtXxB0JTm";
54742
+
54691
54743
  link .rel = "stylesheet";
54692
54744
  link .crossOrigin = "anonymous";
54693
54745
  link .onload = resolve;
@@ -65682,6 +65734,7 @@ const
65682
65734
  _defaultFramebuffer = Symbol (),
65683
65735
  _textureBuffers = Symbol (),
65684
65736
  _resizer = Symbol (),
65737
+ _traverse = Symbol .for ("X_ITE.X3DBrowserContext.traverse"),
65685
65738
  _localObjects = Symbol (),
65686
65739
  _fullscreenArray = Symbol (),
65687
65740
  _fullscreenBuffer = Symbol (),
@@ -65726,12 +65779,7 @@ Object .assign (X3DRenderingContext .prototype,
65726
65779
 
65727
65780
  helper.on (this, window, "orientationchange", () => this .reshape ());
65728
65781
 
65729
- this [_resizer] = new ResizeObserver (() =>
65730
- {
65731
- this .reshape ();
65732
-
65733
- this [Symbol .for ("X_ITE.X3DBrowserContext.traverse")] (performance .now ());
65734
- });
65782
+ this [_resizer] = new ResizeObserver (() => this .reshape ());
65735
65783
 
65736
65784
  this [_resizer] .observe (this .getSurface ());
65737
65785
 
@@ -66008,6 +66056,9 @@ Object .assign (X3DRenderingContext .prototype,
66008
66056
 
66009
66057
  this .reshapeFramebuffer (0, 0, 0, width, height);
66010
66058
 
66059
+ if (this .getWorld ())
66060
+ this [_traverse] (-1);
66061
+
66011
66062
  this .addBrowserEvent ();
66012
66063
  },
66013
66064
  limitFramebufferSize (width, height)
@@ -72701,14 +72752,14 @@ Object .assign (X3DTimeContext .prototype,
72701
72752
  {
72702
72753
  const lastPosition = new Numbers_Vector3 ();
72703
72754
 
72704
- return function ()
72755
+ return function (checkFrameRate)
72705
72756
  {
72706
72757
  const
72707
72758
  time = Date .now () / 1000,
72708
72759
  interval = time - this [_lastTime],
72709
72760
  viewpointNode = this .getActiveViewpoint ();
72710
72761
 
72711
- if (interval <= 1 / Math .max (this .getBrowserOption ("MaximumFrameRate"), 1))
72762
+ if (checkFrameRate && interval <= 1 / Math .max (this .getBrowserOption ("MaximumFrameRate"), 1))
72712
72763
  return false;
72713
72764
 
72714
72765
  this [_lastTime] = time;
@@ -72950,7 +73001,7 @@ const ConcreteNodes_default_ = new Configuration_ConcreteNodesArray ();
72950
73001
  const
72951
73002
  _world = Symbol (),
72952
73003
  X3DBrowserContext_tainted = Symbol (),
72953
- _traverse = Symbol .for ("X_ITE.X3DBrowserContext.traverse"),
73004
+ X3DBrowserContext_traverse = Symbol .for ("X_ITE.X3DBrowserContext.traverse"),
72954
73005
  _renderCallback = Symbol (),
72955
73006
  _animFrame = Symbol (),
72956
73007
  _previousTime = Symbol (),
@@ -73006,7 +73057,7 @@ function X3DBrowserContext (element)
73006
73057
 
73007
73058
  this [X3DBrowserContext_tainted] = false;
73008
73059
  this [_previousTime] = 0;
73009
- this [_renderCallback] = this [_traverse] .bind (this);
73060
+ this [_renderCallback] = this [X3DBrowserContext_traverse] .bind (this);
73010
73061
  this [_systemTime] = new Time_StopWatch ();
73011
73062
  this [_browserTime] = new Time_StopWatch ();
73012
73063
  this [_cameraTime] = new Time_StopWatch ();
@@ -73117,13 +73168,15 @@ Object .assign (Object .setPrototypeOf (X3DBrowserContext .prototype, Base_X3DBa
73117
73168
  this .addBrowserEvent ();
73118
73169
  });
73119
73170
  },
73120
- [_traverse] (now, frame)
73171
+ [X3DBrowserContext_traverse] (now, frame)
73121
73172
  {
73122
73173
  // Limit frame rate.
73123
73174
 
73124
73175
  this [X3DBrowserContext_tainted] = false;
73125
73176
 
73126
- if (!this .advanceTime ())
73177
+ // If now is negative, don't check framerate.
73178
+ // Now can be negative when reshape is called.
73179
+ if (!this .advanceTime (now >= 0))
73127
73180
  {
73128
73181
  this .addBrowserEvent ();
73129
73182
  return;
@@ -74891,7 +74944,7 @@ const CoreComponent_default_ = {
74891
74944
  [
74892
74945
  Core_X3DBindableNode,
74893
74946
  Core_X3DChildNode,
74894
- Core_X3DImportedNodeProxy,
74947
+ Core_X3DImportedNodeInstance,
74895
74948
  Core_X3DInfoNode,
74896
74949
  Core_X3DMetadataObject,
74897
74950
  Core_X3DNode,
@@ -91560,8 +91613,8 @@ const PNGMedia_default_ = PNGMedia;
91560
91613
 
91561
91614
  /* harmony default export */ const Texturing_PNGMedia = (x_ite_Namespace .add ("PNGMedia", PNGMedia_default_));
91562
91615
  ;// ./src/x_ite/Components/Texturing/MovieTexture.js
91563
- /* provided dependency */ var SuperGif = __webpack_require__(802);
91564
- /* provided dependency */ var APNG = __webpack_require__(528);
91616
+ /* provided dependency */ var SuperGif = __webpack_require__(971);
91617
+ /* provided dependency */ var APNG = __webpack_require__(697);
91565
91618
 
91566
91619
 
91567
91620
 
@@ -91634,7 +91687,7 @@ Object .assign (Object .setPrototypeOf (MovieTexture .prototype, Texturing_X3DTe
91634
91687
 
91635
91688
  try
91636
91689
  {
91637
- if (fileURL .pathname .endsWith (".gif") || fileURL .href .match (/^\s*data:image\/gif[;,]/s))
91690
+ if (fileURL .pathname .endsWith (".gif") || fileURL .href .match (/^\s*data:image\/gif[;,]/))
91638
91691
  {
91639
91692
  const
91640
91693
  data = await this .loadDocument (fileURL),
@@ -91653,7 +91706,7 @@ Object .assign (Object .setPrototypeOf (MovieTexture .prototype, Texturing_X3DTe
91653
91706
  this .setGif (gif);
91654
91707
  return;
91655
91708
  }
91656
- else if (fileURL .pathname .endsWith (".png") || fileURL .href .match (/^\s*data:image\/png[;,]/s))
91709
+ else if (fileURL .pathname .endsWith (".png") || fileURL .href .match (/^\s*data:image\/png[;,]/))
91657
91710
  {
91658
91711
  const
91659
91712
  data = await this .loadDocument (fileURL),
@@ -92912,7 +92965,7 @@ const Components_default_ = Components;
92912
92965
 
92913
92966
  /* eslint no-undef: "off"
92914
92967
  --------
92915
- no-undef: global variable is used here for use in node projects.
92968
+ no-undef: node `global` variable is used here for use in node projects.
92916
92969
  */
92917
92970
 
92918
92971
  const
@@ -94205,7 +94258,7 @@ const QuickSort_default_ = QuickSort;
94205
94258
 
94206
94259
  /* harmony default export */ const Algorithms_QuickSort = (x_ite_Namespace .add ("QuickSort", QuickSort_default_));
94207
94260
  ;// ./src/lib/libtess.js
94208
- /* provided dependency */ var libtess_libtess = __webpack_require__(628);
94261
+ /* provided dependency */ var libtess_libtess = __webpack_require__(617);
94209
94262
  const libtess_default_ = libtess_libtess;
94210
94263
  ;
94211
94264