x_ite 9.5.0 → 9.5.1

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 (49) hide show
  1. package/README.md +1 -1
  2. package/dist/assets/components/Annotation.js +13 -13
  3. package/dist/assets/components/Annotation.min.js +1 -1
  4. package/dist/assets/components/CADGeometry.js +14 -14
  5. package/dist/assets/components/CADGeometry.min.js +1 -1
  6. package/dist/assets/components/CubeMapTexturing.js +25 -25
  7. package/dist/assets/components/CubeMapTexturing.min.js +1 -1
  8. package/dist/assets/components/DIS.js +13 -13
  9. package/dist/assets/components/DIS.min.js +1 -1
  10. package/dist/assets/components/EventUtilities.js +9 -9
  11. package/dist/assets/components/EventUtilities.min.js +1 -1
  12. package/dist/assets/components/Geometry2D.js +18 -18
  13. package/dist/assets/components/Geometry2D.min.js +1 -1
  14. package/dist/assets/components/Geospatial.js +33 -33
  15. package/dist/assets/components/Geospatial.min.js +1 -1
  16. package/dist/assets/components/HAnim.js +32 -34
  17. package/dist/assets/components/HAnim.min.js +1 -1
  18. package/dist/assets/components/KeyDeviceSensor.js +9 -9
  19. package/dist/assets/components/KeyDeviceSensor.min.js +1 -1
  20. package/dist/assets/components/Layout.js +28 -28
  21. package/dist/assets/components/Layout.min.js +1 -1
  22. package/dist/assets/components/NURBS.js +25 -27
  23. package/dist/assets/components/NURBS.min.js +1 -1
  24. package/dist/assets/components/ParticleSystems.js +101 -66
  25. package/dist/assets/components/ParticleSystems.min.js +1 -1
  26. package/dist/assets/components/Picking.js +20 -22
  27. package/dist/assets/components/Picking.min.js +1 -1
  28. package/dist/assets/components/RigidBodyPhysics.js +19 -21
  29. package/dist/assets/components/RigidBodyPhysics.min.js +1 -1
  30. package/dist/assets/components/Scripting.js +38 -38
  31. package/dist/assets/components/Scripting.min.js +1 -1
  32. package/dist/assets/components/Text.js +24 -24
  33. package/dist/assets/components/Text.min.js +1 -1
  34. package/dist/assets/components/TextureProjection.js +15 -15
  35. package/dist/assets/components/TextureProjection.min.js +1 -1
  36. package/dist/assets/components/Texturing3D.js +40 -36
  37. package/dist/assets/components/Texturing3D.min.js +1 -1
  38. package/dist/assets/components/VolumeRendering.js +19 -19
  39. package/dist/assets/components/VolumeRendering.min.js +1 -1
  40. package/dist/assets/components/X_ITE.js +97 -44
  41. package/dist/assets/components/X_ITE.min.js +1 -1
  42. package/dist/x_ite.css +1 -1
  43. package/dist/x_ite.d.ts +1 -1
  44. package/dist/x_ite.js +862 -653
  45. package/dist/x_ite.min.js +1 -1
  46. package/dist/x_ite.min.mjs +1 -1
  47. package/dist/x_ite.mjs +862 -653
  48. package/dist/x_ite.zip +0 -0
  49. package/package.json +2 -2
package/dist/x_ite.js CHANGED
@@ -1,4 +1,4 @@
1
- /* X_ITE v9.5.0 */(function webpackUniversalModuleDefinition(root, factory) {
1
+ /* X_ITE v9.5.1 */(function webpackUniversalModuleDefinition(root, factory) {
2
2
  if(typeof exports === 'object' && typeof module === 'object')
3
3
  module.exports = factory();
4
4
  else if(typeof define === 'function' && define.amd)
@@ -11,10 +11,10 @@
11
11
  return /******/ (() => { // webpackBootstrap
12
12
  /******/ var __webpack_modules__ = ({
13
13
 
14
- /***/ 543:
14
+ /***/ 668:
15
15
  /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
16
16
 
17
- /* provided dependency */ var jQuery = __webpack_require__(275);
17
+ /* provided dependency */ var jQuery = __webpack_require__(432);
18
18
  /**
19
19
  * @preserve jquery.fullscreen 1.1.5
20
20
  * https://github.com/code-lts/jquery-fullscreen-plugin
@@ -210,7 +210,7 @@ installFullScreenHandlers();
210
210
 
211
211
  /***/ }),
212
212
 
213
- /***/ 419:
213
+ /***/ 254:
214
214
  /***/ ((module, exports, __webpack_require__) => {
215
215
 
216
216
  var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
@@ -224,7 +224,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
224
224
  (function (factory) {
225
225
  if ( true ) {
226
226
  // AMD. Register as an anonymous module.
227
- !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(275)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
227
+ !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(432)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
228
228
  __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
229
229
  (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
230
230
  __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
@@ -435,7 +435,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
435
435
 
436
436
  /***/ }),
437
437
 
438
- /***/ 275:
438
+ /***/ 432:
439
439
  /***/ (function(module, exports) {
440
440
 
441
441
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
@@ -11159,7 +11159,7 @@ return jQuery;
11159
11159
 
11160
11160
  /***/ }),
11161
11161
 
11162
- /***/ 224:
11162
+ /***/ 509:
11163
11163
  /***/ ((module) => {
11164
11164
 
11165
11165
  /**
@@ -15938,7 +15938,7 @@ if (true) {
15938
15938
 
15939
15939
  /***/ }),
15940
15940
 
15941
- /***/ 35:
15941
+ /***/ 892:
15942
15942
  /***/ (function(__unused_webpack_module, exports) {
15943
15943
 
15944
15944
 
@@ -19183,7 +19183,7 @@ if (true) {
19183
19183
 
19184
19184
  /***/ }),
19185
19185
 
19186
- /***/ 964:
19186
+ /***/ 467:
19187
19187
  /***/ (function(module, exports) {
19188
19188
 
19189
19189
  var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*
@@ -20311,7 +20311,7 @@ Object .defineProperty (Namespace, "add",
20311
20311
  }
20312
20312
  else
20313
20313
  {
20314
- const X3D = window [Symbol .for ("X_ITE.X3D-9.5.0")];
20314
+ const X3D = window [Symbol .for ("X_ITE.X3D-9.5.1")];
20315
20315
 
20316
20316
  if (X3D)
20317
20317
  X3D [name] = module;
@@ -24570,15 +24570,15 @@ function SFMatrixPrototypeTemplate (Constructor, TypeName, Matrix, double)
24570
24570
 
24571
24571
  return function (translation, rotation, scale, scaleOrientation, center)
24572
24572
  {
24573
- args .push (translation ?.getValue () ?? null,
24574
- rotation ?.getValue () ?? null,
24575
- scale ?.getValue () ?? null,
24576
- scaleOrientation ?.getValue () ?? null,
24577
- center ?.getValue () ?? null);
24573
+ args .push (translation ?.getValue (),
24574
+ rotation ?.getValue (),
24575
+ scale ?.getValue (),
24576
+ scaleOrientation ?.getValue (),
24577
+ center ?.getValue ());
24578
24578
 
24579
24579
  for (let i = args .length - 1; i > -1; -- i)
24580
24580
  {
24581
- if (args [i] !== null)
24581
+ if (args [i])
24582
24582
  break;
24583
24583
 
24584
24584
  args .pop ();
@@ -24595,15 +24595,15 @@ function SFMatrixPrototypeTemplate (Constructor, TypeName, Matrix, double)
24595
24595
 
24596
24596
  return function (translation, rotation, scale, scaleOrientation, center)
24597
24597
  {
24598
- args .push (translation ?.getValue () ?? null,
24599
- rotation ?.getValue () ?? null,
24600
- scale ?.getValue () ?? null,
24601
- scaleOrientation ?.getValue () ?? null,
24602
- center ?.getValue () ?? null);
24598
+ args .push (translation ?.getValue (),
24599
+ rotation ?.getValue (),
24600
+ scale ?.getValue (),
24601
+ scaleOrientation ?.getValue (),
24602
+ center ?.getValue ());
24603
24603
 
24604
24604
  for (let i = args .length - 1; i > -1; -- i)
24605
24605
  {
24606
- if (args [i] !== null)
24606
+ if (args [i])
24607
24607
  break;
24608
24608
 
24609
24609
  args .pop ();
@@ -25855,110 +25855,90 @@ Object .assign (Matrix3 .prototype,
25855
25855
 
25856
25856
  return function (translation, rotation, scale, scaleOrientation, center)
25857
25857
  {
25858
+ this .identity ();
25859
+
25858
25860
  switch (arguments .length)
25859
25861
  {
25860
- case 0:
25861
- {
25862
- this .identity ();
25863
- break;
25864
- }
25865
25862
  case 1:
25866
25863
  {
25867
- if (translation === null) translation = Numbers_Vector2 .Zero;
25864
+ if (translation)
25865
+ this .translate (translation);
25868
25866
 
25869
- this .identity ();
25870
- this .translate (translation);
25871
25867
  break;
25872
25868
  }
25873
25869
  case 2:
25874
25870
  {
25875
- if (translation === null) translation = Numbers_Vector2 .Zero;
25876
- if (rotation === null) rotation = 0;
25877
-
25878
- this .identity ();
25879
- this .translate (translation);
25871
+ if (translation)
25872
+ this .translate (translation);
25880
25873
 
25881
- if (rotation !== 0)
25874
+ if (rotation)
25882
25875
  this .rotate (rotation);
25883
25876
 
25884
25877
  break;
25885
25878
  }
25886
25879
  case 3:
25887
25880
  {
25888
- if (translation === null) translation = Numbers_Vector2 .Zero;
25889
- if (rotation === null) rotation = 0;
25890
- if (scale === null) scale = Numbers_Vector2 .One;
25881
+ if (translation)
25882
+ this .translate (translation);
25891
25883
 
25892
- this .identity ();
25893
- this .translate (translation);
25894
-
25895
- if (rotation !== 0)
25884
+ if (rotation)
25896
25885
  this .rotate (rotation);
25897
25886
 
25898
- if (! scale .equals (Numbers_Vector2 .One))
25887
+ if (scale && !scale .equals (Numbers_Vector2 .One))
25899
25888
  this .scale (scale);
25900
25889
 
25901
25890
  break;
25902
25891
  }
25903
25892
  case 4:
25904
25893
  {
25905
- if (translation === null) translation = Numbers_Vector2 .Zero;
25906
- if (rotation === null) rotation = 0;
25907
- if (scale === null) scale = Numbers_Vector2 .One;
25908
- if (scaleOrientation === null) scaleOrientation = 0;
25909
-
25910
- this .identity ();
25911
- this .translate (translation);
25894
+ if (translation)
25895
+ this .translate (translation);
25912
25896
 
25913
- if (rotation !== 0)
25897
+ if (rotation)
25914
25898
  this .rotate (rotation);
25915
25899
 
25916
- if (! scale .equals (Numbers_Vector2 .One))
25900
+ if (scale && !scale .equals (Numbers_Vector2 .One))
25917
25901
  {
25918
- const hasScaleOrientation = scaleOrientation !== 0;
25919
-
25920
- if (hasScaleOrientation)
25902
+ if (scaleOrientation)
25921
25903
  {
25922
25904
  this .rotate (scaleOrientation);
25923
25905
  this .scale (scale);
25924
25906
  this .rotate (-scaleOrientation);
25925
25907
  }
25926
25908
  else
25909
+ {
25927
25910
  this .scale (scale);
25911
+ }
25928
25912
  }
25929
25913
 
25930
25914
  break;
25931
25915
  }
25932
25916
  case 5:
25933
25917
  {
25934
- if (translation === null) translation = Numbers_Vector2 .Zero;
25935
- if (rotation === null) rotation = 0;
25936
- if (scale === null) scale = Numbers_Vector2 .One;
25937
- if (scaleOrientation === null) scaleOrientation = 0;
25938
- if (center === null) center = Numbers_Vector2 .Zero;
25939
-
25940
25918
  // P' = T * C * R * SR * S * -SR * -C * P
25941
- this .identity ();
25942
- this .translate (translation);
25919
+ if (translation)
25920
+ this .translate (translation);
25943
25921
 
25944
- const hasCenter = ! center .equals (Numbers_Vector2 .Zero);
25922
+ const hasCenter = center && !center .equals (Numbers_Vector2 .Zero);
25945
25923
 
25946
25924
  if (hasCenter)
25947
25925
  this .translate (center);
25948
25926
 
25949
- if (rotation !== 0)
25927
+ if (rotation)
25950
25928
  this .rotate (rotation);
25951
25929
 
25952
- if (! scale .equals (Numbers_Vector2 .One))
25930
+ if (scale && !scale .equals (Numbers_Vector2 .One))
25953
25931
  {
25954
- if (scaleOrientation !== 0)
25932
+ if (scaleOrientation)
25955
25933
  {
25956
25934
  this .rotate (scaleOrientation);
25957
25935
  this .scale (scale);
25958
25936
  this .rotate (-scaleOrientation);
25959
25937
  }
25960
25938
  else
25939
+ {
25961
25940
  this .scale (scale);
25941
+ }
25962
25942
  }
25963
25943
 
25964
25944
  if (hasCenter)
@@ -25980,24 +25960,10 @@ Object .assign (Matrix3 .prototype,
25980
25960
  })(),
25981
25961
  get: (() =>
25982
25962
  {
25983
- const
25984
- dummyTranslation = new Numbers_Vector2 (),
25985
- dummyRotation = new Numbers_Vector3 (),
25986
- dummyScale = new Numbers_Vector2 (),
25987
- dummyScaleOrientation = new Numbers_Vector3 (),
25988
- dummyCenter = new Numbers_Vector2 (),
25989
- rotMatrix = new Numbers_Matrix2 (),
25990
- soMatrix = new Numbers_Matrix2 (),
25991
- c = new Numbers_Vector2 ();
25963
+ const c = new Numbers_Vector2 ();
25992
25964
 
25993
25965
  return function (translation, rotation, scale, scaleOrientation, center)
25994
25966
  {
25995
- if (translation === null) translation = dummyTranslation;
25996
- if (rotation === null) rotation = dummyRotation;
25997
- if (scale === null) scale = dummyScale;
25998
- if (scaleOrientation === null) scaleOrientation = dummyScaleOrientation;
25999
- if (center === null) center = dummyCenter;
26000
-
26001
25967
  switch (arguments .length)
26002
25968
  {
26003
25969
  case 1:
@@ -26006,42 +25972,26 @@ Object .assign (Matrix3 .prototype,
26006
25972
  break;
26007
25973
  }
26008
25974
  case 2:
26009
- {
26010
- this .factor (translation, rotMatrix, dummyScale, soMatrix);
26011
-
26012
- rotation [0] = rotMatrix [0];
26013
- rotation [1] = rotMatrix [1];
26014
- rotation [2] = Math .atan2 (rotMatrix [1], rotMatrix [0]);
26015
- break;
26016
- }
26017
25975
  case 3:
26018
- {
26019
- this .factor (translation, rotMatrix, scale, soMatrix);
26020
-
26021
- rotation [0] = rotMatrix [0];
26022
- rotation [1] = rotMatrix [1];
26023
- rotation [2] = Math .atan2 (rotMatrix [1], rotMatrix [0]);
26024
- break;
26025
- }
26026
25976
  case 4:
26027
25977
  {
26028
- this .factor (translation, rotMatrix, scale, soMatrix);
26029
-
26030
- rotation [0] = rotMatrix [0];
26031
- rotation [1] = rotMatrix [1];
26032
- rotation [2] = Math .atan2 (rotMatrix [1], rotMatrix [0]);
26033
-
26034
- scaleOrientation [0] = soMatrix [0];
26035
- scaleOrientation [1] = soMatrix [1];
26036
- scaleOrientation [2] = Math .atan2 (soMatrix [1], soMatrix [0]);
25978
+ this .factor (translation, rotation, scale, scaleOrientation);
26037
25979
  break;
26038
25980
  }
26039
25981
  case 5:
26040
25982
  {
26041
- m .set (c .assign (center) .negate ());
26042
- m .multLeft (this);
26043
- m .translate (center);
26044
- m .get (translation, rotation, scale, scaleOrientation);
25983
+ if (center)
25984
+ {
25985
+ m .set (c .assign (center) .negate ());
25986
+ m .multLeft (this);
25987
+ m .translate (center);
25988
+ m .get (translation, rotation, scale, scaleOrientation);
25989
+ }
25990
+ else
25991
+ {
25992
+ this .factor (translation, rotation, scale, scaleOrientation);
25993
+ }
25994
+
26045
25995
  break;
26046
25996
  }
26047
25997
  }
@@ -26050,8 +26000,9 @@ Object .assign (Matrix3 .prototype,
26050
26000
  factor: (() =>
26051
26001
  {
26052
26002
  const
26003
+ s = new Numbers_Vector2 (),
26053
26004
  si = new Numbers_Matrix2 (),
26054
- u = new Numbers_Matrix2 (),
26005
+ so = new Numbers_Matrix2 (),
26055
26006
  b = new Numbers_Matrix2 ();
26056
26007
 
26057
26008
  const eigen = { values: [ ], vectors: [[ ], [ ]] };
@@ -26059,7 +26010,7 @@ Object .assign (Matrix3 .prototype,
26059
26010
  return function (translation, rotation, scale, scaleOrientation)
26060
26011
  {
26061
26012
  // (1) Get translation.
26062
- translation .set (this [6], this [7]);
26013
+ translation ?.set (this [6], this [7]);
26063
26014
 
26064
26015
  // (2) Create 3x3 matrix.
26065
26016
  const a = this .submatrix;
@@ -26074,19 +26025,35 @@ Object .assign (Matrix3 .prototype,
26074
26025
 
26075
26026
  // Find min / max eigenvalues and do ratio test to determine singularity.
26076
26027
 
26077
- scaleOrientation .set (e .vectors [0] [0], e .vectors [1] [0],
26078
- e .vectors [0] [1], e .vectors [1] [1]);
26028
+ so .set (e .vectors [0] [0], e .vectors [1] [0],
26029
+ e .vectors [0] [1], e .vectors [1] [1]);
26079
26030
 
26080
- // Compute s = sqrt(evalues), with sign. Set si = s-inverse
26031
+ if (scaleOrientation)
26032
+ {
26033
+ scaleOrientation [0] = so [0];
26034
+ scaleOrientation [1] = so [1];
26035
+ scaleOrientation [2] = Math .atan2 (so [1], so [0]);
26036
+ }
26037
+
26038
+ // Compute s = sqrt(eigen values), with sign. Set si = s-inverse
26039
+
26040
+ s .set (det_sign * Math .sqrt (e .values [0]),
26041
+ det_sign * Math .sqrt (e .values [1]));
26081
26042
 
26082
- scale .x = det_sign * Math .sqrt (e .values [0]);
26083
- scale .y = det_sign * Math .sqrt (e .values [1]);
26043
+ scale ?.assign (s);
26084
26044
 
26085
- si [0] = 1 / scale .x;
26086
- si [3] = 1 / scale .y;
26045
+ if (rotation)
26046
+ {
26047
+ si [0] = 1 / s .x;
26048
+ si [3] = 1 / s .y;
26049
+
26050
+ // (5) Compute U = !R ~S R A.
26051
+ a .multLeft (so) .multLeft (si) .multLeft (so .transpose ());
26087
26052
 
26088
- // (5) Compute U = !R ~S R A.
26089
- rotation .assign (u .assign (scaleOrientation) .transpose () .multRight (si) .multRight (scaleOrientation) .multRight (a));
26053
+ rotation [0] = a [0];
26054
+ rotation [1] = a [1];
26055
+ rotation [2] = Math .atan2 (a [1], a [0]);
26056
+ }
26090
26057
  };
26091
26058
  })(),
26092
26059
  determinant2 ()
@@ -26518,15 +26485,11 @@ function SFMatrix3Template (TypeName, double)
26518
26485
 
26519
26486
  return function (translation, rotation, scale, scaleOrientation, center)
26520
26487
  {
26521
- args .push (translation ?.getValue () ?? null,
26522
- rotation ?? null,
26523
- scale ?.getValue () ?? null,
26524
- scaleOrientation ?? null,
26525
- center ?.getValue () ?? null);
26488
+ args .push (translation ?.getValue (), rotation, scale ?.getValue (), scaleOrientation, center ?.getValue ());
26526
26489
 
26527
26490
  for (let i = args .length - 1; i > -1; -- i)
26528
26491
  {
26529
- if (args [i] !== null)
26492
+ if (args [i])
26530
26493
  break;
26531
26494
 
26532
26495
  args .pop ();
@@ -28215,110 +28178,90 @@ Object .assign (Matrix4_Matrix4 .prototype,
28215
28178
 
28216
28179
  return function (translation, rotation, scale, scaleOrientation, center)
28217
28180
  {
28181
+ this .identity ();
28182
+
28218
28183
  switch (arguments .length)
28219
28184
  {
28220
- case 0:
28221
- {
28222
- this .identity ();
28223
- break;
28224
- }
28225
28185
  case 1:
28226
28186
  {
28227
- if (translation === null) translation = Numbers_Vector3 .Zero;
28187
+ if (translation)
28188
+ this .translate (translation);
28228
28189
 
28229
- this .identity ();
28230
- this .translate (translation);
28231
28190
  break;
28232
28191
  }
28233
28192
  case 2:
28234
28193
  {
28235
- if (translation === null) translation = Numbers_Vector3 .Zero;
28236
- if (rotation === null) rotation = Numbers_Rotation4 .Identity;
28194
+ if (translation)
28195
+ this .translate (translation);
28237
28196
 
28238
- this .identity ();
28239
- this .translate (translation);
28240
-
28241
- if (! rotation .equals (Numbers_Rotation4 .Identity))
28197
+ if (rotation && !rotation .equals (Numbers_Rotation4 .Identity))
28242
28198
  this .rotate (rotation);
28243
28199
 
28244
28200
  break;
28245
28201
  }
28246
28202
  case 3:
28247
28203
  {
28248
- if (translation === null) translation = Numbers_Vector3 .Zero;
28249
- if (rotation === null) rotation = Numbers_Rotation4 .Identity;
28250
- if (scale === null) scale = Numbers_Vector3 .One;
28251
-
28252
- this .identity ();
28253
- this .translate (translation);
28204
+ if (translation)
28205
+ this .translate (translation);
28254
28206
 
28255
- if (! rotation .equals (Numbers_Rotation4 .Identity))
28207
+ if (rotation && !rotation .equals (Numbers_Rotation4 .Identity))
28256
28208
  this .rotate (rotation);
28257
28209
 
28258
- if (! scale .equals (Numbers_Vector3 .One))
28259
- this .scale (scale);
28210
+ if (scale && !scale .equals (Numbers_Vector3 .One))
28211
+ this .scale (scale);
28260
28212
 
28261
28213
  break;
28262
28214
  }
28263
28215
  case 4:
28264
28216
  {
28265
- if (translation === null) translation = Numbers_Vector3 .Zero;
28266
- if (rotation === null) rotation = Numbers_Rotation4 .Identity;
28267
- if (scale === null) scale = Numbers_Vector3 .One;
28268
- if (scaleOrientation === null) scaleOrientation = Numbers_Rotation4 .Identity;
28269
-
28270
- this .identity ();
28271
- this .translate (translation);
28217
+ if (translation)
28218
+ this .translate (translation);
28272
28219
 
28273
- if (! rotation .equals (Numbers_Rotation4 .Identity))
28220
+ if (rotation && !rotation .equals (Numbers_Rotation4 .Identity))
28274
28221
  this .rotate (rotation);
28275
28222
 
28276
- if (! scale .equals (Numbers_Vector3 .One))
28223
+ if (scale && !scale .equals (Numbers_Vector3 .One))
28277
28224
  {
28278
- const hasScaleOrientation = ! scaleOrientation .equals (Numbers_Rotation4 .Identity);
28279
-
28280
- if (hasScaleOrientation)
28225
+ if (scaleOrientation && !scaleOrientation .equals (Numbers_Rotation4 .Identity))
28281
28226
  {
28282
28227
  this .rotate (scaleOrientation);
28283
28228
  this .scale (scale);
28284
28229
  this .rotate (invScaleOrientation .assign (scaleOrientation) .inverse ());
28285
28230
  }
28286
28231
  else
28232
+ {
28287
28233
  this .scale (scale);
28234
+ }
28288
28235
  }
28289
28236
 
28290
28237
  break;
28291
28238
  }
28292
28239
  case 5:
28293
28240
  {
28294
- if (translation === null) translation = Numbers_Vector3 .Zero;
28295
- if (rotation === null) rotation = Numbers_Rotation4 .Identity;
28296
- if (scale === null) scale = Numbers_Vector3 .One;
28297
- if (scaleOrientation === null) scaleOrientation = Numbers_Rotation4 .Identity;
28298
- if (center === null) center = Numbers_Vector3 .Zero;
28299
-
28300
28241
  // P' = T * C * R * SR * S * -SR * -C * P
28301
- this .identity ();
28302
- this .translate (translation);
28242
+ if (translation)
28243
+ this .translate (translation);
28303
28244
 
28304
- const hasCenter = ! center .equals (Numbers_Vector3 .Zero);
28245
+ const hasCenter = center && !center .equals (Numbers_Vector3 .Zero);
28305
28246
 
28306
28247
  if (hasCenter)
28307
28248
  this .translate (center);
28308
28249
 
28309
- if (! rotation .equals (Numbers_Rotation4 .Identity))
28250
+ if (rotation && !rotation .equals (Numbers_Rotation4 .Identity))
28310
28251
  this .rotate (rotation);
28311
28252
 
28312
- if (! scale .equals (Numbers_Vector3 .One))
28253
+ if (scale && !scale .equals (Numbers_Vector3 .One))
28313
28254
  {
28314
- if (! scaleOrientation .equals (Numbers_Rotation4 .Identity))
28255
+ if (scaleOrientation && !scaleOrientation .equals (Numbers_Rotation4 .Identity))
28315
28256
  {
28316
28257
  this .rotate (scaleOrientation);
28317
28258
  this .scale (scale);
28318
28259
  this .rotate (invScaleOrientation .assign (scaleOrientation) .inverse ());
28319
28260
  }
28320
28261
  else
28262
+ {
28321
28263
  this .scale (scale);
28264
+ }
28322
28265
  }
28323
28266
 
28324
28267
  if (hasCenter)
@@ -28340,24 +28283,10 @@ Object .assign (Matrix4_Matrix4 .prototype,
28340
28283
  })(),
28341
28284
  get: (() =>
28342
28285
  {
28343
- const
28344
- dummyTranslation = new Numbers_Vector3 (),
28345
- dummyRotation = new Numbers_Rotation4 (),
28346
- dummyScale = new Numbers_Vector3 (),
28347
- dummyScaleOrientation = new Numbers_Rotation4 (),
28348
- dummyCenter = new Numbers_Vector3 (),
28349
- rot = new Numbers_Matrix3 (),
28350
- so = new Numbers_Matrix3 (),
28351
- c = new Numbers_Vector3 ();
28286
+ const c = new Numbers_Vector3 ();
28352
28287
 
28353
28288
  return function (translation, rotation, scale, scaleOrientation, center)
28354
28289
  {
28355
- if (translation === null) translation = dummyTranslation;
28356
- if (rotation === null) rotation = dummyRotation;
28357
- if (scale === null) scale = dummyScale;
28358
- if (scaleOrientation === null) scaleOrientation = dummyScaleOrientation;
28359
- if (center === null) center = dummyCenter;
28360
-
28361
28290
  switch (arguments .length)
28362
28291
  {
28363
28292
  case 1:
@@ -28366,30 +28295,26 @@ Object .assign (Matrix4_Matrix4 .prototype,
28366
28295
  break;
28367
28296
  }
28368
28297
  case 2:
28369
- {
28370
- this .factor (translation, rot, dummyScale, so);
28371
- rotation .setMatrix (rot);
28372
- break;
28373
- }
28374
28298
  case 3:
28375
- {
28376
- this .factor (translation, rot, scale, so);
28377
- rotation .setMatrix (rot);
28378
- break;
28379
- }
28380
28299
  case 4:
28381
28300
  {
28382
- this .factor (translation, rot, scale, so);
28383
- rotation .setMatrix (rot);
28384
- scaleOrientation .setMatrix (so);
28301
+ this .factor (translation, rotation, scale, scaleOrientation);
28385
28302
  break;
28386
28303
  }
28387
28304
  case 5:
28388
28305
  {
28389
- Matrix4_m .set (c .assign (center) .negate ());
28390
- Matrix4_m .multLeft (this);
28391
- Matrix4_m .translate (center);
28392
- Matrix4_m .get (translation, rotation, scale, scaleOrientation);
28306
+ if (center)
28307
+ {
28308
+ Matrix4_m .set (c .assign (center) .negate ());
28309
+ Matrix4_m .multLeft (this);
28310
+ Matrix4_m .translate (center);
28311
+ Matrix4_m .get (translation, rotation, scale, scaleOrientation);
28312
+ }
28313
+ else
28314
+ {
28315
+ this .factor (translation, rotation, scale, scaleOrientation);
28316
+ }
28317
+
28393
28318
  break;
28394
28319
  }
28395
28320
  }
@@ -28435,8 +28360,9 @@ Object .assign (Matrix4_Matrix4 .prototype,
28435
28360
  factor: (() =>
28436
28361
  {
28437
28362
  const
28363
+ s = new Numbers_Vector3 (),
28438
28364
  si = new Numbers_Matrix3 (),
28439
- u = new Numbers_Matrix3 (),
28365
+ so = new Numbers_Matrix3 (),
28440
28366
  b = new Numbers_Matrix3 ();
28441
28367
 
28442
28368
  const eigen = { values: [ ], vectors: [[ ], [ ], [ ]] };
@@ -28444,7 +28370,7 @@ Object .assign (Matrix4_Matrix4 .prototype,
28444
28370
  return function (translation, rotation, scale, scaleOrientation)
28445
28371
  {
28446
28372
  // (1) Get translation.
28447
- translation .set (this [12], this [13], this [14]);
28373
+ translation ?.set (this [12], this [13], this [14]);
28448
28374
 
28449
28375
  // (2) Create 3x3 matrix.
28450
28376
  const a = this .submatrix;
@@ -28459,22 +28385,29 @@ Object .assign (Matrix4_Matrix4 .prototype,
28459
28385
 
28460
28386
  // Find min / max eigenvalues and do ratio test to determine singularity.
28461
28387
 
28462
- scaleOrientation .set (e .vectors [0] [0], e .vectors [1] [0], e .vectors [2] [0],
28463
- e .vectors [0] [1], e .vectors [1] [1], e .vectors [2] [1],
28464
- e .vectors [0] [2], e .vectors [1] [2], e .vectors [2] [2]);
28388
+ so .set (e .vectors [0] [0], e .vectors [1] [0], e .vectors [2] [0],
28389
+ e .vectors [0] [1], e .vectors [1] [1], e .vectors [2] [1],
28390
+ e .vectors [0] [2], e .vectors [1] [2], e .vectors [2] [2]);
28391
+
28392
+ scaleOrientation ?.setMatrix (so);
28465
28393
 
28466
- // Compute s = sqrt(evalues), with sign. Set si = s-inverse
28394
+ // Compute s = sqrt(eigen values), with sign. Set si = s-inverse
28467
28395
 
28468
- scale .x = det_sign * Math .sqrt (e .values [0]);
28469
- scale .y = det_sign * Math .sqrt (e .values [1]);
28470
- scale .z = det_sign * Math .sqrt (e .values [2]);
28396
+ s .set (det_sign * Math .sqrt (e .values [0]),
28397
+ det_sign * Math .sqrt (e .values [1]),
28398
+ det_sign * Math .sqrt (e .values [2]));
28471
28399
 
28472
- si [0] = 1 / scale .x;
28473
- si [4] = 1 / scale .y;
28474
- si [8] = 1 / scale .z;
28400
+ scale ?.assign (s);
28401
+
28402
+ if (rotation)
28403
+ {
28404
+ si [0] = 1 / s .x;
28405
+ si [4] = 1 / s .y;
28406
+ si [8] = 1 / s .z;
28475
28407
 
28476
- // (5) Compute U = !R ~S R A.
28477
- rotation .assign (u .assign (scaleOrientation) .transpose () .multRight (si) .multRight (scaleOrientation) .multRight (a));
28408
+ // (5) Compute U = !R ~S R A.
28409
+ rotation .setMatrix (a .multLeft (so) .multLeft (si) .multLeft (so .transpose ()));
28410
+ }
28478
28411
  };
28479
28412
  })(),
28480
28413
  determinant3 ()
@@ -34278,7 +34211,7 @@ const X3DBaseNode_default_ = X3DBaseNode;
34278
34211
  x_ite_Namespace .add ("X3DBaseNode", "x_ite/Base/X3DBaseNode", X3DBaseNode_default_);
34279
34212
  /* harmony default export */ const Base_X3DBaseNode = (X3DBaseNode_default_);
34280
34213
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/Legacy.js
34281
- /* provided dependency */ var $ = __webpack_require__(275);
34214
+ /* provided dependency */ var $ = __webpack_require__(432);
34282
34215
  /*******************************************************************************
34283
34216
  *
34284
34217
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34415,7 +34348,7 @@ x_ite_Namespace .add ("Legacy", "x_ite/Browser/Legacy", Legacy_default_);
34415
34348
  *
34416
34349
  ******************************************************************************/
34417
34350
 
34418
- const BROWSER_VERSION_default_ = "9.5.0";
34351
+ const BROWSER_VERSION_default_ = "9.5.1";
34419
34352
  ;
34420
34353
 
34421
34354
  x_ite_Namespace .add ("BROWSER_VERSION", "x_ite/BROWSER_VERSION", BROWSER_VERSION_default_);
@@ -38136,81 +38069,74 @@ Object .assign (X3DUrlObject .prototype,
38136
38069
  {
38137
38070
  return this [X3DUrlObject_cache] && this .getBrowser () .getBrowserOption ("Cache");
38138
38071
  },
38139
- requestImmediateLoad (cache = true)
38072
+ async requestImmediateLoad (cache = true)
38140
38073
  {
38141
- return new Promise ((resolve, reject) =>
38074
+ switch (this .checkLoadState ())
38142
38075
  {
38143
- const loading = () =>
38144
- {
38145
- const _loading = Symbol ();
38146
-
38147
- this ._loadState .addFieldCallback (_loading, () =>
38148
- {
38149
- switch (this .checkLoadState ())
38150
- {
38151
- case Base_X3DConstants .COMPLETE_STATE:
38152
- this ._loadState .removeFieldCallback (_loading);
38153
- resolve ();
38154
- break;
38155
- case Base_X3DConstants .FAILED_STATE:
38156
- this ._loadState .removeFieldCallback (_loading);
38157
- reject ();
38158
- break;
38159
- }
38160
- });
38161
- };
38162
-
38163
- const loadState = this .checkLoadState ();
38164
-
38165
- switch (loadState)
38166
- {
38167
- case Base_X3DConstants .IN_PROGRESS_STATE:
38168
- {
38169
- loading ();
38170
- return;
38171
- }
38172
- case Base_X3DConstants .COMPLETE_STATE:
38173
- {
38174
- resolve ();
38175
- return;
38176
- }
38177
- case Base_X3DConstants .FAILED_STATE:
38178
- {
38179
- reject ();
38180
- return;
38181
- }
38182
- }
38183
-
38184
- const browser = this .getBrowser ();
38185
-
38186
- if (!browser .getBrowserOption ("LoadUrlObjects") && this .getExecutionContext () !== browser .getPrivateScene ())
38076
+ case Base_X3DConstants .IN_PROGRESS_STATE:
38187
38077
  {
38188
- resolve ();
38078
+ await this .loading ();
38189
38079
  return;
38190
38080
  }
38191
-
38192
- if (!this ._load .getValue ())
38081
+ case Base_X3DConstants .COMPLETE_STATE:
38193
38082
  {
38194
- reject ();
38195
38083
  return;
38196
38084
  }
38197
-
38198
- if (this ._url .length === 0)
38085
+ case Base_X3DConstants .FAILED_STATE:
38199
38086
  {
38200
- resolve ();
38201
- return;
38087
+ throw new Error (`Failed loading ${this .getTypeName ()}.`);
38202
38088
  }
38089
+ }
38203
38090
 
38204
- this .setCache (cache);
38205
- this .setLoadState (Base_X3DConstants .IN_PROGRESS_STATE);
38091
+ const browser = this .getBrowser ();
38206
38092
 
38207
- if (this .isInitialized ())
38208
- // Buffer prevents double load of the scene if load and url field are set at the same time.
38209
- this ._loadData = this .getBrowser () .getCurrentTime ();
38210
- else
38211
- this .loadData ();
38093
+ if (!browser .getBrowserOption ("LoadUrlObjects") && this .getExecutionContext () !== browser .getPrivateScene ())
38094
+ return;
38095
+
38096
+ if (!this ._load .getValue ())
38097
+ throw new Error (`${this .getTypeName ()}.load is false.`);
38212
38098
 
38213
- loading ();
38099
+ if (this ._url .length === 0)
38100
+ {
38101
+ this .unloadData ();
38102
+ return;
38103
+ }
38104
+
38105
+ this .setCache (cache);
38106
+ this .setLoadState (Base_X3DConstants .IN_PROGRESS_STATE);
38107
+
38108
+ if (this .isInitialized ())
38109
+ // Buffer prevents double load of the scene if load and url field are set at the same time.
38110
+ this ._loadData = this .getBrowser () .getCurrentTime ();
38111
+ else
38112
+ this .loadData ();
38113
+
38114
+ await this .loading ();
38115
+ },
38116
+ loading ()
38117
+ {
38118
+ return new Promise ((resolve, reject) =>
38119
+ {
38120
+ const _loading = Symbol ();
38121
+
38122
+ this ._loadState .addFieldCallback (_loading, () =>
38123
+ {
38124
+ switch (this .checkLoadState ())
38125
+ {
38126
+ case Base_X3DConstants .COMPLETE_STATE:
38127
+ {
38128
+ this ._loadState .removeFieldCallback (_loading);
38129
+ resolve ();
38130
+ break;
38131
+ }
38132
+ case Base_X3DConstants .FAILED_STATE:
38133
+ {
38134
+ this ._loadState .removeFieldCallback (_loading);
38135
+ reject (new Error (`Failed loading ${this .getTypeName ()}.`));
38136
+ break;
38137
+ }
38138
+ }
38139
+ });
38214
38140
  });
38215
38141
  },
38216
38142
  loadNow ()
@@ -39027,7 +38953,7 @@ const X3DProtoDeclaration_default_ = X3DProtoDeclaration;
39027
38953
  x_ite_Namespace .add ("X3DProtoDeclaration", "x_ite/Prototype/X3DProtoDeclaration", X3DProtoDeclaration_default_);
39028
38954
  /* harmony default export */ const Prototype_X3DProtoDeclaration = (X3DProtoDeclaration_default_);
39029
38955
  ;// CONCATENATED MODULE: ./src/x_ite/Parser/X3DParser.js
39030
- /* provided dependency */ var X3DParser_$ = __webpack_require__(275);
38956
+ /* provided dependency */ var X3DParser_$ = __webpack_require__(432);
39031
38957
  /*******************************************************************************
39032
38958
  *
39033
38959
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -39289,7 +39215,7 @@ const Expressions_default_ = Expressions;
39289
39215
  x_ite_Namespace .add ("Expressions", "x_ite/Parser/Expressions", Expressions_default_);
39290
39216
  /* harmony default export */ const Parser_Expressions = (Expressions_default_);
39291
39217
  ;// CONCATENATED MODULE: ./src/x_ite/Parser/VRMLParser.js
39292
- /* provided dependency */ var VRMLParser_$ = __webpack_require__(275);
39218
+ /* provided dependency */ var VRMLParser_$ = __webpack_require__(432);
39293
39219
  /*******************************************************************************
39294
39220
  *
39295
39221
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -39361,8 +39287,8 @@ x_ite_Namespace .add ("Expressions", "x_ite/Parser/Expressions", Expressions_def
39361
39287
  // VRML lexical elements
39362
39288
  const Grammar = Parser_Expressions ({
39363
39289
  // General
39364
- Whitespaces: /([\x20\n,\t\r]+)/gy,
39365
- Comment: /#(.*?)(?=[\n\r])/gy,
39290
+ Whitespaces: /[\x20\n,\t\r]+/gy,
39291
+ Comment: /#.*?(?=[\n\r])/gy,
39366
39292
  Break: /\r?\n/g,
39367
39293
 
39368
39294
  // Header
@@ -39395,8 +39321,8 @@ const Grammar = Parser_Expressions ({
39395
39321
  Period: /\./gy,
39396
39322
  Colon: /\:/gy,
39397
39323
 
39398
- 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]*)/gy,
39399
- 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]*)/gy,
39324
+ 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]*/gy,
39325
+ 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]*/gy,
39400
39326
 
39401
39327
  initializeOnly: /initializeOnly/gy,
39402
39328
  inputOnly: /inputOnly/gy,
@@ -39408,15 +39334,16 @@ const Grammar = Parser_Expressions ({
39408
39334
  eventOut: /eventOut/gy,
39409
39335
  exposedField: /exposedField/gy,
39410
39336
 
39411
- FieldType: /([SM]F(?:Bool|ColorRGBA|Color|Double|Float|Image|Int32|Matrix3d|Matrix3f|Matrix4d|Matrix4f|Node|Rotation|String|Time|Vec2d|Vec2f|Vec3d|Vec3f|Vec4d|Vec4f))/gy,
39337
+ FieldType: /[SM]F(?:Bool|ColorRGBA|Color|Double|Float|Image|Int32|Matrix3d|Matrix3f|Matrix4d|Matrix4f|Node|Rotation|String|Time|Vec2d|Vec2f|Vec3d|Vec3f|Vec4d|Vec4f)/gy,
39412
39338
 
39413
39339
  // Values
39414
- int32: /((?:0[xX][\da-fA-F]+)|(?:[+-]?\d+))/gy,
39415
- double: /([+-]?(?:(?:(?:\d*\.\d+)|(?:\d+(?:\.)?))(?:[eE][+-]?\d+)?))/gy,
39416
- string: /"((?:[^\\"]|\\\\|\\")*)"/gy,
39340
+ int32: /(?:0[xX][\da-fA-F]+)|(?:[+-]?\d+)/gy,
39341
+ double: /[+-]?(?:(?:(?:\d*\.\d+)|(?:\d+(?:\.)?))(?:[eE][+-]?\d+)?)/gy,
39342
+ doubleQuotes: /"/gy,
39343
+ noDoubleQuotes: /[^"]+/gy,
39417
39344
 
39418
39345
  CONSTANTS: /([+-]?)\b(NAN|INFINITY|INF|PI|PI2|PI1_4|PI2_4|PI3_4|PI4_4|PI5_4|PI6_4|PI7_4|PI8_4|PI1_2|PI2_2|PI3_2|PI4_2|PI1_3|PI2_3|PI3_3|PI4_3|PI5_3|PI6_3|SQRT1_2|SQRT2)\b/igy,
39419
- HTMLColor: /([a-zA-Z]+|0[xX][\da-fA-F]+|rgba?\(.*?\))/gy,
39346
+ HTMLColor: /[a-zA-Z]+|0[xX][\da-fA-F]+|rgba?\(.*?\)/gy,
39420
39347
  });
39421
39348
 
39422
39349
  /*
@@ -39530,7 +39457,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
39530
39457
 
39531
39458
  if (line .length > 80)
39532
39459
  {
39533
- line = line .substr (linePos - 40, 80);
39460
+ line = line .substring (linePos - 40, linePos + 40);
39534
39461
  lastLine = "";
39535
39462
  linePos = 40;
39536
39463
  }
@@ -39605,7 +39532,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
39605
39532
  {
39606
39533
  if (Grammar .Whitespaces .parse (this))
39607
39534
  {
39608
- this .lines (this .result [1]);
39535
+ this .lines (this .result [0]);
39609
39536
 
39610
39537
  return true;
39611
39538
  }
@@ -39681,13 +39608,9 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
39681
39608
  })(),
39682
39609
  headerStatement ()
39683
39610
  {
39684
- Grammar .Header .lastIndex = 0;
39685
-
39686
- const result = Grammar .Header .exec (this .input);
39687
-
39688
- if (result)
39611
+ if (Grammar .Header .parse (this))
39689
39612
  {
39690
- this .getScene () .setSpecificationVersion (result [2]);
39613
+ this .getScene () .setSpecificationVersion (this .result [2]);
39691
39614
  this .getScene () .setEncoding ("VRML");
39692
39615
  return true;
39693
39616
  }
@@ -39702,7 +39625,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
39702
39625
  {
39703
39626
  if (this .profileNameId ())
39704
39627
  {
39705
- const profile = this .getBrowser () .getProfile (this .result [1]);
39628
+ const profile = this .getBrowser () .getProfile (this .result [0]);
39706
39629
 
39707
39630
  this .getScene () .setProfile (profile);
39708
39631
  return;
@@ -39726,7 +39649,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
39726
39649
  {
39727
39650
  if (this .componentNameId ())
39728
39651
  {
39729
- const componentNameIdCharacters = this .result [1];
39652
+ const componentNameIdCharacters = this .result [0];
39730
39653
 
39731
39654
  this .comments ();
39732
39655
 
@@ -39767,11 +39690,11 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
39767
39690
  {
39768
39691
  if (this .categoryNameId ())
39769
39692
  {
39770
- const categoryNameId = this .result [1];
39693
+ const categoryNameId = this .result [0];
39771
39694
 
39772
39695
  if (this .unitNameId ())
39773
39696
  {
39774
- const unitNameId = this .result [1];
39697
+ const unitNameId = this .result [0];
39775
39698
 
39776
39699
  if (this .unitConversionFactor ())
39777
39700
  {
@@ -39851,7 +39774,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
39851
39774
  {
39852
39775
  if (this .nodeNameId ())
39853
39776
  {
39854
- const localNodeNameId = this .result [1];
39777
+ const localNodeNameId = this .result [0];
39855
39778
 
39856
39779
  this .comments ();
39857
39780
 
@@ -39860,7 +39783,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
39860
39783
  if (Grammar .AS .parse (this))
39861
39784
  {
39862
39785
  if (this .exportedNodeNameId ())
39863
- var exportedNodeNameId = this .result [1];
39786
+ var exportedNodeNameId = this .result [0];
39864
39787
  else
39865
39788
  throw new Error ("No name given after AS.");
39866
39789
  }
@@ -39896,7 +39819,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
39896
39819
  if (this .nodeNameId ())
39897
39820
  {
39898
39821
  const
39899
- inlineNodeNameId = this .result [1],
39822
+ inlineNodeNameId = this .result [0],
39900
39823
  namedNode = this .getExecutionContext () .getNamedNode (inlineNodeNameId);
39901
39824
 
39902
39825
  this .comments ();
@@ -39905,14 +39828,14 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
39905
39828
  {
39906
39829
  if (this .exportedNodeNameId ())
39907
39830
  {
39908
- const exportedNodeNameId = this .result [1];
39831
+ const exportedNodeNameId = this .result [0];
39909
39832
 
39910
39833
  this .comments ();
39911
39834
 
39912
39835
  if (Grammar .AS .parse (this))
39913
39836
  {
39914
39837
  if (this .nodeNameId ())
39915
- var nodeNameId = this .result [1];
39838
+ var nodeNameId = this .result [0];
39916
39839
 
39917
39840
  else
39918
39841
  throw new Error ("No name given after AS.");
@@ -39978,7 +39901,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
39978
39901
  if (Grammar .DEF .parse (this))
39979
39902
  {
39980
39903
  if (this .nodeNameId ())
39981
- return this .node (this .result [1]);
39904
+ return this .node (this .result [0]);
39982
39905
 
39983
39906
  throw new Error ("No name given after DEF.");
39984
39907
  }
@@ -39986,7 +39909,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
39986
39909
  if (Grammar .USE .parse (this))
39987
39910
  {
39988
39911
  if (this .nodeNameId ())
39989
- return this .getExecutionContext () .getNamedNode (this .result [1]) .getValue ();
39912
+ return this .getExecutionContext () .getNamedNode (this .result [0]) .getValue ();
39990
39913
 
39991
39914
  throw new Error ("No name given after USE.");
39992
39915
  }
@@ -40019,7 +39942,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
40019
39942
  {
40020
39943
  if (this .nodeTypeId ())
40021
39944
  {
40022
- const nodeTypeId = this .result [1];
39945
+ const nodeTypeId = this .result [0];
40023
39946
 
40024
39947
  this .comments ();
40025
39948
 
@@ -40141,12 +40064,12 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
40141
40064
  {
40142
40065
  if (this .fieldType ())
40143
40066
  {
40144
- const fieldType = this .result [1];
40067
+ const fieldType = this .result [0];
40145
40068
 
40146
40069
  if (this .inputOnlyId ())
40147
40070
  {
40148
40071
  const
40149
- fieldId = this .result [1],
40072
+ fieldId = this .result [0],
40150
40073
  field = new (x_ite_Fields [fieldType]) ();
40151
40074
 
40152
40075
  field .setAccessType (Base_X3DConstants .inputOnly);
@@ -40159,19 +40082,19 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
40159
40082
 
40160
40083
  this .Id ();
40161
40084
 
40162
- throw new Error (`Unknown event or field type: '${this .result [1]}'.`);
40085
+ throw new Error (`Unknown event or field type: '${this .result [0]}'.`);
40163
40086
  }
40164
40087
 
40165
40088
  if (Grammar .outputOnly .parse (this) || Grammar .eventOut .parse (this))
40166
40089
  {
40167
40090
  if (this .fieldType ())
40168
40091
  {
40169
- const fieldType = this .result [1];
40092
+ const fieldType = this .result [0];
40170
40093
 
40171
40094
  if (this .outputOnlyId ())
40172
40095
  {
40173
40096
  const
40174
- fieldId = this .result [1],
40097
+ fieldId = this .result [0],
40175
40098
  field = new (x_ite_Fields [fieldType]) ();
40176
40099
 
40177
40100
  field .setAccessType (Base_X3DConstants .outputOnly);
@@ -40184,19 +40107,19 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
40184
40107
 
40185
40108
  this .Id ();
40186
40109
 
40187
- throw new Error (`Unknown event or field type: '${this .result [1]}'.`);
40110
+ throw new Error (`Unknown event or field type: '${this .result [0]}'.`);
40188
40111
  }
40189
40112
 
40190
40113
  if (Grammar .initializeOnly .parse (this) || Grammar .field .parse (this))
40191
40114
  {
40192
40115
  if (this .fieldType ())
40193
40116
  {
40194
- const fieldType = this .result [1];
40117
+ const fieldType = this .result [0];
40195
40118
 
40196
40119
  if (this .initializeOnlyId ())
40197
40120
  {
40198
40121
  const
40199
- fieldId = this .result [1],
40122
+ fieldId = this .result [0],
40200
40123
  field = new (x_ite_Fields [fieldType]) ();
40201
40124
 
40202
40125
  if (this .fieldValue (field))
@@ -40214,7 +40137,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
40214
40137
 
40215
40138
  this .Id ();
40216
40139
 
40217
- throw new Error (`Unknown event or field type: '${this .result [1]}'.`);
40140
+ throw new Error (`Unknown event or field type: '${this .result [0]}'.`);
40218
40141
  }
40219
40142
 
40220
40143
  return null;
@@ -40232,12 +40155,12 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
40232
40155
  {
40233
40156
  if (this .fieldType ())
40234
40157
  {
40235
- const fieldType = this .result [1];
40158
+ const fieldType = this .result [0];
40236
40159
 
40237
40160
  if (this .inputOutputId ())
40238
40161
  {
40239
40162
  const
40240
- fieldId = this .result [1],
40163
+ fieldId = this .result [0],
40241
40164
  field = new (x_ite_Fields [fieldType]) ();
40242
40165
 
40243
40166
  if (this .fieldValue (field))
@@ -40255,7 +40178,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
40255
40178
 
40256
40179
  this .Id ();
40257
40180
 
40258
- throw new Error (`Unknown event or field type: '${this .result [1]}'.`);
40181
+ throw new Error (`Unknown event or field type: '${this .result [0]}'.`);
40259
40182
  }
40260
40183
 
40261
40184
  return null;
@@ -40268,7 +40191,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
40268
40191
  {
40269
40192
  if (this .nodeTypeId ())
40270
40193
  {
40271
- const nodeTypeId = this .result [1];
40194
+ const nodeTypeId = this .result [0];
40272
40195
 
40273
40196
  this .comments ();
40274
40197
 
@@ -40335,12 +40258,12 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
40335
40258
  {
40336
40259
  if (this .fieldType ())
40337
40260
  {
40338
- const fieldType = this .result [1];
40261
+ const fieldType = this .result [0];
40339
40262
 
40340
40263
  if (this .inputOnlyId ())
40341
40264
  {
40342
40265
  const
40343
- fieldId = this .result [1],
40266
+ fieldId = this .result [0],
40344
40267
  field = new (x_ite_Fields [fieldType]) ();
40345
40268
 
40346
40269
  field .setAccessType (Base_X3DConstants .inputOnly);
@@ -40353,19 +40276,19 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
40353
40276
 
40354
40277
  this .Id ()
40355
40278
 
40356
- throw new Error (`Unknown event or field type: '${this .result [1]}'.`);
40279
+ throw new Error (`Unknown event or field type: '${this .result [0]}'.`);
40357
40280
  }
40358
40281
 
40359
40282
  if (Grammar .outputOnly .parse (this) || Grammar .eventOut .parse (this))
40360
40283
  {
40361
40284
  if (this .fieldType ())
40362
40285
  {
40363
- const fieldType = this .result [1];
40286
+ const fieldType = this .result [0];
40364
40287
 
40365
40288
  if (this .outputOnlyId ())
40366
40289
  {
40367
40290
  const
40368
- fieldId = this .result [1],
40291
+ fieldId = this .result [0],
40369
40292
  field = new (x_ite_Fields [fieldType]) ();
40370
40293
 
40371
40294
  field .setAccessType (Base_X3DConstants .outputOnly);
@@ -40378,19 +40301,19 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
40378
40301
 
40379
40302
  this .Id ()
40380
40303
 
40381
- throw new Error (`Unknown event or field type: '${this .result [1]}'.`);
40304
+ throw new Error (`Unknown event or field type: '${this .result [0]}'.`);
40382
40305
  }
40383
40306
 
40384
40307
  if (Grammar .initializeOnly .parse (this) || Grammar .field .parse (this))
40385
40308
  {
40386
40309
  if (this .fieldType ())
40387
40310
  {
40388
- const fieldType = this .result [1];
40311
+ const fieldType = this .result [0];
40389
40312
 
40390
40313
  if (this .initializeOnlyId ())
40391
40314
  {
40392
40315
  const
40393
- fieldId = this .result [1],
40316
+ fieldId = this .result [0],
40394
40317
  field = new (x_ite_Fields [fieldType]) ();
40395
40318
 
40396
40319
  field .setAccessType (Base_X3DConstants .initializeOnly);
@@ -40403,19 +40326,19 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
40403
40326
 
40404
40327
  this .Id ()
40405
40328
 
40406
- throw new Error (`Unknown event or field type: '${this .result [1]}'.`);
40329
+ throw new Error (`Unknown event or field type: '${this .result [0]}'.`);
40407
40330
  }
40408
40331
 
40409
40332
  if (Grammar .inputOutput .parse (this) || Grammar .exposedField .parse (this))
40410
40333
  {
40411
40334
  if (this .fieldType ())
40412
40335
  {
40413
- const fieldType = this .result [1];
40336
+ const fieldType = this .result [0];
40414
40337
 
40415
40338
  if (this .inputOutputId ())
40416
40339
  {
40417
40340
  const
40418
- fieldId = this .result [1],
40341
+ fieldId = this .result [0],
40419
40342
  field = new (x_ite_Fields [fieldType]) ();
40420
40343
 
40421
40344
  field .setAccessType (Base_X3DConstants .inputOutput);
@@ -40428,7 +40351,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
40428
40351
 
40429
40352
  this .Id ()
40430
40353
 
40431
- throw new Error (`Unknown event or field type: '${this .result [1]}'.`);
40354
+ throw new Error (`Unknown event or field type: '${this .result [0]}'.`);
40432
40355
  }
40433
40356
 
40434
40357
  return null;
@@ -40446,7 +40369,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
40446
40369
  if (this .nodeNameId ())
40447
40370
  {
40448
40371
  const
40449
- fromNodeId = this .result [1],
40372
+ fromNodeId = this .result [0],
40450
40373
  fromNode = this .getExecutionContext () .getLocalNode (fromNodeId);
40451
40374
 
40452
40375
  this .comments ();
@@ -40455,7 +40378,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
40455
40378
  {
40456
40379
  if (this .outputOnlyId ())
40457
40380
  {
40458
- const eventOutId = this .result [1];
40381
+ const eventOutId = this .result [0];
40459
40382
 
40460
40383
  this .comments ();
40461
40384
 
@@ -40464,7 +40387,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
40464
40387
  if (this .nodeNameId ())
40465
40388
  {
40466
40389
  const
40467
- toNodeId = this .result [1],
40390
+ toNodeId = this .result [0],
40468
40391
  toNode = this .getExecutionContext () .getLocalNode (toNodeId);
40469
40392
 
40470
40393
  this .comments ();
@@ -40475,7 +40398,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
40475
40398
  {
40476
40399
  try
40477
40400
  {
40478
- const eventInId = this .result [1];
40401
+ const eventInId = this .result [0];
40479
40402
 
40480
40403
  this .getExecutionContext () .addRoute (fromNode, eventOutId, toNode, eventInId);
40481
40404
  return true;
@@ -40515,7 +40438,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
40515
40438
  {
40516
40439
  if (this .nodeTypeId ())
40517
40440
  {
40518
- const nodeTypeId = this .result [1];
40441
+ const nodeTypeId = this .result [0];
40519
40442
 
40520
40443
  const baseNode = this .getExecutionContext () .createNode (nodeTypeId, false)
40521
40444
  ?? this .getExecutionContext () .createProto (nodeTypeId, false);
@@ -40596,17 +40519,17 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
40596
40519
 
40597
40520
  if (this .Id ())
40598
40521
  {
40599
- const accessType = this .accessTypes [this .result [1]];
40522
+ const accessType = this .accessTypes [this .result [0]];
40600
40523
 
40601
40524
  if (accessType)
40602
40525
  {
40603
40526
  if (this .fieldType ())
40604
40527
  {
40605
- const fieldType = this .result [1];
40528
+ const fieldType = this .result [0];
40606
40529
 
40607
40530
  if (this .Id ())
40608
40531
  {
40609
- const fieldId = this .result [1];
40532
+ const fieldId = this .result [0];
40610
40533
 
40611
40534
  this .comments ();
40612
40535
 
@@ -40616,7 +40539,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
40616
40539
  {
40617
40540
  if (this .Id ())
40618
40541
  {
40619
- const isId = this .result [1];
40542
+ const isId = this .result [0];
40620
40543
 
40621
40544
  try
40622
40545
  {
@@ -40708,7 +40631,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
40708
40631
 
40709
40632
  if (this .Id ())
40710
40633
  {
40711
- const fieldId = this .result [1];
40634
+ const fieldId = this .result [0];
40712
40635
 
40713
40636
  try
40714
40637
  {
@@ -40741,7 +40664,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
40741
40664
  {
40742
40665
  if (this .Id ())
40743
40666
  {
40744
- const isId = this .result [1];
40667
+ const isId = this .result [0];
40745
40668
 
40746
40669
  try
40747
40670
  {
@@ -40843,7 +40766,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
40843
40766
 
40844
40767
  if (Grammar .double .parse (this))
40845
40768
  {
40846
- this .value = parseFloat (this .result [1]);
40769
+ this .value = parseFloat (this .result [0]);
40847
40770
  return true;
40848
40771
  }
40849
40772
 
@@ -40854,7 +40777,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
40854
40777
  this .value = this .CONSTANTS [this .result [2] .toUpperCase ()];
40855
40778
 
40856
40779
  if (this .result [1] === "-")
40857
- this .value = - this .value;
40780
+ this .value = -this .value;
40858
40781
 
40859
40782
  return true;
40860
40783
  }
@@ -40867,7 +40790,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
40867
40790
 
40868
40791
  if (Grammar .int32 .parse (this))
40869
40792
  {
40870
- this .value = parseInt (this .result [1]);
40793
+ this .value = parseInt (this .result [0]);
40871
40794
  return true;
40872
40795
  }
40873
40796
 
@@ -40877,13 +40800,30 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
40877
40800
  {
40878
40801
  this .comments ();
40879
40802
 
40880
- if (Grammar .string .parse (this))
40803
+ if (Grammar .doubleQuotes .parse (this))
40881
40804
  {
40882
- this .value = x_ite_Fields .SFString .unescape (this .result [1]);
40805
+ let value = "";
40883
40806
 
40884
- this .lines (this .value);
40807
+ while (Grammar .noDoubleQuotes .parse (this))
40808
+ {
40809
+ value += this .result [0];
40885
40810
 
40886
- return true;
40811
+ if (value .at (-1) !== "\\")
40812
+ break;
40813
+
40814
+ Grammar .doubleQuotes .parse (this);
40815
+
40816
+ value += "\"";
40817
+ }
40818
+
40819
+ if (Grammar .doubleQuotes .parse (this))
40820
+ {
40821
+ this .lines (value);
40822
+
40823
+ this .value = x_ite_Fields .SFString .unescape (value);
40824
+
40825
+ return true;
40826
+ }
40887
40827
  }
40888
40828
 
40889
40829
  return false;
@@ -40962,7 +40902,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
40962
40902
 
40963
40903
  if (Grammar .HTMLColor .parse (this))
40964
40904
  {
40965
- const color = this .convertColor (this .result [1] .replace (/0x/i, "#"));
40905
+ const color = this .convertColor (this .result [0] .replace (/0x/i, "#"));
40966
40906
 
40967
40907
  field .r = color [0];
40968
40908
  field .g = color [1];
@@ -41045,7 +40985,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
41045
40985
 
41046
40986
  if (Grammar .HTMLColor .parse (this))
41047
40987
  {
41048
- const color = this .convertColor (this .result [1] .replace (/0x/i, "#"));
40988
+ const color = this .convertColor (this .result [0] .replace (/0x/i, "#"));
41049
40989
 
41050
40990
  field .r = color [0];
41051
40991
  field .g = color [1];
@@ -41975,7 +41915,7 @@ const VRMLParser_default_ = VRMLParser;
41975
41915
  x_ite_Namespace .add ("VRMLParser", "x_ite/Parser/VRMLParser", VRMLParser_default_);
41976
41916
  /* harmony default export */ const Parser_VRMLParser = (VRMLParser_default_);
41977
41917
  ;// CONCATENATED MODULE: ./src/x_ite/Parser/XMLParser.js
41978
- /* provided dependency */ var XMLParser_$ = __webpack_require__(275);
41918
+ /* provided dependency */ var XMLParser_$ = __webpack_require__(432);
41979
41919
  /*******************************************************************************
41980
41920
  *
41981
41921
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -43329,10 +43269,10 @@ Object .assign (Object .setPrototypeOf (JSONParser .prototype, Parser_X3DParser
43329
43269
  if (typeof object [key] === "object")
43330
43270
  {
43331
43271
  if (isNaN (parseInt (key)))
43332
- this .convertObject (key, object, element, parentkey .substr (1));
43272
+ this .convertObject (key, object, element, parentkey .substring (1));
43333
43273
 
43334
43274
  else
43335
- this .convertToDOM (object[ key], key, element, parentkey .substr (1));
43275
+ this .convertToDOM (object[ key], key, element, parentkey .substring (1));
43336
43276
  }
43337
43277
  }
43338
43278
  },
@@ -43380,11 +43320,11 @@ Object .assign (Object .setPrototypeOf (JSONParser .prototype, Parser_X3DParser
43380
43320
 
43381
43321
  if (object !== null && typeof object [key] === "object")
43382
43322
  {
43383
- if (key .substr (0, 1) === "@")
43323
+ if (key [0] === "@")
43384
43324
  {
43385
43325
  this .convertToDOM (object [key], key, element);
43386
43326
  }
43387
- else if (key .substr (0, 1) === "-")
43327
+ else if (key [0] === "-")
43388
43328
  {
43389
43329
  this .convertChildren (key, object [key], element);
43390
43330
  }
@@ -43401,33 +43341,30 @@ Object .assign (Object .setPrototypeOf (JSONParser .prototype, Parser_X3DParser
43401
43341
  {
43402
43342
  this .createCDATA (document, element, object [key] .join ("\n"));
43403
43343
  }
43404
- else
43344
+ else if (key === "connect" || key === "fieldValue" || key === "field" || key === "meta" || key === "component" || key === "unit")
43405
43345
  {
43406
- if (key === "connect" || key === "fieldValue" || key === "field" || key === "meta" || key === "component" || key === "unit")
43346
+ for (const childkey in object [key])
43407
43347
  {
43408
- for (const childkey in object [key])
43348
+ // for each field
43349
+ if (typeof object [key] [childkey] === "object")
43409
43350
  {
43410
- // for each field
43411
- if (typeof object [key] [childkey] === "object")
43412
- {
43413
- const child = this .createElement (key, containerField);
43351
+ const child = this .createElement (key, containerField);
43414
43352
 
43415
- this .convertToDOM (object [key] [childkey], childkey, child);
43353
+ this .convertToDOM (object [key] [childkey], childkey, child);
43416
43354
 
43417
- element .appendChild (child);
43418
- element .appendChild (document .createTextNode ("\n"));
43419
- }
43355
+ element .appendChild (child);
43356
+ element .appendChild (document .createTextNode ("\n"));
43420
43357
  }
43421
43358
  }
43422
- else
43423
- {
43424
- const child = this .createElement (key, containerField);
43359
+ }
43360
+ else
43361
+ {
43362
+ const child = this .createElement (key, containerField);
43425
43363
 
43426
- this .convertToDOM (object [key], key, child);
43364
+ this .convertToDOM (object [key], key, child);
43427
43365
 
43428
- element .appendChild (child);
43429
- element .appendChild (document .createTextNode ("\n"));
43430
- }
43366
+ element .appendChild (child);
43367
+ element .appendChild (document .createTextNode ("\n"));
43431
43368
  }
43432
43369
  }
43433
43370
  },
@@ -43536,7 +43473,7 @@ Object .assign (Object .setPrototypeOf (JSONParser .prototype, Parser_X3DParser
43536
43473
  }
43537
43474
  case "number":
43538
43475
  {
43539
- this .elementSetAttribute (element, key .substr (1), object [key]);
43476
+ this .elementSetAttribute (element, key .substring (1), object [key]);
43540
43477
  break;
43541
43478
  }
43542
43479
  case "string":
@@ -43544,7 +43481,7 @@ Object .assign (Object .setPrototypeOf (JSONParser .prototype, Parser_X3DParser
43544
43481
  if (key !== "#comment")
43545
43482
  {
43546
43483
  // ordinary string attributes
43547
- this .elementSetAttribute (element, key .substr (1), this .JSONStringToXML (object [key]));
43484
+ this .elementSetAttribute (element, key .substring (1), this .JSONStringToXML (object [key]));
43548
43485
  }
43549
43486
  else
43550
43487
  {
@@ -43557,7 +43494,7 @@ Object .assign (Object .setPrototypeOf (JSONParser .prototype, Parser_X3DParser
43557
43494
  }
43558
43495
  case "boolean":
43559
43496
  {
43560
- this .elementSetAttribute (element, key .substr (1), object [key]);
43497
+ this .elementSetAttribute (element, key .substring (1), object [key]);
43561
43498
  break;
43562
43499
  }
43563
43500
  case "undefined":
@@ -43575,7 +43512,7 @@ Object .assign (Object .setPrototypeOf (JSONParser .prototype, Parser_X3DParser
43575
43512
 
43576
43513
  if (isArray)
43577
43514
  {
43578
- if (parentkey .substr (0,1) === "@")
43515
+ if (parentkey [0] === "@")
43579
43516
  {
43580
43517
  if (arrayOfStrings)
43581
43518
  {
@@ -43584,12 +43521,12 @@ Object .assign (Object .setPrototypeOf (JSONParser .prototype, Parser_X3DParser
43584
43521
  for (const str in localArray)
43585
43522
  localArray [str] = this .SFStringToXML (localArray [str]);
43586
43523
 
43587
- this .elementSetAttribute (element, parentkey .substr (1), '"' + localArray .join ('" "') + '"');
43524
+ this .elementSetAttribute (element, parentkey .substring (1), '"' + localArray .join ('" "') + '"');
43588
43525
  }
43589
43526
  else
43590
43527
  {
43591
43528
  // if non string array
43592
- this .elementSetAttribute (element, parentkey .substr (1), localArray .join (" "));
43529
+ this .elementSetAttribute (element, parentkey .substring (1), localArray .join (" "));
43593
43530
  }
43594
43531
  }
43595
43532
 
@@ -44084,7 +44021,7 @@ const URLs_default_ = URLs;
44084
44021
  x_ite_Namespace .add ("URLs", "x_ite/Browser/Networking/URLs", URLs_default_);
44085
44022
  /* harmony default export */ const Networking_URLs = (URLs_default_);
44086
44023
  ;// CONCATENATED MODULE: ./src/x_ite/Parser/GLTF2Parser.js
44087
- /* provided dependency */ var GLTF2Parser_$ = __webpack_require__(275);
44024
+ /* provided dependency */ var GLTF2Parser_$ = __webpack_require__(432);
44088
44025
  /*******************************************************************************
44089
44026
  *
44090
44027
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -47386,7 +47323,7 @@ const GLTF2Parser_default_ = GLTF2Parser;
47386
47323
  x_ite_Namespace .add ("GLTF2Parser", "x_ite/Parser/GLTF2Parser", GLTF2Parser_default_);
47387
47324
  /* harmony default export */ const Parser_GLTF2Parser = (GLTF2Parser_default_);
47388
47325
  ;// CONCATENATED MODULE: ./src/x_ite/Parser/GLB2Parser.js
47389
- /* provided dependency */ var GLB2Parser_$ = __webpack_require__(275);
47326
+ /* provided dependency */ var GLB2Parser_$ = __webpack_require__(432);
47390
47327
  /*******************************************************************************
47391
47328
  *
47392
47329
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -47538,7 +47475,7 @@ const GLB2Parser_default_ = GLB2Parser;
47538
47475
  x_ite_Namespace .add ("GLB2Parser", "x_ite/Parser/GLB2Parser", GLB2Parser_default_);
47539
47476
  /* harmony default export */ const Parser_GLB2Parser = (GLB2Parser_default_);
47540
47477
  ;// CONCATENATED MODULE: ./src/x_ite/Parser/OBJParser.js
47541
- /* provided dependency */ var OBJParser_$ = __webpack_require__(275);
47478
+ /* provided dependency */ var OBJParser_$ = __webpack_require__(432);
47542
47479
  /*******************************************************************************
47543
47480
  *
47544
47481
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -47607,7 +47544,7 @@ const OBJParser_Grammar = Parser_Expressions ({
47607
47544
  whitespaces: /[\x20\n\t\r]+/gy,
47608
47545
  whitespacesNoLineTerminator: /[\x20\t]+/gy,
47609
47546
  comment: /#.*?(?=[\n\r])/gy,
47610
- untilEndOfLine: /([^\r\n]+)/gy,
47547
+ untilEndOfLine: /[^\r\n]+/gy,
47611
47548
 
47612
47549
  // Keywords
47613
47550
  mtllib: /\bmtllib\b/gy,
@@ -47632,8 +47569,8 @@ const OBJParser_Grammar = Parser_Expressions ({
47632
47569
  slash: /\//gy,
47633
47570
 
47634
47571
  // Values
47635
- int32: /((?:0[xX][\da-fA-F]+)|(?:[+-]?\d+))/gy,
47636
- double: /([+-]?(?:(?:(?:\d*\.\d+)|(?:\d+(?:\.)?))(?:[eE][+-]?\d+)?))/gy,
47572
+ int32: /(?:0[xX][\da-fA-F]+)|(?:[+-]?\d+)/gy,
47573
+ double: /[+-]?(?:(?:(?:\d*\.\d+)|(?:\d+(?:\.)?))(?:[eE][+-]?\d+)?)/gy,
47637
47574
  constants: /([+-])((?:NAN|INF|INFINITY))/igy,
47638
47575
  });
47639
47576
 
@@ -47800,7 +47737,7 @@ Object .assign (Object .setPrototypeOf (OBJParser .prototype, Parser_X3DParser .
47800
47737
 
47801
47738
  if (OBJParser_Grammar .untilEndOfLine .parse (this))
47802
47739
  {
47803
- const mtllibs = this .result [1] .trim () .split (/\s+/);
47740
+ const mtllibs = this .result [0] .trim () .split (/\s+/);
47804
47741
 
47805
47742
  await Promise .all (mtllibs .map (path => this .mtllib (path)));
47806
47743
  }
@@ -47865,7 +47802,7 @@ Object .assign (Object .setPrototypeOf (OBJParser .prototype, Parser_X3DParser .
47865
47802
 
47866
47803
  if (OBJParser_Grammar .untilEndOfLine .parse (this))
47867
47804
  {
47868
- const id = this .result [1];
47805
+ const id = this .result [0];
47869
47806
 
47870
47807
  this .material = this .materials .get (id) || this .defaultMaterial;
47871
47808
  this .texture = this .textures .get (id);
@@ -47893,7 +47830,7 @@ Object .assign (Object .setPrototypeOf (OBJParser .prototype, Parser_X3DParser .
47893
47830
  {
47894
47831
  const
47895
47832
  scene = this .getExecutionContext (),
47896
- name = this .sanitizeName (this .result [1]);
47833
+ name = this .sanitizeName (this .result [0]);
47897
47834
 
47898
47835
  if (this .group .children .length)
47899
47836
  {
@@ -47904,7 +47841,7 @@ Object .assign (Object .setPrototypeOf (OBJParser .prototype, Parser_X3DParser .
47904
47841
  scene .getRootNodes () .push (this .object);
47905
47842
  }
47906
47843
 
47907
- if (name)
47844
+ if (name && !this .object .getValue () .getName ())
47908
47845
  {
47909
47846
  scene .addNamedNode (scene .getUniqueName (name), this .object);
47910
47847
  scene .addExportedNode (scene .getUniqueExportName (name), this .object);
@@ -47928,7 +47865,7 @@ Object .assign (Object .setPrototypeOf (OBJParser .prototype, Parser_X3DParser .
47928
47865
  {
47929
47866
  const
47930
47867
  scene = this .getExecutionContext (),
47931
- id = this .result [1],
47868
+ id = this .result [0],
47932
47869
  name = this .sanitizeName (id),
47933
47870
  group = this .groups .get (id);
47934
47871
 
@@ -47948,7 +47885,7 @@ Object .assign (Object .setPrototypeOf (OBJParser .prototype, Parser_X3DParser .
47948
47885
 
47949
47886
  this .groups .set (id, this .group);
47950
47887
 
47951
- if (name)
47888
+ if (name && !this .group .getValue () .getName ())
47952
47889
  {
47953
47890
  scene .addNamedNode (scene .getUniqueName (name), this .group);
47954
47891
  scene .addExportedNode (scene .getUniqueExportName (name), this .group);
@@ -48200,7 +48137,7 @@ Object .assign (Object .setPrototypeOf (OBJParser .prototype, Parser_X3DParser .
48200
48137
 
48201
48138
  if (OBJParser_Grammar .int32 .parse (this))
48202
48139
  {
48203
- this .value = parseInt (this .result [1]);
48140
+ this .value = parseInt (this .result [0]);
48204
48141
 
48205
48142
  return true;
48206
48143
  }
@@ -48213,7 +48150,7 @@ Object .assign (Object .setPrototypeOf (OBJParser .prototype, Parser_X3DParser .
48213
48150
 
48214
48151
  if (OBJParser_Grammar .double .parse (this))
48215
48152
  {
48216
- this .value = parseFloat (this .result [1]);
48153
+ this .value = parseFloat (this .result [0]);
48217
48154
 
48218
48155
  return true;
48219
48156
  }
@@ -48374,7 +48311,7 @@ Object .assign (MaterialParser .prototype,
48374
48311
 
48375
48312
  if (OBJParser_Grammar .untilEndOfLine .parse (this))
48376
48313
  {
48377
- this .id = this .result [1];
48314
+ this .id = this .result [0];
48378
48315
 
48379
48316
  this .material = this .executionContext .createNode ("Material");
48380
48317
 
@@ -48541,7 +48478,7 @@ Object .assign (MaterialParser .prototype,
48541
48478
 
48542
48479
  if (OBJParser_Grammar .untilEndOfLine .parse (this))
48543
48480
  {
48544
- const string = this .result [1];
48481
+ const string = this .result [0];
48545
48482
 
48546
48483
  if (string .length && this .id .length)
48547
48484
  {
@@ -48576,7 +48513,7 @@ Object .assign (MaterialParser .prototype,
48576
48513
 
48577
48514
  if (OBJParser_Grammar .int32 .parse (this))
48578
48515
  {
48579
- this .value = parseInt (this .result [1]);
48516
+ this .value = parseInt (this .result [0]);
48580
48517
 
48581
48518
  return true;
48582
48519
  }
@@ -48589,7 +48526,7 @@ Object .assign (MaterialParser .prototype,
48589
48526
 
48590
48527
  if (OBJParser_Grammar .double .parse (this))
48591
48528
  {
48592
- this .value = parseFloat (this .result [1]);
48529
+ this .value = parseFloat (this .result [0]);
48593
48530
 
48594
48531
  return true;
48595
48532
  }
@@ -48699,7 +48636,7 @@ const STLAParser_Grammar = Parser_Expressions ({
48699
48636
  whitespaces: /[\x20\n\t\r]+/gy,
48700
48637
  whitespacesNoLineTerminator: /[\x20\t]+/gy,
48701
48638
  comment: /;.*?(?=[\n\r])/gy,
48702
- untilEndOfLine: /([^\r\n]+)/gy,
48639
+ untilEndOfLine: /[^\r\n]+/gy,
48703
48640
 
48704
48641
  // Keywords
48705
48642
  solid: /solid/gy,
@@ -48713,8 +48650,8 @@ const STLAParser_Grammar = Parser_Expressions ({
48713
48650
  endsolid: /endsolid/gy,
48714
48651
 
48715
48652
  // Values
48716
- name: /(\w+)/gy,
48717
- double: /([+-]?(?:(?:(?:\d*\.\d+)|(?:\d+(?:\.)?))(?:[eE][+-]?\d+)?))/gy,
48653
+ name: /\w+/gy,
48654
+ double: /[+-]?(?:(?:(?:\d*\.\d+)|(?:\d+(?:\.)?))(?:[eE][+-]?\d+)?)/gy,
48718
48655
  constants: /([+-])((?:NAN|INF|INFINITY))/igy,
48719
48656
  });
48720
48657
 
@@ -48828,7 +48765,7 @@ Object .assign (Object .setPrototypeOf (STLAParser .prototype, Parser_X3DParser
48828
48765
  geometry = scene .createNode ("TriangleSet"),
48829
48766
  normal = scene .createNode ("Normal"),
48830
48767
  coordinate = scene .createNode ("Coordinate"),
48831
- name = this .sanitizeName (STLAParser_Grammar .name .parse (this) ? this .result [1] : "");
48768
+ name = this .sanitizeName (STLAParser_Grammar .name .parse (this) ? this .result [0] : "");
48832
48769
 
48833
48770
  STLAParser_Grammar .untilEndOfLine .parse (this);
48834
48771
 
@@ -48992,7 +48929,7 @@ Object .assign (Object .setPrototypeOf (STLAParser .prototype, Parser_X3DParser
48992
48929
 
48993
48930
  if (STLAParser_Grammar .double .parse (this))
48994
48931
  {
48995
- this .value = parseFloat (this .result [1]);
48932
+ this .value = parseFloat (this .result [0]);
48996
48933
 
48997
48934
  return true;
48998
48935
  }
@@ -49236,7 +49173,7 @@ const PLYAParser_Grammar = Parser_Expressions ({
49236
49173
  // General
49237
49174
  whitespaces: /[\x20\n\t\r]+/gy,
49238
49175
  whitespacesNoLineTerminator: /[\x20\t]+/gy,
49239
- untilEndOfLine: /([^\r\n]+)/gy,
49176
+ untilEndOfLine: /[^\r\n]+/gy,
49240
49177
  line: /.*?\r?\n/gy,
49241
49178
 
49242
49179
  // Keywords
@@ -49244,15 +49181,15 @@ const PLYAParser_Grammar = Parser_Expressions ({
49244
49181
  format: /format ascii 1.0/gy,
49245
49182
  comment: /\bcomment\b/gy,
49246
49183
  element: /\belement\b/gy,
49247
- elementName: /\b(\S+)\b/gy,
49184
+ elementName: /\b\S+\b/gy,
49248
49185
  property: /\bproperty\b/gy,
49249
49186
  propertyList: /\blist\b/gy,
49250
- propertyType: /\b(char|uchar|short|ushort|int|uint|float|double|int8|uint8|int16|uint16|int32|uint32|float32|float64)\b/gy,
49251
- propertyName: /\b(\S+)\b/gy,
49187
+ propertyType: /\b(?:char|uchar|short|ushort|int|uint|float|double|int8|uint8|int16|uint16|int32|uint32|float32|float64)\b/gy,
49188
+ propertyName: /\b\S+\b/gy,
49252
49189
  endHeader: /\bend_header\b/gy,
49253
49190
 
49254
- double: /([+-]?(?:(?:(?:\d*\.\d+)|(?:\d+(?:\.)?))(?:[eE][+-]?\d+)?))/gy,
49255
- int32: /((?:0[xX][\da-fA-F]+)|(?:[+-]?\d+))/gy,
49191
+ double: /[+-]?(?:(?:(?:\d*\.\d+)|(?:\d+(?:\.)?))(?:[eE][+-]?\d+)?)/gy,
49192
+ int32: /(?:0[xX][\da-fA-F]+)|(?:[+-]?\d+)/gy,
49256
49193
  });
49257
49194
 
49258
49195
  /*
@@ -49341,7 +49278,7 @@ Object .assign (Object .setPrototypeOf (PLYAParser .prototype, Parser_X3DParser
49341
49278
  {
49342
49279
  if (PLYAParser_Grammar .comment .parse (this) && PLYAParser_Grammar .untilEndOfLine .parse (this))
49343
49280
  {
49344
- this .comments .push (this .result [1] .trim ());
49281
+ this .comments .push (this .result [0] .trim ());
49345
49282
  return true;
49346
49283
  }
49347
49284
 
@@ -49353,7 +49290,7 @@ Object .assign (Object .setPrototypeOf (PLYAParser .prototype, Parser_X3DParser
49353
49290
 
49354
49291
  if (PLYAParser_Grammar .double .parse (this))
49355
49292
  {
49356
- this .value = parseFloat (this .result [1]);
49293
+ this .value = parseFloat (this .result [0]);
49357
49294
 
49358
49295
  return true;
49359
49296
  }
@@ -49366,7 +49303,7 @@ Object .assign (Object .setPrototypeOf (PLYAParser .prototype, Parser_X3DParser
49366
49303
 
49367
49304
  if (PLYAParser_Grammar .int32 .parse (this))
49368
49305
  {
49369
- this .value = parseInt (this .result [1]);
49306
+ this .value = parseInt (this .result [0]);
49370
49307
 
49371
49308
  return true;
49372
49309
  }
@@ -49440,7 +49377,7 @@ Object .assign (Object .setPrototypeOf (PLYAParser .prototype, Parser_X3DParser
49440
49377
 
49441
49378
  if (PLYAParser_Grammar .elementName .parse (this))
49442
49379
  {
49443
- const name = this .result [1];
49380
+ const name = this .result [0];
49444
49381
 
49445
49382
  if (this .int32 ())
49446
49383
  {
@@ -49477,14 +49414,14 @@ Object .assign (Object .setPrototypeOf (PLYAParser .prototype, Parser_X3DParser
49477
49414
  if (PLYAParser_Grammar .propertyType .parse (this))
49478
49415
  {
49479
49416
  const
49480
- type = this .result [1],
49417
+ type = this .result [0],
49481
49418
  value = this .typeMapping .get (type);
49482
49419
 
49483
49420
  this .whitespacesNoLineTerminator ();
49484
49421
 
49485
49422
  if (PLYAParser_Grammar .propertyName .parse (this))
49486
49423
  {
49487
- const name = this .result [1];
49424
+ const name = this .result [0];
49488
49425
 
49489
49426
  properties .push ({ type, value, name });
49490
49427
  return true;
@@ -49497,21 +49434,21 @@ Object .assign (Object .setPrototypeOf (PLYAParser .prototype, Parser_X3DParser
49497
49434
 
49498
49435
  if (PLYAParser_Grammar .propertyType .parse (this))
49499
49436
  {
49500
- const count = this .typeMapping .get (this .result [1]);
49437
+ const count = this .typeMapping .get (this .result [0]);
49501
49438
 
49502
49439
  this .whitespacesNoLineTerminator ();
49503
49440
 
49504
49441
  if (PLYAParser_Grammar .propertyType .parse (this))
49505
49442
  {
49506
49443
  const
49507
- type = this .result [1],
49444
+ type = this .result [0],
49508
49445
  value = this .typeMapping .get (type);
49509
49446
 
49510
49447
  this .whitespacesNoLineTerminator ();
49511
49448
 
49512
49449
  if (PLYAParser_Grammar .propertyName .parse (this))
49513
49450
  {
49514
- const name = this .result [1];
49451
+ const name = this .result [0];
49515
49452
 
49516
49453
  properties .push ({ count, type, value, name });
49517
49454
  return true;
@@ -50896,8 +50833,8 @@ const MatrixStack_default_ = MatrixStack;
50896
50833
  x_ite_Namespace .add ("MatrixStack", "standard/Math/Utility/MatrixStack", MatrixStack_default_);
50897
50834
  /* harmony default export */ const Utility_MatrixStack = (MatrixStack_default_);
50898
50835
  ;// CONCATENATED MODULE: ./src/x_ite/Parser/SVGParser.js
50899
- /* provided dependency */ var SVGParser_$ = __webpack_require__(275);
50900
- /* provided dependency */ var libtess = __webpack_require__(224);
50836
+ /* provided dependency */ var SVGParser_$ = __webpack_require__(432);
50837
+ /* provided dependency */ var libtess = __webpack_require__(509);
50901
50838
  /*******************************************************************************
50902
50839
  *
50903
50840
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -50975,12 +50912,12 @@ const SVGParser_Grammar = Parser_Expressions ({
50975
50912
  closeParenthesis: /\)/gy,
50976
50913
 
50977
50914
  // Units
50978
- length: /(em|ex|px|in|cm|mm|pt|pc|%)/gy,
50915
+ length: /em|ex|px|in|cm|mm|pt|pc|%/gy,
50979
50916
  percent: /%/gy,
50980
50917
 
50981
50918
  // Values
50982
- int32: /((?:0[xX][\da-fA-F]+)|(?:[+-]?\d+))/gy,
50983
- double: /([+-]?(?:(?:(?:\d*\.\d+)|(?:\d+(?:\.)?))(?:[eE][+-]?\d+)?))/gy,
50919
+ int32: /(?:0[xX][\da-fA-F]+)|(?:[+-]?\d+)/gy,
50920
+ double: /[+-]?(?:(?:(?:\d*\.\d+)|(?:\d+(?:\.)?))(?:[eE][+-]?\d+)?)/gy,
50984
50921
  constants: /([+-])((?:NAN|INF|INFINITY))/igy,
50985
50922
  matrix: /matrix/gy,
50986
50923
  translate: /translate/gy,
@@ -50988,9 +50925,9 @@ const SVGParser_Grammar = Parser_Expressions ({
50988
50925
  scale: /scale/gy,
50989
50926
  skewX: /skewX/gy,
50990
50927
  skewY: /skewY/gy,
50991
- color: /([a-zA-Z]+|#[\da-fA-F]+|rgba?\(.*?\))/gy,
50928
+ color: /[a-zA-Z]+|#[\da-fA-F]+|rgba?\(.*?\)/gy,
50992
50929
  url: /url\("?(.*?)"?\)/gy,
50993
- path: /([mMlLhHvVqQtTcCsSaAzZ])/gy,
50930
+ path: /[mMlLhHvVqQtTcCsSaAzZ]/gy,
50994
50931
  });
50995
50932
 
50996
50933
  /*
@@ -52176,7 +52113,7 @@ Object .assign (Object .setPrototypeOf (SVGParser .prototype, Parser_X3DParser .
52176
52113
 
52177
52114
  if (SVGParser_Grammar .length .parse (this))
52178
52115
  {
52179
- switch (this .result [1])
52116
+ switch (this .result [0])
52180
52117
  {
52181
52118
  case "em":
52182
52119
  value *= EM;
@@ -52302,7 +52239,7 @@ Object .assign (Object .setPrototypeOf (SVGParser .prototype, Parser_X3DParser .
52302
52239
  break;
52303
52240
 
52304
52241
  previous = command;
52305
- command = this .result [1];
52242
+ command = this .result [0];
52306
52243
  relative = command === command .toLowerCase ();
52307
52244
 
52308
52245
  switch (command)
@@ -53350,7 +53287,7 @@ Object .assign (Object .setPrototypeOf (SVGParser .prototype, Parser_X3DParser .
53350
53287
 
53351
53288
  if (SVGParser_Grammar .int32 .parse (this))
53352
53289
  {
53353
- this .value = parseInt (this .result [1]);
53290
+ this .value = parseInt (this .result [0]);
53354
53291
 
53355
53292
  return true;
53356
53293
  }
@@ -53363,7 +53300,7 @@ Object .assign (Object .setPrototypeOf (SVGParser .prototype, Parser_X3DParser .
53363
53300
 
53364
53301
  if (SVGParser_Grammar .double .parse (this))
53365
53302
  {
53366
- this .value = parseFloat (this .result [1]);
53303
+ this .value = parseFloat (this .result [0]);
53367
53304
 
53368
53305
  return true;
53369
53306
  }
@@ -53391,7 +53328,7 @@ Object .assign (Object .setPrototypeOf (SVGParser .prototype, Parser_X3DParser .
53391
53328
 
53392
53329
  const defaultColor = this .cssColor (c);
53393
53330
 
53394
- this .value = color .set (... this .convertColor (this .result [1], defaultColor));
53331
+ this .value = color .set (... this .convertColor (this .result [0], defaultColor));
53395
53332
 
53396
53333
  return true;
53397
53334
  };
@@ -53665,7 +53602,7 @@ const SVGParser_default_ = SVGParser;
53665
53602
  x_ite_Namespace .add ("SVGParser", "x_ite/Parser/SVGParser", SVGParser_default_);
53666
53603
  /* harmony default export */ const Parser_SVGParser = (SVGParser_default_);
53667
53604
  ;// CONCATENATED MODULE: ./src/x_ite/Parser/GoldenGate.js
53668
- /* provided dependency */ var GoldenGate_$ = __webpack_require__(275);
53605
+ /* provided dependency */ var GoldenGate_$ = __webpack_require__(432);
53669
53606
  /*******************************************************************************
53670
53607
  *
53671
53608
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -54015,7 +53952,7 @@ const Plane3_default_ = Plane3;
54015
53952
  x_ite_Namespace .add ("Plane3", "standard/Math/Geometry/Plane3", Plane3_default_);
54016
53953
  /* harmony default export */ const Geometry_Plane3 = (Plane3_default_);
54017
53954
  ;// CONCATENATED MODULE: ./src/standard/Math/Geometry/Triangle3.js
54018
- /* provided dependency */ var Triangle3_libtess = __webpack_require__(224);
53955
+ /* provided dependency */ var Triangle3_libtess = __webpack_require__(509);
54019
53956
  /*******************************************************************************
54020
53957
  *
54021
53958
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -60223,7 +60160,7 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
60223
60160
  {
60224
60161
  this .vertexArrayObject .update ();
60225
60162
 
60226
- this .updateParticles = true;
60163
+ this .updateInstances = true;
60227
60164
  },
60228
60165
  buildTexCoords ()
60229
60166
  {
@@ -60973,7 +60910,7 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
60973
60910
  {
60974
60911
  const instances = shapeNode .getInstances ();
60975
60912
 
60976
- if (instances .vertexArrayObject .update (this .updateParticles) .enable (shaderNode .getProgram ()))
60913
+ if (instances .vertexArrayObject .update (this .updateInstances) .enable (shaderNode .getProgram ()))
60977
60914
  {
60978
60915
  const { instancesStride, particleOffset, matrixOffset, normalMatrixOffset } = shapeNode;
60979
60916
 
@@ -60985,11 +60922,14 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
60985
60922
  if (normalMatrixOffset !== undefined)
60986
60923
  shaderNode .enableInstanceNormalMatrixAttribute (gl, instances, instancesStride, normalMatrixOffset, 1);
60987
60924
 
60925
+ if (this .coordIndices .length)
60926
+ shaderNode .enableCoordIndexAttribute (gl, this .coordIndexBuffer, 0, 0);
60927
+
60988
60928
  shaderNode .enableTexCoordAttribute (gl, this .texCoordBuffers, 0, 0);
60989
60929
  shaderNode .enableNormalAttribute (gl, this .normalBuffer, 0, 0);
60990
60930
  shaderNode .enableVertexAttribute (gl, this .vertexBuffer, 0, 0);
60991
60931
 
60992
- this .updateParticles = false;
60932
+ this .updateInstances = false;
60993
60933
  }
60994
60934
 
60995
60935
  gl .drawArraysInstanced (this .primitiveMode, 0, this .vertexCount, shapeNode .getNumInstances ());
@@ -61034,18 +60974,24 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
61034
60974
 
61035
60975
  const instances = shapeNode .getInstances ();
61036
60976
 
61037
- if (instances .vertexArrayObject .update (this .updateParticles) .enable (shaderNode .getProgram ()))
60977
+ if (instances .vertexArrayObject .update (this .updateInstances) .enable (shaderNode .getProgram ()))
61038
60978
  {
61039
- const { instancesStride, particleOffset, matrixOffset, normalMatrixOffset } = shapeNode;
60979
+ const { instancesStride, particleOffset, velocityOffset, matrixOffset, normalMatrixOffset } = shapeNode;
61040
60980
 
61041
60981
  if (particleOffset !== undefined)
61042
60982
  shaderNode .enableParticleAttribute (gl, instances, instancesStride, particleOffset, 1);
61043
60983
 
60984
+ if (velocityOffset !== undefined)
60985
+ shaderNode .enableParticleVelocityAttribute (gl, instances, instancesStride, velocityOffset, 1);
60986
+
61044
60987
  shaderNode .enableInstanceMatrixAttribute (gl, instances, instancesStride, matrixOffset, 1);
61045
60988
 
61046
60989
  if (normalMatrixOffset !== undefined)
61047
60990
  shaderNode .enableInstanceNormalMatrixAttribute (gl, instances, instancesStride, normalMatrixOffset, 1);
61048
60991
 
60992
+ if (this .coordIndices .length)
60993
+ shaderNode .enableCoordIndexAttribute (gl, this .coordIndexBuffer, 0, 0);
60994
+
61049
60995
  for (let i = 0, length = attribNodes .length; i < length; ++ i)
61050
60996
  attribNodes [i] .enable (gl, shaderNode, attribBuffers [i]);
61051
60997
 
@@ -61059,7 +61005,7 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, Core_X3DNode
61059
61005
  shaderNode .enableNormalAttribute (gl, this .normalBuffer, 0, 0);
61060
61006
  shaderNode .enableVertexAttribute (gl, this .vertexBuffer, 0, 0);
61061
61007
 
61062
- this .updateParticles = false;
61008
+ this .updateInstances = false;
61063
61009
  }
61064
61010
 
61065
61011
  // Draw depending on wireframe, solid and transparent.
@@ -62444,9 +62390,23 @@ Object .assign (Object .setPrototypeOf (X3DTexture2DNode .prototype, Texturing_X
62444
62390
  },
62445
62391
  clearTexture ()
62446
62392
  {
62447
- this .setTextureFromData (1, 1, false, false, defaultData);
62393
+ this .setTextureData (1, 1, false, false, defaultData);
62394
+ },
62395
+ getTextureData (texture = this .getTexture (), width = this .getWidth (), height = this .getHeight ())
62396
+ {
62397
+ const
62398
+ gl = this .getBrowser () .getContext (),
62399
+ framebuffer = gl .createFramebuffer (),
62400
+ data = new Uint8Array (width * height * 4);
62401
+
62402
+ gl .bindFramebuffer (gl .FRAMEBUFFER, framebuffer);
62403
+ gl .framebufferTexture2D (gl .FRAMEBUFFER, gl .COLOR_ATTACHMENT0, gl .TEXTURE_2D, texture, 0);
62404
+ gl .readPixels (0, 0, width, height, gl .RGBA, gl .UNSIGNED_BYTE, data);
62405
+ gl .deleteFramebuffer (framebuffer);
62406
+
62407
+ return data;
62448
62408
  },
62449
- setTextureFromData (width, height, colorSpaceConversion, transparent, data)
62409
+ setTextureData (width, height, colorSpaceConversion, transparent, data)
62450
62410
  {
62451
62411
  this .width = width;
62452
62412
  this .height = height;
@@ -62467,7 +62427,7 @@ Object .assign (Object .setPrototypeOf (X3DTexture2DNode .prototype, Texturing_X
62467
62427
  this .updateTextureParameters ();
62468
62428
  this .addNodeEvent ();
62469
62429
  },
62470
- updateTextureFromData (data)
62430
+ updateTextureData (data)
62471
62431
  {
62472
62432
  const gl = this .getBrowser () .getContext ();
62473
62433
 
@@ -62521,7 +62481,7 @@ const X3DTexture2DNode_default_ = X3DTexture2DNode;
62521
62481
  x_ite_Namespace .add ("X3DTexture2DNode", "x_ite/Components/Texturing/X3DTexture2DNode", X3DTexture2DNode_default_);
62522
62482
  /* harmony default export */ const Texturing_X3DTexture2DNode = (X3DTexture2DNode_default_);
62523
62483
  ;// CONCATENATED MODULE: ./src/x_ite/Components/Texturing/ImageTexture.js
62524
- /* provided dependency */ var ImageTexture_$ = __webpack_require__(275);
62484
+ /* provided dependency */ var ImageTexture_$ = __webpack_require__(432);
62525
62485
  /*******************************************************************************
62526
62486
  *
62527
62487
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -62737,7 +62697,7 @@ Object .assign (Object .setPrototypeOf (ImageTexture .prototype, Texturing_X3DTe
62737
62697
 
62738
62698
  // Upload image to GPU.
62739
62699
 
62740
- this .setTextureFromData (width, height, false, transparent, data);
62700
+ this .setTextureData (width, height, false, transparent, data);
62741
62701
  this .setLoadState (Base_X3DConstants .COMPLETE_STATE);
62742
62702
  }
62743
62703
  else
@@ -62746,7 +62706,7 @@ Object .assign (Object .setPrototypeOf (ImageTexture .prototype, Texturing_X3DTe
62746
62706
 
62747
62707
  // Upload image to GPU.
62748
62708
 
62749
- this .setTextureFromData (width, height, this ._colorSpaceConversion .getValue (), this .isTransparent (), image);
62709
+ this .setTextureData (width, height, this ._colorSpaceConversion .getValue (), this .isTransparent (), image);
62750
62710
  this .setTransparent (this .isImageTransparent (this .getTextureData (this .getTexture (), width, height)));
62751
62711
  this .setLoadState (Base_X3DConstants .COMPLETE_STATE);
62752
62712
  this .addNodeEvent ();
@@ -62758,20 +62718,6 @@ Object .assign (Object .setPrototypeOf (ImageTexture .prototype, Texturing_X3DTe
62758
62718
  this .setError ({ type: error .message });
62759
62719
  }
62760
62720
  },
62761
- getTextureData (texture, width, height)
62762
- {
62763
- const
62764
- gl = this .getBrowser () .getContext (),
62765
- framebuffer = gl .createFramebuffer (),
62766
- data = new Uint8Array (width * height * 4);
62767
-
62768
- gl .bindFramebuffer (gl .FRAMEBUFFER, framebuffer);
62769
- gl .framebufferTexture2D (gl .FRAMEBUFFER, gl .COLOR_ATTACHMENT0, gl .TEXTURE_2D, texture, 0);
62770
- gl .readPixels (0, 0, width, height, gl .RGBA, gl .UNSIGNED_BYTE, data);
62771
- gl .deleteFramebuffer (framebuffer);
62772
-
62773
- return data;
62774
- },
62775
62721
  dispose ()
62776
62722
  {
62777
62723
  Networking_X3DUrlObject .prototype .dispose .call (this);
@@ -66119,7 +66065,7 @@ const X3DWorld_default_ = X3DWorld;
66119
66065
  x_ite_Namespace .add ("X3DWorld", "x_ite/Execution/X3DWorld", X3DWorld_default_);
66120
66066
  /* harmony default export */ const Execution_X3DWorld = (X3DWorld_default_);
66121
66067
  ;// CONCATENATED MODULE: ./src/x_ite/InputOutput/FileLoader.js
66122
- /* provided dependency */ var FileLoader_$ = __webpack_require__(275);
66068
+ /* provided dependency */ var FileLoader_$ = __webpack_require__(432);
66123
66069
  /*******************************************************************************
66124
66070
  *
66125
66071
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -66173,7 +66119,7 @@ x_ite_Namespace .add ("X3DWorld", "x_ite/Execution/X3DWorld", X3DWorld_default_)
66173
66119
 
66174
66120
 
66175
66121
 
66176
- const foreignContentTypes = new Set ([
66122
+ const foreignMimeType = new Set ([
66177
66123
  "text/html",
66178
66124
  "application/xhtml+xml",
66179
66125
  ])
@@ -66363,7 +66309,7 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
66363
66309
  this .URL .pathname === referer .pathname &&
66364
66310
  this .URL .hash)
66365
66311
  {
66366
- this .bindViewpoint (decodeURIComponent (this .URL .hash .substr (1)));
66312
+ this .bindViewpoint (decodeURIComponent (this .URL .hash .substring (1)));
66367
66313
  return;
66368
66314
  }
66369
66315
  }
@@ -66384,15 +66330,15 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
66384
66330
  // Load URL async
66385
66331
 
66386
66332
  const
66387
- options = { cache: this .node .getCache () ? "default" : "reload", signal: this .controller .signal },
66388
- response = this .checkResponse (await fetch (this .URL, options)),
66389
- contentType = response .headers .get ("content-type") ?.replace (/;.*$/, "");
66333
+ options = { cache: this .node .getCache () ? "default" : "reload", signal: this .controller .signal },
66334
+ response = this .checkResponse (await fetch (this .URL, options)),
66335
+ mimeType = response .headers .get ("content-type") ?.replace (/;.*$/, "");
66390
66336
 
66391
66337
  if (this .foreign)
66392
66338
  {
66393
- // console .log (contentType);
66339
+ // console .log (mimeType);
66394
66340
 
66395
- if (foreignContentTypes .has (contentType))
66341
+ if (foreignMimeType .has (mimeType))
66396
66342
  return this .foreign (this .URL .href, this .target);
66397
66343
  }
66398
66344
 
@@ -67055,7 +67001,7 @@ const ProtoDeclarationArray_default_ = ProtoDeclarationArray;
67055
67001
  x_ite_Namespace .add ("ProtoDeclarationArray", "x_ite/Prototype/ProtoDeclarationArray", ProtoDeclarationArray_default_);
67056
67002
  /* harmony default export */ const Prototype_ProtoDeclarationArray = (ProtoDeclarationArray_default_);
67057
67003
  ;// CONCATENATED MODULE: ./src/x_ite/Routing/X3DRoute.js
67058
- /* provided dependency */ var X3DRoute_$ = __webpack_require__(275);
67004
+ /* provided dependency */ var X3DRoute_$ = __webpack_require__(432);
67059
67005
  /*******************************************************************************
67060
67006
  *
67061
67007
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -67855,7 +67801,7 @@ Object .assign (Object .setPrototypeOf (X3DExecutionContext .prototype, Base_X3D
67855
67801
  throw new Error (`Couldn't add named node: node named '${name}' is already in use.`);
67856
67802
 
67857
67803
  if (this [_namedNodes] .get (node .getName ()) ?.getValue () === node)
67858
- throw new Error (`Couldn't add named node: node named '${node .getName ()}' is already added.`);
67804
+ throw new Error (`Couldn't add named node: node named '${node .getName ()}' already has a name.`);
67859
67805
 
67860
67806
  // Add named node.
67861
67807
 
@@ -77434,6 +77380,17 @@ function X3DTransformMatrix3DNode (executionContext)
77434
77380
 
77435
77381
  Object .assign (Object .setPrototypeOf (X3DTransformMatrix3DNode .prototype, Grouping_X3DGroupingNode .prototype),
77436
77382
  {
77383
+ getBBox (bbox, shadows)
77384
+ {
77385
+ if (this ._bboxSize .getValue () .equals (this .getDefaultBBoxSize ()))
77386
+ return this .getSubBBox (bbox, shadows) .multRight (this .matrix);
77387
+
77388
+ return bbox .set (this ._bboxSize .getValue (), this ._bboxCenter .getValue ());
77389
+ },
77390
+ getMatrix ()
77391
+ {
77392
+ return this .matrix;
77393
+ },
77437
77394
  setMatrix (matrix)
77438
77395
  {
77439
77396
  if (matrix .equals (Numbers_Matrix4 .Identity))
@@ -77451,10 +77408,6 @@ Object .assign (Object .setPrototypeOf (X3DTransformMatrix3DNode .prototype, Gro
77451
77408
  delete this .traverse;
77452
77409
  }
77453
77410
  },
77454
- getMatrix ()
77455
- {
77456
- return this .matrix;
77457
- },
77458
77411
  setTransform (t, r, s, so, c)
77459
77412
  {
77460
77413
  if (t .equals (Numbers_Vector3 .Zero) && r .equals (Numbers_Rotation4 .Identity) && s .equals (Numbers_Vector3 .One))
@@ -77472,13 +77425,6 @@ Object .assign (Object .setPrototypeOf (X3DTransformMatrix3DNode .prototype, Gro
77472
77425
  delete this .traverse;
77473
77426
  }
77474
77427
  },
77475
- getBBox (bbox, shadows)
77476
- {
77477
- if (this ._bboxSize .getValue () .equals (this .getDefaultBBoxSize ()))
77478
- return this .getSubBBox (bbox, shadows) .multRight (this .matrix);
77479
-
77480
- return bbox .set (this ._bboxSize .getValue (), this ._bboxCenter .getValue ());
77481
- },
77482
77428
  traverse (type, renderObject)
77483
77429
  {
77484
77430
  const modelViewMatrix = renderObject .getModelViewMatrix ();
@@ -87153,10 +87099,10 @@ function X3DLineGeometryNode (executionContext)
87153
87099
  browser = this .getBrowser (),
87154
87100
  gl = browser .getContext ();
87155
87101
 
87156
- this .lineStipples = new Float32Array ();
87157
- this .lineStippleBuffer = gl .createBuffer ();
87158
- this .trianglesBuffer = gl .createBuffer ();
87159
- this .thickVertexArrayObject = new Rendering_VertexArray (gl);
87102
+ this .lineStipples = new Float32Array ();
87103
+ this .lineStippleBuffer = gl .createBuffer ();
87104
+ this .lineTrianglesBuffer = gl .createBuffer ();
87105
+ this .thickLinesVertexArrayObject = new Rendering_VertexArray (gl);
87160
87106
 
87161
87107
  this .setGeometryType (1);
87162
87108
  this .setPrimitiveMode (gl .LINES);
@@ -87177,25 +87123,25 @@ Object .assign (Object .setPrototypeOf (X3DLineGeometryNode .prototype, Renderin
87177
87123
  {
87178
87124
  Rendering_X3DGeometryNode .prototype .updateVertexArrays .call (this);
87179
87125
 
87180
- this .thickVertexArrayObject .update ();
87126
+ this .thickLinesVertexArrayObject .update ();
87181
87127
  },
87182
87128
  buildTexCoords ()
87183
87129
  {
87184
87130
  // Line stipple support.
87185
87131
 
87186
- if (this .lineStipples .length / 6 === this .getVertices () .length / 8)
87132
+ const numLines = this .getVertices () .length / 8;
87133
+
87134
+ if (this .lineStipples .length / 6 === numLines)
87187
87135
  return;
87188
87136
 
87189
- const
87190
- gl = this .getBrowser () .getContext (),
87191
- numLines = this .getVertices () .length / 8;
87137
+ const gl = this .getBrowser () .getContext ();
87192
87138
 
87193
87139
  this .lineStipples = new Float32Array (numLines * 6);
87194
87140
 
87195
87141
  gl .bindBuffer (gl .ARRAY_BUFFER, this .lineStippleBuffer);
87196
87142
  gl .bufferData (gl .ARRAY_BUFFER, this .lineStipples, gl .DYNAMIC_DRAW);
87197
87143
 
87198
- gl .bindBuffer (gl .ARRAY_BUFFER, this .trianglesBuffer);
87144
+ gl .bindBuffer (gl .ARRAY_BUFFER, this .lineTrianglesBuffer);
87199
87145
  gl .bufferData (gl .ARRAY_BUFFER, new Float32Array (16 * 6 * numLines), gl .DYNAMIC_DRAW);
87200
87146
  },
87201
87147
  updateLengthSoFar: (() =>
@@ -87252,7 +87198,7 @@ Object .assign (Object .setPrototypeOf (X3DLineGeometryNode .prototype, Renderin
87252
87198
  {
87253
87199
  // Setup vertex attributes.
87254
87200
 
87255
- if (this .thickVertexArrayObject .enable (shaderNode .getProgram ()))
87201
+ if (this .thickLinesVertexArrayObject .enable (shaderNode .getProgram ()))
87256
87202
  {
87257
87203
  const
87258
87204
  stride = 16 * Float32Array .BYTES_PER_ELEMENT,
@@ -87261,15 +87207,13 @@ Object .assign (Object .setPrototypeOf (X3DLineGeometryNode .prototype, Renderin
87261
87207
  normalOffset = 9 * Float32Array .BYTES_PER_ELEMENT,
87262
87208
  vertexOffset = 12 * Float32Array .BYTES_PER_ELEMENT;
87263
87209
 
87264
- shaderNode .enableCoordIndexAttribute (gl, this .trianglesBuffer, stride, coordIndexOffset);
87265
- shaderNode .enableLineStippleAttribute (gl, this .trianglesBuffer, stride, lineStippleOffset);
87210
+ shaderNode .enableCoordIndexAttribute (gl, this .lineTrianglesBuffer, stride, coordIndexOffset);
87211
+ shaderNode .enableLineStippleAttribute (gl, this .lineTrianglesBuffer, stride, lineStippleOffset);
87266
87212
 
87267
87213
  if (this .hasNormals)
87268
- shaderNode .enableNormalAttribute (gl, this .trianglesBuffer, stride, normalOffset);
87214
+ shaderNode .enableNormalAttribute (gl, this .lineTrianglesBuffer, stride, normalOffset);
87269
87215
 
87270
- shaderNode .enableVertexAttribute (gl, this .trianglesBuffer, stride, vertexOffset);
87271
-
87272
- gl .bindBuffer (gl .ARRAY_BUFFER, null);
87216
+ shaderNode .enableVertexAttribute (gl, this .lineTrianglesBuffer, stride, vertexOffset);
87273
87217
  }
87274
87218
 
87275
87219
  gl .frontFace (gl .CCW);
@@ -87338,31 +87282,30 @@ Object .assign (Object .setPrototypeOf (X3DLineGeometryNode .prototype, Renderin
87338
87282
  gl .uniform4f (transformShaderNode .viewport, viewport .x, viewport .y, viewport .z, viewport .w);
87339
87283
  gl .uniformMatrix4fv (transformShaderNode .modelViewProjectionMatrix, false, modelViewProjectionMatrixArray);
87340
87284
  gl .uniformMatrix4fv (transformShaderNode .invModelViewProjectionMatrix, false, invModelViewProjectionMatrixArray);
87341
- gl .uniform1f (transformShaderNode .scale, linePropertiesNode .getLinewidthScaleFactor () / 2);
87285
+ gl .uniform1f (transformShaderNode .linewidthScaleFactor1_2, linePropertiesNode .getLinewidthScaleFactor () / 2);
87342
87286
 
87343
87287
  // Setup vertex attributes.
87344
87288
 
87345
- if (this .thickVertexArrayObject .enable (transformShaderNode .getProgram ()))
87289
+ if (this .thickLinesVertexArrayObject .enable (transformShaderNode .getProgram ()))
87346
87290
  {
87347
87291
  const
87348
- coordIndexStride = 2 * Float32Array .BYTES_PER_ELEMENT,
87349
- coordIndexOffset0 = 0,
87350
- coordIndexOffset1 = 1 * Float32Array .BYTES_PER_ELEMENT,
87351
- lineStippleStride = 6 * Float32Array .BYTES_PER_ELEMENT,
87352
- lineStippleOffset0 = 0,
87353
- lineStippleOffset1 = 3 * Float32Array .BYTES_PER_ELEMENT,
87354
- fogDepthStride = 2 * Float32Array .BYTES_PER_ELEMENT,
87355
- fogDepthOffset0 = 0,
87356
- fogDepthOffset1 = 1 * Float32Array .BYTES_PER_ELEMENT,
87357
- colorStride = 8 * Float32Array .BYTES_PER_ELEMENT,
87358
- colorOffset0 = 0,
87359
- colorOffset1 = 4 * Float32Array .BYTES_PER_ELEMENT,
87360
- normalStride = 6 * Float32Array .BYTES_PER_ELEMENT,
87361
- normalOffset0 = 0,
87362
- normalOffset1 = 3 * Float32Array .BYTES_PER_ELEMENT,
87363
- vertexStride = 8 * Float32Array .BYTES_PER_ELEMENT,
87364
- vertexOffset0 = 0,
87365
- vertexOffset1 = 4 * Float32Array .BYTES_PER_ELEMENT;
87292
+ coordIndexStride = 2 * Float32Array .BYTES_PER_ELEMENT,
87293
+ coordIndexOffset0 = 0,
87294
+ coordIndexOffset1 = 1 * Float32Array .BYTES_PER_ELEMENT,
87295
+ lengthSoFarStride = 6 * Float32Array .BYTES_PER_ELEMENT,
87296
+ lengthSoFarOffset = 5 * Float32Array .BYTES_PER_ELEMENT,
87297
+ fogDepthStride = 2 * Float32Array .BYTES_PER_ELEMENT,
87298
+ fogDepthOffset0 = 0,
87299
+ fogDepthOffset1 = 1 * Float32Array .BYTES_PER_ELEMENT,
87300
+ colorStride = 8 * Float32Array .BYTES_PER_ELEMENT,
87301
+ colorOffset0 = 0,
87302
+ colorOffset1 = 4 * Float32Array .BYTES_PER_ELEMENT,
87303
+ normalStride = 6 * Float32Array .BYTES_PER_ELEMENT,
87304
+ normalOffset0 = 0,
87305
+ normalOffset1 = 3 * Float32Array .BYTES_PER_ELEMENT,
87306
+ vertexStride = 8 * Float32Array .BYTES_PER_ELEMENT,
87307
+ vertexOffset0 = 0,
87308
+ vertexOffset1 = 4 * Float32Array .BYTES_PER_ELEMENT;
87366
87309
 
87367
87310
  // for (let i = 0, length = attribNodes .length; i < length; ++ i)
87368
87311
  // attribNodes [i] .enable (gl, shaderNode, attribBuffers [i]);
@@ -87373,8 +87316,7 @@ Object .assign (Object .setPrototypeOf (X3DLineGeometryNode .prototype, Renderin
87373
87316
  transformShaderNode .enableFloatAttrib (gl, "x3d_CoordIndex1", this .coordIndexBuffer, 1, coordIndexStride, coordIndexOffset1);
87374
87317
  }
87375
87318
 
87376
- transformShaderNode .enableFloatAttrib (gl, "x3d_LineStipple0", this .lineStippleBuffer, 3, lineStippleStride, lineStippleOffset0);
87377
- transformShaderNode .enableFloatAttrib (gl, "x3d_LineStipple1", this .lineStippleBuffer, 3, lineStippleStride, lineStippleOffset1);
87319
+ transformShaderNode .enableFloatAttrib (gl, "x3d_LengthSoFar", this .lineStippleBuffer, 1, lengthSoFarStride, lengthSoFarOffset);
87378
87320
 
87379
87321
  if (this .hasFogCoords)
87380
87322
  {
@@ -87396,12 +87338,14 @@ Object .assign (Object .setPrototypeOf (X3DLineGeometryNode .prototype, Renderin
87396
87338
 
87397
87339
  transformShaderNode .enableFloatAttrib (gl, "x3d_Vertex0", this .vertexBuffer, 4, vertexStride, vertexOffset0);
87398
87340
  transformShaderNode .enableFloatAttrib (gl, "x3d_Vertex1", this .vertexBuffer, 4, vertexStride, vertexOffset1);
87341
+
87399
87342
  }
87400
87343
 
87401
87344
  // Transform lines.
87402
87345
 
87346
+ gl .bindBuffer (gl .ARRAY_BUFFER, null);
87403
87347
  gl .bindTransformFeedback (gl .TRANSFORM_FEEDBACK, browser .getLineTransformFeedback ());
87404
- gl .bindBufferBase (gl .TRANSFORM_FEEDBACK_BUFFER, 0, this .trianglesBuffer);
87348
+ gl .bindBufferBase (gl .TRANSFORM_FEEDBACK_BUFFER, 0, this .lineTrianglesBuffer);
87405
87349
  gl .enable (gl .RASTERIZER_DISCARD);
87406
87350
  gl .beginTransformFeedback (gl .POINTS);
87407
87351
  gl .drawArraysInstanced (gl .POINTS, 0, this .vertexCount / 2, 2);
@@ -87412,7 +87356,7 @@ Object .assign (Object .setPrototypeOf (X3DLineGeometryNode .prototype, Renderin
87412
87356
  // DEBUG
87413
87357
 
87414
87358
  // const data = new Float32Array (16 * 6 * this .vertexCount / 2);
87415
- // gl .bindBuffer (gl .ARRAY_BUFFER, this .trianglesBuffer);
87359
+ // gl .bindBuffer (gl .ARRAY_BUFFER, this .lineTrianglesBuffer);
87416
87360
  // gl .getBufferSubData (gl .ARRAY_BUFFER, 0, data);
87417
87361
  // console .log (data);
87418
87362
 
@@ -87428,7 +87372,7 @@ Object .assign (Object .setPrototypeOf (X3DLineGeometryNode .prototype, Renderin
87428
87372
 
87429
87373
  // Setup vertex attributes.
87430
87374
 
87431
- if (this .thickVertexArrayObject .enable (shaderNode .getProgram ()))
87375
+ if (this .thickLinesVertexArrayObject .enable (shaderNode .getProgram ()))
87432
87376
  {
87433
87377
  const
87434
87378
  stride = 16 * Float32Array .BYTES_PER_ELEMENT,
@@ -87442,21 +87386,19 @@ Object .assign (Object .setPrototypeOf (X3DLineGeometryNode .prototype, Renderin
87442
87386
  // for (let i = 0, length = attribNodes .length; i < length; ++ i)
87443
87387
  // attribNodes [i] .enable (gl, shaderNode, attribBuffers [i]);
87444
87388
 
87445
- shaderNode .enableCoordIndexAttribute (gl, this .trianglesBuffer, stride, coordIndexOffset);
87446
- shaderNode .enableLineStippleAttribute (gl, this .trianglesBuffer, stride, lineStippleOffset);
87389
+ shaderNode .enableCoordIndexAttribute (gl, this .lineTrianglesBuffer, stride, coordIndexOffset);
87390
+ shaderNode .enableLineStippleAttribute (gl, this .lineTrianglesBuffer, stride, lineStippleOffset);
87447
87391
 
87448
87392
  if (this .hasFogCoords)
87449
- shaderNode .enableFogDepthAttribute (gl, this .trianglesBuffer, stride, fogCoordOffset);
87393
+ shaderNode .enableFogDepthAttribute (gl, this .lineTrianglesBuffer, stride, fogCoordOffset);
87450
87394
 
87451
87395
  if (this .colorMaterial)
87452
- shaderNode .enableColorAttribute (gl, this .trianglesBuffer, stride, colorOffset);
87396
+ shaderNode .enableColorAttribute (gl, this .lineTrianglesBuffer, stride, colorOffset);
87453
87397
 
87454
87398
  if (this .hasNormals)
87455
- shaderNode .enableNormalAttribute (gl, this .trianglesBuffer, stride, normalOffset);
87399
+ shaderNode .enableNormalAttribute (gl, this .lineTrianglesBuffer, stride, normalOffset);
87456
87400
 
87457
- shaderNode .enableVertexAttribute (gl, this .trianglesBuffer, stride, vertexOffset);
87458
-
87459
- gl .bindBuffer (gl .ARRAY_BUFFER, null);
87401
+ shaderNode .enableVertexAttribute (gl, this .lineTrianglesBuffer, stride, vertexOffset);
87460
87402
  }
87461
87403
 
87462
87404
  gl .frontFace (gl .CCW);
@@ -87512,67 +87454,276 @@ Object .assign (Object .setPrototypeOf (X3DLineGeometryNode .prototype, Renderin
87512
87454
  gl .lineWidth (1);
87513
87455
  };
87514
87456
  })(),
87515
- displayInstanced (gl, renderContext, shapeNode)
87457
+ displayInstanced: (() =>
87516
87458
  {
87517
87459
  const
87518
- browser = this .getBrowser (),
87519
- appearanceNode = renderContext .appearanceNode,
87520
- shaderNode = appearanceNode .getShader (this, renderContext),
87521
- renderModeNodes = appearanceNode .getRenderModes (),
87522
- attribNodes = this .getAttrib (),
87523
- attribBuffers = this .getAttribBuffers (),
87524
- primitiveMode = browser .getPrimitiveMode (this .getPrimitiveMode ());
87460
+ matrix = new Numbers_Matrix4 (),
87461
+ modelViewProjectionMatrixArray = new Float32Array (16),
87462
+ invModelViewProjectionMatrixArray = new Float32Array (16);
87525
87463
 
87526
- for (const node of renderModeNodes)
87527
- node .enable (gl);
87464
+ return function (gl, renderContext, shapeNode)
87465
+ {
87466
+ const
87467
+ browser = this .getBrowser (),
87468
+ geometryContext = shapeNode .getGeometryContext (),
87469
+ appearanceNode = renderContext .appearanceNode,
87470
+ linePropertiesNode = appearanceNode .getLineProperties (),
87471
+ shaderNode = appearanceNode .getShader (geometryContext, renderContext),
87472
+ renderModeNodes = appearanceNode .getRenderModes (),
87473
+ attribNodes = this .getAttrib (),
87474
+ attribBuffers = this .getAttribBuffers ();
87528
87475
 
87529
- // Setup shader.
87476
+ if (linePropertiesNode)
87477
+ {
87478
+ if (linePropertiesNode .getApplied () && linePropertiesNode .getLinetype () !== 1)
87479
+ this .updateLengthSoFar (gl, renderContext);
87530
87480
 
87531
- shaderNode .enable (gl);
87532
- shaderNode .setUniforms (gl, this, renderContext);
87481
+ if (linePropertiesNode .getTransformLines ())
87482
+ {
87483
+ const
87484
+ renderObject = renderContext .renderObject,
87485
+ viewport = renderObject .getViewVolume () .getViewport (),
87486
+ projectionMatrix = renderObject .getProjectionMatrix () .get (),
87487
+ primitiveMode = browser .getWireframe () ? gl .TRIANGLES : browser .getPrimitiveMode (gl .TRIANGLES),
87488
+ transformShaderNode = browser .getLineTransformInstancedShader ();
87533
87489
 
87534
- // Setup vertex attributes.
87490
+ modelViewProjectionMatrixArray .set (matrix .assign (renderContext .modelViewMatrix) .multRight (projectionMatrix));
87491
+ invModelViewProjectionMatrixArray .set (matrix .inverse ());
87535
87492
 
87536
- const instances = shapeNode .getInstances ();
87493
+ // Start
87537
87494
 
87538
- if (instances .vertexArrayObject .update (this .updateParticles) .enable (shaderNode .getProgram ()))
87539
- {
87540
- const { instancesStride, particleOffset, matrixOffset, normalMatrixOffset } = shapeNode;
87495
+ transformShaderNode .enable (gl);
87541
87496
 
87542
- if (particleOffset !== undefined)
87543
- shaderNode .enableParticleAttribute (gl, instances, instancesStride, particleOffset, 1);
87497
+ gl .uniform4f (transformShaderNode .viewport, viewport .x, viewport .y, viewport .z, viewport .w);
87498
+ gl .uniformMatrix4fv (transformShaderNode .modelViewProjectionMatrix, false, modelViewProjectionMatrixArray);
87499
+ gl .uniformMatrix4fv (transformShaderNode .invModelViewProjectionMatrix, false, invModelViewProjectionMatrixArray);
87500
+ gl .uniform1f (transformShaderNode .linewidthScaleFactor1_2, linePropertiesNode .getLinewidthScaleFactor () / 2);
87544
87501
 
87545
- shaderNode .enableInstanceMatrixAttribute (gl, instances, instancesStride, matrixOffset, 1);
87502
+ // Setup vertex attributes.
87546
87503
 
87547
- if (normalMatrixOffset !== undefined)
87548
- shaderNode .enableInstanceNormalMatrixAttribute (gl, instances, instancesStride, normalMatrixOffset, 1);
87504
+ const instances = shapeNode .getInstances ();
87549
87505
 
87550
- for (let i = 0, length = attribNodes .length; i < length; ++ i)
87551
- attribNodes [i] .enable (gl, shaderNode, attribBuffers [i]);
87506
+ if (instances .thickLinesVertexArrayObject .update (this .updateInstances) .enable (transformShaderNode .getProgram ()))
87507
+ {
87508
+ const { instancesStride, matrixOffset, normalMatrixOffset, colorOffset } = shapeNode;
87552
87509
 
87553
- if (this .hasFogCoords)
87554
- shaderNode .enableFogDepthAttribute (gl, this .fogDepthBuffer, 0, 0);
87510
+ transformShaderNode .enableInstanceMatrixAttribute (gl, instances, instancesStride, matrixOffset, 2);
87555
87511
 
87556
- if (this .colorMaterial)
87557
- shaderNode .enableColorAttribute (gl, this .colorBuffer, 0, 0);
87512
+ if (normalMatrixOffset !== undefined)
87513
+ transformShaderNode .enableInstanceNormalMatrixAttribute (gl, instances, instancesStride, normalMatrixOffset, 2);
87558
87514
 
87559
- if (this .hasNormals)
87560
- shaderNode .enableNormalAttribute (gl, this .normalBuffer, 0, 0);
87515
+ const
87516
+ coordIndexStride = 2 * Float32Array .BYTES_PER_ELEMENT,
87517
+ coordIndexOffset0 = 0,
87518
+ coordIndexOffset1 = 1 * Float32Array .BYTES_PER_ELEMENT,
87519
+ lengthSoFarStride = 6 * Float32Array .BYTES_PER_ELEMENT,
87520
+ lengthSoFarOffset = 5 * Float32Array .BYTES_PER_ELEMENT,
87521
+ fogDepthStride = 2 * Float32Array .BYTES_PER_ELEMENT,
87522
+ fogDepthOffset0 = 0,
87523
+ fogDepthOffset1 = 1 * Float32Array .BYTES_PER_ELEMENT,
87524
+ colorStride = 8 * Float32Array .BYTES_PER_ELEMENT,
87525
+ colorOffset0 = 0,
87526
+ colorOffset1 = 4 * Float32Array .BYTES_PER_ELEMENT,
87527
+ normalStride = 6 * Float32Array .BYTES_PER_ELEMENT,
87528
+ normalOffset0 = 0,
87529
+ normalOffset1 = 3 * Float32Array .BYTES_PER_ELEMENT,
87530
+ vertexStride = 8 * Float32Array .BYTES_PER_ELEMENT,
87531
+ vertexOffset0 = 0,
87532
+ vertexOffset1 = 4 * Float32Array .BYTES_PER_ELEMENT;
87561
87533
 
87562
- shaderNode .enableVertexAttribute (gl, this .vertexBuffer, 0, 0);
87534
+ // for (let i = 0, length = attribNodes .length; i < length; ++ i)
87535
+ // attribNodes [i] .enable (gl, shaderNode, attribBuffers [i]);
87563
87536
 
87564
- this .updateParticles = false;
87565
- }
87537
+ if (this .coordIndices .length)
87538
+ {
87539
+ transformShaderNode .enableFloatAttrib (gl, "x3d_CoordIndex0", this .coordIndexBuffer, 1, coordIndexStride, coordIndexOffset0);
87540
+ transformShaderNode .enableFloatAttrib (gl, "x3d_CoordIndex1", this .coordIndexBuffer, 1, coordIndexStride, coordIndexOffset1);
87541
+ }
87566
87542
 
87567
- // Wireframes are always solid so only one drawing call is needed.
87543
+ transformShaderNode .enableFloatAttrib (gl, "x3d_LengthSoFar", this .lineStippleBuffer, 1, lengthSoFarStride, lengthSoFarOffset);
87568
87544
 
87569
- gl .drawArraysInstanced (primitiveMode, 0, this .vertexCount, shapeNode .getNumInstances ());
87545
+ if (this .hasFogCoords)
87546
+ {
87547
+ transformShaderNode .enableFloatAttrib (gl, "x3d_FogDepth0", this .fogDepthBuffer, 1, fogDepthStride, fogDepthOffset0);
87548
+ transformShaderNode .enableFloatAttrib (gl, "x3d_FogDepth1", this .fogDepthBuffer, 1, fogDepthStride, fogDepthOffset1);
87549
+ }
87570
87550
 
87571
- for (const node of renderModeNodes)
87572
- node .disable (gl);
87551
+ if (geometryContext .colorMaterial)
87552
+ {
87553
+ if (geometryContext === this)
87554
+ {
87555
+ transformShaderNode .enableFloatAttrib (gl, "x3d_Color0", this .colorBuffer, 4, colorStride, colorOffset0);
87556
+ transformShaderNode .enableFloatAttrib (gl, "x3d_Color1", this .colorBuffer, 4, colorStride, colorOffset1);
87557
+ }
87558
+ else
87559
+ {
87560
+ transformShaderNode .enableFloatAttrib (gl, "x3d_Color0", instances, 4, instancesStride, colorOffset, 2);
87561
+ transformShaderNode .enableFloatAttrib (gl, "x3d_Color1", instances, 4, instancesStride, colorOffset, 2);
87562
+ }
87563
+ }
87573
87564
 
87574
- gl .lineWidth (1);
87575
- },
87565
+ if (this .hasNormals)
87566
+ {
87567
+ transformShaderNode .enableFloatAttrib (gl, "x3d_Normal0", this .normalBuffer, 3, normalStride, normalOffset0);
87568
+ transformShaderNode .enableFloatAttrib (gl, "x3d_Normal1", this .normalBuffer, 3, normalStride, normalOffset1);
87569
+ }
87570
+
87571
+ transformShaderNode .enableFloatAttrib (gl, "x3d_Vertex0", this .vertexBuffer, 4, vertexStride, vertexOffset0);
87572
+ transformShaderNode .enableFloatAttrib (gl, "x3d_Vertex1", this .vertexBuffer, 4, vertexStride, vertexOffset1);
87573
+ }
87574
+
87575
+ // Create lineTrianglesBuffer
87576
+
87577
+ const numLines = this .getVertices () .length / 8 * shapeNode .getNumInstances ();
87578
+
87579
+ if (instances .numLines !== numLines)
87580
+ {
87581
+ instances .numLines = numLines;
87582
+
87583
+ gl .bindBuffer (gl .ARRAY_BUFFER, instances .lineTrianglesBuffer);
87584
+ gl .bufferData (gl .ARRAY_BUFFER, new Float32Array (16 * 6 * numLines), gl .DYNAMIC_DRAW);
87585
+ }
87586
+
87587
+ // Transform lines.
87588
+
87589
+ gl .bindBuffer (gl .ARRAY_BUFFER, null);
87590
+ gl .bindTransformFeedback (gl .TRANSFORM_FEEDBACK, browser .getLineTransformFeedback ());
87591
+ gl .bindBufferBase (gl .TRANSFORM_FEEDBACK_BUFFER, 0, instances .lineTrianglesBuffer);
87592
+ gl .enable (gl .RASTERIZER_DISCARD);
87593
+ gl .beginTransformFeedback (gl .POINTS);
87594
+ gl .drawArraysInstanced (gl .POINTS, 0, this .vertexCount / 2, 2 * shapeNode .getNumInstances ());
87595
+ gl .endTransformFeedback ();
87596
+ gl .disable (gl .RASTERIZER_DISCARD);
87597
+ gl .bindTransformFeedback (gl .TRANSFORM_FEEDBACK, null);
87598
+
87599
+ // DEBUG
87600
+
87601
+ // const data = new Float32Array (16 * 6 * this .vertexCount / 2);
87602
+ // gl .bindBuffer (gl .ARRAY_BUFFER, instances .lineTrianglesBuffer);
87603
+ // gl .getBufferSubData (gl .ARRAY_BUFFER, 0, data);
87604
+ // console .log (data);
87605
+
87606
+ // Render triangles.
87607
+
87608
+ for (const node of renderModeNodes)
87609
+ node .enable (gl);
87610
+
87611
+ // Setup shader.
87612
+
87613
+ shaderNode .enable (gl);
87614
+ shaderNode .setUniforms (gl, geometryContext, renderContext);
87615
+
87616
+ // Setup vertex attributes.
87617
+
87618
+ if (instances .thickLinesVertexArrayObject .update (this .updateInstances) .enable (shaderNode .getProgram ()))
87619
+ {
87620
+ shaderNode .enableInstanceMatrixAttribute (gl, browser .getDefaultInstanceMatrices (), 100, 0, 1);
87621
+ shaderNode .enableInstanceNormalMatrixAttribute (gl, browser .getDefaultInstanceMatrices (), 100, 64, 1);
87622
+
87623
+ const
87624
+ stride = 16 * Float32Array .BYTES_PER_ELEMENT,
87625
+ coordIndexOffset = 0,
87626
+ lineStippleOffset = 1 * Float32Array .BYTES_PER_ELEMENT,
87627
+ fogCoordOffset = 4 * Float32Array .BYTES_PER_ELEMENT,
87628
+ colorOffset = 5 * Float32Array .BYTES_PER_ELEMENT,
87629
+ normalOffset = 9 * Float32Array .BYTES_PER_ELEMENT,
87630
+ vertexOffset = 12 * Float32Array .BYTES_PER_ELEMENT;
87631
+
87632
+ // for (let i = 0, length = attribNodes .length; i < length; ++ i)
87633
+ // attribNodes [i] .enable (gl, shaderNode, attribBuffers [i]);
87634
+
87635
+ shaderNode .enableCoordIndexAttribute (gl, instances .lineTrianglesBuffer, stride, coordIndexOffset);
87636
+ shaderNode .enableLineStippleAttribute (gl, instances .lineTrianglesBuffer, stride, lineStippleOffset);
87637
+
87638
+ if (this .hasFogCoords)
87639
+ shaderNode .enableFogDepthAttribute (gl, instances .lineTrianglesBuffer, stride, fogCoordOffset);
87640
+
87641
+ if (geometryContext .colorMaterial)
87642
+ shaderNode .enableColorAttribute (gl, instances .lineTrianglesBuffer, stride, colorOffset);
87643
+
87644
+ if (this .hasNormals)
87645
+ shaderNode .enableNormalAttribute (gl, instances .lineTrianglesBuffer, stride, normalOffset);
87646
+
87647
+ shaderNode .enableVertexAttribute (gl, instances .lineTrianglesBuffer, stride, vertexOffset);
87648
+
87649
+ this .updateInstances = false;
87650
+ }
87651
+
87652
+ gl .frontFace (gl .CCW);
87653
+ gl .enable (gl .CULL_FACE);
87654
+ gl .drawArrays (primitiveMode, 0, this .vertexCount * 3 * shapeNode .getNumInstances ());
87655
+
87656
+ for (const node of renderModeNodes)
87657
+ node .disable (gl);
87658
+
87659
+ return;
87660
+ }
87661
+ }
87662
+
87663
+ const primitiveMode = browser .getPrimitiveMode (this .getPrimitiveMode ());
87664
+
87665
+ for (const node of renderModeNodes)
87666
+ node .enable (gl);
87667
+
87668
+ // Setup shader.
87669
+
87670
+ shaderNode .enable (gl);
87671
+ shaderNode .setUniforms (gl, this, renderContext);
87672
+
87673
+ // Setup vertex attributes.
87674
+
87675
+ const instances = shapeNode .getInstances ();
87676
+
87677
+ if (instances .vertexArrayObject .update (this .updateInstances) .enable (shaderNode .getProgram ()))
87678
+ {
87679
+ const { instancesStride, particleOffset, velocityOffset, matrixOffset, normalMatrixOffset, colorOffset } = shapeNode;
87680
+
87681
+ if (particleOffset !== undefined)
87682
+ shaderNode .enableParticleAttribute (gl, instances, instancesStride, particleOffset, 1);
87683
+
87684
+ if (velocityOffset !== undefined)
87685
+ shaderNode .enableParticleVelocityAttribute (gl, instances, instancesStride, velocityOffset, 1);
87686
+
87687
+ shaderNode .enableInstanceMatrixAttribute (gl, instances, instancesStride, matrixOffset, 1);
87688
+
87689
+ if (normalMatrixOffset !== undefined)
87690
+ shaderNode .enableInstanceNormalMatrixAttribute (gl, instances, instancesStride, normalMatrixOffset, 1);
87691
+
87692
+ if (this .coordIndices .length)
87693
+ shaderNode .enableCoordIndexAttribute (gl, this .coordIndexBuffer, 0, 0);
87694
+
87695
+ for (let i = 0, length = attribNodes .length; i < length; ++ i)
87696
+ attribNodes [i] .enable (gl, shaderNode, attribBuffers [i]);
87697
+
87698
+ if (this .hasFogCoords)
87699
+ shaderNode .enableFogDepthAttribute (gl, this .fogDepthBuffer, 0, 0);
87700
+
87701
+ if (geometryContext .colorMaterial)
87702
+ {
87703
+ if (geometryContext === this)
87704
+ shaderNode .enableColorAttribute (gl, this .colorBuffer, 0, 0);
87705
+ else
87706
+ shaderNode .enableColorAttribute (gl, instances, instancesStride, colorOffset, 1);
87707
+ }
87708
+
87709
+ if (this .hasNormals)
87710
+ shaderNode .enableNormalAttribute (gl, this .normalBuffer, 0, 0);
87711
+
87712
+ shaderNode .enableVertexAttribute (gl, this .vertexBuffer, 0, 0);
87713
+
87714
+ this .updateInstances = false;
87715
+ }
87716
+
87717
+ // Wireframes are always solid so only one drawing call is needed.
87718
+
87719
+ gl .drawArraysInstanced (primitiveMode, 0, this .vertexCount, shapeNode .getNumInstances ());
87720
+
87721
+ for (const node of renderModeNodes)
87722
+ node .disable (gl);
87723
+
87724
+ gl .lineWidth (1);
87725
+ };
87726
+ })(),
87576
87727
  });
87577
87728
 
87578
87729
  Object .defineProperties (X3DLineGeometryNode,
@@ -89015,18 +89166,24 @@ Object .assign (Object .setPrototypeOf (X3DPointGeometryNode .prototype, Renderi
89015
89166
 
89016
89167
  const instances = shapeNode .getInstances ();
89017
89168
 
89018
- if (instances .vertexArrayObject .update (this .updateParticles) .enable (shaderNode .getProgram ()))
89169
+ if (instances .vertexArrayObject .update (this .updateInstances) .enable (shaderNode .getProgram ()))
89019
89170
  {
89020
- const { instancesStride, particleOffset, matrixOffset, normalMatrixOffset } = shapeNode;
89171
+ const { instancesStride, particleOffset, velocityOffset, matrixOffset, normalMatrixOffset } = shapeNode;
89021
89172
 
89022
89173
  if (particleOffset !== undefined)
89023
89174
  shaderNode .enableParticleAttribute (gl, instances, instancesStride, particleOffset, 1);
89024
89175
 
89176
+ if (velocityOffset !== undefined)
89177
+ shaderNode .enableParticleVelocityAttribute (gl, instances, instancesStride, velocityOffset, 1);
89178
+
89025
89179
  shaderNode .enableInstanceMatrixAttribute (gl, instances, instancesStride, matrixOffset, 1);
89026
89180
 
89027
89181
  if (normalMatrixOffset !== undefined)
89028
89182
  shaderNode .enableInstanceNormalMatrixAttribute (gl, instances, instancesStride, normalMatrixOffset, 1);
89029
89183
 
89184
+ if (this .coordIndices .length)
89185
+ shaderNode .enableCoordIndexAttribute (gl, this .coordIndexBuffer, 0, 0);
89186
+
89030
89187
  for (let i = 0, length = attribNodes .length; i < length; ++ i)
89031
89188
  attribNodes [i] .enable (gl, shaderNode, attribBuffers [i]);
89032
89189
 
@@ -89041,7 +89198,7 @@ Object .assign (Object .setPrototypeOf (X3DPointGeometryNode .prototype, Renderi
89041
89198
 
89042
89199
  shaderNode .enableVertexAttribute (gl, this .vertexBuffer, 0, 0);
89043
89200
 
89044
- this .updateParticles = false;
89201
+ this .updateInstances = false;
89045
89202
  }
89046
89203
 
89047
89204
  // Wireframes are always solid so only one drawing call is needed.
@@ -89967,7 +90124,7 @@ const X3DShaderNode_default_ = X3DShaderNode;
89967
90124
  x_ite_Namespace .add ("X3DShaderNode", "x_ite/Components/Shaders/X3DShaderNode", X3DShaderNode_default_);
89968
90125
  /* harmony default export */ const Shaders_X3DShaderNode = (X3DShaderNode_default_);
89969
90126
  ;// CONCATENATED MODULE: ./src/x_ite/Components/Shaders/X3DProgrammableShaderObject.js
89970
- /* provided dependency */ var X3DProgrammableShaderObject_$ = __webpack_require__(275);
90127
+ /* provided dependency */ var X3DProgrammableShaderObject_$ = __webpack_require__(432);
89971
90128
  /*******************************************************************************
89972
90129
  *
89973
90130
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -90274,6 +90431,7 @@ Object .assign (X3DProgrammableShaderObject .prototype,
90274
90431
  "Normal",
90275
90432
  "Vertex",
90276
90433
  "Particle",
90434
+ "ParticleVelocity",
90277
90435
  "ParticleMatrix",
90278
90436
  "ParticleNormalMatrix",
90279
90437
  "InstanceMatrix",
@@ -91102,7 +91260,7 @@ Object .assign (X3DProgrammableShaderObject .prototype,
91102
91260
  gl .uniform1i (location, textureUnit);
91103
91261
  }
91104
91262
  },
91105
- enableFloatAttrib (gl, name, buffer, components, stride, offset)
91263
+ enableFloatAttrib (gl, name, buffer, components, stride, offset, divisor = 0)
91106
91264
  {
91107
91265
  const location = gl .getAttribLocation (this .getProgram (), name);
91108
91266
 
@@ -91112,6 +91270,7 @@ Object .assign (X3DProgrammableShaderObject .prototype,
91112
91270
  gl .bindBuffer (gl .ARRAY_BUFFER, buffer);
91113
91271
  gl .enableVertexAttribArray (location);
91114
91272
  gl .vertexAttribPointer (location, components, gl .FLOAT, false, stride, offset);
91273
+ gl .vertexAttribDivisor (location, divisor);
91115
91274
  },
91116
91275
  enableMatrix3Attrib (gl, name, buffer, stride, offset)
91117
91276
  {
@@ -91175,13 +91334,14 @@ Object .assign (X3DProgrammableShaderObject .prototype,
91175
91334
  gl .enableVertexAttribArray (location);
91176
91335
  gl .vertexAttribPointer (location, 1, gl .FLOAT, false, stride, offset);
91177
91336
  },
91178
- enableColorAttribute (gl, buffer, stride, offset)
91337
+ enableColorAttribute (gl, buffer, stride, offset, divisor = 0)
91179
91338
  {
91180
91339
  const location = this .x3d_Color;
91181
91340
 
91182
91341
  gl .bindBuffer (gl .ARRAY_BUFFER, buffer);
91183
91342
  gl .enableVertexAttribArray (location);
91184
91343
  gl .vertexAttribPointer (location, 4, gl .FLOAT, false, stride, offset);
91344
+ gl .vertexAttribDivisor (location, divisor)
91185
91345
  },
91186
91346
  colorAttributeDivisor (gl, divisor)
91187
91347
  {
@@ -91236,6 +91396,15 @@ Object .assign (X3DProgrammableShaderObject .prototype,
91236
91396
  gl .vertexAttribPointer (location, 4, gl .FLOAT, false, stride, offset);
91237
91397
  gl .vertexAttribDivisor (location, divisor);
91238
91398
  },
91399
+ enableParticleVelocityAttribute (gl, buffer, stride, offset, divisor)
91400
+ {
91401
+ const location = this .x3d_ParticleVelocity;
91402
+
91403
+ gl .bindBuffer (gl .ARRAY_BUFFER, buffer);
91404
+ gl .enableVertexAttribArray (location);
91405
+ gl .vertexAttribPointer (location, 3, gl .FLOAT, false, stride, offset);
91406
+ gl .vertexAttribDivisor (location, divisor);
91407
+ },
91239
91408
  enableInstanceMatrixAttribute (gl, buffer, stride, offset, divisor)
91240
91409
  {
91241
91410
  const location0 = this .x3d_InstanceMatrix;
@@ -94630,7 +94799,17 @@ x_ite_Namespace .add ("LineTransform2.fs", "assets/shaders/webgl2/LineTransform2
94630
94799
  /* harmony default export */ const LineTransform2_fs = (LineTransform2_fs_default_);
94631
94800
  ;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/LineTransform2.vs.js
94632
94801
  const LineTransform2_vs_default_ = /* glsl */ `#version 300 es
94633
- precision highp float;uniform vec4 viewport;uniform mat4 modelViewProjectionMatrix;uniform mat4 invModelViewProjectionMatrix;uniform float scale;in float x3d_CoordIndex0;in vec3 x3d_LineStipple0;in float x3d_FogDepth0;in vec4 x3d_Color0;in vec3 x3d_Normal0;in vec4 x3d_Vertex0;in float x3d_CoordIndex1;in vec3 x3d_LineStipple1;in float x3d_FogDepth1;in vec4 x3d_Color1;in vec3 x3d_Normal1;in vec4 x3d_Vertex1;out float coordIndex0;out vec3 lineStipple0;out float fogDepth0;out vec4 color0;out vec3 normal0;out vec4 vertex0;out float coordIndex1;out vec3 lineStipple1;out float fogDepth1;out vec4 color1;out vec3 normal1;out vec4 vertex1;out float coordIndex2;out vec3 lineStipple2;out float fogDepth2;out vec4 color2;out vec3 normal2;out vec4 vertex2;vec3 projectPoint(const in vec4 point,const in mat4 modelViewProjectionMatrix,const in vec4 viewport){vec4 vin=modelViewProjectionMatrix*point;vin.xyz=vin.xyz/(2.0*vin.w)+0.5;return vec3(vin.xy*viewport.zw+viewport.xy,vin.z);}vec4 unProjectPoint(const in vec3 win,const in mat4 invModelViewProjection,const in vec4 viewport){vec4 vin=vec4((win.xy-viewport.xy)/viewport.zw*2.0-1.0,2.0*win.z-1.0,1.0);vin=invModelViewProjection*vin;return vec4(vin.xyz/vin.w,1.0);}void main(){vec3 projected0=projectPoint(x3d_Vertex0,modelViewProjectionMatrix,viewport);vec3 projected1=projectPoint(x3d_Vertex1,modelViewProjectionMatrix,viewport);vec2 direction=normalize(projected1.xy-projected0.xy);vec2 offset=vec2(-direction.y,direction.x)*scale;if(gl_InstanceID==0){vec2 pq0=projected0.xy+offset;vec2 pq1=projected0.xy-offset;vec2 pq2=projected1.xy-offset;vec4 p0=unProjectPoint(vec3(pq0.xy,projected0.z),invModelViewProjectionMatrix,viewport);vec4 p1=unProjectPoint(vec3(pq1.xy,projected0.z),invModelViewProjectionMatrix,viewport);vec4 p2=unProjectPoint(vec3(pq2.xy,projected1.z),invModelViewProjectionMatrix,viewport);coordIndex0=x3d_CoordIndex0;lineStipple0=x3d_LineStipple0;fogDepth0=x3d_FogDepth0;color0=x3d_Color0;normal0=x3d_Normal0;vertex0=p0;coordIndex1=x3d_CoordIndex0;lineStipple1=x3d_LineStipple0;fogDepth1=x3d_FogDepth0;color1=x3d_Color0;normal1=x3d_Normal0;vertex1=p1;coordIndex2=x3d_CoordIndex1;lineStipple2=x3d_LineStipple1;fogDepth2=x3d_FogDepth1;color2=x3d_Color1;normal2=x3d_Normal1;vertex2=p2;}else{vec2 pq0=projected0.xy+offset;vec2 pq2=projected1.xy-offset;vec2 pq3=projected1.xy+offset;vec4 p0=unProjectPoint(vec3(pq0.xy,projected0.z),invModelViewProjectionMatrix,viewport);vec4 p2=unProjectPoint(vec3(pq2.xy,projected1.z),invModelViewProjectionMatrix,viewport);vec4 p3=unProjectPoint(vec3(pq3.xy,projected1.z),invModelViewProjectionMatrix,viewport);coordIndex0=x3d_CoordIndex0;lineStipple0=x3d_LineStipple0;fogDepth0=x3d_FogDepth0;color0=x3d_Color0;normal0=x3d_Normal0;vertex0=p0;coordIndex1=x3d_CoordIndex1;lineStipple1=x3d_LineStipple1;fogDepth1=x3d_FogDepth1;color1=x3d_Color1;normal1=x3d_Normal1;vertex1=p2;coordIndex2=x3d_CoordIndex1;lineStipple2=x3d_LineStipple1;fogDepth2=x3d_FogDepth1;color2=x3d_Color1;normal2=x3d_Normal1;vertex2=p3;}}`
94802
+ precision highp float;uniform vec4 viewport;uniform mat4 modelViewProjectionMatrix;uniform mat4 invModelViewProjectionMatrix;uniform float linewidthScaleFactor1_2;
94803
+ #if defined(X3D_INSTANCING)
94804
+ in mat4 x3d_InstanceMatrix;
94805
+ #endif
94806
+ in float x3d_LengthSoFar;in float x3d_CoordIndex0;in float x3d_FogDepth0;in vec4 x3d_Color0;in vec3 x3d_Normal0;in vec4 x3d_Vertex0;in float x3d_CoordIndex1;in float x3d_FogDepth1;in vec4 x3d_Color1;in vec3 x3d_Normal1;in vec4 x3d_Vertex1;out float coordIndex0;out vec3 lineStipple0;out float fogDepth0;out vec4 color0;out vec3 normal0;out vec4 vertex0;out float coordIndex1;out vec3 lineStipple1;out float fogDepth1;out vec4 color1;out vec3 normal1;out vec4 vertex1;out float coordIndex2;out vec3 lineStipple2;out float fogDepth2;out vec4 color2;out vec3 normal2;out vec4 vertex2;vec3 projectPoint(const in vec4 point,const in mat4 modelViewProjectionMatrix,const in vec4 viewport){vec4 vin=modelViewProjectionMatrix*point;vin.xyz=vin.xyz/(2.0*vin.w)+0.5;return vec3(vin.xy*viewport.zw+viewport.xy,vin.z);}vec4 unProjectPoint(const in vec3 win,const in mat4 invModelViewProjection,const in vec4 viewport){vec4 vin=vec4((win.xy-viewport.xy)/viewport.zw*2.0-1.0,2.0*win.z-1.0,1.0);vin=invModelViewProjection*vin;return vec4(vin.xyz/vin.w,1.0);}void main(){
94807
+ #if defined(X3D_INSTANCING)
94808
+ vec3 projected0=projectPoint(x3d_InstanceMatrix*x3d_Vertex0,modelViewProjectionMatrix,viewport);vec3 projected1=projectPoint(x3d_InstanceMatrix*x3d_Vertex1,modelViewProjectionMatrix,viewport);
94809
+ #else
94810
+ vec3 projected0=projectPoint(x3d_Vertex0,modelViewProjectionMatrix,viewport);vec3 projected1=projectPoint(x3d_Vertex1,modelViewProjectionMatrix,viewport);
94811
+ #endif
94812
+ vec2 direction=normalize(projected1.xy-projected0.xy);vec2 offset=vec2(-direction.y,direction.x)*linewidthScaleFactor1_2;vec3 l0=vec3(projected1.xy,x3d_LengthSoFar);vec3 l1=vec3(projected0.xy,x3d_LengthSoFar);if(gl_InstanceID % 2==0){vec2 pq0=projected0.xy+offset;vec2 pq1=projected0.xy-offset;vec2 pq2=projected1.xy-offset;vec4 p0=unProjectPoint(vec3(pq0.xy,projected0.z),invModelViewProjectionMatrix,viewport);vec4 p1=unProjectPoint(vec3(pq1.xy,projected0.z),invModelViewProjectionMatrix,viewport);vec4 p2=unProjectPoint(vec3(pq2.xy,projected1.z),invModelViewProjectionMatrix,viewport);coordIndex0=x3d_CoordIndex0;lineStipple0=l0;fogDepth0=x3d_FogDepth0;color0=x3d_Color0;normal0=x3d_Normal0;vertex0=p0;coordIndex1=x3d_CoordIndex0;lineStipple1=l0;fogDepth1=x3d_FogDepth0;color1=x3d_Color0;normal1=x3d_Normal0;vertex1=p1;coordIndex2=x3d_CoordIndex1;lineStipple2=l1;fogDepth2=x3d_FogDepth1;color2=x3d_Color1;normal2=x3d_Normal1;vertex2=p2;}else{vec2 pq0=projected0.xy+offset;vec2 pq2=projected1.xy-offset;vec2 pq3=projected1.xy+offset;vec4 p0=unProjectPoint(vec3(pq0.xy,projected0.z),invModelViewProjectionMatrix,viewport);vec4 p2=unProjectPoint(vec3(pq2.xy,projected1.z),invModelViewProjectionMatrix,viewport);vec4 p3=unProjectPoint(vec3(pq3.xy,projected1.z),invModelViewProjectionMatrix,viewport);coordIndex0=x3d_CoordIndex0;lineStipple0=l0;fogDepth0=x3d_FogDepth0;color0=x3d_Color0;normal0=x3d_Normal0;vertex0=p0;coordIndex1=x3d_CoordIndex1;lineStipple1=l1;fogDepth1=x3d_FogDepth1;color1=x3d_Color1;normal1=x3d_Normal1;vertex1=p2;coordIndex2=x3d_CoordIndex1;lineStipple2=l1;fogDepth2=x3d_FogDepth1;color2=x3d_Color1;normal2=x3d_Normal1;vertex2=p3;}}`
94634
94813
  ;
94635
94814
 
94636
94815
  x_ite_Namespace .add ("LineTransform2.vs", "assets/shaders/webgl2/LineTransform2.vs", LineTransform2_vs_default_);
@@ -95485,11 +95664,11 @@ const ShaderRegistry = {
95485
95664
  Fog: Fog2_glsl,
95486
95665
  Fragment: Fragment2_glsl,
95487
95666
  Hatch: Hatch2_glsl,
95667
+ Instancing: Instancing2_glsl,
95488
95668
  Lighting: Lighting2_glsl,
95489
95669
  Line2: Line22_glsl,
95490
95670
  Material: Material2_glsl,
95491
95671
  Normal: Normal2_glsl,
95492
- Instancing: Instancing2_glsl,
95493
95672
  Perlin: Perlin2_glsl,
95494
95673
  Point: Point2_glsl,
95495
95674
  PointSize: PointSize2_glsl,
@@ -95654,7 +95833,7 @@ const ShaderCompiler_default_ = ShaderCompiler;
95654
95833
  x_ite_Namespace .add ("ShaderCompiler", "x_ite/Browser/Shaders/ShaderCompiler", ShaderCompiler_default_);
95655
95834
  /* harmony default export */ const Shaders_ShaderCompiler = (ShaderCompiler_default_);
95656
95835
  ;// CONCATENATED MODULE: ./src/x_ite/Components/Shaders/ShaderPart.js
95657
- /* provided dependency */ var ShaderPart_$ = __webpack_require__(275);
95836
+ /* provided dependency */ var ShaderPart_$ = __webpack_require__(432);
95658
95837
  /*******************************************************************************
95659
95838
  *
95660
95839
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -96311,7 +96490,7 @@ const X3DAppearanceNode_default_ = X3DAppearanceNode;
96311
96490
  x_ite_Namespace .add ("X3DAppearanceNode", "x_ite/Components/Shape/X3DAppearanceNode", X3DAppearanceNode_default_);
96312
96491
  /* harmony default export */ const Shape_X3DAppearanceNode = (X3DAppearanceNode_default_);
96313
96492
  ;// CONCATENATED MODULE: ./src/x_ite/Components/Shape/Appearance.js
96314
- /* provided dependency */ var Appearance_$ = __webpack_require__(275);
96493
+ /* provided dependency */ var Appearance_$ = __webpack_require__(432);
96315
96494
  /*******************************************************************************
96316
96495
  *
96317
96496
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -98816,6 +98995,10 @@ Object .assign (Object .setPrototypeOf (X3DShapeNode .prototype, Core_X3DChildNo
98816
98995
  this .set_appearance__ ();
98817
98996
  this .set_geometry__ ();
98818
98997
  },
98998
+ getNumInstances ()
98999
+ {
99000
+ return 1;
99001
+ },
98819
99002
  getBBox (bbox, shadows)
98820
99003
  {
98821
99004
  if (shadows)
@@ -98930,7 +99113,6 @@ Object .assign (Object .setPrototypeOf (X3DShapeNode .prototype, Core_X3DChildNo
98930
99113
  {
98931
99114
  if (this .getGeometry ())
98932
99115
  this .bbox .assign (this .getGeometry () .getBBox ());
98933
-
98934
99116
  else
98935
99117
  this .bbox .set ();
98936
99118
  }
@@ -105260,8 +105442,8 @@ const GifMedia_default_ = GifMedia;
105260
105442
  x_ite_Namespace .add ("GifMedia", "x_ite/Browser/Texturing/GifMedia", GifMedia_default_);
105261
105443
  /* harmony default export */ const Texturing_GifMedia = (GifMedia_default_);
105262
105444
  ;// CONCATENATED MODULE: ./src/x_ite/Components/Texturing/MovieTexture.js
105263
- /* provided dependency */ var MovieTexture_$ = __webpack_require__(275);
105264
- /* provided dependency */ var SuperGif = __webpack_require__(964);
105445
+ /* provided dependency */ var MovieTexture_$ = __webpack_require__(432);
105446
+ /* provided dependency */ var SuperGif = __webpack_require__(467);
105265
105447
  /*******************************************************************************
105266
105448
  *
105267
105449
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -105458,7 +105640,7 @@ Object .assign (Object .setPrototypeOf (MovieTexture .prototype, Texturing_X3DTe
105458
105640
  this ._duration_changed = video .duration;
105459
105641
 
105460
105642
  this .setMediaElement (video);
105461
- this .setTextureFromData (width, height, true, false, video);
105643
+ this .setTextureData (width, height, true, false, video);
105462
105644
  this .setLoadState (Base_X3DConstants .COMPLETE_STATE);
105463
105645
 
105464
105646
  this .set_speed__ ();
@@ -105478,7 +105660,7 @@ Object .assign (Object .setPrototypeOf (MovieTexture .prototype, Texturing_X3DTe
105478
105660
  this ._duration_changed = gif .duration;
105479
105661
 
105480
105662
  this .setMediaElement (gif);
105481
- this .setTextureFromData (gif .get_canvas () .width, gif .get_canvas () .height, true, false, gif .get_frames () [0] .data);
105663
+ this .setTextureData (gif .get_canvas () .width, gif .get_canvas () .height, true, false, gif .get_frames () [0] .data);
105482
105664
  this .setLoadState (Base_X3DConstants .COMPLETE_STATE);
105483
105665
 
105484
105666
  this .set_speed__ ();
@@ -105506,7 +105688,7 @@ Object .assign (Object .setPrototypeOf (MovieTexture .prototype, Texturing_X3DTe
105506
105688
  const media = this .getMediaElement ();
105507
105689
 
105508
105690
  if (media)
105509
- this .updateTextureFromData (media .currentFrame ?.data ?? media);
105691
+ this .updateTextureData (media .currentFrame ?.data ?? media);
105510
105692
  },
105511
105693
  traverse: Texturing_X3DTexture2DNode .prototype .traverse,
105512
105694
  dispose ()
@@ -106680,7 +106862,7 @@ Object .assign (Object .setPrototypeOf (PixelTexture .prototype, Texturing_X3DTe
106680
106862
  data = new Uint8Array (cx2 .getImageData (0, 0, width, height) .data .buffer);
106681
106863
  }
106682
106864
 
106683
- this .setTextureFromData (width, height, true, transparent, data);
106865
+ this .setTextureData (width, height, true, transparent, data);
106684
106866
  this ._loadState = Base_X3DConstants .COMPLETE_STATE;
106685
106867
  }
106686
106868
  else
@@ -107866,8 +108048,6 @@ x_ite_Namespace .add ("Time", "x_ite/Components/Time", Time_default_);
107866
108048
 
107867
108049
 
107868
108050
 
107869
- const nop = Function .prototype;
107870
-
107871
108051
  const Context =
107872
108052
  {
107873
108053
  excludes: new Set ([
@@ -107900,16 +108080,10 @@ const Context =
107900
108080
  {
107901
108081
  const ext = gl .getExtension ("OES_vertex_array_object");
107902
108082
 
107903
- gl .bindVertexArray = ext ?.bindVertexArrayOES .bind (ext) ?? nop;
107904
- gl .createVertexArray = ext ?.createVertexArrayOES .bind (ext) ?? nop;
107905
- gl .deleteVertexArray = ext ?.deleteVertexArrayOES .bind (ext) ?? nop;
107906
- gl .isVertexArray = ext ?.isVertexArrayOES .bind (ext) ?? nop;
107907
- }
107908
-
107909
- {
107910
- const ext = gl .getExtension ("ANGLE_instanced_arrays");
107911
-
107912
- gl .drawArraysInstanced = ext ?.drawArraysInstancedANGLE .bind (ext) ?? nop;
108083
+ gl .bindVertexArray = ext .bindVertexArrayOES .bind (ext);
108084
+ gl .createVertexArray = ext .createVertexArrayOES .bind (ext);
108085
+ gl .deleteVertexArray = ext .deleteVertexArrayOES .bind (ext);
108086
+ gl .isVertexArray = ext .isVertexArrayOES .bind (ext);
107913
108087
  }
107914
108088
  }
107915
108089
  }
@@ -107931,7 +108105,7 @@ const Context =
107931
108105
 
107932
108106
  if (aliasedLineWidthRange [0] === 1 && aliasedLineWidthRange [1] === 1)
107933
108107
  {
107934
- gl .lineWidth = nop;
108108
+ gl .lineWidth = Function .prototype;
107935
108109
  gl .HAS_FEATURE_TRANSFORMED_LINES = gl .getVersion () >= 2;
107936
108110
 
107937
108111
  if (DEVELOPMENT)
@@ -108653,7 +108827,7 @@ const gettext_default_ = (string) => locale .get (string) || string;
108653
108827
  x_ite_Namespace .add ("gettext", "locale/gettext", gettext_default_);
108654
108828
  /* harmony default export */ const gettext = (gettext_default_);
108655
108829
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/BrowserTimings.js
108656
- /* provided dependency */ var BrowserTimings_$ = __webpack_require__(275);
108830
+ /* provided dependency */ var BrowserTimings_$ = __webpack_require__(432);
108657
108831
  /*******************************************************************************
108658
108832
  *
108659
108833
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -109226,7 +109400,7 @@ const TextureQuality_default_ = TextureQuality;
109226
109400
  x_ite_Namespace .add ("TextureQuality", "x_ite/Browser/Core/TextureQuality", TextureQuality_default_);
109227
109401
  /* harmony default export */ const Core_TextureQuality = (TextureQuality_default_);
109228
109402
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/BrowserOptions.js
109229
- /* provided dependency */ var BrowserOptions_$ = __webpack_require__(275);
109403
+ /* provided dependency */ var BrowserOptions_$ = __webpack_require__(432);
109230
109404
  /*******************************************************************************
109231
109405
  *
109232
109406
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -109820,7 +109994,7 @@ const RenderingProperties_default_ = RenderingProperties;
109820
109994
  x_ite_Namespace .add ("RenderingProperties", "x_ite/Browser/Core/RenderingProperties", RenderingProperties_default_);
109821
109995
  /* harmony default export */ const Core_RenderingProperties = (RenderingProperties_default_);
109822
109996
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/Notification.js
109823
- /* provided dependency */ var Notification_$ = __webpack_require__(275);
109997
+ /* provided dependency */ var Notification_$ = __webpack_require__(432);
109824
109998
  /*******************************************************************************
109825
109999
  *
109826
110000
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -109943,8 +110117,8 @@ const Notification_default_ = Notification;
109943
110117
  x_ite_Namespace .add ("Notification", "x_ite/Browser/Core/Notification", Notification_default_);
109944
110118
  /* harmony default export */ const Core_Notification = (Notification_default_);
109945
110119
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/ContextMenu.js
109946
- /* provided dependency */ var jquery_fullscreen = __webpack_require__(543);
109947
- /* provided dependency */ var ContextMenu_$ = __webpack_require__(275);
110120
+ /* provided dependency */ var jquery_fullscreen = __webpack_require__(668);
110121
+ /* provided dependency */ var ContextMenu_$ = __webpack_require__(432);
109948
110122
  /*******************************************************************************
109949
110123
  *
109950
110124
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -112705,7 +112879,7 @@ const DataStorage_default_ = DataStorage;
112705
112879
  x_ite_Namespace .add ("DataStorage", "standard/Utility/DataStorage", DataStorage_default_);
112706
112880
  /* harmony default export */ const Utility_DataStorage = (DataStorage_default_);
112707
112881
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/X3DCoreContext.js
112708
- /* provided dependency */ var X3DCoreContext_$ = __webpack_require__(275);
112882
+ /* provided dependency */ var X3DCoreContext_$ = __webpack_require__(432);
112709
112883
  /*******************************************************************************
112710
112884
  *
112711
112885
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -115228,8 +115402,8 @@ const X3DViewer_default_ = X3DViewer;
115228
115402
  x_ite_Namespace .add ("X3DViewer", "x_ite/Browser/Navigation/X3DViewer", X3DViewer_default_);
115229
115403
  /* harmony default export */ const Navigation_X3DViewer = (X3DViewer_default_);
115230
115404
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/ExamineViewer.js
115231
- /* provided dependency */ var jquery_mousewheel = __webpack_require__(419);
115232
- /* provided dependency */ var ExamineViewer_$ = __webpack_require__(275);
115405
+ /* provided dependency */ var jquery_mousewheel = __webpack_require__(254);
115406
+ /* provided dependency */ var ExamineViewer_$ = __webpack_require__(432);
115233
115407
  /*******************************************************************************
115234
115408
  *
115235
115409
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -116101,8 +116275,8 @@ const ExamineViewer_default_ = ExamineViewer;
116101
116275
  x_ite_Namespace .add ("ExamineViewer", "x_ite/Browser/Navigation/ExamineViewer", ExamineViewer_default_);
116102
116276
  /* harmony default export */ const Navigation_ExamineViewer = (ExamineViewer_default_);
116103
116277
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/X3DFlyViewer.js
116104
- /* provided dependency */ var X3DFlyViewer_jquery_mousewheel = __webpack_require__(419);
116105
- /* provided dependency */ var X3DFlyViewer_$ = __webpack_require__(275);
116278
+ /* provided dependency */ var X3DFlyViewer_jquery_mousewheel = __webpack_require__(254);
116279
+ /* provided dependency */ var X3DFlyViewer_$ = __webpack_require__(432);
116106
116280
  /*******************************************************************************
116107
116281
  *
116108
116282
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -117111,8 +117285,8 @@ const FlyViewer_default_ = FlyViewer;
117111
117285
  x_ite_Namespace .add ("FlyViewer", "x_ite/Browser/Navigation/FlyViewer", FlyViewer_default_);
117112
117286
  /* harmony default export */ const Navigation_FlyViewer = (FlyViewer_default_);
117113
117287
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/PlaneViewer.js
117114
- /* provided dependency */ var PlaneViewer_jquery_mousewheel = __webpack_require__(419);
117115
- /* provided dependency */ var PlaneViewer_$ = __webpack_require__(275);
117288
+ /* provided dependency */ var PlaneViewer_jquery_mousewheel = __webpack_require__(254);
117289
+ /* provided dependency */ var PlaneViewer_$ = __webpack_require__(432);
117116
117290
  /*******************************************************************************
117117
117291
  *
117118
117292
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -117443,8 +117617,8 @@ const NoneViewer_default_ = NoneViewer;
117443
117617
  x_ite_Namespace .add ("NoneViewer", "x_ite/Browser/Navigation/NoneViewer", NoneViewer_default_);
117444
117618
  /* harmony default export */ const Navigation_NoneViewer = (NoneViewer_default_);
117445
117619
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/LookAtViewer.js
117446
- /* provided dependency */ var LookAtViewer_jquery_mousewheel = __webpack_require__(419);
117447
- /* provided dependency */ var LookAtViewer_$ = __webpack_require__(275);
117620
+ /* provided dependency */ var LookAtViewer_jquery_mousewheel = __webpack_require__(254);
117621
+ /* provided dependency */ var LookAtViewer_$ = __webpack_require__(432);
117448
117622
  /*******************************************************************************
117449
117623
  *
117450
117624
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -118583,8 +118757,8 @@ const X3DPickingContext_default_ = X3DPickingContext;
118583
118757
  x_ite_Namespace .add ("X3DPickingContext", "x_ite/Browser/Picking/X3DPickingContext", X3DPickingContext_default_);
118584
118758
  /* harmony default export */ const Picking_X3DPickingContext = (X3DPickingContext_default_);
118585
118759
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/PointingDeviceSensor/PointingDevice.js
118586
- /* provided dependency */ var PointingDevice_jquery_mousewheel = __webpack_require__(419);
118587
- /* provided dependency */ var PointingDevice_$ = __webpack_require__(275);
118760
+ /* provided dependency */ var PointingDevice_jquery_mousewheel = __webpack_require__(254);
118761
+ /* provided dependency */ var PointingDevice_$ = __webpack_require__(432);
118588
118762
  /*******************************************************************************
118589
118763
  *
118590
118764
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -119888,7 +120062,7 @@ const MultiSampleFrameBuffer_default_ = MultiSampleFrameBuffer;
119888
120062
  x_ite_Namespace .add ("MultiSampleFrameBuffer", "x_ite/Rendering/MultiSampleFrameBuffer", MultiSampleFrameBuffer_default_);
119889
120063
  /* harmony default export */ const Rendering_MultiSampleFrameBuffer = (MultiSampleFrameBuffer_default_);
119890
120064
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/Rendering/X3DRenderingContext.js
119891
- /* provided dependency */ var X3DRenderingContext_$ = __webpack_require__(275);
120065
+ /* provided dependency */ var X3DRenderingContext_$ = __webpack_require__(432);
119892
120066
  /*******************************************************************************
119893
120067
  *
119894
120068
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -120508,16 +120682,20 @@ x_ite_Namespace .add ("X3DShadersContext", "x_ite/Browser/Shaders/X3DShadersCont
120508
120682
 
120509
120683
 
120510
120684
 
120685
+
120686
+
120511
120687
  const
120512
- _linetypeTextures = Symbol (),
120513
- _hatchStyleTextures = Symbol (),
120514
- _defaultAppearance = Symbol (),
120515
- _defaultPointProperties = Symbol (),
120516
- _defaultLineProperties = Symbol (),
120517
- _defaultMaterial = Symbol (),
120518
- _lineFillTextureProperties = Symbol (),
120519
- _lineTransformShaderNode = Symbol (),
120520
- _lineTransformFeedback = Symbol ();
120688
+ _linetypeTextures = Symbol (),
120689
+ _hatchStyleTextures = Symbol (),
120690
+ _defaultAppearance = Symbol (),
120691
+ _defaultPointProperties = Symbol (),
120692
+ _defaultLineProperties = Symbol (),
120693
+ _defaultMaterial = Symbol (),
120694
+ _lineFillTextureProperties = Symbol (),
120695
+ _lineTransformShaderNode = Symbol (),
120696
+ _lineTransformInstancedShaderNode = Symbol (),
120697
+ _lineTransformFeedback = Symbol (),
120698
+ _defaultInstanceMatrices = Symbol ();
120521
120699
 
120522
120700
  function X3DShapeContext ()
120523
120701
  {
@@ -120625,12 +120803,32 @@ Object .assign (X3DShapeContext .prototype,
120625
120803
  return this [_lineFillTextureProperties];
120626
120804
  },
120627
120805
  getLineTransformShader ()
120806
+ {
120807
+ this [_lineTransformShaderNode] = this .createLineTransformShader (false);
120808
+
120809
+ this .getLineTransformShader = function () { return this [_lineTransformShaderNode]; };
120810
+
120811
+ Object .defineProperty (this, "getLineTransformShader", { enumerable: false });
120812
+
120813
+ return this [_lineTransformShaderNode];
120814
+ },
120815
+ getLineTransformInstancedShader ()
120816
+ {
120817
+ this [_lineTransformInstancedShaderNode] = this .createLineTransformShader (true);
120818
+
120819
+ this .getLineTransformInstancedShader = function () { return this [_lineTransformInstancedShaderNode]; };
120820
+
120821
+ Object .defineProperty (this, "getLineTransformInstancedShader", { enumerable: false });
120822
+
120823
+ return this [_lineTransformInstancedShaderNode];
120824
+ },
120825
+ createLineTransformShader (instanced)
120628
120826
  {
120629
120827
  const uniformNames = [
120630
120828
  "viewport",
120631
120829
  "modelViewProjectionMatrix",
120632
120830
  "invModelViewProjectionMatrix",
120633
- "scale",
120831
+ "linewidthScaleFactor1_2",
120634
120832
  ];
120635
120833
 
120636
120834
  const transformFeedbackVaryings = [
@@ -120639,13 +120837,7 @@ Object .assign (X3DShapeContext .prototype,
120639
120837
  "coordIndex2", "lineStipple2", "fogDepth2", "color2", "normal2", "vertex2",
120640
120838
  ];
120641
120839
 
120642
- this [_lineTransformShaderNode] = this .createShader ("LineTransform", "LineTransform", "LineTransform", [ ], uniformNames, transformFeedbackVaryings);
120643
-
120644
- this .getLineTransformShader = function () { return this [_lineTransformShaderNode]; };
120645
-
120646
- Object .defineProperty (this, "getLineTransformShader", { enumerable: false });
120647
-
120648
- return this [_lineTransformShaderNode];
120840
+ return this .createShader (`LineTransform${instanced ? "Instanced" : ""}`, "LineTransform", "LineTransform", instanced ? ["X3D_INSTANCING"] : [ ], uniformNames, transformFeedbackVaryings);
120649
120841
  },
120650
120842
  getLineTransformFeedback ()
120651
120843
  {
@@ -120659,6 +120851,23 @@ Object .assign (X3DShapeContext .prototype,
120659
120851
 
120660
120852
  return this [_lineTransformFeedback];
120661
120853
  },
120854
+ getDefaultInstanceMatrices ()
120855
+ {
120856
+ const
120857
+ gl = this .getContext (),
120858
+ data = new Float32Array ([... Numbers_Matrix4 .Identity, ... Numbers_Matrix3 .Identity]);
120859
+
120860
+ this [_defaultInstanceMatrices] = gl .createBuffer ();
120861
+
120862
+ gl .bindBuffer (gl .ARRAY_BUFFER, this [_defaultInstanceMatrices]);
120863
+ gl .bufferData (gl .ARRAY_BUFFER, data, gl .STATIC_DRAW);
120864
+
120865
+ this .getDefaultInstanceMatrices = function () { return this [_defaultInstanceMatrices]; };
120866
+
120867
+ Object .defineProperty (this, "getDefaultInstanceMatrices", { enumerable: false });
120868
+
120869
+ return this [_defaultInstanceMatrices];
120870
+ },
120662
120871
  });
120663
120872
 
120664
120873
  const X3DShapeContext_default_ = X3DShapeContext;
@@ -120801,7 +121010,7 @@ const X3DSoundContext_default_ = X3DSoundContext;
120801
121010
  x_ite_Namespace .add ("X3DSoundContext", "x_ite/Browser/Sound/X3DSoundContext", X3DSoundContext_default_);
120802
121011
  /* harmony default export */ const Sound_X3DSoundContext = (X3DSoundContext_default_);
120803
121012
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/Texturing/KTXDecoder.js
120804
- /* provided dependency */ var KTXDecoder_$ = __webpack_require__(275);
121013
+ /* provided dependency */ var KTXDecoder_$ = __webpack_require__(432);
120805
121014
  const KTXDecoder_default_ = class KTXDecoder
120806
121015
  {
120807
121016
  constructor (gl, externalKtxlib, scriptDir)
@@ -122355,7 +122564,7 @@ const Components_default_ = Components;
122355
122564
  x_ite_Namespace .add ("Components", "x_ite/Components", Components_default_);
122356
122565
  /* harmony default export */ const x_ite_Components = ((/* unused pure expression or super */ null && (Components_default_)));
122357
122566
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/DOMIntegration.js
122358
- /* provided dependency */ var DOMIntegration_$ = __webpack_require__(275);
122567
+ /* provided dependency */ var DOMIntegration_$ = __webpack_require__(432);
122359
122568
  /*******************************************************************************
122360
122569
  * MIT License
122361
122570
  *
@@ -123488,7 +123697,7 @@ const SupportedProfiles_default_ = SupportedProfiles;
123488
123697
  x_ite_Namespace .add ("SupportedProfiles", "x_ite/Configuration/SupportedProfiles", SupportedProfiles_default_);
123489
123698
  /* harmony default export */ const Configuration_SupportedProfiles = (SupportedProfiles_default_);
123490
123699
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/X3DBrowser.js
123491
- /* provided dependency */ var X3DBrowser_$ = __webpack_require__(275);
123700
+ /* provided dependency */ var X3DBrowser_$ = __webpack_require__(432);
123492
123701
  /*******************************************************************************
123493
123702
  *
123494
123703
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -124580,7 +124789,7 @@ const X3DBrowser_default_ = X3DBrowser;
124580
124789
  x_ite_Namespace .add ("X3DBrowser", "x_ite/Browser/X3DBrowser", X3DBrowser_default_);
124581
124790
  /* harmony default export */ const Browser_X3DBrowser = (X3DBrowser_default_);
124582
124791
  ;// CONCATENATED MODULE: ./src/x_ite/X3DCanvasElement.js
124583
- /* provided dependency */ var X3DCanvasElement_$ = __webpack_require__(275);
124792
+ /* provided dependency */ var X3DCanvasElement_$ = __webpack_require__(432);
124584
124793
  /*******************************************************************************
124585
124794
  *
124586
124795
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -124717,8 +124926,8 @@ const X3DCanvasElement_default_ = X3DCanvasElement;
124717
124926
  x_ite_Namespace .add ("X3DCanvasElement", "x_ite/X3DCanvasElement", X3DCanvasElement_default_);
124718
124927
  /* harmony default export */ const x_ite_X3DCanvasElement = (X3DCanvasElement_default_);
124719
124928
  ;// CONCATENATED MODULE: ./src/lib/jquery.js
124720
- /* provided dependency */ var jquery_$ = __webpack_require__(275);
124721
- /* provided dependency */ var pako = __webpack_require__(35);
124929
+ /* provided dependency */ var jquery_$ = __webpack_require__(432);
124930
+ /* provided dependency */ var pako = __webpack_require__(892);
124722
124931
  Object .assign (jquery_$,
124723
124932
  {
124724
124933
  decodeText (input)
@@ -124795,14 +125004,14 @@ const jquery_default_ = jquery_$;
124795
125004
  x_ite_Namespace .add ("jquery", "lib/jquery", jquery_default_);
124796
125005
  /* harmony default export */ const jquery = ((/* unused pure expression or super */ null && (jquery_default_)));
124797
125006
  ;// CONCATENATED MODULE: ./src/lib/libtess.js
124798
- /* provided dependency */ var libtess_libtess = __webpack_require__(224);
125007
+ /* provided dependency */ var libtess_libtess = __webpack_require__(509);
124799
125008
  const libtess_default_ = libtess_libtess;
124800
125009
  ;
124801
125010
 
124802
125011
  x_ite_Namespace .add ("libtess", "lib/libtess", libtess_default_);
124803
125012
  /* harmony default export */ const lib_libtess = ((/* unused pure expression or super */ null && (libtess_default_)));
124804
125013
  ;// CONCATENATED MODULE: ./src/x_ite/X3D.js
124805
- /* provided dependency */ var X3D_$ = __webpack_require__(275);
125014
+ /* provided dependency */ var X3D_$ = __webpack_require__(432);
124806
125015
  /*******************************************************************************
124807
125016
  *
124808
125017
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -125110,7 +125319,7 @@ Object .assign (X3D,
125110
125319
 
125111
125320
  // Assign X3D to global namespace.
125112
125321
 
125113
- window [Symbol .for ("X_ITE.X3D-9.5.0")] = x_ite_X3D;
125322
+ window [Symbol .for ("X_ITE.X3D-9.5.1")] = x_ite_X3D;
125114
125323
 
125115
125324
  customElements .define ("x3d-canvas", x_ite_X3DCanvasElement);
125116
125325