x_ite 10.0.0 → 10.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/README.md +4 -4
  2. package/dist/assets/components/Annotation.js +13 -13
  3. package/dist/assets/components/Annotation.min.js +1 -1
  4. package/dist/assets/components/CADGeometry.js +14 -14
  5. package/dist/assets/components/CADGeometry.min.js +1 -1
  6. package/dist/assets/components/CubeMapTexturing.js +25 -25
  7. package/dist/assets/components/CubeMapTexturing.min.js +1 -1
  8. package/dist/assets/components/DIS.js +13 -13
  9. package/dist/assets/components/DIS.min.js +1 -1
  10. package/dist/assets/components/EventUtilities.js +9 -9
  11. package/dist/assets/components/EventUtilities.min.js +1 -1
  12. package/dist/assets/components/Geometry2D.js +18 -18
  13. package/dist/assets/components/Geometry2D.min.js +1 -1
  14. package/dist/assets/components/Geospatial.js +33 -33
  15. package/dist/assets/components/Geospatial.min.js +1 -1
  16. package/dist/assets/components/HAnim.js +23 -23
  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 +23 -23
  23. package/dist/assets/components/NURBS.min.js +1 -1
  24. package/dist/assets/components/ParticleSystems.js +26 -26
  25. package/dist/assets/components/ParticleSystems.min.js +1 -1
  26. package/dist/assets/components/Picking.js +18 -18
  27. package/dist/assets/components/Picking.min.js +1 -1
  28. package/dist/assets/components/RigidBodyPhysics.js +17 -17
  29. package/dist/assets/components/RigidBodyPhysics.min.js +1 -1
  30. package/dist/assets/components/Scripting.js +38 -38
  31. package/dist/assets/components/Scripting.min.js +1 -1
  32. package/dist/assets/components/Text.js +24 -24
  33. package/dist/assets/components/Text.min.js +1 -1
  34. package/dist/assets/components/TextureProjection.js +15 -15
  35. package/dist/assets/components/TextureProjection.min.js +1 -1
  36. package/dist/assets/components/Texturing3D.js +27 -27
  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 +38 -176
  41. package/dist/assets/components/X_ITE.min.js +1 -1
  42. package/dist/x_ite.css +1 -1
  43. package/dist/x_ite.d.ts +784 -65
  44. package/dist/x_ite.js +597 -608
  45. package/dist/x_ite.min.js +1 -1
  46. package/dist/x_ite.min.mjs +1 -1
  47. package/dist/x_ite.mjs +597 -608
  48. package/dist/x_ite.zip +0 -0
  49. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- /* X_ITE v10.0.0 */(() => { // webpackBootstrap
1
+ /* X_ITE v10.0.2 */(() => { // webpackBootstrap
2
2
  /******/ "use strict";
3
3
  /******/ // The require scope
4
4
  /******/ var __webpack_require__ = {};
@@ -39,25 +39,25 @@ var __webpack_exports__ = {};
39
39
  // UNUSED EXPORTS: default
40
40
 
41
41
  ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Components\")"
42
- const Components_namespaceObject = window [Symbol .for ("X_ITE.X3D-10.0.0")] .require ("x_ite/Components");
42
+ const Components_namespaceObject = window [Symbol .for ("X_ITE.X3D-10.0.2")] .require ("x_ite/Components");
43
43
  var Components_default = /*#__PURE__*/__webpack_require__.n(Components_namespaceObject);
44
44
  ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Fields\")"
45
- const Fields_namespaceObject = window [Symbol .for ("X_ITE.X3D-10.0.0")] .require ("x_ite/Fields");
45
+ const Fields_namespaceObject = window [Symbol .for ("X_ITE.X3D-10.0.2")] .require ("x_ite/Fields");
46
46
  var Fields_default = /*#__PURE__*/__webpack_require__.n(Fields_namespaceObject);
47
47
  ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Base/X3DFieldDefinition\")"
48
- const X3DFieldDefinition_namespaceObject = window [Symbol .for ("X_ITE.X3D-10.0.0")] .require ("x_ite/Base/X3DFieldDefinition");
48
+ const X3DFieldDefinition_namespaceObject = window [Symbol .for ("X_ITE.X3D-10.0.2")] .require ("x_ite/Base/X3DFieldDefinition");
49
49
  var X3DFieldDefinition_default = /*#__PURE__*/__webpack_require__.n(X3DFieldDefinition_namespaceObject);
50
50
  ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Base/FieldDefinitionArray\")"
51
- const FieldDefinitionArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-10.0.0")] .require ("x_ite/Base/FieldDefinitionArray");
51
+ const FieldDefinitionArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-10.0.2")] .require ("x_ite/Base/FieldDefinitionArray");
52
52
  var FieldDefinitionArray_default = /*#__PURE__*/__webpack_require__.n(FieldDefinitionArray_namespaceObject);
53
53
  ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Components/Shape/X3DAppearanceChildNode\")"
54
- const X3DAppearanceChildNode_namespaceObject = window [Symbol .for ("X_ITE.X3D-10.0.0")] .require ("x_ite/Components/Shape/X3DAppearanceChildNode");
54
+ const X3DAppearanceChildNode_namespaceObject = window [Symbol .for ("X_ITE.X3D-10.0.2")] .require ("x_ite/Components/Shape/X3DAppearanceChildNode");
55
55
  var X3DAppearanceChildNode_default = /*#__PURE__*/__webpack_require__.n(X3DAppearanceChildNode_namespaceObject);
56
56
  ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Base/X3DConstants\")"
57
- const X3DConstants_namespaceObject = window [Symbol .for ("X_ITE.X3D-10.0.0")] .require ("x_ite/Base/X3DConstants");
57
+ const X3DConstants_namespaceObject = window [Symbol .for ("X_ITE.X3D-10.0.2")] .require ("x_ite/Base/X3DConstants");
58
58
  var X3DConstants_default = /*#__PURE__*/__webpack_require__.n(X3DConstants_namespaceObject);
59
59
  ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Namespace\")"
60
- const Namespace_namespaceObject = window [Symbol .for ("X_ITE.X3D-10.0.0")] .require ("x_ite/Namespace");
60
+ const Namespace_namespaceObject = window [Symbol .for ("X_ITE.X3D-10.0.2")] .require ("x_ite/Namespace");
61
61
  var Namespace_default = /*#__PURE__*/__webpack_require__.n(Namespace_namespaceObject);
62
62
  ;// CONCATENATED MODULE: ./src/x_ite/Components/X_ITE/BlendMode.js
63
63
  /*******************************************************************************
@@ -171,45 +171,33 @@ Object .assign (Object .setPrototypeOf (BlendMode .prototype, (X3DAppearanceChil
171
171
  },
172
172
  set_sourceColorFactor__ ()
173
173
  {
174
- this .sourceColorFactorType = this .factorTypes .get (this ._sourceColorFactor .getValue ());
175
-
176
- if (this .sourceColorFactorType === undefined)
177
- this .sourceColorFactorType = this .factorTypes .get ("SRC_ALPHA");
174
+ this .sourceColorFactorType = this .factorTypes .get (this ._sourceColorFactor .getValue ())
175
+ ?? this .factorTypes .get ("SRC_ALPHA");
178
176
  },
179
177
  set_sourceAlphaFactor__ ()
180
178
  {
181
- this .sourceAlphaFactorType = this .factorTypes .get (this ._sourceAlphaFactor .getValue ());
182
-
183
- if (this .sourceAlphaFactorType === undefined)
184
- this .sourceAlphaFactorType = this .factorTypes .get ("ONE");
179
+ this .sourceAlphaFactorType = this .factorTypes .get (this ._sourceAlphaFactor .getValue ())
180
+ ?? this .factorTypes .get ("ONE");
185
181
  },
186
182
  set_destinationColorFactor__ ()
187
183
  {
188
- this .destinationColorFactorType = this .factorTypes .get (this ._destinationColorFactor .getValue ());
189
-
190
- if (this .destinationColorFactorType === undefined)
191
- this .destinationColorFactorType = this .factorTypes .get ("ONE_MINUS_SRC_ALPHA");
184
+ this .destinationColorFactorType = this .factorTypes .get (this ._destinationColorFactor .getValue ())
185
+ ?? this .factorTypes .get ("ONE_MINUS_SRC_ALPHA");
192
186
  },
193
187
  set_destinationAlphaFactor__ ()
194
188
  {
195
- this .destinationAlphaFactorType = this .factorTypes .get (this ._destinationAlphaFactor .getValue ());
196
-
197
- if (this .destinationAlphaFactorType === undefined)
198
- this .destinationAlphaFactorType = this .factorTypes .get ("ONE_MINUS_SRC_ALPHA");
189
+ this .destinationAlphaFactorType = this .factorTypes .get (this ._destinationAlphaFactor .getValue ())
190
+ ?? this .factorTypes .get ("ONE_MINUS_SRC_ALPHA");
199
191
  },
200
192
  set_colorEquation__ ()
201
193
  {
202
- this .colorEquationType = this .equationTypes .get (this ._colorEquation .getValue ());
203
-
204
- if (this .colorEquationType === undefined)
205
- this .colorEquationType = this .equationTypes .get ("FUNC_ADD");
194
+ this .colorEquationType = this .equationTypes .get (this ._colorEquation .getValue ())
195
+ ?? this .equationTypes .get ("FUNC_ADD");
206
196
  },
207
197
  set_alphaEquation__ ()
208
198
  {
209
- this .alphaEquationType = this .equationTypes .get (this ._alphaEquation .getValue ());
210
-
211
- if (this .alphaEquationType === undefined)
212
- this .alphaEquationType = this .equationTypes .get ("FUNC_ADD");
199
+ this .alphaEquationType = this .equationTypes .get (this ._alphaEquation .getValue ())
200
+ ?? this .equationTypes .get ("FUNC_ADD");
213
201
  },
214
202
  enable (gl)
215
203
  {
@@ -436,22 +424,22 @@ const DepthMode_default_ = DepthMode;
436
424
  Namespace_default().add ("DepthMode", "x_ite/Components/X_ITE/DepthMode", DepthMode_default_);
437
425
  /* harmony default export */ const X_ITE_DepthMode = (DepthMode_default_);
438
426
  ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Components/Shape/X3DShapeNode\")"
439
- const X3DShapeNode_namespaceObject = window [Symbol .for ("X_ITE.X3D-10.0.0")] .require ("x_ite/Components/Shape/X3DShapeNode");
427
+ const X3DShapeNode_namespaceObject = window [Symbol .for ("X_ITE.X3D-10.0.2")] .require ("x_ite/Components/Shape/X3DShapeNode");
440
428
  var X3DShapeNode_default = /*#__PURE__*/__webpack_require__.n(X3DShapeNode_namespaceObject);
441
429
  ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Rendering/TraverseType\")"
442
- const TraverseType_namespaceObject = window [Symbol .for ("X_ITE.X3D-10.0.0")] .require ("x_ite/Rendering/TraverseType");
430
+ const TraverseType_namespaceObject = window [Symbol .for ("X_ITE.X3D-10.0.2")] .require ("x_ite/Rendering/TraverseType");
443
431
  var TraverseType_default = /*#__PURE__*/__webpack_require__.n(TraverseType_namespaceObject);
444
432
  ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Rendering/VertexArray\")"
445
- const VertexArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-10.0.0")] .require ("x_ite/Rendering/VertexArray");
433
+ const VertexArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-10.0.2")] .require ("x_ite/Rendering/VertexArray");
446
434
  var VertexArray_default = /*#__PURE__*/__webpack_require__.n(VertexArray_namespaceObject);
447
435
  ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"standard/Math/Numbers/Vector3\")"
448
- const Vector3_namespaceObject = window [Symbol .for ("X_ITE.X3D-10.0.0")] .require ("standard/Math/Numbers/Vector3");
436
+ const Vector3_namespaceObject = window [Symbol .for ("X_ITE.X3D-10.0.2")] .require ("standard/Math/Numbers/Vector3");
449
437
  var Vector3_default = /*#__PURE__*/__webpack_require__.n(Vector3_namespaceObject);
450
438
  ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"standard/Math/Numbers/Matrix4\")"
451
- const Matrix4_namespaceObject = window [Symbol .for ("X_ITE.X3D-10.0.0")] .require ("standard/Math/Numbers/Matrix4");
439
+ const Matrix4_namespaceObject = window [Symbol .for ("X_ITE.X3D-10.0.2")] .require ("standard/Math/Numbers/Matrix4");
452
440
  var Matrix4_default = /*#__PURE__*/__webpack_require__.n(Matrix4_namespaceObject);
453
441
  ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"standard/Math/Geometry/Box3\")"
454
- const Box3_namespaceObject = window [Symbol .for ("X_ITE.X3D-10.0.0")] .require ("standard/Math/Geometry/Box3");
442
+ const Box3_namespaceObject = window [Symbol .for ("X_ITE.X3D-10.0.2")] .require ("standard/Math/Geometry/Box3");
455
443
  var Box3_default = /*#__PURE__*/__webpack_require__.n(Box3_namespaceObject);
456
444
  ;// CONCATENATED MODULE: ./src/x_ite/Components/X_ITE/InstancedShape.js
457
445
  /*******************************************************************************
@@ -780,13 +768,13 @@ const InstancedShape_default_ = InstancedShape;
780
768
  Namespace_default().add ("InstancedShape", "x_ite/Components/X_ITE/InstancedShape", InstancedShape_default_);
781
769
  /* harmony default export */ const X_ITE_InstancedShape = (InstancedShape_default_);
782
770
  ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Components/Shape/X3DOneSidedMaterialNode\")"
783
- const X3DOneSidedMaterialNode_namespaceObject = window [Symbol .for ("X_ITE.X3D-10.0.0")] .require ("x_ite/Components/Shape/X3DOneSidedMaterialNode");
771
+ const X3DOneSidedMaterialNode_namespaceObject = window [Symbol .for ("X_ITE.X3D-10.0.2")] .require ("x_ite/Components/Shape/X3DOneSidedMaterialNode");
784
772
  var X3DOneSidedMaterialNode_default = /*#__PURE__*/__webpack_require__.n(X3DOneSidedMaterialNode_namespaceObject);
785
773
  ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Base/X3DCast\")"
786
- const X3DCast_namespaceObject = window [Symbol .for ("X_ITE.X3D-10.0.0")] .require ("x_ite/Base/X3DCast");
774
+ const X3DCast_namespaceObject = window [Symbol .for ("X_ITE.X3D-10.0.2")] .require ("x_ite/Base/X3DCast");
787
775
  var X3DCast_default = /*#__PURE__*/__webpack_require__.n(X3DCast_namespaceObject);
788
776
  ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"standard/Math/Algorithm\")"
789
- const Algorithm_namespaceObject = window [Symbol .for ("X_ITE.X3D-10.0.0")] .require ("standard/Math/Algorithm");
777
+ const Algorithm_namespaceObject = window [Symbol .for ("X_ITE.X3D-10.0.2")] .require ("standard/Math/Algorithm");
790
778
  var Algorithm_default = /*#__PURE__*/__webpack_require__.n(Algorithm_namespaceObject);
791
779
  ;// CONCATENATED MODULE: ./src/x_ite/Components/X_ITE/SpecularGlossinessMaterial.js
792
780
  /*******************************************************************************
@@ -846,6 +834,8 @@ var Algorithm_default = /*#__PURE__*/__webpack_require__.n(Algorithm_namespaceOb
846
834
 
847
835
  function SpecularGlossinessMaterial (executionContext)
848
836
  {
837
+ console .warn ("SpecularGlossinessMaterial is depreciated, please use PhysicalMaterial instead.");
838
+
849
839
  X3DOneSidedMaterialNode_default().call (this, executionContext);
850
840
 
851
841
  this .addType ((X3DConstants_default()).SpecularGlossinessMaterial);
@@ -976,8 +966,7 @@ Object .assign (Object .setPrototypeOf (SpecularGlossinessMaterial .prototype, (
976
966
  set_transparent__ ()
977
967
  {
978
968
  this .setTransparent (this .getTransparency () ||
979
- this .diffuseTextureNode ?.isTransparent () ||
980
- this .isTransmission ());
969
+ this .diffuseTextureNode ?.isTransparent ());
981
970
  },
982
971
  set_extensions__ ()
983
972
  {
@@ -1003,7 +992,6 @@ Object .assign (Object .setPrototypeOf (SpecularGlossinessMaterial .prototype, (
1003
992
 
1004
993
  this .setTransmission (extensionNodes .some (extensionNode => extensionNode .getType () .includes ((X3DConstants_default()).TransmissionMaterialExtension)));
1005
994
 
1006
- this .set_transparent__ ();
1007
995
  this .set_extensionsKey__ ();
1008
996
  },
1009
997
  set_extensionsKey__ ()
@@ -1025,18 +1013,6 @@ Object .assign (Object .setPrototypeOf (SpecularGlossinessMaterial .prototype, (
1025
1013
 
1026
1014
  options .push ("X3D_PHYSICAL_MATERIAL", "X3D_MATERIAL_SPECULAR_GLOSSINESS");
1027
1015
 
1028
- switch (browser .getBrowserOption ("ToneMapping"))
1029
- {
1030
- default: // NONE
1031
- break;
1032
- case "ACES_NARKOWICZ":
1033
- case "ACES_HILL":
1034
- case "ACES_HILL_EXPOSURE_BOOST":
1035
- case "KHR_PBR_NEUTRAL":
1036
- options .push (`X3D_TONEMAP_${browser .getBrowserOption ("ToneMapping")}`);
1037
- break;
1038
- }
1039
-
1040
1016
  if (+this .getTextureBits ())
1041
1017
  {
1042
1018
  this .diffuseTextureNode ?.getShaderOptions (options, "DIFFUSE");
@@ -1044,7 +1020,7 @@ Object .assign (Object .setPrototypeOf (SpecularGlossinessMaterial .prototype, (
1044
1020
  this .occlusionTextureNode ?.getShaderOptions (options, "OCCLUSION");
1045
1021
  }
1046
1022
 
1047
- const shaderNode = browser .createShader ("PBR", "Default", "PBR", options);
1023
+ const shaderNode = browser .createShader ("SpecularGlossiness", "Default", "Physical", options);
1048
1024
 
1049
1025
  browser .getShaders () .set (key, shaderNode);
1050
1026
 
@@ -1156,10 +1132,10 @@ const SpecularGlossinessMaterial_default_ = SpecularGlossinessMaterial;
1156
1132
  Namespace_default().add ("SpecularGlossinessMaterial", "x_ite/Components/X_ITE/SpecularGlossinessMaterial", SpecularGlossinessMaterial_default_);
1157
1133
  /* harmony default export */ const X_ITE_SpecularGlossinessMaterial = (SpecularGlossinessMaterial_default_);
1158
1134
  ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Components/Core/X3DNode\")"
1159
- const X3DNode_namespaceObject = window [Symbol .for ("X_ITE.X3D-10.0.0")] .require ("x_ite/Components/Core/X3DNode");
1135
+ const X3DNode_namespaceObject = window [Symbol .for ("X_ITE.X3D-10.0.2")] .require ("x_ite/Components/Core/X3DNode");
1160
1136
  var X3DNode_default = /*#__PURE__*/__webpack_require__.n(X3DNode_namespaceObject);
1161
1137
  ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"standard/Utility/BitSet\")"
1162
- const BitSet_namespaceObject = window [Symbol .for ("X_ITE.X3D-10.0.0")] .require ("standard/Utility/BitSet");
1138
+ const BitSet_namespaceObject = window [Symbol .for ("X_ITE.X3D-10.0.2")] .require ("standard/Utility/BitSet");
1163
1139
  var BitSet_default = /*#__PURE__*/__webpack_require__.n(BitSet_namespaceObject);
1164
1140
  ;// CONCATENATED MODULE: ./src/x_ite/Components/X_ITE/X3DMaterialExtensionNode.js
1165
1141
  /*******************************************************************************
@@ -2022,7 +1998,7 @@ Object .assign (Object .setPrototypeOf (IORMaterialExtension .prototype, X_ITE_X
2022
1998
  },
2023
1999
  set_indexOfRefraction__ ()
2024
2000
  {
2025
- this .indexOfRefraction = Math .max (this ._indexOfRefraction .getValue (), 0);
2001
+ this .indexOfRefraction = Math .max (this ._indexOfRefraction .getValue (), 1);
2026
2002
  },
2027
2003
  getExtensionKey ()
2028
2004
  {
@@ -2170,7 +2146,7 @@ Object .assign (Object .setPrototypeOf (IridescenceMaterialExtension .prototype,
2170
2146
  },
2171
2147
  set_iridescenceIndexOfRefraction__ ()
2172
2148
  {
2173
- this .iridescenceIndexOfRefraction = Math .max (this ._iridescenceIndexOfRefraction .getValue (), 0);
2149
+ this .iridescenceIndexOfRefraction = Math .max (this ._iridescenceIndexOfRefraction .getValue (), 1);
2174
2150
  },
2175
2151
  set_iridescenceThicknessMinimum__ ()
2176
2152
  {
@@ -2838,118 +2814,6 @@ const TransmissionMaterialExtension_default_ = TransmissionMaterialExtension;
2838
2814
 
2839
2815
  Namespace_default().add ("TransmissionMaterialExtension", "x_ite/Components/X_ITE/TransmissionMaterialExtension", TransmissionMaterialExtension_default_);
2840
2816
  /* harmony default export */ const X_ITE_TransmissionMaterialExtension = (TransmissionMaterialExtension_default_);
2841
- ;// CONCATENATED MODULE: ./src/x_ite/Components/X_ITE/UnlitMaterialExtension.js
2842
- /*******************************************************************************
2843
- *
2844
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2845
- *
2846
- * Copyright create3000, Scheffelstraße 31a, Leipzig, Germany 2011 - 2022.
2847
- *
2848
- * All rights reserved. Holger Seelig <holger.seelig@yahoo.de>.
2849
- *
2850
- * The copyright notice above does not evidence any actual of intended
2851
- * publication of such source code, and is an unpublished work by create3000.
2852
- * This material contains CONFIDENTIAL INFORMATION that is the property of
2853
- * create3000.
2854
- *
2855
- * No permission is granted to copy, distribute, or create derivative works from
2856
- * the contents of this software, in whole or in part, without the prior written
2857
- * permission of create3000.
2858
- *
2859
- * NON-MILITARY USE ONLY
2860
- *
2861
- * All create3000 software are effectively free software with a non-military use
2862
- * restriction. It is free. Well commented source is provided. You may reuse the
2863
- * source in any way you please with the exception anything that uses it must be
2864
- * marked to indicate is contains 'non-military use only' components.
2865
- *
2866
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2867
- *
2868
- * Copyright 2011 - 2022, Holger Seelig <holger.seelig@yahoo.de>.
2869
- *
2870
- * This file is part of the X_ITE Project.
2871
- *
2872
- * X_ITE is free software: you can redistribute it and/or modify it under the
2873
- * terms of the GNU General Public License version 3 only, as published by the
2874
- * Free Software Foundation.
2875
- *
2876
- * X_ITE is distributed in the hope that it will be useful, but WITHOUT ANY
2877
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
2878
- * A PARTICULAR PURPOSE. See the GNU General Public License version 3 for more
2879
- * details (a copy is included in the LICENSE file that accompanied this code).
2880
- *
2881
- * You should have received a copy of the GNU General Public License version 3
2882
- * along with X_ITE. If not, see <https://www.gnu.org/licenses/gpl.html> for a
2883
- * copy of the GPLv3 License.
2884
- *
2885
- * For Silvio, Joy and Adi.
2886
- *
2887
- ******************************************************************************/
2888
-
2889
-
2890
-
2891
-
2892
-
2893
-
2894
-
2895
-
2896
- function UnlitMaterialExtension (executionContext)
2897
- {
2898
- X_ITE_X3DMaterialExtensionNode .call (this, executionContext);
2899
-
2900
- this .addType ((X3DConstants_default()).UnlitMaterialExtension);
2901
- }
2902
-
2903
- Object .assign (Object .setPrototypeOf (UnlitMaterialExtension .prototype, X_ITE_X3DMaterialExtensionNode .prototype),
2904
- {
2905
- getExtensionKey ()
2906
- {
2907
- return X_ITE_ExtensionKeys .UNLIT_MATERIAL_EXTENSION;
2908
- },
2909
- getShaderOptions (options)
2910
- {
2911
- options .push ("X3D_UNLIT_MATERIAL_EXT");
2912
- },
2913
- setShaderUniforms ()
2914
- { },
2915
- });
2916
-
2917
- Object .defineProperties (UnlitMaterialExtension,
2918
- {
2919
- typeName:
2920
- {
2921
- value: "UnlitMaterialExtension",
2922
- enumerable: true,
2923
- },
2924
- componentInfo:
2925
- {
2926
- value: Object .freeze ({ name: "X_ITE", level: 1 }),
2927
- enumerable: true,
2928
- },
2929
- containerField:
2930
- {
2931
- value: "extensions",
2932
- enumerable: true,
2933
- },
2934
- specificationRange:
2935
- {
2936
- value: Object .freeze ({ from: "4.0", to: "Infinity" }),
2937
- enumerable: true,
2938
- },
2939
- fieldDefinitions:
2940
- {
2941
- value: new (FieldDefinitionArray_default()) ([
2942
- new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "metadata", new (Fields_default()).SFNode ()),
2943
- ]),
2944
- enumerable: true,
2945
- },
2946
- });
2947
-
2948
- const UnlitMaterialExtension_default_ = UnlitMaterialExtension;
2949
- ;
2950
-
2951
- Namespace_default().add ("UnlitMaterialExtension", "x_ite/Components/X_ITE/UnlitMaterialExtension", UnlitMaterialExtension_default_);
2952
- /* harmony default export */ const X_ITE_UnlitMaterialExtension = (UnlitMaterialExtension_default_);
2953
2817
  ;// CONCATENATED MODULE: ./src/x_ite/Components/X_ITE/VolumeMaterialExtension.js
2954
2818
  /*******************************************************************************
2955
2819
  *
@@ -3077,7 +2941,7 @@ Object .assign (Object .setPrototypeOf (VolumeMaterialExtension .prototype, X_IT
3077
2941
  {
3078
2942
  gl .uniform1f (shaderObject .x3d_ThicknessEXT, this .thickness);
3079
2943
  gl .uniform1f (shaderObject .x3d_AttenuationDistanceEXT, this .attenuationDistance);
3080
- gl .uniform3fv (shaderObject .x3d_AttenuationColoEXT, this .attenuationColorArray);
2944
+ gl .uniform3fv (shaderObject .x3d_AttenuationColorEXT, this .attenuationColorArray);
3081
2945
 
3082
2946
  if (!+this .getTextureBits ())
3083
2947
  return;
@@ -3198,7 +3062,6 @@ Namespace_default().add ("VolumeMaterialExtension", "x_ite/Components/X_ITE/Volu
3198
3062
 
3199
3063
 
3200
3064
 
3201
-
3202
3065
  Components_default().add ({
3203
3066
  name: "X_ITE",
3204
3067
  concreteNodes:
@@ -3216,7 +3079,6 @@ Components_default().add ({
3216
3079
  X_ITE_SheenMaterialExtension,
3217
3080
  X_ITE_SpecularMaterialExtension,
3218
3081
  X_ITE_TransmissionMaterialExtension,
3219
- X_ITE_UnlitMaterialExtension,
3220
3082
  X_ITE_VolumeMaterialExtension,
3221
3083
  ],
3222
3084
  abstractNodes:
@@ -1 +1 @@
1
- /* X_ITE v10.0.0 */(()=>{"use strict";var e={n:t=>{var s=t&&t.__esModule?()=>t.default:()=>t;return e.d(s,{a:s}),s},d:(t,s)=>{for(var i in s)e.o(s,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:s[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window[Symbol.for("X_ITE.X3D-10.0.0")].require("x_ite/Components");var s=e.n(t);const i=window[Symbol.for("X_ITE.X3D-10.0.0")].require("x_ite/Fields");var n=e.n(i);const o=window[Symbol.for("X_ITE.X3D-10.0.0")].require("x_ite/Base/X3DFieldDefinition");var r=e.n(o);const a=window[Symbol.for("X_ITE.X3D-10.0.0")].require("x_ite/Base/FieldDefinitionArray");var u=e.n(a);const _=window[Symbol.for("X_ITE.X3D-10.0.0")].require("x_ite/Components/Shape/X3DAppearanceChildNode");var l=e.n(_);const h=window[Symbol.for("X_ITE.X3D-10.0.0")].require("x_ite/Base/X3DConstants");var c=e.n(h);const p=window[Symbol.for("X_ITE.X3D-10.0.0")].require("x_ite/Namespace");var d=e.n(p);function T(e){l().call(this,e),this.addType(c().BlendMode),this.factorTypes=new Map,this.equationTypes=new Map}Object.assign(Object.setPrototypeOf(T.prototype,l().prototype),{initialize(){l().prototype.initialize.call(this);const e=this.getBrowser().getContext(),t=e.getExtension("EXT_blend_minmax");this.factorTypes.set("ZERO",e.ZERO),this.factorTypes.set("ONE",e.ONE),this.factorTypes.set("SRC_COLOR",e.SRC_COLOR),this.factorTypes.set("ONE_MINUS_SRC_COLOR",e.ONE_MINUS_SRC_COLOR),this.factorTypes.set("DST_COLOR",e.DST_COLOR),this.factorTypes.set("ONE_MINUS_DST_COLOR",e.ONE_MINUS_DST_COLOR),this.factorTypes.set("SRC_ALPHA",e.SRC_ALPHA),this.factorTypes.set("ONE_MINUS_SRC_ALPHA",e.ONE_MINUS_SRC_ALPHA),this.factorTypes.set("DST_ALPHA",e.DST_ALPHA),this.factorTypes.set("ONE_MINUS_DST_ALPHA",e.ONE_MINUS_DST_ALPHA),this.factorTypes.set("SRC_ALPHA_SATURATE",e.SRC_ALPHA_SATURATE),this.factorTypes.set("CONSTANT_COLOR",e.CONSTANT_COLOR),this.factorTypes.set("ONE_MINUS_CONSTANT_COLOR",e.ONE_MINUS_CONSTANT_COLOR),this.factorTypes.set("CONSTANT_ALPHA",e.CONSTANT_ALPHA),this.factorTypes.set("ONE_MINUS_CONSTANT_ALPHA",e.ONE_MINUS_CONSTANT_ALPHA),this.equationTypes.set("FUNC_ADD",e.FUNC_ADD),this.equationTypes.set("FUNC_SUBTRACT",e.FUNC_SUBTRACT),this.equationTypes.set("FUNC_REVERSE_SUBTRACT",e.FUNC_REVERSE_SUBTRACT),this.equationTypes.set("MIN",e.MIN||t&&t.MIN_EXT),this.equationTypes.set("MAX",e.MAX||t&&t.MAX_EXT),this._sourceColorFactor.addInterest("set_sourceColorFactor__",this),this._sourceAlphaFactor.addInterest("set_sourceAlphaFactor__",this),this._destinationColorFactor.addInterest("set_destinationColorFactor__",this),this._destinationAlphaFactor.addInterest("set_destinationAlphaFactor__",this),this._colorEquation.addInterest("set_colorEquation__",this),this._alphaEquation.addInterest("set_alphaEquation__",this),this.set_sourceColorFactor__(),this.set_sourceAlphaFactor__(),this.set_destinationColorFactor__(),this.set_destinationAlphaFactor__(),this.set_colorEquation__(),this.set_alphaEquation__()},set_sourceColorFactor__(){this.sourceColorFactorType=this.factorTypes.get(this._sourceColorFactor.getValue()),void 0===this.sourceColorFactorType&&(this.sourceColorFactorType=this.factorTypes.get("SRC_ALPHA"))},set_sourceAlphaFactor__(){this.sourceAlphaFactorType=this.factorTypes.get(this._sourceAlphaFactor.getValue()),void 0===this.sourceAlphaFactorType&&(this.sourceAlphaFactorType=this.factorTypes.get("ONE"))},set_destinationColorFactor__(){this.destinationColorFactorType=this.factorTypes.get(this._destinationColorFactor.getValue()),void 0===this.destinationColorFactorType&&(this.destinationColorFactorType=this.factorTypes.get("ONE_MINUS_SRC_ALPHA"))},set_destinationAlphaFactor__(){this.destinationAlphaFactorType=this.factorTypes.get(this._destinationAlphaFactor.getValue()),void 0===this.destinationAlphaFactorType&&(this.destinationAlphaFactorType=this.factorTypes.get("ONE_MINUS_SRC_ALPHA"))},set_colorEquation__(){this.colorEquationType=this.equationTypes.get(this._colorEquation.getValue()),void 0===this.colorEquationType&&(this.colorEquationType=this.equationTypes.get("FUNC_ADD"))},set_alphaEquation__(){this.alphaEquationType=this.equationTypes.get(this._alphaEquation.getValue()),void 0===this.alphaEquationType&&(this.alphaEquationType=this.equationTypes.get("FUNC_ADD"))},enable(e){const t=this._blendColor.getValue();e.blendColor(t.r,t.g,t.b,t.a),e.blendFuncSeparate(this.sourceColorFactorType,this.destinationColorFactorType,this.sourceAlphaFactorType,this.destinationAlphaFactorType),e.blendEquationSeparate(this.colorEquationType,this.alphaEquationType)},disable(e){e.blendFuncSeparate(e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA),e.blendEquationSeparate(e.FUNC_ADD,e.FUNC_ADD)}}),Object.defineProperties(T,{typeName:{value:"BlendMode",enumerable:!0},componentInfo:{value:Object.freeze({name:"X_ITE",level:1}),enumerable:!0},containerField:{value:"blendMode",enumerable:!0},specificationRange:{value:Object.freeze({from:"3.3",to:"Infinity"}),enumerable:!0},fieldDefinitions:{value:new(u())([new(r())(c().inputOutput,"metadata",new(n().SFNode)),new(r())(c().inputOutput,"blendColor",new(n().SFColorRGBA)),new(r())(c().inputOutput,"sourceColorFactor",new(n().SFString)("SRC_ALPHA")),new(r())(c().inputOutput,"sourceAlphaFactor",new(n().SFString)("ONE")),new(r())(c().inputOutput,"destinationColorFactor",new(n().SFString)("ONE_MINUS_SRC_ALPHA")),new(r())(c().inputOutput,"destinationAlphaFactor",new(n().SFString)("ONE_MINUS_SRC_ALPHA")),new(r())(c().inputOutput,"colorEquation",new(n().SFString)("FUNC_ADD")),new(r())(c().inputOutput,"alphaEquation",new(n().SFString)("FUNC_ADD"))]),enumerable:!0}});const x=T;d().add("BlendMode","x_ite/Components/X_ITE/BlendMode",x);const S=x;function E(e){l().call(this,e),this.addType(c().DepthMode),this.addAlias("depthFunc",this._depthFunction)}Object.assign(Object.setPrototypeOf(E.prototype,l().prototype),{initialize(){l().prototype.initialize.call(this),this._depthFunction.addInterest("set_depthFunction__",this),this.set_depthFunction__()},set_depthFunction__:function(){const e=new Map([["NEVER","NEVER"],["LESS","LESS"],["EQUAL","EQUAL"],["LESS_EQUAL","LEQUAL"],["GREATER","GREATER"],["NOT_EQUAL","NOTEQUAL"],["GREATER_EQUAL","GEQUAL"],["ALWAYS","ALWAYS"]]);return function(){const t=this.getBrowser().getContext();this.depthFunction=t[e.get(this._depthFunction.getValue())??"LEQUAL"]}}(),enable(e){this.depthTest=e.isEnabled(e.DEPTH_TEST),this.depthWriteMask=e.getParameter(e.DEPTH_WRITEMASK),e.enable(e.POLYGON_OFFSET_FILL),e.polygonOffset(...this._polygonOffset),this._depthTest.getValue()?e.enable(e.DEPTH_TEST):e.disable(e.DEPTH_TEST),e.depthFunc(this.depthFunction),e.depthRange(...this._depthRange.getValue()),e.depthMask(this._depthMask.getValue())},disable(e){e.disable(e.POLYGON_OFFSET_FILL),this.depthTest?e.enable(e.DEPTH_TEST):e.disable(e.DEPTH_TEST),e.depthFunc(e.LEQUAL),e.depthRange(0,1),e.depthMask(this.depthWriteMask)}}),Object.defineProperties(E,{typeName:{value:"DepthMode",enumerable:!0},componentInfo:{value:Object.freeze({name:"X_ITE",level:1}),enumerable:!0},containerField:{value:"depthMode",enumerable:!0},specificationRange:{value:Object.freeze({from:"4.0",to:"Infinity"}),enumerable:!0},fieldDefinitions:{value:new(u())([new(r())(c().inputOutput,"metadata",new(n().SFNode)),new(r())(c().inputOutput,"polygonOffset",new(n().SFVec2f)),new(r())(c().inputOutput,"depthRange",new(n().SFVec2f)(0,1)),new(r())(c().inputOutput,"depthTest",new(n().SFBool)(!0)),new(r())(c().inputOutput,"depthFunction",new(n().SFString)("LESS_EQUAL")),new(r())(c().inputOutput,"depthMask",new(n().SFBool)(!0))]),enumerable:!0}});const m=E;d().add("DepthMode","x_ite/Components/X_ITE/DepthMode",m);const f=m,O=window[Symbol.for("X_ITE.X3D-10.0.0")].require("x_ite/Components/Shape/X3DShapeNode");var g=e.n(O);const N=window[Symbol.for("X_ITE.X3D-10.0.0")].require("x_ite/Rendering/TraverseType");var I=e.n(N);const y=window[Symbol.for("X_ITE.X3D-10.0.0")].require("x_ite/Rendering/VertexArray");var A=e.n(y);const w=window[Symbol.for("X_ITE.X3D-10.0.0")].require("standard/Math/Numbers/Vector3");var R=e.n(w);const b=window[Symbol.for("X_ITE.X3D-10.0.0")].require("standard/Math/Numbers/Matrix4");var C=e.n(b);const M=window[Symbol.for("X_ITE.X3D-10.0.0")].require("standard/Math/Geometry/Box3");var F=e.n(M);function X(e){g().call(this,e),this.addType(c().InstancedShape),this.addChildObjects(c().outputOnly,"matrices",new(n().SFTime)),this.min=new(R()),this.max=new(R()),this.scale=new(R())(1,1,1),this.numInstances=0,this.instancesStride=25*Float32Array.BYTES_PER_ELEMENT,this.matrixOffset=0,this.normalMatrixOffset=16*Float32Array.BYTES_PER_ELEMENT}Object.assign(Object.setPrototypeOf(X.prototype,g().prototype),{initialize(){g().prototype.initialize.call(this);const e=this.getBrowser(),t=e.getContext();e.getContext().getVersion()<2||(this.instances=Object.assign(t.createBuffer(),{vertexArrayObject:new(A())(t),thickLinesVertexArrayObject:new(A())(t),lineTrianglesBuffer:t.createBuffer(),numLines:0}),this._translations.addInterest("set_transform__",this),this._rotations.addInterest("set_transform__",this),this._scales.addInterest("set_transform__",this),this._matrices.addInterest("set_matrices__",this),this.set_transform__())},getShapeKey:()=>3,getNumInstances(){return this.numInstances},getInstances(){return this.instances},set_bbox__:function(){const e=new(R()),t=new(R()),s=new(F());return function(){if(this.numInstances)if(this._bboxSize.getValue().equals(this.getDefaultBBoxSize())){this.getGeometry()?s.assign(this.getGeometry().getBBox()):s.set();const i=s.size.multiply(this.scale.magnitude()/2),n=s.center;e.assign(this.min).add(n).subtract(i),t.assign(this.max).add(n).add(i),this.bbox.setExtents(e,t)}else this.bbox.set(this._bboxSize.getValue(),this._bboxCenter.getValue());else this.bbox.set();this.getBBoxSize().assign(this.bbox.size),this.getBBoxCenter().assign(this.bbox.center)}}(),set_transform__(){this._matrices=this.getBrowser().getCurrentTime()},set_matrices__(){const e=this.getBrowser().getContext(),t=this._translations,s=this._rotations,i=this._scales,n=t.length,o=s.length,r=i.length,a=Math.max(n,o,r),u=this.instancesStride/Float32Array.BYTES_PER_ELEMENT,_=this.instancesStride*a,l=new Float32Array(_),h=new(C());this.numInstances=a;const c=this.min.set(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY),p=this.max.set(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY),d=this.scale.assign(r?p:R().One);for(let e=0,_=0;e<a;++e,_+=u)h.set(n?t[Math.min(e,n-1)].getValue():null,o?s[Math.min(e,o-1)].getValue():null,r?i[Math.min(e,r-1)].getValue():null),r&&d.max(i[Math.min(e,r-1)].getValue()),l.set(h,_),l.set(h.submatrix.transpose().inverse(),_+16),c.min(h.origin),p.max(h.origin);e.bindBuffer(e.ARRAY_BUFFER,this.instances),e.bufferData(e.ARRAY_BUFFER,l,e.DYNAMIC_DRAW),this.set_bbox__()},set_geometry__(){g().prototype.set_geometry__.call(this),this.getGeometry()?delete this.traverse:this.traverse=Function.prototype,this.set_transform__()},intersectsBox(e,t,s){},traverse(e,t){if(this.numInstances){switch(e){case I().POINTER:this._pointerEvents.getValue()&&t.addPointingShape(this);break;case I().PICKING:break;case I().COLLISION:t.addCollisionShape(this);break;case I().SHADOW:this._castShadow.getValue()&&t.addShadowShape(this);break;case I().DISPLAY:t.addDisplayShape(this)&&this.getAppearance().traverse(e,t)}this.getGeometry().traverse(e,t)}},displaySimple(e,t,s){this.getGeometry().displaySimpleInstanced(e,s,this)},display(e,t){this.getGeometry().displayInstanced(e,t,this)}}),Object.defineProperties(X,{typeName:{value:"InstancedShape",enumerable:!0},componentInfo:{value:Object.freeze({name:"X_ITE",level:1}),enumerable:!0},containerField:{value:"children",enumerable:!0},specificationRange:{value:Object.freeze({from:"2.0",to:"Infinity"}),enumerable:!0},fieldDefinitions:{value:new(u())([new(r())(c().inputOutput,"metadata",new(n().SFNode)),new(r())(c().inputOutput,"translations",new(n().MFVec3f)),new(r())(c().inputOutput,"rotations",new(n().MFRotation)),new(r())(c().inputOutput,"scales",new(n().MFVec3f)),new(r())(c().inputOutput,"pointerEvents",new(n().SFBool)(!0)),new(r())(c().inputOutput,"castShadow",new(n().SFBool)(!0)),new(r())(c().inputOutput,"visible",new(n().SFBool)(!0)),new(r())(c().inputOutput,"bboxDisplay",new(n().SFBool)),new(r())(c().initializeOnly,"bboxSize",new(n().SFVec3f)(-1,-1,-1)),new(r())(c().initializeOnly,"bboxCenter",new(n().SFVec3f)),new(r())(c().inputOutput,"appearance",new(n().SFNode)),new(r())(c().inputOutput,"geometry",new(n().SFNode))]),enumerable:!0}});const v=X;d().add("InstancedShape","x_ite/Components/X_ITE/InstancedShape",v);const D=v,L=window[Symbol.for("X_ITE.X3D-10.0.0")].require("x_ite/Components/Shape/X3DOneSidedMaterialNode");var U=e.n(L);const P=window[Symbol.for("X_ITE.X3D-10.0.0")].require("x_ite/Base/X3DCast");var V=e.n(P);const j=window[Symbol.for("X_ITE.X3D-10.0.0")].require("standard/Math/Algorithm");var B=e.n(j);function z(e){U().call(this,e),this.addType(c().SpecularGlossinessMaterial),this.materialKey="4/",this.diffuseColorArray=new Float32Array(3),this.specularColorArray=new Float32Array(3),this.extensionNodes=[]}Object.assign(Object.setPrototypeOf(z.prototype,U().prototype),{initialize(){U().prototype.initialize.call(this),this._diffuseColor.addInterest("set_diffuseColor__",this),this._diffuseTexture.addInterest("set_diffuseTexture__",this),this._diffuseTexture.addInterest("set_transparent__",this),this._specularColor.addInterest("set_specularColor__",this),this._glossiness.addInterest("set_glossiness__",this),this._specularGlossinessTexture.addInterest("set_specularGlossinessTexture__",this),this._occlusionStrength.addInterest("set_occlusionStrength__",this),this._occlusionTexture.addInterest("set_occlusionTexture__",this),this._extensions.addInterest("set_extensions__",this),this.set_diffuseColor__(),this.set_diffuseTexture__(),this.set_specularColor__(),this.set_glossiness__(),this.set_specularGlossinessTexture__(),this.set_occlusionStrength__(),this.set_occlusionTexture__(),this.set_extensions__(),this.set_transparent__()},getMaterialKey(){return this.materialKey},getTextureIndices:(()=>{let e=0;const t={DIFFUSE_TEXTURE:e++,SPECULAR_GLOSSINESS_TEXTURE:e++,EMISSIVE_TEXTURE:e++,OCCLUSION_TEXTURE:e++,NORMAL_TEXTURE:e++};return function(){return t}})(),getBaseTexture(){return this.diffuseTextureNode},set_diffuseColor__(){const e=this.diffuseColorArray,t=this._diffuseColor.getValue();e[0]=t.r,e[1]=t.g,e[2]=t.b},set_diffuseTexture__(){const e=this.getTextureIndices().DIFFUSE_TEXTURE;this.diffuseTextureNode&&(this.diffuseTextureNode._transparent.removeInterest("set_transparent__",this),this.diffuseTextureNode._linear.removeInterest(`setTexture${e}`,this)),this.diffuseTextureNode=V()(c().X3DSingleTextureNode,this._diffuseTexture),this.diffuseTextureNode&&(this.diffuseTextureNode._transparent.addInterest("set_transparent__",this),this.diffuseTextureNode._linear.addInterest(`setTexture${e}`,this,e,this.diffuseTextureNode)),this.setTexture(e,this.diffuseTextureNode)},set_specularColor__(){const e=this.specularColorArray,t=this._specularColor.getValue();e[0]=t.r,e[1]=t.g,e[2]=t.b},set_glossiness__(){this.glossiness=B().clamp(this._glossiness.getValue(),0,1)},set_specularGlossinessTexture__(){this.specularGlossinessTextureNode=V()(c().X3DSingleTextureNode,this._specularGlossinessTexture),this.setTexture(this.getTextureIndices().SPECULAR_GLOSSINESS_TEXTURE,this.specularGlossinessTextureNode)},set_occlusionStrength__(){this.occlusionStrength=B().clamp(this._occlusionStrength.getValue(),0,1)},set_occlusionTexture__(){this.occlusionTextureNode=V()(c().X3DSingleTextureNode,this._occlusionTexture),this.setTexture(this.getTextureIndices().OCCLUSION_TEXTURE,this.occlusionTextureNode)},set_transparent__(){this.setTransparent(this.getTransparency()||this.diffuseTextureNode?.isTransparent()||this.isTransmission())},set_extensions__(){const e=this.extensionNodes;for(const t of e)t.removeInterest("set_extensionsKey__",this);e.length=0;for(const t of this._extensions){const s=V()(c().X3DMaterialExtensionNode,t);s&&e.push(s)}e.sort(((e,t)=>e.getExtensionKey()-t.getExtensionKey()));for(const t of e)t.addInterest("set_extensionsKey__",this);this.setTransmission(e.some((e=>e.getType().includes(c().TransmissionMaterialExtension)))),this.set_transparent__(),this.set_extensionsKey__()},set_extensionsKey__(){const e=this.extensionNodes.map((e=>`${e.getExtensionKey().toString(16)}${e.getTextureBits().toString(16)}`)).join("");this.materialKey=`[4.${e}]`},createShader(e,t,s){const i=this.getBrowser(),n=this.getShaderOptions(t,s);for(const e of this.extensionNodes)e.getShaderOptions(n);switch(n.push("X3D_PHYSICAL_MATERIAL","X3D_MATERIAL_SPECULAR_GLOSSINESS"),i.getBrowserOption("ToneMapping")){default:break;case"ACES_NARKOWICZ":case"ACES_HILL":case"ACES_HILL_EXPOSURE_BOOST":case"KHR_PBR_NEUTRAL":n.push(`X3D_TONEMAP_${i.getBrowserOption("ToneMapping")}`)}+this.getTextureBits()&&(this.diffuseTextureNode?.getShaderOptions(n,"DIFFUSE"),this.specularGlossinessTextureNode?.getShaderOptions(n,"SPECULAR_GLOSSINESS"),this.occlusionTextureNode?.getShaderOptions(n,"OCCLUSION"));const o=i.createShader("PBR","Default","PBR",n);return i.getShaders().set(e,o),o},setShaderUniforms(e,t,s,i,n){U().prototype.setShaderUniforms.call(this,e,t,s,i,n);for(const o of this.extensionNodes)o.setShaderUniforms(e,t,s,i,n);e.uniform3fv(t.x3d_DiffuseColor,this.diffuseColorArray),e.uniform3fv(t.x3d_SpecularColor,this.specularColorArray),e.uniform1f(t.x3d_Glossiness,this.glossiness),+this.getTextureBits()&&(this.diffuseTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_DiffuseTexture,this._diffuseTextureMapping.getValue(),i,n),this.specularGlossinessTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_SpecularGlossinessTexture,this._specularGlossinessTextureMapping.getValue(),i,n),this.occlusionTextureNode&&e.uniform1f(t.x3d_OcclusionStrength,this.occlusionStrength),this.occlusionTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_OcclusionTexture,this._occlusionTextureMapping.getValue(),i,n))}}),Object.defineProperties(z,{typeName:{value:"SpecularGlossinessMaterial",enumerable:!0},componentInfo:{value:Object.freeze({name:"X_ITE",level:1}),enumerable:!0},containerField:{value:"material",enumerable:!0},specificationRange:{value:Object.freeze({from:"4.0",to:"Infinity"}),enumerable:!0},fieldDefinitions:{value:new(u())([new(r())(c().inputOutput,"metadata",new(n().SFNode)),new(r())(c().inputOutput,"diffuseColor",new(n().SFColor)(1,1,1)),new(r())(c().inputOutput,"diffuseTextureMapping",new(n().SFString)),new(r())(c().inputOutput,"diffuseTexture",new(n().SFNode)),new(r())(c().inputOutput,"specularColor",new(n().SFColor)(1,1,1)),new(r())(c().inputOutput,"glossiness",new(n().SFFloat)(1)),new(r())(c().inputOutput,"specularGlossinessTextureMapping",new(n().SFString)),new(r())(c().inputOutput,"specularGlossinessTexture",new(n().SFNode)),new(r())(c().inputOutput,"emissiveColor",new(n().SFColor)),new(r())(c().inputOutput,"emissiveTextureMapping",new(n().SFString)),new(r())(c().inputOutput,"emissiveTexture",new(n().SFNode)),new(r())(c().inputOutput,"occlusionStrength",new(n().SFFloat)(1)),new(r())(c().inputOutput,"occlusionTextureMapping",new(n().SFString)),new(r())(c().inputOutput,"occlusionTexture",new(n().SFNode)),new(r())(c().inputOutput,"normalScale",new(n().SFFloat)(1)),new(r())(c().inputOutput,"normalTextureMapping",new(n().SFString)),new(r())(c().inputOutput,"normalTexture",new(n().SFNode)),new(r())(c().inputOutput,"transparency",new(n().SFFloat)),new(r())(c().inputOutput,"extensions",new(n().MFNode))]),enumerable:!0}});for(const e of Object.values(z.prototype.getTextureIndices()))z.prototype[`setTexture${e}`]=function(e,t){this.setTexture(e,t)};const k=z;d().add("SpecularGlossinessMaterial","x_ite/Components/X_ITE/SpecularGlossinessMaterial",k);const q=k,H=window[Symbol.for("X_ITE.X3D-10.0.0")].require("x_ite/Components/Core/X3DNode");var G=e.n(H);const K=window[Symbol.for("X_ITE.X3D-10.0.0")].require("standard/Utility/BitSet");var Y=e.n(K);function Q(e){G().call(this,e),this.addType(c().X3DMaterialExtensionNode),this.textureBits=new(Y())}Object.assign(Object.setPrototypeOf(Q.prototype,G().prototype),{setTexture(e,t){e*=4,this.textureBits.remove(e,15),this.textureBits.add(e,t?.getTextureBits()??0)},getTextureBits(){return this.textureBits}}),Object.defineProperties(Q,{typeName:{value:"X3DMaterialExtensionNode",enumerable:!0},componentInfo:{value:Object.freeze({name:"X_ITE",level:1}),enumerable:!0}});const W=Q;d().add("X3DMaterialExtensionNode","x_ite/Components/X_ITE/X3DMaterialExtensionNode",W);const $=W;let Z=0;const J={ANISOTROPY_MATERIAL_EXTENSION:Z++,CLEARCOAT_MATERIAL_EXTENSION:Z++,DISPERSION_MATERIAL_EXTENSION:Z++,EMISSIVE_STRENGTH_MATERIAL_EXTENSION:Z++,IOR_MATERIAL_EXTENSION:Z++,IRIDESCENCE_MATERIAL_EXTENSION:Z++,SHEEN_MATERIAL_EXTENSION:Z++,SPECULAR_MATERIAL_EXTENSION:Z++,TRANSMISSION_MATERIAL_EXTENSION:Z++,UNLIT_MATERIAL_EXTENSION:Z++,VOLUME_MATERIAL_EXTENSION:Z++};d().add("ExtensionKeys","x_ite/Browser/X_ITE/ExtensionKeys",J);const ee=J;function te(e){$.call(this,e),this.addType(c().AnisotropyMaterialExtension),this.anisotropyArray=new Float32Array(3)}Object.assign(Object.setPrototypeOf(te.prototype,$.prototype),{initialize(){$.prototype.initialize.call(this),this._anisotropyStrength.addInterest("set_anisotropyStrength__",this),this._anisotropyRotation.addInterest("set_anisotropyRotation__",this),this._anisotropyTexture.addInterest("set_anisotropyTexture__",this),this.set_anisotropyStrength__(),this.set_anisotropyRotation__(),this.set_anisotropyTexture__()},set_anisotropyStrength__(){this.anisotropyArray[2]=Math.max(this._anisotropyStrength.getValue(),0)},set_anisotropyRotation__(){const e=this._anisotropyRotation.getValue();this.anisotropyArray[0]=Math.cos(e),this.anisotropyArray[1]=Math.sin(e)},set_anisotropyTexture__(){this.anisotropyTextureNode=V()(c().X3DSingleTextureNode,this._anisotropyTexture),this.setTexture(0,this.anisotropyTextureNode)},getExtensionKey:()=>ee.ANISOTROPY_MATERIAL_EXTENSION,getShaderOptions(e){e.push("X3D_ANISOTROPY_MATERIAL_EXT"),+this.getTextureBits()&&(e.push("X3D_MATERIAL_TEXTURES"),this.anisotropyTextureNode?.getShaderOptions(e,"ANISOTROPY",!0))},setShaderUniforms(e,t,s,i,n){e.uniform3fv(t.x3d_AnisotropyEXT,this.anisotropyArray),this.anisotropyTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_AnisotropyTextureEXT,this._anisotropyTextureMapping.getValue(),i,n)}}),Object.defineProperties(te,{typeName:{value:"AnisotropyMaterialExtension",enumerable:!0},componentInfo:{value:Object.freeze({name:"X_ITE",level:1}),enumerable:!0},containerField:{value:"extensions",enumerable:!0},specificationRange:{value:Object.freeze({from:"4.0",to:"Infinity"}),enumerable:!0},fieldDefinitions:{value:new(u())([new(r())(c().inputOutput,"metadata",new(n().SFNode)),new(r())(c().inputOutput,"anisotropyStrength",new(n().SFFloat)),new(r())(c().inputOutput,"anisotropyRotation",new(n().SFFloat)),new(r())(c().inputOutput,"anisotropyTextureMapping",new(n().SFString)),new(r())(c().inputOutput,"anisotropyTexture",new(n().SFNode))]),enumerable:!0}});const se=te;d().add("AnisotropyMaterialExtension","x_ite/Components/X_ITE/AnisotropyMaterialExtension",se);const ie=se;function ne(e){$.call(this,e),this.addType(c().ClearcoatMaterialExtension)}Object.assign(Object.setPrototypeOf(ne.prototype,$.prototype),{initialize(){$.prototype.initialize.call(this),this._clearcoat.addInterest("set_clearcoat__",this),this._clearcoatTexture.addInterest("set_clearcoatTexture__",this),this._clearcoatRoughness.addInterest("set_clearcoatRoughness__",this),this._clearcoatRoughnessTexture.addInterest("set_clearcoatRoughnessTexture__",this),this._clearcoatNormalTexture.addInterest("set_clearcoatNormalTexture__",this),this.set_clearcoat__(),this.set_clearcoatTexture__(),this.set_clearcoatRoughness__(),this.set_clearcoatRoughnessTexture__(),this.set_clearcoatNormalTexture__()},set_clearcoat__(){this.clearcoat=Math.max(this._clearcoat.getValue(),0)},set_clearcoatTexture__(){this.clearcoatTextureNode=V()(c().X3DSingleTextureNode,this._clearcoatTexture),this.setTexture(0,this.clearcoatTextureNode)},set_clearcoatRoughness__(){this.clearcoatRoughness=B().clamp(this._clearcoatRoughness.getValue(),0,1)},set_clearcoatRoughnessTexture__(){this.clearcoatRoughnessTextureNode=V()(c().X3DSingleTextureNode,this._clearcoatRoughnessTexture),this.setTexture(1,this.clearcoatRoughnessTextureNode)},set_clearcoatNormalTexture__(){this.clearcoatNormalTextureNode=V()(c().X3DSingleTextureNode,this._clearcoatNormalTexture),this.setTexture(2,this.clearcoatNormalTextureNode)},getExtensionKey:()=>ee.CLEARCOAT_MATERIAL_EXTENSION,getShaderOptions(e){e.push("X3D_CLEARCOAT_MATERIAL_EXT"),+this.getTextureBits()&&(e.push("X3D_MATERIAL_TEXTURES"),this.clearcoatTextureNode?.getShaderOptions(e,"CLEARCOAT",!0),this.clearcoatRoughnessTextureNode?.getShaderOptions(e,"CLEARCOAT_ROUGHNESS",!0),this.clearcoatNormalTextureNode?.getShaderOptions(e,"CLEARCOAT_NORMAL",!0))},setShaderUniforms(e,t,s,i,n){e.uniform1f(t.x3d_ClearcoatEXT,this.clearcoat),e.uniform1f(t.x3d_ClearcoatRoughnessEXT,this.clearcoatRoughness),+this.getTextureBits()&&(this.clearcoatTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_ClearcoatTextureEXT,this._clearcoatTextureMapping.getValue(),i,n),this.clearcoatRoughnessTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_ClearcoatRoughnessTextureEXT,this._clearcoatRoughnessTextureMapping.getValue(),i,n),this.clearcoatNormalTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_ClearcoatNormalTextureEXT,this._clearcoatNormalTextureMapping.getValue(),i,n))}}),Object.defineProperties(ne,{typeName:{value:"ClearcoatMaterialExtension",enumerable:!0},componentInfo:{value:Object.freeze({name:"X_ITE",level:1}),enumerable:!0},containerField:{value:"extensions",enumerable:!0},specificationRange:{value:Object.freeze({from:"4.0",to:"Infinity"}),enumerable:!0},fieldDefinitions:{value:new(u())([new(r())(c().inputOutput,"metadata",new(n().SFNode)),new(r())(c().inputOutput,"clearcoat",new(n().SFFloat)),new(r())(c().inputOutput,"clearcoatTextureMapping",new(n().SFString)),new(r())(c().inputOutput,"clearcoatTexture",new(n().SFNode)),new(r())(c().inputOutput,"clearcoatRoughness",new(n().SFFloat)),new(r())(c().inputOutput,"clearcoatRoughnessTextureMapping",new(n().SFString)),new(r())(c().inputOutput,"clearcoatRoughnessTexture",new(n().SFNode)),new(r())(c().inputOutput,"clearcoatNormalTextureMapping",new(n().SFString)),new(r())(c().inputOutput,"clearcoatNormalTexture",new(n().SFNode))]),enumerable:!0}});const oe=ne;d().add("ClearcoatMaterialExtension","x_ite/Components/X_ITE/ClearcoatMaterialExtension",oe);const re=oe;function ae(e){$.call(this,e),this.addType(c().DispersionMaterialExtension)}Object.assign(Object.setPrototypeOf(ae.prototype,$.prototype),{initialize(){$.prototype.initialize.call(this),this._dispersion.addInterest("set_dispersion__",this),this.set_dispersion__()},set_dispersion__(){this.dispersion=Math.max(this._dispersion.getValue(),0)},getExtensionKey:()=>ee.DISPERSION_MATERIAL_EXTENSION,getShaderOptions(e){e.push("X3D_DISPERSION_MATERIAL_EXT")},setShaderUniforms(e,t,s,i,n){e.uniform1f(t.x3d_DispersionEXT,this.dispersion)}}),Object.defineProperties(ae,{typeName:{value:"DispersionMaterialExtension",enumerable:!0},componentInfo:{value:Object.freeze({name:"X_ITE",level:1}),enumerable:!0},containerField:{value:"extensions",enumerable:!0},specificationRange:{value:Object.freeze({from:"4.0",to:"Infinity"}),enumerable:!0},fieldDefinitions:{value:new(u())([new(r())(c().inputOutput,"metadata",new(n().SFNode)),new(r())(c().inputOutput,"dispersion",new(n().SFFloat))]),enumerable:!0}});const ue=ae;d().add("DispersionMaterialExtension","x_ite/Components/X_ITE/DispersionMaterialExtension",ue);const _e=ue;function le(e){$.call(this,e),this.addType(c().EmissiveStrengthMaterialExtension)}Object.assign(Object.setPrototypeOf(le.prototype,$.prototype),{initialize(){$.prototype.initialize.call(this),this._emissiveStrength.addInterest("set_emissiveStrength__",this),this.set_emissiveStrength__()},set_emissiveStrength__(){this.emissiveStrength=Math.max(this._emissiveStrength.getValue(),0)},getExtensionKey:()=>ee.EMISSIVE_STRENGTH_MATERIAL_EXTENSION,getShaderOptions(e){e.push("X3D_EMISSIVE_STRENGTH_MATERIAL_EXT")},setShaderUniforms(e,t,s,i,n){e.uniform1f(t.x3d_EmissiveStrengthEXT,this.emissiveStrength)}}),Object.defineProperties(le,{typeName:{value:"EmissiveStrengthMaterialExtension",enumerable:!0},componentInfo:{value:Object.freeze({name:"X_ITE",level:1}),enumerable:!0},containerField:{value:"extensions",enumerable:!0},specificationRange:{value:Object.freeze({from:"4.0",to:"Infinity"}),enumerable:!0},fieldDefinitions:{value:new(u())([new(r())(c().inputOutput,"metadata",new(n().SFNode)),new(r())(c().inputOutput,"emissiveStrength",new(n().SFFloat)(1))]),enumerable:!0}});const he=le;d().add("EmissiveStrengthMaterialExtension","x_ite/Components/X_ITE/EmissiveStrengthMaterialExtension",he);const ce=he;function pe(e){$.call(this,e),this.addType(c().IORMaterialExtension)}Object.assign(Object.setPrototypeOf(pe.prototype,$.prototype),{initialize(){$.prototype.initialize.call(this),this._indexOfRefraction.addInterest("set_indexOfRefraction__",this),this.set_indexOfRefraction__()},set_indexOfRefraction__(){this.indexOfRefraction=Math.max(this._indexOfRefraction.getValue(),0)},getExtensionKey:()=>ee.IOR_MATERIAL_EXTENSION,getShaderOptions(e){e.push("X3D_IOR_MATERIAL_EXT")},setShaderUniforms(e,t,s,i,n){e.uniform1f(t.x3d_IorEXT,this.indexOfRefraction)}}),Object.defineProperties(pe,{typeName:{value:"IORMaterialExtension",enumerable:!0},componentInfo:{value:Object.freeze({name:"X_ITE",level:1}),enumerable:!0},containerField:{value:"extensions",enumerable:!0},specificationRange:{value:Object.freeze({from:"4.0",to:"Infinity"}),enumerable:!0},fieldDefinitions:{value:new(u())([new(r())(c().inputOutput,"metadata",new(n().SFNode)),new(r())(c().inputOutput,"indexOfRefraction",new(n().SFFloat)(1.5))]),enumerable:!0}});const de=pe;d().add("IORMaterialExtension","x_ite/Components/X_ITE/IORMaterialExtension",de);const Te=de;function xe(e){$.call(this,e),this.addType(c().IridescenceMaterialExtension)}Object.assign(Object.setPrototypeOf(xe.prototype,$.prototype),{initialize(){$.prototype.initialize.call(this),this._iridescence.addInterest("set_iridescence__",this),this._iridescenceTexture.addInterest("set_iridescenceTexture__",this),this._iridescenceIndexOfRefraction.addInterest("set_iridescenceIndexOfRefraction__",this),this._iridescenceThicknessMinimum.addInterest("set_iridescenceThicknessMinimum__",this),this._iridescenceThicknessMaximum.addInterest("set_iridescenceThicknessMaximum__",this),this._iridescenceThicknessTexture.addInterest("set_iridescenceThicknessTexture__",this),this.set_iridescence__(),this.set_iridescenceTexture__(),this.set_iridescenceIndexOfRefraction__(),this.set_iridescenceThicknessMinimum__(),this.set_iridescenceThicknessMaximum__(),this.set_iridescenceThicknessTexture__()},set_iridescence__(){this.iridescence=Math.max(this._iridescence.getValue(),0)},set_iridescenceTexture__(){this.iridescenceTextureNode=V()(c().X3DSingleTextureNode,this._iridescenceTexture),this.setTexture(0,this.iridescenceTextureNode)},set_iridescenceIndexOfRefraction__(){this.iridescenceIndexOfRefraction=Math.max(this._iridescenceIndexOfRefraction.getValue(),0)},set_iridescenceThicknessMinimum__(){this.iridescenceThicknessMinimum=Math.max(this._iridescenceThicknessMinimum.getValue(),0)},set_iridescenceThicknessMaximum__(){this.iridescenceThicknessMaximum=Math.max(this._iridescenceThicknessMaximum.getValue(),0)},set_iridescenceThicknessTexture__(){this.iridescenceThicknessTextureNode=V()(c().X3DSingleTextureNode,this._iridescenceThicknessTexture),this.setTexture(1,this.iridescenceThicknessTextureNode)},getExtensionKey:()=>ee.IRIDESCENCE_MATERIAL_EXTENSION,getShaderOptions(e){e.push("X3D_IRIDESCENCE_MATERIAL_EXT"),+this.getTextureBits()&&(e.push("X3D_MATERIAL_TEXTURES"),this.iridescenceTextureNode?.getShaderOptions(e,"IRIDESCENCE",!0),this.iridescenceThicknessTextureNode?.getShaderOptions(e,"IRIDESCENCE_THICKNESS",!0))},setShaderUniforms(e,t,s,i,n){e.uniform1f(t.x3d_IridescenceEXT,this.iridescence),e.uniform1f(t.x3d_IridescenceIndexOfRefractionEXT,this.iridescenceIndexOfRefraction),e.uniform1f(t.x3d_IridescenceThicknessMinimumEXT,this.iridescenceThicknessMinimum),e.uniform1f(t.x3d_IridescenceThicknessMaximumEXT,this.iridescenceThicknessMaximum),+this.getTextureBits()&&(this.iridescenceTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_IridescenceTextureEXT,this._iridescenceTextureMapping.getValue(),i,n),this.iridescenceThicknessTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_IridescenceThicknessTextureEXT,this._iridescenceThicknessTextureMapping.getValue(),i,n))}}),Object.defineProperties(xe,{typeName:{value:"IridescenceMaterialExtension",enumerable:!0},componentInfo:{value:Object.freeze({name:"X_ITE",level:1}),enumerable:!0},containerField:{value:"extensions",enumerable:!0},specificationRange:{value:Object.freeze({from:"4.0",to:"Infinity"}),enumerable:!0},fieldDefinitions:{value:new(u())([new(r())(c().inputOutput,"metadata",new(n().SFNode)),new(r())(c().inputOutput,"iridescence",new(n().SFFloat)),new(r())(c().inputOutput,"iridescenceTextureMapping",new(n().SFString)),new(r())(c().inputOutput,"iridescenceTexture",new(n().SFNode)),new(r())(c().inputOutput,"iridescenceIndexOfRefraction",new(n().SFFloat)(1.3)),new(r())(c().inputOutput,"iridescenceThicknessMinimum",new(n().SFFloat)(100)),new(r())(c().inputOutput,"iridescenceThicknessMaximum",new(n().SFFloat)(400)),new(r())(c().inputOutput,"iridescenceThicknessTextureMapping",new(n().SFString)),new(r())(c().inputOutput,"iridescenceThicknessTexture",new(n().SFNode))]),enumerable:!0}});const Se=xe;d().add("IridescenceMaterialExtension","x_ite/Components/X_ITE/IridescenceMaterialExtension",Se);const Ee=Se;function me(e){$.call(this,e),this.addType(c().SheenMaterialExtension),this.sheenColorArray=new Float32Array(3)}Object.assign(Object.setPrototypeOf(me.prototype,$.prototype),{initialize(){$.prototype.initialize.call(this),this._sheenColor.addInterest("set_sheenColor__",this),this._sheenColorTexture.addInterest("set_sheenColorTexture__",this),this._sheenRoughness.addInterest("set_sheenRoughness__",this),this._sheenRoughnessTexture.addInterest("set_sheenRoughnessTexture__",this),this.set_sheenColor__(),this.set_sheenColorTexture__(),this.set_sheenRoughness__(),this.set_sheenRoughnessTexture__()},set_sheenColor__(){const e=this.sheenColorArray,t=this._sheenColor.getValue();e[0]=t.r,e[1]=t.g,e[2]=t.b},set_sheenColorTexture__(){this.sheenColorTextureNode=V()(c().X3DSingleTextureNode,this._sheenColorTexture),this.setTexture(0,this.sheenColorTextureNode)},set_sheenRoughness__(){this.sheenRoughness=B().clamp(this._sheenRoughness.getValue(),0,1)},set_sheenRoughnessTexture__(){this.sheenRoughnessTextureNode=V()(c().X3DSingleTextureNode,this._sheenRoughnessTexture),this.setTexture(1,this.sheenRoughnessTextureNode)},getExtensionKey:()=>ee.SHEEN_MATERIAL_EXTENSION,getShaderOptions(e){e.push("X3D_SHEEN_MATERIAL_EXT"),+this.getTextureBits()&&(e.push("X3D_MATERIAL_TEXTURES"),this.sheenColorTextureNode?.getShaderOptions(e,"SHEEN_COLOR",!0),this.sheenRoughnessTextureNode?.getShaderOptions(e,"SHEEN_ROUGHNESS",!0))},setShaderUniforms(e,t,s,i,n){e.uniform3fv(t.x3d_SheenColorEXT,this.sheenColorArray),e.uniform1f(t.x3d_SheenRoughnessEXT,this.sheenRoughness);const o=this.getBrowser(),r=o.getLibraryTexture("lut_sheen_E.png"),a=o.getTexture2DUnit();e.activeTexture(e.TEXTURE0+a),e.bindTexture(e.TEXTURE_2D,r.getTexture()),e.uniform1i(t.x3d_SheenELUTTextureEXT,a),+this.getTextureBits()&&(this.sheenColorTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_SheenColorTextureEXT,this._sheenColorTextureMapping.getValue(),i,n),this.sheenRoughnessTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_SheenRoughnessTextureEXT,this._sheenRoughnessTextureMapping.getValue(),i,n))}}),Object.defineProperties(me,{typeName:{value:"SheenMaterialExtension",enumerable:!0},componentInfo:{value:Object.freeze({name:"X_ITE",level:1}),enumerable:!0},containerField:{value:"extensions",enumerable:!0},specificationRange:{value:Object.freeze({from:"4.0",to:"Infinity"}),enumerable:!0},fieldDefinitions:{value:new(u())([new(r())(c().inputOutput,"metadata",new(n().SFNode)),new(r())(c().inputOutput,"sheenColor",new(n().SFColor)),new(r())(c().inputOutput,"sheenColorTextureMapping",new(n().SFString)),new(r())(c().inputOutput,"sheenColorTexture",new(n().SFNode)),new(r())(c().inputOutput,"sheenRoughness",new(n().SFFloat)),new(r())(c().inputOutput,"sheenRoughnessTextureMapping",new(n().SFString)),new(r())(c().inputOutput,"sheenRoughnessTexture",new(n().SFNode))]),enumerable:!0}});const fe=me;d().add("SheenMaterialExtension","x_ite/Components/X_ITE/SheenMaterialExtension",fe);const Oe=fe;function ge(e){$.call(this,e),this.addType(c().SpecularMaterialExtension),this.specularColorArray=new Float32Array(3)}Object.assign(Object.setPrototypeOf(ge.prototype,$.prototype),{initialize(){$.prototype.initialize.call(this),this._specular.addInterest("set_specular__",this),this._specularTexture.addInterest("set_specularTexture__",this),this._specularColor.addInterest("set_specularColor__",this),this._specularColorTexture.addInterest("set_specularColorTexture__",this),this.set_specular__(),this.set_specularTexture__(),this.set_specularColor__(),this.set_specularColorTexture__()},set_specular__(){this.specular=Math.max(this._specular.getValue(),0)},set_specularTexture__(){this.specularTextureNode=V()(c().X3DSingleTextureNode,this._specularTexture),this.setTexture(0,this.specularTextureNode)},set_specularColor__(){const e=this.specularColorArray,t=this._specularColor.getValue();e[0]=t.r,e[1]=t.g,e[2]=t.b},set_specularColorTexture__(){this.specularColorTextureNode=V()(c().X3DSingleTextureNode,this._specularColorTexture),this.setTexture(1,this.specularColorTextureNode)},getExtensionKey:()=>ee.SPECULAR_MATERIAL_EXTENSION,getShaderOptions(e){e.push("X3D_SPECULAR_MATERIAL_EXT"),+this.getTextureBits()&&(e.push("X3D_MATERIAL_TEXTURES"),this.specularTextureNode?.getShaderOptions(e,"SPECULAR",!0),this.specularColorTextureNode?.getShaderOptions(e,"SPECULAR_COLOR",!0))},setShaderUniforms(e,t,s,i,n){e.uniform1f(t.x3d_SpecularEXT,this.specular),e.uniform3fv(t.x3d_SpecularColorEXT,this.specularColorArray),+this.getTextureBits()&&(this.specularTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_SpecularTextureEXT,this._specularTextureMapping.getValue(),i,n),this.specularColorTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_SpecularColorTextureEXT,this._specularColorTextureMapping.getValue(),i,n))}}),Object.defineProperties(ge,{typeName:{value:"SpecularMaterialExtension",enumerable:!0},componentInfo:{value:Object.freeze({name:"X_ITE",level:1}),enumerable:!0},containerField:{value:"extensions",enumerable:!0},specificationRange:{value:Object.freeze({from:"4.0",to:"Infinity"}),enumerable:!0},fieldDefinitions:{value:new(u())([new(r())(c().inputOutput,"metadata",new(n().SFNode)),new(r())(c().inputOutput,"specular",new(n().SFFloat)(1)),new(r())(c().inputOutput,"specularTextureMapping",new(n().SFString)),new(r())(c().inputOutput,"specularTexture",new(n().SFNode)),new(r())(c().inputOutput,"specularColor",new(n().SFColor)(1,1,1)),new(r())(c().inputOutput,"specularColorTextureMapping",new(n().SFString)),new(r())(c().inputOutput,"specularColorTexture",new(n().SFNode))]),enumerable:!0}});const Ne=ge;d().add("SpecularMaterialExtension","x_ite/Components/X_ITE/SpecularMaterialExtension",Ne);const Ie=Ne;function ye(e){$.call(this,e),this.addType(c().TransmissionMaterialExtension)}Object.assign(Object.setPrototypeOf(ye.prototype,$.prototype),{initialize(){$.prototype.initialize.call(this),this._transmission.addInterest("set_transmission__",this),this._transmissionTexture.addInterest("set_transmissionTexture__",this),this.set_transmission__(),this.set_transmissionTexture__()},set_transmission__(){this.transmission=Math.max(this._transmission.getValue(),0)},set_transmissionTexture__(){this.transmissionTextureNode=V()(c().X3DSingleTextureNode,this._transmissionTexture),this.setTexture(0,this.transmissionTextureNode)},getExtensionKey:()=>ee.TRANSMISSION_MATERIAL_EXTENSION,getShaderOptions(e){e.push("X3D_TRANSMISSION_MATERIAL_EXT"),+this.getTextureBits()&&(e.push("X3D_MATERIAL_TEXTURES"),this.transmissionTextureNode?.getShaderOptions(e,"TRANSMISSION",!0))},setShaderUniforms(e,t,s,i,n){const o=this.getBrowser(),r=o.getTransmissionBuffer(),a=o.getTexture2DUnit();e.uniform1f(t.x3d_TransmissionEXT,this.transmission),e.activeTexture(e.TEXTURE0+a),e.bindTexture(e.TEXTURE_2D,r.getColorTexture()),e.uniform1i(t.x3d_TransmissionFramebufferSamplerEXT,a),e.uniform2i(t.x3d_TransmissionFramebufferSizeEXT,r.getWidth(),r.getHeight()),+this.getTextureBits()&&this.transmissionTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_TransmissionTextureEXT,this._transmissionTextureMapping.getValue(),i,n)}}),Object.defineProperties(ye,{typeName:{value:"TransmissionMaterialExtension",enumerable:!0},componentInfo:{value:Object.freeze({name:"X_ITE",level:1}),enumerable:!0},containerField:{value:"extensions",enumerable:!0},specificationRange:{value:Object.freeze({from:"4.0",to:"Infinity"}),enumerable:!0},fieldDefinitions:{value:new(u())([new(r())(c().inputOutput,"metadata",new(n().SFNode)),new(r())(c().inputOutput,"transmission",new(n().SFFloat)),new(r())(c().inputOutput,"transmissionTextureMapping",new(n().SFString)),new(r())(c().inputOutput,"transmissionTexture",new(n().SFNode))]),enumerable:!0}});const Ae=ye;d().add("TransmissionMaterialExtension","x_ite/Components/X_ITE/TransmissionMaterialExtension",Ae);const we=Ae;function Re(e){$.call(this,e),this.addType(c().UnlitMaterialExtension)}Object.assign(Object.setPrototypeOf(Re.prototype,$.prototype),{getExtensionKey:()=>ee.UNLIT_MATERIAL_EXTENSION,getShaderOptions(e){e.push("X3D_UNLIT_MATERIAL_EXT")},setShaderUniforms(){}}),Object.defineProperties(Re,{typeName:{value:"UnlitMaterialExtension",enumerable:!0},componentInfo:{value:Object.freeze({name:"X_ITE",level:1}),enumerable:!0},containerField:{value:"extensions",enumerable:!0},specificationRange:{value:Object.freeze({from:"4.0",to:"Infinity"}),enumerable:!0},fieldDefinitions:{value:new(u())([new(r())(c().inputOutput,"metadata",new(n().SFNode))]),enumerable:!0}});const be=Re;d().add("UnlitMaterialExtension","x_ite/Components/X_ITE/UnlitMaterialExtension",be);const Ce=be;function Me(e){$.call(this,e),this.addType(c().VolumeMaterialExtension),this.attenuationColorArray=new Float32Array(3)}Object.assign(Object.setPrototypeOf(Me.prototype,$.prototype),{initialize(){$.prototype.initialize.call(this),this._thickness.addInterest("set_thickness__",this),this._thicknessTexture.addInterest("set_thicknessTexture__",this),this._attenuationDistance.addInterest("set_attenuationDistance__",this),this._attenuationColor.addInterest("set_attenuationColor__",this),this.set_thickness__(),this.set_thicknessTexture__(),this.set_attenuationDistance__(),this.set_attenuationColor__()},set_thickness__(){this.thickness=Math.max(this._thickness.getValue(),0)},set_thicknessTexture__(){this.thicknessTextureNode=V()(c().X3DSingleTextureNode,this._thicknessTexture),this.setTexture(0,this.thicknessTextureNode)},set_attenuationDistance__(){this.attenuationDistance=Math.max(this._attenuationDistance.getValue(),0)},set_attenuationColor__(){const e=this.attenuationColorArray,t=this._attenuationColor.getValue();e[0]=t.r,e[1]=t.g,e[2]=t.b},getExtensionKey:()=>ee.VOLUME_MATERIAL_EXTENSION,getShaderOptions(e){e.push("X3D_VOLUME_MATERIAL_EXT"),+this.getTextureBits()&&(e.push("X3D_MATERIAL_TEXTURES"),this.thicknessTextureNode?.getShaderOptions(e,"THICKNESS",!0))},setShaderUniforms(e,t,s,i,n){e.uniform1f(t.x3d_ThicknessEXT,this.thickness),e.uniform1f(t.x3d_AttenuationDistanceEXT,this.attenuationDistance),e.uniform3fv(t.x3d_AttenuationColoEXT,this.attenuationColorArray),+this.getTextureBits()&&this.thicknessTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_ThicknessTextureEXT,this._thicknessTextureMapping.getValue(),i,n)}}),Object.defineProperties(Me,{typeName:{value:"VolumeMaterialExtension",enumerable:!0},componentInfo:{value:Object.freeze({name:"X_ITE",level:1}),enumerable:!0},containerField:{value:"extensions",enumerable:!0},specificationRange:{value:Object.freeze({from:"4.0",to:"Infinity"}),enumerable:!0},fieldDefinitions:{value:new(u())([new(r())(c().inputOutput,"metadata",new(n().SFNode)),new(r())(c().inputOutput,"thickness",new(n().SFFloat)),new(r())(c().inputOutput,"thicknessTextureMapping",new(n().SFString)),new(r())(c().inputOutput,"thicknessTexture",new(n().SFNode)),new(r())(c().inputOutput,"attenuationDistance",new(n().SFFloat)(1e6)),new(r())(c().inputOutput,"attenuationColor",new(n().SFColor)(1,1,1))]),enumerable:!0}});const Fe=Me;d().add("VolumeMaterialExtension","x_ite/Components/X_ITE/VolumeMaterialExtension",Fe);const Xe=Fe;s().add({name:"X_ITE",concreteNodes:[S,f,D,q,ie,re,_e,ce,Te,Ee,Oe,Ie,we,Ce,Xe],abstractNodes:[$]});const ve=void 0;d().add("X_ITE","assets/components/X_ITE",ve)})();
1
+ /* X_ITE v10.0.2 */(()=>{"use strict";var e={n:t=>{var s=t&&t.__esModule?()=>t.default:()=>t;return e.d(s,{a:s}),s},d:(t,s)=>{for(var i in s)e.o(s,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:s[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window[Symbol.for("X_ITE.X3D-10.0.2")].require("x_ite/Components");var s=e.n(t);const i=window[Symbol.for("X_ITE.X3D-10.0.2")].require("x_ite/Fields");var n=e.n(i);const r=window[Symbol.for("X_ITE.X3D-10.0.2")].require("x_ite/Base/X3DFieldDefinition");var o=e.n(r);const a=window[Symbol.for("X_ITE.X3D-10.0.2")].require("x_ite/Base/FieldDefinitionArray");var u=e.n(a);const _=window[Symbol.for("X_ITE.X3D-10.0.2")].require("x_ite/Components/Shape/X3DAppearanceChildNode");var l=e.n(_);const h=window[Symbol.for("X_ITE.X3D-10.0.2")].require("x_ite/Base/X3DConstants");var c=e.n(h);const p=window[Symbol.for("X_ITE.X3D-10.0.2")].require("x_ite/Namespace");var d=e.n(p);function T(e){l().call(this,e),this.addType(c().BlendMode),this.factorTypes=new Map,this.equationTypes=new Map}Object.assign(Object.setPrototypeOf(T.prototype,l().prototype),{initialize(){l().prototype.initialize.call(this);const e=this.getBrowser().getContext(),t=e.getExtension("EXT_blend_minmax");this.factorTypes.set("ZERO",e.ZERO),this.factorTypes.set("ONE",e.ONE),this.factorTypes.set("SRC_COLOR",e.SRC_COLOR),this.factorTypes.set("ONE_MINUS_SRC_COLOR",e.ONE_MINUS_SRC_COLOR),this.factorTypes.set("DST_COLOR",e.DST_COLOR),this.factorTypes.set("ONE_MINUS_DST_COLOR",e.ONE_MINUS_DST_COLOR),this.factorTypes.set("SRC_ALPHA",e.SRC_ALPHA),this.factorTypes.set("ONE_MINUS_SRC_ALPHA",e.ONE_MINUS_SRC_ALPHA),this.factorTypes.set("DST_ALPHA",e.DST_ALPHA),this.factorTypes.set("ONE_MINUS_DST_ALPHA",e.ONE_MINUS_DST_ALPHA),this.factorTypes.set("SRC_ALPHA_SATURATE",e.SRC_ALPHA_SATURATE),this.factorTypes.set("CONSTANT_COLOR",e.CONSTANT_COLOR),this.factorTypes.set("ONE_MINUS_CONSTANT_COLOR",e.ONE_MINUS_CONSTANT_COLOR),this.factorTypes.set("CONSTANT_ALPHA",e.CONSTANT_ALPHA),this.factorTypes.set("ONE_MINUS_CONSTANT_ALPHA",e.ONE_MINUS_CONSTANT_ALPHA),this.equationTypes.set("FUNC_ADD",e.FUNC_ADD),this.equationTypes.set("FUNC_SUBTRACT",e.FUNC_SUBTRACT),this.equationTypes.set("FUNC_REVERSE_SUBTRACT",e.FUNC_REVERSE_SUBTRACT),this.equationTypes.set("MIN",e.MIN||t&&t.MIN_EXT),this.equationTypes.set("MAX",e.MAX||t&&t.MAX_EXT),this._sourceColorFactor.addInterest("set_sourceColorFactor__",this),this._sourceAlphaFactor.addInterest("set_sourceAlphaFactor__",this),this._destinationColorFactor.addInterest("set_destinationColorFactor__",this),this._destinationAlphaFactor.addInterest("set_destinationAlphaFactor__",this),this._colorEquation.addInterest("set_colorEquation__",this),this._alphaEquation.addInterest("set_alphaEquation__",this),this.set_sourceColorFactor__(),this.set_sourceAlphaFactor__(),this.set_destinationColorFactor__(),this.set_destinationAlphaFactor__(),this.set_colorEquation__(),this.set_alphaEquation__()},set_sourceColorFactor__(){this.sourceColorFactorType=this.factorTypes.get(this._sourceColorFactor.getValue())??this.factorTypes.get("SRC_ALPHA")},set_sourceAlphaFactor__(){this.sourceAlphaFactorType=this.factorTypes.get(this._sourceAlphaFactor.getValue())??this.factorTypes.get("ONE")},set_destinationColorFactor__(){this.destinationColorFactorType=this.factorTypes.get(this._destinationColorFactor.getValue())??this.factorTypes.get("ONE_MINUS_SRC_ALPHA")},set_destinationAlphaFactor__(){this.destinationAlphaFactorType=this.factorTypes.get(this._destinationAlphaFactor.getValue())??this.factorTypes.get("ONE_MINUS_SRC_ALPHA")},set_colorEquation__(){this.colorEquationType=this.equationTypes.get(this._colorEquation.getValue())??this.equationTypes.get("FUNC_ADD")},set_alphaEquation__(){this.alphaEquationType=this.equationTypes.get(this._alphaEquation.getValue())??this.equationTypes.get("FUNC_ADD")},enable(e){const t=this._blendColor.getValue();e.blendColor(t.r,t.g,t.b,t.a),e.blendFuncSeparate(this.sourceColorFactorType,this.destinationColorFactorType,this.sourceAlphaFactorType,this.destinationAlphaFactorType),e.blendEquationSeparate(this.colorEquationType,this.alphaEquationType)},disable(e){e.blendFuncSeparate(e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA),e.blendEquationSeparate(e.FUNC_ADD,e.FUNC_ADD)}}),Object.defineProperties(T,{typeName:{value:"BlendMode",enumerable:!0},componentInfo:{value:Object.freeze({name:"X_ITE",level:1}),enumerable:!0},containerField:{value:"blendMode",enumerable:!0},specificationRange:{value:Object.freeze({from:"3.3",to:"Infinity"}),enumerable:!0},fieldDefinitions:{value:new(u())([new(o())(c().inputOutput,"metadata",new(n().SFNode)),new(o())(c().inputOutput,"blendColor",new(n().SFColorRGBA)),new(o())(c().inputOutput,"sourceColorFactor",new(n().SFString)("SRC_ALPHA")),new(o())(c().inputOutput,"sourceAlphaFactor",new(n().SFString)("ONE")),new(o())(c().inputOutput,"destinationColorFactor",new(n().SFString)("ONE_MINUS_SRC_ALPHA")),new(o())(c().inputOutput,"destinationAlphaFactor",new(n().SFString)("ONE_MINUS_SRC_ALPHA")),new(o())(c().inputOutput,"colorEquation",new(n().SFString)("FUNC_ADD")),new(o())(c().inputOutput,"alphaEquation",new(n().SFString)("FUNC_ADD"))]),enumerable:!0}});const x=T;d().add("BlendMode","x_ite/Components/X_ITE/BlendMode",x);const S=x;function E(e){l().call(this,e),this.addType(c().DepthMode),this.addAlias("depthFunc",this._depthFunction)}Object.assign(Object.setPrototypeOf(E.prototype,l().prototype),{initialize(){l().prototype.initialize.call(this),this._depthFunction.addInterest("set_depthFunction__",this),this.set_depthFunction__()},set_depthFunction__:function(){const e=new Map([["NEVER","NEVER"],["LESS","LESS"],["EQUAL","EQUAL"],["LESS_EQUAL","LEQUAL"],["GREATER","GREATER"],["NOT_EQUAL","NOTEQUAL"],["GREATER_EQUAL","GEQUAL"],["ALWAYS","ALWAYS"]]);return function(){const t=this.getBrowser().getContext();this.depthFunction=t[e.get(this._depthFunction.getValue())??"LEQUAL"]}}(),enable(e){this.depthTest=e.isEnabled(e.DEPTH_TEST),this.depthWriteMask=e.getParameter(e.DEPTH_WRITEMASK),e.enable(e.POLYGON_OFFSET_FILL),e.polygonOffset(...this._polygonOffset),this._depthTest.getValue()?e.enable(e.DEPTH_TEST):e.disable(e.DEPTH_TEST),e.depthFunc(this.depthFunction),e.depthRange(...this._depthRange.getValue()),e.depthMask(this._depthMask.getValue())},disable(e){e.disable(e.POLYGON_OFFSET_FILL),this.depthTest?e.enable(e.DEPTH_TEST):e.disable(e.DEPTH_TEST),e.depthFunc(e.LEQUAL),e.depthRange(0,1),e.depthMask(this.depthWriteMask)}}),Object.defineProperties(E,{typeName:{value:"DepthMode",enumerable:!0},componentInfo:{value:Object.freeze({name:"X_ITE",level:1}),enumerable:!0},containerField:{value:"depthMode",enumerable:!0},specificationRange:{value:Object.freeze({from:"4.0",to:"Infinity"}),enumerable:!0},fieldDefinitions:{value:new(u())([new(o())(c().inputOutput,"metadata",new(n().SFNode)),new(o())(c().inputOutput,"polygonOffset",new(n().SFVec2f)),new(o())(c().inputOutput,"depthRange",new(n().SFVec2f)(0,1)),new(o())(c().inputOutput,"depthTest",new(n().SFBool)(!0)),new(o())(c().inputOutput,"depthFunction",new(n().SFString)("LESS_EQUAL")),new(o())(c().inputOutput,"depthMask",new(n().SFBool)(!0))]),enumerable:!0}});const m=E;d().add("DepthMode","x_ite/Components/X_ITE/DepthMode",m);const f=m,g=window[Symbol.for("X_ITE.X3D-10.0.2")].require("x_ite/Components/Shape/X3DShapeNode");var O=e.n(g);const N=window[Symbol.for("X_ITE.X3D-10.0.2")].require("x_ite/Rendering/TraverseType");var I=e.n(N);const y=window[Symbol.for("X_ITE.X3D-10.0.2")].require("x_ite/Rendering/VertexArray");var w=e.n(y);const A=window[Symbol.for("X_ITE.X3D-10.0.2")].require("standard/Math/Numbers/Vector3");var R=e.n(A);const C=window[Symbol.for("X_ITE.X3D-10.0.2")].require("standard/Math/Numbers/Matrix4");var b=e.n(C);const M=window[Symbol.for("X_ITE.X3D-10.0.2")].require("standard/Math/Geometry/Box3");var F=e.n(M);function X(e){O().call(this,e),this.addType(c().InstancedShape),this.addChildObjects(c().outputOnly,"matrices",new(n().SFTime)),this.min=new(R()),this.max=new(R()),this.scale=new(R())(1,1,1),this.numInstances=0,this.instancesStride=25*Float32Array.BYTES_PER_ELEMENT,this.matrixOffset=0,this.normalMatrixOffset=16*Float32Array.BYTES_PER_ELEMENT}Object.assign(Object.setPrototypeOf(X.prototype,O().prototype),{initialize(){O().prototype.initialize.call(this);const e=this.getBrowser(),t=e.getContext();e.getContext().getVersion()<2||(this.instances=Object.assign(t.createBuffer(),{vertexArrayObject:new(w())(t),thickLinesVertexArrayObject:new(w())(t),lineTrianglesBuffer:t.createBuffer(),numLines:0}),this._translations.addInterest("set_transform__",this),this._rotations.addInterest("set_transform__",this),this._scales.addInterest("set_transform__",this),this._matrices.addInterest("set_matrices__",this),this.set_transform__())},getShapeKey:()=>3,getNumInstances(){return this.numInstances},getInstances(){return this.instances},set_bbox__:function(){const e=new(R()),t=new(R()),s=new(F());return function(){if(this.numInstances)if(this._bboxSize.getValue().equals(this.getDefaultBBoxSize())){this.getGeometry()?s.assign(this.getGeometry().getBBox()):s.set();const i=s.size.multiply(this.scale.magnitude()/2),n=s.center;e.assign(this.min).add(n).subtract(i),t.assign(this.max).add(n).add(i),this.bbox.setExtents(e,t)}else this.bbox.set(this._bboxSize.getValue(),this._bboxCenter.getValue());else this.bbox.set();this.getBBoxSize().assign(this.bbox.size),this.getBBoxCenter().assign(this.bbox.center)}}(),set_transform__(){this._matrices=this.getBrowser().getCurrentTime()},set_matrices__(){const e=this.getBrowser().getContext(),t=this._translations,s=this._rotations,i=this._scales,n=t.length,r=s.length,o=i.length,a=Math.max(n,r,o),u=this.instancesStride/Float32Array.BYTES_PER_ELEMENT,_=this.instancesStride*a,l=new Float32Array(_),h=new(b());this.numInstances=a;const c=this.min.set(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY),p=this.max.set(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY),d=this.scale.assign(o?p:R().One);for(let e=0,_=0;e<a;++e,_+=u)h.set(n?t[Math.min(e,n-1)].getValue():null,r?s[Math.min(e,r-1)].getValue():null,o?i[Math.min(e,o-1)].getValue():null),o&&d.max(i[Math.min(e,o-1)].getValue()),l.set(h,_),l.set(h.submatrix.transpose().inverse(),_+16),c.min(h.origin),p.max(h.origin);e.bindBuffer(e.ARRAY_BUFFER,this.instances),e.bufferData(e.ARRAY_BUFFER,l,e.DYNAMIC_DRAW),this.set_bbox__()},set_geometry__(){O().prototype.set_geometry__.call(this),this.getGeometry()?delete this.traverse:this.traverse=Function.prototype,this.set_transform__()},intersectsBox(e,t,s){},traverse(e,t){if(this.numInstances){switch(e){case I().POINTER:this._pointerEvents.getValue()&&t.addPointingShape(this);break;case I().PICKING:break;case I().COLLISION:t.addCollisionShape(this);break;case I().SHADOW:this._castShadow.getValue()&&t.addShadowShape(this);break;case I().DISPLAY:t.addDisplayShape(this)&&this.getAppearance().traverse(e,t)}this.getGeometry().traverse(e,t)}},displaySimple(e,t,s){this.getGeometry().displaySimpleInstanced(e,s,this)},display(e,t){this.getGeometry().displayInstanced(e,t,this)}}),Object.defineProperties(X,{typeName:{value:"InstancedShape",enumerable:!0},componentInfo:{value:Object.freeze({name:"X_ITE",level:1}),enumerable:!0},containerField:{value:"children",enumerable:!0},specificationRange:{value:Object.freeze({from:"2.0",to:"Infinity"}),enumerable:!0},fieldDefinitions:{value:new(u())([new(o())(c().inputOutput,"metadata",new(n().SFNode)),new(o())(c().inputOutput,"translations",new(n().MFVec3f)),new(o())(c().inputOutput,"rotations",new(n().MFRotation)),new(o())(c().inputOutput,"scales",new(n().MFVec3f)),new(o())(c().inputOutput,"pointerEvents",new(n().SFBool)(!0)),new(o())(c().inputOutput,"castShadow",new(n().SFBool)(!0)),new(o())(c().inputOutput,"visible",new(n().SFBool)(!0)),new(o())(c().inputOutput,"bboxDisplay",new(n().SFBool)),new(o())(c().initializeOnly,"bboxSize",new(n().SFVec3f)(-1,-1,-1)),new(o())(c().initializeOnly,"bboxCenter",new(n().SFVec3f)),new(o())(c().inputOutput,"appearance",new(n().SFNode)),new(o())(c().inputOutput,"geometry",new(n().SFNode))]),enumerable:!0}});const D=X;d().add("InstancedShape","x_ite/Components/X_ITE/InstancedShape",D);const v=D,L=window[Symbol.for("X_ITE.X3D-10.0.2")].require("x_ite/Components/Shape/X3DOneSidedMaterialNode");var U=e.n(L);const P=window[Symbol.for("X_ITE.X3D-10.0.2")].require("x_ite/Base/X3DCast");var V=e.n(P);const j=window[Symbol.for("X_ITE.X3D-10.0.2")].require("standard/Math/Algorithm");var B=e.n(j);function z(e){console.warn("SpecularGlossinessMaterial is depreciated, please use PhysicalMaterial instead."),U().call(this,e),this.addType(c().SpecularGlossinessMaterial),this.materialKey="4/",this.diffuseColorArray=new Float32Array(3),this.specularColorArray=new Float32Array(3),this.extensionNodes=[]}Object.assign(Object.setPrototypeOf(z.prototype,U().prototype),{initialize(){U().prototype.initialize.call(this),this._diffuseColor.addInterest("set_diffuseColor__",this),this._diffuseTexture.addInterest("set_diffuseTexture__",this),this._diffuseTexture.addInterest("set_transparent__",this),this._specularColor.addInterest("set_specularColor__",this),this._glossiness.addInterest("set_glossiness__",this),this._specularGlossinessTexture.addInterest("set_specularGlossinessTexture__",this),this._occlusionStrength.addInterest("set_occlusionStrength__",this),this._occlusionTexture.addInterest("set_occlusionTexture__",this),this._extensions.addInterest("set_extensions__",this),this.set_diffuseColor__(),this.set_diffuseTexture__(),this.set_specularColor__(),this.set_glossiness__(),this.set_specularGlossinessTexture__(),this.set_occlusionStrength__(),this.set_occlusionTexture__(),this.set_extensions__(),this.set_transparent__()},getMaterialKey(){return this.materialKey},getTextureIndices:(()=>{let e=0;const t={DIFFUSE_TEXTURE:e++,SPECULAR_GLOSSINESS_TEXTURE:e++,EMISSIVE_TEXTURE:e++,OCCLUSION_TEXTURE:e++,NORMAL_TEXTURE:e++};return function(){return t}})(),getBaseTexture(){return this.diffuseTextureNode},set_diffuseColor__(){const e=this.diffuseColorArray,t=this._diffuseColor.getValue();e[0]=t.r,e[1]=t.g,e[2]=t.b},set_diffuseTexture__(){const e=this.getTextureIndices().DIFFUSE_TEXTURE;this.diffuseTextureNode&&(this.diffuseTextureNode._transparent.removeInterest("set_transparent__",this),this.diffuseTextureNode._linear.removeInterest(`setTexture${e}`,this)),this.diffuseTextureNode=V()(c().X3DSingleTextureNode,this._diffuseTexture),this.diffuseTextureNode&&(this.diffuseTextureNode._transparent.addInterest("set_transparent__",this),this.diffuseTextureNode._linear.addInterest(`setTexture${e}`,this,e,this.diffuseTextureNode)),this.setTexture(e,this.diffuseTextureNode)},set_specularColor__(){const e=this.specularColorArray,t=this._specularColor.getValue();e[0]=t.r,e[1]=t.g,e[2]=t.b},set_glossiness__(){this.glossiness=B().clamp(this._glossiness.getValue(),0,1)},set_specularGlossinessTexture__(){this.specularGlossinessTextureNode=V()(c().X3DSingleTextureNode,this._specularGlossinessTexture),this.setTexture(this.getTextureIndices().SPECULAR_GLOSSINESS_TEXTURE,this.specularGlossinessTextureNode)},set_occlusionStrength__(){this.occlusionStrength=B().clamp(this._occlusionStrength.getValue(),0,1)},set_occlusionTexture__(){this.occlusionTextureNode=V()(c().X3DSingleTextureNode,this._occlusionTexture),this.setTexture(this.getTextureIndices().OCCLUSION_TEXTURE,this.occlusionTextureNode)},set_transparent__(){this.setTransparent(this.getTransparency()||this.diffuseTextureNode?.isTransparent())},set_extensions__(){const e=this.extensionNodes;for(const t of e)t.removeInterest("set_extensionsKey__",this);e.length=0;for(const t of this._extensions){const s=V()(c().X3DMaterialExtensionNode,t);s&&e.push(s)}e.sort(((e,t)=>e.getExtensionKey()-t.getExtensionKey()));for(const t of e)t.addInterest("set_extensionsKey__",this);this.setTransmission(e.some((e=>e.getType().includes(c().TransmissionMaterialExtension)))),this.set_extensionsKey__()},set_extensionsKey__(){const e=this.extensionNodes.map((e=>`${e.getExtensionKey().toString(16)}${e.getTextureBits().toString(16)}`)).join("");this.materialKey=`[4.${e}]`},createShader(e,t,s){const i=this.getBrowser(),n=this.getShaderOptions(t,s);for(const e of this.extensionNodes)e.getShaderOptions(n);n.push("X3D_PHYSICAL_MATERIAL","X3D_MATERIAL_SPECULAR_GLOSSINESS"),+this.getTextureBits()&&(this.diffuseTextureNode?.getShaderOptions(n,"DIFFUSE"),this.specularGlossinessTextureNode?.getShaderOptions(n,"SPECULAR_GLOSSINESS"),this.occlusionTextureNode?.getShaderOptions(n,"OCCLUSION"));const r=i.createShader("SpecularGlossiness","Default","Physical",n);return i.getShaders().set(e,r),r},setShaderUniforms(e,t,s,i,n){U().prototype.setShaderUniforms.call(this,e,t,s,i,n);for(const r of this.extensionNodes)r.setShaderUniforms(e,t,s,i,n);e.uniform3fv(t.x3d_DiffuseColor,this.diffuseColorArray),e.uniform3fv(t.x3d_SpecularColor,this.specularColorArray),e.uniform1f(t.x3d_Glossiness,this.glossiness),+this.getTextureBits()&&(this.diffuseTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_DiffuseTexture,this._diffuseTextureMapping.getValue(),i,n),this.specularGlossinessTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_SpecularGlossinessTexture,this._specularGlossinessTextureMapping.getValue(),i,n),this.occlusionTextureNode&&e.uniform1f(t.x3d_OcclusionStrength,this.occlusionStrength),this.occlusionTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_OcclusionTexture,this._occlusionTextureMapping.getValue(),i,n))}}),Object.defineProperties(z,{typeName:{value:"SpecularGlossinessMaterial",enumerable:!0},componentInfo:{value:Object.freeze({name:"X_ITE",level:1}),enumerable:!0},containerField:{value:"material",enumerable:!0},specificationRange:{value:Object.freeze({from:"4.0",to:"Infinity"}),enumerable:!0},fieldDefinitions:{value:new(u())([new(o())(c().inputOutput,"metadata",new(n().SFNode)),new(o())(c().inputOutput,"diffuseColor",new(n().SFColor)(1,1,1)),new(o())(c().inputOutput,"diffuseTextureMapping",new(n().SFString)),new(o())(c().inputOutput,"diffuseTexture",new(n().SFNode)),new(o())(c().inputOutput,"specularColor",new(n().SFColor)(1,1,1)),new(o())(c().inputOutput,"glossiness",new(n().SFFloat)(1)),new(o())(c().inputOutput,"specularGlossinessTextureMapping",new(n().SFString)),new(o())(c().inputOutput,"specularGlossinessTexture",new(n().SFNode)),new(o())(c().inputOutput,"emissiveColor",new(n().SFColor)),new(o())(c().inputOutput,"emissiveTextureMapping",new(n().SFString)),new(o())(c().inputOutput,"emissiveTexture",new(n().SFNode)),new(o())(c().inputOutput,"occlusionStrength",new(n().SFFloat)(1)),new(o())(c().inputOutput,"occlusionTextureMapping",new(n().SFString)),new(o())(c().inputOutput,"occlusionTexture",new(n().SFNode)),new(o())(c().inputOutput,"normalScale",new(n().SFFloat)(1)),new(o())(c().inputOutput,"normalTextureMapping",new(n().SFString)),new(o())(c().inputOutput,"normalTexture",new(n().SFNode)),new(o())(c().inputOutput,"transparency",new(n().SFFloat)),new(o())(c().inputOutput,"extensions",new(n().MFNode))]),enumerable:!0}});for(const e of Object.values(z.prototype.getTextureIndices()))z.prototype[`setTexture${e}`]=function(e,t){this.setTexture(e,t)};const k=z;d().add("SpecularGlossinessMaterial","x_ite/Components/X_ITE/SpecularGlossinessMaterial",k);const q=k,G=window[Symbol.for("X_ITE.X3D-10.0.2")].require("x_ite/Components/Core/X3DNode");var H=e.n(G);const K=window[Symbol.for("X_ITE.X3D-10.0.2")].require("standard/Utility/BitSet");var Y=e.n(K);function Q(e){H().call(this,e),this.addType(c().X3DMaterialExtensionNode),this.textureBits=new(Y())}Object.assign(Object.setPrototypeOf(Q.prototype,H().prototype),{setTexture(e,t){e*=4,this.textureBits.remove(e,15),this.textureBits.add(e,t?.getTextureBits()??0)},getTextureBits(){return this.textureBits}}),Object.defineProperties(Q,{typeName:{value:"X3DMaterialExtensionNode",enumerable:!0},componentInfo:{value:Object.freeze({name:"X_ITE",level:1}),enumerable:!0}});const W=Q;d().add("X3DMaterialExtensionNode","x_ite/Components/X_ITE/X3DMaterialExtensionNode",W);const $=W;let Z=0;const J={ANISOTROPY_MATERIAL_EXTENSION:Z++,CLEARCOAT_MATERIAL_EXTENSION:Z++,DISPERSION_MATERIAL_EXTENSION:Z++,EMISSIVE_STRENGTH_MATERIAL_EXTENSION:Z++,IOR_MATERIAL_EXTENSION:Z++,IRIDESCENCE_MATERIAL_EXTENSION:Z++,SHEEN_MATERIAL_EXTENSION:Z++,SPECULAR_MATERIAL_EXTENSION:Z++,TRANSMISSION_MATERIAL_EXTENSION:Z++,UNLIT_MATERIAL_EXTENSION:Z++,VOLUME_MATERIAL_EXTENSION:Z++};d().add("ExtensionKeys","x_ite/Browser/X_ITE/ExtensionKeys",J);const ee=J;function te(e){$.call(this,e),this.addType(c().AnisotropyMaterialExtension),this.anisotropyArray=new Float32Array(3)}Object.assign(Object.setPrototypeOf(te.prototype,$.prototype),{initialize(){$.prototype.initialize.call(this),this._anisotropyStrength.addInterest("set_anisotropyStrength__",this),this._anisotropyRotation.addInterest("set_anisotropyRotation__",this),this._anisotropyTexture.addInterest("set_anisotropyTexture__",this),this.set_anisotropyStrength__(),this.set_anisotropyRotation__(),this.set_anisotropyTexture__()},set_anisotropyStrength__(){this.anisotropyArray[2]=Math.max(this._anisotropyStrength.getValue(),0)},set_anisotropyRotation__(){const e=this._anisotropyRotation.getValue();this.anisotropyArray[0]=Math.cos(e),this.anisotropyArray[1]=Math.sin(e)},set_anisotropyTexture__(){this.anisotropyTextureNode=V()(c().X3DSingleTextureNode,this._anisotropyTexture),this.setTexture(0,this.anisotropyTextureNode)},getExtensionKey:()=>ee.ANISOTROPY_MATERIAL_EXTENSION,getShaderOptions(e){e.push("X3D_ANISOTROPY_MATERIAL_EXT"),+this.getTextureBits()&&(e.push("X3D_MATERIAL_TEXTURES"),this.anisotropyTextureNode?.getShaderOptions(e,"ANISOTROPY",!0))},setShaderUniforms(e,t,s,i,n){e.uniform3fv(t.x3d_AnisotropyEXT,this.anisotropyArray),this.anisotropyTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_AnisotropyTextureEXT,this._anisotropyTextureMapping.getValue(),i,n)}}),Object.defineProperties(te,{typeName:{value:"AnisotropyMaterialExtension",enumerable:!0},componentInfo:{value:Object.freeze({name:"X_ITE",level:1}),enumerable:!0},containerField:{value:"extensions",enumerable:!0},specificationRange:{value:Object.freeze({from:"4.0",to:"Infinity"}),enumerable:!0},fieldDefinitions:{value:new(u())([new(o())(c().inputOutput,"metadata",new(n().SFNode)),new(o())(c().inputOutput,"anisotropyStrength",new(n().SFFloat)),new(o())(c().inputOutput,"anisotropyRotation",new(n().SFFloat)),new(o())(c().inputOutput,"anisotropyTextureMapping",new(n().SFString)),new(o())(c().inputOutput,"anisotropyTexture",new(n().SFNode))]),enumerable:!0}});const se=te;d().add("AnisotropyMaterialExtension","x_ite/Components/X_ITE/AnisotropyMaterialExtension",se);const ie=se;function ne(e){$.call(this,e),this.addType(c().ClearcoatMaterialExtension)}Object.assign(Object.setPrototypeOf(ne.prototype,$.prototype),{initialize(){$.prototype.initialize.call(this),this._clearcoat.addInterest("set_clearcoat__",this),this._clearcoatTexture.addInterest("set_clearcoatTexture__",this),this._clearcoatRoughness.addInterest("set_clearcoatRoughness__",this),this._clearcoatRoughnessTexture.addInterest("set_clearcoatRoughnessTexture__",this),this._clearcoatNormalTexture.addInterest("set_clearcoatNormalTexture__",this),this.set_clearcoat__(),this.set_clearcoatTexture__(),this.set_clearcoatRoughness__(),this.set_clearcoatRoughnessTexture__(),this.set_clearcoatNormalTexture__()},set_clearcoat__(){this.clearcoat=Math.max(this._clearcoat.getValue(),0)},set_clearcoatTexture__(){this.clearcoatTextureNode=V()(c().X3DSingleTextureNode,this._clearcoatTexture),this.setTexture(0,this.clearcoatTextureNode)},set_clearcoatRoughness__(){this.clearcoatRoughness=B().clamp(this._clearcoatRoughness.getValue(),0,1)},set_clearcoatRoughnessTexture__(){this.clearcoatRoughnessTextureNode=V()(c().X3DSingleTextureNode,this._clearcoatRoughnessTexture),this.setTexture(1,this.clearcoatRoughnessTextureNode)},set_clearcoatNormalTexture__(){this.clearcoatNormalTextureNode=V()(c().X3DSingleTextureNode,this._clearcoatNormalTexture),this.setTexture(2,this.clearcoatNormalTextureNode)},getExtensionKey:()=>ee.CLEARCOAT_MATERIAL_EXTENSION,getShaderOptions(e){e.push("X3D_CLEARCOAT_MATERIAL_EXT"),+this.getTextureBits()&&(e.push("X3D_MATERIAL_TEXTURES"),this.clearcoatTextureNode?.getShaderOptions(e,"CLEARCOAT",!0),this.clearcoatRoughnessTextureNode?.getShaderOptions(e,"CLEARCOAT_ROUGHNESS",!0),this.clearcoatNormalTextureNode?.getShaderOptions(e,"CLEARCOAT_NORMAL",!0))},setShaderUniforms(e,t,s,i,n){e.uniform1f(t.x3d_ClearcoatEXT,this.clearcoat),e.uniform1f(t.x3d_ClearcoatRoughnessEXT,this.clearcoatRoughness),+this.getTextureBits()&&(this.clearcoatTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_ClearcoatTextureEXT,this._clearcoatTextureMapping.getValue(),i,n),this.clearcoatRoughnessTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_ClearcoatRoughnessTextureEXT,this._clearcoatRoughnessTextureMapping.getValue(),i,n),this.clearcoatNormalTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_ClearcoatNormalTextureEXT,this._clearcoatNormalTextureMapping.getValue(),i,n))}}),Object.defineProperties(ne,{typeName:{value:"ClearcoatMaterialExtension",enumerable:!0},componentInfo:{value:Object.freeze({name:"X_ITE",level:1}),enumerable:!0},containerField:{value:"extensions",enumerable:!0},specificationRange:{value:Object.freeze({from:"4.0",to:"Infinity"}),enumerable:!0},fieldDefinitions:{value:new(u())([new(o())(c().inputOutput,"metadata",new(n().SFNode)),new(o())(c().inputOutput,"clearcoat",new(n().SFFloat)),new(o())(c().inputOutput,"clearcoatTextureMapping",new(n().SFString)),new(o())(c().inputOutput,"clearcoatTexture",new(n().SFNode)),new(o())(c().inputOutput,"clearcoatRoughness",new(n().SFFloat)),new(o())(c().inputOutput,"clearcoatRoughnessTextureMapping",new(n().SFString)),new(o())(c().inputOutput,"clearcoatRoughnessTexture",new(n().SFNode)),new(o())(c().inputOutput,"clearcoatNormalTextureMapping",new(n().SFString)),new(o())(c().inputOutput,"clearcoatNormalTexture",new(n().SFNode))]),enumerable:!0}});const re=ne;d().add("ClearcoatMaterialExtension","x_ite/Components/X_ITE/ClearcoatMaterialExtension",re);const oe=re;function ae(e){$.call(this,e),this.addType(c().DispersionMaterialExtension)}Object.assign(Object.setPrototypeOf(ae.prototype,$.prototype),{initialize(){$.prototype.initialize.call(this),this._dispersion.addInterest("set_dispersion__",this),this.set_dispersion__()},set_dispersion__(){this.dispersion=Math.max(this._dispersion.getValue(),0)},getExtensionKey:()=>ee.DISPERSION_MATERIAL_EXTENSION,getShaderOptions(e){e.push("X3D_DISPERSION_MATERIAL_EXT")},setShaderUniforms(e,t,s,i,n){e.uniform1f(t.x3d_DispersionEXT,this.dispersion)}}),Object.defineProperties(ae,{typeName:{value:"DispersionMaterialExtension",enumerable:!0},componentInfo:{value:Object.freeze({name:"X_ITE",level:1}),enumerable:!0},containerField:{value:"extensions",enumerable:!0},specificationRange:{value:Object.freeze({from:"4.0",to:"Infinity"}),enumerable:!0},fieldDefinitions:{value:new(u())([new(o())(c().inputOutput,"metadata",new(n().SFNode)),new(o())(c().inputOutput,"dispersion",new(n().SFFloat))]),enumerable:!0}});const ue=ae;d().add("DispersionMaterialExtension","x_ite/Components/X_ITE/DispersionMaterialExtension",ue);const _e=ue;function le(e){$.call(this,e),this.addType(c().EmissiveStrengthMaterialExtension)}Object.assign(Object.setPrototypeOf(le.prototype,$.prototype),{initialize(){$.prototype.initialize.call(this),this._emissiveStrength.addInterest("set_emissiveStrength__",this),this.set_emissiveStrength__()},set_emissiveStrength__(){this.emissiveStrength=Math.max(this._emissiveStrength.getValue(),0)},getExtensionKey:()=>ee.EMISSIVE_STRENGTH_MATERIAL_EXTENSION,getShaderOptions(e){e.push("X3D_EMISSIVE_STRENGTH_MATERIAL_EXT")},setShaderUniforms(e,t,s,i,n){e.uniform1f(t.x3d_EmissiveStrengthEXT,this.emissiveStrength)}}),Object.defineProperties(le,{typeName:{value:"EmissiveStrengthMaterialExtension",enumerable:!0},componentInfo:{value:Object.freeze({name:"X_ITE",level:1}),enumerable:!0},containerField:{value:"extensions",enumerable:!0},specificationRange:{value:Object.freeze({from:"4.0",to:"Infinity"}),enumerable:!0},fieldDefinitions:{value:new(u())([new(o())(c().inputOutput,"metadata",new(n().SFNode)),new(o())(c().inputOutput,"emissiveStrength",new(n().SFFloat)(1))]),enumerable:!0}});const he=le;d().add("EmissiveStrengthMaterialExtension","x_ite/Components/X_ITE/EmissiveStrengthMaterialExtension",he);const ce=he;function pe(e){$.call(this,e),this.addType(c().IORMaterialExtension)}Object.assign(Object.setPrototypeOf(pe.prototype,$.prototype),{initialize(){$.prototype.initialize.call(this),this._indexOfRefraction.addInterest("set_indexOfRefraction__",this),this.set_indexOfRefraction__()},set_indexOfRefraction__(){this.indexOfRefraction=Math.max(this._indexOfRefraction.getValue(),1)},getExtensionKey:()=>ee.IOR_MATERIAL_EXTENSION,getShaderOptions(e){e.push("X3D_IOR_MATERIAL_EXT")},setShaderUniforms(e,t,s,i,n){e.uniform1f(t.x3d_IorEXT,this.indexOfRefraction)}}),Object.defineProperties(pe,{typeName:{value:"IORMaterialExtension",enumerable:!0},componentInfo:{value:Object.freeze({name:"X_ITE",level:1}),enumerable:!0},containerField:{value:"extensions",enumerable:!0},specificationRange:{value:Object.freeze({from:"4.0",to:"Infinity"}),enumerable:!0},fieldDefinitions:{value:new(u())([new(o())(c().inputOutput,"metadata",new(n().SFNode)),new(o())(c().inputOutput,"indexOfRefraction",new(n().SFFloat)(1.5))]),enumerable:!0}});const de=pe;d().add("IORMaterialExtension","x_ite/Components/X_ITE/IORMaterialExtension",de);const Te=de;function xe(e){$.call(this,e),this.addType(c().IridescenceMaterialExtension)}Object.assign(Object.setPrototypeOf(xe.prototype,$.prototype),{initialize(){$.prototype.initialize.call(this),this._iridescence.addInterest("set_iridescence__",this),this._iridescenceTexture.addInterest("set_iridescenceTexture__",this),this._iridescenceIndexOfRefraction.addInterest("set_iridescenceIndexOfRefraction__",this),this._iridescenceThicknessMinimum.addInterest("set_iridescenceThicknessMinimum__",this),this._iridescenceThicknessMaximum.addInterest("set_iridescenceThicknessMaximum__",this),this._iridescenceThicknessTexture.addInterest("set_iridescenceThicknessTexture__",this),this.set_iridescence__(),this.set_iridescenceTexture__(),this.set_iridescenceIndexOfRefraction__(),this.set_iridescenceThicknessMinimum__(),this.set_iridescenceThicknessMaximum__(),this.set_iridescenceThicknessTexture__()},set_iridescence__(){this.iridescence=Math.max(this._iridescence.getValue(),0)},set_iridescenceTexture__(){this.iridescenceTextureNode=V()(c().X3DSingleTextureNode,this._iridescenceTexture),this.setTexture(0,this.iridescenceTextureNode)},set_iridescenceIndexOfRefraction__(){this.iridescenceIndexOfRefraction=Math.max(this._iridescenceIndexOfRefraction.getValue(),1)},set_iridescenceThicknessMinimum__(){this.iridescenceThicknessMinimum=Math.max(this._iridescenceThicknessMinimum.getValue(),0)},set_iridescenceThicknessMaximum__(){this.iridescenceThicknessMaximum=Math.max(this._iridescenceThicknessMaximum.getValue(),0)},set_iridescenceThicknessTexture__(){this.iridescenceThicknessTextureNode=V()(c().X3DSingleTextureNode,this._iridescenceThicknessTexture),this.setTexture(1,this.iridescenceThicknessTextureNode)},getExtensionKey:()=>ee.IRIDESCENCE_MATERIAL_EXTENSION,getShaderOptions(e){e.push("X3D_IRIDESCENCE_MATERIAL_EXT"),+this.getTextureBits()&&(e.push("X3D_MATERIAL_TEXTURES"),this.iridescenceTextureNode?.getShaderOptions(e,"IRIDESCENCE",!0),this.iridescenceThicknessTextureNode?.getShaderOptions(e,"IRIDESCENCE_THICKNESS",!0))},setShaderUniforms(e,t,s,i,n){e.uniform1f(t.x3d_IridescenceEXT,this.iridescence),e.uniform1f(t.x3d_IridescenceIndexOfRefractionEXT,this.iridescenceIndexOfRefraction),e.uniform1f(t.x3d_IridescenceThicknessMinimumEXT,this.iridescenceThicknessMinimum),e.uniform1f(t.x3d_IridescenceThicknessMaximumEXT,this.iridescenceThicknessMaximum),+this.getTextureBits()&&(this.iridescenceTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_IridescenceTextureEXT,this._iridescenceTextureMapping.getValue(),i,n),this.iridescenceThicknessTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_IridescenceThicknessTextureEXT,this._iridescenceThicknessTextureMapping.getValue(),i,n))}}),Object.defineProperties(xe,{typeName:{value:"IridescenceMaterialExtension",enumerable:!0},componentInfo:{value:Object.freeze({name:"X_ITE",level:1}),enumerable:!0},containerField:{value:"extensions",enumerable:!0},specificationRange:{value:Object.freeze({from:"4.0",to:"Infinity"}),enumerable:!0},fieldDefinitions:{value:new(u())([new(o())(c().inputOutput,"metadata",new(n().SFNode)),new(o())(c().inputOutput,"iridescence",new(n().SFFloat)),new(o())(c().inputOutput,"iridescenceTextureMapping",new(n().SFString)),new(o())(c().inputOutput,"iridescenceTexture",new(n().SFNode)),new(o())(c().inputOutput,"iridescenceIndexOfRefraction",new(n().SFFloat)(1.3)),new(o())(c().inputOutput,"iridescenceThicknessMinimum",new(n().SFFloat)(100)),new(o())(c().inputOutput,"iridescenceThicknessMaximum",new(n().SFFloat)(400)),new(o())(c().inputOutput,"iridescenceThicknessTextureMapping",new(n().SFString)),new(o())(c().inputOutput,"iridescenceThicknessTexture",new(n().SFNode))]),enumerable:!0}});const Se=xe;d().add("IridescenceMaterialExtension","x_ite/Components/X_ITE/IridescenceMaterialExtension",Se);const Ee=Se;function me(e){$.call(this,e),this.addType(c().SheenMaterialExtension),this.sheenColorArray=new Float32Array(3)}Object.assign(Object.setPrototypeOf(me.prototype,$.prototype),{initialize(){$.prototype.initialize.call(this),this._sheenColor.addInterest("set_sheenColor__",this),this._sheenColorTexture.addInterest("set_sheenColorTexture__",this),this._sheenRoughness.addInterest("set_sheenRoughness__",this),this._sheenRoughnessTexture.addInterest("set_sheenRoughnessTexture__",this),this.set_sheenColor__(),this.set_sheenColorTexture__(),this.set_sheenRoughness__(),this.set_sheenRoughnessTexture__()},set_sheenColor__(){const e=this.sheenColorArray,t=this._sheenColor.getValue();e[0]=t.r,e[1]=t.g,e[2]=t.b},set_sheenColorTexture__(){this.sheenColorTextureNode=V()(c().X3DSingleTextureNode,this._sheenColorTexture),this.setTexture(0,this.sheenColorTextureNode)},set_sheenRoughness__(){this.sheenRoughness=B().clamp(this._sheenRoughness.getValue(),0,1)},set_sheenRoughnessTexture__(){this.sheenRoughnessTextureNode=V()(c().X3DSingleTextureNode,this._sheenRoughnessTexture),this.setTexture(1,this.sheenRoughnessTextureNode)},getExtensionKey:()=>ee.SHEEN_MATERIAL_EXTENSION,getShaderOptions(e){e.push("X3D_SHEEN_MATERIAL_EXT"),+this.getTextureBits()&&(e.push("X3D_MATERIAL_TEXTURES"),this.sheenColorTextureNode?.getShaderOptions(e,"SHEEN_COLOR",!0),this.sheenRoughnessTextureNode?.getShaderOptions(e,"SHEEN_ROUGHNESS",!0))},setShaderUniforms(e,t,s,i,n){e.uniform3fv(t.x3d_SheenColorEXT,this.sheenColorArray),e.uniform1f(t.x3d_SheenRoughnessEXT,this.sheenRoughness);const r=this.getBrowser(),o=r.getLibraryTexture("lut_sheen_E.png"),a=r.getTexture2DUnit();e.activeTexture(e.TEXTURE0+a),e.bindTexture(e.TEXTURE_2D,o.getTexture()),e.uniform1i(t.x3d_SheenELUTTextureEXT,a),+this.getTextureBits()&&(this.sheenColorTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_SheenColorTextureEXT,this._sheenColorTextureMapping.getValue(),i,n),this.sheenRoughnessTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_SheenRoughnessTextureEXT,this._sheenRoughnessTextureMapping.getValue(),i,n))}}),Object.defineProperties(me,{typeName:{value:"SheenMaterialExtension",enumerable:!0},componentInfo:{value:Object.freeze({name:"X_ITE",level:1}),enumerable:!0},containerField:{value:"extensions",enumerable:!0},specificationRange:{value:Object.freeze({from:"4.0",to:"Infinity"}),enumerable:!0},fieldDefinitions:{value:new(u())([new(o())(c().inputOutput,"metadata",new(n().SFNode)),new(o())(c().inputOutput,"sheenColor",new(n().SFColor)),new(o())(c().inputOutput,"sheenColorTextureMapping",new(n().SFString)),new(o())(c().inputOutput,"sheenColorTexture",new(n().SFNode)),new(o())(c().inputOutput,"sheenRoughness",new(n().SFFloat)),new(o())(c().inputOutput,"sheenRoughnessTextureMapping",new(n().SFString)),new(o())(c().inputOutput,"sheenRoughnessTexture",new(n().SFNode))]),enumerable:!0}});const fe=me;d().add("SheenMaterialExtension","x_ite/Components/X_ITE/SheenMaterialExtension",fe);const ge=fe;function Oe(e){$.call(this,e),this.addType(c().SpecularMaterialExtension),this.specularColorArray=new Float32Array(3)}Object.assign(Object.setPrototypeOf(Oe.prototype,$.prototype),{initialize(){$.prototype.initialize.call(this),this._specular.addInterest("set_specular__",this),this._specularTexture.addInterest("set_specularTexture__",this),this._specularColor.addInterest("set_specularColor__",this),this._specularColorTexture.addInterest("set_specularColorTexture__",this),this.set_specular__(),this.set_specularTexture__(),this.set_specularColor__(),this.set_specularColorTexture__()},set_specular__(){this.specular=Math.max(this._specular.getValue(),0)},set_specularTexture__(){this.specularTextureNode=V()(c().X3DSingleTextureNode,this._specularTexture),this.setTexture(0,this.specularTextureNode)},set_specularColor__(){const e=this.specularColorArray,t=this._specularColor.getValue();e[0]=t.r,e[1]=t.g,e[2]=t.b},set_specularColorTexture__(){this.specularColorTextureNode=V()(c().X3DSingleTextureNode,this._specularColorTexture),this.setTexture(1,this.specularColorTextureNode)},getExtensionKey:()=>ee.SPECULAR_MATERIAL_EXTENSION,getShaderOptions(e){e.push("X3D_SPECULAR_MATERIAL_EXT"),+this.getTextureBits()&&(e.push("X3D_MATERIAL_TEXTURES"),this.specularTextureNode?.getShaderOptions(e,"SPECULAR",!0),this.specularColorTextureNode?.getShaderOptions(e,"SPECULAR_COLOR",!0))},setShaderUniforms(e,t,s,i,n){e.uniform1f(t.x3d_SpecularEXT,this.specular),e.uniform3fv(t.x3d_SpecularColorEXT,this.specularColorArray),+this.getTextureBits()&&(this.specularTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_SpecularTextureEXT,this._specularTextureMapping.getValue(),i,n),this.specularColorTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_SpecularColorTextureEXT,this._specularColorTextureMapping.getValue(),i,n))}}),Object.defineProperties(Oe,{typeName:{value:"SpecularMaterialExtension",enumerable:!0},componentInfo:{value:Object.freeze({name:"X_ITE",level:1}),enumerable:!0},containerField:{value:"extensions",enumerable:!0},specificationRange:{value:Object.freeze({from:"4.0",to:"Infinity"}),enumerable:!0},fieldDefinitions:{value:new(u())([new(o())(c().inputOutput,"metadata",new(n().SFNode)),new(o())(c().inputOutput,"specular",new(n().SFFloat)(1)),new(o())(c().inputOutput,"specularTextureMapping",new(n().SFString)),new(o())(c().inputOutput,"specularTexture",new(n().SFNode)),new(o())(c().inputOutput,"specularColor",new(n().SFColor)(1,1,1)),new(o())(c().inputOutput,"specularColorTextureMapping",new(n().SFString)),new(o())(c().inputOutput,"specularColorTexture",new(n().SFNode))]),enumerable:!0}});const Ne=Oe;d().add("SpecularMaterialExtension","x_ite/Components/X_ITE/SpecularMaterialExtension",Ne);const Ie=Ne;function ye(e){$.call(this,e),this.addType(c().TransmissionMaterialExtension)}Object.assign(Object.setPrototypeOf(ye.prototype,$.prototype),{initialize(){$.prototype.initialize.call(this),this._transmission.addInterest("set_transmission__",this),this._transmissionTexture.addInterest("set_transmissionTexture__",this),this.set_transmission__(),this.set_transmissionTexture__()},set_transmission__(){this.transmission=Math.max(this._transmission.getValue(),0)},set_transmissionTexture__(){this.transmissionTextureNode=V()(c().X3DSingleTextureNode,this._transmissionTexture),this.setTexture(0,this.transmissionTextureNode)},getExtensionKey:()=>ee.TRANSMISSION_MATERIAL_EXTENSION,getShaderOptions(e){e.push("X3D_TRANSMISSION_MATERIAL_EXT"),+this.getTextureBits()&&(e.push("X3D_MATERIAL_TEXTURES"),this.transmissionTextureNode?.getShaderOptions(e,"TRANSMISSION",!0))},setShaderUniforms(e,t,s,i,n){const r=this.getBrowser(),o=r.getTransmissionBuffer(),a=r.getTexture2DUnit();e.uniform1f(t.x3d_TransmissionEXT,this.transmission),e.activeTexture(e.TEXTURE0+a),e.bindTexture(e.TEXTURE_2D,o.getColorTexture()),e.uniform1i(t.x3d_TransmissionFramebufferSamplerEXT,a),e.uniform2i(t.x3d_TransmissionFramebufferSizeEXT,o.getWidth(),o.getHeight()),+this.getTextureBits()&&this.transmissionTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_TransmissionTextureEXT,this._transmissionTextureMapping.getValue(),i,n)}}),Object.defineProperties(ye,{typeName:{value:"TransmissionMaterialExtension",enumerable:!0},componentInfo:{value:Object.freeze({name:"X_ITE",level:1}),enumerable:!0},containerField:{value:"extensions",enumerable:!0},specificationRange:{value:Object.freeze({from:"4.0",to:"Infinity"}),enumerable:!0},fieldDefinitions:{value:new(u())([new(o())(c().inputOutput,"metadata",new(n().SFNode)),new(o())(c().inputOutput,"transmission",new(n().SFFloat)),new(o())(c().inputOutput,"transmissionTextureMapping",new(n().SFString)),new(o())(c().inputOutput,"transmissionTexture",new(n().SFNode))]),enumerable:!0}});const we=ye;d().add("TransmissionMaterialExtension","x_ite/Components/X_ITE/TransmissionMaterialExtension",we);const Ae=we;function Re(e){$.call(this,e),this.addType(c().VolumeMaterialExtension),this.attenuationColorArray=new Float32Array(3)}Object.assign(Object.setPrototypeOf(Re.prototype,$.prototype),{initialize(){$.prototype.initialize.call(this),this._thickness.addInterest("set_thickness__",this),this._thicknessTexture.addInterest("set_thicknessTexture__",this),this._attenuationDistance.addInterest("set_attenuationDistance__",this),this._attenuationColor.addInterest("set_attenuationColor__",this),this.set_thickness__(),this.set_thicknessTexture__(),this.set_attenuationDistance__(),this.set_attenuationColor__()},set_thickness__(){this.thickness=Math.max(this._thickness.getValue(),0)},set_thicknessTexture__(){this.thicknessTextureNode=V()(c().X3DSingleTextureNode,this._thicknessTexture),this.setTexture(0,this.thicknessTextureNode)},set_attenuationDistance__(){this.attenuationDistance=Math.max(this._attenuationDistance.getValue(),0)},set_attenuationColor__(){const e=this.attenuationColorArray,t=this._attenuationColor.getValue();e[0]=t.r,e[1]=t.g,e[2]=t.b},getExtensionKey:()=>ee.VOLUME_MATERIAL_EXTENSION,getShaderOptions(e){e.push("X3D_VOLUME_MATERIAL_EXT"),+this.getTextureBits()&&(e.push("X3D_MATERIAL_TEXTURES"),this.thicknessTextureNode?.getShaderOptions(e,"THICKNESS",!0))},setShaderUniforms(e,t,s,i,n){e.uniform1f(t.x3d_ThicknessEXT,this.thickness),e.uniform1f(t.x3d_AttenuationDistanceEXT,this.attenuationDistance),e.uniform3fv(t.x3d_AttenuationColorEXT,this.attenuationColorArray),+this.getTextureBits()&&this.thicknessTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_ThicknessTextureEXT,this._thicknessTextureMapping.getValue(),i,n)}}),Object.defineProperties(Re,{typeName:{value:"VolumeMaterialExtension",enumerable:!0},componentInfo:{value:Object.freeze({name:"X_ITE",level:1}),enumerable:!0},containerField:{value:"extensions",enumerable:!0},specificationRange:{value:Object.freeze({from:"4.0",to:"Infinity"}),enumerable:!0},fieldDefinitions:{value:new(u())([new(o())(c().inputOutput,"metadata",new(n().SFNode)),new(o())(c().inputOutput,"thickness",new(n().SFFloat)),new(o())(c().inputOutput,"thicknessTextureMapping",new(n().SFString)),new(o())(c().inputOutput,"thicknessTexture",new(n().SFNode)),new(o())(c().inputOutput,"attenuationDistance",new(n().SFFloat)(1e6)),new(o())(c().inputOutput,"attenuationColor",new(n().SFColor)(1,1,1))]),enumerable:!0}});const Ce=Re;d().add("VolumeMaterialExtension","x_ite/Components/X_ITE/VolumeMaterialExtension",Ce);const be=Ce;s().add({name:"X_ITE",concreteNodes:[S,f,v,q,ie,oe,_e,ce,Te,Ee,ge,Ie,Ae,be],abstractNodes:[$]});const Me=void 0;d().add("X_ITE","assets/components/X_ITE",Me)})();