x_ite 11.5.11 → 11.5.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/README.md +4 -4
  2. package/dist/assets/components/AnnotationComponent.js +2 -378
  3. package/dist/assets/components/AnnotationComponent.min.js +2 -2
  4. package/dist/assets/components/CADGeometryComponent.js +2 -378
  5. package/dist/assets/components/CADGeometryComponent.min.js +2 -2
  6. package/dist/assets/components/CubeMapTexturingComponent.js +4 -333
  7. package/dist/assets/components/CubeMapTexturingComponent.min.js +2 -2
  8. package/dist/assets/components/DISComponent.js +2 -331
  9. package/dist/assets/components/DISComponent.min.js +2 -2
  10. package/dist/assets/components/EventUtilitiesComponent.js +2 -472
  11. package/dist/assets/components/EventUtilitiesComponent.min.js +2 -2
  12. package/dist/assets/components/Geometry2DComponent.js +2 -707
  13. package/dist/assets/components/Geometry2DComponent.min.js +2 -2
  14. package/dist/assets/components/GeospatialComponent.js +4 -897
  15. package/dist/assets/components/GeospatialComponent.min.js +2 -2
  16. package/dist/assets/components/HAnimComponent.js +9 -338
  17. package/dist/assets/components/HAnimComponent.min.js +2 -2
  18. package/dist/assets/components/KeyDeviceSensorComponent.js +2 -237
  19. package/dist/assets/components/KeyDeviceSensorComponent.min.js +2 -2
  20. package/dist/assets/components/LayoutComponent.js +2 -425
  21. package/dist/assets/components/LayoutComponent.min.js +2 -2
  22. package/dist/assets/components/NURBSComponent.js +3 -896
  23. package/dist/assets/components/NURBSComponent.min.js +2 -2
  24. package/dist/assets/components/ParticleSystemsComponent.js +9 -715
  25. package/dist/assets/components/ParticleSystemsComponent.min.js +2 -2
  26. package/dist/assets/components/PickingComponent.js +2 -566
  27. package/dist/assets/components/PickingComponent.min.js +2 -2
  28. package/dist/assets/components/RigidBodyPhysicsComponent.js +2 -942
  29. package/dist/assets/components/RigidBodyPhysicsComponent.min.js +2 -2
  30. package/dist/assets/components/ScriptingComponent.js +2 -190
  31. package/dist/assets/components/ScriptingComponent.min.js +2 -2
  32. package/dist/assets/components/TextComponent.js +2 -379
  33. package/dist/assets/components/TextComponent.min.js +2 -2
  34. package/dist/assets/components/TextureProjectionComponent.js +8 -196
  35. package/dist/assets/components/TextureProjectionComponent.min.js +2 -2
  36. package/dist/assets/components/Texturing3DComponent.js +112 -676
  37. package/dist/assets/components/Texturing3DComponent.min.js +2 -2
  38. package/dist/assets/components/VolumeRenderingComponent.js +5 -900
  39. package/dist/assets/components/VolumeRenderingComponent.min.js +2 -2
  40. package/dist/assets/components/WebXRComponent.js +5 -145
  41. package/dist/assets/components/WebXRComponent.min.js +2 -2
  42. package/dist/assets/components/X_ITEComponent.js +18 -853
  43. package/dist/assets/components/X_ITEComponent.min.js +2 -2
  44. package/dist/assets/fonts/PT_Sans/OFL.txt +94 -94
  45. package/dist/assets/lib/libktx.js +1 -1
  46. package/dist/assets/lib/libktx.wasm +0 -0
  47. package/dist/example.html +1 -1
  48. package/dist/x_ite.css +1 -1
  49. package/dist/x_ite.js +51001 -70446
  50. package/dist/x_ite.min.js +2 -2
  51. package/dist/x_ite.min.mjs +2 -2
  52. package/dist/x_ite.mjs +50296 -69741
  53. package/dist/x_ite.zip +0 -0
  54. package/package.json +2 -2
@@ -1,5 +1,5 @@
1
- /* X_ITE v11.5.11 */
2
- const __X_ITE_X3D__ = window [Symbol .for ("X_ITE.X3D-11.5.11")];
1
+ /* X_ITE v11.5.12 */
2
+ const __X_ITE_X3D__ = window [Symbol .for ("X_ITE.X3D-11.5.12")];
3
3
  /******/ (() => { // webpackBootstrap
4
4
  /******/ "use strict";
5
5
  /******/ // The require scope
@@ -76,53 +76,6 @@ var external_X_ITE_X3D_Matrix4_default = /*#__PURE__*/__webpack_require__.n(exte
76
76
  const external_X_ITE_X3D_Namespace_namespaceObject = __X_ITE_X3D__ .Namespace;
77
77
  var external_X_ITE_X3D_Namespace_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_Namespace_namespaceObject);
78
78
  ;// ./src/x_ite/Components/TextureProjection/X3DTextureProjectorNode.js
79
- /*******************************************************************************
80
- *
81
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
82
- *
83
- * Copyright create3000, Scheffelstraße 31a, Leipzig, Germany 2011 - 2022.
84
- *
85
- * All rights reserved. Holger Seelig <holger.seelig@yahoo.de>.
86
- *
87
- * The copyright notice above does not evidence any actual of intended
88
- * publication of such source code, and is an unpublished work by create3000.
89
- * This material contains CONFIDENTIAL INFORMATION that is the property of
90
- * create3000.
91
- *
92
- * No permission is granted to copy, distribute, or create derivative works from
93
- * the contents of this software, in whole or in part, without the prior written
94
- * permission of create3000.
95
- *
96
- * NON-MILITARY USE ONLY
97
- *
98
- * All create3000 software are effectively free software with a non-military use
99
- * restriction. It is free. Well commented source is provided. You may reuse the
100
- * source in any way you please with the exception anything that uses it must be
101
- * marked to indicate is contains 'non-military use only' components.
102
- *
103
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
104
- *
105
- * Copyright 2011 - 2022, Holger Seelig <holger.seelig@yahoo.de>.
106
- *
107
- * This file is part of the X_ITE Project.
108
- *
109
- * X_ITE is free software: you can redistribute it and/or modify it under the
110
- * terms of the GNU General Public License version 3 only, as published by the
111
- * Free Software Foundation.
112
- *
113
- * X_ITE is distributed in the hope that it will be useful, but WITHOUT ANY
114
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
115
- * A PARTICULAR PURPOSE. See the GNU General Public License version 3 for more
116
- * details (a copy is included in the LICENSE file that accompanied this code).
117
- *
118
- * You should have received a copy of the GNU General Public License version 3
119
- * along with X_ITE. If not, see <https://www.gnu.org/licenses/gpl.html> for a
120
- * copy of the GPLv3 License.
121
- *
122
- * For Silvio, Joy and Adi.
123
- *
124
- ******************************************************************************/
125
-
126
79
 
127
80
 
128
81
 
@@ -263,53 +216,6 @@ var external_X_ITE_X3D_MatrixStack_default = /*#__PURE__*/__webpack_require__.n(
263
216
  const external_X_ITE_X3D_ObjectCache_namespaceObject = __X_ITE_X3D__ .ObjectCache;
264
217
  var external_X_ITE_X3D_ObjectCache_default = /*#__PURE__*/__webpack_require__.n(external_X_ITE_X3D_ObjectCache_namespaceObject);
265
218
  ;// ./src/x_ite/Components/TextureProjection/TextureProjector.js
266
- /*******************************************************************************
267
- *
268
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
269
- *
270
- * Copyright create3000, Scheffelstraße 31a, Leipzig, Germany 2011 - 2022.
271
- *
272
- * All rights reserved. Holger Seelig <holger.seelig@yahoo.de>.
273
- *
274
- * The copyright notice above does not evidence any actual of intended
275
- * publication of such source code, and is an unpublished work by create3000.
276
- * This material contains CONFIDENTIAL INFORMATION that is the property of
277
- * create3000.
278
- *
279
- * No permission is granted to copy, distribute, or create derivative works from
280
- * the contents of this software, in whole or in part, without the prior written
281
- * permission of create3000.
282
- *
283
- * NON-MILITARY USE ONLY
284
- *
285
- * All create3000 software are effectively free software with a non-military use
286
- * restriction. It is free. Well commented source is provided. You may reuse the
287
- * source in any way you please with the exception anything that uses it must be
288
- * marked to indicate is contains 'non-military use only' components.
289
- *
290
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
291
- *
292
- * Copyright 2011 - 2022, Holger Seelig <holger.seelig@yahoo.de>.
293
- *
294
- * This file is part of the X_ITE Project.
295
- *
296
- * X_ITE is free software: you can redistribute it and/or modify it under the
297
- * terms of the GNU General Public License version 3 only, as published by the
298
- * Free Software Foundation.
299
- *
300
- * X_ITE is distributed in the hope that it will be useful, but WITHOUT ANY
301
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
302
- * A PARTICULAR PURPOSE. See the GNU General Public License version 3 for more
303
- * details (a copy is included in the LICENSE file that accompanied this code).
304
- *
305
- * You should have received a copy of the GNU General Public License version 3
306
- * along with X_ITE. If not, see <https://www.gnu.org/licenses/gpl.html> for a
307
- * copy of the GPLv3 License.
308
- *
309
- * For Silvio, Joy and Adi.
310
- *
311
- ******************************************************************************/
312
-
313
219
 
314
220
 
315
221
 
@@ -405,8 +311,8 @@ Object .assign (TextureProjectorContainer .prototype,
405
311
  lightNode = this .lightNode,
406
312
  texture = lightNode .getTexture (),
407
313
  textureUnit = this .global
408
- ? (this .textureUnit = this .textureUnit ?? this .browser .popTexture2DUnit ())
409
- : this .browser .getTexture2DUnit ();
314
+ ? (this .textureUnit = this .textureUnit ?? this .browser .popTextureUnit ())
315
+ : this .browser .getTextureUnit ();
410
316
 
411
317
  gl .activeTexture (gl .TEXTURE0 + textureUnit);
412
318
  gl .bindTexture (gl .TEXTURE_2D, texture .getTexture ());
@@ -427,7 +333,7 @@ Object .assign (TextureProjectorContainer .prototype,
427
333
  },
428
334
  dispose ()
429
335
  {
430
- this .browser .pushTexture2DUnit (this .textureUnit);
336
+ this .browser .pushTextureUnit (this .textureUnit);
431
337
 
432
338
  this .modelViewMatrix .clear ();
433
339
 
@@ -504,53 +410,6 @@ const TextureProjector_default_ = TextureProjector;
504
410
 
505
411
  /* harmony default export */ const TextureProjection_TextureProjector = (external_X_ITE_X3D_Namespace_default().add ("TextureProjector", TextureProjector_default_));
506
412
  ;// ./src/x_ite/Components/TextureProjection/TextureProjectorParallel.js
507
- /*******************************************************************************
508
- *
509
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
510
- *
511
- * Copyright create3000, Scheffelstraße 31a, Leipzig, Germany 2011 - 2022.
512
- *
513
- * All rights reserved. Holger Seelig <holger.seelig@yahoo.de>.
514
- *
515
- * The copyright notice above does not evidence any actual of intended
516
- * publication of such source code, and is an unpublished work by create3000.
517
- * This material contains CONFIDENTIAL INFORMATION that is the property of
518
- * create3000.
519
- *
520
- * No permission is granted to copy, distribute, or create derivative works from
521
- * the contents of this software, in whole or in part, without the prior written
522
- * permission of create3000.
523
- *
524
- * NON-MILITARY USE ONLY
525
- *
526
- * All create3000 software are effectively free software with a non-military use
527
- * restriction. It is free. Well commented source is provided. You may reuse the
528
- * source in any way you please with the exception anything that uses it must be
529
- * marked to indicate is contains 'non-military use only' components.
530
- *
531
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
532
- *
533
- * Copyright 2011 - 2022, Holger Seelig <holger.seelig@yahoo.de>.
534
- *
535
- * This file is part of the X_ITE Project.
536
- *
537
- * X_ITE is free software: you can redistribute it and/or modify it under the
538
- * terms of the GNU General Public License version 3 only, as published by the
539
- * Free Software Foundation.
540
- *
541
- * X_ITE is distributed in the hope that it will be useful, but WITHOUT ANY
542
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
543
- * A PARTICULAR PURPOSE. See the GNU General Public License version 3 for more
544
- * details (a copy is included in the LICENSE file that accompanied this code).
545
- *
546
- * You should have received a copy of the GNU General Public License version 3
547
- * along with X_ITE. If not, see <https://www.gnu.org/licenses/gpl.html> for a
548
- * copy of the GPLv3 License.
549
- *
550
- * For Silvio, Joy and Adi.
551
- *
552
- ******************************************************************************/
553
-
554
413
 
555
414
 
556
415
 
@@ -667,8 +526,8 @@ Object .assign (TextureProjectorParallelContainer .prototype,
667
526
  lightNode = this .lightNode,
668
527
  texture = lightNode .getTexture (),
669
528
  textureUnit = this .global
670
- ? (this .textureUnit = this .textureUnit ?? this .browser .popTexture2DUnit ())
671
- : this .browser .getTexture2DUnit ();
529
+ ? (this .textureUnit = this .textureUnit ?? this .browser .popTextureUnit ())
530
+ : this .browser .getTextureUnit ();
672
531
 
673
532
  gl .activeTexture (gl .TEXTURE0 + textureUnit);
674
533
  gl .bindTexture (gl .TEXTURE_2D, texture .getTexture ());
@@ -689,7 +548,7 @@ Object .assign (TextureProjectorParallelContainer .prototype,
689
548
  },
690
549
  dispose ()
691
550
  {
692
- this .browser .pushTexture2DUnit (this .textureUnit);
551
+ this .browser .pushTextureUnit (this .textureUnit);
693
552
 
694
553
  this .modelViewMatrix .clear ();
695
554
 
@@ -798,53 +657,6 @@ const TextureProjectorParallel_default_ = TextureProjectorParallel;
798
657
 
799
658
  /* harmony default export */ const TextureProjection_TextureProjectorParallel = (external_X_ITE_X3D_Namespace_default().add ("TextureProjectorParallel", TextureProjectorParallel_default_));
800
659
  ;// ./src/assets/components/TextureProjectionComponent.js
801
- /*******************************************************************************
802
- *
803
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
804
- *
805
- * Copyright create3000, Scheffelstraße 31a, Leipzig, Germany 2011 - 2022.
806
- *
807
- * All rights reserved. Holger Seelig <holger.seelig@yahoo.de>.
808
- *
809
- * The copyright notice above does not evidence any actual of intended
810
- * publication of such source code, and is an unpublished work by create3000.
811
- * This material contains CONFIDENTIAL INFORMATION that is the property of
812
- * create3000.
813
- *
814
- * No permission is granted to copy, distribute, or create derivative works from
815
- * the contents of this software, in whole or in part, without the prior written
816
- * permission of create3000.
817
- *
818
- * NON-MILITARY USE ONLY
819
- *
820
- * All create3000 software are effectively free software with a non-military use
821
- * restriction. It is free. Well commented source is provided. You may reuse the
822
- * source in any way you please with the exception anything that uses it must be
823
- * marked to indicate is contains 'non-military use only' components.
824
- *
825
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
826
- *
827
- * Copyright 2011 - 2022, Holger Seelig <holger.seelig@yahoo.de>.
828
- *
829
- * This file is part of the X_ITE Project.
830
- *
831
- * X_ITE is free software: you can redistribute it and/or modify it under the
832
- * terms of the GNU General Public License version 3 only, as published by the
833
- * Free Software Foundation.
834
- *
835
- * X_ITE is distributed in the hope that it will be useful, but WITHOUT ANY
836
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
837
- * A PARTICULAR PURPOSE. See the GNU General Public License version 3 for more
838
- * details (a copy is included in the LICENSE file that accompanied this code).
839
- *
840
- * You should have received a copy of the GNU General Public License version 3
841
- * along with X_ITE. If not, see <https://www.gnu.org/licenses/gpl.html> for a
842
- * copy of the GPLv3 License.
843
- *
844
- * For Silvio, Joy and Adi.
845
- *
846
- ******************************************************************************/
847
-
848
660
 
849
661
 
850
662
 
@@ -1,2 +1,2 @@
1
- /* X_ITE v11.5.11 */
2
- const t=window[Symbol.for("X_ITE.X3D-11.5.11")];(()=>{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 a=e.n(n);const o=t.X3DFieldDefinition;var s=e.n(o);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 g=t.X3DConstants;var w=e.n(g);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 S=e.n(F);const M=t.Namespace;var P=e.n(M);function y(t){p().call(this,t),this.addType(w().X3DTextureProjectorNode),this._location.setUnit("length"),this._farDistance.setUnit("length"),this._location.setUnit("length")}Object.assign(Object.setPrototypeOf(y.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(S())(.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()(w().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(y,l().getStaticProperties("X3DTextureProjectorNode","TextureProjection",4));const j=y,V=P().add("X3DTextureProjectorNode",j),D=t.Camera;var b=e.n(D);const v=t.MatrixStack;var N=e.n(v);const X=t.ObjectCache;var R=e.n(X);const U=R()(z);function z(){this.projectionMatrix=new(S()),this.modelViewMatrix=new(N())(S()),this.modelMatrix=new(S()),this.invTextureSpaceMatrix=new(S()),this.invTextureSpaceProjectionMatrix=new(S()),this.location=new(_()),this.locationArray=new Float32Array(3),this.direction=new(_()),this.rotation=new(O()),this.matrix=new(S()),this.matrixArray=new Float32Array(16),this.textureMatrix=new(S())}function A(t){V.call(this,t),this.addType(w().TextureProjector),this._fieldOfView.setUnit("angle")}Object.assign(z.prototype,{set(t,e,i){this.browser=t.getBrowser(),this.lightNode=t,this.global=t.getGlobal(),this.modelViewMatrix.push(i),this.textureMatrix.assign(t.getTexture().getMatrix())},renderShadowMap(t){const e=this.lightNode,i=t.getCameraSpaceMatrixArray(),r=this.modelMatrix.assign(this.modelViewMatrix.get()).multRight(i),n=this.invTextureSpaceMatrix.assign(this.global?r:S().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 a=e.getTexture().getWidth(),o=e.getTexture().getHeight(),s=e.getNearDistance(),u=e.getFarDistance(),h=e.getFieldOfView();b().perspective(h,s,u,a,o,this.projectionMatrix),this.global||n.multLeft(r.inverse()),this.invTextureSpaceProjectionMatrix.assign(n).multRight(this.projectionMatrix).multRight(e.getBiasMatrix()).multRight(this.textureMatrix),this.modelViewMatrix.get().multVecMatrix(this.location.assign(e._location.getValue())),this.locationArray.set(this.location)},setGlobalVariables(t){this.matrix.assign(t.getView()?.inverse??S().Identity).multRight(t.getCameraSpaceMatrixArray()).multRight(this.invTextureSpaceProjectionMatrix),this.matrixArray.set(this.matrix)},setShaderUniforms(t,e,i){const r=e.numTextureProjectors++,n=this.lightNode,a=n.getTexture(),o=this.global?this.textureUnit=this.textureUnit??this.browser.popTexture2DUnit():this.browser.getTexture2DUnit();if(t.activeTexture(t.TEXTURE0+o),t.bindTexture(t.TEXTURE_2D,a.getTexture()),t.uniform1i(e.x3d_TextureProjectorTexture[r],o),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,a.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,V.prototype),{initialize(){V.prototype.initialize.call(this)},getFieldOfView(){const t=this._fieldOfView.getValue();return t>0&&t<Math.PI?t:Math.PI/4},getLights:()=>U}),Object.defineProperties(A,{...l().getStaticProperties("TextureProjector","TextureProjection",2,"children","4.0"),fieldDefinitions:{value:new(h())([new(s())(w().inputOutput,"metadata",new(a().SFNode)),new(s())(w().inputOutput,"description",new(a().SFString)),new(s())(w().inputOutput,"global",new(a().SFBool)(!0)),new(s())(w().inputOutput,"on",new(a().SFBool)(!0)),new(s())(w().inputOutput,"color",new(a().SFColor)(1,1,1)),new(s())(w().inputOutput,"intensity",new(a().SFFloat)(1)),new(s())(w().inputOutput,"ambientIntensity",new(a().SFFloat)),new(s())(w().inputOutput,"location",new(a().SFVec3f)),new(s())(w().inputOutput,"direction",new(a().SFVec3f)(0,0,1)),new(s())(w().inputOutput,"upVector",new(a().SFVec3f)(0,0,1)),new(s())(w().inputOutput,"fieldOfView",new(a().SFFloat)(.785398)),new(s())(w().inputOutput,"nearDistance",new(a().SFFloat)(-1)),new(s())(w().inputOutput,"farDistance",new(a().SFFloat)(-1)),new(s())(w().outputOnly,"aspectRatio",new(a().SFFloat)),new(s())(w().inputOutput,"texture",new(a().SFNode)),new(s())(w().inputOutput,"shadows",new(a().SFBool)),new(s())(w().inputOutput,"shadowColor",new(a().SFColor)),new(s())(w().inputOutput,"shadowIntensity",new(a().SFFloat)(1)),new(s())(w().inputOutput,"shadowBias",new(a().SFFloat)(.005)),new(s())(w().initializeOnly,"shadowMapSize",new(a().SFInt32)(1024))]),enumerable:!0}});const I=A,C=P().add("TextureProjector",I),Y=R()(B);function B(){this.projectionMatrix=new(S()),this.modelViewMatrix=new(N())(S()),this.modelMatrix=new(S()),this.invTextureSpaceMatrix=new(S()),this.location=new(_()),this.locationArray=new Float32Array(3),this.invTextureSpaceProjectionMatrix=new(S()),this.direction=new(_()),this.rotation=new(O()),this.matrix=new(S()),this.matrixArray=new Float32Array(16),this.textureMatrix=new(S())}function L(t){V.call(this,t),this.addType(w().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.push(i),this.textureMatrix.assign(t.getTexture().getMatrix())},renderShadowMap(t){const e=this.lightNode,i=t.getCameraSpaceMatrixArray(),r=this.modelMatrix.assign(this.modelViewMatrix.get()).multRight(i),n=this.invTextureSpaceMatrix.assign(this.global?r:S().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 a=e.getTexture().getWidth()/e.getTexture().getHeight(),o=e.getMinimumX(),s=e.getMaximumX(),u=e.getMinimumY(),h=e.getMaximumY(),c=e.getSizeX(),l=e.getSizeY(),x=e.getNearDistance(),p=e.getFarDistance();if(a>c/l){const t=(o+s)/2,e=l*a/2;b().ortho(t-e,t+e,u,h,x,p,this.projectionMatrix)}else{const t=(u+h)/2,e=c/a/2;b().ortho(o,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()).multRight(this.textureMatrix),this.modelViewMatrix.get().multVecMatrix(this.location.assign(e._location.getValue())),this.locationArray.set(this.location)},setGlobalVariables(t){this.matrix.assign(t.getView()?.inverse??S().Identity).multRight(t.getCameraSpaceMatrixArray()).multRight(this.invTextureSpaceProjectionMatrix),this.matrixArray.set(this.matrix)},setShaderUniforms(t,e,i){const r=e.numTextureProjectors++,n=this.lightNode,a=n.getTexture(),o=this.global?this.textureUnit=this.textureUnit??this.browser.popTexture2DUnit():this.browser.getTexture2DUnit();if(t.activeTexture(t.TEXTURE0+o),t.bindTexture(t.TEXTURE_2D,a.getTexture()),t.uniform1i(e.x3d_TextureProjectorTexture[r],o),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,a.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,V.prototype),{initialize(){V.prototype.initialize.call(this),this._fieldOfView.addInterest("set_fieldOfView___",this),this.set_fieldOfView___()},set_fieldOfView___(){this.minimumX=this._fieldOfView[0],this.minimumY=this._fieldOfView[1],this.maximumX=this._fieldOfView[2],this.maximumY=this._fieldOfView[3],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())(w().inputOutput,"metadata",new(a().SFNode)),new(s())(w().inputOutput,"description",new(a().SFString)),new(s())(w().inputOutput,"global",new(a().SFBool)(!0)),new(s())(w().inputOutput,"on",new(a().SFBool)(!0)),new(s())(w().inputOutput,"color",new(a().SFColor)(1,1,1)),new(s())(w().inputOutput,"intensity",new(a().SFFloat)(1)),new(s())(w().inputOutput,"ambientIntensity",new(a().SFFloat)),new(s())(w().inputOutput,"location",new(a().SFVec3f)),new(s())(w().inputOutput,"direction",new(a().SFVec3f)(0,0,1)),new(s())(w().inputOutput,"upVector",new(a().SFVec3f)(0,0,1)),new(s())(w().inputOutput,"fieldOfView",new(a().SFVec4f)(-1,-1,1,1)),new(s())(w().inputOutput,"nearDistance",new(a().SFFloat)(-1)),new(s())(w().inputOutput,"farDistance",new(a().SFFloat)(-1)),new(s())(w().outputOnly,"aspectRatio",new(a().SFFloat)),new(s())(w().inputOutput,"texture",new(a().SFNode)),new(s())(w().inputOutput,"shadows",new(a().SFBool)),new(s())(w().inputOutput,"shadowColor",new(a().SFColor)),new(s())(w().inputOutput,"shadowIntensity",new(a().SFFloat)(1)),new(s())(w().inputOutput,"shadowBias",new(a().SFFloat)(.005)),new(s())(w().initializeOnly,"shadowMapSize",new(a().SFInt32)(1024))]),enumerable:!0}});const E=L,H=P().add("TextureProjectorParallel",E);r().add({name:"TextureProjection",concreteNodes:[C,H],abstractNodes:[V]});P().add("TextureProjectionComponent",undefined)})();
1
+ /* X_ITE v11.5.12 */
2
+ const t=window[Symbol.for("X_ITE.X3D-11.5.12")];(()=>{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 a=e.n(n);const o=t.X3DFieldDefinition;var s=e.n(o);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 g=t.X3DConstants;var w=e.n(g);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 S=e.n(F);const M=t.Namespace;var P=e.n(M);function y(t){p().call(this,t),this.addType(w().X3DTextureProjectorNode),this._location.setUnit("length"),this._farDistance.setUnit("length"),this._location.setUnit("length")}Object.assign(Object.setPrototypeOf(y.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(S())(.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()(w().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(y,l().getStaticProperties("X3DTextureProjectorNode","TextureProjection",4));const j=y,V=P().add("X3DTextureProjectorNode",j),b=t.Camera;var v=e.n(b);const D=t.MatrixStack;var N=e.n(D);const X=t.ObjectCache;var R=e.n(X);const U=R()(z);function z(){this.projectionMatrix=new(S()),this.modelViewMatrix=new(N())(S()),this.modelMatrix=new(S()),this.invTextureSpaceMatrix=new(S()),this.invTextureSpaceProjectionMatrix=new(S()),this.location=new(_()),this.locationArray=new Float32Array(3),this.direction=new(_()),this.rotation=new(O()),this.matrix=new(S()),this.matrixArray=new Float32Array(16),this.textureMatrix=new(S())}function A(t){V.call(this,t),this.addType(w().TextureProjector),this._fieldOfView.setUnit("angle")}Object.assign(z.prototype,{set(t,e,i){this.browser=t.getBrowser(),this.lightNode=t,this.global=t.getGlobal(),this.modelViewMatrix.push(i),this.textureMatrix.assign(t.getTexture().getMatrix())},renderShadowMap(t){const e=this.lightNode,i=t.getCameraSpaceMatrixArray(),r=this.modelMatrix.assign(this.modelViewMatrix.get()).multRight(i),n=this.invTextureSpaceMatrix.assign(this.global?r:S().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 a=e.getTexture().getWidth(),o=e.getTexture().getHeight(),s=e.getNearDistance(),u=e.getFarDistance(),h=e.getFieldOfView();v().perspective(h,s,u,a,o,this.projectionMatrix),this.global||n.multLeft(r.inverse()),this.invTextureSpaceProjectionMatrix.assign(n).multRight(this.projectionMatrix).multRight(e.getBiasMatrix()).multRight(this.textureMatrix),this.modelViewMatrix.get().multVecMatrix(this.location.assign(e._location.getValue())),this.locationArray.set(this.location)},setGlobalVariables(t){this.matrix.assign(t.getView()?.inverse??S().Identity).multRight(t.getCameraSpaceMatrixArray()).multRight(this.invTextureSpaceProjectionMatrix),this.matrixArray.set(this.matrix)},setShaderUniforms(t,e,i){const r=e.numTextureProjectors++,n=this.lightNode,a=n.getTexture(),o=this.global?this.textureUnit=this.textureUnit??this.browser.popTextureUnit():this.browser.getTextureUnit();if(t.activeTexture(t.TEXTURE0+o),t.bindTexture(t.TEXTURE_2D,a.getTexture()),t.uniform1i(e.x3d_TextureProjectorTexture[r],o),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,a.isLinear()),t.uniformMatrix4fv(e.x3d_TextureProjectorMatrix[r],!1,this.matrixArray)},dispose(){this.browser.pushTextureUnit(this.textureUnit),this.modelViewMatrix.clear(),this.textureUnit=void 0,U.push(this)}}),Object.assign(Object.setPrototypeOf(A.prototype,V.prototype),{initialize(){V.prototype.initialize.call(this)},getFieldOfView(){const t=this._fieldOfView.getValue();return t>0&&t<Math.PI?t:Math.PI/4},getLights:()=>U}),Object.defineProperties(A,{...l().getStaticProperties("TextureProjector","TextureProjection",2,"children","4.0"),fieldDefinitions:{value:new(h())([new(s())(w().inputOutput,"metadata",new(a().SFNode)),new(s())(w().inputOutput,"description",new(a().SFString)),new(s())(w().inputOutput,"global",new(a().SFBool)(!0)),new(s())(w().inputOutput,"on",new(a().SFBool)(!0)),new(s())(w().inputOutput,"color",new(a().SFColor)(1,1,1)),new(s())(w().inputOutput,"intensity",new(a().SFFloat)(1)),new(s())(w().inputOutput,"ambientIntensity",new(a().SFFloat)),new(s())(w().inputOutput,"location",new(a().SFVec3f)),new(s())(w().inputOutput,"direction",new(a().SFVec3f)(0,0,1)),new(s())(w().inputOutput,"upVector",new(a().SFVec3f)(0,0,1)),new(s())(w().inputOutput,"fieldOfView",new(a().SFFloat)(.785398)),new(s())(w().inputOutput,"nearDistance",new(a().SFFloat)(-1)),new(s())(w().inputOutput,"farDistance",new(a().SFFloat)(-1)),new(s())(w().outputOnly,"aspectRatio",new(a().SFFloat)),new(s())(w().inputOutput,"texture",new(a().SFNode)),new(s())(w().inputOutput,"shadows",new(a().SFBool)),new(s())(w().inputOutput,"shadowColor",new(a().SFColor)),new(s())(w().inputOutput,"shadowIntensity",new(a().SFFloat)(1)),new(s())(w().inputOutput,"shadowBias",new(a().SFFloat)(.005)),new(s())(w().initializeOnly,"shadowMapSize",new(a().SFInt32)(1024))]),enumerable:!0}});const I=A,C=P().add("TextureProjector",I),Y=R()(B);function B(){this.projectionMatrix=new(S()),this.modelViewMatrix=new(N())(S()),this.modelMatrix=new(S()),this.invTextureSpaceMatrix=new(S()),this.location=new(_()),this.locationArray=new Float32Array(3),this.invTextureSpaceProjectionMatrix=new(S()),this.direction=new(_()),this.rotation=new(O()),this.matrix=new(S()),this.matrixArray=new Float32Array(16),this.textureMatrix=new(S())}function L(t){V.call(this,t),this.addType(w().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.push(i),this.textureMatrix.assign(t.getTexture().getMatrix())},renderShadowMap(t){const e=this.lightNode,i=t.getCameraSpaceMatrixArray(),r=this.modelMatrix.assign(this.modelViewMatrix.get()).multRight(i),n=this.invTextureSpaceMatrix.assign(this.global?r:S().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 a=e.getTexture().getWidth()/e.getTexture().getHeight(),o=e.getMinimumX(),s=e.getMaximumX(),u=e.getMinimumY(),h=e.getMaximumY(),c=e.getSizeX(),l=e.getSizeY(),x=e.getNearDistance(),p=e.getFarDistance();if(a>c/l){const t=(o+s)/2,e=l*a/2;v().ortho(t-e,t+e,u,h,x,p,this.projectionMatrix)}else{const t=(u+h)/2,e=c/a/2;v().ortho(o,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()).multRight(this.textureMatrix),this.modelViewMatrix.get().multVecMatrix(this.location.assign(e._location.getValue())),this.locationArray.set(this.location)},setGlobalVariables(t){this.matrix.assign(t.getView()?.inverse??S().Identity).multRight(t.getCameraSpaceMatrixArray()).multRight(this.invTextureSpaceProjectionMatrix),this.matrixArray.set(this.matrix)},setShaderUniforms(t,e,i){const r=e.numTextureProjectors++,n=this.lightNode,a=n.getTexture(),o=this.global?this.textureUnit=this.textureUnit??this.browser.popTextureUnit():this.browser.getTextureUnit();if(t.activeTexture(t.TEXTURE0+o),t.bindTexture(t.TEXTURE_2D,a.getTexture()),t.uniform1i(e.x3d_TextureProjectorTexture[r],o),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,a.isLinear()),t.uniformMatrix4fv(e.x3d_TextureProjectorMatrix[r],!1,this.matrixArray)},dispose(){this.browser.pushTextureUnit(this.textureUnit),this.modelViewMatrix.clear(),this.textureUnit=void 0,Y.push(this)}}),Object.assign(Object.setPrototypeOf(L.prototype,V.prototype),{initialize(){V.prototype.initialize.call(this),this._fieldOfView.addInterest("set_fieldOfView___",this),this.set_fieldOfView___()},set_fieldOfView___(){this.minimumX=this._fieldOfView[0],this.minimumY=this._fieldOfView[1],this.maximumX=this._fieldOfView[2],this.maximumY=this._fieldOfView[3],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())(w().inputOutput,"metadata",new(a().SFNode)),new(s())(w().inputOutput,"description",new(a().SFString)),new(s())(w().inputOutput,"global",new(a().SFBool)(!0)),new(s())(w().inputOutput,"on",new(a().SFBool)(!0)),new(s())(w().inputOutput,"color",new(a().SFColor)(1,1,1)),new(s())(w().inputOutput,"intensity",new(a().SFFloat)(1)),new(s())(w().inputOutput,"ambientIntensity",new(a().SFFloat)),new(s())(w().inputOutput,"location",new(a().SFVec3f)),new(s())(w().inputOutput,"direction",new(a().SFVec3f)(0,0,1)),new(s())(w().inputOutput,"upVector",new(a().SFVec3f)(0,0,1)),new(s())(w().inputOutput,"fieldOfView",new(a().SFVec4f)(-1,-1,1,1)),new(s())(w().inputOutput,"nearDistance",new(a().SFFloat)(-1)),new(s())(w().inputOutput,"farDistance",new(a().SFFloat)(-1)),new(s())(w().outputOnly,"aspectRatio",new(a().SFFloat)),new(s())(w().inputOutput,"texture",new(a().SFNode)),new(s())(w().inputOutput,"shadows",new(a().SFBool)),new(s())(w().inputOutput,"shadowColor",new(a().SFColor)),new(s())(w().inputOutput,"shadowIntensity",new(a().SFFloat)(1)),new(s())(w().inputOutput,"shadowBias",new(a().SFFloat)(.005)),new(s())(w().initializeOnly,"shadowMapSize",new(a().SFInt32)(1024))]),enumerable:!0}});const E=L,H=P().add("TextureProjectorParallel",E);r().add({name:"TextureProjection",concreteNodes:[C,H],abstractNodes:[V]});P().add("TextureProjectionComponent",undefined)})();