x_ite 16.1.2 → 16.2.0

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/X3DUOM.xml +10 -0
  3. package/dist/assets/components/AnnotationComponent.js +17 -38
  4. package/dist/assets/components/AnnotationComponent.min.js +2 -2
  5. package/dist/assets/components/CADGeometryComponent.js +17 -38
  6. package/dist/assets/components/CADGeometryComponent.min.js +2 -2
  7. package/dist/assets/components/CubeMapTexturingComponent.js +17 -38
  8. package/dist/assets/components/CubeMapTexturingComponent.min.js +2 -2
  9. package/dist/assets/components/DISComponent.js +17 -38
  10. package/dist/assets/components/DISComponent.min.js +2 -2
  11. package/dist/assets/components/EventUtilitiesComponent.js +17 -38
  12. package/dist/assets/components/EventUtilitiesComponent.min.js +2 -2
  13. package/dist/assets/components/GaussianSplatsComponent.js +17 -38
  14. package/dist/assets/components/GaussianSplatsComponent.min.js +2 -2
  15. package/dist/assets/components/Geometry2DComponent.js +17 -38
  16. package/dist/assets/components/Geometry2DComponent.min.js +2 -2
  17. package/dist/assets/components/Geometry3DComponent.js +17 -38
  18. package/dist/assets/components/Geometry3DComponent.min.js +2 -2
  19. package/dist/assets/components/GeospatialComponent.js +17 -38
  20. package/dist/assets/components/GeospatialComponent.min.js +2 -2
  21. package/dist/assets/components/HAnimComponent.js +17 -38
  22. package/dist/assets/components/HAnimComponent.min.js +2 -2
  23. package/dist/assets/components/KeyDeviceSensorComponent.js +17 -38
  24. package/dist/assets/components/KeyDeviceSensorComponent.min.js +2 -2
  25. package/dist/assets/components/LayoutComponent.js +17 -38
  26. package/dist/assets/components/LayoutComponent.min.js +2 -2
  27. package/dist/assets/components/NURBSComponent.js +18 -39
  28. package/dist/assets/components/NURBSComponent.min.js +2 -2
  29. package/dist/assets/components/ParticleSystemsComponent.js +17 -38
  30. package/dist/assets/components/ParticleSystemsComponent.min.js +2 -2
  31. package/dist/assets/components/PickingComponent.js +17 -38
  32. package/dist/assets/components/PickingComponent.min.js +2 -2
  33. package/dist/assets/components/RigidBodyPhysicsComponent.js +28 -39
  34. package/dist/assets/components/RigidBodyPhysicsComponent.min.js +2 -2
  35. package/dist/assets/components/ScriptingComponent.js +17 -38
  36. package/dist/assets/components/ScriptingComponent.min.js +2 -2
  37. package/dist/assets/components/TextComponent.js +17 -38
  38. package/dist/assets/components/TextComponent.min.js +2 -2
  39. package/dist/assets/components/TextureProjectionComponent.js +17 -38
  40. package/dist/assets/components/TextureProjectionComponent.min.js +2 -2
  41. package/dist/assets/components/Texturing3DComponent.js +27 -46
  42. package/dist/assets/components/Texturing3DComponent.min.js +2 -2
  43. package/dist/assets/components/VolumeRenderingComponent.js +17 -38
  44. package/dist/assets/components/VolumeRenderingComponent.min.js +2 -2
  45. package/dist/assets/components/WebXRComponent.js +17 -38
  46. package/dist/assets/components/WebXRComponent.min.js +2 -2
  47. package/dist/assets/components/X_ITEComponent.js +22 -39
  48. package/dist/assets/components/X_ITEComponent.min.js +2 -2
  49. package/dist/example.html +1 -1
  50. package/dist/x_ite.css +1 -1
  51. package/dist/x_ite.d.ts +129 -8
  52. package/dist/x_ite.js +443 -264
  53. package/dist/x_ite.min.js +2 -2
  54. package/dist/x_ite.min.mjs +2 -2
  55. package/dist/x_ite.mjs +443 -264
  56. package/dist/x_ite.zip +0 -0
  57. package/package.json +8 -8
package/dist/x_ite.js CHANGED
@@ -1,4 +1,4 @@
1
- /* X_ITE v16.1.2 */
1
+ /* X_ITE v16.2.0 */
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
- /***/ 603
15
+ /***/ 627
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
- /***/ 777
1020
+ /***/ 249
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
- /***/ 457
2016
+ /***/ 289
2017
2017
  (module) {
2018
2018
 
2019
2019
  /**
@@ -6820,48 +6820,27 @@ if (true) {
6820
6820
  /******/
6821
6821
  /************************************************************************/
6822
6822
  /******/ /* webpack/runtime/define property getters */
6823
- /******/ (() => {
6824
- /******/ // define getter/value functions for harmony exports
6825
- /******/ __webpack_require__.d = (exports, definition) => {
6826
- /******/ if(Array.isArray(definition)) {
6827
- /******/ var i = 0;
6828
- /******/ while(i < definition.length) {
6829
- /******/ var key = definition[i++];
6830
- /******/ var binding = definition[i++];
6831
- /******/ if(!__webpack_require__.o(exports, key)) {
6832
- /******/ if(binding === 0) {
6833
- /******/ Object.defineProperty(exports, key, { enumerable: true, value: definition[i++] });
6834
- /******/ } else {
6835
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: binding });
6836
- /******/ }
6837
- /******/ } else if(binding === 0) { i++; }
6838
- /******/ }
6839
- /******/ } else {
6840
- /******/ for(var key in definition) {
6841
- /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
6842
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
6843
- /******/ }
6844
- /******/ }
6823
+ /******/ // define getter/value functions for harmony exports
6824
+ /******/ __webpack_require__.d = (exports, definition) => {
6825
+ /******/ for(var key in definition) {
6826
+ /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
6827
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
6845
6828
  /******/ }
6846
- /******/ };
6847
- /******/ })();
6829
+ /******/ }
6830
+ /******/ };
6848
6831
  /******/
6849
6832
  /******/ /* webpack/runtime/global */
6850
- /******/ (() => {
6851
- /******/ __webpack_require__.g = (function() {
6852
- /******/ if (typeof globalThis === 'object') return globalThis;
6853
- /******/ try {
6854
- /******/ return this || new Function('return this')();
6855
- /******/ } catch (e) {
6856
- /******/ if (typeof window === 'object') return window;
6857
- /******/ }
6858
- /******/ })();
6833
+ /******/ __webpack_require__.g = (function() {
6834
+ /******/ if (typeof globalThis === 'object') return globalThis;
6835
+ /******/ try {
6836
+ /******/ return this || new Function('return this')();
6837
+ /******/ } catch (e) {
6838
+ /******/ if (typeof window === 'object') return window;
6839
+ /******/ }
6859
6840
  /******/ })();
6860
6841
  /******/
6861
6842
  /******/ /* webpack/runtime/hasOwnProperty shorthand */
6862
- /******/ (() => {
6863
- /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
6864
- /******/ })();
6843
+ /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop));
6865
6844
  /******/
6866
6845
  /************************************************************************/
6867
6846
  let __webpack_exports__ = {};
@@ -6881,7 +6860,7 @@ Object .defineProperty (Namespace, "add",
6881
6860
  {
6882
6861
  value (name, module)
6883
6862
  {
6884
- if (Namespace .hasOwnProperty (name))
6863
+ if (Object .hasOwn (Namespace, name))
6885
6864
  {
6886
6865
  console .error (new Error (`Namespace: "${name}" already exists.`));
6887
6866
  return module;
@@ -6911,18 +6890,22 @@ Object .defineProperty (X3DConstants, "addConstant",
6911
6890
  {
6912
6891
  value (name, value)
6913
6892
  {
6914
- if (this .hasOwnProperty (name) || this .hasOwnProperty (value))
6893
+ if (Object .hasOwn (this, name) || Object .hasOwn (this, value))
6915
6894
  return;
6916
6895
 
6917
- Object .defineProperty (this, name,
6918
- {
6919
- value: value ?? ++ CONSTANT_VALUE,
6920
- enumerable: true,
6921
- });
6896
+ value ??= ++ CONSTANT_VALUE;
6922
6897
 
6923
- Object .defineProperty (this, this [name],
6898
+ Object .defineProperties (this,
6924
6899
  {
6925
- value: name,
6900
+ [name]:
6901
+ {
6902
+ value: value,
6903
+ enumerable: true,
6904
+ },
6905
+ [value]:
6906
+ {
6907
+ value: name,
6908
+ },
6926
6909
  });
6927
6910
  },
6928
6911
  });
@@ -7114,10 +7097,6 @@ const Algorithm =
7114
7097
  n = (n & 0x33333333) + ((n >>> 2) & 0x33333333);
7115
7098
  return ((n + (n >>> 4) & 0xF0F0F0F) * 0x1010101) >>> 24;
7116
7099
  },
7117
- cmp (lhs, rhs)
7118
- {
7119
- return lhs > rhs ? 1 : lhs < rhs ? -1 : 0;
7120
- },
7121
7100
  less (lhs, rhs)
7122
7101
  {
7123
7102
  return lhs < rhs;
@@ -7130,19 +7109,17 @@ const Algorithm =
7130
7109
  {
7131
7110
  // https://en.cppreference.com/w/cpp/algorithm/lower_bound
7132
7111
 
7133
- let
7134
- index = 0,
7135
- step = 0,
7136
- count = last - first;
7112
+ let count = last - first;
7137
7113
 
7138
7114
  while (count > 0)
7139
7115
  {
7140
- step = count >>> 1;
7141
- index = first + step;
7116
+ const
7117
+ step = count >>> 1,
7118
+ index = first + step;
7142
7119
 
7143
7120
  if (comp (array [index], value))
7144
7121
  {
7145
- first = ++ index;
7122
+ first = index + 1;
7146
7123
  count -= step + 1;
7147
7124
  }
7148
7125
  else
@@ -7157,15 +7134,13 @@ const Algorithm =
7157
7134
  {
7158
7135
  // https://en.cppreference.com/w/cpp/algorithm/upper_bound
7159
7136
 
7160
- let
7161
- index = 0,
7162
- step = 0,
7163
- count = last - first;
7137
+ let count = last - first;
7164
7138
 
7165
7139
  while (count > 0)
7166
7140
  {
7167
- step = count >>> 1;
7168
- index = first + step;
7141
+ const
7142
+ step = count >>> 1,
7143
+ index = first + step;
7169
7144
 
7170
7145
  if (comp (value, array [index]))
7171
7146
  {
@@ -7173,7 +7148,7 @@ const Algorithm =
7173
7148
  }
7174
7149
  else
7175
7150
  {
7176
- first = ++ index;
7151
+ first = index + 1;
7177
7152
  count -= step + 1;
7178
7153
  }
7179
7154
  }
@@ -14394,10 +14369,10 @@ const SFNode_handler =
14394
14369
 
14395
14370
  if (field)
14396
14371
  {
14397
- // Specification conform would be: accessType & X3DConstants .outputOnly.
14398
- // But we allow read access to plain fields, too.
14372
+ // Specification conform would be: `accessType & X3DConstants .outputOnly`.
14373
+ // However, we also allow read access to initializeOnly fields.
14399
14374
  if (field .getAccessType () === Base_X3DConstants .inputOnly)
14400
- return undefined;
14375
+ return;
14401
14376
 
14402
14377
  return field .valueOf ();
14403
14378
  }
@@ -14521,16 +14496,14 @@ Object .assign (Object .setPrototypeOf (SFNode .prototype, Base_X3DField .protot
14521
14496
  {
14522
14497
  const target = this [_target];
14523
14498
 
14524
- if (node)
14525
- return target .getValue () === node .getValue ();
14499
+ if (node instanceof SFNode)
14500
+ return target .getValue () === node [_target] .getValue ();
14526
14501
 
14527
- return target .getValue () === null;
14502
+ return target .getValue () === node;
14528
14503
  },
14529
14504
  isDefaultValue ()
14530
14505
  {
14531
- const target = this [_target];
14532
-
14533
- return target .getValue () === null;
14506
+ return this [_target] .getValue () === null;
14534
14507
  },
14535
14508
  set (node)
14536
14509
  {
@@ -15752,6 +15725,17 @@ Object .defineProperties (X3DArrayField,
15752
15725
  for (const v of Array .from (... args))
15753
15726
  target .push (v);
15754
15727
 
15728
+ return array;
15729
+ },
15730
+ },
15731
+ fromArray:
15732
+ {
15733
+ value (values)
15734
+ {
15735
+ const array = new constructor ();
15736
+
15737
+ array .setValue (values);
15738
+
15755
15739
  return array;
15756
15740
  },
15757
15741
  },
@@ -17077,7 +17061,7 @@ Object .assign (Object .setPrototypeOf (X3DTypedArrayField .prototype, Base_X3DA
17077
17061
 
17078
17062
  const cmp = compareFn
17079
17063
  ? (a, b) => compareFn (valueType (a), valueType (b))
17080
- : Math_Algorithm .cmp;
17064
+ : undefined;
17081
17065
 
17082
17066
  target .set (array .subarray (0, length) .sort (cmp));
17083
17067
  }
@@ -17702,6 +17686,49 @@ Object .assign (Object .setPrototypeOf (MFImage .prototype, Base_X3DObjectArrayF
17702
17686
  {
17703
17687
  return Fields_SFImage;
17704
17688
  },
17689
+ setValue (value)
17690
+ {
17691
+ if (value .length && !(value [0] instanceof Fields_SFImage))
17692
+ {
17693
+ const
17694
+ target = this .getTarget (),
17695
+ array = target .getValue ();
17696
+
17697
+ this .length = 0;
17698
+
17699
+ while (value .length)
17700
+ {
17701
+ const
17702
+ width = value .shift (),
17703
+ height = value .shift (),
17704
+ comp = value .shift (),
17705
+ pixels = value .splice (0, width * height),
17706
+ field = new Fields_SFImage (width, height, comp, pixels);
17707
+
17708
+ target .addChildObject (field);
17709
+ array .push (field);
17710
+ }
17711
+
17712
+ target .addEvent ();
17713
+ }
17714
+ else
17715
+ {
17716
+ Base_X3DObjectArrayField .prototype .setValue .call (this, value);
17717
+ }
17718
+ },
17719
+ flat ()
17720
+ {
17721
+ return Array .from (this, element => Array .from (element)) .flat ();
17722
+ },
17723
+ sort (compareFn)
17724
+ {
17725
+ const target = this .getTarget ();
17726
+
17727
+ target .getValue () .sort (compareFn);
17728
+ target .addEvent ();
17729
+
17730
+ return this;
17731
+ },
17705
17732
  });
17706
17733
 
17707
17734
  for (const key of Object .keys (MFImage .prototype))
@@ -18858,7 +18885,7 @@ const Legacy_default_ = Legacy;
18858
18885
 
18859
18886
  /* harmony default export */ const Browser_Legacy = (x_ite_Namespace .add ("Legacy", Legacy_default_));
18860
18887
  ;// ./src/x_ite/BROWSER_VERSION.js
18861
- const BROWSER_VERSION_default_ = "16.1.2";
18888
+ const BROWSER_VERSION_default_ = "16.2.0";
18862
18889
  ;
18863
18890
 
18864
18891
  /* harmony default export */ const BROWSER_VERSION = (x_ite_Namespace .add ("BROWSER_VERSION", BROWSER_VERSION_default_));
@@ -18968,37 +18995,28 @@ const dictionary_default_ = [
18968
18995
  {
18969
18996
  en: "fps",
18970
18997
  de: "BpS",
18971
- fr: "",
18972
18998
  },
18973
18999
  {
18974
19000
  en: "Speed",
18975
19001
  de: "Geschwindigkeit",
18976
- fr: "Vélocité",
19002
+ fr: "Vitesse",
18977
19003
  },
18978
19004
  {
18979
19005
  en: "m/s",
18980
- de: "",
18981
- fr: "",
18982
19006
  },
18983
19007
  {
18984
19008
  en: "km/h",
18985
- de: "",
18986
- fr: "",
18987
19009
  },
18988
19010
  {
18989
19011
  en: "Browser",
18990
- de: "",
18991
19012
  fr: "Navigateur",
18992
19013
  },
18993
19014
  {
18994
19015
  en: "ms",
18995
- de: "",
18996
- fr: "",
18997
19016
  },
18998
19017
  {
18999
19018
  en: "X3D total",
19000
19019
  de: "X3D gesamt",
19001
- fr: "X3D total",
19002
19020
  },
19003
19021
  {
19004
19022
  en: "Event Processing",
@@ -19023,12 +19041,12 @@ const dictionary_default_ = [
19023
19041
  {
19024
19042
  en: "Rendering",
19025
19043
  de: "Rendering",
19026
- fr: "Rendement",
19044
+ fr: "Rendu",
19027
19045
  },
19028
19046
  {
19029
19047
  en: "Number of Primitives",
19030
19048
  de: "Anzahl der Grundobjekte",
19031
- fr: "Nombre d'Objets de Base",
19049
+ fr: "Nombre de Primitives",
19032
19050
  },
19033
19051
  {
19034
19052
  en: "Number of Shapes",
@@ -19038,12 +19056,12 @@ const dictionary_default_ = [
19038
19056
  {
19039
19057
  en: "Number of Sensors",
19040
19058
  de: "Anzahl der Sensoren",
19041
- fr: "Nombre de Senseurs",
19059
+ fr: "Nombre de Capteurs",
19042
19060
  },
19043
19061
  {
19044
19062
  en: "Browser Timings",
19045
19063
  de: "Zeitberechnung",
19046
- fr: "Calcul du Temps",
19064
+ fr: "Temps du Navigateur",
19047
19065
  },
19048
19066
  {
19049
19067
  en: "Viewpoints",
@@ -19053,7 +19071,7 @@ const dictionary_default_ = [
19053
19071
  {
19054
19072
  en: "Available Viewers",
19055
19073
  de: "Verfügbare Betrachter",
19056
- fr: "Visionneurs disponibles",
19074
+ fr: "Visionneurs disponibles",
19057
19075
  },
19058
19076
  {
19059
19077
  en: "Straighten Horizon",
@@ -19063,17 +19081,17 @@ const dictionary_default_ = [
19063
19081
  {
19064
19082
  en: "Primitive Quality",
19065
19083
  de: "Qualität der Grundobjekte",
19066
- fr: "Qualité des Objets simples",
19084
+ fr: "Qualité des Primitives",
19067
19085
  },
19068
19086
  {
19069
19087
  en: "High",
19070
19088
  de: "Hoch",
19071
- fr: "Haut",
19089
+ fr: "Élevée",
19072
19090
  },
19073
19091
  {
19074
19092
  en: "high",
19075
19093
  de: "hoch",
19076
- fr: "haut",
19094
+ fr: "élevée",
19077
19095
  },
19078
19096
  {
19079
19097
  en: "Medium",
@@ -19097,18 +19115,18 @@ const dictionary_default_ = [
19097
19115
  },
19098
19116
  {
19099
19117
  en: "Texture Quality",
19100
- de: "Textur Qualität",
19118
+ de: "Texturqualität",
19101
19119
  fr: "Qualité des Textures",
19102
19120
  },
19103
19121
  {
19104
19122
  en: "Display Rubberband",
19105
19123
  de: "Gummiband anzeigen",
19106
- fr: "Présenter le Bande élastique",
19124
+ fr: "Afficher la Sélection élastique",
19107
19125
  },
19108
19126
  {
19109
19127
  en: "Rubberband",
19110
19128
  de: "Gummiband",
19111
- fr: "Bande élastique",
19129
+ fr: "Sélection élastique",
19112
19130
  },
19113
19131
  {
19114
19132
  en: "on",
@@ -19123,22 +19141,22 @@ const dictionary_default_ = [
19123
19141
  {
19124
19142
  en: "Mute Browser",
19125
19143
  de: "Browser stumm schalten",
19126
- fr: "Rendre Navigateur muet",
19144
+ fr: "Couper le Son du Navigateur",
19127
19145
  },
19128
19146
  {
19129
19147
  en: "Browser muted",
19130
- de: "Browser stumm geschalten",
19131
- fr: "Navigateur muet",
19148
+ de: "Browser stummgeschaltet",
19149
+ fr: "Son du Navigateur coupé",
19132
19150
  },
19133
19151
  {
19134
19152
  en: "Browser unmuted",
19135
- de: "Browser Ton an",
19136
- fr: "Son de Navigateur réactivé",
19153
+ de: "Browserton eingeschaltet",
19154
+ fr: "Son du Navigateur rétabli",
19137
19155
  },
19138
19156
  {
19139
19157
  en: "Leave Fullscreen",
19140
19158
  de: "Vollbild verlassen",
19141
- fr: "Laisser le plein Écran",
19159
+ fr: "Quitter le Plein Écran",
19142
19160
  },
19143
19161
  {
19144
19162
  en: "Fullscreen",
@@ -19183,7 +19201,6 @@ const dictionary_default_ = [
19183
19201
  {
19184
19202
  en: "Points",
19185
19203
  de: "Punkte",
19186
- fr: "",
19187
19204
  },
19188
19205
  {
19189
19206
  en: "Flat",
@@ -19192,7 +19209,7 @@ const dictionary_default_ = [
19192
19209
  },
19193
19210
  {
19194
19211
  en: "Wireframe",
19195
- de: "Drahtgittermodel",
19212
+ de: "Drahtgittermodell",
19196
19213
  fr: "Image filaire",
19197
19214
  },
19198
19215
  {
@@ -19213,7 +19230,7 @@ const dictionary_default_ = [
19213
19230
  {
19214
19231
  en: "Failed loading world.",
19215
19232
  de: "Laden der Dateien fehlgeschlagen.",
19216
- fr: "Le chargement des Fichiers a échoué.",
19233
+ fr: "Le chargement des fichiers a échoué.",
19217
19234
  },
19218
19235
  {
19219
19236
  en: "Show World Info",
@@ -19223,12 +19240,11 @@ const dictionary_default_ = [
19223
19240
  {
19224
19241
  en: "Viewpoint is copied to clipboard.",
19225
19242
  de: "Ansichtspunkt wurde in die Zwischenablage kopiert.",
19226
- fr: "Le point de Vue est copié dans le Presse-Papiers.",
19243
+ fr: "Le point de vue a été copié dans le presse-papiers.",
19227
19244
  },
19228
19245
  {
19229
19246
  en: "Animations",
19230
- de: "Animationen",
19231
- fr: "",
19247
+ fr: "Séquences animées",
19232
19248
  },
19233
19249
  {
19234
19250
  en: "All",
@@ -19242,18 +19258,18 @@ const dictionary_default_ = [
19242
19258
  },
19243
19259
  {
19244
19260
  en: "Start WebXR session.",
19245
- de: "Starte eine WebXR Session.",
19246
- fr: "Démarrez une session WebXR.",
19261
+ de: "WebXR-Sitzung starten.",
19262
+ fr: "Démarrer une session WebXR.",
19247
19263
  },
19248
19264
  {
19249
19265
  en: "Stop WebXR session.",
19250
- de: "Beende die WebXR Session.",
19251
- fr: "Terminez la session WebXR.",
19266
+ de: "WebXR-Sitzung beenden.",
19267
+ fr: "Terminer la session WebXR.",
19252
19268
  },
19253
19269
  {
19254
19270
  en: "Activate sound.",
19255
- de: "Activiere den Ton.",
19256
- fr: "Activez le son.",
19271
+ de: "Ton aktivieren.",
19272
+ fr: "Activer le son.",
19257
19273
  },
19258
19274
  {
19259
19275
  en: "Points; Lines; Triangles",
@@ -19262,7 +19278,7 @@ const dictionary_default_ = [
19262
19278
  },
19263
19279
  {
19264
19280
  en: "Opaque Shapes + Transparent Shapes",
19265
- de: "opaque Formen + transparente Formen",
19281
+ de: "Undurchsichtige Formen + Transparente Formen",
19266
19282
  fr: "Formes opaques + Formes transparentes",
19267
19283
  },
19268
19284
  ];
@@ -19797,13 +19813,15 @@ Object .assign (Object .setPrototypeOf (BrowserOptions .prototype, Base_X3DBaseN
19797
19813
  this ._Exposure .addInterest ("set_Exposure__", this);
19798
19814
  this ._LogarithmicDepthBuffer .addInterest ("set_LogarithmicDepthBuffer__", this);
19799
19815
  this ._Multisampling .addInterest ("set_Multisampling__", this);
19800
- this ._Mute .addInterest ("set_Mute__", this);
19816
+ this ._Mute .addInterest ("set_SoundIntensity__", this);
19801
19817
  this ._OrderIndependentTransparency .addInterest ("set_OrderIndependentTransparency__", this);
19818
+ this ._SoundIntensity .addInterest ("set_SoundIntensity__", this);
19802
19819
  this ._Timings .addInterest ("set_Timings__", this);
19803
19820
  this ._XRSessionMode .addInterest ("set_XRSessionMode__", this);
19804
19821
 
19805
19822
  this .set_Antialiased__ (this ._Antialiased);
19806
19823
  this .set_Shading__ (this ._Shading);
19824
+ this .set_SoundIntensity__ ();
19807
19825
  this .set_AutoUpdate__ (this ._AutoUpdate);
19808
19826
  this .set_ContentScale__ (this ._ContentScale);
19809
19827
  this .set_DisplayColorSpace (this ._DisplayColorSpace);
@@ -19972,13 +19990,6 @@ Object .assign (Object .setPrototypeOf (BrowserOptions .prototype, Base_X3DBaseN
19972
19990
  browser .setShading (this .shading);
19973
19991
  };
19974
19992
  })(),
19975
- set_StraightenHorizon__ (straightenHorizon)
19976
- {
19977
- this .localStorage .StraightenHorizon = straightenHorizon .getValue ();
19978
-
19979
- if (straightenHorizon .getValue ())
19980
- this .getBrowser () .getActiveLayer () ?.straightenView ();
19981
- },
19982
19993
  set_AutoUpdate__ (autoUpdate)
19983
19994
  {
19984
19995
  document .removeEventListener ("visibilitychange", this .checkUpdateListener);
@@ -20115,20 +20126,25 @@ Object .assign (Object .setPrototypeOf (BrowserOptions .prototype, Base_X3DBaseN
20115
20126
 
20116
20127
  browser .reshape ();
20117
20128
  },
20118
- set_Mute__ (mute)
20129
+ set_OrderIndependentTransparency__ ()
20130
+ {
20131
+ this .getBrowser () .reshape ();
20132
+ },
20133
+ set_SoundIntensity__ ()
20119
20134
  {
20120
20135
  const
20121
- browser = this .getBrowser (),
20122
- audioContext = browser .getAudioContext ();
20136
+ unmute = !this ._Mute .getValue (),
20137
+ gain = unmute * Math_Algorithm .clamp (this ._SoundIntensity .getValue (), 0, 1);
20123
20138
 
20124
- if (mute .getValue ())
20125
- browser .stopAudioElement (audioContext, "suspend");
20126
- else
20127
- browser .startAudioElement (audioContext, "resume");
20139
+ for (const soundNode of this .getBrowser () .getSoundDestinations ())
20140
+ soundNode .getSoundDestination () .gain .value = gain;
20128
20141
  },
20129
- set_OrderIndependentTransparency__ ()
20142
+ set_StraightenHorizon__ (straightenHorizon)
20130
20143
  {
20131
- this .getBrowser () .reshape ();
20144
+ this .localStorage .StraightenHorizon = straightenHorizon .getValue ();
20145
+
20146
+ if (straightenHorizon .getValue ())
20147
+ this .getBrowser () .getActiveLayer () ?.straightenView ();
20132
20148
  },
20133
20149
  set_Timings__ (timings)
20134
20150
  {
@@ -20181,6 +20197,7 @@ Object .defineProperties (BrowserOptions,
20181
20197
  new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "Mute", new x_ite_Fields .SFBool ()),
20182
20198
  new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "Notifications", new x_ite_Fields .SFBool (true)),
20183
20199
  new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "OrderIndependentTransparency", new x_ite_Fields .SFBool ()),
20200
+ new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "SoundIntensity", new x_ite_Fields .SFFloat (1)),
20184
20201
  new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "StraightenHorizon", new x_ite_Fields .SFBool (true)),
20185
20202
  new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "TextCompression", new x_ite_Fields .SFString ("CHAR_SPACING")),
20186
20203
  new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "Timings", new x_ite_Fields .SFBool ()),
@@ -20314,6 +20331,7 @@ Object .defineProperties (RenderingProperties,
20314
20331
  new Base_X3DFieldDefinition (Base_X3DConstants .outputOnly, "MaxSamples", new x_ite_Fields .SFInt32 (0)),
20315
20332
  new Base_X3DFieldDefinition (Base_X3DConstants .outputOnly, "Multisampling", new x_ite_Fields .SFInt32 (4)),
20316
20333
  new Base_X3DFieldDefinition (Base_X3DConstants .outputOnly, "PixelsPerPoint", new x_ite_Fields .SFDouble (1)),
20334
+ new Base_X3DFieldDefinition (Base_X3DConstants .outputOnly, "SoundDestinations", new x_ite_Fields .SFInt32 ()),
20317
20335
  new Base_X3DFieldDefinition (Base_X3DConstants .outputOnly, "XRSession", new x_ite_Fields .SFBool ()),
20318
20336
  ]),
20319
20337
  enumerable: true,
@@ -21557,7 +21575,7 @@ Object .assign (Object .setPrototypeOf (X3DNode .prototype, Base_X3DBaseNode .pr
21557
21575
  {
21558
21576
  destinationField .addReference (instance .getField (originalReference .getName ()));
21559
21577
  }
21560
- catch (error)
21578
+ catch
21561
21579
  {
21562
21580
  console .error (`No reference '${originalReference .getName ()}' inside execution context ${instance .getTypeName ()} '${instance .getName ()}'.`);
21563
21581
  }
@@ -21986,7 +22004,7 @@ Object .assign (Object .setPrototypeOf (X3DNode .prototype, Base_X3DBaseNode .pr
21986
22004
  [_metaDataCallbacks]: new Map (),
21987
22005
  addMetaDataCallback (key, path, callback)
21988
22006
  {
21989
- if (!this .hasOwnProperty (_metaDataCallbacks))
22007
+ if (!Object .hasOwn (this, _metaDataCallbacks))
21990
22008
  this [_metaDataCallbacks] = new Map ();
21991
22009
 
21992
22010
  let map = this [_metaDataCallbacks] .get (path);
@@ -24881,7 +24899,7 @@ Object .assign (Object .setPrototypeOf (X3DPrototypeInstance .prototype, Core_X3
24881
24899
  for (const fieldDefinition of this [_protoNode] .getFieldDefinitions ())
24882
24900
  this .addPredefinedField (fieldDefinition);
24883
24901
 
24884
- // Reuse old fields, and therefor routes.
24902
+ // Reuse old fields, and therefore routes.
24885
24903
 
24886
24904
  for (const protoField of this [_protoFields])
24887
24905
  {
@@ -26036,8 +26054,6 @@ Object .assign (X3DParser .prototype,
26036
26054
  },
26037
26055
  sanitizeName (name = "")
26038
26056
  {
26039
-
26040
-
26041
26057
  // NonIdFirstChar
26042
26058
  name = name .replace (/^[\x30-\x39\x00-\x20\x22\x23\x27\x2b\x2c\x2d\x2e\x5b\x5c\x5d\x7b\x7d\x7f]*/, "");
26043
26059
 
@@ -26051,8 +26067,6 @@ Object .assign (X3DParser .prototype,
26051
26067
  name = name .replace (/^-+|-+$/g, "");
26052
26068
 
26053
26069
  return name;
26054
-
26055
-
26056
26070
  },
26057
26071
  renameExistingNode (name)
26058
26072
  {
@@ -30796,6 +30810,9 @@ Object .assign (X3DOptimizer .prototype,
30796
30810
  if (!node .getNodeType () .includes (Base_X3DConstants .X3DGroupingNode))
30797
30811
  return node;
30798
30812
 
30813
+ if (!node .visible)
30814
+ return node;
30815
+
30799
30816
  const children = Array .from (node .children);
30800
30817
 
30801
30818
  removedNodes .push (this .removeChildren (node));
@@ -30875,9 +30892,6 @@ Object .assign (X3DOptimizer .prototype,
30875
30892
  if (node .children .length !== 1)
30876
30893
  return node;
30877
30894
 
30878
- if (!node .visible)
30879
- return node;
30880
-
30881
30895
  const child = node .children [0];
30882
30896
 
30883
30897
  if (child .getValue () .getCloneCount () > 1)
@@ -30890,16 +30904,27 @@ Object .assign (X3DOptimizer .prototype,
30890
30904
  {
30891
30905
  case "Transform":
30892
30906
  case "HAnimHumanoid":
30907
+ {
30908
+ if (child .visible !== node .visible)
30909
+ return node;
30910
+
30893
30911
  return this .combineTransform (node, child, removedNodes);
30912
+ }
30894
30913
  case "DirectionalLight":
30895
30914
  case "PointLight":
30896
30915
  case "SpotLight":
30916
+ {
30897
30917
  return this .combineLight (node, child, removedNodes);
30918
+ }
30898
30919
  case "Viewpoint":
30899
30920
  case "OrthoViewpoint":
30921
+ {
30900
30922
  return this .combineViewpoint (node, child, removedNodes);
30923
+ }
30901
30924
  default:
30925
+ {
30902
30926
  return node;
30927
+ }
30903
30928
  }
30904
30929
  },
30905
30930
  combineTransform (node, child, removedNodes)
@@ -31187,7 +31212,7 @@ const Plane3_default_ = Plane3;
31187
31212
 
31188
31213
  /* harmony default export */ const Geometry_Plane3 = (x_ite_Namespace .add ("Plane3", Plane3_default_));
31189
31214
  ;// ./src/standard/Math/Geometry/Triangle3.js
31190
- /* provided dependency */ var libtess = __webpack_require__(457);
31215
+ /* provided dependency */ var libtess = __webpack_require__(289);
31191
31216
 
31192
31217
 
31193
31218
  const Triangle3 =
@@ -43481,7 +43506,7 @@ function eventsProcessed ()
43481
43506
  return null;
43482
43507
 
43483
43508
  const textureTransformNodes = this .textureTransformNodes
43484
- .sort ((a, b) => Math_Algorithm .cmp (a ._mapping .getValue (), b ._mapping .getValue ()));
43509
+ .sort ((a, b) => a ._mapping .getValue () .localeCompare (b ._mapping .getValue (), "en"));
43485
43510
 
43486
43511
  switch (textureTransformNodes .length)
43487
43512
  {
@@ -43896,7 +43921,7 @@ function eventsProcessed ()
43896
43921
  default:
43897
43922
  {
43898
43923
  const textureCoordinateNodes = Array .from (material .texCoordMappings .entries ())
43899
- .sort ((a, b) => Math_Algorithm .cmp (a [0], b [0]))
43924
+ .sort ((a, b) => a [0] .localeCompare (b [0], "en"))
43900
43925
  .sort ((a, b) => a [1] - b [1])
43901
43926
  .map (([mapping, i]) => this .createTextureCoordinate (texCoords [i], mapping));
43902
43927
 
@@ -47887,7 +47912,7 @@ const Bezier_default_ = Bezier;
47887
47912
 
47888
47913
  /* harmony default export */ const Algorithms_Bezier = (x_ite_Namespace .add ("Bezier", Bezier_default_));
47889
47914
  ;// ./src/x_ite/Parser/SVGParser.js
47890
- /* provided dependency */ var SVGParser_libtess = __webpack_require__(457);
47915
+ /* provided dependency */ var SVGParser_libtess = __webpack_require__(289);
47891
47916
 
47892
47917
 
47893
47918
 
@@ -51097,8 +51122,10 @@ function FileLoader (node, { cacheScene = false, dataAsString = true } = { })
51097
51122
  this .executionContext = node .getExecutionContext ();
51098
51123
  this .target = "";
51099
51124
  this .url = [ ];
51100
- this .fileURL = new URL (this .getBaseURL ());
51101
51125
  this .controller = new AbortController ();
51126
+ this .candidateURL = "";
51127
+ this .resolvedURL = null;
51128
+ this .attempts = [ ];
51102
51129
  }
51103
51130
 
51104
51131
  Object .assign (FileLoader,
@@ -51129,10 +51156,6 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51129
51156
 
51130
51157
  this .controller .abort ();
51131
51158
  },
51132
- getURL ()
51133
- {
51134
- return this .fileURL;
51135
- },
51136
51159
  getBaseURL ()
51137
51160
  {
51138
51161
  if (this .node instanceof Execution_X3DWorld)
@@ -51215,8 +51238,8 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51215
51238
 
51216
51239
  if (DEVELOPMENT)
51217
51240
  {
51218
- if (this .fileURL .protocol !== "data:")
51219
- console .info (`Done loading scene '${decodeURI (this .fileURL)}'.`);
51241
+ if (this .resolvedURL .protocol !== "data:")
51242
+ console .info (`Done loading scene '${decodeURI (this .resolvedURL)}'.`);
51220
51243
  }
51221
51244
  },
51222
51245
  createX3DFromURL (url, parameter, callback, bindViewpoint, foreign)
@@ -51233,13 +51256,15 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51233
51256
  if (data === null)
51234
51257
  callback (null);
51235
51258
  else
51236
- this .createX3DFromString (this .fileURL, data, callback, this .loadDocumentError .bind (this));
51259
+ this .createX3DFromString (this .resolvedURL, data, callback, this .loadDocumentError .bind (this));
51237
51260
  },
51238
51261
  loadDocument (url, callback)
51239
51262
  {
51240
51263
  this .url = url .slice ();
51241
51264
  this .callback = callback;
51242
51265
 
51266
+ this .attempts .length = 0;
51267
+
51243
51268
  if (url .length === 0)
51244
51269
  return this .loadDocumentError ();
51245
51270
 
@@ -51248,8 +51273,15 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51248
51273
  },
51249
51274
  async loadDocumentAsync (url)
51250
51275
  {
51276
+ // Not every candidate reaches URL resolution, so resolvedURL stays null until it
51277
+ // does. Diagnostics must not attribute the previous candidate's resolved URL to
51278
+ // this one.
51279
+
51280
+ this .candidateURL = url;
51281
+ this .resolvedURL = null;
51282
+
51251
51283
  if (!url .length)
51252
- return this .loadDocumentError ();
51284
+ return this .loadDocumentError (new Error ("Empty URL."));
51253
51285
 
51254
51286
  // Script:
51255
51287
  {
@@ -51259,7 +51291,7 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51259
51291
  return await this .callback (url .substring (result [0] .length));
51260
51292
  }
51261
51293
 
51262
- this .fileURL = new URL (url, this .getBaseURL ());
51294
+ this .resolvedURL = new URL (url, this .getBaseURL ());
51263
51295
 
51264
51296
  // Handle data URLs that are not base64 decoded here:
51265
51297
  if (this .dataAsString)
@@ -51281,17 +51313,17 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51281
51313
 
51282
51314
  // Bind Viewpoint URLs:
51283
51315
 
51284
- if (this .fileURL .protocol !== "data:" && this .bindViewpoint)
51316
+ if (this .resolvedURL .protocol !== "data:" && this .bindViewpoint)
51285
51317
  {
51286
51318
  const referer = new URL (this .getBaseURL ());
51287
51319
 
51288
- if (this .fileURL .protocol === referer .protocol &&
51289
- this .fileURL .hostname === referer .hostname &&
51290
- this .fileURL .port === referer .port &&
51291
- this .fileURL .pathname === referer .pathname &&
51292
- this .fileURL .hash)
51320
+ if (this .resolvedURL .protocol === referer .protocol &&
51321
+ this .resolvedURL .hostname === referer .hostname &&
51322
+ this .resolvedURL .port === referer .port &&
51323
+ this .resolvedURL .pathname === referer .pathname &&
51324
+ this .resolvedURL .hash)
51293
51325
  {
51294
- return this .bindViewpoint (decodeURIComponent (this .fileURL .hash .substring (1)));
51326
+ return this .bindViewpoint (decodeURIComponent (this .resolvedURL .hash .substring (1)));
51295
51327
  }
51296
51328
  }
51297
51329
 
@@ -51302,19 +51334,19 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51302
51334
  // Handle target
51303
51335
 
51304
51336
  if (this .target .length && this .target !== "_self")
51305
- return this .foreign (this .fileURL .href, this .target);
51337
+ return this .foreign (this .resolvedURL .href, this .target);
51306
51338
 
51307
51339
  // Handle well known foreign content depending on extension or if path looks like directory.
51308
51340
 
51309
- if (this .fileURL .protocol !== "data:" && this .fileURL .href .match (/\.(?:html|htm|xhtml)$/))
51310
- return this .foreign (this .fileURL .href, this .target);
51341
+ if (this .resolvedURL .protocol !== "data:" && this .resolvedURL .href .match (/\.(?:html|htm|xhtml)$/))
51342
+ return this .foreign (this .resolvedURL .href, this .target);
51311
51343
  }
51312
51344
 
51313
51345
  // Cached scenes:
51314
51346
 
51315
- if (this .sceneCallback && this .cacheScene && !this .fileURL .search .length)
51347
+ if (this .sceneCallback && this .cacheScene && !this .resolvedURL .search .length)
51316
51348
  {
51317
- const cacheURL = new URL (this .fileURL);
51349
+ const cacheURL = new URL (this .resolvedURL);
51318
51350
 
51319
51351
  cacheURL .hash = "";
51320
51352
 
@@ -51324,7 +51356,7 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51324
51356
  {
51325
51357
  const scene = await promise;
51326
51358
 
51327
- scene .setWorldURL (this .fileURL .href);
51359
+ scene .setWorldURL (this .resolvedURL .href);
51328
51360
 
51329
51361
  return this .sceneCallback (scene);
51330
51362
  }
@@ -51342,7 +51374,7 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51342
51374
 
51343
51375
  const
51344
51376
  options = { cache: this .node .getCache () ? "default" : "reload", signal: this .controller .signal },
51345
- response = this .checkResponse (await fetch (this .fileURL, options)),
51377
+ response = this .checkResponse (await fetch (this .resolvedURL, options)),
51346
51378
  mimeType = response .headers .get ("Content-Type") ?.replace (/;.*$/, "");
51347
51379
 
51348
51380
  if (this .foreign)
@@ -51350,10 +51382,10 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51350
51382
  // console .log (mimeType);
51351
51383
 
51352
51384
  if (foreignMimeType .has (mimeType))
51353
- return this .foreign (this .fileURL .href, this .target);
51385
+ return this .foreign (this .resolvedURL .href, this .target);
51354
51386
  }
51355
51387
 
51356
- await this .callback (await helper.gunzip (await this .getBlob (response)), this .fileURL);
51388
+ await this .callback (await helper.gunzip (await this .getBlob (response)), this .resolvedURL);
51357
51389
  },
51358
51390
  async getBlob (response)
51359
51391
  {
@@ -51393,7 +51425,7 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51393
51425
  if (response .ok)
51394
51426
  return response;
51395
51427
 
51396
- throw Error (response .statusText || response .status);
51428
+ throw new Error (response .statusText || response .status);
51397
51429
  },
51398
51430
  loadDocumentError (error)
51399
51431
  {
@@ -51419,12 +51451,52 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51419
51451
  if (!error)
51420
51452
  return;
51421
51453
 
51422
- const typeName = this .node instanceof Execution_X3DWorld ? "" : ` for ${this .node .getTypeName ()}`;
51454
+ // Candidates that are evaluated rather than fetched an empty string, or a
51455
+ // script URL — have no resolved URL, and are reported by their authored value.
51423
51456
 
51424
- if (this .fileURL .protocol === "data:")
51425
- console .error (`Couldn't load data URL${typeName}.`, error);
51426
- else
51427
- console .error (`Couldn't load URL '${helper.try (() => decodeURI (this .fileURL)) ?? this .fileURL}'${typeName}.`, error);
51457
+ const
51458
+ typeName = this .node instanceof Execution_X3DWorld ? "" : ` for ${this .node .getTypeName ()}`,
51459
+ dataURL = this .resolvedURL ?.protocol === "data:",
51460
+ resolved = this .resolvedURL && !dataURL ? `${helper.try (() => decodeURI (this .resolvedURL)) ?? this .resolvedURL}` : "",
51461
+ subject = !this .candidateURL .length ? "empty URL"
51462
+ : dataURL ? "data URL"
51463
+ : `URL '${resolved || this .truncate (this .candidateURL)}'`;
51464
+
51465
+ this .attempts .push ({ url: this .candidateURL, resolved, error });
51466
+
51467
+ // A url field is a fallback list, so a failed candidate is not yet a failure of
51468
+ // the resource: a later candidate may still succeed. Report the resource as
51469
+ // failed only once every candidate has been tried.
51470
+
51471
+ if (this .url .length)
51472
+ return console .warn (`Couldn't load ${subject}${typeName}, trying URL ${this .attempts .length + 1} of ${this .attempts .length + this .url .length}.`, error);
51473
+
51474
+ if (this .attempts .length === 1)
51475
+ return console .error (`Couldn't load ${subject}${typeName}.`, error);
51476
+
51477
+ // Pass the errors themselves along with the summary, so their stacks and context
51478
+ // stay inspectable.
51479
+
51480
+ console .error (`Couldn't load any of the ${this .attempts .length} URLs${typeName}, tried in this order:\n`
51481
+ + this .attempts
51482
+ .map (({ url, resolved, error }, i) =>
51483
+ ` ${i + 1}. '${this .truncate (url)}'${resolved && resolved !== url ? ` → ${this .truncate (resolved)}` : ""}: ${this .describe (error)}`)
51484
+ .join ("\n") + "\n",
51485
+ ... this .attempts .map (({ error }) => error));
51486
+ },
51487
+ /**
51488
+ * Keep diagnostics readable when a candidate is a long data URL.
51489
+ */
51490
+ truncate (string, length = 120)
51491
+ {
51492
+ return string .length > length ? `${string .substring (0, length)}…` : string;
51493
+ },
51494
+ /**
51495
+ * Not every thrown value is an Error, so don't summarize one as [object Object].
51496
+ */
51497
+ describe (error)
51498
+ {
51499
+ return error ?.message ?? (typeof error === "object" ? helper.try (() => JSON .stringify (error)) : null) ?? String (error);
51428
51500
  },
51429
51501
  });
51430
51502
 
@@ -54586,7 +54658,7 @@ function X3DCoreContext (element)
54586
54658
  {
54587
54659
  const link = document .createElement ("link");
54588
54660
 
54589
- link .integrity = "sha384-FEmsQpL8R1dkzlxB19h2qi5U9Cuh8Zk2953YCudH0PTQSwiWiUovdIWVDBu3/YAc";
54661
+ link .integrity = "sha384-OncRzbLtLD5Caw7AMriMRlhuhJ/fW3gh5dFvrdeifrhlqF+YTzx/lbZh5l6JjYau";
54590
54662
  link .rel = "stylesheet";
54591
54663
  link .crossOrigin = "anonymous";
54592
54664
  link .onload = resolve;
@@ -63982,6 +64054,7 @@ const
63982
64054
  _loadingTotal = Symbol (),
63983
64055
  X3DNetworkingContext_loadingObjects = Symbol (),
63984
64056
  _browserLoading = Symbol (),
64057
+ _browserTime = Symbol (),
63985
64058
  _set_loadCount = Symbol (),
63986
64059
  _loadFractions = Symbol (),
63987
64060
  _defaultScene = Symbol ();
@@ -64042,6 +64115,7 @@ Object .assign (X3DNetworkingContext .prototype,
64042
64115
  setBrowserLoading (value)
64043
64116
  {
64044
64117
  this [_browserLoading] = value;
64118
+ this [_browserTime] = Date .now ();
64045
64119
 
64046
64120
  if (value)
64047
64121
  {
@@ -64104,12 +64178,16 @@ Object .assign (X3DNetworkingContext .prototype,
64104
64178
  this [X3DNetworkingContext_loadingObjects] .add (object);
64105
64179
 
64106
64180
  this ._loadCount = this [X3DNetworkingContext_loadingObjects] .size;
64181
+
64182
+ this [_browserTime] = Date .now ();
64107
64183
  },
64108
64184
  removeLoadingObject (object)
64109
64185
  {
64110
64186
  this [X3DNetworkingContext_loadingObjects] .delete (object);
64111
64187
 
64112
64188
  this ._loadCount = this [X3DNetworkingContext_loadingObjects] .size;
64189
+
64190
+ this [_browserTime] = Date .now ();
64113
64191
  },
64114
64192
  getDisplayLoadCount ()
64115
64193
  {
@@ -64163,8 +64241,14 @@ Object .assign (X3DNetworkingContext .prototype,
64163
64241
  const fractions = 1 - (this ._loadCount .getValue () + loadFractions)
64164
64242
  / (this [_loadingTotal] + this [_loadFractions] .size);
64165
64243
 
64244
+ const percent = fractions * 100;
64245
+
64246
+ // Show progress in % if loading takes too long.
64247
+ if (Date .now () - this [_browserTime] > 8_000)
64248
+ string += ` (${percent .toFixed (2)} %)`;
64249
+
64166
64250
  this .getSplashScreen () .querySelector (".x_ite-private-spinner-text") .textContent = string;
64167
- this .getSplashScreen () .querySelector (".x_ite-private-progressbar div") .style .width = `${100 * fractions}%`;
64251
+ this .getSplashScreen () .querySelector (".x_ite-private-progressbar div") .style .width = `${percent}%`;
64168
64252
  }
64169
64253
  else
64170
64254
  {
@@ -71768,15 +71852,18 @@ const PeriodicWave_default_ = PeriodicWave;
71768
71852
 
71769
71853
 
71770
71854
 
71855
+
71771
71856
  const
71772
- _audioElements = Symbol (),
71773
71857
  _audioContext = Symbol (),
71858
+ _soundDestinationNodes = Symbol (),
71859
+ _audioElements = Symbol (),
71774
71860
  _defaultPeriodicWave = Symbol (),
71775
71861
  _noSoundButton = Symbol (),
71776
71862
  _noSoundButtonId = Symbol ();
71777
71863
 
71778
71864
  function X3DSoundContext ()
71779
71865
  {
71866
+ this [_soundDestinationNodes] = new Set ();
71780
71867
  this [_audioElements] = new Map ();
71781
71868
  }
71782
71869
 
@@ -71814,16 +71901,25 @@ Object .assign (X3DSoundContext .prototype,
71814
71901
  return audioContext;
71815
71902
  })();
71816
71903
  },
71817
- getDefaultPeriodicWave ()
71904
+ addSoundDestination (soundDestinationNode)
71818
71905
  {
71819
- return this [_defaultPeriodicWave] ??= (() =>
71820
- {
71821
- const defaultPeriodicWave = new Sound_PeriodicWave (this .getPrivateScene ());
71906
+ const gain = !this .getBrowserOption ("Mute") * Math_Algorithm .clamp (this .getBrowserOption ("SoundIntensity"), 0, 1);
71822
71907
 
71823
- defaultPeriodicWave .setup ();
71908
+ soundDestinationNode .getSoundDestination () .gain .value = gain;
71824
71909
 
71825
- return defaultPeriodicWave;
71826
- })();
71910
+ this [_soundDestinationNodes] .add (soundDestinationNode);
71911
+
71912
+ this .getRenderingProperties () ._SoundDestinations = this [_soundDestinationNodes] .size;
71913
+ },
71914
+ removeSoundDestination (soundDestinationNode)
71915
+ {
71916
+ this [_soundDestinationNodes] .delete (soundDestinationNode);
71917
+
71918
+ this .getRenderingProperties () ._SoundDestinations = this [_soundDestinationNodes] .size;
71919
+ },
71920
+ getSoundDestinations ()
71921
+ {
71922
+ return this [_soundDestinationNodes];
71827
71923
  },
71828
71924
  startAudioElement (audioElement, functionName = "play")
71829
71925
  {
@@ -71900,6 +71996,17 @@ Object .assign (X3DSoundContext .prototype,
71900
71996
  },
71901
71997
  200);
71902
71998
  },
71999
+ getDefaultPeriodicWave ()
72000
+ {
72001
+ return this [_defaultPeriodicWave] ??= (() =>
72002
+ {
72003
+ const defaultPeriodicWave = new Sound_PeriodicWave (this .getPrivateScene ());
72004
+
72005
+ defaultPeriodicWave .setup ();
72006
+
72007
+ return defaultPeriodicWave;
72008
+ })();
72009
+ },
71903
72010
  });
71904
72011
 
71905
72012
  const X3DSoundContext_default_ = X3DSoundContext;
@@ -72791,7 +72898,7 @@ const
72791
72898
  _animFrame = Symbol (),
72792
72899
  _previousTime = Symbol (),
72793
72900
  _systemTime = Symbol (),
72794
- _browserTime = Symbol (),
72901
+ X3DBrowserContext_browserTime = Symbol (),
72795
72902
  _cameraTime = Symbol (),
72796
72903
  _collisionTime = Symbol (),
72797
72904
  _displayTime = Symbol (),
@@ -72843,7 +72950,7 @@ function X3DBrowserContext (element)
72843
72950
  this [_previousTime] = 0;
72844
72951
  this [_renderCallback] = this [_traverse] .bind (this);
72845
72952
  this [_systemTime] = new Time_StopWatch ();
72846
- this [_browserTime] = new Time_StopWatch ();
72953
+ this [X3DBrowserContext_browserTime] = new Time_StopWatch ();
72847
72954
  this [_cameraTime] = new Time_StopWatch ();
72848
72955
  this [_collisionTime] = new Time_StopWatch ();
72849
72956
  this [_displayTime] = new Time_StopWatch ();
@@ -72963,7 +73070,7 @@ Object .assign (Object .setPrototypeOf (X3DBrowserContext .prototype, Base_X3DBa
72963
73070
  // Start
72964
73071
 
72965
73072
  this [_systemTime] .stop ();
72966
- this [_browserTime] .start ();
73073
+ this [X3DBrowserContext_browserTime] .start ();
72967
73074
 
72968
73075
  // Time
72969
73076
 
@@ -73024,7 +73131,7 @@ Object .assign (Object .setPrototypeOf (X3DBrowserContext .prototype, Base_X3DBa
73024
73131
 
73025
73132
  // Finish
73026
73133
 
73027
- this [_browserTime] .stop ();
73134
+ this [X3DBrowserContext_browserTime] .stop ();
73028
73135
  this [_systemTime] .start ();
73029
73136
  },
73030
73137
  getSystemTime ()
@@ -73033,7 +73140,7 @@ Object .assign (Object .setPrototypeOf (X3DBrowserContext .prototype, Base_X3DBa
73033
73140
  },
73034
73141
  getBrowserTime ()
73035
73142
  {
73036
- return this [_browserTime];
73143
+ return this [X3DBrowserContext_browserTime];
73037
73144
  },
73038
73145
  getCameraTime ()
73039
73146
  {
@@ -74924,9 +75031,12 @@ Object .assign (Object .setPrototypeOf (TextureBackground .prototype, Environmen
74924
75031
  this .set_texture__ (4, this ._topTexture);
74925
75032
  this .set_texture__ (5, this ._bottomTexture);
74926
75033
  },
74927
- set_texture__ (index, textureNode)
75034
+ set_texture__ (index, node)
74928
75035
  {
74929
- EnvironmentalEffects_X3DBackgroundNode .prototype .set_texture__ .call (this, index, Base_X3DCast (Base_X3DConstants .X3DTextureNode, textureNode));
75036
+ const textureNode = Base_X3DCast (Base_X3DConstants .X3DTexture2DNode, node)
75037
+ ?? Base_X3DCast (Base_X3DConstants .MultiTexture, node);
75038
+
75039
+ EnvironmentalEffects_X3DBackgroundNode .prototype .set_texture__ .call (this, index, textureNode);
74930
75040
  },
74931
75041
  traverse (type, renderObject)
74932
75042
  {
@@ -87640,6 +87750,7 @@ Object .assign (Object .setPrototypeOf (X3DSoundProcessingNode .prototype, Sound
87640
87750
  const channelCountModes = new Map ([
87641
87751
  ["MAX", "max"],
87642
87752
  ["CLAMPED-MAX", "clamped-max"],
87753
+ ["CLAMPED_MAX", "clamped-max"],
87643
87754
  ["EXPLICIT", "explicit"],
87644
87755
  ]);
87645
87756
 
@@ -88218,10 +88329,12 @@ Object .assign (Object .setPrototypeOf (AudioClip .prototype, Sound_X3DSoundSour
88218
88329
  unloadData ()
88219
88330
  {
88220
88331
  this .setMediaElement (null);
88332
+
88333
+ this ._duration_changed = -1;
88221
88334
  },
88222
88335
  loadData ()
88223
88336
  {
88224
- this .unloadData ();
88337
+ this .setMediaElement (null);
88225
88338
 
88226
88339
  new InputOutput_FileLoader (this, { dataAsString: false }) .loadDocument (this ._url, async (data, fileURL) =>
88227
88340
  {
@@ -88314,10 +88427,13 @@ function X3DSoundDestinationNode (executionContext)
88314
88427
 
88315
88428
  this .addType (Base_X3DConstants .X3DSoundDestinationNode);
88316
88429
 
88430
+ // Private properties
88431
+
88317
88432
  const audioContext = this .getBrowser () .getAudioContext ();
88318
88433
 
88319
88434
  this .childNodes = [ ];
88320
88435
  this .audioDestination = new GainNode (audioContext, { gain: 0 });
88436
+ this .soundDestination = new GainNode (audioContext, { gain: 0 });
88321
88437
  }
88322
88438
 
88323
88439
  Object .assign (Object .setPrototypeOf (X3DSoundDestinationNode .prototype, Sound_X3DSoundNode .prototype),
@@ -88342,6 +88458,10 @@ Object .assign (Object .setPrototypeOf (X3DSoundDestinationNode .prototype, Soun
88342
88458
  this .set_channelInterpretation__ ();
88343
88459
  this .set_children__ ();
88344
88460
  },
88461
+ getSoundDestination ()
88462
+ {
88463
+ return this .soundDestination;
88464
+ },
88345
88465
  getAudioDestination ()
88346
88466
  {
88347
88467
  return this .audioDestination;
@@ -88350,10 +88470,20 @@ Object .assign (Object .setPrototypeOf (X3DSoundDestinationNode .prototype, Soun
88350
88470
  {
88351
88471
  // If enabled field is FALSE, the audio signal is blocked and does not pass through.
88352
88472
 
88353
- if (this ._enabled .getValue () && this .getLive () .getValue ())
88354
- this .audioDestination .connect (this .getSoundDestination ());
88473
+ const
88474
+ browser = this .getBrowser (),
88475
+ active = this .getLive () .getValue () && this ._enabled .getValue ();
88476
+
88477
+ if (active)
88478
+ {
88479
+ browser .addSoundDestination (this);
88480
+ this .audioDestination .connect (this .soundDestination);
88481
+ }
88355
88482
  else
88483
+ {
88484
+ browser .removeSoundDestination (this);
88356
88485
  this .audioDestination .disconnect ();
88486
+ }
88357
88487
 
88358
88488
  this ._isActive = this ._enabled;
88359
88489
  },
@@ -88370,6 +88500,7 @@ Object .assign (Object .setPrototypeOf (X3DSoundDestinationNode .prototype, Soun
88370
88500
  const channelCountModes = new Map ([
88371
88501
  ["MAX", "max"],
88372
88502
  ["CLAMPED-MAX", "clamped-max"],
88503
+ ["CLAMPED_MAX", "clamped-max"],
88373
88504
  ["EXPLICIT", "explicit"],
88374
88505
  ]);
88375
88506
 
@@ -88453,6 +88584,8 @@ function AudioDestination (executionContext)
88453
88584
  this .audioElement = new Audio ();
88454
88585
  this .mediaStreamAudioDestinationNode = new MediaStreamAudioDestinationNode (audioContext);
88455
88586
  this .audioElement .srcObject = this .mediaStreamAudioDestinationNode .stream;
88587
+
88588
+ this .getSoundDestination () .connect (this .mediaStreamAudioDestinationNode);
88456
88589
  }
88457
88590
 
88458
88591
  Object .assign (Object .setPrototypeOf (AudioDestination .prototype, Sound_X3DSoundDestinationNode .prototype),
@@ -88469,22 +88602,18 @@ Object .assign (Object .setPrototypeOf (AudioDestination .prototype, Sound_X3DSo
88469
88602
 
88470
88603
  this .set_mediaDeviceID__ ();
88471
88604
  },
88472
- getSoundDestination ()
88473
- {
88474
- return this .mediaStreamAudioDestinationNode;
88475
- },
88476
88605
  set_enabled__ ()
88477
88606
  {
88607
+ Sound_X3DSoundDestinationNode .prototype .set_enabled__ .call (this);
88608
+
88478
88609
  const
88479
88610
  browser = this .getBrowser (),
88480
- active = this ._enabled .getValue () && this .getLive () .getValue ();
88611
+ active = this .getLive () .getValue () && this ._enabled .getValue ();
88481
88612
 
88482
88613
  if (active)
88483
88614
  browser .startAudioElement (this .audioElement);
88484
88615
  else
88485
88616
  browser .stopAudioElement (this .audioElement);
88486
-
88487
- Sound_X3DSoundDestinationNode .prototype .set_enabled__ .call (this);
88488
88617
  },
88489
88618
  set_mediaDeviceID__ ()
88490
88619
  {
@@ -88723,7 +88852,7 @@ Object .assign (Object .setPrototypeOf (BufferAudioSource .prototype, Sound_X3DS
88723
88852
  }
88724
88853
  else
88725
88854
  {
88726
- this ._bufferDuration = 0;
88855
+ this ._bufferDuration = -1;
88727
88856
 
88728
88857
  this .setMediaElement (null);
88729
88858
  }
@@ -88961,6 +89090,7 @@ Object .assign (Object .setPrototypeOf (X3DSoundChannelNode .prototype, Sound_X3
88961
89090
  const channelCountModes = new Map ([
88962
89091
  ["MAX", "max"],
88963
89092
  ["CLAMPED-MAX", "clamped-max"],
89093
+ ["CLAMPED_MAX", "clamped-max"],
88964
89094
  ["EXPLICIT", "explicit"],
88965
89095
  ]);
88966
89096
 
@@ -89025,7 +89155,7 @@ Object .assign (Object .setPrototypeOf (X3DSoundChannelNode .prototype, Sound_X3
89025
89155
  for (const [i, childNode] of this .childNodes .entries ())
89026
89156
  this .connectChildNode (i, childNode);
89027
89157
  },
89028
- setChildNodes (childNodes)
89158
+ setChildNodes ()
89029
89159
  { },
89030
89160
  connectChildNode (i, childNode)
89031
89161
  {
@@ -90167,7 +90297,7 @@ function Sound (executionContext)
90167
90297
 
90168
90298
  this .addType (Base_X3DConstants .Sound);
90169
90299
 
90170
- this .addChildObjects (Base_X3DConstants .outputOnly, "traversed", new x_ite_Fields .SFBool (true));
90300
+ this .addChildObjects (Base_X3DConstants .outputOnly, "traversed", new x_ite_Fields .SFBool ());
90171
90301
 
90172
90302
  this .setVisibleObject (true);
90173
90303
 
@@ -90194,18 +90324,20 @@ Object .assign (Object .setPrototypeOf (Sound .prototype, Sound_X3DSoundNode .pr
90194
90324
  const
90195
90325
  audioContext = this .getBrowser () .getAudioContext (),
90196
90326
  gainNode = new GainNode (audioContext, { gain: 0 }),
90327
+ gainStereoNode = new GainNode (audioContext, { gain: 0 }),
90197
90328
  splitterNode = new ChannelSplitterNode (audioContext, { numberOfOutputs: 2 }),
90198
- mergerNode = new ChannelMergerNode (audioContext, { numberOfInputs: 2 }),
90199
90329
  gainFrontLeftNode = new GainNode (audioContext, { gain: 0 }),
90200
90330
  gainFrontRightNode = new GainNode (audioContext, { gain: 0 }),
90201
90331
  gainBackLeftNode = new GainNode (audioContext, { gain: 0 }),
90202
- gainBackRightNode = new GainNode (audioContext, { gain: 0 });
90332
+ gainBackRightNode = new GainNode (audioContext, { gain: 0 }),
90333
+ mergerNode = new ChannelMergerNode (audioContext, { numberOfInputs: 2 }),
90334
+ soundDestination = new GainNode (audioContext, { gain: 0 });
90203
90335
 
90204
90336
  gainNode .channelCount = 2;
90205
90337
  gainNode .channelCountMode = "explicit";
90206
90338
  gainNode .channelInterpretation = "speakers";
90207
90339
 
90208
- gainNode .connect (splitterNode);
90340
+ gainStereoNode .connect (soundDestination);
90209
90341
  splitterNode .connect (gainFrontLeftNode, 0);
90210
90342
  splitterNode .connect (gainFrontRightNode, 1);
90211
90343
  splitterNode .connect (gainBackRightNode, 0);
@@ -90214,27 +90346,37 @@ Object .assign (Object .setPrototypeOf (Sound .prototype, Sound_X3DSoundNode .pr
90214
90346
  gainFrontRightNode .connect (mergerNode, 0, 1);
90215
90347
  gainBackLeftNode .connect (mergerNode, 0, 0);
90216
90348
  gainBackRightNode .connect (mergerNode, 0, 1);
90217
- mergerNode .connect (audioContext .destination);
90349
+ mergerNode .connect (soundDestination);
90350
+ soundDestination .connect (audioContext .destination);
90218
90351
 
90219
90352
  this .gainNode = gainNode;
90353
+ this .gainStereoNode = gainStereoNode;
90220
90354
  this .splitterNode = splitterNode;
90221
90355
  this .gainFrontLeftNode = gainFrontLeftNode;
90222
90356
  this .gainFrontRightNode = gainFrontRightNode;
90223
90357
  this .gainBackLeftNode = gainBackLeftNode;
90224
90358
  this .gainBackRightNode = gainBackRightNode;
90225
90359
  this .mergerNode = mergerNode;
90360
+ this .soundDestination = soundDestination;
90226
90361
 
90227
- this .getLive () .addInterest ("set_live__", this);
90228
- this ._traversed .addInterest ("set_live__", this);
90362
+ this .getLive () .addInterest ("set_enabled__", this);
90363
+ this ._traversed .addInterest ("set_enabled__", this);
90364
+ this ._enabled .addInterest ("set_enabled__", this);
90229
90365
 
90230
- this ._intensity .addInterest ("set_intensity__", this);
90231
- this ._source .addInterest ("set_children__", this);
90232
- this ._children .addInterest ("set_children__", this);
90366
+ this ._spatialize .addInterest ("set_spatialize__", this);
90367
+ this ._intensity .addInterest ("set_intensity__", this);
90368
+ this ._source .addInterest ("set_children__", this);
90369
+ this ._children .addInterest ("set_children__", this);
90233
90370
 
90234
- this .set_live__ ();
90371
+ this .set_enabled__ ();
90372
+ this .set_spatialize__ ();
90235
90373
  this .set_intensity__ ();
90236
90374
  this .set_children__ ();
90237
90375
  },
90376
+ getSoundDestination ()
90377
+ {
90378
+ return this .soundDestination;
90379
+ },
90238
90380
  setTraversed (value)
90239
90381
  {
90240
90382
  if (value)
@@ -90262,28 +90404,44 @@ Object .assign (Object .setPrototypeOf (Sound .prototype, Sound_X3DSoundNode .pr
90262
90404
  rotationFront = 1 - rotation,
90263
90405
  rotationBack = rotation;
90264
90406
 
90407
+ this .gainStereoNode .gain .value = gain;
90265
90408
  this .gainFrontLeftNode .gain .value = gain * rotationFront * panLeft;
90266
90409
  this .gainFrontRightNode .gain .value = gain * rotationFront * panRight;
90267
90410
  this .gainBackLeftNode .gain .value = gain * rotationBack * panLeft;
90268
90411
  this .gainBackRightNode .gain .value = gain * rotationBack * panRight;
90269
90412
  },
90270
- set_live__ ()
90413
+ set_enabled__ ()
90271
90414
  {
90272
- this .mergerNode .disconnect ();
90415
+ const
90416
+ browser = this .getBrowser (),
90417
+ active = this .getLive () .getValue () && this ._traversed .getValue () && this ._enabled .getValue ();
90273
90418
 
90274
- if (this .getLive () .getValue () && this ._traversed .getValue ())
90419
+ if (active)
90275
90420
  {
90276
90421
  const audioContext = this .getBrowser () .getAudioContext ();
90277
90422
 
90278
- this .getBrowser () .sensorEvents () .addInterest ("update", this);
90423
+ this .soundDestination .connect (audioContext .destination);
90279
90424
 
90280
- this .mergerNode .connect (audioContext .destination);
90425
+ browser .addSoundDestination (this);
90426
+ browser .sensorEvents () .addInterest ("update", this);
90281
90427
  }
90282
90428
  else
90283
90429
  {
90284
- this .getBrowser () .sensorEvents () .removeInterest ("update", this);
90430
+ this .soundDestination .disconnect ();
90431
+
90432
+ browser .removeSoundDestination (this);
90433
+ browser .sensorEvents () .removeInterest ("update", this);
90285
90434
  }
90286
90435
  },
90436
+ set_spatialize__ ()
90437
+ {
90438
+ this .gainNode .disconnect ();
90439
+
90440
+ if (this ._spatialize .getValue ())
90441
+ this .gainNode .connect (this .splitterNode);
90442
+ else
90443
+ this .gainNode .connect (this .gainStereoNode);
90444
+ },
90287
90445
  set_intensity__ ()
90288
90446
  {
90289
90447
  this .gainNode .gain .value = Math_Algorithm .clamp (this ._intensity .getValue (), 0, 1);
@@ -90302,7 +90460,7 @@ Object .assign (Object .setPrototypeOf (Sound .prototype, Sound_X3DSoundNode .pr
90302
90460
 
90303
90461
  for (const child of this ._children)
90304
90462
  {
90305
- const childNode = Base_X3DCast (Base_X3DConstants .X3DChildNode, child);
90463
+ const childNode = Base_X3DCast (Base_X3DConstants .X3DNode, child);
90306
90464
 
90307
90465
  if (!childNode)
90308
90466
  continue;
@@ -90522,7 +90680,7 @@ function SpatialSound (executionContext)
90522
90680
 
90523
90681
  this .addType (Base_X3DConstants .SpatialSound);
90524
90682
 
90525
- this .addChildObjects (Base_X3DConstants .outputOnly, "traversed", new x_ite_Fields .SFBool (true));
90683
+ this .addChildObjects (Base_X3DConstants .outputOnly, "traversed", new x_ite_Fields .SFBool ());
90526
90684
 
90527
90685
  this .setVisibleObject (true);
90528
90686
 
@@ -90547,22 +90705,26 @@ Object .assign (Object .setPrototypeOf (SpatialSound .prototype, Sound_X3DSoundN
90547
90705
  Sound_X3DSoundNode .prototype .initialize .call (this);
90548
90706
 
90549
90707
  const
90550
- audioContext = this .getBrowser () .getAudioContext (),
90551
- gainNode = new GainNode (audioContext, { gain: 0 }),
90552
- pannerNode = new PannerNode (audioContext);
90708
+ audioContext = this .getBrowser () .getAudioContext (),
90709
+ gainNode = new GainNode (audioContext, { gain: 0 }),
90710
+ pannerNode = new PannerNode (audioContext),
90711
+ soundDestination = new GainNode (audioContext, { gain: 0 });
90553
90712
 
90554
90713
  gainNode .channelCount = 2;
90555
90714
  gainNode .channelCountMode = "explicit";
90556
90715
  gainNode .channelInterpretation = "speakers";
90557
90716
 
90558
- gainNode .connect (pannerNode);
90559
- pannerNode .connect (audioContext .destination);
90717
+ gainNode .connect (pannerNode);
90718
+ pannerNode .connect (soundDestination);
90719
+ soundDestination .connect (audioContext .destination);
90560
90720
 
90561
- this .gainNode = gainNode;
90562
- this .pannerNode = pannerNode;
90721
+ this .gainNode = gainNode;
90722
+ this .pannerNode = pannerNode;
90723
+ this .soundDestination = soundDestination;
90563
90724
 
90564
- this .getLive () .addInterest ("set_live__", this);
90565
- this ._traversed .addInterest ("set_live__", this);
90725
+ this .getLive () .addInterest ("set_enabled__", this);
90726
+ this ._traversed .addInterest ("set_enabled__", this);
90727
+ this ._enabled .addInterest ("set_enabled__", this);
90566
90728
 
90567
90729
  this ._spatialize .addInterest ("set_spatialize__", this);
90568
90730
  this ._intensity .addInterest ("set_intensity__", this);
@@ -90578,7 +90740,7 @@ Object .assign (Object .setPrototypeOf (SpatialSound .prototype, Sound_X3DSoundN
90578
90740
  this ._rolloffFactor .addInterest ("set_distanceModel__", this);
90579
90741
  this ._children .addInterest ("set_children__", this);
90580
90742
 
90581
- this .set_live__ ();
90743
+ this .set_enabled__ ();
90582
90744
  this .set_spatialize__ ();
90583
90745
  this .set_intensity__ ();
90584
90746
  this .set_coneOuterGain__ ();
@@ -90591,6 +90753,10 @@ Object .assign (Object .setPrototypeOf (SpatialSound .prototype, Sound_X3DSoundN
90591
90753
  this .set_dopplerEnabled__ ();
90592
90754
  this .set_children__ ();
90593
90755
  },
90756
+ getSoundDestination ()
90757
+ {
90758
+ return this .soundDestination;
90759
+ },
90594
90760
  setTraversed (value)
90595
90761
  {
90596
90762
  if (value)
@@ -90610,21 +90776,27 @@ Object .assign (Object .setPrototypeOf (SpatialSound .prototype, Sound_X3DSoundN
90610
90776
  {
90611
90777
  return this .currentTraversed;
90612
90778
  },
90613
- set_live__ ()
90779
+ set_enabled__ ()
90614
90780
  {
90615
- this .pannerNode .disconnect ();
90781
+ const
90782
+ browser = this .getBrowser (),
90783
+ active = this .getLive () .getValue () && this ._traversed .getValue () && this ._enabled .getValue ();
90616
90784
 
90617
- if (this .getLive () .getValue () && this ._traversed .getValue ())
90785
+ if (active)
90618
90786
  {
90619
90787
  const audioContext = this .getBrowser () .getAudioContext ();
90620
90788
 
90621
- this .getBrowser () .sensorEvents () .addInterest ("update", this);
90789
+ this .soundDestination .connect (audioContext .destination);
90622
90790
 
90623
- this .pannerNode .connect (audioContext .destination);
90791
+ browser .addSoundDestination (this);
90792
+ browser .sensorEvents () .addInterest ("update", this);
90624
90793
  }
90625
90794
  else
90626
90795
  {
90627
- this .getBrowser () .sensorEvents () .removeInterest ("update", this);
90796
+ this .soundDestination .disconnect ();
90797
+
90798
+ browser .removeSoundDestination (this);
90799
+ browser .sensorEvents () .removeInterest ("update", this);
90628
90800
  }
90629
90801
  },
90630
90802
  set_spatialize__ ()
@@ -90702,7 +90874,7 @@ Object .assign (Object .setPrototypeOf (SpatialSound .prototype, Sound_X3DSoundN
90702
90874
 
90703
90875
  for (const child of this ._children)
90704
90876
  {
90705
- const childNode = Base_X3DCast (Base_X3DConstants .X3DChildNode, child);
90877
+ const childNode = Base_X3DCast (Base_X3DConstants .X3DNode, child);
90706
90878
 
90707
90879
  if (!childNode)
90708
90880
  continue;
@@ -90728,6 +90900,8 @@ Object .assign (Object .setPrototypeOf (SpatialSound .prototype, Sound_X3DSoundN
90728
90900
 
90729
90901
  for (const childNode of this .childNodes)
90730
90902
  childNode .getAudioSource () .connect (this .gainNode);
90903
+
90904
+ this .setVisibleObject (this .childNodes .length);
90731
90905
  },
90732
90906
  update ()
90733
90907
  {
@@ -90813,9 +90987,13 @@ function StreamAudioDestination (executionContext)
90813
90987
 
90814
90988
  this .addType (Base_X3DConstants .StreamAudioDestination);
90815
90989
 
90990
+ // Private properties
90991
+
90816
90992
  const audioContext = this .getBrowser () .getAudioContext ();
90817
90993
 
90818
90994
  this .mediaStreamAudioDestinationNode = new MediaStreamAudioDestinationNode (audioContext);
90995
+
90996
+ this .getSoundDestination () .connect (this .mediaStreamAudioDestinationNode);
90819
90997
  }
90820
90998
 
90821
90999
  Object .assign (Object .setPrototypeOf (StreamAudioDestination .prototype, Sound_X3DSoundDestinationNode .prototype),
@@ -90828,15 +91006,10 @@ Object .assign (Object .setPrototypeOf (StreamAudioDestination .prototype, Sound
90828
91006
 
90829
91007
  this .set_mediaDeviceID__ ();
90830
91008
  },
90831
- getSoundDestination ()
90832
- {
90833
- return this .mediaStreamAudioDestinationNode;
90834
- },
90835
- set_enabled__ () { /* remove this function if implemented */ },
91009
+ set_enabled__ ()
91010
+ { },
90836
91011
  set_mediaDeviceID__ ()
90837
- {
90838
-
90839
- },
91012
+ { },
90840
91013
  });
90841
91014
 
90842
91015
  Object .defineProperties (StreamAudioDestination,
@@ -91269,8 +91442,8 @@ const PNGMedia_default_ = PNGMedia;
91269
91442
 
91270
91443
  /* harmony default export */ const Texturing_PNGMedia = (x_ite_Namespace .add ("PNGMedia", PNGMedia_default_));
91271
91444
  ;// ./src/x_ite/Components/Texturing/MovieTexture.js
91272
- /* provided dependency */ var SuperGif = __webpack_require__(603);
91273
- /* provided dependency */ var APNG = __webpack_require__(777);
91445
+ /* provided dependency */ var SuperGif = __webpack_require__(627);
91446
+ /* provided dependency */ var APNG = __webpack_require__(249);
91274
91447
 
91275
91448
 
91276
91449
 
@@ -91331,6 +91504,7 @@ Object .assign (Object .setPrototypeOf (MovieTexture .prototype, Texturing_X3DTe
91331
91504
  {
91332
91505
  this .clearTexture ();
91333
91506
  this .setMediaElement (null);
91507
+ this .updateOutputs (0, 0, 0, false, -1);
91334
91508
  },
91335
91509
  async loadData ()
91336
91510
  {
@@ -91405,7 +91579,7 @@ Object .assign (Object .setPrototypeOf (MovieTexture .prototype, Texturing_X3DTe
91405
91579
 
91406
91580
  this .setMediaElement (null);
91407
91581
  this .clearTexture ();
91408
- this .updateOutputs (0, 0, 0, -1);
91582
+ this .updateOutputs (0, 0, 0, false, -1);
91409
91583
  this .setLoadState (Base_X3DConstants .FAILED_STATE);
91410
91584
  },
91411
91585
  loadDocument (fileURL)
@@ -91446,7 +91620,7 @@ Object .assign (Object .setPrototypeOf (MovieTexture .prototype, Texturing_X3DTe
91446
91620
 
91447
91621
  this .setMediaElement (gif);
91448
91622
  this .setTextureData (width, height, true, false, gif .get_frames () [0] .data);
91449
- this .updateOutputs (width, height, 4, gif .duration);
91623
+ this .updateOutputs (width, height, 4, false, gif .duration);
91450
91624
  this .setLoadState (Base_X3DConstants .COMPLETE_STATE);
91451
91625
 
91452
91626
  this .set_speed__ ();
@@ -91459,7 +91633,7 @@ Object .assign (Object .setPrototypeOf (MovieTexture .prototype, Texturing_X3DTe
91459
91633
 
91460
91634
  this .setMediaElement (apng);
91461
91635
  this .setTextureData (width, height, true, false, currentFrame);
91462
- this .updateOutputs (width, height, 4, duration);
91636
+ this .updateOutputs (width, height, 4, false, duration);
91463
91637
  this .setLoadState (Base_X3DConstants .COMPLETE_STATE);
91464
91638
 
91465
91639
  this .set_speed__ ();
@@ -91480,16 +91654,21 @@ Object .assign (Object .setPrototypeOf (MovieTexture .prototype, Texturing_X3DTe
91480
91654
 
91481
91655
  this .setMediaElement (video);
91482
91656
  this .setTextureData (width, height, true, false, video);
91483
- this .updateOutputs (width, height, 3, video .duration);
91657
+ this .updateOutputs (width, height, 3, this .hasAudioTracks (video), video .duration);
91484
91658
  this .setLoadState (Base_X3DConstants .COMPLETE_STATE);
91485
91659
 
91486
91660
  this .set_speed__ ();
91487
91661
  },
91488
- updateOutputs (width, height, colorDepth, duration)
91662
+ hasAudioTracks (video)
91663
+ {
91664
+ return !! (video .mozHasAudio || video .webkitAudioDecodedByteCount || video .audioTracks ?.length);
91665
+ },
91666
+ updateOutputs (width, height, colorDepth, hasSound, duration)
91489
91667
  {
91490
91668
  this ._width = width;
91491
91669
  this ._height = height;
91492
91670
  this ._colorDepth = colorDepth;
91671
+ this ._hasSound = hasSound;
91493
91672
  this ._duration_changed = duration;
91494
91673
  },
91495
91674
  set_speed__ ()
@@ -92742,7 +92921,7 @@ Object .assign (Object .setPrototypeOf (X3DBrowser .prototype, Browser_X3DBrowse
92742
92921
  if (profile)
92743
92922
  return profile;
92744
92923
 
92745
- throw Error (`Profile '${name}' is not supported.`);
92924
+ throw new Error (`Profile '${name}' is not supported.`);
92746
92925
  },
92747
92926
  addSupportedProfile: function (profile)
92748
92927
  {
@@ -92786,7 +92965,7 @@ Object .assign (Object .setPrototypeOf (X3DBrowser .prototype, Browser_X3DBrowse
92786
92965
  component .dependencies);
92787
92966
  }
92788
92967
 
92789
- throw Error (`Component '${name}' at level '${level}' is not supported.`);
92968
+ throw new Error (`Component '${name}' at level '${level}' is not supported.`);
92790
92969
  },
92791
92970
  addSupportedComponent (component)
92792
92971
  {
@@ -93908,7 +94087,7 @@ const QuickSort_default_ = QuickSort;
93908
94087
 
93909
94088
  /* harmony default export */ const Algorithms_QuickSort = (x_ite_Namespace .add ("QuickSort", QuickSort_default_));
93910
94089
  ;// ./src/lib/libtess.js
93911
- /* provided dependency */ var libtess_libtess = __webpack_require__(457);
94090
+ /* provided dependency */ var libtess_libtess = __webpack_require__(289);
93912
94091
  const libtess_default_ = libtess_libtess;
93913
94092
  ;
93914
94093