x_ite 11.2.0 → 11.2.1
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/assets/components/AnnotationComponent.js +2 -2
- package/dist/assets/components/AnnotationComponent.min.js +2 -2
- package/dist/assets/components/CADGeometryComponent.js +2 -2
- package/dist/assets/components/CADGeometryComponent.min.js +2 -2
- package/dist/assets/components/CubeMapTexturingComponent.js +2 -2
- package/dist/assets/components/CubeMapTexturingComponent.min.js +2 -2
- package/dist/assets/components/DISComponent.js +2 -2
- package/dist/assets/components/DISComponent.min.js +2 -2
- package/dist/assets/components/EventUtilitiesComponent.js +2 -2
- package/dist/assets/components/EventUtilitiesComponent.min.js +2 -2
- package/dist/assets/components/Geometry2DComponent.js +2 -2
- package/dist/assets/components/Geometry2DComponent.min.js +2 -2
- package/dist/assets/components/GeospatialComponent.js +2 -2
- package/dist/assets/components/GeospatialComponent.min.js +2 -2
- package/dist/assets/components/HAnimComponent.js +2 -2
- package/dist/assets/components/HAnimComponent.min.js +2 -2
- package/dist/assets/components/KeyDeviceSensorComponent.js +2 -2
- package/dist/assets/components/KeyDeviceSensorComponent.min.js +2 -2
- package/dist/assets/components/LayoutComponent.js +3 -3
- package/dist/assets/components/LayoutComponent.min.js +2 -2
- package/dist/assets/components/NURBSComponent.js +2 -2
- package/dist/assets/components/NURBSComponent.min.js +2 -2
- package/dist/assets/components/ParticleSystemsComponent.js +2 -2
- package/dist/assets/components/ParticleSystemsComponent.min.js +2 -2
- package/dist/assets/components/PickingComponent.js +2 -2
- package/dist/assets/components/PickingComponent.min.js +2 -2
- package/dist/assets/components/RigidBodyPhysicsComponent.js +2 -2
- package/dist/assets/components/RigidBodyPhysicsComponent.min.js +2 -2
- package/dist/assets/components/ScriptingComponent.js +2 -2
- package/dist/assets/components/ScriptingComponent.min.js +2 -2
- package/dist/assets/components/TextComponent.js +19 -19
- package/dist/assets/components/TextComponent.min.js +2 -2
- package/dist/assets/components/TextureProjectionComponent.js +26 -16
- package/dist/assets/components/TextureProjectionComponent.min.js +2 -2
- package/dist/assets/components/Texturing3DComponent.js +46 -46
- package/dist/assets/components/Texturing3DComponent.min.js +2 -2
- package/dist/assets/components/VolumeRenderingComponent.js +15 -4
- package/dist/assets/components/VolumeRenderingComponent.min.js +2 -2
- package/dist/assets/components/WebXRComponent.js +29 -29
- package/dist/assets/components/WebXRComponent.min.js +2 -2
- package/dist/assets/components/X_ITEComponent.js +2 -2
- package/dist/assets/components/X_ITEComponent.min.js +2 -2
- package/dist/example.html +1 -1
- package/dist/x_ite.css +1 -1
- package/dist/x_ite.js +55366 -55313
- package/dist/x_ite.min.js +2 -2
- package/dist/x_ite.min.mjs +2 -2
- package/dist/x_ite.mjs +55311 -55258
- package/dist/x_ite.zip +0 -0
- package/package.json +4 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/* X_ITE v11.2.
|
|
2
|
-
const __X_ITE_X3D__ = window [Symbol .for ("X_ITE.X3D-11.2.
|
|
1
|
+
/* X_ITE v11.2.1 */
|
|
2
|
+
const __X_ITE_X3D__ = window [Symbol .for ("X_ITE.X3D-11.2.1")];
|
|
3
3
|
/******/ (() => { // webpackBootstrap
|
|
4
4
|
/******/ "use strict";
|
|
5
5
|
/******/ // The require scope
|
|
@@ -350,11 +350,9 @@ Object .assign (TextureProjectorContainer .prototype,
|
|
|
350
350
|
this .global = lightNode .getGlobal ();
|
|
351
351
|
|
|
352
352
|
this .modelViewMatrix .push (modelViewMatrix);
|
|
353
|
-
this .textureMatrix .
|
|
353
|
+
this .textureMatrix .assign (lightNode .getTexture () .getMatrix ());
|
|
354
354
|
},
|
|
355
355
|
renderShadowMap (renderObject)
|
|
356
|
-
{ },
|
|
357
|
-
setGlobalVariables (renderObject)
|
|
358
356
|
{
|
|
359
357
|
const
|
|
360
358
|
lightNode = this .lightNode,
|
|
@@ -384,14 +382,21 @@ Object .assign (TextureProjectorContainer .prototype,
|
|
|
384
382
|
this .invTextureSpaceProjectionMatrix
|
|
385
383
|
.assign (invTextureSpaceMatrix)
|
|
386
384
|
.multRight (this .projectionMatrix)
|
|
387
|
-
.multRight (lightNode .getBiasMatrix ())
|
|
388
|
-
|
|
389
|
-
this .matrix .assign (cameraSpaceMatrix) .multRight (this .invTextureSpaceProjectionMatrix) .multRight (this .textureMatrix);
|
|
390
|
-
this .matrixArray .set (this .matrix);
|
|
385
|
+
.multRight (lightNode .getBiasMatrix ())
|
|
386
|
+
.multRight (this .textureMatrix);
|
|
391
387
|
|
|
392
388
|
this .modelViewMatrix .get () .multVecMatrix (this .location .assign (lightNode ._location .getValue ()));
|
|
393
389
|
this .locationArray .set (this .location);
|
|
394
390
|
},
|
|
391
|
+
setGlobalVariables (renderObject)
|
|
392
|
+
{
|
|
393
|
+
this .matrix
|
|
394
|
+
.assign (renderObject .getView () ?.inverse ?? (external_X_ITE_X3D_Matrix4_default()).Identity)
|
|
395
|
+
.multRight (renderObject .getCameraSpaceMatrixArray ())
|
|
396
|
+
.multRight (this .invTextureSpaceProjectionMatrix);
|
|
397
|
+
|
|
398
|
+
this .matrixArray .set (this .matrix);
|
|
399
|
+
},
|
|
395
400
|
setShaderUniforms (gl, shaderObject, renderObject)
|
|
396
401
|
{
|
|
397
402
|
const i = shaderObject .numTextureProjectors ++;
|
|
@@ -586,11 +591,9 @@ Object .assign (TextureProjectorParallelContainer .prototype,
|
|
|
586
591
|
this .global = lightNode .getGlobal ();
|
|
587
592
|
|
|
588
593
|
this .modelViewMatrix .push (modelViewMatrix);
|
|
589
|
-
this .textureMatrix .
|
|
594
|
+
this .textureMatrix .assign (lightNode .getTexture () .getMatrix ());
|
|
590
595
|
},
|
|
591
596
|
renderShadowMap (renderObject)
|
|
592
|
-
{ },
|
|
593
|
-
setGlobalVariables (renderObject)
|
|
594
597
|
{
|
|
595
598
|
const
|
|
596
599
|
lightNode = this .lightNode,
|
|
@@ -641,14 +644,21 @@ Object .assign (TextureProjectorParallelContainer .prototype,
|
|
|
641
644
|
this .invTextureSpaceProjectionMatrix
|
|
642
645
|
.assign (invTextureSpaceMatrix)
|
|
643
646
|
.multRight (this .projectionMatrix)
|
|
644
|
-
.multRight (lightNode .getBiasMatrix ())
|
|
645
|
-
|
|
646
|
-
this .matrix .assign (cameraSpaceMatrix) .multRight (this .invTextureSpaceProjectionMatrix) .multRight (this .textureMatrix);
|
|
647
|
-
this .matrixArray .set (this .matrix);
|
|
647
|
+
.multRight (lightNode .getBiasMatrix ())
|
|
648
|
+
.multRight (this .textureMatrix);
|
|
648
649
|
|
|
649
650
|
this .modelViewMatrix .get () .multVecMatrix (this .location .assign (lightNode ._location .getValue ()));
|
|
650
651
|
this .locationArray .set (this .location);
|
|
651
652
|
},
|
|
653
|
+
setGlobalVariables (renderObject)
|
|
654
|
+
{
|
|
655
|
+
this .matrix
|
|
656
|
+
.assign (renderObject .getView () ?.inverse ?? (external_X_ITE_X3D_Matrix4_default()).Identity)
|
|
657
|
+
.multRight (renderObject .getCameraSpaceMatrixArray ())
|
|
658
|
+
.multRight (this .invTextureSpaceProjectionMatrix);
|
|
659
|
+
|
|
660
|
+
this .matrixArray .set (this .matrix);
|
|
661
|
+
},
|
|
652
662
|
setShaderUniforms (gl, shaderObject, renderObject)
|
|
653
663
|
{
|
|
654
664
|
const i = shaderObject .numTextureProjectors ++;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* X_ITE v11.2.
|
|
2
|
-
const t=window[Symbol.for("X_ITE.X3D-11.2.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 S=e.n(F);const M=t.Namespace;var P=e.n(M);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(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()(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(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){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.push(i),this.textureMatrix.set(...t.getTexture().getMatrix())},renderShadowMap(t){},setGlobalVariables(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 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(A.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(A,{...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 I=A,C=P().add("TextureProjector",I),Y=U()(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){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.push(i),this.textureMatrix.set(...t.getTexture().getMatrix())},renderShadowMap(t){},setGlobalVariables(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 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___(){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())(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().SFVec4f)(-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)})();
|
|
1
|
+
/* X_ITE v11.2.1 */
|
|
2
|
+
const t=window[Symbol.for("X_ITE.X3D-11.2.1")];(()=>{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,9 +1,16 @@
|
|
|
1
|
-
/* X_ITE v11.2.
|
|
2
|
-
const __X_ITE_X3D__ = window [Symbol .for ("X_ITE.X3D-11.2.
|
|
1
|
+
/* X_ITE v11.2.1 */
|
|
2
|
+
const __X_ITE_X3D__ = window [Symbol .for ("X_ITE.X3D-11.2.1")];
|
|
3
3
|
/******/ (() => { // webpackBootstrap
|
|
4
4
|
/******/ var __webpack_modules__ = ({
|
|
5
5
|
|
|
6
|
-
/***/
|
|
6
|
+
/***/ 13:
|
|
7
|
+
/***/ (() => {
|
|
8
|
+
|
|
9
|
+
/* (ignored) */
|
|
10
|
+
|
|
11
|
+
/***/ }),
|
|
12
|
+
|
|
13
|
+
/***/ 96:
|
|
7
14
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
8
15
|
|
|
9
16
|
var __dirname = "/";
|
|
@@ -40,7 +47,15 @@ var Ib=[cx,_q,cr,Yr,as,fs,hs,Hu,Su,cx,cx,cx,cx,cx,cx,cx];var Jb=[dx,si,gi,Wh,Kh,
|
|
|
40
47
|
|
|
41
48
|
/***/ }),
|
|
42
49
|
|
|
43
|
-
/***/
|
|
50
|
+
/***/ 254:
|
|
51
|
+
/***/ ((module) => {
|
|
52
|
+
|
|
53
|
+
"use strict";
|
|
54
|
+
module.exports = __X_ITE_X3D__ .jquery;
|
|
55
|
+
|
|
56
|
+
/***/ }),
|
|
57
|
+
|
|
58
|
+
/***/ 410:
|
|
44
59
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
45
60
|
|
|
46
61
|
var __dirname = "/";
|
|
@@ -74,7 +89,7 @@ var _a=[yj,od,ef,yj];var $a=[zj,Li,di,bi,Kb,Lb,Mb,Nb,Rc,Sc,Uc,jd,xd,Ye,lf,yd,zd,
|
|
|
74
89
|
|
|
75
90
|
/***/ }),
|
|
76
91
|
|
|
77
|
-
/***/
|
|
92
|
+
/***/ 434:
|
|
78
93
|
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
79
94
|
|
|
80
95
|
/*! dicom-parser - 1.8.12 - 2023-02-20 | (c) 2017 Chris Hafey | https://github.com/cornerstonejs/dicomParser */
|
|
@@ -4030,7 +4045,28 @@ module.exports = __WEBPACK_EXTERNAL_MODULE_zlib__;
|
|
|
4030
4045
|
|
|
4031
4046
|
/***/ }),
|
|
4032
4047
|
|
|
4033
|
-
/***/
|
|
4048
|
+
/***/ 497:
|
|
4049
|
+
/***/ (() => {
|
|
4050
|
+
|
|
4051
|
+
/* (ignored) */
|
|
4052
|
+
|
|
4053
|
+
/***/ }),
|
|
4054
|
+
|
|
4055
|
+
/***/ 559:
|
|
4056
|
+
/***/ (() => {
|
|
4057
|
+
|
|
4058
|
+
/* (ignored) */
|
|
4059
|
+
|
|
4060
|
+
/***/ }),
|
|
4061
|
+
|
|
4062
|
+
/***/ 722:
|
|
4063
|
+
/***/ (() => {
|
|
4064
|
+
|
|
4065
|
+
/* (ignored) */
|
|
4066
|
+
|
|
4067
|
+
/***/ }),
|
|
4068
|
+
|
|
4069
|
+
/***/ 810:
|
|
4034
4070
|
/***/ ((module) => {
|
|
4035
4071
|
|
|
4036
4072
|
/* -*- tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- /
|
|
@@ -5183,35 +5219,6 @@ function decode(jpegData, userOpts = {}) {
|
|
|
5183
5219
|
}
|
|
5184
5220
|
|
|
5185
5221
|
|
|
5186
|
-
/***/ }),
|
|
5187
|
-
|
|
5188
|
-
/***/ 254:
|
|
5189
|
-
/***/ ((module) => {
|
|
5190
|
-
|
|
5191
|
-
"use strict";
|
|
5192
|
-
module.exports = __X_ITE_X3D__ .jquery;
|
|
5193
|
-
|
|
5194
|
-
/***/ }),
|
|
5195
|
-
|
|
5196
|
-
/***/ 497:
|
|
5197
|
-
/***/ (() => {
|
|
5198
|
-
|
|
5199
|
-
/* (ignored) */
|
|
5200
|
-
|
|
5201
|
-
/***/ }),
|
|
5202
|
-
|
|
5203
|
-
/***/ 13:
|
|
5204
|
-
/***/ (() => {
|
|
5205
|
-
|
|
5206
|
-
/* (ignored) */
|
|
5207
|
-
|
|
5208
|
-
/***/ }),
|
|
5209
|
-
|
|
5210
|
-
/***/ 722:
|
|
5211
|
-
/***/ (() => {
|
|
5212
|
-
|
|
5213
|
-
/* (ignored) */
|
|
5214
|
-
|
|
5215
5222
|
/***/ }),
|
|
5216
5223
|
|
|
5217
5224
|
/***/ 978:
|
|
@@ -5219,13 +5226,6 @@ module.exports = __X_ITE_X3D__ .jquery;
|
|
|
5219
5226
|
|
|
5220
5227
|
/* (ignored) */
|
|
5221
5228
|
|
|
5222
|
-
/***/ }),
|
|
5223
|
-
|
|
5224
|
-
/***/ 559:
|
|
5225
|
-
/***/ (() => {
|
|
5226
|
-
|
|
5227
|
-
/* (ignored) */
|
|
5228
|
-
|
|
5229
5229
|
/***/ })
|
|
5230
5230
|
|
|
5231
5231
|
/******/ });
|
|
@@ -7310,10 +7310,10 @@ var Decoder = class _Decoder {
|
|
|
7310
7310
|
|
|
7311
7311
|
//#
|
|
7312
7312
|
;// ./src/x_ite/Browser/Texturing3D/DICOMParser.js
|
|
7313
|
-
/* provided dependency */ var dicomParser = __webpack_require__(
|
|
7314
|
-
/* provided dependency */ var JpegImage = __webpack_require__(
|
|
7315
|
-
/* provided dependency */ var CharLS = __webpack_require__(
|
|
7316
|
-
/* provided dependency */ var OpenJPEG = __webpack_require__(
|
|
7313
|
+
/* provided dependency */ var dicomParser = __webpack_require__(434);
|
|
7314
|
+
/* provided dependency */ var JpegImage = __webpack_require__(810);
|
|
7315
|
+
/* provided dependency */ var CharLS = __webpack_require__(96);
|
|
7316
|
+
/* provided dependency */ var OpenJPEG = __webpack_require__(410);
|
|
7317
7317
|
/*******************************************************************************
|
|
7318
7318
|
*
|
|
7319
7319
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|