x_ite 11.5.11 → 11.5.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/README.md +4 -4
  2. package/dist/assets/components/AnnotationComponent.js +2 -378
  3. package/dist/assets/components/AnnotationComponent.min.js +2 -2
  4. package/dist/assets/components/CADGeometryComponent.js +2 -378
  5. package/dist/assets/components/CADGeometryComponent.min.js +2 -2
  6. package/dist/assets/components/CubeMapTexturingComponent.js +4 -333
  7. package/dist/assets/components/CubeMapTexturingComponent.min.js +2 -2
  8. package/dist/assets/components/DISComponent.js +2 -331
  9. package/dist/assets/components/DISComponent.min.js +2 -2
  10. package/dist/assets/components/EventUtilitiesComponent.js +2 -472
  11. package/dist/assets/components/EventUtilitiesComponent.min.js +2 -2
  12. package/dist/assets/components/Geometry2DComponent.js +2 -707
  13. package/dist/assets/components/Geometry2DComponent.min.js +2 -2
  14. package/dist/assets/components/GeospatialComponent.js +4 -897
  15. package/dist/assets/components/GeospatialComponent.min.js +2 -2
  16. package/dist/assets/components/HAnimComponent.js +9 -338
  17. package/dist/assets/components/HAnimComponent.min.js +2 -2
  18. package/dist/assets/components/KeyDeviceSensorComponent.js +2 -237
  19. package/dist/assets/components/KeyDeviceSensorComponent.min.js +2 -2
  20. package/dist/assets/components/LayoutComponent.js +2 -425
  21. package/dist/assets/components/LayoutComponent.min.js +2 -2
  22. package/dist/assets/components/NURBSComponent.js +3 -896
  23. package/dist/assets/components/NURBSComponent.min.js +2 -2
  24. package/dist/assets/components/ParticleSystemsComponent.js +9 -715
  25. package/dist/assets/components/ParticleSystemsComponent.min.js +2 -2
  26. package/dist/assets/components/PickingComponent.js +2 -566
  27. package/dist/assets/components/PickingComponent.min.js +2 -2
  28. package/dist/assets/components/RigidBodyPhysicsComponent.js +2 -942
  29. package/dist/assets/components/RigidBodyPhysicsComponent.min.js +2 -2
  30. package/dist/assets/components/ScriptingComponent.js +2 -190
  31. package/dist/assets/components/ScriptingComponent.min.js +2 -2
  32. package/dist/assets/components/TextComponent.js +2 -379
  33. package/dist/assets/components/TextComponent.min.js +2 -2
  34. package/dist/assets/components/TextureProjectionComponent.js +8 -196
  35. package/dist/assets/components/TextureProjectionComponent.min.js +2 -2
  36. package/dist/assets/components/Texturing3DComponent.js +112 -676
  37. package/dist/assets/components/Texturing3DComponent.min.js +2 -2
  38. package/dist/assets/components/VolumeRenderingComponent.js +5 -900
  39. package/dist/assets/components/VolumeRenderingComponent.min.js +2 -2
  40. package/dist/assets/components/WebXRComponent.js +5 -145
  41. package/dist/assets/components/WebXRComponent.min.js +2 -2
  42. package/dist/assets/components/X_ITEComponent.js +18 -853
  43. package/dist/assets/components/X_ITEComponent.min.js +2 -2
  44. package/dist/assets/fonts/PT_Sans/OFL.txt +94 -94
  45. package/dist/assets/lib/libktx.js +1 -1
  46. package/dist/assets/lib/libktx.wasm +0 -0
  47. package/dist/example.html +1 -1
  48. package/dist/x_ite.css +1 -1
  49. package/dist/x_ite.js +51001 -70446
  50. package/dist/x_ite.min.js +2 -2
  51. package/dist/x_ite.min.mjs +2 -2
  52. package/dist/x_ite.mjs +50296 -69741
  53. package/dist/x_ite.zip +0 -0
  54. package/package.json +2 -2
@@ -1,2 +1,2 @@
1
- /* X_ITE v11.5.11 */
2
- const e=window[Symbol.for("X_ITE.X3D-11.5.11")];(()=>{var t={n:e=>{var s=e&&e.__esModule?()=>e.default:()=>e;return t.d(s,{a:s}),s},d:(e,s)=>{for(var i in s)t.o(s,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:s[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const s=e.Components;var i=t.n(s);const n=e.Fields;var r=t.n(n);const o=e.X3DFieldDefinition;var a=t.n(o);const u=e.FieldDefinitionArray;var h=t.n(u);const _=e.X3DNode;var c=t.n(_);const l=e.X3DConstants;var d=t.n(l);const p=e.BitSet;var T=t.n(p);const f=e.Namespace;var S=t.n(f);function x(e){c().call(this,e),this.addType(d().X3DMaterialExtensionNode),this.textureBits=new(T())}Object.assign(Object.setPrototypeOf(x.prototype,c().prototype),{setTexture(e,t){e*=4,this.textureBits.remove(e,15),this.textureBits.add(e,t?.getTextureBits()??0)},getTextureBits(){return this.textureBits}}),Object.defineProperties(x,c().getStaticProperties("X3DMaterialExtensionNode","X_ITE",1));const g=x,E=S().add("X3DMaterialExtensionNode",g),m=e.X3DCast;var O=t.n(m);let I=0;const N={add(e){this[e]=I++}},R=S().add("ExtensionKeys",N),A=e.MaterialTextures;var C=t.n(A);function w(e){E.call(this,e),this.addType(d().AnisotropyMaterialExtension),this._anisotropyRotation.setUnit("angle"),this.anisotropyArray=new Float32Array(3)}R.add("ANISOTROPY_MATERIAL_EXTENSION"),C().add("x3d_AnisotropyTextureEXT"),Object.assign(Object.setPrototypeOf(w.prototype,E.prototype),{initialize(){E.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]=Math.max(this._anisotropyStrength.getValue(),0)},set_anisotropyRotation__(){const e=this._anisotropyRotation.getValue();this.anisotropyArray[0]=Math.cos(e),this.anisotropyArray[1]=Math.sin(e)},set_anisotropyTexture__(){this.anisotropyTextureNode=O()(d().X3DSingleTextureNode,this._anisotropyTexture),this.setTexture(0,this.anisotropyTextureNode)},getExtensionKey:()=>R.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,n){e.uniform3fv(t.x3d_AnisotropyEXT,this.anisotropyArray),this.anisotropyTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_AnisotropyTextureEXT,this._anisotropyTextureMapping.getValue(),i,n)}}),Object.defineProperties(w,{...c().getStaticProperties("AnisotropyMaterialExtension","X_ITE",1,"extensions","4.0"),fieldDefinitions:{value:new(h())([new(a())(d().inputOutput,"metadata",new(r().SFNode)),new(a())(d().inputOutput,"anisotropyStrength",new(r().SFFloat)),new(a())(d().inputOutput,"anisotropyRotation",new(r().SFFloat)),new(a())(d().inputOutput,"anisotropyTextureMapping",new(r().SFString)),new(a())(d().inputOutput,"anisotropyTexture",new(r().SFNode))]),enumerable:!0}});const M=w,y=S().add("AnisotropyMaterialExtension",M),F=e.X3DAppearanceChildNode;var X=t.n(F);function D(e){X().call(this,e),this.addType(d().BlendMode),this.factorTypes=new Map,this.equationTypes=new Map}Object.assign(Object.setPrototypeOf(D.prototype,X().prototype),{initialize(){X().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&&t.MIN_EXT),this.equationTypes.set("MAX",e.MAX||t&&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(D,{...c().getStaticProperties("BlendMode","X_ITE",1,"blendMode","3.3"),fieldDefinitions:{value:new(h())([new(a())(d().inputOutput,"metadata",new(r().SFNode)),new(a())(d().inputOutput,"blendColor",new(r().SFColorRGBA)),new(a())(d().inputOutput,"sourceColorFactor",new(r().SFString)("SRC_ALPHA")),new(a())(d().inputOutput,"sourceAlphaFactor",new(r().SFString)("ONE")),new(a())(d().inputOutput,"destinationColorFactor",new(r().SFString)("ONE_MINUS_SRC_ALPHA")),new(a())(d().inputOutput,"destinationAlphaFactor",new(r().SFString)("ONE_MINUS_SRC_ALPHA")),new(a())(d().inputOutput,"colorEquation",new(r().SFString)("FUNC_ADD")),new(a())(d().inputOutput,"alphaEquation",new(r().SFString)("FUNC_ADD"))]),enumerable:!0}});const L=D,b=S().add("BlendMode",L),v=e.Algorithm;var U=t.n(v);function P(e){E.call(this,e),this.addType(d().ClearcoatMaterialExtension)}R.add("CLEARCOAT_MATERIAL_EXTENSION"),C().add("x3d_ClearcoatTextureEXT"),C().add("x3d_ClearcoatRoughnessTextureEXT"),C().add("x3d_ClearcoatNormalTextureEXT"),Object.assign(Object.setPrototypeOf(P.prototype,E.prototype),{initialize(){E.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=Math.max(this._clearcoat.getValue(),0)},set_clearcoatTexture__(){this.clearcoatTextureNode=O()(d().X3DSingleTextureNode,this._clearcoatTexture),this.setTexture(0,this.clearcoatTextureNode)},set_clearcoatRoughness__(){this.clearcoatRoughness=U().clamp(this._clearcoatRoughness.getValue(),0,1)},set_clearcoatRoughnessTexture__(){this.clearcoatRoughnessTextureNode=O()(d().X3DSingleTextureNode,this._clearcoatRoughnessTexture),this.setTexture(1,this.clearcoatRoughnessTextureNode)},set_clearcoatNormalTexture__(){this.clearcoatNormalTextureNode=O()(d().X3DSingleTextureNode,this._clearcoatNormalTexture),this.setTexture(2,this.clearcoatNormalTextureNode)},getExtensionKey:()=>R.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,n){e.uniform1f(t.x3d_ClearcoatEXT,this.clearcoat),e.uniform1f(t.x3d_ClearcoatRoughnessEXT,this.clearcoatRoughness),+this.getTextureBits()&&(this.clearcoatTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_ClearcoatTextureEXT,this._clearcoatTextureMapping.getValue(),i,n),this.clearcoatRoughnessTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_ClearcoatRoughnessTextureEXT,this._clearcoatRoughnessTextureMapping.getValue(),i,n),this.clearcoatNormalTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_ClearcoatNormalTextureEXT,this._clearcoatNormalTextureMapping.getValue(),i,n))}}),Object.defineProperties(P,{...c().getStaticProperties("ClearcoatMaterialExtension","X_ITE",1,"extensions","4.0"),fieldDefinitions:{value:new(h())([new(a())(d().inputOutput,"metadata",new(r().SFNode)),new(a())(d().inputOutput,"clearcoat",new(r().SFFloat)),new(a())(d().inputOutput,"clearcoatTextureMapping",new(r().SFString)),new(a())(d().inputOutput,"clearcoatTexture",new(r().SFNode)),new(a())(d().inputOutput,"clearcoatRoughness",new(r().SFFloat)),new(a())(d().inputOutput,"clearcoatRoughnessTextureMapping",new(r().SFString)),new(a())(d().inputOutput,"clearcoatRoughnessTexture",new(r().SFNode)),new(a())(d().inputOutput,"clearcoatNormalTextureMapping",new(r().SFString)),new(a())(d().inputOutput,"clearcoatNormalTexture",new(r().SFNode))]),enumerable:!0}});const V=P,B=S().add("ClearcoatMaterialExtension",V);function k(e){X().call(this,e),this.addType(d().DepthMode),this.addAlias("depthFunc",this._depthFunction)}Object.assign(Object.setPrototypeOf(k.prototype,X().prototype),{initialize(){X().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,{...c().getStaticProperties("DepthMode","X_ITE",1,"depthMode","4.0"),fieldDefinitions:{value:new(h())([new(a())(d().inputOutput,"metadata",new(r().SFNode)),new(a())(d().inputOutput,"polygonOffset",new(r().SFVec2f)),new(a())(d().inputOutput,"depthRange",new(r().SFVec2f)(0,1)),new(a())(d().inputOutput,"depthTest",new(r().SFBool)(!0)),new(a())(d().inputOutput,"depthFunction",new(r().SFString)("LESS_EQUAL")),new(a())(d().inputOutput,"depthMask",new(r().SFBool)(!0))]),enumerable:!0}});const G=k,j=S().add("DepthMode",G);function H(e){E.call(this,e),this.addType(d().DiffuseTransmissionMaterialExtension),this.diffuseTransmissionColorArray=new Float32Array(3)}R.add("DIFFUSE_TRANSMISSION_MATERIAL_EXTENSION"),C().add("x3d_DiffuseTransmissionTextureEXT"),C().add("x3d_DiffuseTransmissionColorTextureEXT"),Object.assign(Object.setPrototypeOf(H.prototype,E.prototype),{initialize(){E.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=U().clamp(this._diffuseTransmission.getValue(),0,1)},set_diffuseTransmissionTexture__(){this.diffuseTransmissionTextureNode=O()(d().X3DSingleTextureNode,this._diffuseTransmissionTexture),this.setTexture(0,this.diffuseTransmissionTextureNode)},set_diffuseTransmissionColor__(){this.diffuseTransmissionColorArray.set(this._diffuseTransmissionColor.getValue())},set_diffuseTransmissionColorTexture__(){this.diffuseTransmissionColorTextureNode=O()(d().X3DSingleTextureNode,this._diffuseTransmissionColorTexture),this.setTexture(1,this.diffuseTransmissionColorTextureNode)},getExtensionKey:()=>R.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,n){e.uniform1f(t.x3d_DiffuseTransmissionEXT,this.diffuseTransmission),e.uniform3fv(t.x3d_DiffuseTransmissionColorEXT,this.diffuseTransmissionColorArray),+this.getTextureBits()&&(this.diffuseTransmissionTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_DiffuseTransmissionTextureEXT,this._diffuseTransmissionTextureMapping.getValue(),i,n),this.diffuseTransmissionColorTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_DiffuseTransmissionColorTextureEXT,this._diffuseTransmissionColorTextureMapping.getValue(),i,n))}}),Object.defineProperties(H,{...c().getStaticProperties("DiffuseTransmissionMaterialExtension","X_ITE",1,"extensions","4.0"),fieldDefinitions:{value:new(h())([new(a())(d().inputOutput,"metadata",new(r().SFNode)),new(a())(d().inputOutput,"diffuseTransmission",new(r().SFFloat)),new(a())(d().inputOutput,"diffuseTransmissionTextureMapping",new(r().SFString)),new(a())(d().inputOutput,"diffuseTransmissionTexture",new(r().SFNode)),new(a())(d().inputOutput,"diffuseTransmissionColor",new(r().SFColor)(1,1,1)),new(a())(d().inputOutput,"diffuseTransmissionColorTextureMapping",new(r().SFString)),new(a())(d().inputOutput,"diffuseTransmissionColorTexture",new(r().SFNode))]),enumerable:!0}});const q=H,z=S().add("DiffuseTransmissionMaterialExtension",q);function Y(e){E.call(this,e),this.addType(d().DispersionMaterialExtension)}R.add("DISPERSION_MATERIAL_EXTENSION"),Object.assign(Object.setPrototypeOf(Y.prototype,E.prototype),{initialize(){E.prototype.initialize.call(this),this._dispersion.addInterest("set_dispersion__",this),this.set_dispersion__()},set_dispersion__(){this.dispersion=Math.max(this._dispersion.getValue(),0)},getExtensionKey:()=>R.DISPERSION_MATERIAL_EXTENSION,getShaderOptions(e){e.push("X3D_DISPERSION_MATERIAL_EXT")},getShaderUniforms(e){e.push("x3d_DispersionEXT")},setShaderUniforms(e,t,s,i,n){e.uniform1f(t.x3d_DispersionEXT,this.dispersion)}}),Object.defineProperties(Y,{...c().getStaticProperties("DispersionMaterialExtension","X_ITE",1,"extensions","4.0"),fieldDefinitions:{value:new(h())([new(a())(d().inputOutput,"metadata",new(r().SFNode)),new(a())(d().inputOutput,"dispersion",new(r().SFFloat))]),enumerable:!0}});const K=Y,Q=S().add("DispersionMaterialExtension",K);function W(e){E.call(this,e),this.addType(d().EmissiveStrengthMaterialExtension)}R.add("EMISSIVE_STRENGTH_MATERIAL_EXTENSION"),Object.assign(Object.setPrototypeOf(W.prototype,E.prototype),{initialize(){E.prototype.initialize.call(this),this._emissiveStrength.addInterest("set_emissiveStrength__",this),this.set_emissiveStrength__()},set_emissiveStrength__(){this.emissiveStrength=Math.max(this._emissiveStrength.getValue(),0)},getExtensionKey:()=>R.EMISSIVE_STRENGTH_MATERIAL_EXTENSION,getShaderOptions(e){e.push("X3D_EMISSIVE_STRENGTH_MATERIAL_EXT")},getShaderUniforms(e){e.push("x3d_EmissiveStrengthEXT")},setShaderUniforms(e,t,s,i,n){e.uniform1f(t.x3d_EmissiveStrengthEXT,this.emissiveStrength)}}),Object.defineProperties(W,{...c().getStaticProperties("EmissiveStrengthMaterialExtension","X_ITE",1,"extensions","4.0"),fieldDefinitions:{value:new(h())([new(a())(d().inputOutput,"metadata",new(r().SFNode)),new(a())(d().inputOutput,"emissiveStrength",new(r().SFFloat)(1))]),enumerable:!0}});const Z=W,$=S().add("EmissiveStrengthMaterialExtension",Z),J=e.X3DShapeNode;var ee=t.n(J);const te=e.VertexArray;var se=t.n(te);const ie=e.Matrix4;var ne=t.n(ie);const re=e.Box3;var oe=t.n(re);function ae(e){ee().call(this,e),this.addType(d().InstancedShape),this.addChildObjects(d().outputOnly,"matrices",new(r().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(ae.prototype,ee().prototype),{initialize(){ee().prototype.initialize.call(this);const e=this.getBrowser(),t=e.getContext();e.getContext().getVersion()<2||(this.instances=Object.assign(t.createBuffer(),{vertexArrayObject:new(se())(t),thickLinesVertexArrayObject:new(se())(t)}),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(oe());return function(){if(this.isDefaultBBoxSize())if(this.getGeometry()){this.bbox.set();const t=this.getGeometry().getBBox();for(const s of this.matrices)this.bbox.add(e.assign(t).multRight(s))}else this.bbox.set();else this.bbox.set(this._bboxSize.getValue(),this._bboxCenter.getValue());this.getBBoxSize().assign(this.bbox.size),this.getBBoxCenter().assign(this.bbox.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,h=n.length,_=r.length,c=Math.max(o,a,u,h,_),l=this.instancesStride/Float32Array.BYTES_PER_ELEMENT,d=this.instancesStride*c,p=new Float32Array(d);this.numInstances=c;for(let e=0,d=0;e<c;++e,d+=l){const c=this.matrices[e]??=new(ne());c.set(o?t[Math.min(e,o-1)].getValue():null,a?s[Math.min(e,a-1)].getValue():null,u?i[Math.min(e,u-1)].getValue():null,h?n[Math.min(e,h-1)].getValue():null,_?r[Math.min(e,_-1)].getValue():null),p.set(c,d),p.set(c.submatrix.transpose().inverse(),d+16)}this.matrices.length=c,e.bindBuffer(e.ARRAY_BUFFER,this.instances),e.bufferData(e.ARRAY_BUFFER,p,e.DYNAMIC_DRAW),this.set_bbox__(),this.set_objects__()},intersectsBox(e,t,s){},displaySimple(e,t,s){this.getGeometry().displaySimpleInstanced(e,s,this)},display(e,t){this.getGeometry().displayInstanced(e,t,this)}}),Object.defineProperties(ae,{...c().getStaticProperties("InstancedShape","X_ITE",1,"children","2.0"),fieldDefinitions:{value:new(h())([new(a())(d().inputOutput,"metadata",new(r().SFNode)),new(a())(d().inputOutput,"translations",new(r().MFVec3f)),new(a())(d().inputOutput,"rotations",new(r().MFRotation)),new(a())(d().inputOutput,"scales",new(r().MFVec3f)),new(a())(d().inputOutput,"scaleOrientations",new(r().MFRotation)),new(a())(d().inputOutput,"centers",new(r().MFVec3f)),new(a())(d().inputOutput,"pointerEvents",new(r().SFBool)(!0)),new(a())(d().inputOutput,"castShadow",new(r().SFBool)(!0)),new(a())(d().inputOutput,"visible",new(r().SFBool)(!0)),new(a())(d().inputOutput,"bboxDisplay",new(r().SFBool)),new(a())(d().initializeOnly,"bboxSize",new(r().SFVec3f)(-1,-1,-1)),new(a())(d().initializeOnly,"bboxCenter",new(r().SFVec3f)),new(a())(d().inputOutput,"appearance",new(r().SFNode)),new(a())(d().inputOutput,"geometry",new(r().SFNode))]),enumerable:!0}});const ue=ae,he=S().add("InstancedShape",ue);function _e(e){E.call(this,e),this.addType(d().IORMaterialExtension)}R.add("IOR_MATERIAL_EXTENSION"),Object.assign(Object.setPrototypeOf(_e.prototype,E.prototype),{initialize(){E.prototype.initialize.call(this),this._indexOfRefraction.addInterest("set_indexOfRefraction__",this),this.set_indexOfRefraction__()},set_indexOfRefraction__(){this.indexOfRefraction=Math.max(this._indexOfRefraction.getValue(),1)},getExtensionKey:()=>R.IOR_MATERIAL_EXTENSION,getShaderOptions(e){e.push("X3D_IOR_MATERIAL_EXT")},getShaderUniforms(e){e.push("x3d_IorEXT")},setShaderUniforms(e,t,s,i,n){e.uniform1f(t.x3d_IorEXT,this.indexOfRefraction)}}),Object.defineProperties(_e,{...c().getStaticProperties("IORMaterialExtension","X_ITE",1,"extensions","4.0"),fieldDefinitions:{value:new(h())([new(a())(d().inputOutput,"metadata",new(r().SFNode)),new(a())(d().inputOutput,"indexOfRefraction",new(r().SFFloat)(1.5))]),enumerable:!0}});const ce=_e,le=S().add("IORMaterialExtension",ce),de=e.ShaderRegistry;var pe=t.n(de);const Te=S().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){float phase=2.*M_PI*OPD*1.0e-9;vec3 val=vec3(5.4856e-13,4.4201e-13,5.2481e-13);vec3 pos=vec3(1.6810e+06,1.7953e+06,2.2084e+06);vec3 var=vec3(4.3278e+09,9.3046e+09,6.6121e+09);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 fe(e){E.call(this,e),this.addType(d().IridescenceMaterialExtension)}R.add("IRIDESCENCE_MATERIAL_EXTENSION"),pe().addInclude("Iridescence",Te),C().add("x3d_IridescenceTextureEXT"),C().add("x3d_IridescenceThicknessTextureEXT"),Object.assign(Object.setPrototypeOf(fe.prototype,E.prototype),{initialize(){E.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=Math.max(this._iridescence.getValue(),0)},set_iridescenceTexture__(){this.iridescenceTextureNode=O()(d().X3DSingleTextureNode,this._iridescenceTexture),this.setTexture(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=O()(d().X3DSingleTextureNode,this._iridescenceThicknessTexture),this.setTexture(1,this.iridescenceThicknessTextureNode)},getExtensionKey:()=>R.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,n){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,s,t.x3d_IridescenceTextureEXT,this._iridescenceTextureMapping.getValue(),i,n),this.iridescenceThicknessTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_IridescenceThicknessTextureEXT,this._iridescenceThicknessTextureMapping.getValue(),i,n))}}),Object.defineProperties(fe,{...c().getStaticProperties("IridescenceMaterialExtension","X_ITE",1,"extensions","4.0"),fieldDefinitions:{value:new(h())([new(a())(d().inputOutput,"metadata",new(r().SFNode)),new(a())(d().inputOutput,"iridescence",new(r().SFFloat)),new(a())(d().inputOutput,"iridescenceTextureMapping",new(r().SFString)),new(a())(d().inputOutput,"iridescenceTexture",new(r().SFNode)),new(a())(d().inputOutput,"iridescenceIndexOfRefraction",new(r().SFFloat)(1.3)),new(a())(d().inputOutput,"iridescenceThicknessMinimum",new(r().SFFloat)(100)),new(a())(d().inputOutput,"iridescenceThicknessMaximum",new(r().SFFloat)(400)),new(a())(d().inputOutput,"iridescenceThicknessTextureMapping",new(r().SFString)),new(a())(d().inputOutput,"iridescenceThicknessTexture",new(r().SFNode))]),enumerable:!0}});const Se=fe,xe=S().add("IridescenceMaterialExtension",Se);function ge(e){E.call(this,e),this.addType(d().SheenMaterialExtension),this.sheenColorArray=new Float32Array(3)}R.add("SHEEN_MATERIAL_EXTENSION"),C().add("x3d_SheenColorTextureEXT"),C().add("x3d_SheenRoughnessTextureEXT"),Object.assign(Object.setPrototypeOf(ge.prototype,E.prototype),{initialize(){E.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=O()(d().X3DSingleTextureNode,this._sheenColorTexture),this.setTexture(0,this.sheenColorTextureNode)},set_sheenRoughness__(){this.sheenRoughness=U().clamp(this._sheenRoughness.getValue(),0,1)},set_sheenRoughnessTexture__(){this.sheenRoughnessTextureNode=O()(d().X3DSingleTextureNode,this._sheenRoughnessTexture),this.setTexture(1,this.sheenRoughnessTextureNode)},getExtensionKey:()=>R.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,n){e.uniform3fv(t.x3d_SheenColorEXT,this.sheenColorArray),e.uniform1f(t.x3d_SheenRoughnessEXT,this.sheenRoughness);const r=this.getBrowser(),o=r.getLibraryTexture("lut_sheen_E.png"),a=r.getTexture2DUnit();e.activeTexture(e.TEXTURE0+a),e.bindTexture(e.TEXTURE_2D,o.getTexture()),e.uniform1i(t.x3d_SheenELUTTextureEXT,a),+this.getTextureBits()&&(this.sheenColorTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_SheenColorTextureEXT,this._sheenColorTextureMapping.getValue(),i,n),this.sheenRoughnessTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_SheenRoughnessTextureEXT,this._sheenRoughnessTextureMapping.getValue(),i,n))}}),Object.defineProperties(ge,{...c().getStaticProperties("SheenMaterialExtension","X_ITE",1,"extensions","4.0"),fieldDefinitions:{value:new(h())([new(a())(d().inputOutput,"metadata",new(r().SFNode)),new(a())(d().inputOutput,"sheenColor",new(r().SFColor)),new(a())(d().inputOutput,"sheenColorTextureMapping",new(r().SFString)),new(a())(d().inputOutput,"sheenColorTexture",new(r().SFNode)),new(a())(d().inputOutput,"sheenRoughness",new(r().SFFloat)),new(a())(d().inputOutput,"sheenRoughnessTextureMapping",new(r().SFString)),new(a())(d().inputOutput,"sheenRoughnessTexture",new(r().SFNode))]),enumerable:!0}});const Ee=ge,me=S().add("SheenMaterialExtension",Ee),Oe=e.X3DOneSidedMaterialNode;var Ie=t.n(Oe);const Ne=S().add("SpecularGlossiness2.glsl",()=>`\n#pragma X3D include "../common/Fragment.glsl"\n#pragma X3D include "../common/Shadow.glsl"\n#if defined(X3D_LIGHTING)\nuniform x3d_LightSourceParameters x3d_LightSource[X3D_NUM_LIGHTS];\n#endif\nuniform x3d_PhysicalMaterialParameters x3d_Material;\n#pragma X3D include "pbr/BRDF.glsl"\n#pragma X3D include "pbr/MaterialInfo.glsl"\n#pragma X3D include "pbr/Punctual.glsl"\n#pragma X3D include "pbr/IBL.glsl"\n${C().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(){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);\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 intensity=lightIntensity;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);}void main(){fragment_main();}`),Re=S().add("SpecularGlossiness1.fs",()=>'\n#extension GL_OES_standard_derivatives:enable\n#extension GL_EXT_frag_depth:enable\n#extension GL_EXT_shader_texture_lod:enable\nprecision highp float;precision highp int;precision highp sampler2D;precision highp samplerCube;\n#pragma X3D include "pbr/SpecularGlossiness.glsl"\n'),Ae=S().add("SpecularGlossiness2.fs",()=>'#version 300 es\nprecision highp float;precision highp int;precision highp sampler2D;precision highp sampler3D;precision highp samplerCube;\n#pragma X3D include "pbr/SpecularGlossiness.glsl"\n');function Ce(e){console.warn("SpecularGlossinessMaterial is depreciated, please use PhysicalMaterial instead."),Ie().call(this,e),this.addType(d().SpecularGlossinessMaterial),this.diffuseColorArray=new Float32Array(3),this.specularColorArray=new Float32Array(3)}pe().addInclude("SpecularGlossiness",Ne),pe().addFragment("SpecularGlossiness",Re,Ae),Object.assign(Object.setPrototypeOf(Ce.prototype,Ie().prototype),{initialize(){Ie().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__()},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(`setTexture${e}`,this)),this.diffuseTextureNode=O()(d().X3DSingleTextureNode,this._diffuseTexture),this.diffuseTextureNode&&(this.diffuseTextureNode._transparent.addInterest("set_transparent__",this),this.diffuseTextureNode._linear.addInterest(`setTexture${e}`,this,e,this.diffuseTextureNode)),this.setTexture(e,this.diffuseTextureNode)},set_specularColor__(){this.specularColorArray.set(this._specularColor.getValue())},set_glossiness__(){this.glossiness=U().clamp(this._glossiness.getValue(),0,1)},set_specularGlossinessTexture__(){this.specularGlossinessTextureNode=O()(d().X3DSingleTextureNode,this._specularGlossinessTexture),this.setTexture(this.getTextureIndices().SPECULAR_GLOSSINESS_TEXTURE,this.specularGlossinessTextureNode)},set_occlusionStrength__(){this.occlusionStrength=U().clamp(this._occlusionStrength.getValue(),0,1)},set_occlusionTexture__(){this.occlusionTextureNode=O()(d().X3DSingleTextureNode,this._occlusionTexture),this.setTexture(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("SpecularGlossiness","Default","SpecularGlossiness",n);return i.getShaders().set(e,r),r},setShaderUniforms(e,t,s,i,n){Ie().prototype.setShaderUniforms.call(this,e,t,s,i,n),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,s,t.x3d_DiffuseTexture,this._diffuseTextureMapping.getValue(),i,n),this.specularGlossinessTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_SpecularGlossinessTexture,this._specularGlossinessTextureMapping.getValue(),i,n),this.occlusionTextureNode&&(e.uniform1f(t.x3d_OcclusionStrength,this.occlusionStrength),this.occlusionTextureNode.setNamedShaderUniforms(e,t,s,t.x3d_OcclusionTexture,this._occlusionTextureMapping.getValue(),i,n)))}}),Object.defineProperties(Ce,{...c().getStaticProperties("SpecularGlossinessMaterial","X_ITE",1,"material","4.0"),fieldDefinitions:{value:new(h())([new(a())(d().inputOutput,"metadata",new(r().SFNode)),new(a())(d().inputOutput,"diffuseColor",new(r().SFColor)(1,1,1)),new(a())(d().inputOutput,"diffuseTextureMapping",new(r().SFString)),new(a())(d().inputOutput,"diffuseTexture",new(r().SFNode)),new(a())(d().inputOutput,"specularColor",new(r().SFColor)(1,1,1)),new(a())(d().inputOutput,"glossiness",new(r().SFFloat)(1)),new(a())(d().inputOutput,"specularGlossinessTextureMapping",new(r().SFString)),new(a())(d().inputOutput,"specularGlossinessTexture",new(r().SFNode)),new(a())(d().inputOutput,"emissiveColor",new(r().SFColor)),new(a())(d().inputOutput,"emissiveTextureMapping",new(r().SFString)),new(a())(d().inputOutput,"emissiveTexture",new(r().SFNode)),new(a())(d().inputOutput,"occlusionStrength",new(r().SFFloat)(1)),new(a())(d().inputOutput,"occlusionTextureMapping",new(r().SFString)),new(a())(d().inputOutput,"occlusionTexture",new(r().SFNode)),new(a())(d().inputOutput,"normalScale",new(r().SFFloat)(1)),new(a())(d().inputOutput,"normalTextureMapping",new(r().SFString)),new(a())(d().inputOutput,"normalTexture",new(r().SFNode)),new(a())(d().inputOutput,"transparency",new(r().SFFloat))]),enumerable:!0}});for(const e of Object.values(Ce.prototype.getTextureIndices()))Ce.prototype[`setTexture${e}`]=function(e,t){this.setTexture(e,t)};const we=Ce,Me=S().add("SpecularGlossinessMaterial",we);function ye(e){E.call(this,e),this.addType(d().SpecularMaterialExtension),this.specularColorArray=new Float32Array(3)}R.add("SPECULAR_MATERIAL_EXTENSION"),C().add("x3d_SpecularTextureEXT"),C().add("x3d_SpecularColorTextureEXT"),Object.assign(Object.setPrototypeOf(ye.prototype,E.prototype),{initialize(){E.prototype.initialize.call(this),this._specular.addInterest("set_specular__",this),this._specularTexture.addInterest("set_specularTexture__",this),this._specularColor.addInterest("set_specularColor__",this),this._specularColorTexture.addInterest("set_specularColorTexture__",this),this.set_specular__(),this.set_specularTexture__(),this.set_specularColor__(),this.set_specularColorTexture__()},set_specular__(){this.specular=Math.max(this._specular.getValue(),0)},set_specularTexture__(){this.specularTextureNode=O()(d().X3DSingleTextureNode,this._specularTexture),this.setTexture(0,this.specularTextureNode)},set_specularColor__(){this.specularColorArray.set(this._specularColor.getValue())},set_specularColorTexture__(){this.specularColorTextureNode=O()(d().X3DSingleTextureNode,this._specularColorTexture),this.setTexture(1,this.specularColorTextureNode)},getExtensionKey:()=>R.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")},setShaderUniforms(e,t,s,i,n){e.uniform1f(t.x3d_SpecularEXT,this.specular),e.uniform3fv(t.x3d_SpecularColorEXT,this.specularColorArray),+this.getTextureBits()&&(this.specularTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_SpecularTextureEXT,this._specularTextureMapping.getValue(),i,n),this.specularColorTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_SpecularColorTextureEXT,this._specularColorTextureMapping.getValue(),i,n))}}),Object.defineProperties(ye,{...c().getStaticProperties("SpecularMaterialExtension","X_ITE",1,"extensions","4.0"),fieldDefinitions:{value:new(h())([new(a())(d().inputOutput,"metadata",new(r().SFNode)),new(a())(d().inputOutput,"specular",new(r().SFFloat)(1)),new(a())(d().inputOutput,"specularTextureMapping",new(r().SFString)),new(a())(d().inputOutput,"specularTexture",new(r().SFNode)),new(a())(d().inputOutput,"specularColor",new(r().SFColor)(1,1,1)),new(a())(d().inputOutput,"specularColorTextureMapping",new(r().SFString)),new(a())(d().inputOutput,"specularColorTexture",new(r().SFNode))]),enumerable:!0}});const Fe=ye,Xe=S().add("SpecularMaterialExtension",Fe);function De(e){E.call(this,e),this.addType(d().TransmissionMaterialExtension)}R.add("TRANSMISSION_MATERIAL_EXTENSION"),C().add("x3d_TransmissionTextureEXT"),Object.assign(Object.setPrototypeOf(De.prototype,E.prototype),{initialize(){E.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=U().clamp(this._transmission.getValue(),0,1)},set_transmissionTexture__(){this.transmissionTextureNode=O()(d().X3DSingleTextureNode,this._transmissionTexture),this.setTexture(0,this.transmissionTextureNode)},getExtensionKey:()=>R.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:(()=>{const e=new Float32Array(16);return function(t,s,i,n,r){const o=this.getBrowser();if(t.uniform1f(s.x3d_TransmissionEXT,this.transmission),i.isTransmission()){var a=o.getDefaultTexture2DUnit(),u=o.getDefaultTexture2D();t.uniformMatrix4fv(s.x3d_ModelViewMatrix,!1,e)}else{var h=o.getTransmissionBuffer();a=o.getTexture2DUnit(),u=h.getColorTexture()}t.activeTexture(t.TEXTURE0+a),t.bindTexture(t.TEXTURE_2D,u),t.uniform1i(s.x3d_TransmissionSamplerEXT,a),+this.getTextureBits()&&this.transmissionTextureNode?.setNamedShaderUniforms(t,s,i,s.x3d_TransmissionTextureEXT,this._transmissionTextureMapping.getValue(),n,r)}})()}),Object.defineProperties(De,{...c().getStaticProperties("TransmissionMaterialExtension","X_ITE",1,"extensions","4.0"),fieldDefinitions:{value:new(h())([new(a())(d().inputOutput,"metadata",new(r().SFNode)),new(a())(d().inputOutput,"transmission",new(r().SFFloat)),new(a())(d().inputOutput,"transmissionTextureMapping",new(r().SFString)),new(a())(d().inputOutput,"transmissionTexture",new(r().SFNode))]),enumerable:!0}});const Le=De,be=S().add("TransmissionMaterialExtension",Le);function ve(e){E.call(this,e),this.addType(d().VolumeMaterialExtension),this._thickness.setUnit("length"),this._attenuationDistance.setUnit("length"),this.attenuationColorArray=new Float32Array(3)}R.add("VOLUME_MATERIAL_EXTENSION"),C().add("x3d_ThicknessTextureEXT"),Object.assign(Object.setPrototypeOf(ve.prototype,E.prototype),{initialize(){E.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=O()(d().X3DSingleTextureNode,this._thicknessTexture),this.setTexture(0,this.thicknessTextureNode)},set_attenuationDistance__(){this.attenuationDistance=Math.max(this._attenuationDistance.getValue(),0)},set_attenuationColor__(){this.attenuationColorArray.set(this._attenuationColor.getValue())},getExtensionKey:()=>R.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,n){e.uniform1f(t.x3d_ThicknessEXT,this.thickness),e.uniform1f(t.x3d_AttenuationDistanceEXT,this.attenuationDistance),e.uniform3fv(t.x3d_AttenuationColorEXT,this.attenuationColorArray),+this.getTextureBits()&&this.thicknessTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_ThicknessTextureEXT,this._thicknessTextureMapping.getValue(),i,n)}}),Object.defineProperties(ve,{...c().getStaticProperties("VolumeMaterialExtension","X_ITE",1,"extensions","4.0"),fieldDefinitions:{value:new(h())([new(a())(d().inputOutput,"metadata",new(r().SFNode)),new(a())(d().inputOutput,"thickness",new(r().SFFloat)),new(a())(d().inputOutput,"thicknessTextureMapping",new(r().SFString)),new(a())(d().inputOutput,"thicknessTexture",new(r().SFNode)),new(a())(d().inputOutput,"attenuationDistance",new(r().SFFloat)(1e6)),new(a())(d().inputOutput,"attenuationColor",new(r().SFColor)(1,1,1))]),enumerable:!0}});const Ue=ve,Pe=S().add("VolumeMaterialExtension",Ue);i().add({name:"X_ITE",concreteNodes:[y,b,B,j,z,Q,$,he,le,xe,me,Me,Xe,be,Pe],abstractNodes:[E]});S().add("X_ITEComponent",undefined)})();
1
+ /* X_ITE v11.5.12 */
2
+ const e=window[Symbol.for("X_ITE.X3D-11.5.12")];(()=>{var t={n:e=>{var s=e&&e.__esModule?()=>e.default:()=>e;return t.d(s,{a:s}),s},d:(e,s)=>{for(var i in s)t.o(s,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:s[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const s=e.Components;var i=t.n(s);const n=e.Fields;var r=t.n(n);const o=e.X3DFieldDefinition;var a=t.n(o);const u=e.FieldDefinitionArray;var _=t.n(u);const h=e.X3DNode;var l=t.n(h);const c=e.X3DConstants;var d=t.n(c);const p=e.BitSet;var T=t.n(p);const f=e.Namespace;var x=t.n(f);function S(e){l().call(this,e),this.addType(d().X3DMaterialExtensionNode),this.textureBits=new(T())}Object.assign(Object.setPrototypeOf(S.prototype,l().prototype),{setTexture(e,t){e*=4,this.textureBits.remove(e,15),this.textureBits.add(e,t?.getTextureBits()??0)},getTextureBits(){return this.textureBits}}),Object.defineProperties(S,l().getStaticProperties("X3DMaterialExtensionNode","X_ITE",1));const g=S,E=x().add("X3DMaterialExtensionNode",g),m=e.X3DCast;var O=t.n(m);let I=0;const N={add(e){this[e]=I++}},R=x().add("ExtensionKeys",N),C=e.MaterialTextures;var A=t.n(C);function M(e){E.call(this,e),this.addType(d().AnisotropyMaterialExtension),this._anisotropyRotation.setUnit("angle"),this.anisotropyArray=new Float32Array(3)}R.add("ANISOTROPY_MATERIAL_EXTENSION"),A().add("x3d_AnisotropyTextureEXT"),Object.assign(Object.setPrototypeOf(M.prototype,E.prototype),{initialize(){E.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]=Math.max(this._anisotropyStrength.getValue(),0)},set_anisotropyRotation__(){const e=this._anisotropyRotation.getValue();this.anisotropyArray[0]=Math.cos(e),this.anisotropyArray[1]=Math.sin(e)},set_anisotropyTexture__(){this.anisotropyTextureNode=O()(d().X3DSingleTextureNode,this._anisotropyTexture),this.setTexture(0,this.anisotropyTextureNode)},getExtensionKey:()=>R.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,n){e.uniform3fv(t.x3d_AnisotropyEXT,this.anisotropyArray),this.anisotropyTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_AnisotropyTextureEXT,this._anisotropyTextureMapping.getValue(),i,n)}}),Object.defineProperties(M,{...l().getStaticProperties("AnisotropyMaterialExtension","X_ITE",1,"extensions","4.0"),fieldDefinitions:{value:new(_())([new(a())(d().inputOutput,"metadata",new(r().SFNode)),new(a())(d().inputOutput,"anisotropyStrength",new(r().SFFloat)),new(a())(d().inputOutput,"anisotropyRotation",new(r().SFFloat)),new(a())(d().inputOutput,"anisotropyTextureMapping",new(r().SFString)),new(a())(d().inputOutput,"anisotropyTexture",new(r().SFNode))]),enumerable:!0}});const w=M,y=x().add("AnisotropyMaterialExtension",w),F=e.X3DAppearanceChildNode;var X=t.n(F);function D(e){X().call(this,e),this.addType(d().BlendMode),this.factorTypes=new Map,this.equationTypes=new Map}Object.assign(Object.setPrototypeOf(D.prototype,X().prototype),{initialize(){X().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&&t.MIN_EXT),this.equationTypes.set("MAX",e.MAX||t&&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(D,{...l().getStaticProperties("BlendMode","X_ITE",1,"blendMode","3.3"),fieldDefinitions:{value:new(_())([new(a())(d().inputOutput,"metadata",new(r().SFNode)),new(a())(d().inputOutput,"blendColor",new(r().SFColorRGBA)),new(a())(d().inputOutput,"sourceColorFactor",new(r().SFString)("SRC_ALPHA")),new(a())(d().inputOutput,"sourceAlphaFactor",new(r().SFString)("ONE")),new(a())(d().inputOutput,"destinationColorFactor",new(r().SFString)("ONE_MINUS_SRC_ALPHA")),new(a())(d().inputOutput,"destinationAlphaFactor",new(r().SFString)("ONE_MINUS_SRC_ALPHA")),new(a())(d().inputOutput,"colorEquation",new(r().SFString)("FUNC_ADD")),new(a())(d().inputOutput,"alphaEquation",new(r().SFString)("FUNC_ADD"))]),enumerable:!0}});const L=D,b=x().add("BlendMode",L),v=e.Algorithm;var U=t.n(v);function P(e){E.call(this,e),this.addType(d().ClearcoatMaterialExtension)}R.add("CLEARCOAT_MATERIAL_EXTENSION"),A().add("x3d_ClearcoatTextureEXT"),A().add("x3d_ClearcoatRoughnessTextureEXT"),A().add("x3d_ClearcoatNormalTextureEXT"),Object.assign(Object.setPrototypeOf(P.prototype,E.prototype),{initialize(){E.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=Math.max(this._clearcoat.getValue(),0)},set_clearcoatTexture__(){this.clearcoatTextureNode=O()(d().X3DSingleTextureNode,this._clearcoatTexture),this.setTexture(0,this.clearcoatTextureNode)},set_clearcoatRoughness__(){this.clearcoatRoughness=U().clamp(this._clearcoatRoughness.getValue(),0,1)},set_clearcoatRoughnessTexture__(){this.clearcoatRoughnessTextureNode=O()(d().X3DSingleTextureNode,this._clearcoatRoughnessTexture),this.setTexture(1,this.clearcoatRoughnessTextureNode)},set_clearcoatNormalTexture__(){this.clearcoatNormalTextureNode=O()(d().X3DSingleTextureNode,this._clearcoatNormalTexture),this.setTexture(2,this.clearcoatNormalTextureNode)},getExtensionKey:()=>R.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,n){e.uniform1f(t.x3d_ClearcoatEXT,this.clearcoat),e.uniform1f(t.x3d_ClearcoatRoughnessEXT,this.clearcoatRoughness),+this.getTextureBits()&&(this.clearcoatTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_ClearcoatTextureEXT,this._clearcoatTextureMapping.getValue(),i,n),this.clearcoatRoughnessTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_ClearcoatRoughnessTextureEXT,this._clearcoatRoughnessTextureMapping.getValue(),i,n),this.clearcoatNormalTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_ClearcoatNormalTextureEXT,this._clearcoatNormalTextureMapping.getValue(),i,n))}}),Object.defineProperties(P,{...l().getStaticProperties("ClearcoatMaterialExtension","X_ITE",1,"extensions","4.0"),fieldDefinitions:{value:new(_())([new(a())(d().inputOutput,"metadata",new(r().SFNode)),new(a())(d().inputOutput,"clearcoat",new(r().SFFloat)),new(a())(d().inputOutput,"clearcoatTextureMapping",new(r().SFString)),new(a())(d().inputOutput,"clearcoatTexture",new(r().SFNode)),new(a())(d().inputOutput,"clearcoatRoughness",new(r().SFFloat)),new(a())(d().inputOutput,"clearcoatRoughnessTextureMapping",new(r().SFString)),new(a())(d().inputOutput,"clearcoatRoughnessTexture",new(r().SFNode)),new(a())(d().inputOutput,"clearcoatNormalTextureMapping",new(r().SFString)),new(a())(d().inputOutput,"clearcoatNormalTexture",new(r().SFNode))]),enumerable:!0}});const V=P,B=x().add("ClearcoatMaterialExtension",V);function k(e){X().call(this,e),this.addType(d().DepthMode),this.addAlias("depthFunc",this._depthFunction)}Object.assign(Object.setPrototypeOf(k.prototype,X().prototype),{initialize(){X().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,{...l().getStaticProperties("DepthMode","X_ITE",1,"depthMode","4.0"),fieldDefinitions:{value:new(_())([new(a())(d().inputOutput,"metadata",new(r().SFNode)),new(a())(d().inputOutput,"polygonOffset",new(r().SFVec2f)),new(a())(d().inputOutput,"depthRange",new(r().SFVec2f)(0,1)),new(a())(d().inputOutput,"depthTest",new(r().SFBool)(!0)),new(a())(d().inputOutput,"depthFunction",new(r().SFString)("LESS_EQUAL")),new(a())(d().inputOutput,"depthMask",new(r().SFBool)(!0))]),enumerable:!0}});const G=k,j=x().add("DepthMode",G);function H(e){E.call(this,e),this.addType(d().DiffuseTransmissionMaterialExtension),this.diffuseTransmissionColorArray=new Float32Array(3)}R.add("DIFFUSE_TRANSMISSION_MATERIAL_EXTENSION"),A().add("x3d_DiffuseTransmissionTextureEXT"),A().add("x3d_DiffuseTransmissionColorTextureEXT"),Object.assign(Object.setPrototypeOf(H.prototype,E.prototype),{initialize(){E.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=U().clamp(this._diffuseTransmission.getValue(),0,1)},set_diffuseTransmissionTexture__(){this.diffuseTransmissionTextureNode=O()(d().X3DSingleTextureNode,this._diffuseTransmissionTexture),this.setTexture(0,this.diffuseTransmissionTextureNode)},set_diffuseTransmissionColor__(){this.diffuseTransmissionColorArray.set(this._diffuseTransmissionColor.getValue())},set_diffuseTransmissionColorTexture__(){this.diffuseTransmissionColorTextureNode=O()(d().X3DSingleTextureNode,this._diffuseTransmissionColorTexture),this.setTexture(1,this.diffuseTransmissionColorTextureNode)},getExtensionKey:()=>R.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,n){e.uniform1f(t.x3d_DiffuseTransmissionEXT,this.diffuseTransmission),e.uniform3fv(t.x3d_DiffuseTransmissionColorEXT,this.diffuseTransmissionColorArray),+this.getTextureBits()&&(this.diffuseTransmissionTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_DiffuseTransmissionTextureEXT,this._diffuseTransmissionTextureMapping.getValue(),i,n),this.diffuseTransmissionColorTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_DiffuseTransmissionColorTextureEXT,this._diffuseTransmissionColorTextureMapping.getValue(),i,n))}}),Object.defineProperties(H,{...l().getStaticProperties("DiffuseTransmissionMaterialExtension","X_ITE",1,"extensions","4.0"),fieldDefinitions:{value:new(_())([new(a())(d().inputOutput,"metadata",new(r().SFNode)),new(a())(d().inputOutput,"diffuseTransmission",new(r().SFFloat)),new(a())(d().inputOutput,"diffuseTransmissionTextureMapping",new(r().SFString)),new(a())(d().inputOutput,"diffuseTransmissionTexture",new(r().SFNode)),new(a())(d().inputOutput,"diffuseTransmissionColor",new(r().SFColor)(1,1,1)),new(a())(d().inputOutput,"diffuseTransmissionColorTextureMapping",new(r().SFString)),new(a())(d().inputOutput,"diffuseTransmissionColorTexture",new(r().SFNode))]),enumerable:!0}});const q=H,z=x().add("DiffuseTransmissionMaterialExtension",q);function Y(e){E.call(this,e),this.addType(d().DispersionMaterialExtension)}R.add("DISPERSION_MATERIAL_EXTENSION"),Object.assign(Object.setPrototypeOf(Y.prototype,E.prototype),{initialize(){E.prototype.initialize.call(this),this._dispersion.addInterest("set_dispersion__",this),this.set_dispersion__()},set_dispersion__(){this.dispersion=Math.max(this._dispersion.getValue(),0)},getExtensionKey:()=>R.DISPERSION_MATERIAL_EXTENSION,getShaderOptions(e){e.push("X3D_DISPERSION_MATERIAL_EXT")},getShaderUniforms(e){e.push("x3d_DispersionEXT")},setShaderUniforms(e,t,s,i,n){e.uniform1f(t.x3d_DispersionEXT,this.dispersion)}}),Object.defineProperties(Y,{...l().getStaticProperties("DispersionMaterialExtension","X_ITE",1,"extensions","4.0"),fieldDefinitions:{value:new(_())([new(a())(d().inputOutput,"metadata",new(r().SFNode)),new(a())(d().inputOutput,"dispersion",new(r().SFFloat))]),enumerable:!0}});const K=Y,Q=x().add("DispersionMaterialExtension",K);function W(e){E.call(this,e),this.addType(d().EmissiveStrengthMaterialExtension)}R.add("EMISSIVE_STRENGTH_MATERIAL_EXTENSION"),Object.assign(Object.setPrototypeOf(W.prototype,E.prototype),{initialize(){E.prototype.initialize.call(this),this._emissiveStrength.addInterest("set_emissiveStrength__",this),this.set_emissiveStrength__()},set_emissiveStrength__(){this.emissiveStrength=Math.max(this._emissiveStrength.getValue(),0)},getExtensionKey:()=>R.EMISSIVE_STRENGTH_MATERIAL_EXTENSION,getShaderOptions(e){e.push("X3D_EMISSIVE_STRENGTH_MATERIAL_EXT")},getShaderUniforms(e){e.push("x3d_EmissiveStrengthEXT")},setShaderUniforms(e,t,s,i,n){e.uniform1f(t.x3d_EmissiveStrengthEXT,this.emissiveStrength)}}),Object.defineProperties(W,{...l().getStaticProperties("EmissiveStrengthMaterialExtension","X_ITE",1,"extensions","4.0"),fieldDefinitions:{value:new(_())([new(a())(d().inputOutput,"metadata",new(r().SFNode)),new(a())(d().inputOutput,"emissiveStrength",new(r().SFFloat)(1))]),enumerable:!0}});const $=W,Z=x().add("EmissiveStrengthMaterialExtension",$),J=e.X3DShapeNode;var ee=t.n(J);const te=e.VertexArray;var se=t.n(te);const ie=e.Matrix4;var ne=t.n(ie);const re=e.Box3;var oe=t.n(re);function ae(e){ee().call(this,e),this.addType(d().InstancedShape),this.addChildObjects(d().outputOnly,"matrices",new(r().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(ae.prototype,ee().prototype),{initialize(){ee().prototype.initialize.call(this);const e=this.getBrowser(),t=e.getContext();e.getContext().getVersion()<2||(this.instances=Object.assign(t.createBuffer(),{vertexArrayObject:new(se())(t),thickLinesVertexArrayObject:new(se())(t)}),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(oe());return function(){if(this.isDefaultBBoxSize())if(this.getGeometry()){this.bbox.set();const t=this.getGeometry().getBBox();for(const s of this.matrices)this.bbox.add(e.assign(t).multRight(s))}else this.bbox.set();else this.bbox.set(this._bboxSize.getValue(),this._bboxCenter.getValue());this.getBBoxSize().assign(this.bbox.size),this.getBBoxCenter().assign(this.bbox.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,_=n.length,h=r.length,l=Math.max(o,a,u,_,h),c=this.instancesStride/Float32Array.BYTES_PER_ELEMENT,d=this.instancesStride*l,p=new Float32Array(d);this.numInstances=l;for(let e=0,d=0;e<l;++e,d+=c){const l=this.matrices[e]??=new(ne());l.set(o?t[Math.min(e,o-1)].getValue():null,a?s[Math.min(e,a-1)].getValue():null,u?i[Math.min(e,u-1)].getValue():null,_?n[Math.min(e,_-1)].getValue():null,h?r[Math.min(e,h-1)].getValue():null),p.set(l,d),p.set(l.submatrix.transpose().inverse(),d+16)}this.matrices.length=l,e.bindBuffer(e.ARRAY_BUFFER,this.instances),e.bufferData(e.ARRAY_BUFFER,p,e.DYNAMIC_DRAW),this.set_bbox__(),this.set_objects__()},intersectsBox(e,t,s){},displaySimple(e,t,s){this.getGeometry().displaySimpleInstanced(e,s,this)},display(e,t){this.getGeometry().displayInstanced(e,t,this)}}),Object.defineProperties(ae,{...l().getStaticProperties("InstancedShape","X_ITE",1,"children","2.0"),fieldDefinitions:{value:new(_())([new(a())(d().inputOutput,"metadata",new(r().SFNode)),new(a())(d().inputOutput,"translations",new(r().MFVec3f)),new(a())(d().inputOutput,"rotations",new(r().MFRotation)),new(a())(d().inputOutput,"scales",new(r().MFVec3f)),new(a())(d().inputOutput,"scaleOrientations",new(r().MFRotation)),new(a())(d().inputOutput,"centers",new(r().MFVec3f)),new(a())(d().inputOutput,"pointerEvents",new(r().SFBool)(!0)),new(a())(d().inputOutput,"castShadow",new(r().SFBool)(!0)),new(a())(d().inputOutput,"visible",new(r().SFBool)(!0)),new(a())(d().inputOutput,"bboxDisplay",new(r().SFBool)),new(a())(d().initializeOnly,"bboxSize",new(r().SFVec3f)(-1,-1,-1)),new(a())(d().initializeOnly,"bboxCenter",new(r().SFVec3f)),new(a())(d().inputOutput,"appearance",new(r().SFNode)),new(a())(d().inputOutput,"geometry",new(r().SFNode))]),enumerable:!0}});const ue=ae,_e=x().add("InstancedShape",ue);function he(e){E.call(this,e),this.addType(d().IORMaterialExtension)}R.add("IOR_MATERIAL_EXTENSION"),Object.assign(Object.setPrototypeOf(he.prototype,E.prototype),{initialize(){E.prototype.initialize.call(this),this._indexOfRefraction.addInterest("set_indexOfRefraction__",this),this.set_indexOfRefraction__()},set_indexOfRefraction__(){this.indexOfRefraction=Math.max(this._indexOfRefraction.getValue(),1)},getExtensionKey:()=>R.IOR_MATERIAL_EXTENSION,getShaderOptions(e){e.push("X3D_IOR_MATERIAL_EXT")},getShaderUniforms(e){e.push("x3d_IorEXT")},setShaderUniforms(e,t,s,i,n){e.uniform1f(t.x3d_IorEXT,this.indexOfRefraction)}}),Object.defineProperties(he,{...l().getStaticProperties("IORMaterialExtension","X_ITE",1,"extensions","4.0"),fieldDefinitions:{value:new(_())([new(a())(d().inputOutput,"metadata",new(r().SFNode)),new(a())(d().inputOutput,"indexOfRefraction",new(r().SFFloat)(1.5))]),enumerable:!0}});const le=he,ce=x().add("IORMaterialExtension",le),de=e.ShaderRegistry;var pe=t.n(de);const Te=x().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){float phase=2.*M_PI*OPD*1.0e-9;vec3 val=vec3(5.4856e-13,4.4201e-13,5.2481e-13);vec3 pos=vec3(1.6810e+06,1.7953e+06,2.2084e+06);vec3 var=vec3(4.3278e+09,9.3046e+09,6.6121e+09);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 fe(e){E.call(this,e),this.addType(d().IridescenceMaterialExtension)}R.add("IRIDESCENCE_MATERIAL_EXTENSION"),pe().addInclude("Iridescence",Te),A().add("x3d_IridescenceTextureEXT"),A().add("x3d_IridescenceThicknessTextureEXT"),Object.assign(Object.setPrototypeOf(fe.prototype,E.prototype),{initialize(){E.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=Math.max(this._iridescence.getValue(),0)},set_iridescenceTexture__(){this.iridescenceTextureNode=O()(d().X3DSingleTextureNode,this._iridescenceTexture),this.setTexture(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=O()(d().X3DSingleTextureNode,this._iridescenceThicknessTexture),this.setTexture(1,this.iridescenceThicknessTextureNode)},getExtensionKey:()=>R.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,n){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,s,t.x3d_IridescenceTextureEXT,this._iridescenceTextureMapping.getValue(),i,n),this.iridescenceThicknessTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_IridescenceThicknessTextureEXT,this._iridescenceThicknessTextureMapping.getValue(),i,n))}}),Object.defineProperties(fe,{...l().getStaticProperties("IridescenceMaterialExtension","X_ITE",1,"extensions","4.0"),fieldDefinitions:{value:new(_())([new(a())(d().inputOutput,"metadata",new(r().SFNode)),new(a())(d().inputOutput,"iridescence",new(r().SFFloat)),new(a())(d().inputOutput,"iridescenceTextureMapping",new(r().SFString)),new(a())(d().inputOutput,"iridescenceTexture",new(r().SFNode)),new(a())(d().inputOutput,"iridescenceIndexOfRefraction",new(r().SFFloat)(1.3)),new(a())(d().inputOutput,"iridescenceThicknessMinimum",new(r().SFFloat)(100)),new(a())(d().inputOutput,"iridescenceThicknessMaximum",new(r().SFFloat)(400)),new(a())(d().inputOutput,"iridescenceThicknessTextureMapping",new(r().SFString)),new(a())(d().inputOutput,"iridescenceThicknessTexture",new(r().SFNode))]),enumerable:!0}});const xe=fe,Se=x().add("IridescenceMaterialExtension",xe);function ge(e){E.call(this,e),this.addType(d().SheenMaterialExtension),this.sheenColorArray=new Float32Array(3)}R.add("SHEEN_MATERIAL_EXTENSION"),A().add("x3d_SheenColorTextureEXT"),A().add("x3d_SheenRoughnessTextureEXT"),Object.assign(Object.setPrototypeOf(ge.prototype,E.prototype),{initialize(){E.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=O()(d().X3DSingleTextureNode,this._sheenColorTexture),this.setTexture(0,this.sheenColorTextureNode)},set_sheenRoughness__(){this.sheenRoughness=U().clamp(this._sheenRoughness.getValue(),0,1)},set_sheenRoughnessTexture__(){this.sheenRoughnessTextureNode=O()(d().X3DSingleTextureNode,this._sheenRoughnessTexture),this.setTexture(1,this.sheenRoughnessTextureNode)},getExtensionKey:()=>R.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,n){e.uniform3fv(t.x3d_SheenColorEXT,this.sheenColorArray),e.uniform1f(t.x3d_SheenRoughnessEXT,this.sheenRoughness);const r=this.getBrowser(),o=r.getLibraryTexture("lut_sheen_E.png"),a=r.getTextureUnit();e.activeTexture(e.TEXTURE0+a),e.bindTexture(e.TEXTURE_2D,o.getTexture()),e.uniform1i(t.x3d_SheenELUTTextureEXT,a),+this.getTextureBits()&&(this.sheenColorTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_SheenColorTextureEXT,this._sheenColorTextureMapping.getValue(),i,n),this.sheenRoughnessTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_SheenRoughnessTextureEXT,this._sheenRoughnessTextureMapping.getValue(),i,n))}}),Object.defineProperties(ge,{...l().getStaticProperties("SheenMaterialExtension","X_ITE",1,"extensions","4.0"),fieldDefinitions:{value:new(_())([new(a())(d().inputOutput,"metadata",new(r().SFNode)),new(a())(d().inputOutput,"sheenColor",new(r().SFColor)),new(a())(d().inputOutput,"sheenColorTextureMapping",new(r().SFString)),new(a())(d().inputOutput,"sheenColorTexture",new(r().SFNode)),new(a())(d().inputOutput,"sheenRoughness",new(r().SFFloat)),new(a())(d().inputOutput,"sheenRoughnessTextureMapping",new(r().SFString)),new(a())(d().inputOutput,"sheenRoughnessTexture",new(r().SFNode))]),enumerable:!0}});const Ee=ge,me=x().add("SheenMaterialExtension",Ee),Oe=e.X3DOneSidedMaterialNode;var Ie=t.n(Oe);const Ne=x().add("SpecularGlossiness2.glsl",()=>`\n#pragma X3D include "../common/Fragment.glsl"\n#pragma X3D include "../common/Shadow.glsl"\n#if defined(X3D_LIGHTING)\nuniform x3d_LightSourceParameters x3d_LightSource[X3D_NUM_LIGHTS];\n#endif\nuniform x3d_PhysicalMaterialParameters x3d_Material;\n#pragma X3D include "pbr/BRDF.glsl"\n#pragma X3D include "pbr/MaterialInfo.glsl"\n#pragma X3D include "pbr/Punctual.glsl"\n#pragma X3D include "pbr/IBL.glsl"\n${A().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${A().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(){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);}void main(){fragment_main();}`),Re=x().add("SpecularGlossiness1.fs",()=>'\n#extension GL_OES_standard_derivatives:enable\n#extension GL_EXT_frag_depth:enable\n#extension GL_EXT_shader_texture_lod:enable\nprecision highp float;precision highp int;precision highp sampler2D;precision highp samplerCube;\n#pragma X3D include "pbr/SpecularGlossiness.glsl"\n'),Ce=x().add("SpecularGlossiness2.fs",()=>'#version 300 es\nprecision highp float;precision highp int;precision highp sampler2D;precision highp sampler3D;precision highp samplerCube;\n#pragma X3D include "pbr/SpecularGlossiness.glsl"\n');function Ae(e){console.warn("SpecularGlossinessMaterial is depreciated, please use PhysicalMaterial instead."),Ie().call(this,e),this.addType(d().SpecularGlossinessMaterial),this.diffuseColorArray=new Float32Array(3),this.specularColorArray=new Float32Array(3)}pe().addInclude("SpecularGlossiness",Ne),pe().addFragment("SpecularGlossiness",Re,Ce),Object.assign(Object.setPrototypeOf(Ae.prototype,Ie().prototype),{initialize(){Ie().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__()},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(`setTexture${e}`,this)),this.diffuseTextureNode=O()(d().X3DSingleTextureNode,this._diffuseTexture),this.diffuseTextureNode&&(this.diffuseTextureNode._transparent.addInterest("set_transparent__",this),this.diffuseTextureNode._linear.addInterest(`setTexture${e}`,this,e,this.diffuseTextureNode)),this.setTexture(e,this.diffuseTextureNode)},set_specularColor__(){this.specularColorArray.set(this._specularColor.getValue())},set_glossiness__(){this.glossiness=U().clamp(this._glossiness.getValue(),0,1)},set_specularGlossinessTexture__(){this.specularGlossinessTextureNode=O()(d().X3DSingleTextureNode,this._specularGlossinessTexture),this.setTexture(this.getTextureIndices().SPECULAR_GLOSSINESS_TEXTURE,this.specularGlossinessTextureNode)},set_occlusionStrength__(){this.occlusionStrength=U().clamp(this._occlusionStrength.getValue(),0,1)},set_occlusionTexture__(){this.occlusionTextureNode=O()(d().X3DSingleTextureNode,this._occlusionTexture),this.setTexture(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("SpecularGlossiness","Default","SpecularGlossiness",n);return i.getShaders().set(e,r),r},setShaderUniforms(e,t,s,i,n){Ie().prototype.setShaderUniforms.call(this,e,t,s,i,n),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,s,t.x3d_DiffuseTexture,this._diffuseTextureMapping.getValue(),i,n),this.specularGlossinessTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_SpecularGlossinessTexture,this._specularGlossinessTextureMapping.getValue(),i,n),this.occlusionTextureNode&&(e.uniform1f(t.x3d_OcclusionStrength,this.occlusionStrength),this.occlusionTextureNode.setNamedShaderUniforms(e,t,s,t.x3d_OcclusionTexture,this._occlusionTextureMapping.getValue(),i,n)))}}),Object.defineProperties(Ae,{...l().getStaticProperties("SpecularGlossinessMaterial","X_ITE",1,"material","4.0"),fieldDefinitions:{value:new(_())([new(a())(d().inputOutput,"metadata",new(r().SFNode)),new(a())(d().inputOutput,"diffuseColor",new(r().SFColor)(1,1,1)),new(a())(d().inputOutput,"diffuseTextureMapping",new(r().SFString)),new(a())(d().inputOutput,"diffuseTexture",new(r().SFNode)),new(a())(d().inputOutput,"specularColor",new(r().SFColor)(1,1,1)),new(a())(d().inputOutput,"glossiness",new(r().SFFloat)(1)),new(a())(d().inputOutput,"specularGlossinessTextureMapping",new(r().SFString)),new(a())(d().inputOutput,"specularGlossinessTexture",new(r().SFNode)),new(a())(d().inputOutput,"emissiveColor",new(r().SFColor)),new(a())(d().inputOutput,"emissiveTextureMapping",new(r().SFString)),new(a())(d().inputOutput,"emissiveTexture",new(r().SFNode)),new(a())(d().inputOutput,"occlusionStrength",new(r().SFFloat)(1)),new(a())(d().inputOutput,"occlusionTextureMapping",new(r().SFString)),new(a())(d().inputOutput,"occlusionTexture",new(r().SFNode)),new(a())(d().inputOutput,"normalScale",new(r().SFFloat)(1)),new(a())(d().inputOutput,"normalTextureMapping",new(r().SFString)),new(a())(d().inputOutput,"normalTexture",new(r().SFNode)),new(a())(d().inputOutput,"transparency",new(r().SFFloat))]),enumerable:!0}});for(const e of Object.values(Ae.prototype.getTextureIndices()))Ae.prototype[`setTexture${e}`]=function(e,t){this.setTexture(e,t)};const Me=Ae,we=x().add("SpecularGlossinessMaterial",Me);function ye(e){E.call(this,e),this.addType(d().SpecularMaterialExtension),this.specularColorArray=new Float32Array(3)}R.add("SPECULAR_MATERIAL_EXTENSION"),A().add("x3d_SpecularTextureEXT"),A().add("x3d_SpecularColorTextureEXT"),Object.assign(Object.setPrototypeOf(ye.prototype,E.prototype),{initialize(){E.prototype.initialize.call(this),this._specular.addInterest("set_specular__",this),this._specularTexture.addInterest("set_specularTexture__",this),this._specularColor.addInterest("set_specularColor__",this),this._specularColorTexture.addInterest("set_specularColorTexture__",this),this.set_specular__(),this.set_specularTexture__(),this.set_specularColor__(),this.set_specularColorTexture__()},set_specular__(){this.specular=Math.max(this._specular.getValue(),0)},set_specularTexture__(){this.specularTextureNode=O()(d().X3DSingleTextureNode,this._specularTexture),this.setTexture(0,this.specularTextureNode)},set_specularColor__(){this.specularColorArray.set(this._specularColor.getValue())},set_specularColorTexture__(){this.specularColorTextureNode=O()(d().X3DSingleTextureNode,this._specularColorTexture),this.setTexture(1,this.specularColorTextureNode)},getExtensionKey:()=>R.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")},setShaderUniforms(e,t,s,i,n){e.uniform1f(t.x3d_SpecularEXT,this.specular),e.uniform3fv(t.x3d_SpecularColorEXT,this.specularColorArray),+this.getTextureBits()&&(this.specularTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_SpecularTextureEXT,this._specularTextureMapping.getValue(),i,n),this.specularColorTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_SpecularColorTextureEXT,this._specularColorTextureMapping.getValue(),i,n))}}),Object.defineProperties(ye,{...l().getStaticProperties("SpecularMaterialExtension","X_ITE",1,"extensions","4.0"),fieldDefinitions:{value:new(_())([new(a())(d().inputOutput,"metadata",new(r().SFNode)),new(a())(d().inputOutput,"specular",new(r().SFFloat)(1)),new(a())(d().inputOutput,"specularTextureMapping",new(r().SFString)),new(a())(d().inputOutput,"specularTexture",new(r().SFNode)),new(a())(d().inputOutput,"specularColor",new(r().SFColor)(1,1,1)),new(a())(d().inputOutput,"specularColorTextureMapping",new(r().SFString)),new(a())(d().inputOutput,"specularColorTexture",new(r().SFNode))]),enumerable:!0}});const Fe=ye,Xe=x().add("SpecularMaterialExtension",Fe);function De(e){E.call(this,e),this.addType(d().TransmissionMaterialExtension)}R.add("TRANSMISSION_MATERIAL_EXTENSION"),A().add("x3d_TransmissionTextureEXT"),Object.assign(Object.setPrototypeOf(De.prototype,E.prototype),{initialize(){E.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=U().clamp(this._transmission.getValue(),0,1)},set_transmissionTexture__(){this.transmissionTextureNode=O()(d().X3DSingleTextureNode,this._transmissionTexture),this.setTexture(0,this.transmissionTextureNode)},getExtensionKey:()=>R.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:(()=>{const e=new Float32Array(16);return function(t,s,i,n,r){const o=this.getBrowser();if(t.uniform1f(s.x3d_TransmissionEXT,this.transmission),i.isTransmission()){var a=o.getTextureUnit(),u=o.getDefaultTexture2D();t.uniformMatrix4fv(s.x3d_ModelViewMatrix,!1,e)}else{var _=o.getTransmissionBuffer();a=o.getTextureUnit(),u=_.getColorTexture()}t.activeTexture(t.TEXTURE0+a),t.bindTexture(t.TEXTURE_2D,u),t.uniform1i(s.x3d_TransmissionSamplerEXT,a),+this.getTextureBits()&&this.transmissionTextureNode?.setNamedShaderUniforms(t,s,i,s.x3d_TransmissionTextureEXT,this._transmissionTextureMapping.getValue(),n,r)}})()}),Object.defineProperties(De,{...l().getStaticProperties("TransmissionMaterialExtension","X_ITE",1,"extensions","4.0"),fieldDefinitions:{value:new(_())([new(a())(d().inputOutput,"metadata",new(r().SFNode)),new(a())(d().inputOutput,"transmission",new(r().SFFloat)),new(a())(d().inputOutput,"transmissionTextureMapping",new(r().SFString)),new(a())(d().inputOutput,"transmissionTexture",new(r().SFNode))]),enumerable:!0}});const Le=De,be=x().add("TransmissionMaterialExtension",Le);function ve(e){E.call(this,e),this.addType(d().VolumeMaterialExtension),this._thickness.setUnit("length"),this._attenuationDistance.setUnit("length"),this.attenuationColorArray=new Float32Array(3)}R.add("VOLUME_MATERIAL_EXTENSION"),A().add("x3d_ThicknessTextureEXT"),Object.assign(Object.setPrototypeOf(ve.prototype,E.prototype),{initialize(){E.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=O()(d().X3DSingleTextureNode,this._thicknessTexture),this.setTexture(0,this.thicknessTextureNode)},set_attenuationDistance__(){this.attenuationDistance=Math.max(this._attenuationDistance.getValue(),0)},set_attenuationColor__(){this.attenuationColorArray.set(this._attenuationColor.getValue())},getExtensionKey:()=>R.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,n){e.uniform1f(t.x3d_ThicknessEXT,this.thickness),e.uniform1f(t.x3d_AttenuationDistanceEXT,this.attenuationDistance),e.uniform3fv(t.x3d_AttenuationColorEXT,this.attenuationColorArray),+this.getTextureBits()&&this.thicknessTextureNode?.setNamedShaderUniforms(e,t,s,t.x3d_ThicknessTextureEXT,this._thicknessTextureMapping.getValue(),i,n)}}),Object.defineProperties(ve,{...l().getStaticProperties("VolumeMaterialExtension","X_ITE",1,"extensions","4.0"),fieldDefinitions:{value:new(_())([new(a())(d().inputOutput,"metadata",new(r().SFNode)),new(a())(d().inputOutput,"thickness",new(r().SFFloat)),new(a())(d().inputOutput,"thicknessTextureMapping",new(r().SFString)),new(a())(d().inputOutput,"thicknessTexture",new(r().SFNode)),new(a())(d().inputOutput,"attenuationDistance",new(r().SFFloat)(1e6)),new(a())(d().inputOutput,"attenuationColor",new(r().SFColor)(1,1,1))]),enumerable:!0}});const Ue=ve,Pe=x().add("VolumeMaterialExtension",Ue);i().add({name:"X_ITE",concreteNodes:[y,b,B,j,z,Q,Z,_e,ce,Se,me,we,Xe,be,Pe],abstractNodes:[E]});x().add("X_ITEComponent",undefined)})();
@@ -1,94 +1,94 @@
1
- Copyright (c) 2010, ParaType Ltd. (http://www.paratype.com/public),
2
- with Reserved Font Names "PT Sans" and "ParaType".
3
-
4
- This Font Software is licensed under the SIL Open Font License, Version 1.1.
5
- This license is copied below, and is also available with a FAQ at:
6
- https://openfontlicense.org
7
-
8
-
9
- -----------------------------------------------------------
10
- SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
11
- -----------------------------------------------------------
12
-
13
- PREAMBLE
14
- The goals of the Open Font License (OFL) are to stimulate worldwide
15
- development of collaborative font projects, to support the font creation
16
- efforts of academic and linguistic communities, and to provide a free and
17
- open framework in which fonts may be shared and improved in partnership
18
- with others.
19
-
20
- The OFL allows the licensed fonts to be used, studied, modified and
21
- redistributed freely as long as they are not sold by themselves. The
22
- fonts, including any derivative works, can be bundled, embedded,
23
- redistributed and/or sold with any software provided that any reserved
24
- names are not used by derivative works. The fonts and derivatives,
25
- however, cannot be released under any other type of license. The
26
- requirement for fonts to remain under this license does not apply
27
- to any document created using the fonts or their derivatives.
28
-
29
- DEFINITIONS
30
- "Font Software" refers to the set of files released by the Copyright
31
- Holder(s) under this license and clearly marked as such. This may
32
- include source files, build scripts and documentation.
33
-
34
- "Reserved Font Name" refers to any names specified as such after the
35
- copyright statement(s).
36
-
37
- "Original Version" refers to the collection of Font Software components as
38
- distributed by the Copyright Holder(s).
39
-
40
- "Modified Version" refers to any derivative made by adding to, deleting,
41
- or substituting -- in part or in whole -- any of the components of the
42
- Original Version, by changing formats or by porting the Font Software to a
43
- new environment.
44
-
45
- "Author" refers to any designer, engineer, programmer, technical
46
- writer or other person who contributed to the Font Software.
47
-
48
- PERMISSION & CONDITIONS
49
- Permission is hereby granted, free of charge, to any person obtaining
50
- a copy of the Font Software, to use, study, copy, merge, embed, modify,
51
- redistribute, and sell modified and unmodified copies of the Font
52
- Software, subject to the following conditions:
53
-
54
- 1) Neither the Font Software nor any of its individual components,
55
- in Original or Modified Versions, may be sold by itself.
56
-
57
- 2) Original or Modified Versions of the Font Software may be bundled,
58
- redistributed and/or sold with any software, provided that each copy
59
- contains the above copyright notice and this license. These can be
60
- included either as stand-alone text files, human-readable headers or
61
- in the appropriate machine-readable metadata fields within text or
62
- binary files as long as those fields can be easily viewed by the user.
63
-
64
- 3) No Modified Version of the Font Software may use the Reserved Font
65
- Name(s) unless explicit written permission is granted by the corresponding
66
- Copyright Holder. This restriction only applies to the primary font name as
67
- presented to the users.
68
-
69
- 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
70
- Software shall not be used to promote, endorse or advertise any
71
- Modified Version, except to acknowledge the contribution(s) of the
72
- Copyright Holder(s) and the Author(s) or with their explicit written
73
- permission.
74
-
75
- 5) The Font Software, modified or unmodified, in part or in whole,
76
- must be distributed entirely under this license, and must not be
77
- distributed under any other license. The requirement for fonts to
78
- remain under this license does not apply to any document created
79
- using the Font Software.
80
-
81
- TERMINATION
82
- This license becomes null and void if any of the above conditions are
83
- not met.
84
-
85
- DISCLAIMER
86
- THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
87
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
88
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
89
- OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
90
- COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
91
- INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
92
- DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
93
- FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
94
- OTHER DEALINGS IN THE FONT SOFTWARE.
1
+ Copyright (c) 2010, ParaType Ltd. (http://www.paratype.com/public),
2
+ with Reserved Font Names "PT Sans" and "ParaType".
3
+
4
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
5
+ This license is copied below, and is also available with a FAQ at:
6
+ https://openfontlicense.org
7
+
8
+
9
+ -----------------------------------------------------------
10
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
11
+ -----------------------------------------------------------
12
+
13
+ PREAMBLE
14
+ The goals of the Open Font License (OFL) are to stimulate worldwide
15
+ development of collaborative font projects, to support the font creation
16
+ efforts of academic and linguistic communities, and to provide a free and
17
+ open framework in which fonts may be shared and improved in partnership
18
+ with others.
19
+
20
+ The OFL allows the licensed fonts to be used, studied, modified and
21
+ redistributed freely as long as they are not sold by themselves. The
22
+ fonts, including any derivative works, can be bundled, embedded,
23
+ redistributed and/or sold with any software provided that any reserved
24
+ names are not used by derivative works. The fonts and derivatives,
25
+ however, cannot be released under any other type of license. The
26
+ requirement for fonts to remain under this license does not apply
27
+ to any document created using the fonts or their derivatives.
28
+
29
+ DEFINITIONS
30
+ "Font Software" refers to the set of files released by the Copyright
31
+ Holder(s) under this license and clearly marked as such. This may
32
+ include source files, build scripts and documentation.
33
+
34
+ "Reserved Font Name" refers to any names specified as such after the
35
+ copyright statement(s).
36
+
37
+ "Original Version" refers to the collection of Font Software components as
38
+ distributed by the Copyright Holder(s).
39
+
40
+ "Modified Version" refers to any derivative made by adding to, deleting,
41
+ or substituting -- in part or in whole -- any of the components of the
42
+ Original Version, by changing formats or by porting the Font Software to a
43
+ new environment.
44
+
45
+ "Author" refers to any designer, engineer, programmer, technical
46
+ writer or other person who contributed to the Font Software.
47
+
48
+ PERMISSION & CONDITIONS
49
+ Permission is hereby granted, free of charge, to any person obtaining
50
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
51
+ redistribute, and sell modified and unmodified copies of the Font
52
+ Software, subject to the following conditions:
53
+
54
+ 1) Neither the Font Software nor any of its individual components,
55
+ in Original or Modified Versions, may be sold by itself.
56
+
57
+ 2) Original or Modified Versions of the Font Software may be bundled,
58
+ redistributed and/or sold with any software, provided that each copy
59
+ contains the above copyright notice and this license. These can be
60
+ included either as stand-alone text files, human-readable headers or
61
+ in the appropriate machine-readable metadata fields within text or
62
+ binary files as long as those fields can be easily viewed by the user.
63
+
64
+ 3) No Modified Version of the Font Software may use the Reserved Font
65
+ Name(s) unless explicit written permission is granted by the corresponding
66
+ Copyright Holder. This restriction only applies to the primary font name as
67
+ presented to the users.
68
+
69
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
70
+ Software shall not be used to promote, endorse or advertise any
71
+ Modified Version, except to acknowledge the contribution(s) of the
72
+ Copyright Holder(s) and the Author(s) or with their explicit written
73
+ permission.
74
+
75
+ 5) The Font Software, modified or unmodified, in part or in whole,
76
+ must be distributed entirely under this license, and must not be
77
+ distributed under any other license. The requirement for fonts to
78
+ remain under this license does not apply to any document created
79
+ using the Font Software.
80
+
81
+ TERMINATION
82
+ This license becomes null and void if any of the above conditions are
83
+ not met.
84
+
85
+ DISCLAIMER
86
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
87
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
88
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
89
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
90
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
91
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
92
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
93
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
94
+ OTHER DEALINGS IN THE FONT SOFTWARE.