x_ite 16.0.2 → 16.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/README.md +5 -5
- package/dist/assets/components/AnnotationComponent.js +1 -1
- package/dist/assets/components/AnnotationComponent.min.js +1 -1
- package/dist/assets/components/CADGeometryComponent.js +1 -1
- package/dist/assets/components/CADGeometryComponent.min.js +1 -1
- package/dist/assets/components/CubeMapTexturingComponent.js +3 -4
- package/dist/assets/components/CubeMapTexturingComponent.min.js +2 -2
- package/dist/assets/components/DISComponent.js +1 -1
- package/dist/assets/components/DISComponent.min.js +1 -1
- package/dist/assets/components/EventUtilitiesComponent.js +1 -1
- package/dist/assets/components/EventUtilitiesComponent.min.js +1 -1
- package/dist/assets/components/GaussianSplatsComponent.js +1 -1
- package/dist/assets/components/GaussianSplatsComponent.min.js +1 -1
- package/dist/assets/components/Geometry2DComponent.js +1 -1
- package/dist/assets/components/Geometry2DComponent.min.js +1 -1
- package/dist/assets/components/Geometry3DComponent.js +1 -1
- package/dist/assets/components/Geometry3DComponent.min.js +1 -1
- package/dist/assets/components/GeospatialComponent.js +1 -1
- package/dist/assets/components/GeospatialComponent.min.js +1 -1
- package/dist/assets/components/HAnimComponent.js +1 -1
- package/dist/assets/components/HAnimComponent.min.js +1 -1
- package/dist/assets/components/KeyDeviceSensorComponent.js +1 -1
- package/dist/assets/components/KeyDeviceSensorComponent.min.js +1 -1
- package/dist/assets/components/LayoutComponent.js +1 -1
- package/dist/assets/components/LayoutComponent.min.js +1 -1
- package/dist/assets/components/NURBSComponent.js +1 -1
- package/dist/assets/components/NURBSComponent.min.js +1 -1
- package/dist/assets/components/ParticleSystemsComponent.js +1 -1
- package/dist/assets/components/ParticleSystemsComponent.min.js +1 -1
- package/dist/assets/components/PickingComponent.js +1 -1
- package/dist/assets/components/PickingComponent.min.js +1 -1
- package/dist/assets/components/RigidBodyPhysicsComponent.js +1 -1
- package/dist/assets/components/RigidBodyPhysicsComponent.min.js +1 -1
- package/dist/assets/components/ScriptingComponent.js +1 -1
- package/dist/assets/components/ScriptingComponent.min.js +1 -1
- package/dist/assets/components/TextComponent.js +1 -1
- package/dist/assets/components/TextComponent.min.js +1 -1
- package/dist/assets/components/TextureProjectionComponent.js +1 -1
- package/dist/assets/components/TextureProjectionComponent.min.js +1 -1
- package/dist/assets/components/Texturing3DComponent.js +9 -10
- package/dist/assets/components/Texturing3DComponent.min.js +2 -2
- package/dist/assets/components/VolumeRenderingComponent.js +1 -1
- package/dist/assets/components/VolumeRenderingComponent.min.js +1 -1
- package/dist/assets/components/WebXRComponent.js +1 -1
- package/dist/assets/components/WebXRComponent.min.js +1 -1
- package/dist/assets/components/X_ITEComponent.js +1 -1
- package/dist/assets/components/X_ITEComponent.min.js +1 -1
- package/dist/example.html +1 -1
- package/dist/x_ite.css +1 -1
- package/dist/x_ite.js +28 -45
- package/dist/x_ite.min.js +2 -2
- package/dist/x_ite.min.mjs +2 -2
- package/dist/x_ite.mjs +28 -45
- package/dist/x_ite.zip +0 -0
- package/package.json +3 -3
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* X_ITE v16.0.
|
|
1
|
+
/* X_ITE v16.0.3 */
|
|
2
2
|
const e=window[Symbol.for("X_ITE.X3D")];(()=>{const t={n:e=>{const n=e&&e.__esModule?()=>e.default:()=>e;return t.d(n,{a:n}),n},d:(e,n)=>{if(Array.isArray(n))for(var o=0;o<n.length;){var i=n[o++],r=n[o++];t.o(e,i)?0===r&&o++:0===r?Object.defineProperty(e,i,{enumerable:!0,value:n[o++]}):Object.defineProperty(e,i,{enumerable:!0,get:r})}else for(var i in n)t.o(n,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:n[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},n=e.Components;var o=t.n(n);const i=e.PixelTexture;var r=t.n(i);const s=e.TextureProperties;var a=t.n(s);const d=e.Fields;var l=t.n(d);const u=e.X3DFieldDefinition;var h=t.n(u);const c=e.FieldDefinitionArray;var p=t.n(c);const f=e.X3DNode;var _=t.n(f);const g=e.X3DConstants;var m=t.n(g);const S=e.Namespace;var N=t.n(S);function y(e){_().call(this,e),this.addType(m().X3DVolumeRenderStyleNode),this.volumeDataNodes=new Set}Object.assign(Object.setPrototypeOf(y.prototype,_().prototype),{addShaderFields(e){},getDefines(){},getUniformsText:()=>"",getFunctionsText:()=>"",getVolumeData(){return this.volumeDataNodes},addVolumeData(e){this.volumeDataNodes.add(e)},removeVolumeData(e){this.volumeDataNodes.delete(e)},getNormalText(e){let t="";return e?(t+="uniform sampler3D surfaceNormals_"+this.getId()+";\n",t+="\n",t+="vec4\n",t+="getNormal_"+this.getId()+" (in vec3 texCoord)\n",t+="{\n",t+=" vec3 n = texture (surfaceNormals_"+this.getId()+", texCoord) .xyz * 2.0 - 1.0;\n",t+="\n",t+=" return vec4 (normalize (x3d_TextureNormalMatrix * n), length (n));\n",t+="}\n"):(t+="\n",t+="vec4\n",t+="getNormal_"+this.getId()+" (in vec3 texCoord)\n",t+="{\n",t+=" vec4 offset = vec4 (1.0 / vec3 (textureSize (x3d_Texture3D [0], 0)), 0.0);\n",t+=" float i0 = texture (x3d_Texture3D [0], texCoord + offset .xww) .r;\n",t+=" float i1 = texture (x3d_Texture3D [0], texCoord - offset .xww) .r;\n",t+=" float i2 = texture (x3d_Texture3D [0], texCoord + offset .wyw) .r;\n",t+=" float i3 = texture (x3d_Texture3D [0], texCoord - offset .wyw) .r;\n",t+=" float i4 = texture (x3d_Texture3D [0], texCoord + offset .wwz) .r;\n",t+=" float i5 = texture (x3d_Texture3D [0], texCoord - offset .wwz) .r;\n",t+=" vec3 n = vec3 (i1 - i0, i3 - i2, i5 - i4);\n",t+="\n",t+=" return vec4 (normalize (x3d_TextureNormalMatrix * n), length (n));\n",t+="}\n"),t}}),Object.defineProperties(y,_().getStaticProperties("X3DVolumeRenderStyleNode","VolumeRendering",1));const x=y,v=N().add("X3DVolumeRenderStyleNode",x);function w(e){v.call(this,e),this.addType(m().X3DComposableVolumeRenderStyleNode)}Object.setPrototypeOf(w.prototype,v.prototype),Object.defineProperties(w,_().getStaticProperties("X3DComposableVolumeRenderStyleNode","VolumeRendering",1));const C=w,F=N().add("X3DComposableVolumeRenderStyleNode",C),O=e.X3DCast;var I=t.n(O);function b(e){F.call(this,e),this.addType(m().OpacityMapVolumeStyle)}Object.assign(Object.setPrototypeOf(b.prototype,F.prototype),{initialize(){F.prototype.initialize.call(this),this._transferFunction.addInterest("set_transferFunction__",this),this.set_transferFunction__()},set_transferFunction__(){this.transferFunctionNode=I()(m().X3DTexture2DNode,this._transferFunction)??I()(m().X3DTexture3DNode,this._transferFunction)??this.getBrowser().getDefaultTransferFunction()},addShaderFields(e){this._enabled.getValue()&&e.addUserDefinedField(m().inputOutput,"transferFunction_"+this.getId(),new(l().SFNode)(this.transferFunctionNode))},getUniformsText(){if(!this._enabled.getValue())return"";let e="";return e+="\n",e+="// OpacityMapVolumeStyle\n",e+="\n",this.transferFunctionNode.getType().includes(m().X3DTexture2DNode)?(e+="uniform sampler2D transferFunction_"+this.getId()+";\n",e+="\n",e+="vec4\n",e+="getOpacityMapStyle_"+this.getId()+" (in vec4 originalColor)\n",e+="{\n",e+=" return texture (transferFunction_"+this.getId()+", originalColor .rg);\n",e+="}\n"):(e+="uniform sampler3D transferFunction_"+this.getId()+";\n",e+="\n",e+="vec4\n",e+="getOpacityMapStyle_"+this.getId()+" (in vec4 originalColor)\n",e+="{\n",e+=" return texture (transferFunction_"+this.getId()+", originalColor .rgb);\n",e+="}\n"),e},getFunctionsText(){if(!this._enabled.getValue())return"";let e="";return e+="\n",e+=" // OpacityMapVolumeStyle\n",e+="\n",e+=" textureColor = getOpacityMapStyle_"+this.getId()+" (textureColor);\n",e}}),Object.defineProperties(b,{..._().getStaticProperties("OpacityMapVolumeStyle","VolumeRendering",1,"renderStyle","3.3"),fieldDefinitions:{value:new(p())([new(h())(m().inputOutput,"enabled",new(l().SFBool)(!0)),new(h())(m().inputOutput,"metadata",new(l().SFNode)),new(h())(m().inputOutput,"transferFunction",new(l().SFNode))]),enumerable:!0}});const D=b,T=N().add("OpacityMapVolumeStyle",D),V=Symbol(),P=Symbol(),E=Symbol(),M=Symbol();function U(){}Object.assign(U.prototype,{getDefaultVoxels(){return this[V]??=(()=>{const e=this.getPrivateScene().createNode("PixelTexture3D",!1);return e._image=[1,1,1,1,255],e.repeatS=!0,e.repeatT=!0,e.repeatR=!0,e.setup(),e})()},getDefaultVolumeStyle(){return this[P]??=(()=>{const e=new T(this.getPrivateScene());return e.setup(),e})()},getDefaultBlendedVolumeStyle(){return this[E]??=(()=>{const e=new T(this.getPrivateScene());return e.setup(),e})()},getDefaultTransferFunction(){return this[M]??=(()=>{const e=new(a())(this.getPrivateScene());e._boundaryModeS="CLAMP_TO_EDGE",e._boundaryModeT="REPEAT",e._magnificationFilter="DEFAULT",e._minificationFilter="DEFAULT",e._generateMipMaps=!0,e._textureCompression="DEFAULT",e.setup();const t=new(r())(this.getPrivateScene());return t._textureProperties=e,t._image.width=256,t._image.height=1,t._image.comp=2,t._image.array=Array.from({length:256},(e,t)=>t<<8|t),t.setup(),t})()}});const L=U,A=N().add("X3DVolumeRenderingContext",L);function B(e){F.call(this,e),this.addType(m().BlendedVolumeStyle)}Object.assign(Object.setPrototypeOf(B.prototype,F.prototype),{initialize(){F.prototype.initialize.call(this),this._weightTransferFunction1.addInterest("set_weightTransferFunction1__",this),this._weightTransferFunction2.addInterest("set_weightTransferFunction2__",this),this._renderStyle.addInterest("set_renderStyle__",this),this._voxels.addInterest("set_voxels__",this),this.set_weightTransferFunction1__(),this.set_weightTransferFunction2__(),this.set_renderStyle__(),this.set_voxels__()},addVolumeData(e){F.prototype.addVolumeData.call(this,e),this.renderStyleNode?.addVolumeData(e)},removeVolumeData(e){F.prototype.removeVolumeData.call(this,e),this.renderStyleNode?.removeVolumeData(e)},set_weightTransferFunction1__(){this.weightTransferFunction1Node=I()(m().X3DTexture2DNode,this._weightTransferFunction1)},set_weightTransferFunction2__(){this.weightTransferFunction2Node=I()(m().X3DTexture2DNode,this._weightTransferFunction2)},set_renderStyle__(){if(this.renderStyleNode){this.renderStyleNode.removeInterest("addNodeEvent",this);for(const e of this.getVolumeData())this.renderStyleNode.removeVolumeData(e)}if(this.renderStyleNode=I()(m().X3DComposableVolumeRenderStyleNode,this._renderStyle),this.renderStyleNode){this.renderStyleNode.addInterest("addNodeEvent",this);for(const e of this.getVolumeData())this.renderStyleNode.addVolumeData(e)}},set_voxels__(){this.voxelsNode=I()(m().X3DTexture3DNode,this._voxels)},addShaderFields(e){this._enabled.getValue()&&(e.addUserDefinedField(m().inputOutput,"weightConstant1_"+this.getId(),this._weightConstant1.copy()),e.addUserDefinedField(m().inputOutput,"weightConstant2_"+this.getId(),this._weightConstant2.copy()),this.weightTransferFunction1Node&&e.addUserDefinedField(m().inputOutput,"weightTransferFunction1_"+this.getId(),new(l().SFNode)(this.weightTransferFunction1Node)),this.weightTransferFunction2Node&&e.addUserDefinedField(m().inputOutput,"weightTransferFunction2_"+this.getId(),new(l().SFNode)(this.weightTransferFunction2Node)),this.voxelsNode&&e.addUserDefinedField(m().inputOutput,"voxels_"+this.getId(),new(l().SFNode)(this.voxelsNode)),this.getBrowser().getDefaultBlendedVolumeStyle().addShaderFields(e),this.renderStyleNode?.addShaderFields(e))},getDefines(e){this.renderStyleNode?.getDefines(e)},getUniformsText(){if(!this._enabled.getValue())return"";if(!this.voxelsNode)return"";let e="";e+="\n",e+="// BlendedVolumeStyle\n",e+="\n",e+="uniform float weightConstant1_"+this.getId()+";\n",e+="uniform float weightConstant2_"+this.getId()+";\n",this.weightTransferFunction1Node&&(e+="uniform sampler2D weightTransferFunction1_"+this.getId()+";\n"),this.weightTransferFunction2Node&&(e+="uniform sampler2D weightTransferFunction2_"+this.getId()+";\n"),e+="uniform sampler3D voxels_"+this.getId()+";\n";let t=this.getBrowser().getDefaultBlendedVolumeStyle().getUniformsText();this.renderStyleNode&&(t+=this.renderStyleNode.getUniformsText()),t=t.replace(/x3d_Texture3D\s*\[0\]/g,"voxels_"+this.getId()),e+="\n",e+=t,e+="\n",e+="vec4\n",e+="getBlendedStyle_"+this.getId()+" (in vec4 originalColor, in vec3 texCoord)\n",e+="{\n",e+=" vec4 blendColor_"+this.getId()+" = texture (voxels_"+this.getId()+", texCoord);";let n=this.getBrowser().getDefaultBlendedVolumeStyle().getFunctionsText();switch(this.renderStyleNode&&(n+=this.renderStyleNode.getFunctionsText()),n=n.replace(/textureColor/g,"blendColor_"+this.getId()),e+="\n",e+=n,this._weightFunction1.getValue()){default:e+=" float w1_"+this.getId()+" = weightConstant1_"+this.getId()+";\n";break;case"ALPHA0":e+=" float w1_"+this.getId()+" = originalColor .a;\n";break;case"ALPHA1":e+=" float w1_"+this.getId()+" = blendColor_ "+this.getId()+" .a;\n";break;case"ONE_MINUS_ALPHA0":e+=" float w1_"+this.getId()+" = 1.0 - originalColor .a;\n";break;case"ONE_MINUS_ALPHA1":e+=" float w1_"+this.getId()+" = 1.0 - blendColor_ "+this.getId()+" .a;\n";break;case"TABLE":this.weightTransferFunction1Node?e+=" float w1_"+this.getId()+" = texture (weightTransferFunction1_"+this.getId()+", vec2 (originalColor .a, blendColor_"+this.getId()+" .a)) .r;\n":e+=" float w1_"+this.getId()+" = weightConstant1_"+this.getId()+";\n"}switch(this._weightFunction2.getValue()){default:e+=" float w2_"+this.getId()+" = weightConstant2_"+this.getId()+";\n";break;case"ALPHA0":e+=" float w2_"+this.getId()+" = originalColor .a;\n";break;case"ALPHA1":e+=" float w2_"+this.getId()+" = blendColor_ "+this.getId()+" .a;\n";break;case"ONE_MINUS_ALPHA0":e+=" float w2_"+this.getId()+" = 1.0 - originalColor .a;\n";break;case"ONE_MINUS_ALPHA1":e+=" float w2_"+this.getId()+" = 1.0 - blendColor_ "+this.getId()+" .a;\n";break;case"TABLE":this.weightTransferFunction2Node?e+=" float w2_"+this.getId()+" = texture (weightTransferFunction2_"+this.getId()+", vec2 (originalColor .a, blendColor_"+this.getId()+" .a)) .r;\n":e+=" float w2_"+this.getId()+" = weightConstant2_"+this.getId()+";\n"}return e+="\n",e+=" return clamp (originalColor * w1_"+this.getId()+" + blendColor_"+this.getId()+" * w2_"+this.getId()+", 0.0, 1.0);\n",e+="}\n",e},getFunctionsText(){if(!this._enabled.getValue())return"";if(!this.voxelsNode)return"";let e="";return e+="\n",e+=" // BlendedVolumeStyle\n",e+="\n",e+=" textureColor = getBlendedStyle_"+this.getId()+" (textureColor, texCoord);\n",e}}),Object.defineProperties(B,{..._().getStaticProperties("BlendedVolumeStyle","VolumeRendering",3,"renderStyle","3.3"),fieldDefinitions:{value:new(p())([new(h())(m().inputOutput,"metadata",new(l().SFNode)),new(h())(m().inputOutput,"enabled",new(l().SFBool)(!0)),new(h())(m().inputOutput,"weightConstant1",new(l().SFFloat)(.5)),new(h())(m().inputOutput,"weightConstant2",new(l().SFFloat)(.5)),new(h())(m().inputOutput,"weightFunction1",new(l().SFString)("CONSTANT")),new(h())(m().inputOutput,"weightFunction2",new(l().SFString)("CONSTANT")),new(h())(m().inputOutput,"weightTransferFunction1",new(l().SFNode)),new(h())(m().inputOutput,"weightTransferFunction2",new(l().SFNode)),new(h())(m().inputOutput,"renderStyle",new(l().SFNode)),new(h())(m().inputOutput,"voxels",new(l().SFNode))]),enumerable:!0}});const j=B,R=N().add("BlendedVolumeStyle",j);function z(e){F.call(this,e),this.addType(m().BoundaryEnhancementVolumeStyle)}Object.assign(Object.setPrototypeOf(z.prototype,F.prototype),{addShaderFields(e){this._enabled.getValue()&&(e.addUserDefinedField(m().inputOutput,"retainedOpacity_"+this.getId(),this._retainedOpacity.copy()),e.addUserDefinedField(m().inputOutput,"boundaryOpacity_"+this.getId(),this._boundaryOpacity.copy()),e.addUserDefinedField(m().inputOutput,"opacityFactor_"+this.getId(),this._opacityFactor.copy()))},getUniformsText(){if(!this._enabled.getValue())return"";let e="";return e+="\n",e+="// BoundaryEnhancementVolumeStyle\n",e+="\n",e+="uniform float retainedOpacity_"+this.getId()+";\n",e+="uniform float boundaryOpacity_"+this.getId()+";\n",e+="uniform float opacityFactor_"+this.getId()+";\n",e+="\n",e+="vec4\n",e+="getBoundaryEnhancementStyle_"+this.getId()+" (in vec4 originalColor, in vec3 texCoord)\n",e+="{\n",e+=" float f0 = texture (x3d_Texture3D [0], texCoord) .r;\n",e+=" float f1 = texture (x3d_Texture3D [0], texCoord + vec3 (0.0, 0.0, 1.0 / float (textureSize (x3d_Texture3D [0], 0) .z))) .r;\n",e+=" float f = abs (f0 - f1);\n",e+="\n",e+=" float retainedOpacity = retainedOpacity_"+this.getId()+";\n",e+=" float boundaryOpacity = boundaryOpacity_"+this.getId()+";\n",e+=" float opacityFactor = opacityFactor_"+this.getId()+";\n",e+="\n",e+=" return vec4 (originalColor .rgb, originalColor .a * (retainedOpacity + boundaryOpacity * pow (f, opacityFactor)));\n",e+="}\n",e},getFunctionsText(){if(!this._enabled.getValue())return"";let e="";return e+="\n",e+=" // BoundaryEnhancementVolumeStyle\n",e+="\n",e+=" textureColor = getBoundaryEnhancementStyle_"+this.getId()+" (textureColor, texCoord);\n",e}}),Object.defineProperties(z,{..._().getStaticProperties("BoundaryEnhancementVolumeStyle","VolumeRendering",2,"renderStyle","3.3"),fieldDefinitions:{value:new(p())([new(h())(m().inputOutput,"metadata",new(l().SFNode)),new(h())(m().inputOutput,"enabled",new(l().SFBool)(!0)),new(h())(m().inputOutput,"retainedOpacity",new(l().SFFloat)(.2)),new(h())(m().inputOutput,"boundaryOpacity",new(l().SFFloat)(.9)),new(h())(m().inputOutput,"opacityFactor",new(l().SFFloat)(2))]),enumerable:!0}});const X=z,G=N().add("BoundaryEnhancementVolumeStyle",X);function H(e){F.call(this,e),this.addType(m().CartoonVolumeStyle)}Object.assign(Object.setPrototypeOf(H.prototype,F.prototype),{initialize(){F.prototype.initialize.call(this),this._surfaceNormals.addInterest("set_surfaceNormals__",this),this.set_surfaceNormals__()},set_surfaceNormals__(){this.surfaceNormalsNode=I()(m().X3DTexture3DNode,this._surfaceNormals)},addShaderFields(e){this._enabled.getValue()&&(e.addUserDefinedField(m().inputOutput,"colorSteps_"+this.getId(),this._colorSteps.copy()),e.addUserDefinedField(m().inputOutput,"orthogonalColor_"+this.getId(),this._orthogonalColor.copy()),e.addUserDefinedField(m().inputOutput,"parallelColor_"+this.getId(),this._parallelColor.copy()),this.surfaceNormalsNode&&e.addUserDefinedField(m().inputOutput,"surfaceNormals_"+this.getId(),new(l().SFNode)(this.surfaceNormalsNode)))},getDefines(e){e.add("#define X3D_HSV")},getUniformsText(){if(!this._enabled.getValue())return"";let e="";return e+="\n",e+="// CartoonVolumeStyle\n",e+="\n",e+="uniform int colorSteps_"+this.getId()+";\n",e+="uniform vec4 orthogonalColor_"+this.getId()+";\n",e+="uniform vec4 parallelColor_"+this.getId()+";\n",e+=this.getNormalText(this.surfaceNormalsNode),e+="\n",e+="vec4\n",e+="getCartoonStyle_"+this.getId()+" (in vec4 originalColor, vec3 texCoord)\n",e+="{\n",e+=" vec4 surfaceNormal = getNormal_"+this.getId()+" (texCoord);\n",e+="\n",e+=" if (surfaceNormal .w == 0.0)\n",e+=" return vec4 (0.0);\n",e+="\n",e+=" vec4 orthogonalColor = orthogonalColor_"+this.getId()+";\n",e+=" vec4 parallelColor = parallelColor_"+this.getId()+";\n",e+=" int colorSteps = colorSteps_"+this.getId()+";\n",e+="\n",e+=" float steps = clamp (float (colorSteps), 1.0, 64.0);\n",e+=" float step = M_PI / 2.0 / steps;\n",e+=" float cosTheta = min (dot (surfaceNormal .xyz, normalize (vertex)), 1.0);\n",e+="\n",e+=" if (cosTheta < 0.0)\n",e+=" return vec4 (0.0);\n",e+="\n",e+=" float t = cos (min (floor (acos (cosTheta) / step) * (steps > 1.0 ? steps / (steps - 1.0) : 1.0), steps) * step);\n",e+=" vec3 orthogonalHSV = rgb2hsv (orthogonalColor .rgb);\n",e+=" vec3 parallelHSV = rgb2hsv (parallelColor .rgb);\n",e+="\n",e+=" return vec4 (hsv2rgb (mix_hsv (orthogonalHSV, parallelHSV, t)), originalColor .a);\n",e+="}\n",e},getFunctionsText(){if(!this._enabled.getValue())return"";let e="";return e+="\n",e+=" // CartoonVolumeStyle\n",e+="\n",e+=" textureColor = getCartoonStyle_"+this.getId()+" (textureColor, texCoord);\n",e}}),Object.defineProperties(H,{..._().getStaticProperties("CartoonVolumeStyle","VolumeRendering",3,"renderStyle","3.3"),fieldDefinitions:{value:new(p())([new(h())(m().inputOutput,"metadata",new(l().SFNode)),new(h())(m().inputOutput,"enabled",new(l().SFBool)(!0)),new(h())(m().inputOutput,"colorSteps",new(l().SFInt32)(4)),new(h())(m().inputOutput,"orthogonalColor",new(l().SFColorRGBA)(1,1,1,1)),new(h())(m().inputOutput,"parallelColor",new(l().SFColorRGBA)(0,0,0,1)),new(h())(m().inputOutput,"surfaceNormals",new(l().SFNode))]),enumerable:!0}});const k=H,Q=N().add("CartoonVolumeStyle",k);function Y(e){F.call(this,e),this.addType(m().ComposedVolumeStyle),this.renderStyleNodes=[]}Object.assign(Object.setPrototypeOf(Y.prototype,F.prototype),{initialize(){F.prototype.initialize.call(this),this._renderStyle.addInterest("set_renderStyle__",this),this.set_renderStyle__()},addVolumeData(e){F.prototype.addVolumeData.call(this,e);for(const t of this.renderStyleNodes)t.addVolumeData(e)},removeVolumeData(e){F.prototype.removeVolumeData.call(this,e);for(const t of this.renderStyleNodes)t.removeVolumeData(e)},set_renderStyle__(){const e=this.renderStyleNodes;for(const t of e){t.removeInterest("addNodeEvent",this);for(const e of this.getVolumeData())t.removeVolumeData(e)}e.length=0;for(const t of this._renderStyle){const n=I()(m().X3DComposableVolumeRenderStyleNode,t);n&&e.push(n)}for(const t of e){t.addInterest("addNodeEvent",this);for(const e of this.getVolumeData())t.addVolumeData(e)}},addShaderFields(e){if(this._enabled.getValue())for(const t of this.renderStyleNodes)t.addShaderFields(e)},getDefines(e){for(const t of this.renderStyleNodes)t.getDefines(e)},getUniformsText(){if(!this._enabled.getValue())return"";let e="";for(const t of this.renderStyleNodes)e+=t.getUniformsText();e+="\n",e+="vec4\n",e+="getComposedStyle_"+this.getId()+" (in vec4 textureColor, in vec3 texCoord)\n",e+="{\n";for(const t of this.renderStyleNodes)e+=t.getFunctionsText();return e+="\n",e+=" return textureColor;\n",e+="}\n",e},getFunctionsText(){if(!this._enabled.getValue())return"";let e="";return e+="\n",e+=" // ComposedVolumeStyle\n",e+="\n",e+=" textureColor = getComposedStyle_"+this.getId()+" (textureColor, texCoord);\n",e}}),Object.defineProperties(Y,{..._().getStaticProperties("ComposedVolumeStyle","VolumeRendering",3,"renderStyle","3.3"),fieldDefinitions:{value:new(p())([new(h())(m().inputOutput,"metadata",new(l().SFNode)),new(h())(m().inputOutput,"enabled",new(l().SFBool)(!0)),new(h())(m().inputOutput,"renderStyle",new(l().MFNode))]),enumerable:!0}});const W=Y,q=N().add("ComposedVolumeStyle",W);function K(e){F.call(this,e),this.addType(m().EdgeEnhancementVolumeStyle)}Object.assign(Object.setPrototypeOf(K.prototype,F.prototype),{initialize(){F.prototype.initialize.call(this),this._surfaceNormals.addInterest("set_surfaceNormals__",this),this.set_surfaceNormals__()},set_surfaceNormals__(){this.surfaceNormalsNode=I()(m().X3DTexture3DNode,this._surfaceNormals)},addShaderFields(e){this._enabled.getValue()&&(e.addUserDefinedField(m().inputOutput,"edgeColor_"+this.getId(),this._edgeColor.copy()),e.addUserDefinedField(m().inputOutput,"gradientThreshold_"+this.getId(),this._gradientThreshold.copy()),this.surfaceNormalsNode&&e.addUserDefinedField(m().inputOutput,"surfaceNormals_"+this.getId(),new(l().SFNode)(this.surfaceNormalsNode)))},getUniformsText(){if(!this._enabled.getValue())return"";let e="";return e+="\n",e+="// EdgeEnhancementVolumeStyle\n",e+="\n",e+="uniform vec4 edgeColor_"+this.getId()+";\n",e+="uniform float gradientThreshold_"+this.getId()+";\n",e+=this.getNormalText(this.surfaceNormalsNode),e+="\n",e+="vec4\n",e+="getEdgeEnhacementStyle_"+this.getId()+" (in vec4 originalColor, in vec3 texCoord)\n",e+="{\n",e+=" vec4 surfaceNormal = getNormal_"+this.getId()+" (texCoord);\n",e+="\n",e+=" if (surfaceNormal .w == 0.0)\n",e+=" return vec4 (0.0);\n",e+="\n",e+=" vec4 edgeColor = edgeColor_"+this.getId()+";\n",e+=" float gradientThreshold = gradientThreshold_"+this.getId()+";\n",e+="\n",e+=" float angle = abs (dot (surfaceNormal .xyz, normalize (vertex)));\n",e+="\n",e+=" if (angle >= cos (gradientThreshold))\n",e+=" return originalColor;\n",e+=" else\n",e+=" return vec4 (mix (edgeColor .rgb, originalColor.rgb, angle), originalColor .a);\n",e+="}\n",e},getFunctionsText(){if(!this._enabled.getValue())return"";let e="";return e+="\n",e+=" // EdgeEnhancementVolumeStyle\n",e+="\n",e+=" textureColor = getEdgeEnhacementStyle_"+this.getId()+" (textureColor, texCoord);\n",e}}),Object.defineProperties(K,{..._().getStaticProperties("EdgeEnhancementVolumeStyle","VolumeRendering",2,"renderStyle","3.3"),fieldDefinitions:{value:new(p())([new(h())(m().inputOutput,"metadata",new(l().SFNode)),new(h())(m().inputOutput,"enabled",new(l().SFBool)(!0)),new(h())(m().inputOutput,"edgeColor",new(l().SFColorRGBA)(0,0,0,1)),new(h())(m().inputOutput,"gradientThreshold",new(l().SFFloat)(.4)),new(h())(m().inputOutput,"surfaceNormals",new(l().SFNode))]),enumerable:!0}});const Z=K,J=N().add("EdgeEnhancementVolumeStyle",Z),$=e.X3DChildNode;var ee=t.n($);const te=e.X3DBoundedObject;var ne=t.n(te);const oe=e.TextureQuality;var ie=t.n(oe);const re=e.UnlitMaterial;var se=t.n(re);const ae=N().add("VolumeStyle.vs","#version 300 es\nprecision highp float;precision highp int;uniform mat4 x3d_ProjectionMatrix;uniform mat4 x3d_ModelViewMatrix;uniform mat4 x3d_TextureMatrix[1];\n#if defined(X3D_XR_SESSION)\nuniform mat4 x3d_EyeMatrix;\n#endif\nin vec4 x3d_TexCoord0;in vec4 x3d_Vertex;out vec3 vertex;out vec4 texCoord;\n#include<Fog>\n#include<Logarithmic>\nvoid main(){vec4 position=x3d_ModelViewMatrix*x3d_Vertex;\n#if defined(X3D_XR_SESSION)\nposition=x3d_EyeMatrix*position;\n#endif\nvertex=position.xyz;texCoord=x3d_TextureMatrix[0]*x3d_TexCoord0;gl_Position=x3d_ProjectionMatrix*position;\n#if defined(X3D_LOGARITHMIC_DEPTH_BUFFER)\nlogarithmic(gl_Position);\n#endif\n#if defined(X3D_FOG)&&defined(X3D_FOG_COORDS)\nfog();\n#endif\n}"),de=N().add("VolumeStyle.fs","#version 300 es\nprecision highp float;precision highp int;precision highp sampler3D;uniform sampler3D x3d_Texture3D[1];uniform mat3 x3d_TextureNormalMatrix;\n#if defined(X3D_LIGHTING)\nuniform x3d_LightSourceParameters x3d_LightSource[X3D_NUM_LIGHTS];\n#endif\nin vec3 vertex;in vec4 texCoord;\n#if!defined(X3D_ORDER_INDEPENDENT_TRANSPARENCY)\nout vec4 x3d_FragColor;\n#endif\nconst float M_PI=3.141592653589793;const float M_SQRT2=1.4142135623730951;const float M_SQRT1_2=.7071067811865476;\n#include<ToneMapping>\n#include<ClipPlanes>\n#include<Fog>\n#include<OIT>\n#include<Logarithmic>\n__VOLUME_STYLES_DEFINES__\n#if defined(X3D_HSV)\nvec3 rgb2hsv(in vec3 color){float h=0.;float s=0.;float v=0.;float min=min(min(color.r,color.g),color.b);float max=max(max(color.r,color.g),color.b);v=max;float delta=max-min;if(max!=0.&&delta!=0.){s=delta/max;if(color.r==max)h=(color.g-color.b)/delta;else if(color.g==max)h=2.+(color.b-color.r)/delta;else h=4.+(color.r-color.g)/delta;h*=M_PI/3.;if(h<0.)h+=M_PI*2.;}else s=h=0.;return vec3(h,s,v);}vec3 hsv2rgb(in vec3 hsv){float h=hsv[0];float s=clamp(hsv[1],0.,1.);float v=clamp(hsv[2],0.,1.);if(s==0.){return vec3(v,v,v);}else{float w=(h*(180./M_PI))/60.;float i=floor(w);float f=w-i;float p=v*(1.-s);float q=v*(1.-s*f);float t=v*(1.-s*(1.-f));switch(int(i)% 6){case 0:return vec3(v,t,p);case 1:return vec3(q,v,p);case 2:return vec3(p,v,t);case 3:return vec3(p,q,v);case 4:return vec3(t,p,v);default:return vec3(v,p,q);}}return vec3(0);}vec3 mix_hsv(in vec3 a,in vec3 b,in float t){float ha=a[0];float sa=a[1];float va=a[2];float hb=b[0];float sb=b[1];float vb=b[2];if(sa==0.)ha=hb;if(sb==0.)hb=ha;float range=abs(hb-ha);if(range<=M_PI){float h=ha+t*(hb-ha);float s=sa+t*(sb-sa);float v=va+t*(vb-va);return vec3(h,s,v);}float PI2=M_PI*2.;float step=(PI2-range)*t;float h=ha<hb?ha-step:ha+step;if(h<0.)h+=PI2;else if(h>PI2)h-=PI2;float s=sa+t*(sb-sa);float v=va+t*(vb-va);return vec3(h,s,v);}\n#endif\n#if defined(X3D_PLANE)\nstruct Plane3{vec3 normal;float distanceFromOrigin;};Plane3 plane3(const in vec3 point,const in vec3 normal){return Plane3(normal,dot(normal,point));}vec3 plane3_perpendicular_vector(const in Plane3 plane,const in vec3 point){return plane.normal*(dot(point,plane.normal)-plane.distanceFromOrigin);}\n#endif\n#if defined(X3D_SHADING)\nfloat getSpotFactor(const in float cutOffAngle,const in float beamWidth,const in vec3 L,const in vec3 d){float spotAngle=acos(clamp(dot(-L,d),-1.,1.));if(spotAngle>=cutOffAngle)return 0.;else if(spotAngle<=beamWidth)return 1.;return(spotAngle-cutOffAngle)/(beamWidth-cutOffAngle);}\n#endif\n__VOLUME_STYLES_UNIFORMS__ vec4 getTextureColor(in vec3 texCoord){if(any(greaterThan(abs(texCoord-.5),vec3(.5))))discard;vec4 textureColor=texture(x3d_Texture3D[0],texCoord);__VOLUME_STYLES_FUNCTIONS__ return textureColor;}void main(){\n#if defined(X3D_CLIP_PLANES)\nclip();\n#endif\nvec4 finalColor=getTextureColor(texCoord.stp/texCoord.q);if(finalColor.a<1./255.)discard;\n#if defined(X3D_FOG)\nfinalColor.rgb=getFogColor(finalColor.rgb);\n#endif\nfinalColor.rgb=toneMap(finalColor.rgb);\n#if defined(X3D_ORDER_INDEPENDENT_TRANSPARENCY)\noit(finalColor);\n#else\nx3d_FragColor=finalColor;\n#endif\n#if defined(X3D_LOGARITHMIC_DEPTH_BUFFER)\nlogarithmic();\n#endif\n}");function le(e,t){se().call(this,e),this.volumeDataNode=t,this.volumeShaderNodes=this.getBrowser().getShaders()}Object.assign(Object.setPrototypeOf(le.prototype,se().prototype),{getVolumeShaders(){return this.volumeShaderNodes},getShader(e,t){const{renderObject:n,fogNode:o,localObjectsKeys:i}=t;let r="VD";return r+=this.getId(),r+=".",r+=n.getRenderKey(),r+=o?.getFogType()??0,r+=".",r+=i.sort().join(""),this.volumeShaderNodes.get(r)??this.createShader(r,e,t)},createShader(e,t,n){const o=this.getShaderOptions(t,n),i=this.volumeDataNode.createShader(o,ae,de);return this.volumeShaderNodes.set(e,i),i},setShaderUniforms(e,t,n,o){this.volumeDataNode.setShaderUniforms(e,t)}}),Object.defineProperties(le,{typeName:{value:"VolumeMaterial",enumerable:!0},componentInfo:{value:Object.freeze({name:"Shape",level:1}),enumerable:!0},containerField:{value:"material",enumerable:!0},fieldDefinitions:{value:se().fieldDefinitions}});const ue=le,he=N().add("VolumeMaterial",ue),ce=e.Vector3;var pe=t.n(ce);const fe=e.Matrix4;var _e=t.n(fe);function ge(e){ee().call(this,e),ne().call(this,e),this.addType(m().X3DVolumeDataNode),this.setCameraObject(!0),this._dimensions.setUnit("length");const t=this.getBrowser().getPrivateScene();this.groupNode=t.createNode("Group",!1),this.proximitySensorNode=t.createNode("ProximitySensor",!1),this.transformNode=t.createNode("Transform",!1),this.volumeMaterialNode=new he(t,this),this.textureTransformNode=t.createNode("TextureTransform3D",!1),this.appearanceNode=t.createNode("Appearance",!1),this.lowShapeNode=t.createNode("Shape",!1),this.lowGeometryNode=t.createNode("QuadSet",!1),this.lowTextureCoordinateNode=t.createNode("TextureCoordinate3D",!1),this.lowCoordinateNode=t.createNode("Coordinate",!1),this.hiShapeNode=t.createNode("Shape",!1),this.hiGeometryNode=t.createNode("QuadSet",!1),this.hiTextureCoordinateNode=t.createNode("TextureCoordinate3D",!1),this.hiCoordinateNode=t.createNode("Coordinate",!1),this.textureNormalMatrixArray=new Float32Array(9)}Object.assign(Object.setPrototypeOf(ge.prototype,ee().prototype),ne().prototype,{initialize(){ee().prototype.initialize.call(this),ne().prototype.initialize.call(this),this._bboxDisplay.addFieldInterest(this.groupNode._bboxDisplay),this.proximitySensorNode._orientation_changed.addFieldInterest(this.transformNode._rotation),this.proximitySensorNode._orientation_changed.addFieldInterest(this.textureTransformNode._rotation),this.proximitySensorNode._isActive.addInterest("set_active__",this),this.groupNode._children=[this.proximitySensorNode,this.transformNode],this.transformNode._children=[this.lowShapeNode,this.hiShapeNode],this.textureTransformNode._translation=new(l().SFVec3f)(.5,.5,.5),this.textureTransformNode._center=new(l().SFVec3f)(-.5,-.5,-.5),this.appearanceNode._alphaMode="BLEND",this.appearanceNode._material=this.volumeMaterialNode,this.appearanceNode._textureTransform=this.textureTransformNode,this.lowShapeNode._pointerEvents=!1,this.lowShapeNode._castShadow=!1,this.lowShapeNode._visible=!1,this.lowShapeNode._appearance=this.appearanceNode,this.lowShapeNode._geometry=this.lowGeometryNode,this.lowGeometryNode._texCoord=this.lowTextureCoordinateNode,this.lowGeometryNode._coord=this.lowCoordinateNode,this.hiShapeNode._pointerEvents=!1,this.hiShapeNode._castShadow=!1,this.hiShapeNode._visible=!1,this.hiShapeNode._appearance=this.appearanceNode,this.hiShapeNode._geometry=this.hiGeometryNode,this.hiGeometryNode._texCoord=this.hiTextureCoordinateNode,this.hiGeometryNode._coord=this.hiCoordinateNode,this.volumeMaterialNode.setPrivate(!0),this.textureTransformNode.setPrivate(!0),this.appearanceNode.setPrivate(!0),this.lowCoordinateNode.setPrivate(!0),this.lowTextureCoordinateNode.setPrivate(!0),this.lowGeometryNode.setPrivate(!0),this.lowShapeNode.setPrivate(!0),this.hiCoordinateNode.setPrivate(!0),this.hiTextureCoordinateNode.setPrivate(!0),this.hiGeometryNode.setPrivate(!0),this.hiShapeNode.setPrivate(!0),this.transformNode.setPrivate(!0),this.proximitySensorNode.setPrivate(!0),this.groupNode.setPrivate(!0),this.volumeMaterialNode.setup(),this.textureTransformNode.setup(),this.appearanceNode.setup(),this.lowCoordinateNode.setup(),this.lowTextureCoordinateNode.setup(),this.lowGeometryNode.setup(),this.lowShapeNode.setup(),this.hiCoordinateNode.setup(),this.hiTextureCoordinateNode.setup(),this.hiGeometryNode.setup(),this.hiShapeNode.setup(),this.transformNode.setup(),this.proximitySensorNode.setup(),this.groupNode.setup(),this.connectChildNode(this.groupNode),this.getLive().addInterest("set_live__",this,!0),this._dimensions.addInterest("set_dimensions__",this),this.textureTransformNode.addInterest("set_textureTransform__",this),this.set_live__(!1),this.set_dimensions__(),this.set_textureTransform__(),this.set_active__()},getBBox(e,t){return this.isDefaultBBoxSize()?e.set(this._dimensions.getValue(),pe().ZERO):e.set(this._bboxSize.getValue(),this._bboxCenter.getValue())},getAppearance(){return this.appearanceNode},updateShader(){this.volumeMaterialNode.getVolumeShaders().clear()},addShaderUniforms(e){e.push("x3d_TextureNormalMatrix")},getNumPlanes(e){switch(e){case ie().LOW:return 200;case ie().MEDIUM:return 400;case ie().HIGH:return 600}},getPoints(e){const t=this.getNumPlanes(e),n=this._dimensions.getValue().norm(),o=n/2,i=[];for(let e=0;e<t;++e){const r=e/(t-1)-.5;i.push(o,o,n*r,-o,o,n*r,-o,-o,n*r,o,-o,n*r)}return i},set_live__(e){const t=this.getBrowser(),n=this.isLive()&&t.getBrowserOption("AlwaysUpdateGeometries");this.getLive().getValue()||n?(t.getBrowserOptions()._TextureQuality.addInterest("set_dimensions__",this),t.getBrowserOptions()._QualityWhenMoving.addInterest("set_dimensions__",this),e&&this.set_dimensions__()):(t.getBrowserOptions()._TextureQuality.removeInterest("set_dimensions__",this),t.getBrowserOptions()._QualityWhenMoving.removeInterest("set_dimensions__",this))},set_dimensions__(){const e=this.getBrowser(),t=e.getBrowserOptions().getTextureQuality(),n=e.getBrowserOptions().getQualityWhenMoving()??t;this.proximitySensorNode._size=new(pe())(200*this._dimensions.length()),this.textureTransformNode._scale=this._dimensions.inverse();const o=this.getPoints(t);if(this.hiCoordinateNode._point=o,this.hiTextureCoordinateNode._point=o,n===t)this.lowShapeNode._geometry=this.hiGeometryNode;else{const e=this.getPoints(n);this.lowCoordinateNode._point=e,this.lowTextureCoordinateNode._point=e,this.lowShapeNode._geometry=this.lowGeometryNode}this.set_active__()},set_textureTransform__(){this.textureNormalMatrixArray.set(new(_e())(...this.textureTransformNode.getMatrix()).submatrix.inverse())},set_active__(){const e=this.getBrowser(),t=e.getBrowserOptions().getTextureQuality(),n=e.getBrowserOptions().getQualityWhenMoving()??t,o=this.proximitySensorNode._isActive.getValue()&&t!==n;o?e.sensorEvents().addInterest("update",this):e.sensorEvents().removeInterest("update",this),this.lowShapeNode._visible=!o,this.hiShapeNode._visible=o},update(){const e=this.getBrowser(),t=e.getCurrentSpeed()>0||e.getViewer().isActive();this.lowShapeNode._visible.getValue()!==t&&(this.lowShapeNode._visible=t),this.hiShapeNode._visible.getValue()!==!t&&(this.hiShapeNode._visible=!t)},traverse(e,t){this.groupNode.traverse(e,t)},setShaderUniforms(e,t){e.uniformMatrix3fv(t.x3d_TextureNormalMatrix,!0,this.textureNormalMatrixArray)},dispose(){ne().prototype.dispose.call(this),ee().prototype.dispose.call(this)}}),Object.defineProperties(ge,_().getStaticProperties("X3DVolumeDataNode","VolumeRendering",1));const me=ge,Se=N().add("X3DVolumeDataNode",me),Ne=e.ComposedShader;var ye=t.n(Ne);const xe=e.ShaderPart;var ve=t.n(xe);function we(e){Se.call(this,e),this.addType(m().IsoSurfaceVolumeData),this.renderStyleNodes=[]}Object.assign(Object.setPrototypeOf(we.prototype,Se.prototype),{initialize(){Se.prototype.initialize.call(this),this._gradients.addInterest("set_gradients__",this),this._renderStyle.addInterest("set_renderStyle__",this),this._contourStepSize.addInterest("updateShader",this),this._surfaceValues.addInterest("updateShader",this),this._surfaceTolerance.addInterest("updateShader",this),this._renderStyle.addInterest("updateShader",this),this.set_gradients__(),this.set_renderStyle__(),this.set_voxels__(),this.updateShader()},set_gradients__(){this.gradientsNode=I()(m().X3DTexture3DNode,this._gradients)},set_renderStyle__(){const e=this.renderStyleNodes;for(const t of e)t.removeInterest("updateShader",this),t.removeVolumeData(this);e.length=0;for(const t of this._renderStyle){const n=I()(m().X3DComposableVolumeRenderStyleNode,t);n&&e.push(n)}for(const t of e)t.addInterest("updateShader",this),t.addVolumeData(this)},set_voxels__(){this.voxelsNode=I()(m().X3DTexture3DNode,this._voxels),this.getAppearance()._texture=this.voxelsNode??this.getBrowser().getDefaultVoxels()},createShader(e,t,n){const o=this.getBrowser().getDefaultVolumeStyle(),i=new Set;o.getDefines(i);let r=o.getUniformsText(),s=o.getFunctionsText();r+="\n",r+="uniform float surfaceValues ["+Math.max(this._surfaceValues.length,1)+"];\n",r+="uniform float surfaceTolerance;\n";for(const e of this.renderStyleNodes)e.getDefines(i),r+=e.getUniformsText();if(s+="\n",s+=" // IsoSurfaceVolumeData\n",s+="\n",this.gradientsNode?(r+="\n",r+="uniform sampler3D gradients;\n",s+=" if (length (texture (gradients, texCoord) .xyz * 2.0 - 1.0) < surfaceTolerance)\n",s+=" discard;\n"):(r+="\n",r+="vec4\n",r+="getNormal (in vec3 texCoord)\n",r+="{\n",r+=" vec4 offset = vec4 (1.0 / vec3 (textureSize (x3d_Texture3D [0], 0)), 0.0);\n",r+=" float i0 = texture (x3d_Texture3D [0], texCoord + offset .xww) .r;\n",r+=" float i1 = texture (x3d_Texture3D [0], texCoord - offset .xww) .r;\n",r+=" float i2 = texture (x3d_Texture3D [0], texCoord + offset .wyw) .r;\n",r+=" float i3 = texture (x3d_Texture3D [0], texCoord - offset .wyw) .r;\n",r+=" float i4 = texture (x3d_Texture3D [0], texCoord + offset .wwz) .r;\n",r+=" float i5 = texture (x3d_Texture3D [0], texCoord - offset .wwz) .r;\n",r+=" vec3 n = vec3 (i1 - i0, i3 - i2, i5 - i4);\n",r+="\n",r+=" return vec4 (normalize (x3d_TextureNormalMatrix * n), length (n));\n",r+="}\n",s+=" if (getNormal (texCoord) .w < surfaceTolerance)\n",s+=" discard;\n"),s+="\n",s+=" float intensity = textureColor .r;\n",s+="\n",1===this._surfaceValues.length){const e=Math.abs(this._contourStepSize.getValue());if(0===e)s+=" if (intensity > surfaceValues [0])\n",s+=" {\n",s+=" textureColor = vec4 (vec3 (surfaceValues [0]), 1.0);\n",this.renderStyleNodes.length&&(s+=this.renderStyleNodes[0].getFunctionsText()),s+=" }\n",s+=" else\n",s+=" {\n",s+=" discard;\n",s+=" }\n",s+="\n";else{const t=[];for(let n=this._surfaceValues[0]-e;n>0;n-=e)t.unshift(n);t.push(this._surfaceValues[0]);for(let n=this._surfaceValues[0]+e;n<1;n+=e)t.push(n);s+=" if (false)\n",s+=" { }\n";for(let e=this._surfaceValues.length-1;e>=0;--e)s+=" else if (intensity > "+t[e]+")\n",s+=" {\n",s+=" textureColor = vec4 (vec3 ("+t[e]+"), 1.0);\n",this.renderStyleNodes.length&&(s+=this.renderStyleNodes[0].getFunctionsText()),s+=" }\n";s+=" else\n",s+=" {\n",s+=" discard;\n",s+=" }\n",s+="\n"}}else{s+=" if (false)\n",s+=" { }\n";for(let e=this._surfaceValues.length-1;e>=0;--e){if(s+=" else if (intensity > surfaceValues ["+e+"])\n",s+=" {\n",s+=" textureColor = vec4 (vec3 (surfaceValues ["+e+"]), 1.0);\n",this.renderStyleNodes.length){const t=Math.min(e,this.renderStyleNodes.length-1);s+=this.renderStyleNodes[t].getFunctionsText()}s+=" }\n"}s+=" else\n",s+=" {\n",s+=" discard;\n",s+=" }\n",s+="\n"}n=n.replace("__VOLUME_STYLES_DEFINES__",Array.from(i).join("\n")).replace("__VOLUME_STYLES_UNIFORMS__",r).replace("__VOLUME_STYLES_FUNCTIONS__",s);const a=new(ve())(this.getExecutionContext());a._url.push(encodeURI("data:x-shader/x-vertex,"+t)),a.setPrivate(!0),a.setName("VolumeDataVertexShader"),a.setOptions(e),a.setup();const d=new(ve())(this.getExecutionContext());d._type="FRAGMENT",d._url.push(encodeURI("data:x-shader/x-fragment,"+n)),d.setPrivate(!0),d.setName("VolumeDataFragmentShader"),d.setOptions(e),d.setup();const u=new(ye())(this.getExecutionContext());u._language="GLSL",u._parts.push(a),u._parts.push(d),u.setPrivate(!0),u.setName("VolumeDataShader"),u.addUserDefinedField(m().inputOutput,"surfaceValues",this._surfaceValues.copy()),u.addUserDefinedField(m().inputOutput,"surfaceTolerance",this._surfaceTolerance.copy()),this.gradientsNode&&u.addUserDefinedField(m().inputOutput,"gradients",new(l().SFNode)(this.gradientsNode)),o.addShaderFields(u);for(const e of this.renderStyleNodes)e.addShaderFields(u);const h=[];return this.addShaderUniforms(h),u.setUniformNames(h),u.setup(),u}}),Object.defineProperties(we,{..._().getStaticProperties("IsoSurfaceVolumeData","VolumeRendering",2,"children","3.3"),fieldDefinitions:{value:new(p())([new(h())(m().inputOutput,"metadata",new(l().SFNode)),new(h())(m().inputOutput,"dimensions",new(l().SFVec3f)(1,1,1)),new(h())(m().inputOutput,"contourStepSize",new(l().SFFloat)),new(h())(m().inputOutput,"surfaceValues",new(l().MFFloat)),new(h())(m().inputOutput,"surfaceTolerance",new(l().SFFloat)),new(h())(m().inputOutput,"visible",new(l().SFBool)(!0)),new(h())(m().inputOutput,"bboxDisplay",new(l().SFBool)),new(h())(m().initializeOnly,"bboxSize",new(l().SFVec3f)(-1,-1,-1)),new(h())(m().initializeOnly,"bboxCenter",new(l().SFVec3f)),new(h())(m().inputOutput,"renderStyle",new(l().MFNode)),new(h())(m().inputOutput,"gradients",new(l().SFNode)),new(h())(m().inputOutput,"voxels",new(l().SFNode))]),enumerable:!0}});const Ce=we,Fe=N().add("IsoSurfaceVolumeData",Ce);function Oe(e){v.call(this,e),this.addType(m().ProjectionVolumeStyle)}Object.assign(Object.setPrototypeOf(Oe.prototype,v.prototype),{addShaderFields(e){this._enabled.getValue()&&e.addUserDefinedField(m().inputOutput,"intensityThreshold_"+this.getId(),this._intensityThreshold.copy())},getDefines(e){e.add("#define X3D_PLANE")},getUniformsText(){if(!this._enabled.getValue())return"";let e="";switch(e+="\n",e+="// ProjectionVolumeStyle\n",e+="\n",e+="uniform float intensityThreshold_"+this.getId()+";\n",e+="\n",e+="vec4\n",e+="getProjectionStyle_"+this.getId()+"(in vec4 originalColor, in vec3 texCoord)\n",e+="{\n",this._type.getValue()){default:case"MAX":case"AVERAGE":e+=" float projectionColor = 0.0;\n";break;case"MIN":e+=" float projectionColor = 1.0;\n"}switch(e+=" const int samples = 16;\n",e+=" vec3 normal = normalize (x3d_TextureNormalMatrix * vec3 (0.0, 0.0, 1.0));\n",e+=" Plane3 plane = plane3 (vec3 (0.5), normal);\n",e+=" vec3 point = texCoord + plane3_perpendicular_vector (plane, texCoord);\n",e+=" vec3 ray = point - normal * M_SQRT1_2;\n",e+=" vec3 step = normal * (M_SQRT2 / float (samples));\n",e+=" bool first = false;\n",e+="\n",e+=" for (int i = 0; i < samples; ++ i, ray += step)\n",e+=" {\n",e+=" if (any (greaterThan (abs (ray - 0.5), vec3 (0.5))))\n",e+=" continue;\n",e+="\n",e+=" float intensity = texture (x3d_Texture3D [0], ray) .r;\n",e+="\n",this._type.getValue()){default:case"MAX":e+=" if (intensity < intensityThreshold_"+this.getId()+")\n",e+=" continue;\n",e+="\n",e+=" if (first && intensityThreshold_"+this.getId()+" > 0.0)\n",e+=" break;\n",e+="\n",e+=" if (intensity <= projectionColor)\n",e+=" {\n",e+=" first = true;\n",e+=" continue;\n",e+=" }\n",e+="\n",e+=" projectionColor = intensity;\n";break;case"MIN":e+=" if (intensity < intensityThreshold_"+this.getId()+")\n",e+=" continue;\n",e+="\n",e+=" if (first && intensityThreshold_"+this.getId()+" > 0.0)\n",e+=" break;\n",e+="\n",e+=" if (intensity >= projectionColor)\n",e+=" {\n",e+=" first = true;\n",e+=" continue;\n",e+=" }\n",e+="\n",e+=" projectionColor = intensity;\n";break;case"AVERAGE":e+=" projectionColor += intensity;\n"}return e+=" }\n",e+="\n","AVERAGE"===this._type.getValue()&&(e+=" projectionColor /= float (samples);\n"),e+=" return vec4 (vec3 (projectionColor), originalColor .a);\n",e+="}\n",e},getFunctionsText(){if(!this._enabled.getValue())return"";let e="";return e+="\n",e+=" // ProjectionVolumeStyle\n",e+="\n",e+=" textureColor = getProjectionStyle_"+this.getId()+" (textureColor, texCoord);\n",e}}),Object.defineProperties(Oe,{..._().getStaticProperties("ProjectionVolumeStyle","VolumeRendering",2,"renderStyle","3.3"),fieldDefinitions:{value:new(p())([new(h())(m().inputOutput,"metadata",new(l().SFNode)),new(h())(m().inputOutput,"enabled",new(l().SFBool)(!0)),new(h())(m().inputOutput,"type",new(l().SFString)("MAX")),new(h())(m().inputOutput,"intensityThreshold",new(l().SFFloat))]),enumerable:!0}});const Ie=Oe,be=N().add("ProjectionVolumeStyle",Ie);function De(e){Se.call(this,e),this.addType(m().SegmentedVolumeData),this.renderStyleNodes=[]}Object.assign(Object.setPrototypeOf(De.prototype,Se.prototype),{initialize(){Se.prototype.initialize.call(this),this._segmentIdentifiers.addInterest("set_segmentIdentifiers__",this),this._renderStyle.addInterest("set_renderStyle__",this),this._segmentEnabled.addInterest("updateShader",this),this._segmentIdentifiers.addInterest("updateShader",this),this._renderStyle.addInterest("updateShader",this),this.set_segmentIdentifiers__(),this.set_renderStyle__(),this.set_voxels__(),this.updateShader()},getSegmentEnabled(e){return!(e<this._segmentEnabled.length)||this._segmentEnabled[e]},set_segmentIdentifiers__(){this.segmentIdentifiersNode=I()(m().X3DTexture3DNode,this._segmentIdentifiers)},set_renderStyle__(){const e=this.renderStyleNodes;for(const t of e)t.removeInterest("updateShader",this),t.removeVolumeData(this);e.length=0;for(const t of this._renderStyle){const n=I()(m().X3DComposableVolumeRenderStyleNode,t);n&&e.push(n)}for(const t of e)t.addInterest("updateShader",this),t.addVolumeData(this)},set_voxels__(){this.voxelsNode=I()(m().X3DTexture3DNode,this._voxels),this.getAppearance()._texture=this.voxelsNode??this.getBrowser().getDefaultVoxels()},createShader(e,t,n){const o=this.getBrowser().getDefaultVolumeStyle(),i=new Set;let r=o.getUniformsText(),s=o.getFunctionsText();if(this.segmentIdentifiersNode?(r+="\n",r+="uniform sampler3D segmentIdentifiers;\n",r+="\n",s+="\n",s+=" int segment = int (texture (segmentIdentifiers, texCoord) .r * 255.0);\n"):s+=" int segment = 0;\n",this.renderStyleNodes.length){s+="\n",s+=" switch (segment)\n",s+=" {\n";for(const[e,t]of this.renderStyleNodes.entries())t.getDefines(i),s+=" case "+e+":\n",s+=" {\n",this.getSegmentEnabled(e)?(r+=t.getUniformsText(),s+=t.getFunctionsText(),s+=" break;\n"):s+=" discard;\n",s+=" }\n";s+=" }\n"}n=n.replace("__VOLUME_STYLES_DEFINES__",Array.from(i).join("\n")).replace("__VOLUME_STYLES_UNIFORMS__",r).replace("__VOLUME_STYLES_FUNCTIONS__",s);const a=new(ve())(this.getExecutionContext());a._url.push(encodeURI("data:x-shader/x-vertex,"+t)),a.setPrivate(!0),a.setName("SegmentedVolumeDataVertexShader"),a.setOptions(e),a.setup();const d=new(ve())(this.getExecutionContext());d._type="FRAGMENT",d._url.push(encodeURI("data:x-shader/x-fragment,"+n)),d.setPrivate(!0),d.setName("SegmentedVolumeDataFragmentShader"),d.setOptions(e),d.setup();const u=new(ye())(this.getExecutionContext());u._language="GLSL",u._parts.push(a),u._parts.push(d),u.setPrivate(!0),u.setName("SegmentedVolumeDataShader"),this.segmentIdentifiersNode&&u.addUserDefinedField(m().inputOutput,"segmentIdentifiers",new(l().SFNode)(this.segmentIdentifiersNode)),o.addShaderFields(u);for(const[e,t]of this.renderStyleNodes.entries())this.getSegmentEnabled(e)&&t.addShaderFields(u);const h=[];return this.addShaderUniforms(h),u.setUniformNames(h),u.setup(),u}}),Object.defineProperties(De,{..._().getStaticProperties("SegmentedVolumeData","VolumeRendering",2,"children","3.3"),fieldDefinitions:{value:new(p())([new(h())(m().inputOutput,"metadata",new(l().SFNode)),new(h())(m().inputOutput,"dimensions",new(l().SFVec3f)(1,1,1)),new(h())(m().inputOutput,"segmentEnabled",new(l().MFBool)),new(h())(m().inputOutput,"visible",new(l().SFBool)(!0)),new(h())(m().inputOutput,"bboxDisplay",new(l().SFBool)),new(h())(m().initializeOnly,"bboxSize",new(l().SFVec3f)(-1,-1,-1)),new(h())(m().initializeOnly,"bboxCenter",new(l().SFVec3f)),new(h())(m().inputOutput,"segmentIdentifiers",new(l().SFNode)),new(h())(m().inputOutput,"renderStyle",new(l().MFNode)),new(h())(m().inputOutput,"voxels",new(l().SFNode))]),enumerable:!0}});const Te=De,Ve=N().add("SegmentedVolumeData",Te);function Pe(e){F.call(this,e),this.addType(m().ShadedVolumeStyle)}Object.assign(Object.setPrototypeOf(Pe.prototype,F.prototype),{initialize(){F.prototype.initialize.call(this),this._material.addInterest("set_material__",this),this._surfaceNormals.addInterest("set_surfaceNormals__",this),this.set_material__(),this.set_surfaceNormals__()},set_material__(){this.materialNode&&this.materialNode.removeInterest("addNodeEvent",this),this.materialNode=I()(m().X3DMaterialNode,this._material),this.materialNode&&this.materialNode.addInterest("addNodeEvent",this)},set_surfaceNormals__(){this.surfaceNormalsNode=I()(m().X3DTexture3DNode,this._surfaceNormals)},addShaderFields(e){this._enabled.getValue()&&(this.materialNode&&(e.addUserDefinedField(m().inputOutput,"ambientIntensity_"+this.getId(),this.materialNode._ambientIntensity.copy()),e.addUserDefinedField(m().inputOutput,"diffuseColor_"+this.getId(),this.materialNode._diffuseColor.copy()),e.addUserDefinedField(m().inputOutput,"specularColor_"+this.getId(),this.materialNode._specularColor.copy()),e.addUserDefinedField(m().inputOutput,"emissiveColor_"+this.getId(),this.materialNode._emissiveColor.copy()),e.addUserDefinedField(m().inputOutput,"shininess_"+this.getId(),this.materialNode._shininess.copy()),e.addUserDefinedField(m().inputOutput,"transparency_"+this.getId(),this.materialNode._transparency.copy())),this.surfaceNormalsNode&&e.addUserDefinedField(m().inputOutput,"surfaceNormals_"+this.getId(),new(l().SFNode)(this.surfaceNormalsNode)))},getDefines(e){e.add("#define X3D_SHADING")},getUniformsText(){if(!this._enabled.getValue())return"";let e="";return e+="\n",e+="// ShadedVolumeStyle\n",e+="\n",e+="uniform float ambientIntensity_"+this.getId()+";\n",e+="uniform vec3 diffuseColor_"+this.getId()+";\n",e+="uniform vec3 specularColor_"+this.getId()+";\n",e+="uniform vec3 emissiveColor_"+this.getId()+";\n",e+="uniform float shininess_"+this.getId()+";\n",e+="uniform float transparency_"+this.getId()+";\n",e+=this.getNormalText(this.surfaceNormalsNode),e+="\n",e+="vec4\n",e+="getShadedStyle_"+this.getId()+" (in vec4 originalColor, in vec3 texCoord)\n",e+="{\n",e+=" vec4 surfaceNormal = getNormal_"+this.getId()+" (texCoord);\n",e+="\n",e+=" if (surfaceNormal .w == 0.0)\n",e+=" return vec4 (0.0);\n",e+="\n",e+=" vec4 shadedColor = vec4 (0.0);\n",this._lighting.getValue()?(this.materialNode?(e+=" vec3 diffuseFactor = diffuseColor_"+this.getId()+";\n",e+=" vec3 ambientTerm = diffuseFactor * ambientIntensity_"+this.getId()+";\n",e+="\n",e+=" shadedColor .a = originalColor .a * (1.0 - transparency_"+this.getId()+");\n"):(e+=" vec3 diffuseFactor = originalColor .rgb;\n",e+=" vec3 ambientTerm = vec3 (0.0);\n",e+="\n",e+=" shadedColor .a = originalColor .a;\n"),e+="\n",e+="#if defined (X3D_LIGHTING)\n",e+=" vec3 N = surfaceNormal .xyz;\n",e+=" vec3 V = normalize (-vertex); // normalized vector from point on geometry to viewer's position\n",e+="\n",e+=" for (int i = 0; i < X3D_NUM_LIGHTS; ++ i)\n",e+=" {\n",e+=" x3d_LightSourceParameters light = x3d_LightSource [i];\n",e+="\n",e+=" vec3 vL = light .location - vertex; // Light to fragment\n",e+=" float dL = length (light .matrix * vL);\n",e+=" bool di = light .type == x3d_DirectionalLight;\n",e+="\n",e+=" if (di || dL <= light .radius)\n",e+=" {\n",e+=" vec3 d = light .direction;\n",e+=" vec3 c = light .attenuation;\n",e+=" vec3 L = di ? -d : normalize (vL); // Normalized vector from point on geometry to light source i position.\n",e+=" vec3 H = normalize (L + V); // Specular term\n",e+="\n",e+=" float lightAngle = max (dot (N, L), 0.0); // Angle between normal and light ray.\n",e+=" vec3 diffuseTerm = diffuseFactor * lightAngle;\n",e+=" float specularFactor = shininess_"+this.getId()+" > 0.0 ? pow (max (dot (N, H), 0.0), shininess_"+this.getId()+" * 128.0) : 1.0;\n",e+=" vec3 specularTerm = light .intensity * specularColor_"+this.getId()+" * specularFactor;\n",e+="\n",e+=" float attenuationFactor = di ? 1.0 : 1.0 / max (dot (c, vec3 (1.0, dL, dL * dL)), 1.0);\n",e+=" float spotFactor = light .type == x3d_SpotLight ? getSpotFactor (light .cutOffAngle, light .beamWidth, L, d) : 1.0;\n",e+=" float attenuationSpotFactor = attenuationFactor * spotFactor;\n",e+=" vec3 ambientColor = light .ambientIntensity * ambientTerm;\n",e+=" vec3 diffuseSpecularColor = light .intensity * (diffuseTerm + specularTerm);\n",e+="\n",e+=" shadedColor .rgb += attenuationSpotFactor * light .color * (ambientColor + diffuseSpecularColor);\n",e+=" }\n",e+="\n",e+=" shadedColor .rgb += emissiveColor_"+this.getId()+";\n",e+=" }\n",e+="#endif\n"):this.materialNode?(e+=" shadedColor .rgb = diffuseColor_"+this.getId()+";\n",e+=" shadedColor .a = originalColor .a * (1.0 - transparency_"+this.getId()+");\n"):e+=" shadedColor = originalColor;\n",e+="\n",e+=" return shadedColor;\n",e+="}\n",e},getFunctionsText(){if(!this._enabled.getValue())return"";let e="";return e+="\n",e+=" // ShadedVolumeStyle\n",e+="\n",e+=" textureColor = getShadedStyle_"+this.getId()+" (textureColor, texCoord);\n",e}}),Object.defineProperties(Pe,{..._().getStaticProperties("ShadedVolumeStyle","VolumeRendering",3,"renderStyle","3.3"),fieldDefinitions:{value:new(p())([new(h())(m().inputOutput,"metadata",new(l().SFNode)),new(h())(m().inputOutput,"enabled",new(l().SFBool)(!0)),new(h())(m().inputOutput,"lighting",new(l().SFBool)),new(h())(m().inputOutput,"shadows",new(l().SFBool)),new(h())(m().initializeOnly,"phaseFunction",new(l().SFString)("Henyey-Greenstein")),new(h())(m().inputOutput,"material",new(l().SFNode)),new(h())(m().inputOutput,"surfaceNormals",new(l().SFNode))]),enumerable:!0}});const Ee=Pe,Me=N().add("ShadedVolumeStyle",Ee);function Ue(e){F.call(this,e),this.addType(m().SilhouetteEnhancementVolumeStyle)}Object.assign(Object.setPrototypeOf(Ue.prototype,F.prototype),{initialize(){F.prototype.initialize.call(this),this._surfaceNormals.addInterest("set_surfaceNormals__",this),this.set_surfaceNormals__()},set_surfaceNormals__(){this.surfaceNormalsNode=I()(m().X3DTexture3DNode,this._surfaceNormals)},addShaderFields(e){this._enabled.getValue()&&(e.addUserDefinedField(m().inputOutput,"silhouetteRetainedOpacity_"+this.getId(),this._silhouetteRetainedOpacity.copy()),e.addUserDefinedField(m().inputOutput,"silhouetteBoundaryOpacity_"+this.getId(),this._silhouetteBoundaryOpacity.copy()),e.addUserDefinedField(m().inputOutput,"silhouetteSharpness_"+this.getId(),this._silhouetteSharpness.copy()),this.surfaceNormalsNode&&e.addUserDefinedField(m().inputOutput,"surfaceNormals_"+this.getId(),new(l().SFNode)(this.surfaceNormalsNode)))},getUniformsText(){if(!this._enabled.getValue())return"";let e="";return e+="\n",e+="// SilhouetteEnhancementVolumeStyle\n",e+="\n",e+="uniform float silhouetteRetainedOpacity_"+this.getId()+";\n",e+="uniform float silhouetteBoundaryOpacity_"+this.getId()+";\n",e+="uniform float silhouetteSharpness_"+this.getId()+";\n",e+=this.getNormalText(this.surfaceNormalsNode),e+="\n",e+="vec4\n",e+="getSilhouetteEnhancementStyle_"+this.getId()+" (in vec4 originalColor, in vec3 texCoord)\n",e+="{\n",e+=" vec4 surfaceNormal = getNormal_"+this.getId()+" (texCoord);\n",e+="\n",e+=" if (surfaceNormal .w == 0.0)\n",e+=" return vec4 (0.0);\n",e+=" \n",e+=" float silhouetteRetainedOpacity = silhouetteRetainedOpacity_"+this.getId()+";\n",e+=" float silhouetteBoundaryOpacity = silhouetteBoundaryOpacity_"+this.getId()+";\n",e+=" float silhouetteSharpness = silhouetteSharpness_"+this.getId()+";\n",e+="\n",e+=" return vec4 (originalColor .rgb, originalColor .a * (silhouetteRetainedOpacity + silhouetteBoundaryOpacity * pow (1.0 - abs (dot (surfaceNormal .xyz, normalize (vertex))), silhouetteSharpness)));\n",e+="}\n",e},getFunctionsText(){if(!this._enabled.getValue())return"";let e="";return e+="\n",e+=" // SilhouetteEnhancementVolumeStyle\n",e+="\n",e+=" textureColor = getSilhouetteEnhancementStyle_"+this.getId()+" (textureColor, texCoord);\n",e}}),Object.defineProperties(Ue,{..._().getStaticProperties("SilhouetteEnhancementVolumeStyle","VolumeRendering",2,"renderStyle","3.3"),fieldDefinitions:{value:new(p())([new(h())(m().inputOutput,"metadata",new(l().SFNode)),new(h())(m().inputOutput,"enabled",new(l().SFBool)(!0)),new(h())(m().inputOutput,"silhouetteRetainedOpacity",new(l().SFFloat)(1)),new(h())(m().inputOutput,"silhouetteBoundaryOpacity",new(l().SFFloat)),new(h())(m().inputOutput,"silhouetteSharpness",new(l().SFFloat)(.5)),new(h())(m().inputOutput,"surfaceNormals",new(l().SFNode))]),enumerable:!0}});const Le=Ue,Ae=N().add("SilhouetteEnhancementVolumeStyle",Le);function Be(e){F.call(this,e),this.addType(m().ToneMappedVolumeStyle)}Object.assign(Object.setPrototypeOf(Be.prototype,F.prototype),{initialize(){F.prototype.initialize.call(this),this._surfaceNormals.addInterest("set_surfaceNormals__",this),this.set_surfaceNormals__()},set_surfaceNormals__(){this.surfaceNormalsNode=I()(m().X3DTexture3DNode,this._surfaceNormals)},addShaderFields(e){this._enabled.getValue()&&(e.addUserDefinedField(m().inputOutput,"coolColor_"+this.getId(),this._coolColor.copy()),e.addUserDefinedField(m().inputOutput,"warmColor_"+this.getId(),this._warmColor.copy()),this.surfaceNormalsNode&&e.addUserDefinedField(m().inputOutput,"surfaceNormals_"+this.getId(),new(l().SFNode)(this.surfaceNormalsNode)))},getUniformsText(){if(!this._enabled.getValue())return"";let e="";return e+="\n",e+="// ToneMappedVolumeStyle\n",e+="\n",e+="uniform vec4 coolColor_"+this.getId()+";\n",e+="uniform vec4 warmColor_"+this.getId()+";\n",e+=this.getNormalText(this.surfaceNormalsNode),e+="\n",e+="vec4\n",e+="getToneMappedStyle_"+this.getId()+" (in vec4 originalColor, in vec3 texCoord)\n",e+="{\n",e+=" vec4 surfaceNormal = getNormal_"+this.getId()+" (texCoord);\n",e+="\n",e+=" if (surfaceNormal .w == 0.0)\n",e+=" return vec4 (0.0);\n",e+="\n",e+=" vec3 toneColor = vec3 (0.0);\n",e+=" vec3 coolColor = coolColor_"+this.getId()+" .rgb;\n",e+=" vec3 warmColor = warmColor_"+this.getId()+" .rgb;\n",e+="\n",e+="#if defined (X3D_LIGHTING)\n",e+=" for (int i = 0; i < X3D_NUM_LIGHTS; ++ i)\n",e+=" {\n",e+=" x3d_LightSourceParameters light = x3d_LightSource [i];\n",e+="\n",e+=" vec3 L = light .type == x3d_DirectionalLight ? -light .direction : normalize (light .location - vertex);\n",e+=" float colorFactor = dot (L, surfaceNormal .xyz) * 0.5 + 0.5;\n",e+="\n",e+=" toneColor += mix (warmColor .rgb, coolColor .rgb, colorFactor);\n",e+=" }\n",e+="#endif\n",e+="\n",e+=" return vec4 (toneColor, originalColor .a);\n",e+="}\n",e},getFunctionsText(){if(!this._enabled.getValue())return"";let e="";return e+="\n",e+=" // ToneMappedVolumeStyle\n",e+="\n",e+=" textureColor = getToneMappedStyle_"+this.getId()+" (textureColor, texCoord);\n",e}}),Object.defineProperties(Be,{..._().getStaticProperties("ToneMappedVolumeStyle","VolumeRendering",2,"renderStyle","3.3"),fieldDefinitions:{value:new(p())([new(h())(m().inputOutput,"metadata",new(l().SFNode)),new(h())(m().inputOutput,"enabled",new(l().SFBool)(!0)),new(h())(m().inputOutput,"coolColor",new(l().SFColorRGBA)(0,0,1,0)),new(h())(m().inputOutput,"warmColor",new(l().SFColorRGBA)(1,1,0,0)),new(h())(m().inputOutput,"surfaceNormals",new(l().SFNode))]),enumerable:!0}});const je=Be,Re=N().add("ToneMappedVolumeStyle",je);function ze(e){Se.call(this,e),this.addType(m().VolumeData)}Object.assign(Object.setPrototypeOf(ze.prototype,Se.prototype),{initialize(){Se.prototype.initialize.call(this),this._renderStyle.addInterest("set_renderStyle__",this),this._voxels.addInterest("set_voxels__",this),this._renderStyle.addInterest("updateShader",this),this.set_renderStyle__(),this.set_voxels__(),this.updateShader()},set_renderStyle__(){this.renderStyleNode&&(this.renderStyleNode.removeInterest("updateShader",this),this.renderStyleNode.removeVolumeData(this)),this.renderStyleNode=I()(m().X3DVolumeRenderStyleNode,this._renderStyle),this.renderStyleNode&&(this.renderStyleNode.addInterest("updateShader",this),this.renderStyleNode.addVolumeData(this))},set_voxels__(){this.voxelsNode=I()(m().X3DTexture3DNode,this._voxels),this.getAppearance()._texture=this.voxelsNode??this.getBrowser().getDefaultVoxels()},createShader(e,t,n){const o=this.getBrowser().getDefaultVolumeStyle(),i=new Set;o.getDefines(i);let r=o.getUniformsText(),s=o.getFunctionsText();this.renderStyleNode&&(this.renderStyleNode.getDefines(i),r+=this.renderStyleNode.getUniformsText(),s+=this.renderStyleNode.getFunctionsText()),n=n.replace("__VOLUME_STYLES_DEFINES__",Array.from(i).join("\n")).replace("__VOLUME_STYLES_UNIFORMS__",r).replace("__VOLUME_STYLES_FUNCTIONS__",s);const a=new(ve())(this.getExecutionContext());a._url.push(encodeURI("data:x-shader/x-vertex,"+t)),a.setPrivate(!0),a.setName("VolumeDataVertexShader"),a.setOptions(e),a.setup();const d=new(ve())(this.getExecutionContext());d._type="FRAGMENT",d._url.push(encodeURI("data:x-shader/x-fragment,"+n)),d.setPrivate(!0),d.setName("VolumeDataFragmentShader"),d.setOptions(e),d.setup();const l=new(ye())(this.getExecutionContext());l._language="GLSL",l._parts.push(a),l._parts.push(d),l.setPrivate(!0),l.setName("VolumeDataShader"),o.addShaderFields(l),this.renderStyleNode?.addShaderFields(l);const u=[];return this.addShaderUniforms(u),l.setUniformNames(u),l.setup(),l}}),Object.defineProperties(ze,{..._().getStaticProperties("VolumeData","VolumeRendering",1,"children","3.3"),fieldDefinitions:{value:new(p())([new(h())(m().inputOutput,"metadata",new(l().SFNode)),new(h())(m().inputOutput,"dimensions",new(l().SFVec3f)(1,1,1)),new(h())(m().inputOutput,"visible",new(l().SFBool)(!0)),new(h())(m().inputOutput,"bboxDisplay",new(l().SFBool)),new(h())(m().initializeOnly,"bboxSize",new(l().SFVec3f)(-1,-1,-1)),new(h())(m().initializeOnly,"bboxCenter",new(l().SFVec3f)),new(h())(m().inputOutput,"renderStyle",new(l().SFNode)),new(h())(m().inputOutput,"voxels",new(l().SFNode))]),enumerable:!0}});const Xe=ze,Ge=N().add("VolumeData",Xe);o().add({name:"VolumeRendering",concreteNodes:[R,G,Q,q,J,Fe,T,be,Ve,Me,Ae,Re,Ge],abstractNodes:[F,Se,v],browserContext:A});N().add("VolumeRenderingComponent",void 0)})();
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* X_ITE v16.0.
|
|
1
|
+
/* X_ITE v16.0.3 */
|
|
2
2
|
const e=window[Symbol.for("X_ITE.X3D")];(()=>{const t={n:e=>{const i=e&&e.__esModule?()=>e.default:()=>e;return t.d(i,{a:i}),i},d:(e,i)=>{if(Array.isArray(i))for(var s=0;s<i.length;){var r=i[s++],n=i[s++];t.o(e,r)?0===n&&s++:0===n?Object.defineProperty(e,r,{enumerable:!0,value:i[s++]}):Object.defineProperty(e,r,{enumerable:!0,get:n})}else for(var r in i)t.o(i,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:i[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},i=e.Components;var s=t.n(i);const r=e.ScreenLine;var n=t.n(r);const a=e.GeometryContext;var o=t.n(a);const c=e.AlphaMode;var h=t.n(c);const d=e.VertexArray;var l=t.n(d);const u=e.Layer;var p=t.n(u);const x=e.Matrix4;var m=t.n(x);const f=e.Namespace;var g=t.n(f);function b(e){const t=e.getContext();this.browser=e,this.vertexArrayObject=new(l())(t),this.circleVertexBuffer=t.createBuffer(),this.circleGeometryContext=new(o())({renderObject:new(p())(e.getPrivateScene()),alphaMode:h().BLEND,geometryType:1}),this.circleGeometryContext.renderObject.setup();const i=e.getCircle2DOptions().getGeometry().getVertices();this.circleNumVertices=i.length/4,t.bindBuffer(t.ARRAY_BUFFER,this.circleVertexBuffer),t.bufferData(t.ARRAY_BUFFER,i.getValue(),t.STATIC_DRAW),this.diskVertexBuffer=t.createBuffer(),this.diskGeometryContext=new(o())({renderObject:this.circleGeometryContext.renderObject,alphaMode:h().BLEND,geometryType:3});const s=e.getDisk2DOptions().getDiskVertices();this.diskNumVertices=s.length/4,t.bindBuffer(t.ARRAY_BUFFER,this.diskVertexBuffer),t.bufferData(t.ARRAY_BUFFER,s.getValue(),t.STATIC_DRAW)}Object.assign(b.prototype,{display:(()=>{const e=new Float32Array(m().IDENTITY),t=new Float32Array(m().IDENTITY),i=new Float32Array(m().IDENTITY),s=new(m()),r=[];return function(n,a,o,c,h,d,l){const u=this.browser,p=u.getContext(),x=u.getViewport();l.bind(),p.viewport(...x),p.scissor(...x),p.blendFuncSeparate(p.SRC_ALPHA,p.ONE_MINUS_SRC_ALPHA,p.ONE,p.ONE_MINUS_SRC_ALPHA);const m=n*Math.abs(h.origin.z),f=h.xAxis.normalize().multiply(m),g=h.yAxis.normalize().multiply(m),b=h.zAxis.normalize().multiply(m);s.set(...f,0,...g,0,...b,0,...h.origin,1),e.set(d),t.set(s),p.depthMask(!1),p.disable(p.DEPTH_TEST),p.enable(p.BLEND),p.disable(p.CULL_FACE);{const s=u.getDefaultMaterial().getShader(this.circleGeometryContext);s.enable(p),s.setClipPlanes(p,r),p.uniformMatrix4fv(s.x3d_ProjectionMatrix,!1,e),p.uniformMatrix4fv(s.x3d_ModelViewMatrix,!1,t),p.uniformMatrix4fv(s.x3d_EyeMatrix,!1,i),p.uniform3f(s.x3d_EmissiveColor,0,0,0),p.uniform1f(s.x3d_Transparency,c),this.vertexArrayObject.enable(s.getProgram())&&s.enableVertexAttribute(p,this.circleVertexBuffer,0,0),p.drawArrays(p.LINES,0,this.circleNumVertices)}{const s=u.getDefaultMaterial().getShader(this.diskGeometryContext);s.enable(p),s.setClipPlanes(p,r),p.uniformMatrix4fv(s.x3d_ProjectionMatrix,!1,e),p.uniformMatrix4fv(s.x3d_ModelViewMatrix,!1,t),p.uniformMatrix4fv(s.x3d_EyeMatrix,!1,i),p.uniform3f(s.x3d_EmissiveColor,...a),p.uniform1f(s.x3d_Transparency,o),this.vertexArrayObject.enable(s.getProgram())&&s.enableVertexAttribute(p,this.diskVertexBuffer,0,0),p.drawArrays(p.TRIANGLES,0,this.diskNumVertices)}p.depthMask(!0),p.enable(p.DEPTH_TEST),p.disable(p.BLEND)}})(),dispose(){const e=this.browser.getContext();e.deleteBuffer(this.diskVertexBuffer),this.diskVertexArrayObject.dispose(e)}});const w=b,v=g().add("ScreenPoint",w),y=e.ViewVolume;var S=t.n(y);const M=e.Color3;var R=t.n(M);const V=e.Vector3;var A=t.n(V);const P=e.Rotation4;var E=t.n(P);const C=e.Lock;var _=t.n(C);const j=e.gettext;var N=t.n(j);const O=e.ExamineViewer;var B=t.n(O);Object.assign(B().prototype,{gamepads(e){const t=e.find(({axes:e})=>e[2]||e[3]);if(!t)return void(e.action&&(e.action=!1,this.disconnect()));const i=t.buttons[0].pressed,s=t.buttons[1].pressed;e.button0===i&&e.button1===s||(e.button0=i,e.button1=s,this.disconnect());const r=60/this.getBrowser().currentFrameRate;e.action=!0,i?this.zoom(.005*t.axes[3]*r,Math.sign(t.axes[3])):s?(this.startPan(0,0),this.pan(5*-t.axes[2]*r,5*t.axes[3]*r)):(this.startRotate(0,0,1),this.rotate(10*-t.axes[2]*r,10*t.axes[3]*r))}});const D=e.X3DFlyViewer;var F=t.n(D);const L=new(A())(300);Object.assign(F().prototype,{gamepads:(()=>{const e=new(A());return function(t){const i=t.find(({axes:e})=>e[2]||e[3]);if(!i)return void(this.startTime=Date.now());const s=i.buttons[0].pressed;i.buttons[1].pressed?(e.set(i.axes[2],-i.axes[3],0).multVec(L),this.direction.add(e).divide(2),this.pan()):(e.set(i.axes[2],0,i.axes[3]).multVec(L).multiply(s?2:1),this.direction.add(e).divide(2),this.fly())}})()});const U=e.X3DViewer;var T=t.n(U);Object.assign(T().prototype,{gamepads(){}});const I=Symbol(),k=Symbol(),X=Symbol(),H=Symbol(),G=Symbol(),z=Symbol(),W=Symbol(),Y=Symbol(),q=Symbol(),Z=Symbol(),J=Symbol();function K(){this[Z]=[]}Object.assign(K.prototype,{getPose(){return this[G]},xrAddButton(){this[I]=(()=>{const e=document.createElement("div"),t=()=>{this.startAudioElements(),this.getSession()===window?this.xrStartSession():this.xrStopSession()};return e.classList.add("x_ite-private-xr-button","x_ite-private-button"),e.part?.add("xr-button"),e.title=N()("Start WebXR session."),e.onmouseup=t,e.ontouchend=t,this.getSurface().querySelector(".x_ite-private-buttons").append(e),e})()},async xrStartSession(){return _().acquire(k,async()=>{if(this.getSession()!==window)return;const e=this.getContext(),t=this.getBrowserOption("XRSessionMode").toLowerCase().replaceAll("_","-"),i=await navigator.xr.requestSession(t),s=await i.requestReferenceSpace("local");await e.makeXRCompatible(),this.finishedEvents().addInterest("xrUpdatePointers",this),i.addEventListener("visibilitychange",()=>this.xrUpdateVisibility()),i.addEventListener("inputsourceschange",e=>this.xrUpdateInputSources(e)),i.addEventListener("end",()=>this.xrStopSession()),this[X]=s,this[z]=!0,this[W]=new Set,this[Y]=new(n())(this,4,2,.9),this[q]=new v(this),Object.assign(this[Z],{action:!0}),this[G]={cameraSpaceMatrix:new(m()),viewMatrix:new(m()),views:[]},this.xrUpdateBaseLayer({},i),this.setSession(i),this.removeHit(this.getHit()),this.getBrowserOptions().checkUpdate(),this.getRenderingProperties()._ContentScale.addInterest("xrContentScale",this),this.getRenderingProperties()._XRSession=!0,this[I].title=N()("Stop WebXR session.")})},xrStopSession(){return _().acquire(k,async()=>{if(this.getSession()!==window){await this.getSession().end().catch(Function.prototype),this.finishedEvents().removeInterest("xrUpdatePointers",this),this.setSession(window),this.setDefaultFramebuffer(null);for(const{hit:e}of this[W])this.removeHit(e);this[X]=null,this[H]=null,this[G]=null,this[z]=!1,this[W]=null,this[Y]=null,this[q]=null,this[J]=null,this.getBrowserOptions().checkUpdate(),this.getRenderingProperties()._ContentScale.removeInterest("xrContentScale",this),this.getRenderingProperties()._XRSession=!1,this[I].title=N()("Start WebXR session.")}})},xrContentScale(){this.xrUpdateBaseLayer()},xrUpdateBaseLayer(e={},t=this.getSession()){if(t===window)return;const i=new XRWebGLLayer(t,this.getContext(),Object.assign({antialias:!1,alpha:!0,depth:!1,ignoreDepthValues:!0,framebufferScaleFactor:this.getRenderingProperty("ContentScale")},e));this[H]=i,t.updateRenderState({baseLayer:i}),this.setDefaultFramebuffer(i.framebuffer)},xrUpdateNearFarPlanes:(()=>{const e={};return function(){const t=this.getActiveNavigationInfo(),i=this.getActiveViewpoint();i?(e.depthNear=i.getNearDistance(t),e.depthFar=i.getFarDistance(t)):(e.depthNear=.1,e.depthFar=1e4),this.getSession().updateRenderState(e)}})(),xrUpdateVisibility(){switch(this.getSession().visibilityState){case"visible-blurred":case"hidden":this[z]=!1;break;default:this[z]=!0}},xrUpdateInputSources(e){for(const t of e.added)this[W].add(Object.assign(t,{active:!1,matrix:new(m()),inverse:new(m()),hit:Object.assign(this.getHit().copy(),{button:!1,pressed:!1,pulse:!0,poseViewMatrix:new(m()),originalPoint:new(A()),originalNormal:new(A())})})),t.gamepad&&(t.gamepad.hit=t.hit);for(const t of e.removed)this.removeHit(t.hit),this[W].delete(t);this.xrUpdateGamepads()},xrUpdateGamepads(){this[Z].length=0;for(const{gamepad:e}of this[W])e&&(e.axes.length<4||this[Z].push(e))},xrFrame(e){e&&(this[J]=e,this.xrUpdateNearFarPlanes(),this.getViewer().gamepads(this[Z]),this.xrUpdatePose(),this.addBrowserEvent())},xrUpdatePose(){const e=this[J].getViewerPose(this[X]),t=this[G];t.cameraSpaceMatrix.assign(e.transform.matrix),t.viewMatrix.assign(e.transform.inverse.matrix);let i=0;for(const s of e.views){const{x:e,y:r,width:n,height:a}=this[H].getViewport(s);if(!n)continue;this.reshapeFramebuffer(i,e,r,n,a);const o=t.views[i]??={projectionMatrix:new(m()),cameraSpaceMatrix:new(m()),viewMatrix:new(m()),matrix:new(m()),inverse:new(m())};o.projectionMatrix.assign(s.projectionMatrix),o.cameraSpaceMatrix.assign(s.transform.matrix),o.viewMatrix.assign(s.transform.inverse.matrix),o.matrix.assign(t.cameraSpaceMatrix).multRight(o.viewMatrix),o.inverse.assign(o.cameraSpaceMatrix).multRight(t.viewMatrix),++i}this.getFramebuffers().length=i,t.views.length=i},xrUpdatePointers:(()=>{const e=new(R())(.5,.75,1),t=new(m()),i=new(A())(0,0,-.5),s=new(A()),r=new(A()),n=new(A()),a=new(E());return function(){const o=this.getViewport().getValue(),c=this[G];for(const e of this[W]){const{targetRaySpace:t,matrix:i,inverse:s}=e,r=this[J].getPose(t,this[X]);e.active=!!r,r&&(i.assign(r.transform.matrix),s.assign(r.transform.inverse.matrix))}for(const e of this[W]){const{active:i,gamepad:s,matrix:r,hit:n}=e;if(!i)continue;if(this.touch(o[2]/2,o[3]/2,n,e),this.xrSensorHitPulse(n,s),!n.id)continue;const a=c.views[0].projectionMatrix;n.pressed||n.poseViewMatrix.assign(c.viewMatrix),t.assign(r).multRight(n.poseViewMatrix);for(const e of n.sensors.values())e.projectionMatrix.assign(a),e.modelViewMatrix.multRight(t);S().projectPoint(n.point,t,a,o,n.pointer),n.originalPoint.assign(n.point),n.originalNormal.assign(n.normal),n.ray.multLineMatrix(t),t.multVecMatrix(n.point),t.submatrix.inverse().multMatrixVec(n.normal)}for(const{active:e,gamepad:t,hit:i}of this[W]){if(!e)continue;const s=t?.buttons[0];s?.pressed?i.button||(i.button=!0,i.pressed||=this.buttonPressEvent(0,0,i)):(i.button=!1,i.pressed&&(i.pressed=!1,this.buttonReleaseEvent(i))),this.motionNotifyEvent(0,0,i)}if(this[z])for(const[h,{viewMatrix:d,projectionMatrix:l}]of c.views.entries()){const c=this.getFramebuffers()[h];if(c)for(const{active:h,gamepad:u,matrix:p,hit:x}of this[W]){if(!h)continue;const m=u?.buttons.some(e=>e.pressed),f=m?e:R().WHITE;if(t.assign(p).multRight(d),t.multVecMatrix(s.assign(A().ZERO)),t.multVecMatrix(r.assign(i)),t.multVecMatrix(n.assign(x.originalPoint)),x.id&&n.distance(s)<r.distance(s)&&r.assign(n),s.z>0||r.z>0)continue;if(S().projectPointMatrix(s,l,o,s),S().projectPointMatrix(r,l,o,r),s.z=0,r.z=0,this[Y].setColor(f).display(s,r,c),!x.id)continue;const g=m?.005:.007;t.assign(p).multRight(d).translate(x.originalPoint).rotate(a.setVectors(A().Z_AXIS,x.originalNormal)),this[q].display(g,f,.3,.8,t,l,c)}}}})(),xrSensorHitPulse(e,t){e.sensors.size?e.pulse&&(t?.hapticActuators?.[0]?.pulse(.25,10),e.pulse=!1):e.pulse=!0}});const Q=K,$=g().add("X3DWebXRContext",Q);s().add({name:"WebXR",concreteNodes:[],abstractNodes:[],browserContext:$});g().add("WebXRComponent",void 0)})();
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* X_ITE v16.0.
|
|
1
|
+
/* X_ITE v16.0.3 */
|
|
2
2
|
const e=window[Symbol.for("X_ITE.X3D")];(()=>{const t={n:e=>{const s=e&&e.__esModule?()=>e.default:()=>e;return t.d(s,{a:s}),s},d:(e,s)=>{if(Array.isArray(s))for(var i=0;i<s.length;){var n=s[i++],r=s[i++];t.o(e,n)?0===r&&i++:0===r?Object.defineProperty(e,n,{enumerable:!0,value:s[i++]}):Object.defineProperty(e,n,{enumerable:!0,get:r})}else for(var n in s)t.o(s,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:s[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},s=e.Components;var i=t.n(s);const n=e.TextureBuffer;var r=t.n(n);const o=e.Namespace;var a=t.n(o);const u=Symbol(),l=Symbol();function c(){}Object.assign(c.prototype,{initialize(){this.addTextureBuffer(u),this.addTextureBuffer(l)},getTransmissionBuffer(){return this[u]??=new(r())({browser:this,width:this._viewport[2],height:this._viewport[3],mipMaps:!0})},getVolumeScatterBuffer(){return this[l]??=new(r())({browser:this,width:this._viewport[2],height:this._viewport[3],float:!0})}});const d=c,_=a().add("X3DX_ITEContext",d),h=e.Fields;var p=t.n(h);const T=e.X3DFieldDefinition;var f=t.n(T);const S=e.FieldDefinitionArray;var x=t.n(S);const m=e.X3DNode;var g=t.n(m);const E=e.X3DConstants;var I=t.n(E);const O=e.BitSet;var N=t.n(O);function A(e){g().call(this,e),this.addType(I().X3DMaterialExtensionNode),this.addChildObjects(I().outputOnly,"renderedTextures",new(p().SFTime)),this.textureBits=new(N()),this.textureNodes=[]}Object.assign(Object.setPrototypeOf(A.prototype,g().prototype),{addTexture(e,t){this.textureNodes[e]=t,this._renderedTextures=this.getBrowser().getCurrentTime(),e*=4,this.textureBits.remove(e,15),this.textureBits.add(e,t?.getTextureBits()??0)},getTextureBits(){return this.textureBits},getRenderedTextures(e){for(const t of this.textureNodes)t?.getRenderedTextures(e)}}),Object.defineProperties(A,g().getStaticProperties("X3DMaterialExtensionNode","X_ITE",1));const C=A,R=a().add("X3DMaterialExtensionNode",C),M=e.X3DCast;var X=t.n(M);let y=0;const w={add(e){this[e]=y++}},v=a().add("ExtensionKeys",w),F=e.Algorithm;var D=t.n(F);const L=e.MaterialTextures;var b=t.n(L);function U(e){R.call(this,e),this.addType(I().AnisotropyMaterialExtension),this._anisotropyRotation.setUnit("angle"),this.anisotropyArray=new Float32Array(3)}v.add("ANISOTROPY_MATERIAL_EXTENSION"),b().add("x3d_AnisotropyTextureEXT"),Object.assign(Object.setPrototypeOf(U.prototype,R.prototype),{initialize(){R.prototype.initialize.call(this),this._anisotropyStrength.addInterest("set_anisotropyStrength__",this),this._anisotropyRotation.addInterest("set_anisotropyRotation__",this),this._anisotropyTexture.addInterest("set_anisotropyTexture__",this),this.set_anisotropyStrength__(),this.set_anisotropyRotation__(),this.set_anisotropyTexture__()},set_anisotropyStrength__(){this.anisotropyArray[2]=D().clamp(this._anisotropyStrength.getValue(),0,1)},set_anisotropyRotation__(){const e=this._anisotropyRotation.getValue();this.anisotropyArray[0]=Math.cos(e),this.anisotropyArray[1]=Math.sin(e)},set_anisotropyTexture__(){this.anisotropyTextureNode=X()(I().X3DSingleTextureNode,this._anisotropyTexture),this.addTexture(0,this.anisotropyTextureNode)},getExtensionKey:()=>v.ANISOTROPY_MATERIAL_EXTENSION,getShaderOptions(e){e.push("X3D_ANISOTROPY_MATERIAL_EXT"),+this.getTextureBits()&&(e.push("X3D_MATERIAL_TEXTURES"),this.anisotropyTextureNode?.getShaderOptions(e,"ANISOTROPY",!0))},getShaderUniforms(e){e.push("x3d_AnisotropyEXT")},setShaderUniforms(e,t,s,i){e.uniform3fv(t.x3d_AnisotropyEXT,this.anisotropyArray),this.anisotropyTextureNode?.setNamedShaderUniforms(e,t.x3d_AnisotropyTextureEXT,this._anisotropyTextureMapping.getValue(),s,i)}}),Object.defineProperties(U,{...g().getStaticProperties("AnisotropyMaterialExtension","X_ITE",1,"extensions","4.0"),fieldDefinitions:{value:new(x())([new(f())(I().inputOutput,"metadata",new(p().SFNode)),new(f())(I().inputOutput,"anisotropyStrength",new(p().SFFloat)),new(f())(I().inputOutput,"anisotropyRotation",new(p().SFFloat)),new(f())(I().inputOutput,"anisotropyTextureMapping",new(p().SFString)),new(f())(I().inputOutput,"anisotropyTexture",new(p().SFNode))]),enumerable:!0}});const P=U,V=a().add("AnisotropyMaterialExtension",P),B=e.X3DAppearanceChildNode;var k=t.n(B);function G(e){k().call(this,e),this.addType(I().BlendMode),this.factorTypes=new Map,this.equationTypes=new Map}Object.assign(Object.setPrototypeOf(G.prototype,k().prototype),{initialize(){k().prototype.initialize.call(this);const e=this.getBrowser().getContext(),t=e.getExtension("EXT_blend_minmax");this.factorTypes.set("ZERO",e.ZERO),this.factorTypes.set("ONE",e.ONE),this.factorTypes.set("SRC_COLOR",e.SRC_COLOR),this.factorTypes.set("ONE_MINUS_SRC_COLOR",e.ONE_MINUS_SRC_COLOR),this.factorTypes.set("DST_COLOR",e.DST_COLOR),this.factorTypes.set("ONE_MINUS_DST_COLOR",e.ONE_MINUS_DST_COLOR),this.factorTypes.set("SRC_ALPHA",e.SRC_ALPHA),this.factorTypes.set("ONE_MINUS_SRC_ALPHA",e.ONE_MINUS_SRC_ALPHA),this.factorTypes.set("DST_ALPHA",e.DST_ALPHA),this.factorTypes.set("ONE_MINUS_DST_ALPHA",e.ONE_MINUS_DST_ALPHA),this.factorTypes.set("SRC_ALPHA_SATURATE",e.SRC_ALPHA_SATURATE),this.factorTypes.set("CONSTANT_COLOR",e.CONSTANT_COLOR),this.factorTypes.set("ONE_MINUS_CONSTANT_COLOR",e.ONE_MINUS_CONSTANT_COLOR),this.factorTypes.set("CONSTANT_ALPHA",e.CONSTANT_ALPHA),this.factorTypes.set("ONE_MINUS_CONSTANT_ALPHA",e.ONE_MINUS_CONSTANT_ALPHA),this.equationTypes.set("FUNC_ADD",e.FUNC_ADD),this.equationTypes.set("FUNC_SUBTRACT",e.FUNC_SUBTRACT),this.equationTypes.set("FUNC_REVERSE_SUBTRACT",e.FUNC_REVERSE_SUBTRACT),this.equationTypes.set("MIN",e.MIN??t?.MIN_EXT),this.equationTypes.set("MAX",e.MAX??t?.MAX_EXT),this._sourceColorFactor.addInterest("set_sourceColorFactor__",this),this._sourceAlphaFactor.addInterest("set_sourceAlphaFactor__",this),this._destinationColorFactor.addInterest("set_destinationColorFactor__",this),this._destinationAlphaFactor.addInterest("set_destinationAlphaFactor__",this),this._colorEquation.addInterest("set_colorEquation__",this),this._alphaEquation.addInterest("set_alphaEquation__",this),this.set_sourceColorFactor__(),this.set_sourceAlphaFactor__(),this.set_destinationColorFactor__(),this.set_destinationAlphaFactor__(),this.set_colorEquation__(),this.set_alphaEquation__()},set_sourceColorFactor__(){this.sourceColorFactorType=this.factorTypes.get(this._sourceColorFactor.getValue())??this.factorTypes.get("SRC_ALPHA")},set_sourceAlphaFactor__(){this.sourceAlphaFactorType=this.factorTypes.get(this._sourceAlphaFactor.getValue())??this.factorTypes.get("ONE")},set_destinationColorFactor__(){this.destinationColorFactorType=this.factorTypes.get(this._destinationColorFactor.getValue())??this.factorTypes.get("ONE_MINUS_SRC_ALPHA")},set_destinationAlphaFactor__(){this.destinationAlphaFactorType=this.factorTypes.get(this._destinationAlphaFactor.getValue())??this.factorTypes.get("ONE_MINUS_SRC_ALPHA")},set_colorEquation__(){this.colorEquationType=this.equationTypes.get(this._colorEquation.getValue())??this.equationTypes.get("FUNC_ADD")},set_alphaEquation__(){this.alphaEquationType=this.equationTypes.get(this._alphaEquation.getValue())??this.equationTypes.get("FUNC_ADD")},enable(e){const t=this._blendColor.getValue();e.blendColor(t.r,t.g,t.b,t.a),e.blendFuncSeparate(this.sourceColorFactorType,this.destinationColorFactorType,this.sourceAlphaFactorType,this.destinationAlphaFactorType),e.blendEquationSeparate(this.colorEquationType,this.alphaEquationType)},disable(e){e.blendFuncSeparate(e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA),e.blendEquationSeparate(e.FUNC_ADD,e.FUNC_ADD)}}),Object.defineProperties(G,{...g().getStaticProperties("BlendMode","X_ITE",1,"blendMode","3.3"),fieldDefinitions:{value:new(x())([new(f())(I().inputOutput,"metadata",new(p().SFNode)),new(f())(I().inputOutput,"blendColor",new(p().SFColorRGBA)),new(f())(I().inputOutput,"sourceColorFactor",new(p().SFString)("SRC_ALPHA")),new(f())(I().inputOutput,"sourceAlphaFactor",new(p().SFString)("ONE")),new(f())(I().inputOutput,"destinationColorFactor",new(p().SFString)("ONE_MINUS_SRC_ALPHA")),new(f())(I().inputOutput,"destinationAlphaFactor",new(p().SFString)("ONE_MINUS_SRC_ALPHA")),new(f())(I().inputOutput,"colorEquation",new(p().SFString)("FUNC_ADD")),new(f())(I().inputOutput,"alphaEquation",new(p().SFString)("FUNC_ADD"))]),enumerable:!0}});const j=G,z=a().add("BlendMode",j);function H(e){R.call(this,e),this.addType(I().ClearcoatMaterialExtension)}v.add("CLEARCOAT_MATERIAL_EXTENSION"),b().add("x3d_ClearcoatTextureEXT"),b().add("x3d_ClearcoatRoughnessTextureEXT"),b().add("x3d_ClearcoatNormalTextureEXT"),Object.assign(Object.setPrototypeOf(H.prototype,R.prototype),{initialize(){R.prototype.initialize.call(this),this._clearcoat.addInterest("set_clearcoat__",this),this._clearcoatTexture.addInterest("set_clearcoatTexture__",this),this._clearcoatRoughness.addInterest("set_clearcoatRoughness__",this),this._clearcoatRoughnessTexture.addInterest("set_clearcoatRoughnessTexture__",this),this._clearcoatNormalTexture.addInterest("set_clearcoatNormalTexture__",this),this.set_clearcoat__(),this.set_clearcoatTexture__(),this.set_clearcoatRoughness__(),this.set_clearcoatRoughnessTexture__(),this.set_clearcoatNormalTexture__()},set_clearcoat__(){this.clearcoat=D().clamp(this._clearcoat.getValue(),0,1)},set_clearcoatTexture__(){this.clearcoatTextureNode=X()(I().X3DSingleTextureNode,this._clearcoatTexture),this.addTexture(0,this.clearcoatTextureNode)},set_clearcoatRoughness__(){this.clearcoatRoughness=D().clamp(this._clearcoatRoughness.getValue(),0,1)},set_clearcoatRoughnessTexture__(){this.clearcoatRoughnessTextureNode=X()(I().X3DSingleTextureNode,this._clearcoatRoughnessTexture),this.addTexture(1,this.clearcoatRoughnessTextureNode)},set_clearcoatNormalTexture__(){this.clearcoatNormalTextureNode=X()(I().X3DSingleTextureNode,this._clearcoatNormalTexture),this.addTexture(2,this.clearcoatNormalTextureNode)},getExtensionKey:()=>v.CLEARCOAT_MATERIAL_EXTENSION,getShaderOptions(e){e.push("X3D_CLEARCOAT_MATERIAL_EXT"),+this.getTextureBits()&&(e.push("X3D_MATERIAL_TEXTURES"),this.clearcoatTextureNode?.getShaderOptions(e,"CLEARCOAT",!0),this.clearcoatRoughnessTextureNode?.getShaderOptions(e,"CLEARCOAT_ROUGHNESS",!0),this.clearcoatNormalTextureNode?.getShaderOptions(e,"CLEARCOAT_NORMAL",!0))},getShaderUniforms(e){e.push("x3d_ClearcoatEXT"),e.push("x3d_ClearcoatRoughnessEXT")},setShaderUniforms(e,t,s,i){e.uniform1f(t.x3d_ClearcoatEXT,this.clearcoat),e.uniform1f(t.x3d_ClearcoatRoughnessEXT,this.clearcoatRoughness),+this.getTextureBits()&&(this.clearcoatTextureNode?.setNamedShaderUniforms(e,t.x3d_ClearcoatTextureEXT,this._clearcoatTextureMapping.getValue(),s,i),this.clearcoatRoughnessTextureNode?.setNamedShaderUniforms(e,t.x3d_ClearcoatRoughnessTextureEXT,this._clearcoatRoughnessTextureMapping.getValue(),s,i),this.clearcoatNormalTextureNode?.setNamedShaderUniforms(e,t.x3d_ClearcoatNormalTextureEXT,this._clearcoatNormalTextureMapping.getValue(),s,i))}}),Object.defineProperties(H,{...g().getStaticProperties("ClearcoatMaterialExtension","X_ITE",1,"extensions","4.0"),fieldDefinitions:{value:new(x())([new(f())(I().inputOutput,"metadata",new(p().SFNode)),new(f())(I().inputOutput,"clearcoat",new(p().SFFloat)),new(f())(I().inputOutput,"clearcoatTextureMapping",new(p().SFString)),new(f())(I().inputOutput,"clearcoatTexture",new(p().SFNode)),new(f())(I().inputOutput,"clearcoatRoughness",new(p().SFFloat)),new(f())(I().inputOutput,"clearcoatRoughnessTextureMapping",new(p().SFString)),new(f())(I().inputOutput,"clearcoatRoughnessTexture",new(p().SFNode)),new(f())(I().inputOutput,"clearcoatNormalTextureMapping",new(p().SFString)),new(f())(I().inputOutput,"clearcoatNormalTexture",new(p().SFNode))]),enumerable:!0}});const q=H,Y=a().add("ClearcoatMaterialExtension",q);function K(e){k().call(this,e),this.addType(I().DepthMode),this.addAlias("depthFunc",this._depthFunction)}Object.assign(Object.setPrototypeOf(K.prototype,k().prototype),{initialize(){k().prototype.initialize.call(this),this._depthFunction.addInterest("set_depthFunction__",this),this.set_depthFunction__()},set_depthFunction__:(()=>{const e=new Map([["NEVER","NEVER"],["LESS","LESS"],["EQUAL","EQUAL"],["LESS_EQUAL","LEQUAL"],["GREATER","GREATER"],["NOT_EQUAL","NOTEQUAL"],["GREATER_EQUAL","GEQUAL"],["ALWAYS","ALWAYS"]]);return function(){const t=this.getBrowser().getContext();this.depthFunction=t[e.get(this._depthFunction.getValue())??"LEQUAL"]}})(),enable(e){this.depthTest=e.isEnabled(e.DEPTH_TEST),this.depthWriteMask=e.getParameter(e.DEPTH_WRITEMASK),e.enable(e.POLYGON_OFFSET_FILL),e.polygonOffset(...this._polygonOffset),this._depthTest.getValue()?e.enable(e.DEPTH_TEST):e.disable(e.DEPTH_TEST),e.depthFunc(this.depthFunction),e.depthRange(...this._depthRange.getValue()),e.depthMask(this._depthMask.getValue())},disable(e){e.disable(e.POLYGON_OFFSET_FILL),this.depthTest?e.enable(e.DEPTH_TEST):e.disable(e.DEPTH_TEST),e.depthFunc(e.LEQUAL),e.depthRange(0,1),e.depthMask(this.depthWriteMask)}}),Object.defineProperties(K,{...g().getStaticProperties("DepthMode","X_ITE",1,"depthMode","4.0"),fieldDefinitions:{value:new(x())([new(f())(I().inputOutput,"metadata",new(p().SFNode)),new(f())(I().inputOutput,"polygonOffset",new(p().SFVec2f)),new(f())(I().inputOutput,"depthRange",new(p().SFVec2f)(0,1)),new(f())(I().inputOutput,"depthTest",new(p().SFBool)(!0)),new(f())(I().inputOutput,"depthFunction",new(p().SFString)("LESS_EQUAL")),new(f())(I().inputOutput,"depthMask",new(p().SFBool)(!0))]),enumerable:!0}});const W=K,Q=a().add("DepthMode",W);function Z(e){R.call(this,e),this.addType(I().DiffuseTransmissionMaterialExtension),this.diffuseTransmissionColorArray=new Float32Array(3)}v.add("DIFFUSE_TRANSMISSION_MATERIAL_EXTENSION"),b().add("x3d_DiffuseTransmissionTextureEXT"),b().add("x3d_DiffuseTransmissionColorTextureEXT"),Object.assign(Object.setPrototypeOf(Z.prototype,R.prototype),{initialize(){R.prototype.initialize.call(this),this._diffuseTransmission.addInterest("set_diffuseTransmission__",this),this._diffuseTransmissionTexture.addInterest("set_diffuseTransmissionTexture__",this),this._diffuseTransmissionColor.addInterest("set_diffuseTransmissionColor__",this),this._diffuseTransmissionColorTexture.addInterest("set_diffuseTransmissionColorTexture__",this),this.set_diffuseTransmission__(),this.set_diffuseTransmissionTexture__(),this.set_diffuseTransmissionColor__(),this.set_diffuseTransmissionColorTexture__()},set_diffuseTransmission__(){this.diffuseTransmission=D().clamp(this._diffuseTransmission.getValue(),0,1)},set_diffuseTransmissionTexture__(){this.diffuseTransmissionTextureNode=X()(I().X3DSingleTextureNode,this._diffuseTransmissionTexture),this.addTexture(0,this.diffuseTransmissionTextureNode)},set_diffuseTransmissionColor__(){this.diffuseTransmissionColorArray.set(this._diffuseTransmissionColor.getValue())},set_diffuseTransmissionColorTexture__(){this.diffuseTransmissionColorTextureNode=X()(I().X3DSingleTextureNode,this._diffuseTransmissionColorTexture),this.addTexture(1,this.diffuseTransmissionColorTextureNode)},getExtensionKey:()=>v.DIFFUSE_TRANSMISSION_MATERIAL_EXTENSION,getShaderOptions(e){e.push("X3D_DIFFUSE_TRANSMISSION_MATERIAL_EXT"),+this.getTextureBits()&&(e.push("X3D_MATERIAL_TEXTURES"),this.diffuseTransmissionTextureNode?.getShaderOptions(e,"DIFFUSE_TRANSMISSION",!0),this.diffuseTransmissionColorTextureNode?.getShaderOptions(e,"DIFFUSE_TRANSMISSION_COLOR",!0))},getShaderUniforms(e){e.push("x3d_DiffuseTransmissionEXT"),e.push("x3d_DiffuseTransmissionColorEXT")},setShaderUniforms(e,t,s,i){e.uniform1f(t.x3d_DiffuseTransmissionEXT,this.diffuseTransmission),e.uniform3fv(t.x3d_DiffuseTransmissionColorEXT,this.diffuseTransmissionColorArray),+this.getTextureBits()&&(this.diffuseTransmissionTextureNode?.setNamedShaderUniforms(e,t.x3d_DiffuseTransmissionTextureEXT,this._diffuseTransmissionTextureMapping.getValue(),s,i),this.diffuseTransmissionColorTextureNode?.setNamedShaderUniforms(e,t.x3d_DiffuseTransmissionColorTextureEXT,this._diffuseTransmissionColorTextureMapping.getValue(),s,i))}}),Object.defineProperties(Z,{...g().getStaticProperties("DiffuseTransmissionMaterialExtension","X_ITE",1,"extensions","4.0"),fieldDefinitions:{value:new(x())([new(f())(I().inputOutput,"metadata",new(p().SFNode)),new(f())(I().inputOutput,"diffuseTransmission",new(p().SFFloat)),new(f())(I().inputOutput,"diffuseTransmissionTextureMapping",new(p().SFString)),new(f())(I().inputOutput,"diffuseTransmissionTexture",new(p().SFNode)),new(f())(I().inputOutput,"diffuseTransmissionColor",new(p().SFColor)(1,1,1)),new(f())(I().inputOutput,"diffuseTransmissionColorTextureMapping",new(p().SFString)),new(f())(I().inputOutput,"diffuseTransmissionColorTexture",new(p().SFNode))]),enumerable:!0}});const $=Z,J=a().add("DiffuseTransmissionMaterialExtension",$);function ee(e){R.call(this,e),this.addType(I().DispersionMaterialExtension)}v.add("DISPERSION_MATERIAL_EXTENSION"),Object.assign(Object.setPrototypeOf(ee.prototype,R.prototype),{initialize(){R.prototype.initialize.call(this),this._dispersion.addInterest("set_dispersion__",this),this.set_dispersion__()},set_dispersion__(){this.dispersion=Math.max(this._dispersion.getValue(),0)},getExtensionKey:()=>v.DISPERSION_MATERIAL_EXTENSION,getShaderOptions(e){e.push("X3D_DISPERSION_MATERIAL_EXT")},getShaderUniforms(e){e.push("x3d_DispersionEXT")},setShaderUniforms(e,t,s,i){e.uniform1f(t.x3d_DispersionEXT,this.dispersion)}}),Object.defineProperties(ee,{...g().getStaticProperties("DispersionMaterialExtension","X_ITE",1,"extensions","4.0"),fieldDefinitions:{value:new(x())([new(f())(I().inputOutput,"metadata",new(p().SFNode)),new(f())(I().inputOutput,"dispersion",new(p().SFFloat))]),enumerable:!0}});const te=ee,se=a().add("DispersionMaterialExtension",te);function ie(e){R.call(this,e),this.addType(I().EmissiveStrengthMaterialExtension)}v.add("EMISSIVE_STRENGTH_MATERIAL_EXTENSION"),Object.assign(Object.setPrototypeOf(ie.prototype,R.prototype),{initialize(){R.prototype.initialize.call(this),this._emissiveStrength.addInterest("set_emissiveStrength__",this),this.set_emissiveStrength__()},set_emissiveStrength__(){this.emissiveStrength=Math.max(this._emissiveStrength.getValue(),0)},getExtensionKey:()=>v.EMISSIVE_STRENGTH_MATERIAL_EXTENSION,getShaderOptions(e){e.push("X3D_EMISSIVE_STRENGTH_MATERIAL_EXT")},getShaderUniforms(e){e.push("x3d_EmissiveStrengthEXT")},setShaderUniforms(e,t,s,i){e.uniform1f(t.x3d_EmissiveStrengthEXT,this.emissiveStrength)}}),Object.defineProperties(ie,{...g().getStaticProperties("EmissiveStrengthMaterialExtension","X_ITE",1,"extensions","4.0"),fieldDefinitions:{value:new(x())([new(f())(I().inputOutput,"metadata",new(p().SFNode)),new(f())(I().inputOutput,"emissiveStrength",new(p().SFFloat)(1))]),enumerable:!0}});const ne=ie,re=a().add("EmissiveStrengthMaterialExtension",ne),oe=e.X3DShapeNode;var ae=t.n(oe);const ue=e.VertexArray;var le=t.n(ue);const ce=e.Matrix4;var de=t.n(ce);const _e=e.Box3;var he=t.n(_e);function pe(e){ae().call(this,e),this.addType(I().InstancedShape),this.addChildObjects(I().outputOnly,"matrices",new(p().SFTime)),this._translations.setUnit("length"),this._centers.setUnit("length"),this.numInstances=0,this.instancesStride=25*Float32Array.BYTES_PER_ELEMENT,this.matrixOffset=0,this.normalMatrixOffset=16*Float32Array.BYTES_PER_ELEMENT,this.matrices=[]}Object.assign(Object.setPrototypeOf(pe.prototype,ae().prototype),{initialize(){ae().prototype.initialize.call(this);const e=this.getBrowser().getContext();this.instances=Object.assign(e.createBuffer(),{vertexArrayObject:new(le())(e),thickLinesVertexArrayObject:new(le())(e)}),this._translations.addInterest("set_transform__",this),this._rotations.addInterest("set_transform__",this),this._scales.addInterest("set_transform__",this),this._scaleOrientations.addInterest("set_transform__",this),this._centers.addInterest("set_transform__",this),this._matrices.addInterest("set_matrices__",this),this.set_matrices__()},getShapeKey:()=>3,getNumInstances(){return this.numInstances},getInstances(){return this.instances},set_bbox__:(()=>{const e=new(he());return function(){const t=this.bbox;if(this.isDefaultBBoxSize())if(this.getGeometry()){t.set();const s=this.getGeometry().getBBox();for(const i of this.matrices)t.add(e.assign(s).multRight(i))}else t.set();else t.set(this._bboxSize.getValue(),this._bboxCenter.getValue());this.getBBoxSize().assign(t.size),this.getBBoxCenter().assign(t.center)}})(),set_transform__(){this._matrices=this.getBrowser().getCurrentTime()},set_matrices__(){const e=this.getBrowser().getContext(),t=this._translations,s=this._rotations,i=this._scales,n=this._scaleOrientations,r=this._centers,o=t.length,a=s.length,u=i.length,l=n.length,c=r.length,d=Math.max(o,a,u,l,c),_=this.instancesStride/Float32Array.BYTES_PER_ELEMENT,h=new Float32Array(_*d);this.numInstances=d;for(let e=0,p=0;e<d;++e,p+=_){const d=this.matrices[e]??=new(de());d.setTransform(t[Math.min(e,o-1)]?.getValue(),s[Math.min(e,a-1)]?.getValue(),i[Math.min(e,u-1)]?.getValue(),n[Math.min(e,l-1)]?.getValue(),r[Math.min(e,c-1)]?.getValue()),h.set(d,p),h.set(d.submatrix.transpose().inverse(),p+16)}this.matrices.length=d,e.bindBuffer(e.ARRAY_BUFFER,this.instances),e.bufferData(e.ARRAY_BUFFER,h,e.DYNAMIC_DRAW),this.set_bbox__(),this.set_objects__()},displaySimple(e,t,s){this.getGeometry().displaySimpleInstanced(e,s,this)},display(e,t){this.getGeometry().displayInstanced(e,t,this)}}),Object.defineProperties(pe,{...g().getStaticProperties("InstancedShape","X_ITE",1,"children","4.0"),fieldDefinitions:{value:new(x())([new(f())(I().inputOutput,"metadata",new(p().SFNode)),new(f())(I().inputOutput,"translations",new(p().MFVec3f)),new(f())(I().inputOutput,"rotations",new(p().MFRotation)),new(f())(I().inputOutput,"scales",new(p().MFVec3f)),new(f())(I().inputOutput,"scaleOrientations",new(p().MFRotation)),new(f())(I().inputOutput,"centers",new(p().MFVec3f)),new(f())(I().inputOutput,"pointerEvents",new(p().SFBool)(!0)),new(f())(I().inputOutput,"castShadow",new(p().SFBool)(!0)),new(f())(I().inputOutput,"visible",new(p().SFBool)(!0)),new(f())(I().inputOutput,"bboxDisplay",new(p().SFBool)),new(f())(I().initializeOnly,"bboxSize",new(p().SFVec3f)(-1,-1,-1)),new(f())(I().initializeOnly,"bboxCenter",new(p().SFVec3f)),new(f())(I().inputOutput,"appearance",new(p().SFNode)),new(f())(I().inputOutput,"geometry",new(p().SFNode))]),enumerable:!0}});const Te=pe,fe=a().add("InstancedShape",Te);function Se(e){R.call(this,e),this.addType(I().IORMaterialExtension)}v.add("IOR_MATERIAL_EXTENSION"),Object.assign(Object.setPrototypeOf(Se.prototype,R.prototype),{initialize(){R.prototype.initialize.call(this),this._indexOfRefraction.addInterest("set_indexOfRefraction__",this),this.set_indexOfRefraction__()},set_indexOfRefraction__(){this.indexOfRefraction=Math.max(this._indexOfRefraction.getValue(),1)},getExtensionKey:()=>v.IOR_MATERIAL_EXTENSION,getShaderOptions(e){e.push("X3D_IOR_MATERIAL_EXT")},getShaderUniforms(e){e.push("x3d_IorEXT")},setShaderUniforms(e,t,s,i){e.uniform1f(t.x3d_IorEXT,this.indexOfRefraction)}}),Object.defineProperties(Se,{...g().getStaticProperties("IORMaterialExtension","X_ITE",1,"extensions","4.0"),fieldDefinitions:{value:new(x())([new(f())(I().inputOutput,"metadata",new(p().SFNode)),new(f())(I().inputOutput,"indexOfRefraction",new(p().SFFloat)(1.5))]),enumerable:!0}});const xe=Se,me=a().add("IORMaterialExtension",xe),ge=e.ShaderRegistry;var Ee=t.n(ge);const Ie=a().add("Iridescence2.glsl",()=>"\n#if defined(X3D_IRIDESCENCE_MATERIAL_EXT)\nconst mat3 XYZ_TO_REC709=mat3(3.2404542,-.9692660,.0556434,-1.5371385,1.8760108,-.2040259,-.4985314,.0415560,1.0572252);float sq(const in float v){return v*v;}vec3 sq(const in vec3 v){return v*v;}vec3 Fresnel0ToIor(const in vec3 fresnel0){vec3 sqrtF0=sqrt(fresnel0);return(vec3(1)+sqrtF0)/(vec3(1)-sqrtF0);}vec3 IorToFresnel0(const in vec3 transmittedIor,const in float incidentIor){return sq((transmittedIor-vec3(incidentIor))/(transmittedIor+vec3(incidentIor)));}float IorToFresnel0(const in float transmittedIor,const in float incidentIor){return sq((transmittedIor-incidentIor)/(transmittedIor+incidentIor));}vec3 evalSensitivity(const in float OPD,const in vec3 shift){const vec3 val=vec3(5.4856e-13,4.4201e-13,5.2481e-13);const vec3 pos=vec3(1.6810e+06,1.7953e+06,2.2084e+06);const vec3 var=vec3(4.3278e+09,9.3046e+09,6.6121e+09);float phase=2.*M_PI*OPD*1.0e-9;vec3 xyz=val*sqrt(2.*M_PI*var)*cos(pos*phase+shift)*exp(-sq(phase)*var);xyz.x+=9.7470e-14*sqrt(2.*M_PI*4.5282e+09)*cos(2.2399e+06*phase+shift[0])*exp(-4.5282e+09*sq(phase));xyz/=1.0685e-7;vec3 srgb=XYZ_TO_REC709*xyz;return srgb;}vec3 evalIridescence(const in float outsideIOR,const in float eta2,const in float cosTheta1,const in float thinFilmThickness,const in vec3 baseF0){vec3 I;float iridescenceIor=mix(outsideIOR,eta2,smoothstep(0.,.03,thinFilmThickness));float sinTheta2Sq=sq(outsideIOR/iridescenceIor)*(1.-sq(cosTheta1));float cosTheta2Sq=1.-sinTheta2Sq;if(cosTheta2Sq<0.)return vec3(1);float cosTheta2=sqrt(cosTheta2Sq);float R0=IorToFresnel0(iridescenceIor,outsideIOR);float R12=F_Schlick(R0,cosTheta1);float R21=R12;float T121=1.-R12;float phi12=0.;if(iridescenceIor<outsideIOR)phi12=M_PI;float phi21=M_PI-phi12;vec3 baseIOR=Fresnel0ToIor(clamp(baseF0,0.,.9999));vec3 R1=IorToFresnel0(baseIOR,iridescenceIor);vec3 R23=F_Schlick(R1,cosTheta2);vec3 phi23=vec3(0);if(baseIOR[0]<iridescenceIor)phi23[0]=M_PI;if(baseIOR[1]<iridescenceIor)phi23[1]=M_PI;if(baseIOR[2]<iridescenceIor)phi23[2]=M_PI;float OPD=2.*iridescenceIor*thinFilmThickness*cosTheta2;vec3 phi=vec3(phi21)+phi23;vec3 R123=clamp(R12*R23,1e-5,.9999);vec3 r123=sqrt(R123);vec3 Rs=sq(T121)*R23/(vec3(1)-R123);vec3 C0=R12+Rs;I=C0;vec3 Cm=Rs-T121;for(int m=1;m<=2;++m){Cm*=r123;vec3 Sm=2.*evalSensitivity(float(m)*OPD,float(m)*phi);I+=Cm*Sm;}return max(I,vec3(0));}\n#endif\n");function Oe(e){R.call(this,e),this.addType(I().IridescenceMaterialExtension)}v.add("IRIDESCENCE_MATERIAL_EXTENSION"),Ee().addIncludeFile("Iridescence",Ie),b().add("x3d_IridescenceTextureEXT"),b().add("x3d_IridescenceThicknessTextureEXT"),Object.assign(Object.setPrototypeOf(Oe.prototype,R.prototype),{initialize(){R.prototype.initialize.call(this),this._iridescence.addInterest("set_iridescence__",this),this._iridescenceTexture.addInterest("set_iridescenceTexture__",this),this._iridescenceIndexOfRefraction.addInterest("set_iridescenceIndexOfRefraction__",this),this._iridescenceThicknessMinimum.addInterest("set_iridescenceThicknessMinimum__",this),this._iridescenceThicknessMaximum.addInterest("set_iridescenceThicknessMaximum__",this),this._iridescenceThicknessTexture.addInterest("set_iridescenceThicknessTexture__",this),this.set_iridescence__(),this.set_iridescenceTexture__(),this.set_iridescenceIndexOfRefraction__(),this.set_iridescenceThicknessMinimum__(),this.set_iridescenceThicknessMaximum__(),this.set_iridescenceThicknessTexture__()},set_iridescence__(){this.iridescence=D().clamp(this._iridescence.getValue(),0,1)},set_iridescenceTexture__(){this.iridescenceTextureNode=X()(I().X3DSingleTextureNode,this._iridescenceTexture),this.addTexture(0,this.iridescenceTextureNode)},set_iridescenceIndexOfRefraction__(){this.iridescenceIndexOfRefraction=Math.max(this._iridescenceIndexOfRefraction.getValue(),1)},set_iridescenceThicknessMinimum__(){this.iridescenceThicknessMinimum=Math.max(this._iridescenceThicknessMinimum.getValue(),0)},set_iridescenceThicknessMaximum__(){this.iridescenceThicknessMaximum=Math.max(this._iridescenceThicknessMaximum.getValue(),0)},set_iridescenceThicknessTexture__(){this.iridescenceThicknessTextureNode=X()(I().X3DSingleTextureNode,this._iridescenceThicknessTexture),this.addTexture(1,this.iridescenceThicknessTextureNode)},getExtensionKey:()=>v.IRIDESCENCE_MATERIAL_EXTENSION,getShaderOptions(e){e.push("X3D_IRIDESCENCE_MATERIAL_EXT"),+this.getTextureBits()&&(e.push("X3D_MATERIAL_TEXTURES"),this.iridescenceTextureNode?.getShaderOptions(e,"IRIDESCENCE",!0),this.iridescenceThicknessTextureNode?.getShaderOptions(e,"IRIDESCENCE_THICKNESS",!0))},getShaderUniforms(e){e.push("x3d_IridescenceEXT"),e.push("x3d_IridescenceIndexOfRefractionEXT"),e.push("x3d_IridescenceThicknessMinimumEXT"),e.push("x3d_IridescenceThicknessMaximumEXT")},setShaderUniforms(e,t,s,i){e.uniform1f(t.x3d_IridescenceEXT,this.iridescence),e.uniform1f(t.x3d_IridescenceIndexOfRefractionEXT,this.iridescenceIndexOfRefraction),e.uniform1f(t.x3d_IridescenceThicknessMinimumEXT,this.iridescenceThicknessMinimum),e.uniform1f(t.x3d_IridescenceThicknessMaximumEXT,this.iridescenceThicknessMaximum),+this.getTextureBits()&&(this.iridescenceTextureNode?.setNamedShaderUniforms(e,t.x3d_IridescenceTextureEXT,this._iridescenceTextureMapping.getValue(),s,i),this.iridescenceThicknessTextureNode?.setNamedShaderUniforms(e,t.x3d_IridescenceThicknessTextureEXT,this._iridescenceThicknessTextureMapping.getValue(),s,i))}}),Object.defineProperties(Oe,{...g().getStaticProperties("IridescenceMaterialExtension","X_ITE",1,"extensions","4.0"),fieldDefinitions:{value:new(x())([new(f())(I().inputOutput,"metadata",new(p().SFNode)),new(f())(I().inputOutput,"iridescence",new(p().SFFloat)),new(f())(I().inputOutput,"iridescenceTextureMapping",new(p().SFString)),new(f())(I().inputOutput,"iridescenceTexture",new(p().SFNode)),new(f())(I().inputOutput,"iridescenceIndexOfRefraction",new(p().SFFloat)(1.3)),new(f())(I().inputOutput,"iridescenceThicknessMinimum",new(p().SFFloat)(100)),new(f())(I().inputOutput,"iridescenceThicknessMaximum",new(p().SFFloat)(400)),new(f())(I().inputOutput,"iridescenceThicknessTextureMapping",new(p().SFString)),new(f())(I().inputOutput,"iridescenceThicknessTexture",new(p().SFNode))]),enumerable:!0}});const Ne=Oe,Ae=a().add("IridescenceMaterialExtension",Ne);function Ce(e){R.call(this,e),this.addType(I().SheenMaterialExtension),this.sheenColorArray=new Float32Array(3)}v.add("SHEEN_MATERIAL_EXTENSION"),b().add("x3d_SheenColorTextureEXT"),b().add("x3d_SheenRoughnessTextureEXT"),Object.assign(Object.setPrototypeOf(Ce.prototype,R.prototype),{initialize(){R.prototype.initialize.call(this),this.getBrowser().getLibraryTexture("lut_charlie.png"),this.getBrowser().getLibraryTexture("lut_sheen_E.png"),this._sheenColor.addInterest("set_sheenColor__",this),this._sheenColorTexture.addInterest("set_sheenColorTexture__",this),this._sheenRoughness.addInterest("set_sheenRoughness__",this),this._sheenRoughnessTexture.addInterest("set_sheenRoughnessTexture__",this),this.set_sheenColor__(),this.set_sheenColorTexture__(),this.set_sheenRoughness__(),this.set_sheenRoughnessTexture__()},set_sheenColor__(){this.sheenColorArray.set(this._sheenColor.getValue())},set_sheenColorTexture__(){this.sheenColorTextureNode=X()(I().X3DSingleTextureNode,this._sheenColorTexture),this.addTexture(0,this.sheenColorTextureNode)},set_sheenRoughness__(){this.sheenRoughness=D().clamp(this._sheenRoughness.getValue(),0,1)},set_sheenRoughnessTexture__(){this.sheenRoughnessTextureNode=X()(I().X3DSingleTextureNode,this._sheenRoughnessTexture),this.addTexture(1,this.sheenRoughnessTextureNode)},getExtensionKey:()=>v.SHEEN_MATERIAL_EXTENSION,getShaderOptions(e){e.push("X3D_SHEEN_MATERIAL_EXT"),+this.getTextureBits()&&(e.push("X3D_MATERIAL_TEXTURES"),this.sheenColorTextureNode?.getShaderOptions(e,"SHEEN_COLOR",!0),this.sheenRoughnessTextureNode?.getShaderOptions(e,"SHEEN_ROUGHNESS",!0))},getShaderUniforms(e){e.push("x3d_SheenColorEXT"),e.push("x3d_SheenRoughnessEXT"),e.push("x3d_SheenELUTTextureEXT")},setShaderUniforms(e,t,s,i){e.uniform3fv(t.x3d_SheenColorEXT,this.sheenColorArray),e.uniform1f(t.x3d_SheenRoughnessEXT,this.sheenRoughness);const n=this.getBrowser(),r=n.getLibraryTexture("lut_sheen_E.png"),o=n.popTextureUnit();e.activeTexture(e.TEXTURE0+o),e.bindTexture(e.TEXTURE_2D,r.getTexture()),e.uniform1i(t.x3d_SheenELUTTextureEXT,o),+this.getTextureBits()&&(this.sheenColorTextureNode?.setNamedShaderUniforms(e,t.x3d_SheenColorTextureEXT,this._sheenColorTextureMapping.getValue(),s,i),this.sheenRoughnessTextureNode?.setNamedShaderUniforms(e,t.x3d_SheenRoughnessTextureEXT,this._sheenRoughnessTextureMapping.getValue(),s,i))}}),Object.defineProperties(Ce,{...g().getStaticProperties("SheenMaterialExtension","X_ITE",1,"extensions","4.0"),fieldDefinitions:{value:new(x())([new(f())(I().inputOutput,"metadata",new(p().SFNode)),new(f())(I().inputOutput,"sheenColor",new(p().SFColor)),new(f())(I().inputOutput,"sheenColorTextureMapping",new(p().SFString)),new(f())(I().inputOutput,"sheenColorTexture",new(p().SFNode)),new(f())(I().inputOutput,"sheenRoughness",new(p().SFFloat)),new(f())(I().inputOutput,"sheenRoughnessTextureMapping",new(p().SFString)),new(f())(I().inputOutput,"sheenRoughnessTexture",new(p().SFNode))]),enumerable:!0}});const Re=Ce,Me=a().add("SheenMaterialExtension",Re),Xe=e.X3DOneSidedMaterialNode;var ye=t.n(Xe);const we=a().add("SpecularGlossiness2.glsl",()=>`\n#include<Fragment>\n#include<Shadow>\n#if defined(X3D_LIGHTING)\nuniform x3d_LightSourceParameters x3d_LightSource[X3D_NUM_LIGHTS];\n#endif\nuniform x3d_PhysicalMaterialParameters x3d_Material;\n#include<BRDF>\n#include<MaterialInfo>\n#include<Punctual>\n#include<IBL>\n${b().texture("x3d_DiffuseTexture","rgba","linear")}\nvec4 getBaseColor(){float alpha=1.-x3d_Material.transparency;vec4 baseColor=vec4(x3d_Material.diffuseColor,alpha);\n#if defined(X3D_COLOR_MATERIAL)\nbaseColor*=color;\n#endif\n#if defined(X3D_DIFFUSE_TEXTURE)\nbaseColor*=getDiffuseTexture();\n#elif defined(X3D_TEXTURE)\nbaseColor=getTextureColor(baseColor,vec4(vec3(1),alpha));\n#endif\nreturn baseColor;}\n${b().texture("x3d_SpecularGlossinessTexture","rgba","linear")}\nMaterialInfo getSpecularGlossinessInfo(in MaterialInfo info){vec3 specular=x3d_Material.specularColor;float glossiness=x3d_Material.glossiness;\n#if defined(X3D_SPECULAR_GLOSSINESS_TEXTURE)\nvec4 sgSample=getSpecularGlossinessTexture();glossiness*=sgSample.a;specular*=sgSample.rgb;\n#endif\ninfo.perceptualRoughness=1.-glossiness;info.f0_dielectric=min(specular,vec3(1));return info;}vec4 getMaterialColor(const in vec4 fragCoord){vec4 baseColor=getBaseColor();\n#if defined(X3D_TEXTURE_PROJECTION)\nbaseColor.rgb*=getTextureProjectorColor();\n#endif\nvec3 color=vec3(0);vec3 v=normalize(-vertex);\n#if defined(X3D_USE_IBL)||defined(X3D_LIGHTING)\nNormalInfo normalInfo=getNormalInfo(x3d_Material.normalScale);vec3 n=normalInfo.n;float NdotV=clamp(dot(n,v),0.,1.);\n#endif\nMaterialInfo materialInfo;materialInfo.baseColor=baseColor.rgb;materialInfo.f90_dielectric=vec3(1);materialInfo.metallic=0.;materialInfo=getSpecularGlossinessInfo(materialInfo);materialInfo.perceptualRoughness=clamp(materialInfo.perceptualRoughness,0.,1.);materialInfo.alphaRoughness=materialInfo.perceptualRoughness*materialInfo.perceptualRoughness;vec3 f_emissive=vec3(0);\n#if defined(X3D_USE_IBL)\nvec3 f_diffuse=getDiffuseLight(n)*baseColor.rgb;vec3 f_specular_dielectric=getIBLRadianceGGX(n,v,materialInfo.perceptualRoughness);vec3 f_dielectric_fresnel_ibl=getIBLGGXFresnel(n,v,materialInfo.perceptualRoughness,materialInfo.f0_dielectric,1.);vec3 f_dielectric_brdf_ibl=mix(f_diffuse,f_specular_dielectric,f_dielectric_fresnel_ibl);color=f_dielectric_brdf_ibl;\n#if defined(X3D_OCCLUSION_TEXTURE)\nfloat ao=getOcclusionFactor();color*=1.+x3d_Material.occlusionStrength*(ao-1.);\n#endif\n#endif\n#if defined(X3D_LIGHTING)\nfor(int i=0;i<X3D_NUM_LIGHTS;++i){x3d_LightSourceParameters light=x3d_LightSource[i];vec3 pointToLight;float distanceToLight;if(light.type!=x3d_DirectionalLight){pointToLight=light.location-vertex;distanceToLight=length(light.matrix*pointToLight);}else{pointToLight=-light.direction;distanceToLight=-1.;}if(distanceToLight<=light.radius||light.radius<0.){vec3 l=normalize(pointToLight);vec3 h=normalize(l+v);float NdotL=clamp(dot(n,l),0.,1.);float NdotV=clamp(dot(n,v),0.,1.);float NdotH=clamp(dot(n,h),0.,1.);float VdotH=clamp(dot(v,h),0.,1.);vec3 dielectric_fresnel=F_Schlick(materialInfo.f0_dielectric,materialInfo.f90_dielectric,abs(VdotH));vec3 lightIntensity=getLightIntensity(light,l,distanceToLight);vec3 intensity=lightIntensity;\n#if defined(X3D_SHADOWS)\nlightIntensity=mix(lightIntensity,light.shadowColor,getShadowIntensity(i,light));\n#endif\nvec3 l_diffuse=lightIntensity*NdotL*BRDF_lambertian(baseColor.rgb);vec3 l_specular_dielectric=intensity*NdotL*BRDF_specularGGX(materialInfo.alphaRoughness,NdotL,NdotV,NdotH);vec3 l_dielectric_brdf=mix(l_diffuse,l_specular_dielectric,dielectric_fresnel);color+=l_dielectric_brdf;}}\n#endif\nf_emissive=getEmissiveColor();\n#if defined(X3D_UNLIT_MATERIAL_EXT)\ncolor=baseColor.rgb;\n#elif(defined(X3D_GEOMETRY_0D)||defined(X3D_GEOMETRY_1D))&&!defined(X3D_NORMALS)\ncolor=f_emissive+baseColor.rgb;\n#else\ncolor=f_emissive+color;\n#endif\nreturn vec4(color,baseColor.a);}`),ve=a().add("SpecularGlossiness2.fs",()=>"#version 300 es\nprecision highp int;precision highp float;precision highp sampler2D;precision highp sampler3D;precision highp samplerCube;\n#include<SpecularGlossiness>\n");function Fe(e){console.warn("SpecularGlossinessMaterial is deprecated, please use PhysicalMaterial instead."),ye().call(this,e),this.addType(I().SpecularGlossinessMaterial),this.diffuseColorArray=new Float32Array(3),this.specularColorArray=new Float32Array(3)}Ee().addIncludeFile("SpecularGlossiness",we),Ee().addFragmentShader("SpecularGlossiness",ve),b().add("x3d_SpecularGlossinessTexture"),Object.assign(Object.setPrototypeOf(Fe.prototype,ye().prototype),{initialize(){ye().prototype.initialize.call(this),this._diffuseColor.addInterest("set_diffuseColor__",this),this._diffuseTexture.addInterest("set_diffuseTexture__",this),this._diffuseTexture.addInterest("set_transparent__",this),this._specularColor.addInterest("set_specularColor__",this),this._glossiness.addInterest("set_glossiness__",this),this._specularGlossinessTexture.addInterest("set_specularGlossinessTexture__",this),this._occlusionStrength.addInterest("set_occlusionStrength__",this),this._occlusionTexture.addInterest("set_occlusionTexture__",this),this.set_diffuseColor__(),this.set_diffuseTexture__(),this.set_specularColor__(),this.set_glossiness__(),this.set_specularGlossinessTexture__(),this.set_occlusionStrength__(),this.set_occlusionTexture__(),this.set_transparent__()},isPhysical:()=>!0,getMaterialKey:()=>4,getTextureIndices:(()=>{let e=0;const t={DIFFUSE_TEXTURE:e++,SPECULAR_GLOSSINESS_TEXTURE:e++,EMISSIVE_TEXTURE:e++,OCCLUSION_TEXTURE:e++,NORMAL_TEXTURE:e++};return function(){return t}})(),getBaseTexture(){return this.diffuseTextureNode},set_diffuseColor__(){this.diffuseColorArray.set(this._diffuseColor.getValue())},set_diffuseTexture__(){const e=this.getTextureIndices().DIFFUSE_TEXTURE;this.diffuseTextureNode&&(this.diffuseTextureNode._transparent.removeInterest("set_transparent__",this),this.diffuseTextureNode._linear.removeInterest("addTexture",this)),this.diffuseTextureNode=X()(I().X3DSingleTextureNode,this._diffuseTexture),this.diffuseTextureNode&&(this.diffuseTextureNode._transparent.addInterest("set_transparent__",this),this.diffuseTextureNode._linear.addInterest("addTexture",this,e,this.diffuseTextureNode)),this.addTexture(e,this.diffuseTextureNode)},set_specularColor__(){this.specularColorArray.set(this._specularColor.getValue())},set_glossiness__(){this.glossiness=D().clamp(this._glossiness.getValue(),0,1)},set_specularGlossinessTexture__(){this.specularGlossinessTextureNode=X()(I().X3DSingleTextureNode,this._specularGlossinessTexture),this.addTexture(this.getTextureIndices().SPECULAR_GLOSSINESS_TEXTURE,this.specularGlossinessTextureNode)},set_occlusionStrength__(){this.occlusionStrength=D().clamp(this._occlusionStrength.getValue(),0,1)},set_occlusionTexture__(){this.occlusionTextureNode=X()(I().X3DSingleTextureNode,this._occlusionTexture),this.addTexture(this.getTextureIndices().OCCLUSION_TEXTURE,this.occlusionTextureNode)},createShader(e,t,s){const i=this.getBrowser(),n=this.getShaderOptions(t,s);n.push("X3D_PHYSICAL_MATERIAL","X3D_MATERIAL_SPECULAR_GLOSSINESS"),+this.getTextureBits()&&(this.diffuseTextureNode?.getShaderOptions(n,"DIFFUSE"),this.specularGlossinessTextureNode?.getShaderOptions(n,"SPECULAR_GLOSSINESS"),this.occlusionTextureNode?.getShaderOptions(n,"OCCLUSION"));const r=i.createShader({name:"SpecularGlossiness",vertexShader:"Default",fragmentShader:"SpecularGlossiness",options:n});return i.getShaders().set(e,r),r},setShaderUniforms(e,t,s,i){ye().prototype.setShaderUniforms.call(this,e,t,s,i),e.uniform3fv(t.x3d_DiffuseColor,this.diffuseColorArray),e.uniform3fv(t.x3d_SpecularColor,this.specularColorArray),e.uniform1f(t.x3d_Glossiness,this.glossiness),+this.getTextureBits()&&(this.diffuseTextureNode?.setNamedShaderUniforms(e,t.x3d_DiffuseTexture,this._diffuseTextureMapping.getValue(),s,i),this.specularGlossinessTextureNode?.setNamedShaderUniforms(e,t.x3d_SpecularGlossinessTexture,this._specularGlossinessTextureMapping.getValue(),s,i),this.occlusionTextureNode&&(e.uniform1f(t.x3d_OcclusionStrength,this.occlusionStrength),this.occlusionTextureNode.setNamedShaderUniforms(e,t.x3d_OcclusionTexture,this._occlusionTextureMapping.getValue(),s,i)))}}),Object.defineProperties(Fe,{...g().getStaticProperties("SpecularGlossinessMaterial","X_ITE",1,"material","4.0"),fieldDefinitions:{value:new(x())([new(f())(I().inputOutput,"metadata",new(p().SFNode)),new(f())(I().inputOutput,"diffuseColor",new(p().SFColor)(1,1,1)),new(f())(I().inputOutput,"diffuseTextureMapping",new(p().SFString)),new(f())(I().inputOutput,"diffuseTexture",new(p().SFNode)),new(f())(I().inputOutput,"specularColor",new(p().SFColor)(1,1,1)),new(f())(I().inputOutput,"glossiness",new(p().SFFloat)(1)),new(f())(I().inputOutput,"specularGlossinessTextureMapping",new(p().SFString)),new(f())(I().inputOutput,"specularGlossinessTexture",new(p().SFNode)),new(f())(I().inputOutput,"emissiveColor",new(p().SFColor)),new(f())(I().inputOutput,"emissiveTextureMapping",new(p().SFString)),new(f())(I().inputOutput,"emissiveTexture",new(p().SFNode)),new(f())(I().inputOutput,"occlusionStrength",new(p().SFFloat)(1)),new(f())(I().inputOutput,"occlusionTextureMapping",new(p().SFString)),new(f())(I().inputOutput,"occlusionTexture",new(p().SFNode)),new(f())(I().inputOutput,"normalScale",new(p().SFFloat)(1)),new(f())(I().inputOutput,"normalTextureMapping",new(p().SFString)),new(f())(I().inputOutput,"normalTexture",new(p().SFNode)),new(f())(I().inputOutput,"transparency",new(p().SFFloat))]),enumerable:!0}});const De=Fe,Le=a().add("SpecularGlossinessMaterial",De);function be(e){R.call(this,e),this.addType(I().SpecularMaterialExtension),this.specularColorArray=new Float32Array(3)}v.add("SPECULAR_MATERIAL_EXTENSION"),b().add("x3d_SpecularTextureEXT"),b().add("x3d_SpecularColorTextureEXT"),Object.assign(Object.setPrototypeOf(be.prototype,R.prototype),{initialize(){R.prototype.initialize.call(this),this._specular.addInterest("set_specular__",this),this._specularTexture.addInterest("set_specularTexture__",this),this._specularColor.addInterest("set_specularColor__",this),this._specularStrength.addInterest("set_specularStrength__",this),this._specularColorTexture.addInterest("set_specularColorTexture__",this),this.set_specular__(),this.set_specularTexture__(),this.set_specularColor__(),this.set_specularStrength__(),this.set_specularColorTexture__()},set_specular__(){this.specular=D().clamp(this._specular.getValue(),0,1)},set_specularTexture__(){this.specularTextureNode=X()(I().X3DSingleTextureNode,this._specularTexture),this.addTexture(0,this.specularTextureNode)},set_specularColor__(){this.specularColorArray.set(this._specularColor.getValue())},set_specularStrength__(){this.specularStrength=Math.max(this._specularStrength.getValue(),0)},set_specularColorTexture__(){this.specularColorTextureNode=X()(I().X3DSingleTextureNode,this._specularColorTexture),this.addTexture(1,this.specularColorTextureNode)},getExtensionKey:()=>v.SPECULAR_MATERIAL_EXTENSION,getShaderOptions(e){e.push("X3D_SPECULAR_MATERIAL_EXT"),+this.getTextureBits()&&(e.push("X3D_MATERIAL_TEXTURES"),this.specularTextureNode?.getShaderOptions(e,"SPECULAR",!0),this.specularColorTextureNode?.getShaderOptions(e,"SPECULAR_COLOR",!0))},getShaderUniforms(e){e.push("x3d_SpecularEXT"),e.push("x3d_SpecularColorEXT"),e.push("x3d_SpecularStrengthEXT")},setShaderUniforms(e,t,s,i){e.uniform1f(t.x3d_SpecularEXT,this.specular),e.uniform3fv(t.x3d_SpecularColorEXT,this.specularColorArray),e.uniform1f(t.x3d_SpecularStrengthEXT,this.specularStrength),+this.getTextureBits()&&(this.specularTextureNode?.setNamedShaderUniforms(e,t.x3d_SpecularTextureEXT,this._specularTextureMapping.getValue(),s,i),this.specularColorTextureNode?.setNamedShaderUniforms(e,t.x3d_SpecularColorTextureEXT,this._specularColorTextureMapping.getValue(),s,i))}}),Object.defineProperties(be,{...g().getStaticProperties("SpecularMaterialExtension","X_ITE",1,"extensions","4.0"),fieldDefinitions:{value:new(x())([new(f())(I().inputOutput,"metadata",new(p().SFNode)),new(f())(I().inputOutput,"specular",new(p().SFFloat)(1)),new(f())(I().inputOutput,"specularTextureMapping",new(p().SFString)),new(f())(I().inputOutput,"specularTexture",new(p().SFNode)),new(f())(I().inputOutput,"specularColor",new(p().SFColor)(1,1,1)),new(f())(I().inputOutput,"specularStrength",new(p().SFFloat)(1)),new(f())(I().inputOutput,"specularColorTextureMapping",new(p().SFString)),new(f())(I().inputOutput,"specularColorTexture",new(p().SFNode))]),enumerable:!0}});const Ue=be,Pe=a().add("SpecularMaterialExtension",Ue);function Ve(e){R.call(this,e),this.addType(I().TransmissionMaterialExtension)}v.add("TRANSMISSION_MATERIAL_EXTENSION"),b().add("x3d_TransmissionTextureEXT"),Object.assign(Object.setPrototypeOf(Ve.prototype,R.prototype),{initialize(){R.prototype.initialize.call(this),this._transmission.addInterest("set_transmission__",this),this._transmissionTexture.addInterest("set_transmissionTexture__",this),this.set_transmission__(),this.set_transmissionTexture__()},set_transmission__(){this.transmission=D().clamp(this._transmission.getValue(),0,1)},set_transmissionTexture__(){this.transmissionTextureNode=X()(I().X3DSingleTextureNode,this._transmissionTexture),this.addTexture(0,this.transmissionTextureNode)},getExtensionKey:()=>v.TRANSMISSION_MATERIAL_EXTENSION,getShaderOptions(e){e.push("X3D_TRANSMISSION_MATERIAL_EXT"),+this.getTextureBits()&&(e.push("X3D_MATERIAL_TEXTURES"),this.transmissionTextureNode?.getShaderOptions(e,"TRANSMISSION",!0))},getShaderUniforms(e){e.push("x3d_TransmissionEXT"),e.push("x3d_TransmissionSamplerEXT")},setShaderUniforms(e,t,s,i){const n=this.getBrowser(),r=n.getTransmissionBuffer(),o=n.popTextureUnit(),a=r.getColorTexture();e.uniform1f(t.x3d_TransmissionEXT,this.transmission),e.activeTexture(e.TEXTURE0+o),e.bindTexture(e.TEXTURE_2D,a),e.uniform1i(t.x3d_TransmissionSamplerEXT,o),this.transmissionTextureNode?.setNamedShaderUniforms(e,t.x3d_TransmissionTextureEXT,this._transmissionTextureMapping.getValue(),s,i)}}),Object.defineProperties(Ve,{...g().getStaticProperties("TransmissionMaterialExtension","X_ITE",1,"extensions","4.0"),fieldDefinitions:{value:new(x())([new(f())(I().inputOutput,"metadata",new(p().SFNode)),new(f())(I().inputOutput,"transmission",new(p().SFFloat)),new(f())(I().inputOutput,"transmissionTextureMapping",new(p().SFString)),new(f())(I().inputOutput,"transmissionTexture",new(p().SFNode))]),enumerable:!0}});const Be=Ve,ke=a().add("TransmissionMaterialExtension",Be);function Ge(e){R.call(this,e),this.addType(I().VolumeMaterialExtension),this._thickness.setUnit("length"),this._attenuationDistance.setUnit("length"),this.attenuationColorArray=new Float32Array(3)}v.add("VOLUME_MATERIAL_EXTENSION"),b().add("x3d_ThicknessTextureEXT"),Object.assign(Object.setPrototypeOf(Ge.prototype,R.prototype),{initialize(){R.prototype.initialize.call(this),this._thickness.addInterest("set_thickness__",this),this._thicknessTexture.addInterest("set_thicknessTexture__",this),this._attenuationDistance.addInterest("set_attenuationDistance__",this),this._attenuationColor.addInterest("set_attenuationColor__",this),this.set_thickness__(),this.set_thicknessTexture__(),this.set_attenuationDistance__(),this.set_attenuationColor__()},set_thickness__(){this.thickness=Math.max(this._thickness.getValue(),0)},set_thicknessTexture__(){this.thicknessTextureNode=X()(I().X3DSingleTextureNode,this._thicknessTexture),this.addTexture(0,this.thicknessTextureNode)},set_attenuationDistance__(){const e=this._attenuationDistance.getValue();this.attenuationDistance=e?Math.max(e,0):1e6},set_attenuationColor__(){this.attenuationColorArray.set(this._attenuationColor.getValue())},getExtensionKey:()=>v.VOLUME_MATERIAL_EXTENSION,getShaderOptions(e){e.push("X3D_VOLUME_MATERIAL_EXT"),+this.getTextureBits()&&(e.push("X3D_MATERIAL_TEXTURES"),this.thicknessTextureNode?.getShaderOptions(e,"THICKNESS",!0))},getShaderUniforms(e){e.push("x3d_ThicknessEXT"),e.push("x3d_AttenuationDistanceEXT"),e.push("x3d_AttenuationColorEXT")},setShaderUniforms(e,t,s,i){e.uniform1f(t.x3d_ThicknessEXT,this.thickness),e.uniform1f(t.x3d_AttenuationDistanceEXT,this.attenuationDistance),e.uniform3fv(t.x3d_AttenuationColorEXT,this.attenuationColorArray),this.thicknessTextureNode?.setNamedShaderUniforms(e,t.x3d_ThicknessTextureEXT,this._thicknessTextureMapping.getValue(),s,i)}}),Object.defineProperties(Ge,{...g().getStaticProperties("VolumeMaterialExtension","X_ITE",1,"extensions","4.0"),fieldDefinitions:{value:new(x())([new(f())(I().inputOutput,"metadata",new(p().SFNode)),new(f())(I().inputOutput,"thickness",new(p().SFFloat)),new(f())(I().inputOutput,"thicknessTextureMapping",new(p().SFString)),new(f())(I().inputOutput,"thicknessTexture",new(p().SFNode)),new(f())(I().inputOutput,"attenuationDistance",new(p().SFFloat)(1e6)),new(f())(I().inputOutput,"attenuationColor",new(p().SFColor)(1,1,1))]),enumerable:!0}});const je=Ge,ze=a().add("VolumeMaterialExtension",je);class He{static SCATTER_SAMPLES_COUNT=55;static{const[e,t]=this.#e();this.SCATTER_SAMPLES=e,this.SCATTER_MIN_RADIUS=t}static#e(){const e=this.#t(1,1);let t=1;const s=Math.PI*(3-Math.sqrt(5)),i=[];for(let n=0;n<this.SCATTER_SAMPLES_COUNT;++n){const r=s*n+2*Math.PI*.5,o=(.5+n)/this.SCATTER_SAMPLES_COUNT,a=this.#s(e,o);t=Math.min(t,a),i.push(r,a,1/this.#i(e,a))}return t=Math.max(t,1e-5),[new Float32Array(i),t]}static#s(e,t){let s;s=(t*=.9963790093708328)<=.9?Math.exp(t*t*2.4)-1:15;for(let e=0;e<10;++e){const e=Math.exp(-s/3),i=e*e*e,n=1-.25*i-.75*e-t,r=.25*i+.25*e;if(Math.abs(n)<1e-6||0===r)break;s-=n/r,s=Math.max(s,0)}return s*e}static#n(e,t){if(t>=16*e)return 0;const s=Math.exp(-t/(3*e));return(s*s*s+s)/(8*Math.PI*e)}static#i(e,t){return this.#n(e,t)/.9963790093708328}static#t(e,t){return.07957747154594767*e/(1.9-t+(t-.8)*(t-.8)*3.5)}}const qe=He,Ye=a().add("ScatterSamples",qe),Ke=a().add("Scatter2.glsl",()=>"\nuniform float x3d_ScatterMaterialIdEXT;vec4 getMaterialColor(const in vec4 fragCoord){vec4 baseColor=getBaseColor();\n#if defined(X3D_TEXTURE_PROJECTION)\nbaseColor.rgb*=getTextureProjectorColor();\n#endif\nvec3 frontColor=vec3(0);vec3 v=normalize(-vertex);\n#if defined(X3D_USE_IBL)||defined(X3D_LIGHTING)\nNormalInfo normalInfo=getNormalInfo(x3d_Material.normalScale);vec3 n=normalInfo.n;float NdotV=clamp(dot(n,v),0.,1.);\n#endif\nMaterialInfo materialInfo;materialInfo.baseColor=baseColor.rgb;materialInfo.ior=1.5;materialInfo.f0_dielectric=vec3(.04);materialInfo.specularWeight=1.;materialInfo.f90=vec3(1);materialInfo.f90_dielectric=materialInfo.f90;\n#if defined(X3D_IOR_MATERIAL_EXT)\nmaterialInfo=getIorInfo(materialInfo);\n#endif\n#if defined(X3D_MATERIAL_METALLIC_ROUGHNESS)\nmaterialInfo=getMetallicRoughnessInfo(materialInfo);\n#endif\n#if defined(X3D_SHEEN_MATERIAL_EXT)\nmaterialInfo=getSheenInfo(materialInfo);\n#endif\n#if defined(X3D_SPECULAR_MATERIAL_EXT)\nmaterialInfo=getSpecularInfo(materialInfo);\n#endif\n#if defined(X3D_TRANSMISSION_MATERIAL_EXT)\nmaterialInfo=getTransmissionInfo(materialInfo);\n#endif\n#if defined(X3D_VOLUME_MATERIAL_EXT)\nmaterialInfo=getVolumeInfo(materialInfo);\n#endif\n#if defined(X3D_DIFFUSE_TRANSMISSION_MATERIAL_EXT)\nmaterialInfo=getDiffuseTransmissionInfo(materialInfo);\n#endif\n#if defined(X3D_VOLUME_SCATTER_MATERIAL_EXT)\nmaterialInfo=getVolumeScatterInfo(materialInfo);vec3 singleScatter=multiToSingleScatter(materialInfo.multiscatterColor);\n#endif\nmaterialInfo.perceptualRoughness=clamp(materialInfo.perceptualRoughness,0.,1.);materialInfo.alphaRoughness=materialInfo.perceptualRoughness*materialInfo.perceptualRoughness;vec3 f_specular_dielectric=vec3(0);vec3 f_diffuse=vec3(0);vec3 f_dielectric_brdf_ibl=vec3(0);float albedoSheenScaling=1.;float diffuseTransmissionThickness=1.;\n#if defined(X3D_DIFFUSE_TRANSMISSION_MATERIAL_EXT)\n#if defined(X3D_VOLUME_MATERIAL_EXT)\ndiffuseTransmissionThickness=materialInfo.thickness*(length(x3d_ModelViewMatrix[0].xyz)+length(x3d_ModelViewMatrix[1].xyz)+length(x3d_ModelViewMatrix[2].xyz))/3.;\n#endif\n#endif\n#if defined(X3D_USE_IBL)||defined(X3D_TRANSMISSION_MATERIAL_EXT)\n#if defined(X3D_DIFFUSE_TRANSMISSION_MATERIAL_EXT)\nf_diffuse=getDiffuseLight(n)*materialInfo.diffuseTransmissionColorFactor*singleScatter;vec3 diffuseTransmissionIBL=getDiffuseLight(-n)*materialInfo.diffuseTransmissionColorFactor;\n#if defined(X3D_VOLUME_MATERIAL_EXT)\ndiffuseTransmissionIBL=applyVolumeAttenuation(diffuseTransmissionIBL,diffuseTransmissionThickness,materialInfo.attenuationColor,materialInfo.attenuationDistance);\n#endif\nf_diffuse+=diffuseTransmissionIBL*(1.-singleScatter)*singleScatter;f_diffuse*=materialInfo.diffuseTransmissionFactor;\n#endif\n#if defined(X3D_SHEEN_MATERIAL_EXT)\nalbedoSheenScaling=1.-max3(materialInfo.sheenColorFactor)*albedoSheenScalingLUT(NdotV,materialInfo.sheenRoughnessFactor);\n#endif\n#if defined(X3D_USE_IBL)\nvec3 f_dielectric_fresnel_ibl=getIBLGGXFresnel(n,v,materialInfo.perceptualRoughness,materialInfo.f0_dielectric,materialInfo.specularWeight);frontColor+=mix(f_diffuse,f_specular_dielectric,f_dielectric_fresnel_ibl)*albedoSheenScaling;\n#endif\n#endif\n#if defined(X3D_LIGHTING)\nfor(int i=0;i<X3D_NUM_LIGHTS;++i){x3d_LightSourceParameters light=x3d_LightSource[i];vec3 pointToLight;float distanceToLight;if(light.type!=x3d_DirectionalLight){pointToLight=light.location-vertex;distanceToLight=length(light.matrix*pointToLight);}else{pointToLight=-light.direction;distanceToLight=-1.;}if(distanceToLight<=light.radius||light.radius<0.){vec3 l=normalize(pointToLight);vec3 h=normalize(l+v);float NdotL=clamp(dot(n,l),0.,1.);float VdotH=clamp(dot(v,h),0.,1.);vec3 dielectric_fresnel=F_Schlick(materialInfo.f0_dielectric*materialInfo.specularWeight,materialInfo.f90_dielectric,abs(VdotH));vec3 l_diffuse=vec3(0);vec3 l_specular_dielectric=vec3(0);vec3 l_dielectric_brdf=vec3(0);\n#if defined(X3D_DIFFUSE_TRANSMISSION_MATERIAL_EXT)\nvec3 lightIntensity=getLightIntensity(light,l,distanceToLight);l_diffuse=lightIntensity*NdotL*BRDF_lambertian(materialInfo.diffuseTransmissionColorFactor)*singleScatter;if(dot(n,l)<0.){float diffuseNdotL=clamp(dot(-n,l),0.,1.);vec3 diffuse_btdf=lightIntensity*diffuseNdotL*BRDF_lambertian(materialInfo.diffuseTransmissionColorFactor);vec3 l_mirror=normalize(reflect(l,n));float diffuseVdotH=clamp(dot(v,normalize(l_mirror+v)),0.,1.);dielectric_fresnel=F_Schlick(materialInfo.f0_dielectric*materialInfo.specularWeight,materialInfo.f90_dielectric,abs(diffuseVdotH));\n#if defined(X3D_VOLUME_MATERIAL_EXT)\ndiffuse_btdf=applyVolumeAttenuation(diffuse_btdf,diffuseTransmissionThickness,materialInfo.attenuationColor,materialInfo.attenuationDistance);\n#endif\nl_diffuse+=diffuse_btdf*(1.-singleScatter)*singleScatter;}l_diffuse*=materialInfo.diffuseTransmissionFactor;\n#endif\n#if defined(X3D_SHEEN_MATERIAL_EXT)\nalbedoSheenScaling=min(1.-max3(materialInfo.sheenColorFactor)*albedoSheenScalingLUT(NdotV,materialInfo.sheenRoughnessFactor),1.-max3(materialInfo.sheenColorFactor)*albedoSheenScalingLUT(NdotL,materialInfo.sheenRoughnessFactor));\n#endif\nl_dielectric_brdf=mix(l_diffuse,l_specular_dielectric,dielectric_fresnel);frontColor+=l_dielectric_brdf*albedoSheenScaling;}}\n#endif\nreturn vec4(frontColor,x3d_ScatterMaterialIdEXT);}"),We=a().add("SubsurfaceScattering2.glsl",()=>"\n#if defined(X3D_VOLUME_SCATTER_MATERIAL_EXT)\nvec3 multiToSingleScatter(const in vec3 multiscatterColor){vec3 s=4.09712+4.20863*multiscatterColor-sqrt(9.59217+(41.6808+17.7126*multiscatterColor)*multiscatterColor);return 1.-s*s;}\n#if!defined(X3D_VOLUME_SCATTER_PASS)\nuniform float x3d_ScatterAnisotropyEXT;uniform vec3 x3d_ScatterSamplesEXT[X3D_SCATTER_SAMPLES_COUNT_EXT];uniform float x3d_ScatterMinRadiusEXT;uniform sampler2D x3d_ScatterSamplerEXT;uniform sampler2D x3d_ScatterDepthSamplerEXT;const float M_1_PI=1./M_PI;vec3 burley_setup(const in vec3 radius,const in vec3 albedo){vec3 a=albedo-.8;vec3 s=1.9-albedo+3.5*(a*a);vec3 l=.25*M_1_PI*radius;return l/s;}vec3 burley_eval(const in vec3 d,const in float r){vec3 exp_r_3_d=exp(-r/(3.*d));vec3 exp_r_d=exp_r_3_d*exp_r_3_d*exp_r_3_d;return(exp_r_d+exp_r_3_d)/(4.*d);}vec3 getSubsurfaceScattering(const in vec3 vertex,const in mat4 projectionMatrix,const in float attenuationDistance,const in vec3 diffuseColor,const in vec3 multiscatterColor,const in vec4 fragCoord){vec3 scatterDistance=attenuationDistance*multiscatterColor;float maxColor=max3(scatterDistance);vec3 vMaxColor=max(vec3(maxColor),vec3(.00001));vec2 texelSize=1./vec2(x3d_Viewport.zw);mat4 invProjectionMatrix=inverse(projectionMatrix);vec2 uv=fragCoord.xy*texelSize;vec4 centerSample=textureLod(x3d_ScatterSamplerEXT,uv,0.);float centerDepth=textureLod(x3d_ScatterDepthSamplerEXT,uv,0.).r;centerDepth=centerDepth*2.-1.;vec2 clipUV=uv*2.-1.;vec4 clipSpacePosition=vec4(clipUV.xy,centerDepth,1.);vec4 upos=invProjectionMatrix*clipSpacePosition;vec3 fragViewPosition=upos.xyz/upos.w;upos=invProjectionMatrix*vec4(clipUV.x+texelSize.x,clipUV.y,centerDepth,1.);vec3 offsetViewPosition=upos.xyz/upos.w;float mPerPixel=distance(fragViewPosition,offsetViewPosition);float maxRadiusPixels=maxColor/mPerPixel;if(maxRadiusPixels<=1.)return centerSample.rgb;centerDepth=fragViewPosition.z;vec3 totalWeight=vec3(0);vec3 totalDiffuse=vec3(0);vec3 clampedScatterDistance=max(vec3(x3d_ScatterMinRadiusEXT),scatterDistance/maxColor)*maxColor;vec3 d=burley_setup(clampedScatterDistance,vec3(1));for(int i=0;i<X3D_SCATTER_SAMPLES_COUNT_EXT;++i){vec3 scatterSample=x3d_ScatterSamplesEXT[i];float fabAngle=scatterSample.x;float r=scatterSample.y*maxRadiusPixels*texelSize.x;float rcpPdf=scatterSample.z;vec2 sampleCoords=vec2(cos(fabAngle),sin(fabAngle))*r;vec2 sampleUV=uv+sampleCoords;vec4 textureSample=textureLod(x3d_ScatterSamplerEXT,sampleUV,0.);if(centerSample.w!=textureSample.w)continue;float sampleDepth=textureLod(x3d_ScatterDepthSamplerEXT,sampleUV,0.).r;sampleDepth=sampleDepth*2.-1.;vec2 sampleClipUV=sampleUV*2.-1.;vec4 sampleUpos=invProjectionMatrix*vec4(sampleClipUV.xy,sampleDepth,1.);vec3 sampleViewPosition=sampleUpos.xyz/sampleUpos.w;float sampleDistance=distance(sampleViewPosition,fragViewPosition);vec3 weight=burley_eval(d,sampleDistance)*rcpPdf;totalWeight+=weight;totalDiffuse+=weight*textureSample.rgb;}totalWeight=max(totalWeight,vec3(.0001));return totalDiffuse/totalWeight*diffuseColor;}\n#endif\n#endif\n");function Qe(e){R.call(this,e),this.addType(I().VolumeScatterMaterialExtension),this.multiscatterColorArray=new Float32Array(3)}v.add("VOLUME_SCATTER_MATERIAL_EXTENSION"),b().add("x3d_MultiscatterColorTextureEXT"),Ee().addIncludeFile("Scatter",Ke),Ee().addIncludeFile("SubsurfaceScattering",We),Object.assign(Object.setPrototypeOf(Qe.prototype,R.prototype),{initialize(){R.prototype.initialize.call(this),this._scatterStrength.addInterest("set_scatterStrength__",this),this._scatterStrengthTexture.addInterest("set_scatterStrengthTexture__",this),this._scatterAnisotropy.addInterest("set_scatterAnisotropy__",this),this._multiscatterColor.addInterest("set_multiscatterColor__",this),this._multiscatterColorTexture.addInterest("set_multiscatterColorTexture__",this),this.set_scatterStrength__(),this.set_scatterStrengthTexture__(),this.set_scatterAnisotropy__(),this.set_multiscatterColor__(),this.set_multiscatterColorTexture__()},set_scatterStrength__(){this.scatterStrength=D().clamp(this._scatterStrength.getValue(),0,1)},set_scatterStrengthTexture__(){this.scatterStrengthTextureNode=X()(I().X3DSingleTextureNode,this._scatterStrengthTexture),this.addTexture(0,this.scatterStrengthTextureNode)},set_scatterAnisotropy__(){this.scatterAnisotropy=D().clamp(this._scatterAnisotropy.getValue(),-1,1)},set_multiscatterColor__(){this.multiscatterColorArray.set(this._multiscatterColor.getValue())},set_multiscatterColorTexture__(){this.multiscatterColorTextureNode=X()(I().X3DSingleTextureNode,this._multiscatterColorTexture),this.addTexture(1,this.multiscatterColorTextureNode)},getExtensionKey:()=>v.VOLUME_SCATTER_MATERIAL_EXTENSION,getShaderOptions(e){e.push("X3D_VOLUME_SCATTER_MATERIAL_EXT"),e.push(`X3D_SCATTER_SAMPLES_COUNT_EXT ${Ye.SCATTER_SAMPLES_COUNT}`),+this.getTextureBits()&&(e.push("X3D_MATERIAL_TEXTURES"),this.scatterStrengthTextureNode?.getShaderOptions(e,"SCATTER_STRENGTH",!0),this.multiscatterColorTextureNode?.getShaderOptions(e,"MULTISCATTER_COLOR",!0))},getShaderUniforms(e){e.push("x3d_ScatterMaterialIdEXT"),e.push("x3d_ScatterStrengthEXT"),e.push("x3d_ScatterAnisotropyEXT"),e.push("x3d_MultiscatterColorEXT"),e.push("x3d_ScatterSamplesEXT"),e.push("x3d_ScatterMinRadiusEXT"),e.push("x3d_ScatterSamplerEXT"),e.push("x3d_ScatterDepthSamplerEXT")},setShaderUniforms(e,t,s,i){const n=this.getBrowser();if(this.scatterStrengthTextureNode?.setNamedShaderUniforms(e,t.x3d_ScatterStrengthTextureEXT,this._scatterStrengthTextureMapping.getValue(),s,i),this.multiscatterColorTextureNode?.setNamedShaderUniforms(e,t.x3d_MultiscatterColorTextureEXT,this._multiscatterColorTextureMapping.getValue(),s,i),t.volumeScatterPass)return e.uniform1f(t.x3d_ScatterMaterialIdEXT,n.getShapeId()),void e.uniform3fv(t.x3d_MultiscatterColorEXT,this.multiscatterColorArray);e.uniform1f(t.x3d_ScatterStrengthEXT,this.scatterStrength),e.uniform1f(t.x3d_ScatterAnisotropyEXT,this.scatterAnisotropy),e.uniform3fv(t.x3d_MultiscatterColorEXT,this.multiscatterColorArray),e.uniform3fv(t.x3d_ScatterSamplesEXT,Ye.SCATTER_SAMPLES),e.uniform1f(t.x3d_ScatterMinRadiusEXT,Ye.SCATTER_MIN_RADIUS);const r=n.getVolumeScatterBuffer(),o=n.popTextureUnit(),a=n.popTextureUnit(),u=r.getColorTexture(),l=r.getDepthTexture();e.activeTexture(e.TEXTURE0+o),e.bindTexture(e.TEXTURE_2D,u),e.uniform1i(t.x3d_ScatterSamplerEXT,o),e.activeTexture(e.TEXTURE0+a),e.bindTexture(e.TEXTURE_2D,l),e.uniform1i(t.x3d_ScatterDepthSamplerEXT,a)}}),Object.defineProperties(Qe,{...g().getStaticProperties("VolumeScatterMaterialExtension","X_ITE",1,"extensions","4.0"),fieldDefinitions:{value:new(x())([new(f())(I().inputOutput,"metadata",new(p().SFNode)),new(f())(I().inputOutput,"scatterStrength",new(p().SFFloat)),new(f())(I().inputOutput,"scatterStrengthTextureMapping",new(p().SFString)),new(f())(I().inputOutput,"scatterStrengthTexture",new(p().SFNode)),new(f())(I().inputOutput,"scatterAnisotropy",new(p().SFFloat)),new(f())(I().inputOutput,"multiscatterColor",new(p().SFColor)),new(f())(I().inputOutput,"multiscatterColorTextureMapping",new(p().SFString)),new(f())(I().inputOutput,"multiscatterColorTexture",new(p().SFNode))]),enumerable:!0}});const Ze=Qe,$e=a().add("VolumeScatterMaterialExtension",Ze);i().add({name:"X_ITE",concreteNodes:[V,z,Y,Q,J,se,re,fe,me,Ae,Me,Le,Pe,ke,ze,$e],abstractNodes:[R],browserContext:_});a().add("X_ITEComponent",void 0)})();
|
package/dist/example.html
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<meta charset="utf-8"/>
|
|
5
5
|
<script defer src="x_ite.min.js"></script>
|
|
6
6
|
<!-- or use: -->
|
|
7
|
-
<!-- <script defer src="https://cdn.jsdelivr.net/npm/x_ite@16.0.
|
|
7
|
+
<!-- <script defer src="https://cdn.jsdelivr.net/npm/x_ite@16.0.3/dist/x_ite.min.js"></script> -->
|
|
8
8
|
<style>
|
|
9
9
|
@import url("https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,400&family=Source+Sans+3:ital,wght@0,400&display=swap");
|
|
10
10
|
|
package/dist/x_ite.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
/* X_ITE v16.0.2 */:host,X3DCanvas{--red:#d71f1f;--orange-filter:brightness(0) saturate(100%) invert(71%) sepia(100%) saturate(1647%) hue-rotate(335deg) brightness(101%) contrast(101%);--text-color:#fff;--text-color-dark:#fff;--text-shadow-color:#000;--link-color:#ff9230;--logo-opacity:0.6;--progress-color:hsla(0,0%,100%,.5);--color1:#232528;--color2:#0d1015;--gradient:linear-gradient(180deg,rgba(35,37,40,.553) 0%,rgba(13,16,21,.831));--border:4px solid rgba(43,45,47,.675);--tint-color:rgba(0,0,0,.382);--icon-filter:none}@media (prefers-color-scheme:light){:host(:not([theme=dark])),X3DCanvas:not([theme=dark]){--red:#e12b2b;--orange-filter:brightness(0) saturate(100%) invert(71%) sepia(100%) saturate(2647%) hue-rotate(335deg) brightness(70%) contrast(121%);--text-color:#000;--text-shadow-color:#fff;--link-color:var(--red);--logo-opacity:0.8;--progress-color:rgba(0,0,0,.6);--color1:#f7f7fc;--color2:#dedde2;--gradient:linear-gradient(180deg,rgba(247,247,252,.642) 0%,hsla(252,8%,88%,.6));--border:4px solid rgba(229,229,234,.66);--tint-color:hsla(0,0%,100%,.382);--icon-filter:invert(100%)}}:host([theme=light]),X3DCanvas[theme=light]{--red:#e12b2b;--orange-filter:brightness(0) saturate(100%) invert(71%) sepia(100%) saturate(2647%) hue-rotate(335deg) brightness(70%) contrast(121%);--text-color:#000;--text-shadow-color:#fff;--link-color:var(--red);--logo-opacity:0.8;--progress-color:rgba(0,0,0,.6);--color1:#f7f7fc;--color2:#dedde2;--gradient:linear-gradient(180deg,rgba(247,247,252,.642) 0%,hsla(252,8%,88%,.6));--border:4px solid rgba(229,229,234,.66);--tint-color:hsla(0,0%,100%,.382);--icon-filter:invert(100%)}:host,X3DCanvas{border:0;border-radius:0;display:inline-block;height:150px;margin:0;outline:none;overflow:hidden;padding:0;-webkit-user-select:none;user-select:none;width:300px}:host([hidden]){display:none}:host(.x_ite-fullscreen),X3DCanvas.x_ite-fullscreen{height:100vh!important;width:100vw!important}X3DCanvas>:not(.x_ite-private-browser,.x_ite-private-menu){display:none}.x_ite-private-browser{overflow:hidden;position:relative;-webkit-user-select:none;user-select:none;width:100%}.x_ite-private-browser,.x_ite-private-canvas,.x_ite-private-surface{border:0;border-radius:0;height:100%;margin:0;outline:none;padding:0}.x_ite-private-canvas{display:block;width:100%}.x_ite-private-notification{backdrop-filter:blur(8px);background:var(--gradient);background-clip:padding-box;border:var(--border);border-radius:5px;color:var(--text-color);font-family:X_ITE PT Sans,sans-serif;font-size:10pt;letter-spacing:unset;line-height:1;padding:5px 5px 3px;pointer-events:none;position:absolute;right:-4px;top:20px;white-space:pre}.x_ite-private-notification span{background:url(assets/images/logo.svg) no-repeat top -1px left 0;background-size:17px 17px;display:inline-block;padding:0 24px 2px 20px;position:relative;top:-1px}.x_ite-private-browser-timings{backdrop-filter:blur(8px);background:var(--gradient);background-clip:padding-box;border-radius:5px;border-right:var(--border);border-top:var(--border);bottom:-4px;color:var(--text-color);font-family:X_ITE PT Sans,sans-serif;font-size:9pt;left:-4px;padding:7px 15px 14px 14px;pointer-events:none;position:absolute;white-space:pre}.x_ite-private-browser-timings :is(table,thead,tbody,tfoot,tr,th,td){background:none;border:0;border-radius:0;box-sizing:border-box;color:var(--text-color);font-size:inherit;font-style:normal;font-weight:400;letter-spacing:unset;line-height:1;margin:0;outline:0;padding:0;text-align:left}.x_ite-private-browser-timings table{border-collapse:separate;border-spacing:2px;empty-cells:show;max-width:100%;overflow:hidden;width:100%}.x_ite-private-browser-timings thead th{background:url(assets/images/schedule.svg) no-repeat -1px -1px;background-size:17px 17px;color:var(--text-color-dark);filter:var(--icon-filter);font-weight:700;padding-bottom:5px;padding-left:20px;padding-top:3px}.x_ite-private-browser-timings td:first-child{padding-right:10px}.x_ite-private-browser-timings table.more tr.x_ite-private-more td{padding-bottom:5px}.x_ite-private-browser-timings table.less tr.x_ite-private-more~tr{display:none}.x_ite-private-browser-timings td{padding-bottom:2px}.x_ite-private-browser-timings td.pointer{pointer-events:all}.x_ite-private-browser-timings tfoot td:first-child{padding-right:0}.x_ite-private-browser-timings tfoot td{padding-top:4px}.x_ite-private-browser-timings button{background:var(--tint-color);border:0;border-radius:10px;box-sizing:border-box;color:var(--text-color);cursor:pointer;font-family:X_ITE PT Sans,sans-serif;font-size:9pt;font-style:italic;height:14pt;letter-spacing:unset;line-height:1.1;padding:0;pointer-events:all;text-align:center;width:100%}.x_ite-private-world-info-overlay{inset:0;position:absolute}.x_ite-private-world-info{backdrop-filter:blur(8px);background:var(--gradient);background-clip:padding-box;border:var(--border);border-radius:15px;inset:0;margin:21pt;overflow-y:auto;padding:0 21pt 21pt;position:absolute}.x_ite-private-world-info .x_ite-private-world-info-buttons{border-bottom:4px solid var(--tint-color);margin-bottom:12pt}.x_ite-private-world-info button{background:none;border:none;color:var(--text-color);height:21pt;width:100pt}.x_ite-private-world-info button:hover{background-color:var(--tint-color)}.x_ite-private-world-info button.active{font-weight:700}.x_ite-private-world-info :is(.x_ite-private-world-info-top,.x_ite-private-world-info-title,.x_ite-private-world-info-info,p){background:none;border:0;border-radius:0;box-sizing:border-box;color:var(--text-color);font-family:X_ITE PT Sans,sans-serif;font-size:inherit;font-style:normal;font-weight:inherit;letter-spacing:unset;line-height:1.3;margin:0;outline:0;padding:0;text-align:left}.x_ite-private-world-info .x_ite-private-world-info-top{font-size:9pt;font-style:italic;font-weight:700;margin:.3em 0}.x_ite-private-world-info .x_ite-private-world-info-title{font-size:21pt;font-weight:700;margin:.3em 0;overflow-wrap:break-word;word-break:break-word}.x_ite-private-world-info .x_ite-private-world-info-info,.x_ite-private-world-info .x_ite-private-world-info-info p{font-size:14pt;margin:.5em 0;overflow-wrap:break-word;word-break:break-word}.x_ite-private-world-info table{border-collapse:collapse;line-height:1.3;margin:.5em 0;width:100%}.x_ite-private-world-info tr:nth-child(odd){background-color:var(--tint-color)}.x_ite-private-world-info td:first-child{min-width:60px}.x_ite-private-world-info td{color:var(--text-color);font-size:12pt;overflow-wrap:break-word;padding:4pt;vertical-align:top;word-break:break-word}.x_ite-private-world-info a{color:var(--link-color)}.x_ite-private-menu.context-menu-layer{inset:0;position:fixed;z-index:10000}.x_ite-private-menu .context-menu-list,.x_ite-private-menu.context-menu-list{border:4px solid transparent;border-radius:5px;box-sizing:border-box;color:var(--text-color);font-family:X_ITE PT Sans,sans-serif;font-size:10pt;line-height:1.2;list-style-type:none;margin:0 0 0 1px;min-width:120px;overscroll-behavior:none;padding:5px 10px 4px 9px;white-space:pre}.x_ite-private-menu.context-menu-list{isolation:isolate;position:fixed;z-index:10000}.x_ite-private-menu .context-menu-list{display:none;position:absolute;top:-13px}.x_ite-private-menu .context-menu-background{backdrop-filter:blur(8px);background:var(--gradient);background-clip:padding-box;border:var(--border);border-radius:5px;box-sizing:border-box;inset:0;margin:0 0 0 1px;min-width:120px;padding:5px 10px 9px 9px;position:absolute}.x_ite-private-menu .context-menu-item{border-radius:5px;cursor:pointer;font-size:10pt;letter-spacing:unset;line-height:1;margin:0;margin:0 4px;position:relative;text-align:left}.x_ite-private-menu .context-menu-item:first-of-type{margin-top:4px}.x_ite-private-menu .context-menu-item:last-of-type{margin-bottom:4px}.x_ite-private-menu .context-menu-item:hover:not(.context-menu-not-selectable){background-color:var(--red)}.x_ite-private-menu .context-menu-item:hover>.context-menu-list{display:block}.x_ite-private-menu .context-menu-not-selectable{cursor:default}.x_ite-private-menu .context-menu-separator{border-bottom:1px solid #8a8a8a;border-top:0;cursor:default;margin:2px 0;padding-bottom:0;padding-top:0}.x_ite-private-menu .context-menu-separator+.context-menu-separator{display:none!important}.x_ite-private-menu .context-menu-submenu:after{border-color:transparent transparent transparent #e8eaed;border-style:solid;border-width:4px 0 4px 5px;content:"";display:block;filter:var(--icon-filter);height:0;margin-right:2px;position:absolute;right:0;top:8px;width:0}.x_ite-private-menu .context-menu-item>span,.x_ite-private-menu label{display:block;padding:5px 24px;width:100%}.x_ite-private-menu label{box-sizing:border-box;cursor:pointer;font-size:10pt;font-weight:400;letter-spacing:unset;line-height:1;margin:0}.x_ite-private-menu label span{color:var(--text-color-dark);filter:var(--icon-filter)}.x_ite-private-menu label:has(>input[type=radio]:checked){font-weight:700}.x_ite-private-menu label>*{font-size:10pt;letter-spacing:unset;line-height:1;vertical-align:top}.x_ite-private-menu input{all:revert;appearance:none;cursor:pointer}.x_ite-private-menu input[type=checkbox],.x_ite-private-menu input[type=radio]{background:url(assets/images/radio_button_unchecked.svg) no-repeat left 0 top 0;background-size:17px 17px;display:inline;display:inline-block;filter:var(--icon-filter);height:17px;margin:0 0 0 -22px;padding:0;position:absolute;top:3px;width:17px}.x_ite-private-menu input:checked{filter:var(--orange-filter)}.x_ite-private-menu .context-menu-input:hover input:checked{filter:var(--icon-filter)}.x_ite-private-menu input[type=checkbox]:checked{background-image:url(assets/images/check_circle.svg)}.x_ite-private-menu input[type=radio]:checked{background-image:url(assets/images/radio_button_checked.svg)}.x_ite-private-menu span{padding-left:0}.x_ite-private-menu .context-menu-title{font-weight:700}.x_ite-private-menu .context-menu-icon>span{background-position:2px 3px;background-repeat:no-repeat;background-size:17px 17px;color:var(--text-color-dark);display:block;filter:var(--icon-filter)}.x_ite-private-menu .context-menu-icon.x_ite-private-icon-logo>span{background-image:url(assets/images/logo.svg);background-position:2px 4px;color:var(--text-color);filter:none}.x_ite-private-icon-viewpoint>span{background-image:url(assets/images/eye_tracking.svg)}.x_ite-private-menu .x_ite-private-viewpoint input{background-image:none}.x_ite-private-menu .x_ite-private-viewpoint input:checked{background-image:url(assets/images/visibility.svg)}.x_ite-private-icon-viewer>span{background-image:url(assets/images/stadia_controller.svg)}.x_ite-private-menu .x_ite-private-examine-viewer :is(input,input:checked){background-image:url(assets/images/language.svg)}.x_ite-private-menu .x_ite-private-walk-viewer :is(input,input:checked){background-image:url(assets/images/directions_run.svg)}.x_ite-private-menu .x_ite-private-fly-viewer :is(input,input:checked){background-image:url(assets/images/travel.svg)}.x_ite-private-menu .x_ite-private-plane-viewer :is(input,input:checked){background-image:url(assets/images/border_all.svg)}.x_ite-private-menu .x_ite-private-lookat-viewer :is(input,input:checked){background-image:url(assets/images/point_scan.svg)}.x_ite-private-menu .x_ite-private-none-viewer :is(input,input:checked){background-image:url(assets/images/block.svg)}.x_ite-private-icon-primitive-quality>span{background-image:url(assets/images/hexagon.svg)}.x_ite-private-icon-texture-quality>span{background-image:url(assets/images/texture.svg)}.x_ite-private-icon-shading>span{background-image:url(assets/images/stroke_partial.svg)}.x_ite-private-icon-animations>span{background-image:url(assets/images/animation.svg)}.x_ite-private-icon-play>span{background-image:url(assets/images/play_circle.svg)}.x_ite-private-icon-stop>span{background-image:url(assets/images/stop_circle.svg)}.x_ite-private-icon-enter-fullscreen>span{background-image:url(assets/images/fullscreen.svg)}.x_ite-private-icon-leave-fullscreen>span{background-image:url(assets/images/fullscreen_exit.svg)}.x_ite-private-icon-world-info>span{background-image:url(assets/images/globe.svg)}.x_ite-private-icon-info>span{background-image:url(assets/images/info.svg)}.x_ite-private-splash-screen{background:radial-gradient(ellipse at center,var(--color1) 0,var(--color2) 100%);inset:0;pointer-events:none;position:absolute}.x_ite-private-spinner{--size:160px;--center-x:calc(var(--size)*0.44727);--center-y:calc(var(--size)*0.52637);animation:x_ite-spinner-animation 32s linear infinite;background:url(assets/images/logo.svg) no-repeat;background-size:var(--size) var(--size);height:var(--size);left:calc(50% - var(--size)/2 + var(--size)/2 - var(--center-x));opacity:var(--logo-opacity);position:absolute;top:calc(50% - var(--size)/2 + var(--size)/2 - var(--center-y));transform-origin:var(--center-x) var(--center-y);width:var(--size)}@keyframes x_ite-spinner-animation{to{transform:rotate(1turn)}}.x_ite-private-progress{left:calc(50% - 100px);position:absolute;top:calc(50% - 39pt);width:200px}.x_ite-private-x_ite{color:var(--text-color);font-family:X_ITE PT Sans,sans-serif;font-size:28pt;text-align:center;text-shadow:1px 1px 0 var(--text-shadow-color)}.x_ite-private-x_ite b{font-family:X_ITE PT Sans,sans-serif;font-weight:700}.x_ite-private-spinner-text{color:var(--text-color);font-family:X_ITE PT Sans,sans-serif;font-size:11pt;text-align:center;text-shadow:1px 1px 0 var(--text-shadow-color)}.x_ite-private-progressbar{border-left:2px solid var(--progress-color);border-right:2px solid var(--progress-color);margin:8px;padding:0 2px;text-align:left}.x_ite-private-progressbar div{background:var(--progress-color);height:6px;width:0}.x_ite-private-buttons{bottom:10px;display:flex;gap:8px;height:18px;position:absolute;right:10px}.x_ite-private-button{align-self:center;background:no-repeat;cursor:pointer;transition:transform .2s ease-in-out}.x_ite-private-button:hover{transform:scale(1.2)}.x_ite-private-no-sound-button{background-image:url(assets/images/no_sound.svg);background-size:32px 32px;height:32px;order:1;width:32px}.x_ite-private-xr-button{background-image:url(assets/images/xr.svg);height:18px;order:2;width:32px}.x_ite-private-hidden{opacity:0;visibility:hidden}.x_ite-private-fade-out-splash-screen{opacity:0;transition:visibility 0s .2s,opacity .2s ease-in-out;visibility:hidden}.x_ite-private-fade-in-300{opacity:1;transition:opacity .3s ease-in-out;visibility:visible}.x_ite-private-fade-out-300{opacity:0;transition:visibility 0s .3s,opacity .3s ease-in-out;visibility:hidden}
|
|
1
|
+
/* X_ITE v16.0.3 */:host,X3DCanvas{--red:#d71f1f;--orange-filter:brightness(0) saturate(100%) invert(71%) sepia(100%) saturate(1647%) hue-rotate(335deg) brightness(101%) contrast(101%);--text-color:#fff;--text-color-dark:#fff;--text-shadow-color:#000;--link-color:#ff9230;--logo-opacity:0.6;--progress-color:hsla(0,0%,100%,.5);--color1:#232528;--color2:#0d1015;--gradient:linear-gradient(180deg,rgba(35,37,40,.553) 0%,rgba(13,16,21,.831));--border:4px solid rgba(43,45,47,.675);--tint-color:rgba(0,0,0,.382);--icon-filter:none}@media (prefers-color-scheme:light){:host(:not([theme=dark])),X3DCanvas:not([theme=dark]){--red:#e12b2b;--orange-filter:brightness(0) saturate(100%) invert(71%) sepia(100%) saturate(2647%) hue-rotate(335deg) brightness(70%) contrast(121%);--text-color:#000;--text-shadow-color:#fff;--link-color:var(--red);--logo-opacity:0.8;--progress-color:rgba(0,0,0,.6);--color1:#f7f7fc;--color2:#dedde2;--gradient:linear-gradient(180deg,rgba(247,247,252,.642) 0%,hsla(252,8%,88%,.6));--border:4px solid rgba(229,229,234,.66);--tint-color:hsla(0,0%,100%,.382);--icon-filter:invert(100%)}}:host([theme=light]),X3DCanvas[theme=light]{--red:#e12b2b;--orange-filter:brightness(0) saturate(100%) invert(71%) sepia(100%) saturate(2647%) hue-rotate(335deg) brightness(70%) contrast(121%);--text-color:#000;--text-shadow-color:#fff;--link-color:var(--red);--logo-opacity:0.8;--progress-color:rgba(0,0,0,.6);--color1:#f7f7fc;--color2:#dedde2;--gradient:linear-gradient(180deg,rgba(247,247,252,.642) 0%,hsla(252,8%,88%,.6));--border:4px solid rgba(229,229,234,.66);--tint-color:hsla(0,0%,100%,.382);--icon-filter:invert(100%)}:host,X3DCanvas{border:0;border-radius:0;display:inline-block;height:150px;margin:0;outline:none;overflow:hidden;padding:0;-webkit-user-select:none;user-select:none;width:300px}:host([hidden]){display:none}:host(.x_ite-fullscreen),X3DCanvas.x_ite-fullscreen{height:100vh!important;width:100vw!important}X3DCanvas>:not(.x_ite-private-browser,.x_ite-private-menu){display:none}.x_ite-private-browser{overflow:hidden;position:relative;-webkit-user-select:none;user-select:none;width:100%}.x_ite-private-browser,.x_ite-private-canvas,.x_ite-private-surface{border:0;border-radius:0;height:100%;margin:0;outline:none;padding:0}.x_ite-private-canvas{display:block;width:100%}.x_ite-private-notification{backdrop-filter:blur(8px);background:var(--gradient);background-clip:padding-box;border:var(--border);border-radius:5px;color:var(--text-color);font-family:X_ITE PT Sans,sans-serif;font-size:10pt;letter-spacing:unset;line-height:1;padding:5px 5px 3px;pointer-events:none;position:absolute;right:-4px;top:20px;white-space:pre}.x_ite-private-notification span{background:url(assets/images/logo.svg) no-repeat top -1px left 0;background-size:17px 17px;display:inline-block;padding:0 24px 2px 20px;position:relative;top:-1px}.x_ite-private-browser-timings{backdrop-filter:blur(8px);background:var(--gradient);background-clip:padding-box;border-radius:5px;border-right:var(--border);border-top:var(--border);bottom:-4px;color:var(--text-color);font-family:X_ITE PT Sans,sans-serif;font-size:9pt;left:-4px;padding:7px 15px 14px 14px;pointer-events:none;position:absolute;white-space:pre}.x_ite-private-browser-timings :is(table,thead,tbody,tfoot,tr,th,td){background:none;border:0;border-radius:0;box-sizing:border-box;color:var(--text-color);font-size:inherit;font-style:normal;font-weight:400;letter-spacing:unset;line-height:1;margin:0;outline:0;padding:0;text-align:left}.x_ite-private-browser-timings table{border-collapse:separate;border-spacing:2px;empty-cells:show;max-width:100%;overflow:hidden;width:100%}.x_ite-private-browser-timings thead th{background:url(assets/images/schedule.svg) no-repeat -1px -1px;background-size:17px 17px;color:var(--text-color-dark);filter:var(--icon-filter);font-weight:700;padding-bottom:5px;padding-left:20px;padding-top:3px}.x_ite-private-browser-timings td:first-child{padding-right:10px}.x_ite-private-browser-timings table.more tr.x_ite-private-more td{padding-bottom:5px}.x_ite-private-browser-timings table.less tr.x_ite-private-more~tr{display:none}.x_ite-private-browser-timings td{padding-bottom:2px}.x_ite-private-browser-timings td.pointer{pointer-events:all}.x_ite-private-browser-timings tfoot td:first-child{padding-right:0}.x_ite-private-browser-timings tfoot td{padding-top:4px}.x_ite-private-browser-timings button{background:var(--tint-color);border:0;border-radius:10px;box-sizing:border-box;color:var(--text-color);cursor:pointer;font-family:X_ITE PT Sans,sans-serif;font-size:9pt;font-style:italic;height:14pt;letter-spacing:unset;line-height:1.1;padding:0;pointer-events:all;text-align:center;width:100%}.x_ite-private-world-info-overlay{inset:0;position:absolute}.x_ite-private-world-info{backdrop-filter:blur(8px);background:var(--gradient);background-clip:padding-box;border:var(--border);border-radius:15px;inset:0;margin:21pt;overflow-y:auto;padding:0 21pt 21pt;position:absolute}.x_ite-private-world-info .x_ite-private-world-info-buttons{border-bottom:4px solid var(--tint-color);margin-bottom:12pt}.x_ite-private-world-info button{background:none;border:none;color:var(--text-color);height:21pt;width:100pt}.x_ite-private-world-info button:hover{background-color:var(--tint-color)}.x_ite-private-world-info button.active{font-weight:700}.x_ite-private-world-info :is(.x_ite-private-world-info-top,.x_ite-private-world-info-title,.x_ite-private-world-info-info,p){background:none;border:0;border-radius:0;box-sizing:border-box;color:var(--text-color);font-family:X_ITE PT Sans,sans-serif;font-size:inherit;font-style:normal;font-weight:inherit;letter-spacing:unset;line-height:1.3;margin:0;outline:0;padding:0;text-align:left}.x_ite-private-world-info .x_ite-private-world-info-top{font-size:9pt;font-style:italic;font-weight:700;margin:.3em 0}.x_ite-private-world-info .x_ite-private-world-info-title{font-size:21pt;font-weight:700;margin:.3em 0;overflow-wrap:break-word;word-break:break-word}.x_ite-private-world-info .x_ite-private-world-info-info,.x_ite-private-world-info .x_ite-private-world-info-info p{font-size:14pt;margin:.5em 0;overflow-wrap:break-word;word-break:break-word}.x_ite-private-world-info table{border-collapse:collapse;line-height:1.3;margin:.5em 0;width:100%}.x_ite-private-world-info tr:nth-child(odd){background-color:var(--tint-color)}.x_ite-private-world-info td:first-child{min-width:60px}.x_ite-private-world-info td{color:var(--text-color);font-size:12pt;overflow-wrap:break-word;padding:4pt;vertical-align:top;word-break:break-word}.x_ite-private-world-info a{color:var(--link-color)}.x_ite-private-menu.context-menu-layer{inset:0;position:fixed;z-index:10000}.x_ite-private-menu .context-menu-list,.x_ite-private-menu.context-menu-list{border:4px solid transparent;border-radius:5px;box-sizing:border-box;color:var(--text-color);font-family:X_ITE PT Sans,sans-serif;font-size:10pt;line-height:1.2;list-style-type:none;margin:0 0 0 1px;min-width:120px;overscroll-behavior:none;padding:5px 10px 4px 9px;white-space:pre}.x_ite-private-menu.context-menu-list{isolation:isolate;position:fixed;z-index:10000}.x_ite-private-menu .context-menu-list{display:none;position:absolute;top:-13px}.x_ite-private-menu .context-menu-background{backdrop-filter:blur(8px);background:var(--gradient);background-clip:padding-box;border:var(--border);border-radius:5px;box-sizing:border-box;inset:0;margin:0 0 0 1px;min-width:120px;padding:5px 10px 9px 9px;position:absolute}.x_ite-private-menu .context-menu-item{border-radius:5px;cursor:pointer;font-size:10pt;letter-spacing:unset;line-height:1;margin:0;margin:0 4px;position:relative;text-align:left}.x_ite-private-menu .context-menu-item:first-of-type{margin-top:4px}.x_ite-private-menu .context-menu-item:last-of-type{margin-bottom:4px}.x_ite-private-menu .context-menu-item:hover:not(.context-menu-not-selectable){background-color:var(--red)}.x_ite-private-menu .context-menu-item:hover>.context-menu-list{display:block}.x_ite-private-menu .context-menu-not-selectable{cursor:default}.x_ite-private-menu .context-menu-separator{border-bottom:1px solid #8a8a8a;border-top:0;cursor:default;margin:2px 0;padding-bottom:0;padding-top:0}.x_ite-private-menu .context-menu-separator+.context-menu-separator{display:none!important}.x_ite-private-menu .context-menu-submenu:after{border-color:transparent transparent transparent #e8eaed;border-style:solid;border-width:4px 0 4px 5px;content:"";display:block;filter:var(--icon-filter);height:0;margin-right:2px;position:absolute;right:0;top:8px;width:0}.x_ite-private-menu .context-menu-item>span,.x_ite-private-menu label{display:block;padding:5px 24px;width:100%}.x_ite-private-menu label{box-sizing:border-box;cursor:pointer;font-size:10pt;font-weight:400;letter-spacing:unset;line-height:1;margin:0}.x_ite-private-menu label span{color:var(--text-color-dark);filter:var(--icon-filter)}.x_ite-private-menu label:has(>input[type=radio]:checked){font-weight:700}.x_ite-private-menu label>*{font-size:10pt;letter-spacing:unset;line-height:1;vertical-align:top}.x_ite-private-menu input{all:revert;appearance:none;cursor:pointer}.x_ite-private-menu input[type=checkbox],.x_ite-private-menu input[type=radio]{background:url(assets/images/radio_button_unchecked.svg) no-repeat left 0 top 0;background-size:17px 17px;display:inline;display:inline-block;filter:var(--icon-filter);height:17px;margin:0 0 0 -22px;padding:0;position:absolute;top:3px;width:17px}.x_ite-private-menu input:checked{filter:var(--orange-filter)}.x_ite-private-menu .context-menu-input:hover input:checked{filter:var(--icon-filter)}.x_ite-private-menu input[type=checkbox]:checked{background-image:url(assets/images/check_circle.svg)}.x_ite-private-menu input[type=radio]:checked{background-image:url(assets/images/radio_button_checked.svg)}.x_ite-private-menu span{padding-left:0}.x_ite-private-menu .context-menu-title{font-weight:700}.x_ite-private-menu .context-menu-icon>span{background-position:2px 3px;background-repeat:no-repeat;background-size:17px 17px;color:var(--text-color-dark);display:block;filter:var(--icon-filter)}.x_ite-private-menu .context-menu-icon.x_ite-private-icon-logo>span{background-image:url(assets/images/logo.svg);background-position:2px 4px;color:var(--text-color);filter:none}.x_ite-private-icon-viewpoint>span{background-image:url(assets/images/eye_tracking.svg)}.x_ite-private-menu .x_ite-private-viewpoint input{background-image:none}.x_ite-private-menu .x_ite-private-viewpoint input:checked{background-image:url(assets/images/visibility.svg)}.x_ite-private-icon-viewer>span{background-image:url(assets/images/stadia_controller.svg)}.x_ite-private-menu .x_ite-private-examine-viewer :is(input,input:checked){background-image:url(assets/images/language.svg)}.x_ite-private-menu .x_ite-private-walk-viewer :is(input,input:checked){background-image:url(assets/images/directions_run.svg)}.x_ite-private-menu .x_ite-private-fly-viewer :is(input,input:checked){background-image:url(assets/images/travel.svg)}.x_ite-private-menu .x_ite-private-plane-viewer :is(input,input:checked){background-image:url(assets/images/border_all.svg)}.x_ite-private-menu .x_ite-private-lookat-viewer :is(input,input:checked){background-image:url(assets/images/point_scan.svg)}.x_ite-private-menu .x_ite-private-none-viewer :is(input,input:checked){background-image:url(assets/images/block.svg)}.x_ite-private-icon-primitive-quality>span{background-image:url(assets/images/hexagon.svg)}.x_ite-private-icon-texture-quality>span{background-image:url(assets/images/texture.svg)}.x_ite-private-icon-shading>span{background-image:url(assets/images/stroke_partial.svg)}.x_ite-private-icon-animations>span{background-image:url(assets/images/animation.svg)}.x_ite-private-icon-play>span{background-image:url(assets/images/play_circle.svg)}.x_ite-private-icon-stop>span{background-image:url(assets/images/stop_circle.svg)}.x_ite-private-icon-enter-fullscreen>span{background-image:url(assets/images/fullscreen.svg)}.x_ite-private-icon-leave-fullscreen>span{background-image:url(assets/images/fullscreen_exit.svg)}.x_ite-private-icon-world-info>span{background-image:url(assets/images/globe.svg)}.x_ite-private-icon-info>span{background-image:url(assets/images/info.svg)}.x_ite-private-splash-screen{background:radial-gradient(ellipse at center,var(--color1) 0,var(--color2) 100%);inset:0;pointer-events:none;position:absolute}.x_ite-private-spinner{--size:160px;--center-x:calc(var(--size)*0.44727);--center-y:calc(var(--size)*0.52637);animation:x_ite-spinner-animation 32s linear infinite;background:url(assets/images/logo.svg) no-repeat;background-size:var(--size) var(--size);height:var(--size);left:calc(50% - var(--size)/2 + var(--size)/2 - var(--center-x));opacity:var(--logo-opacity);position:absolute;top:calc(50% - var(--size)/2 + var(--size)/2 - var(--center-y));transform-origin:var(--center-x) var(--center-y);width:var(--size)}@keyframes x_ite-spinner-animation{to{transform:rotate(1turn)}}.x_ite-private-progress{left:calc(50% - 100px);position:absolute;top:calc(50% - 39pt);width:200px}.x_ite-private-x_ite{color:var(--text-color);font-family:X_ITE PT Sans,sans-serif;font-size:28pt;text-align:center;text-shadow:1px 1px 0 var(--text-shadow-color)}.x_ite-private-x_ite b{font-family:X_ITE PT Sans,sans-serif;font-weight:700}.x_ite-private-spinner-text{color:var(--text-color);font-family:X_ITE PT Sans,sans-serif;font-size:11pt;text-align:center;text-shadow:1px 1px 0 var(--text-shadow-color)}.x_ite-private-progressbar{border-left:2px solid var(--progress-color);border-right:2px solid var(--progress-color);margin:8px;padding:0 2px;text-align:left}.x_ite-private-progressbar div{background:var(--progress-color);height:6px;width:0}.x_ite-private-buttons{bottom:10px;display:flex;gap:8px;height:18px;position:absolute;right:10px}.x_ite-private-button{align-self:center;background:no-repeat;cursor:pointer;transition:transform .2s ease-in-out}.x_ite-private-button:hover{transform:scale(1.2)}.x_ite-private-no-sound-button{background-image:url(assets/images/no_sound.svg);background-size:32px 32px;height:32px;order:1;width:32px}.x_ite-private-xr-button{background-image:url(assets/images/xr.svg);height:18px;order:2;width:32px}.x_ite-private-hidden{opacity:0;visibility:hidden}.x_ite-private-fade-out-splash-screen{opacity:0;transition:visibility 0s .2s,opacity .2s ease-in-out;visibility:hidden}.x_ite-private-fade-in-300{opacity:1;transition:opacity .3s ease-in-out;visibility:visible}.x_ite-private-fade-out-300{opacity:0;transition:visibility 0s .3s,opacity .3s ease-in-out;visibility:hidden}
|