x_ite 8.6.8 → 8.6.10

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 (106) hide show
  1. package/.vscode/tasks.json +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 +13 -13
  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 +19 -19
  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 +18 -18
  17. package/dist/assets/components/HAnim.min.js +1 -1
  18. package/dist/assets/components/KeyDeviceSensor.js +8 -8
  19. package/dist/assets/components/KeyDeviceSensor.min.js +1 -1
  20. package/dist/assets/components/Layout.js +27 -27
  21. package/dist/assets/components/Layout.min.js +1 -1
  22. package/dist/assets/components/NURBS.js +24 -24
  23. package/dist/assets/components/NURBS.min.js +1 -1
  24. package/dist/assets/components/ParticleSystems.js +25 -27
  25. package/dist/assets/components/ParticleSystems.min.js +1 -1
  26. package/dist/assets/components/Picking.js +19 -19
  27. package/dist/assets/components/Picking.min.js +1 -1
  28. package/dist/assets/components/RigidBodyPhysics.js +18 -18
  29. package/dist/assets/components/RigidBodyPhysics.min.js +1 -1
  30. package/dist/assets/components/Scripting.js +28 -28
  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/TextureProjector.js +14 -14
  35. package/dist/assets/components/TextureProjector.min.js +1 -1
  36. package/dist/assets/components/Texturing3D.js +30 -30
  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 +9 -9
  41. package/dist/assets/components/X_ITE.min.js +1 -1
  42. package/dist/x_ite.css +1 -1
  43. package/dist/x_ite.js +907 -660
  44. package/dist/x_ite.min.js +1 -1
  45. package/dist/x_ite.zip +0 -0
  46. package/docs/_config.yml +2 -2
  47. package/docs/_posts/getting-started.md +1 -1
  48. package/docs/laboratory/gltf-sample-viewer.html +4 -4
  49. package/package.json +1 -1
  50. package/src/assets/shaders/webgl1/Pointing.fs.js +1 -1
  51. package/src/assets/shaders/webgl1/include/Fragment.glsl.js +19 -2
  52. package/src/assets/shaders/webgl1/include/Point.glsl.js +10 -2
  53. package/src/assets/shaders/webgl1/include/Texture.glsl.js +31 -1
  54. package/src/assets/shaders/webgl1/include/Vertex.glsl.js +24 -0
  55. package/src/assets/shaders/webgl2/Pointing.fs.js +1 -1
  56. package/src/assets/shaders/webgl2/include/Fragment.glsl.js +20 -1
  57. package/src/assets/shaders/webgl2/include/Point.glsl.js +12 -4
  58. package/src/assets/shaders/webgl2/include/Texture.glsl.js +17 -20
  59. package/src/assets/shaders/webgl2/include/Vertex.glsl.js +24 -0
  60. package/src/bookmarks.js +1 -1
  61. package/src/tests.js +2 -1
  62. package/src/x_ite/Browser/Core/BrowserOptions.js +3 -0
  63. package/src/x_ite/Browser/Core/BrowserTimings.js +12 -11
  64. package/src/x_ite/Browser/Core/Context.js +66 -64
  65. package/src/x_ite/Browser/Core/ContextMenu.js +0 -9
  66. package/src/x_ite/Browser/Navigation/ExamineViewer.js +1 -1
  67. package/src/x_ite/Browser/Texturing/X3DTexturingContext.js +8 -0
  68. package/src/x_ite/Browser/VERSION.js +1 -1
  69. package/src/x_ite/Browser/X3DBrowser.js +1 -1
  70. package/src/x_ite/Components/Core/X3DBindableNode.js +0 -2
  71. package/src/x_ite/Components/Core/X3DNode.js +3 -8
  72. package/src/x_ite/Components/Layering/X3DLayerNode.js +6 -2
  73. package/src/x_ite/Components/Navigation/NavigationInfo.js +1 -0
  74. package/src/x_ite/Components/Navigation/X3DViewpointNode.js +34 -21
  75. package/src/x_ite/Components/ParticleSystems/ParticleSystem.js +2 -4
  76. package/src/x_ite/Components/Rendering/X3DGeometryNode.js +5 -19
  77. package/src/x_ite/Components/Rendering/X3DLineGeometryNode.js +6 -12
  78. package/src/x_ite/Components/Rendering/X3DPointGeometryNode.js +4 -8
  79. package/src/x_ite/Components/Shaders/X3DProgrammableShaderObject.js +30 -27
  80. package/src/x_ite/Components/Shape/Material.js +4 -0
  81. package/src/x_ite/Components/Shape/PhysicalMaterial.js +4 -0
  82. package/src/x_ite/Components/Shape/TwoSidedMaterial.js +1 -0
  83. package/src/x_ite/Components/Shape/X3DMaterialNode.js +21 -19
  84. package/src/x_ite/Components/Shape/X3DOneSidedMaterialNode.js +4 -0
  85. package/src/x_ite/Components/Texturing/ImageTexture.js +80 -46
  86. package/src/x_ite/Components/Texturing/MultiTexture.js +7 -4
  87. package/src/x_ite/Components/Texturing/MultiTextureCoordinate.js +19 -16
  88. package/src/x_ite/Components/Texturing/MultiTextureTransform.js +16 -32
  89. package/src/x_ite/Components/Texturing/TextureCoordinateGenerator.js +1 -1
  90. package/src/x_ite/Components/Texturing/X3DSingleTextureCoordinateNode.js +2 -8
  91. package/src/x_ite/Components/Texturing/X3DSingleTextureTransformNode.js +2 -8
  92. package/src/x_ite/Execution/NamedNodesHandling.js +84 -0
  93. package/src/x_ite/Execution/X3DExecutionContext.js +7 -37
  94. package/src/x_ite/Execution/X3DScene.js +5 -0
  95. package/src/x_ite/InputOutput/FileLoader.js +1 -1
  96. package/src/x_ite/InputOutput/Generator.js +32 -81
  97. package/src/x_ite/Parser/GLTF2Parser.js +109 -43
  98. package/src/x_ite/Parser/OBJParser.js +42 -30
  99. package/src/x_ite/Parser/STLAParser.js +3 -0
  100. package/src/x_ite/Parser/SVGParser.js +4 -0
  101. package/src/x_ite/Rendering/X3DRenderObject.js +1 -0
  102. package/src/x_ite.html +53 -47
  103. package/x_ite.min.html +53 -47
  104. /package/docs/assets/X3D/{Michroma-Regular.ttf → teaser/Michroma-Regular.ttf} +0 -0
  105. /package/docs/assets/X3D/{peakpx.jpg → teaser/peakpx.jpg} +0 -0
  106. /package/docs/assets/X3D/{teaser.x3d → teaser/teaser.x3d} +0 -0
package/dist/x_ite.js CHANGED
@@ -1,4 +1,4 @@
1
- /* X_ITE v8.6.8 */(function webpackUniversalModuleDefinition(root, factory) {
1
+ /* X_ITE v8.6.10 */(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,11 +11,11 @@
11
11
  return /******/ (() => { // webpackBootstrap
12
12
  /******/ var __webpack_modules__ = ({
13
13
 
14
- /***/ 169:
14
+ /***/ 858:
15
15
  /***/ (function(module, exports, __webpack_require__) {
16
16
 
17
17
  "use strict";
18
- /* provided dependency */ var jQuery = __webpack_require__(5);
18
+ /* provided dependency */ var jQuery = __webpack_require__(535);
19
19
  var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;
20
20
 
21
21
  /**
@@ -387,10 +387,10 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;
387
387
 
388
388
  /***/ }),
389
389
 
390
- /***/ 352:
390
+ /***/ 507:
391
391
  /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
392
392
 
393
- /* provided dependency */ var jQuery = __webpack_require__(5);
393
+ /* provided dependency */ var jQuery = __webpack_require__(535);
394
394
  /**
395
395
  * @preserve jquery.fullscreen 1.1.5
396
396
  * https://github.com/code-lts/jquery-fullscreen-plugin
@@ -586,7 +586,7 @@ installFullScreenHandlers();
586
586
 
587
587
  /***/ }),
588
588
 
589
- /***/ 367:
589
+ /***/ 341:
590
590
  /***/ ((module, exports, __webpack_require__) => {
591
591
 
592
592
  var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
@@ -600,7 +600,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
600
600
  (function (factory) {
601
601
  if ( true ) {
602
602
  // AMD. Register as an anonymous module.
603
- !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(5)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
603
+ !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(535)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
604
604
  __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
605
605
  (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
606
606
  __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
@@ -811,7 +811,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
811
811
 
812
812
  /***/ }),
813
813
 
814
- /***/ 5:
814
+ /***/ 535:
815
815
  /***/ (function(module, exports) {
816
816
 
817
817
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
@@ -11812,7 +11812,7 @@ return jQuery;
11812
11812
 
11813
11813
  /***/ }),
11814
11814
 
11815
- /***/ 587:
11815
+ /***/ 51:
11816
11816
  /***/ ((module) => {
11817
11817
 
11818
11818
  /**
@@ -16591,7 +16591,7 @@ if (true) {
16591
16591
 
16592
16592
  /***/ }),
16593
16593
 
16594
- /***/ 81:
16594
+ /***/ 626:
16595
16595
  /***/ (function(__unused_webpack_module, exports) {
16596
16596
 
16597
16597
 
@@ -19836,7 +19836,7 @@ if (true) {
19836
19836
 
19837
19837
  /***/ }),
19838
19838
 
19839
- /***/ 667:
19839
+ /***/ 381:
19840
19840
  /***/ (function(module, exports) {
19841
19841
 
19842
19842
  var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*
@@ -21094,6 +21094,92 @@ const __default__ = X3DConstants;
21094
21094
 
21095
21095
  x_ite_Namespace.set ("x_ite/Base/X3DConstants", __default__);
21096
21096
  /* harmony default export */ const Base_X3DConstants = (__default__);
21097
+ ;// CONCATENATED MODULE: ./src/x_ite/Execution/NamedNodesHandling.js
21098
+ /*******************************************************************************
21099
+ *
21100
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
21101
+ *
21102
+ * Copyright create3000, Scheffelstraße 31a, Leipzig, Germany 2011 - 2022.
21103
+ *
21104
+ * All rights reserved. Holger Seelig <holger.seelig@yahoo.de>.
21105
+ *
21106
+ * The copyright notice above does not evidence any actual of intended
21107
+ * publication of such source code, and is an unpublished work by create3000.
21108
+ * This material contains CONFIDENTIAL INFORMATION that is the property of
21109
+ * create3000.
21110
+ *
21111
+ * No permission is granted to copy, distribute, or create derivative works from
21112
+ * the contents of this software, in whole or in part, without the prior written
21113
+ * permission of create3000.
21114
+ *
21115
+ * NON-MILITARY USE ONLY
21116
+ *
21117
+ * All create3000 software are effectively free software with a non-military use
21118
+ * restriction. It is free. Well commented source is provided. You may reuse the
21119
+ * source in any way you please with the exception anything that uses it must be
21120
+ * marked to indicate is contains 'non-military use only' components.
21121
+ *
21122
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
21123
+ *
21124
+ * Copyright 2011 - 2022, Holger Seelig <holger.seelig@yahoo.de>.
21125
+ *
21126
+ * This file is part of the X_ITE Project.
21127
+ *
21128
+ * X_ITE is free software: you can redistribute it and/or modify it under the
21129
+ * terms of the GNU General Public License version 3 only, as published by the
21130
+ * Free Software Foundation.
21131
+ *
21132
+ * X_ITE is distributed in the hope that it will be useful, but WITHOUT ANY
21133
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
21134
+ * A PARTICULAR PURPOSE. See the GNU General Public License version 3 for more
21135
+ * details (a copy is included in the LICENSE file that accompanied this code).
21136
+ *
21137
+ * You should have received a copy of the GNU General Public License version 3
21138
+ * along with X_ITE. If not, see <https://www.gnu.org/licenses/gpl.html> for a
21139
+ * copy of the GPLv3 License.
21140
+ *
21141
+ * For Silvio, Joy and Adi.
21142
+ *
21143
+ ******************************************************************************/
21144
+
21145
+ const getUniqueName = function (array, name = "", number = false)
21146
+ {
21147
+ name = String (name) .replace (/_\d+$/, "");
21148
+
21149
+ let
21150
+ newName = number ? `${name}_1` : name,
21151
+ lo = 1,
21152
+ hi = 1;
21153
+
21154
+ while (array .has (newName) || newName .length === 0)
21155
+ {
21156
+ lo = hi;
21157
+ hi <<= 1;
21158
+
21159
+ newName = `${name}_${lo}`;
21160
+ }
21161
+
21162
+ lo >>>= 1;
21163
+ hi >>>= 1;
21164
+
21165
+ if (lo && hi)
21166
+ {
21167
+ while (lo < hi)
21168
+ {
21169
+ const m = (lo + hi) >>> 1;
21170
+
21171
+ if (array .has (`${name}_${m}`))
21172
+ lo = m + 1;
21173
+ else
21174
+ hi = m;
21175
+ }
21176
+
21177
+ newName = `${name}_${lo}`;
21178
+ }
21179
+
21180
+ return newName;
21181
+ };
21182
+
21097
21183
  ;// CONCATENATED MODULE: ./src/x_ite/InputOutput/Generator.js
21098
21184
  /*******************************************************************************
21099
21185
  *
@@ -21144,6 +21230,7 @@ x_ite_Namespace.set ("x_ite/Base/X3DConstants", __default__);
21144
21230
 
21145
21231
 
21146
21232
 
21233
+
21147
21234
  function Generator ({ style = "TIDY", precision = 7, doublePrecision = 15 })
21148
21235
  {
21149
21236
  this .Style (style);
@@ -21164,12 +21251,11 @@ function Generator ({ style = "TIDY", precision = 7, doublePrecision = 15 })
21164
21251
  this .importedNames = new Map ();
21165
21252
  this .routeNodes = new Set ();
21166
21253
  this .level = 0;
21167
- this .newName = 0;
21168
21254
  this .containerFields = [ ];
21169
21255
  this .units = true;
21170
21256
  this .unitCategories = [ ];
21171
21257
 
21172
- this .names .set (null, new Map ());
21258
+ this .names .set (null, new Set ());
21173
21259
  }
21174
21260
 
21175
21261
  Generator .prototype =
@@ -21309,7 +21395,7 @@ Generator .prototype =
21309
21395
  this .executionContextStack .push (executionContext);
21310
21396
 
21311
21397
  if (! this .names .has (executionContext))
21312
- this .names .set (executionContext, new Map ());
21398
+ this .names .set (executionContext, Object .assign (new Set (), { index: 0 }));
21313
21399
 
21314
21400
  if (! this .importedNodesIndex .has (executionContext))
21315
21401
  this .importedNodesIndex .set (executionContext, new Set ());
@@ -21333,9 +21419,6 @@ Generator .prototype =
21333
21419
  },
21334
21420
  EnterScope: function ()
21335
21421
  {
21336
- if (this .level === 0)
21337
- this .newName = 0;
21338
-
21339
21422
  ++ this .level;
21340
21423
  },
21341
21424
  LeaveScope: function ()
@@ -21403,79 +21486,47 @@ Generator .prototype =
21403
21486
  {
21404
21487
  return this .nodes .has (baseNode);
21405
21488
  },
21406
- Name: (function ()
21489
+ Name: function (baseNode)
21407
21490
  {
21408
- const _TrailingNumbers = /_\d+$/;
21491
+ // Is the node already in index.
21409
21492
 
21410
- return function (baseNode)
21411
- {
21412
- // Is the node already in index
21493
+ const name = this .namesByNode .get (baseNode);
21413
21494
 
21414
- const name = this .namesByNode .get (baseNode);
21495
+ if (name !== undefined)
21496
+ {
21497
+ return name;
21498
+ }
21499
+ else
21500
+ {
21501
+ const
21502
+ name = baseNode .getName (),
21503
+ match = name .match (/^(.*?)(_\d+)?$/),
21504
+ names = this .names .get (this .ExecutionContext ());
21415
21505
 
21416
- if (name !== undefined)
21506
+ if (match [1])
21417
21507
  {
21418
- return name;
21508
+ // The node has a name.
21509
+
21510
+ var newName = getUniqueName (names, name, !! match [2]);
21419
21511
  }
21420
21512
  else
21421
21513
  {
21422
- const names = this .names .get (this .ExecutionContext ());
21423
-
21424
- // The node has no name
21425
-
21426
- if (baseNode .getName () .length === 0)
21427
- {
21428
- if (this .NeedsName (baseNode))
21429
- {
21430
- const name = this .UniqueName ();
21431
-
21432
- names .set (name, baseNode);
21433
- this .namesByNode .set (baseNode, name);
21434
-
21435
- return name;
21436
- }
21437
-
21438
- // The node doesn't need a name
21439
-
21440
- return baseNode .getName ();
21441
- }
21442
-
21443
- // The node has a name
21514
+ // The node has no name.
21444
21515
 
21445
- let name = baseNode .getName ();
21446
- const hasNumber = name .match (_TrailingNumbers) !== null;
21516
+ if (!this .NeedsName (baseNode))
21517
+ return "";
21447
21518
 
21448
- name = name .replace (_TrailingNumbers, "");
21449
-
21450
- if (name .length === 0)
21451
- {
21452
- if (this .NeedsName (baseNode))
21453
- name = this .UniqueName ();
21454
-
21455
- else
21456
- return "";
21457
- }
21458
- else
21459
- {
21460
- let
21461
- i = 0,
21462
- newName = hasNumber ? name + '_' + (++ i) : name;
21519
+ var newName = `_${++ names .index}`;
21520
+ }
21463
21521
 
21464
- while (names .has (newName))
21465
- {
21466
- newName = name + '_' + (++ i);
21467
- }
21522
+ // Add to indices.
21468
21523
 
21469
- name = newName;
21470
- }
21524
+ names .add (newName);
21525
+ this .namesByNode .set (baseNode, newName);
21471
21526
 
21472
- names .set (name, baseNode);
21473
- this .namesByNode .set (baseNode, name);
21474
-
21475
- return name;
21476
- }
21477
- };
21478
- })(),
21527
+ return newName;
21528
+ }
21529
+ },
21479
21530
  NeedsName: function (baseNode)
21480
21531
  {
21481
21532
  if (baseNode .getCloneCount () > 1)
@@ -21506,20 +21557,6 @@ Generator .prototype =
21506
21557
  return false;
21507
21558
  }
21508
21559
  },
21509
- UniqueName: function ()
21510
- {
21511
- const names = this .names .get (this .ExecutionContext ());
21512
-
21513
- for (; ;)
21514
- {
21515
- const name = '_' + (++ this .newName);
21516
-
21517
- if (names .has (name))
21518
- continue;
21519
-
21520
- return name;
21521
- }
21522
- },
21523
21560
  LocalName: function (baseNode)
21524
21561
  {
21525
21562
  const importedName = this .importedNames .get (baseNode);
@@ -34912,7 +34949,7 @@ x_ite_Namespace.set ("x_ite/Base/X3DBaseNode", X3DBaseNode_default_);
34912
34949
  *
34913
34950
  ******************************************************************************/
34914
34951
 
34915
- const VERSION_default_ = "8.6.8";
34952
+ const VERSION_default_ = "8.6.10";
34916
34953
  ;
34917
34954
 
34918
34955
  x_ite_Namespace.set ("x_ite/Browser/VERSION", VERSION_default_);
@@ -35167,70 +35204,72 @@ const Context =
35167
35204
 
35168
35205
  // Async functions
35169
35206
 
35170
- // Object .assign (gl, gl .getVersion () === 1
35171
- // ? {
35172
- // readPixelsAsync: gl .readPixels,
35173
- // }
35174
- // : {
35175
- // clientWaitAsync: function (sync, flags, timeout)
35176
- // {
35177
- // return new Promise ((resolve, reject) =>
35178
- // {
35179
- // const check = () =>
35180
- // {
35181
- // const result = this .clientWaitSync (sync, flags, 0);
35182
-
35183
- // switch (result)
35184
- // {
35185
- // case this .WAIT_FAILED:
35186
- // {
35187
- // reject ();
35188
- // return;
35189
- // }
35190
- // case this .TIMEOUT_EXPIRED:
35191
- // {
35192
- // setTimeout (check, timeout);
35193
- // return;
35194
- // }
35195
- // default:
35196
- // {
35197
- // resolve ();
35198
- // return;
35199
- // }
35200
- // }
35201
- // };
35202
-
35203
- // check ();
35204
- // });
35205
- // },
35206
- // getBufferSubDataAsync: async function (target, buffer, srcByteOffset, dstBuffer, /* optional */ dstOffset, /* optional */ length)
35207
- // {
35208
- // const sync = this .fenceSync (this .SYNC_GPU_COMMANDS_COMPLETE, 0);
35207
+ Object .assign (gl, gl .getVersion () === 1
35208
+ ?
35209
+ {
35210
+ readPixelsAsync: gl .readPixels,
35211
+ }
35212
+ :
35213
+ {
35214
+ clientWaitAsync: function (sync, flags, timeout)
35215
+ {
35216
+ return new Promise ((resolve, reject) =>
35217
+ {
35218
+ const check = () =>
35219
+ {
35220
+ const result = this .clientWaitSync (sync, flags, 0);
35221
+
35222
+ switch (result)
35223
+ {
35224
+ case this .WAIT_FAILED:
35225
+ {
35226
+ reject ();
35227
+ return;
35228
+ }
35229
+ case this .TIMEOUT_EXPIRED:
35230
+ {
35231
+ setTimeout (check, timeout);
35232
+ return;
35233
+ }
35234
+ default:
35235
+ {
35236
+ resolve ();
35237
+ return;
35238
+ }
35239
+ }
35240
+ };
35241
+
35242
+ check ();
35243
+ });
35244
+ },
35245
+ getBufferSubDataAsync: async function (target, buffer, srcByteOffset, dstBuffer, /* optional */ dstOffset, /* optional */ length)
35246
+ {
35247
+ const sync = this .fenceSync (this .SYNC_GPU_COMMANDS_COMPLETE, 0);
35209
35248
 
35210
- // this .flush ();
35249
+ this .flush ();
35211
35250
 
35212
- // await this .clientWaitAsync (sync, 0, 10);
35251
+ await this .clientWaitAsync (sync, 0, 10);
35213
35252
 
35214
- // this .deleteSync (sync);
35253
+ this .deleteSync (sync);
35215
35254
 
35216
- // this .bindBuffer (target, buffer);
35217
- // this .getBufferSubData (target, srcByteOffset, dstBuffer, dstOffset, length);
35218
- // this .bindBuffer (target, null);
35219
- // },
35220
- // readPixelsAsync: async function (x, y, w, h, format, type, dest, dstOffset)
35221
- // {
35222
- // const buffer = this .createBuffer ();
35255
+ this .bindBuffer (target, buffer);
35256
+ this .getBufferSubData (target, srcByteOffset, dstBuffer, dstOffset, length);
35257
+ this .bindBuffer (target, null);
35258
+ },
35259
+ readPixelsAsync: async function (x, y, w, h, format, type, dest, dstOffset)
35260
+ {
35261
+ const buffer = this .createBuffer ();
35223
35262
 
35224
- // this .bindBuffer (this .PIXEL_PACK_BUFFER, buffer);
35225
- // this .bufferData (this .PIXEL_PACK_BUFFER, dest .byteLength, this .STREAM_READ);
35226
- // this .readPixels (x, y, w, h, format, type, 0);
35227
- // this .bindBuffer (this .PIXEL_PACK_BUFFER, null);
35263
+ this .bindBuffer (this .PIXEL_PACK_BUFFER, buffer);
35264
+ this .bufferData (this .PIXEL_PACK_BUFFER, dest .byteLength, this .STREAM_READ);
35265
+ this .readPixels (x, y, w, h, format, type, 0);
35266
+ this .bindBuffer (this .PIXEL_PACK_BUFFER, null);
35228
35267
 
35229
- // await this .getBufferSubDataAsync (this .PIXEL_PACK_BUFFER, buffer, 0, dest, dstOffset);
35268
+ await this .getBufferSubDataAsync (this .PIXEL_PACK_BUFFER, buffer, 0, dest, dstOffset);
35230
35269
 
35231
- // this .deleteBuffer (buffer);
35232
- // },
35233
- // });
35270
+ this .deleteBuffer (buffer);
35271
+ },
35272
+ });
35234
35273
 
35235
35274
  // Return context.
35236
35275
 
@@ -35814,7 +35853,7 @@ const gettext_default_ = gettext;
35814
35853
  x_ite_Namespace.set ("locale/gettext", gettext_default_);
35815
35854
  /* harmony default export */ const locale_gettext = (gettext_default_);
35816
35855
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/BrowserTimings.js
35817
- /* provided dependency */ var $ = __webpack_require__(5);
35856
+ /* provided dependency */ var $ = __webpack_require__(535);
35818
35857
  /*******************************************************************************
35819
35858
  *
35820
35859
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35866,8 +35905,6 @@ x_ite_Namespace.set ("locale/gettext", gettext_default_);
35866
35905
 
35867
35906
 
35868
35907
 
35869
- function f2 (n) { return n .toFixed (2); }
35870
-
35871
35908
  function BrowserTimings (executionContext)
35872
35909
  {
35873
35910
  Base_X3DBaseNode.call (this, executionContext);
@@ -35928,6 +35965,7 @@ BrowserTimings .prototype = Object .assign (Object .create (Base_X3DBaseNode.pro
35928
35965
  this .fps .reset ();
35929
35966
  this .getBrowser () .prepareEvents () .addInterest ("update", this);
35930
35967
  this .update ();
35968
+ this .build ();
35931
35969
  }
35932
35970
  else
35933
35971
  {
@@ -35975,7 +36013,7 @@ BrowserTimings .prototype = Object .assign (Object .create (Base_X3DBaseNode.pro
35975
36013
  let r = 0;
35976
36014
 
35977
36015
  rows [r++] = $("<tr></tr>") .append ($("<td></td>") .text (locale_gettext("Frame rate") + ":")) .append ($("<td></td>") .text (f2(1000 / this .fps .averageTime) .toLocaleString (language, fixed) + " " + locale_gettext("fps")));
35978
- rows [r++] = $("<tr></tr>") .append ($("<td></td>") .text (locale_gettext("Speed") + ":")) .append ($("<td></td>") .text (f2(this .getSpeed (browser .currentSpeed)) .toLocaleString (language, fixed) + " " + this .getSpeedUnit (browser .currentSpeed)));
36016
+ rows [r++] = $("<tr></tr>") .append ($("<td></td>") .text (locale_gettext("Speed") + ":")) .append ($("<td></td>") .text (f2(this .getSpeed (browser .currentSpeed)) .toLocaleString (language, fixed) + " " + this .getSpeedUnit (browser .currentSpeed)));
35979
36017
 
35980
36018
  if (this .localStorage .type === "MORE")
35981
36019
  {
@@ -36000,14 +36038,14 @@ BrowserTimings .prototype = Object .assign (Object .create (Base_X3DBaseNode.pro
36000
36038
 
36001
36039
  rows [1] .addClass ("x_ite-private-more");
36002
36040
 
36003
- rows [r++] = $("<tr></tr>") .append ($("<td></td>") .text (locale_gettext("Browser") + ":")) .append ($("<td></td>") .text (f2(browser .getSystemTime () .averageTime) .toLocaleString (language, fixed) + " " + locale_gettext("ms")));
36004
- rows [r++] = $("<tr></tr>") .append ($("<td></td>") .text (locale_gettext("X3D total") + ":")) .append ($("<td></td>") .text (f2(browser .getBrowserTime () .averageTime) .toLocaleString (language, fixed) + " " + locale_gettext("ms")));
36005
- rows [r++] = $("<tr></tr>") .append ($("<td></td>") .text (locale_gettext("Event Processing") + ":")) .append ($("<td></td>") .text (f2(routingTime) .toLocaleString (language, fixed) + " " + locale_gettext("ms")));
36006
- rows [r++] = $("<tr></tr>") .append ($("<td></td>") .text (locale_gettext("Pointer") + ":")) .append ($("<td></td>") .text (f2(browser .getPointingTime () .averageTime) .toLocaleString (language, fixed) + " " + locale_gettext("ms")));
36007
- rows [r++] = $("<tr></tr>") .append ($("<td></td>") .text (locale_gettext("Camera") + ":")) .append ($("<td></td>") .text (f2(browser .getCameraTime () .averageTime) .toLocaleString (language, fixed) + " " + locale_gettext("ms")));
36008
- rows [r++] = $("<tr></tr>") .append ($("<td></td>") .text (locale_gettext("Picking") + ":")) .append ($("<td></td>") .text (f2(browser .getPickingTime () .averageTime) .toLocaleString (language, fixed) + " " + locale_gettext("ms")));
36009
- rows [r++] = $("<tr></tr>") .append ($("<td></td>") .text (locale_gettext("Collision Detection") + ":")) .append ($("<td></td>") .text (f2(collisionTime) .toLocaleString (language, fixed) + " " + locale_gettext("ms")));
36010
- rows [r++] = $("<tr></tr>") .append ($("<td></td>") .text (locale_gettext("Rendering") + ":")) .append ($("<td></td>") .text (f2(browser .getDisplayTime () .averageTime) .toLocaleString (language, fixed) + " " + locale_gettext("ms")));
36041
+ rows [r++] = $("<tr></tr>") .append ($("<td></td>") .text (locale_gettext("Browser") + ":")) .append ($("<td></td>") .text (f2(browser .getSystemTime () .averageTime) .toLocaleString (language, fixed) + " " + locale_gettext("ms")));
36042
+ rows [r++] = $("<tr></tr>") .append ($("<td></td>") .text (locale_gettext("X3D total") + ":")) .append ($("<td></td>") .text (f2(browser .getBrowserTime () .averageTime) .toLocaleString (language, fixed) + " " + locale_gettext("ms")));
36043
+ rows [r++] = $("<tr></tr>") .append ($("<td></td>") .text (locale_gettext("Event Processing") + ":")) .append ($("<td></td>") .text (f2(routingTime) .toLocaleString (language, fixed) + " " + locale_gettext("ms")));
36044
+ rows [r++] = $("<tr></tr>") .append ($("<td></td>") .text (locale_gettext("Pointer") + ":")) .append ($("<td></td>") .text (f2(browser .getPointingTime () .averageTime) .toLocaleString (language, fixed) + " " + locale_gettext("ms")));
36045
+ rows [r++] = $("<tr></tr>") .append ($("<td></td>") .text (locale_gettext("Camera") + ":")) .append ($("<td></td>") .text (f2(browser .getCameraTime () .averageTime) .toLocaleString (language, fixed) + " " + locale_gettext("ms")));
36046
+ rows [r++] = $("<tr></tr>") .append ($("<td></td>") .text (locale_gettext("Picking") + ":")) .append ($("<td></td>") .text (f2(browser .getPickingTime () .averageTime) .toLocaleString (language, fixed) + " " + locale_gettext("ms")));
36047
+ rows [r++] = $("<tr></tr>") .append ($("<td></td>") .text (locale_gettext("Collision Detection") + ":")) .append ($("<td></td>") .text (f2(collisionTime) .toLocaleString (language, fixed) + " " + locale_gettext("ms")));
36048
+ rows [r++] = $("<tr></tr>") .append ($("<td></td>") .text (locale_gettext("Rendering") + ":")) .append ($("<td></td>") .text (f2(browser .getDisplayTime () .averageTime) .toLocaleString (language, fixed) + " " + locale_gettext("ms")));
36011
36049
  rows [r++] = $("<tr></tr>") .append ($("<td></td>") .text (locale_gettext("Number of Shapes") + ":")) .append ($("<td></td>") .text (opaqueShapes + " + " + transparentShapes));
36012
36050
  rows [r++] = $("<tr></tr>") .append ($("<td></td>") .text (locale_gettext("Number of Sensors") + ":")) .append ($("<td></td>") .text (prepareEvents + sensors));
36013
36051
 
@@ -36045,6 +36083,8 @@ BrowserTimings .prototype = Object .assign (Object .create (Base_X3DBaseNode.pro
36045
36083
  },
36046
36084
  });
36047
36085
 
36086
+ function f2 (n) { return isFinite (n) ? n .toFixed (2) : 0 .toFixed (2); }
36087
+
36048
36088
  const BrowserTimings_default_ = BrowserTimings;
36049
36089
  ;
36050
36090
 
@@ -36506,6 +36546,9 @@ BrowserOptions .prototype = Object .assign (Object .create (Base_X3DBaseNode.pro
36506
36546
  set_straightenHorizon__: function (straightenHorizon)
36507
36547
  {
36508
36548
  this .localStorage .StraightenHorizon = straightenHorizon .getValue ();
36549
+
36550
+ if (straightenHorizon .getValue ())
36551
+ this .getBrowser () .getActiveLayer ()?.straightenView ();
36509
36552
  },
36510
36553
  updateContentScale: function ()
36511
36554
  {
@@ -36772,7 +36815,7 @@ const RenderingProperties_default_ = RenderingProperties;
36772
36815
  x_ite_Namespace.set ("x_ite/Browser/Core/RenderingProperties", RenderingProperties_default_);
36773
36816
  /* harmony default export */ const Core_RenderingProperties = (RenderingProperties_default_);
36774
36817
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/Notification.js
36775
- /* provided dependency */ var Notification_$ = __webpack_require__(5);
36818
+ /* provided dependency */ var Notification_$ = __webpack_require__(535);
36776
36819
  /*******************************************************************************
36777
36820
  *
36778
36821
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36894,8 +36937,8 @@ const Notification_default_ = Notification;
36894
36937
  x_ite_Namespace.set ("x_ite/Browser/Core/Notification", Notification_default_);
36895
36938
  /* harmony default export */ const Core_Notification = (Notification_default_);
36896
36939
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/ContextMenu.js
36897
- /* provided dependency */ var jquery_fullscreen = __webpack_require__(352);
36898
- /* provided dependency */ var ContextMenu_$ = __webpack_require__(5);
36940
+ /* provided dependency */ var jquery_fullscreen = __webpack_require__(507);
36941
+ /* provided dependency */ var ContextMenu_$ = __webpack_require__(535);
36899
36942
  /*******************************************************************************
36900
36943
  *
36901
36944
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -37048,18 +37091,9 @@ ContextMenu .prototype = Object .assign (Object .create (Base_X3DBaseNode.protot
37048
37091
  browser .setBrowserOption ("StraightenHorizon", straightenHorizon);
37049
37092
 
37050
37093
  if (straightenHorizon)
37051
- {
37052
37094
  browser .getNotification () ._string = locale_gettext("Straighten Horizon") + ": " + locale_gettext("on");
37053
-
37054
- const activeViewpoint = browser .getActiveViewpoint ();
37055
-
37056
- if (activeViewpoint)
37057
- activeViewpoint .straighten (browser .getActiveLayer (), true);
37058
- }
37059
37095
  else
37060
- {
37061
37096
  browser .getNotification () ._string = locale_gettext("Straighten Horizon") + ": " + locale_gettext("off");
37062
- }
37063
37097
  }
37064
37098
  .bind (this),
37065
37099
  },
@@ -38014,15 +38048,10 @@ X3DNode .prototype = Object .assign (Object .create (Base_X3DBaseNode.prototype)
38014
38048
  return copy;
38015
38049
  }
38016
38050
  },
38017
- getDisplayName: (function ()
38051
+ getDisplayName: function ()
38018
38052
  {
38019
- const _TrailingNumber = /_\d+$/;
38020
-
38021
- return function ()
38022
- {
38023
- return this .getName () .replace (_TrailingNumber, "");
38024
- };
38025
- })(),
38053
+ return this .getName () .replace (/_\d+$/, "");
38054
+ },
38026
38055
  getNeedsName: function ()
38027
38056
  {
38028
38057
  if (this .getName () .length)
@@ -41897,7 +41926,7 @@ const X3DUrlObject_default_ = X3DUrlObject;
41897
41926
  x_ite_Namespace.set ("x_ite/Components/Networking/X3DUrlObject", X3DUrlObject_default_);
41898
41927
  /* harmony default export */ const Networking_X3DUrlObject = (X3DUrlObject_default_);
41899
41928
  ;// CONCATENATED MODULE: ./src/x_ite/Parser/X3DParser.js
41900
- /* provided dependency */ var X3DParser_$ = __webpack_require__(5);
41929
+ /* provided dependency */ var X3DParser_$ = __webpack_require__(535);
41901
41930
  /*******************************************************************************
41902
41931
  *
41903
41932
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -45074,7 +45103,7 @@ const VRMLParser_default_ = VRMLParser;
45074
45103
  x_ite_Namespace.set ("x_ite/Parser/VRMLParser", VRMLParser_default_);
45075
45104
  /* harmony default export */ const Parser_VRMLParser = (VRMLParser_default_);
45076
45105
  ;// CONCATENATED MODULE: ./src/x_ite/Parser/XMLParser.js
45077
- /* provided dependency */ var XMLParser_$ = __webpack_require__(5);
45106
+ /* provided dependency */ var XMLParser_$ = __webpack_require__(535);
45078
45107
  /*******************************************************************************
45079
45108
  *
45080
45109
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -47117,7 +47146,7 @@ const URLs_default_ = URLs;
47117
47146
  x_ite_Namespace.set ("x_ite/Browser/Networking/URLs", URLs_default_);
47118
47147
  /* harmony default export */ const Networking_URLs = (URLs_default_);
47119
47148
  ;// CONCATENATED MODULE: ./src/x_ite/Parser/GLTF2Parser.js
47120
- /* provided dependency */ var GLTF2Parser_$ = __webpack_require__(5);
47149
+ /* provided dependency */ var GLTF2Parser_$ = __webpack_require__(535);
47121
47150
  /*******************************************************************************
47122
47151
  *
47123
47152
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -47181,9 +47210,7 @@ x_ite_Namespace.set ("x_ite/Browser/Networking/URLs", URLs_default_);
47181
47210
  // https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html
47182
47211
  // https://github.com/KhronosGroup/glTF-Sample-Models
47183
47212
 
47184
- const
47185
- STEP_TIME = 1e-4, // in seconds
47186
- SAMPLES_PER_SECOND = 30; // in 1/s
47213
+ const SAMPLES_PER_SECOND = 30; // in 1/s
47187
47214
 
47188
47215
  function GLTF2Parser (scene)
47189
47216
  {
@@ -47206,7 +47233,7 @@ function GLTF2Parser (scene)
47206
47233
  this .accessors = [ ];
47207
47234
  this .samplers = [ ];
47208
47235
  this .materials = [ ];
47209
- this .textureTransformNodes = new Map ();
47236
+ this .textureTransformNodes = [ ];
47210
47237
  this .cameras = [ ];
47211
47238
  this .viewpoints = 0;
47212
47239
  this .nodes = [ ];
@@ -47440,12 +47467,16 @@ GLTF2Parser .prototype = Object .assign (Object .create (Parser_X3DParser.protot
47440
47467
  if (this .vectorValue (light .color, color))
47441
47468
  lightNode ._color = color;
47442
47469
 
47470
+ lightNode ._global = true;
47443
47471
  lightNode ._intensity = this .numberValue (light .intensity, 1);
47444
47472
 
47445
47473
  lightNode .setup ();
47446
47474
 
47447
47475
  if (name)
47476
+ {
47448
47477
  scene .addNamedNode (scene .getUniqueName (name), lightNode);
47478
+ scene .addExportedNode (scene .getUniqueExportName (name), lightNode);
47479
+ }
47449
47480
 
47450
47481
  return lightNode;
47451
47482
  },
@@ -47591,7 +47622,7 @@ GLTF2Parser .prototype = Object .assign (Object .create (Parser_X3DParser.protot
47591
47622
  components = Components .get (accessor .type),
47592
47623
  count = accessor .count || 0,
47593
47624
  stride = byteStride ? byteStride / TypedArray .BYTES_PER_ELEMENT : components,
47594
- length = stride * count,
47625
+ length = Math .min (stride * count, (bufferView .byteLength - byteOffset) / TypedArray .BYTES_PER_ELEMENT),
47595
47626
  array = new TypedArray (bufferView .buffer, byteOffset, length);
47596
47627
 
47597
47628
  if (stride === components)
@@ -47716,7 +47747,10 @@ GLTF2Parser .prototype = Object .assign (Object .create (Parser_X3DParser.protot
47716
47747
  name = this .sanitizeName (sampler .name);
47717
47748
 
47718
47749
  if (name)
47750
+ {
47719
47751
  scene .addNamedNode (scene .getUniqueName (name), texturePropertiesNode);
47752
+ scene .addExportedNode (scene .getUniqueExportName (name), texturePropertiesNode);
47753
+ }
47720
47754
 
47721
47755
  // minFilter
47722
47756
 
@@ -47814,7 +47848,10 @@ GLTF2Parser .prototype = Object .assign (Object .create (Parser_X3DParser.protot
47814
47848
  name = this .sanitizeName (texture .name || image .name);
47815
47849
 
47816
47850
  if (name)
47851
+ {
47817
47852
  scene .addNamedNode (scene .getUniqueName (name), textureNode);
47853
+ scene .addExportedNode (scene .getUniqueExportName (name), textureNode);
47854
+ }
47818
47855
 
47819
47856
  textureNode ._url = [image .uri];
47820
47857
  textureNode ._flipVertically = true;
@@ -47843,13 +47880,18 @@ GLTF2Parser .prototype = Object .assign (Object .create (Parser_X3DParser.protot
47843
47880
  if (material .appearanceNode)
47844
47881
  return material .appearanceNode;
47845
47882
 
47846
- if (!(material .extensions instanceof Object))
47847
- material .extensions = { };
47883
+ const texCoordIndices = this .texCoordIndices ("", material);
47884
+
47885
+ this .texCoordIndex = [... texCoordIndices] .reduce (Math .max, -1);
47886
+
47887
+ this .textureTransformNodes = [ ];
47888
+ this .texCoordMappings = new Map ();
47889
+ material .texCoordMappings = this .texCoordMappings;
47848
47890
 
47849
47891
  const
47850
47892
  scene = this .getExecutionContext (),
47851
47893
  appearanceNode = scene .createNode ("Appearance", false),
47852
- materialNode = this .materialObjectMaterial (material),
47894
+ materialNode = this .createMaterial (material),
47853
47895
  name = this .sanitizeName (material .name);
47854
47896
 
47855
47897
  const emissiveFactor = new Numbers_Color3 (0, 0, 0);
@@ -47857,8 +47899,8 @@ GLTF2Parser .prototype = Object .assign (Object .create (Parser_X3DParser.protot
47857
47899
  if (this .vectorValue (material .emissiveFactor, emissiveFactor))
47858
47900
  materialNode ._emissiveColor = emissiveFactor;
47859
47901
 
47860
- materialNode ._emissiveTextureMapping = this .textureMapping (material .emissiveTexture);
47861
47902
  materialNode ._emissiveTexture = this .textureInfo (material .emissiveTexture);
47903
+ materialNode ._emissiveTextureMapping = this .textureMapping (material .emissiveTexture);
47862
47904
 
47863
47905
  this .occlusionTextureInfo (material .occlusionTexture, materialNode);
47864
47906
  this .normalTextureInfo (material .normalTexture, materialNode);
@@ -47866,8 +47908,28 @@ GLTF2Parser .prototype = Object .assign (Object .create (Parser_X3DParser.protot
47866
47908
 
47867
47909
  materialNode .setup ();
47868
47910
 
47911
+ for (const i of texCoordIndices)
47912
+ {
47913
+ const mapping = `TEXCOORD_${i}`;
47914
+
47915
+ if (this .textureTransformNodes .length)
47916
+ {
47917
+ const textureTransformNode = scene .createNode ("TextureTransform", false);
47918
+
47919
+ textureTransformNode ._mapping = mapping;
47920
+ textureTransformNode .setup ();
47921
+
47922
+ this .textureTransformNodes .push (textureTransformNode);
47923
+ }
47924
+
47925
+ this .texCoordMappings .set (mapping, i);
47926
+ }
47927
+
47869
47928
  if (name)
47929
+ {
47870
47930
  scene .addNamedNode (scene .getUniqueName (name), appearanceNode);
47931
+ scene .addExportedNode (scene .getUniqueExportName (name), appearanceNode);
47932
+ }
47871
47933
 
47872
47934
  appearanceNode ._alphaMode = this .stringValue (material .alphaMode, "OPAQUE");
47873
47935
  appearanceNode ._alphaCutoff = this .numberValue (material .alphaCutoff, 0.5);
@@ -47878,11 +47940,24 @@ GLTF2Parser .prototype = Object .assign (Object .create (Parser_X3DParser.protot
47878
47940
 
47879
47941
  return material .appearanceNode = appearanceNode;
47880
47942
  },
47881
- materialObjectMaterial: function (material)
47943
+ texCoordIndices: function (key, object, indices = new Set ())
47944
+ {
47945
+ if (!(object instanceof Object))
47946
+ return indices;
47947
+
47948
+ if (key .endsWith ("Texture") && !object?.extensions?.KHR_texture_transform)
47949
+ indices .add (object .texCoord || 0);
47950
+
47951
+ for (const [key, value] of Object .entries (object))
47952
+ this .texCoordIndices (key, value, indices);
47953
+
47954
+ return indices;
47955
+ },
47956
+ createMaterial: function (material)
47882
47957
  {
47883
47958
  const materials = [
47884
47959
  this .pbrMetallicRoughnessObject .bind (this, material .pbrMetallicRoughness),
47885
- this .pbrSpecularGlossinessObject .bind (this, material .extensions .KHR_materials_pbrSpecularGlossiness),
47960
+ this .pbrSpecularGlossinessObject .bind (this, material .extensions?.KHR_materials_pbrSpecularGlossiness),
47886
47961
  this .pbrMetallicRoughnessObject .bind (this, { }),
47887
47962
  ];
47888
47963
 
@@ -47916,10 +47991,10 @@ GLTF2Parser .prototype = Object .assign (Object .create (Parser_X3DParser.protot
47916
47991
  materialNode ._metallic = this .numberValue (pbrMetallicRoughness .metallicFactor, 1);
47917
47992
  materialNode ._roughness = this .numberValue (pbrMetallicRoughness .roughnessFactor, 1);
47918
47993
 
47919
- materialNode ._baseTextureMapping = this .textureMapping (pbrMetallicRoughness .baseColorTexture);
47920
47994
  materialNode ._baseTexture = this .textureInfo (pbrMetallicRoughness .baseColorTexture);
47921
- materialNode ._metallicRoughnessTextureMapping = this .textureMapping (pbrMetallicRoughness .metallicRoughnessTexture);
47995
+ materialNode ._baseTextureMapping = this .textureMapping (pbrMetallicRoughness .baseColorTexture);
47922
47996
  materialNode ._metallicRoughnessTexture = this .textureInfo (pbrMetallicRoughness .metallicRoughnessTexture);
47997
+ materialNode ._metallicRoughnessTextureMapping = this .textureMapping (pbrMetallicRoughness .metallicRoughnessTexture);
47923
47998
 
47924
47999
  return materialNode;
47925
48000
  },
@@ -47954,30 +48029,23 @@ GLTF2Parser .prototype = Object .assign (Object .create (Parser_X3DParser.protot
47954
48029
 
47955
48030
  materialNode ._shininess = this .numberValue (pbrSpecularGlossiness .glossinessFactor, 1);
47956
48031
 
47957
- materialNode ._diffuseTextureMapping = this .textureMapping (pbrSpecularGlossiness .diffuseTexture);
47958
48032
  materialNode ._diffuseTexture = this .textureInfo (pbrSpecularGlossiness .diffuseTexture);
47959
- materialNode ._specularTextureMapping = this .textureMapping (pbrSpecularGlossiness .specularGlossinessTexture);
48033
+ materialNode ._diffuseTextureMapping = this .textureMapping (pbrSpecularGlossiness .diffuseTexture);
47960
48034
  materialNode ._specularTexture = this .textureInfo (pbrSpecularGlossiness .specularGlossinessTexture);
47961
- materialNode ._shininessTextureMapping = this .textureMapping (pbrSpecularGlossiness .specularGlossinessTexture);
48035
+ materialNode ._specularTextureMapping = this .textureMapping (pbrSpecularGlossiness .specularGlossinessTexture);
47962
48036
  materialNode ._shininessTexture = this .textureInfo (pbrSpecularGlossiness .specularGlossinessTexture);
48037
+ materialNode ._shininessTextureMapping = this .textureMapping (pbrSpecularGlossiness .specularGlossinessTexture);
47963
48038
 
47964
48039
  return materialNode;
47965
48040
  },
47966
- textureMapping: function (texture)
47967
- {
47968
- if (!(texture instanceof Object))
47969
- return "";
47970
-
47971
- return "TEXCOORD_" + (texture .texCoord || 0);
47972
- },
47973
48041
  occlusionTextureInfo: function (occlusionTexture, materialNode)
47974
48042
  {
47975
48043
  if (!(occlusionTexture instanceof Object))
47976
48044
  return null;
47977
48045
 
47978
48046
  materialNode ._occlusionStrength = this .numberValue (occlusionTexture .strength, 1);
47979
- materialNode ._occlusionTextureMapping = this .textureMapping (occlusionTexture);
47980
48047
  materialNode ._occlusionTexture = this .textureInfo (occlusionTexture);
48048
+ materialNode ._occlusionTextureMapping = this .textureMapping (occlusionTexture);
47981
48049
  },
47982
48050
  normalTextureInfo: function (normalTexture, materialNode)
47983
48051
  {
@@ -47985,8 +48053,8 @@ GLTF2Parser .prototype = Object .assign (Object .create (Parser_X3DParser.protot
47985
48053
  return null;
47986
48054
 
47987
48055
  materialNode ._normalScale = this .numberValue (normalTexture .scale, 1);
47988
- materialNode ._normalTextureMapping = this .textureMapping (normalTexture);
47989
48056
  materialNode ._normalTexture = this .textureInfo (normalTexture);
48057
+ materialNode ._normalTextureMapping = this .textureMapping (normalTexture);
47990
48058
  },
47991
48059
  textureInfo: function (texture)
47992
48060
  {
@@ -47994,10 +48062,19 @@ GLTF2Parser .prototype = Object .assign (Object .create (Parser_X3DParser.protot
47994
48062
  return null;
47995
48063
 
47996
48064
  if (texture .extensions instanceof Object)
47997
- this .textureTransformObject (texture .extensions .KHR_texture_transform, this .textureMapping (texture));
48065
+ texture .mapping = this .textureTransformObject (texture .extensions .KHR_texture_transform, texture .texCoord || 0);
48066
+ else
48067
+ texture .mapping = `TEXCOORD_${texture .texCoord || 0}`;
47998
48068
 
47999
48069
  return this .textureObject (this .textures [texture .index]);
48000
48070
  },
48071
+ textureMapping: function (texture)
48072
+ {
48073
+ if (!(texture instanceof Object))
48074
+ return "";
48075
+
48076
+ return texture .mapping;
48077
+ },
48001
48078
  materialExtensions: function (extensions, materialNode)
48002
48079
  {
48003
48080
  if (!(extensions instanceof Object))
@@ -48049,7 +48126,7 @@ GLTF2Parser .prototype = Object .assign (Object .create (Parser_X3DParser.protot
48049
48126
 
48050
48127
  materialNode ._emissiveStrength = this .numberValue (KHR_materials_emissive_strength .emissiveStrength, 1);
48051
48128
  },
48052
- textureTransformObject: function (KHR_texture_transform, mapping)
48129
+ textureTransformObject: function (KHR_texture_transform, texCoord)
48053
48130
  {
48054
48131
  if (!(KHR_texture_transform instanceof Object))
48055
48132
  return;
@@ -48059,7 +48136,8 @@ GLTF2Parser .prototype = Object .assign (Object .create (Parser_X3DParser.protot
48059
48136
 
48060
48137
  const
48061
48138
  scene = this .getExecutionContext (),
48062
- textureTransformNode = scene .createNode ("TextureTransformMatrix3D", false);
48139
+ textureTransformNode = scene .createNode ("TextureTransformMatrix3D", false),
48140
+ mapping = `TEXCOORD_${this .texCoordIndex + this .textureTransformNodes .length + 1}`;
48063
48141
 
48064
48142
  const
48065
48143
  translation = new Numbers_Vector2 (0, 0),
@@ -48079,7 +48157,10 @@ GLTF2Parser .prototype = Object .assign (Object .create (Parser_X3DParser.protot
48079
48157
 
48080
48158
  textureTransformNode .setup ();
48081
48159
 
48082
- this .textureTransformNodes .set (mapping, textureTransformNode);
48160
+ this .textureTransformNodes .push (textureTransformNode);
48161
+ this .texCoordMappings .set (mapping, KHR_texture_transform .texCoord ?? texCoord);
48162
+
48163
+ return mapping;
48083
48164
  },
48084
48165
  meshesArray: function (meshes)
48085
48166
  {
@@ -48107,7 +48188,10 @@ GLTF2Parser .prototype = Object .assign (Object .create (Parser_X3DParser.protot
48107
48188
  if (name)
48108
48189
  {
48109
48190
  for (const shapeNode of shapeNodes)
48191
+ {
48110
48192
  scene .addNamedNode (scene .getUniqueName (name), shapeNode);
48193
+ scene .addExportedNode (scene .getUniqueExportName (name), shapeNode);
48194
+ }
48111
48195
  }
48112
48196
 
48113
48197
  return mesh .shapeNodes = shapeNodes;
@@ -48341,7 +48425,10 @@ GLTF2Parser .prototype = Object .assign (Object .create (Parser_X3DParser.protot
48341
48425
  // Name
48342
48426
 
48343
48427
  if (name)
48428
+ {
48344
48429
  scene .addNamedNode (scene .getUniqueName (name), viewpointNode);
48430
+ scene .addExportedNode (scene .getUniqueExportName (name), viewpointNode);
48431
+ }
48345
48432
 
48346
48433
  if (camera .name)
48347
48434
  viewpointNode ._description = camera .name;
@@ -48437,7 +48524,10 @@ GLTF2Parser .prototype = Object .assign (Object .create (Parser_X3DParser.protot
48437
48524
  // Name
48438
48525
 
48439
48526
  if (name)
48527
+ {
48440
48528
  scene .addNamedNode (scene .getUniqueName (name), transformNode);
48529
+ scene .addExportedNode (scene .getUniqueExportName (name), transformNode);
48530
+ }
48441
48531
 
48442
48532
  // Set transformation matrix.
48443
48533
 
@@ -48569,6 +48659,7 @@ GLTF2Parser .prototype = Object .assign (Object .create (Parser_X3DParser.protot
48569
48659
  const switchNode = scene .createNode ("Switch", false);
48570
48660
 
48571
48661
  scene .addNamedNode (scene .getUniqueName ("Scenes"), switchNode);
48662
+ scene .addExportedNode (scene .getUniqueExportName ("Scenes"), switchNode);
48572
48663
 
48573
48664
  // Scenes.
48574
48665
 
@@ -48607,7 +48698,10 @@ GLTF2Parser .prototype = Object .assign (Object .create (Parser_X3DParser.protot
48607
48698
  name = this .sanitizeName (sceneObject .name);
48608
48699
 
48609
48700
  if (name)
48701
+ {
48610
48702
  scene .addNamedNode (scene .getUniqueName (name), groupNode);
48703
+ scene .addExportedNode (scene .getUniqueExportName (name), groupNode);
48704
+ }
48611
48705
 
48612
48706
  groupNode ._children = nodes;
48613
48707
 
@@ -48638,7 +48732,7 @@ GLTF2Parser .prototype = Object .assign (Object .create (Parser_X3DParser.protot
48638
48732
  groupNode = scene .createNode ("Group", false);
48639
48733
 
48640
48734
  scene .addNamedNode (scene .getUniqueName ("Animations"), groupNode);
48641
- scene .addExportedNode ("Animations", groupNode);
48735
+ scene .addExportedNode (scene .getUniqueExportName ("Animations"), groupNode);
48642
48736
 
48643
48737
  groupNode ._children = animationNodes;
48644
48738
 
@@ -48667,6 +48761,8 @@ GLTF2Parser .prototype = Object .assign (Object .create (Parser_X3DParser.protot
48667
48761
 
48668
48762
  scene .addNamedNode (scene .getUniqueName (name || `Animation${this .animations}`), groupNode);
48669
48763
  scene .addNamedNode (scene .getUniqueName (`Timer${this .animations}`), timeSensorNode);
48764
+ scene .addExportedNode (scene .getUniqueExportName (name || `Animation${this .animations}`), groupNode);
48765
+ scene .addExportedNode (scene .getUniqueExportName (`Timer${this .animations}`), timeSensorNode);
48670
48766
 
48671
48767
  timeSensorNode ._description = animation .name || `Animation ${this .animations}`;
48672
48768
  groupNode ._children .push (timeSensorNode, ... channelNodes);
@@ -48801,11 +48897,9 @@ GLTF2Parser .prototype = Object .assign (Object .create (Parser_X3DParser.protot
48801
48897
  if (!+materialNode .getTextureBits ())
48802
48898
  return null;
48803
48899
 
48804
- const textureTransformNodes = [... this .textureTransformNodes .values ()]
48900
+ const textureTransformNodes = this .textureTransformNodes
48805
48901
  .sort ((a, b) => Algorithm.cmp (a ._mapping .getValue (), b ._mapping .getValue ()));
48806
48902
 
48807
- this .textureTransformNodes .clear ();
48808
-
48809
48903
  switch (textureTransformNodes .length)
48810
48904
  {
48811
48905
  case 0:
@@ -49142,7 +49236,7 @@ GLTF2Parser .prototype = Object .assign (Object .create (Parser_X3DParser.protot
49142
49236
  if (texCoords .textureCoordinateNode)
49143
49237
  return texCoords .textureCoordinateNode;
49144
49238
 
49145
- switch (texCoords .length)
49239
+ switch (material .texCoordMappings .size)
49146
49240
  {
49147
49241
  case 0:
49148
49242
  {
@@ -49150,12 +49244,13 @@ GLTF2Parser .prototype = Object .assign (Object .create (Parser_X3DParser.protot
49150
49244
  }
49151
49245
  case 1:
49152
49246
  {
49153
- return texCoords .textureCoordinateNode = this .createTextureCoordinate (texCoords [0], 0);
49247
+ return texCoords .textureCoordinateNode = [... material .texCoordMappings .entries ()]
49248
+ .map (([mapping, i]) => this .createTextureCoordinate (texCoords [i], mapping)) [0];
49154
49249
  }
49155
49250
  default:
49156
49251
  {
49157
- const textureCoordinateNodes = texCoords
49158
- .map ((texCoord, i) => this .createTextureCoordinate (texCoord, i))
49252
+ const textureCoordinateNodes = [... material .texCoordMappings .entries ()]
49253
+ .map (([mapping, i]) => this .createTextureCoordinate (texCoords [i], mapping))
49159
49254
  .filter (node => node)
49160
49255
  .sort ((a, b) => Algorithm.cmp (a ._mapping .getValue (), b ._mapping .getValue ()));
49161
49256
 
@@ -49182,19 +49277,19 @@ GLTF2Parser .prototype = Object .assign (Object .create (Parser_X3DParser.protot
49182
49277
  if (texCoord .type !== "VEC2")
49183
49278
  return null;
49184
49279
 
49185
- if (texCoord .textureCoordinateNode)
49186
- return texCoord .textureCoordinateNode;
49280
+ if (texCoord [mapping])
49281
+ return texCoord [mapping];
49187
49282
 
49188
49283
  const
49189
49284
  scene = this .getExecutionContext (),
49190
49285
  textureCoordinateNode = scene .createNode ("TextureCoordinate", false);
49191
49286
 
49192
- textureCoordinateNode ._mapping = "TEXCOORD_" + mapping;
49287
+ textureCoordinateNode ._mapping = mapping;
49193
49288
  textureCoordinateNode ._point = texCoord .array;
49194
49289
 
49195
49290
  textureCoordinateNode .setup ();
49196
49291
 
49197
- return texCoord .textureCoordinateNode = textureCoordinateNode;
49292
+ return texCoord [mapping] = textureCoordinateNode;
49198
49293
  },
49199
49294
  createNormal: function (normal)
49200
49295
  {
@@ -49290,7 +49385,7 @@ GLTF2Parser .prototype = Object .assign (Object .create (Parser_X3DParser.protot
49290
49385
  interpolatorNode ._key .push (times [0] / cycleInterval);
49291
49386
 
49292
49387
  for (let i = 1, length = times .length; i < length; ++ i)
49293
- interpolatorNode ._key .push ((times [i] - STEP_TIME) / cycleInterval, times [i] / cycleInterval);
49388
+ interpolatorNode ._key .push (times [i] / cycleInterval, times [i] / cycleInterval);
49294
49389
 
49295
49390
  // KeyValue
49296
49391
 
@@ -49364,7 +49459,7 @@ GLTF2Parser .prototype = Object .assign (Object .create (Parser_X3DParser.protot
49364
49459
  interpolatorNode ._key .push (times [0] / cycleInterval);
49365
49460
 
49366
49461
  for (let i = 1, length = times .length; i < length; ++ i)
49367
- interpolatorNode ._key .push ((times [i] - STEP_TIME) / cycleInterval, times [i] / cycleInterval);
49462
+ interpolatorNode ._key .push (times [i] / cycleInterval, times [i] / cycleInterval);
49368
49463
 
49369
49464
  // KeyValue
49370
49465
 
@@ -49496,7 +49591,7 @@ const GLTF2Parser_default_ = GLTF2Parser;
49496
49591
  x_ite_Namespace.set ("x_ite/Parser/GLTF2Parser", GLTF2Parser_default_);
49497
49592
  /* harmony default export */ const Parser_GLTF2Parser = (GLTF2Parser_default_);
49498
49593
  ;// CONCATENATED MODULE: ./src/x_ite/Parser/GLB2Parser.js
49499
- /* provided dependency */ var GLB2Parser_$ = __webpack_require__(5);
49594
+ /* provided dependency */ var GLB2Parser_$ = __webpack_require__(535);
49500
49595
  /*******************************************************************************
49501
49596
  *
49502
49597
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -49649,7 +49744,7 @@ const GLB2Parser_default_ = GLB2Parser;
49649
49744
  x_ite_Namespace.set ("x_ite/Parser/GLB2Parser", GLB2Parser_default_);
49650
49745
  /* harmony default export */ const Parser_GLB2Parser = (GLB2Parser_default_);
49651
49746
  ;// CONCATENATED MODULE: ./src/x_ite/Parser/OBJParser.js
49652
- /* provided dependency */ var OBJParser_$ = __webpack_require__(5);
49747
+ /* provided dependency */ var OBJParser_$ = __webpack_require__(535);
49653
49748
  /*******************************************************************************
49654
49749
  *
49655
49750
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -49936,24 +50031,30 @@ OBJParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
49936
50031
 
49937
50032
  parser .parse ();
49938
50033
 
49939
- for (const [name, material] of parser .materials)
50034
+ for (const [id, material] of parser .materials)
49940
50035
  {
49941
- const nodeName = this .sanitizeName (name);
50036
+ const name = this .sanitizeName (id);
49942
50037
 
49943
- if (nodeName)
49944
- scene .addNamedNode (scene .getUniqueName (nodeName), material);
50038
+ if (name)
50039
+ {
50040
+ scene .addNamedNode (scene .getUniqueName (name), material);
50041
+ scene .addExportedNode (scene .getUniqueExportName (name), material);
50042
+ }
49945
50043
 
49946
- this .materials .set (name, material);
50044
+ this .materials .set (id, material);
49947
50045
  }
49948
50046
 
49949
- for (const [name, texture] of parser .textures)
50047
+ for (const [id, texture] of parser .textures)
49950
50048
  {
49951
- const nodeName = this .sanitizeName (name);
50049
+ const name = this .sanitizeName (id);
49952
50050
 
49953
- if (nodeName)
49954
- scene .addNamedNode (scene .getUniqueName (nodeName), texture);
50051
+ if (name)
50052
+ {
50053
+ scene .addNamedNode (scene .getUniqueName (name), texture);
50054
+ scene .addExportedNode (scene .getUniqueExportName (name), texture);
50055
+ }
49955
50056
 
49956
- this .textures .set (name, texture);
50057
+ this .textures .set (id, texture);
49957
50058
  }
49958
50059
  }
49959
50060
  catch (error)
@@ -49971,10 +50072,10 @@ OBJParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
49971
50072
 
49972
50073
  if (OBJParser_Grammar .untilEndOfLine .parse (this))
49973
50074
  {
49974
- const name = this .result [1];
50075
+ const id = this .result [1];
49975
50076
 
49976
- this .material = this .materials .get (name) || this .defaultMaterial;
49977
- this .texture = this .textures .get (name);
50077
+ this .material = this .materials .get (id) || this .defaultMaterial;
50078
+ this .texture = this .textures .get (id);
49978
50079
 
49979
50080
  const smoothingGroup = this .smoothingGroups .get (this .group .getNodeName ());
49980
50081
 
@@ -49998,8 +50099,8 @@ OBJParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
49998
50099
  if (OBJParser_Grammar .untilEndOfLine .parse (this))
49999
50100
  {
50000
50101
  const
50001
- scene = this .getExecutionContext (),
50002
- nodeName = this .sanitizeName (this .result [1]);
50102
+ scene = this .getExecutionContext (),
50103
+ name = this .sanitizeName (this .result [1]);
50003
50104
 
50004
50105
  if (this .group .children .length)
50005
50106
  {
@@ -50010,8 +50111,11 @@ OBJParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
50010
50111
  scene .getRootNodes () .push (this .object);
50011
50112
  }
50012
50113
 
50013
- if (nodeName)
50014
- scene .addNamedNode (scene .getUniqueName (nodeName), this .object);
50114
+ if (name)
50115
+ {
50116
+ scene .addNamedNode (scene .getUniqueName (name), this .object);
50117
+ scene .addExportedNode (scene .getUniqueExportName (name), this .object);
50118
+ }
50015
50119
  }
50016
50120
 
50017
50121
  return true;
@@ -50030,10 +50134,10 @@ OBJParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
50030
50134
  if (OBJParser_Grammar .untilEndOfLine .parse (this))
50031
50135
  {
50032
50136
  const
50033
- scene = this .getExecutionContext (),
50034
- name = this .result [1],
50035
- nodeName = this .sanitizeName (name),
50036
- group = this .groups .get (name);
50137
+ scene = this .getExecutionContext (),
50138
+ id = this .result [1],
50139
+ name = this .sanitizeName (id),
50140
+ group = this .groups .get (id);
50037
50141
 
50038
50142
  if (group)
50039
50143
  {
@@ -50049,10 +50153,13 @@ OBJParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
50049
50153
  }
50050
50154
  }
50051
50155
 
50052
- this .groups .set (name, this .group);
50156
+ this .groups .set (id, this .group);
50053
50157
 
50054
- if (nodeName)
50055
- scene .addNamedNode (scene .getUniqueName (nodeName), this .group);
50158
+ if (name)
50159
+ {
50160
+ scene .addNamedNode (scene .getUniqueName (name), this .group);
50161
+ scene .addExportedNode (scene .getUniqueExportName (name), this .group);
50162
+ }
50056
50163
 
50057
50164
  this .smoothingGroup = 0;
50058
50165
  }
@@ -50377,7 +50484,7 @@ function MaterialParser (scene, input)
50377
50484
  this .materials = new Map ();
50378
50485
  this .textures = new Map ();
50379
50486
  this .color3 = new Numbers_Color3 ();
50380
- this .name = "";
50487
+ this .id = "";
50381
50488
  }
50382
50489
 
50383
50490
  MaterialParser .prototype =
@@ -50470,15 +50577,15 @@ MaterialParser .prototype =
50470
50577
  {
50471
50578
  this .whitespacesNoLineTerminator ();
50472
50579
 
50473
- this .name = "";
50580
+ this .id = "";
50474
50581
 
50475
50582
  if (OBJParser_Grammar .untilEndOfLine .parse (this))
50476
50583
  {
50477
- this .name = this .result [1];
50584
+ this .id = this .result [1];
50478
50585
 
50479
50586
  this .material = this .executionContext .createNode ("Material");
50480
50587
 
50481
- this .materials .set (this .name, this .material);
50588
+ this .materials .set (this .id, this .material);
50482
50589
 
50483
50590
  return true;
50484
50591
  }
@@ -50643,7 +50750,7 @@ MaterialParser .prototype =
50643
50750
  {
50644
50751
  const string = this .result [1];
50645
50752
 
50646
- if (string .length && this .name .length)
50753
+ if (string .length && this .id .length)
50647
50754
  {
50648
50755
  const paths = string .trim () .split (/\s+/);
50649
50756
 
@@ -50656,7 +50763,7 @@ MaterialParser .prototype =
50656
50763
 
50657
50764
  texture .url = [path];
50658
50765
 
50659
- this .textures .set (this .name, texture);
50766
+ this .textures .set (this .id, texture);
50660
50767
  }
50661
50768
  }
50662
50769
 
@@ -50945,7 +51052,10 @@ STLAParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototy
50945
51052
  coordinate .point = this .point;
50946
51053
 
50947
51054
  if (name)
51055
+ {
50948
51056
  scene .addNamedNode (scene .getUniqueName (name), shape);
51057
+ scene .addExportedNode (scene .getUniqueExportName (name), shape);
51058
+ }
50949
51059
 
50950
51060
  scene .getRootNodes () .push (shape);
50951
51061
 
@@ -52087,8 +52197,8 @@ const MatrixStack_default_ = MatrixStack;
52087
52197
  x_ite_Namespace.set ("standard/Math/Utility/MatrixStack", MatrixStack_default_);
52088
52198
  /* harmony default export */ const Utility_MatrixStack = (MatrixStack_default_);
52089
52199
  ;// CONCATENATED MODULE: ./src/x_ite/Parser/SVGParser.js
52090
- /* provided dependency */ var SVGParser_$ = __webpack_require__(5);
52091
- /* provided dependency */ var libtess = __webpack_require__(587);
52200
+ /* provided dependency */ var SVGParser_$ = __webpack_require__(535);
52201
+ /* provided dependency */ var libtess = __webpack_require__(51);
52092
52202
  /*******************************************************************************
52093
52203
  *
52094
52204
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -52445,6 +52555,7 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
52445
52555
  // Add root Transform node.
52446
52556
 
52447
52557
  scene .addNamedNode (scene .getUniqueName ("ViewBox"), this .rootTransform);
52558
+ scene .addExportedNode (scene .getUniqueExportName ("ViewBox"), this .rootTransform);
52448
52559
  scene .getRootNodes () .push (this .rootTransform);
52449
52560
 
52450
52561
  // Optimize scene graph.
@@ -53303,7 +53414,10 @@ SVGParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
53303
53414
  name = this .sanitizeName (attribute);
53304
53415
 
53305
53416
  if (name)
53417
+ {
53306
53418
  scene .addNamedNode (scene .getUniqueName (name), node);
53419
+ scene .addExportedNode (scene .getUniqueExportName (name), node);
53420
+ }
53307
53421
  },
53308
53422
  viewBoxAttribute: function (attribute, defaultValue)
53309
53423
  {
@@ -54853,7 +54967,7 @@ const SVGParser_default_ = SVGParser;
54853
54967
  x_ite_Namespace.set ("x_ite/Parser/SVGParser", SVGParser_default_);
54854
54968
  /* harmony default export */ const Parser_SVGParser = (SVGParser_default_);
54855
54969
  ;// CONCATENATED MODULE: ./src/x_ite/Parser/GoldenGate.js
54856
- /* provided dependency */ var GoldenGate_$ = __webpack_require__(5);
54970
+ /* provided dependency */ var GoldenGate_$ = __webpack_require__(535);
54857
54971
  /*******************************************************************************
54858
54972
  *
54859
54973
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -55182,7 +55296,7 @@ const Plane3_default_ = Plane3;
55182
55296
  x_ite_Namespace.set ("standard/Math/Geometry/Plane3", Plane3_default_);
55183
55297
  /* harmony default export */ const Geometry_Plane3 = (Plane3_default_);
55184
55298
  ;// CONCATENATED MODULE: ./src/standard/Math/Geometry/Triangle3.js
55185
- /* provided dependency */ var Triangle3_libtess = __webpack_require__(587);
55299
+ /* provided dependency */ var Triangle3_libtess = __webpack_require__(51);
55186
55300
  /*******************************************************************************
55187
55301
  *
55188
55302
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -57978,6 +58092,7 @@ X3DRenderObject .prototype =
57978
58092
  return {
57979
58093
  renderObject: this,
57980
58094
  transparent: transparent,
58095
+ minAlpha: transparent ? 0 : 1,
57981
58096
  modelViewMatrix: new Float32Array (16),
57982
58097
  scissor: new Numbers_Vector4 (0, 0, 0, 0),
57983
58098
  localObjects: [ ],
@@ -58969,8 +59084,6 @@ function X3DBindableNode (executionContext)
58969
59084
  Core_X3DChildNode.call (this, executionContext);
58970
59085
 
58971
59086
  this .addType (Base_X3DConstants.X3DBindableNode);
58972
-
58973
- this .addChildObjects ("transitionActive", new x_ite_Fields.SFBool ());
58974
59087
  }
58975
59088
 
58976
59089
  X3DBindableNode .prototype = Object .assign (Object .create (Core_X3DChildNode.prototype),
@@ -59058,6 +59171,7 @@ function NavigationInfo (executionContext)
59058
59171
  this .addType (Base_X3DConstants.NavigationInfo);
59059
59172
 
59060
59173
  this .addChildObjects ("transitionStart", new x_ite_Fields.SFBool (),
59174
+ "transitionActive", new x_ite_Fields.SFBool (),
59061
59175
  "availableViewers", new x_ite_Fields.MFString (),
59062
59176
  "viewer", new x_ite_Fields.SFString ("EXAMINE"));
59063
59177
 
@@ -59971,7 +60085,7 @@ X3DGeometryNode .prototype = Object .assign (Object .create (Core_X3DNode.protot
59971
60085
  this .backFace = new Map ([[gl .CCW, gl .CW], [gl .CW, gl .CCW]]);
59972
60086
  this .attribBuffers = [ ];
59973
60087
  this .textureCoordinateNode = browser .getDefaultTextureCoordinate ();
59974
- this .texCoordBuffers = Array .from ({length: browser .getMaxTextures ()}, () => gl .createBuffer ());
60088
+ this .texCoordBuffers = Array .from ({length: browser .getMaxTexCoords ()}, () => gl .createBuffer ());
59975
60089
  this .fogDepthBuffer = gl .createBuffer ();
59976
60090
  this .colorBuffer = gl .createBuffer ();
59977
60091
  this .normalBuffer = gl .createBuffer ();
@@ -60623,16 +60737,6 @@ X3DGeometryNode .prototype = Object .assign (Object .create (Core_X3DNode.protot
60623
60737
  if (this .multiTexCoords .length === 0)
60624
60738
  this .buildTexCoords ();
60625
60739
 
60626
- if (this .multiTexCoords .length)
60627
- {
60628
- const maxTextures = this .getBrowser () .getMaxTextures ();
60629
-
60630
- for (let i = this .multiTexCoords .length; i < maxTextures; ++ i)
60631
- this .multiTexCoords [i] = this .multiTexCoords .at (-1);
60632
-
60633
- this .multiTexCoords .length = maxTextures;
60634
- }
60635
-
60636
60740
  // Transfer arrays and update.
60637
60741
 
60638
60742
  this .transfer ();
@@ -60812,8 +60916,7 @@ X3DGeometryNode .prototype = Object .assign (Object .create (Core_X3DNode.protot
60812
60916
  attribBuffers = this .attribBuffers,
60813
60917
  primitiveMode = browser .getPrimitiveMode (this .primitiveMode);
60814
60918
 
60815
- if (blendModeNode)
60816
- blendModeNode .enable (gl);
60919
+ blendModeNode?.enable (gl);
60817
60920
 
60818
60921
  shaderNode .enable (gl);
60819
60922
  shaderNode .setUniforms (gl, this, renderContext, front);
@@ -60884,8 +60987,7 @@ X3DGeometryNode .prototype = Object .assign (Object .create (Core_X3DNode.protot
60884
60987
  }
60885
60988
  }
60886
60989
 
60887
- if (blendModeNode)
60888
- blendModeNode .disable (gl);
60990
+ blendModeNode?.disable (gl);
60889
60991
  },
60890
60992
  displaySimpleParticles: function (gl, shaderNode, particleSystem)
60891
60993
  {
@@ -60933,8 +61035,7 @@ X3DGeometryNode .prototype = Object .assign (Object .create (Core_X3DNode.protot
60933
61035
  attribBuffers = this .attribBuffers,
60934
61036
  primitiveMode = browser .getPrimitiveMode (this .primitiveMode);
60935
61037
 
60936
- if (blendModeNode)
60937
- blendModeNode .enable (gl);
61038
+ blendModeNode?.enable (gl);
60938
61039
 
60939
61040
  // Setup shader.
60940
61041
 
@@ -61004,8 +61105,7 @@ X3DGeometryNode .prototype = Object .assign (Object .create (Core_X3DNode.protot
61004
61105
  gl .drawArraysInstanced (primitiveMode, 0, this .vertexCount, particleSystem .numParticles);
61005
61106
  }
61006
61107
 
61007
- if (blendModeNode)
61008
- blendModeNode .disable (gl);
61108
+ blendModeNode?.disable (gl);
61009
61109
  },
61010
61110
  });
61011
61111
 
@@ -62423,7 +62523,7 @@ const X3DTexture2DNode_default_ = X3DTexture2DNode;
62423
62523
  x_ite_Namespace.set ("x_ite/Components/Texturing/X3DTexture2DNode", X3DTexture2DNode_default_);
62424
62524
  /* harmony default export */ const Texturing_X3DTexture2DNode = (X3DTexture2DNode_default_);
62425
62525
  ;// CONCATENATED MODULE: ./src/x_ite/Components/Texturing/ImageTexture.js
62426
- /* provided dependency */ var ImageTexture_$ = __webpack_require__(5);
62526
+ /* provided dependency */ var ImageTexture_$ = __webpack_require__(535);
62427
62527
  /*******************************************************************************
62428
62528
  *
62429
62529
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -62488,7 +62588,6 @@ function ImageTexture (executionContext)
62488
62588
  this .addType (Base_X3DConstants.ImageTexture);
62489
62589
 
62490
62590
  this .image = ImageTexture_$("<img></img>");
62491
- this .canvas = ImageTexture_$("<canvas></canvas>");
62492
62591
  this .urlStack = new x_ite_Fields.MFString ();
62493
62592
  }
62494
62593
 
@@ -62574,7 +62673,7 @@ ImageTexture .prototype = Object .assign (Object .create (Texturing_X3DTexture2D
62574
62673
 
62575
62674
  this .loadNext ();
62576
62675
  },
62577
- setImage: function ()
62676
+ setImage: async function ()
62578
62677
  {
62579
62678
  if (DEBUG)
62580
62679
  {
@@ -62585,23 +62684,21 @@ ImageTexture .prototype = Object .assign (Object .create (Texturing_X3DTexture2D
62585
62684
  try
62586
62685
  {
62587
62686
  const
62588
- gl = this .getBrowser () .getContext (),
62589
- image = this .image [0],
62590
- canvas = this .canvas [0],
62591
- cx = canvas .getContext ("2d", { willReadFrequently: true });
62592
-
62593
- let
62594
- width = image .width,
62595
- height = image .height;
62687
+ gl = this .getBrowser () .getContext (),
62688
+ image = this .image [0];
62596
62689
 
62597
62690
  // https://developer.mozilla.org/en-US/docs/Web/API/createImageBitmap
62598
62691
  // createImageBitmap
62599
62692
 
62600
- // Scale image if needed and flip vertically.
62601
-
62602
- if (gl .getVersion () >= 2 || (Algorithm.isPowerOfTwo (width) && Algorithm.isPowerOfTwo (height)))
62693
+ if (gl .getVersion () === 1 && !(Algorithm.isPowerOfTwo (image .width) && Algorithm.isPowerOfTwo (image .height)))
62603
62694
  {
62604
- // Flip Y
62695
+ const
62696
+ canvas = document .createElement ("canvas"),
62697
+ cx = canvas .getContext ("2d", { willReadFrequently: true }),
62698
+ width = Algorithm.nextPowerOfTwo (image .width),
62699
+ height = Algorithm.nextPowerOfTwo (image .height);
62700
+
62701
+ // Flip Y and scale image to next power of two if needed.
62605
62702
 
62606
62703
  canvas .width = width;
62607
62704
  canvas .height = height;
@@ -62615,49 +62712,38 @@ ImageTexture .prototype = Object .assign (Object .create (Texturing_X3DTexture2D
62615
62712
  cx .scale (1, -1);
62616
62713
  }
62617
62714
 
62618
- cx .drawImage (image, 0, 0);
62715
+ cx .drawImage (image, 0, 0, image .width, image .height, 0, 0, width, height);
62619
62716
  cx .restore ();
62620
- }
62621
- else
62622
- {
62623
- // Flip Y and scale image to next power of two.
62624
-
62625
- width = Algorithm.nextPowerOfTwo (width);
62626
- height = Algorithm.nextPowerOfTwo (height);
62627
62717
 
62628
- canvas .width = width;
62629
- canvas .height = height;
62718
+ // Determine image alpha.
62630
62719
 
62631
- cx .clearRect (0, 0, width, height);
62632
- cx .save ();
62720
+ const
62721
+ data = cx .getImageData (0, 0, width, height) .data,
62722
+ transparent = this .isImageTransparent (data);
62633
62723
 
62634
- if (!this ._flipVertically .getValue ())
62635
- {
62636
- cx .translate (0, height);
62637
- cx .scale (1, -1);
62638
- }
62724
+ // Upload image to GPU.
62639
62725
 
62640
- cx .drawImage (image, 0, 0, image .width, image .height, 0, 0, width, height);
62641
- cx .restore ();
62726
+ this .setTexture (width, height, transparent, data, false);
62727
+ this .setLoadState (Base_X3DConstants.COMPLETE_STATE);
62642
62728
  }
62729
+ else
62730
+ {
62731
+ const
62732
+ data = await this .getImageData (image),
62733
+ transparent = this .isImageTransparent (data),
62734
+ width = image .width,
62735
+ height = image .height;
62643
62736
 
62644
- // Determine image alpha.
62737
+ // Flip Y if needed.
62645
62738
 
62646
- const data = cx .getImageData (0, 0, width, height) .data;
62739
+ if (!this ._flipVertically .getValue ())
62740
+ this .flipImage (data, width, height, 4);
62647
62741
 
62648
- let transparent = false;
62742
+ // Upload image to GPU.
62649
62743
 
62650
- for (let i = 3, length = data .length; i < length; i += 4)
62651
- {
62652
- if (data [i] !== 255)
62653
- {
62654
- transparent = true;
62655
- break;
62656
- }
62744
+ this .setTexture (width, height, transparent, data, false);
62745
+ this .setLoadState (Base_X3DConstants.COMPLETE_STATE);
62657
62746
  }
62658
-
62659
- this .setTexture (width, height, transparent, data, false);
62660
- this .setLoadState (Base_X3DConstants.COMPLETE_STATE);
62661
62747
  }
62662
62748
  catch (error)
62663
62749
  {
@@ -62665,6 +62751,54 @@ ImageTexture .prototype = Object .assign (Object .create (Texturing_X3DTexture2D
62665
62751
  this .setError ({ type: error .message });
62666
62752
  }
62667
62753
  },
62754
+ getImageData: async function (image)
62755
+ {
62756
+ const
62757
+ gl = this .getBrowser () .getContext (),
62758
+ framebuffer = gl .createFramebuffer (),
62759
+ texture = gl .createTexture (),
62760
+ data = new Uint8Array (image .width * image .height * 4);
62761
+
62762
+ gl .bindFramebuffer (gl.FRAMEBUFFER, framebuffer);
62763
+ gl .bindTexture (gl.TEXTURE_2D, texture);
62764
+ gl .framebufferTexture2D (gl.FRAMEBUFFER, gl .COLOR_ATTACHMENT0, gl .TEXTURE_2D, texture, 0);
62765
+ gl .texImage2D (gl .TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, image);
62766
+ await gl .readPixelsAsync (0, 0, image .width, image .height, gl.RGBA, gl.UNSIGNED_BYTE, data);
62767
+ gl .deleteFramebuffer (framebuffer);
62768
+ gl .deleteTexture (texture);
62769
+
62770
+ return data;
62771
+ },
62772
+ isImageTransparent: function (data)
62773
+ {
62774
+ for (let i = 3, length = data .length; i < length; i += 4)
62775
+ {
62776
+ if (data [i] !== 255)
62777
+ return true;
62778
+ }
62779
+
62780
+ return false;
62781
+ },
62782
+ flipImage (data, width, height, components)
62783
+ {
62784
+ const
62785
+ height1_2 = height >> 1,
62786
+ bytesPerRow = width * components,
62787
+ tmp = new Uint8Array (bytesPerRow);
62788
+
62789
+ for (let y = 0; y < height1_2; ++ y)
62790
+ {
62791
+ const
62792
+ top = y * bytesPerRow,
62793
+ bottom = (height - y - 1) * bytesPerRow;
62794
+
62795
+ tmp .set (data .subarray (top, top + bytesPerRow));
62796
+ data .copyWithin (top, bottom, bottom + bytesPerRow);
62797
+ data .set (tmp, bottom);
62798
+ }
62799
+
62800
+ return data;
62801
+ },
62668
62802
  dispose: function ()
62669
62803
  {
62670
62804
  Networking_X3DUrlObject.prototype.dispose.call (this);
@@ -63050,13 +63184,17 @@ X3DLayerNode .prototype = Object .assign (Object .create (Core_X3DNode.prototype
63050
63184
  {
63051
63185
  return this .collisionTime;
63052
63186
  },
63053
- lookAt: function (factor = 1, straighten = false)
63187
+ viewAll: function (factor = 1, straighten = false)
63054
63188
  {
63055
63189
  const
63056
63190
  viewpointNode = this .getViewpoint (),
63057
63191
  bbox = this .getBBox (new Geometry_Box3 ()) .multRight (Numbers_Matrix4.inverse (viewpointNode .getModelMatrix ()));
63058
63192
 
63059
- viewpointNode .lookAt (this, bbox .center, viewpointNode .getLookAtDistance (bbox), factor, straighten);
63193
+ viewpointNode .lookAt (this, bbox .center, viewpointNode .getLookAtDistance (bbox), factor, straighten);
63194
+ },
63195
+ straightenView: function ()
63196
+ {
63197
+ this .getViewpoint () .straightenView (this);
63060
63198
  },
63061
63199
  set_viewport__: function ()
63062
63200
  {
@@ -64603,7 +64741,6 @@ X3DViewpointNode .prototype = Object .assign (Object .create (Core_X3DBindableNo
64603
64741
  this .scaleOrientationInterpolator .setup ();
64604
64742
  this .fieldOfViewScaleInterpolator .setup ();
64605
64743
 
64606
- this .timeSensor ._isActive .addFieldInterest (this ._transitionActive);
64607
64744
  this .timeSensor ._fraction_changed .addFieldInterest (this .easeInEaseOut ._set_fraction);
64608
64745
 
64609
64746
  this .easeInEaseOut ._modifiedFraction_changed .addFieldInterest (this .positionInterpolator ._set_fraction);
@@ -64671,10 +64808,18 @@ X3DViewpointNode .prototype = Object .assign (Object .create (Core_X3DBindableNo
64671
64808
  },
64672
64809
  set_active__: function (navigationInfoNode, active)
64673
64810
  {
64674
- if (this ._isBound .getValue () && ! active .getValue () && this .timeSensor ._fraction_changed .getValue () === 1)
64675
- {
64676
- navigationInfoNode ._transitionComplete = true;
64677
- }
64811
+ if (active .getValue ())
64812
+ return;
64813
+
64814
+ this .timeSensor ._isActive .removeInterest ("set_active__", this);
64815
+
64816
+ if (!this ._isBound .getValue ())
64817
+ return;
64818
+
64819
+ if (this .timeSensor ._fraction_changed .getValue () !== 1)
64820
+ return;
64821
+
64822
+ navigationInfoNode ._transitionComplete = true;
64678
64823
  },
64679
64824
  setInterpolators: function () { },
64680
64825
  getPosition: function ()
@@ -64757,6 +64902,11 @@ X3DViewpointNode .prototype = Object .assign (Object .create (Core_X3DBindableNo
64757
64902
  if (this ._viewAll .getValue ())
64758
64903
  this .viewAll (layerNode .getBBox (new Geometry_Box3 ()));
64759
64904
 
64905
+ if (this .getBrowser () .getBrowserOption ("StraightenHorizon"))
64906
+ {
64907
+ this ._orientationOffset = this .straightenHorizon (this .getUserOrientation ()) .multLeft (this .getOrientation () .copy () .inverse ());
64908
+ }
64909
+
64760
64910
  // Handle NavigationInfo.
64761
64911
 
64762
64912
  const
@@ -64805,7 +64955,7 @@ X3DViewpointNode .prototype = Object .assign (Object .create (Core_X3DBindableNo
64805
64955
  }
64806
64956
  }
64807
64957
 
64808
- layerNode .getNavigationInfo () ._transitionStart = true;
64958
+ navigationInfoNode ._transitionStart = true;
64809
64959
 
64810
64960
  this .timeSensor ._cycleInterval = transitionTime;
64811
64961
  this .timeSensor ._stopTime = this .getBrowser () .getCurrentTime ();
@@ -64824,11 +64974,13 @@ X3DViewpointNode .prototype = Object .assign (Object .create (Core_X3DBindableNo
64824
64974
  this ._scaleOrientationOffset = relative .scaleOrientation;
64825
64975
 
64826
64976
  this .setInterpolators (fromViewpointNode, relative);
64827
-
64828
- this ._transitionActive = true;
64829
64977
  }
64830
64978
  else
64831
64979
  {
64980
+ const navigationInfoNode = layerNode .getNavigationInfo ();
64981
+
64982
+ navigationInfoNode ._transitionComplete = true;
64983
+
64832
64984
  const relative = this .getRelativeTransformation (fromViewpointNode);
64833
64985
 
64834
64986
  this ._positionOffset = relative .position;
@@ -64853,6 +65005,11 @@ X3DViewpointNode .prototype = Object .assign (Object .create (Core_X3DBindableNo
64853
65005
  this ._centerOfRotationOffset = Numbers_Vector3.Zero;
64854
65006
  this ._fieldOfViewScale = 1;
64855
65007
 
65008
+ if (this .getBrowser () .getBrowserOption ("StraightenHorizon"))
65009
+ {
65010
+ this ._orientationOffset = this .straightenHorizon (this .getUserOrientation ()) .multLeft (this .getOrientation () .copy () .inverse ());
65011
+ }
65012
+
64856
65013
  this .set_nearDistance__ ();
64857
65014
  this .set_farDistance__ ();
64858
65015
  },
@@ -64898,7 +65055,7 @@ X3DViewpointNode .prototype = Object .assign (Object .create (Core_X3DBindableNo
64898
65055
  x .assign (up) .cross (z) .normalize ();
64899
65056
  y .assign (z) .cross (x) .normalize ();
64900
65057
 
64901
- m .set (x.x, x.y, x.z, y.x, y.y, y.z, z.x, z.y, z.z);
65058
+ m .set (... x, ... y, ... z);
64902
65059
  r .setMatrix (m);
64903
65060
 
64904
65061
  return r;
@@ -64927,14 +65084,10 @@ X3DViewpointNode .prototype = Object .assign (Object .create (Core_X3DBindableNo
64927
65084
  const
64928
65085
  offset = point .copy () .add (this .getUserOrientation () .multVecRot (new Numbers_Vector3 (0, 0, distance))) .subtract (this .getPosition ());
64929
65086
 
64930
- layerNode .getNavigationInfo () ._transitionStart = true;
64931
-
64932
- this .timeSensor ._cycleInterval = 0.2;
65087
+ this .timeSensor ._cycleInterval = 1;
64933
65088
  this .timeSensor ._stopTime = this .getBrowser () .getCurrentTime ();
64934
65089
  this .timeSensor ._startTime = this .getBrowser () .getCurrentTime ();
64935
65090
 
64936
- this .timeSensor ._isActive .addInterest ("set_active__", this, layerNode .getNavigationInfo ());
64937
-
64938
65091
  this .easeInEaseOut ._easeInEaseOut = new x_ite_Fields.MFVec2f (new x_ite_Fields.SFVec2f (0, 1), new x_ite_Fields.SFVec2f (1, 0));
64939
65092
 
64940
65093
  const
@@ -64957,19 +65110,17 @@ X3DViewpointNode .prototype = Object .assign (Object .create (Core_X3DBindableNo
64957
65110
 
64958
65111
  this ._fieldOfViewScale = 1;
64959
65112
  this ._centerOfRotationOffset = Numbers_Vector3.subtract (point, this .getCenterOfRotation ());
65113
+ this .nearDistance = Math .min (distance / 2, 0.125);
65114
+ this .farDistance = this .nearDistance * this .getMaxFarValue () / 0.125;
64960
65115
 
64961
65116
  this .setInterpolators (this, relative);
64962
65117
  },
64963
- straighten: function (layerNode, horizon)
65118
+ straightenView: function (layerNode)
64964
65119
  {
64965
- layerNode .getNavigationInfo () ._transitionStart = true;
64966
-
64967
- this .timeSensor ._cycleInterval = 0.4;
65120
+ this .timeSensor ._cycleInterval = 1;
64968
65121
  this .timeSensor ._stopTime = this .getBrowser () .getCurrentTime ();
64969
65122
  this .timeSensor ._startTime = this .getBrowser () .getCurrentTime ();
64970
65123
 
64971
- this .timeSensor ._isActive .addInterest ("set_active__", this, layerNode .getNavigationInfo ());
64972
-
64973
65124
  this .easeInEaseOut ._easeInEaseOut = new x_ite_Fields.MFVec2f (new x_ite_Fields.SFVec2f (0, 1), new x_ite_Fields.SFVec2f (1, 0));
64974
65125
 
64975
65126
  const rotation = Numbers_Rotation4.multRight (Numbers_Rotation4.inverse (this .getOrientation ()), this .straightenHorizon (this .getUserOrientation ()));
@@ -64992,7 +65143,7 @@ X3DViewpointNode .prototype = Object .assign (Object .create (Core_X3DBindableNo
64992
65143
  localZAxis = new Numbers_Vector3 (0, 0, 0),
64993
65144
  rotation = new Numbers_Rotation4 (0, 0, 1, 0);
64994
65145
 
64995
- return function (orientation, upVector = this .getUpVector ())
65146
+ return function (orientation, upVector = this .getUpVector (true))
64996
65147
  {
64997
65148
  orientation .multVecRot (localXAxis .assign (Numbers_Vector3.xAxis) .negate ());
64998
65149
  orientation .multVecRot (localZAxis .assign (Numbers_Vector3.zAxis));
@@ -66678,7 +66829,7 @@ const X3DWorld_default_ = X3DWorld;
66678
66829
  x_ite_Namespace.set ("x_ite/Execution/X3DWorld", X3DWorld_default_);
66679
66830
  /* harmony default export */ const Execution_X3DWorld = (X3DWorld_default_);
66680
66831
  ;// CONCATENATED MODULE: ./src/x_ite/InputOutput/FileLoader.js
66681
- /* provided dependency */ var FileLoader_$ = __webpack_require__(5);
66832
+ /* provided dependency */ var FileLoader_$ = __webpack_require__(535);
66682
66833
  /*******************************************************************************
66683
66834
  *
66684
66835
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -66813,7 +66964,7 @@ FileLoader .prototype = Object .assign (Object .create (Base_X3DObject.prototype
66813
66964
  else
66814
66965
  scene .setExecutionContext (this .executionContext);
66815
66966
 
66816
- scene .setWorldURL (decodeURI (new URL (worldURL, this .getReferer ()) .href));
66967
+ scene .setWorldURL (new URL (worldURL, this .getReferer ()) .href);
66817
66968
 
66818
66969
  if (success)
66819
66970
  success = this .setScene .bind (this, scene, success, error);
@@ -68136,9 +68287,9 @@ X3DExecutionContext .prototype = Object .assign (Object .create (Base_X3DBaseNod
68136
68287
  {
68137
68288
  return this [_namedNodes];
68138
68289
  },
68139
- getUniqueName: function (name = "")
68290
+ getUniqueName: function (name)
68140
68291
  {
68141
- return getUniqueName .call (this, _namedNodes, name);
68292
+ return getUniqueName (this [_namedNodes], name);
68142
68293
  },
68143
68294
  addImportedNode: function (inlineNode, exportedName, importedName)
68144
68295
  {
@@ -68319,9 +68470,9 @@ X3DExecutionContext .prototype = Object .assign (Object .create (Base_X3DBaseNod
68319
68470
  {
68320
68471
  return this [_protos];
68321
68472
  },
68322
- getUniqueProtoName: function (name = "")
68473
+ getUniqueProtoName: function (name)
68323
68474
  {
68324
- return getUniqueName .call (this, _protos, name);
68475
+ return getUniqueName (this [_protos], name);
68325
68476
  },
68326
68477
  getExternProtoDeclaration: function (name)
68327
68478
  {
@@ -68383,9 +68534,9 @@ X3DExecutionContext .prototype = Object .assign (Object .create (Base_X3DBaseNod
68383
68534
  {
68384
68535
  return this [_externprotos];
68385
68536
  },
68386
- getUniqueExternProtoName: function (name = "")
68537
+ getUniqueExternProtoName: function (name)
68387
68538
  {
68388
- return getUniqueName .call (this, _externprotos, name);
68539
+ return getUniqueName (this [_externprotos], name);
68389
68540
  },
68390
68541
  addRoute: function (sourceNode, sourceField, destinationNode, destinationField)
68391
68542
  {
@@ -68772,36 +68923,6 @@ X3DExecutionContext .prototype = Object .assign (Object .create (Base_X3DBaseNod
68772
68923
  },
68773
68924
  });
68774
68925
 
68775
- const getUniqueName = (function ()
68776
- {
68777
- const _TrailingNumbers = /_\d+$/;
68778
-
68779
- return function (array, name = "")
68780
- {
68781
- name = String (name) .replace (_TrailingNumbers, "");
68782
-
68783
- let
68784
- newName = name,
68785
- i = 64;
68786
-
68787
- for (; i;)
68788
- {
68789
- if (! (this [array] .has (newName) || newName .length === 0))
68790
- break;
68791
-
68792
- const
68793
- min = i,
68794
- max = i <<= 1;
68795
-
68796
- newName = name;
68797
- newName += '_';
68798
- newName += Math .round (Algorithm.random (min, max));
68799
- }
68800
-
68801
- return newName;
68802
- };
68803
- })();
68804
-
68805
68926
  for (const key of Reflect .ownKeys (X3DExecutionContext .prototype))
68806
68927
  Object .defineProperty (X3DExecutionContext .prototype, key, { enumerable: false });
68807
68928
 
@@ -68882,7 +69003,7 @@ const X3DExecutionContext_default_ = X3DExecutionContext;
68882
69003
  x_ite_Namespace.set ("x_ite/Execution/X3DExecutionContext", X3DExecutionContext_default_);
68883
69004
  /* harmony default export */ const Execution_X3DExecutionContext = (X3DExecutionContext_default_);
68884
69005
  ;// CONCATENATED MODULE: ./src/x_ite/Configuration/ComponentInfo.js
68885
- /* provided dependency */ var ComponentInfo_$ = __webpack_require__(5);
69006
+ /* provided dependency */ var ComponentInfo_$ = __webpack_require__(535);
68886
69007
  /*******************************************************************************
68887
69008
  *
68888
69009
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -69575,77 +69696,78 @@ x_ite_Namespace.set ("x_ite/Execution/X3DExportedNode", X3DExportedNode_default_
69575
69696
 
69576
69697
 
69577
69698
 
69578
- function ExportedNodesArray (array)
69579
- {
69580
- return Base_X3DInfoArray.call (this, array);
69581
- }
69582
-
69583
- ExportedNodesArray .prototype = Object .assign (Object .create (Base_X3DInfoArray.prototype),
69584
- {
69585
- constructor: ExportedNodesArray,
69586
- getTypeName: function ()
69587
- {
69588
- return "ExportedNodesArray";
69589
- },
69590
- });
69591
-
69592
- for (const key of Reflect .ownKeys (ExportedNodesArray .prototype))
69593
- Object .defineProperty (ExportedNodesArray .prototype, key, { enumerable: false });
69594
-
69595
- const ExportedNodesArray_default_ = ExportedNodesArray;
69596
- ;
69597
-
69598
- x_ite_Namespace.set ("x_ite/Execution/ExportedNodesArray", ExportedNodesArray_default_);
69599
- /* harmony default export */ const Execution_ExportedNodesArray = (ExportedNodesArray_default_);
69600
- ;// CONCATENATED MODULE: ./src/x_ite/Execution/X3DScene.js
69601
- /*******************************************************************************
69602
- *
69603
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
69604
- *
69605
- * Copyright create3000, Scheffelstraße 31a, Leipzig, Germany 2011 - 2022.
69606
- *
69607
- * All rights reserved. Holger Seelig <holger.seelig@yahoo.de>.
69608
- *
69609
- * The copyright notice above does not evidence any actual of intended
69610
- * publication of such source code, and is an unpublished work by create3000.
69611
- * This material contains CONFIDENTIAL INFORMATION that is the property of
69612
- * create3000.
69613
- *
69614
- * No permission is granted to copy, distribute, or create derivative works from
69615
- * the contents of this software, in whole or in part, without the prior written
69616
- * permission of create3000.
69617
- *
69618
- * NON-MILITARY USE ONLY
69619
- *
69620
- * All create3000 software are effectively free software with a non-military use
69621
- * restriction. It is free. Well commented source is provided. You may reuse the
69622
- * source in any way you please with the exception anything that uses it must be
69623
- * marked to indicate is contains 'non-military use only' components.
69624
- *
69625
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
69626
- *
69627
- * Copyright 2011 - 2022, Holger Seelig <holger.seelig@yahoo.de>.
69628
- *
69629
- * This file is part of the X_ITE Project.
69630
- *
69631
- * X_ITE is free software: you can redistribute it and/or modify it under the
69632
- * terms of the GNU General Public License version 3 only, as published by the
69633
- * Free Software Foundation.
69634
- *
69635
- * X_ITE is distributed in the hope that it will be useful, but WITHOUT ANY
69636
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
69637
- * A PARTICULAR PURPOSE. See the GNU General Public License version 3 for more
69638
- * details (a copy is included in the LICENSE file that accompanied this code).
69639
- *
69640
- * You should have received a copy of the GNU General Public License version 3
69641
- * along with X_ITE. If not, see <https://www.gnu.org/licenses/gpl.html> for a
69642
- * copy of the GPLv3 License.
69643
- *
69644
- * For Silvio, Joy and Adi.
69645
- *
69646
- ******************************************************************************/
69647
-
69648
-
69699
+ function ExportedNodesArray (array)
69700
+ {
69701
+ return Base_X3DInfoArray.call (this, array);
69702
+ }
69703
+
69704
+ ExportedNodesArray .prototype = Object .assign (Object .create (Base_X3DInfoArray.prototype),
69705
+ {
69706
+ constructor: ExportedNodesArray,
69707
+ getTypeName: function ()
69708
+ {
69709
+ return "ExportedNodesArray";
69710
+ },
69711
+ });
69712
+
69713
+ for (const key of Reflect .ownKeys (ExportedNodesArray .prototype))
69714
+ Object .defineProperty (ExportedNodesArray .prototype, key, { enumerable: false });
69715
+
69716
+ const ExportedNodesArray_default_ = ExportedNodesArray;
69717
+ ;
69718
+
69719
+ x_ite_Namespace.set ("x_ite/Execution/ExportedNodesArray", ExportedNodesArray_default_);
69720
+ /* harmony default export */ const Execution_ExportedNodesArray = (ExportedNodesArray_default_);
69721
+ ;// CONCATENATED MODULE: ./src/x_ite/Execution/X3DScene.js
69722
+ /*******************************************************************************
69723
+ *
69724
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
69725
+ *
69726
+ * Copyright create3000, Scheffelstraße 31a, Leipzig, Germany 2011 - 2022.
69727
+ *
69728
+ * All rights reserved. Holger Seelig <holger.seelig@yahoo.de>.
69729
+ *
69730
+ * The copyright notice above does not evidence any actual of intended
69731
+ * publication of such source code, and is an unpublished work by create3000.
69732
+ * This material contains CONFIDENTIAL INFORMATION that is the property of
69733
+ * create3000.
69734
+ *
69735
+ * No permission is granted to copy, distribute, or create derivative works from
69736
+ * the contents of this software, in whole or in part, without the prior written
69737
+ * permission of create3000.
69738
+ *
69739
+ * NON-MILITARY USE ONLY
69740
+ *
69741
+ * All create3000 software are effectively free software with a non-military use
69742
+ * restriction. It is free. Well commented source is provided. You may reuse the
69743
+ * source in any way you please with the exception anything that uses it must be
69744
+ * marked to indicate is contains 'non-military use only' components.
69745
+ *
69746
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
69747
+ *
69748
+ * Copyright 2011 - 2022, Holger Seelig <holger.seelig@yahoo.de>.
69749
+ *
69750
+ * This file is part of the X_ITE Project.
69751
+ *
69752
+ * X_ITE is free software: you can redistribute it and/or modify it under the
69753
+ * terms of the GNU General Public License version 3 only, as published by the
69754
+ * Free Software Foundation.
69755
+ *
69756
+ * X_ITE is distributed in the hope that it will be useful, but WITHOUT ANY
69757
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
69758
+ * A PARTICULAR PURPOSE. See the GNU General Public License version 3 for more
69759
+ * details (a copy is included in the LICENSE file that accompanied this code).
69760
+ *
69761
+ * You should have received a copy of the GNU General Public License version 3
69762
+ * along with X_ITE. If not, see <https://www.gnu.org/licenses/gpl.html> for a
69763
+ * copy of the GPLv3 License.
69764
+ *
69765
+ * For Silvio, Joy and Adi.
69766
+ *
69767
+ ******************************************************************************/
69768
+
69769
+
69770
+
69649
69771
 
69650
69772
 
69651
69773
 
@@ -69957,6 +70079,10 @@ X3DScene .prototype = Object .assign (Object .create (Execution_X3DExecutionCont
69957
70079
  {
69958
70080
  return this [_exportedNodes];
69959
70081
  },
70082
+ getUniqueExportName: function (name)
70083
+ {
70084
+ return getUniqueName (this [_exportedNodes], name);
70085
+ },
69960
70086
  addRootNode: function (node)
69961
70087
  {
69962
70088
  node = Fields_SFNodeCache.get (Base_X3DCast (Base_X3DConstants.X3DNode, node, false));
@@ -70848,7 +70974,7 @@ const DataStorage_default_ = DataStorage;
70848
70974
  x_ite_Namespace.set ("standard/Utility/DataStorage", DataStorage_default_);
70849
70975
  /* harmony default export */ const Utility_DataStorage = (DataStorage_default_);
70850
70976
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/X3DCoreContext.js
70851
- /* provided dependency */ var X3DCoreContext_$ = __webpack_require__(5);
70977
+ /* provided dependency */ var X3DCoreContext_$ = __webpack_require__(535);
70852
70978
  /*******************************************************************************
70853
70979
  *
70854
70980
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -73147,15 +73273,9 @@ X3DSingleTextureCoordinateNode .prototype = Object .assign (Object .create (Text
73147
73273
  },
73148
73274
  getTextureCoordinateMapping: function (textureCoordinateMapping, channel = 0)
73149
73275
  {
73150
- if (this ._mapping .getValue ())
73151
- textureCoordinateMapping .set (this ._mapping .getValue (), channel);
73276
+ textureCoordinateMapping .set (this ._mapping .getValue () || channel, channel);
73152
73277
  },
73153
- setShaderUniforms: function (gl, shaderObject)
73154
- {
73155
- for (let i = 0, length = shaderObject .x3d_MaxTextures; i < length; ++ i)
73156
- this .setShaderUniformsToChannel (gl, shaderObject, i);
73157
- },
73158
- setShaderUniformsToChannel: function (gl, shaderObject, channel = 0)
73278
+ setShaderUniforms: function (gl, shaderObject, channel = 0)
73159
73279
  {
73160
73280
  gl .uniform1i (shaderObject .x3d_TextureCoordinateGeneratorMode [channel], 0);
73161
73281
  },
@@ -74942,8 +75062,7 @@ X3DLineGeometryNode .prototype = Object .assign (Object .create (Rendering_X3DGe
74942
75062
 
74943
75063
  // Render triangles.
74944
75064
 
74945
- if (blendModeNode)
74946
- blendModeNode .enable (gl);
75065
+ blendModeNode?.enable (gl);
74947
75066
 
74948
75067
  // Setup shader.
74949
75068
 
@@ -74985,8 +75104,7 @@ X3DLineGeometryNode .prototype = Object .assign (Object .create (Rendering_X3DGe
74985
75104
  gl .enable (gl .CULL_FACE);
74986
75105
  gl .drawArrays (primitiveMode, 0, this .vertexCount * 3);
74987
75106
 
74988
- if (blendModeNode)
74989
- blendModeNode .disable (gl);
75107
+ blendModeNode?.disable (gl);
74990
75108
 
74991
75109
  return;
74992
75110
  }
@@ -74994,8 +75112,7 @@ X3DLineGeometryNode .prototype = Object .assign (Object .create (Rendering_X3DGe
74994
75112
 
74995
75113
  const primitiveMode = browser .getPrimitiveMode (this .getPrimitiveMode ());
74996
75114
 
74997
- if (blendModeNode)
74998
- blendModeNode .enable (gl);
75115
+ blendModeNode?.enable (gl);
74999
75116
 
75000
75117
  // Setup shader.
75001
75118
 
@@ -75025,8 +75142,7 @@ X3DLineGeometryNode .prototype = Object .assign (Object .create (Rendering_X3DGe
75025
75142
 
75026
75143
  gl .drawArrays (primitiveMode, 0, this .vertexCount);
75027
75144
 
75028
- if (blendModeNode)
75029
- blendModeNode .disable (gl);
75145
+ blendModeNode?.disable (gl);
75030
75146
 
75031
75147
  gl .lineWidth (1);
75032
75148
  };
@@ -75042,8 +75158,7 @@ X3DLineGeometryNode .prototype = Object .assign (Object .create (Rendering_X3DGe
75042
75158
  attribBuffers = this .getAttribBuffers (),
75043
75159
  primitiveMode = browser .getPrimitiveMode (this .getPrimitiveMode ());
75044
75160
 
75045
- if (blendModeNode)
75046
- blendModeNode .enable (gl);
75161
+ blendModeNode?.enable (gl);
75047
75162
 
75048
75163
  // Setup shader.
75049
75164
 
@@ -75082,8 +75197,7 @@ X3DLineGeometryNode .prototype = Object .assign (Object .create (Rendering_X3DGe
75082
75197
 
75083
75198
  gl .drawArraysInstanced (primitiveMode, 0, this .vertexCount, particleSystem .numParticles);
75084
75199
 
75085
- if (blendModeNode)
75086
- blendModeNode .disable (gl);
75200
+ blendModeNode?.disable (gl);
75087
75201
 
75088
75202
  gl .lineWidth (1);
75089
75203
  },
@@ -77338,8 +77452,8 @@ const OrientationChaser_default_ = OrientationChaser;
77338
77452
  x_ite_Namespace.set ("x_ite/Components/Followers/OrientationChaser", OrientationChaser_default_);
77339
77453
  /* harmony default export */ const Followers_OrientationChaser = (OrientationChaser_default_);
77340
77454
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/ExamineViewer.js
77341
- /* provided dependency */ var jquery_mousewheel = __webpack_require__(367);
77342
- /* provided dependency */ var ExamineViewer_$ = __webpack_require__(5);
77455
+ /* provided dependency */ var jquery_mousewheel = __webpack_require__(341);
77456
+ /* provided dependency */ var ExamineViewer_$ = __webpack_require__(535);
77343
77457
  /*******************************************************************************
77344
77458
  *
77345
77459
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -78131,7 +78245,7 @@ ExamineViewer .prototype = Object .assign (Object .create (Navigation_X3DViewer.
78131
78245
  .multRight (orientationOffsetBefore);
78132
78246
 
78133
78247
  if (straightenHorizon)
78134
- viewpoint .straightenHorizon (userOrientation, viewpoint .getUpVector (true));
78248
+ viewpoint .straightenHorizon (userOrientation);
78135
78249
 
78136
78250
  const orientationOffsetAfter = orientationOffset
78137
78251
  .assign (viewpoint .getOrientation ())
@@ -78203,8 +78317,8 @@ const ExamineViewer_default_ = ExamineViewer;
78203
78317
  x_ite_Namespace.set ("x_ite/Browser/Navigation/ExamineViewer", ExamineViewer_default_);
78204
78318
  /* harmony default export */ const Navigation_ExamineViewer = (ExamineViewer_default_);
78205
78319
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/X3DFlyViewer.js
78206
- /* provided dependency */ var X3DFlyViewer_jquery_mousewheel = __webpack_require__(367);
78207
- /* provided dependency */ var X3DFlyViewer_$ = __webpack_require__(5);
78320
+ /* provided dependency */ var X3DFlyViewer_jquery_mousewheel = __webpack_require__(341);
78321
+ /* provided dependency */ var X3DFlyViewer_$ = __webpack_require__(535);
78208
78322
  /*******************************************************************************
78209
78323
  *
78210
78324
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -79154,8 +79268,8 @@ const FlyViewer_default_ = FlyViewer;
79154
79268
  x_ite_Namespace.set ("x_ite/Browser/Navigation/FlyViewer", FlyViewer_default_);
79155
79269
  /* harmony default export */ const Navigation_FlyViewer = (FlyViewer_default_);
79156
79270
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/PlaneViewer.js
79157
- /* provided dependency */ var PlaneViewer_jquery_mousewheel = __webpack_require__(367);
79158
- /* provided dependency */ var PlaneViewer_$ = __webpack_require__(5);
79271
+ /* provided dependency */ var PlaneViewer_jquery_mousewheel = __webpack_require__(341);
79272
+ /* provided dependency */ var PlaneViewer_$ = __webpack_require__(535);
79159
79273
  /*******************************************************************************
79160
79274
  *
79161
79275
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -79464,8 +79578,8 @@ const NoneViewer_default_ = NoneViewer;
79464
79578
  x_ite_Namespace.set ("x_ite/Browser/Navigation/NoneViewer", NoneViewer_default_);
79465
79579
  /* harmony default export */ const Navigation_NoneViewer = (NoneViewer_default_);
79466
79580
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/LookAtViewer.js
79467
- /* provided dependency */ var LookAtViewer_jquery_mousewheel = __webpack_require__(367);
79468
- /* provided dependency */ var LookAtViewer_$ = __webpack_require__(5);
79581
+ /* provided dependency */ var LookAtViewer_jquery_mousewheel = __webpack_require__(341);
79582
+ /* provided dependency */ var LookAtViewer_$ = __webpack_require__(535);
79469
79583
  /*******************************************************************************
79470
79584
  *
79471
79585
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -81068,8 +81182,8 @@ const X3DPickingContext_default_ = X3DPickingContext;
81068
81182
  x_ite_Namespace.set ("x_ite/Browser/Picking/X3DPickingContext", X3DPickingContext_default_);
81069
81183
  /* harmony default export */ const Picking_X3DPickingContext = (X3DPickingContext_default_);
81070
81184
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/PointingDeviceSensor/PointingDevice.js
81071
- /* provided dependency */ var PointingDevice_jquery_mousewheel = __webpack_require__(367);
81072
- /* provided dependency */ var PointingDevice_$ = __webpack_require__(5);
81185
+ /* provided dependency */ var PointingDevice_jquery_mousewheel = __webpack_require__(341);
81186
+ /* provided dependency */ var PointingDevice_$ = __webpack_require__(535);
81073
81187
  /*******************************************************************************
81074
81188
  *
81075
81189
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -82091,8 +82205,8 @@ const MultiSampleFrameBuffer_default_ = MultiSampleFrameBuffer;
82091
82205
  x_ite_Namespace.set ("x_ite/Rendering/MultiSampleFrameBuffer", MultiSampleFrameBuffer_default_);
82092
82206
  /* harmony default export */ const Rendering_MultiSampleFrameBuffer = (MultiSampleFrameBuffer_default_);
82093
82207
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/Rendering/X3DRenderingContext.js
82094
- /* provided dependency */ var X3DRenderingContext_$ = __webpack_require__(5);
82095
- /* provided dependency */ var ResizeSensor = __webpack_require__(169);
82208
+ /* provided dependency */ var X3DRenderingContext_$ = __webpack_require__(535);
82209
+ /* provided dependency */ var ResizeSensor = __webpack_require__(858);
82096
82210
  /*******************************************************************************
82097
82211
  *
82098
82212
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -82537,6 +82651,7 @@ const Fragment_glsl_default_ = /* glsl */ `
82537
82651
  #endif
82538
82652
 
82539
82653
  uniform float x3d_AlphaCutoff;
82654
+ uniform float x3d_MinAlpha;
82540
82655
 
82541
82656
  #if defined (X3D_FOG) && defined (X3D_FOG_COORDS)
82542
82657
  varying float fogDepth;
@@ -82555,6 +82670,14 @@ uniform float x3d_AlphaCutoff;
82555
82670
  #if X3D_NUM_TEXTURE_COORDINATES > 1
82556
82671
  varying vec4 texCoord1;
82557
82672
  #endif
82673
+
82674
+ #if X3D_NUM_TEXTURE_COORDINATES > 2
82675
+ varying vec4 texCoord2;
82676
+ #endif
82677
+
82678
+ #if X3D_NUM_TEXTURE_COORDINATES > 3
82679
+ varying vec4 texCoord3;
82680
+ #endif
82558
82681
  #endif
82559
82682
  #else
82560
82683
  #if defined (X3D_TEXTURE) || defined (X3D_MATERIAL_TEXTURES)
@@ -82565,6 +82688,14 @@ uniform float x3d_AlphaCutoff;
82565
82688
  #if X3D_NUM_TEXTURE_COORDINATES > 1
82566
82689
  vec4 texCoord1 = vec4 (0.0, 0.0, 0.0, 1.0);
82567
82690
  #endif
82691
+
82692
+ #if X3D_NUM_TEXTURE_COORDINATES > 2
82693
+ vec4 texCoord2 = vec4 (0.0, 0.0, 0.0, 1.0);
82694
+ #endif
82695
+
82696
+ #if X3D_NUM_TEXTURE_COORDINATES > 3
82697
+ vec4 texCoord3 = vec4 (0.0, 0.0, 0.0, 1.0);
82698
+ #endif
82568
82699
  #endif
82569
82700
  #endif
82570
82701
 
@@ -82610,7 +82741,7 @@ fragment_main ()
82610
82741
  #endif
82611
82742
 
82612
82743
  #if defined (X3D_GEOMETRY_0D) && defined (X3D_STYLE_PROPERTIES)
82613
- setTexCoords ();
82744
+ setPointTexCoords ();
82614
82745
  #endif
82615
82746
 
82616
82747
  vec4 finalColor = getMaterialColor ();
@@ -82630,7 +82761,7 @@ fragment_main ()
82630
82761
  if (finalColor .a < x3d_AlphaCutoff)
82631
82762
  discard;
82632
82763
 
82633
- gl_FragColor = finalColor;
82764
+ gl_FragColor = vec4 (finalColor .rgb, max (finalColor .a, x3d_MinAlpha));
82634
82765
 
82635
82766
  #if defined (X3D_LOGARITHMIC_DEPTH_BUFFER)
82636
82767
  //https://outerra.blogspot.com/2013/07/logarithmic-depth-buffer-optimizations.html
@@ -82838,7 +82969,7 @@ const Point_glsl_default_ = /* glsl */ `
82838
82969
  #if defined (X3D_GEOMETRY_0D) && defined (X3D_STYLE_PROPERTIES)
82839
82970
  #if defined (X3D_TEXTURE) || defined (X3D_MATERIAL_TEXTURES)
82840
82971
  void
82841
- setTexCoords ()
82972
+ setPointTexCoords ()
82842
82973
  {
82843
82974
  vec4 texCoord = vec4 (gl_PointCoord .x, 1.0 - gl_PointCoord .y, 0.0, 1.0);
82844
82975
 
@@ -82849,13 +82980,21 @@ setTexCoords ()
82849
82980
  #if X3D_NUM_TEXTURE_COORDINATES > 1
82850
82981
  texCoord1 = texCoord;
82851
82982
  #endif
82983
+
82984
+ #if X3D_NUM_TEXTURE_COORDINATES > 2
82985
+ texCoord2 = texCoord;
82986
+ #endif
82987
+
82988
+ #if X3D_NUM_TEXTURE_COORDINATES > 3
82989
+ texCoord3 = texCoord;
82990
+ #endif
82852
82991
  }
82853
82992
 
82854
82993
  #define getPointColor(color) (color)
82855
82994
 
82856
82995
  #else
82857
82996
 
82858
- #define setTexCoords()
82997
+ #define setPointTexCoords()
82859
82998
 
82860
82999
  varying float pointSize;
82861
83000
 
@@ -83270,6 +83409,16 @@ getTextureMatrix (const in int i)
83270
83409
  textureMatrix = x3d_TextureMatrix [1];
83271
83410
  #endif
83272
83411
 
83412
+ #if X3D_NUM_TEXTURE_TRANSFORMS > 2
83413
+ else if (i == 2)
83414
+ textureMatrix = x3d_TextureMatrix [2];
83415
+ #endif
83416
+
83417
+ #if X3D_NUM_TEXTURE_TRANSFORMS > 3
83418
+ else if (i == 3)
83419
+ textureMatrix = x3d_TextureMatrix [3];
83420
+ #endif
83421
+
83273
83422
  return textureMatrix;
83274
83423
  #else
83275
83424
  return x3d_TextureMatrix [0];
@@ -83292,6 +83441,16 @@ getTexCoord (const in int i)
83292
83441
  texCoord = texCoord1;
83293
83442
  #endif
83294
83443
 
83444
+ #if X3D_NUM_TEXTURE_COORDINATES > 2
83445
+ else if (i == 2)
83446
+ texCoord = texCoord2;
83447
+ #endif
83448
+
83449
+ #if X3D_NUM_TEXTURE_COORDINATES > 3
83450
+ else if (i == 3)
83451
+ texCoord = texCoord3;
83452
+ #endif
83453
+
83295
83454
  return texCoord;
83296
83455
  #else
83297
83456
  return texCoord0;
@@ -83393,6 +83552,16 @@ getTexCoord (const in int textureTransformMapping, const in int textureCoordinat
83393
83552
  texCoord = getTexCoord (x3d_TextureCoordinateGenerator [1], textureTransformMapping, textureCoordinateMapping);
83394
83553
  #endif
83395
83554
 
83555
+ #if X3D_NUM_TEXTURE_COORDINATES > 2
83556
+ else if (textureCoordinateMapping == 2)
83557
+ texCoord = getTexCoord (x3d_TextureCoordinateGenerator [2], textureTransformMapping, textureCoordinateMapping);
83558
+ #endif
83559
+
83560
+ #if X3D_NUM_TEXTURE_COORDINATES > 3
83561
+ else if (textureCoordinateMapping == 3)
83562
+ texCoord = getTexCoord (x3d_TextureCoordinateGenerator [3], textureTransformMapping, textureCoordinateMapping);
83563
+ #endif
83564
+
83396
83565
  texCoord .stp /= texCoord .q;
83397
83566
 
83398
83567
  #if defined (X3D_GEOMETRY_2D)
@@ -83457,7 +83626,7 @@ getTextureColor (const in vec4 diffuseColor, const in vec4 specularColor)
83457
83626
  {
83458
83627
  // Get texture color.
83459
83628
 
83460
- vec3 texCoord = getTexCoord (i, i);
83629
+ vec3 texCoord = getTexCoord (min (i, X3D_NUM_TEXTURE_TRANSFORMS - 1), min (i, X3D_NUM_TEXTURE_COORDINATES - 1));
83461
83630
  vec4 textureColor = getTexture (i, texCoord);
83462
83631
 
83463
83632
  // Multi texturing
@@ -83773,6 +83942,14 @@ uniform mat4 x3d_ModelViewMatrix;
83773
83942
  #if X3D_NUM_TEXTURE_COORDINATES > 1
83774
83943
  attribute vec4 x3d_TexCoord1;
83775
83944
  #endif
83945
+
83946
+ #if X3D_NUM_TEXTURE_COORDINATES > 2
83947
+ attribute vec4 x3d_TexCoord2;
83948
+ #endif
83949
+
83950
+ #if X3D_NUM_TEXTURE_COORDINATES > 3
83951
+ attribute vec4 x3d_TexCoord3;
83952
+ #endif
83776
83953
  #endif
83777
83954
  #endif
83778
83955
 
@@ -83797,6 +83974,14 @@ attribute vec4 x3d_Vertex;
83797
83974
  #if X3D_NUM_TEXTURE_COORDINATES > 1
83798
83975
  varying vec4 texCoord1;
83799
83976
  #endif
83977
+
83978
+ #if X3D_NUM_TEXTURE_COORDINATES > 2
83979
+ varying vec4 texCoord2;
83980
+ #endif
83981
+
83982
+ #if X3D_NUM_TEXTURE_COORDINATES > 3
83983
+ varying vec4 texCoord3;
83984
+ #endif
83800
83985
  #endif
83801
83986
  #endif
83802
83987
 
@@ -83856,6 +84041,14 @@ vertex_main ()
83856
84041
  #if X3D_NUM_TEXTURE_COORDINATES > 1
83857
84042
  texCoord1 = x3d_TexCoord1;
83858
84043
  #endif
84044
+
84045
+ #if X3D_NUM_TEXTURE_COORDINATES > 2
84046
+ texCoord2 = x3d_TexCoord2;
84047
+ #endif
84048
+
84049
+ #if X3D_NUM_TEXTURE_COORDINATES > 3
84050
+ texCoord3 = x3d_TexCoord3;
84051
+ #endif
83859
84052
  #endif
83860
84053
  #endif
83861
84054
 
@@ -83976,6 +84169,7 @@ x_ite_Namespace.set ("assets/shaders/webgl2/include/Fog.glsl", include_Fog_glsl_
83976
84169
  ;// CONCATENATED MODULE: ./src/assets/shaders/webgl2/include/Fragment.glsl.js
83977
84170
  const include_Fragment_glsl_default_ = /* glsl */ `
83978
84171
  uniform float x3d_AlphaCutoff;
84172
+ uniform float x3d_MinAlpha;
83979
84173
 
83980
84174
  #if defined (X3D_FOG) && defined (X3D_FOG_COORDS)
83981
84175
  in float fogDepth;
@@ -83994,6 +84188,14 @@ uniform float x3d_AlphaCutoff;
83994
84188
  #if X3D_NUM_TEXTURE_COORDINATES > 1
83995
84189
  in vec4 texCoord1;
83996
84190
  #endif
84191
+
84192
+ #if X3D_NUM_TEXTURE_COORDINATES > 2
84193
+ in vec4 texCoord2;
84194
+ #endif
84195
+
84196
+ #if X3D_NUM_TEXTURE_COORDINATES > 3
84197
+ in vec4 texCoord3;
84198
+ #endif
83997
84199
  #endif
83998
84200
  #else
83999
84201
  #if defined (X3D_TEXTURE) || defined (X3D_MATERIAL_TEXTURES)
@@ -84004,6 +84206,14 @@ uniform float x3d_AlphaCutoff;
84004
84206
  #if X3D_NUM_TEXTURE_COORDINATES > 1
84005
84207
  vec4 texCoord1 = vec4 (0.0, 0.0, 0.0, 1.0);
84006
84208
  #endif
84209
+
84210
+ #if X3D_NUM_TEXTURE_COORDINATES > 2
84211
+ vec4 texCoord2 = vec4 (0.0, 0.0, 0.0, 1.0);
84212
+ #endif
84213
+
84214
+ #if X3D_NUM_TEXTURE_COORDINATES > 3
84215
+ vec4 texCoord3 = vec4 (0.0, 0.0, 0.0, 1.0);
84216
+ #endif
84007
84217
  #endif
84008
84218
  #endif
84009
84219
 
@@ -84056,6 +84266,8 @@ fragment_main ()
84056
84266
  #endif
84057
84267
 
84058
84268
  #if defined (X3D_GEOMETRY_0D) && defined (X3D_STYLE_PROPERTIES)
84269
+ setPointTexCoords ();
84270
+ #elif defined (X3D_TEXTURE) || defined (X3D_MATERIAL_TEXTURES)
84059
84271
  setTexCoords ();
84060
84272
  #endif
84061
84273
 
@@ -84076,7 +84288,7 @@ fragment_main ()
84076
84288
  if (finalColor .a < x3d_AlphaCutoff)
84077
84289
  discard;
84078
84290
 
84079
- x3d_FragColor = finalColor;
84291
+ x3d_FragColor = vec4 (finalColor .rgb, max (finalColor .a, x3d_MinAlpha));
84080
84292
 
84081
84293
  #if defined (X3D_LOGARITHMIC_DEPTH_BUFFER)
84082
84294
  //https://outerra.blogspot.com/2013/07/logarithmic-depth-buffer-optimizations.html
@@ -84362,16 +84574,24 @@ const include_Point_glsl_default_ = /* glsl */ `
84362
84574
  #if defined (X3D_GEOMETRY_0D) && defined (X3D_STYLE_PROPERTIES)
84363
84575
  #if defined (X3D_TEXTURE) || defined (X3D_MATERIAL_TEXTURES)
84364
84576
  void
84365
- setTexCoords ()
84577
+ setPointTexCoords ()
84366
84578
  {
84367
84579
  vec4 texCoord = vec4 (gl_PointCoord .x, 1.0 - gl_PointCoord .y, 0.0, 1.0);
84368
84580
 
84369
84581
  #if X3D_NUM_TEXTURE_COORDINATES > 0
84370
- texCoord0 = texCoord;
84582
+ texCoords [0] = texCoord;
84371
84583
  #endif
84372
84584
 
84373
84585
  #if X3D_NUM_TEXTURE_COORDINATES > 1
84374
- texCoord1 = texCoord;
84586
+ texCoords [1] = texCoord;
84587
+ #endif
84588
+
84589
+ #if X3D_NUM_TEXTURE_COORDINATES > 2
84590
+ texCoords [2] = texCoord;
84591
+ #endif
84592
+
84593
+ #if X3D_NUM_TEXTURE_COORDINATES > 3
84594
+ texCoords [3] = texCoord;
84375
84595
  #endif
84376
84596
  }
84377
84597
 
@@ -84379,7 +84599,7 @@ setTexCoords ()
84379
84599
 
84380
84600
  #else
84381
84601
 
84382
- #define setTexCoords()
84602
+ #define setPointTexCoords()
84383
84603
 
84384
84604
  in float pointSize;
84385
84605
 
@@ -84836,25 +85056,22 @@ const include_Texture_glsl_default_ = /* glsl */ `
84836
85056
 
84837
85057
  #pragma X3D include "Perlin.glsl"
84838
85058
 
84839
- vec4
84840
- getTexCoord (const in int i)
85059
+ vec4 texCoords [X3D_NUM_TEXTURE_COORDINATES];
85060
+
85061
+ void
85062
+ setTexCoords ()
84841
85063
  {
85064
+ #if X3D_NUM_TEXTURE_COORDINATES > 0
85065
+ texCoords [0] = texCoord0;
85066
+ #endif
84842
85067
  #if X3D_NUM_TEXTURE_COORDINATES > 1
84843
- switch (i)
84844
- {
84845
- #if X3D_NUM_TEXTURE_COORDINATES > 0
84846
- case 0:
84847
- return texCoord0;
84848
- #endif
84849
- #if X3D_NUM_TEXTURE_COORDINATES > 1
84850
- case 1:
84851
- return texCoord1;
84852
- #endif
84853
- }
84854
-
84855
- return vec4 (0.0);
84856
- #else
84857
- return texCoord0;
85068
+ texCoords [1] = texCoord1;
85069
+ #endif
85070
+ #if X3D_NUM_TEXTURE_COORDINATES > 2
85071
+ texCoords [2] = texCoord2;
85072
+ #endif
85073
+ #if X3D_NUM_TEXTURE_COORDINATES > 3
85074
+ texCoords [3] = texCoord3;
84858
85075
  #endif
84859
85076
  }
84860
85077
 
@@ -84869,7 +85086,7 @@ getTexCoord (const in x3d_TextureCoordinateGeneratorParameters textureCoordinate
84869
85086
  {
84870
85087
  case x3d_None:
84871
85088
  {
84872
- return x3d_TextureMatrix [textureTransformMapping] * getTexCoord (textureCoordinateMapping);
85089
+ return x3d_TextureMatrix [textureTransformMapping] * texCoords [textureCoordinateMapping];
84873
85090
  }
84874
85091
  case x3d_Sphere:
84875
85092
  {
@@ -84938,7 +85155,7 @@ getTexCoord (const in x3d_TextureCoordinateGeneratorParameters textureCoordinate
84938
85155
  }
84939
85156
  default:
84940
85157
  {
84941
- return x3d_TextureMatrix [textureTransformMapping] * getTexCoord (textureCoordinateMapping);
85158
+ return x3d_TextureMatrix [textureTransformMapping] * texCoords [textureCoordinateMapping];
84942
85159
  }
84943
85160
  }
84944
85161
  }
@@ -85016,7 +85233,7 @@ getTextureColor (const in vec4 diffuseColor, const in vec4 specularColor)
85016
85233
  {
85017
85234
  // Get texture color.
85018
85235
 
85019
- vec3 texCoord = getTexCoord (i, i);
85236
+ vec3 texCoord = getTexCoord (min (i, X3D_NUM_TEXTURE_TRANSFORMS - 1), min (i, X3D_NUM_TEXTURE_COORDINATES - 1));
85020
85237
  vec4 textureColor = getTexture (i, texCoord);
85021
85238
 
85022
85239
  // Multi texturing
@@ -85395,6 +85612,14 @@ uniform mat4 x3d_ModelViewMatrix;
85395
85612
  #if X3D_NUM_TEXTURE_COORDINATES > 1
85396
85613
  in vec4 x3d_TexCoord1;
85397
85614
  #endif
85615
+
85616
+ #if X3D_NUM_TEXTURE_COORDINATES > 2
85617
+ in vec4 x3d_TexCoord2;
85618
+ #endif
85619
+
85620
+ #if X3D_NUM_TEXTURE_COORDINATES > 3
85621
+ in vec4 x3d_TexCoord3;
85622
+ #endif
85398
85623
  #endif
85399
85624
  #endif
85400
85625
 
@@ -85419,6 +85644,14 @@ in vec4 x3d_Vertex;
85419
85644
  #if X3D_NUM_TEXTURE_COORDINATES > 1
85420
85645
  out vec4 texCoord1;
85421
85646
  #endif
85647
+
85648
+ #if X3D_NUM_TEXTURE_COORDINATES > 2
85649
+ out vec4 texCoord2;
85650
+ #endif
85651
+
85652
+ #if X3D_NUM_TEXTURE_COORDINATES > 3
85653
+ out vec4 texCoord3;
85654
+ #endif
85422
85655
  #endif
85423
85656
  #endif
85424
85657
 
@@ -85491,6 +85724,14 @@ vertex_main ()
85491
85724
  #if X3D_NUM_TEXTURE_COORDINATES > 1
85492
85725
  texCoord1 = getTexCoord (x3d_TexCoord1);
85493
85726
  #endif
85727
+
85728
+ #if X3D_NUM_TEXTURE_COORDINATES > 2
85729
+ texCoord2 = getTexCoord (x3d_TexCoord2);
85730
+ #endif
85731
+
85732
+ #if X3D_NUM_TEXTURE_COORDINATES > 3
85733
+ texCoord3 = getTexCoord (x3d_TexCoord3);
85734
+ #endif
85494
85735
  #endif
85495
85736
  #endif
85496
85737
 
@@ -85719,7 +85960,7 @@ main ()
85719
85960
  if (getPointColor (vec4 (1.0)) .a < 0.5)
85720
85961
  discard;
85721
85962
 
85722
- setTexCoords ();
85963
+ setPointTexCoords ();
85723
85964
  #endif
85724
85965
 
85725
85966
  gl_FragData [0] = vec4 (vertex, x3d_Id);
@@ -86769,7 +87010,7 @@ main ()
86769
87010
  if (getPointColor (vec4 (1.0)) .a < 0.5)
86770
87011
  discard;
86771
87012
 
86772
- setTexCoords ();
87013
+ setPointTexCoords ();
86773
87014
  #endif
86774
87015
 
86775
87016
  #if defined (X3D_GEOMETRY_1D) && defined (X3D_STYLE_PROPERTIES)
@@ -87948,9 +88189,6 @@ X3DProgrammableShaderObject .prototype =
87948
88189
 
87949
88190
  browser .getRenderingProperties () ._LogarithmicDepthBuffer .addInterest ("set_logarithmicDepthBuffer__", this);
87950
88191
 
87951
- // Use by multi texture nodes.
87952
- this .x3d_MaxTextures = browser .getMaxTextures ();
87953
-
87954
88192
  this .set_logarithmicDepthBuffer__ ();
87955
88193
  },
87956
88194
  set_logarithmicDepthBuffer__: function ()
@@ -87974,12 +88212,14 @@ X3DProgrammableShaderObject .prototype =
87974
88212
  // Get uniforms and attributes.
87975
88213
 
87976
88214
  const
87977
- program = this .getProgram (),
87978
- browser = this .getBrowser (),
87979
- gl = browser .getContext (),
87980
- maxClipPlanes = browser .getMaxClipPlanes (),
87981
- maxLights = browser .getMaxLights (),
87982
- maxTextures = browser .getMaxTextures ();
88215
+ program = this .getProgram (),
88216
+ browser = this .getBrowser (),
88217
+ gl = browser .getContext (),
88218
+ maxClipPlanes = browser .getMaxClipPlanes (),
88219
+ maxLights = browser .getMaxLights (),
88220
+ maxTextures = browser .getMaxTextures (),
88221
+ maxTextureTransforms = browser .getMaxTextureTransforms (),
88222
+ maxTexCoords = browser .getMaxTexCoords ();
87983
88223
 
87984
88224
  gl .useProgram (program);
87985
88225
 
@@ -87992,6 +88232,7 @@ X3DProgrammableShaderObject .prototype =
87992
88232
 
87993
88233
  this .x3d_Id = gl .getUniformLocation (program, "x3d_Id");
87994
88234
  this .x3d_LogarithmicFarFactor1_2 = gl .getUniformLocation (program, "x3d_LogarithmicFarFactor1_2");
88235
+ this .x3d_MinAlpha = gl .getUniformLocation (program, "x3d_MinAlpha");
87995
88236
 
87996
88237
  for (let i = 0; i < maxClipPlanes; ++ i)
87997
88238
  this .x3d_ClipPlane [i] = gl .getUniformLocation (program, "x3d_ClipPlane[" + i + "]");
@@ -88080,17 +88321,6 @@ X3DProgrammableShaderObject .prototype =
88080
88321
 
88081
88322
  for (let i = 0; i < maxTextures; ++ i)
88082
88323
  {
88083
- // Attributes
88084
-
88085
- const x3d_TexCoord = this .getAttribLocation (gl, program, "x3d_TexCoord" + i, i ? "" : "x3d_TexCoord");
88086
-
88087
- if (x3d_TexCoord !== -1)
88088
- this .x3d_TexCoord .push ([i, x3d_TexCoord]);
88089
-
88090
- // Uniforms
88091
-
88092
- this .x3d_TextureMatrix [i] = gl .getUniformLocation (program, "x3d_TextureMatrix[" + i + "]");
88093
-
88094
88324
  this .x3d_TextureCoordinateGeneratorMode [i] = gl .getUniformLocation (program, "x3d_TextureCoordinateGenerator[" + i + "].mode");
88095
88325
  this .x3d_TextureCoordinateGeneratorParameter [i] = gl .getUniformLocation (program, "x3d_TextureCoordinateGenerator[" + i + "].parameter");
88096
88326
 
@@ -88110,6 +88340,22 @@ X3DProgrammableShaderObject .prototype =
88110
88340
  this .x3d_ProjectiveTextureLocation [i] = gl .getUniformLocation (program, "x3d_ProjectiveTextureLocation[" + i + "]");
88111
88341
  }
88112
88342
 
88343
+ for (let i = 0; i < maxTextureTransforms; ++ i)
88344
+ {
88345
+ const uniform = gl .getUniformLocation (program, "x3d_TextureMatrix[" + i + "]");
88346
+
88347
+ if (uniform !== null)
88348
+ this .x3d_TextureMatrix [i] = uniform;
88349
+ }
88350
+
88351
+ for (let i = 0; i < maxTexCoords; ++ i)
88352
+ {
88353
+ const x3d_TexCoord = this .getAttribLocation (gl, program, "x3d_TexCoord" + i, i ? "" : "x3d_TexCoord");
88354
+
88355
+ if (x3d_TexCoord !== -1)
88356
+ this .x3d_TexCoord .push ([i, x3d_TexCoord]);
88357
+ }
88358
+
88113
88359
  this .x3d_TexCoordRamp = gl .getUniformLocation (program, "x3d_TexCoordRamp");
88114
88360
 
88115
88361
  this .x3d_Viewport = gl .getUniformLocation (program, "x3d_Viewport");
@@ -88193,7 +88439,7 @@ X3DProgrammableShaderObject .prototype =
88193
88439
  for (const uniform of this .x3d_ProjectiveTexture)
88194
88440
  gl .uniform1i (uniform, browser .getDefaultTexture2DUnit ());
88195
88441
 
88196
- gl .uniform1i (this .x3d_TexCoordRamp, browser .getDefaultTexture2DUnit ());
88442
+ gl .uniform1i (this .x3d_TexCoordRamp, browser .getDefaultTexture2DUnit ());
88197
88443
  },
88198
88444
  getUniformLocation: function (gl, program, name, depreciated)
88199
88445
  {
@@ -88879,8 +89125,7 @@ X3DProgrammableShaderObject .prototype =
88879
89125
 
88880
89126
  // Fog
88881
89127
 
88882
- if (fogNode)
88883
- fogNode .setShaderUniforms (gl, this);
89128
+ fogNode?.setShaderUniforms (gl, this);
88884
89129
 
88885
89130
  // Clip planes and local lights
88886
89131
 
@@ -88894,11 +89139,11 @@ X3DProgrammableShaderObject .prototype =
88894
89139
  // Alpha
88895
89140
 
88896
89141
  gl .uniform1f (this .x3d_AlphaCutoff, appearanceNode .getAlphaCutoff ());
89142
+ gl .uniform1f (this .x3d_MinAlpha, renderContext .minAlpha);
88897
89143
 
88898
89144
  // Style Properties
88899
89145
 
88900
- if (stylePropertiesNode)
88901
- stylePropertiesNode .setShaderUniforms (gl, this);
89146
+ stylePropertiesNode?.setShaderUniforms (gl, this);
88902
89147
 
88903
89148
  // Material
88904
89149
 
@@ -88906,8 +89151,7 @@ X3DProgrammableShaderObject .prototype =
88906
89151
 
88907
89152
  // Texture
88908
89153
 
88909
- if (textureNode)
88910
- textureNode .setShaderUniforms (gl, this, renderObject);
89154
+ textureNode?.setShaderUniforms (gl, this, renderObject);
88911
89155
 
88912
89156
  appearanceNode .getTextureTransform () .setShaderUniforms (gl, this);
88913
89157
  geometryContext .getTextureCoordinate () .setShaderUniforms (gl, this);
@@ -90617,7 +90861,7 @@ const ShaderCompiler_default_ = ShaderCompiler;
90617
90861
  x_ite_Namespace.set ("x_ite/Browser/Shaders/ShaderCompiler", ShaderCompiler_default_);
90618
90862
  /* harmony default export */ const Shaders_ShaderCompiler = (ShaderCompiler_default_);
90619
90863
  ;// CONCATENATED MODULE: ./src/x_ite/Components/Shaders/ShaderPart.js
90620
- /* provided dependency */ var ShaderPart_$ = __webpack_require__(5);
90864
+ /* provided dependency */ var ShaderPart_$ = __webpack_require__(535);
90621
90865
  /*******************************************************************************
90622
90866
  *
90623
90867
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -91985,6 +92229,10 @@ X3DMaterialNode .prototype = Object .assign (Object .create (Shape_X3DAppearance
91985
92229
  {
91986
92230
  return this ._transparent .getValue ();
91987
92231
  },
92232
+ getBaseTexture: function ()
92233
+ {
92234
+ return null;
92235
+ },
91988
92236
  setTexture: function (index, textureNode)
91989
92237
  {
91990
92238
  const textureType = textureNode ? textureNode .getTextureType () - 1 : 0;
@@ -92109,37 +92357,35 @@ X3DMaterialNode .prototype = Object .assign (Object .create (Shape_X3DAppearance
92109
92357
  options .push ("X3D_STYLE_PROPERTIES");
92110
92358
 
92111
92359
  if (+this .textureBits)
92112
- {
92113
92360
  options .push ("X3D_MATERIAL_TEXTURES");
92114
- options .push ("X3D_NUM_TEXTURE_TRANSFORMS " + (appearanceNode .getTextureTransformMapping () .size || 1));
92115
- options .push ("X3D_NUM_TEXTURE_COORDINATES " + (geometryContext .getTextureCoordinateMapping () .size || 1));
92361
+
92362
+ if (renderContext .textureNode)
92363
+ {
92364
+ // ScreenText
92365
+
92366
+ options .push ("X3D_TEXTURE",
92367
+ "X3D_NUM_TEXTURES 1",
92368
+ "X3D_NUM_TEXTURE_TRANSFORMS 1",
92369
+ "X3D_NUM_TEXTURE_COORDINATES 1",
92370
+ "X3D_TEXTURE0_2D");
92116
92371
  }
92117
92372
  else
92118
92373
  {
92119
- if (renderContext .textureNode)
92120
- {
92121
- // ScreenText
92122
-
92123
- options .push ("X3D_TEXTURE",
92124
- "X3D_NUM_TEXTURES 1",
92125
- "X3D_NUM_TEXTURE_TRANSFORMS 1",
92126
- "X3D_NUM_TEXTURE_COORDINATES 1",
92127
- "X3D_TEXTURE0_2D");
92128
- }
92129
- else if (+appearanceNode .getTextureBits ())
92374
+ if (+appearanceNode .getTextureBits () && !this .getBaseTexture ())
92130
92375
  {
92131
92376
  const textureNode = appearanceNode .getTexture ();
92132
92377
 
92133
92378
  options .push ("X3D_TEXTURE");
92134
- options .push ("X3D_NUM_TEXTURES " + textureNode .getCount ());
92135
- options .push ("X3D_NUM_TEXTURE_TRANSFORMS " + textureNode .getCount ());
92136
- options .push ("X3D_NUM_TEXTURE_COORDINATES " + textureNode .getCount ());
92137
-
92138
- textureNode .getShaderOptions (options);
92379
+ options .push ("X3D_NUM_TEXTURES " + textureNode .getCount ());
92139
92380
 
92140
92381
  if (textureNode .getType () .includes (Base_X3DConstants.MultiTexture))
92141
92382
  options .push ("X3D_MULTI_TEXTURING");
92383
+
92384
+ textureNode .getShaderOptions (options);
92142
92385
  }
92386
+
92387
+ options .push ("X3D_NUM_TEXTURE_TRANSFORMS " + (appearanceNode .getTextureTransformMapping () .size || 1));
92388
+ options .push ("X3D_NUM_TEXTURE_COORDINATES " + (geometryContext .textureCoordinateMapping .size || 1));
92143
92389
  }
92144
92390
 
92145
92391
  switch (shapeNode .getShapeKey ())
@@ -92316,6 +92562,10 @@ X3DOneSidedMaterialNode .prototype = Object .assign (Object .create (Shape_X3DMa
92316
92562
  {
92317
92563
  this .setTransparent (Boolean (this .transparency));
92318
92564
  },
92565
+ getBaseTexture: function ()
92566
+ {
92567
+ return this .getEmissiveTexture ();
92568
+ },
92319
92569
  getEmissiveTexture: function ()
92320
92570
  {
92321
92571
  return this .emissiveTextureNode;
@@ -92959,15 +93209,9 @@ X3DSingleTextureTransformNode .prototype = Object .assign (Object .create (Textu
92959
93209
  },
92960
93210
  getTextureTransformMapping: function (textureTransformMapping, channel = 0)
92961
93211
  {
92962
- if (this ._mapping .getValue ())
92963
- textureTransformMapping .set (this ._mapping .getValue (), channel);
93212
+ textureTransformMapping .set (this ._mapping .getValue () || channel, channel);
92964
93213
  },
92965
- setShaderUniforms: function (gl, shaderObject)
92966
- {
92967
- for (let i = 0, length = shaderObject .x3d_MaxTextures; i < length; ++ i)
92968
- this .setShaderUniformsToChannel (gl, shaderObject, i);
92969
- },
92970
- setShaderUniformsToChannel: function (gl, shaderObject, channel = 0)
93214
+ setShaderUniforms: function (gl, shaderObject, channel = 0)
92971
93215
  {
92972
93216
  gl .uniformMatrix4fv (shaderObject .x3d_TextureMatrix [channel], false, this .matrixArray);
92973
93217
  },
@@ -93283,6 +93527,14 @@ X3DTexturingContext .prototype =
93283
93527
  {
93284
93528
  return this [_maxTextures];
93285
93529
  },
93530
+ getMaxTextureTransforms: function ()
93531
+ {
93532
+ return 4;
93533
+ },
93534
+ getMaxTexCoords: function ()
93535
+ {
93536
+ return 4;
93537
+ },
93286
93538
  getMinTextureSize: function ()
93287
93539
  {
93288
93540
  return 16;
@@ -109035,8 +109287,7 @@ X3DPointGeometryNode .prototype = Object .assign (Object .create (Rendering_X3DG
109035
109287
  attribNodes = this .getAttrib (),
109036
109288
  attribBuffers = this .getAttribBuffers ();
109037
109289
 
109038
- if (blendModeNode)
109039
- blendModeNode .enable (gl);
109290
+ blendModeNode?.enable (gl);
109040
109291
 
109041
109292
  // Setup shader.
109042
109293
 
@@ -109064,8 +109315,7 @@ X3DPointGeometryNode .prototype = Object .assign (Object .create (Rendering_X3DG
109064
109315
 
109065
109316
  gl .drawArrays (this .primitiveMode, 0, this .vertexCount);
109066
109317
 
109067
- if (blendModeNode)
109068
- blendModeNode .disable (gl);
109318
+ blendModeNode?.disable (gl);
109069
109319
  },
109070
109320
  displayParticles: function (gl, renderContext, particleSystem)
109071
109321
  {
@@ -109076,8 +109326,7 @@ X3DPointGeometryNode .prototype = Object .assign (Object .create (Rendering_X3DG
109076
109326
  attribNodes = this .getAttrib (),
109077
109327
  attribBuffers = this .getAttribBuffers ();
109078
109328
 
109079
- if (blendModeNode)
109080
- blendModeNode .enable (gl);
109329
+ blendModeNode?.enable (gl);
109081
109330
 
109082
109331
  // Setup shader.
109083
109332
 
@@ -109116,8 +109365,7 @@ X3DPointGeometryNode .prototype = Object .assign (Object .create (Rendering_X3DG
109116
109365
 
109117
109366
  gl .drawArraysInstanced (this .primitiveMode, 0, this .vertexCount, particleSystem .numParticles);
109118
109367
 
109119
- if (blendModeNode)
109120
- blendModeNode .disable (gl);
109368
+ blendModeNode?.disable (gl);
109121
109369
  },
109122
109370
  });
109123
109371
 
@@ -111227,6 +111475,10 @@ Material .prototype = Object .assign (Object .create (Shape_X3DOneSidedMaterialN
111227
111475
  this .setTransparent (!!(this .getTransparency () ||
111228
111476
  (this .diffuseTextureNode && this .diffuseTextureNode .isTransparent ())));
111229
111477
  },
111478
+ getBaseTexture: function ()
111479
+ {
111480
+ return this .diffuseTexture;
111481
+ },
111230
111482
  getTextureIndices: (function ()
111231
111483
  {
111232
111484
  let i = 0;
@@ -111586,6 +111838,10 @@ PhysicalMaterial .prototype = Object .assign (Object .create (Shape_X3DOneSidedM
111586
111838
  this .setTransparent (!!(this .getTransparency () ||
111587
111839
  (this .baseTextureNode && this .baseTextureNode .isTransparent ())));
111588
111840
  },
111841
+ getBaseTexture: function ()
111842
+ {
111843
+ return this .baseTextureNode;
111844
+ },
111589
111845
  getTextureIndices: (function ()
111590
111846
  {
111591
111847
  let i = 0;
@@ -111957,6 +112213,7 @@ TwoSidedMaterial .prototype = Object .assign (Object .create (Shape_X3DMaterialN
111957
112213
  {
111958
112214
  this .setTransparent (Boolean (this ._transparency .getValue () || (this ._separateBackColor .getValue () && this ._backTransparency .getValue ())));
111959
112215
  },
112216
+ getBaseTexture: Shape_Material.prototype.getBaseTexture,
111960
112217
  getMaterialKey: Shape_Material.prototype.getMaterialKey,
111961
112218
  createShader: Shape_Material.prototype.createShader,
111962
112219
  setShaderUniforms: function (gl, shaderObject, renderObject, textureTransformMapping, textureCoordinateMapping, front)
@@ -112497,7 +112754,7 @@ const X3DSoundSourceNode_default_ = X3DSoundSourceNode;
112497
112754
  x_ite_Namespace.set ("x_ite/Components/Sound/X3DSoundSourceNode", X3DSoundSourceNode_default_);
112498
112755
  /* harmony default export */ const Sound_X3DSoundSourceNode = (X3DSoundSourceNode_default_);
112499
112756
  ;// CONCATENATED MODULE: ./src/x_ite/Components/Sound/AudioClip.js
112500
- /* provided dependency */ var AudioClip_$ = __webpack_require__(5);
112757
+ /* provided dependency */ var AudioClip_$ = __webpack_require__(535);
112501
112758
  /*******************************************************************************
112502
112759
  *
112503
112760
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -115312,8 +115569,8 @@ const GIFMedia_default_ = GifMedia;
115312
115569
  x_ite_Namespace.set ("x_ite/Browser/Texturing/GIFMedia", GIFMedia_default_);
115313
115570
  /* harmony default export */ const GIFMedia = (GIFMedia_default_);
115314
115571
  ;// CONCATENATED MODULE: ./src/x_ite/Components/Texturing/MovieTexture.js
115315
- /* provided dependency */ var MovieTexture_$ = __webpack_require__(5);
115316
- /* provided dependency */ var SuperGif = __webpack_require__(667);
115572
+ /* provided dependency */ var MovieTexture_$ = __webpack_require__(535);
115573
+ /* provided dependency */ var SuperGif = __webpack_require__(381);
115317
115574
  /*******************************************************************************
115318
115575
  *
115319
115576
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -115657,6 +115914,9 @@ function MultiTexture (executionContext)
115657
115914
 
115658
115915
  this .addChildObjects ("loadState", new x_ite_Fields.SFInt32 (Base_X3DConstants.NOT_STARTED_STATE));
115659
115916
 
115917
+ const browser = this .getBrowser ();
115918
+
115919
+ this .maxTextures = browser .getMaxTextures ()
115660
115920
  this .color = new Float32Array (4);
115661
115921
  this .modes = [ ];
115662
115922
  this .alphaModes = [ ];
@@ -115712,7 +115972,7 @@ MultiTexture .prototype = Object .assign (Object .create (Texturing_X3DTextureNo
115712
115972
  },
115713
115973
  getCount: function ()
115714
115974
  {
115715
- return Math .min (this .getBrowser () .getMaxTextures (), this .textureNodes .length);
115975
+ return Math .min (this .maxTextures, this .textureNodes .length);
115716
115976
  },
115717
115977
  getMode: function (index)
115718
115978
  {
@@ -115875,7 +116135,7 @@ MultiTexture .prototype = Object .assign (Object .create (Texturing_X3DTextureNo
115875
116135
  updateTextureBits: function (textureBits)
115876
116136
  {
115877
116137
  const
115878
- maxTextures = this .getBrowser () .getMaxTextures (),
116138
+ maxTextures = this .maxTextures,
115879
116139
  textureNodes = this .textureNodes,
115880
116140
  channels = Math .min (maxTextures, textureNodes .length);
115881
116141
 
@@ -115888,7 +116148,7 @@ MultiTexture .prototype = Object .assign (Object .create (Texturing_X3DTextureNo
115888
116148
  {
115889
116149
  const
115890
116150
  textureNodes = this .textureNodes,
115891
- channels = Math .min (this .getBrowser () .getMaxTextures (), textureNodes .length);
116151
+ channels = Math .min (this .maxTextures, textureNodes .length);
115892
116152
 
115893
116153
  for (let i = 0; i < channels; ++ i)
115894
116154
  textureNodes [i] .getShaderOptions (options, i);
@@ -115902,7 +116162,7 @@ MultiTexture .prototype = Object .assign (Object .create (Texturing_X3DTextureNo
115902
116162
  {
115903
116163
  const
115904
116164
  textureNodes = this .textureNodes,
115905
- channels = Math .min (this .getBrowser () .getMaxTextures (), textureNodes .length);
116165
+ channels = Math .min (this .maxTextures, textureNodes .length);
115906
116166
 
115907
116167
  gl .uniform4fv (shaderObject .x3d_MultiTextureColor, this .color);
115908
116168
 
@@ -115984,6 +116244,9 @@ function MultiTextureCoordinate (executionContext)
115984
116244
 
115985
116245
  this .addType (Base_X3DConstants.MultiTextureCoordinate);
115986
116246
 
116247
+ const browser = this .getBrowser ();
116248
+
116249
+ this .maxTexCoords = browser .getMaxTexCoords ();
115987
116250
  this .textureCoordinateNodes = [ ];
115988
116251
  }
115989
116252
 
@@ -116036,7 +116299,7 @@ MultiTextureCoordinate .prototype = Object .assign (Object .create (Texturing_X3
116036
116299
  },
116037
116300
  getCount: function ()
116038
116301
  {
116039
- return Math .min (this .getBrowser () .getMaxTextures (), this .textureCoordinateNodes .length);
116302
+ return Math .min (this .maxTexCoords, this .textureCoordinateNodes .length);
116040
116303
  },
116041
116304
  isEmpty: function ()
116042
116305
  {
@@ -116062,21 +116325,27 @@ MultiTextureCoordinate .prototype = Object .assign (Object .create (Texturing_X3
116062
116325
  },
116063
116326
  init: function (multiArray)
116064
116327
  {
116065
- for (const textureCoordinateNode of this .textureCoordinateNodes)
116066
- textureCoordinateNode .init (multiArray);
116328
+ const
116329
+ textureCoordinateNodes = this .textureCoordinateNodes,
116330
+ length = Math .min (this .maxTexCoords, textureCoordinateNodes .length);
116331
+
116332
+ for (let i = 0; i < length; ++ i)
116333
+ textureCoordinateNodes [i] .init (multiArray);
116067
116334
  },
116068
116335
  addPoint: function (index, multiArray)
116069
116336
  {
116070
- const textureCoordinateNodes = this .textureCoordinateNodes;
116337
+ const
116338
+ textureCoordinateNodes = this .textureCoordinateNodes,
116339
+ length = Math .min (this .maxTexCoords, textureCoordinateNodes .length);
116071
116340
 
116072
- for (let i = 0, length = textureCoordinateNodes .length; i < length; ++ i)
116341
+ for (let i = 0; i < length; ++ i)
116073
116342
  textureCoordinateNodes [i] .addPointToChannel (index, multiArray [i]);
116074
116343
  },
116075
116344
  getTextureCoordinateMapping: function (textureCoordinateMapping)
116076
116345
  {
116077
116346
  const
116078
116347
  textureCoordinateNodes = this .textureCoordinateNodes,
116079
- length = Math .min (this .getBrowser () .getMaxTextures (), textureCoordinateNodes .length);
116348
+ length = Math .min (this .maxTexCoords, textureCoordinateNodes .length);
116080
116349
 
116081
116350
  for (let i = 0; i < length; ++ i)
116082
116351
  textureCoordinateNodes [i] .getTextureCoordinateMapping (textureCoordinateMapping, i);
@@ -116085,22 +116354,16 @@ MultiTextureCoordinate .prototype = Object .assign (Object .create (Texturing_X3
116085
116354
  {
116086
116355
  const
116087
116356
  textureCoordinateNodes = this .textureCoordinateNodes,
116088
- length = Math .min (shaderObject .x3d_MaxTextures, textureCoordinateNodes .length);
116089
-
116090
- for (let i = 0; i < length; ++ i)
116091
- textureCoordinateNodes [i] .setShaderUniformsToChannel (gl, shaderObject, i);
116357
+ length = Math .min (this .maxTexCoords, textureCoordinateNodes .length);
116092
116358
 
116093
116359
  if (length)
116094
116360
  {
116095
- const last = textureCoordinateNodes .at (-1);
116096
-
116097
- for (let i = length, l = shaderObject .x3d_MaxTextures; i < l; ++ i)
116098
- last .setShaderUniformsToChannel (gl, shaderObject, i);
116361
+ for (let i = 0; i < length; ++ i)
116362
+ textureCoordinateNodes [i] .setShaderUniforms (gl, shaderObject, i);
116099
116363
  }
116100
116364
  else
116101
116365
  {
116102
- for (let i = length, l = shaderObject .x3d_MaxTextures; i < l; ++ i)
116103
- gl .uniform1i (shaderObject .x3d_TextureCoordinateGeneratorMode [i], 0);
116366
+ this .getBrowser () .getDefaultTextureCoordinate () .setShaderUniforms (gl, shaderObject, 0);
116104
116367
  }
116105
116368
  },
116106
116369
  });
@@ -116165,13 +116428,15 @@ x_ite_Namespace.set ("x_ite/Components/Texturing/MultiTextureCoordinate", MultiT
116165
116428
 
116166
116429
 
116167
116430
 
116168
-
116169
116431
  function MultiTextureTransform (executionContext)
116170
116432
  {
116171
116433
  Texturing_X3DTextureTransformNode.call (this, executionContext);
116172
116434
 
116173
116435
  this .addType (Base_X3DConstants.MultiTextureTransform);
116174
116436
 
116437
+ const browser = this .getBrowser ();
116438
+
116439
+ this .maxTextureTransforms = browser .getMaxTextureTransforms ();
116175
116440
  this .textureTransformNodes = [ ];
116176
116441
  }
116177
116442
 
@@ -116215,53 +116480,35 @@ MultiTextureTransform .prototype = Object .assign (Object .create (Texturing_X3D
116215
116480
  if (textureTransformNode)
116216
116481
  textureTransformNodes .push (textureTransformNode);
116217
116482
  }
116483
+
116484
+ if (!textureTransformNodes .length)
116485
+ textureTransformNodes .push (this .getBrowser () .getDefaultTextureTransform ());
116218
116486
  },
116219
116487
  getCount: function ()
116220
116488
  {
116221
- return Math .min (this .getBrowser () .getMaxTextures (), this .textureTransformNodes .length);
116489
+ return Math .min (this .maxTextureTransforms, this .textureTransformNodes .length);
116222
116490
  },
116223
116491
  getTextureTransformMapping: function (textureTransformMapping)
116224
116492
  {
116225
116493
  const
116226
116494
  textureTransformNodes = this .textureTransformNodes,
116227
- length = Math .min (this .getBrowser () .getMaxTextures (), textureTransformNodes .length);
116495
+ length = Math .min (this .maxTextureTransforms, textureTransformNodes .length);
116228
116496
 
116229
116497
  for (let i = 0; i < length; ++ i)
116230
116498
  textureTransformNodes [i] .getTextureTransformMapping (textureTransformMapping, i);
116231
116499
  },
116232
- setShaderUniforms: (function ()
116500
+ setShaderUniforms: function (gl, shaderObject)
116233
116501
  {
116234
- const matrixArray = new Float32Array (Numbers_Matrix4.Identity);
116235
-
116236
- return function (gl, shaderObject)
116237
- {
116238
- const
116239
- textureTransformNodes = this .textureTransformNodes,
116240
- length = Math .min (shaderObject .x3d_MaxTextures, textureTransformNodes .length);
116241
-
116242
- for (let i = 0; i < length; ++ i)
116243
- textureTransformNodes [i] .setShaderUniformsToChannel (gl, shaderObject, i);
116244
-
116245
- if (length)
116246
- {
116247
- const last = textureTransformNodes .at (-1);
116502
+ const
116503
+ textureTransformNodes = this .textureTransformNodes,
116504
+ length = Math .min (this .maxTextureTransforms, textureTransformNodes .length);
116248
116505
 
116249
- for (let i = length, l = shaderObject .x3d_MaxTextures; i < l; ++ i)
116250
- last .setShaderUniformsToChannel (gl, shaderObject, i);
116251
- }
116252
- else
116253
- {
116254
- for (let i = length, l = shaderObject .x3d_MaxTextures; i < l; ++ i)
116255
- gl .uniformMatrix4fv (shaderObject .x3d_TextureMatrix [i], false, matrixArray);
116256
- }
116257
- };
116258
- })(),
116506
+ for (let i = 0; i < length; ++ i)
116507
+ textureTransformNodes [i] .setShaderUniforms (gl, shaderObject, i);
116508
+ },
116259
116509
  transformPoint: function (texCoord)
116260
116510
  {
116261
- if (this .textureTransformNodes .length)
116262
- return this .textureTransformNodes [0] .transformPoint (texCoord);
116263
-
116264
- return texCoord;
116511
+ return this .textureTransformNodes [0] .transformPoint (texCoord);
116265
116512
  },
116266
116513
  });
116267
116514
 
@@ -116271,7 +116518,7 @@ const MultiTextureTransform_default_ = MultiTextureTransform;
116271
116518
  x_ite_Namespace.set ("x_ite/Components/Texturing/MultiTextureTransform", MultiTextureTransform_default_);
116272
116519
  /* harmony default export */ const Texturing_MultiTextureTransform = (MultiTextureTransform_default_);
116273
116520
  ;// CONCATENATED MODULE: ./src/x_ite/Components/Texturing/PixelTexture.js
116274
- /* provided dependency */ var PixelTexture_$ = __webpack_require__(5);
116521
+ /* provided dependency */ var PixelTexture_$ = __webpack_require__(535);
116275
116522
  /*******************************************************************************
116276
116523
  *
116277
116524
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -116686,7 +116933,7 @@ TextureCoordinateGenerator .prototype = Object .assign (Object .create (Texturin
116686
116933
  {
116687
116934
  array .push (0, 0, 0, 1);
116688
116935
  },
116689
- setShaderUniformsToChannel: function (gl, shaderObject, channel = 0)
116936
+ setShaderUniforms: function (gl, shaderObject, channel = 0)
116690
116937
  {
116691
116938
  gl .uniform1i (shaderObject .x3d_TextureCoordinateGeneratorMode [channel], this .mode);
116692
116939
  gl .uniform1fv (shaderObject .x3d_TextureCoordinateGeneratorParameter [channel], this .parameter);
@@ -116974,7 +117221,7 @@ const Components_default_ = Components;
116974
117221
  x_ite_Namespace.set ("x_ite/Components", Components_default_);
116975
117222
  /* harmony default export */ const x_ite_Components = ((/* unused pure expression or super */ null && (Components_default_)));
116976
117223
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/DOMIntegration.js
116977
- /* provided dependency */ var DOMIntegration_$ = __webpack_require__(5);
117224
+ /* provided dependency */ var DOMIntegration_$ = __webpack_require__(535);
116978
117225
  /*******************************************************************************
116979
117226
  * MIT License
116980
117227
  *
@@ -118211,7 +118458,7 @@ const SupportedProfiles_default_ = SupportedProfiles;
118211
118458
  x_ite_Namespace.set ("x_ite/Configuration/SupportedProfiles", SupportedProfiles_default_);
118212
118459
  /* harmony default export */ const Configuration_SupportedProfiles = (SupportedProfiles_default_);
118213
118460
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/X3DBrowser.js
118214
- /* provided dependency */ var X3DBrowser_$ = __webpack_require__(5);
118461
+ /* provided dependency */ var X3DBrowser_$ = __webpack_require__(535);
118215
118462
  /*******************************************************************************
118216
118463
  *
118217
118464
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -118870,7 +119117,7 @@ X3DBrowser .prototype = Object .assign (Object .create (Browser_X3DBrowserContex
118870
119117
  if (!layerNode)
118871
119118
  return;
118872
119119
 
118873
- layerNode .getViewpoint () ._viewAll = true;
119120
+ layerNode .viewAll (1, this .getBrowserOption ("StraightenHorizon"));
118874
119121
  },
118875
119122
  firstViewpoint: function (layerNode)
118876
119123
  {
@@ -119156,7 +119403,7 @@ const X3DBrowser_default_ = X3DBrowser;
119156
119403
  x_ite_Namespace.set ("x_ite/Browser/X3DBrowser", X3DBrowser_default_);
119157
119404
  /* harmony default export */ const Browser_X3DBrowser = (X3DBrowser_default_);
119158
119405
  ;// CONCATENATED MODULE: ./src/x_ite/Fallback.js
119159
- /* provided dependency */ var Fallback_$ = __webpack_require__(5);
119406
+ /* provided dependency */ var Fallback_$ = __webpack_require__(535);
119160
119407
  /*******************************************************************************
119161
119408
  *
119162
119409
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -119335,8 +119582,8 @@ const MicroTime_default_ = undefined;
119335
119582
  x_ite_Namespace.set ("standard/Time/MicroTime", MicroTime_default_);
119336
119583
  /* harmony default export */ const MicroTime = ((/* unused pure expression or super */ null && (MicroTime_default_)));
119337
119584
  ;// CONCATENATED MODULE: ./src/lib/jquery.js
119338
- /* provided dependency */ var jquery_$ = __webpack_require__(5);
119339
- /* provided dependency */ var pako = __webpack_require__(81);
119585
+ /* provided dependency */ var jquery_$ = __webpack_require__(535);
119586
+ /* provided dependency */ var pako = __webpack_require__(626);
119340
119587
  jquery_$.decodeText = function (input)
119341
119588
  {
119342
119589
  if (typeof input === "string")
@@ -119363,14 +119610,14 @@ const jquery_default_ = jquery_$;
119363
119610
  x_ite_Namespace.set ("lib/jquery", jquery_default_);
119364
119611
  /* harmony default export */ const jquery = ((/* unused pure expression or super */ null && (jquery_default_)));
119365
119612
  ;// CONCATENATED MODULE: ./src/lib/libtess.js
119366
- /* provided dependency */ var libtess_libtess = __webpack_require__(587);
119613
+ /* provided dependency */ var libtess_libtess = __webpack_require__(51);
119367
119614
  const libtess_default_ = libtess_libtess;
119368
119615
  ;
119369
119616
 
119370
119617
  x_ite_Namespace.set ("lib/libtess", libtess_default_);
119371
119618
  /* harmony default export */ const lib_libtess = ((/* unused pure expression or super */ null && (libtess_default_)));
119372
119619
  ;// CONCATENATED MODULE: ./src/x_ite/X3D.js
119373
- /* provided dependency */ var X3D_$ = __webpack_require__(5);
119620
+ /* provided dependency */ var X3D_$ = __webpack_require__(535);
119374
119621
  /*******************************************************************************
119375
119622
  *
119376
119623
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -119626,7 +119873,7 @@ const X3D_default_ = X3D;
119626
119873
  x_ite_Namespace.set ("x_ite/X3D", X3D_default_);
119627
119874
  /* harmony default export */ const x_ite_X3D = (X3D_default_);
119628
119875
  ;// CONCATENATED MODULE: ./src/x_ite/X3DCanvas.js
119629
- /* provided dependency */ var X3DCanvas_$ = __webpack_require__(5);
119876
+ /* provided dependency */ var X3DCanvas_$ = __webpack_require__(535);
119630
119877
  /*******************************************************************************
119631
119878
  *
119632
119879
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -119886,7 +120133,7 @@ x_ite_Namespace.set ("shim", shim_default_);
119886
120133
 
119887
120134
  // Assign X3D to global namespace.
119888
120135
 
119889
- window [Symbol .for ("X_ITE.X3D-8.6.8")] = x_ite_X3D;
120136
+ window [Symbol .for ("X_ITE.X3D-8.6.10")] = x_ite_X3D;
119890
120137
 
119891
120138
  x_ite_X3DCanvas.define ();
119892
120139