x_ite 16.4.1 → 16.4.3

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 +3 -3
  35. package/dist/assets/components/ScriptingComponent.min.js +2 -2
  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 +250 -236
  53. package/dist/x_ite.min.js +2 -2
  54. package/dist/x_ite.min.mjs +2 -2
  55. package/dist/x_ite.mjs +250 -236
  56. package/dist/x_ite.zip +0 -0
  57. package/package.json +6 -6
package/dist/x_ite.mjs CHANGED
@@ -1,7 +1,7 @@
1
- /* X_ITE v16.4.1 */
1
+ /* X_ITE v16.4.3 */
2
2
  var __webpack_modules__ = ({
3
3
 
4
- /***/ 16
4
+ /***/ 802
5
5
  (module, exports) {
6
6
 
7
7
  var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*
@@ -1006,7 +1006,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
1006
1006
 
1007
1007
  /***/ },
1008
1008
 
1009
- /***/ 698
1009
+ /***/ 528
1010
1010
  (module) {
1011
1011
 
1012
1012
  (function webpackUniversalModuleDefinition(root, factory) {
@@ -2002,7 +2002,7 @@ return /******/ (function(modules) { // webpackBootstrap
2002
2002
 
2003
2003
  /***/ },
2004
2004
 
2005
- /***/ 402
2005
+ /***/ 628
2006
2006
  (module) {
2007
2007
 
2008
2008
  /**
@@ -8849,7 +8849,7 @@ const
8849
8849
 
8850
8850
  const handler =
8851
8851
  {
8852
- get (target, key, receiver)
8852
+ get (target, key)
8853
8853
  {
8854
8854
  if (typeof key === "string")
8855
8855
  {
@@ -8859,9 +8859,9 @@ const handler =
8859
8859
  return target [_array] [index];
8860
8860
  }
8861
8861
 
8862
- return Reflect .get (target, key, receiver);
8862
+ return Reflect .get (target, key);
8863
8863
  },
8864
- set (target, key, value, receiver)
8864
+ set (target, key, value)
8865
8865
  {
8866
8866
  if (typeof key === "string")
8867
8867
  {
@@ -8871,7 +8871,7 @@ const handler =
8871
8871
  return false;
8872
8872
  }
8873
8873
 
8874
- return Reflect .set (target, key, value, receiver);
8874
+ return Reflect .set (target, key, value);
8875
8875
  },
8876
8876
  has (target, key)
8877
8877
  {
@@ -14339,7 +14339,7 @@ const
14339
14339
 
14340
14340
  const SFNode_handler =
14341
14341
  {
14342
- get (target, key, receiver)
14342
+ get (target, key)
14343
14343
  {
14344
14344
  if (typeof key === "string")
14345
14345
  {
@@ -14358,9 +14358,9 @@ const SFNode_handler =
14358
14358
  }
14359
14359
  }
14360
14360
 
14361
- return Reflect .get (target, key, receiver);
14361
+ return Reflect .get (target, key);
14362
14362
  },
14363
- set (target, key, value, receiver)
14363
+ set (target, key, value)
14364
14364
  {
14365
14365
  if (typeof key === "string")
14366
14366
  {
@@ -14378,7 +14378,7 @@ const SFNode_handler =
14378
14378
  }
14379
14379
  }
14380
14380
 
14381
- return Reflect .set (target, key, value, receiver);
14381
+ return Reflect .set (target, key, value);
14382
14382
  },
14383
14383
  has (target, key)
14384
14384
  {
@@ -15739,7 +15739,7 @@ const
15739
15739
 
15740
15740
  const X3DObjectArrayField_handler =
15741
15741
  {
15742
- get (target, key, receiver)
15742
+ get (target, key)
15743
15743
  {
15744
15744
  if (typeof key === "string")
15745
15745
  {
@@ -15756,9 +15756,9 @@ const X3DObjectArrayField_handler =
15756
15756
  }
15757
15757
  }
15758
15758
 
15759
- return Reflect .get (target, key, receiver);
15759
+ return Reflect .get (target, key);
15760
15760
  },
15761
- set (target, key, value, receiver)
15761
+ set (target, key, value)
15762
15762
  {
15763
15763
  if (typeof key === "string")
15764
15764
  {
@@ -15777,7 +15777,7 @@ const X3DObjectArrayField_handler =
15777
15777
  }
15778
15778
  }
15779
15779
 
15780
- return Reflect .set (target, key, value, receiver);
15780
+ return Reflect .set (target, key, value);
15781
15781
  },
15782
15782
  has (target, key)
15783
15783
  {
@@ -16264,7 +16264,7 @@ const
16264
16264
 
16265
16265
  const X3DTypedArrayField_handler =
16266
16266
  {
16267
- get (target, key, receiver)
16267
+ get (target, key)
16268
16268
  {
16269
16269
  if (typeof key === "string")
16270
16270
  {
@@ -16294,9 +16294,9 @@ const X3DTypedArrayField_handler =
16294
16294
  }
16295
16295
  }
16296
16296
 
16297
- return Reflect .get (target, key, receiver);
16297
+ return Reflect .get (target, key);
16298
16298
  },
16299
- set (target, key, value, receiver)
16299
+ set (target, key, value)
16300
16300
  {
16301
16301
  if (typeof key === "string")
16302
16302
  {
@@ -16331,7 +16331,7 @@ const X3DTypedArrayField_handler =
16331
16331
  }
16332
16332
  }
16333
16333
 
16334
- return Reflect .set (target, key, value, receiver);
16334
+ return Reflect .set (target, key, value);
16335
16335
  },
16336
16336
  has (target, key)
16337
16337
  {
@@ -18212,12 +18212,6 @@ function X3DBaseNode (executionContext, browser = executionContext .getBrowser (
18212
18212
 
18213
18213
  for (const fieldDefinition of this [_fieldDefinitions])
18214
18214
  this .addPredefinedField (fieldDefinition);
18215
-
18216
- // Create events.
18217
-
18218
- this .addChildObjects (Base_X3DConstants .outputOnly, "name_changed", new x_ite_Fields .SFTime (),
18219
- Base_X3DConstants .outputOnly, "typeName_changed", new x_ite_Fields .SFTime (),
18220
- Base_X3DConstants .outputOnly, "parents_changed", new x_ite_Fields .SFTime ());
18221
18215
  }
18222
18216
 
18223
18217
  Object .assign (Object .setPrototypeOf (X3DBaseNode .prototype, Base_X3DChildObject .prototype),
@@ -18227,7 +18221,7 @@ Object .assign (Object .setPrototypeOf (X3DBaseNode .prototype, Base_X3DChildObj
18227
18221
  {
18228
18222
  Base_X3DChildObject .prototype .setName .call (this, value);
18229
18223
 
18230
- this ._name_changed = Date .now () / 1000;
18224
+ this ._name_changed ?.setValue (Date .now () / 1000);
18231
18225
  },
18232
18226
  getBrowser ()
18233
18227
  {
@@ -18318,37 +18312,30 @@ Object .assign (Object .setPrototypeOf (X3DBaseNode .prototype, Base_X3DChildObj
18318
18312
  /// Sets the own live state of this node. Setting the live state to false
18319
18313
  /// temporarily disables this node completely.
18320
18314
 
18321
- this [_live] = !!value .valueOf ();
18315
+ value = !! value .valueOf ();
18316
+
18317
+ if (this [_live] === value)
18318
+ return;
18319
+
18320
+ this [_live] = value;
18322
18321
 
18323
18322
  this [_set_live__] ();
18324
18323
  },
18325
- getLive: (() =>
18324
+ getLive ()
18326
18325
  {
18327
- function getLive ()
18328
- {
18329
- return this ._live;
18330
- }
18326
+ /// Returns the live event of this node.
18331
18327
 
18332
- return function ()
18328
+ if (!this ._live)
18333
18329
  {
18334
- /// Returns the live event of this node.
18335
-
18336
- // Change function.
18337
-
18338
- Object .defineProperty (this, "getLive",
18339
- {
18340
- value: getLive,
18341
- configurable: true,
18342
- });
18343
-
18344
18330
  // Add isLive event.
18345
18331
 
18346
- this .addChildObjects (Base_X3DConstants .outputOnly, "live", new x_ite_Fields .SFBool (this .checkLiveState ()));
18332
+ this .addChildObject (Base_X3DConstants .outputOnly, "live", new x_ite_Fields .SFBool (this .checkLiveState ()));
18347
18333
 
18348
18334
  // Event processing is done manually and immediately, so:
18335
+
18349
18336
  this ._live .removeParent (this);
18350
18337
 
18351
- // Connect to execution context.
18338
+ // Connect interests.
18352
18339
 
18353
18340
  if (this .getOuterNode ?.())
18354
18341
  this .getOuterNode () .getLive () .addInterest (_set_live__, this);
@@ -18358,12 +18345,12 @@ Object .assign (Object .setPrototypeOf (X3DBaseNode .prototype, Base_X3DChildObj
18358
18345
 
18359
18346
  else if (!this [_executionContext] && this !== this [_browser])
18360
18347
  this [_browser] .getLive () .addInterest (_set_live__, this);
18348
+ }
18361
18349
 
18362
- // Return field.
18350
+ // Return field.
18363
18351
 
18364
- return this ._live;
18365
- };
18366
- })(),
18352
+ return this ._live;
18353
+ },
18367
18354
  checkLiveState ()
18368
18355
  {
18369
18356
  /// Determines the live state of this node.
@@ -18379,29 +18366,22 @@ Object .assign (Object .setPrototypeOf (X3DBaseNode .prototype, Base_X3DChildObj
18379
18366
 
18380
18367
  return this [_live];
18381
18368
  },
18382
- [_set_live__] ()
18369
+ [_set_live__] (event)
18383
18370
  {
18384
18371
  const live = this ._live;
18385
18372
 
18386
18373
  if (!live)
18387
18374
  return;
18388
18375
 
18389
- if (this .checkLiveState ())
18390
- {
18391
- if (live .getValue ())
18392
- return;
18376
+ const state = this .checkLiveState ();
18393
18377
 
18394
- live .set (true);
18395
- live .processEvent ();
18396
- }
18397
- else
18398
- {
18399
- if (live .getValue ())
18400
- {
18401
- live .set (false);
18402
- live .processEvent ();
18403
- }
18404
- }
18378
+ if (event && live .equals (state))
18379
+ return;
18380
+
18381
+ // Get informed when `isLive ()` and `getLive().getValue()` change.
18382
+
18383
+ live .set (state);
18384
+ live .processEvent ();
18405
18385
  },
18406
18386
  addChildObjects (... args /* accessType, name, field, ... */)
18407
18387
  {
@@ -18415,17 +18395,21 @@ Object .assign (Object .setPrototypeOf (X3DBaseNode .prototype, Base_X3DChildObj
18415
18395
  this [_childObjects] .push (field);
18416
18396
 
18417
18397
  field .setPrivate (true);
18418
- field .setTainted (true);
18398
+ field .setTainted (!this [_initialized]);
18419
18399
  field .addParent (this);
18420
18400
  field .setName (name);
18421
18401
  field .setAccessType (accessType);
18422
18402
 
18423
- Object .defineProperty (this, `_${name}`,
18403
+ const propertyName = `_${name}`;
18404
+
18405
+ Object .defineProperty (this, propertyName,
18424
18406
  {
18425
18407
  get () { return field; },
18426
18408
  set (value) { field .setValue (value); },
18427
18409
  configurable: true,
18428
18410
  });
18411
+
18412
+ return this [propertyName];
18429
18413
  },
18430
18414
  getFieldDefinition (name)
18431
18415
  {
@@ -18714,7 +18698,7 @@ Object .assign (Object .setPrototypeOf (X3DBaseNode .prototype, Base_X3DChildObj
18714
18698
  this [_executionContext] ._bbox_changed = time;
18715
18699
  }
18716
18700
 
18717
- this ._parents_changed = time;
18701
+ this ._parents_changed ?.setValue (time);
18718
18702
  },
18719
18703
  dispose ()
18720
18704
  {
@@ -18781,15 +18765,27 @@ Object .defineProperties (X3DBaseNode .prototype,
18781
18765
  {
18782
18766
  name_changed:
18783
18767
  {
18784
- get () { return this ._name_changed; },
18768
+ get ()
18769
+ {
18770
+ return this ._name_changed
18771
+ ?? this .addChildObject (Base_X3DConstants .outputOnly, "name_changed", new x_ite_Fields .SFTime ());
18772
+ },
18785
18773
  },
18786
18774
  typeName_changed:
18787
18775
  {
18788
- get () { return this ._typeName_changed; },
18776
+ get ()
18777
+ {
18778
+ return this ._typeName_changed
18779
+ ?? this .addChildObject (Base_X3DConstants .outputOnly, "typeName_changed", new x_ite_Fields .SFTime ());
18780
+ },
18789
18781
  },
18790
18782
  parents_changed:
18791
18783
  {
18792
- get () { return this ._parents_changed; },
18784
+ get ()
18785
+ {
18786
+ return this ._parents_changed
18787
+ ?? this .addChildObject (Base_X3DConstants .outputOnly, "parents_changed", new x_ite_Fields .SFTime ());
18788
+ },
18793
18789
  },
18794
18790
  });
18795
18791
 
@@ -18869,7 +18865,7 @@ const Legacy_default_ = Legacy;
18869
18865
 
18870
18866
  /* harmony default export */ const Browser_Legacy = (x_ite_Namespace .add ("Legacy", Legacy_default_));
18871
18867
  ;// ./src/x_ite/BROWSER_VERSION.js
18872
- const BROWSER_VERSION_default_ = "16.4.1";
18868
+ const BROWSER_VERSION_default_ = "16.4.3";
18873
18869
  ;
18874
18870
 
18875
18871
  /* harmony default export */ const BROWSER_VERSION = (x_ite_Namespace .add ("BROWSER_VERSION", BROWSER_VERSION_default_));
@@ -23951,16 +23947,16 @@ const
23951
23947
 
23952
23948
  const X3DImportedNodeProxy_handler =
23953
23949
  {
23954
- get (target, key, receiver)
23950
+ get (target, key)
23955
23951
  {
23956
23952
  if (Reflect .has (target, key))
23957
- return Reflect .get (target, key, receiver);
23953
+ return Reflect .get (target, key);
23958
23954
 
23959
23955
  const node = target .getSharedNode ();
23960
23956
 
23961
23957
  if (node)
23962
23958
  {
23963
- const property = Reflect .get (node, key, receiver);
23959
+ const property = Reflect .get (node, key);
23964
23960
 
23965
23961
  if (typeof property === "function")
23966
23962
  {
@@ -23977,18 +23973,18 @@ const X3DImportedNodeProxy_handler =
23977
23973
  return property;
23978
23974
  }
23979
23975
  },
23980
- set (target, key, value, receiver)
23976
+ set (target, key, value)
23981
23977
  {
23982
23978
  if (Reflect .has (target, key))
23983
23979
  {
23984
- return Reflect .set (target, key, value, receiver);
23980
+ return Reflect .set (target, key, value);
23985
23981
  }
23986
23982
  else
23987
23983
  {
23988
23984
  const node = target .getSharedNode ();
23989
23985
 
23990
23986
  if (node)
23991
- return Reflect .set (node, key, value, receiver);
23987
+ return Reflect .set (node, key, value);
23992
23988
 
23993
23989
  return false;
23994
23990
  }
@@ -24063,7 +24059,7 @@ Object .assign (Object .setPrototypeOf (X3DImportedNodeProxy .prototype, Core_X3
24063
24059
  {
24064
24060
  this [_importedName] = value;
24065
24061
 
24066
- this ._name_changed = Date .now () / 1000;
24062
+ this ._name_changed ?.setValue (Date .now () / 1000);
24067
24063
  },
24068
24064
  ... Object .fromEntries ([
24069
24065
  ["getComponentInfo", "componentInfo"],
@@ -24108,9 +24104,15 @@ Object .assign (Object .setPrototypeOf (X3DImportedNodeProxy .prototype, Core_X3
24108
24104
  set_loadState__ ()
24109
24105
  {
24110
24106
  if (this [_importedNode] ?.getInlineNode () .checkLoadState () === Base_X3DConstants .COMPLETE_STATE)
24111
- this [X3DImportedNodeProxy_type] = this .getSharedNode () ?.constructor ?? this [X3DImportedNodeProxy_type];
24107
+ {
24108
+ const sharedNode = this .getSharedNode ();
24109
+
24110
+ this [X3DImportedNodeProxy_type] = sharedNode ?.constructor ?? this [X3DImportedNodeProxy_type];
24111
+
24112
+ sharedNode ?.addInterest ("addNodeEvent", this);
24113
+ }
24112
24114
 
24113
- this ._typeName_changed = Date .now () / 1000;
24115
+ this ._typeName_changed ?.setValue (Date .now () / 1000);
24114
24116
 
24115
24117
  Base_X3DChildObject .prototype .addEvent .call (this);
24116
24118
  },
@@ -24964,7 +24966,7 @@ Object .assign (Object .setPrototypeOf (X3DPrototypeInstance .prototype, Core_X3
24964
24966
 
24965
24967
  const oldProtoNode = this [_protoNode];
24966
24968
 
24967
- oldProtoNode ._name_changed .removeFieldInterest (this ._typeName_changed);
24969
+ oldProtoNode .name_changed .removeFieldInterest (this .typeName_changed);
24968
24970
  oldProtoNode ._updateInstances .removeInterest ("construct", this);
24969
24971
  oldProtoNode ._updateInstances .removeInterest ("update", this);
24970
24972
 
@@ -24974,7 +24976,7 @@ Object .assign (Object .setPrototypeOf (X3DPrototypeInstance .prototype, Core_X3
24974
24976
  this [X3DPrototypeInstance_fieldDefinitions] = protoNode .getFieldDefinitions ();
24975
24977
  this [_protoFields] = Array .from (protoNode .getUserDefinedFields ());
24976
24978
 
24977
- protoNode ._name_changed .addFieldInterest (this ._typeName_changed);
24979
+ protoNode .name_changed .addFieldInterest (this .typeName_changed);
24978
24980
 
24979
24981
  construct ? this .construct () : this .update ();
24980
24982
  },
@@ -25401,7 +25403,7 @@ Object .assign (Object .setPrototypeOf (X3DPrototypeInstance .prototype, Core_X3
25401
25403
  {
25402
25404
  const protoNode = this [_protoNode];
25403
25405
 
25404
- protoNode ._name_changed .removeFieldInterest (this ._typeName_changed);
25406
+ protoNode .name_changed .removeFieldInterest (this .typeName_changed);
25405
25407
  protoNode ._updateInstances .removeInterest ("construct", this);
25406
25408
  protoNode ._updateInstances .removeInterest ("update", this);
25407
25409
 
@@ -31170,7 +31172,7 @@ const Plane3_default_ = Plane3;
31170
31172
 
31171
31173
  /* harmony default export */ const Geometry_Plane3 = (x_ite_Namespace .add ("Plane3", Plane3_default_));
31172
31174
  ;// ./src/standard/Math/Geometry/Triangle3.js
31173
- /* provided dependency */ var libtess = __webpack_require__(402);
31175
+ /* provided dependency */ var libtess = __webpack_require__(628);
31174
31176
 
31175
31177
 
31176
31178
  const Triangle3 =
@@ -35525,22 +35527,6 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
35525
35527
  // With screen matrix applied.
35526
35528
  return this .bbox;
35527
35529
  },
35528
- setBBox (bbox)
35529
- {
35530
- if (bbox .equals (this .bbox))
35531
- return;
35532
-
35533
- const { min, max } = this;
35534
-
35535
- bbox .getExtents (min, max);
35536
-
35537
- this .bbox .assign (bbox);
35538
- this .planes .forEach ((plane, i) => plane .set (i % 2 ? min : max, boxNormals [i]));
35539
-
35540
- this ._bbox_changed .addEvent ();
35541
-
35542
- this .getExecutionContext () ._bbox_changed = Date .now () / 1000;
35543
- },
35544
35530
  getMin ()
35545
35531
  {
35546
35532
  // With screen matrix applied.
@@ -35551,10 +35537,6 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
35551
35537
  // With screen matrix applied.
35552
35538
  return this .max;
35553
35539
  },
35554
- getMatrix ()
35555
- {
35556
- return Numbers_Matrix4 .IDENTITY;
35557
- },
35558
35540
  isSolid ()
35559
35541
  {
35560
35542
  return this .solid;
@@ -35913,16 +35895,16 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
35913
35895
  vertices = this .vertices .getValue (),
35914
35896
  { min, max } = this;
35915
35897
 
35916
- if (vertices .length)
35898
+ if (min .x === Number .POSITIVE_INFINITY)
35917
35899
  {
35918
- if (min .x === Number .POSITIVE_INFINITY)
35900
+ if (vertices .length)
35919
35901
  this .bbox .setArray (vertices, 4) .getExtents (min, max);
35920
35902
  else
35921
- this .bbox .setExtents (min, max);
35903
+ this .bbox .setExtents (min .set (0), max .set (0));
35922
35904
  }
35923
35905
  else
35924
35906
  {
35925
- this .bbox .setExtents (min .set (0), max .set (0));
35907
+ this .bbox .setExtents (min, max);
35926
35908
  }
35927
35909
 
35928
35910
  for (let i = 0; i < 5; ++ i)
@@ -36510,7 +36492,6 @@ const AlphaMode_default_ = Object .assign (new Map (Object .entries (AlphaMode))
36510
36492
 
36511
36493
 
36512
36494
 
36513
-
36514
36495
  function GeometryContext (options = { })
36515
36496
  {
36516
36497
  Object .assign (this,
@@ -36533,10 +36514,6 @@ function GeometryContext (options = { })
36533
36514
 
36534
36515
  Object .assign (GeometryContext .prototype,
36535
36516
  {
36536
- getMatrix ()
36537
- {
36538
- return Numbers_Matrix4 .IDENTITY;
36539
- },
36540
36517
  getTextureCoordinateMapping ()
36541
36518
  {
36542
36519
  return this .textureCoordinateMapping;
@@ -47917,7 +47894,7 @@ const Bezier_default_ = Bezier;
47917
47894
 
47918
47895
  /* harmony default export */ const Algorithms_Bezier = (x_ite_Namespace .add ("Bezier", Bezier_default_));
47919
47896
  ;// ./src/x_ite/Parser/SVGParser.js
47920
- /* provided dependency */ var SVGParser_libtess = __webpack_require__(402);
47897
+ /* provided dependency */ var SVGParser_libtess = __webpack_require__(628);
47921
47898
 
47922
47899
 
47923
47900
 
@@ -51096,35 +51073,18 @@ const X3DWorld_default_ = X3DWorld;
51096
51073
 
51097
51074
 
51098
51075
 
51076
+ const MAX_CACHED_SCENES = 64;
51099
51077
 
51100
- const foreignMimeType = new Set ([
51078
+ const FOREIGN_MIME_TYPES = new Set ([
51101
51079
  "text/html",
51102
51080
  "application/xhtml+xml",
51103
51081
  ]);
51104
51082
 
51105
51083
  const FileLoader_cache = Symbol .for ("X_ITE.cache");
51106
51084
 
51107
- function FileLoader (node, { cacheScene = false, dataAsString = true } = { })
51108
- {
51109
- Base_X3DObject .call (this);
51110
-
51111
- this .node = node;
51112
- this .cacheScene = cacheScene;
51113
- this .dataAsString = dataAsString;
51114
- this .browser = node .getBrowser ();
51115
- this .executionContext = node .getExecutionContext ();
51116
- this .target = "";
51117
- this .url = [ ];
51118
- this .controller = new AbortController ();
51119
- this .candidateURL = "";
51120
- this .resolvedURL = null;
51121
- this .attempts = [ ];
51122
- }
51123
-
51124
- Object .assign (FileLoader,
51085
+ class FileLoader
51125
51086
  {
51126
- sceneCache: new Map (),
51127
- loadDocument (node, url, options)
51087
+ static loadDocument (node, url, options)
51128
51088
  {
51129
51089
  return new Promise ((resolve, reject) => new FileLoader (node, options) .loadDocument (url, (data, fileURL) =>
51130
51090
  {
@@ -51133,29 +51093,67 @@ Object .assign (FileLoader,
51133
51093
 
51134
51094
  reject ();
51135
51095
  }));
51136
- },
51137
- });
51096
+ }
51097
+
51098
+ static #sceneCache = new Map ();
51099
+
51100
+ static addScene (url, promise)
51101
+ {
51102
+ // Delete last used scene.
51103
+ if (this .#sceneCache .size >= MAX_CACHED_SCENES)
51104
+ this .#sceneCache .delete (this .#sceneCache .keys () .next () .value);
51105
+
51106
+ // Add new scene.
51107
+ this .#sceneCache .set (url, promise);
51108
+ }
51109
+
51110
+ static getScene (url)
51111
+ {
51112
+ const promise = this .#sceneCache .get (url);
51113
+
51114
+ // Move scene to the end of the list.
51115
+ this .#sceneCache .delete (url);
51116
+ this .#sceneCache .set (url, promise);
51117
+
51118
+ return promise;
51119
+ }
51120
+
51121
+ constructor (node, { cacheScene = false, dataAsString = true } = { })
51122
+ {
51123
+ this .node = node;
51124
+ this .cacheScene = cacheScene;
51125
+ this .dataAsString = dataAsString;
51126
+ this .browser = node .getBrowser ();
51127
+ this .executionContext = node .getExecutionContext ();
51128
+ this .target = "";
51129
+ this .url = [ ];
51130
+ this .controller = new AbortController ();
51131
+ this .candidateURL = "";
51132
+ this .resolvedURL = null;
51133
+ this .attempts = [ ];
51134
+ }
51138
51135
 
51139
- Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .prototype),
51140
- {
51141
51136
  isPrivate ()
51142
51137
  {
51143
51138
  // Don't count for loading objects.
51144
51139
  return true;
51145
- },
51140
+ }
51141
+
51146
51142
  abort ()
51147
51143
  {
51148
51144
  this .url .length = 0;
51149
51145
 
51150
51146
  this .controller .abort ();
51151
- },
51147
+ }
51148
+
51152
51149
  getBaseURL ()
51153
51150
  {
51154
51151
  if (this .node instanceof Execution_X3DWorld)
51155
51152
  return this .browser .getBaseURL ();
51156
51153
 
51157
51154
  return this .executionContext .getBaseURL ();
51158
- },
51155
+ }
51156
+
51159
51157
  getTarget (parameters)
51160
51158
  {
51161
51159
  for (const parameter of parameters)
@@ -51170,7 +51168,8 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51170
51168
  }
51171
51169
 
51172
51170
  return "";
51173
- },
51171
+ }
51172
+
51174
51173
  createX3DFromString (worldURL, string = "", resolve, reject)
51175
51174
  {
51176
51175
  try
@@ -51196,12 +51195,14 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51196
51195
  else
51197
51196
  throw error;
51198
51197
  }
51199
- },
51198
+ }
51199
+
51200
51200
  setScene (scene, resolve, reject)
51201
51201
  {
51202
51202
  scene ._loadCount .addInterest ("set_loadCount__", this, scene, resolve, reject);
51203
51203
  scene ._loadCount .addEvent ();
51204
- },
51204
+ }
51205
+
51205
51206
  async set_loadCount__ (scene, resolve, reject)
51206
51207
  {
51207
51208
  try
@@ -51218,7 +51219,7 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51218
51219
  if (this .cacheScene)
51219
51220
  scene [FileLoader_cache] = true;
51220
51221
 
51221
- this .resolve ?.(scene);
51222
+ this .cacheResolve ?.(scene);
51222
51223
  resolve (scene);
51223
51224
  }
51224
51225
  catch (error)
@@ -51231,10 +51232,11 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51231
51232
 
51232
51233
  if (DEVELOPMENT)
51233
51234
  {
51234
- if (this .resolvedURL .protocol !== "data:")
51235
- console .info (`Done loading scene '${decodeURI (this .resolvedURL)}'.`);
51235
+ if (this .resolvedURL ?.protocol !== "data:")
51236
+ console .info (`Done loading scene '${decodeURI (this .resolvedURL ?? "<inline scene>")}'.`);
51236
51237
  }
51237
- },
51238
+ }
51239
+
51238
51240
  createX3DFromURL (url, parameter, callback, bindViewpoint, foreign)
51239
51241
  {
51240
51242
  this .sceneCallback = callback;
@@ -51243,18 +51245,20 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51243
51245
  this .target = this .getTarget (parameter || new x_ite_Fields .MFString ());
51244
51246
 
51245
51247
  return this .loadDocument (url, this .createX3DFromURLAsync .bind (this, callback));
51246
- },
51248
+ }
51249
+
51247
51250
  createX3DFromURLAsync (callback, data)
51248
51251
  {
51249
51252
  if (data === null)
51250
51253
  callback (null);
51251
51254
  else
51252
51255
  this .createX3DFromString (this .resolvedURL, data, callback, this .loadDocumentError .bind (this));
51253
- },
51256
+ }
51257
+
51254
51258
  loadDocument (url, callback)
51255
51259
  {
51256
- this .url = url .slice ();
51257
- this .callback = callback;
51260
+ this .url = url .slice ();
51261
+ this .dataCallback = callback;
51258
51262
 
51259
51263
  this .attempts .length = 0;
51260
51264
 
@@ -51263,7 +51267,8 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51263
51267
 
51264
51268
  this .loadDocumentAsync (String (this .url .shift ()))
51265
51269
  .catch (this .loadDocumentError .bind (this));
51266
- },
51270
+ }
51271
+
51267
51272
  async loadDocumentAsync (url)
51268
51273
  {
51269
51274
  // Not every candidate reaches URL resolution, so resolvedURL stays null until it
@@ -51281,7 +51286,7 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51281
51286
  const result = url .match (/^\s*(?:ecmascript|javascript|vrmlscript):/s);
51282
51287
 
51283
51288
  if (result)
51284
- return await this .callback (url .substring (result [0] .length));
51289
+ return await this .dataCallback (url .substring (result [0] .length));
51285
51290
  }
51286
51291
 
51287
51292
  this .resolvedURL = new URL (url, this .getBaseURL ());
@@ -51300,7 +51305,7 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51300
51305
  data = helper.try (() => decodeURIComponent (data)) ?? data; // Decode data.
51301
51306
  data = data .replace (/^/, ""); // Remove BOM.
51302
51307
 
51303
- return await this .callback (data);
51308
+ return await this .dataCallback (data);
51304
51309
  }
51305
51310
  }
51306
51311
 
@@ -51343,13 +51348,13 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51343
51348
 
51344
51349
  cacheURL .hash = "";
51345
51350
 
51346
- const promise = FileLoader .sceneCache .get (cacheURL .href);
51351
+ const promise = FileLoader .getScene (cacheURL .href);
51347
51352
 
51348
51353
  if (promise)
51349
51354
  {
51350
51355
  const scene = await promise;
51351
51356
 
51352
- scene .setWorldURL (this .resolvedURL .href);
51357
+ scene .setWorldURL (this .resolvedURL);
51353
51358
 
51354
51359
  return this .sceneCallback (scene);
51355
51360
  }
@@ -51357,9 +51362,9 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51357
51362
  {
51358
51363
  const { promise, resolve } = Promise .withResolvers ();
51359
51364
 
51360
- this .resolve = resolve;
51365
+ this .cacheResolve = resolve;
51361
51366
 
51362
- FileLoader .sceneCache .set (cacheURL .href, promise);
51367
+ FileLoader .addScene (cacheURL .href, promise);
51363
51368
  }
51364
51369
  }
51365
51370
 
@@ -51374,12 +51379,13 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51374
51379
  {
51375
51380
  // console .log (mimeType);
51376
51381
 
51377
- if (foreignMimeType .has (mimeType))
51382
+ if (FOREIGN_MIME_TYPES .has (mimeType))
51378
51383
  return this .foreign (this .resolvedURL .href, this .target);
51379
51384
  }
51380
51385
 
51381
- await this .callback (await helper.gunzip (await this .getBlob (response)), this .resolvedURL);
51382
- },
51386
+ await this .dataCallback (await helper.gunzip (await this .getBlob (response)), this .resolvedURL);
51387
+ }
51388
+
51383
51389
  async getBlob (response)
51384
51390
  {
51385
51391
  const contentLength = parseInt (response .headers .get ("x-file-size"))
@@ -51412,14 +51418,16 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51412
51418
  }
51413
51419
 
51414
51420
  return await new Blob (values);
51415
- },
51421
+ }
51422
+
51416
51423
  checkResponse (response)
51417
51424
  {
51418
51425
  if (response .ok)
51419
51426
  return response;
51420
51427
 
51421
51428
  throw new Error (response .statusText || response .status);
51422
- },
51429
+ }
51430
+
51423
51431
  loadDocumentError (error)
51424
51432
  {
51425
51433
  // Output error.
@@ -51435,10 +51443,11 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51435
51443
  }
51436
51444
  else
51437
51445
  {
51438
- this .resolve ?.(null);
51439
- this .callback (null);
51446
+ this .cacheResolve ?.(null);
51447
+ this .dataCallback (null);
51440
51448
  }
51441
- },
51449
+ }
51450
+
51442
51451
  printError (error)
51443
51452
  {
51444
51453
  if (!error)
@@ -51448,7 +51457,7 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51448
51457
  // script URL — have no resolved URL, and are reported by their authored value.
51449
51458
 
51450
51459
  const
51451
- typeName = this .node instanceof Execution_X3DWorld ? "" : ` for ${this .node .getTypeName ()}`,
51460
+ typeName = this .node instanceof Execution_X3DWorld ? "" : `${this .node .getTypeName ()}: `,
51452
51461
  dataURL = this .resolvedURL ?.protocol === "data:",
51453
51462
  resolved = this .resolvedURL && !dataURL ? `${helper.try (() => decodeURI (this .resolvedURL)) ?? this .resolvedURL}` : "",
51454
51463
  subject = !this .candidateURL .length ? "empty URL"
@@ -51462,39 +51471,38 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51462
51471
  // failed only once every candidate has been tried.
51463
51472
 
51464
51473
  if (this .url .length)
51465
- return console .warn (`Couldn't load ${subject}${typeName}, trying URL ${this .attempts .length + 1} of ${this .attempts .length + this .url .length}.`, error);
51474
+ return console .warn (`${typeName}Couldn't load ${subject}, trying URL ${this .attempts .length + 1} of ${this .attempts .length + this .url .length}.`, error);
51466
51475
 
51467
51476
  if (this .attempts .length === 1)
51468
- return console .error (`Couldn't load ${subject}${typeName}.`, error);
51477
+ return console .error (`${typeName}Couldn't load ${subject}.`, error);
51469
51478
 
51470
51479
  // Pass the errors themselves along with the summary, so their stacks and context
51471
51480
  // stay inspectable.
51472
51481
 
51473
- console .error (`Couldn't load any of the ${this .attempts .length} URLs${typeName}, tried in this order:\n`
51482
+ console .error (`${typeName}Couldn't load any of the ${this .attempts .length} URLs, tried in this order:\n`
51474
51483
  + this .attempts
51475
51484
  .map (({ url, resolved, error }, i) =>
51476
51485
  ` ${i + 1}. '${this .truncate (url)}'${resolved && resolved !== url ? ` → ${this .truncate (resolved)}` : ""}: ${this .describe (error)}`)
51477
51486
  .join ("\n") + "\n",
51478
51487
  ... this .attempts .map (({ error }) => error));
51479
- },
51488
+ }
51489
+
51480
51490
  /**
51481
51491
  * Keep diagnostics readable when a candidate is a long data URL.
51482
51492
  */
51483
51493
  truncate (string, length = 120)
51484
51494
  {
51485
51495
  return string .length > length ? `${string .substring (0, length)}…` : string;
51486
- },
51496
+ }
51497
+
51487
51498
  /**
51488
51499
  * Not every thrown value is an Error, so don't summarize one as [object Object].
51489
51500
  */
51490
51501
  describe (error)
51491
51502
  {
51492
51503
  return error ?.message ?? (typeof error === "object" ? helper.try (() => JSON .stringify (error)) : null) ?? String (error);
51493
- },
51494
- });
51495
-
51496
- for (const key of Object .keys (FileLoader .prototype))
51497
- Object .defineProperty (FileLoader .prototype, key, { enumerable: false });
51504
+ }
51505
+ }
51498
51506
 
51499
51507
  const FileLoader_default_ = FileLoader;
51500
51508
  ;
@@ -54659,7 +54667,7 @@ function X3DCoreContext (element)
54659
54667
  {
54660
54668
  const link = document .createElement ("link");
54661
54669
 
54662
- link .integrity = "sha384-ghtkTig2bXHd5VgQPGzWUh9HuPE5g2Mb4S3c3Yap2DRcv41187XE74CWLQUKkwO2";
54670
+ link .integrity = "sha384-r+Z33c1QviLoOgodJzYHRhRIxsvRFnZVj3GbeoohZ//iR51ZK8cK/Jq4mcMi8WV6";
54663
54671
  link .rel = "stylesheet";
54664
54672
  link .crossOrigin = "anonymous";
54665
54673
  link .onload = resolve;
@@ -61893,7 +61901,7 @@ Object .assign (Object .setPrototypeOf (X3DFlyViewer .prototype, Navigation_X3DV
61893
61901
  this .addFly ();
61894
61902
 
61895
61903
  if (browser .getBrowserOption ("Rubberband"))
61896
- browser .finishedEvents () .addInterest ("display", this, MOVE);
61904
+ browser .displayFinishEvents () .addInterest ("display", this, MOVE);
61897
61905
  }
61898
61906
 
61899
61907
  this ._isActive = true;
@@ -61923,7 +61931,7 @@ Object .assign (Object .setPrototypeOf (X3DFlyViewer .prototype, Navigation_X3DV
61923
61931
  this .addPan ();
61924
61932
 
61925
61933
  if (browser .getBrowserOption ("Rubberband"))
61926
- browser .finishedEvents () .addInterest ("display", this, PAN);
61934
+ browser .displayFinishEvents () .addInterest ("display", this, PAN);
61927
61935
 
61928
61936
  this ._isActive = true;
61929
61937
  break;
@@ -62389,9 +62397,9 @@ Object .assign (Object .setPrototypeOf (X3DFlyViewer .prototype, Navigation_X3DV
62389
62397
 
62390
62398
  browser .addBrowserEvent ();
62391
62399
 
62392
- browser .prepareEvents () .removeInterest ("fly", this);
62393
- browser .prepareEvents () .removeInterest ("pan", this);
62394
- browser .finishedEvents () .removeInterest ("display", this);
62400
+ browser .prepareEvents () .removeInterest ("fly", this);
62401
+ browser .prepareEvents () .removeInterest ("pan", this);
62402
+ browser .displayFinishEvents () .removeInterest ("display", this);
62395
62403
 
62396
62404
  this .orientationChaser ._value_changed .removeInterest ("set_orientationOffset__", this);
62397
62405
 
@@ -65047,7 +65055,7 @@ Object .assign (X3DPointingDeviceSensorContext .prototype,
65047
65055
  hit .shapeNode = shapeNode;
65048
65056
 
65049
65057
  hit .viewMatrix .assign (renderObject .getViewpoint () .getViewMatrix ());
65050
- hit .modelViewMatrix .assign (geometryContext .getMatrix ()) .inverse () .multRight (modelViewMatrix);
65058
+ hit .modelViewMatrix .assign (modelViewMatrix);
65051
65059
 
65052
65060
  // A ParticleSystem has only a geometry context.
65053
65061
  // Hit normal must be normalized if used.
@@ -67315,7 +67323,7 @@ vec3 color=vec3(0);vec3 v=normalize(-vertex);
67315
67323
  #if defined(X3D_USE_IBL)||defined(X3D_LIGHTING)
67316
67324
  NormalInfo normalInfo=getNormalInfo(x3d_Material.normalScale);vec3 n=normalInfo.n;float NdotV=clamp(dot(n,v),0.,1.);
67317
67325
  #if defined(X3D_RETROREFLECTION_MATERIAL_EXT)
67318
- vec3 v_retro=reflect(-v,n);float NdotV_retro=clamp(dot(n,v_retro),0.,1.);
67326
+ vec3 v_retro=normalize(reflect(-v,n));
67319
67327
  #endif
67320
67328
  #endif
67321
67329
  MaterialInfo materialInfo;materialInfo.baseColor=baseColor.rgb;materialInfo.ior=1.5;materialInfo.f0_dielectric=vec3(.04);materialInfo.specularWeight=1.;materialInfo.f90=vec3(1);materialInfo.f90_dielectric=materialInfo.f90;
@@ -67343,6 +67351,9 @@ materialInfo=getVolumeInfo(materialInfo);
67343
67351
  #if defined(X3D_IRIDESCENCE_MATERIAL_EXT)
67344
67352
  materialInfo=getIridescenceInfo(materialInfo);
67345
67353
  #endif
67354
+ #if defined(X3D_RETROREFLECTION_MATERIAL_EXT)
67355
+ materialInfo=getRetroreflectionInfo(materialInfo);
67356
+ #endif
67346
67357
  #if defined(X3D_DIFFUSE_TRANSMISSION_MATERIAL_EXT)
67347
67358
  materialInfo=getDiffuseTransmissionInfo(materialInfo);
67348
67359
  #endif
@@ -67352,17 +67363,10 @@ materialInfo=getVolumeScatterInfo(materialInfo);
67352
67363
  #if defined(X3D_ANISOTROPY_MATERIAL_EXT)
67353
67364
  materialInfo=getAnisotropyInfo(materialInfo,normalInfo);
67354
67365
  #endif
67355
- #if defined(X3D_RETROREFLECTION_MATERIAL_EXT)
67356
- materialInfo=getRetroreflectionInfo(materialInfo);
67357
- #endif
67358
67366
  materialInfo.perceptualRoughness=clamp(materialInfo.perceptualRoughness,0.,1.);materialInfo.metallic=clamp(materialInfo.metallic,0.,1.);materialInfo.alphaRoughness=materialInfo.perceptualRoughness*materialInfo.perceptualRoughness;vec3 f_specular_dielectric=vec3(0);vec3 f_specular_metal=vec3(0);vec3 f_diffuse=vec3(0);vec3 f_dielectric_brdf_ibl=vec3(0);vec3 f_metal_brdf_ibl=vec3(0);vec3 f_emissive=vec3(0);vec3 clearcoat_brdf=vec3(0);vec3 f_sheen=vec3(0);vec3 f_specular_transmission=vec3(0);vec3 f_diffuse_transmission=vec3(0);float clearcoatFactor=0.;vec3 clearcoatFresnel=vec3(0);float albedoSheenScaling=1.;float diffuseTransmissionThickness=1.;vec3 diffuseTransmissionIBL=vec3(0);
67359
67367
  #if defined(X3D_USE_IBL)||defined(X3D_LIGHTING)
67360
67368
  #if defined(X3D_IRIDESCENCE_MATERIAL_EXT)
67361
- vec3 iridescenceFresnel_dielectric=evalIridescence(1.,materialInfo.iridescenceIor,NdotV,materialInfo.iridescenceThickness,materialInfo.f0_dielectric);vec3 iridescenceFresnel_metallic=evalIridescence(1.,materialInfo.iridescenceIor,NdotV,materialInfo.iridescenceThickness,baseColor.rgb);
67362
- #if defined(X3D_RETROREFLECTION_MATERIAL_EXT)
67363
- vec3 iridescenceFresnel_dielectric_retro=evalIridescence(1.,materialInfo.iridescenceIor,NdotV_retro,materialInfo.iridescenceThickness,materialInfo.f0_dielectric);vec3 iridescenceFresnel_metallic_retro=evalIridescence(1.,materialInfo.iridescenceIor,NdotV_retro,materialInfo.iridescenceThickness,baseColor.rgb);
67364
- #endif
67365
- if(materialInfo.iridescenceThickness==0.)materialInfo.iridescenceFactor=0.;
67369
+ vec3 iridescenceFresnel_dielectric=evalIridescence(1.,materialInfo.iridescenceIor,NdotV,materialInfo.iridescenceThickness,materialInfo.f0_dielectric);vec3 iridescenceFresnel_metallic=evalIridescence(1.,materialInfo.iridescenceIor,NdotV,materialInfo.iridescenceThickness,baseColor.rgb);if(materialInfo.iridescenceThickness==0.)materialInfo.iridescenceFactor=0.;
67366
67370
  #endif
67367
67371
  #endif
67368
67372
  #if defined(X3D_DIFFUSE_TRANSMISSION_MATERIAL_EXT)
@@ -67400,6 +67404,18 @@ vec3 f_metal_fresnel_ibl=getIBLGGXFresnel(n,v,materialInfo.perceptualRoughness,b
67400
67404
  #if defined(X3D_IRIDESCENCE_MATERIAL_EXT)
67401
67405
  f_metal_brdf_ibl=mix(f_metal_brdf_ibl,f_specular_metal*iridescenceFresnel_metallic,materialInfo.iridescenceFactor);f_dielectric_brdf_ibl=mix(f_dielectric_brdf_ibl,rgb_mix(f_diffuse,f_specular_dielectric,iridescenceFresnel_dielectric),materialInfo.iridescenceFactor);
67402
67406
  #endif
67407
+ #if defined(X3D_RETROREFLECTION_MATERIAL_EXT)
67408
+ #if defined(X3D_ANISOTROPY_MATERIAL_EXT)
67409
+ vec3 f_specular_retro=getIBLRadianceAnisotropy(n,v_retro,materialInfo.perceptualRoughness,materialInfo.anisotropyStrength,materialInfo.anisotropicB);
67410
+ #else
67411
+ vec3 f_specular_retro=getIBLRadianceGGX(n,v_retro,materialInfo.perceptualRoughness);
67412
+ #endif
67413
+ vec3 f_metal_brdf_retro=f_metal_fresnel_ibl*f_specular_retro;vec3 f_dielectric_brdf_retro=mix(f_diffuse,f_specular_retro,f_dielectric_fresnel_ibl);
67414
+ #if defined(X3D_IRIDESCENCE_MATERIAL_EXT)
67415
+ f_metal_brdf_retro=mix(f_metal_brdf_retro,f_specular_retro*iridescenceFresnel_metallic,materialInfo.iridescenceFactor);f_dielectric_brdf_retro=mix(f_dielectric_brdf_retro,rgb_mix(f_diffuse,f_specular_retro,iridescenceFresnel_dielectric),materialInfo.iridescenceFactor);
67416
+ #endif
67417
+ f_metal_brdf_ibl=mix(f_metal_brdf_ibl,f_metal_brdf_retro,materialInfo.retroreflectionFactor);f_dielectric_brdf_ibl=mix(f_dielectric_brdf_ibl,f_dielectric_brdf_retro,materialInfo.retroreflectionFactor);
67418
+ #endif
67403
67419
  #if defined(X3D_CLEARCOAT_MATERIAL_EXT)
67404
67420
  clearcoat_brdf=getIBLRadianceGGX(materialInfo.clearcoatNormal,v,materialInfo.clearcoatRoughness);
67405
67421
  #endif
@@ -67442,15 +67458,15 @@ l_metal_brdf=metal_fresnel*l_specular_metal;l_dielectric_brdf=mix(l_diffuse,l_sp
67442
67458
  l_metal_brdf=mix(l_metal_brdf,l_specular_metal*iridescenceFresnel_metallic,materialInfo.iridescenceFactor);l_dielectric_brdf=mix(l_dielectric_brdf,rgb_mix(l_diffuse,l_specular_dielectric,iridescenceFresnel_dielectric),materialInfo.iridescenceFactor);
67443
67459
  #endif
67444
67460
  #if defined(X3D_RETROREFLECTION_MATERIAL_EXT)
67445
- vec3 h_retro=normalize(l+v_retro);float NdotH_retro=clamp(dot(n,h_retro),0.,1.);float VdotH_retro=clamp(dot(v_retro,h_retro),0.,1.);vec3 dielectric_fresnel_retro=F_Schlick(materialInfo.f0_dielectric*materialInfo.specularWeight,materialInfo.f90_dielectric,abs(VdotH_retro));vec3 metal_fresnel_retro=F_Schlick(baseColor.rgb,vec3(1),abs(VdotH_retro));vec3 l_specular_metal_retro;
67461
+ vec3 h_retro=normalize(l+v_retro);float NdotH_retro=clamp(dot(n,h_retro),0.,1.);float VdotH_retro=clamp(dot(v_retro,h_retro),0.,1.);vec3 dielectric_fresnel_retro=F_Schlick(materialInfo.f0_dielectric*materialInfo.specularWeight,materialInfo.f90_dielectric,abs(VdotH_retro));vec3 metal_fresnel_retro=F_Schlick(baseColor.rgb,vec3(1),abs(VdotH_retro));
67446
67462
  #if defined(X3D_ANISOTROPY_MATERIAL_EXT)
67447
- l_specular_metal_retro=intensity*NdotL*BRDF_specularGGXAnisotropy(materialInfo.alphaRoughness,materialInfo.anisotropyStrength,n,v_retro,l,h_retro,materialInfo.anisotropicT,materialInfo.anisotropicB);
67463
+ vec3 l_specular_retro=intensity*NdotL*BRDF_specularGGXAnisotropy(materialInfo.alphaRoughness,materialInfo.anisotropyStrength,n,v_retro,l,h_retro,materialInfo.anisotropicT,materialInfo.anisotropicB);
67448
67464
  #else
67449
- l_specular_metal_retro=intensity*NdotL*BRDF_specularGGX(materialInfo.alphaRoughness,NdotL,NdotV_retro,NdotH_retro);
67465
+ vec3 l_specular_retro=intensity*NdotL*BRDF_specularGGX(materialInfo.alphaRoughness,NdotL,NdotV,NdotH_retro);
67450
67466
  #endif
67451
- vec3 l_specular_dielectric_retro=l_specular_metal_retro;vec3 l_metal_brdf_retro=metal_fresnel_retro*l_specular_metal_retro;vec3 l_dielectric_brdf_retro=mix(l_diffuse,l_specular_dielectric_retro,dielectric_fresnel_retro);
67467
+ vec3 l_metal_brdf_retro=metal_fresnel_retro*l_specular_retro;vec3 l_dielectric_brdf_retro=mix(l_diffuse,l_specular_retro,dielectric_fresnel_retro);
67452
67468
  #if defined(X3D_IRIDESCENCE_MATERIAL_EXT)
67453
- l_metal_brdf_retro=mix(l_metal_brdf_retro,l_specular_metal*iridescenceFresnel_metallic_retro,materialInfo.iridescenceFactor);l_dielectric_brdf_retro=mix(l_dielectric_brdf_retro,rgb_mix(l_diffuse,l_specular_dielectric,iridescenceFresnel_dielectric_retro),materialInfo.iridescenceFactor);
67469
+ l_metal_brdf_retro=mix(l_metal_brdf_retro,l_specular_retro*iridescenceFresnel_metallic,materialInfo.iridescenceFactor);l_dielectric_brdf_retro=mix(l_dielectric_brdf_retro,rgb_mix(l_diffuse,l_specular_retro,iridescenceFresnel_dielectric),materialInfo.iridescenceFactor);
67454
67470
  #endif
67455
67471
  l_metal_brdf=mix(l_metal_brdf,l_metal_brdf_retro,materialInfo.retroreflectionFactor);l_dielectric_brdf=mix(l_dielectric_brdf,l_dielectric_brdf_retro,materialInfo.retroreflectionFactor);
67456
67472
  #endif
@@ -72957,16 +72973,16 @@ function X3DBrowserContext (element)
72957
72973
  for (const browserContext of browserContexts)
72958
72974
  browserContext .call (this, element);
72959
72975
 
72960
- this .addChildObjects (Base_X3DConstants .outputOnly, "initialized", new x_ite_Fields .SFTime (),
72961
- Base_X3DConstants .outputOnly, "shutdown", new x_ite_Fields .SFTime (),
72962
- Base_X3DConstants .outputOnly, "prepareEvents", new x_ite_Fields .SFTime (),
72963
- Base_X3DConstants .outputOnly, "timePrepareEvents", new x_ite_Fields .SFTime (),
72964
- Base_X3DConstants .outputOnly, "timeEvents", new x_ite_Fields .SFTime (),
72965
- Base_X3DConstants .outputOnly, "cameraEvents", new x_ite_Fields .SFTime (),
72966
- Base_X3DConstants .outputOnly, "sensorEvents", new x_ite_Fields .SFTime (),
72967
- Base_X3DConstants .outputOnly, "displayEvents", new x_ite_Fields .SFTime (),
72968
- Base_X3DConstants .outputOnly, "finishedEvents", new x_ite_Fields .SFTime (),
72969
- Base_X3DConstants .outputOnly, "endEvents", new x_ite_Fields .SFTime ());
72976
+ this .addChildObjects (Base_X3DConstants .outputOnly, "initialized", new x_ite_Fields .SFTime (),
72977
+ Base_X3DConstants .outputOnly, "shutdown", new x_ite_Fields .SFTime (),
72978
+ Base_X3DConstants .outputOnly, "prepareEvents", new x_ite_Fields .SFTime (),
72979
+ Base_X3DConstants .outputOnly, "timePrepareEvents", new x_ite_Fields .SFTime (),
72980
+ Base_X3DConstants .outputOnly, "timeEvents", new x_ite_Fields .SFTime (),
72981
+ Base_X3DConstants .outputOnly, "cameraEvents", new x_ite_Fields .SFTime (),
72982
+ Base_X3DConstants .outputOnly, "sensorEvents", new x_ite_Fields .SFTime (),
72983
+ Base_X3DConstants .outputOnly, "displayEvents", new x_ite_Fields .SFTime (),
72984
+ Base_X3DConstants .outputOnly, "displayFinishEvents", new x_ite_Fields .SFTime (),
72985
+ Base_X3DConstants .outputOnly, "finishEvents", new x_ite_Fields .SFTime ());
72970
72986
 
72971
72987
  this [X3DBrowserContext_tainted] = false;
72972
72988
  this [_previousTime] = 0;
@@ -73020,13 +73036,13 @@ Object .assign (Object .setPrototypeOf (X3DBrowserContext .prototype, Base_X3DBa
73020
73036
  {
73021
73037
  return this ._displayEvents;
73022
73038
  },
73023
- finishedEvents ()
73039
+ displayFinishEvents ()
73024
73040
  {
73025
- return this ._finishedEvents;
73041
+ return this ._displayFinishEvents;
73026
73042
  },
73027
- endEvents ()
73043
+ finishEvents ()
73028
73044
  {
73029
- return this ._endEvents;
73045
+ return this ._finishEvents;
73030
73046
  },
73031
73047
  getBrowser ()
73032
73048
  {
@@ -73072,13 +73088,13 @@ Object .assign (Object .setPrototypeOf (X3DBrowserContext .prototype, Base_X3DBa
73072
73088
  {
73073
73089
  const key = Symbol ();
73074
73090
 
73075
- this .addBrowserEvent ();
73076
-
73077
- this ._endEvents .addFieldCallback (key, () =>
73091
+ this ._finishEvents .addFieldCallback (key, () =>
73078
73092
  {
73079
- this ._endEvents .removeFieldCallback (key);
73093
+ this ._finishEvents .removeFieldCallback (key);
73080
73094
  resolve ();
73081
73095
  });
73096
+
73097
+ this .addBrowserEvent ();
73082
73098
  });
73083
73099
  },
73084
73100
  [_traverse] (now, frame)
@@ -73147,7 +73163,7 @@ Object .assign (Object .setPrototypeOf (X3DBrowserContext .prototype, Base_X3DBa
73147
73163
 
73148
73164
  this [_world] .traverse (Rendering_TraverseType .DISPLAY);
73149
73165
 
73150
- this .addTaintedField (this ._finishedEvents);
73166
+ this .addTaintedField (this ._displayFinishEvents);
73151
73167
  this [X3DBrowserContext_processEvents] ();
73152
73168
 
73153
73169
  for (const frameBuffer of this .getFramebuffers ())
@@ -73155,7 +73171,7 @@ Object .assign (Object .setPrototypeOf (X3DBrowserContext .prototype, Base_X3DBa
73155
73171
 
73156
73172
  this [_displayTime] .stop ();
73157
73173
 
73158
- this .addTaintedField (this ._endEvents);
73174
+ this .addTaintedField (this ._finishEvents);
73159
73175
  this [X3DBrowserContext_processEvents] ();
73160
73176
 
73161
73177
  // Finish
@@ -77083,7 +77099,7 @@ Object .assign (Object .setPrototypeOf (Cone .prototype, Rendering_X3DGeometryNo
77083
77099
  else
77084
77100
  {
77085
77101
  this .getMin () .set (-bottomRadius, y2, -bottomRadius);
77086
- this .getMax () .set ( bottomRadius, y1, bottomRadius);
77102
+ this .getMax () .set ( bottomRadius, y1, bottomRadius);
77087
77103
  }
77088
77104
  },
77089
77105
  });
@@ -77235,19 +77251,16 @@ Object .assign (Object .setPrototypeOf (Cylinder .prototype, Rendering_X3DGeomet
77235
77251
  this .getMin () .set (0);
77236
77252
  this .getMax () .set (0);
77237
77253
  }
77238
-
77239
77254
  else if (!this ._top .getValue () && !this ._side .getValue ())
77240
77255
  {
77241
77256
  this .getMin () .set (-radius, y2, -radius);
77242
77257
  this .getMax () .set ( radius, y2, radius);
77243
77258
  }
77244
-
77245
77259
  else if (!this ._bottom .getValue () && !this ._side .getValue ())
77246
77260
  {
77247
77261
  this .getMin () .set (-radius, y1, -radius);
77248
77262
  this .getMax () .set ( radius, y1, radius);
77249
77263
  }
77250
-
77251
77264
  else
77252
77265
  {
77253
77266
  this .getMin () .set (-radius, y2, -radius);
@@ -84075,23 +84088,25 @@ Object .assign (Object .setPrototypeOf (InlineGeometry .prototype, Rendering_X3D
84075
84088
  geometryNode ._normalPerVertex = smooth;
84076
84089
  }
84077
84090
  },
84078
- unloadData ()
84091
+ unlockGeometry ()
84079
84092
  {
84080
84093
  if (this .geometryNode)
84081
84094
  this .geometryNode [_lock] = false;
84082
-
84095
+ },
84096
+ unloadData ()
84097
+ {
84083
84098
  this .fileLoader ?.abort ();
84099
+ this .unlockGeometry ();
84084
84100
  this .setInternalScene (null);
84085
84101
  },
84086
84102
  loadData ()
84087
84103
  {
84088
84104
  const cache = this .getBrowser () .getBrowserOption ("Cache");
84089
84105
 
84090
- if (this .geometryNode)
84091
- this .geometryNode [_lock] = false;
84092
-
84093
84106
  this .fileLoader ?.abort ();
84094
84107
 
84108
+ this .unlockGeometry ();
84109
+
84095
84110
  this .fileLoader = new InputOutput_FileLoader (this, { cacheScene: cache })
84096
84111
  .createX3DFromURL (this ._url, null, this .setInternalScene .bind (this));
84097
84112
  },
@@ -84214,8 +84229,7 @@ Object .assign (Object .setPrototypeOf (InlineGeometry .prototype, Rendering_X3D
84214
84229
  { },
84215
84230
  dispose ()
84216
84231
  {
84217
- if (this .geometryNode)
84218
- this .geometryNode [_lock] = false;
84232
+ this .unlockGeometry ();
84219
84233
 
84220
84234
  Networking_X3DUrlObject .prototype .dispose .call (this);
84221
84235
  Rendering_X3DGeometryNode .prototype .dispose .call (this);
@@ -91526,8 +91540,8 @@ const PNGMedia_default_ = PNGMedia;
91526
91540
 
91527
91541
  /* harmony default export */ const Texturing_PNGMedia = (x_ite_Namespace .add ("PNGMedia", PNGMedia_default_));
91528
91542
  ;// ./src/x_ite/Components/Texturing/MovieTexture.js
91529
- /* provided dependency */ var SuperGif = __webpack_require__(16);
91530
- /* provided dependency */ var APNG = __webpack_require__(698);
91543
+ /* provided dependency */ var SuperGif = __webpack_require__(802);
91544
+ /* provided dependency */ var APNG = __webpack_require__(528);
91531
91545
 
91532
91546
 
91533
91547
 
@@ -94171,7 +94185,7 @@ const QuickSort_default_ = QuickSort;
94171
94185
 
94172
94186
  /* harmony default export */ const Algorithms_QuickSort = (x_ite_Namespace .add ("QuickSort", QuickSort_default_));
94173
94187
  ;// ./src/lib/libtess.js
94174
- /* provided dependency */ var libtess_libtess = __webpack_require__(402);
94188
+ /* provided dependency */ var libtess_libtess = __webpack_require__(628);
94175
94189
  const libtess_default_ = libtess_libtess;
94176
94190
  ;
94177
94191