x_ite 10.5.3 → 10.5.5
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.
- package/README.md +4 -4
- package/dist/X3DUOM.xml +358 -86
- package/dist/assets/components/AnnotationComponent.js +23 -23
- package/dist/assets/components/AnnotationComponent.min.js +2 -2
- package/dist/assets/components/CADGeometryComponent.js +24 -24
- package/dist/assets/components/CADGeometryComponent.min.js +2 -2
- package/dist/assets/components/CubeMapTexturingComponent.js +35 -35
- package/dist/assets/components/CubeMapTexturingComponent.min.js +2 -2
- package/dist/assets/components/DISComponent.js +22 -22
- package/dist/assets/components/DISComponent.min.js +2 -2
- package/dist/assets/components/EventUtilitiesComponent.js +21 -21
- package/dist/assets/components/EventUtilitiesComponent.min.js +2 -2
- package/dist/assets/components/Geometry2DComponent.js +56 -51
- package/dist/assets/components/Geometry2DComponent.min.js +2 -2
- package/dist/assets/components/GeospatialComponent.js +53 -53
- package/dist/assets/components/GeospatialComponent.min.js +2 -2
- package/dist/assets/components/HAnimComponent.js +32 -32
- package/dist/assets/components/HAnimComponent.min.js +2 -2
- package/dist/assets/components/KeyDeviceSensorComponent.js +15 -15
- package/dist/assets/components/KeyDeviceSensorComponent.min.js +2 -2
- package/dist/assets/components/LayoutComponent.js +37 -37
- package/dist/assets/components/LayoutComponent.min.js +2 -2
- package/dist/assets/components/NURBSComponent.js +57 -57
- package/dist/assets/components/NURBSComponent.min.js +2 -2
- package/dist/assets/components/ParticleSystemsComponent.js +55 -53
- package/dist/assets/components/ParticleSystemsComponent.min.js +2 -2
- package/dist/assets/components/PickingComponent.js +33 -33
- package/dist/assets/components/PickingComponent.min.js +2 -2
- package/dist/assets/components/RigidBodyPhysicsComponent.js +39 -39
- package/dist/assets/components/RigidBodyPhysicsComponent.min.js +2 -2
- package/dist/assets/components/ScriptingComponent.js +43 -43
- package/dist/assets/components/ScriptingComponent.min.js +2 -2
- package/dist/assets/components/TextComponent.js +41 -39
- package/dist/assets/components/TextComponent.min.js +2 -2
- package/dist/assets/components/TextureProjectionComponent.js +21 -21
- package/dist/assets/components/TextureProjectionComponent.min.js +2 -2
- package/dist/assets/components/Texturing3DComponent.js +41 -41
- package/dist/assets/components/Texturing3DComponent.min.js +2 -2
- package/dist/assets/components/VolumeRenderingComponent.js +46 -44
- package/dist/assets/components/VolumeRenderingComponent.min.js +2 -2
- package/dist/assets/components/X_ITEComponent.js +53 -77
- package/dist/assets/components/X_ITEComponent.min.js +2 -2
- package/dist/assets/lib/README.md +1 -0
- package/dist/assets/lib/libktx.js +1 -1
- package/dist/example.html +1 -1
- package/dist/x_ite.css +1 -1
- package/dist/x_ite.d.ts +22491 -22442
- package/dist/x_ite.js +1480 -1081
- package/dist/x_ite.min.js +2 -2
- package/dist/x_ite.min.mjs +2 -2
- package/dist/x_ite.mjs +1480 -1081
- package/dist/x_ite.zip +0 -0
- package/package.json +8 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/* X_ITE v10.5.
|
|
2
|
-
const __X_ITE_X3D__ = window [Symbol .for ("X_ITE.X3D-10.5.
|
|
1
|
+
/* X_ITE v10.5.5 */
|
|
2
|
+
const __X_ITE_X3D__ = window [Symbol .for ("X_ITE.X3D-10.5.5")];
|
|
3
3
|
/******/ (() => { // webpackBootstrap
|
|
4
4
|
/******/ "use strict";
|
|
5
5
|
/******/ // The require scope
|
|
@@ -39,31 +39,31 @@ const __X_ITE_X3D__ = window [Symbol .for ("X_ITE.X3D-10.5.3")];
|
|
|
39
39
|
|
|
40
40
|
// UNUSED EXPORTS: default
|
|
41
41
|
|
|
42
|
-
;//
|
|
42
|
+
;// external "__X_ITE_X3D__ .Components"
|
|
43
43
|
const external_X_ITE_X3D_Components_namespaceObject = __X_ITE_X3D__ .Components;
|
|
44
44
|
var external_X_ITE_X3D_Components_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_Components_namespaceObject);
|
|
45
|
-
;//
|
|
45
|
+
;// external "__X_ITE_X3D__ .Fields"
|
|
46
46
|
const external_X_ITE_X3D_Fields_namespaceObject = __X_ITE_X3D__ .Fields;
|
|
47
47
|
var external_X_ITE_X3D_Fields_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_Fields_namespaceObject);
|
|
48
|
-
;//
|
|
48
|
+
;// external "__X_ITE_X3D__ .X3DFieldDefinition"
|
|
49
49
|
const external_X_ITE_X3D_X3DFieldDefinition_namespaceObject = __X_ITE_X3D__ .X3DFieldDefinition;
|
|
50
50
|
var external_X_ITE_X3D_X3DFieldDefinition_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_X3DFieldDefinition_namespaceObject);
|
|
51
|
-
;//
|
|
51
|
+
;// external "__X_ITE_X3D__ .FieldDefinitionArray"
|
|
52
52
|
const external_X_ITE_X3D_FieldDefinitionArray_namespaceObject = __X_ITE_X3D__ .FieldDefinitionArray;
|
|
53
53
|
var external_X_ITE_X3D_FieldDefinitionArray_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_FieldDefinitionArray_namespaceObject);
|
|
54
|
-
;//
|
|
54
|
+
;// external "__X_ITE_X3D__ .X3DNode"
|
|
55
55
|
const external_X_ITE_X3D_X3DNode_namespaceObject = __X_ITE_X3D__ .X3DNode;
|
|
56
56
|
var external_X_ITE_X3D_X3DNode_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_X3DNode_namespaceObject);
|
|
57
|
-
;//
|
|
57
|
+
;// external "__X_ITE_X3D__ .X3DConstants"
|
|
58
58
|
const external_X_ITE_X3D_X3DConstants_namespaceObject = __X_ITE_X3D__ .X3DConstants;
|
|
59
59
|
var external_X_ITE_X3D_X3DConstants_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_X3DConstants_namespaceObject);
|
|
60
|
-
;//
|
|
60
|
+
;// external "__X_ITE_X3D__ .BitSet"
|
|
61
61
|
const external_X_ITE_X3D_BitSet_namespaceObject = __X_ITE_X3D__ .BitSet;
|
|
62
62
|
var external_X_ITE_X3D_BitSet_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_BitSet_namespaceObject);
|
|
63
|
-
;//
|
|
63
|
+
;// external "__X_ITE_X3D__ .Namespace"
|
|
64
64
|
const external_X_ITE_X3D_Namespace_namespaceObject = __X_ITE_X3D__ .Namespace;
|
|
65
65
|
var external_X_ITE_X3D_Namespace_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_Namespace_namespaceObject);
|
|
66
|
-
;//
|
|
66
|
+
;// ./src/x_ite/Components/X_ITE/X3DMaterialExtensionNode.js
|
|
67
67
|
/*******************************************************************************
|
|
68
68
|
*
|
|
69
69
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -145,10 +145,10 @@ const __default__ = X3DMaterialExtensionNode;
|
|
|
145
145
|
;
|
|
146
146
|
|
|
147
147
|
/* harmony default export */ const X_ITE_X3DMaterialExtensionNode = (external_X_ITE_X3D_Namespace_default().add ("X3DMaterialExtensionNode", __default__));
|
|
148
|
-
;//
|
|
148
|
+
;// external "__X_ITE_X3D__ .X3DCast"
|
|
149
149
|
const external_X_ITE_X3D_X3DCast_namespaceObject = __X_ITE_X3D__ .X3DCast;
|
|
150
150
|
var external_X_ITE_X3D_X3DCast_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_X3DCast_namespaceObject);
|
|
151
|
-
;//
|
|
151
|
+
;// ./src/x_ite/Browser/X_ITE/ExtensionKeys.js
|
|
152
152
|
/*******************************************************************************
|
|
153
153
|
*
|
|
154
154
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -218,7 +218,7 @@ const ExtensionKeys_default_ = ExtensionKeys;
|
|
|
218
218
|
;
|
|
219
219
|
|
|
220
220
|
/* harmony default export */ const X_ITE_ExtensionKeys = (external_X_ITE_X3D_Namespace_default().add ("ExtensionKeys", ExtensionKeys_default_));
|
|
221
|
-
;//
|
|
221
|
+
;// ./src/x_ite/Components/X_ITE/AnisotropyMaterialExtension.js
|
|
222
222
|
/*******************************************************************************
|
|
223
223
|
*
|
|
224
224
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -368,10 +368,10 @@ const AnisotropyMaterialExtension_default_ = AnisotropyMaterialExtension;
|
|
|
368
368
|
;
|
|
369
369
|
|
|
370
370
|
/* harmony default export */ const X_ITE_AnisotropyMaterialExtension = (external_X_ITE_X3D_Namespace_default().add ("AnisotropyMaterialExtension", AnisotropyMaterialExtension_default_));
|
|
371
|
-
;//
|
|
371
|
+
;// external "__X_ITE_X3D__ .X3DAppearanceChildNode"
|
|
372
372
|
const external_X_ITE_X3D_X3DAppearanceChildNode_namespaceObject = __X_ITE_X3D__ .X3DAppearanceChildNode;
|
|
373
373
|
var external_X_ITE_X3D_X3DAppearanceChildNode_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_X3DAppearanceChildNode_namespaceObject);
|
|
374
|
-
;//
|
|
374
|
+
;// ./src/x_ite/Components/X_ITE/BlendMode.js
|
|
375
375
|
/*******************************************************************************
|
|
376
376
|
*
|
|
377
377
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -554,10 +554,10 @@ const BlendMode_default_ = BlendMode;
|
|
|
554
554
|
;
|
|
555
555
|
|
|
556
556
|
/* harmony default export */ const X_ITE_BlendMode = (external_X_ITE_X3D_Namespace_default().add ("BlendMode", BlendMode_default_));
|
|
557
|
-
;//
|
|
557
|
+
;// external "__X_ITE_X3D__ .Algorithm"
|
|
558
558
|
const external_X_ITE_X3D_Algorithm_namespaceObject = __X_ITE_X3D__ .Algorithm;
|
|
559
559
|
var external_X_ITE_X3D_Algorithm_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_Algorithm_namespaceObject);
|
|
560
|
-
;//
|
|
560
|
+
;// ./src/x_ite/Components/X_ITE/ClearcoatMaterialExtension.js
|
|
561
561
|
/*******************************************************************************
|
|
562
562
|
*
|
|
563
563
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -745,7 +745,7 @@ const ClearcoatMaterialExtension_default_ = ClearcoatMaterialExtension;
|
|
|
745
745
|
;
|
|
746
746
|
|
|
747
747
|
/* harmony default export */ const X_ITE_ClearcoatMaterialExtension = (external_X_ITE_X3D_Namespace_default().add ("ClearcoatMaterialExtension", ClearcoatMaterialExtension_default_));
|
|
748
|
-
;//
|
|
748
|
+
;// ./src/x_ite/Components/X_ITE/DepthMode.js
|
|
749
749
|
/*******************************************************************************
|
|
750
750
|
*
|
|
751
751
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -896,7 +896,7 @@ const DepthMode_default_ = DepthMode;
|
|
|
896
896
|
;
|
|
897
897
|
|
|
898
898
|
/* harmony default export */ const X_ITE_DepthMode = (external_X_ITE_X3D_Namespace_default().add ("DepthMode", DepthMode_default_));
|
|
899
|
-
;//
|
|
899
|
+
;// ./src/x_ite/Components/X_ITE/DiffuseTransmissionMaterialExtension.js
|
|
900
900
|
/*******************************************************************************
|
|
901
901
|
*
|
|
902
902
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -1075,7 +1075,7 @@ const DiffuseTransmissionMaterialExtension_default_ = DiffuseTransmissionMateria
|
|
|
1075
1075
|
;
|
|
1076
1076
|
|
|
1077
1077
|
/* harmony default export */ const X_ITE_DiffuseTransmissionMaterialExtension = (external_X_ITE_X3D_Namespace_default().add ("DiffuseTransmissionMaterialExtension", DiffuseTransmissionMaterialExtension_default_));
|
|
1078
|
-
;//
|
|
1078
|
+
;// ./src/x_ite/Components/X_ITE/DispersionMaterialExtension.js
|
|
1079
1079
|
/*******************************************************************************
|
|
1080
1080
|
*
|
|
1081
1081
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -1187,7 +1187,7 @@ const DispersionMaterialExtension_default_ = DispersionMaterialExtension;
|
|
|
1187
1187
|
;
|
|
1188
1188
|
|
|
1189
1189
|
/* harmony default export */ const X_ITE_DispersionMaterialExtension = (external_X_ITE_X3D_Namespace_default().add ("DispersionMaterialExtension", DispersionMaterialExtension_default_));
|
|
1190
|
-
;//
|
|
1190
|
+
;// ./src/x_ite/Components/X_ITE/EmissiveStrengthMaterialExtension.js
|
|
1191
1191
|
/*******************************************************************************
|
|
1192
1192
|
*
|
|
1193
1193
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -1299,25 +1299,24 @@ const EmissiveStrengthMaterialExtension_default_ = EmissiveStrengthMaterialExten
|
|
|
1299
1299
|
;
|
|
1300
1300
|
|
|
1301
1301
|
/* harmony default export */ const X_ITE_EmissiveStrengthMaterialExtension = (external_X_ITE_X3D_Namespace_default().add ("EmissiveStrengthMaterialExtension", EmissiveStrengthMaterialExtension_default_));
|
|
1302
|
-
;//
|
|
1302
|
+
;// external "__X_ITE_X3D__ .X3DShapeNode"
|
|
1303
1303
|
const external_X_ITE_X3D_X3DShapeNode_namespaceObject = __X_ITE_X3D__ .X3DShapeNode;
|
|
1304
1304
|
var external_X_ITE_X3D_X3DShapeNode_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_X3DShapeNode_namespaceObject);
|
|
1305
|
-
;//
|
|
1305
|
+
;// external "__X_ITE_X3D__ .TraverseType"
|
|
1306
1306
|
const external_X_ITE_X3D_TraverseType_namespaceObject = __X_ITE_X3D__ .TraverseType;
|
|
1307
1307
|
var external_X_ITE_X3D_TraverseType_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_TraverseType_namespaceObject);
|
|
1308
|
-
;//
|
|
1308
|
+
;// external "__X_ITE_X3D__ .VertexArray"
|
|
1309
1309
|
const external_X_ITE_X3D_VertexArray_namespaceObject = __X_ITE_X3D__ .VertexArray;
|
|
1310
1310
|
var external_X_ITE_X3D_VertexArray_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_VertexArray_namespaceObject);
|
|
1311
|
-
;//
|
|
1311
|
+
;// external "__X_ITE_X3D__ .Vector3"
|
|
1312
1312
|
const external_X_ITE_X3D_Vector3_namespaceObject = __X_ITE_X3D__ .Vector3;
|
|
1313
|
-
|
|
1314
|
-
;// CONCATENATED MODULE: external "__X_ITE_X3D__ .Matrix4"
|
|
1313
|
+
;// external "__X_ITE_X3D__ .Matrix4"
|
|
1315
1314
|
const external_X_ITE_X3D_Matrix4_namespaceObject = __X_ITE_X3D__ .Matrix4;
|
|
1316
1315
|
var external_X_ITE_X3D_Matrix4_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_Matrix4_namespaceObject);
|
|
1317
|
-
;//
|
|
1316
|
+
;// external "__X_ITE_X3D__ .Box3"
|
|
1318
1317
|
const external_X_ITE_X3D_Box3_namespaceObject = __X_ITE_X3D__ .Box3;
|
|
1319
1318
|
var external_X_ITE_X3D_Box3_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_Box3_namespaceObject);
|
|
1320
|
-
;//
|
|
1319
|
+
;// ./src/x_ite/Components/X_ITE/InstancedShape.js
|
|
1321
1320
|
/*******************************************************************************
|
|
1322
1321
|
*
|
|
1323
1322
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -1389,14 +1388,11 @@ function InstancedShape (executionContext)
|
|
|
1389
1388
|
|
|
1390
1389
|
this .addChildObjects ((external_X_ITE_X3D_X3DConstants_default()).outputOnly, "matrices", new (external_X_ITE_X3D_Fields_default()).SFTime ());
|
|
1391
1390
|
|
|
1392
|
-
this .min = new (external_X_ITE_X3D_Vector3_default()) ();
|
|
1393
|
-
this .max = new (external_X_ITE_X3D_Vector3_default()) ();
|
|
1394
|
-
this .scale = new (external_X_ITE_X3D_Vector3_default()) (1, 1, 1);
|
|
1395
|
-
|
|
1396
1391
|
this .numInstances = 0;
|
|
1397
1392
|
this .instancesStride = Float32Array .BYTES_PER_ELEMENT * (16 + 9); // mat4 + mat3
|
|
1398
1393
|
this .matrixOffset = 0;
|
|
1399
1394
|
this .normalMatrixOffset = Float32Array .BYTES_PER_ELEMENT * 16;
|
|
1395
|
+
this .matrices = [ ];
|
|
1400
1396
|
}
|
|
1401
1397
|
|
|
1402
1398
|
Object .assign (Object .setPrototypeOf (InstancedShape .prototype, (external_X_ITE_X3D_X3DShapeNode_default()).prototype),
|
|
@@ -1418,8 +1414,6 @@ Object .assign (Object .setPrototypeOf (InstancedShape .prototype, (external_X_I
|
|
|
1418
1414
|
{
|
|
1419
1415
|
vertexArrayObject: new (external_X_ITE_X3D_VertexArray_default()) (gl),
|
|
1420
1416
|
thickLinesVertexArrayObject: new (external_X_ITE_X3D_VertexArray_default()) (gl),
|
|
1421
|
-
lineTrianglesBuffer: gl .createBuffer (),
|
|
1422
|
-
numLines: 0,
|
|
1423
1417
|
});
|
|
1424
1418
|
|
|
1425
1419
|
this ._translations .addInterest ("set_transform__", this);
|
|
@@ -1445,39 +1439,29 @@ Object .assign (Object .setPrototypeOf (InstancedShape .prototype, (external_X_I
|
|
|
1445
1439
|
},
|
|
1446
1440
|
set_bbox__: (function ()
|
|
1447
1441
|
{
|
|
1448
|
-
const
|
|
1449
|
-
min = new (external_X_ITE_X3D_Vector3_default()) (),
|
|
1450
|
-
max = new (external_X_ITE_X3D_Vector3_default()) (),
|
|
1451
|
-
bbox = new (external_X_ITE_X3D_Box3_default()) ();
|
|
1442
|
+
const bbox = new (external_X_ITE_X3D_Box3_default()) ();
|
|
1452
1443
|
|
|
1453
1444
|
return function ()
|
|
1454
1445
|
{
|
|
1455
|
-
if (this .
|
|
1446
|
+
if (this ._bboxSize .getValue () .equals (this .getDefaultBBoxSize ()))
|
|
1456
1447
|
{
|
|
1457
|
-
if (this .
|
|
1448
|
+
if (this .getGeometry ())
|
|
1458
1449
|
{
|
|
1459
|
-
|
|
1460
|
-
bbox .assign (this .getGeometry () .getBBox ());
|
|
1461
|
-
else
|
|
1462
|
-
bbox .set ();
|
|
1463
|
-
|
|
1464
|
-
const
|
|
1465
|
-
size1_2 = bbox .size .multiply (this .scale .magnitude () / 2),
|
|
1466
|
-
center = bbox .center;
|
|
1450
|
+
this .bbox .set ();
|
|
1467
1451
|
|
|
1468
|
-
|
|
1469
|
-
max .assign (this .max) .add (center) .add (size1_2);
|
|
1452
|
+
const geometryBBox = this .getGeometry () .getBBox ();
|
|
1470
1453
|
|
|
1471
|
-
|
|
1454
|
+
for (const matrix of this .matrices)
|
|
1455
|
+
this .bbox .add (bbox .assign (geometryBBox) .multRight (matrix));
|
|
1472
1456
|
}
|
|
1473
1457
|
else
|
|
1474
1458
|
{
|
|
1475
|
-
this .bbox .set (
|
|
1459
|
+
this .bbox .set ();
|
|
1476
1460
|
}
|
|
1477
1461
|
}
|
|
1478
1462
|
else
|
|
1479
1463
|
{
|
|
1480
|
-
this .bbox .set ();
|
|
1464
|
+
this .bbox .set (this ._bboxSize .getValue (), this ._bboxCenter .getValue ());
|
|
1481
1465
|
}
|
|
1482
1466
|
|
|
1483
1467
|
this .getBBoxSize () .assign (this .bbox .size);
|
|
@@ -1506,34 +1490,26 @@ Object .assign (Object .setPrototypeOf (InstancedShape .prototype, (external_X_I
|
|
|
1506
1490
|
numInstances = Math .max (numTranslations, numRotations, numScales, numScaleOrientations, numCenters),
|
|
1507
1491
|
stride = this .instancesStride / Float32Array .BYTES_PER_ELEMENT,
|
|
1508
1492
|
length = this .instancesStride * numInstances,
|
|
1509
|
-
data = new Float32Array (length)
|
|
1510
|
-
matrix = new (external_X_ITE_X3D_Matrix4_default()) ();
|
|
1493
|
+
data = new Float32Array (length);
|
|
1511
1494
|
|
|
1512
1495
|
this .numInstances = numInstances;
|
|
1513
1496
|
|
|
1514
|
-
const
|
|
1515
|
-
min = this .min .set (Number .POSITIVE_INFINITY, Number .POSITIVE_INFINITY, Number .POSITIVE_INFINITY),
|
|
1516
|
-
max = this .max .set (Number .NEGATIVE_INFINITY, Number .NEGATIVE_INFINITY, Number .NEGATIVE_INFINITY),
|
|
1517
|
-
scale = this .scale .assign (numScales ? max : (external_X_ITE_X3D_Vector3_default()).One);
|
|
1518
|
-
|
|
1519
1497
|
for (let i = 0, o = 0; i < numInstances; ++ i, o += stride)
|
|
1520
1498
|
{
|
|
1499
|
+
const matrix = this .matrices [i] ??= new (external_X_ITE_X3D_Matrix4_default()) ();
|
|
1500
|
+
|
|
1521
1501
|
matrix .set (numTranslations ? translations [Math .min (i, numTranslations - 1)] .getValue () : null,
|
|
1522
1502
|
numRotations ? rotations [Math .min (i, numRotations - 1)] .getValue () : null,
|
|
1523
1503
|
numScales ? scales [Math .min (i, numScales - 1)] .getValue () : null,
|
|
1524
1504
|
numScaleOrientations ? scaleOrientations [Math .min (i, numScaleOrientations - 1)] .getValue () : null,
|
|
1525
1505
|
numCenters ? centers [Math .min (i, numCenters - 1)] .getValue () : null);
|
|
1526
1506
|
|
|
1527
|
-
if (numScales)
|
|
1528
|
-
scale .max (scales [Math .min (i, numScales - 1)] .getValue ());
|
|
1529
|
-
|
|
1530
1507
|
data .set (matrix, o);
|
|
1531
1508
|
data .set (matrix .submatrix .transpose () .inverse (), o + 16);
|
|
1532
|
-
|
|
1533
|
-
min .min (matrix .origin);
|
|
1534
|
-
max .max (matrix .origin);
|
|
1535
1509
|
}
|
|
1536
1510
|
|
|
1511
|
+
this .matrices .length = numInstances;
|
|
1512
|
+
|
|
1537
1513
|
gl .bindBuffer (gl .ARRAY_BUFFER, this .instances);
|
|
1538
1514
|
gl .bufferData (gl .ARRAY_BUFFER, data, gl .DYNAMIC_DRAW);
|
|
1539
1515
|
|
|
@@ -1638,7 +1614,7 @@ const InstancedShape_default_ = InstancedShape;
|
|
|
1638
1614
|
;
|
|
1639
1615
|
|
|
1640
1616
|
/* harmony default export */ const X_ITE_InstancedShape = (external_X_ITE_X3D_Namespace_default().add ("InstancedShape", InstancedShape_default_));
|
|
1641
|
-
;//
|
|
1617
|
+
;// ./src/x_ite/Components/X_ITE/IORMaterialExtension.js
|
|
1642
1618
|
/*******************************************************************************
|
|
1643
1619
|
*
|
|
1644
1620
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -1750,7 +1726,7 @@ const IORMaterialExtension_default_ = IORMaterialExtension;
|
|
|
1750
1726
|
;
|
|
1751
1727
|
|
|
1752
1728
|
/* harmony default export */ const X_ITE_IORMaterialExtension = (external_X_ITE_X3D_Namespace_default().add ("IORMaterialExtension", IORMaterialExtension_default_));
|
|
1753
|
-
;//
|
|
1729
|
+
;// ./src/x_ite/Components/X_ITE/IridescenceMaterialExtension.js
|
|
1754
1730
|
/*******************************************************************************
|
|
1755
1731
|
*
|
|
1756
1732
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -1934,7 +1910,7 @@ const IridescenceMaterialExtension_default_ = IridescenceMaterialExtension;
|
|
|
1934
1910
|
;
|
|
1935
1911
|
|
|
1936
1912
|
/* harmony default export */ const X_ITE_IridescenceMaterialExtension = (external_X_ITE_X3D_Namespace_default().add ("IridescenceMaterialExtension", IridescenceMaterialExtension_default_));
|
|
1937
|
-
;//
|
|
1913
|
+
;// ./src/x_ite/Components/X_ITE/SheenMaterialExtension.js
|
|
1938
1914
|
/*******************************************************************************
|
|
1939
1915
|
*
|
|
1940
1916
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -2123,10 +2099,10 @@ const SheenMaterialExtension_default_ = SheenMaterialExtension;
|
|
|
2123
2099
|
;
|
|
2124
2100
|
|
|
2125
2101
|
/* harmony default export */ const X_ITE_SheenMaterialExtension = (external_X_ITE_X3D_Namespace_default().add ("SheenMaterialExtension", SheenMaterialExtension_default_));
|
|
2126
|
-
;//
|
|
2102
|
+
;// external "__X_ITE_X3D__ .X3DOneSidedMaterialNode"
|
|
2127
2103
|
const external_X_ITE_X3D_X3DOneSidedMaterialNode_namespaceObject = __X_ITE_X3D__ .X3DOneSidedMaterialNode;
|
|
2128
2104
|
var external_X_ITE_X3D_X3DOneSidedMaterialNode_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_X3DOneSidedMaterialNode_namespaceObject);
|
|
2129
|
-
;//
|
|
2105
|
+
;// ./src/x_ite/Components/X_ITE/SpecularGlossinessMaterial.js
|
|
2130
2106
|
/*******************************************************************************
|
|
2131
2107
|
*
|
|
2132
2108
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -2466,7 +2442,7 @@ const SpecularGlossinessMaterial_default_ = SpecularGlossinessMaterial;
|
|
|
2466
2442
|
;
|
|
2467
2443
|
|
|
2468
2444
|
/* harmony default export */ const X_ITE_SpecularGlossinessMaterial = (external_X_ITE_X3D_Namespace_default().add ("SpecularGlossinessMaterial", SpecularGlossinessMaterial_default_));
|
|
2469
|
-
;//
|
|
2445
|
+
;// ./src/x_ite/Components/X_ITE/SpecularMaterialExtension.js
|
|
2470
2446
|
/*******************************************************************************
|
|
2471
2447
|
*
|
|
2472
2448
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -2645,7 +2621,7 @@ const SpecularMaterialExtension_default_ = SpecularMaterialExtension;
|
|
|
2645
2621
|
;
|
|
2646
2622
|
|
|
2647
2623
|
/* harmony default export */ const X_ITE_SpecularMaterialExtension = (external_X_ITE_X3D_Namespace_default().add ("SpecularMaterialExtension", SpecularMaterialExtension_default_));
|
|
2648
|
-
;//
|
|
2624
|
+
;// ./src/x_ite/Components/X_ITE/TransmissionMaterialExtension.js
|
|
2649
2625
|
/*******************************************************************************
|
|
2650
2626
|
*
|
|
2651
2627
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -2819,7 +2795,7 @@ const TransmissionMaterialExtension_default_ = TransmissionMaterialExtension;
|
|
|
2819
2795
|
;
|
|
2820
2796
|
|
|
2821
2797
|
/* harmony default export */ const X_ITE_TransmissionMaterialExtension = (external_X_ITE_X3D_Namespace_default().add ("TransmissionMaterialExtension", TransmissionMaterialExtension_default_));
|
|
2822
|
-
;//
|
|
2798
|
+
;// ./src/x_ite/Components/X_ITE/VolumeMaterialExtension.js
|
|
2823
2799
|
/*******************************************************************************
|
|
2824
2800
|
*
|
|
2825
2801
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -2987,7 +2963,7 @@ const VolumeMaterialExtension_default_ = VolumeMaterialExtension;
|
|
|
2987
2963
|
;
|
|
2988
2964
|
|
|
2989
2965
|
/* harmony default export */ const X_ITE_VolumeMaterialExtension = (external_X_ITE_X3D_Namespace_default().add ("VolumeMaterialExtension", VolumeMaterialExtension_default_));
|
|
2990
|
-
;//
|
|
2966
|
+
;// ./src/assets/components/X_ITEComponent.js
|
|
2991
2967
|
/*******************************************************************************
|
|
2992
2968
|
*
|
|
2993
2969
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* X_ITE v10.5.
|
|
2
|
-
const e=window[Symbol.for("X_ITE.X3D-10.5.3")];(()=>{var t={n:e=>{var s=e&&e.__esModule?()=>e.default:()=>e;return t.d(s,{a:s}),s},d:(e,s)=>{for(var i in s)t.o(s,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:s[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const s=e.Components;var i=t.n(s);const n=e.Fields;var r=t.n(n);const o=e.X3DFieldDefinition;var a=t.n(o);const u=e.FieldDefinitionArray;var _=t.n(u);const h=e.X3DNode;var c=t.n(h);const d=e.X3DConstants;var l=t.n(d);const p=e.BitSet;var T=t.n(p);const S=e.Namespace;var x=t.n(S);function f(e){c().call(this,e),this.addType(l().X3DMaterialExtensionNode),this.textureBits=new(T())}Object.assign(Object.setPrototypeOf(f.prototype,c().prototype),{setTexture(e,t){e*=4,this.textureBits.remove(e,15),this.textureBits.add(e,t?.getTextureBits()??0)},getTextureBits(){return this.textureBits}}),Object.defineProperties(f,c().getStaticProperties("X3DMaterialExtensionNode","X_ITE",1));const E=f,g=x().add("X3DMaterialExtensionNode",E),O=e.X3DCast;var N=t.n(O);let m=0;const I={ANISOTROPY_MATERIAL_EXTENSION:m++,CLEARCOAT_MATERIAL_EXTENSION:m++,DIFFUSE_TRANSMISSION_EXTENSION:m++,DISPERSION_MATERIAL_EXTENSION:m++,EMISSIVE_STRENGTH_MATERIAL_EXTENSION:m++,IOR_MATERIAL_EXTENSION:m++,IRIDESCENCE_MATERIAL_EXTENSION:m++,SHEEN_MATERIAL_EXTENSION:m++,SPECULAR_MATERIAL_EXTENSION:m++,TRANSMISSION_MATERIAL_EXTENSION:m++,UNLIT_MATERIAL_EXTENSION:m++,VOLUME_MATERIAL_EXTENSION:m++},A=x().add("ExtensionKeys",I);function w(e){g.call(this,e),this.addType(l().AnisotropyMaterialExtension),this.anisotropyArray=new Float32Array(3)}Object.assign(Object.setPrototypeOf(w.prototype,g.prototype),{initialize(){g.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=N()(l().X3DSingleTextureNode,this._anisotropyTexture),this.setTexture(0,this.anisotropyTextureNode)},getExtensionKey:()=>A.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(w,{...c().getStaticProperties("AnisotropyMaterialExtension","X_ITE",1,"extensions","4.0"),fieldDefinitions:{value:new(_())([new(a())(l().inputOutput,"metadata",new(r().SFNode)),new(a())(l().inputOutput,"anisotropyStrength",new(r().SFFloat)),new(a())(l().inputOutput,"anisotropyRotation",new(r().SFFloat)),new(a())(l().inputOutput,"anisotropyTextureMapping",new(r().SFString)),new(a())(l().inputOutput,"anisotropyTexture",new(r().SFNode))]),enumerable:!0}});const y=w,C=x().add("AnisotropyMaterialExtension",y),R=e.X3DAppearanceChildNode;var M=t.n(R);function F(e){M().call(this,e),this.addType(l().BlendMode),this.factorTypes=new Map,this.equationTypes=new Map}Object.assign(Object.setPrototypeOf(F.prototype,M().prototype),{initialize(){M().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(F,{...c().getStaticProperties("BlendMode","X_ITE",1,"blendMode","3.3"),fieldDefinitions:{value:new(_())([new(a())(l().inputOutput,"metadata",new(r().SFNode)),new(a())(l().inputOutput,"blendColor",new(r().SFColorRGBA)),new(a())(l().inputOutput,"sourceColorFactor",new(r().SFString)("SRC_ALPHA")),new(a())(l().inputOutput,"sourceAlphaFactor",new(r().SFString)("ONE")),new(a())(l().inputOutput,"destinationColorFactor",new(r().SFString)("ONE_MINUS_SRC_ALPHA")),new(a())(l().inputOutput,"destinationAlphaFactor",new(r().SFString)("ONE_MINUS_SRC_ALPHA")),new(a())(l().inputOutput,"colorEquation",new(r().SFString)("FUNC_ADD")),new(a())(l().inputOutput,"alphaEquation",new(r().SFString)("FUNC_ADD"))]),enumerable:!0}});const X=F,D=x().add("BlendMode",X),b=e.Algorithm;var L=t.n(b);function U(e){g.call(this,e),this.addType(l().ClearcoatMaterialExtension)}Object.assign(Object.setPrototypeOf(U.prototype,g.prototype),{initialize(){g.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=N()(l().X3DSingleTextureNode,this._clearcoatTexture),this.setTexture(0,this.clearcoatTextureNode)},set_clearcoatRoughness__(){this.clearcoatRoughness=L().clamp(this._clearcoatRoughness.getValue(),0,1)},set_clearcoatRoughnessTexture__(){this.clearcoatRoughnessTextureNode=N()(l().X3DSingleTextureNode,this._clearcoatRoughnessTexture),this.setTexture(1,this.clearcoatRoughnessTextureNode)},set_clearcoatNormalTexture__(){this.clearcoatNormalTextureNode=N()(l().X3DSingleTextureNode,this._clearcoatNormalTexture),this.setTexture(2,this.clearcoatNormalTextureNode)},getExtensionKey:()=>A.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(U,{...c().getStaticProperties("ClearcoatMaterialExtension","X_ITE",1,"extensions","4.0"),fieldDefinitions:{value:new(_())([new(a())(l().inputOutput,"metadata",new(r().SFNode)),new(a())(l().inputOutput,"clearcoat",new(r().SFFloat)),new(a())(l().inputOutput,"clearcoatTextureMapping",new(r().SFString)),new(a())(l().inputOutput,"clearcoatTexture",new(r().SFNode)),new(a())(l().inputOutput,"clearcoatRoughness",new(r().SFFloat)),new(a())(l().inputOutput,"clearcoatRoughnessTextureMapping",new(r().SFString)),new(a())(l().inputOutput,"clearcoatRoughnessTexture",new(r().SFNode)),new(a())(l().inputOutput,"clearcoatNormalTextureMapping",new(r().SFString)),new(a())(l().inputOutput,"clearcoatNormalTexture",new(r().SFNode))]),enumerable:!0}});const P=U,V=x().add("ClearcoatMaterialExtension",P);function v(e){M().call(this,e),this.addType(l().DepthMode),this.addAlias("depthFunc",this._depthFunction)}Object.assign(Object.setPrototypeOf(v.prototype,M().prototype),{initialize(){M().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(v,{...c().getStaticProperties("DepthMode","X_ITE",1,"depthMode","4.0"),fieldDefinitions:{value:new(_())([new(a())(l().inputOutput,"metadata",new(r().SFNode)),new(a())(l().inputOutput,"polygonOffset",new(r().SFVec2f)),new(a())(l().inputOutput,"depthRange",new(r().SFVec2f)(0,1)),new(a())(l().inputOutput,"depthTest",new(r().SFBool)(!0)),new(a())(l().inputOutput,"depthFunction",new(r().SFString)("LESS_EQUAL")),new(a())(l().inputOutput,"depthMask",new(r().SFBool)(!0))]),enumerable:!0}});const B=v,k=x().add("DepthMode",B);function j(e){g.call(this,e),this.addType(l().DiffuseTransmissionMaterialExtension),this.diffuseTransmissionColorArray=new Float32Array(3)}Object.assign(Object.setPrototypeOf(j.prototype,g.prototype),{initialize(){g.prototype.initialize.call(this),this._diffuseTransmission.addInterest("set_diffuseTransmission__",this),this._diffuseTransmissionTexture.addInterest("set_diffuseTransmissionTexture__",this),this._diffuseTransmissionColor.addInterest("set_diffuseTransmissionColor__",this),this._diffuseTransmissionColorTexture.addInterest("set_diffuseTransmissionColorTexture__",this),this.set_diffuseTransmission__(),this.set_diffuseTransmissionTexture__(),this.set_diffuseTransmissionColor__(),this.set_diffuseTransmissionColorTexture__()},set_diffuseTransmission__(){this.diffuseTransmission=Math.max(this._diffuseTransmission.getValue(),0)},set_diffuseTransmissionTexture__(){this.diffuseTransmissionTextureNode=N()(l().X3DSingleTextureNode,this._diffuseTransmissionTexture),this.setTexture(0,this.diffuseTransmissionTextureNode)},set_diffuseTransmissionColor__(){const e=this.diffuseTransmissionColorArray,t=this._diffuseTransmissionColor.getValue();e[0]=t.r,e[1]=t.g,e[2]=t.b},set_diffuseTransmissionColorTexture__(){this.diffuseTransmissionColorTextureNode=N()(l().X3DSingleTextureNode,this._diffuseTransmissionColorTexture),this.setTexture(1,this.diffuseTransmissionColorTextureNode)},getExtensionKey:()=>A.DIFFUSE_TRANSMISSION_EXTENSION,getShaderOptions(e){e.push("X3D_DIFFUSE_TRANSMISSION_MATERIAL_EXT"),+this.getTextureBits()&&(e.push("X3D_MATERIAL_TEXTURES"),this.diffuseTransmissionTextureNode?.getShaderOptions(e,"DIFFUSE_TRANSMISSION",!0),this.diffuseTransmissionColorTextureNode?.getShaderOptions(e,"DIFFUSE_TRANSMISSION_COLOR",!0))},setShaderUniforms(e,t,s,i,n){e.uniform1f(t.x3d_DiffuseTransmissionEXT,this.diffuseTransmission),e.uniform3fv(t.x3d_DiffuseTransmissionColorEXT,this.diffuseTransmissionColorArray),+this.getTextureBits()&&(this.diffuseTransmissionTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_DiffuseTransmissionTextureEXT,this._diffuseTransmissionTextureMapping.getValue(),i,n),this.diffuseTransmissionColorTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_DiffuseTransmissionColorTextureEXT,this._diffuseTransmissionColorTextureMapping.getValue(),i,n))}}),Object.defineProperties(j,{...c().getStaticProperties("DiffuseTransmissionMaterialExtension","X_ITE",1,"extensions","4.0"),fieldDefinitions:{value:new(_())([new(a())(l().inputOutput,"metadata",new(r().SFNode)),new(a())(l().inputOutput,"diffuseTransmission",new(r().SFFloat)),new(a())(l().inputOutput,"diffuseTransmissionTextureMapping",new(r().SFString)),new(a())(l().inputOutput,"diffuseTransmissionTexture",new(r().SFNode)),new(a())(l().inputOutput,"diffuseTransmissionColor",new(r().SFColor)(1,1,1)),new(a())(l().inputOutput,"diffuseTransmissionColorTextureMapping",new(r().SFString)),new(a())(l().inputOutput,"diffuseTransmissionColorTexture",new(r().SFNode))]),enumerable:!0}});const G=j,H=x().add("DiffuseTransmissionMaterialExtension",G);function z(e){g.call(this,e),this.addType(l().DispersionMaterialExtension)}Object.assign(Object.setPrototypeOf(z.prototype,g.prototype),{initialize(){g.prototype.initialize.call(this),this._dispersion.addInterest("set_dispersion__",this),this.set_dispersion__()},set_dispersion__(){this.dispersion=Math.max(this._dispersion.getValue(),0)},getExtensionKey:()=>A.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(z,{...c().getStaticProperties("DispersionMaterialExtension","X_ITE",1,"extensions","4.0"),fieldDefinitions:{value:new(_())([new(a())(l().inputOutput,"metadata",new(r().SFNode)),new(a())(l().inputOutput,"dispersion",new(r().SFFloat))]),enumerable:!0}});const q=z,K=x().add("DispersionMaterialExtension",q);function Y(e){g.call(this,e),this.addType(l().EmissiveStrengthMaterialExtension)}Object.assign(Object.setPrototypeOf(Y.prototype,g.prototype),{initialize(){g.prototype.initialize.call(this),this._emissiveStrength.addInterest("set_emissiveStrength__",this),this.set_emissiveStrength__()},set_emissiveStrength__(){this.emissiveStrength=Math.max(this._emissiveStrength.getValue(),0)},getExtensionKey:()=>A.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(Y,{...c().getStaticProperties("EmissiveStrengthMaterialExtension","X_ITE",1,"extensions","4.0"),fieldDefinitions:{value:new(_())([new(a())(l().inputOutput,"metadata",new(r().SFNode)),new(a())(l().inputOutput,"emissiveStrength",new(r().SFFloat)(1))]),enumerable:!0}});const Q=Y,W=x().add("EmissiveStrengthMaterialExtension",Q),$=e.X3DShapeNode;var Z=t.n($);const J=e.TraverseType;var ee=t.n(J);const te=e.VertexArray;var se=t.n(te);const ie=e.Vector3;var ne=t.n(ie);const re=e.Matrix4;var oe=t.n(re);const ae=e.Box3;var ue=t.n(ae);function _e(e){Z().call(this,e),this.addType(l().InstancedShape),this.addChildObjects(l().outputOnly,"matrices",new(r().SFTime)),this.min=new(ne()),this.max=new(ne()),this.scale=new(ne())(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(_e.prototype,Z().prototype),{initialize(){Z().prototype.initialize.call(this);const e=this.getBrowser(),t=e.getContext();e.getContext().getVersion()<2||(this.instances=Object.assign(t.createBuffer(),{vertexArrayObject:new(se())(t),thickLinesVertexArrayObject:new(se())(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._scaleOrientations.addInterest("set_transform__",this),this._centers.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(ne()),t=new(ne()),s=new(ue());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=this._scaleOrientations,r=this._centers,o=t.length,a=s.length,u=i.length,_=n.length,h=r.length,c=Math.max(o,a,u,_,h),d=this.instancesStride/Float32Array.BYTES_PER_ELEMENT,l=this.instancesStride*c,p=new Float32Array(l),T=new(oe());this.numInstances=c;const S=this.min.set(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY),x=this.max.set(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY),f=this.scale.assign(u?x:ne().One);for(let e=0,l=0;e<c;++e,l+=d)T.set(o?t[Math.min(e,o-1)].getValue():null,a?s[Math.min(e,a-1)].getValue():null,u?i[Math.min(e,u-1)].getValue():null,_?n[Math.min(e,_-1)].getValue():null,h?r[Math.min(e,h-1)].getValue():null),u&&f.max(i[Math.min(e,u-1)].getValue()),p.set(T,l),p.set(T.submatrix.transpose().inverse(),l+16),S.min(T.origin),x.max(T.origin);e.bindBuffer(e.ARRAY_BUFFER,this.instances),e.bufferData(e.ARRAY_BUFFER,p,e.DYNAMIC_DRAW),this.set_bbox__()},set_geometry__(){Z().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 ee().POINTER:this._pointerEvents.getValue()&&t.addPointingShape(this);break;case ee().PICKING:break;case ee().COLLISION:t.addCollisionShape(this);break;case ee().SHADOW:this._castShadow.getValue()&&t.addShadowShape(this);break;case ee().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(_e,{...c().getStaticProperties("InstancedShape","X_ITE",1,"children","2.0"),fieldDefinitions:{value:new(_())([new(a())(l().inputOutput,"metadata",new(r().SFNode)),new(a())(l().inputOutput,"translations",new(r().MFVec3f)),new(a())(l().inputOutput,"rotations",new(r().MFRotation)),new(a())(l().inputOutput,"scales",new(r().MFVec3f)),new(a())(l().inputOutput,"scaleOrientations",new(r().MFRotation)),new(a())(l().inputOutput,"centers",new(r().MFVec3f)),new(a())(l().inputOutput,"pointerEvents",new(r().SFBool)(!0)),new(a())(l().inputOutput,"castShadow",new(r().SFBool)(!0)),new(a())(l().inputOutput,"visible",new(r().SFBool)(!0)),new(a())(l().inputOutput,"bboxDisplay",new(r().SFBool)),new(a())(l().initializeOnly,"bboxSize",new(r().SFVec3f)(-1,-1,-1)),new(a())(l().initializeOnly,"bboxCenter",new(r().SFVec3f)),new(a())(l().inputOutput,"appearance",new(r().SFNode)),new(a())(l().inputOutput,"geometry",new(r().SFNode))]),enumerable:!0}});const he=_e,ce=x().add("InstancedShape",he);function de(e){g.call(this,e),this.addType(l().IORMaterialExtension)}Object.assign(Object.setPrototypeOf(de.prototype,g.prototype),{initialize(){g.prototype.initialize.call(this),this._indexOfRefraction.addInterest("set_indexOfRefraction__",this),this.set_indexOfRefraction__()},set_indexOfRefraction__(){this.indexOfRefraction=Math.max(this._indexOfRefraction.getValue(),1)},getExtensionKey:()=>A.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(de,{...c().getStaticProperties("IORMaterialExtension","X_ITE",1,"extensions","4.0"),fieldDefinitions:{value:new(_())([new(a())(l().inputOutput,"metadata",new(r().SFNode)),new(a())(l().inputOutput,"indexOfRefraction",new(r().SFFloat)(1.5))]),enumerable:!0}});const le=de,pe=x().add("IORMaterialExtension",le);function Te(e){g.call(this,e),this.addType(l().IridescenceMaterialExtension)}Object.assign(Object.setPrototypeOf(Te.prototype,g.prototype),{initialize(){g.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=N()(l().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=N()(l().X3DSingleTextureNode,this._iridescenceThicknessTexture),this.setTexture(1,this.iridescenceThicknessTextureNode)},getExtensionKey:()=>A.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(Te,{...c().getStaticProperties("IridescenceMaterialExtension","X_ITE",1,"extensions","4.0"),fieldDefinitions:{value:new(_())([new(a())(l().inputOutput,"metadata",new(r().SFNode)),new(a())(l().inputOutput,"iridescence",new(r().SFFloat)),new(a())(l().inputOutput,"iridescenceTextureMapping",new(r().SFString)),new(a())(l().inputOutput,"iridescenceTexture",new(r().SFNode)),new(a())(l().inputOutput,"iridescenceIndexOfRefraction",new(r().SFFloat)(1.3)),new(a())(l().inputOutput,"iridescenceThicknessMinimum",new(r().SFFloat)(100)),new(a())(l().inputOutput,"iridescenceThicknessMaximum",new(r().SFFloat)(400)),new(a())(l().inputOutput,"iridescenceThicknessTextureMapping",new(r().SFString)),new(a())(l().inputOutput,"iridescenceThicknessTexture",new(r().SFNode))]),enumerable:!0}});const Se=Te,xe=x().add("IridescenceMaterialExtension",Se);function fe(e){g.call(this,e),this.addType(l().SheenMaterialExtension),this.sheenColorArray=new Float32Array(3)}Object.assign(Object.setPrototypeOf(fe.prototype,g.prototype),{initialize(){g.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=N()(l().X3DSingleTextureNode,this._sheenColorTexture),this.setTexture(0,this.sheenColorTextureNode)},set_sheenRoughness__(){this.sheenRoughness=L().clamp(this._sheenRoughness.getValue(),0,1)},set_sheenRoughnessTexture__(){this.sheenRoughnessTextureNode=N()(l().X3DSingleTextureNode,this._sheenRoughnessTexture),this.setTexture(1,this.sheenRoughnessTextureNode)},getExtensionKey:()=>A.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(fe,{...c().getStaticProperties("SheenMaterialExtension","X_ITE",1,"extensions","4.0"),fieldDefinitions:{value:new(_())([new(a())(l().inputOutput,"metadata",new(r().SFNode)),new(a())(l().inputOutput,"sheenColor",new(r().SFColor)),new(a())(l().inputOutput,"sheenColorTextureMapping",new(r().SFString)),new(a())(l().inputOutput,"sheenColorTexture",new(r().SFNode)),new(a())(l().inputOutput,"sheenRoughness",new(r().SFFloat)),new(a())(l().inputOutput,"sheenRoughnessTextureMapping",new(r().SFString)),new(a())(l().inputOutput,"sheenRoughnessTexture",new(r().SFNode))]),enumerable:!0}});const Ee=fe,ge=x().add("SheenMaterialExtension",Ee),Oe=e.X3DOneSidedMaterialNode;var Ne=t.n(Oe);function me(e){console.warn("SpecularGlossinessMaterial is depreciated, please use PhysicalMaterial instead."),Ne().call(this,e),this.addType(l().SpecularGlossinessMaterial),this.materialKey="4/",this.diffuseColorArray=new Float32Array(3),this.specularColorArray=new Float32Array(3),this.extensionNodes=[]}Object.assign(Object.setPrototypeOf(me.prototype,Ne().prototype),{initialize(){Ne().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=N()(l().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=L().clamp(this._glossiness.getValue(),0,1)},set_specularGlossinessTexture__(){this.specularGlossinessTextureNode=N()(l().X3DSingleTextureNode,this._specularGlossinessTexture),this.setTexture(this.getTextureIndices().SPECULAR_GLOSSINESS_TEXTURE,this.specularGlossinessTextureNode)},set_occlusionStrength__(){this.occlusionStrength=L().clamp(this._occlusionStrength.getValue(),0,1)},set_occlusionTexture__(){this.occlusionTextureNode=N()(l().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=N()(l().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(l().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){Ne().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(me,{...c().getStaticProperties("SpecularGlossinessMaterial","X_ITE",1,"material","4.0"),fieldDefinitions:{value:new(_())([new(a())(l().inputOutput,"metadata",new(r().SFNode)),new(a())(l().inputOutput,"diffuseColor",new(r().SFColor)(1,1,1)),new(a())(l().inputOutput,"diffuseTextureMapping",new(r().SFString)),new(a())(l().inputOutput,"diffuseTexture",new(r().SFNode)),new(a())(l().inputOutput,"specularColor",new(r().SFColor)(1,1,1)),new(a())(l().inputOutput,"glossiness",new(r().SFFloat)(1)),new(a())(l().inputOutput,"specularGlossinessTextureMapping",new(r().SFString)),new(a())(l().inputOutput,"specularGlossinessTexture",new(r().SFNode)),new(a())(l().inputOutput,"emissiveColor",new(r().SFColor)),new(a())(l().inputOutput,"emissiveTextureMapping",new(r().SFString)),new(a())(l().inputOutput,"emissiveTexture",new(r().SFNode)),new(a())(l().inputOutput,"occlusionStrength",new(r().SFFloat)(1)),new(a())(l().inputOutput,"occlusionTextureMapping",new(r().SFString)),new(a())(l().inputOutput,"occlusionTexture",new(r().SFNode)),new(a())(l().inputOutput,"normalScale",new(r().SFFloat)(1)),new(a())(l().inputOutput,"normalTextureMapping",new(r().SFString)),new(a())(l().inputOutput,"normalTexture",new(r().SFNode)),new(a())(l().inputOutput,"transparency",new(r().SFFloat)),new(a())(l().inputOutput,"extensions",new(r().MFNode))]),enumerable:!0}});for(const e of Object.values(me.prototype.getTextureIndices()))me.prototype[`setTexture${e}`]=function(e,t){this.setTexture(e,t)};const Ie=me,Ae=x().add("SpecularGlossinessMaterial",Ie);function we(e){g.call(this,e),this.addType(l().SpecularMaterialExtension),this.specularColorArray=new Float32Array(3)}Object.assign(Object.setPrototypeOf(we.prototype,g.prototype),{initialize(){g.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=N()(l().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=N()(l().X3DSingleTextureNode,this._specularColorTexture),this.setTexture(1,this.specularColorTextureNode)},getExtensionKey:()=>A.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(we,{...c().getStaticProperties("SpecularMaterialExtension","X_ITE",1,"extensions","4.0"),fieldDefinitions:{value:new(_())([new(a())(l().inputOutput,"metadata",new(r().SFNode)),new(a())(l().inputOutput,"specular",new(r().SFFloat)(1)),new(a())(l().inputOutput,"specularTextureMapping",new(r().SFString)),new(a())(l().inputOutput,"specularTexture",new(r().SFNode)),new(a())(l().inputOutput,"specularColor",new(r().SFColor)(1,1,1)),new(a())(l().inputOutput,"specularColorTextureMapping",new(r().SFString)),new(a())(l().inputOutput,"specularColorTexture",new(r().SFNode))]),enumerable:!0}});const ye=we,Ce=x().add("SpecularMaterialExtension",ye);function Re(e){g.call(this,e),this.addType(l().TransmissionMaterialExtension)}Object.assign(Object.setPrototypeOf(Re.prototype,g.prototype),{initialize(){g.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=N()(l().X3DSingleTextureNode,this._transmissionTexture),this.setTexture(0,this.transmissionTextureNode)},getExtensionKey:()=>A.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:function(){const e=new Float32Array(16);return function(t,s,i,n,r){const o=this.getBrowser();if(t.uniform1f(s.x3d_TransmissionEXT,this.transmission),i.isTransmission()){var a=o.getDefaultTexture2D(),u=o.getDefaultTexture2DUnit();t.uniformMatrix4fv(s.x3d_ModelViewMatrix,!1,e),t.uniform2i(s.x3d_TransmissionFramebufferSizeEXT,1,1)}else{var _=o.getTransmissionBuffer();a=_.getColorTexture(),u=o.getTexture2DUnit();t.uniform2i(s.x3d_TransmissionFramebufferSizeEXT,_.getWidth(),_.getHeight())}t.activeTexture(t.TEXTURE0+u),t.bindTexture(t.TEXTURE_2D,a),t.uniform1i(s.x3d_TransmissionFramebufferSamplerEXT,u),+this.getTextureBits()&&this.transmissionTextureNode?.setNamedShaderUniforms(t,s,i,s.x3d_TransmissionTextureEXT,this._transmissionTextureMapping.getValue(),n,r)}}()}),Object.defineProperties(Re,{...c().getStaticProperties("TransmissionMaterialExtension","X_ITE",1,"extensions","4.0"),fieldDefinitions:{value:new(_())([new(a())(l().inputOutput,"metadata",new(r().SFNode)),new(a())(l().inputOutput,"transmission",new(r().SFFloat)),new(a())(l().inputOutput,"transmissionTextureMapping",new(r().SFString)),new(a())(l().inputOutput,"transmissionTexture",new(r().SFNode))]),enumerable:!0}});const Me=Re,Fe=x().add("TransmissionMaterialExtension",Me);function Xe(e){g.call(this,e),this.addType(l().VolumeMaterialExtension),this.attenuationColorArray=new Float32Array(3)}Object.assign(Object.setPrototypeOf(Xe.prototype,g.prototype),{initialize(){g.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=N()(l().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:()=>A.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(Xe,{...c().getStaticProperties("VolumeMaterialExtension","X_ITE",1,"extensions","4.0"),fieldDefinitions:{value:new(_())([new(a())(l().inputOutput,"metadata",new(r().SFNode)),new(a())(l().inputOutput,"thickness",new(r().SFFloat)),new(a())(l().inputOutput,"thicknessTextureMapping",new(r().SFString)),new(a())(l().inputOutput,"thicknessTexture",new(r().SFNode)),new(a())(l().inputOutput,"attenuationDistance",new(r().SFFloat)(1e6)),new(a())(l().inputOutput,"attenuationColor",new(r().SFColor)(1,1,1))]),enumerable:!0}});const De=Xe,be=x().add("VolumeMaterialExtension",De);i().add({name:"X_ITE",concreteNodes:[C,D,V,k,H,K,W,ce,pe,xe,ge,Ae,Ce,Fe,be],abstractNodes:[g]});x().add("X_ITEComponent",undefined)})();
|
|
1
|
+
/* X_ITE v10.5.5 */
|
|
2
|
+
const e=window[Symbol.for("X_ITE.X3D-10.5.5")];(()=>{var t={n:e=>{var s=e&&e.__esModule?()=>e.default:()=>e;return t.d(s,{a:s}),s},d:(e,s)=>{for(var i in s)t.o(s,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:s[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const s=e.Components;var i=t.n(s);const n=e.Fields;var r=t.n(n);const o=e.X3DFieldDefinition;var a=t.n(o);const u=e.FieldDefinitionArray;var _=t.n(u);const h=e.X3DNode;var c=t.n(h);const d=e.X3DConstants;var p=t.n(d);const l=e.BitSet;var T=t.n(l);const S=e.Namespace;var x=t.n(S);function f(e){c().call(this,e),this.addType(p().X3DMaterialExtensionNode),this.textureBits=new(T())}Object.assign(Object.setPrototypeOf(f.prototype,c().prototype),{setTexture(e,t){e*=4,this.textureBits.remove(e,15),this.textureBits.add(e,t?.getTextureBits()??0)},getTextureBits(){return this.textureBits}}),Object.defineProperties(f,c().getStaticProperties("X3DMaterialExtensionNode","X_ITE",1));const E=f,g=x().add("X3DMaterialExtensionNode",E),O=e.X3DCast;var N=t.n(O);let m=0;const A={ANISOTROPY_MATERIAL_EXTENSION:m++,CLEARCOAT_MATERIAL_EXTENSION:m++,DIFFUSE_TRANSMISSION_EXTENSION:m++,DISPERSION_MATERIAL_EXTENSION:m++,EMISSIVE_STRENGTH_MATERIAL_EXTENSION:m++,IOR_MATERIAL_EXTENSION:m++,IRIDESCENCE_MATERIAL_EXTENSION:m++,SHEEN_MATERIAL_EXTENSION:m++,SPECULAR_MATERIAL_EXTENSION:m++,TRANSMISSION_MATERIAL_EXTENSION:m++,UNLIT_MATERIAL_EXTENSION:m++,VOLUME_MATERIAL_EXTENSION:m++},I=x().add("ExtensionKeys",A);function w(e){g.call(this,e),this.addType(p().AnisotropyMaterialExtension),this.anisotropyArray=new Float32Array(3)}Object.assign(Object.setPrototypeOf(w.prototype,g.prototype),{initialize(){g.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=N()(p().X3DSingleTextureNode,this._anisotropyTexture),this.setTexture(0,this.anisotropyTextureNode)},getExtensionKey:()=>I.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(w,{...c().getStaticProperties("AnisotropyMaterialExtension","X_ITE",1,"extensions","4.0"),fieldDefinitions:{value:new(_())([new(a())(p().inputOutput,"metadata",new(r().SFNode)),new(a())(p().inputOutput,"anisotropyStrength",new(r().SFFloat)),new(a())(p().inputOutput,"anisotropyRotation",new(r().SFFloat)),new(a())(p().inputOutput,"anisotropyTextureMapping",new(r().SFString)),new(a())(p().inputOutput,"anisotropyTexture",new(r().SFNode))]),enumerable:!0}});const y=w,C=x().add("AnisotropyMaterialExtension",y),R=e.X3DAppearanceChildNode;var M=t.n(R);function F(e){M().call(this,e),this.addType(p().BlendMode),this.factorTypes=new Map,this.equationTypes=new Map}Object.assign(Object.setPrototypeOf(F.prototype,M().prototype),{initialize(){M().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(F,{...c().getStaticProperties("BlendMode","X_ITE",1,"blendMode","3.3"),fieldDefinitions:{value:new(_())([new(a())(p().inputOutput,"metadata",new(r().SFNode)),new(a())(p().inputOutput,"blendColor",new(r().SFColorRGBA)),new(a())(p().inputOutput,"sourceColorFactor",new(r().SFString)("SRC_ALPHA")),new(a())(p().inputOutput,"sourceAlphaFactor",new(r().SFString)("ONE")),new(a())(p().inputOutput,"destinationColorFactor",new(r().SFString)("ONE_MINUS_SRC_ALPHA")),new(a())(p().inputOutput,"destinationAlphaFactor",new(r().SFString)("ONE_MINUS_SRC_ALPHA")),new(a())(p().inputOutput,"colorEquation",new(r().SFString)("FUNC_ADD")),new(a())(p().inputOutput,"alphaEquation",new(r().SFString)("FUNC_ADD"))]),enumerable:!0}});const X=F,D=x().add("BlendMode",X),L=e.Algorithm;var b=t.n(L);function U(e){g.call(this,e),this.addType(p().ClearcoatMaterialExtension)}Object.assign(Object.setPrototypeOf(U.prototype,g.prototype),{initialize(){g.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=N()(p().X3DSingleTextureNode,this._clearcoatTexture),this.setTexture(0,this.clearcoatTextureNode)},set_clearcoatRoughness__(){this.clearcoatRoughness=b().clamp(this._clearcoatRoughness.getValue(),0,1)},set_clearcoatRoughnessTexture__(){this.clearcoatRoughnessTextureNode=N()(p().X3DSingleTextureNode,this._clearcoatRoughnessTexture),this.setTexture(1,this.clearcoatRoughnessTextureNode)},set_clearcoatNormalTexture__(){this.clearcoatNormalTextureNode=N()(p().X3DSingleTextureNode,this._clearcoatNormalTexture),this.setTexture(2,this.clearcoatNormalTextureNode)},getExtensionKey:()=>I.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(U,{...c().getStaticProperties("ClearcoatMaterialExtension","X_ITE",1,"extensions","4.0"),fieldDefinitions:{value:new(_())([new(a())(p().inputOutput,"metadata",new(r().SFNode)),new(a())(p().inputOutput,"clearcoat",new(r().SFFloat)),new(a())(p().inputOutput,"clearcoatTextureMapping",new(r().SFString)),new(a())(p().inputOutput,"clearcoatTexture",new(r().SFNode)),new(a())(p().inputOutput,"clearcoatRoughness",new(r().SFFloat)),new(a())(p().inputOutput,"clearcoatRoughnessTextureMapping",new(r().SFString)),new(a())(p().inputOutput,"clearcoatRoughnessTexture",new(r().SFNode)),new(a())(p().inputOutput,"clearcoatNormalTextureMapping",new(r().SFString)),new(a())(p().inputOutput,"clearcoatNormalTexture",new(r().SFNode))]),enumerable:!0}});const P=U,V=x().add("ClearcoatMaterialExtension",P);function v(e){M().call(this,e),this.addType(p().DepthMode),this.addAlias("depthFunc",this._depthFunction)}Object.assign(Object.setPrototypeOf(v.prototype,M().prototype),{initialize(){M().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(v,{...c().getStaticProperties("DepthMode","X_ITE",1,"depthMode","4.0"),fieldDefinitions:{value:new(_())([new(a())(p().inputOutput,"metadata",new(r().SFNode)),new(a())(p().inputOutput,"polygonOffset",new(r().SFVec2f)),new(a())(p().inputOutput,"depthRange",new(r().SFVec2f)(0,1)),new(a())(p().inputOutput,"depthTest",new(r().SFBool)(!0)),new(a())(p().inputOutput,"depthFunction",new(r().SFString)("LESS_EQUAL")),new(a())(p().inputOutput,"depthMask",new(r().SFBool)(!0))]),enumerable:!0}});const B=v,k=x().add("DepthMode",B);function j(e){g.call(this,e),this.addType(p().DiffuseTransmissionMaterialExtension),this.diffuseTransmissionColorArray=new Float32Array(3)}Object.assign(Object.setPrototypeOf(j.prototype,g.prototype),{initialize(){g.prototype.initialize.call(this),this._diffuseTransmission.addInterest("set_diffuseTransmission__",this),this._diffuseTransmissionTexture.addInterest("set_diffuseTransmissionTexture__",this),this._diffuseTransmissionColor.addInterest("set_diffuseTransmissionColor__",this),this._diffuseTransmissionColorTexture.addInterest("set_diffuseTransmissionColorTexture__",this),this.set_diffuseTransmission__(),this.set_diffuseTransmissionTexture__(),this.set_diffuseTransmissionColor__(),this.set_diffuseTransmissionColorTexture__()},set_diffuseTransmission__(){this.diffuseTransmission=Math.max(this._diffuseTransmission.getValue(),0)},set_diffuseTransmissionTexture__(){this.diffuseTransmissionTextureNode=N()(p().X3DSingleTextureNode,this._diffuseTransmissionTexture),this.setTexture(0,this.diffuseTransmissionTextureNode)},set_diffuseTransmissionColor__(){const e=this.diffuseTransmissionColorArray,t=this._diffuseTransmissionColor.getValue();e[0]=t.r,e[1]=t.g,e[2]=t.b},set_diffuseTransmissionColorTexture__(){this.diffuseTransmissionColorTextureNode=N()(p().X3DSingleTextureNode,this._diffuseTransmissionColorTexture),this.setTexture(1,this.diffuseTransmissionColorTextureNode)},getExtensionKey:()=>I.DIFFUSE_TRANSMISSION_EXTENSION,getShaderOptions(e){e.push("X3D_DIFFUSE_TRANSMISSION_MATERIAL_EXT"),+this.getTextureBits()&&(e.push("X3D_MATERIAL_TEXTURES"),this.diffuseTransmissionTextureNode?.getShaderOptions(e,"DIFFUSE_TRANSMISSION",!0),this.diffuseTransmissionColorTextureNode?.getShaderOptions(e,"DIFFUSE_TRANSMISSION_COLOR",!0))},setShaderUniforms(e,t,s,i,n){e.uniform1f(t.x3d_DiffuseTransmissionEXT,this.diffuseTransmission),e.uniform3fv(t.x3d_DiffuseTransmissionColorEXT,this.diffuseTransmissionColorArray),+this.getTextureBits()&&(this.diffuseTransmissionTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_DiffuseTransmissionTextureEXT,this._diffuseTransmissionTextureMapping.getValue(),i,n),this.diffuseTransmissionColorTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_DiffuseTransmissionColorTextureEXT,this._diffuseTransmissionColorTextureMapping.getValue(),i,n))}}),Object.defineProperties(j,{...c().getStaticProperties("DiffuseTransmissionMaterialExtension","X_ITE",1,"extensions","4.0"),fieldDefinitions:{value:new(_())([new(a())(p().inputOutput,"metadata",new(r().SFNode)),new(a())(p().inputOutput,"diffuseTransmission",new(r().SFFloat)),new(a())(p().inputOutput,"diffuseTransmissionTextureMapping",new(r().SFString)),new(a())(p().inputOutput,"diffuseTransmissionTexture",new(r().SFNode)),new(a())(p().inputOutput,"diffuseTransmissionColor",new(r().SFColor)(1,1,1)),new(a())(p().inputOutput,"diffuseTransmissionColorTextureMapping",new(r().SFString)),new(a())(p().inputOutput,"diffuseTransmissionColorTexture",new(r().SFNode))]),enumerable:!0}});const H=j,G=x().add("DiffuseTransmissionMaterialExtension",H);function z(e){g.call(this,e),this.addType(p().DispersionMaterialExtension)}Object.assign(Object.setPrototypeOf(z.prototype,g.prototype),{initialize(){g.prototype.initialize.call(this),this._dispersion.addInterest("set_dispersion__",this),this.set_dispersion__()},set_dispersion__(){this.dispersion=Math.max(this._dispersion.getValue(),0)},getExtensionKey:()=>I.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(z,{...c().getStaticProperties("DispersionMaterialExtension","X_ITE",1,"extensions","4.0"),fieldDefinitions:{value:new(_())([new(a())(p().inputOutput,"metadata",new(r().SFNode)),new(a())(p().inputOutput,"dispersion",new(r().SFFloat))]),enumerable:!0}});const q=z,K=x().add("DispersionMaterialExtension",q);function Y(e){g.call(this,e),this.addType(p().EmissiveStrengthMaterialExtension)}Object.assign(Object.setPrototypeOf(Y.prototype,g.prototype),{initialize(){g.prototype.initialize.call(this),this._emissiveStrength.addInterest("set_emissiveStrength__",this),this.set_emissiveStrength__()},set_emissiveStrength__(){this.emissiveStrength=Math.max(this._emissiveStrength.getValue(),0)},getExtensionKey:()=>I.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(Y,{...c().getStaticProperties("EmissiveStrengthMaterialExtension","X_ITE",1,"extensions","4.0"),fieldDefinitions:{value:new(_())([new(a())(p().inputOutput,"metadata",new(r().SFNode)),new(a())(p().inputOutput,"emissiveStrength",new(r().SFFloat)(1))]),enumerable:!0}});const Q=Y,W=x().add("EmissiveStrengthMaterialExtension",Q),$=e.X3DShapeNode;var Z=t.n($);const J=e.TraverseType;var ee=t.n(J);const te=e.VertexArray;var se=t.n(te);e.Vector3;const ie=e.Matrix4;var ne=t.n(ie);const re=e.Box3;var oe=t.n(re);function ae(e){Z().call(this,e),this.addType(p().InstancedShape),this.addChildObjects(p().outputOnly,"matrices",new(r().SFTime)),this.numInstances=0,this.instancesStride=25*Float32Array.BYTES_PER_ELEMENT,this.matrixOffset=0,this.normalMatrixOffset=16*Float32Array.BYTES_PER_ELEMENT,this.matrices=[]}Object.assign(Object.setPrototypeOf(ae.prototype,Z().prototype),{initialize(){Z().prototype.initialize.call(this);const e=this.getBrowser(),t=e.getContext();e.getContext().getVersion()<2||(this.instances=Object.assign(t.createBuffer(),{vertexArrayObject:new(se())(t),thickLinesVertexArrayObject:new(se())(t)}),this._translations.addInterest("set_transform__",this),this._rotations.addInterest("set_transform__",this),this._scales.addInterest("set_transform__",this),this._scaleOrientations.addInterest("set_transform__",this),this._centers.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(oe());return function(){if(this._bboxSize.getValue().equals(this.getDefaultBBoxSize()))if(this.getGeometry()){this.bbox.set();const t=this.getGeometry().getBBox();for(const s of this.matrices)this.bbox.add(e.assign(t).multRight(s))}else this.bbox.set();else this.bbox.set(this._bboxSize.getValue(),this._bboxCenter.getValue());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=this._scaleOrientations,r=this._centers,o=t.length,a=s.length,u=i.length,_=n.length,h=r.length,c=Math.max(o,a,u,_,h),d=this.instancesStride/Float32Array.BYTES_PER_ELEMENT,p=this.instancesStride*c,l=new Float32Array(p);this.numInstances=c;for(let e=0,p=0;e<c;++e,p+=d){const c=this.matrices[e]??=new(ne());c.set(o?t[Math.min(e,o-1)].getValue():null,a?s[Math.min(e,a-1)].getValue():null,u?i[Math.min(e,u-1)].getValue():null,_?n[Math.min(e,_-1)].getValue():null,h?r[Math.min(e,h-1)].getValue():null),l.set(c,p),l.set(c.submatrix.transpose().inverse(),p+16)}this.matrices.length=c,e.bindBuffer(e.ARRAY_BUFFER,this.instances),e.bufferData(e.ARRAY_BUFFER,l,e.DYNAMIC_DRAW),this.set_bbox__()},set_geometry__(){Z().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 ee().POINTER:this._pointerEvents.getValue()&&t.addPointingShape(this);break;case ee().PICKING:break;case ee().COLLISION:t.addCollisionShape(this);break;case ee().SHADOW:this._castShadow.getValue()&&t.addShadowShape(this);break;case ee().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(ae,{...c().getStaticProperties("InstancedShape","X_ITE",1,"children","2.0"),fieldDefinitions:{value:new(_())([new(a())(p().inputOutput,"metadata",new(r().SFNode)),new(a())(p().inputOutput,"translations",new(r().MFVec3f)),new(a())(p().inputOutput,"rotations",new(r().MFRotation)),new(a())(p().inputOutput,"scales",new(r().MFVec3f)),new(a())(p().inputOutput,"scaleOrientations",new(r().MFRotation)),new(a())(p().inputOutput,"centers",new(r().MFVec3f)),new(a())(p().inputOutput,"pointerEvents",new(r().SFBool)(!0)),new(a())(p().inputOutput,"castShadow",new(r().SFBool)(!0)),new(a())(p().inputOutput,"visible",new(r().SFBool)(!0)),new(a())(p().inputOutput,"bboxDisplay",new(r().SFBool)),new(a())(p().initializeOnly,"bboxSize",new(r().SFVec3f)(-1,-1,-1)),new(a())(p().initializeOnly,"bboxCenter",new(r().SFVec3f)),new(a())(p().inputOutput,"appearance",new(r().SFNode)),new(a())(p().inputOutput,"geometry",new(r().SFNode))]),enumerable:!0}});const ue=ae,_e=x().add("InstancedShape",ue);function he(e){g.call(this,e),this.addType(p().IORMaterialExtension)}Object.assign(Object.setPrototypeOf(he.prototype,g.prototype),{initialize(){g.prototype.initialize.call(this),this._indexOfRefraction.addInterest("set_indexOfRefraction__",this),this.set_indexOfRefraction__()},set_indexOfRefraction__(){this.indexOfRefraction=Math.max(this._indexOfRefraction.getValue(),1)},getExtensionKey:()=>I.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(he,{...c().getStaticProperties("IORMaterialExtension","X_ITE",1,"extensions","4.0"),fieldDefinitions:{value:new(_())([new(a())(p().inputOutput,"metadata",new(r().SFNode)),new(a())(p().inputOutput,"indexOfRefraction",new(r().SFFloat)(1.5))]),enumerable:!0}});const ce=he,de=x().add("IORMaterialExtension",ce);function pe(e){g.call(this,e),this.addType(p().IridescenceMaterialExtension)}Object.assign(Object.setPrototypeOf(pe.prototype,g.prototype),{initialize(){g.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=N()(p().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=N()(p().X3DSingleTextureNode,this._iridescenceThicknessTexture),this.setTexture(1,this.iridescenceThicknessTextureNode)},getExtensionKey:()=>I.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(pe,{...c().getStaticProperties("IridescenceMaterialExtension","X_ITE",1,"extensions","4.0"),fieldDefinitions:{value:new(_())([new(a())(p().inputOutput,"metadata",new(r().SFNode)),new(a())(p().inputOutput,"iridescence",new(r().SFFloat)),new(a())(p().inputOutput,"iridescenceTextureMapping",new(r().SFString)),new(a())(p().inputOutput,"iridescenceTexture",new(r().SFNode)),new(a())(p().inputOutput,"iridescenceIndexOfRefraction",new(r().SFFloat)(1.3)),new(a())(p().inputOutput,"iridescenceThicknessMinimum",new(r().SFFloat)(100)),new(a())(p().inputOutput,"iridescenceThicknessMaximum",new(r().SFFloat)(400)),new(a())(p().inputOutput,"iridescenceThicknessTextureMapping",new(r().SFString)),new(a())(p().inputOutput,"iridescenceThicknessTexture",new(r().SFNode))]),enumerable:!0}});const le=pe,Te=x().add("IridescenceMaterialExtension",le);function Se(e){g.call(this,e),this.addType(p().SheenMaterialExtension),this.sheenColorArray=new Float32Array(3)}Object.assign(Object.setPrototypeOf(Se.prototype,g.prototype),{initialize(){g.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=N()(p().X3DSingleTextureNode,this._sheenColorTexture),this.setTexture(0,this.sheenColorTextureNode)},set_sheenRoughness__(){this.sheenRoughness=b().clamp(this._sheenRoughness.getValue(),0,1)},set_sheenRoughnessTexture__(){this.sheenRoughnessTextureNode=N()(p().X3DSingleTextureNode,this._sheenRoughnessTexture),this.setTexture(1,this.sheenRoughnessTextureNode)},getExtensionKey:()=>I.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(Se,{...c().getStaticProperties("SheenMaterialExtension","X_ITE",1,"extensions","4.0"),fieldDefinitions:{value:new(_())([new(a())(p().inputOutput,"metadata",new(r().SFNode)),new(a())(p().inputOutput,"sheenColor",new(r().SFColor)),new(a())(p().inputOutput,"sheenColorTextureMapping",new(r().SFString)),new(a())(p().inputOutput,"sheenColorTexture",new(r().SFNode)),new(a())(p().inputOutput,"sheenRoughness",new(r().SFFloat)),new(a())(p().inputOutput,"sheenRoughnessTextureMapping",new(r().SFString)),new(a())(p().inputOutput,"sheenRoughnessTexture",new(r().SFNode))]),enumerable:!0}});const xe=Se,fe=x().add("SheenMaterialExtension",xe),Ee=e.X3DOneSidedMaterialNode;var ge=t.n(Ee);function Oe(e){console.warn("SpecularGlossinessMaterial is depreciated, please use PhysicalMaterial instead."),ge().call(this,e),this.addType(p().SpecularGlossinessMaterial),this.materialKey="4/",this.diffuseColorArray=new Float32Array(3),this.specularColorArray=new Float32Array(3),this.extensionNodes=[]}Object.assign(Object.setPrototypeOf(Oe.prototype,ge().prototype),{initialize(){ge().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=N()(p().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=N()(p().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=N()(p().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=N()(p().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(p().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){ge().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(Oe,{...c().getStaticProperties("SpecularGlossinessMaterial","X_ITE",1,"material","4.0"),fieldDefinitions:{value:new(_())([new(a())(p().inputOutput,"metadata",new(r().SFNode)),new(a())(p().inputOutput,"diffuseColor",new(r().SFColor)(1,1,1)),new(a())(p().inputOutput,"diffuseTextureMapping",new(r().SFString)),new(a())(p().inputOutput,"diffuseTexture",new(r().SFNode)),new(a())(p().inputOutput,"specularColor",new(r().SFColor)(1,1,1)),new(a())(p().inputOutput,"glossiness",new(r().SFFloat)(1)),new(a())(p().inputOutput,"specularGlossinessTextureMapping",new(r().SFString)),new(a())(p().inputOutput,"specularGlossinessTexture",new(r().SFNode)),new(a())(p().inputOutput,"emissiveColor",new(r().SFColor)),new(a())(p().inputOutput,"emissiveTextureMapping",new(r().SFString)),new(a())(p().inputOutput,"emissiveTexture",new(r().SFNode)),new(a())(p().inputOutput,"occlusionStrength",new(r().SFFloat)(1)),new(a())(p().inputOutput,"occlusionTextureMapping",new(r().SFString)),new(a())(p().inputOutput,"occlusionTexture",new(r().SFNode)),new(a())(p().inputOutput,"normalScale",new(r().SFFloat)(1)),new(a())(p().inputOutput,"normalTextureMapping",new(r().SFString)),new(a())(p().inputOutput,"normalTexture",new(r().SFNode)),new(a())(p().inputOutput,"transparency",new(r().SFFloat)),new(a())(p().inputOutput,"extensions",new(r().MFNode))]),enumerable:!0}});for(const e of Object.values(Oe.prototype.getTextureIndices()))Oe.prototype[`setTexture${e}`]=function(e,t){this.setTexture(e,t)};const Ne=Oe,me=x().add("SpecularGlossinessMaterial",Ne);function Ae(e){g.call(this,e),this.addType(p().SpecularMaterialExtension),this.specularColorArray=new Float32Array(3)}Object.assign(Object.setPrototypeOf(Ae.prototype,g.prototype),{initialize(){g.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=N()(p().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=N()(p().X3DSingleTextureNode,this._specularColorTexture),this.setTexture(1,this.specularColorTextureNode)},getExtensionKey:()=>I.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(Ae,{...c().getStaticProperties("SpecularMaterialExtension","X_ITE",1,"extensions","4.0"),fieldDefinitions:{value:new(_())([new(a())(p().inputOutput,"metadata",new(r().SFNode)),new(a())(p().inputOutput,"specular",new(r().SFFloat)(1)),new(a())(p().inputOutput,"specularTextureMapping",new(r().SFString)),new(a())(p().inputOutput,"specularTexture",new(r().SFNode)),new(a())(p().inputOutput,"specularColor",new(r().SFColor)(1,1,1)),new(a())(p().inputOutput,"specularColorTextureMapping",new(r().SFString)),new(a())(p().inputOutput,"specularColorTexture",new(r().SFNode))]),enumerable:!0}});const Ie=Ae,we=x().add("SpecularMaterialExtension",Ie);function ye(e){g.call(this,e),this.addType(p().TransmissionMaterialExtension)}Object.assign(Object.setPrototypeOf(ye.prototype,g.prototype),{initialize(){g.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=N()(p().X3DSingleTextureNode,this._transmissionTexture),this.setTexture(0,this.transmissionTextureNode)},getExtensionKey:()=>I.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:function(){const e=new Float32Array(16);return function(t,s,i,n,r){const o=this.getBrowser();if(t.uniform1f(s.x3d_TransmissionEXT,this.transmission),i.isTransmission()){var a=o.getDefaultTexture2D(),u=o.getDefaultTexture2DUnit();t.uniformMatrix4fv(s.x3d_ModelViewMatrix,!1,e),t.uniform2i(s.x3d_TransmissionFramebufferSizeEXT,1,1)}else{var _=o.getTransmissionBuffer();a=_.getColorTexture(),u=o.getTexture2DUnit();t.uniform2i(s.x3d_TransmissionFramebufferSizeEXT,_.getWidth(),_.getHeight())}t.activeTexture(t.TEXTURE0+u),t.bindTexture(t.TEXTURE_2D,a),t.uniform1i(s.x3d_TransmissionFramebufferSamplerEXT,u),+this.getTextureBits()&&this.transmissionTextureNode?.setNamedShaderUniforms(t,s,i,s.x3d_TransmissionTextureEXT,this._transmissionTextureMapping.getValue(),n,r)}}()}),Object.defineProperties(ye,{...c().getStaticProperties("TransmissionMaterialExtension","X_ITE",1,"extensions","4.0"),fieldDefinitions:{value:new(_())([new(a())(p().inputOutput,"metadata",new(r().SFNode)),new(a())(p().inputOutput,"transmission",new(r().SFFloat)),new(a())(p().inputOutput,"transmissionTextureMapping",new(r().SFString)),new(a())(p().inputOutput,"transmissionTexture",new(r().SFNode))]),enumerable:!0}});const Ce=ye,Re=x().add("TransmissionMaterialExtension",Ce);function Me(e){g.call(this,e),this.addType(p().VolumeMaterialExtension),this.attenuationColorArray=new Float32Array(3)}Object.assign(Object.setPrototypeOf(Me.prototype,g.prototype),{initialize(){g.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=N()(p().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:()=>I.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(Me,{...c().getStaticProperties("VolumeMaterialExtension","X_ITE",1,"extensions","4.0"),fieldDefinitions:{value:new(_())([new(a())(p().inputOutput,"metadata",new(r().SFNode)),new(a())(p().inputOutput,"thickness",new(r().SFFloat)),new(a())(p().inputOutput,"thicknessTextureMapping",new(r().SFString)),new(a())(p().inputOutput,"thicknessTexture",new(r().SFNode)),new(a())(p().inputOutput,"attenuationDistance",new(r().SFFloat)(1e6)),new(a())(p().inputOutput,"attenuationColor",new(r().SFColor)(1,1,1))]),enumerable:!0}});const Fe=Me,Xe=x().add("VolumeMaterialExtension",Fe);i().add({name:"X_ITE",concreteNodes:[C,D,V,k,G,K,W,_e,de,Te,fe,me,we,Re,Xe],abstractNodes:[g]});x().add("X_ITEComponent",undefined)})();
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
* https://github.com/KhronosGroup/KTX-Software/releases/
|
|
13
13
|
* https://github.khronos.org/KTX-Software/ktxjswrappers/index.html
|
|
14
14
|
* https://github.com/KhronosGroup/KTX-Software/tree/main/tests/testimages
|
|
15
|
+
* https://github.com/KhronosGroup/glTF-Sample-Environments
|
|
15
16
|
|
|
16
17
|
## Draco
|
|
17
18
|
|