x_ite 16.1.0 → 16.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/README.md +5 -5
  2. package/dist/assets/components/AnnotationComponent.js +1 -1
  3. package/dist/assets/components/AnnotationComponent.min.js +1 -1
  4. package/dist/assets/components/CADGeometryComponent.js +1 -1
  5. package/dist/assets/components/CADGeometryComponent.min.js +1 -1
  6. package/dist/assets/components/CubeMapTexturingComponent.js +1 -1
  7. package/dist/assets/components/CubeMapTexturingComponent.min.js +1 -1
  8. package/dist/assets/components/DISComponent.js +1 -1
  9. package/dist/assets/components/DISComponent.min.js +1 -1
  10. package/dist/assets/components/EventUtilitiesComponent.js +1 -1
  11. package/dist/assets/components/EventUtilitiesComponent.min.js +1 -1
  12. package/dist/assets/components/GaussianSplatsComponent.js +1 -1
  13. package/dist/assets/components/GaussianSplatsComponent.min.js +1 -1
  14. package/dist/assets/components/Geometry2DComponent.js +1 -1
  15. package/dist/assets/components/Geometry2DComponent.min.js +1 -1
  16. package/dist/assets/components/Geometry3DComponent.js +1 -1
  17. package/dist/assets/components/Geometry3DComponent.min.js +1 -1
  18. package/dist/assets/components/GeospatialComponent.js +6 -13
  19. package/dist/assets/components/GeospatialComponent.min.js +2 -2
  20. package/dist/assets/components/HAnimComponent.js +1 -1
  21. package/dist/assets/components/HAnimComponent.min.js +1 -1
  22. package/dist/assets/components/KeyDeviceSensorComponent.js +1 -1
  23. package/dist/assets/components/KeyDeviceSensorComponent.min.js +1 -1
  24. package/dist/assets/components/LayoutComponent.js +1 -1
  25. package/dist/assets/components/LayoutComponent.min.js +1 -1
  26. package/dist/assets/components/NURBSComponent.js +1 -1
  27. package/dist/assets/components/NURBSComponent.min.js +1 -1
  28. package/dist/assets/components/ParticleSystemsComponent.js +1 -1
  29. package/dist/assets/components/ParticleSystemsComponent.min.js +1 -1
  30. package/dist/assets/components/PickingComponent.js +1 -1
  31. package/dist/assets/components/PickingComponent.min.js +1 -1
  32. package/dist/assets/components/RigidBodyPhysicsComponent.js +1 -1
  33. package/dist/assets/components/RigidBodyPhysicsComponent.min.js +1 -1
  34. package/dist/assets/components/ScriptingComponent.js +1 -1
  35. package/dist/assets/components/ScriptingComponent.min.js +1 -1
  36. package/dist/assets/components/TextComponent.js +1 -1
  37. package/dist/assets/components/TextComponent.min.js +1 -1
  38. package/dist/assets/components/TextureProjectionComponent.js +1 -1
  39. package/dist/assets/components/TextureProjectionComponent.min.js +1 -1
  40. package/dist/assets/components/Texturing3DComponent.js +9 -9
  41. package/dist/assets/components/Texturing3DComponent.min.js +2 -2
  42. package/dist/assets/components/VolumeRenderingComponent.js +1 -1
  43. package/dist/assets/components/VolumeRenderingComponent.min.js +1 -1
  44. package/dist/assets/components/WebXRComponent.js +1 -1
  45. package/dist/assets/components/WebXRComponent.min.js +1 -1
  46. package/dist/assets/components/X_ITEComponent.js +1 -1
  47. package/dist/assets/components/X_ITEComponent.min.js +1 -1
  48. package/dist/example.html +1 -1
  49. package/dist/x_ite.css +1 -1
  50. package/dist/x_ite.d.ts +195 -40
  51. package/dist/x_ite.js +284 -296
  52. package/dist/x_ite.min.js +2 -2
  53. package/dist/x_ite.min.mjs +2 -2
  54. package/dist/x_ite.mjs +284 -296
  55. package/dist/x_ite.zip +0 -0
  56. package/package.json +3 -3
package/dist/x_ite.mjs CHANGED
@@ -1,7 +1,7 @@
1
- /* X_ITE v16.1.0 */
1
+ /* X_ITE v16.1.2 */
2
2
  var __webpack_modules__ = ({
3
3
 
4
- /***/ 548
4
+ /***/ 603
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
- /***/ 174
1009
+ /***/ 777
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
- /***/ 246
2005
+ /***/ 457
2006
2006
  (module) {
2007
2007
 
2008
2008
  /**
@@ -8912,7 +8912,7 @@ const handler =
8912
8912
  },
8913
8913
  ownKeys (target)
8914
8914
  {
8915
- return Object .keys (target [_array]) .concat (Object .keys (target));
8915
+ return Object .keys (target [_array]) .concat (Reflect .ownKeys (target));
8916
8916
  },
8917
8917
  getOwnPropertyDescriptor (target, key)
8918
8918
  {
@@ -8924,7 +8924,7 @@ const handler =
8924
8924
  {
8925
8925
  if (index < target [_array] .length)
8926
8926
  {
8927
- const propertyDescriptor = Object .getOwnPropertyDescriptor (target [_array], key);
8927
+ const propertyDescriptor = Reflect .getOwnPropertyDescriptor (target [_array], key);
8928
8928
 
8929
8929
  if (propertyDescriptor)
8930
8930
  propertyDescriptor .writable = false;
@@ -8938,12 +8938,20 @@ const handler =
8938
8938
  },
8939
8939
  };
8940
8940
 
8941
+ const properties = {
8942
+ length: {
8943
+ get () { return this [_array] .length; },
8944
+ },
8945
+ };
8946
+
8941
8947
  function X3DInfoArray (values, valueType)
8942
8948
  {
8943
8949
  const proxy = new Proxy (this, handler);
8944
8950
 
8945
8951
  Base_X3DChildObject .call (this);
8946
8952
 
8953
+ Object .defineProperties (this, properties);
8954
+
8947
8955
  this [_array] = [ ];
8948
8956
  this [_index] = new Map ();
8949
8957
  this [_valueType] = valueType;
@@ -8960,6 +8968,7 @@ Object .assign (Object .setPrototypeOf (X3DInfoArray .prototype, Base_X3DChildOb
8960
8968
  {
8961
8969
  yield* this [_array];
8962
8970
  },
8971
+ // Public functions:
8963
8972
  copy ()
8964
8973
  {
8965
8974
  const copy = new (this .constructor) ();
@@ -8968,6 +8977,7 @@ Object .assign (Object .setPrototypeOf (X3DInfoArray .prototype, Base_X3DChildOb
8968
8977
 
8969
8978
  return copy;
8970
8979
  },
8980
+ // Private functions:
8971
8981
  clear ()
8972
8982
  {
8973
8983
  this [_array] .length = 0;
@@ -8985,6 +8995,7 @@ Object .assign (Object .setPrototypeOf (X3DInfoArray .prototype, Base_X3DChildOb
8985
8995
 
8986
8996
  this .addEvent ();
8987
8997
  },
8998
+ // Public functions:
8988
8999
  equals (array)
8989
9000
  {
8990
9001
  const
@@ -9006,6 +9017,7 @@ Object .assign (Object .setPrototypeOf (X3DInfoArray .prototype, Base_X3DChildOb
9006
9017
 
9007
9018
  return true;
9008
9019
  },
9020
+ // Private functions:
9009
9021
  has (key)
9010
9022
  {
9011
9023
  return this [_index] .has (key);
@@ -9080,41 +9092,42 @@ Object .assign (Object .setPrototypeOf (X3DInfoArray .prototype, Base_X3DChildOb
9080
9092
 
9081
9093
  this .addEvent ();
9082
9094
  },
9083
- at: Array .prototype .at,
9084
- // concat: Array .prototype .concat,
9085
- // copyWithin: Array.prototype.copyWithin,
9086
- entries: Array .prototype .entries,
9087
- every: Array .prototype .every,
9088
- // fill: Array .prototype .fill,
9095
+ // Public functions:
9096
+ // Add all non destructive functions:
9097
+ ... Object .fromEntries ([
9098
+ "at",
9099
+ "entries",
9100
+ "every",
9101
+ "find",
9102
+ "findIndex",
9103
+ "findLast",
9104
+ "findLastIndex",
9105
+ "flat",
9106
+ "flatMap",
9107
+ "forEach",
9108
+ "includes",
9109
+ "indexOf",
9110
+ "join",
9111
+ "keys",
9112
+ "lastIndexOf",
9113
+ "reduce",
9114
+ "reduceRight",
9115
+ "some",
9116
+ "values",
9117
+ ]
9118
+ .map (name => [name, Array .prototype [name]])),
9089
9119
  filter (callbackFn, thisArg)
9090
9120
  {
9091
9121
  return new (this .constructor) (Array .prototype .filter .call (this, callbackFn, thisArg));
9092
9122
  },
9093
- find: Array .prototype .find,
9094
- findIndex: Array .prototype .findIndex,
9095
- findLast: Array .prototype .findLast,
9096
- findLastIndex: Array .prototype .findLastIndex,
9097
- flat: Array .prototype .flat,
9098
- flatMap: Array .prototype .flatMap,
9099
- forEach: Array .prototype .forEach,
9100
- includes: Array .prototype .includes,
9101
- indexOf: Array .prototype .indexOf,
9102
- join: Array .prototype .join,
9103
- keys: Array .prototype .keys,
9104
- lastIndexOf: Array .prototype .lastIndexOf,
9105
9123
  map (callbackFn, thisArg)
9106
9124
  {
9107
9125
  return new (this .constructor) (Array .prototype .map .call (this, callbackFn, thisArg));
9108
9126
  },
9109
- reduce: Array .prototype .reduce,
9110
- reduceRight: Array .prototype .reduceRight,
9111
- // reverse: Array .prototype .reverse,
9112
9127
  slice (start, end)
9113
9128
  {
9114
9129
  return new (this .constructor) (Array .prototype .slice .call (this, start, end));
9115
9130
  },
9116
- some: Array .prototype .some,
9117
- // sort: Array .prototype .sort,
9118
9131
  toReversed ()
9119
9132
  {
9120
9133
  return new (this .constructor) ([... this] .reverse ());
@@ -9131,7 +9144,6 @@ Object .assign (Object .setPrototypeOf (X3DInfoArray .prototype, Base_X3DChildOb
9131
9144
 
9132
9145
  return new (this .constructor) (array);
9133
9146
  },
9134
- values: Array .prototype .values,
9135
9147
  with (index, value)
9136
9148
  {
9137
9149
  const array = [... this];
@@ -9140,6 +9152,7 @@ Object .assign (Object .setPrototypeOf (X3DInfoArray .prototype, Base_X3DChildOb
9140
9152
 
9141
9153
  return new (this .constructor) (array);
9142
9154
  },
9155
+ // Private functions:
9143
9156
  toVRMLStream (generator)
9144
9157
  {
9145
9158
  const proto = this .getTypeName () .includes ("Proto");
@@ -9155,7 +9168,7 @@ Object .assign (Object .setPrototypeOf (X3DInfoArray .prototype, Base_X3DChildOb
9155
9168
  if (proto)
9156
9169
  generator .TidyBreak ();
9157
9170
  }
9158
- catch (error)
9171
+ catch
9159
9172
  {
9160
9173
  // console .error (error);
9161
9174
  }
@@ -9171,7 +9184,7 @@ Object .assign (Object .setPrototypeOf (X3DInfoArray .prototype, Base_X3DChildOb
9171
9184
 
9172
9185
  generator .TidyBreak ();
9173
9186
  }
9174
- catch (error)
9187
+ catch
9175
9188
  {
9176
9189
  // console .error (error);
9177
9190
  }
@@ -9203,14 +9216,6 @@ Object .assign (Object .setPrototypeOf (X3DInfoArray .prototype, Base_X3DChildOb
9203
9216
  for (const key of Object .keys (X3DInfoArray .prototype))
9204
9217
  Object .defineProperty (X3DInfoArray .prototype, key, { enumerable: false });
9205
9218
 
9206
- Object .defineProperties (X3DInfoArray .prototype,
9207
- {
9208
- length:
9209
- {
9210
- get () { return this [_array] .length; },
9211
- },
9212
- });
9213
-
9214
9219
  const X3DInfoArray_default_ = X3DInfoArray;
9215
9220
  ;
9216
9221
 
@@ -9582,11 +9587,11 @@ Object .assign (Object .setPrototypeOf (X3DField .prototype, Base_X3DChildObject
9582
9587
  {
9583
9588
  this .fromVRMLString (value, scene);
9584
9589
  },
9585
- fromVRMLString (value, scene)
9590
+ fromVRMLString (/* value, scene */)
9586
9591
  {
9587
9592
  // Function will be overridden in VRMLParser.
9588
9593
  },
9589
- fromXMLString (value, scene)
9594
+ fromXMLString (/* value, scene */)
9590
9595
  {
9591
9596
  // Function will be overridden in XMLParser.
9592
9597
  },
@@ -14315,9 +14320,6 @@ const SFMatrix4_default_ = SFMatrix4;
14315
14320
 
14316
14321
  const cache = new WeakMap ();
14317
14322
 
14318
- // const r = new FinalizationRegistry (t => console .error (`object deleted ${--i} ${t}`));
14319
- // let i = 0;
14320
-
14321
14323
  const SFNodeCache =
14322
14324
  {
14323
14325
  get (baseNode)
@@ -14339,8 +14341,6 @@ const SFNodeCache =
14339
14341
  },
14340
14342
  set (baseNode, node)
14341
14343
  {
14342
- Object .defineProperties (node, properties);
14343
-
14344
14344
  cache .set (baseNode, node);
14345
14345
  },
14346
14346
  delete (baseNode)
@@ -14349,30 +14349,6 @@ const SFNodeCache =
14349
14349
  },
14350
14350
  };
14351
14351
 
14352
- const disable =
14353
- {
14354
- value: undefined,
14355
- configurable: true,
14356
- };
14357
-
14358
- const properties =
14359
- {
14360
- fromString: disable,
14361
- fromVRMLString: disable,
14362
- fromXMLString: disable,
14363
- fromJSONString: disable,
14364
- dispose:
14365
- {
14366
- value ()
14367
- {
14368
- this .getValue () ?.dispose ();
14369
-
14370
- Fields_SFNode .prototype .dispose .call (this);
14371
- },
14372
- configurable: true,
14373
- },
14374
- };
14375
-
14376
14352
  const SFNodeCache_default_ = SFNodeCache;
14377
14353
  ;
14378
14354
 
@@ -14419,9 +14395,7 @@ const SFNode_handler =
14419
14395
 
14420
14396
  if (field)
14421
14397
  {
14422
- const accessType = field .getAccessType ();
14423
-
14424
- if (accessType === Base_X3DConstants .outputOnly)
14398
+ if (field .getAccessType () === Base_X3DConstants .outputOnly)
14425
14399
  return false;
14426
14400
 
14427
14401
  field .setValue (value);
@@ -14448,7 +14422,7 @@ const SFNode_handler =
14448
14422
  ownKeys .push (name);
14449
14423
  }
14450
14424
 
14451
- return ownKeys .concat (Object .keys (target));
14425
+ return ownKeys .concat (Reflect .ownKeys (target));
14452
14426
  },
14453
14427
  getOwnPropertyDescriptor (target, key)
14454
14428
  {
@@ -14788,7 +14762,15 @@ Object .assign (Object .setPrototypeOf (SFNode .prototype, Base_X3DField .protot
14788
14762
  },
14789
14763
  dispose ()
14790
14764
  {
14791
- const target = this [_target];
14765
+ const
14766
+ target = this [_target],
14767
+ node = target .getValue ();
14768
+
14769
+ if (node)
14770
+ {
14771
+ if (Fields_SFNodeCache .get (node) === this)
14772
+ node .dispose ();
14773
+ }
14792
14774
 
14793
14775
  target .set (null);
14794
14776
  target .processInterests ();
@@ -15661,74 +15643,61 @@ function X3DArrayField (value)
15661
15643
 
15662
15644
  Object .assign (Object .setPrototypeOf (X3DArrayField .prototype, Base_X3DField .prototype),
15663
15645
  {
15664
- // Implement all function also in TypedArray, if possible.
15665
- at: Array .prototype .at,
15666
- concat: Array .prototype .concat,
15667
- // copyWithin: Array.prototype.copyWithin,
15668
- entries: Array .prototype .entries,
15669
- every: Array .prototype .every,
15670
- fill: Array .prototype .fill,
15671
- filter (/* callbackFn, thisArg */)
15646
+ // Add all function possible in Array and TypedArray:
15647
+ ... Object .fromEntries ([
15648
+ "at",
15649
+ "concat",
15650
+ "entries",
15651
+ "every",
15652
+ "fill",
15653
+ "find",
15654
+ "findIndex",
15655
+ "findLast",
15656
+ "findLastIndex",
15657
+ "flat",
15658
+ "flatMap",
15659
+ "forEach",
15660
+ "includes",
15661
+ "indexOf",
15662
+ "join",
15663
+ "keys",
15664
+ "lastIndexOf",
15665
+ "reduce",
15666
+ "reduceRight",
15667
+ "reverse",
15668
+ "some",
15669
+ "sort",
15670
+ "values",
15671
+ ]
15672
+ .map (name => [name, Array .prototype [name]])),
15673
+ filter (... args)
15672
15674
  {
15673
- const array = new (this .constructor) ();
15674
-
15675
- for (const v of Array .prototype .filter .call (this, ... arguments))
15676
- array .push (v);
15677
-
15678
- return array;
15675
+ return this .constructor .from (Array .prototype .filter .call (this, ... args));
15679
15676
  },
15680
- find: Array .prototype .find,
15681
- findIndex: Array .prototype .findIndex,
15682
- findLast: Array .prototype .findLast,
15683
- findLastIndex: Array .prototype .findLastIndex,
15684
- flat: Array .prototype .flat,
15685
- flatMap: Array .prototype .flatMap,
15686
- forEach: Array .prototype .forEach,
15687
- includes: Array .prototype .includes,
15688
- indexOf: Array .prototype .indexOf,
15689
- join: Array .prototype .join,
15690
- keys: Array .prototype .keys,
15691
- lastIndexOf: Array .prototype .lastIndexOf,
15692
- map (/* callbackFn, thisArg */)
15693
- {
15694
- const array = new (this .constructor) ();
15695
-
15696
- for (const v of Array .prototype .map .call (this, ... arguments))
15697
- array .push (v);
15698
-
15699
- return array;
15677
+ map (... args)
15678
+ {
15679
+ return this .constructor .from (this, ... args);
15700
15680
  },
15701
- reduce: Array .prototype .reduce,
15702
- reduceRight: Array .prototype .reduceRight,
15703
- reverse: Array .prototype .reverse,
15704
- slice (/* start, end */)
15681
+ slice (... args)
15705
15682
  {
15706
- const array = new (this .constructor) ();
15707
-
15708
- for (const v of Array .prototype .slice .call (this, ... arguments))
15709
- array .push (v);
15710
-
15711
- return array;
15683
+ return this .constructor .from (Array .prototype .slice .call (this, ... args));
15712
15684
  },
15713
- some: Array .prototype .some,
15714
- sort: Array .prototype .sort,
15715
15685
  toReversed ()
15716
15686
  {
15717
15687
  return this .copy () .reverse ();
15718
15688
  },
15719
- toSorted (/* compareFn */)
15689
+ toSorted (... args)
15720
15690
  {
15721
- return this .copy () .sort (... arguments);
15691
+ return this .copy () .sort (... args);
15722
15692
  },
15723
- toSpliced (/* start, deleteCount, ... insertValues */)
15693
+ toSpliced (... args)
15724
15694
  {
15725
15695
  const copy = this .copy ();
15726
15696
 
15727
- copy .splice (... arguments);
15697
+ copy .splice (... args);
15728
15698
 
15729
15699
  return copy;
15730
15700
  },
15731
- values: Array .prototype .values,
15732
15701
  with (index, value)
15733
15702
  {
15734
15703
  const copy = this .copy ();
@@ -15742,6 +15711,35 @@ Object .assign (Object .setPrototypeOf (X3DArrayField .prototype, Base_X3DField
15742
15711
  for (const key of Object .keys (X3DArrayField .prototype))
15743
15712
  Object .defineProperty (X3DArrayField .prototype, key, { enumerable: false });
15744
15713
 
15714
+ Object .defineProperties (X3DArrayField,
15715
+ {
15716
+ addStaticProperties:
15717
+ {
15718
+ value (constructor, typeName)
15719
+ {
15720
+ Base_X3DField .addStaticProperties (constructor, typeName);
15721
+
15722
+ Object .defineProperties (constructor,
15723
+ {
15724
+ from:
15725
+ {
15726
+ value (... args)
15727
+ {
15728
+ const
15729
+ array = new constructor (),
15730
+ target = array .getTarget ();
15731
+
15732
+ for (const v of Array .from (... args))
15733
+ target .push (v);
15734
+
15735
+ return array;
15736
+ },
15737
+ },
15738
+ });
15739
+ },
15740
+ },
15741
+ });
15742
+
15745
15743
  const X3DArrayField_default_ = X3DArrayField;
15746
15744
  ;
15747
15745
 
@@ -15812,7 +15810,7 @@ const X3DObjectArrayField_handler =
15812
15810
  },
15813
15811
  ownKeys (target)
15814
15812
  {
15815
- return Object .keys (target .getValue ()) .concat (Object .keys (target));
15813
+ return Object .keys (target .getValue ()) .concat (Reflect .ownKeys (target));
15816
15814
  },
15817
15815
  getOwnPropertyDescriptor (target, key)
15818
15816
  {
@@ -15823,7 +15821,7 @@ const X3DObjectArrayField_handler =
15823
15821
  if (Number .isInteger (index) && index >= 0)
15824
15822
  {
15825
15823
  if (index < target .getValue () .length)
15826
- return Object .getOwnPropertyDescriptor (target .getValue (), key);
15824
+ return Reflect .getOwnPropertyDescriptor (target .getValue (), key);
15827
15825
  }
15828
15826
  }
15829
15827
 
@@ -15831,12 +15829,21 @@ const X3DObjectArrayField_handler =
15831
15829
  },
15832
15830
  };
15833
15831
 
15832
+ const X3DObjectArrayField_properties = {
15833
+ length: {
15834
+ get () { return this [X3DObjectArrayField_target] .getValue () .length; },
15835
+ set (value) { this [X3DObjectArrayField_target] .resize (value); },
15836
+ },
15837
+ };
15838
+
15834
15839
  function X3DObjectArrayField (values)
15835
15840
  {
15836
15841
  const proxy = new Proxy (this, X3DObjectArrayField_handler);
15837
15842
 
15838
15843
  Base_X3DArrayField .call (this, [ ]);
15839
15844
 
15845
+ Object .defineProperties (this, X3DObjectArrayField_properties);
15846
+
15840
15847
  this [X3DObjectArrayField_target] = this;
15841
15848
  this [X3DObjectArrayField_proxy] = proxy;
15842
15849
 
@@ -16253,12 +16260,6 @@ Object .assign (Object .setPrototypeOf (X3DObjectArrayField .prototype, Base_X3D
16253
16260
  for (const key of Object .keys (X3DObjectArrayField .prototype))
16254
16261
  Object .defineProperty (X3DObjectArrayField .prototype, key, { enumerable: false });
16255
16262
 
16256
- Object .defineProperty (X3DObjectArrayField .prototype, "length",
16257
- {
16258
- get () { return this [X3DObjectArrayField_target] .getValue () .length; },
16259
- set (value) { this [X3DObjectArrayField_target] .resize (value); },
16260
- });
16261
-
16262
16263
  const X3DObjectArrayField_default_ = X3DObjectArrayField;
16263
16264
  ;
16264
16265
 
@@ -16370,7 +16371,7 @@ const X3DTypedArrayField_handler =
16370
16371
  for (let i = 0; i < length; ++ i)
16371
16372
  ownKeys .push (String (i));
16372
16373
 
16373
- return ownKeys .concat (Object .keys (target));
16374
+ return ownKeys .concat (Reflect .ownKeys (target));
16374
16375
  },
16375
16376
  getOwnPropertyDescriptor (target, key)
16376
16377
  {
@@ -16381,7 +16382,7 @@ const X3DTypedArrayField_handler =
16381
16382
  if (Number .isInteger (index) && index >= 0)
16382
16383
  {
16383
16384
  if (index < target [_length])
16384
- return Object .getOwnPropertyDescriptor (target .getValue (), key);
16385
+ return Reflect .getOwnPropertyDescriptor (target .getValue (), key);
16385
16386
  }
16386
16387
  }
16387
16388
 
@@ -16389,12 +16390,26 @@ const X3DTypedArrayField_handler =
16389
16390
  },
16390
16391
  };
16391
16392
 
16393
+ const X3DTypedArrayField_properties = {
16394
+ length: {
16395
+ get () { return this [_length]; },
16396
+ set (value)
16397
+ {
16398
+ const target = this [X3DTypedArrayField_target];
16399
+
16400
+ target .resize (value, target .getSingleValue ());
16401
+ },
16402
+ },
16403
+ };
16404
+
16392
16405
  function X3DTypedArrayField (values)
16393
16406
  {
16394
16407
  const proxy = new Proxy (this, X3DTypedArrayField_handler);
16395
16408
 
16396
16409
  Base_X3DArrayField .call (this, new (this .getArrayType ()) (16));
16397
16410
 
16411
+ Object .defineProperties (this, X3DTypedArrayField_properties);
16412
+
16398
16413
  this [X3DTypedArrayField_target] = this;
16399
16414
  this [X3DTypedArrayField_proxy] = proxy;
16400
16415
 
@@ -16495,9 +16510,8 @@ Object .assign (Object .setPrototypeOf (X3DTypedArrayField .prototype, Base_X3DA
16495
16510
  set (otherArray /* value of field */, l /* length of field */)
16496
16511
  {
16497
16512
  const
16498
- target = this [X3DTypedArrayField_target],
16499
- components = target .getComponents (),
16500
- length = target [_length];
16513
+ target = this [X3DTypedArrayField_target],
16514
+ components = target .getComponents ();
16501
16515
 
16502
16516
  let
16503
16517
  array = target .getValue (),
@@ -16519,16 +16533,10 @@ Object .assign (Object .setPrototypeOf (X3DTypedArrayField .prototype, Base_X3DA
16519
16533
  array = target [_grow] (otherArray .length);
16520
16534
 
16521
16535
  array .set (otherArray);
16522
-
16523
- if (rest)
16524
- array .fill (0, otherLength * components, otherLength * components + rest);
16525
16536
  }
16526
16537
  else
16527
16538
  {
16528
16539
  array .set (otherArray);
16529
-
16530
- if (otherLength < length)
16531
- array .fill (0, otherLength * components, length * components);
16532
16540
  }
16533
16541
 
16534
16542
  target [_length] = otherLength;
@@ -16619,7 +16627,6 @@ Object .assign (Object .setPrototypeOf (X3DTypedArrayField .prototype, Base_X3DA
16619
16627
  }
16620
16628
 
16621
16629
  array .copyWithin (0, components, length * components);
16622
- array .fill (0, components * newLength, length * components);
16623
16630
 
16624
16631
  target [_length] = newLength;
16625
16632
 
@@ -16692,8 +16699,6 @@ Object .assign (Object .setPrototypeOf (X3DTypedArrayField .prototype, Base_X3DA
16692
16699
  value = new valueType (... tmp);
16693
16700
  }
16694
16701
 
16695
- array .fill (0, newLength * components, length * components);
16696
-
16697
16702
  target [_length] = newLength;
16698
16703
 
16699
16704
  target .addEvent ();
@@ -16784,7 +16789,6 @@ Object .assign (Object .setPrototypeOf (X3DTypedArrayField .prototype, Base_X3DA
16784
16789
  last *= components;
16785
16790
 
16786
16791
  array .copyWithin (first, last, length * components);
16787
- array .fill (0, newLength * components, length * components);
16788
16792
 
16789
16793
  target [_length] = newLength;
16790
16794
 
@@ -16811,8 +16815,6 @@ Object .assign (Object .setPrototypeOf (X3DTypedArrayField .prototype, Base_X3DA
16811
16815
 
16812
16816
  if (newLength < length)
16813
16817
  {
16814
- array .fill (0, newLength * components, length * components);
16815
-
16816
16818
  if (components > 1)
16817
16819
  target [_cache] .length = newLength;
16818
16820
 
@@ -16823,7 +16825,9 @@ Object .assign (Object .setPrototypeOf (X3DTypedArrayField .prototype, Base_X3DA
16823
16825
  {
16824
16826
  array = target [_grow] (newLength * components);
16825
16827
 
16826
- if (value !== undefined)
16828
+ if (value === undefined)
16829
+ array .fill (0, length * components, newLength * components);
16830
+ else
16827
16831
  this [_fill] (value, length, newLength);
16828
16832
 
16829
16833
  if (!silently)
@@ -16842,14 +16846,29 @@ Object .assign (Object .setPrototypeOf (X3DTypedArrayField .prototype, Base_X3DA
16842
16846
  return array;
16843
16847
 
16844
16848
  const
16845
- maxLength = Math_Algorithm .nextPowerOfTwo (length),
16846
- newArray = new (target .getArrayType ()) (maxLength);
16849
+ arrayType = target .getArrayType (),
16850
+ buffer = array .buffer;
16847
16851
 
16848
- newArray .set (array);
16852
+ if (length <= buffer .byteLength / arrayType .BYTES_PER_ELEMENT)
16853
+ {
16854
+ const newArray = new arrayType (buffer);
16849
16855
 
16850
- Base_X3DArrayField .prototype .set .call (target, newArray);
16856
+ Base_X3DArrayField .prototype .set .call (target, newArray);
16851
16857
 
16852
- return newArray;
16858
+ return newArray;
16859
+ }
16860
+ else
16861
+ {
16862
+ const
16863
+ nextLength = Math_Algorithm .nextPowerOfTwo (length),
16864
+ newArray = new arrayType (nextLength);
16865
+
16866
+ newArray .set (array);
16867
+
16868
+ Base_X3DArrayField .prototype .set .call (target, newArray);
16869
+
16870
+ return newArray;
16871
+ }
16853
16872
  },
16854
16873
  shrinkToFit ()
16855
16874
  {
@@ -16898,13 +16917,13 @@ Object .assign (Object .setPrototypeOf (X3DTypedArrayField .prototype, Base_X3DA
16898
16917
  valueType = target .getValueType ();
16899
16918
 
16900
16919
  if (components === 1)
16901
- return Array .from (array, value => valueType (value));
16920
+ return Array .from (array, valueType);
16902
16921
 
16903
16922
  return Array .from (array);
16904
16923
  },
16905
16924
  flatMap (... args)
16906
16925
  {
16907
- return this .map (...args) .flat ();
16926
+ return this .map (... args) .flat ();
16908
16927
  },
16909
16928
  [_fill] (value, start = 0, end = this .length)
16910
16929
  {
@@ -16915,7 +16934,7 @@ Object .assign (Object .setPrototypeOf (X3DTypedArrayField .prototype, Base_X3DA
16915
16934
  components = target .getComponents ();
16916
16935
 
16917
16936
  if (-length <= start && start < 0)
16918
- start = start + length;
16937
+ start += length;
16919
16938
 
16920
16939
  if (start < -length)
16921
16940
  start = 0;
@@ -16924,7 +16943,7 @@ Object .assign (Object .setPrototypeOf (X3DTypedArrayField .prototype, Base_X3DA
16924
16943
  return;
16925
16944
 
16926
16945
  if (-length <= end && end < 0)
16927
- end = end + length;
16946
+ end += length;
16928
16947
 
16929
16948
  if (end < -length)
16930
16949
  end = 0;
@@ -17306,17 +17325,6 @@ Object .assign (Object .setPrototypeOf (X3DTypedArrayField .prototype, Base_X3DA
17306
17325
  for (const key of Object .keys (X3DTypedArrayField .prototype))
17307
17326
  Object .defineProperty (X3DTypedArrayField .prototype, key, { enumerable: false });
17308
17327
 
17309
- Object .defineProperty (X3DTypedArrayField .prototype, "length",
17310
- {
17311
- get () { return this [_length]; },
17312
- set (value)
17313
- {
17314
- const target = this [X3DTypedArrayField_target];
17315
-
17316
- target .resize (value, target .getSingleValue ());
17317
- },
17318
- });
17319
-
17320
17328
  // Getter/Setter functions to reference a value for a given index.
17321
17329
 
17322
17330
  function createValue (target, index, components, valueType)
@@ -17387,7 +17395,6 @@ const X3DTypedArrayField_default_ = X3DTypedArrayField;
17387
17395
 
17388
17396
 
17389
17397
 
17390
-
17391
17398
 
17392
17399
  const
17393
17400
  { SFBool, SFDouble, SFFloat, SFInt32, SFString, SFTime } = Fields_SFScalar,
@@ -17616,7 +17623,7 @@ Object .assign (Object .setPrototypeOf (MFNode .prototype, Base_X3DObjectArrayFi
17616
17623
  for (const key of Object .keys (MFNode .prototype))
17617
17624
  Object .defineProperty (MFNode .prototype, key, { enumerable: false });
17618
17625
 
17619
- Base_X3DField .addStaticProperties (MFNode, "MFNode");
17626
+ Base_X3DArrayField .addStaticProperties (MFNode, "MFNode");
17620
17627
 
17621
17628
  function MFString (... args)
17622
17629
  {
@@ -17658,7 +17665,7 @@ Object .assign (Object .setPrototypeOf (MFString .prototype, Base_X3DObjectArray
17658
17665
  for (const key of Object .keys (MFString .prototype))
17659
17666
  Object .defineProperty (MFString .prototype, key, { enumerable: false });
17660
17667
 
17661
- Base_X3DField .addStaticProperties (MFString, "MFString");
17668
+ Base_X3DArrayField .addStaticProperties (MFString, "MFString");
17662
17669
 
17663
17670
  /**
17664
17671
  * MFImage
@@ -17680,7 +17687,7 @@ Object .assign (Object .setPrototypeOf (MFImage .prototype, Base_X3DObjectArrayF
17680
17687
  for (const key of Object .keys (MFImage .prototype))
17681
17688
  Object .defineProperty (MFImage .prototype, key, { enumerable: false });
17682
17689
 
17683
- Base_X3DField .addStaticProperties (MFImage, "MFImage");
17690
+ Base_X3DArrayField .addStaticProperties (MFImage, "MFImage");
17684
17691
 
17685
17692
  function TypedArrayTemplate (TypeName, SingleType, ValueType, ArrayType, Components, singleValue)
17686
17693
  {
@@ -17716,7 +17723,7 @@ function TypedArrayTemplate (TypeName, SingleType, ValueType, ArrayType, Compone
17716
17723
  for (const key of Object .keys (ArrayField .prototype))
17717
17724
  Object .defineProperty (ArrayField .prototype, key, { enumerable: false });
17718
17725
 
17719
- Base_X3DField .addStaticProperties (ArrayField, TypeName);
17726
+ Base_X3DArrayField .addStaticProperties (ArrayField, TypeName);
17720
17727
 
17721
17728
  return ArrayField;
17722
17729
  }
@@ -17737,7 +17744,7 @@ const ArrayFields =
17737
17744
  MFMatrix4d: TypedArrayTemplate ("MFMatrix4d", SFMatrix4d, SFMatrix4d, Float64Array, 16, Numbers_Matrix4 .IDENTITY),
17738
17745
  MFMatrix4f: TypedArrayTemplate ("MFMatrix4f", SFMatrix4f, SFMatrix4f, Float32Array, 16, Numbers_Matrix4 .IDENTITY),
17739
17746
  MFNode,
17740
- MFQuaternion: TypedArrayTemplate ("MFQuaternion", Fields_SFQuaternion, Fields_SFQuaternion, Float64Array, 4, Numbers_Quaternion .ZERO),
17747
+ MFQuaternion: TypedArrayTemplate ("MFQuaternion", Fields_SFQuaternion, Fields_SFQuaternion, Float64Array, 4),
17741
17748
  MFRotation: TypedArrayTemplate ("MFRotation", Fields_SFRotation, Fields_SFRotation, Float64Array, 4, Numbers_Rotation4 .IDENTITY),
17742
17749
  MFString,
17743
17750
  MFTime: TypedArrayTemplate ("MFTime", SFTime, Value, Float64Array, 1, -1),
@@ -18302,7 +18309,11 @@ Object .assign (Object .setPrototypeOf (X3DBaseNode .prototype, Base_X3DChildObj
18302
18309
 
18303
18310
  // Change function.
18304
18311
 
18305
- Object .defineProperty (this, "getLive", { value: getLive });
18312
+ Object .defineProperty (this, "getLive",
18313
+ {
18314
+ value: getLive,
18315
+ configurable: true,
18316
+ });
18306
18317
 
18307
18318
  // Add isLive event.
18308
18319
 
@@ -18387,6 +18398,7 @@ Object .assign (Object .setPrototypeOf (X3DBaseNode .prototype, Base_X3DChildObj
18387
18398
  {
18388
18399
  get () { return field; },
18389
18400
  set (value) { field .setValue (value); },
18401
+ configurable: true,
18390
18402
  });
18391
18403
  },
18392
18404
  getFieldDefinition (name)
@@ -18826,7 +18838,7 @@ const Legacy_default_ = Legacy;
18826
18838
 
18827
18839
  /* harmony default export */ const Browser_Legacy = (x_ite_Namespace .add ("Legacy", Legacy_default_));
18828
18840
  ;// ./src/x_ite/BROWSER_VERSION.js
18829
- const BROWSER_VERSION_default_ = "16.1.0";
18841
+ const BROWSER_VERSION_default_ = "16.1.2";
18830
18842
  ;
18831
18843
 
18832
18844
  /* harmony default export */ const BROWSER_VERSION = (x_ite_Namespace .add ("BROWSER_VERSION", BROWSER_VERSION_default_));
@@ -23937,51 +23949,67 @@ const NamedNodesArray_default_ = NamedNodesArray;
23937
23949
  const
23938
23950
  _importedName = Symbol (),
23939
23951
  _importedNode = Symbol (),
23940
- X3DImportedNodeProxy_type = Symbol ();
23952
+ X3DImportedNodeProxy_type = Symbol (),
23953
+ _functions = Symbol ();
23941
23954
 
23942
23955
  const X3DImportedNodeProxy_handler =
23943
23956
  {
23944
- get (target, key)
23957
+ get (target, key, receiver)
23945
23958
  {
23946
- if (key in target)
23947
- return target [key];
23959
+ if (Reflect .has (target, key))
23960
+ return Reflect .get (target, key, receiver);
23948
23961
 
23949
- const
23950
- node = target .getSharedNode (),
23951
- property = node ?.[key];
23962
+ const node = target .getSharedNode ();
23963
+
23964
+ if (node)
23965
+ {
23966
+ const property = Reflect .get (node, key, receiver);
23967
+
23968
+ if (typeof property === "function")
23969
+ {
23970
+ return target [_functions] .get (key) ?? (() =>
23971
+ {
23972
+ const func = property .bind (node);
23952
23973
 
23953
- if (typeof property === "function")
23954
- return property .bind (node);
23974
+ target [_functions] .set (key, func);
23955
23975
 
23956
- return property;
23976
+ return func;
23977
+ })();
23978
+ }
23979
+
23980
+ return property;
23981
+ }
23957
23982
  },
23958
- set (target, key, value)
23983
+ set (target, key, value, receiver)
23959
23984
  {
23960
- if (key in target)
23985
+ if (Reflect .has (target, key))
23961
23986
  {
23962
- target [key] = value;
23987
+ return Reflect .set (target, key, value, receiver);
23963
23988
  }
23964
23989
  else
23965
23990
  {
23966
23991
  const node = target .getSharedNode ();
23967
23992
 
23968
23993
  if (node)
23969
- node [key] = value;
23970
- }
23994
+ return Reflect .set (node, key, value, receiver);
23971
23995
 
23972
- return true;
23996
+ return false;
23997
+ }
23973
23998
  },
23974
23999
  has (target, key)
23975
24000
  {
23976
- return key in (target .getSharedNode () ?? { });
24001
+ return Reflect .has (target, key)
24002
+ || Reflect .has (target .getSharedNode () ?? { }, key);
23977
24003
  },
23978
24004
  ownKeys (target)
23979
24005
  {
23980
- return Object .keys (target .getSharedNode () ?? { });
24006
+ return Array .from (new Set (Reflect .ownKeys (target)
24007
+ .concat (Reflect .ownKeys (target .getSharedNode () ?? { }))));
23981
24008
  },
23982
24009
  getOwnPropertyDescriptor (target, key)
23983
24010
  {
23984
- return Object .getOwnPropertyDescriptor (target .getSharedNode () ?? { }, key);
24011
+ return Reflect .getOwnPropertyDescriptor (target, key)
24012
+ ?? Reflect .getOwnPropertyDescriptor (target .getSharedNode () ?? { }, key);
23985
24013
  },
23986
24014
  };
23987
24015
 
@@ -23993,6 +24021,7 @@ function X3DImportedNodeProxy (executionContext, importedName, type)
23993
24021
 
23994
24022
  this [_importedName] = importedName;
23995
24023
  this [X3DImportedNodeProxy_type] = type;
24024
+ this [_functions] = new Map ();
23996
24025
 
23997
24026
  this .setup ();
23998
24027
 
@@ -25987,7 +26016,7 @@ Object .assign (X3DParser .prototype,
25987
26016
  },
25988
26017
  sanitizeName (name = "")
25989
26018
  {
25990
- /* eslint-disable no-control-regex */
26019
+
25991
26020
 
25992
26021
  // NonIdFirstChar
25993
26022
  name = name .replace (/^[\x30-\x39\x00-\x20\x22\x23\x27\x2b\x2c\x2d\x2e\x5b\x5c\x5d\x7b\x7d\x7f]*/, "");
@@ -26003,7 +26032,7 @@ Object .assign (X3DParser .prototype,
26003
26032
 
26004
26033
  return name;
26005
26034
 
26006
- /* eslint-enable no-control-regex */
26035
+
26007
26036
  },
26008
26037
  renameExistingNode (name)
26009
26038
  {
@@ -26283,10 +26312,10 @@ const Grammar = Parser_Expressions ({
26283
26312
  Period: /\./y,
26284
26313
  Colon: /:/y,
26285
26314
 
26286
- /* eslint-disable no-control-regex */
26315
+ // eslint-disable-next-line no-control-regex
26287
26316
  Id: /[^\x30-\x39\x00-\x20\x22\x23\x27\x2b\x2c\x2d\x2e\x5b\x5c\x5d\x7b\x7d\x7f]{1}[^\x00-\x20\x22\x23\x27\x2c\x2e\x5b\x5c\x5d\x7b\x7d\x7f]*/y,
26317
+ // eslint-disable-next-line no-control-regex
26288
26318
  ComponentNameId: /[^\x30-\x39\x00-\x20\x22\x23\x27\x2b\x2c\x2d\x2e\x5b\x5c\x5d\x7b\x7d\x7f\x3a]{1}[^\x00-\x20\x22\x23\x27\x2c\x2e\x5b\x5c\x5d\x7b\x7d\x7f\x3a]*/y,
26289
- /* eslint-enable no-control-regex */
26290
26319
 
26291
26320
  initializeOnly: /initializeOnly/y,
26292
26321
  inputOnly: /inputOnly/y,
@@ -31138,7 +31167,7 @@ const Plane3_default_ = Plane3;
31138
31167
 
31139
31168
  /* harmony default export */ const Geometry_Plane3 = (x_ite_Namespace .add ("Plane3", Plane3_default_));
31140
31169
  ;// ./src/standard/Math/Geometry/Triangle3.js
31141
- /* provided dependency */ var libtess = __webpack_require__(246);
31170
+ /* provided dependency */ var libtess = __webpack_require__(457);
31142
31171
 
31143
31172
 
31144
31173
  const Triangle3 =
@@ -37511,7 +37540,7 @@ Object .assign (Object .setPrototypeOf (X3DSingleTextureNode .prototype, Texturi
37511
37540
  {
37512
37541
  return false;
37513
37542
  },
37514
- getRenderedTextures (renderedTextures)
37543
+ getRenderedTextures (/* renderedTextures */)
37515
37544
  { },
37516
37545
  loadImage (fileURL)
37517
37546
  {
@@ -42128,8 +42157,10 @@ function eventsProcessed ()
42128
42157
  {
42129
42158
  scene .addNamedNode (scene .getUniqueName (name), shapeNode);
42130
42159
 
42131
- if (shapeNode .getGeometry ?.() && !shapeNode .getGeometry () .getName ())
42132
- scene .addNamedNode (scene .getUniqueName (`${name}-Mesh-${i}`), shapeNode .getGeometry ());
42160
+ const geometryNode = shapeNode .getGeometry ?.();
42161
+
42162
+ if (geometryNode && !geometryNode .getName ())
42163
+ scene .addNamedNode (scene .getUniqueName (`${name}-Mesh-${i}`), geometryNode);
42133
42164
  }
42134
42165
  }
42135
42166
 
@@ -47836,7 +47867,7 @@ const Bezier_default_ = Bezier;
47836
47867
 
47837
47868
  /* harmony default export */ const Algorithms_Bezier = (x_ite_Namespace .add ("Bezier", Bezier_default_));
47838
47869
  ;// ./src/x_ite/Parser/SVGParser.js
47839
- /* provided dependency */ var SVGParser_libtess = __webpack_require__(246);
47870
+ /* provided dependency */ var SVGParser_libtess = __webpack_require__(457);
47840
47871
 
47841
47872
 
47842
47873
 
@@ -54535,7 +54566,7 @@ function X3DCoreContext (element)
54535
54566
  {
54536
54567
  const link = document .createElement ("link");
54537
54568
 
54538
- link .integrity = "sha384-FFe+A/LlgO2IEpOMp+dkCR3QO/mFR66blaOr+NTadcKHxnGzSm8EdCuwQ+HtDZHM";
54569
+ link .integrity = "sha384-FEmsQpL8R1dkzlxB19h2qi5U9Cuh8Zk2953YCudH0PTQSwiWiUovdIWVDBu3/YAc";
54539
54570
  link .rel = "stylesheet";
54540
54571
  link .crossOrigin = "anonymous";
54541
54572
  link .onload = resolve;
@@ -55558,11 +55589,8 @@ Object .assign (Object .setPrototypeOf (X3DComposedGeometryNode .prototype, Rend
55558
55589
  attribNodes [a] .addValue (index, attribArrays [a]);
55559
55590
 
55560
55591
  fogCoordNode ?.addDepth (index, fogDepthArray);
55561
-
55562
55592
  colorNode ?.addColor (colorPerVertex ? index : face, colorArray);
55563
-
55564
55593
  texCoordNode ?.addPoint (index, multiTexCoordArray);
55565
-
55566
55594
  tangentNode ?.addVector (normalPerVertex ? index : face, tangentArray);
55567
55595
  normalNode ?.addVector (normalPerVertex ? index : face, normalArray);
55568
55596
 
@@ -55737,26 +55765,6 @@ Object .assign (Object .setPrototypeOf (IndexedFaceSet .prototype, Rendering_X3D
55737
55765
  this ._set_normalIndex .addFieldInterest (this ._normalIndex);
55738
55766
  this ._set_coordIndex .addFieldInterest (this ._coordIndex);
55739
55767
  },
55740
- getTexCoordPerVertexIndex (index)
55741
- {
55742
- return this ._texCoordIndex [index] ?? this ._coordIndex [index];
55743
- },
55744
- getColorPerVertexIndex (index)
55745
- {
55746
- return this ._colorIndex [index] ?? this ._coordIndex [index];
55747
- },
55748
- getColorPerFaceIndex (index)
55749
- {
55750
- return this ._colorIndex [index] ?? index;
55751
- },
55752
- getNormalPerVertexIndex (index)
55753
- {
55754
- return this ._normalIndex [index] ?? this ._coordIndex [index];
55755
- },
55756
- getNormalPerFaceIndex (index)
55757
- {
55758
- return this ._normalIndex [index] ?? index;
55759
- },
55760
55768
  build ()
55761
55769
  {
55762
55770
  // Triangulate
@@ -55773,6 +55781,9 @@ Object .assign (Object .setPrototypeOf (IndexedFaceSet .prototype, Rendering_X3D
55773
55781
  const
55774
55782
  colorPerVertex = this ._colorPerVertex .getValue (),
55775
55783
  normalPerVertex = this ._normalPerVertex .getValue (),
55784
+ colorIndex = this ._colorIndex .shrinkToFit (),
55785
+ texCoordIndex = this ._texCoordIndex .shrinkToFit (),
55786
+ normalIndex = this ._normalIndex .shrinkToFit (),
55776
55787
  coordIndex = this ._coordIndex .getValue (),
55777
55788
  coordIndicesArray = this .getCoordIndices (),
55778
55789
  attribNodes = this .getAttrib (),
@@ -55805,13 +55816,10 @@ Object .assign (Object .setPrototypeOf (IndexedFaceSet .prototype, Rendering_X3D
55805
55816
  attribNodes [a] .addValue (index, attribArrays [a]);
55806
55817
 
55807
55818
  fogCoordNode ?.addDepth (index, fogDepthArray);
55808
-
55809
- colorNode ?.addColor (colorPerVertex ? this .getColorPerVertexIndex (i) : this .getColorPerFaceIndex (face), colorArray);
55810
-
55811
- texCoordNode ?.addPoint (this .getTexCoordPerVertexIndex (i), multiTexCoordArray);
55812
-
55813
- tangentNode ?.addVector (normalPerVertex ? this .getNormalPerVertexIndex (i) : this .getNormalPerFaceIndex (face), tangentArray);
55814
- normalNode ?.addVector (normalPerVertex ? this .getNormalPerVertexIndex (i) : this .getNormalPerFaceIndex (face), normalArray);
55819
+ colorNode ?.addColor (colorPerVertex ? (colorIndex [i] ?? index) : (colorIndex [face] ?? face), colorArray);
55820
+ texCoordNode ?.addPoint (texCoordIndex [i] ?? index, multiTexCoordArray);
55821
+ tangentNode ?.addVector (normalPerVertex ? (normalIndex [i] ?? index) : (normalIndex [face] ?? face), tangentArray);
55822
+ normalNode ?.addVector (normalPerVertex ? (normalIndex [i] ?? index) : (normalIndex [face] ?? face), normalArray);
55815
55823
 
55816
55824
  coordNode .addPoint (index, vertexArray);
55817
55825
  }
@@ -58997,14 +59005,6 @@ Object .assign (Object .setPrototypeOf (IndexedLineSet .prototype, Rendering_X3D
58997
59005
  this .set_normal__ ();
58998
59006
  this .set_coord__ ();
58999
59007
  },
59000
- getColorPerVertexIndex (index)
59001
- {
59002
- return this ._colorIndex [index] ?? this ._coordIndex [index];
59003
- },
59004
- getColorIndex (index)
59005
- {
59006
- return this ._colorIndex [index] ?? index;
59007
- },
59008
59008
  getPolylineIndices ()
59009
59009
  {
59010
59010
  const
@@ -59047,7 +59047,8 @@ Object .assign (Object .setPrototypeOf (IndexedLineSet .prototype, Rendering_X3D
59047
59047
  return;
59048
59048
 
59049
59049
  const
59050
- coordIndex = this ._coordIndex,
59050
+ colorIndex = this ._colorIndex .shrinkToFit (),
59051
+ coordIndex = this ._coordIndex .getValue (),
59051
59052
  polylines = this .getPolylineIndices (),
59052
59053
  colorPerVertex = this ._colorPerVertex .getValue (),
59053
59054
  coordIndicesArray = this .getCoordIndices (),
@@ -59093,9 +59094,7 @@ Object .assign (Object .setPrototypeOf (IndexedLineSet .prototype, Rendering_X3D
59093
59094
  attribNodes [a] .addValue (index, attribArrays [a]);
59094
59095
 
59095
59096
  fogCoordNode ?.addDepth (index, fogDepthArray);
59096
-
59097
- colorNode ?.addColor (colorPerVertex ? this .getColorPerVertexIndex (i) : this .getColorIndex (face), colorArray);
59098
-
59097
+ colorNode ?.addColor (colorPerVertex ? (colorIndex [i] ?? coordIndex [i]) : (colorIndex [face] ?? face), colorArray);
59099
59098
  tangentNode ?.addVector (index, tangentArray);
59100
59099
  normalNode ?.addVector (index, normalArray);
59101
59100
 
@@ -61106,7 +61105,7 @@ Object .assign (Object .setPrototypeOf (ExamineViewer .prototype, Navigation_X3D
61106
61105
  pixelPerRevolutionX = this .getViewport () [2] * 2,
61107
61106
  pixelPerRevolutionY = this .getViewport () [3] * 2,
61108
61107
  startRoll = Math .acos (Math_Algorithm .clamp (this .startOrientation .multVecRot (axis .assign (Numbers_Vector3 .Z_AXIS)) .dot (upVector), -1, 1)),
61109
- roll = Math .PI * 2 * +translation .y / pixelPerRevolutionY,
61108
+ roll = Math .PI * 2 * translation .y / pixelPerRevolutionY,
61110
61109
  clampedRoll = Math_Algorithm .clamp (startRoll + roll, CRITICAL_ANGLE, Math .PI - CRITICAL_ANGLE) - startRoll;
61111
61110
 
61112
61111
  // Adjust fromPointer y.
@@ -61704,7 +61703,8 @@ const
61704
61703
  PAN_SPEED_FACTOR = SPEED_FACTOR,
61705
61704
  PAN_SHIFT_SPEED_FACTOR = 1.4 * PAN_SPEED_FACTOR,
61706
61705
  ROLL_ANGLE = X3DFlyViewer_SLOW_SCROLL ? Math .PI / 512 : Math .PI / 32,
61707
- X3DFlyViewer_ROTATE_TIME = 0.3;
61706
+ X3DFlyViewer_ROTATE_TIME = 0.3,
61707
+ X3DFlyViewer_CRITICAL_ANGLE = 0.99;
61708
61708
 
61709
61709
  const
61710
61710
  MOVE = 0,
@@ -62215,7 +62215,8 @@ Object .assign (Object .setPrototypeOf (X3DFlyViewer .prototype, Navigation_X3DV
62215
62215
  {
62216
62216
  const
62217
62217
  userOrientation = new Numbers_Rotation4 (),
62218
- orientationOffset = new Numbers_Rotation4 ();
62218
+ orientationOffset = new Numbers_Rotation4 (),
62219
+ upVector = new Numbers_Vector3 ();
62219
62220
 
62220
62221
  return function (fromVector, toVector)
62221
62222
  {
@@ -62231,6 +62232,9 @@ Object .assign (Object .setPrototypeOf (X3DFlyViewer .prototype, Navigation_X3DV
62231
62232
  if (this .getStraightenHorizon ())
62232
62233
  viewpoint .straightenHorizon (userOrientation);
62233
62234
 
62235
+ if (Math .abs (viewpoint .getUpVector () .dot (userOrientation .multVecRot (upVector .set (0, 0, 1)))) > X3DFlyViewer_CRITICAL_ANGLE)
62236
+ return;
62237
+
62234
62238
  orientationOffset .assign (viewpoint .getOrientation ()) .inverse () .multRight (userOrientation);
62235
62239
 
62236
62240
  this .orientationChaser ._set_destination = orientationOffset;
@@ -62244,6 +62248,9 @@ Object .assign (Object .setPrototypeOf (X3DFlyViewer .prototype, Navigation_X3DV
62244
62248
  if (this .getStraightenHorizon ())
62245
62249
  viewpoint .straightenHorizon (userOrientation);
62246
62250
 
62251
+ if (Math .abs (viewpoint .getUpVector () .dot (userOrientation .multVecRot (upVector .set (0, 0, 1)))) > X3DFlyViewer_CRITICAL_ANGLE)
62252
+ return;
62253
+
62247
62254
  orientationOffset .assign (viewpoint .getOrientation ()) .inverse () .multRight (userOrientation);
62248
62255
 
62249
62256
  this .orientationChaser ._set_value = viewpoint ._orientationOffset;
@@ -77159,13 +77166,6 @@ Object .assign (Object .setPrototypeOf (ElevationGrid .prototype, Rendering_X3DG
77159
77166
  this .set_tangent__ ();
77160
77167
  this .set_normal__ ();
77161
77168
  },
77162
- getHeight (index)
77163
- {
77164
- if (index < this ._height .length)
77165
- return this ._height [index];
77166
-
77167
- return 0;
77168
- },
77169
77169
  createTexCoords ()
77170
77170
  {
77171
77171
  const
@@ -77261,15 +77261,14 @@ Object .assign (Object .setPrototypeOf (ElevationGrid .prototype, Rendering_X3DG
77261
77261
  xDimension = this ._xDimension .getValue (),
77262
77262
  zDimension = this ._zDimension .getValue (),
77263
77263
  xSpacing = this ._xSpacing .getValue (),
77264
- zSpacing = this ._zSpacing .getValue ();
77264
+ zSpacing = this ._zSpacing .getValue (),
77265
+ height = this ._height .shrinkToFit ();
77265
77266
 
77266
77267
  for (let z = 0; z < zDimension; ++ z)
77267
77268
  {
77268
77269
  for (let x = 0; x < xDimension; ++ x)
77269
77270
  {
77270
- points .push (new Numbers_Vector3 (xSpacing * x,
77271
- this .getHeight (x + z * xDimension),
77272
- zSpacing * z));
77271
+ points .push (new Numbers_Vector3 (xSpacing * x, height [x + z * xDimension] ?? 0, zSpacing * z));
77273
77272
  }
77274
77273
  }
77275
77274
 
@@ -77325,8 +77324,8 @@ Object .assign (Object .setPrototypeOf (ElevationGrid .prototype, Rendering_X3DG
77325
77324
  for (let p = 0; p < 6; ++ p, ++ c)
77326
77325
  {
77327
77326
  const
77328
- index = coordIndex [c],
77329
- { x, y, z} = points [index];
77327
+ index = coordIndex [c],
77328
+ { x, y, z } = points [index];
77330
77329
 
77331
77330
  coordIndicesArray .push (index);
77332
77331
 
@@ -77334,7 +77333,6 @@ Object .assign (Object .setPrototypeOf (ElevationGrid .prototype, Rendering_X3DG
77334
77333
  attribNodes [a] .addValue (index, attribArrays [a]);
77335
77334
 
77336
77335
  fogCoordNode ?.addDepth (index, fogDepthArray);
77337
-
77338
77336
  colorNode ?.addColor (colorPerVertex ? index : face, colorArray);
77339
77337
 
77340
77338
  if (texCoordNode)
@@ -79398,6 +79396,8 @@ Object .assign (Object .setPrototypeOf (TextureCoordinateGenerator .prototype, T
79398
79396
  ["SPHERE-REFLECT-LOCAL", TextureCoordinateGeneratorModeType .SPHERE_REFLECT_LOCAL],
79399
79397
  ]);
79400
79398
 
79399
+ modes .delete ("NONE");
79400
+
79401
79401
  return function ()
79402
79402
  {
79403
79403
  this .mode = modes .get (this ._mode .getValue ())
@@ -91249,8 +91249,8 @@ const PNGMedia_default_ = PNGMedia;
91249
91249
 
91250
91250
  /* harmony default export */ const Texturing_PNGMedia = (x_ite_Namespace .add ("PNGMedia", PNGMedia_default_));
91251
91251
  ;// ./src/x_ite/Components/Texturing/MovieTexture.js
91252
- /* provided dependency */ var SuperGif = __webpack_require__(548);
91253
- /* provided dependency */ var APNG = __webpack_require__(174);
91252
+ /* provided dependency */ var SuperGif = __webpack_require__(603);
91253
+ /* provided dependency */ var APNG = __webpack_require__(777);
91254
91254
 
91255
91255
 
91256
91256
 
@@ -91606,23 +91606,7 @@ Object .assign (Object .setPrototypeOf (MultiTexture .prototype, Texturing_X3DTe
91606
91606
  },
91607
91607
  getCount ()
91608
91608
  {
91609
- return Math .min (this .maxTextures, this .textureNodes .length);
91610
- },
91611
- getMode (index)
91612
- {
91613
- return this .modes [index] ?? Texturing_ModeType .MODULATE;
91614
- },
91615
- getAlphaMode (index)
91616
- {
91617
- return this .alphaModes [index] ?? Texturing_ModeType .MODULATE;
91618
- },
91619
- getSource (index)
91620
- {
91621
- return this .sources [index] ?? Texturing_SourceType .DEFAULT;
91622
- },
91623
- getFunction (index)
91624
- {
91625
- return this .functions [index] ?? Texturing_FunctionType .DEFAULT;
91609
+ return Math .min (this .textureNodes .length, this .maxTextures);
91626
91610
  },
91627
91611
  set_color__ ()
91628
91612
  {
@@ -91677,6 +91661,8 @@ Object .assign (Object .setPrototypeOf (MultiTexture .prototype, Texturing_X3DTe
91677
91661
  {
91678
91662
  const sourceTypes = new Map (Object .entries (Texturing_SourceType));
91679
91663
 
91664
+ sourceTypes .delete ("DEFAULT");
91665
+
91680
91666
  return function ()
91681
91667
  {
91682
91668
  this .sources .length = 0;
@@ -91693,6 +91679,8 @@ Object .assign (Object .setPrototypeOf (MultiTexture .prototype, Texturing_X3DTe
91693
91679
  ["ALPHAREPLICATE", Texturing_FunctionType .ALPHA_REPLICATE],
91694
91680
  ]);
91695
91681
 
91682
+ functionsTypes .delete ("DEFAULT");
91683
+
91696
91684
  return function ()
91697
91685
  {
91698
91686
  this .functions .length = 0;
@@ -91726,7 +91714,7 @@ Object .assign (Object .setPrototypeOf (MultiTexture .prototype, Texturing_X3DTe
91726
91714
  const
91727
91715
  maxTextures = this .maxTextures,
91728
91716
  textureNodes = this .textureNodes,
91729
- channels = Math .min (maxTextures, textureNodes .length);
91717
+ channels = Math .min (textureNodes .length, maxTextures);
91730
91718
 
91731
91719
  for (let i = 0; i < channels; ++ i)
91732
91720
  textureNodes [i] .updateTextureBits (textureBits, i);
@@ -91742,7 +91730,7 @@ Object .assign (Object .setPrototypeOf (MultiTexture .prototype, Texturing_X3DTe
91742
91730
  {
91743
91731
  const
91744
91732
  textureNodes = this .textureNodes,
91745
- channels = Math .min (this .maxTextures, textureNodes .length);
91733
+ channels = Math .min (textureNodes .length, this .maxTextures);
91746
91734
 
91747
91735
  for (let i = 0; i < channels; ++ i)
91748
91736
  textureNodes [i] .getShaderOptions (options, i);
@@ -91751,7 +91739,7 @@ Object .assign (Object .setPrototypeOf (MultiTexture .prototype, Texturing_X3DTe
91751
91739
  {
91752
91740
  const
91753
91741
  textureNodes = this .textureNodes,
91754
- channels = Math .min (this .maxTextures, textureNodes .length);
91742
+ channels = Math .min (textureNodes .length, this .maxTextures);
91755
91743
 
91756
91744
  gl .uniform4fv (shaderObject .x3d_MultiTextureColor, this .color);
91757
91745
 
@@ -91761,10 +91749,10 @@ Object .assign (Object .setPrototypeOf (MultiTexture .prototype, Texturing_X3DTe
91761
91749
 
91762
91750
  textureNodes [i] .setShaderUniforms (gl, shaderObject .x3d_Texture [i]);
91763
91751
 
91764
- gl .uniform1i (uniforms .mode, this .getMode (i));
91765
- gl .uniform1i (uniforms .alphaMode, this .getAlphaMode (i));
91766
- gl .uniform1i (uniforms .source, this .getSource (i));
91767
- gl .uniform1i (uniforms .function, this .getFunction (i));
91752
+ gl .uniform1i (uniforms .mode, this .modes [i] ?? Texturing_ModeType .MODULATE);
91753
+ gl .uniform1i (uniforms .alphaMode, this .alphaModes [i] ?? Texturing_ModeType .MODULATE);
91754
+ gl .uniform1i (uniforms .source, this .sources [i] ?? Texturing_SourceType .DEFAULT);
91755
+ gl .uniform1i (uniforms .function, this .functions [i] ?? Texturing_FunctionType .DEFAULT);
91768
91756
  }
91769
91757
  },
91770
91758
  });
@@ -93900,7 +93888,7 @@ const QuickSort_default_ = QuickSort;
93900
93888
 
93901
93889
  /* harmony default export */ const Algorithms_QuickSort = (x_ite_Namespace .add ("QuickSort", QuickSort_default_));
93902
93890
  ;// ./src/lib/libtess.js
93903
- /* provided dependency */ var libtess_libtess = __webpack_require__(246);
93891
+ /* provided dependency */ var libtess_libtess = __webpack_require__(457);
93904
93892
  const libtess_default_ = libtess_libtess;
93905
93893
  ;
93906
93894