x_ite 16.0.3 → 16.0.4

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 (55) hide show
  1. package/README.md +5 -5
  2. package/dist/assets/components/AnnotationComponent.js +1 -1
  3. package/dist/assets/components/AnnotationComponent.min.js +1 -1
  4. package/dist/assets/components/CADGeometryComponent.js +1 -1
  5. package/dist/assets/components/CADGeometryComponent.min.js +1 -1
  6. package/dist/assets/components/CubeMapTexturingComponent.js +2 -2
  7. package/dist/assets/components/CubeMapTexturingComponent.min.js +2 -2
  8. package/dist/assets/components/DISComponent.js +1 -1
  9. package/dist/assets/components/DISComponent.min.js +1 -1
  10. package/dist/assets/components/EventUtilitiesComponent.js +1 -1
  11. package/dist/assets/components/EventUtilitiesComponent.min.js +1 -1
  12. package/dist/assets/components/GaussianSplatsComponent.js +1 -1
  13. package/dist/assets/components/GaussianSplatsComponent.min.js +1 -1
  14. package/dist/assets/components/Geometry2DComponent.js +1 -1
  15. package/dist/assets/components/Geometry2DComponent.min.js +1 -1
  16. package/dist/assets/components/Geometry3DComponent.js +1 -1
  17. package/dist/assets/components/Geometry3DComponent.min.js +1 -1
  18. package/dist/assets/components/GeospatialComponent.js +1 -1
  19. package/dist/assets/components/GeospatialComponent.min.js +1 -1
  20. package/dist/assets/components/HAnimComponent.js +1 -1
  21. package/dist/assets/components/HAnimComponent.min.js +1 -1
  22. package/dist/assets/components/KeyDeviceSensorComponent.js +1 -1
  23. package/dist/assets/components/KeyDeviceSensorComponent.min.js +1 -1
  24. package/dist/assets/components/LayoutComponent.js +1 -1
  25. package/dist/assets/components/LayoutComponent.min.js +1 -1
  26. package/dist/assets/components/NURBSComponent.js +1 -1
  27. package/dist/assets/components/NURBSComponent.min.js +1 -1
  28. package/dist/assets/components/ParticleSystemsComponent.js +2 -2
  29. package/dist/assets/components/ParticleSystemsComponent.min.js +2 -2
  30. package/dist/assets/components/PickingComponent.js +1 -1
  31. package/dist/assets/components/PickingComponent.min.js +1 -1
  32. package/dist/assets/components/RigidBodyPhysicsComponent.js +1 -1
  33. package/dist/assets/components/RigidBodyPhysicsComponent.min.js +1 -1
  34. package/dist/assets/components/ScriptingComponent.js +1 -1
  35. package/dist/assets/components/ScriptingComponent.min.js +1 -1
  36. package/dist/assets/components/TextComponent.js +1 -1
  37. package/dist/assets/components/TextComponent.min.js +1 -1
  38. package/dist/assets/components/TextureProjectionComponent.js +1 -1
  39. package/dist/assets/components/TextureProjectionComponent.min.js +1 -1
  40. package/dist/assets/components/Texturing3DComponent.js +9 -9
  41. package/dist/assets/components/Texturing3DComponent.min.js +2 -2
  42. package/dist/assets/components/VolumeRenderingComponent.js +1 -1
  43. package/dist/assets/components/VolumeRenderingComponent.min.js +1 -1
  44. package/dist/assets/components/WebXRComponent.js +1 -1
  45. package/dist/assets/components/WebXRComponent.min.js +1 -1
  46. package/dist/assets/components/X_ITEComponent.js +1 -1
  47. package/dist/assets/components/X_ITEComponent.min.js +1 -1
  48. package/dist/example.html +1 -1
  49. package/dist/x_ite.css +1 -1
  50. package/dist/x_ite.js +62 -59
  51. package/dist/x_ite.min.js +2 -2
  52. package/dist/x_ite.min.mjs +2 -2
  53. package/dist/x_ite.mjs +62 -59
  54. package/dist/x_ite.zip +0 -0
  55. package/package.json +1 -1
package/dist/x_ite.js CHANGED
@@ -1,4 +1,4 @@
1
- /* X_ITE v16.0.3 */
1
+ /* X_ITE v16.0.4 */
2
2
  (function webpackUniversalModuleDefinition(root, factory) {
3
3
  if(typeof exports === 'object' && typeof module === 'object')
4
4
  module.exports = factory();
@@ -12,7 +12,7 @@
12
12
  return /******/ (() => { // webpackBootstrap
13
13
  /******/ var __webpack_modules__ = ({
14
14
 
15
- /***/ 521
15
+ /***/ 72
16
16
  (module, exports) {
17
17
 
18
18
  var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*
@@ -1017,7 +1017,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
1017
1017
 
1018
1018
  /***/ },
1019
1019
 
1020
- /***/ 939
1020
+ /***/ 402
1021
1021
  (module) {
1022
1022
 
1023
1023
  (function webpackUniversalModuleDefinition(root, factory) {
@@ -2013,7 +2013,7 @@ return /******/ (function(modules) { // webpackBootstrap
2013
2013
 
2014
2014
  /***/ },
2015
2015
 
2016
- /***/ 159
2016
+ /***/ 258
2017
2017
  (module) {
2018
2018
 
2019
2019
  /**
@@ -18846,7 +18846,7 @@ const Legacy_default_ = Legacy;
18846
18846
 
18847
18847
  /* harmony default export */ const Browser_Legacy = (x_ite_Namespace .add ("Legacy", Legacy_default_));
18848
18848
  ;// ./src/x_ite/BROWSER_VERSION.js
18849
- const BROWSER_VERSION_default_ = "16.0.3";
18849
+ const BROWSER_VERSION_default_ = "16.0.4";
18850
18850
  ;
18851
18851
 
18852
18852
  /* harmony default export */ const BROWSER_VERSION = (x_ite_Namespace .add ("BROWSER_VERSION", BROWSER_VERSION_default_));
@@ -31133,7 +31133,7 @@ const Plane3_default_ = Plane3;
31133
31133
 
31134
31134
  /* harmony default export */ const Geometry_Plane3 = (x_ite_Namespace .add ("Plane3", Plane3_default_));
31135
31135
  ;// ./src/standard/Math/Geometry/Triangle3.js
31136
- /* provided dependency */ var libtess = __webpack_require__(159);
31136
+ /* provided dependency */ var libtess = __webpack_require__(258);
31137
31137
 
31138
31138
 
31139
31139
  const Triangle3 =
@@ -47763,7 +47763,7 @@ const Bezier_default_ = Bezier;
47763
47763
 
47764
47764
  /* harmony default export */ const Algorithms_Bezier = (x_ite_Namespace .add ("Bezier", Bezier_default_));
47765
47765
  ;// ./src/x_ite/Parser/SVGParser.js
47766
- /* provided dependency */ var SVGParser_libtess = __webpack_require__(159);
47766
+ /* provided dependency */ var SVGParser_libtess = __webpack_require__(258);
47767
47767
 
47768
47768
 
47769
47769
 
@@ -54455,7 +54455,7 @@ function X3DCoreContext (element)
54455
54455
  {
54456
54456
  const link = document .createElement ("link");
54457
54457
 
54458
- link .integrity = "sha384-kJEneJ/A3x8UCAr9atGL38mNOYbyOsYx1KrBl+f1Al3bK4S1tzl/AYvqtxknYzkx";
54458
+ link .integrity = "sha384-r/Gb5cpjKIPkLAwOrsKEHLP6i0CMS4kHdw86CIUHces4jE1JV+E2ip+Bb42dwD2D";
54459
54459
  link .rel = "stylesheet";
54460
54460
  link .crossOrigin = "anonymous";
54461
54461
  link .onload = resolve;
@@ -59286,47 +59286,6 @@ const X3DLayeringContext_default_ = X3DLayeringContext;
59286
59286
  ;
59287
59287
 
59288
59288
  /* harmony default export */ const Layering_X3DLayeringContext = (x_ite_Namespace .add ("X3DLayeringContext", X3DLayeringContext_default_));
59289
- ;// ./src/assets/shaders/webgl2/pbr/ToneMapping2.glsl.js
59290
- const ToneMapping2_glsl_default_ = () => /* glsl */ `
59291
- const float GAMMA=2.2;const float INV_GAMMA=1./GAMMA;vec3 linearToSRGB(const in vec3 color){return pow(color,vec3(INV_GAMMA));}vec4 linearToSRGB(const in vec4 color){return vec4(linearToSRGB(color.rgb),color.a);}vec3 sRGBToLinear(const in vec3 color){return pow(color,vec3(GAMMA));}vec4 sRGBToLinear(const in vec4 color){return vec4(sRGBToLinear(color.rgb),color.a);}
59292
- #if defined(X3D_LINEAR_OUTPUT)
59293
- vec3 toneMap(in vec3 color){
59294
- #if defined(X3D_COLORSPACE_SRGB)
59295
- color=sRGBToLinear(color);
59296
- #endif
59297
- return color;}
59298
- #else
59299
- #if defined(X3D_TONEMAP_ACES_NARKOWICZ)
59300
- vec3 toneMapACES_Narkowicz(const in vec3 color){const float A=2.51;const float B=.03;const float C=2.43;const float D=.59;const float E=.14;return clamp((color*(A*color+B))/(color*(C*color+D)+E),0.,1.);}
59301
- #endif
59302
- #if defined(X3D_TONEMAP_ACES_HILL)||defined(X3D_TONEMAP_ACES_HILL_EXPOSURE_BOOST)
59303
- const mat3 ACESInputMat=mat3(.59719,.07600,.02840,.35458,.90834,.13383,.04823,.01566,.83777);const mat3 ACESOutputMat=mat3(1.60475,-.10208,-.00327,-.53108,1.10813,-.07276,-.07367,-.00605,1.07602);vec3 RRTAndODTFit(const in vec3 color){vec3 a=color*(color+.0245786)-.000090537;vec3 b=color*(.983729*color+.4329510)+.238081;return a/b;}vec3 toneMapACES_Hill(in vec3 color){color=ACESInputMat*color;color=RRTAndODTFit(color);color=ACESOutputMat*color;color=clamp(color,0.,1.);return color;}
59304
- #endif
59305
- #if defined(X3D_TONEMAP_KHR_PBR_NEUTRAL)
59306
- vec3 toneMap_KhronosPbrNeutral(in vec3 color){const float startCompression=.8-.04;const float desaturation=.15;float x=min(color.r,min(color.g,color.b));float offset=x<.08?x-6.25*x*x:.04;color-=offset;float peak=max(color.r,max(color.g,color.b));if(peak<startCompression)return color;const float d=1.-startCompression;float newPeak=1.-d*d/(peak+d-startCompression);color*=newPeak/peak;float g=1.-1./(desaturation*(peak-newPeak)+1.);return mix(color,newPeak*vec3(1),g);}
59307
- #endif
59308
- uniform float x3d_Exposure;vec3 toneMap(in vec3 color){color*=x3d_Exposure;
59309
- #if defined(X3D_TONEMAP_ACES_NARKOWICZ)
59310
- color=toneMapACES_Narkowicz(color);
59311
- #endif
59312
- #if defined(X3D_TONEMAP_ACES_HILL)
59313
- color=toneMapACES_Hill(color);
59314
- #endif
59315
- #if defined(X3D_TONEMAP_ACES_HILL_EXPOSURE_BOOST)
59316
- color/=.6;color=toneMapACES_Hill(color);
59317
- #endif
59318
- #if defined(X3D_TONEMAP_KHR_PBR_NEUTRAL)
59319
- color=toneMap_KhronosPbrNeutral(color);
59320
- #endif
59321
- #if defined(X3D_COLORSPACE_LINEAR)
59322
- color=linearToSRGB(color);
59323
- #endif
59324
- return color;}
59325
- #endif
59326
- `
59327
- ;
59328
-
59329
- /* harmony default export */ const ToneMapping2_glsl = (x_ite_Namespace .add ("ToneMapping2.glsl", ToneMapping2_glsl_default_));
59330
59289
  ;// ./src/x_ite/Browser/Lighting/Distribution.js
59331
59290
  let Distribution_i = 0;
59332
59291
 
@@ -59344,12 +59303,11 @@ const Distribution_default_ = Distribution;
59344
59303
  ;// ./src/x_ite/Browser/Lighting/Filter2.fs.js
59345
59304
 
59346
59305
 
59347
-
59348
59306
  const Filter2_fs_default_ = /* glsl */ `#version 300 es
59349
59307
  precision highp float;precision highp int;precision highp samplerCube;
59350
- ${ToneMapping2_glsl ()}
59308
+ #include<ToneMapping>
59351
59309
  ${Object .entries (Lighting_Distribution) .map (([name, value]) => `#define X3D_${name} ${value}`) .join ("\n")}
59352
- const float M_PI=3.1415926535897932384626433832795;uniform samplerCube x3d_TextureEXT;uniform int x3d_TextureSizeEXT;uniform bool x3d_TextureLinearEXT;uniform int x3d_CurrentFaceEXT;uniform int x3d_DistributionEXT;uniform int x3d_SampleCountEXT;uniform float x3d_RoughnessEXT;uniform float x3d_LodBiasEXT;uniform float x3d_IntensityEXT;uniform vec3 x3d_FlipEXT;in vec2 texCoord;out vec4 x3d_FragColor;mat3 generateTBN(const in vec3 normal){vec3 bitangent=vec3(0.,1.,0.);float NdotUp=dot(normal,vec3(0.,1.,0.));float epsilon=.0000001;if(1.-abs(NdotUp)<=epsilon){if(NdotUp>0.)bitangent=vec3(0.,0.,1.);else bitangent=vec3(0.,0.,-1.);}vec3 tangent=normalize(cross(bitangent,normal));bitangent=cross(normal,tangent);return mat3(tangent,bitangent,normal);}struct MicrofacetDistributionSample{float pdf;float cosTheta;float sinTheta;float phi;};float radicalInverse_VdC(in uint bits){bits=(bits<<16u)|(bits>>16u);bits=((bits&0x55555555u)<<1u)|((bits&0xAAAAAAAAu)>>1u);bits=((bits&0x33333333u)<<2u)|((bits&0xCCCCCCCCu)>>2u);bits=((bits&0x0F0F0F0Fu)<<4u)|((bits&0xF0F0F0F0u)>>4u);bits=((bits&0x00FF00FFu)<<8u)|((bits&0xFF00FF00u)>>8u);return float(bits)*2.3283064365386963e-10;}vec2 hammersley2d(const in int i,const in int N){return vec2(float(i)/float(N),radicalInverse_VdC(uint(i)));}MicrofacetDistributionSample Lambertian(const in vec2 xi,const in float roughness){MicrofacetDistributionSample lambertian;lambertian.cosTheta=sqrt(1.-xi.y);lambertian.sinTheta=sqrt(xi.y);lambertian.phi=2.*M_PI*xi.x;lambertian.pdf=lambertian.cosTheta/M_PI;return lambertian;}float saturate(const in float v){return clamp(v,0.,1.);}float D_GGX(const in float NdotH,const in float roughness){float a=NdotH*roughness;float k=roughness/(1.-NdotH*NdotH+a*a);return k*k*(1./M_PI);}MicrofacetDistributionSample GGX(const in vec2 xi,const in float roughness){MicrofacetDistributionSample ggx;float alpha=roughness*roughness;ggx.cosTheta=saturate(sqrt((1.-xi.y)/(1.+(alpha*alpha-1.)*xi.y)));ggx.sinTheta=sqrt(1.-ggx.cosTheta*ggx.cosTheta);ggx.phi=2.*M_PI*xi.x;ggx.pdf=D_GGX(ggx.cosTheta,alpha);ggx.pdf/=4.;return ggx;}float D_Charlie(in float sheenRoughness,const in float NdotH){sheenRoughness=max(sheenRoughness,.000001);float invR=1./sheenRoughness;float cos2h=NdotH*NdotH;float sin2h=1.-cos2h;return(2.+invR)*pow(sin2h,invR*.5)/(2.*M_PI);}MicrofacetDistributionSample Charlie(const in vec2 xi,const in float roughness){MicrofacetDistributionSample charlie;float alpha=roughness*roughness;charlie.sinTheta=pow(xi.y,alpha/(2.*alpha+1.));charlie.cosTheta=sqrt(1.-charlie.sinTheta*charlie.sinTheta);charlie.phi=2.*M_PI*xi.x;charlie.pdf=D_Charlie(alpha,charlie.cosTheta);charlie.pdf/=4.;return charlie;}vec4 getImportanceSample(const in int sampleIndex,const in vec3 N,const in float roughness){vec2 xi=hammersley2d(sampleIndex,x3d_SampleCountEXT);MicrofacetDistributionSample importanceSample;switch(x3d_DistributionEXT){case X3D_LAMBERTIAN:{importanceSample=Lambertian(xi,roughness);break;}case X3D_GGX:{importanceSample=GGX(xi,roughness);break;}case X3D_CHARLIE:{importanceSample=Charlie(xi,roughness);break;}}vec3 localSpaceDirection=normalize(vec3(importanceSample.sinTheta*cos(importanceSample.phi),importanceSample.sinTheta*sin(importanceSample.phi),importanceSample.cosTheta));mat3 TBN=generateTBN(N);vec3 direction=TBN*localSpaceDirection;return vec4(direction,importanceSample.pdf);}float computeLod(const in float pdf){float lod=.5*log2(6.*float(x3d_TextureSizeEXT)*float(x3d_TextureSizeEXT)/(float(x3d_SampleCountEXT)*pdf));return lod;}vec3 filterColor(const in vec3 N){vec3 color=vec3(0);float weight=0.;for(int i=0;i<x3d_SampleCountEXT;++i){vec4 importanceSample=getImportanceSample(i,N,x3d_RoughnessEXT);vec3 H=importanceSample.xyz;float pdf=importanceSample.w;float lod=computeLod(pdf);lod+=x3d_LodBiasEXT;switch(x3d_DistributionEXT){case X3D_LAMBERTIAN:{vec3 lambertian=textureLod(x3d_TextureEXT,H,lod).rgb;if(!x3d_TextureLinearEXT)lambertian=sRGBToLinear(lambertian);color+=lambertian;break;}case X3D_GGX:case X3D_CHARLIE:{vec3 V=N;vec3 L=normalize(reflect(-V,H));float NdotL=dot(N,L);if(NdotL>0.){if(x3d_RoughnessEXT==0.){lod=x3d_LodBiasEXT;}vec3 sampleColor=textureLod(x3d_TextureEXT,L,lod).rgb;if(!x3d_TextureLinearEXT)sampleColor=sRGBToLinear(sampleColor);color+=sampleColor*NdotL;weight+=NdotL;}break;}}}if(weight!=0.0f)color/=weight;else color/=float(x3d_SampleCountEXT);return color*x3d_IntensityEXT;}vec3 getNormal(const in int face,const in vec2 t){float x;float y;float z;switch(face){case 0:x=t.x;y=-t.y;z=1.;break;case 1:x=-t.x;y=-t.y;z=-1.;break;case 2:x=-1.;y=-t.y;z=t.x;break;case 3:x=1.;y=-t.y;z=-t.x;break;case 4:x=t.x;y=1.;z=t.y;break;case 5:x=t.x;y=-1.;z=-t.y;break;}return normalize(vec3(x,y,z))*x3d_FlipEXT;}void main(){vec3 normal=getNormal(x3d_CurrentFaceEXT,texCoord);x3d_FragColor=vec4(filterColor(normal),1.);}`
59310
+ const float M_PI=3.141592653589793;uniform samplerCube x3d_TextureEXT;uniform int x3d_TextureSizeEXT;uniform bool x3d_TextureLinearEXT;uniform int x3d_CurrentFaceEXT;uniform int x3d_DistributionEXT;uniform int x3d_SampleCountEXT;uniform float x3d_RoughnessEXT;uniform float x3d_LodBiasEXT;uniform float x3d_IntensityEXT;uniform vec3 x3d_FlipEXT;in vec2 texCoord;out vec4 x3d_FragColor;mat3 generateTBN(const in vec3 normal){vec3 bitangent=vec3(0.,1.,0.);float NdotUp=dot(normal,vec3(0.,1.,0.));float epsilon=.0000001;if(1.-abs(NdotUp)<=epsilon){if(NdotUp>0.)bitangent=vec3(0.,0.,1.);else bitangent=vec3(0.,0.,-1.);}vec3 tangent=normalize(cross(bitangent,normal));bitangent=cross(normal,tangent);return mat3(tangent,bitangent,normal);}struct MicrofacetDistributionSample{float pdf;float cosTheta;float sinTheta;float phi;};float radicalInverse_VdC(in uint bits){bits=(bits<<16u)|(bits>>16u);bits=((bits&0x55555555u)<<1u)|((bits&0xAAAAAAAAu)>>1u);bits=((bits&0x33333333u)<<2u)|((bits&0xCCCCCCCCu)>>2u);bits=((bits&0x0F0F0F0Fu)<<4u)|((bits&0xF0F0F0F0u)>>4u);bits=((bits&0x00FF00FFu)<<8u)|((bits&0xFF00FF00u)>>8u);return float(bits)*2.3283064365386963e-10;}vec2 hammersley2d(const in int i,const in int N){return vec2(float(i)/float(N),radicalInverse_VdC(uint(i)));}MicrofacetDistributionSample Lambertian(const in vec2 xi,const in float roughness){MicrofacetDistributionSample lambertian;lambertian.cosTheta=sqrt(1.-xi.y);lambertian.sinTheta=sqrt(xi.y);lambertian.phi=2.*M_PI*xi.x;lambertian.pdf=lambertian.cosTheta/M_PI;return lambertian;}float saturate(const in float v){return clamp(v,0.,1.);}float D_GGX(const in float NdotH,const in float roughness){float a=NdotH*roughness;float k=roughness/(1.-NdotH*NdotH+a*a);return k*k*(1./M_PI);}MicrofacetDistributionSample GGX(const in vec2 xi,const in float roughness){MicrofacetDistributionSample ggx;float alpha=roughness*roughness;ggx.cosTheta=saturate(sqrt((1.-xi.y)/(1.+(alpha*alpha-1.)*xi.y)));ggx.sinTheta=sqrt(1.-ggx.cosTheta*ggx.cosTheta);ggx.phi=2.*M_PI*xi.x;ggx.pdf=D_GGX(ggx.cosTheta,alpha);ggx.pdf/=4.;return ggx;}float D_Charlie(in float sheenRoughness,const in float NdotH){sheenRoughness=max(sheenRoughness,.000001);float invR=1./sheenRoughness;float cos2h=NdotH*NdotH;float sin2h=1.-cos2h;return(2.+invR)*pow(sin2h,invR*.5)/(2.*M_PI);}MicrofacetDistributionSample Charlie(const in vec2 xi,const in float roughness){MicrofacetDistributionSample charlie;float alpha=roughness*roughness;charlie.sinTheta=pow(xi.y,alpha/(2.*alpha+1.));charlie.cosTheta=sqrt(1.-charlie.sinTheta*charlie.sinTheta);charlie.phi=2.*M_PI*xi.x;charlie.pdf=D_Charlie(alpha,charlie.cosTheta);charlie.pdf/=4.;return charlie;}vec4 getImportanceSample(const in int sampleIndex,const in vec3 N,const in float roughness){vec2 xi=hammersley2d(sampleIndex,x3d_SampleCountEXT);MicrofacetDistributionSample importanceSample;switch(x3d_DistributionEXT){case X3D_LAMBERTIAN:{importanceSample=Lambertian(xi,roughness);break;}case X3D_GGX:{importanceSample=GGX(xi,roughness);break;}case X3D_CHARLIE:{importanceSample=Charlie(xi,roughness);break;}}vec3 localSpaceDirection=normalize(vec3(importanceSample.sinTheta*cos(importanceSample.phi),importanceSample.sinTheta*sin(importanceSample.phi),importanceSample.cosTheta));mat3 TBN=generateTBN(N);vec3 direction=TBN*localSpaceDirection;return vec4(direction,importanceSample.pdf);}float computeLod(const in float pdf){float lod=.5*log2(6.*float(x3d_TextureSizeEXT)*float(x3d_TextureSizeEXT)/(float(x3d_SampleCountEXT)*pdf));return lod;}vec3 filterColor(const in vec3 N){vec3 color=vec3(0);float weight=0.;for(int i=0;i<x3d_SampleCountEXT;++i){vec4 importanceSample=getImportanceSample(i,N,x3d_RoughnessEXT);vec3 H=importanceSample.xyz;float pdf=importanceSample.w;float lod=computeLod(pdf);lod+=x3d_LodBiasEXT;switch(x3d_DistributionEXT){case X3D_LAMBERTIAN:{vec3 lambertian=textureLod(x3d_TextureEXT,H,lod).rgb;if(!x3d_TextureLinearEXT)lambertian=sRGBToLinear(lambertian);color+=lambertian;break;}case X3D_GGX:case X3D_CHARLIE:{vec3 V=N;vec3 L=normalize(reflect(-V,H));float NdotL=dot(N,L);if(NdotL>0.){if(x3d_RoughnessEXT==0.){lod=x3d_LodBiasEXT;}vec3 sampleColor=textureLod(x3d_TextureEXT,L,lod).rgb;if(!x3d_TextureLinearEXT)sampleColor=sRGBToLinear(sampleColor);color+=sampleColor*NdotL;weight+=NdotL;}break;}}}if(weight!=0.)color/=weight;else color/=float(x3d_SampleCountEXT);return color*x3d_IntensityEXT;}vec3 getNormal(const in int face,const in vec2 t){float x;float y;float z;switch(face){case 0:x=t.x;y=-t.y;z=1.;break;case 1:x=-t.x;y=-t.y;z=-1.;break;case 2:x=-1.;y=-t.y;z=t.x;break;case 3:x=1.;y=-t.y;z=-t.x;break;case 4:x=t.x;y=1.;z=t.y;break;case 5:x=t.x;y=-1.;z=-t.y;break;}return normalize(vec3(x,y,z))*x3d_FlipEXT;}void main(){vec3 normal=getNormal(x3d_CurrentFaceEXT,texCoord);x3d_FragColor=vec4(filterColor(normal),1.);}`
59353
59311
  ;
59354
59312
 
59355
59313
  /* harmony default export */ const Filter2_fs = (x_ite_Namespace .add ("Filter2.fs", Filter2_fs_default_));
@@ -59509,6 +59467,11 @@ Object .assign (X3DLightingContext .prototype,
59509
59467
  gl .texParameteri (filtered .getTarget (), gl .TEXTURE_MIN_FILTER, gl .LINEAR_MIPMAP_LINEAR);
59510
59468
  gl .texParameteri (filtered .getTarget (), gl .TEXTURE_MAG_FILTER, gl .LINEAR);
59511
59469
  }
59470
+ else
59471
+ {
59472
+ gl .texParameteri (filtered .getTarget (), gl .TEXTURE_MIN_FILTER, gl .LINEAR);
59473
+ gl .texParameteri (filtered .getTarget (), gl .TEXTURE_MAG_FILTER, gl .LINEAR);
59474
+ }
59512
59475
 
59513
59476
  // Setup defaults.
59514
59477
 
@@ -59538,15 +59501,14 @@ Object .assign (X3DLightingContext .prototype,
59538
59501
 
59539
59502
  // console .log (level, mipSize, r, filtered .getLevels ());
59540
59503
 
59541
- // Setup mip level uniforms.
59504
+ // Setup values for each mip level.
59542
59505
 
59506
+ gl .viewport (0, 0, mipSize, mipSize);
59507
+ gl .scissor (0, 0, mipSize, mipSize);
59543
59508
  gl .uniform1f (shaderNode .x3d_RoughnessEXT, r);
59544
59509
 
59545
59510
  // Generate images.
59546
59511
 
59547
- gl .viewport (0, 0, mipSize, mipSize);
59548
- gl .scissor (0, 0, mipSize, mipSize);
59549
-
59550
59512
  for (const [face, target] of filtered .getTargets () .entries ())
59551
59513
  {
59552
59514
  gl .framebufferTexture2D (gl .FRAMEBUFFER, gl .COLOR_ATTACHMENT0, target, filtered .getTexture (), level);
@@ -67119,6 +67081,47 @@ vec3 getPunctualRadianceTransmission(const in vec3 normal,const in vec3 view,con
67119
67081
  ;
67120
67082
 
67121
67083
  /* harmony default export */ const Punctual2_glsl = (x_ite_Namespace .add ("Punctual2.glsl", Punctual2_glsl_default_));
67084
+ ;// ./src/assets/shaders/webgl2/pbr/ToneMapping2.glsl.js
67085
+ const ToneMapping2_glsl_default_ = () => /* glsl */ `
67086
+ const float GAMMA=2.2;const float INV_GAMMA=1./GAMMA;vec3 linearToSRGB(const in vec3 color){return pow(color,vec3(INV_GAMMA));}vec4 linearToSRGB(const in vec4 color){return vec4(linearToSRGB(color.rgb),color.a);}vec3 sRGBToLinear(const in vec3 color){return pow(color,vec3(GAMMA));}vec4 sRGBToLinear(const in vec4 color){return vec4(sRGBToLinear(color.rgb),color.a);}
67087
+ #if defined(X3D_LINEAR_OUTPUT)
67088
+ vec3 toneMap(in vec3 color){
67089
+ #if defined(X3D_COLORSPACE_SRGB)
67090
+ color=sRGBToLinear(color);
67091
+ #endif
67092
+ return color;}
67093
+ #else
67094
+ #if defined(X3D_TONEMAP_ACES_NARKOWICZ)
67095
+ vec3 toneMapACES_Narkowicz(const in vec3 color){const float A=2.51;const float B=.03;const float C=2.43;const float D=.59;const float E=.14;return clamp((color*(A*color+B))/(color*(C*color+D)+E),0.,1.);}
67096
+ #endif
67097
+ #if defined(X3D_TONEMAP_ACES_HILL)||defined(X3D_TONEMAP_ACES_HILL_EXPOSURE_BOOST)
67098
+ const mat3 ACESInputMat=mat3(.59719,.07600,.02840,.35458,.90834,.13383,.04823,.01566,.83777);const mat3 ACESOutputMat=mat3(1.60475,-.10208,-.00327,-.53108,1.10813,-.07276,-.07367,-.00605,1.07602);vec3 RRTAndODTFit(const in vec3 color){vec3 a=color*(color+.0245786)-.000090537;vec3 b=color*(.983729*color+.4329510)+.238081;return a/b;}vec3 toneMapACES_Hill(in vec3 color){color=ACESInputMat*color;color=RRTAndODTFit(color);color=ACESOutputMat*color;color=clamp(color,0.,1.);return color;}
67099
+ #endif
67100
+ #if defined(X3D_TONEMAP_KHR_PBR_NEUTRAL)
67101
+ vec3 toneMap_KhronosPbrNeutral(in vec3 color){const float startCompression=.8-.04;const float desaturation=.15;float x=min(color.r,min(color.g,color.b));float offset=x<.08?x-6.25*x*x:.04;color-=offset;float peak=max(color.r,max(color.g,color.b));if(peak<startCompression)return color;const float d=1.-startCompression;float newPeak=1.-d*d/(peak+d-startCompression);color*=newPeak/peak;float g=1.-1./(desaturation*(peak-newPeak)+1.);return mix(color,newPeak*vec3(1),g);}
67102
+ #endif
67103
+ uniform float x3d_Exposure;vec3 toneMap(in vec3 color){color*=x3d_Exposure;
67104
+ #if defined(X3D_TONEMAP_ACES_NARKOWICZ)
67105
+ color=toneMapACES_Narkowicz(color);
67106
+ #endif
67107
+ #if defined(X3D_TONEMAP_ACES_HILL)
67108
+ color=toneMapACES_Hill(color);
67109
+ #endif
67110
+ #if defined(X3D_TONEMAP_ACES_HILL_EXPOSURE_BOOST)
67111
+ color/=.6;color=toneMapACES_Hill(color);
67112
+ #endif
67113
+ #if defined(X3D_TONEMAP_KHR_PBR_NEUTRAL)
67114
+ color=toneMap_KhronosPbrNeutral(color);
67115
+ #endif
67116
+ #if defined(X3D_COLORSPACE_LINEAR)
67117
+ color=linearToSRGB(color);
67118
+ #endif
67119
+ return color;}
67120
+ #endif
67121
+ `
67122
+ ;
67123
+
67124
+ /* harmony default export */ const ToneMapping2_glsl = (x_ite_Namespace .add ("ToneMapping2.glsl", ToneMapping2_glsl_default_));
67122
67125
  ;// ./src/assets/shaders/webgl2/Default2.vs.js
67123
67126
  const Default2_vs_default_ = () => /* glsl */ `#version 300 es
67124
67127
  precision highp int;precision highp float;precision highp sampler2D;precision highp sampler3D;precision highp samplerCube;
@@ -90956,8 +90959,8 @@ const PNGMedia_default_ = PNGMedia;
90956
90959
 
90957
90960
  /* harmony default export */ const Texturing_PNGMedia = (x_ite_Namespace .add ("PNGMedia", PNGMedia_default_));
90958
90961
  ;// ./src/x_ite/Components/Texturing/MovieTexture.js
90959
- /* provided dependency */ var SuperGif = __webpack_require__(521);
90960
- /* provided dependency */ var APNG = __webpack_require__(939);
90962
+ /* provided dependency */ var SuperGif = __webpack_require__(72);
90963
+ /* provided dependency */ var APNG = __webpack_require__(402);
90961
90964
 
90962
90965
 
90963
90966
 
@@ -93662,7 +93665,7 @@ const QuickSort_default_ = QuickSort;
93662
93665
 
93663
93666
  /* harmony default export */ const Algorithms_QuickSort = (x_ite_Namespace .add ("QuickSort", QuickSort_default_));
93664
93667
  ;// ./src/lib/libtess.js
93665
- /* provided dependency */ var libtess_libtess = __webpack_require__(159);
93668
+ /* provided dependency */ var libtess_libtess = __webpack_require__(258);
93666
93669
  const libtess_default_ = libtess_libtess;
93667
93670
  ;
93668
93671