x_ite 9.0.2 → 9.0.3
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/dist/assets/components/Annotation.js +33 -33
- package/dist/assets/components/Annotation.min.js +1 -1
- package/dist/assets/components/CADGeometry.js +34 -34
- package/dist/assets/components/CADGeometry.min.js +1 -1
- package/dist/assets/components/CubeMapTexturing.js +99 -105
- package/dist/assets/components/CubeMapTexturing.min.js +1 -1
- package/dist/assets/components/DIS.js +92 -47
- package/dist/assets/components/DIS.min.js +1 -1
- package/dist/assets/components/EventUtilities.js +34 -34
- package/dist/assets/components/EventUtilities.min.js +1 -1
- package/dist/assets/components/Geometry2D.js +45 -45
- package/dist/assets/components/Geometry2D.min.js +1 -1
- package/dist/assets/components/Geospatial.js +90 -76
- package/dist/assets/components/Geospatial.min.js +1 -1
- package/dist/assets/components/HAnim.js +171 -149
- package/dist/assets/components/HAnim.min.js +1 -1
- package/dist/assets/components/KeyDeviceSensor.js +18 -16
- package/dist/assets/components/KeyDeviceSensor.min.js +1 -1
- package/dist/assets/components/Layout.js +44 -44
- package/dist/assets/components/Layout.min.js +1 -1
- package/dist/assets/components/NURBS.js +68 -173
- package/dist/assets/components/NURBS.min.js +1 -1
- package/dist/assets/components/ParticleSystems.js +112 -97
- package/dist/assets/components/ParticleSystems.min.js +1 -1
- package/dist/assets/components/Picking.js +106 -102
- package/dist/assets/components/Picking.min.js +1 -1
- package/dist/assets/components/RigidBodyPhysics.js +214 -125
- package/dist/assets/components/RigidBodyPhysics.min.js +1 -1
- package/dist/assets/components/Scripting.js +43 -43
- package/dist/assets/components/Scripting.min.js +1 -1
- package/dist/assets/components/Text.js +34 -33
- package/dist/assets/components/Text.min.js +1 -1
- package/dist/assets/components/TextureProjection.js +48 -48
- package/dist/assets/components/TextureProjection.min.js +1 -1
- package/dist/assets/components/Texturing3D.js +60 -64
- package/dist/assets/components/Texturing3D.min.js +1 -1
- package/dist/assets/components/VolumeRendering.js +66 -66
- package/dist/assets/components/VolumeRendering.min.js +1 -1
- package/dist/assets/components/X_ITE.js +12 -12
- package/dist/assets/components/X_ITE.min.js +1 -1
- package/dist/x_ite.css +1 -1
- package/dist/x_ite.js +1034 -818
- package/dist/x_ite.min.js +1 -1
- package/dist/x_ite.min.mjs +1 -1
- package/dist/x_ite.mjs +1034 -818
- package/dist/x_ite.zip +0 -0
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* X_ITE v9.0.
|
|
1
|
+
/* X_ITE v9.0.3 */(() => { // webpackBootstrap
|
|
2
2
|
/******/ "use strict";
|
|
3
3
|
/******/ // The require scope
|
|
4
4
|
/******/ var __webpack_require__ = {};
|
|
@@ -39,37 +39,37 @@ var __webpack_exports__ = {};
|
|
|
39
39
|
// UNUSED EXPORTS: default
|
|
40
40
|
|
|
41
41
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Components\")"
|
|
42
|
-
const Components_namespaceObject = window [Symbol .for ("X_ITE.X3D-9.0.
|
|
42
|
+
const Components_namespaceObject = window [Symbol .for ("X_ITE.X3D-9.0.3")] .require ("x_ite/Components");
|
|
43
43
|
var Components_default = /*#__PURE__*/__webpack_require__.n(Components_namespaceObject);
|
|
44
44
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Fields\")"
|
|
45
|
-
const Fields_namespaceObject = window [Symbol .for ("X_ITE.X3D-9.0.
|
|
45
|
+
const Fields_namespaceObject = window [Symbol .for ("X_ITE.X3D-9.0.3")] .require ("x_ite/Fields");
|
|
46
46
|
var Fields_default = /*#__PURE__*/__webpack_require__.n(Fields_namespaceObject);
|
|
47
47
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Base/X3DFieldDefinition\")"
|
|
48
|
-
const X3DFieldDefinition_namespaceObject = window [Symbol .for ("X_ITE.X3D-9.0.
|
|
48
|
+
const X3DFieldDefinition_namespaceObject = window [Symbol .for ("X_ITE.X3D-9.0.3")] .require ("x_ite/Base/X3DFieldDefinition");
|
|
49
49
|
var X3DFieldDefinition_default = /*#__PURE__*/__webpack_require__.n(X3DFieldDefinition_namespaceObject);
|
|
50
50
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Base/FieldDefinitionArray\")"
|
|
51
|
-
const FieldDefinitionArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-9.0.
|
|
51
|
+
const FieldDefinitionArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-9.0.3")] .require ("x_ite/Base/FieldDefinitionArray");
|
|
52
52
|
var FieldDefinitionArray_default = /*#__PURE__*/__webpack_require__.n(FieldDefinitionArray_namespaceObject);
|
|
53
53
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Components/Lighting/X3DLightNode\")"
|
|
54
|
-
const X3DLightNode_namespaceObject = window [Symbol .for ("X_ITE.X3D-9.0.
|
|
54
|
+
const X3DLightNode_namespaceObject = window [Symbol .for ("X_ITE.X3D-9.0.3")] .require ("x_ite/Components/Lighting/X3DLightNode");
|
|
55
55
|
var X3DLightNode_default = /*#__PURE__*/__webpack_require__.n(X3DLightNode_namespaceObject);
|
|
56
56
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Base/X3DConstants\")"
|
|
57
|
-
const X3DConstants_namespaceObject = window [Symbol .for ("X_ITE.X3D-9.0.
|
|
57
|
+
const X3DConstants_namespaceObject = window [Symbol .for ("X_ITE.X3D-9.0.3")] .require ("x_ite/Base/X3DConstants");
|
|
58
58
|
var X3DConstants_default = /*#__PURE__*/__webpack_require__.n(X3DConstants_namespaceObject);
|
|
59
59
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Base/X3DCast\")"
|
|
60
|
-
const X3DCast_namespaceObject = window [Symbol .for ("X_ITE.X3D-9.0.
|
|
60
|
+
const X3DCast_namespaceObject = window [Symbol .for ("X_ITE.X3D-9.0.3")] .require ("x_ite/Base/X3DCast");
|
|
61
61
|
var X3DCast_default = /*#__PURE__*/__webpack_require__.n(X3DCast_namespaceObject);
|
|
62
62
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"standard/Math/Numbers/Vector3\")"
|
|
63
|
-
const Vector3_namespaceObject = window [Symbol .for ("X_ITE.X3D-9.0.
|
|
63
|
+
const Vector3_namespaceObject = window [Symbol .for ("X_ITE.X3D-9.0.3")] .require ("standard/Math/Numbers/Vector3");
|
|
64
64
|
var Vector3_default = /*#__PURE__*/__webpack_require__.n(Vector3_namespaceObject);
|
|
65
65
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"standard/Math/Numbers/Rotation4\")"
|
|
66
|
-
const Rotation4_namespaceObject = window [Symbol .for ("X_ITE.X3D-9.0.
|
|
66
|
+
const Rotation4_namespaceObject = window [Symbol .for ("X_ITE.X3D-9.0.3")] .require ("standard/Math/Numbers/Rotation4");
|
|
67
67
|
var Rotation4_default = /*#__PURE__*/__webpack_require__.n(Rotation4_namespaceObject);
|
|
68
68
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"standard/Math/Numbers/Matrix4\")"
|
|
69
|
-
const Matrix4_namespaceObject = window [Symbol .for ("X_ITE.X3D-9.0.
|
|
69
|
+
const Matrix4_namespaceObject = window [Symbol .for ("X_ITE.X3D-9.0.3")] .require ("standard/Math/Numbers/Matrix4");
|
|
70
70
|
var Matrix4_default = /*#__PURE__*/__webpack_require__.n(Matrix4_namespaceObject);
|
|
71
71
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Namespace\")"
|
|
72
|
-
const Namespace_namespaceObject = window [Symbol .for ("X_ITE.X3D-9.0.
|
|
72
|
+
const Namespace_namespaceObject = window [Symbol .for ("X_ITE.X3D-9.0.3")] .require ("x_ite/Namespace");
|
|
73
73
|
var Namespace_default = /*#__PURE__*/__webpack_require__.n(Namespace_namespaceObject);
|
|
74
74
|
;// CONCATENATED MODULE: ./src/x_ite/Components/TextureProjection/X3DTextureProjectorNode.js
|
|
75
75
|
/*******************************************************************************
|
|
@@ -271,9 +271,9 @@ Object .defineProperties (X3DTextureProjectorNode,
|
|
|
271
271
|
value: "X3DTextureProjectorNode",
|
|
272
272
|
enumerable: true,
|
|
273
273
|
},
|
|
274
|
-
|
|
274
|
+
componentInfo:
|
|
275
275
|
{
|
|
276
|
-
value: "TextureProjection",
|
|
276
|
+
value: Object .freeze ({ name: "TextureProjection", level: 4 }),
|
|
277
277
|
enumerable: true,
|
|
278
278
|
},
|
|
279
279
|
});
|
|
@@ -284,13 +284,13 @@ const __default__ = X3DTextureProjectorNode;
|
|
|
284
284
|
Namespace_default().add ("X3DTextureProjectorNode", "x_ite/Components/TextureProjection/X3DTextureProjectorNode", __default__);
|
|
285
285
|
/* harmony default export */ const TextureProjection_X3DTextureProjectorNode = (__default__);
|
|
286
286
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"standard/Math/Geometry/Camera\")"
|
|
287
|
-
const Camera_namespaceObject = window [Symbol .for ("X_ITE.X3D-9.0.
|
|
287
|
+
const Camera_namespaceObject = window [Symbol .for ("X_ITE.X3D-9.0.3")] .require ("standard/Math/Geometry/Camera");
|
|
288
288
|
var Camera_default = /*#__PURE__*/__webpack_require__.n(Camera_namespaceObject);
|
|
289
289
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"standard/Math/Utility/MatrixStack\")"
|
|
290
|
-
const MatrixStack_namespaceObject = window [Symbol .for ("X_ITE.X3D-9.0.
|
|
290
|
+
const MatrixStack_namespaceObject = window [Symbol .for ("X_ITE.X3D-9.0.3")] .require ("standard/Math/Utility/MatrixStack");
|
|
291
291
|
var MatrixStack_default = /*#__PURE__*/__webpack_require__.n(MatrixStack_namespaceObject);
|
|
292
292
|
;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"standard/Utility/ObjectCache\")"
|
|
293
|
-
const ObjectCache_namespaceObject = window [Symbol .for ("X_ITE.X3D-9.0.
|
|
293
|
+
const ObjectCache_namespaceObject = window [Symbol .for ("X_ITE.X3D-9.0.3")] .require ("standard/Utility/ObjectCache");
|
|
294
294
|
var ObjectCache_default = /*#__PURE__*/__webpack_require__.n(ObjectCache_namespaceObject);
|
|
295
295
|
;// CONCATENATED MODULE: ./src/x_ite/Components/TextureProjection/TextureProjector.js
|
|
296
296
|
/*******************************************************************************
|
|
@@ -492,9 +492,9 @@ Object .defineProperties (TextureProjector,
|
|
|
492
492
|
value: "TextureProjector",
|
|
493
493
|
enumerable: true,
|
|
494
494
|
},
|
|
495
|
-
|
|
495
|
+
componentInfo:
|
|
496
496
|
{
|
|
497
|
-
value: "TextureProjection",
|
|
497
|
+
value: Object .freeze ({ name: "TextureProjection", level: 2 }),
|
|
498
498
|
enumerable: true,
|
|
499
499
|
},
|
|
500
500
|
containerField:
|
|
@@ -504,7 +504,7 @@ Object .defineProperties (TextureProjector,
|
|
|
504
504
|
},
|
|
505
505
|
specificationRange:
|
|
506
506
|
{
|
|
507
|
-
value: Object .freeze (
|
|
507
|
+
value: Object .freeze ({ from: "4.0", to: "Infinity" }),
|
|
508
508
|
enumerable: true,
|
|
509
509
|
},
|
|
510
510
|
fieldDefinitions:
|
|
@@ -528,10 +528,10 @@ Object .defineProperties (TextureProjector,
|
|
|
528
528
|
new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "texture", new (Fields_default()).SFNode ()),
|
|
529
529
|
|
|
530
530
|
new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "shadows", new (Fields_default()).SFBool ()),
|
|
531
|
-
new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "shadowColor", new (Fields_default()).SFColor ()),
|
|
531
|
+
new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "shadowColor", new (Fields_default()).SFColor ()), // skip test
|
|
532
532
|
new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "shadowIntensity", new (Fields_default()).SFFloat (1)),
|
|
533
|
-
new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "shadowBias", new (Fields_default()).SFFloat (0.005)),
|
|
534
|
-
new (X3DFieldDefinition_default()) ((X3DConstants_default()).initializeOnly, "shadowMapSize", new (Fields_default()).SFInt32 (1024)),
|
|
533
|
+
new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "shadowBias", new (Fields_default()).SFFloat (0.005)), // skip test
|
|
534
|
+
new (X3DFieldDefinition_default()) ((X3DConstants_default()).initializeOnly, "shadowMapSize", new (Fields_default()).SFInt32 (1024)), // skip test
|
|
535
535
|
]),
|
|
536
536
|
enumerable: true,
|
|
537
537
|
},
|
|
@@ -797,9 +797,9 @@ Object .defineProperties (TextureProjectorParallel,
|
|
|
797
797
|
value: "TextureProjectorParallel",
|
|
798
798
|
enumerable: true,
|
|
799
799
|
},
|
|
800
|
-
|
|
800
|
+
componentInfo:
|
|
801
801
|
{
|
|
802
|
-
value: "TextureProjection",
|
|
802
|
+
value: Object .freeze ({ name: "TextureProjection", level: 2 }),
|
|
803
803
|
enumerable: true,
|
|
804
804
|
},
|
|
805
805
|
containerField:
|
|
@@ -809,34 +809,34 @@ Object .defineProperties (TextureProjectorParallel,
|
|
|
809
809
|
},
|
|
810
810
|
specificationRange:
|
|
811
811
|
{
|
|
812
|
-
value: Object .freeze (
|
|
812
|
+
value: Object .freeze ({ from: "4.0", to: "Infinity" }),
|
|
813
813
|
enumerable: true,
|
|
814
814
|
},
|
|
815
815
|
fieldDefinitions:
|
|
816
816
|
{
|
|
817
817
|
value: new (FieldDefinitionArray_default()) ([
|
|
818
|
-
new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "metadata",
|
|
819
|
-
new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "description",
|
|
820
|
-
new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "global",
|
|
821
|
-
new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "on",
|
|
822
|
-
new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "color",
|
|
823
|
-
new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "intensity",
|
|
824
|
-
new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "ambientIntensity",new (Fields_default()).SFFloat ()),
|
|
825
|
-
|
|
826
|
-
new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "location",
|
|
827
|
-
new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "direction",
|
|
828
|
-
new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "upVector",
|
|
829
|
-
new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "fieldOfView",
|
|
830
|
-
new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "nearDistance",
|
|
831
|
-
new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "farDistance",
|
|
832
|
-
new (X3DFieldDefinition_default()) ((X3DConstants_default()).outputOnly, "aspectRatio",
|
|
833
|
-
new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "texture",
|
|
834
|
-
|
|
835
|
-
new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "shadows",
|
|
836
|
-
new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "shadowColor",
|
|
837
|
-
new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "shadowIntensity",
|
|
838
|
-
new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "shadowBias",
|
|
839
|
-
new (X3DFieldDefinition_default()) ((X3DConstants_default()).initializeOnly, "shadowMapSize",
|
|
818
|
+
new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "metadata", new (Fields_default()).SFNode ()),
|
|
819
|
+
new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "description", new (Fields_default()).SFString ()),
|
|
820
|
+
new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "global", new (Fields_default()).SFBool (true)),
|
|
821
|
+
new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "on", new (Fields_default()).SFBool (true)),
|
|
822
|
+
new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "color", new (Fields_default()).SFColor (1, 1, 1)),
|
|
823
|
+
new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "intensity", new (Fields_default()).SFFloat (1)),
|
|
824
|
+
new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "ambientIntensity", new (Fields_default()).SFFloat ()),
|
|
825
|
+
|
|
826
|
+
new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "location", new (Fields_default()).SFVec3f (0, 0, 0)),
|
|
827
|
+
new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "direction", new (Fields_default()).SFVec3f (0, 0, 1)),
|
|
828
|
+
new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "upVector", new (Fields_default()).SFVec3f (0, 0, 1)),
|
|
829
|
+
new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "fieldOfView", new (Fields_default()).MFFloat (-1, -1, 1, 1)),
|
|
830
|
+
new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "nearDistance", new (Fields_default()).SFFloat (-1)),
|
|
831
|
+
new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "farDistance", new (Fields_default()).SFFloat (-1)),
|
|
832
|
+
new (X3DFieldDefinition_default()) ((X3DConstants_default()).outputOnly, "aspectRatio", new (Fields_default()).SFFloat ()),
|
|
833
|
+
new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "texture", new (Fields_default()).SFNode ()),
|
|
834
|
+
|
|
835
|
+
new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "shadows", new (Fields_default()).SFBool ()),
|
|
836
|
+
new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "shadowColor", new (Fields_default()).SFColor ()), // skip test
|
|
837
|
+
new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "shadowIntensity", new (Fields_default()).SFFloat (1)),
|
|
838
|
+
new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "shadowBias", new (Fields_default()).SFFloat (0.005)), // skip test
|
|
839
|
+
new (X3DFieldDefinition_default()) ((X3DConstants_default()).initializeOnly, "shadowMapSize", new (Fields_default()).SFInt32 (1024)), // skip test
|
|
840
840
|
]),
|
|
841
841
|
enumerable: true,
|
|
842
842
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/* X_ITE v9.0.2 */(()=>{"use strict";var t={n:e=>{var i=e&&e.__esModule?()=>e.default:()=>e;return t.d(i,{a:i}),i},d:(e,i)=>{for(var r in i)t.o(i,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:i[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)};const e=window[Symbol.for("X_ITE.X3D-9.0.2")].require("x_ite/Components");var i=t.n(e);const r=window[Symbol.for("X_ITE.X3D-9.0.2")].require("x_ite/Fields");var n=t.n(r);const o=window[Symbol.for("X_ITE.X3D-9.0.2")].require("x_ite/Base/X3DFieldDefinition");var a=t.n(o);const s=window[Symbol.for("X_ITE.X3D-9.0.2")].require("x_ite/Base/FieldDefinitionArray");var u=t.n(s);const h=window[Symbol.for("X_ITE.X3D-9.0.2")].require("x_ite/Components/Lighting/X3DLightNode");var l=t.n(h);const c=window[Symbol.for("X_ITE.X3D-9.0.2")].require("x_ite/Base/X3DConstants");var x=t.n(c);const w=window[Symbol.for("X_ITE.X3D-9.0.2")].require("x_ite/Base/X3DCast");var m=t.n(w);const d=window[Symbol.for("X_ITE.X3D-9.0.2")].require("standard/Math/Numbers/Vector3");var p=t.n(d);const g=window[Symbol.for("X_ITE.X3D-9.0.2")].require("standard/Math/Numbers/Rotation4");var _=t.n(g);const f=window[Symbol.for("X_ITE.X3D-9.0.2")].require("standard/Math/Numbers/Matrix4");var T=t.n(f);const b=window[Symbol.for("X_ITE.X3D-9.0.2")].require("x_ite/Namespace");var S=t.n(b);function M(t){l().call(this,t),this.addType(x().X3DTextureProjectorNode),this._location.setUnit("length"),this._farDistance.setUnit("length"),this._location.setUnit("length")}Object.assign(Object.setPrototypeOf(M.prototype,l().prototype),{initialize(){l().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(T())(.5,0,0,0,0,.5,0,0,0,0,.5,0,.5,.5,.5,1);return function(){return t}})(),straightenHorizon:(()=>{const t=new(p())(0,0,0),e=new(p())(0,0,0),i=new(p())(0,0,0),r=new(_());return function(n){n.multVecRot(t.assign(p().xAxis).negate()),n.multVecRot(e.assign(p().zAxis)),i.assign(this._upVector.getValue()).normalize();const o=e.cross(i);return Math.abs(e.dot(i))>=1||Math.abs(o.dot(t))>=1?n:(r.setFromToVec(t,o),n.multRight(r))}})(),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()(x().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(M,{typeName:{value:"X3DTextureProjectorNode",enumerable:!0},componentName:{value:"TextureProjection",enumerable:!0}});const y=M;S().add("X3DTextureProjectorNode","x_ite/Components/TextureProjection/X3DTextureProjectorNode",y);const F=y,O=window[Symbol.for("X_ITE.X3D-9.0.2")].require("standard/Math/Geometry/Camera");var P=t.n(O);const j=window[Symbol.for("X_ITE.X3D-9.0.2")].require("standard/Math/Utility/MatrixStack");var D=t.n(j);const X=window[Symbol.for("X_ITE.X3D-9.0.2")].require("standard/Utility/ObjectCache");var v=t.n(X);const V=v()(N);function N(){this.projectionMatrix=new(T()),this.modelViewMatrix=new(D())(T()),this.modelMatrix=new(T()),this.invTextureSpaceMatrix=new(T()),this.invTextureSpaceProjectionMatrix=new(T()),this.location=new(p())(0,0,0),this.locationArray=new Float32Array(3),this.direction=new(p())(0,0,0),this.rotation=new(_()),this.matrix=new(T()),this.matrixArray=new Float32Array(16),this.textureMatrix=new(T())}function I(t){F.call(this,t),this.addType(x().TextureProjector),this._fieldOfView.setUnit("angle")}Object.assign(N.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:T().Identity);this.rotation.setFromToVec(p().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();P().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,V.push(this)}}),Object.assign(Object.setPrototypeOf(I.prototype,F.prototype),{initialize(){F.prototype.initialize.call(this)},getFieldOfView(){const t=this._fieldOfView.getValue();return t>0&&t<Math.PI?t:Math.PI/4},getLights:()=>V}),Object.defineProperties(I,{typeName:{value:"TextureProjector",enumerable:!0},componentName:{value:"TextureProjection",enumerable:!0},containerField:{value:"children",enumerable:!0},specificationRange:{value:Object.freeze(["4.0","Infinity"]),enumerable:!0},fieldDefinitions:{value:new(u())([new(a())(x().inputOutput,"metadata",new(n().SFNode)),new(a())(x().inputOutput,"description",new(n().SFString)),new(a())(x().inputOutput,"global",new(n().SFBool)(!0)),new(a())(x().inputOutput,"on",new(n().SFBool)(!0)),new(a())(x().inputOutput,"color",new(n().SFColor)(1,1,1)),new(a())(x().inputOutput,"intensity",new(n().SFFloat)(1)),new(a())(x().inputOutput,"ambientIntensity",new(n().SFFloat)),new(a())(x().inputOutput,"location",new(n().SFVec3f)(0,0,0)),new(a())(x().inputOutput,"direction",new(n().SFVec3f)(0,0,1)),new(a())(x().inputOutput,"upVector",new(n().SFVec3f)(0,0,1)),new(a())(x().inputOutput,"fieldOfView",new(n().SFFloat)(.785398)),new(a())(x().inputOutput,"nearDistance",new(n().SFFloat)(-1)),new(a())(x().inputOutput,"farDistance",new(n().SFFloat)(-1)),new(a())(x().outputOnly,"aspectRatio",new(n().SFFloat)),new(a())(x().inputOutput,"texture",new(n().SFNode)),new(a())(x().inputOutput,"shadows",new(n().SFBool)),new(a())(x().inputOutput,"shadowColor",new(n().SFColor)),new(a())(x().inputOutput,"shadowIntensity",new(n().SFFloat)(1)),new(a())(x().inputOutput,"shadowBias",new(n().SFFloat)(.005)),new(a())(x().initializeOnly,"shadowMapSize",new(n().SFInt32)(1024))]),enumerable:!0}});const R=I;S().add("TextureProjector","x_ite/Components/TextureProjection/TextureProjector",R);const z=R,U=v()(E);function E(){this.projectionMatrix=new(T()),this.modelViewMatrix=new(D())(T()),this.modelMatrix=new(T()),this.invTextureSpaceMatrix=new(T()),this.location=new(p())(0,0,0),this.locationArray=new Float32Array(3),this.invTextureSpaceProjectionMatrix=new(T()),this.direction=new(p())(0,0,0),this.rotation=new(_()),this.matrix=new(T()),this.matrixArray=new Float32Array(16),this.textureMatrix=new(T())}function A(t){F.call(this,t),this.addType(x().TextureProjectorParallel),this._fieldOfView.setUnit("length")}Object.assign(E.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:T().Identity);this.rotation.setFromToVec(p().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(),l=e.getSizeX(),c=e.getSizeY(),x=e.getNearDistance(),w=e.getFarDistance();if(o>l/c){const t=(a+s)/2,e=c*o/2;P().ortho(t-e,t+e,u,h,x,w,this.projectionMatrix)}else{const t=(u+h)/2,e=l/o/2;P().ortho(a,s,t-e,t+e,x,w,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,U.push(this)}}),Object.assign(Object.setPrototypeOf(A.prototype,F.prototype),{initialize(){F.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:()=>U}),Object.defineProperties(A,{typeName:{value:"TextureProjectorParallel",enumerable:!0},componentName:{value:"TextureProjection",enumerable:!0},containerField:{value:"children",enumerable:!0},specificationRange:{value:Object.freeze(["4.0","Infinity"]),enumerable:!0},fieldDefinitions:{value:new(u())([new(a())(x().inputOutput,"metadata",new(n().SFNode)),new(a())(x().inputOutput,"description",new(n().SFString)),new(a())(x().inputOutput,"global",new(n().SFBool)(!0)),new(a())(x().inputOutput,"on",new(n().SFBool)(!0)),new(a())(x().inputOutput,"color",new(n().SFColor)(1,1,1)),new(a())(x().inputOutput,"intensity",new(n().SFFloat)(1)),new(a())(x().inputOutput,"ambientIntensity",new(n().SFFloat)),new(a())(x().inputOutput,"location",new(n().SFVec3f)(0,0,0)),new(a())(x().inputOutput,"direction",new(n().SFVec3f)(0,0,1)),new(a())(x().inputOutput,"upVector",new(n().SFVec3f)(0,0,1)),new(a())(x().inputOutput,"fieldOfView",new(n().MFFloat)(-1,-1,1,1)),new(a())(x().inputOutput,"nearDistance",new(n().SFFloat)(-1)),new(a())(x().inputOutput,"farDistance",new(n().SFFloat)(-1)),new(a())(x().outputOnly,"aspectRatio",new(n().SFFloat)),new(a())(x().inputOutput,"texture",new(n().SFNode)),new(a())(x().inputOutput,"shadows",new(n().SFBool)),new(a())(x().inputOutput,"shadowColor",new(n().SFColor)),new(a())(x().inputOutput,"shadowIntensity",new(n().SFFloat)(1)),new(a())(x().inputOutput,"shadowBias",new(n().SFFloat)(.005)),new(a())(x().initializeOnly,"shadowMapSize",new(n().SFInt32)(1024))]),enumerable:!0}});const C=A;S().add("TextureProjectorParallel","x_ite/Components/TextureProjection/TextureProjectorParallel",C);const B=C;i().add({name:"TextureProjection",concreteNodes:[z,B],abstractNodes:[F]});const q=void 0;S().add("TextureProjection","assets/components/TextureProjection",q)})();
|
|
1
|
+
/* X_ITE v9.0.3 */(()=>{"use strict";var t={n:e=>{var i=e&&e.__esModule?()=>e.default:()=>e;return t.d(i,{a:i}),i},d:(e,i)=>{for(var r in i)t.o(i,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:i[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)};const e=window[Symbol.for("X_ITE.X3D-9.0.3")].require("x_ite/Components");var i=t.n(e);const r=window[Symbol.for("X_ITE.X3D-9.0.3")].require("x_ite/Fields");var n=t.n(r);const o=window[Symbol.for("X_ITE.X3D-9.0.3")].require("x_ite/Base/X3DFieldDefinition");var a=t.n(o);const s=window[Symbol.for("X_ITE.X3D-9.0.3")].require("x_ite/Base/FieldDefinitionArray");var u=t.n(s);const l=window[Symbol.for("X_ITE.X3D-9.0.3")].require("x_ite/Components/Lighting/X3DLightNode");var h=t.n(l);const c=window[Symbol.for("X_ITE.X3D-9.0.3")].require("x_ite/Base/X3DConstants");var x=t.n(c);const w=window[Symbol.for("X_ITE.X3D-9.0.3")].require("x_ite/Base/X3DCast");var m=t.n(w);const d=window[Symbol.for("X_ITE.X3D-9.0.3")].require("standard/Math/Numbers/Vector3");var p=t.n(d);const g=window[Symbol.for("X_ITE.X3D-9.0.3")].require("standard/Math/Numbers/Rotation4");var f=t.n(g);const _=window[Symbol.for("X_ITE.X3D-9.0.3")].require("standard/Math/Numbers/Matrix4");var T=t.n(_);const b=window[Symbol.for("X_ITE.X3D-9.0.3")].require("x_ite/Namespace");var O=t.n(b);function S(t){h().call(this,t),this.addType(x().X3DTextureProjectorNode),this._location.setUnit("length"),this._farDistance.setUnit("length"),this._location.setUnit("length")}Object.assign(Object.setPrototypeOf(S.prototype,h().prototype),{initialize(){h().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(T())(.5,0,0,0,0,.5,0,0,0,0,.5,0,.5,.5,.5,1);return function(){return t}})(),straightenHorizon:(()=>{const t=new(p())(0,0,0),e=new(p())(0,0,0),i=new(p())(0,0,0),r=new(f());return function(n){n.multVecRot(t.assign(p().xAxis).negate()),n.multVecRot(e.assign(p().zAxis)),i.assign(this._upVector.getValue()).normalize();const o=e.cross(i);return Math.abs(e.dot(i))>=1||Math.abs(o.dot(t))>=1?n:(r.setFromToVec(t,o),n.multRight(r))}})(),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()(x().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(S,{typeName:{value:"X3DTextureProjectorNode",enumerable:!0},componentInfo:{value:Object.freeze({name:"TextureProjection",level:4}),enumerable:!0}});const M=S;O().add("X3DTextureProjectorNode","x_ite/Components/TextureProjection/X3DTextureProjectorNode",M);const y=M,F=window[Symbol.for("X_ITE.X3D-9.0.3")].require("standard/Math/Geometry/Camera");var j=t.n(F);const P=window[Symbol.for("X_ITE.X3D-9.0.3")].require("standard/Math/Utility/MatrixStack");var D=t.n(P);const v=window[Symbol.for("X_ITE.X3D-9.0.3")].require("standard/Utility/ObjectCache");var X=t.n(v);const V=X()(I);function I(){this.projectionMatrix=new(T()),this.modelViewMatrix=new(D())(T()),this.modelMatrix=new(T()),this.invTextureSpaceMatrix=new(T()),this.invTextureSpaceProjectionMatrix=new(T()),this.location=new(p())(0,0,0),this.locationArray=new Float32Array(3),this.direction=new(p())(0,0,0),this.rotation=new(f()),this.matrix=new(T()),this.matrixArray=new Float32Array(16),this.textureMatrix=new(T())}function N(t){y.call(this,t),this.addType(x().TextureProjector),this._fieldOfView.setUnit("angle")}Object.assign(I.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:T().Identity);this.rotation.setFromToVec(p().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(),l=e.getFieldOfView();j().perspective(l,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,V.push(this)}}),Object.assign(Object.setPrototypeOf(N.prototype,y.prototype),{initialize(){y.prototype.initialize.call(this)},getFieldOfView(){const t=this._fieldOfView.getValue();return t>0&&t<Math.PI?t:Math.PI/4},getLights:()=>V}),Object.defineProperties(N,{typeName:{value:"TextureProjector",enumerable:!0},componentInfo:{value:Object.freeze({name:"TextureProjection",level:2}),enumerable:!0},containerField:{value:"children",enumerable:!0},specificationRange:{value:Object.freeze({from:"4.0",to:"Infinity"}),enumerable:!0},fieldDefinitions:{value:new(u())([new(a())(x().inputOutput,"metadata",new(n().SFNode)),new(a())(x().inputOutput,"description",new(n().SFString)),new(a())(x().inputOutput,"global",new(n().SFBool)(!0)),new(a())(x().inputOutput,"on",new(n().SFBool)(!0)),new(a())(x().inputOutput,"color",new(n().SFColor)(1,1,1)),new(a())(x().inputOutput,"intensity",new(n().SFFloat)(1)),new(a())(x().inputOutput,"ambientIntensity",new(n().SFFloat)),new(a())(x().inputOutput,"location",new(n().SFVec3f)(0,0,0)),new(a())(x().inputOutput,"direction",new(n().SFVec3f)(0,0,1)),new(a())(x().inputOutput,"upVector",new(n().SFVec3f)(0,0,1)),new(a())(x().inputOutput,"fieldOfView",new(n().SFFloat)(.785398)),new(a())(x().inputOutput,"nearDistance",new(n().SFFloat)(-1)),new(a())(x().inputOutput,"farDistance",new(n().SFFloat)(-1)),new(a())(x().outputOnly,"aspectRatio",new(n().SFFloat)),new(a())(x().inputOutput,"texture",new(n().SFNode)),new(a())(x().inputOutput,"shadows",new(n().SFBool)),new(a())(x().inputOutput,"shadowColor",new(n().SFColor)),new(a())(x().inputOutput,"shadowIntensity",new(n().SFFloat)(1)),new(a())(x().inputOutput,"shadowBias",new(n().SFFloat)(.005)),new(a())(x().initializeOnly,"shadowMapSize",new(n().SFInt32)(1024))]),enumerable:!0}});const z=N;O().add("TextureProjector","x_ite/Components/TextureProjection/TextureProjector",z);const R=z,U=X()(E);function E(){this.projectionMatrix=new(T()),this.modelViewMatrix=new(D())(T()),this.modelMatrix=new(T()),this.invTextureSpaceMatrix=new(T()),this.location=new(p())(0,0,0),this.locationArray=new Float32Array(3),this.invTextureSpaceProjectionMatrix=new(T()),this.direction=new(p())(0,0,0),this.rotation=new(f()),this.matrix=new(T()),this.matrixArray=new Float32Array(16),this.textureMatrix=new(T())}function A(t){y.call(this,t),this.addType(x().TextureProjectorParallel),this._fieldOfView.setUnit("length")}Object.assign(E.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:T().Identity);this.rotation.setFromToVec(p().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(),l=e.getMaximumY(),h=e.getSizeX(),c=e.getSizeY(),x=e.getNearDistance(),w=e.getFarDistance();if(o>h/c){const t=(a+s)/2,e=c*o/2;j().ortho(t-e,t+e,u,l,x,w,this.projectionMatrix)}else{const t=(u+l)/2,e=h/o/2;j().ortho(a,s,t-e,t+e,x,w,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,U.push(this)}}),Object.assign(Object.setPrototypeOf(A.prototype,y.prototype),{initialize(){y.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:()=>U}),Object.defineProperties(A,{typeName:{value:"TextureProjectorParallel",enumerable:!0},componentInfo:{value:Object.freeze({name:"TextureProjection",level:2}),enumerable:!0},containerField:{value:"children",enumerable:!0},specificationRange:{value:Object.freeze({from:"4.0",to:"Infinity"}),enumerable:!0},fieldDefinitions:{value:new(u())([new(a())(x().inputOutput,"metadata",new(n().SFNode)),new(a())(x().inputOutput,"description",new(n().SFString)),new(a())(x().inputOutput,"global",new(n().SFBool)(!0)),new(a())(x().inputOutput,"on",new(n().SFBool)(!0)),new(a())(x().inputOutput,"color",new(n().SFColor)(1,1,1)),new(a())(x().inputOutput,"intensity",new(n().SFFloat)(1)),new(a())(x().inputOutput,"ambientIntensity",new(n().SFFloat)),new(a())(x().inputOutput,"location",new(n().SFVec3f)(0,0,0)),new(a())(x().inputOutput,"direction",new(n().SFVec3f)(0,0,1)),new(a())(x().inputOutput,"upVector",new(n().SFVec3f)(0,0,1)),new(a())(x().inputOutput,"fieldOfView",new(n().MFFloat)(-1,-1,1,1)),new(a())(x().inputOutput,"nearDistance",new(n().SFFloat)(-1)),new(a())(x().inputOutput,"farDistance",new(n().SFFloat)(-1)),new(a())(x().outputOnly,"aspectRatio",new(n().SFFloat)),new(a())(x().inputOutput,"texture",new(n().SFNode)),new(a())(x().inputOutput,"shadows",new(n().SFBool)),new(a())(x().inputOutput,"shadowColor",new(n().SFColor)),new(a())(x().inputOutput,"shadowIntensity",new(n().SFFloat)(1)),new(a())(x().inputOutput,"shadowBias",new(n().SFFloat)(.005)),new(a())(x().initializeOnly,"shadowMapSize",new(n().SFInt32)(1024))]),enumerable:!0}});const C=A;O().add("TextureProjectorParallel","x_ite/Components/TextureProjection/TextureProjectorParallel",C);const B=C;i().add({name:"TextureProjection",concreteNodes:[R,B],abstractNodes:[y]});const q=void 0;O().add("TextureProjection","assets/components/TextureProjection",q)})();
|