x_ite 16.4.1 → 16.4.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.
Files changed (57) 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 +1 -1
  7. package/dist/assets/components/CubeMapTexturingComponent.min.js +1 -1
  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 +1 -1
  21. package/dist/assets/components/HAnimComponent.min.js +1 -1
  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 +7 -39
  25. package/dist/assets/components/LayoutComponent.min.js +2 -2
  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 +8 -12
  31. package/dist/assets/components/PickingComponent.min.js +2 -2
  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 +17 -21
  37. package/dist/assets/components/TextComponent.min.js +2 -2
  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 +9 -9
  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 +3 -3
  45. package/dist/assets/components/WebXRComponent.min.js +2 -2
  46. package/dist/assets/components/X_ITEComponent.js +1 -1
  47. package/dist/assets/components/X_ITEComponent.min.js +1 -1
  48. package/dist/assets/lib/meshopt_decoder.js +1 -1
  49. package/dist/example.html +1 -1
  50. package/dist/x_ite.css +1 -1
  51. package/dist/x_ite.d.ts +8 -4
  52. package/dist/x_ite.js +199 -199
  53. package/dist/x_ite.min.js +2 -2
  54. package/dist/x_ite.min.mjs +2 -2
  55. package/dist/x_ite.mjs +199 -199
  56. package/dist/x_ite.zip +0 -0
  57. package/package.json +6 -6
package/dist/x_ite.js CHANGED
@@ -1,4 +1,4 @@
1
- /* X_ITE v16.4.1 */
1
+ /* X_ITE v16.4.2 */
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
- /***/ 16
15
+ /***/ 8
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
- /***/ 698
1020
+ /***/ 618
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
- /***/ 402
2016
+ /***/ 362
2017
2017
  (module) {
2018
2018
 
2019
2019
  /**
@@ -18232,12 +18232,6 @@ function X3DBaseNode (executionContext, browser = executionContext .getBrowser (
18232
18232
 
18233
18233
  for (const fieldDefinition of this [_fieldDefinitions])
18234
18234
  this .addPredefinedField (fieldDefinition);
18235
-
18236
- // Create events.
18237
-
18238
- this .addChildObjects (Base_X3DConstants .outputOnly, "name_changed", new x_ite_Fields .SFTime (),
18239
- Base_X3DConstants .outputOnly, "typeName_changed", new x_ite_Fields .SFTime (),
18240
- Base_X3DConstants .outputOnly, "parents_changed", new x_ite_Fields .SFTime ());
18241
18235
  }
18242
18236
 
18243
18237
  Object .assign (Object .setPrototypeOf (X3DBaseNode .prototype, Base_X3DChildObject .prototype),
@@ -18247,7 +18241,7 @@ Object .assign (Object .setPrototypeOf (X3DBaseNode .prototype, Base_X3DChildObj
18247
18241
  {
18248
18242
  Base_X3DChildObject .prototype .setName .call (this, value);
18249
18243
 
18250
- this ._name_changed = Date .now () / 1000;
18244
+ this ._name_changed ?.setValue (Date .now () / 1000);
18251
18245
  },
18252
18246
  getBrowser ()
18253
18247
  {
@@ -18338,37 +18332,30 @@ Object .assign (Object .setPrototypeOf (X3DBaseNode .prototype, Base_X3DChildObj
18338
18332
  /// Sets the own live state of this node. Setting the live state to false
18339
18333
  /// temporarily disables this node completely.
18340
18334
 
18341
- this [_live] = !!value .valueOf ();
18335
+ value = !! value .valueOf ();
18336
+
18337
+ if (this [_live] === value)
18338
+ return;
18339
+
18340
+ this [_live] = value;
18342
18341
 
18343
18342
  this [_set_live__] ();
18344
18343
  },
18345
- getLive: (() =>
18344
+ getLive ()
18346
18345
  {
18347
- function getLive ()
18348
- {
18349
- return this ._live;
18350
- }
18346
+ /// Returns the live event of this node.
18351
18347
 
18352
- return function ()
18348
+ if (!this ._live)
18353
18349
  {
18354
- /// Returns the live event of this node.
18355
-
18356
- // Change function.
18357
-
18358
- Object .defineProperty (this, "getLive",
18359
- {
18360
- value: getLive,
18361
- configurable: true,
18362
- });
18363
-
18364
18350
  // Add isLive event.
18365
18351
 
18366
- this .addChildObjects (Base_X3DConstants .outputOnly, "live", new x_ite_Fields .SFBool (this .checkLiveState ()));
18352
+ this .addChildObject (Base_X3DConstants .outputOnly, "live", new x_ite_Fields .SFBool (this .checkLiveState ()));
18367
18353
 
18368
18354
  // Event processing is done manually and immediately, so:
18355
+
18369
18356
  this ._live .removeParent (this);
18370
18357
 
18371
- // Connect to execution context.
18358
+ // Connect interests.
18372
18359
 
18373
18360
  if (this .getOuterNode ?.())
18374
18361
  this .getOuterNode () .getLive () .addInterest (_set_live__, this);
@@ -18378,12 +18365,12 @@ Object .assign (Object .setPrototypeOf (X3DBaseNode .prototype, Base_X3DChildObj
18378
18365
 
18379
18366
  else if (!this [_executionContext] && this !== this [_browser])
18380
18367
  this [_browser] .getLive () .addInterest (_set_live__, this);
18368
+ }
18381
18369
 
18382
- // Return field.
18370
+ // Return field.
18383
18371
 
18384
- return this ._live;
18385
- };
18386
- })(),
18372
+ return this ._live;
18373
+ },
18387
18374
  checkLiveState ()
18388
18375
  {
18389
18376
  /// Determines the live state of this node.
@@ -18399,29 +18386,22 @@ Object .assign (Object .setPrototypeOf (X3DBaseNode .prototype, Base_X3DChildObj
18399
18386
 
18400
18387
  return this [_live];
18401
18388
  },
18402
- [_set_live__] ()
18389
+ [_set_live__] (event)
18403
18390
  {
18404
18391
  const live = this ._live;
18405
18392
 
18406
18393
  if (!live)
18407
18394
  return;
18408
18395
 
18409
- if (this .checkLiveState ())
18410
- {
18411
- if (live .getValue ())
18412
- return;
18396
+ const state = this .checkLiveState ();
18413
18397
 
18414
- live .set (true);
18415
- live .processEvent ();
18416
- }
18417
- else
18418
- {
18419
- if (live .getValue ())
18420
- {
18421
- live .set (false);
18422
- live .processEvent ();
18423
- }
18424
- }
18398
+ if (event && live .equals (state))
18399
+ return;
18400
+
18401
+ // Get informed when `isLive ()` and `getLive().getValue()` change.
18402
+
18403
+ live .set (state);
18404
+ live .processEvent ();
18425
18405
  },
18426
18406
  addChildObjects (... args /* accessType, name, field, ... */)
18427
18407
  {
@@ -18435,17 +18415,21 @@ Object .assign (Object .setPrototypeOf (X3DBaseNode .prototype, Base_X3DChildObj
18435
18415
  this [_childObjects] .push (field);
18436
18416
 
18437
18417
  field .setPrivate (true);
18438
- field .setTainted (true);
18418
+ field .setTainted (!this [_initialized]);
18439
18419
  field .addParent (this);
18440
18420
  field .setName (name);
18441
18421
  field .setAccessType (accessType);
18442
18422
 
18443
- Object .defineProperty (this, `_${name}`,
18423
+ const propertyName = `_${name}`;
18424
+
18425
+ Object .defineProperty (this, propertyName,
18444
18426
  {
18445
18427
  get () { return field; },
18446
18428
  set (value) { field .setValue (value); },
18447
18429
  configurable: true,
18448
18430
  });
18431
+
18432
+ return this [propertyName];
18449
18433
  },
18450
18434
  getFieldDefinition (name)
18451
18435
  {
@@ -18734,7 +18718,7 @@ Object .assign (Object .setPrototypeOf (X3DBaseNode .prototype, Base_X3DChildObj
18734
18718
  this [_executionContext] ._bbox_changed = time;
18735
18719
  }
18736
18720
 
18737
- this ._parents_changed = time;
18721
+ this ._parents_changed ?.setValue (time);
18738
18722
  },
18739
18723
  dispose ()
18740
18724
  {
@@ -18801,15 +18785,27 @@ Object .defineProperties (X3DBaseNode .prototype,
18801
18785
  {
18802
18786
  name_changed:
18803
18787
  {
18804
- get () { return this ._name_changed; },
18788
+ get ()
18789
+ {
18790
+ return this ._name_changed
18791
+ ?? this .addChildObject (Base_X3DConstants .outputOnly, "name_changed", new x_ite_Fields .SFTime ());
18792
+ },
18805
18793
  },
18806
18794
  typeName_changed:
18807
18795
  {
18808
- get () { return this ._typeName_changed; },
18796
+ get ()
18797
+ {
18798
+ return this ._typeName_changed
18799
+ ?? this .addChildObject (Base_X3DConstants .outputOnly, "typeName_changed", new x_ite_Fields .SFTime ());
18800
+ },
18809
18801
  },
18810
18802
  parents_changed:
18811
18803
  {
18812
- get () { return this ._parents_changed; },
18804
+ get ()
18805
+ {
18806
+ return this ._parents_changed
18807
+ ?? this .addChildObject (Base_X3DConstants .outputOnly, "parents_changed", new x_ite_Fields .SFTime ());
18808
+ },
18813
18809
  },
18814
18810
  });
18815
18811
 
@@ -18889,7 +18885,7 @@ const Legacy_default_ = Legacy;
18889
18885
 
18890
18886
  /* harmony default export */ const Browser_Legacy = (x_ite_Namespace .add ("Legacy", Legacy_default_));
18891
18887
  ;// ./src/x_ite/BROWSER_VERSION.js
18892
- const BROWSER_VERSION_default_ = "16.4.1";
18888
+ const BROWSER_VERSION_default_ = "16.4.2";
18893
18889
  ;
18894
18890
 
18895
18891
  /* harmony default export */ const BROWSER_VERSION = (x_ite_Namespace .add ("BROWSER_VERSION", BROWSER_VERSION_default_));
@@ -24083,7 +24079,7 @@ Object .assign (Object .setPrototypeOf (X3DImportedNodeProxy .prototype, Core_X3
24083
24079
  {
24084
24080
  this [_importedName] = value;
24085
24081
 
24086
- this ._name_changed = Date .now () / 1000;
24082
+ this ._name_changed ?.setValue (Date .now () / 1000);
24087
24083
  },
24088
24084
  ... Object .fromEntries ([
24089
24085
  ["getComponentInfo", "componentInfo"],
@@ -24130,7 +24126,7 @@ Object .assign (Object .setPrototypeOf (X3DImportedNodeProxy .prototype, Core_X3
24130
24126
  if (this [_importedNode] ?.getInlineNode () .checkLoadState () === Base_X3DConstants .COMPLETE_STATE)
24131
24127
  this [X3DImportedNodeProxy_type] = this .getSharedNode () ?.constructor ?? this [X3DImportedNodeProxy_type];
24132
24128
 
24133
- this ._typeName_changed = Date .now () / 1000;
24129
+ this ._typeName_changed ?.setValue (Date .now () / 1000);
24134
24130
 
24135
24131
  Base_X3DChildObject .prototype .addEvent .call (this);
24136
24132
  },
@@ -24984,7 +24980,7 @@ Object .assign (Object .setPrototypeOf (X3DPrototypeInstance .prototype, Core_X3
24984
24980
 
24985
24981
  const oldProtoNode = this [_protoNode];
24986
24982
 
24987
- oldProtoNode ._name_changed .removeFieldInterest (this ._typeName_changed);
24983
+ oldProtoNode .name_changed .removeFieldInterest (this .typeName_changed);
24988
24984
  oldProtoNode ._updateInstances .removeInterest ("construct", this);
24989
24985
  oldProtoNode ._updateInstances .removeInterest ("update", this);
24990
24986
 
@@ -24994,7 +24990,7 @@ Object .assign (Object .setPrototypeOf (X3DPrototypeInstance .prototype, Core_X3
24994
24990
  this [X3DPrototypeInstance_fieldDefinitions] = protoNode .getFieldDefinitions ();
24995
24991
  this [_protoFields] = Array .from (protoNode .getUserDefinedFields ());
24996
24992
 
24997
- protoNode ._name_changed .addFieldInterest (this ._typeName_changed);
24993
+ protoNode .name_changed .addFieldInterest (this .typeName_changed);
24998
24994
 
24999
24995
  construct ? this .construct () : this .update ();
25000
24996
  },
@@ -25421,7 +25417,7 @@ Object .assign (Object .setPrototypeOf (X3DPrototypeInstance .prototype, Core_X3
25421
25417
  {
25422
25418
  const protoNode = this [_protoNode];
25423
25419
 
25424
- protoNode ._name_changed .removeFieldInterest (this ._typeName_changed);
25420
+ protoNode .name_changed .removeFieldInterest (this .typeName_changed);
25425
25421
  protoNode ._updateInstances .removeInterest ("construct", this);
25426
25422
  protoNode ._updateInstances .removeInterest ("update", this);
25427
25423
 
@@ -31190,7 +31186,7 @@ const Plane3_default_ = Plane3;
31190
31186
 
31191
31187
  /* harmony default export */ const Geometry_Plane3 = (x_ite_Namespace .add ("Plane3", Plane3_default_));
31192
31188
  ;// ./src/standard/Math/Geometry/Triangle3.js
31193
- /* provided dependency */ var libtess = __webpack_require__(402);
31189
+ /* provided dependency */ var libtess = __webpack_require__(362);
31194
31190
 
31195
31191
 
31196
31192
  const Triangle3 =
@@ -35545,22 +35541,6 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
35545
35541
  // With screen matrix applied.
35546
35542
  return this .bbox;
35547
35543
  },
35548
- setBBox (bbox)
35549
- {
35550
- if (bbox .equals (this .bbox))
35551
- return;
35552
-
35553
- const { min, max } = this;
35554
-
35555
- bbox .getExtents (min, max);
35556
-
35557
- this .bbox .assign (bbox);
35558
- this .planes .forEach ((plane, i) => plane .set (i % 2 ? min : max, boxNormals [i]));
35559
-
35560
- this ._bbox_changed .addEvent ();
35561
-
35562
- this .getExecutionContext () ._bbox_changed = Date .now () / 1000;
35563
- },
35564
35544
  getMin ()
35565
35545
  {
35566
35546
  // With screen matrix applied.
@@ -35571,10 +35551,6 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
35571
35551
  // With screen matrix applied.
35572
35552
  return this .max;
35573
35553
  },
35574
- getMatrix ()
35575
- {
35576
- return Numbers_Matrix4 .IDENTITY;
35577
- },
35578
35554
  isSolid ()
35579
35555
  {
35580
35556
  return this .solid;
@@ -35933,16 +35909,16 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
35933
35909
  vertices = this .vertices .getValue (),
35934
35910
  { min, max } = this;
35935
35911
 
35936
- if (vertices .length)
35912
+ if (min .x === Number .POSITIVE_INFINITY)
35937
35913
  {
35938
- if (min .x === Number .POSITIVE_INFINITY)
35914
+ if (vertices .length)
35939
35915
  this .bbox .setArray (vertices, 4) .getExtents (min, max);
35940
35916
  else
35941
- this .bbox .setExtents (min, max);
35917
+ this .bbox .setExtents (min .set (0), max .set (0));
35942
35918
  }
35943
35919
  else
35944
35920
  {
35945
- this .bbox .setExtents (min .set (0), max .set (0));
35921
+ this .bbox .setExtents (min, max);
35946
35922
  }
35947
35923
 
35948
35924
  for (let i = 0; i < 5; ++ i)
@@ -36530,7 +36506,6 @@ const AlphaMode_default_ = Object .assign (new Map (Object .entries (AlphaMode))
36530
36506
 
36531
36507
 
36532
36508
 
36533
-
36534
36509
  function GeometryContext (options = { })
36535
36510
  {
36536
36511
  Object .assign (this,
@@ -36553,10 +36528,6 @@ function GeometryContext (options = { })
36553
36528
 
36554
36529
  Object .assign (GeometryContext .prototype,
36555
36530
  {
36556
- getMatrix ()
36557
- {
36558
- return Numbers_Matrix4 .IDENTITY;
36559
- },
36560
36531
  getTextureCoordinateMapping ()
36561
36532
  {
36562
36533
  return this .textureCoordinateMapping;
@@ -47937,7 +47908,7 @@ const Bezier_default_ = Bezier;
47937
47908
 
47938
47909
  /* harmony default export */ const Algorithms_Bezier = (x_ite_Namespace .add ("Bezier", Bezier_default_));
47939
47910
  ;// ./src/x_ite/Parser/SVGParser.js
47940
- /* provided dependency */ var SVGParser_libtess = __webpack_require__(402);
47911
+ /* provided dependency */ var SVGParser_libtess = __webpack_require__(362);
47941
47912
 
47942
47913
 
47943
47914
 
@@ -51116,35 +51087,18 @@ const X3DWorld_default_ = X3DWorld;
51116
51087
 
51117
51088
 
51118
51089
 
51090
+ const MAX_CACHED_SCENES = 64;
51119
51091
 
51120
- const foreignMimeType = new Set ([
51092
+ const FOREIGN_MIME_TYPES = new Set ([
51121
51093
  "text/html",
51122
51094
  "application/xhtml+xml",
51123
51095
  ]);
51124
51096
 
51125
51097
  const FileLoader_cache = Symbol .for ("X_ITE.cache");
51126
51098
 
51127
- function FileLoader (node, { cacheScene = false, dataAsString = true } = { })
51128
- {
51129
- Base_X3DObject .call (this);
51130
-
51131
- this .node = node;
51132
- this .cacheScene = cacheScene;
51133
- this .dataAsString = dataAsString;
51134
- this .browser = node .getBrowser ();
51135
- this .executionContext = node .getExecutionContext ();
51136
- this .target = "";
51137
- this .url = [ ];
51138
- this .controller = new AbortController ();
51139
- this .candidateURL = "";
51140
- this .resolvedURL = null;
51141
- this .attempts = [ ];
51142
- }
51143
-
51144
- Object .assign (FileLoader,
51099
+ class FileLoader
51145
51100
  {
51146
- sceneCache: new Map (),
51147
- loadDocument (node, url, options)
51101
+ static loadDocument (node, url, options)
51148
51102
  {
51149
51103
  return new Promise ((resolve, reject) => new FileLoader (node, options) .loadDocument (url, (data, fileURL) =>
51150
51104
  {
@@ -51153,29 +51107,67 @@ Object .assign (FileLoader,
51153
51107
 
51154
51108
  reject ();
51155
51109
  }));
51156
- },
51157
- });
51110
+ }
51111
+
51112
+ static #sceneCache = new Map ();
51113
+
51114
+ static addScene (url, promise)
51115
+ {
51116
+ // Delete last used scene.
51117
+ if (this .#sceneCache .size >= MAX_CACHED_SCENES)
51118
+ this .#sceneCache .delete (this .#sceneCache .keys () .next () .value);
51119
+
51120
+ // Add new scene.
51121
+ this .#sceneCache .set (url, promise);
51122
+ }
51123
+
51124
+ static getScene (url)
51125
+ {
51126
+ const promise = this .#sceneCache .get (url);
51127
+
51128
+ // Move scene to the end of the list.
51129
+ this .#sceneCache .delete (url);
51130
+ this .#sceneCache .set (url, promise);
51131
+
51132
+ return promise;
51133
+ }
51134
+
51135
+ constructor (node, { cacheScene = false, dataAsString = true } = { })
51136
+ {
51137
+ this .node = node;
51138
+ this .cacheScene = cacheScene;
51139
+ this .dataAsString = dataAsString;
51140
+ this .browser = node .getBrowser ();
51141
+ this .executionContext = node .getExecutionContext ();
51142
+ this .target = "";
51143
+ this .url = [ ];
51144
+ this .controller = new AbortController ();
51145
+ this .candidateURL = "";
51146
+ this .resolvedURL = null;
51147
+ this .attempts = [ ];
51148
+ }
51158
51149
 
51159
- Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .prototype),
51160
- {
51161
51150
  isPrivate ()
51162
51151
  {
51163
51152
  // Don't count for loading objects.
51164
51153
  return true;
51165
- },
51154
+ }
51155
+
51166
51156
  abort ()
51167
51157
  {
51168
51158
  this .url .length = 0;
51169
51159
 
51170
51160
  this .controller .abort ();
51171
- },
51161
+ }
51162
+
51172
51163
  getBaseURL ()
51173
51164
  {
51174
51165
  if (this .node instanceof Execution_X3DWorld)
51175
51166
  return this .browser .getBaseURL ();
51176
51167
 
51177
51168
  return this .executionContext .getBaseURL ();
51178
- },
51169
+ }
51170
+
51179
51171
  getTarget (parameters)
51180
51172
  {
51181
51173
  for (const parameter of parameters)
@@ -51190,7 +51182,8 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51190
51182
  }
51191
51183
 
51192
51184
  return "";
51193
- },
51185
+ }
51186
+
51194
51187
  createX3DFromString (worldURL, string = "", resolve, reject)
51195
51188
  {
51196
51189
  try
@@ -51216,12 +51209,14 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51216
51209
  else
51217
51210
  throw error;
51218
51211
  }
51219
- },
51212
+ }
51213
+
51220
51214
  setScene (scene, resolve, reject)
51221
51215
  {
51222
51216
  scene ._loadCount .addInterest ("set_loadCount__", this, scene, resolve, reject);
51223
51217
  scene ._loadCount .addEvent ();
51224
- },
51218
+ }
51219
+
51225
51220
  async set_loadCount__ (scene, resolve, reject)
51226
51221
  {
51227
51222
  try
@@ -51238,7 +51233,7 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51238
51233
  if (this .cacheScene)
51239
51234
  scene [FileLoader_cache] = true;
51240
51235
 
51241
- this .resolve ?.(scene);
51236
+ this .cacheResolve ?.(scene);
51242
51237
  resolve (scene);
51243
51238
  }
51244
51239
  catch (error)
@@ -51251,10 +51246,11 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51251
51246
 
51252
51247
  if (DEVELOPMENT)
51253
51248
  {
51254
- if (this .resolvedURL .protocol !== "data:")
51255
- console .info (`Done loading scene '${decodeURI (this .resolvedURL)}'.`);
51249
+ if (this .resolvedURL ?.protocol !== "data:")
51250
+ console .info (`Done loading scene '${decodeURI (this .resolvedURL ?? "<inline scene>")}'.`);
51256
51251
  }
51257
- },
51252
+ }
51253
+
51258
51254
  createX3DFromURL (url, parameter, callback, bindViewpoint, foreign)
51259
51255
  {
51260
51256
  this .sceneCallback = callback;
@@ -51263,18 +51259,20 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51263
51259
  this .target = this .getTarget (parameter || new x_ite_Fields .MFString ());
51264
51260
 
51265
51261
  return this .loadDocument (url, this .createX3DFromURLAsync .bind (this, callback));
51266
- },
51262
+ }
51263
+
51267
51264
  createX3DFromURLAsync (callback, data)
51268
51265
  {
51269
51266
  if (data === null)
51270
51267
  callback (null);
51271
51268
  else
51272
51269
  this .createX3DFromString (this .resolvedURL, data, callback, this .loadDocumentError .bind (this));
51273
- },
51270
+ }
51271
+
51274
51272
  loadDocument (url, callback)
51275
51273
  {
51276
- this .url = url .slice ();
51277
- this .callback = callback;
51274
+ this .url = url .slice ();
51275
+ this .dataCallback = callback;
51278
51276
 
51279
51277
  this .attempts .length = 0;
51280
51278
 
@@ -51283,7 +51281,8 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51283
51281
 
51284
51282
  this .loadDocumentAsync (String (this .url .shift ()))
51285
51283
  .catch (this .loadDocumentError .bind (this));
51286
- },
51284
+ }
51285
+
51287
51286
  async loadDocumentAsync (url)
51288
51287
  {
51289
51288
  // Not every candidate reaches URL resolution, so resolvedURL stays null until it
@@ -51301,7 +51300,7 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51301
51300
  const result = url .match (/^\s*(?:ecmascript|javascript|vrmlscript):/s);
51302
51301
 
51303
51302
  if (result)
51304
- return await this .callback (url .substring (result [0] .length));
51303
+ return await this .dataCallback (url .substring (result [0] .length));
51305
51304
  }
51306
51305
 
51307
51306
  this .resolvedURL = new URL (url, this .getBaseURL ());
@@ -51320,7 +51319,7 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51320
51319
  data = helper.try (() => decodeURIComponent (data)) ?? data; // Decode data.
51321
51320
  data = data .replace (/^/, ""); // Remove BOM.
51322
51321
 
51323
- return await this .callback (data);
51322
+ return await this .dataCallback (data);
51324
51323
  }
51325
51324
  }
51326
51325
 
@@ -51363,13 +51362,13 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51363
51362
 
51364
51363
  cacheURL .hash = "";
51365
51364
 
51366
- const promise = FileLoader .sceneCache .get (cacheURL .href);
51365
+ const promise = FileLoader .getScene (cacheURL .href);
51367
51366
 
51368
51367
  if (promise)
51369
51368
  {
51370
51369
  const scene = await promise;
51371
51370
 
51372
- scene .setWorldURL (this .resolvedURL .href);
51371
+ scene .setWorldURL (this .resolvedURL);
51373
51372
 
51374
51373
  return this .sceneCallback (scene);
51375
51374
  }
@@ -51377,9 +51376,9 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51377
51376
  {
51378
51377
  const { promise, resolve } = Promise .withResolvers ();
51379
51378
 
51380
- this .resolve = resolve;
51379
+ this .cacheResolve = resolve;
51381
51380
 
51382
- FileLoader .sceneCache .set (cacheURL .href, promise);
51381
+ FileLoader .addScene (cacheURL .href, promise);
51383
51382
  }
51384
51383
  }
51385
51384
 
@@ -51394,12 +51393,13 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51394
51393
  {
51395
51394
  // console .log (mimeType);
51396
51395
 
51397
- if (foreignMimeType .has (mimeType))
51396
+ if (FOREIGN_MIME_TYPES .has (mimeType))
51398
51397
  return this .foreign (this .resolvedURL .href, this .target);
51399
51398
  }
51400
51399
 
51401
- await this .callback (await helper.gunzip (await this .getBlob (response)), this .resolvedURL);
51402
- },
51400
+ await this .dataCallback (await helper.gunzip (await this .getBlob (response)), this .resolvedURL);
51401
+ }
51402
+
51403
51403
  async getBlob (response)
51404
51404
  {
51405
51405
  const contentLength = parseInt (response .headers .get ("x-file-size"))
@@ -51432,14 +51432,16 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51432
51432
  }
51433
51433
 
51434
51434
  return await new Blob (values);
51435
- },
51435
+ }
51436
+
51436
51437
  checkResponse (response)
51437
51438
  {
51438
51439
  if (response .ok)
51439
51440
  return response;
51440
51441
 
51441
51442
  throw new Error (response .statusText || response .status);
51442
- },
51443
+ }
51444
+
51443
51445
  loadDocumentError (error)
51444
51446
  {
51445
51447
  // Output error.
@@ -51455,10 +51457,11 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51455
51457
  }
51456
51458
  else
51457
51459
  {
51458
- this .resolve ?.(null);
51459
- this .callback (null);
51460
+ this .cacheResolve ?.(null);
51461
+ this .dataCallback (null);
51460
51462
  }
51461
- },
51463
+ }
51464
+
51462
51465
  printError (error)
51463
51466
  {
51464
51467
  if (!error)
@@ -51468,7 +51471,7 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51468
51471
  // script URL — have no resolved URL, and are reported by their authored value.
51469
51472
 
51470
51473
  const
51471
- typeName = this .node instanceof Execution_X3DWorld ? "" : ` for ${this .node .getTypeName ()}`,
51474
+ typeName = this .node instanceof Execution_X3DWorld ? "" : `${this .node .getTypeName ()}: `,
51472
51475
  dataURL = this .resolvedURL ?.protocol === "data:",
51473
51476
  resolved = this .resolvedURL && !dataURL ? `${helper.try (() => decodeURI (this .resolvedURL)) ?? this .resolvedURL}` : "",
51474
51477
  subject = !this .candidateURL .length ? "empty URL"
@@ -51482,39 +51485,38 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51482
51485
  // failed only once every candidate has been tried.
51483
51486
 
51484
51487
  if (this .url .length)
51485
- return console .warn (`Couldn't load ${subject}${typeName}, trying URL ${this .attempts .length + 1} of ${this .attempts .length + this .url .length}.`, error);
51488
+ return console .warn (`${typeName}Couldn't load ${subject}, trying URL ${this .attempts .length + 1} of ${this .attempts .length + this .url .length}.`, error);
51486
51489
 
51487
51490
  if (this .attempts .length === 1)
51488
- return console .error (`Couldn't load ${subject}${typeName}.`, error);
51491
+ return console .error (`${typeName}Couldn't load ${subject}.`, error);
51489
51492
 
51490
51493
  // Pass the errors themselves along with the summary, so their stacks and context
51491
51494
  // stay inspectable.
51492
51495
 
51493
- console .error (`Couldn't load any of the ${this .attempts .length} URLs${typeName}, tried in this order:\n`
51496
+ console .error (`${typeName}Couldn't load any of the ${this .attempts .length} URLs, tried in this order:\n`
51494
51497
  + this .attempts
51495
51498
  .map (({ url, resolved, error }, i) =>
51496
51499
  ` ${i + 1}. '${this .truncate (url)}'${resolved && resolved !== url ? ` → ${this .truncate (resolved)}` : ""}: ${this .describe (error)}`)
51497
51500
  .join ("\n") + "\n",
51498
51501
  ... this .attempts .map (({ error }) => error));
51499
- },
51502
+ }
51503
+
51500
51504
  /**
51501
51505
  * Keep diagnostics readable when a candidate is a long data URL.
51502
51506
  */
51503
51507
  truncate (string, length = 120)
51504
51508
  {
51505
51509
  return string .length > length ? `${string .substring (0, length)}…` : string;
51506
- },
51510
+ }
51511
+
51507
51512
  /**
51508
51513
  * Not every thrown value is an Error, so don't summarize one as [object Object].
51509
51514
  */
51510
51515
  describe (error)
51511
51516
  {
51512
51517
  return error ?.message ?? (typeof error === "object" ? helper.try (() => JSON .stringify (error)) : null) ?? String (error);
51513
- },
51514
- });
51515
-
51516
- for (const key of Object .keys (FileLoader .prototype))
51517
- Object .defineProperty (FileLoader .prototype, key, { enumerable: false });
51518
+ }
51519
+ }
51518
51520
 
51519
51521
  const FileLoader_default_ = FileLoader;
51520
51522
  ;
@@ -54679,7 +54681,7 @@ function X3DCoreContext (element)
54679
54681
  {
54680
54682
  const link = document .createElement ("link");
54681
54683
 
54682
- link .integrity = "sha384-ghtkTig2bXHd5VgQPGzWUh9HuPE5g2Mb4S3c3Yap2DRcv41187XE74CWLQUKkwO2";
54684
+ link .integrity = "sha384-fEzovT4J83tA9kKXGV4bUgl6uLo/jpIuUjb7ogp7mj1miyDlddDqWywNrpuG5Yzv";
54683
54685
  link .rel = "stylesheet";
54684
54686
  link .crossOrigin = "anonymous";
54685
54687
  link .onload = resolve;
@@ -61913,7 +61915,7 @@ Object .assign (Object .setPrototypeOf (X3DFlyViewer .prototype, Navigation_X3DV
61913
61915
  this .addFly ();
61914
61916
 
61915
61917
  if (browser .getBrowserOption ("Rubberband"))
61916
- browser .finishedEvents () .addInterest ("display", this, MOVE);
61918
+ browser .displayFinishEvents () .addInterest ("display", this, MOVE);
61917
61919
  }
61918
61920
 
61919
61921
  this ._isActive = true;
@@ -61943,7 +61945,7 @@ Object .assign (Object .setPrototypeOf (X3DFlyViewer .prototype, Navigation_X3DV
61943
61945
  this .addPan ();
61944
61946
 
61945
61947
  if (browser .getBrowserOption ("Rubberband"))
61946
- browser .finishedEvents () .addInterest ("display", this, PAN);
61948
+ browser .displayFinishEvents () .addInterest ("display", this, PAN);
61947
61949
 
61948
61950
  this ._isActive = true;
61949
61951
  break;
@@ -62409,9 +62411,9 @@ Object .assign (Object .setPrototypeOf (X3DFlyViewer .prototype, Navigation_X3DV
62409
62411
 
62410
62412
  browser .addBrowserEvent ();
62411
62413
 
62412
- browser .prepareEvents () .removeInterest ("fly", this);
62413
- browser .prepareEvents () .removeInterest ("pan", this);
62414
- browser .finishedEvents () .removeInterest ("display", this);
62414
+ browser .prepareEvents () .removeInterest ("fly", this);
62415
+ browser .prepareEvents () .removeInterest ("pan", this);
62416
+ browser .displayFinishEvents () .removeInterest ("display", this);
62415
62417
 
62416
62418
  this .orientationChaser ._value_changed .removeInterest ("set_orientationOffset__", this);
62417
62419
 
@@ -65067,7 +65069,7 @@ Object .assign (X3DPointingDeviceSensorContext .prototype,
65067
65069
  hit .shapeNode = shapeNode;
65068
65070
 
65069
65071
  hit .viewMatrix .assign (renderObject .getViewpoint () .getViewMatrix ());
65070
- hit .modelViewMatrix .assign (geometryContext .getMatrix ()) .inverse () .multRight (modelViewMatrix);
65072
+ hit .modelViewMatrix .assign (modelViewMatrix);
65071
65073
 
65072
65074
  // A ParticleSystem has only a geometry context.
65073
65075
  // Hit normal must be normalized if used.
@@ -72977,16 +72979,16 @@ function X3DBrowserContext (element)
72977
72979
  for (const browserContext of browserContexts)
72978
72980
  browserContext .call (this, element);
72979
72981
 
72980
- this .addChildObjects (Base_X3DConstants .outputOnly, "initialized", new x_ite_Fields .SFTime (),
72981
- Base_X3DConstants .outputOnly, "shutdown", new x_ite_Fields .SFTime (),
72982
- Base_X3DConstants .outputOnly, "prepareEvents", new x_ite_Fields .SFTime (),
72983
- Base_X3DConstants .outputOnly, "timePrepareEvents", new x_ite_Fields .SFTime (),
72984
- Base_X3DConstants .outputOnly, "timeEvents", new x_ite_Fields .SFTime (),
72985
- Base_X3DConstants .outputOnly, "cameraEvents", new x_ite_Fields .SFTime (),
72986
- Base_X3DConstants .outputOnly, "sensorEvents", new x_ite_Fields .SFTime (),
72987
- Base_X3DConstants .outputOnly, "displayEvents", new x_ite_Fields .SFTime (),
72988
- Base_X3DConstants .outputOnly, "finishedEvents", new x_ite_Fields .SFTime (),
72989
- Base_X3DConstants .outputOnly, "endEvents", new x_ite_Fields .SFTime ());
72982
+ this .addChildObjects (Base_X3DConstants .outputOnly, "initialized", new x_ite_Fields .SFTime (),
72983
+ Base_X3DConstants .outputOnly, "shutdown", new x_ite_Fields .SFTime (),
72984
+ Base_X3DConstants .outputOnly, "prepareEvents", new x_ite_Fields .SFTime (),
72985
+ Base_X3DConstants .outputOnly, "timePrepareEvents", new x_ite_Fields .SFTime (),
72986
+ Base_X3DConstants .outputOnly, "timeEvents", new x_ite_Fields .SFTime (),
72987
+ Base_X3DConstants .outputOnly, "cameraEvents", new x_ite_Fields .SFTime (),
72988
+ Base_X3DConstants .outputOnly, "sensorEvents", new x_ite_Fields .SFTime (),
72989
+ Base_X3DConstants .outputOnly, "displayEvents", new x_ite_Fields .SFTime (),
72990
+ Base_X3DConstants .outputOnly, "displayFinishEvents", new x_ite_Fields .SFTime (),
72991
+ Base_X3DConstants .outputOnly, "finishEvents", new x_ite_Fields .SFTime ());
72990
72992
 
72991
72993
  this [X3DBrowserContext_tainted] = false;
72992
72994
  this [_previousTime] = 0;
@@ -73040,13 +73042,13 @@ Object .assign (Object .setPrototypeOf (X3DBrowserContext .prototype, Base_X3DBa
73040
73042
  {
73041
73043
  return this ._displayEvents;
73042
73044
  },
73043
- finishedEvents ()
73045
+ displayFinishEvents ()
73044
73046
  {
73045
- return this ._finishedEvents;
73047
+ return this ._displayFinishEvents;
73046
73048
  },
73047
- endEvents ()
73049
+ finishEvents ()
73048
73050
  {
73049
- return this ._endEvents;
73051
+ return this ._finishEvents;
73050
73052
  },
73051
73053
  getBrowser ()
73052
73054
  {
@@ -73092,13 +73094,13 @@ Object .assign (Object .setPrototypeOf (X3DBrowserContext .prototype, Base_X3DBa
73092
73094
  {
73093
73095
  const key = Symbol ();
73094
73096
 
73095
- this .addBrowserEvent ();
73096
-
73097
- this ._endEvents .addFieldCallback (key, () =>
73097
+ this ._finishEvents .addFieldCallback (key, () =>
73098
73098
  {
73099
- this ._endEvents .removeFieldCallback (key);
73099
+ this ._finishEvents .removeFieldCallback (key);
73100
73100
  resolve ();
73101
73101
  });
73102
+
73103
+ this .addBrowserEvent ();
73102
73104
  });
73103
73105
  },
73104
73106
  [_traverse] (now, frame)
@@ -73167,7 +73169,7 @@ Object .assign (Object .setPrototypeOf (X3DBrowserContext .prototype, Base_X3DBa
73167
73169
 
73168
73170
  this [_world] .traverse (Rendering_TraverseType .DISPLAY);
73169
73171
 
73170
- this .addTaintedField (this ._finishedEvents);
73172
+ this .addTaintedField (this ._displayFinishEvents);
73171
73173
  this [X3DBrowserContext_processEvents] ();
73172
73174
 
73173
73175
  for (const frameBuffer of this .getFramebuffers ())
@@ -73175,7 +73177,7 @@ Object .assign (Object .setPrototypeOf (X3DBrowserContext .prototype, Base_X3DBa
73175
73177
 
73176
73178
  this [_displayTime] .stop ();
73177
73179
 
73178
- this .addTaintedField (this ._endEvents);
73180
+ this .addTaintedField (this ._finishEvents);
73179
73181
  this [X3DBrowserContext_processEvents] ();
73180
73182
 
73181
73183
  // Finish
@@ -77103,7 +77105,7 @@ Object .assign (Object .setPrototypeOf (Cone .prototype, Rendering_X3DGeometryNo
77103
77105
  else
77104
77106
  {
77105
77107
  this .getMin () .set (-bottomRadius, y2, -bottomRadius);
77106
- this .getMax () .set ( bottomRadius, y1, bottomRadius);
77108
+ this .getMax () .set ( bottomRadius, y1, bottomRadius);
77107
77109
  }
77108
77110
  },
77109
77111
  });
@@ -77255,19 +77257,16 @@ Object .assign (Object .setPrototypeOf (Cylinder .prototype, Rendering_X3DGeomet
77255
77257
  this .getMin () .set (0);
77256
77258
  this .getMax () .set (0);
77257
77259
  }
77258
-
77259
77260
  else if (!this ._top .getValue () && !this ._side .getValue ())
77260
77261
  {
77261
77262
  this .getMin () .set (-radius, y2, -radius);
77262
77263
  this .getMax () .set ( radius, y2, radius);
77263
77264
  }
77264
-
77265
77265
  else if (!this ._bottom .getValue () && !this ._side .getValue ())
77266
77266
  {
77267
77267
  this .getMin () .set (-radius, y1, -radius);
77268
77268
  this .getMax () .set ( radius, y1, radius);
77269
77269
  }
77270
-
77271
77270
  else
77272
77271
  {
77273
77272
  this .getMin () .set (-radius, y2, -radius);
@@ -84095,23 +84094,25 @@ Object .assign (Object .setPrototypeOf (InlineGeometry .prototype, Rendering_X3D
84095
84094
  geometryNode ._normalPerVertex = smooth;
84096
84095
  }
84097
84096
  },
84098
- unloadData ()
84097
+ unlockGeometry ()
84099
84098
  {
84100
84099
  if (this .geometryNode)
84101
84100
  this .geometryNode [_lock] = false;
84102
-
84101
+ },
84102
+ unloadData ()
84103
+ {
84103
84104
  this .fileLoader ?.abort ();
84105
+ this .unlockGeometry ();
84104
84106
  this .setInternalScene (null);
84105
84107
  },
84106
84108
  loadData ()
84107
84109
  {
84108
84110
  const cache = this .getBrowser () .getBrowserOption ("Cache");
84109
84111
 
84110
- if (this .geometryNode)
84111
- this .geometryNode [_lock] = false;
84112
-
84113
84112
  this .fileLoader ?.abort ();
84114
84113
 
84114
+ this .unlockGeometry ();
84115
+
84115
84116
  this .fileLoader = new InputOutput_FileLoader (this, { cacheScene: cache })
84116
84117
  .createX3DFromURL (this ._url, null, this .setInternalScene .bind (this));
84117
84118
  },
@@ -84234,8 +84235,7 @@ Object .assign (Object .setPrototypeOf (InlineGeometry .prototype, Rendering_X3D
84234
84235
  { },
84235
84236
  dispose ()
84236
84237
  {
84237
- if (this .geometryNode)
84238
- this .geometryNode [_lock] = false;
84238
+ this .unlockGeometry ();
84239
84239
 
84240
84240
  Networking_X3DUrlObject .prototype .dispose .call (this);
84241
84241
  Rendering_X3DGeometryNode .prototype .dispose .call (this);
@@ -91546,8 +91546,8 @@ const PNGMedia_default_ = PNGMedia;
91546
91546
 
91547
91547
  /* harmony default export */ const Texturing_PNGMedia = (x_ite_Namespace .add ("PNGMedia", PNGMedia_default_));
91548
91548
  ;// ./src/x_ite/Components/Texturing/MovieTexture.js
91549
- /* provided dependency */ var SuperGif = __webpack_require__(16);
91550
- /* provided dependency */ var APNG = __webpack_require__(698);
91549
+ /* provided dependency */ var SuperGif = __webpack_require__(8);
91550
+ /* provided dependency */ var APNG = __webpack_require__(618);
91551
91551
 
91552
91552
 
91553
91553
 
@@ -94191,7 +94191,7 @@ const QuickSort_default_ = QuickSort;
94191
94191
 
94192
94192
  /* harmony default export */ const Algorithms_QuickSort = (x_ite_Namespace .add ("QuickSort", QuickSort_default_));
94193
94193
  ;// ./src/lib/libtess.js
94194
- /* provided dependency */ var libtess_libtess = __webpack_require__(402);
94194
+ /* provided dependency */ var libtess_libtess = __webpack_require__(362);
94195
94195
  const libtess_default_ = libtess_libtess;
94196
94196
  ;
94197
94197