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.mjs CHANGED
@@ -1,7 +1,7 @@
1
- /* X_ITE v16.1.2 */
1
+ /* X_ITE v16.2.0 */
2
2
  var __webpack_modules__ = ({
3
3
 
4
- /***/ 603
4
+ /***/ 627
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
- /***/ 777
1009
+ /***/ 249
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
- /***/ 457
2005
+ /***/ 289
2006
2006
  (module) {
2007
2007
 
2008
2008
  /**
@@ -6809,48 +6809,27 @@ if (true) {
6809
6809
  /******/
6810
6810
  /************************************************************************/
6811
6811
  /******/ /* webpack/runtime/define property getters */
6812
- /******/ (() => {
6813
- /******/ // define getter/value functions for harmony exports
6814
- /******/ __webpack_require__.d = (exports, definition) => {
6815
- /******/ if(Array.isArray(definition)) {
6816
- /******/ var i = 0;
6817
- /******/ while(i < definition.length) {
6818
- /******/ var key = definition[i++];
6819
- /******/ var binding = definition[i++];
6820
- /******/ if(!__webpack_require__.o(exports, key)) {
6821
- /******/ if(binding === 0) {
6822
- /******/ Object.defineProperty(exports, key, { enumerable: true, value: definition[i++] });
6823
- /******/ } else {
6824
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: binding });
6825
- /******/ }
6826
- /******/ } else if(binding === 0) { i++; }
6827
- /******/ }
6828
- /******/ } else {
6829
- /******/ for(var key in definition) {
6830
- /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
6831
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
6832
- /******/ }
6833
- /******/ }
6812
+ /******/ // define getter/value functions for harmony exports
6813
+ /******/ __webpack_require__.d = (exports, definition) => {
6814
+ /******/ for(var key in definition) {
6815
+ /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
6816
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
6834
6817
  /******/ }
6835
- /******/ };
6836
- /******/ })();
6818
+ /******/ }
6819
+ /******/ };
6837
6820
  /******/
6838
6821
  /******/ /* webpack/runtime/global */
6839
- /******/ (() => {
6840
- /******/ __webpack_require__.g = (function() {
6841
- /******/ if (typeof globalThis === 'object') return globalThis;
6842
- /******/ try {
6843
- /******/ return this || new Function('return this')();
6844
- /******/ } catch (e) {
6845
- /******/ if (typeof window === 'object') return window;
6846
- /******/ }
6847
- /******/ })();
6822
+ /******/ __webpack_require__.g = (function() {
6823
+ /******/ if (typeof globalThis === 'object') return globalThis;
6824
+ /******/ try {
6825
+ /******/ return this || new Function('return this')();
6826
+ /******/ } catch (e) {
6827
+ /******/ if (typeof window === 'object') return window;
6828
+ /******/ }
6848
6829
  /******/ })();
6849
6830
  /******/
6850
6831
  /******/ /* webpack/runtime/hasOwnProperty shorthand */
6851
- /******/ (() => {
6852
- /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
6853
- /******/ })();
6832
+ /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop));
6854
6833
  /******/
6855
6834
  /************************************************************************/
6856
6835
 
@@ -6861,7 +6840,7 @@ Object .defineProperty (Namespace, "add",
6861
6840
  {
6862
6841
  value (name, module)
6863
6842
  {
6864
- if (Namespace .hasOwnProperty (name))
6843
+ if (Object .hasOwn (Namespace, name))
6865
6844
  {
6866
6845
  console .error (new Error (`Namespace: "${name}" already exists.`));
6867
6846
  return module;
@@ -6891,18 +6870,22 @@ Object .defineProperty (X3DConstants, "addConstant",
6891
6870
  {
6892
6871
  value (name, value)
6893
6872
  {
6894
- if (this .hasOwnProperty (name) || this .hasOwnProperty (value))
6873
+ if (Object .hasOwn (this, name) || Object .hasOwn (this, value))
6895
6874
  return;
6896
6875
 
6897
- Object .defineProperty (this, name,
6898
- {
6899
- value: value ?? ++ CONSTANT_VALUE,
6900
- enumerable: true,
6901
- });
6876
+ value ??= ++ CONSTANT_VALUE;
6902
6877
 
6903
- Object .defineProperty (this, this [name],
6878
+ Object .defineProperties (this,
6904
6879
  {
6905
- value: name,
6880
+ [name]:
6881
+ {
6882
+ value: value,
6883
+ enumerable: true,
6884
+ },
6885
+ [value]:
6886
+ {
6887
+ value: name,
6888
+ },
6906
6889
  });
6907
6890
  },
6908
6891
  });
@@ -7094,10 +7077,6 @@ const Algorithm =
7094
7077
  n = (n & 0x33333333) + ((n >>> 2) & 0x33333333);
7095
7078
  return ((n + (n >>> 4) & 0xF0F0F0F) * 0x1010101) >>> 24;
7096
7079
  },
7097
- cmp (lhs, rhs)
7098
- {
7099
- return lhs > rhs ? 1 : lhs < rhs ? -1 : 0;
7100
- },
7101
7080
  less (lhs, rhs)
7102
7081
  {
7103
7082
  return lhs < rhs;
@@ -7110,19 +7089,17 @@ const Algorithm =
7110
7089
  {
7111
7090
  // https://en.cppreference.com/w/cpp/algorithm/lower_bound
7112
7091
 
7113
- let
7114
- index = 0,
7115
- step = 0,
7116
- count = last - first;
7092
+ let count = last - first;
7117
7093
 
7118
7094
  while (count > 0)
7119
7095
  {
7120
- step = count >>> 1;
7121
- index = first + step;
7096
+ const
7097
+ step = count >>> 1,
7098
+ index = first + step;
7122
7099
 
7123
7100
  if (comp (array [index], value))
7124
7101
  {
7125
- first = ++ index;
7102
+ first = index + 1;
7126
7103
  count -= step + 1;
7127
7104
  }
7128
7105
  else
@@ -7137,15 +7114,13 @@ const Algorithm =
7137
7114
  {
7138
7115
  // https://en.cppreference.com/w/cpp/algorithm/upper_bound
7139
7116
 
7140
- let
7141
- index = 0,
7142
- step = 0,
7143
- count = last - first;
7117
+ let count = last - first;
7144
7118
 
7145
7119
  while (count > 0)
7146
7120
  {
7147
- step = count >>> 1;
7148
- index = first + step;
7121
+ const
7122
+ step = count >>> 1,
7123
+ index = first + step;
7149
7124
 
7150
7125
  if (comp (value, array [index]))
7151
7126
  {
@@ -7153,7 +7128,7 @@ const Algorithm =
7153
7128
  }
7154
7129
  else
7155
7130
  {
7156
- first = ++ index;
7131
+ first = index + 1;
7157
7132
  count -= step + 1;
7158
7133
  }
7159
7134
  }
@@ -14374,10 +14349,10 @@ const SFNode_handler =
14374
14349
 
14375
14350
  if (field)
14376
14351
  {
14377
- // Specification conform would be: accessType & X3DConstants .outputOnly.
14378
- // But we allow read access to plain fields, too.
14352
+ // Specification conform would be: `accessType & X3DConstants .outputOnly`.
14353
+ // However, we also allow read access to initializeOnly fields.
14379
14354
  if (field .getAccessType () === Base_X3DConstants .inputOnly)
14380
- return undefined;
14355
+ return;
14381
14356
 
14382
14357
  return field .valueOf ();
14383
14358
  }
@@ -14501,16 +14476,14 @@ Object .assign (Object .setPrototypeOf (SFNode .prototype, Base_X3DField .protot
14501
14476
  {
14502
14477
  const target = this [_target];
14503
14478
 
14504
- if (node)
14505
- return target .getValue () === node .getValue ();
14479
+ if (node instanceof SFNode)
14480
+ return target .getValue () === node [_target] .getValue ();
14506
14481
 
14507
- return target .getValue () === null;
14482
+ return target .getValue () === node;
14508
14483
  },
14509
14484
  isDefaultValue ()
14510
14485
  {
14511
- const target = this [_target];
14512
-
14513
- return target .getValue () === null;
14486
+ return this [_target] .getValue () === null;
14514
14487
  },
14515
14488
  set (node)
14516
14489
  {
@@ -15732,6 +15705,17 @@ Object .defineProperties (X3DArrayField,
15732
15705
  for (const v of Array .from (... args))
15733
15706
  target .push (v);
15734
15707
 
15708
+ return array;
15709
+ },
15710
+ },
15711
+ fromArray:
15712
+ {
15713
+ value (values)
15714
+ {
15715
+ const array = new constructor ();
15716
+
15717
+ array .setValue (values);
15718
+
15735
15719
  return array;
15736
15720
  },
15737
15721
  },
@@ -17057,7 +17041,7 @@ Object .assign (Object .setPrototypeOf (X3DTypedArrayField .prototype, Base_X3DA
17057
17041
 
17058
17042
  const cmp = compareFn
17059
17043
  ? (a, b) => compareFn (valueType (a), valueType (b))
17060
- : Math_Algorithm .cmp;
17044
+ : undefined;
17061
17045
 
17062
17046
  target .set (array .subarray (0, length) .sort (cmp));
17063
17047
  }
@@ -17682,6 +17666,49 @@ Object .assign (Object .setPrototypeOf (MFImage .prototype, Base_X3DObjectArrayF
17682
17666
  {
17683
17667
  return Fields_SFImage;
17684
17668
  },
17669
+ setValue (value)
17670
+ {
17671
+ if (value .length && !(value [0] instanceof Fields_SFImage))
17672
+ {
17673
+ const
17674
+ target = this .getTarget (),
17675
+ array = target .getValue ();
17676
+
17677
+ this .length = 0;
17678
+
17679
+ while (value .length)
17680
+ {
17681
+ const
17682
+ width = value .shift (),
17683
+ height = value .shift (),
17684
+ comp = value .shift (),
17685
+ pixels = value .splice (0, width * height),
17686
+ field = new Fields_SFImage (width, height, comp, pixels);
17687
+
17688
+ target .addChildObject (field);
17689
+ array .push (field);
17690
+ }
17691
+
17692
+ target .addEvent ();
17693
+ }
17694
+ else
17695
+ {
17696
+ Base_X3DObjectArrayField .prototype .setValue .call (this, value);
17697
+ }
17698
+ },
17699
+ flat ()
17700
+ {
17701
+ return Array .from (this, element => Array .from (element)) .flat ();
17702
+ },
17703
+ sort (compareFn)
17704
+ {
17705
+ const target = this .getTarget ();
17706
+
17707
+ target .getValue () .sort (compareFn);
17708
+ target .addEvent ();
17709
+
17710
+ return this;
17711
+ },
17685
17712
  });
17686
17713
 
17687
17714
  for (const key of Object .keys (MFImage .prototype))
@@ -18838,7 +18865,7 @@ const Legacy_default_ = Legacy;
18838
18865
 
18839
18866
  /* harmony default export */ const Browser_Legacy = (x_ite_Namespace .add ("Legacy", Legacy_default_));
18840
18867
  ;// ./src/x_ite/BROWSER_VERSION.js
18841
- const BROWSER_VERSION_default_ = "16.1.2";
18868
+ const BROWSER_VERSION_default_ = "16.2.0";
18842
18869
  ;
18843
18870
 
18844
18871
  /* harmony default export */ const BROWSER_VERSION = (x_ite_Namespace .add ("BROWSER_VERSION", BROWSER_VERSION_default_));
@@ -18948,37 +18975,28 @@ const dictionary_default_ = [
18948
18975
  {
18949
18976
  en: "fps",
18950
18977
  de: "BpS",
18951
- fr: "",
18952
18978
  },
18953
18979
  {
18954
18980
  en: "Speed",
18955
18981
  de: "Geschwindigkeit",
18956
- fr: "Vélocité",
18982
+ fr: "Vitesse",
18957
18983
  },
18958
18984
  {
18959
18985
  en: "m/s",
18960
- de: "",
18961
- fr: "",
18962
18986
  },
18963
18987
  {
18964
18988
  en: "km/h",
18965
- de: "",
18966
- fr: "",
18967
18989
  },
18968
18990
  {
18969
18991
  en: "Browser",
18970
- de: "",
18971
18992
  fr: "Navigateur",
18972
18993
  },
18973
18994
  {
18974
18995
  en: "ms",
18975
- de: "",
18976
- fr: "",
18977
18996
  },
18978
18997
  {
18979
18998
  en: "X3D total",
18980
18999
  de: "X3D gesamt",
18981
- fr: "X3D total",
18982
19000
  },
18983
19001
  {
18984
19002
  en: "Event Processing",
@@ -19003,12 +19021,12 @@ const dictionary_default_ = [
19003
19021
  {
19004
19022
  en: "Rendering",
19005
19023
  de: "Rendering",
19006
- fr: "Rendement",
19024
+ fr: "Rendu",
19007
19025
  },
19008
19026
  {
19009
19027
  en: "Number of Primitives",
19010
19028
  de: "Anzahl der Grundobjekte",
19011
- fr: "Nombre d'Objets de Base",
19029
+ fr: "Nombre de Primitives",
19012
19030
  },
19013
19031
  {
19014
19032
  en: "Number of Shapes",
@@ -19018,12 +19036,12 @@ const dictionary_default_ = [
19018
19036
  {
19019
19037
  en: "Number of Sensors",
19020
19038
  de: "Anzahl der Sensoren",
19021
- fr: "Nombre de Senseurs",
19039
+ fr: "Nombre de Capteurs",
19022
19040
  },
19023
19041
  {
19024
19042
  en: "Browser Timings",
19025
19043
  de: "Zeitberechnung",
19026
- fr: "Calcul du Temps",
19044
+ fr: "Temps du Navigateur",
19027
19045
  },
19028
19046
  {
19029
19047
  en: "Viewpoints",
@@ -19033,7 +19051,7 @@ const dictionary_default_ = [
19033
19051
  {
19034
19052
  en: "Available Viewers",
19035
19053
  de: "Verfügbare Betrachter",
19036
- fr: "Visionneurs disponibles",
19054
+ fr: "Visionneurs disponibles",
19037
19055
  },
19038
19056
  {
19039
19057
  en: "Straighten Horizon",
@@ -19043,17 +19061,17 @@ const dictionary_default_ = [
19043
19061
  {
19044
19062
  en: "Primitive Quality",
19045
19063
  de: "Qualität der Grundobjekte",
19046
- fr: "Qualité des Objets simples",
19064
+ fr: "Qualité des Primitives",
19047
19065
  },
19048
19066
  {
19049
19067
  en: "High",
19050
19068
  de: "Hoch",
19051
- fr: "Haut",
19069
+ fr: "Élevée",
19052
19070
  },
19053
19071
  {
19054
19072
  en: "high",
19055
19073
  de: "hoch",
19056
- fr: "haut",
19074
+ fr: "élevée",
19057
19075
  },
19058
19076
  {
19059
19077
  en: "Medium",
@@ -19077,18 +19095,18 @@ const dictionary_default_ = [
19077
19095
  },
19078
19096
  {
19079
19097
  en: "Texture Quality",
19080
- de: "Textur Qualität",
19098
+ de: "Texturqualität",
19081
19099
  fr: "Qualité des Textures",
19082
19100
  },
19083
19101
  {
19084
19102
  en: "Display Rubberband",
19085
19103
  de: "Gummiband anzeigen",
19086
- fr: "Présenter le Bande élastique",
19104
+ fr: "Afficher la Sélection élastique",
19087
19105
  },
19088
19106
  {
19089
19107
  en: "Rubberband",
19090
19108
  de: "Gummiband",
19091
- fr: "Bande élastique",
19109
+ fr: "Sélection élastique",
19092
19110
  },
19093
19111
  {
19094
19112
  en: "on",
@@ -19103,22 +19121,22 @@ const dictionary_default_ = [
19103
19121
  {
19104
19122
  en: "Mute Browser",
19105
19123
  de: "Browser stumm schalten",
19106
- fr: "Rendre Navigateur muet",
19124
+ fr: "Couper le Son du Navigateur",
19107
19125
  },
19108
19126
  {
19109
19127
  en: "Browser muted",
19110
- de: "Browser stumm geschalten",
19111
- fr: "Navigateur muet",
19128
+ de: "Browser stummgeschaltet",
19129
+ fr: "Son du Navigateur coupé",
19112
19130
  },
19113
19131
  {
19114
19132
  en: "Browser unmuted",
19115
- de: "Browser Ton an",
19116
- fr: "Son de Navigateur réactivé",
19133
+ de: "Browserton eingeschaltet",
19134
+ fr: "Son du Navigateur rétabli",
19117
19135
  },
19118
19136
  {
19119
19137
  en: "Leave Fullscreen",
19120
19138
  de: "Vollbild verlassen",
19121
- fr: "Laisser le plein Écran",
19139
+ fr: "Quitter le Plein Écran",
19122
19140
  },
19123
19141
  {
19124
19142
  en: "Fullscreen",
@@ -19163,7 +19181,6 @@ const dictionary_default_ = [
19163
19181
  {
19164
19182
  en: "Points",
19165
19183
  de: "Punkte",
19166
- fr: "",
19167
19184
  },
19168
19185
  {
19169
19186
  en: "Flat",
@@ -19172,7 +19189,7 @@ const dictionary_default_ = [
19172
19189
  },
19173
19190
  {
19174
19191
  en: "Wireframe",
19175
- de: "Drahtgittermodel",
19192
+ de: "Drahtgittermodell",
19176
19193
  fr: "Image filaire",
19177
19194
  },
19178
19195
  {
@@ -19193,7 +19210,7 @@ const dictionary_default_ = [
19193
19210
  {
19194
19211
  en: "Failed loading world.",
19195
19212
  de: "Laden der Dateien fehlgeschlagen.",
19196
- fr: "Le chargement des Fichiers a échoué.",
19213
+ fr: "Le chargement des fichiers a échoué.",
19197
19214
  },
19198
19215
  {
19199
19216
  en: "Show World Info",
@@ -19203,12 +19220,11 @@ const dictionary_default_ = [
19203
19220
  {
19204
19221
  en: "Viewpoint is copied to clipboard.",
19205
19222
  de: "Ansichtspunkt wurde in die Zwischenablage kopiert.",
19206
- fr: "Le point de Vue est copié dans le Presse-Papiers.",
19223
+ fr: "Le point de vue a été copié dans le presse-papiers.",
19207
19224
  },
19208
19225
  {
19209
19226
  en: "Animations",
19210
- de: "Animationen",
19211
- fr: "",
19227
+ fr: "Séquences animées",
19212
19228
  },
19213
19229
  {
19214
19230
  en: "All",
@@ -19222,18 +19238,18 @@ const dictionary_default_ = [
19222
19238
  },
19223
19239
  {
19224
19240
  en: "Start WebXR session.",
19225
- de: "Starte eine WebXR Session.",
19226
- fr: "Démarrez une session WebXR.",
19241
+ de: "WebXR-Sitzung starten.",
19242
+ fr: "Démarrer une session WebXR.",
19227
19243
  },
19228
19244
  {
19229
19245
  en: "Stop WebXR session.",
19230
- de: "Beende die WebXR Session.",
19231
- fr: "Terminez la session WebXR.",
19246
+ de: "WebXR-Sitzung beenden.",
19247
+ fr: "Terminer la session WebXR.",
19232
19248
  },
19233
19249
  {
19234
19250
  en: "Activate sound.",
19235
- de: "Activiere den Ton.",
19236
- fr: "Activez le son.",
19251
+ de: "Ton aktivieren.",
19252
+ fr: "Activer le son.",
19237
19253
  },
19238
19254
  {
19239
19255
  en: "Points; Lines; Triangles",
@@ -19242,7 +19258,7 @@ const dictionary_default_ = [
19242
19258
  },
19243
19259
  {
19244
19260
  en: "Opaque Shapes + Transparent Shapes",
19245
- de: "opaque Formen + transparente Formen",
19261
+ de: "Undurchsichtige Formen + Transparente Formen",
19246
19262
  fr: "Formes opaques + Formes transparentes",
19247
19263
  },
19248
19264
  ];
@@ -19777,13 +19793,15 @@ Object .assign (Object .setPrototypeOf (BrowserOptions .prototype, Base_X3DBaseN
19777
19793
  this ._Exposure .addInterest ("set_Exposure__", this);
19778
19794
  this ._LogarithmicDepthBuffer .addInterest ("set_LogarithmicDepthBuffer__", this);
19779
19795
  this ._Multisampling .addInterest ("set_Multisampling__", this);
19780
- this ._Mute .addInterest ("set_Mute__", this);
19796
+ this ._Mute .addInterest ("set_SoundIntensity__", this);
19781
19797
  this ._OrderIndependentTransparency .addInterest ("set_OrderIndependentTransparency__", this);
19798
+ this ._SoundIntensity .addInterest ("set_SoundIntensity__", this);
19782
19799
  this ._Timings .addInterest ("set_Timings__", this);
19783
19800
  this ._XRSessionMode .addInterest ("set_XRSessionMode__", this);
19784
19801
 
19785
19802
  this .set_Antialiased__ (this ._Antialiased);
19786
19803
  this .set_Shading__ (this ._Shading);
19804
+ this .set_SoundIntensity__ ();
19787
19805
  this .set_AutoUpdate__ (this ._AutoUpdate);
19788
19806
  this .set_ContentScale__ (this ._ContentScale);
19789
19807
  this .set_DisplayColorSpace (this ._DisplayColorSpace);
@@ -19952,13 +19970,6 @@ Object .assign (Object .setPrototypeOf (BrowserOptions .prototype, Base_X3DBaseN
19952
19970
  browser .setShading (this .shading);
19953
19971
  };
19954
19972
  })(),
19955
- set_StraightenHorizon__ (straightenHorizon)
19956
- {
19957
- this .localStorage .StraightenHorizon = straightenHorizon .getValue ();
19958
-
19959
- if (straightenHorizon .getValue ())
19960
- this .getBrowser () .getActiveLayer () ?.straightenView ();
19961
- },
19962
19973
  set_AutoUpdate__ (autoUpdate)
19963
19974
  {
19964
19975
  document .removeEventListener ("visibilitychange", this .checkUpdateListener);
@@ -20095,20 +20106,25 @@ Object .assign (Object .setPrototypeOf (BrowserOptions .prototype, Base_X3DBaseN
20095
20106
 
20096
20107
  browser .reshape ();
20097
20108
  },
20098
- set_Mute__ (mute)
20109
+ set_OrderIndependentTransparency__ ()
20110
+ {
20111
+ this .getBrowser () .reshape ();
20112
+ },
20113
+ set_SoundIntensity__ ()
20099
20114
  {
20100
20115
  const
20101
- browser = this .getBrowser (),
20102
- audioContext = browser .getAudioContext ();
20116
+ unmute = !this ._Mute .getValue (),
20117
+ gain = unmute * Math_Algorithm .clamp (this ._SoundIntensity .getValue (), 0, 1);
20103
20118
 
20104
- if (mute .getValue ())
20105
- browser .stopAudioElement (audioContext, "suspend");
20106
- else
20107
- browser .startAudioElement (audioContext, "resume");
20119
+ for (const soundNode of this .getBrowser () .getSoundDestinations ())
20120
+ soundNode .getSoundDestination () .gain .value = gain;
20108
20121
  },
20109
- set_OrderIndependentTransparency__ ()
20122
+ set_StraightenHorizon__ (straightenHorizon)
20110
20123
  {
20111
- this .getBrowser () .reshape ();
20124
+ this .localStorage .StraightenHorizon = straightenHorizon .getValue ();
20125
+
20126
+ if (straightenHorizon .getValue ())
20127
+ this .getBrowser () .getActiveLayer () ?.straightenView ();
20112
20128
  },
20113
20129
  set_Timings__ (timings)
20114
20130
  {
@@ -20161,6 +20177,7 @@ Object .defineProperties (BrowserOptions,
20161
20177
  new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "Mute", new x_ite_Fields .SFBool ()),
20162
20178
  new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "Notifications", new x_ite_Fields .SFBool (true)),
20163
20179
  new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "OrderIndependentTransparency", new x_ite_Fields .SFBool ()),
20180
+ new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "SoundIntensity", new x_ite_Fields .SFFloat (1)),
20164
20181
  new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "StraightenHorizon", new x_ite_Fields .SFBool (true)),
20165
20182
  new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "TextCompression", new x_ite_Fields .SFString ("CHAR_SPACING")),
20166
20183
  new Base_X3DFieldDefinition (Base_X3DConstants .inputOutput, "Timings", new x_ite_Fields .SFBool ()),
@@ -20294,6 +20311,7 @@ Object .defineProperties (RenderingProperties,
20294
20311
  new Base_X3DFieldDefinition (Base_X3DConstants .outputOnly, "MaxSamples", new x_ite_Fields .SFInt32 (0)),
20295
20312
  new Base_X3DFieldDefinition (Base_X3DConstants .outputOnly, "Multisampling", new x_ite_Fields .SFInt32 (4)),
20296
20313
  new Base_X3DFieldDefinition (Base_X3DConstants .outputOnly, "PixelsPerPoint", new x_ite_Fields .SFDouble (1)),
20314
+ new Base_X3DFieldDefinition (Base_X3DConstants .outputOnly, "SoundDestinations", new x_ite_Fields .SFInt32 ()),
20297
20315
  new Base_X3DFieldDefinition (Base_X3DConstants .outputOnly, "XRSession", new x_ite_Fields .SFBool ()),
20298
20316
  ]),
20299
20317
  enumerable: true,
@@ -21537,7 +21555,7 @@ Object .assign (Object .setPrototypeOf (X3DNode .prototype, Base_X3DBaseNode .pr
21537
21555
  {
21538
21556
  destinationField .addReference (instance .getField (originalReference .getName ()));
21539
21557
  }
21540
- catch (error)
21558
+ catch
21541
21559
  {
21542
21560
  console .error (`No reference '${originalReference .getName ()}' inside execution context ${instance .getTypeName ()} '${instance .getName ()}'.`);
21543
21561
  }
@@ -21966,7 +21984,7 @@ Object .assign (Object .setPrototypeOf (X3DNode .prototype, Base_X3DBaseNode .pr
21966
21984
  [_metaDataCallbacks]: new Map (),
21967
21985
  addMetaDataCallback (key, path, callback)
21968
21986
  {
21969
- if (!this .hasOwnProperty (_metaDataCallbacks))
21987
+ if (!Object .hasOwn (this, _metaDataCallbacks))
21970
21988
  this [_metaDataCallbacks] = new Map ();
21971
21989
 
21972
21990
  let map = this [_metaDataCallbacks] .get (path);
@@ -24861,7 +24879,7 @@ Object .assign (Object .setPrototypeOf (X3DPrototypeInstance .prototype, Core_X3
24861
24879
  for (const fieldDefinition of this [_protoNode] .getFieldDefinitions ())
24862
24880
  this .addPredefinedField (fieldDefinition);
24863
24881
 
24864
- // Reuse old fields, and therefor routes.
24882
+ // Reuse old fields, and therefore routes.
24865
24883
 
24866
24884
  for (const protoField of this [_protoFields])
24867
24885
  {
@@ -26016,8 +26034,6 @@ Object .assign (X3DParser .prototype,
26016
26034
  },
26017
26035
  sanitizeName (name = "")
26018
26036
  {
26019
-
26020
-
26021
26037
  // NonIdFirstChar
26022
26038
  name = name .replace (/^[\x30-\x39\x00-\x20\x22\x23\x27\x2b\x2c\x2d\x2e\x5b\x5c\x5d\x7b\x7d\x7f]*/, "");
26023
26039
 
@@ -26031,8 +26047,6 @@ Object .assign (X3DParser .prototype,
26031
26047
  name = name .replace (/^-+|-+$/g, "");
26032
26048
 
26033
26049
  return name;
26034
-
26035
-
26036
26050
  },
26037
26051
  renameExistingNode (name)
26038
26052
  {
@@ -30776,6 +30790,9 @@ Object .assign (X3DOptimizer .prototype,
30776
30790
  if (!node .getNodeType () .includes (Base_X3DConstants .X3DGroupingNode))
30777
30791
  return node;
30778
30792
 
30793
+ if (!node .visible)
30794
+ return node;
30795
+
30779
30796
  const children = Array .from (node .children);
30780
30797
 
30781
30798
  removedNodes .push (this .removeChildren (node));
@@ -30855,9 +30872,6 @@ Object .assign (X3DOptimizer .prototype,
30855
30872
  if (node .children .length !== 1)
30856
30873
  return node;
30857
30874
 
30858
- if (!node .visible)
30859
- return node;
30860
-
30861
30875
  const child = node .children [0];
30862
30876
 
30863
30877
  if (child .getValue () .getCloneCount () > 1)
@@ -30870,16 +30884,27 @@ Object .assign (X3DOptimizer .prototype,
30870
30884
  {
30871
30885
  case "Transform":
30872
30886
  case "HAnimHumanoid":
30887
+ {
30888
+ if (child .visible !== node .visible)
30889
+ return node;
30890
+
30873
30891
  return this .combineTransform (node, child, removedNodes);
30892
+ }
30874
30893
  case "DirectionalLight":
30875
30894
  case "PointLight":
30876
30895
  case "SpotLight":
30896
+ {
30877
30897
  return this .combineLight (node, child, removedNodes);
30898
+ }
30878
30899
  case "Viewpoint":
30879
30900
  case "OrthoViewpoint":
30901
+ {
30880
30902
  return this .combineViewpoint (node, child, removedNodes);
30903
+ }
30881
30904
  default:
30905
+ {
30882
30906
  return node;
30907
+ }
30883
30908
  }
30884
30909
  },
30885
30910
  combineTransform (node, child, removedNodes)
@@ -31167,7 +31192,7 @@ const Plane3_default_ = Plane3;
31167
31192
 
31168
31193
  /* harmony default export */ const Geometry_Plane3 = (x_ite_Namespace .add ("Plane3", Plane3_default_));
31169
31194
  ;// ./src/standard/Math/Geometry/Triangle3.js
31170
- /* provided dependency */ var libtess = __webpack_require__(457);
31195
+ /* provided dependency */ var libtess = __webpack_require__(289);
31171
31196
 
31172
31197
 
31173
31198
  const Triangle3 =
@@ -43461,7 +43486,7 @@ function eventsProcessed ()
43461
43486
  return null;
43462
43487
 
43463
43488
  const textureTransformNodes = this .textureTransformNodes
43464
- .sort ((a, b) => Math_Algorithm .cmp (a ._mapping .getValue (), b ._mapping .getValue ()));
43489
+ .sort ((a, b) => a ._mapping .getValue () .localeCompare (b ._mapping .getValue (), "en"));
43465
43490
 
43466
43491
  switch (textureTransformNodes .length)
43467
43492
  {
@@ -43876,7 +43901,7 @@ function eventsProcessed ()
43876
43901
  default:
43877
43902
  {
43878
43903
  const textureCoordinateNodes = Array .from (material .texCoordMappings .entries ())
43879
- .sort ((a, b) => Math_Algorithm .cmp (a [0], b [0]))
43904
+ .sort ((a, b) => a [0] .localeCompare (b [0], "en"))
43880
43905
  .sort ((a, b) => a [1] - b [1])
43881
43906
  .map (([mapping, i]) => this .createTextureCoordinate (texCoords [i], mapping));
43882
43907
 
@@ -47867,7 +47892,7 @@ const Bezier_default_ = Bezier;
47867
47892
 
47868
47893
  /* harmony default export */ const Algorithms_Bezier = (x_ite_Namespace .add ("Bezier", Bezier_default_));
47869
47894
  ;// ./src/x_ite/Parser/SVGParser.js
47870
- /* provided dependency */ var SVGParser_libtess = __webpack_require__(457);
47895
+ /* provided dependency */ var SVGParser_libtess = __webpack_require__(289);
47871
47896
 
47872
47897
 
47873
47898
 
@@ -51077,8 +51102,10 @@ function FileLoader (node, { cacheScene = false, dataAsString = true } = { })
51077
51102
  this .executionContext = node .getExecutionContext ();
51078
51103
  this .target = "";
51079
51104
  this .url = [ ];
51080
- this .fileURL = new URL (this .getBaseURL ());
51081
51105
  this .controller = new AbortController ();
51106
+ this .candidateURL = "";
51107
+ this .resolvedURL = null;
51108
+ this .attempts = [ ];
51082
51109
  }
51083
51110
 
51084
51111
  Object .assign (FileLoader,
@@ -51109,10 +51136,6 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51109
51136
 
51110
51137
  this .controller .abort ();
51111
51138
  },
51112
- getURL ()
51113
- {
51114
- return this .fileURL;
51115
- },
51116
51139
  getBaseURL ()
51117
51140
  {
51118
51141
  if (this .node instanceof Execution_X3DWorld)
@@ -51195,8 +51218,8 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51195
51218
 
51196
51219
  if (DEVELOPMENT)
51197
51220
  {
51198
- if (this .fileURL .protocol !== "data:")
51199
- console .info (`Done loading scene '${decodeURI (this .fileURL)}'.`);
51221
+ if (this .resolvedURL .protocol !== "data:")
51222
+ console .info (`Done loading scene '${decodeURI (this .resolvedURL)}'.`);
51200
51223
  }
51201
51224
  },
51202
51225
  createX3DFromURL (url, parameter, callback, bindViewpoint, foreign)
@@ -51213,13 +51236,15 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51213
51236
  if (data === null)
51214
51237
  callback (null);
51215
51238
  else
51216
- this .createX3DFromString (this .fileURL, data, callback, this .loadDocumentError .bind (this));
51239
+ this .createX3DFromString (this .resolvedURL, data, callback, this .loadDocumentError .bind (this));
51217
51240
  },
51218
51241
  loadDocument (url, callback)
51219
51242
  {
51220
51243
  this .url = url .slice ();
51221
51244
  this .callback = callback;
51222
51245
 
51246
+ this .attempts .length = 0;
51247
+
51223
51248
  if (url .length === 0)
51224
51249
  return this .loadDocumentError ();
51225
51250
 
@@ -51228,8 +51253,15 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51228
51253
  },
51229
51254
  async loadDocumentAsync (url)
51230
51255
  {
51256
+ // Not every candidate reaches URL resolution, so resolvedURL stays null until it
51257
+ // does. Diagnostics must not attribute the previous candidate's resolved URL to
51258
+ // this one.
51259
+
51260
+ this .candidateURL = url;
51261
+ this .resolvedURL = null;
51262
+
51231
51263
  if (!url .length)
51232
- return this .loadDocumentError ();
51264
+ return this .loadDocumentError (new Error ("Empty URL."));
51233
51265
 
51234
51266
  // Script:
51235
51267
  {
@@ -51239,7 +51271,7 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51239
51271
  return await this .callback (url .substring (result [0] .length));
51240
51272
  }
51241
51273
 
51242
- this .fileURL = new URL (url, this .getBaseURL ());
51274
+ this .resolvedURL = new URL (url, this .getBaseURL ());
51243
51275
 
51244
51276
  // Handle data URLs that are not base64 decoded here:
51245
51277
  if (this .dataAsString)
@@ -51261,17 +51293,17 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51261
51293
 
51262
51294
  // Bind Viewpoint URLs:
51263
51295
 
51264
- if (this .fileURL .protocol !== "data:" && this .bindViewpoint)
51296
+ if (this .resolvedURL .protocol !== "data:" && this .bindViewpoint)
51265
51297
  {
51266
51298
  const referer = new URL (this .getBaseURL ());
51267
51299
 
51268
- if (this .fileURL .protocol === referer .protocol &&
51269
- this .fileURL .hostname === referer .hostname &&
51270
- this .fileURL .port === referer .port &&
51271
- this .fileURL .pathname === referer .pathname &&
51272
- this .fileURL .hash)
51300
+ if (this .resolvedURL .protocol === referer .protocol &&
51301
+ this .resolvedURL .hostname === referer .hostname &&
51302
+ this .resolvedURL .port === referer .port &&
51303
+ this .resolvedURL .pathname === referer .pathname &&
51304
+ this .resolvedURL .hash)
51273
51305
  {
51274
- return this .bindViewpoint (decodeURIComponent (this .fileURL .hash .substring (1)));
51306
+ return this .bindViewpoint (decodeURIComponent (this .resolvedURL .hash .substring (1)));
51275
51307
  }
51276
51308
  }
51277
51309
 
@@ -51282,19 +51314,19 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51282
51314
  // Handle target
51283
51315
 
51284
51316
  if (this .target .length && this .target !== "_self")
51285
- return this .foreign (this .fileURL .href, this .target);
51317
+ return this .foreign (this .resolvedURL .href, this .target);
51286
51318
 
51287
51319
  // Handle well known foreign content depending on extension or if path looks like directory.
51288
51320
 
51289
- if (this .fileURL .protocol !== "data:" && this .fileURL .href .match (/\.(?:html|htm|xhtml)$/))
51290
- return this .foreign (this .fileURL .href, this .target);
51321
+ if (this .resolvedURL .protocol !== "data:" && this .resolvedURL .href .match (/\.(?:html|htm|xhtml)$/))
51322
+ return this .foreign (this .resolvedURL .href, this .target);
51291
51323
  }
51292
51324
 
51293
51325
  // Cached scenes:
51294
51326
 
51295
- if (this .sceneCallback && this .cacheScene && !this .fileURL .search .length)
51327
+ if (this .sceneCallback && this .cacheScene && !this .resolvedURL .search .length)
51296
51328
  {
51297
- const cacheURL = new URL (this .fileURL);
51329
+ const cacheURL = new URL (this .resolvedURL);
51298
51330
 
51299
51331
  cacheURL .hash = "";
51300
51332
 
@@ -51304,7 +51336,7 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51304
51336
  {
51305
51337
  const scene = await promise;
51306
51338
 
51307
- scene .setWorldURL (this .fileURL .href);
51339
+ scene .setWorldURL (this .resolvedURL .href);
51308
51340
 
51309
51341
  return this .sceneCallback (scene);
51310
51342
  }
@@ -51322,7 +51354,7 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51322
51354
 
51323
51355
  const
51324
51356
  options = { cache: this .node .getCache () ? "default" : "reload", signal: this .controller .signal },
51325
- response = this .checkResponse (await fetch (this .fileURL, options)),
51357
+ response = this .checkResponse (await fetch (this .resolvedURL, options)),
51326
51358
  mimeType = response .headers .get ("Content-Type") ?.replace (/;.*$/, "");
51327
51359
 
51328
51360
  if (this .foreign)
@@ -51330,10 +51362,10 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51330
51362
  // console .log (mimeType);
51331
51363
 
51332
51364
  if (foreignMimeType .has (mimeType))
51333
- return this .foreign (this .fileURL .href, this .target);
51365
+ return this .foreign (this .resolvedURL .href, this .target);
51334
51366
  }
51335
51367
 
51336
- await this .callback (await helper.gunzip (await this .getBlob (response)), this .fileURL);
51368
+ await this .callback (await helper.gunzip (await this .getBlob (response)), this .resolvedURL);
51337
51369
  },
51338
51370
  async getBlob (response)
51339
51371
  {
@@ -51373,7 +51405,7 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51373
51405
  if (response .ok)
51374
51406
  return response;
51375
51407
 
51376
- throw Error (response .statusText || response .status);
51408
+ throw new Error (response .statusText || response .status);
51377
51409
  },
51378
51410
  loadDocumentError (error)
51379
51411
  {
@@ -51399,12 +51431,52 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51399
51431
  if (!error)
51400
51432
  return;
51401
51433
 
51402
- const typeName = this .node instanceof Execution_X3DWorld ? "" : ` for ${this .node .getTypeName ()}`;
51434
+ // Candidates that are evaluated rather than fetched an empty string, or a
51435
+ // script URL — have no resolved URL, and are reported by their authored value.
51403
51436
 
51404
- if (this .fileURL .protocol === "data:")
51405
- console .error (`Couldn't load data URL${typeName}.`, error);
51406
- else
51407
- console .error (`Couldn't load URL '${helper.try (() => decodeURI (this .fileURL)) ?? this .fileURL}'${typeName}.`, error);
51437
+ const
51438
+ typeName = this .node instanceof Execution_X3DWorld ? "" : ` for ${this .node .getTypeName ()}`,
51439
+ dataURL = this .resolvedURL ?.protocol === "data:",
51440
+ resolved = this .resolvedURL && !dataURL ? `${helper.try (() => decodeURI (this .resolvedURL)) ?? this .resolvedURL}` : "",
51441
+ subject = !this .candidateURL .length ? "empty URL"
51442
+ : dataURL ? "data URL"
51443
+ : `URL '${resolved || this .truncate (this .candidateURL)}'`;
51444
+
51445
+ this .attempts .push ({ url: this .candidateURL, resolved, error });
51446
+
51447
+ // A url field is a fallback list, so a failed candidate is not yet a failure of
51448
+ // the resource: a later candidate may still succeed. Report the resource as
51449
+ // failed only once every candidate has been tried.
51450
+
51451
+ if (this .url .length)
51452
+ return console .warn (`Couldn't load ${subject}${typeName}, trying URL ${this .attempts .length + 1} of ${this .attempts .length + this .url .length}.`, error);
51453
+
51454
+ if (this .attempts .length === 1)
51455
+ return console .error (`Couldn't load ${subject}${typeName}.`, error);
51456
+
51457
+ // Pass the errors themselves along with the summary, so their stacks and context
51458
+ // stay inspectable.
51459
+
51460
+ console .error (`Couldn't load any of the ${this .attempts .length} URLs${typeName}, tried in this order:\n`
51461
+ + this .attempts
51462
+ .map (({ url, resolved, error }, i) =>
51463
+ ` ${i + 1}. '${this .truncate (url)}'${resolved && resolved !== url ? ` → ${this .truncate (resolved)}` : ""}: ${this .describe (error)}`)
51464
+ .join ("\n") + "\n",
51465
+ ... this .attempts .map (({ error }) => error));
51466
+ },
51467
+ /**
51468
+ * Keep diagnostics readable when a candidate is a long data URL.
51469
+ */
51470
+ truncate (string, length = 120)
51471
+ {
51472
+ return string .length > length ? `${string .substring (0, length)}…` : string;
51473
+ },
51474
+ /**
51475
+ * Not every thrown value is an Error, so don't summarize one as [object Object].
51476
+ */
51477
+ describe (error)
51478
+ {
51479
+ return error ?.message ?? (typeof error === "object" ? helper.try (() => JSON .stringify (error)) : null) ?? String (error);
51408
51480
  },
51409
51481
  });
51410
51482
 
@@ -54566,7 +54638,7 @@ function X3DCoreContext (element)
54566
54638
  {
54567
54639
  const link = document .createElement ("link");
54568
54640
 
54569
- link .integrity = "sha384-FEmsQpL8R1dkzlxB19h2qi5U9Cuh8Zk2953YCudH0PTQSwiWiUovdIWVDBu3/YAc";
54641
+ link .integrity = "sha384-OncRzbLtLD5Caw7AMriMRlhuhJ/fW3gh5dFvrdeifrhlqF+YTzx/lbZh5l6JjYau";
54570
54642
  link .rel = "stylesheet";
54571
54643
  link .crossOrigin = "anonymous";
54572
54644
  link .onload = resolve;
@@ -63962,6 +64034,7 @@ const
63962
64034
  _loadingTotal = Symbol (),
63963
64035
  X3DNetworkingContext_loadingObjects = Symbol (),
63964
64036
  _browserLoading = Symbol (),
64037
+ _browserTime = Symbol (),
63965
64038
  _set_loadCount = Symbol (),
63966
64039
  _loadFractions = Symbol (),
63967
64040
  _defaultScene = Symbol ();
@@ -64022,6 +64095,7 @@ Object .assign (X3DNetworkingContext .prototype,
64022
64095
  setBrowserLoading (value)
64023
64096
  {
64024
64097
  this [_browserLoading] = value;
64098
+ this [_browserTime] = Date .now ();
64025
64099
 
64026
64100
  if (value)
64027
64101
  {
@@ -64084,12 +64158,16 @@ Object .assign (X3DNetworkingContext .prototype,
64084
64158
  this [X3DNetworkingContext_loadingObjects] .add (object);
64085
64159
 
64086
64160
  this ._loadCount = this [X3DNetworkingContext_loadingObjects] .size;
64161
+
64162
+ this [_browserTime] = Date .now ();
64087
64163
  },
64088
64164
  removeLoadingObject (object)
64089
64165
  {
64090
64166
  this [X3DNetworkingContext_loadingObjects] .delete (object);
64091
64167
 
64092
64168
  this ._loadCount = this [X3DNetworkingContext_loadingObjects] .size;
64169
+
64170
+ this [_browserTime] = Date .now ();
64093
64171
  },
64094
64172
  getDisplayLoadCount ()
64095
64173
  {
@@ -64143,8 +64221,14 @@ Object .assign (X3DNetworkingContext .prototype,
64143
64221
  const fractions = 1 - (this ._loadCount .getValue () + loadFractions)
64144
64222
  / (this [_loadingTotal] + this [_loadFractions] .size);
64145
64223
 
64224
+ const percent = fractions * 100;
64225
+
64226
+ // Show progress in % if loading takes too long.
64227
+ if (Date .now () - this [_browserTime] > 8_000)
64228
+ string += ` (${percent .toFixed (2)} %)`;
64229
+
64146
64230
  this .getSplashScreen () .querySelector (".x_ite-private-spinner-text") .textContent = string;
64147
- this .getSplashScreen () .querySelector (".x_ite-private-progressbar div") .style .width = `${100 * fractions}%`;
64231
+ this .getSplashScreen () .querySelector (".x_ite-private-progressbar div") .style .width = `${percent}%`;
64148
64232
  }
64149
64233
  else
64150
64234
  {
@@ -71748,15 +71832,18 @@ const PeriodicWave_default_ = PeriodicWave;
71748
71832
 
71749
71833
 
71750
71834
 
71835
+
71751
71836
  const
71752
- _audioElements = Symbol (),
71753
71837
  _audioContext = Symbol (),
71838
+ _soundDestinationNodes = Symbol (),
71839
+ _audioElements = Symbol (),
71754
71840
  _defaultPeriodicWave = Symbol (),
71755
71841
  _noSoundButton = Symbol (),
71756
71842
  _noSoundButtonId = Symbol ();
71757
71843
 
71758
71844
  function X3DSoundContext ()
71759
71845
  {
71846
+ this [_soundDestinationNodes] = new Set ();
71760
71847
  this [_audioElements] = new Map ();
71761
71848
  }
71762
71849
 
@@ -71794,16 +71881,25 @@ Object .assign (X3DSoundContext .prototype,
71794
71881
  return audioContext;
71795
71882
  })();
71796
71883
  },
71797
- getDefaultPeriodicWave ()
71884
+ addSoundDestination (soundDestinationNode)
71798
71885
  {
71799
- return this [_defaultPeriodicWave] ??= (() =>
71800
- {
71801
- const defaultPeriodicWave = new Sound_PeriodicWave (this .getPrivateScene ());
71886
+ const gain = !this .getBrowserOption ("Mute") * Math_Algorithm .clamp (this .getBrowserOption ("SoundIntensity"), 0, 1);
71802
71887
 
71803
- defaultPeriodicWave .setup ();
71888
+ soundDestinationNode .getSoundDestination () .gain .value = gain;
71804
71889
 
71805
- return defaultPeriodicWave;
71806
- })();
71890
+ this [_soundDestinationNodes] .add (soundDestinationNode);
71891
+
71892
+ this .getRenderingProperties () ._SoundDestinations = this [_soundDestinationNodes] .size;
71893
+ },
71894
+ removeSoundDestination (soundDestinationNode)
71895
+ {
71896
+ this [_soundDestinationNodes] .delete (soundDestinationNode);
71897
+
71898
+ this .getRenderingProperties () ._SoundDestinations = this [_soundDestinationNodes] .size;
71899
+ },
71900
+ getSoundDestinations ()
71901
+ {
71902
+ return this [_soundDestinationNodes];
71807
71903
  },
71808
71904
  startAudioElement (audioElement, functionName = "play")
71809
71905
  {
@@ -71880,6 +71976,17 @@ Object .assign (X3DSoundContext .prototype,
71880
71976
  },
71881
71977
  200);
71882
71978
  },
71979
+ getDefaultPeriodicWave ()
71980
+ {
71981
+ return this [_defaultPeriodicWave] ??= (() =>
71982
+ {
71983
+ const defaultPeriodicWave = new Sound_PeriodicWave (this .getPrivateScene ());
71984
+
71985
+ defaultPeriodicWave .setup ();
71986
+
71987
+ return defaultPeriodicWave;
71988
+ })();
71989
+ },
71883
71990
  });
71884
71991
 
71885
71992
  const X3DSoundContext_default_ = X3DSoundContext;
@@ -72771,7 +72878,7 @@ const
72771
72878
  _animFrame = Symbol (),
72772
72879
  _previousTime = Symbol (),
72773
72880
  _systemTime = Symbol (),
72774
- _browserTime = Symbol (),
72881
+ X3DBrowserContext_browserTime = Symbol (),
72775
72882
  _cameraTime = Symbol (),
72776
72883
  _collisionTime = Symbol (),
72777
72884
  _displayTime = Symbol (),
@@ -72823,7 +72930,7 @@ function X3DBrowserContext (element)
72823
72930
  this [_previousTime] = 0;
72824
72931
  this [_renderCallback] = this [_traverse] .bind (this);
72825
72932
  this [_systemTime] = new Time_StopWatch ();
72826
- this [_browserTime] = new Time_StopWatch ();
72933
+ this [X3DBrowserContext_browserTime] = new Time_StopWatch ();
72827
72934
  this [_cameraTime] = new Time_StopWatch ();
72828
72935
  this [_collisionTime] = new Time_StopWatch ();
72829
72936
  this [_displayTime] = new Time_StopWatch ();
@@ -72943,7 +73050,7 @@ Object .assign (Object .setPrototypeOf (X3DBrowserContext .prototype, Base_X3DBa
72943
73050
  // Start
72944
73051
 
72945
73052
  this [_systemTime] .stop ();
72946
- this [_browserTime] .start ();
73053
+ this [X3DBrowserContext_browserTime] .start ();
72947
73054
 
72948
73055
  // Time
72949
73056
 
@@ -73004,7 +73111,7 @@ Object .assign (Object .setPrototypeOf (X3DBrowserContext .prototype, Base_X3DBa
73004
73111
 
73005
73112
  // Finish
73006
73113
 
73007
- this [_browserTime] .stop ();
73114
+ this [X3DBrowserContext_browserTime] .stop ();
73008
73115
  this [_systemTime] .start ();
73009
73116
  },
73010
73117
  getSystemTime ()
@@ -73013,7 +73120,7 @@ Object .assign (Object .setPrototypeOf (X3DBrowserContext .prototype, Base_X3DBa
73013
73120
  },
73014
73121
  getBrowserTime ()
73015
73122
  {
73016
- return this [_browserTime];
73123
+ return this [X3DBrowserContext_browserTime];
73017
73124
  },
73018
73125
  getCameraTime ()
73019
73126
  {
@@ -74904,9 +75011,12 @@ Object .assign (Object .setPrototypeOf (TextureBackground .prototype, Environmen
74904
75011
  this .set_texture__ (4, this ._topTexture);
74905
75012
  this .set_texture__ (5, this ._bottomTexture);
74906
75013
  },
74907
- set_texture__ (index, textureNode)
75014
+ set_texture__ (index, node)
74908
75015
  {
74909
- EnvironmentalEffects_X3DBackgroundNode .prototype .set_texture__ .call (this, index, Base_X3DCast (Base_X3DConstants .X3DTextureNode, textureNode));
75016
+ const textureNode = Base_X3DCast (Base_X3DConstants .X3DTexture2DNode, node)
75017
+ ?? Base_X3DCast (Base_X3DConstants .MultiTexture, node);
75018
+
75019
+ EnvironmentalEffects_X3DBackgroundNode .prototype .set_texture__ .call (this, index, textureNode);
74910
75020
  },
74911
75021
  traverse (type, renderObject)
74912
75022
  {
@@ -87620,6 +87730,7 @@ Object .assign (Object .setPrototypeOf (X3DSoundProcessingNode .prototype, Sound
87620
87730
  const channelCountModes = new Map ([
87621
87731
  ["MAX", "max"],
87622
87732
  ["CLAMPED-MAX", "clamped-max"],
87733
+ ["CLAMPED_MAX", "clamped-max"],
87623
87734
  ["EXPLICIT", "explicit"],
87624
87735
  ]);
87625
87736
 
@@ -88198,10 +88309,12 @@ Object .assign (Object .setPrototypeOf (AudioClip .prototype, Sound_X3DSoundSour
88198
88309
  unloadData ()
88199
88310
  {
88200
88311
  this .setMediaElement (null);
88312
+
88313
+ this ._duration_changed = -1;
88201
88314
  },
88202
88315
  loadData ()
88203
88316
  {
88204
- this .unloadData ();
88317
+ this .setMediaElement (null);
88205
88318
 
88206
88319
  new InputOutput_FileLoader (this, { dataAsString: false }) .loadDocument (this ._url, async (data, fileURL) =>
88207
88320
  {
@@ -88294,10 +88407,13 @@ function X3DSoundDestinationNode (executionContext)
88294
88407
 
88295
88408
  this .addType (Base_X3DConstants .X3DSoundDestinationNode);
88296
88409
 
88410
+ // Private properties
88411
+
88297
88412
  const audioContext = this .getBrowser () .getAudioContext ();
88298
88413
 
88299
88414
  this .childNodes = [ ];
88300
88415
  this .audioDestination = new GainNode (audioContext, { gain: 0 });
88416
+ this .soundDestination = new GainNode (audioContext, { gain: 0 });
88301
88417
  }
88302
88418
 
88303
88419
  Object .assign (Object .setPrototypeOf (X3DSoundDestinationNode .prototype, Sound_X3DSoundNode .prototype),
@@ -88322,6 +88438,10 @@ Object .assign (Object .setPrototypeOf (X3DSoundDestinationNode .prototype, Soun
88322
88438
  this .set_channelInterpretation__ ();
88323
88439
  this .set_children__ ();
88324
88440
  },
88441
+ getSoundDestination ()
88442
+ {
88443
+ return this .soundDestination;
88444
+ },
88325
88445
  getAudioDestination ()
88326
88446
  {
88327
88447
  return this .audioDestination;
@@ -88330,10 +88450,20 @@ Object .assign (Object .setPrototypeOf (X3DSoundDestinationNode .prototype, Soun
88330
88450
  {
88331
88451
  // If enabled field is FALSE, the audio signal is blocked and does not pass through.
88332
88452
 
88333
- if (this ._enabled .getValue () && this .getLive () .getValue ())
88334
- this .audioDestination .connect (this .getSoundDestination ());
88453
+ const
88454
+ browser = this .getBrowser (),
88455
+ active = this .getLive () .getValue () && this ._enabled .getValue ();
88456
+
88457
+ if (active)
88458
+ {
88459
+ browser .addSoundDestination (this);
88460
+ this .audioDestination .connect (this .soundDestination);
88461
+ }
88335
88462
  else
88463
+ {
88464
+ browser .removeSoundDestination (this);
88336
88465
  this .audioDestination .disconnect ();
88466
+ }
88337
88467
 
88338
88468
  this ._isActive = this ._enabled;
88339
88469
  },
@@ -88350,6 +88480,7 @@ Object .assign (Object .setPrototypeOf (X3DSoundDestinationNode .prototype, Soun
88350
88480
  const channelCountModes = new Map ([
88351
88481
  ["MAX", "max"],
88352
88482
  ["CLAMPED-MAX", "clamped-max"],
88483
+ ["CLAMPED_MAX", "clamped-max"],
88353
88484
  ["EXPLICIT", "explicit"],
88354
88485
  ]);
88355
88486
 
@@ -88433,6 +88564,8 @@ function AudioDestination (executionContext)
88433
88564
  this .audioElement = new Audio ();
88434
88565
  this .mediaStreamAudioDestinationNode = new MediaStreamAudioDestinationNode (audioContext);
88435
88566
  this .audioElement .srcObject = this .mediaStreamAudioDestinationNode .stream;
88567
+
88568
+ this .getSoundDestination () .connect (this .mediaStreamAudioDestinationNode);
88436
88569
  }
88437
88570
 
88438
88571
  Object .assign (Object .setPrototypeOf (AudioDestination .prototype, Sound_X3DSoundDestinationNode .prototype),
@@ -88449,22 +88582,18 @@ Object .assign (Object .setPrototypeOf (AudioDestination .prototype, Sound_X3DSo
88449
88582
 
88450
88583
  this .set_mediaDeviceID__ ();
88451
88584
  },
88452
- getSoundDestination ()
88453
- {
88454
- return this .mediaStreamAudioDestinationNode;
88455
- },
88456
88585
  set_enabled__ ()
88457
88586
  {
88587
+ Sound_X3DSoundDestinationNode .prototype .set_enabled__ .call (this);
88588
+
88458
88589
  const
88459
88590
  browser = this .getBrowser (),
88460
- active = this ._enabled .getValue () && this .getLive () .getValue ();
88591
+ active = this .getLive () .getValue () && this ._enabled .getValue ();
88461
88592
 
88462
88593
  if (active)
88463
88594
  browser .startAudioElement (this .audioElement);
88464
88595
  else
88465
88596
  browser .stopAudioElement (this .audioElement);
88466
-
88467
- Sound_X3DSoundDestinationNode .prototype .set_enabled__ .call (this);
88468
88597
  },
88469
88598
  set_mediaDeviceID__ ()
88470
88599
  {
@@ -88703,7 +88832,7 @@ Object .assign (Object .setPrototypeOf (BufferAudioSource .prototype, Sound_X3DS
88703
88832
  }
88704
88833
  else
88705
88834
  {
88706
- this ._bufferDuration = 0;
88835
+ this ._bufferDuration = -1;
88707
88836
 
88708
88837
  this .setMediaElement (null);
88709
88838
  }
@@ -88941,6 +89070,7 @@ Object .assign (Object .setPrototypeOf (X3DSoundChannelNode .prototype, Sound_X3
88941
89070
  const channelCountModes = new Map ([
88942
89071
  ["MAX", "max"],
88943
89072
  ["CLAMPED-MAX", "clamped-max"],
89073
+ ["CLAMPED_MAX", "clamped-max"],
88944
89074
  ["EXPLICIT", "explicit"],
88945
89075
  ]);
88946
89076
 
@@ -89005,7 +89135,7 @@ Object .assign (Object .setPrototypeOf (X3DSoundChannelNode .prototype, Sound_X3
89005
89135
  for (const [i, childNode] of this .childNodes .entries ())
89006
89136
  this .connectChildNode (i, childNode);
89007
89137
  },
89008
- setChildNodes (childNodes)
89138
+ setChildNodes ()
89009
89139
  { },
89010
89140
  connectChildNode (i, childNode)
89011
89141
  {
@@ -90147,7 +90277,7 @@ function Sound (executionContext)
90147
90277
 
90148
90278
  this .addType (Base_X3DConstants .Sound);
90149
90279
 
90150
- this .addChildObjects (Base_X3DConstants .outputOnly, "traversed", new x_ite_Fields .SFBool (true));
90280
+ this .addChildObjects (Base_X3DConstants .outputOnly, "traversed", new x_ite_Fields .SFBool ());
90151
90281
 
90152
90282
  this .setVisibleObject (true);
90153
90283
 
@@ -90174,18 +90304,20 @@ Object .assign (Object .setPrototypeOf (Sound .prototype, Sound_X3DSoundNode .pr
90174
90304
  const
90175
90305
  audioContext = this .getBrowser () .getAudioContext (),
90176
90306
  gainNode = new GainNode (audioContext, { gain: 0 }),
90307
+ gainStereoNode = new GainNode (audioContext, { gain: 0 }),
90177
90308
  splitterNode = new ChannelSplitterNode (audioContext, { numberOfOutputs: 2 }),
90178
- mergerNode = new ChannelMergerNode (audioContext, { numberOfInputs: 2 }),
90179
90309
  gainFrontLeftNode = new GainNode (audioContext, { gain: 0 }),
90180
90310
  gainFrontRightNode = new GainNode (audioContext, { gain: 0 }),
90181
90311
  gainBackLeftNode = new GainNode (audioContext, { gain: 0 }),
90182
- gainBackRightNode = new GainNode (audioContext, { gain: 0 });
90312
+ gainBackRightNode = new GainNode (audioContext, { gain: 0 }),
90313
+ mergerNode = new ChannelMergerNode (audioContext, { numberOfInputs: 2 }),
90314
+ soundDestination = new GainNode (audioContext, { gain: 0 });
90183
90315
 
90184
90316
  gainNode .channelCount = 2;
90185
90317
  gainNode .channelCountMode = "explicit";
90186
90318
  gainNode .channelInterpretation = "speakers";
90187
90319
 
90188
- gainNode .connect (splitterNode);
90320
+ gainStereoNode .connect (soundDestination);
90189
90321
  splitterNode .connect (gainFrontLeftNode, 0);
90190
90322
  splitterNode .connect (gainFrontRightNode, 1);
90191
90323
  splitterNode .connect (gainBackRightNode, 0);
@@ -90194,27 +90326,37 @@ Object .assign (Object .setPrototypeOf (Sound .prototype, Sound_X3DSoundNode .pr
90194
90326
  gainFrontRightNode .connect (mergerNode, 0, 1);
90195
90327
  gainBackLeftNode .connect (mergerNode, 0, 0);
90196
90328
  gainBackRightNode .connect (mergerNode, 0, 1);
90197
- mergerNode .connect (audioContext .destination);
90329
+ mergerNode .connect (soundDestination);
90330
+ soundDestination .connect (audioContext .destination);
90198
90331
 
90199
90332
  this .gainNode = gainNode;
90333
+ this .gainStereoNode = gainStereoNode;
90200
90334
  this .splitterNode = splitterNode;
90201
90335
  this .gainFrontLeftNode = gainFrontLeftNode;
90202
90336
  this .gainFrontRightNode = gainFrontRightNode;
90203
90337
  this .gainBackLeftNode = gainBackLeftNode;
90204
90338
  this .gainBackRightNode = gainBackRightNode;
90205
90339
  this .mergerNode = mergerNode;
90340
+ this .soundDestination = soundDestination;
90206
90341
 
90207
- this .getLive () .addInterest ("set_live__", this);
90208
- this ._traversed .addInterest ("set_live__", this);
90342
+ this .getLive () .addInterest ("set_enabled__", this);
90343
+ this ._traversed .addInterest ("set_enabled__", this);
90344
+ this ._enabled .addInterest ("set_enabled__", this);
90209
90345
 
90210
- this ._intensity .addInterest ("set_intensity__", this);
90211
- this ._source .addInterest ("set_children__", this);
90212
- this ._children .addInterest ("set_children__", this);
90346
+ this ._spatialize .addInterest ("set_spatialize__", this);
90347
+ this ._intensity .addInterest ("set_intensity__", this);
90348
+ this ._source .addInterest ("set_children__", this);
90349
+ this ._children .addInterest ("set_children__", this);
90213
90350
 
90214
- this .set_live__ ();
90351
+ this .set_enabled__ ();
90352
+ this .set_spatialize__ ();
90215
90353
  this .set_intensity__ ();
90216
90354
  this .set_children__ ();
90217
90355
  },
90356
+ getSoundDestination ()
90357
+ {
90358
+ return this .soundDestination;
90359
+ },
90218
90360
  setTraversed (value)
90219
90361
  {
90220
90362
  if (value)
@@ -90242,28 +90384,44 @@ Object .assign (Object .setPrototypeOf (Sound .prototype, Sound_X3DSoundNode .pr
90242
90384
  rotationFront = 1 - rotation,
90243
90385
  rotationBack = rotation;
90244
90386
 
90387
+ this .gainStereoNode .gain .value = gain;
90245
90388
  this .gainFrontLeftNode .gain .value = gain * rotationFront * panLeft;
90246
90389
  this .gainFrontRightNode .gain .value = gain * rotationFront * panRight;
90247
90390
  this .gainBackLeftNode .gain .value = gain * rotationBack * panLeft;
90248
90391
  this .gainBackRightNode .gain .value = gain * rotationBack * panRight;
90249
90392
  },
90250
- set_live__ ()
90393
+ set_enabled__ ()
90251
90394
  {
90252
- this .mergerNode .disconnect ();
90395
+ const
90396
+ browser = this .getBrowser (),
90397
+ active = this .getLive () .getValue () && this ._traversed .getValue () && this ._enabled .getValue ();
90253
90398
 
90254
- if (this .getLive () .getValue () && this ._traversed .getValue ())
90399
+ if (active)
90255
90400
  {
90256
90401
  const audioContext = this .getBrowser () .getAudioContext ();
90257
90402
 
90258
- this .getBrowser () .sensorEvents () .addInterest ("update", this);
90403
+ this .soundDestination .connect (audioContext .destination);
90259
90404
 
90260
- this .mergerNode .connect (audioContext .destination);
90405
+ browser .addSoundDestination (this);
90406
+ browser .sensorEvents () .addInterest ("update", this);
90261
90407
  }
90262
90408
  else
90263
90409
  {
90264
- this .getBrowser () .sensorEvents () .removeInterest ("update", this);
90410
+ this .soundDestination .disconnect ();
90411
+
90412
+ browser .removeSoundDestination (this);
90413
+ browser .sensorEvents () .removeInterest ("update", this);
90265
90414
  }
90266
90415
  },
90416
+ set_spatialize__ ()
90417
+ {
90418
+ this .gainNode .disconnect ();
90419
+
90420
+ if (this ._spatialize .getValue ())
90421
+ this .gainNode .connect (this .splitterNode);
90422
+ else
90423
+ this .gainNode .connect (this .gainStereoNode);
90424
+ },
90267
90425
  set_intensity__ ()
90268
90426
  {
90269
90427
  this .gainNode .gain .value = Math_Algorithm .clamp (this ._intensity .getValue (), 0, 1);
@@ -90282,7 +90440,7 @@ Object .assign (Object .setPrototypeOf (Sound .prototype, Sound_X3DSoundNode .pr
90282
90440
 
90283
90441
  for (const child of this ._children)
90284
90442
  {
90285
- const childNode = Base_X3DCast (Base_X3DConstants .X3DChildNode, child);
90443
+ const childNode = Base_X3DCast (Base_X3DConstants .X3DNode, child);
90286
90444
 
90287
90445
  if (!childNode)
90288
90446
  continue;
@@ -90502,7 +90660,7 @@ function SpatialSound (executionContext)
90502
90660
 
90503
90661
  this .addType (Base_X3DConstants .SpatialSound);
90504
90662
 
90505
- this .addChildObjects (Base_X3DConstants .outputOnly, "traversed", new x_ite_Fields .SFBool (true));
90663
+ this .addChildObjects (Base_X3DConstants .outputOnly, "traversed", new x_ite_Fields .SFBool ());
90506
90664
 
90507
90665
  this .setVisibleObject (true);
90508
90666
 
@@ -90527,22 +90685,26 @@ Object .assign (Object .setPrototypeOf (SpatialSound .prototype, Sound_X3DSoundN
90527
90685
  Sound_X3DSoundNode .prototype .initialize .call (this);
90528
90686
 
90529
90687
  const
90530
- audioContext = this .getBrowser () .getAudioContext (),
90531
- gainNode = new GainNode (audioContext, { gain: 0 }),
90532
- pannerNode = new PannerNode (audioContext);
90688
+ audioContext = this .getBrowser () .getAudioContext (),
90689
+ gainNode = new GainNode (audioContext, { gain: 0 }),
90690
+ pannerNode = new PannerNode (audioContext),
90691
+ soundDestination = new GainNode (audioContext, { gain: 0 });
90533
90692
 
90534
90693
  gainNode .channelCount = 2;
90535
90694
  gainNode .channelCountMode = "explicit";
90536
90695
  gainNode .channelInterpretation = "speakers";
90537
90696
 
90538
- gainNode .connect (pannerNode);
90539
- pannerNode .connect (audioContext .destination);
90697
+ gainNode .connect (pannerNode);
90698
+ pannerNode .connect (soundDestination);
90699
+ soundDestination .connect (audioContext .destination);
90540
90700
 
90541
- this .gainNode = gainNode;
90542
- this .pannerNode = pannerNode;
90701
+ this .gainNode = gainNode;
90702
+ this .pannerNode = pannerNode;
90703
+ this .soundDestination = soundDestination;
90543
90704
 
90544
- this .getLive () .addInterest ("set_live__", this);
90545
- this ._traversed .addInterest ("set_live__", this);
90705
+ this .getLive () .addInterest ("set_enabled__", this);
90706
+ this ._traversed .addInterest ("set_enabled__", this);
90707
+ this ._enabled .addInterest ("set_enabled__", this);
90546
90708
 
90547
90709
  this ._spatialize .addInterest ("set_spatialize__", this);
90548
90710
  this ._intensity .addInterest ("set_intensity__", this);
@@ -90558,7 +90720,7 @@ Object .assign (Object .setPrototypeOf (SpatialSound .prototype, Sound_X3DSoundN
90558
90720
  this ._rolloffFactor .addInterest ("set_distanceModel__", this);
90559
90721
  this ._children .addInterest ("set_children__", this);
90560
90722
 
90561
- this .set_live__ ();
90723
+ this .set_enabled__ ();
90562
90724
  this .set_spatialize__ ();
90563
90725
  this .set_intensity__ ();
90564
90726
  this .set_coneOuterGain__ ();
@@ -90571,6 +90733,10 @@ Object .assign (Object .setPrototypeOf (SpatialSound .prototype, Sound_X3DSoundN
90571
90733
  this .set_dopplerEnabled__ ();
90572
90734
  this .set_children__ ();
90573
90735
  },
90736
+ getSoundDestination ()
90737
+ {
90738
+ return this .soundDestination;
90739
+ },
90574
90740
  setTraversed (value)
90575
90741
  {
90576
90742
  if (value)
@@ -90590,21 +90756,27 @@ Object .assign (Object .setPrototypeOf (SpatialSound .prototype, Sound_X3DSoundN
90590
90756
  {
90591
90757
  return this .currentTraversed;
90592
90758
  },
90593
- set_live__ ()
90759
+ set_enabled__ ()
90594
90760
  {
90595
- this .pannerNode .disconnect ();
90761
+ const
90762
+ browser = this .getBrowser (),
90763
+ active = this .getLive () .getValue () && this ._traversed .getValue () && this ._enabled .getValue ();
90596
90764
 
90597
- if (this .getLive () .getValue () && this ._traversed .getValue ())
90765
+ if (active)
90598
90766
  {
90599
90767
  const audioContext = this .getBrowser () .getAudioContext ();
90600
90768
 
90601
- this .getBrowser () .sensorEvents () .addInterest ("update", this);
90769
+ this .soundDestination .connect (audioContext .destination);
90602
90770
 
90603
- this .pannerNode .connect (audioContext .destination);
90771
+ browser .addSoundDestination (this);
90772
+ browser .sensorEvents () .addInterest ("update", this);
90604
90773
  }
90605
90774
  else
90606
90775
  {
90607
- this .getBrowser () .sensorEvents () .removeInterest ("update", this);
90776
+ this .soundDestination .disconnect ();
90777
+
90778
+ browser .removeSoundDestination (this);
90779
+ browser .sensorEvents () .removeInterest ("update", this);
90608
90780
  }
90609
90781
  },
90610
90782
  set_spatialize__ ()
@@ -90682,7 +90854,7 @@ Object .assign (Object .setPrototypeOf (SpatialSound .prototype, Sound_X3DSoundN
90682
90854
 
90683
90855
  for (const child of this ._children)
90684
90856
  {
90685
- const childNode = Base_X3DCast (Base_X3DConstants .X3DChildNode, child);
90857
+ const childNode = Base_X3DCast (Base_X3DConstants .X3DNode, child);
90686
90858
 
90687
90859
  if (!childNode)
90688
90860
  continue;
@@ -90708,6 +90880,8 @@ Object .assign (Object .setPrototypeOf (SpatialSound .prototype, Sound_X3DSoundN
90708
90880
 
90709
90881
  for (const childNode of this .childNodes)
90710
90882
  childNode .getAudioSource () .connect (this .gainNode);
90883
+
90884
+ this .setVisibleObject (this .childNodes .length);
90711
90885
  },
90712
90886
  update ()
90713
90887
  {
@@ -90793,9 +90967,13 @@ function StreamAudioDestination (executionContext)
90793
90967
 
90794
90968
  this .addType (Base_X3DConstants .StreamAudioDestination);
90795
90969
 
90970
+ // Private properties
90971
+
90796
90972
  const audioContext = this .getBrowser () .getAudioContext ();
90797
90973
 
90798
90974
  this .mediaStreamAudioDestinationNode = new MediaStreamAudioDestinationNode (audioContext);
90975
+
90976
+ this .getSoundDestination () .connect (this .mediaStreamAudioDestinationNode);
90799
90977
  }
90800
90978
 
90801
90979
  Object .assign (Object .setPrototypeOf (StreamAudioDestination .prototype, Sound_X3DSoundDestinationNode .prototype),
@@ -90808,15 +90986,10 @@ Object .assign (Object .setPrototypeOf (StreamAudioDestination .prototype, Sound
90808
90986
 
90809
90987
  this .set_mediaDeviceID__ ();
90810
90988
  },
90811
- getSoundDestination ()
90812
- {
90813
- return this .mediaStreamAudioDestinationNode;
90814
- },
90815
- set_enabled__ () { /* remove this function if implemented */ },
90989
+ set_enabled__ ()
90990
+ { },
90816
90991
  set_mediaDeviceID__ ()
90817
- {
90818
-
90819
- },
90992
+ { },
90820
90993
  });
90821
90994
 
90822
90995
  Object .defineProperties (StreamAudioDestination,
@@ -91249,8 +91422,8 @@ const PNGMedia_default_ = PNGMedia;
91249
91422
 
91250
91423
  /* harmony default export */ const Texturing_PNGMedia = (x_ite_Namespace .add ("PNGMedia", PNGMedia_default_));
91251
91424
  ;// ./src/x_ite/Components/Texturing/MovieTexture.js
91252
- /* provided dependency */ var SuperGif = __webpack_require__(603);
91253
- /* provided dependency */ var APNG = __webpack_require__(777);
91425
+ /* provided dependency */ var SuperGif = __webpack_require__(627);
91426
+ /* provided dependency */ var APNG = __webpack_require__(249);
91254
91427
 
91255
91428
 
91256
91429
 
@@ -91311,6 +91484,7 @@ Object .assign (Object .setPrototypeOf (MovieTexture .prototype, Texturing_X3DTe
91311
91484
  {
91312
91485
  this .clearTexture ();
91313
91486
  this .setMediaElement (null);
91487
+ this .updateOutputs (0, 0, 0, false, -1);
91314
91488
  },
91315
91489
  async loadData ()
91316
91490
  {
@@ -91385,7 +91559,7 @@ Object .assign (Object .setPrototypeOf (MovieTexture .prototype, Texturing_X3DTe
91385
91559
 
91386
91560
  this .setMediaElement (null);
91387
91561
  this .clearTexture ();
91388
- this .updateOutputs (0, 0, 0, -1);
91562
+ this .updateOutputs (0, 0, 0, false, -1);
91389
91563
  this .setLoadState (Base_X3DConstants .FAILED_STATE);
91390
91564
  },
91391
91565
  loadDocument (fileURL)
@@ -91426,7 +91600,7 @@ Object .assign (Object .setPrototypeOf (MovieTexture .prototype, Texturing_X3DTe
91426
91600
 
91427
91601
  this .setMediaElement (gif);
91428
91602
  this .setTextureData (width, height, true, false, gif .get_frames () [0] .data);
91429
- this .updateOutputs (width, height, 4, gif .duration);
91603
+ this .updateOutputs (width, height, 4, false, gif .duration);
91430
91604
  this .setLoadState (Base_X3DConstants .COMPLETE_STATE);
91431
91605
 
91432
91606
  this .set_speed__ ();
@@ -91439,7 +91613,7 @@ Object .assign (Object .setPrototypeOf (MovieTexture .prototype, Texturing_X3DTe
91439
91613
 
91440
91614
  this .setMediaElement (apng);
91441
91615
  this .setTextureData (width, height, true, false, currentFrame);
91442
- this .updateOutputs (width, height, 4, duration);
91616
+ this .updateOutputs (width, height, 4, false, duration);
91443
91617
  this .setLoadState (Base_X3DConstants .COMPLETE_STATE);
91444
91618
 
91445
91619
  this .set_speed__ ();
@@ -91460,16 +91634,21 @@ Object .assign (Object .setPrototypeOf (MovieTexture .prototype, Texturing_X3DTe
91460
91634
 
91461
91635
  this .setMediaElement (video);
91462
91636
  this .setTextureData (width, height, true, false, video);
91463
- this .updateOutputs (width, height, 3, video .duration);
91637
+ this .updateOutputs (width, height, 3, this .hasAudioTracks (video), video .duration);
91464
91638
  this .setLoadState (Base_X3DConstants .COMPLETE_STATE);
91465
91639
 
91466
91640
  this .set_speed__ ();
91467
91641
  },
91468
- updateOutputs (width, height, colorDepth, duration)
91642
+ hasAudioTracks (video)
91643
+ {
91644
+ return !! (video .mozHasAudio || video .webkitAudioDecodedByteCount || video .audioTracks ?.length);
91645
+ },
91646
+ updateOutputs (width, height, colorDepth, hasSound, duration)
91469
91647
  {
91470
91648
  this ._width = width;
91471
91649
  this ._height = height;
91472
91650
  this ._colorDepth = colorDepth;
91651
+ this ._hasSound = hasSound;
91473
91652
  this ._duration_changed = duration;
91474
91653
  },
91475
91654
  set_speed__ ()
@@ -92722,7 +92901,7 @@ Object .assign (Object .setPrototypeOf (X3DBrowser .prototype, Browser_X3DBrowse
92722
92901
  if (profile)
92723
92902
  return profile;
92724
92903
 
92725
- throw Error (`Profile '${name}' is not supported.`);
92904
+ throw new Error (`Profile '${name}' is not supported.`);
92726
92905
  },
92727
92906
  addSupportedProfile: function (profile)
92728
92907
  {
@@ -92766,7 +92945,7 @@ Object .assign (Object .setPrototypeOf (X3DBrowser .prototype, Browser_X3DBrowse
92766
92945
  component .dependencies);
92767
92946
  }
92768
92947
 
92769
- throw Error (`Component '${name}' at level '${level}' is not supported.`);
92948
+ throw new Error (`Component '${name}' at level '${level}' is not supported.`);
92770
92949
  },
92771
92950
  addSupportedComponent (component)
92772
92951
  {
@@ -93888,7 +94067,7 @@ const QuickSort_default_ = QuickSort;
93888
94067
 
93889
94068
  /* harmony default export */ const Algorithms_QuickSort = (x_ite_Namespace .add ("QuickSort", QuickSort_default_));
93890
94069
  ;// ./src/lib/libtess.js
93891
- /* provided dependency */ var libtess_libtess = __webpack_require__(457);
94070
+ /* provided dependency */ var libtess_libtess = __webpack_require__(289);
93892
94071
  const libtess_default_ = libtess_libtess;
93893
94072
  ;
93894
94073