x_ite 10.2.0 → 10.3.0
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/LICENSE.md +4 -0
- package/dist/assets/components/{Annotation.js → AnnotationComponent.js} +138 -260
- package/dist/assets/components/AnnotationComponent.min.js +2 -0
- package/dist/assets/components/{CADGeometry.js → CADGeometryComponent.js} +177 -299
- package/dist/assets/components/CADGeometryComponent.min.js +2 -0
- package/dist/assets/components/{CubeMapTexturing.js → CubeMapTexturingComponent.js} +204 -255
- package/dist/assets/components/CubeMapTexturingComponent.min.js +2 -0
- package/dist/assets/components/DISComponent.js +994 -0
- package/dist/assets/components/DISComponent.min.js +2 -0
- package/dist/assets/components/{EventUtilities.js → EventUtilitiesComponent.js} +121 -274
- package/dist/assets/components/EventUtilitiesComponent.min.js +2 -0
- package/dist/assets/components/{Geometry2D.js → Geometry2DComponent.js} +202 -356
- package/dist/assets/components/Geometry2DComponent.min.js +2 -0
- package/dist/assets/components/{Geospatial.js → GeospatialComponent.js} +449 -676
- package/dist/assets/components/GeospatialComponent.min.js +2 -0
- package/dist/assets/components/{HAnim.js → HAnimComponent.js} +277 -387
- package/dist/assets/components/HAnimComponent.min.js +2 -0
- package/dist/assets/components/{KeyDeviceSensor.js → KeyDeviceSensorComponent.js} +71 -114
- package/dist/assets/components/KeyDeviceSensorComponent.min.js +2 -0
- package/dist/assets/components/{Layout.js → LayoutComponent.js} +234 -339
- package/dist/assets/components/LayoutComponent.min.js +2 -0
- package/dist/assets/components/{NURBS.js → NURBSComponent.js} +349 -652
- package/dist/assets/components/NURBSComponent.min.js +2 -0
- package/dist/assets/components/{ParticleSystems.js → ParticleSystemsComponent.js} +345 -674
- package/dist/assets/components/ParticleSystemsComponent.min.js +2 -0
- package/dist/assets/components/{Picking.js → PickingComponent.js} +245 -472
- package/dist/assets/components/PickingComponent.min.js +2 -0
- package/dist/assets/components/{RigidBodyPhysics.js → RigidBodyPhysicsComponent.js} +496 -804
- package/dist/assets/components/RigidBodyPhysicsComponent.min.js +2 -0
- package/dist/assets/components/ScriptingComponent.js +899 -0
- package/dist/assets/components/ScriptingComponent.min.js +2 -0
- package/dist/assets/components/{Text.js → TextComponent.js} +200 -250
- package/dist/assets/components/TextComponent.min.js +2 -0
- package/dist/assets/components/{TextureProjection.js → TextureProjectionComponent.js} +144 -190
- package/dist/assets/components/TextureProjectionComponent.min.js +2 -0
- package/dist/assets/components/{Texturing3D.js → Texturing3DComponent.js} +223 -385
- package/dist/assets/components/Texturing3DComponent.min.js +2 -0
- package/dist/assets/components/{VolumeRendering.js → VolumeRenderingComponent.js} +316 -603
- package/dist/assets/components/VolumeRenderingComponent.min.js +2 -0
- package/dist/assets/components/{X_ITE.js → X_ITEComponent.js} +301 -599
- package/dist/assets/components/X_ITEComponent.min.js +2 -0
- package/dist/assets/images/XR.svg +74 -0
- package/dist/example.html +1 -1
- package/dist/x_ite.css +1 -1
- package/dist/x_ite.d.ts +68 -11
- package/dist/x_ite.js +2768 -5722
- package/dist/x_ite.min.js +2 -1
- package/dist/x_ite.min.mjs +2 -1
- package/dist/x_ite.mjs +2768 -5722
- package/dist/x_ite.zip +0 -0
- package/package.json +7 -5
- package/dist/assets/components/Annotation.min.js +0 -1
- package/dist/assets/components/CADGeometry.min.js +0 -1
- package/dist/assets/components/CubeMapTexturing.min.js +0 -1
- package/dist/assets/components/DIS.js +0 -1104
- package/dist/assets/components/DIS.min.js +0 -1
- package/dist/assets/components/EventUtilities.min.js +0 -1
- package/dist/assets/components/Geometry2D.min.js +0 -1
- package/dist/assets/components/Geospatial.min.js +0 -1
- package/dist/assets/components/HAnim.min.js +0 -1
- package/dist/assets/components/KeyDeviceSensor.min.js +0 -1
- package/dist/assets/components/Layout.min.js +0 -1
- package/dist/assets/components/NURBS.min.js +0 -1
- package/dist/assets/components/ParticleSystems.min.js +0 -1
- package/dist/assets/components/Picking.min.js +0 -1
- package/dist/assets/components/RigidBodyPhysics.min.js +0 -1
- package/dist/assets/components/Scripting.js +0 -927
- package/dist/assets/components/Scripting.min.js +0 -1
- package/dist/assets/components/Text.min.js +0 -1
- package/dist/assets/components/TextureProjection.min.js +0 -1
- package/dist/assets/components/Texturing3D.min.js +0 -1
- package/dist/assets/components/VolumeRendering.min.js +0 -1
- package/dist/assets/components/X_ITE.min.js +0 -1
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
/* X_ITE v10.
|
|
1
|
+
/* X_ITE v10.3.0 */
|
|
2
|
+
const __X_ITE_X3D__ = window [Symbol .for ("X_ITE.X3D-10.3.0")];
|
|
3
|
+
/******/ (() => { // webpackBootstrap
|
|
2
4
|
/******/ "use strict";
|
|
3
5
|
/******/ // The require scope
|
|
4
6
|
/******/ var __webpack_require__ = {};
|
|
@@ -37,39 +39,42 @@
|
|
|
37
39
|
|
|
38
40
|
// UNUSED EXPORTS: default
|
|
39
41
|
|
|
40
|
-
;// CONCATENATED MODULE: external "
|
|
41
|
-
const
|
|
42
|
-
var
|
|
43
|
-
;// CONCATENATED MODULE: external "
|
|
44
|
-
const
|
|
45
|
-
var
|
|
46
|
-
;// CONCATENATED MODULE: external "
|
|
47
|
-
const
|
|
48
|
-
var
|
|
49
|
-
;// CONCATENATED MODULE: external "
|
|
50
|
-
const
|
|
51
|
-
var
|
|
52
|
-
;// CONCATENATED MODULE: external "
|
|
53
|
-
const
|
|
54
|
-
var
|
|
55
|
-
;// CONCATENATED MODULE: external "
|
|
56
|
-
const
|
|
57
|
-
var
|
|
58
|
-
;// CONCATENATED MODULE: external "
|
|
59
|
-
const
|
|
60
|
-
var
|
|
61
|
-
;// CONCATENATED MODULE: external "
|
|
62
|
-
const
|
|
63
|
-
var
|
|
64
|
-
;// CONCATENATED MODULE: external "
|
|
65
|
-
const
|
|
66
|
-
var
|
|
67
|
-
;// CONCATENATED MODULE: external "
|
|
68
|
-
const
|
|
69
|
-
var
|
|
70
|
-
;// CONCATENATED MODULE: external "
|
|
71
|
-
const
|
|
72
|
-
var
|
|
42
|
+
;// CONCATENATED MODULE: external "__X_ITE_X3D__ .Components"
|
|
43
|
+
const external_X_ITE_X3D_Components_namespaceObject = __X_ITE_X3D__ .Components;
|
|
44
|
+
var external_X_ITE_X3D_Components_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_Components_namespaceObject);
|
|
45
|
+
;// CONCATENATED MODULE: external "__X_ITE_X3D__ .Fields"
|
|
46
|
+
const external_X_ITE_X3D_Fields_namespaceObject = __X_ITE_X3D__ .Fields;
|
|
47
|
+
var external_X_ITE_X3D_Fields_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_Fields_namespaceObject);
|
|
48
|
+
;// CONCATENATED MODULE: external "__X_ITE_X3D__ .X3DFieldDefinition"
|
|
49
|
+
const external_X_ITE_X3D_X3DFieldDefinition_namespaceObject = __X_ITE_X3D__ .X3DFieldDefinition;
|
|
50
|
+
var external_X_ITE_X3D_X3DFieldDefinition_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_X3DFieldDefinition_namespaceObject);
|
|
51
|
+
;// CONCATENATED MODULE: external "__X_ITE_X3D__ .FieldDefinitionArray"
|
|
52
|
+
const external_X_ITE_X3D_FieldDefinitionArray_namespaceObject = __X_ITE_X3D__ .FieldDefinitionArray;
|
|
53
|
+
var external_X_ITE_X3D_FieldDefinitionArray_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_FieldDefinitionArray_namespaceObject);
|
|
54
|
+
;// CONCATENATED MODULE: external "__X_ITE_X3D__ .X3DNode"
|
|
55
|
+
const external_X_ITE_X3D_X3DNode_namespaceObject = __X_ITE_X3D__ .X3DNode;
|
|
56
|
+
var external_X_ITE_X3D_X3DNode_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_X3DNode_namespaceObject);
|
|
57
|
+
;// CONCATENATED MODULE: external "__X_ITE_X3D__ .X3DLightNode"
|
|
58
|
+
const external_X_ITE_X3D_X3DLightNode_namespaceObject = __X_ITE_X3D__ .X3DLightNode;
|
|
59
|
+
var external_X_ITE_X3D_X3DLightNode_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_X3DLightNode_namespaceObject);
|
|
60
|
+
;// CONCATENATED MODULE: external "__X_ITE_X3D__ .X3DConstants"
|
|
61
|
+
const external_X_ITE_X3D_X3DConstants_namespaceObject = __X_ITE_X3D__ .X3DConstants;
|
|
62
|
+
var external_X_ITE_X3D_X3DConstants_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_X3DConstants_namespaceObject);
|
|
63
|
+
;// CONCATENATED MODULE: external "__X_ITE_X3D__ .X3DCast"
|
|
64
|
+
const external_X_ITE_X3D_X3DCast_namespaceObject = __X_ITE_X3D__ .X3DCast;
|
|
65
|
+
var external_X_ITE_X3D_X3DCast_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_X3DCast_namespaceObject);
|
|
66
|
+
;// CONCATENATED MODULE: external "__X_ITE_X3D__ .Vector3"
|
|
67
|
+
const external_X_ITE_X3D_Vector3_namespaceObject = __X_ITE_X3D__ .Vector3;
|
|
68
|
+
var external_X_ITE_X3D_Vector3_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_Vector3_namespaceObject);
|
|
69
|
+
;// CONCATENATED MODULE: external "__X_ITE_X3D__ .Rotation4"
|
|
70
|
+
const external_X_ITE_X3D_Rotation4_namespaceObject = __X_ITE_X3D__ .Rotation4;
|
|
71
|
+
var external_X_ITE_X3D_Rotation4_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_Rotation4_namespaceObject);
|
|
72
|
+
;// CONCATENATED MODULE: external "__X_ITE_X3D__ .Matrix4"
|
|
73
|
+
const external_X_ITE_X3D_Matrix4_namespaceObject = __X_ITE_X3D__ .Matrix4;
|
|
74
|
+
var external_X_ITE_X3D_Matrix4_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_Matrix4_namespaceObject);
|
|
75
|
+
;// CONCATENATED MODULE: external "__X_ITE_X3D__ .Namespace"
|
|
76
|
+
const external_X_ITE_X3D_Namespace_namespaceObject = __X_ITE_X3D__ .Namespace;
|
|
77
|
+
var external_X_ITE_X3D_Namespace_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_Namespace_namespaceObject);
|
|
73
78
|
;// CONCATENATED MODULE: ./src/x_ite/Components/TextureProjection/X3DTextureProjectorNode.js
|
|
74
79
|
/*******************************************************************************
|
|
75
80
|
*
|
|
@@ -125,22 +130,23 @@ var Namespace_default = /*#__PURE__*/__webpack_require__.n(Namespace_namespaceOb
|
|
|
125
130
|
|
|
126
131
|
|
|
127
132
|
|
|
133
|
+
|
|
128
134
|
function X3DTextureProjectorNode (executionContext)
|
|
129
135
|
{
|
|
130
|
-
|
|
136
|
+
external_X_ITE_X3D_X3DLightNode_default().call (this, executionContext);
|
|
131
137
|
|
|
132
|
-
this .addType ((
|
|
138
|
+
this .addType ((external_X_ITE_X3D_X3DConstants_default()).X3DTextureProjectorNode);
|
|
133
139
|
|
|
134
140
|
this ._location .setUnit ("length");
|
|
135
141
|
this ._farDistance .setUnit ("length");
|
|
136
142
|
this ._location .setUnit ("length");
|
|
137
143
|
}
|
|
138
144
|
|
|
139
|
-
Object .assign (Object .setPrototypeOf (X3DTextureProjectorNode .prototype, (
|
|
145
|
+
Object .assign (Object .setPrototypeOf (X3DTextureProjectorNode .prototype, (external_X_ITE_X3D_X3DLightNode_default()).prototype),
|
|
140
146
|
{
|
|
141
147
|
initialize ()
|
|
142
148
|
{
|
|
143
|
-
|
|
149
|
+
external_X_ITE_X3D_X3DLightNode_default().prototype .initialize .call (this);
|
|
144
150
|
|
|
145
151
|
this ._nearDistance .addInterest ("set_nearDistance__", this);
|
|
146
152
|
this ._farDistance .addInterest ("set_farDistance__", this);
|
|
@@ -189,7 +195,7 @@ Object .assign (Object .setPrototypeOf (X3DTextureProjectorNode .prototype, (X3D
|
|
|
189
195
|
getBiasMatrix: (() =>
|
|
190
196
|
{
|
|
191
197
|
// Transforms normalized coords from range (-1, 1) to (0, 1).
|
|
192
|
-
const biasMatrix = new (
|
|
198
|
+
const biasMatrix = new (external_X_ITE_X3D_Matrix4_default()) (0.5, 0.0, 0.0, 0.0,
|
|
193
199
|
0.0, 0.5, 0.0, 0.0,
|
|
194
200
|
0.0, 0.0, 0.5, 0.0,
|
|
195
201
|
0.5, 0.5, 0.5, 1.0);
|
|
@@ -221,7 +227,7 @@ Object .assign (Object .setPrototypeOf (X3DTextureProjectorNode .prototype, (X3D
|
|
|
221
227
|
{
|
|
222
228
|
this .textureNode ?.removeInterest ("set_aspectRatio__", this);
|
|
223
229
|
|
|
224
|
-
this .textureNode =
|
|
230
|
+
this .textureNode = external_X_ITE_X3D_X3DCast_default() ((external_X_ITE_X3D_X3DConstants_default()).X3DTexture2DNode, this ._texture);
|
|
225
231
|
|
|
226
232
|
this .textureNode ?.addInterest ("set_aspectRatio__", this);
|
|
227
233
|
|
|
@@ -239,34 +245,21 @@ Object .assign (Object .setPrototypeOf (X3DTextureProjectorNode .prototype, (X3D
|
|
|
239
245
|
},
|
|
240
246
|
});
|
|
241
247
|
|
|
242
|
-
Object .defineProperties (X3DTextureProjectorNode,
|
|
243
|
-
{
|
|
244
|
-
typeName:
|
|
245
|
-
{
|
|
246
|
-
value: "X3DTextureProjectorNode",
|
|
247
|
-
enumerable: true,
|
|
248
|
-
},
|
|
249
|
-
componentInfo:
|
|
250
|
-
{
|
|
251
|
-
value: Object .freeze ({ name: "TextureProjection", level: 4 }),
|
|
252
|
-
enumerable: true,
|
|
253
|
-
},
|
|
254
|
-
});
|
|
248
|
+
Object .defineProperties (X3DTextureProjectorNode, external_X_ITE_X3D_X3DNode_default().getStaticProperties ("X3DTextureProjectorNode", "TextureProjection", 4));
|
|
255
249
|
|
|
256
250
|
const __default__ = X3DTextureProjectorNode;
|
|
257
251
|
;
|
|
258
252
|
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
var ObjectCache_default = /*#__PURE__*/__webpack_require__.n(ObjectCache_namespaceObject);
|
|
253
|
+
/* harmony default export */ const TextureProjection_X3DTextureProjectorNode = (external_X_ITE_X3D_Namespace_default().add ("X3DTextureProjectorNode", __default__));
|
|
254
|
+
;// CONCATENATED MODULE: external "__X_ITE_X3D__ .Camera"
|
|
255
|
+
const external_X_ITE_X3D_Camera_namespaceObject = __X_ITE_X3D__ .Camera;
|
|
256
|
+
var external_X_ITE_X3D_Camera_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_Camera_namespaceObject);
|
|
257
|
+
;// CONCATENATED MODULE: external "__X_ITE_X3D__ .MatrixStack"
|
|
258
|
+
const external_X_ITE_X3D_MatrixStack_namespaceObject = __X_ITE_X3D__ .MatrixStack;
|
|
259
|
+
var external_X_ITE_X3D_MatrixStack_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_MatrixStack_namespaceObject);
|
|
260
|
+
;// CONCATENATED MODULE: external "__X_ITE_X3D__ .ObjectCache"
|
|
261
|
+
const external_X_ITE_X3D_ObjectCache_namespaceObject = __X_ITE_X3D__ .ObjectCache;
|
|
262
|
+
var external_X_ITE_X3D_ObjectCache_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_ObjectCache_namespaceObject);
|
|
270
263
|
;// CONCATENATED MODULE: ./src/x_ite/Components/TextureProjection/TextureProjector.js
|
|
271
264
|
/*******************************************************************************
|
|
272
265
|
*
|
|
@@ -327,22 +320,23 @@ var ObjectCache_default = /*#__PURE__*/__webpack_require__.n(ObjectCache_namespa
|
|
|
327
320
|
|
|
328
321
|
|
|
329
322
|
|
|
330
|
-
|
|
323
|
+
|
|
324
|
+
const TextureProjectorCache = external_X_ITE_X3D_ObjectCache_default() (TextureProjectorContainer);
|
|
331
325
|
|
|
332
326
|
function TextureProjectorContainer ()
|
|
333
327
|
{
|
|
334
|
-
this .projectionMatrix = new (
|
|
335
|
-
this .modelViewMatrix = new (
|
|
336
|
-
this .modelMatrix = new (
|
|
337
|
-
this .invTextureSpaceMatrix = new (
|
|
338
|
-
this .invTextureSpaceProjectionMatrix = new (
|
|
339
|
-
this .location = new (
|
|
328
|
+
this .projectionMatrix = new (external_X_ITE_X3D_Matrix4_default()) ();
|
|
329
|
+
this .modelViewMatrix = new (external_X_ITE_X3D_MatrixStack_default()) ((external_X_ITE_X3D_Matrix4_default()));
|
|
330
|
+
this .modelMatrix = new (external_X_ITE_X3D_Matrix4_default()) ();
|
|
331
|
+
this .invTextureSpaceMatrix = new (external_X_ITE_X3D_Matrix4_default()) ();
|
|
332
|
+
this .invTextureSpaceProjectionMatrix = new (external_X_ITE_X3D_Matrix4_default()) ();
|
|
333
|
+
this .location = new (external_X_ITE_X3D_Vector3_default()) ();
|
|
340
334
|
this .locationArray = new Float32Array (3);
|
|
341
|
-
this .direction = new (
|
|
342
|
-
this .rotation = new (
|
|
343
|
-
this .matrix = new (
|
|
335
|
+
this .direction = new (external_X_ITE_X3D_Vector3_default()) ();
|
|
336
|
+
this .rotation = new (external_X_ITE_X3D_Rotation4_default()) ();
|
|
337
|
+
this .matrix = new (external_X_ITE_X3D_Matrix4_default()) ();
|
|
344
338
|
this .matrixArray = new Float32Array (16);
|
|
345
|
-
this .textureMatrix = new (
|
|
339
|
+
this .textureMatrix = new (external_X_ITE_X3D_Matrix4_default()) ();
|
|
346
340
|
}
|
|
347
341
|
|
|
348
342
|
Object .assign (TextureProjectorContainer .prototype,
|
|
@@ -364,9 +358,9 @@ Object .assign (TextureProjectorContainer .prototype,
|
|
|
364
358
|
lightNode = this .lightNode,
|
|
365
359
|
cameraSpaceMatrix = renderObject .getCameraSpaceMatrix () .get (),
|
|
366
360
|
modelMatrix = this .modelMatrix .assign (this .modelViewMatrix .get ()) .multRight (cameraSpaceMatrix),
|
|
367
|
-
invTextureSpaceMatrix = this .invTextureSpaceMatrix .assign (this .global ? modelMatrix : (
|
|
361
|
+
invTextureSpaceMatrix = this .invTextureSpaceMatrix .assign (this .global ? modelMatrix : (external_X_ITE_X3D_Matrix4_default()).Identity);
|
|
368
362
|
|
|
369
|
-
this .rotation .setFromToVec ((
|
|
363
|
+
this .rotation .setFromToVec ((external_X_ITE_X3D_Vector3_default()).zAxis, this .direction .assign (lightNode .getDirection ()) .negate ());
|
|
370
364
|
lightNode .straightenHorizon (this .rotation);
|
|
371
365
|
|
|
372
366
|
invTextureSpaceMatrix .translate (lightNode .getLocation ());
|
|
@@ -380,7 +374,7 @@ Object .assign (TextureProjectorContainer .prototype,
|
|
|
380
374
|
farDistance = lightNode .getFarDistance (),
|
|
381
375
|
fieldOfView = lightNode .getFieldOfView ();
|
|
382
376
|
|
|
383
|
-
|
|
377
|
+
external_X_ITE_X3D_Camera_default().perspective (fieldOfView, nearDistance, farDistance, width, height, this .projectionMatrix);
|
|
384
378
|
|
|
385
379
|
if (!this .global)
|
|
386
380
|
invTextureSpaceMatrix .multLeft (modelMatrix .inverse ());
|
|
@@ -437,7 +431,7 @@ function TextureProjector (executionContext)
|
|
|
437
431
|
{
|
|
438
432
|
TextureProjection_X3DTextureProjectorNode .call (this, executionContext);
|
|
439
433
|
|
|
440
|
-
this .addType ((
|
|
434
|
+
this .addType ((external_X_ITE_X3D_X3DConstants_default()).TextureProjector);
|
|
441
435
|
|
|
442
436
|
this ._fieldOfView .setUnit ("angle");
|
|
443
437
|
}
|
|
@@ -462,51 +456,32 @@ Object .assign (Object .setPrototypeOf (TextureProjector .prototype, TextureProj
|
|
|
462
456
|
|
|
463
457
|
Object .defineProperties (TextureProjector,
|
|
464
458
|
{
|
|
465
|
-
|
|
466
|
-
{
|
|
467
|
-
value: "TextureProjector",
|
|
468
|
-
enumerable: true,
|
|
469
|
-
},
|
|
470
|
-
componentInfo:
|
|
471
|
-
{
|
|
472
|
-
value: Object .freeze ({ name: "TextureProjection", level: 2 }),
|
|
473
|
-
enumerable: true,
|
|
474
|
-
},
|
|
475
|
-
containerField:
|
|
476
|
-
{
|
|
477
|
-
value: "children",
|
|
478
|
-
enumerable: true,
|
|
479
|
-
},
|
|
480
|
-
specificationRange:
|
|
481
|
-
{
|
|
482
|
-
value: Object .freeze ({ from: "4.0", to: "Infinity" }),
|
|
483
|
-
enumerable: true,
|
|
484
|
-
},
|
|
459
|
+
... external_X_ITE_X3D_X3DNode_default().getStaticProperties ("TextureProjector", "TextureProjection", 2, "children", "4.0"),
|
|
485
460
|
fieldDefinitions:
|
|
486
461
|
{
|
|
487
|
-
value: new (
|
|
488
|
-
new (
|
|
489
|
-
new (
|
|
490
|
-
new (
|
|
491
|
-
new (
|
|
492
|
-
new (
|
|
493
|
-
new (
|
|
494
|
-
new (
|
|
495
|
-
|
|
496
|
-
new (
|
|
497
|
-
new (
|
|
498
|
-
new (
|
|
499
|
-
new (
|
|
500
|
-
new (
|
|
501
|
-
new (
|
|
502
|
-
new (
|
|
503
|
-
new (
|
|
504
|
-
|
|
505
|
-
new (
|
|
506
|
-
new (
|
|
507
|
-
new (
|
|
508
|
-
new (
|
|
509
|
-
new (
|
|
462
|
+
value: new (external_X_ITE_X3D_FieldDefinitionArray_default()) ([
|
|
463
|
+
new (external_X_ITE_X3D_X3DFieldDefinition_default()) ((external_X_ITE_X3D_X3DConstants_default()).inputOutput, "metadata", new (external_X_ITE_X3D_Fields_default()).SFNode ()),
|
|
464
|
+
new (external_X_ITE_X3D_X3DFieldDefinition_default()) ((external_X_ITE_X3D_X3DConstants_default()).inputOutput, "description", new (external_X_ITE_X3D_Fields_default()).SFString ()),
|
|
465
|
+
new (external_X_ITE_X3D_X3DFieldDefinition_default()) ((external_X_ITE_X3D_X3DConstants_default()).inputOutput, "global", new (external_X_ITE_X3D_Fields_default()).SFBool (true)),
|
|
466
|
+
new (external_X_ITE_X3D_X3DFieldDefinition_default()) ((external_X_ITE_X3D_X3DConstants_default()).inputOutput, "on", new (external_X_ITE_X3D_Fields_default()).SFBool (true)),
|
|
467
|
+
new (external_X_ITE_X3D_X3DFieldDefinition_default()) ((external_X_ITE_X3D_X3DConstants_default()).inputOutput, "color", new (external_X_ITE_X3D_Fields_default()).SFColor (1, 1, 1)),
|
|
468
|
+
new (external_X_ITE_X3D_X3DFieldDefinition_default()) ((external_X_ITE_X3D_X3DConstants_default()).inputOutput, "intensity", new (external_X_ITE_X3D_Fields_default()).SFFloat (1)),
|
|
469
|
+
new (external_X_ITE_X3D_X3DFieldDefinition_default()) ((external_X_ITE_X3D_X3DConstants_default()).inputOutput, "ambientIntensity", new (external_X_ITE_X3D_Fields_default()).SFFloat ()),
|
|
470
|
+
|
|
471
|
+
new (external_X_ITE_X3D_X3DFieldDefinition_default()) ((external_X_ITE_X3D_X3DConstants_default()).inputOutput, "location", new (external_X_ITE_X3D_Fields_default()).SFVec3f ()),
|
|
472
|
+
new (external_X_ITE_X3D_X3DFieldDefinition_default()) ((external_X_ITE_X3D_X3DConstants_default()).inputOutput, "direction", new (external_X_ITE_X3D_Fields_default()).SFVec3f (0, 0, 1)),
|
|
473
|
+
new (external_X_ITE_X3D_X3DFieldDefinition_default()) ((external_X_ITE_X3D_X3DConstants_default()).inputOutput, "upVector", new (external_X_ITE_X3D_Fields_default()).SFVec3f (0, 0, 1)),
|
|
474
|
+
new (external_X_ITE_X3D_X3DFieldDefinition_default()) ((external_X_ITE_X3D_X3DConstants_default()).inputOutput, "fieldOfView", new (external_X_ITE_X3D_Fields_default()).SFFloat (0.785398)),
|
|
475
|
+
new (external_X_ITE_X3D_X3DFieldDefinition_default()) ((external_X_ITE_X3D_X3DConstants_default()).inputOutput, "nearDistance", new (external_X_ITE_X3D_Fields_default()).SFFloat (-1)),
|
|
476
|
+
new (external_X_ITE_X3D_X3DFieldDefinition_default()) ((external_X_ITE_X3D_X3DConstants_default()).inputOutput, "farDistance", new (external_X_ITE_X3D_Fields_default()).SFFloat (-1)),
|
|
477
|
+
new (external_X_ITE_X3D_X3DFieldDefinition_default()) ((external_X_ITE_X3D_X3DConstants_default()).outputOnly, "aspectRatio", new (external_X_ITE_X3D_Fields_default()).SFFloat ()),
|
|
478
|
+
new (external_X_ITE_X3D_X3DFieldDefinition_default()) ((external_X_ITE_X3D_X3DConstants_default()).inputOutput, "texture", new (external_X_ITE_X3D_Fields_default()).SFNode ()),
|
|
479
|
+
|
|
480
|
+
new (external_X_ITE_X3D_X3DFieldDefinition_default()) ((external_X_ITE_X3D_X3DConstants_default()).inputOutput, "shadows", new (external_X_ITE_X3D_Fields_default()).SFBool ()),
|
|
481
|
+
new (external_X_ITE_X3D_X3DFieldDefinition_default()) ((external_X_ITE_X3D_X3DConstants_default()).inputOutput, "shadowColor", new (external_X_ITE_X3D_Fields_default()).SFColor ()), // skip test
|
|
482
|
+
new (external_X_ITE_X3D_X3DFieldDefinition_default()) ((external_X_ITE_X3D_X3DConstants_default()).inputOutput, "shadowIntensity", new (external_X_ITE_X3D_Fields_default()).SFFloat (1)),
|
|
483
|
+
new (external_X_ITE_X3D_X3DFieldDefinition_default()) ((external_X_ITE_X3D_X3DConstants_default()).inputOutput, "shadowBias", new (external_X_ITE_X3D_Fields_default()).SFFloat (0.005)), // skip test
|
|
484
|
+
new (external_X_ITE_X3D_X3DFieldDefinition_default()) ((external_X_ITE_X3D_X3DConstants_default()).initializeOnly, "shadowMapSize", new (external_X_ITE_X3D_Fields_default()).SFInt32 (1024)), // skip test
|
|
510
485
|
]),
|
|
511
486
|
enumerable: true,
|
|
512
487
|
},
|
|
@@ -515,8 +490,7 @@ Object .defineProperties (TextureProjector,
|
|
|
515
490
|
const TextureProjector_default_ = TextureProjector;
|
|
516
491
|
;
|
|
517
492
|
|
|
518
|
-
|
|
519
|
-
/* harmony default export */ const TextureProjection_TextureProjector = (TextureProjector_default_);
|
|
493
|
+
/* harmony default export */ const TextureProjection_TextureProjector = (external_X_ITE_X3D_Namespace_default().add ("TextureProjector", TextureProjector_default_));
|
|
520
494
|
;// CONCATENATED MODULE: ./src/x_ite/Components/TextureProjection/TextureProjectorParallel.js
|
|
521
495
|
/*******************************************************************************
|
|
522
496
|
*
|
|
@@ -577,22 +551,23 @@ Namespace_default().add ("TextureProjector", "x_ite/Components/TextureProjection
|
|
|
577
551
|
|
|
578
552
|
|
|
579
553
|
|
|
580
|
-
|
|
554
|
+
|
|
555
|
+
const TextureProjectorParallelCache = external_X_ITE_X3D_ObjectCache_default() (TextureProjectorParallelContainer);
|
|
581
556
|
|
|
582
557
|
function TextureProjectorParallelContainer ()
|
|
583
558
|
{
|
|
584
|
-
this .projectionMatrix = new (
|
|
585
|
-
this .modelViewMatrix = new (
|
|
586
|
-
this .modelMatrix = new (
|
|
587
|
-
this .invTextureSpaceMatrix = new (
|
|
588
|
-
this .location = new (
|
|
559
|
+
this .projectionMatrix = new (external_X_ITE_X3D_Matrix4_default()) ();
|
|
560
|
+
this .modelViewMatrix = new (external_X_ITE_X3D_MatrixStack_default()) ((external_X_ITE_X3D_Matrix4_default()));
|
|
561
|
+
this .modelMatrix = new (external_X_ITE_X3D_Matrix4_default()) ();
|
|
562
|
+
this .invTextureSpaceMatrix = new (external_X_ITE_X3D_Matrix4_default()) ();
|
|
563
|
+
this .location = new (external_X_ITE_X3D_Vector3_default()) ();
|
|
589
564
|
this .locationArray = new Float32Array (3);
|
|
590
|
-
this .invTextureSpaceProjectionMatrix = new (
|
|
591
|
-
this .direction = new (
|
|
592
|
-
this .rotation = new (
|
|
593
|
-
this .matrix = new (
|
|
565
|
+
this .invTextureSpaceProjectionMatrix = new (external_X_ITE_X3D_Matrix4_default()) ();
|
|
566
|
+
this .direction = new (external_X_ITE_X3D_Vector3_default()) ();
|
|
567
|
+
this .rotation = new (external_X_ITE_X3D_Rotation4_default()) ();
|
|
568
|
+
this .matrix = new (external_X_ITE_X3D_Matrix4_default()) ();
|
|
594
569
|
this .matrixArray = new Float32Array (16);
|
|
595
|
-
this .textureMatrix = new (
|
|
570
|
+
this .textureMatrix = new (external_X_ITE_X3D_Matrix4_default()) ();
|
|
596
571
|
}
|
|
597
572
|
|
|
598
573
|
Object .assign (TextureProjectorParallelContainer .prototype,
|
|
@@ -614,9 +589,9 @@ Object .assign (TextureProjectorParallelContainer .prototype,
|
|
|
614
589
|
lightNode = this .lightNode,
|
|
615
590
|
cameraSpaceMatrix = renderObject .getCameraSpaceMatrix () .get (),
|
|
616
591
|
modelMatrix = this .modelMatrix .assign (this .modelViewMatrix .get ()) .multRight (cameraSpaceMatrix),
|
|
617
|
-
invTextureSpaceMatrix = this .invTextureSpaceMatrix .assign (this .global ? modelMatrix : (
|
|
592
|
+
invTextureSpaceMatrix = this .invTextureSpaceMatrix .assign (this .global ? modelMatrix : (external_X_ITE_X3D_Matrix4_default()).Identity);
|
|
618
593
|
|
|
619
|
-
this .rotation .setFromToVec ((
|
|
594
|
+
this .rotation .setFromToVec ((external_X_ITE_X3D_Vector3_default()).zAxis, this .direction .assign (lightNode .getDirection ()) .negate ());
|
|
620
595
|
lightNode .straightenHorizon (this .rotation);
|
|
621
596
|
|
|
622
597
|
invTextureSpaceMatrix .translate (lightNode .getLocation ());
|
|
@@ -642,7 +617,7 @@ Object .assign (TextureProjectorParallelContainer .prototype,
|
|
|
642
617
|
center = (minimumX + maximumX) / 2,
|
|
643
618
|
size1_2 = (sizeY * aspect) / 2;
|
|
644
619
|
|
|
645
|
-
|
|
620
|
+
external_X_ITE_X3D_Camera_default().ortho (center - size1_2, center + size1_2, minimumY, maximumY, nearDistance, farDistance, this .projectionMatrix);
|
|
646
621
|
}
|
|
647
622
|
else
|
|
648
623
|
{
|
|
@@ -650,7 +625,7 @@ Object .assign (TextureProjectorParallelContainer .prototype,
|
|
|
650
625
|
center = (minimumY + maximumY) / 2,
|
|
651
626
|
size1_2 = (sizeX / aspect) / 2;
|
|
652
627
|
|
|
653
|
-
|
|
628
|
+
external_X_ITE_X3D_Camera_default().ortho (minimumX, maximumX, center - size1_2, center + size1_2, nearDistance, farDistance, this .projectionMatrix);
|
|
654
629
|
}
|
|
655
630
|
|
|
656
631
|
if (!this .global)
|
|
@@ -708,7 +683,7 @@ function TextureProjectorParallel (executionContext)
|
|
|
708
683
|
{
|
|
709
684
|
TextureProjection_X3DTextureProjectorNode .call (this, executionContext);
|
|
710
685
|
|
|
711
|
-
this .addType ((
|
|
686
|
+
this .addType ((external_X_ITE_X3D_X3DConstants_default()).TextureProjectorParallel);
|
|
712
687
|
|
|
713
688
|
this ._fieldOfView .setUnit ("length");
|
|
714
689
|
}
|
|
@@ -767,51 +742,32 @@ Object .assign (Object .setPrototypeOf (TextureProjectorParallel .prototype, Tex
|
|
|
767
742
|
|
|
768
743
|
Object .defineProperties (TextureProjectorParallel,
|
|
769
744
|
{
|
|
770
|
-
|
|
771
|
-
{
|
|
772
|
-
value: "TextureProjectorParallel",
|
|
773
|
-
enumerable: true,
|
|
774
|
-
},
|
|
775
|
-
componentInfo:
|
|
776
|
-
{
|
|
777
|
-
value: Object .freeze ({ name: "TextureProjection", level: 2 }),
|
|
778
|
-
enumerable: true,
|
|
779
|
-
},
|
|
780
|
-
containerField:
|
|
781
|
-
{
|
|
782
|
-
value: "children",
|
|
783
|
-
enumerable: true,
|
|
784
|
-
},
|
|
785
|
-
specificationRange:
|
|
786
|
-
{
|
|
787
|
-
value: Object .freeze ({ from: "4.0", to: "Infinity" }),
|
|
788
|
-
enumerable: true,
|
|
789
|
-
},
|
|
745
|
+
... external_X_ITE_X3D_X3DNode_default().getStaticProperties ("TextureProjectorParallel", "TextureProjection", 2, "children", "4.0"),
|
|
790
746
|
fieldDefinitions:
|
|
791
747
|
{
|
|
792
|
-
value: new (
|
|
793
|
-
new (
|
|
794
|
-
new (
|
|
795
|
-
new (
|
|
796
|
-
new (
|
|
797
|
-
new (
|
|
798
|
-
new (
|
|
799
|
-
new (
|
|
800
|
-
|
|
801
|
-
new (
|
|
802
|
-
new (
|
|
803
|
-
new (
|
|
804
|
-
new (
|
|
805
|
-
new (
|
|
806
|
-
new (
|
|
807
|
-
new (
|
|
808
|
-
new (
|
|
809
|
-
|
|
810
|
-
new (
|
|
811
|
-
new (
|
|
812
|
-
new (
|
|
813
|
-
new (
|
|
814
|
-
new (
|
|
748
|
+
value: new (external_X_ITE_X3D_FieldDefinitionArray_default()) ([
|
|
749
|
+
new (external_X_ITE_X3D_X3DFieldDefinition_default()) ((external_X_ITE_X3D_X3DConstants_default()).inputOutput, "metadata", new (external_X_ITE_X3D_Fields_default()).SFNode ()),
|
|
750
|
+
new (external_X_ITE_X3D_X3DFieldDefinition_default()) ((external_X_ITE_X3D_X3DConstants_default()).inputOutput, "description", new (external_X_ITE_X3D_Fields_default()).SFString ()),
|
|
751
|
+
new (external_X_ITE_X3D_X3DFieldDefinition_default()) ((external_X_ITE_X3D_X3DConstants_default()).inputOutput, "global", new (external_X_ITE_X3D_Fields_default()).SFBool (true)),
|
|
752
|
+
new (external_X_ITE_X3D_X3DFieldDefinition_default()) ((external_X_ITE_X3D_X3DConstants_default()).inputOutput, "on", new (external_X_ITE_X3D_Fields_default()).SFBool (true)),
|
|
753
|
+
new (external_X_ITE_X3D_X3DFieldDefinition_default()) ((external_X_ITE_X3D_X3DConstants_default()).inputOutput, "color", new (external_X_ITE_X3D_Fields_default()).SFColor (1, 1, 1)),
|
|
754
|
+
new (external_X_ITE_X3D_X3DFieldDefinition_default()) ((external_X_ITE_X3D_X3DConstants_default()).inputOutput, "intensity", new (external_X_ITE_X3D_Fields_default()).SFFloat (1)),
|
|
755
|
+
new (external_X_ITE_X3D_X3DFieldDefinition_default()) ((external_X_ITE_X3D_X3DConstants_default()).inputOutput, "ambientIntensity", new (external_X_ITE_X3D_Fields_default()).SFFloat ()),
|
|
756
|
+
|
|
757
|
+
new (external_X_ITE_X3D_X3DFieldDefinition_default()) ((external_X_ITE_X3D_X3DConstants_default()).inputOutput, "location", new (external_X_ITE_X3D_Fields_default()).SFVec3f ()),
|
|
758
|
+
new (external_X_ITE_X3D_X3DFieldDefinition_default()) ((external_X_ITE_X3D_X3DConstants_default()).inputOutput, "direction", new (external_X_ITE_X3D_Fields_default()).SFVec3f (0, 0, 1)),
|
|
759
|
+
new (external_X_ITE_X3D_X3DFieldDefinition_default()) ((external_X_ITE_X3D_X3DConstants_default()).inputOutput, "upVector", new (external_X_ITE_X3D_Fields_default()).SFVec3f (0, 0, 1)),
|
|
760
|
+
new (external_X_ITE_X3D_X3DFieldDefinition_default()) ((external_X_ITE_X3D_X3DConstants_default()).inputOutput, "fieldOfView", new (external_X_ITE_X3D_Fields_default()).MFFloat (-1, -1, 1, 1)),
|
|
761
|
+
new (external_X_ITE_X3D_X3DFieldDefinition_default()) ((external_X_ITE_X3D_X3DConstants_default()).inputOutput, "nearDistance", new (external_X_ITE_X3D_Fields_default()).SFFloat (-1)),
|
|
762
|
+
new (external_X_ITE_X3D_X3DFieldDefinition_default()) ((external_X_ITE_X3D_X3DConstants_default()).inputOutput, "farDistance", new (external_X_ITE_X3D_Fields_default()).SFFloat (-1)),
|
|
763
|
+
new (external_X_ITE_X3D_X3DFieldDefinition_default()) ((external_X_ITE_X3D_X3DConstants_default()).outputOnly, "aspectRatio", new (external_X_ITE_X3D_Fields_default()).SFFloat ()),
|
|
764
|
+
new (external_X_ITE_X3D_X3DFieldDefinition_default()) ((external_X_ITE_X3D_X3DConstants_default()).inputOutput, "texture", new (external_X_ITE_X3D_Fields_default()).SFNode ()),
|
|
765
|
+
|
|
766
|
+
new (external_X_ITE_X3D_X3DFieldDefinition_default()) ((external_X_ITE_X3D_X3DConstants_default()).inputOutput, "shadows", new (external_X_ITE_X3D_Fields_default()).SFBool ()),
|
|
767
|
+
new (external_X_ITE_X3D_X3DFieldDefinition_default()) ((external_X_ITE_X3D_X3DConstants_default()).inputOutput, "shadowColor", new (external_X_ITE_X3D_Fields_default()).SFColor ()), // skip test
|
|
768
|
+
new (external_X_ITE_X3D_X3DFieldDefinition_default()) ((external_X_ITE_X3D_X3DConstants_default()).inputOutput, "shadowIntensity", new (external_X_ITE_X3D_Fields_default()).SFFloat (1)),
|
|
769
|
+
new (external_X_ITE_X3D_X3DFieldDefinition_default()) ((external_X_ITE_X3D_X3DConstants_default()).inputOutput, "shadowBias", new (external_X_ITE_X3D_Fields_default()).SFFloat (0.005)), // skip test
|
|
770
|
+
new (external_X_ITE_X3D_X3DFieldDefinition_default()) ((external_X_ITE_X3D_X3DConstants_default()).initializeOnly, "shadowMapSize", new (external_X_ITE_X3D_Fields_default()).SFInt32 (1024)), // skip test
|
|
815
771
|
]),
|
|
816
772
|
enumerable: true,
|
|
817
773
|
},
|
|
@@ -820,9 +776,8 @@ Object .defineProperties (TextureProjectorParallel,
|
|
|
820
776
|
const TextureProjectorParallel_default_ = TextureProjectorParallel;
|
|
821
777
|
;
|
|
822
778
|
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
;// CONCATENATED MODULE: ./src/assets/components/TextureProjection.js
|
|
779
|
+
/* harmony default export */ const TextureProjection_TextureProjectorParallel = (external_X_ITE_X3D_Namespace_default().add ("TextureProjectorParallel", TextureProjectorParallel_default_));
|
|
780
|
+
;// CONCATENATED MODULE: ./src/assets/components/TextureProjectionComponent.js
|
|
826
781
|
/*******************************************************************************
|
|
827
782
|
*
|
|
828
783
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -875,7 +830,7 @@ Namespace_default().add ("TextureProjectorParallel", "x_ite/Components/TexturePr
|
|
|
875
830
|
|
|
876
831
|
|
|
877
832
|
|
|
878
|
-
|
|
833
|
+
external_X_ITE_X3D_Components_default().add ({
|
|
879
834
|
name: "TextureProjection",
|
|
880
835
|
concreteNodes:
|
|
881
836
|
[
|
|
@@ -888,10 +843,9 @@ Components_default().add ({
|
|
|
888
843
|
],
|
|
889
844
|
});
|
|
890
845
|
|
|
891
|
-
const
|
|
846
|
+
const TextureProjectionComponent_default_ = undefined;
|
|
892
847
|
;
|
|
893
848
|
|
|
894
|
-
|
|
895
|
-
/* harmony default export */ const TextureProjection = ((/* unused pure expression or super */ null && (TextureProjection_default_)));
|
|
849
|
+
/* harmony default export */ const TextureProjectionComponent = (external_X_ITE_X3D_Namespace_default().add ("TextureProjectionComponent", TextureProjectionComponent_default_));
|
|
896
850
|
/******/ })()
|
|
897
851
|
;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* X_ITE v10.3.0 */
|
|
2
|
+
const t=window[Symbol.for("X_ITE.X3D-10.3.0")];(()=>{var e={n:t=>{var i=t&&t.__esModule?()=>t.default:()=>t;return e.d(i,{a:i}),i},d:(t,i)=>{for(var r in i)e.o(i,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:i[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)};const i=t.Components;var r=e.n(i);const n=t.Fields;var o=e.n(n);const a=t.X3DFieldDefinition;var s=e.n(a);const u=t.FieldDefinitionArray;var h=e.n(u);const c=t.X3DNode;var l=e.n(c);const x=t.X3DLightNode;var p=e.n(x);const w=t.X3DConstants;var g=e.n(w);const d=t.X3DCast;var m=e.n(d);const f=t.Vector3;var _=e.n(f);const T=t.Rotation4;var O=e.n(T);const F=t.Matrix4;var M=e.n(F);const S=t.Namespace;var P=e.n(S);function j(t){p().call(this,t),this.addType(g().X3DTextureProjectorNode),this._location.setUnit("length"),this._farDistance.setUnit("length"),this._location.setUnit("length")}Object.assign(Object.setPrototypeOf(j.prototype,p().prototype),{initialize(){p().prototype.initialize.call(this),this._nearDistance.addInterest("set_nearDistance__",this),this._farDistance.addInterest("set_farDistance__",this),this._texture.addInterest("set_texture__",this),this.set_nearDistance__(),this.set_farDistance__(),this.set_texture__()},getLightKey:()=>3,getGlobal(){return this._global.getValue()},getLocation(){return this._location.getValue()},getDirection(){return this._direction.getValue()},getNearDistance(){return this.nearDistance},getNearParameter(){return this.nearParameter},getFarDistance(){return this.farDistance},getFarParameter(){return this.farParameter},getTexture(){return this.textureNode},getBiasMatrix:(()=>{const t=new(M())(.5,0,0,0,0,.5,0,0,0,0,.5,0,.5,.5,.5,1);return function(){return t}})(),straightenHorizon(t){return t.straighten(this._upVector.getValue())},set_nearDistance__(){const t=this._nearDistance.getValue();this.nearDistance=t<0?.125:t,this.nearParameter=t<0?0:-1},set_farDistance__(){const t=this._farDistance.getValue();this.farDistance=t<0?1e5:t,this.farParameter=t<0?1:2},set_texture__(){this.textureNode?.removeInterest("set_aspectRatio__",this),this.textureNode=m()(g().X3DTexture2DNode,this._texture),this.textureNode?.addInterest("set_aspectRatio__",this),this.setEnabled(!!this.textureNode),this.set_aspectRatio__(),this.set_on__()},set_aspectRatio__(){this.textureNode?this._aspectRatio=this.textureNode.getWidth()/this.textureNode.getHeight():this._aspectRatio=1}}),Object.defineProperties(j,l().getStaticProperties("X3DTextureProjectorNode","TextureProjection",4));const y=j,D=P().add("X3DTextureProjectorNode",y),V=t.Camera;var b=e.n(V);const v=t.MatrixStack;var N=e.n(v);const X=t.ObjectCache;var U=e.n(X);const z=U()(R);function R(){this.projectionMatrix=new(M()),this.modelViewMatrix=new(N())(M()),this.modelMatrix=new(M()),this.invTextureSpaceMatrix=new(M()),this.invTextureSpaceProjectionMatrix=new(M()),this.location=new(_()),this.locationArray=new Float32Array(3),this.direction=new(_()),this.rotation=new(O()),this.matrix=new(M()),this.matrixArray=new Float32Array(16),this.textureMatrix=new(M())}function I(t){D.call(this,t),this.addType(g().TextureProjector),this._fieldOfView.setUnit("angle")}Object.assign(R.prototype,{set(t,e,i){this.browser=t.getBrowser(),this.lightNode=t,this.global=t.getGlobal(),this.modelViewMatrix.pushMatrix(i),this.textureMatrix.set(...t.getTexture().getMatrix())},renderShadowMap(t){},setGlobalVariables(t){const e=this.lightNode,i=t.getCameraSpaceMatrix().get(),r=this.modelMatrix.assign(this.modelViewMatrix.get()).multRight(i),n=this.invTextureSpaceMatrix.assign(this.global?r:M().Identity);this.rotation.setFromToVec(_().zAxis,this.direction.assign(e.getDirection()).negate()),e.straightenHorizon(this.rotation),n.translate(e.getLocation()),n.rotate(this.rotation),n.inverse();const o=e.getTexture().getWidth(),a=e.getTexture().getHeight(),s=e.getNearDistance(),u=e.getFarDistance(),h=e.getFieldOfView();b().perspective(h,s,u,o,a,this.projectionMatrix),this.global||n.multLeft(r.inverse()),this.invTextureSpaceProjectionMatrix.assign(n).multRight(this.projectionMatrix).multRight(e.getBiasMatrix()),this.matrix.assign(i).multRight(this.invTextureSpaceProjectionMatrix).multRight(this.textureMatrix),this.matrixArray.set(this.matrix),this.modelViewMatrix.get().multVecMatrix(this.location.assign(e._location.getValue())),this.locationArray.set(this.location)},setShaderUniforms(t,e,i){const r=e.numTextureProjectors++,n=this.lightNode,o=n.getTexture(),a=this.global?this.textureUnit=this.textureUnit??this.browser.popTexture2DUnit():this.browser.getTexture2DUnit();if(t.activeTexture(t.TEXTURE0+a),t.bindTexture(t.TEXTURE_2D,o.getTexture()),t.uniform1i(e.x3d_TextureProjectorTexture[r],a),e.hasTextureProjector(r,this))return;const s=n.getNearParameter(),u=n.getFarParameter();t.uniform3f(e.x3d_TextureProjectorColor[r],...n.getColor()),t.uniform1f(e.x3d_TextureProjectorIntensity[r],n.getIntensity()),t.uniform3fv(e.x3d_TextureProjectorLocation[r],this.locationArray),t.uniform3f(e.x3d_TextureProjectorParams[r],s,u,o.isLinear()),t.uniformMatrix4fv(e.x3d_TextureProjectorMatrix[r],!1,this.matrixArray)},dispose(){this.browser.pushTexture2DUnit(this.textureUnit),this.modelViewMatrix.clear(),this.textureUnit=void 0,z.push(this)}}),Object.assign(Object.setPrototypeOf(I.prototype,D.prototype),{initialize(){D.prototype.initialize.call(this)},getFieldOfView(){const t=this._fieldOfView.getValue();return t>0&&t<Math.PI?t:Math.PI/4},getLights:()=>z}),Object.defineProperties(I,{...l().getStaticProperties("TextureProjector","TextureProjection",2,"children","4.0"),fieldDefinitions:{value:new(h())([new(s())(g().inputOutput,"metadata",new(o().SFNode)),new(s())(g().inputOutput,"description",new(o().SFString)),new(s())(g().inputOutput,"global",new(o().SFBool)(!0)),new(s())(g().inputOutput,"on",new(o().SFBool)(!0)),new(s())(g().inputOutput,"color",new(o().SFColor)(1,1,1)),new(s())(g().inputOutput,"intensity",new(o().SFFloat)(1)),new(s())(g().inputOutput,"ambientIntensity",new(o().SFFloat)),new(s())(g().inputOutput,"location",new(o().SFVec3f)),new(s())(g().inputOutput,"direction",new(o().SFVec3f)(0,0,1)),new(s())(g().inputOutput,"upVector",new(o().SFVec3f)(0,0,1)),new(s())(g().inputOutput,"fieldOfView",new(o().SFFloat)(.785398)),new(s())(g().inputOutput,"nearDistance",new(o().SFFloat)(-1)),new(s())(g().inputOutput,"farDistance",new(o().SFFloat)(-1)),new(s())(g().outputOnly,"aspectRatio",new(o().SFFloat)),new(s())(g().inputOutput,"texture",new(o().SFNode)),new(s())(g().inputOutput,"shadows",new(o().SFBool)),new(s())(g().inputOutput,"shadowColor",new(o().SFColor)),new(s())(g().inputOutput,"shadowIntensity",new(o().SFFloat)(1)),new(s())(g().inputOutput,"shadowBias",new(o().SFFloat)(.005)),new(s())(g().initializeOnly,"shadowMapSize",new(o().SFInt32)(1024))]),enumerable:!0}});const A=I,C=P().add("TextureProjector",A),Y=U()(B);function B(){this.projectionMatrix=new(M()),this.modelViewMatrix=new(N())(M()),this.modelMatrix=new(M()),this.invTextureSpaceMatrix=new(M()),this.location=new(_()),this.locationArray=new Float32Array(3),this.invTextureSpaceProjectionMatrix=new(M()),this.direction=new(_()),this.rotation=new(O()),this.matrix=new(M()),this.matrixArray=new Float32Array(16),this.textureMatrix=new(M())}function L(t){D.call(this,t),this.addType(g().TextureProjectorParallel),this._fieldOfView.setUnit("length")}Object.assign(B.prototype,{set(t,e,i){this.browser=t.getBrowser(),this.lightNode=t,this.global=t.getGlobal(),this.modelViewMatrix.pushMatrix(i),this.textureMatrix.set(...t.getTexture().getMatrix())},renderShadowMap(t){},setGlobalVariables(t){const e=this.lightNode,i=t.getCameraSpaceMatrix().get(),r=this.modelMatrix.assign(this.modelViewMatrix.get()).multRight(i),n=this.invTextureSpaceMatrix.assign(this.global?r:M().Identity);this.rotation.setFromToVec(_().zAxis,this.direction.assign(e.getDirection()).negate()),e.straightenHorizon(this.rotation),n.translate(e.getLocation()),n.rotate(this.rotation),n.inverse();const o=e.getTexture().getWidth()/e.getTexture().getHeight(),a=e.getMinimumX(),s=e.getMaximumX(),u=e.getMinimumY(),h=e.getMaximumY(),c=e.getSizeX(),l=e.getSizeY(),x=e.getNearDistance(),p=e.getFarDistance();if(o>c/l){const t=(a+s)/2,e=l*o/2;b().ortho(t-e,t+e,u,h,x,p,this.projectionMatrix)}else{const t=(u+h)/2,e=c/o/2;b().ortho(a,s,t-e,t+e,x,p,this.projectionMatrix)}this.global||n.multLeft(r.inverse()),this.invTextureSpaceProjectionMatrix.assign(n).multRight(this.projectionMatrix).multRight(e.getBiasMatrix()),this.matrix.assign(i).multRight(this.invTextureSpaceProjectionMatrix).multRight(this.textureMatrix),this.matrixArray.set(this.matrix),this.modelViewMatrix.get().multVecMatrix(this.location.assign(e._location.getValue())),this.locationArray.set(this.location)},setShaderUniforms(t,e,i){const r=e.numTextureProjectors++,n=this.lightNode,o=n.getTexture(),a=this.global?this.textureUnit=this.textureUnit??this.browser.popTexture2DUnit():this.browser.getTexture2DUnit();if(t.activeTexture(t.TEXTURE0+a),t.bindTexture(t.TEXTURE_2D,o.getTexture()),t.uniform1i(e.x3d_TextureProjectorTexture[r],a),e.hasTextureProjector(r,this))return;const s=n.getNearParameter(),u=n.getFarParameter();t.uniform3f(e.x3d_TextureProjectorColor[r],...n.getColor()),t.uniform1f(e.x3d_TextureProjectorIntensity[r],n.getIntensity()),t.uniform3fv(e.x3d_TextureProjectorLocation[r],this.locationArray),t.uniform3f(e.x3d_TextureProjectorParams[r],s,u,o.isLinear()),t.uniformMatrix4fv(e.x3d_TextureProjectorMatrix[r],!1,this.matrixArray)},dispose(){this.browser.pushTexture2DUnit(this.textureUnit),this.modelViewMatrix.clear(),this.textureUnit=void 0,Y.push(this)}}),Object.assign(Object.setPrototypeOf(L.prototype,D.prototype),{initialize(){D.prototype.initialize.call(this),this._fieldOfView.addInterest("set_fieldOfView___",this),this.set_fieldOfView___()},set_fieldOfView___(){const t=this._fieldOfView.length;this.minimumX=t>0?this._fieldOfView[0]:-1,this.minimumY=t>1?this._fieldOfView[1]:-1,this.maximumX=t>2?this._fieldOfView[2]:1,this.maximumY=t>3?this._fieldOfView[3]:1,this.sizeX=this.maximumX-this.minimumX,this.sizeY=this.maximumY-this.minimumY},getMinimumX(){return this.minimumX},getMinimumY(){return this.minimumY},getMaximumX(){return this.maximumX},getMaximumY(){return this.maximumY},getSizeX(){return this.sizeX},getSizeY(){return this.sizeY},getLights:()=>Y}),Object.defineProperties(L,{...l().getStaticProperties("TextureProjectorParallel","TextureProjection",2,"children","4.0"),fieldDefinitions:{value:new(h())([new(s())(g().inputOutput,"metadata",new(o().SFNode)),new(s())(g().inputOutput,"description",new(o().SFString)),new(s())(g().inputOutput,"global",new(o().SFBool)(!0)),new(s())(g().inputOutput,"on",new(o().SFBool)(!0)),new(s())(g().inputOutput,"color",new(o().SFColor)(1,1,1)),new(s())(g().inputOutput,"intensity",new(o().SFFloat)(1)),new(s())(g().inputOutput,"ambientIntensity",new(o().SFFloat)),new(s())(g().inputOutput,"location",new(o().SFVec3f)),new(s())(g().inputOutput,"direction",new(o().SFVec3f)(0,0,1)),new(s())(g().inputOutput,"upVector",new(o().SFVec3f)(0,0,1)),new(s())(g().inputOutput,"fieldOfView",new(o().MFFloat)(-1,-1,1,1)),new(s())(g().inputOutput,"nearDistance",new(o().SFFloat)(-1)),new(s())(g().inputOutput,"farDistance",new(o().SFFloat)(-1)),new(s())(g().outputOnly,"aspectRatio",new(o().SFFloat)),new(s())(g().inputOutput,"texture",new(o().SFNode)),new(s())(g().inputOutput,"shadows",new(o().SFBool)),new(s())(g().inputOutput,"shadowColor",new(o().SFColor)),new(s())(g().inputOutput,"shadowIntensity",new(o().SFFloat)(1)),new(s())(g().inputOutput,"shadowBias",new(o().SFFloat)(.005)),new(s())(g().initializeOnly,"shadowMapSize",new(o().SFInt32)(1024))]),enumerable:!0}});const E=L,H=P().add("TextureProjectorParallel",E);r().add({name:"TextureProjection",concreteNodes:[C,H],abstractNodes:[D]});P().add("TextureProjectionComponent",undefined)})();
|