x_ite 16.1.2 → 16.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/README.md +5 -5
  2. package/dist/X3DUOM.xml +10 -0
  3. package/dist/assets/components/AnnotationComponent.js +1 -1
  4. package/dist/assets/components/AnnotationComponent.min.js +1 -1
  5. package/dist/assets/components/CADGeometryComponent.js +1 -1
  6. package/dist/assets/components/CADGeometryComponent.min.js +1 -1
  7. package/dist/assets/components/CubeMapTexturingComponent.js +1 -1
  8. package/dist/assets/components/CubeMapTexturingComponent.min.js +1 -1
  9. package/dist/assets/components/DISComponent.js +1 -1
  10. package/dist/assets/components/DISComponent.min.js +1 -1
  11. package/dist/assets/components/EventUtilitiesComponent.js +1 -1
  12. package/dist/assets/components/EventUtilitiesComponent.min.js +1 -1
  13. package/dist/assets/components/GaussianSplatsComponent.js +1 -1
  14. package/dist/assets/components/GaussianSplatsComponent.min.js +1 -1
  15. package/dist/assets/components/Geometry2DComponent.js +1 -1
  16. package/dist/assets/components/Geometry2DComponent.min.js +1 -1
  17. package/dist/assets/components/Geometry3DComponent.js +1 -1
  18. package/dist/assets/components/Geometry3DComponent.min.js +1 -1
  19. package/dist/assets/components/GeospatialComponent.js +1 -1
  20. package/dist/assets/components/GeospatialComponent.min.js +1 -1
  21. package/dist/assets/components/HAnimComponent.js +1 -1
  22. package/dist/assets/components/HAnimComponent.min.js +1 -1
  23. package/dist/assets/components/KeyDeviceSensorComponent.js +1 -1
  24. package/dist/assets/components/KeyDeviceSensorComponent.min.js +1 -1
  25. package/dist/assets/components/LayoutComponent.js +1 -1
  26. package/dist/assets/components/LayoutComponent.min.js +1 -1
  27. package/dist/assets/components/NURBSComponent.js +1 -1
  28. package/dist/assets/components/NURBSComponent.min.js +1 -1
  29. package/dist/assets/components/ParticleSystemsComponent.js +1 -1
  30. package/dist/assets/components/ParticleSystemsComponent.min.js +1 -1
  31. package/dist/assets/components/PickingComponent.js +1 -1
  32. package/dist/assets/components/PickingComponent.min.js +1 -1
  33. package/dist/assets/components/RigidBodyPhysicsComponent.js +1 -1
  34. package/dist/assets/components/RigidBodyPhysicsComponent.min.js +1 -1
  35. package/dist/assets/components/ScriptingComponent.js +1 -1
  36. package/dist/assets/components/ScriptingComponent.min.js +1 -1
  37. package/dist/assets/components/TextComponent.js +1 -1
  38. package/dist/assets/components/TextComponent.min.js +1 -1
  39. package/dist/assets/components/TextureProjectionComponent.js +1 -1
  40. package/dist/assets/components/TextureProjectionComponent.min.js +1 -1
  41. package/dist/assets/components/Texturing3DComponent.js +9 -9
  42. package/dist/assets/components/Texturing3DComponent.min.js +2 -2
  43. package/dist/assets/components/VolumeRenderingComponent.js +1 -1
  44. package/dist/assets/components/VolumeRenderingComponent.min.js +1 -1
  45. package/dist/assets/components/WebXRComponent.js +1 -1
  46. package/dist/assets/components/WebXRComponent.min.js +1 -1
  47. package/dist/assets/components/X_ITEComponent.js +1 -1
  48. package/dist/assets/components/X_ITEComponent.min.js +1 -1
  49. package/dist/example.html +1 -1
  50. package/dist/x_ite.css +1 -1
  51. package/dist/x_ite.d.ts +126 -8
  52. package/dist/x_ite.js +246 -108
  53. package/dist/x_ite.min.js +2 -2
  54. package/dist/x_ite.min.mjs +2 -2
  55. package/dist/x_ite.mjs +246 -108
  56. package/dist/x_ite.zip +0 -0
  57. package/package.json +5 -5
package/dist/x_ite.mjs CHANGED
@@ -1,7 +1,7 @@
1
- /* X_ITE v16.1.2 */
1
+ /* X_ITE v16.1.3 */
2
2
  var __webpack_modules__ = ({
3
3
 
4
- /***/ 603
4
+ /***/ 143
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
+ /***/ 701
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
+ /***/ 877
2006
2006
  (module) {
2007
2007
 
2008
2008
  /**
@@ -7094,10 +7094,6 @@ const Algorithm =
7094
7094
  n = (n & 0x33333333) + ((n >>> 2) & 0x33333333);
7095
7095
  return ((n + (n >>> 4) & 0xF0F0F0F) * 0x1010101) >>> 24;
7096
7096
  },
7097
- cmp (lhs, rhs)
7098
- {
7099
- return lhs > rhs ? 1 : lhs < rhs ? -1 : 0;
7100
- },
7101
7097
  less (lhs, rhs)
7102
7098
  {
7103
7099
  return lhs < rhs;
@@ -7110,19 +7106,17 @@ const Algorithm =
7110
7106
  {
7111
7107
  // https://en.cppreference.com/w/cpp/algorithm/lower_bound
7112
7108
 
7113
- let
7114
- index = 0,
7115
- step = 0,
7116
- count = last - first;
7109
+ let count = last - first;
7117
7110
 
7118
7111
  while (count > 0)
7119
7112
  {
7120
- step = count >>> 1;
7121
- index = first + step;
7113
+ const
7114
+ step = count >>> 1,
7115
+ index = first + step;
7122
7116
 
7123
7117
  if (comp (array [index], value))
7124
7118
  {
7125
- first = ++ index;
7119
+ first = index + 1;
7126
7120
  count -= step + 1;
7127
7121
  }
7128
7122
  else
@@ -7137,15 +7131,13 @@ const Algorithm =
7137
7131
  {
7138
7132
  // https://en.cppreference.com/w/cpp/algorithm/upper_bound
7139
7133
 
7140
- let
7141
- index = 0,
7142
- step = 0,
7143
- count = last - first;
7134
+ let count = last - first;
7144
7135
 
7145
7136
  while (count > 0)
7146
7137
  {
7147
- step = count >>> 1;
7148
- index = first + step;
7138
+ const
7139
+ step = count >>> 1,
7140
+ index = first + step;
7149
7141
 
7150
7142
  if (comp (value, array [index]))
7151
7143
  {
@@ -7153,7 +7145,7 @@ const Algorithm =
7153
7145
  }
7154
7146
  else
7155
7147
  {
7156
- first = ++ index;
7148
+ first = index + 1;
7157
7149
  count -= step + 1;
7158
7150
  }
7159
7151
  }
@@ -14374,10 +14366,10 @@ const SFNode_handler =
14374
14366
 
14375
14367
  if (field)
14376
14368
  {
14377
- // Specification conform would be: accessType & X3DConstants .outputOnly.
14378
- // But we allow read access to plain fields, too.
14369
+ // Specification conform would be: `accessType & X3DConstants .outputOnly`.
14370
+ // However, we also allow read access to initializeOnly fields.
14379
14371
  if (field .getAccessType () === Base_X3DConstants .inputOnly)
14380
- return undefined;
14372
+ return;
14381
14373
 
14382
14374
  return field .valueOf ();
14383
14375
  }
@@ -14501,16 +14493,14 @@ Object .assign (Object .setPrototypeOf (SFNode .prototype, Base_X3DField .protot
14501
14493
  {
14502
14494
  const target = this [_target];
14503
14495
 
14504
- if (node)
14505
- return target .getValue () === node .getValue ();
14496
+ if (node instanceof SFNode)
14497
+ return target .getValue () === node [_target] .getValue ();
14506
14498
 
14507
- return target .getValue () === null;
14499
+ return target .getValue () === node;
14508
14500
  },
14509
14501
  isDefaultValue ()
14510
14502
  {
14511
- const target = this [_target];
14512
-
14513
- return target .getValue () === null;
14503
+ return this [_target] .getValue () === null;
14514
14504
  },
14515
14505
  set (node)
14516
14506
  {
@@ -15732,6 +15722,17 @@ Object .defineProperties (X3DArrayField,
15732
15722
  for (const v of Array .from (... args))
15733
15723
  target .push (v);
15734
15724
 
15725
+ return array;
15726
+ },
15727
+ },
15728
+ fromArray:
15729
+ {
15730
+ value (values)
15731
+ {
15732
+ const array = new constructor ();
15733
+
15734
+ array .setValue (values);
15735
+
15735
15736
  return array;
15736
15737
  },
15737
15738
  },
@@ -17057,7 +17058,7 @@ Object .assign (Object .setPrototypeOf (X3DTypedArrayField .prototype, Base_X3DA
17057
17058
 
17058
17059
  const cmp = compareFn
17059
17060
  ? (a, b) => compareFn (valueType (a), valueType (b))
17060
- : Math_Algorithm .cmp;
17061
+ : undefined;
17061
17062
 
17062
17063
  target .set (array .subarray (0, length) .sort (cmp));
17063
17064
  }
@@ -17682,6 +17683,49 @@ Object .assign (Object .setPrototypeOf (MFImage .prototype, Base_X3DObjectArrayF
17682
17683
  {
17683
17684
  return Fields_SFImage;
17684
17685
  },
17686
+ setValue (value)
17687
+ {
17688
+ if (value .length && !(value [0] instanceof Fields_SFImage))
17689
+ {
17690
+ const
17691
+ target = this .getTarget (),
17692
+ array = target .getValue ();
17693
+
17694
+ this .length = 0;
17695
+
17696
+ while (value .length)
17697
+ {
17698
+ const
17699
+ width = value .shift (),
17700
+ height = value .shift (),
17701
+ comp = value .shift (),
17702
+ pixels = value .splice (0, width * height),
17703
+ field = new Fields_SFImage (width, height, comp, pixels);
17704
+
17705
+ target .addChildObject (field);
17706
+ array .push (field);
17707
+ }
17708
+
17709
+ target .addEvent ();
17710
+ }
17711
+ else
17712
+ {
17713
+ Base_X3DObjectArrayField .prototype .setValue .call (this, value);
17714
+ }
17715
+ },
17716
+ flat ()
17717
+ {
17718
+ return Array .from (this, element => Array .from (element)) .flat ();
17719
+ },
17720
+ sort (compareFn)
17721
+ {
17722
+ const target = this .getTarget ();
17723
+
17724
+ target .getValue () .sort (compareFn);
17725
+ target .addEvent ();
17726
+
17727
+ return this;
17728
+ },
17685
17729
  });
17686
17730
 
17687
17731
  for (const key of Object .keys (MFImage .prototype))
@@ -18838,7 +18882,7 @@ const Legacy_default_ = Legacy;
18838
18882
 
18839
18883
  /* harmony default export */ const Browser_Legacy = (x_ite_Namespace .add ("Legacy", Legacy_default_));
18840
18884
  ;// ./src/x_ite/BROWSER_VERSION.js
18841
- const BROWSER_VERSION_default_ = "16.1.2";
18885
+ const BROWSER_VERSION_default_ = "16.1.3";
18842
18886
  ;
18843
18887
 
18844
18888
  /* harmony default export */ const BROWSER_VERSION = (x_ite_Namespace .add ("BROWSER_VERSION", BROWSER_VERSION_default_));
@@ -24861,7 +24905,7 @@ Object .assign (Object .setPrototypeOf (X3DPrototypeInstance .prototype, Core_X3
24861
24905
  for (const fieldDefinition of this [_protoNode] .getFieldDefinitions ())
24862
24906
  this .addPredefinedField (fieldDefinition);
24863
24907
 
24864
- // Reuse old fields, and therefor routes.
24908
+ // Reuse old fields, and therefore routes.
24865
24909
 
24866
24910
  for (const protoField of this [_protoFields])
24867
24911
  {
@@ -26016,8 +26060,6 @@ Object .assign (X3DParser .prototype,
26016
26060
  },
26017
26061
  sanitizeName (name = "")
26018
26062
  {
26019
-
26020
-
26021
26063
  // NonIdFirstChar
26022
26064
  name = name .replace (/^[\x30-\x39\x00-\x20\x22\x23\x27\x2b\x2c\x2d\x2e\x5b\x5c\x5d\x7b\x7d\x7f]*/, "");
26023
26065
 
@@ -26031,8 +26073,6 @@ Object .assign (X3DParser .prototype,
26031
26073
  name = name .replace (/^-+|-+$/g, "");
26032
26074
 
26033
26075
  return name;
26034
-
26035
-
26036
26076
  },
26037
26077
  renameExistingNode (name)
26038
26078
  {
@@ -30776,6 +30816,9 @@ Object .assign (X3DOptimizer .prototype,
30776
30816
  if (!node .getNodeType () .includes (Base_X3DConstants .X3DGroupingNode))
30777
30817
  return node;
30778
30818
 
30819
+ if (!node .visible)
30820
+ return node;
30821
+
30779
30822
  const children = Array .from (node .children);
30780
30823
 
30781
30824
  removedNodes .push (this .removeChildren (node));
@@ -30855,9 +30898,6 @@ Object .assign (X3DOptimizer .prototype,
30855
30898
  if (node .children .length !== 1)
30856
30899
  return node;
30857
30900
 
30858
- if (!node .visible)
30859
- return node;
30860
-
30861
30901
  const child = node .children [0];
30862
30902
 
30863
30903
  if (child .getValue () .getCloneCount () > 1)
@@ -30870,16 +30910,27 @@ Object .assign (X3DOptimizer .prototype,
30870
30910
  {
30871
30911
  case "Transform":
30872
30912
  case "HAnimHumanoid":
30913
+ {
30914
+ if (child .visible !== node .visible)
30915
+ return node;
30916
+
30873
30917
  return this .combineTransform (node, child, removedNodes);
30918
+ }
30874
30919
  case "DirectionalLight":
30875
30920
  case "PointLight":
30876
30921
  case "SpotLight":
30922
+ {
30877
30923
  return this .combineLight (node, child, removedNodes);
30924
+ }
30878
30925
  case "Viewpoint":
30879
30926
  case "OrthoViewpoint":
30927
+ {
30880
30928
  return this .combineViewpoint (node, child, removedNodes);
30929
+ }
30881
30930
  default:
30931
+ {
30882
30932
  return node;
30933
+ }
30883
30934
  }
30884
30935
  },
30885
30936
  combineTransform (node, child, removedNodes)
@@ -31167,7 +31218,7 @@ const Plane3_default_ = Plane3;
31167
31218
 
31168
31219
  /* harmony default export */ const Geometry_Plane3 = (x_ite_Namespace .add ("Plane3", Plane3_default_));
31169
31220
  ;// ./src/standard/Math/Geometry/Triangle3.js
31170
- /* provided dependency */ var libtess = __webpack_require__(457);
31221
+ /* provided dependency */ var libtess = __webpack_require__(877);
31171
31222
 
31172
31223
 
31173
31224
  const Triangle3 =
@@ -43461,7 +43512,7 @@ function eventsProcessed ()
43461
43512
  return null;
43462
43513
 
43463
43514
  const textureTransformNodes = this .textureTransformNodes
43464
- .sort ((a, b) => Math_Algorithm .cmp (a ._mapping .getValue (), b ._mapping .getValue ()));
43515
+ .sort ((a, b) => a ._mapping .getValue () .localeCompare (b ._mapping .getValue (), "en"));
43465
43516
 
43466
43517
  switch (textureTransformNodes .length)
43467
43518
  {
@@ -43876,7 +43927,7 @@ function eventsProcessed ()
43876
43927
  default:
43877
43928
  {
43878
43929
  const textureCoordinateNodes = Array .from (material .texCoordMappings .entries ())
43879
- .sort ((a, b) => Math_Algorithm .cmp (a [0], b [0]))
43930
+ .sort ((a, b) => a [0] .localeCompare (b [0], "en"))
43880
43931
  .sort ((a, b) => a [1] - b [1])
43881
43932
  .map (([mapping, i]) => this .createTextureCoordinate (texCoords [i], mapping));
43882
43933
 
@@ -47867,7 +47918,7 @@ const Bezier_default_ = Bezier;
47867
47918
 
47868
47919
  /* harmony default export */ const Algorithms_Bezier = (x_ite_Namespace .add ("Bezier", Bezier_default_));
47869
47920
  ;// ./src/x_ite/Parser/SVGParser.js
47870
- /* provided dependency */ var SVGParser_libtess = __webpack_require__(457);
47921
+ /* provided dependency */ var SVGParser_libtess = __webpack_require__(877);
47871
47922
 
47872
47923
 
47873
47924
 
@@ -51077,8 +51128,10 @@ function FileLoader (node, { cacheScene = false, dataAsString = true } = { })
51077
51128
  this .executionContext = node .getExecutionContext ();
51078
51129
  this .target = "";
51079
51130
  this .url = [ ];
51080
- this .fileURL = new URL (this .getBaseURL ());
51081
51131
  this .controller = new AbortController ();
51132
+ this .candidateURL = "";
51133
+ this .resolvedURL = null;
51134
+ this .attempts = [ ];
51082
51135
  }
51083
51136
 
51084
51137
  Object .assign (FileLoader,
@@ -51109,10 +51162,6 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51109
51162
 
51110
51163
  this .controller .abort ();
51111
51164
  },
51112
- getURL ()
51113
- {
51114
- return this .fileURL;
51115
- },
51116
51165
  getBaseURL ()
51117
51166
  {
51118
51167
  if (this .node instanceof Execution_X3DWorld)
@@ -51195,8 +51244,8 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51195
51244
 
51196
51245
  if (DEVELOPMENT)
51197
51246
  {
51198
- if (this .fileURL .protocol !== "data:")
51199
- console .info (`Done loading scene '${decodeURI (this .fileURL)}'.`);
51247
+ if (this .resolvedURL .protocol !== "data:")
51248
+ console .info (`Done loading scene '${decodeURI (this .resolvedURL)}'.`);
51200
51249
  }
51201
51250
  },
51202
51251
  createX3DFromURL (url, parameter, callback, bindViewpoint, foreign)
@@ -51213,13 +51262,15 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51213
51262
  if (data === null)
51214
51263
  callback (null);
51215
51264
  else
51216
- this .createX3DFromString (this .fileURL, data, callback, this .loadDocumentError .bind (this));
51265
+ this .createX3DFromString (this .resolvedURL, data, callback, this .loadDocumentError .bind (this));
51217
51266
  },
51218
51267
  loadDocument (url, callback)
51219
51268
  {
51220
51269
  this .url = url .slice ();
51221
51270
  this .callback = callback;
51222
51271
 
51272
+ this .attempts .length = 0;
51273
+
51223
51274
  if (url .length === 0)
51224
51275
  return this .loadDocumentError ();
51225
51276
 
@@ -51228,8 +51279,15 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51228
51279
  },
51229
51280
  async loadDocumentAsync (url)
51230
51281
  {
51282
+ // Not every candidate reaches URL resolution, so resolvedURL stays null until it
51283
+ // does. Diagnostics must not attribute the previous candidate's resolved URL to
51284
+ // this one.
51285
+
51286
+ this .candidateURL = url;
51287
+ this .resolvedURL = null;
51288
+
51231
51289
  if (!url .length)
51232
- return this .loadDocumentError ();
51290
+ return this .loadDocumentError (new Error ("Empty URL."));
51233
51291
 
51234
51292
  // Script:
51235
51293
  {
@@ -51239,7 +51297,7 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51239
51297
  return await this .callback (url .substring (result [0] .length));
51240
51298
  }
51241
51299
 
51242
- this .fileURL = new URL (url, this .getBaseURL ());
51300
+ this .resolvedURL = new URL (url, this .getBaseURL ());
51243
51301
 
51244
51302
  // Handle data URLs that are not base64 decoded here:
51245
51303
  if (this .dataAsString)
@@ -51261,17 +51319,17 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51261
51319
 
51262
51320
  // Bind Viewpoint URLs:
51263
51321
 
51264
- if (this .fileURL .protocol !== "data:" && this .bindViewpoint)
51322
+ if (this .resolvedURL .protocol !== "data:" && this .bindViewpoint)
51265
51323
  {
51266
51324
  const referer = new URL (this .getBaseURL ());
51267
51325
 
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)
51326
+ if (this .resolvedURL .protocol === referer .protocol &&
51327
+ this .resolvedURL .hostname === referer .hostname &&
51328
+ this .resolvedURL .port === referer .port &&
51329
+ this .resolvedURL .pathname === referer .pathname &&
51330
+ this .resolvedURL .hash)
51273
51331
  {
51274
- return this .bindViewpoint (decodeURIComponent (this .fileURL .hash .substring (1)));
51332
+ return this .bindViewpoint (decodeURIComponent (this .resolvedURL .hash .substring (1)));
51275
51333
  }
51276
51334
  }
51277
51335
 
@@ -51282,19 +51340,19 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51282
51340
  // Handle target
51283
51341
 
51284
51342
  if (this .target .length && this .target !== "_self")
51285
- return this .foreign (this .fileURL .href, this .target);
51343
+ return this .foreign (this .resolvedURL .href, this .target);
51286
51344
 
51287
51345
  // Handle well known foreign content depending on extension or if path looks like directory.
51288
51346
 
51289
- if (this .fileURL .protocol !== "data:" && this .fileURL .href .match (/\.(?:html|htm|xhtml)$/))
51290
- return this .foreign (this .fileURL .href, this .target);
51347
+ if (this .resolvedURL .protocol !== "data:" && this .resolvedURL .href .match (/\.(?:html|htm|xhtml)$/))
51348
+ return this .foreign (this .resolvedURL .href, this .target);
51291
51349
  }
51292
51350
 
51293
51351
  // Cached scenes:
51294
51352
 
51295
- if (this .sceneCallback && this .cacheScene && !this .fileURL .search .length)
51353
+ if (this .sceneCallback && this .cacheScene && !this .resolvedURL .search .length)
51296
51354
  {
51297
- const cacheURL = new URL (this .fileURL);
51355
+ const cacheURL = new URL (this .resolvedURL);
51298
51356
 
51299
51357
  cacheURL .hash = "";
51300
51358
 
@@ -51304,7 +51362,7 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51304
51362
  {
51305
51363
  const scene = await promise;
51306
51364
 
51307
- scene .setWorldURL (this .fileURL .href);
51365
+ scene .setWorldURL (this .resolvedURL .href);
51308
51366
 
51309
51367
  return this .sceneCallback (scene);
51310
51368
  }
@@ -51322,7 +51380,7 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51322
51380
 
51323
51381
  const
51324
51382
  options = { cache: this .node .getCache () ? "default" : "reload", signal: this .controller .signal },
51325
- response = this .checkResponse (await fetch (this .fileURL, options)),
51383
+ response = this .checkResponse (await fetch (this .resolvedURL, options)),
51326
51384
  mimeType = response .headers .get ("Content-Type") ?.replace (/;.*$/, "");
51327
51385
 
51328
51386
  if (this .foreign)
@@ -51330,10 +51388,10 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51330
51388
  // console .log (mimeType);
51331
51389
 
51332
51390
  if (foreignMimeType .has (mimeType))
51333
- return this .foreign (this .fileURL .href, this .target);
51391
+ return this .foreign (this .resolvedURL .href, this .target);
51334
51392
  }
51335
51393
 
51336
- await this .callback (await helper.gunzip (await this .getBlob (response)), this .fileURL);
51394
+ await this .callback (await helper.gunzip (await this .getBlob (response)), this .resolvedURL);
51337
51395
  },
51338
51396
  async getBlob (response)
51339
51397
  {
@@ -51373,7 +51431,7 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51373
51431
  if (response .ok)
51374
51432
  return response;
51375
51433
 
51376
- throw Error (response .statusText || response .status);
51434
+ throw new Error (response .statusText || response .status);
51377
51435
  },
51378
51436
  loadDocumentError (error)
51379
51437
  {
@@ -51399,12 +51457,52 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
51399
51457
  if (!error)
51400
51458
  return;
51401
51459
 
51402
- const typeName = this .node instanceof Execution_X3DWorld ? "" : ` for ${this .node .getTypeName ()}`;
51460
+ // Candidates that are evaluated rather than fetched — an empty string, or a
51461
+ // script URL — have no resolved URL, and are reported by their authored value.
51403
51462
 
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);
51463
+ const
51464
+ typeName = this .node instanceof Execution_X3DWorld ? "" : ` for ${this .node .getTypeName ()}`,
51465
+ dataURL = this .resolvedURL ?.protocol === "data:",
51466
+ resolved = this .resolvedURL && !dataURL ? `${helper.try (() => decodeURI (this .resolvedURL)) ?? this .resolvedURL}` : "",
51467
+ subject = !this .candidateURL .length ? "empty URL"
51468
+ : dataURL ? "data URL"
51469
+ : `URL '${resolved || this .truncate (this .candidateURL)}'`;
51470
+
51471
+ this .attempts .push ({ url: this .candidateURL, resolved, error });
51472
+
51473
+ // A url field is a fallback list, so a failed candidate is not yet a failure of
51474
+ // the resource: a later candidate may still succeed. Report the resource as
51475
+ // failed only once every candidate has been tried.
51476
+
51477
+ if (this .url .length)
51478
+ return console .warn (`Couldn't load ${subject}${typeName}, trying URL ${this .attempts .length + 1} of ${this .attempts .length + this .url .length}.`, error);
51479
+
51480
+ if (this .attempts .length === 1)
51481
+ return console .error (`Couldn't load ${subject}${typeName}.`, error);
51482
+
51483
+ // Pass the errors themselves along with the summary, so their stacks and context
51484
+ // stay inspectable.
51485
+
51486
+ console .error (`Couldn't load any of the ${this .attempts .length} URLs${typeName}, tried in this order:\n`
51487
+ + this .attempts
51488
+ .map (({ url, resolved, error }, i) =>
51489
+ ` ${i + 1}. '${this .truncate (url)}'${resolved && resolved !== url ? ` → ${this .truncate (resolved)}` : ""}: ${this .describe (error)}`)
51490
+ .join ("\n") + "\n",
51491
+ ... this .attempts .map (({ error }) => error));
51492
+ },
51493
+ /**
51494
+ * Keep diagnostics readable when a candidate is a long data URL.
51495
+ */
51496
+ truncate (string, length = 120)
51497
+ {
51498
+ return string .length > length ? `${string .substring (0, length)}…` : string;
51499
+ },
51500
+ /**
51501
+ * Not every thrown value is an Error, so don't summarize one as [object Object].
51502
+ */
51503
+ describe (error)
51504
+ {
51505
+ return error ?.message ?? (typeof error === "object" ? helper.try (() => JSON .stringify (error)) : null) ?? String (error);
51408
51506
  },
51409
51507
  });
51410
51508
 
@@ -54566,7 +54664,7 @@ function X3DCoreContext (element)
54566
54664
  {
54567
54665
  const link = document .createElement ("link");
54568
54666
 
54569
- link .integrity = "sha384-FEmsQpL8R1dkzlxB19h2qi5U9Cuh8Zk2953YCudH0PTQSwiWiUovdIWVDBu3/YAc";
54667
+ link .integrity = "sha384-F+mssNuFiQHol3RT7fLg6krIVxgAio+0HtxiqkBJSZIYtVM6Z51XLEsu66xkirs/";
54570
54668
  link .rel = "stylesheet";
54571
54669
  link .crossOrigin = "anonymous";
54572
54670
  link .onload = resolve;
@@ -71748,15 +71846,21 @@ const PeriodicWave_default_ = PeriodicWave;
71748
71846
 
71749
71847
 
71750
71848
 
71849
+
71850
+
71751
71851
  const
71752
- _audioElements = Symbol (),
71753
71852
  _audioContext = Symbol (),
71853
+ _audioNodes = Symbol (),
71854
+ _audioElements = Symbol (),
71754
71855
  _defaultPeriodicWave = Symbol (),
71755
71856
  _noSoundButton = Symbol (),
71756
71857
  _noSoundButtonId = Symbol ();
71757
71858
 
71758
71859
  function X3DSoundContext ()
71759
71860
  {
71861
+ this .addChildObjects (Base_X3DConstants .outputOnly, "audio", new x_ite_Fields .SFBool ());
71862
+
71863
+ this [_audioNodes] = new Set ();
71760
71864
  this [_audioElements] = new Map ();
71761
71865
  }
71762
71866
 
@@ -71794,16 +71898,17 @@ Object .assign (X3DSoundContext .prototype,
71794
71898
  return audioContext;
71795
71899
  })();
71796
71900
  },
71797
- getDefaultPeriodicWave ()
71901
+ addAudioNode (element)
71798
71902
  {
71799
- return this [_defaultPeriodicWave] ??= (() =>
71800
- {
71801
- const defaultPeriodicWave = new Sound_PeriodicWave (this .getPrivateScene ());
71903
+ this [_audioNodes] .add (element);
71802
71904
 
71803
- defaultPeriodicWave .setup ();
71905
+ this ._audio = this [_audioNodes] .size;
71906
+ },
71907
+ removeAudioNode (element)
71908
+ {
71909
+ this [_audioNodes] .delete (element);
71804
71910
 
71805
- return defaultPeriodicWave;
71806
- })();
71911
+ this ._audio = this [_audioNodes] .size;
71807
71912
  },
71808
71913
  startAudioElement (audioElement, functionName = "play")
71809
71914
  {
@@ -71880,6 +71985,17 @@ Object .assign (X3DSoundContext .prototype,
71880
71985
  },
71881
71986
  200);
71882
71987
  },
71988
+ getDefaultPeriodicWave ()
71989
+ {
71990
+ return this [_defaultPeriodicWave] ??= (() =>
71991
+ {
71992
+ const defaultPeriodicWave = new Sound_PeriodicWave (this .getPrivateScene ());
71993
+
71994
+ defaultPeriodicWave .setup ();
71995
+
71996
+ return defaultPeriodicWave;
71997
+ })();
71998
+ },
71883
71999
  });
71884
72000
 
71885
72001
  const X3DSoundContext_default_ = X3DSoundContext;
@@ -74904,9 +75020,12 @@ Object .assign (Object .setPrototypeOf (TextureBackground .prototype, Environmen
74904
75020
  this .set_texture__ (4, this ._topTexture);
74905
75021
  this .set_texture__ (5, this ._bottomTexture);
74906
75022
  },
74907
- set_texture__ (index, textureNode)
75023
+ set_texture__ (index, node)
74908
75024
  {
74909
- EnvironmentalEffects_X3DBackgroundNode .prototype .set_texture__ .call (this, index, Base_X3DCast (Base_X3DConstants .X3DTextureNode, textureNode));
75025
+ const textureNode = Base_X3DCast (Base_X3DConstants .X3DTexture2DNode, node)
75026
+ ?? Base_X3DCast (Base_X3DConstants .MultiTexture, node);
75027
+
75028
+ EnvironmentalEffects_X3DBackgroundNode .prototype .set_texture__ .call (this, index, textureNode);
74910
75029
  },
74911
75030
  traverse (type, renderObject)
74912
75031
  {
@@ -88330,10 +88449,20 @@ Object .assign (Object .setPrototypeOf (X3DSoundDestinationNode .prototype, Soun
88330
88449
  {
88331
88450
  // If enabled field is FALSE, the audio signal is blocked and does not pass through.
88332
88451
 
88333
- if (this ._enabled .getValue () && this .getLive () .getValue ())
88452
+ const
88453
+ browser = this .getBrowser (),
88454
+ active = this ._enabled .getValue () && this .getLive () .getValue ();
88455
+
88456
+ if (active)
88457
+ {
88334
88458
  this .audioDestination .connect (this .getSoundDestination ());
88459
+ browser .addAudioNode (this);
88460
+ }
88335
88461
  else
88462
+ {
88336
88463
  this .audioDestination .disconnect ();
88464
+ browser .removeAudioNode (this);
88465
+ }
88337
88466
 
88338
88467
  this ._isActive = this ._enabled;
88339
88468
  },
@@ -88455,6 +88584,8 @@ Object .assign (Object .setPrototypeOf (AudioDestination .prototype, Sound_X3DSo
88455
88584
  },
88456
88585
  set_enabled__ ()
88457
88586
  {
88587
+ Sound_X3DSoundDestinationNode .prototype .set_enabled__ .call (this);
88588
+
88458
88589
  const
88459
88590
  browser = this .getBrowser (),
88460
88591
  active = this ._enabled .getValue () && this .getLive () .getValue ();
@@ -88463,8 +88594,6 @@ Object .assign (Object .setPrototypeOf (AudioDestination .prototype, Sound_X3DSo
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
  {
@@ -90147,7 +90276,7 @@ function Sound (executionContext)
90147
90276
 
90148
90277
  this .addType (Base_X3DConstants .Sound);
90149
90278
 
90150
- this .addChildObjects (Base_X3DConstants .outputOnly, "traversed", new x_ite_Fields .SFBool (true));
90279
+ this .addChildObjects (Base_X3DConstants .outputOnly, "traversed", new x_ite_Fields .SFBool ());
90151
90280
 
90152
90281
  this .setVisibleObject (true);
90153
90282
 
@@ -90249,19 +90378,23 @@ Object .assign (Object .setPrototypeOf (Sound .prototype, Sound_X3DSoundNode .pr
90249
90378
  },
90250
90379
  set_live__ ()
90251
90380
  {
90381
+ const browser = this .getBrowser ();
90382
+
90252
90383
  this .mergerNode .disconnect ();
90253
90384
 
90254
90385
  if (this .getLive () .getValue () && this ._traversed .getValue ())
90255
90386
  {
90256
90387
  const audioContext = this .getBrowser () .getAudioContext ();
90257
90388
 
90258
- this .getBrowser () .sensorEvents () .addInterest ("update", this);
90259
-
90260
90389
  this .mergerNode .connect (audioContext .destination);
90390
+
90391
+ browser .addAudioNode (this);
90392
+ browser .sensorEvents () .addInterest ("update", this);
90261
90393
  }
90262
90394
  else
90263
90395
  {
90264
- this .getBrowser () .sensorEvents () .removeInterest ("update", this);
90396
+ browser .removeAudioNode (this);
90397
+ browser .sensorEvents () .removeInterest ("update", this);
90265
90398
  }
90266
90399
  },
90267
90400
  set_intensity__ ()
@@ -90502,7 +90635,7 @@ function SpatialSound (executionContext)
90502
90635
 
90503
90636
  this .addType (Base_X3DConstants .SpatialSound);
90504
90637
 
90505
- this .addChildObjects (Base_X3DConstants .outputOnly, "traversed", new x_ite_Fields .SFBool (true));
90638
+ this .addChildObjects (Base_X3DConstants .outputOnly, "traversed", new x_ite_Fields .SFBool ());
90506
90639
 
90507
90640
  this .setVisibleObject (true);
90508
90641
 
@@ -90592,19 +90725,23 @@ Object .assign (Object .setPrototypeOf (SpatialSound .prototype, Sound_X3DSoundN
90592
90725
  },
90593
90726
  set_live__ ()
90594
90727
  {
90728
+ const browser = this .getBrowser ();
90729
+
90595
90730
  this .pannerNode .disconnect ();
90596
90731
 
90597
90732
  if (this .getLive () .getValue () && this ._traversed .getValue ())
90598
90733
  {
90599
90734
  const audioContext = this .getBrowser () .getAudioContext ();
90600
90735
 
90601
- this .getBrowser () .sensorEvents () .addInterest ("update", this);
90602
-
90603
90736
  this .pannerNode .connect (audioContext .destination);
90737
+
90738
+ browser .addAudioNode (this);
90739
+ browser .sensorEvents () .addInterest ("update", this);
90604
90740
  }
90605
90741
  else
90606
90742
  {
90607
- this .getBrowser () .sensorEvents () .removeInterest ("update", this);
90743
+ browser .removeAudioNode (this);
90744
+ browser .sensorEvents () .removeInterest ("update", this);
90608
90745
  }
90609
90746
  },
90610
90747
  set_spatialize__ ()
@@ -90708,6 +90845,8 @@ Object .assign (Object .setPrototypeOf (SpatialSound .prototype, Sound_X3DSoundN
90708
90845
 
90709
90846
  for (const childNode of this .childNodes)
90710
90847
  childNode .getAudioSource () .connect (this .gainNode);
90848
+
90849
+ this .setVisibleObject (this .childNodes .length);
90711
90850
  },
90712
90851
  update ()
90713
90852
  {
@@ -90812,11 +90951,10 @@ Object .assign (Object .setPrototypeOf (StreamAudioDestination .prototype, Sound
90812
90951
  {
90813
90952
  return this .mediaStreamAudioDestinationNode;
90814
90953
  },
90815
- set_enabled__ () { /* remove this function if implemented */ },
90954
+ set_enabled__ ()
90955
+ { },
90816
90956
  set_mediaDeviceID__ ()
90817
- {
90818
-
90819
- },
90957
+ { },
90820
90958
  });
90821
90959
 
90822
90960
  Object .defineProperties (StreamAudioDestination,
@@ -91249,8 +91387,8 @@ const PNGMedia_default_ = PNGMedia;
91249
91387
 
91250
91388
  /* harmony default export */ const Texturing_PNGMedia = (x_ite_Namespace .add ("PNGMedia", PNGMedia_default_));
91251
91389
  ;// ./src/x_ite/Components/Texturing/MovieTexture.js
91252
- /* provided dependency */ var SuperGif = __webpack_require__(603);
91253
- /* provided dependency */ var APNG = __webpack_require__(777);
91390
+ /* provided dependency */ var SuperGif = __webpack_require__(143);
91391
+ /* provided dependency */ var APNG = __webpack_require__(701);
91254
91392
 
91255
91393
 
91256
91394
 
@@ -92722,7 +92860,7 @@ Object .assign (Object .setPrototypeOf (X3DBrowser .prototype, Browser_X3DBrowse
92722
92860
  if (profile)
92723
92861
  return profile;
92724
92862
 
92725
- throw Error (`Profile '${name}' is not supported.`);
92863
+ throw new Error (`Profile '${name}' is not supported.`);
92726
92864
  },
92727
92865
  addSupportedProfile: function (profile)
92728
92866
  {
@@ -92766,7 +92904,7 @@ Object .assign (Object .setPrototypeOf (X3DBrowser .prototype, Browser_X3DBrowse
92766
92904
  component .dependencies);
92767
92905
  }
92768
92906
 
92769
- throw Error (`Component '${name}' at level '${level}' is not supported.`);
92907
+ throw new Error (`Component '${name}' at level '${level}' is not supported.`);
92770
92908
  },
92771
92909
  addSupportedComponent (component)
92772
92910
  {
@@ -93888,7 +94026,7 @@ const QuickSort_default_ = QuickSort;
93888
94026
 
93889
94027
  /* harmony default export */ const Algorithms_QuickSort = (x_ite_Namespace .add ("QuickSort", QuickSort_default_));
93890
94028
  ;// ./src/lib/libtess.js
93891
- /* provided dependency */ var libtess_libtess = __webpack_require__(457);
94029
+ /* provided dependency */ var libtess_libtess = __webpack_require__(877);
93892
94030
  const libtess_default_ = libtess_libtess;
93893
94031
  ;
93894
94032