|
@@ -1,4 +1,3 @@
|
|
|
-// threejs.org/license
|
|
|
(function(h,Fa){"object"===typeof exports&&"undefined"!==typeof module?Fa(exports):"function"===typeof define&&define.amd?define(["exports"],Fa):(h=h||self,Fa(h.THREE={}))})(this,function(h){function Fa(){}function v(a,b){this.x=a||0;this.y=b||0}function ya(){this.elements=[1,0,0,0,1,0,0,0,1];0<arguments.length&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}function ca(a,b,c,d,e,f,g,k,l,m){Object.defineProperty(this,"id",{value:mj++});this.uuid=L.generateUUID();
|
|
|
this.name="";this.image=void 0!==a?a:ca.DEFAULT_IMAGE;this.mipmaps=[];this.mapping=void 0!==b?b:ca.DEFAULT_MAPPING;this.wrapS=void 0!==c?c:1001;this.wrapT=void 0!==d?d:1001;this.magFilter=void 0!==e?e:1006;this.minFilter=void 0!==f?f:1008;this.anisotropy=void 0!==l?l:1;this.format=void 0!==g?g:1023;this.internalFormat=null;this.type=void 0!==k?k:1009;this.offset=new v(0,0);this.repeat=new v(1,1);this.center=new v(0,0);this.rotation=0;this.matrixAutoUpdate=!0;this.matrix=new ya;this.generateMipmaps=
|
|
|
!0;this.premultiplyAlpha=!1;this.flipY=!0;this.unpackAlignment=4;this.encoding=void 0!==m?m:3E3;this.version=0;this.onUpdate=null}function ia(a,b,c,d){this.x=a||0;this.y=b||0;this.z=c||0;this.w=void 0!==d?d:1}function wa(a,b,c){this.width=a;this.height=b;this.scissor=new ia(0,0,a,b);this.scissorTest=!1;this.viewport=new ia(0,0,a,b);c=c||{};this.texture=new ca(void 0,void 0,c.wrapS,c.wrapT,c.magFilter,c.minFilter,c.format,c.type,c.anisotropy,c.encoding);this.texture.image={};this.texture.image.width=
|
|
@@ -52,33 +51,33 @@ void 0===c&&(c=new Int32Array(b),Ah[b]=c);for(var d=0;d!==b;++d)c[d]=a.allocateT
|
|
|
b.z}else if(void 0!==b.r){if(c[0]!==b.r||c[1]!==b.g||c[2]!==b.b)a.uniform3f(this.addr,b.r,b.g,b.b),c[0]=b.r,c[1]=b.g,c[2]=b.b}else Oa(c,b)||(a.uniform3fv(this.addr,b),Ia(c,b))}function Gj(a,b){var c=this.cache;if(void 0!==b.x){if(c[0]!==b.x||c[1]!==b.y||c[2]!==b.z||c[3]!==b.w)a.uniform4f(this.addr,b.x,b.y,b.z,b.w),c[0]=b.x,c[1]=b.y,c[2]=b.z,c[3]=b.w}else Oa(c,b)||(a.uniform4fv(this.addr,b),Ia(c,b))}function Hj(a,b){var c=this.cache,d=b.elements;void 0===d?Oa(c,b)||(a.uniformMatrix2fv(this.addr,!1,
|
|
|
b),Ia(c,b)):Oa(c,d)||(Bh.set(d),a.uniformMatrix2fv(this.addr,!1,Bh),Ia(c,d))}function Ij(a,b){var c=this.cache,d=b.elements;void 0===d?Oa(c,b)||(a.uniformMatrix3fv(this.addr,!1,b),Ia(c,b)):Oa(c,d)||(Ch.set(d),a.uniformMatrix3fv(this.addr,!1,Ch),Ia(c,d))}function Jj(a,b){var c=this.cache,d=b.elements;void 0===d?Oa(c,b)||(a.uniformMatrix4fv(this.addr,!1,b),Ia(c,b)):Oa(c,d)||(Dh.set(d),a.uniformMatrix4fv(this.addr,!1,Dh),Ia(c,d))}function Kj(a,b,c){var d=this.cache,e=c.allocateTextureUnit();d[0]!==e&&
|
|
|
(a.uniform1i(this.addr,e),d[0]=e);c.safeSetTexture2D(b||Eh,e)}function Lj(a,b,c){var d=this.cache,e=c.allocateTextureUnit();d[0]!==e&&(a.uniform1i(this.addr,e),d[0]=e);c.setTexture2DArray(b||Mj,e)}function Nj(a,b,c){var d=this.cache,e=c.allocateTextureUnit();d[0]!==e&&(a.uniform1i(this.addr,e),d[0]=e);c.setTexture3D(b||Oj,e)}function Pj(a,b,c){var d=this.cache,e=c.allocateTextureUnit();d[0]!==e&&(a.uniform1i(this.addr,e),d[0]=e);c.safeSetTextureCube(b||Fh,e)}function Qj(a,b){var c=this.cache;c[0]!==
|
|
|
-b&&(a.uniform1i(this.addr,b),c[0]=b)}function Rj(a,b){var c=this.cache;Oa(c,b)||(a.uniform2iv(this.addr,b),Ia(c,b))}function Sj(a,b){var c=this.cache;Oa(c,b)||(a.uniform3iv(this.addr,b),Ia(c,b))}function Tj(a,b){var c=this.cache;Oa(c,b)||(a.uniform4iv(this.addr,b),Ia(c,b))}function Uj(a){switch(a){case 5126:return Dj;case 35664:return Ej;case 35665:return Fj;case 35666:return Gj;case 35674:return Hj;case 35675:return Ij;case 35676:return Jj;case 35678:case 36198:return Kj;case 35679:return Nj;case 35680:return Pj;
|
|
|
-case 36289:return Lj;case 5124:case 35670:return Qj;case 35667:case 35671:return Rj;case 35668:case 35672:return Sj;case 35669:case 35673:return Tj}}function Vj(a,b){a.uniform1fv(this.addr,b)}function Wj(a,b){a.uniform1iv(this.addr,b)}function Xj(a,b){a.uniform2iv(this.addr,b)}function Yj(a,b){a.uniform3iv(this.addr,b)}function Zj(a,b){a.uniform4iv(this.addr,b)}function ak(a,b){b=Hc(b,this.size,2);a.uniform2fv(this.addr,b)}function bk(a,b){b=Hc(b,this.size,3);a.uniform3fv(this.addr,b)}function ck(a,
|
|
|
-b){b=Hc(b,this.size,4);a.uniform4fv(this.addr,b)}function dk(a,b){b=Hc(b,this.size,4);a.uniformMatrix2fv(this.addr,!1,b)}function ek(a,b){b=Hc(b,this.size,9);a.uniformMatrix3fv(this.addr,!1,b)}function fk(a,b){b=Hc(b,this.size,16);a.uniformMatrix4fv(this.addr,!1,b)}function gk(a,b,c){var d=b.length,e=zh(c,d);a.uniform1iv(this.addr,e);for(a=0;a!==d;++a)c.safeSetTexture2D(b[a]||Eh,e[a])}function hk(a,b,c){var d=b.length,e=zh(c,d);a.uniform1iv(this.addr,e);for(a=0;a!==d;++a)c.safeSetTextureCube(b[a]||
|
|
|
-Fh,e[a])}function ik(a){switch(a){case 5126:return Vj;case 35664:return ak;case 35665:return bk;case 35666:return ck;case 35674:return dk;case 35675:return ek;case 35676:return fk;case 35678:case 36198:case 36298:case 36306:return gk;case 35680:case 36300:case 36308:return hk;case 5124:case 35670:return Wj;case 35667:case 35671:return Xj;case 35668:case 35672:return Yj;case 35669:case 35673:return Zj}}function jk(a,b,c){this.id=a;this.addr=c;this.cache=[];this.setValue=Uj(b.type)}function Gh(a,b,
|
|
|
-c){this.id=a;this.addr=c;this.cache=[];this.size=b.size;this.setValue=ik(b.type)}function Hh(a){this.id=a;this.seq=[];this.map={}}function Db(a,b){this.seq=[];this.map={};for(var c=a.getProgramParameter(b,35718),d=0;d<c;++d){var e=a.getActiveUniform(b,d),f=a.getUniformLocation(b,e.name),g=this,k=e.name,l=k.length;for(gg.lastIndex=0;;){var m=gg.exec(k),x=gg.lastIndex,p=m[1],h=m[3];"]"===m[2]&&(p|=0);if(void 0===h||"["===h&&x+2===l){k=g;e=void 0===h?new jk(p,e,f):new Gh(p,e,f);k.seq.push(e);k.map[e.id]=
|
|
|
-e;break}else h=g.map[p],void 0===h&&(h=new Hh(p),p=g,g=h,p.seq.push(g),p.map[g.id]=g),g=h}}}function Ih(a,b,c){b=a.createShader(b);a.shaderSource(b,c);a.compileShader(b);return b}function Jh(a){switch(a){case 3E3:return["Linear","( value )"];case 3001:return["sRGB","( value )"];case 3002:return["RGBE","( value )"];case 3004:return["RGBM","( value, 7.0 )"];case 3005:return["RGBM","( value, 16.0 )"];case 3006:return["RGBD","( value, 256.0 )"];case 3007:return["Gamma","( value, float( GAMMA_FACTOR ) )"];
|
|
|
-case 3003:return["LogLuv","( value )"];default:throw Error("unsupported encoding: "+a);}}function Kh(a,b,c){var d=a.getShaderParameter(b,35713),e=a.getShaderInfoLog(b).trim();if(d&&""===e)return"";a=a.getShaderSource(b).split("\n");for(b=0;b<a.length;b++)a[b]=b+1+": "+a[b];a=a.join("\n");return"THREE.WebGLShader: gl.getShaderInfoLog() "+c+"\n"+e+a}function Id(a,b){b=Jh(b);return"vec4 "+a+"( vec4 value ) { return "+b[0]+"ToLinear"+b[1]+"; }"}function kk(a,b){b=Jh(b);return"vec4 "+a+"( vec4 value ) { return LinearTo"+
|
|
|
-b[0]+b[1]+"; }"}function lk(a,b){switch(b){case 1:b="Linear";break;case 2:b="Reinhard";break;case 3:b="Uncharted2";break;case 4:b="OptimizedCineon";break;case 5:b="ACESFilmic";break;default:throw Error("unsupported toneMapping: "+b);}return"vec3 "+a+"( vec3 color ) { return "+b+"ToneMapping( color ); }"}function mk(a){var b=[],c;for(c in a){var d=a[c];!1!==d&&b.push("#define "+c+" "+d)}return b.join("\n")}function Jd(a){return""!==a}function Lh(a,b){return a.replace(/NUM_DIR_LIGHTS/g,b.numDirLights).replace(/NUM_SPOT_LIGHTS/g,
|
|
|
-b.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g,b.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,b.numPointLights).replace(/NUM_HEMI_LIGHTS/g,b.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,b.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS/g,b.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,b.numPointLightShadows)}function Mh(a,b){return a.replace(/NUM_CLIPPING_PLANES/g,b.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,b.numClippingPlanes-b.numClipIntersection)}function hg(a,b){a=
|
|
|
-O[b];if(void 0===a)throw Error("Can not resolve #include <"+b+">");return a.replace(ig,hg)}function Nh(a,b,c,d){a="";for(b=parseInt(b);b<parseInt(c);b++)a+=d.replace(/\[ i \]/g,"[ "+b+" ]").replace(/UNROLLED_LOOP_INDEX/g,b);return a}function Oh(a){var b="precision "+a.precision+" float;\nprecision "+a.precision+" int;";"highp"===a.precision?b+="\n#define HIGH_PRECISION":"mediump"===a.precision?b+="\n#define MEDIUM_PRECISION":"lowp"===a.precision&&(b+="\n#define LOW_PRECISION");return b}function nk(a){var b=
|
|
|
-"SHADOWMAP_TYPE_BASIC";1===a.shadowMapType?b="SHADOWMAP_TYPE_PCF":2===a.shadowMapType?b="SHADOWMAP_TYPE_PCF_SOFT":3===a.shadowMapType&&(b="SHADOWMAP_TYPE_VSM");return b}function ok(a){var b="ENVMAP_TYPE_CUBE";if(a.envMap)switch(a.envMapMode){case 301:case 302:b="ENVMAP_TYPE_CUBE";break;case 306:case 307:b="ENVMAP_TYPE_CUBE_UV";break;case 303:case 304:b="ENVMAP_TYPE_EQUIREC";break;case 305:b="ENVMAP_TYPE_SPHERE"}return b}function pk(a){var b="ENVMAP_MODE_REFLECTION";if(a.envMap)switch(a.envMapMode){case 302:case 304:b=
|
|
|
-"ENVMAP_MODE_REFRACTION"}return b}function qk(a){var b="ENVMAP_BLENDING_NONE";if(a.envMap)switch(a.combine){case 0:b="ENVMAP_BLENDING_MULTIPLY";break;case 1:b="ENVMAP_BLENDING_MIX";break;case 2:b="ENVMAP_BLENDING_ADD"}return b}function rk(a,b,c){var d=a.getContext(),e=c.defines,f=c.vertexShader,g=c.fragmentShader,k=nk(c),l=ok(c),m=pk(c),x=qk(c),p=0<a.gammaFactor?a.gammaFactor:1,h=c.isWebGL2?"":[c.extensionDerivatives||c.envMapCubeUV||c.bumpMap||c.tangentSpaceNormalMap||c.clearcoatNormalMap||c.flatShading||
|
|
|
-"physical"===c.shaderID?"#extension GL_OES_standard_derivatives : enable":"",(c.extensionFragDepth||c.logarithmicDepthBuffer)&&c.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",c.extensionDrawBuffers&&c.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(c.extensionShaderTextureLOD||c.envMap)&&c.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(Jd).join("\n"),t=mk(e),r=d.createProgram(),u=c.numMultiviewViews;
|
|
|
-c.isRawShaderMaterial?(e=[t].filter(Jd).join("\n"),0<e.length&&(e+="\n"),k=[h,t].filter(Jd).join("\n"),0<k.length&&(k+="\n")):(e=[Oh(c),"#define SHADER_NAME "+c.shaderName,t,c.instancing?"#define USE_INSTANCING":"",c.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+p,"#define MAX_BONES "+c.maxBones,c.useFog&&c.fog?"#define USE_FOG":"",c.useFog&&c.fogExp2?"#define FOG_EXP2":"",c.map?"#define USE_MAP":"",c.envMap?"#define USE_ENVMAP":"",c.envMap?"#define "+m:"",c.lightMap?
|
|
|
-"#define USE_LIGHTMAP":"",c.aoMap?"#define USE_AOMAP":"",c.emissiveMap?"#define USE_EMISSIVEMAP":"",c.bumpMap?"#define USE_BUMPMAP":"",c.normalMap?"#define USE_NORMALMAP":"",c.normalMap&&c.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",c.normalMap&&c.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",c.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",c.displacementMap&&c.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",c.specularMap?"#define USE_SPECULARMAP":"",c.roughnessMap?
|
|
|
-"#define USE_ROUGHNESSMAP":"",c.metalnessMap?"#define USE_METALNESSMAP":"",c.alphaMap?"#define USE_ALPHAMAP":"",c.vertexTangents?"#define USE_TANGENT":"",c.vertexColors?"#define USE_COLOR":"",c.vertexUvs?"#define USE_UV":"",c.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",c.flatShading?"#define FLAT_SHADED":"",c.skinning?"#define USE_SKINNING":"",c.useVertexTexture?"#define BONE_TEXTURE":"",c.morphTargets?"#define USE_MORPHTARGETS":"",c.morphNormals&&!1===c.flatShading?"#define USE_MORPHNORMALS":"",c.doubleSided?
|
|
|
-"#define DOUBLE_SIDED":"",c.flipSided?"#define FLIP_SIDED":"",c.shadowMapEnabled?"#define USE_SHADOWMAP":"",c.shadowMapEnabled?"#define "+k:"",c.sizeAttenuation?"#define USE_SIZEATTENUATION":"",c.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",c.logarithmicDepthBuffer&&(c.isWebGL2||c.rendererExtensionFragDepth)?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;",
|
|
|
-"uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#ifdef USE_COLOR","\tattribute vec3 color;","#endif","#ifdef USE_MORPHTARGETS","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;",
|
|
|
-"\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(Jd).join("\n"),k=[h,Oh(c),"#define SHADER_NAME "+c.name,t,c.alphaTest?"#define ALPHATEST "+c.alphaTest+(c.alphaTest%1?"":
|
|
|
-".0"):"","#define GAMMA_FACTOR "+p,c.useFog&&c.fog?"#define USE_FOG":"",c.useFog&&c.fogExp2?"#define FOG_EXP2":"",c.map?"#define USE_MAP":"",c.matcap?"#define USE_MATCAP":"",c.envMap?"#define USE_ENVMAP":"",c.envMap?"#define "+l:"",c.envMap?"#define "+m:"",c.envMap?"#define "+x:"",c.lightMap?"#define USE_LIGHTMAP":"",c.aoMap?"#define USE_AOMAP":"",c.emissiveMap?"#define USE_EMISSIVEMAP":"",c.bumpMap?"#define USE_BUMPMAP":"",c.normalMap?"#define USE_NORMALMAP":"",c.normalMap&&c.objectSpaceNormalMap?
|
|
|
-"#define OBJECTSPACE_NORMALMAP":"",c.normalMap&&c.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",c.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",c.specularMap?"#define USE_SPECULARMAP":"",c.roughnessMap?"#define USE_ROUGHNESSMAP":"",c.metalnessMap?"#define USE_METALNESSMAP":"",c.alphaMap?"#define USE_ALPHAMAP":"",c.sheen?"#define USE_SHEEN":"",c.vertexTangents?"#define USE_TANGENT":"",c.vertexColors?"#define USE_COLOR":"",c.vertexUvs?"#define USE_UV":"",c.uvsVertexOnly?"#define UVS_VERTEX_ONLY":
|
|
|
-"",c.gradientMap?"#define USE_GRADIENTMAP":"",c.flatShading?"#define FLAT_SHADED":"",c.doubleSided?"#define DOUBLE_SIDED":"",c.flipSided?"#define FLIP_SIDED":"",c.shadowMapEnabled?"#define USE_SHADOWMAP":"",c.shadowMapEnabled?"#define "+k:"",c.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",c.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",c.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",c.logarithmicDepthBuffer&&(c.isWebGL2||c.rendererExtensionFragDepth)?"#define USE_LOGDEPTHBUF_EXT":
|
|
|
-"",(c.extensionShaderTextureLOD||c.envMap)&&(c.isWebGL2||c.rendererExtensionShaderTextureLod)?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",0!==c.toneMapping?"#define TONE_MAPPING":"",0!==c.toneMapping?O.tonemapping_pars_fragment:"",0!==c.toneMapping?lk("toneMapping",c.toneMapping):"",c.dithering?"#define DITHERING":"",c.outputEncoding||c.mapEncoding||c.matcapEncoding||c.envMapEncoding||c.emissiveMapEncoding||c.lightMapEncoding?
|
|
|
-O.encodings_pars_fragment:"",c.mapEncoding?Id("mapTexelToLinear",c.mapEncoding):"",c.matcapEncoding?Id("matcapTexelToLinear",c.matcapEncoding):"",c.envMapEncoding?Id("envMapTexelToLinear",c.envMapEncoding):"",c.emissiveMapEncoding?Id("emissiveMapTexelToLinear",c.emissiveMapEncoding):"",c.lightMapEncoding?Id("lightMapTexelToLinear",c.lightMapEncoding):"",c.outputEncoding?kk("linearToOutputTexel",c.outputEncoding):"",c.depthPacking?"#define DEPTH_PACKING "+c.depthPacking:"","\n"].filter(Jd).join("\n"));
|
|
|
-f=f.replace(ig,hg);f=Lh(f,c);f=Mh(f,c);g=g.replace(ig,hg);g=Lh(g,c);g=Mh(g,c);f=f.replace(Ph,Nh);g=g.replace(Ph,Nh);c.isWebGL2&&!c.isRawShaderMaterial&&(l=!1,m=/^\s*#version\s+300\s+es\s*\n/,c.isShaderMaterial&&null!==f.match(m)&&null!==g.match(m)&&(l=!0,f=f.replace(m,""),g=g.replace(m,"")),e="#version 300 es\n\n#define attribute in\n#define varying out\n#define texture2D texture\n"+e,k=["#version 300 es\n\n#define varying in",l?"":"out highp vec4 pc_fragColor;",l?"":"#define gl_FragColor pc_fragColor",
|
|
|
-"#define gl_FragDepthEXT gl_FragDepth\n#define texture2D texture\n#define textureCube texture\n#define texture2DProj textureProj\n#define texture2DLodEXT textureLod\n#define texture2DProjLodEXT textureProjLod\n#define textureCubeLodEXT textureLod\n#define texture2DGradEXT textureGrad\n#define texture2DProjGradEXT textureProjGrad\n#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+k,0<u&&(e=e.replace("#version 300 es\n",["#version 300 es\n\n#extension GL_OVR_multiview2 : require","layout(num_views = "+
|
|
|
-u+") in;","#define VIEW_ID gl_ViewID_OVR"].join("\n")),e=e.replace("uniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat3 normalMatrix;",["uniform mat4 modelViewMatrices["+u+"];","uniform mat4 projectionMatrices["+u+"];","uniform mat4 viewMatrices["+u+"];","uniform mat3 normalMatrices["+u+"];","#define modelViewMatrix modelViewMatrices[VIEW_ID]\n#define projectionMatrix projectionMatrices[VIEW_ID]\n#define viewMatrix viewMatrices[VIEW_ID]\n#define normalMatrix normalMatrices[VIEW_ID]"].join("\n")),
|
|
|
+b&&(a.uniform1i(this.addr,b),c[0]=b)}function Rj(a,b){var c=this.cache;Oa(c,b)||(a.uniform2iv(this.addr,b),Ia(c,b))}function Sj(a,b){var c=this.cache;Oa(c,b)||(a.uniform3iv(this.addr,b),Ia(c,b))}function Tj(a,b){var c=this.cache;Oa(c,b)||(a.uniform4iv(this.addr,b),Ia(c,b))}function Uj(a){switch(a){case 5126:return Dj;case 35664:return Ej;case 35665:return Fj;case 35666:return Gj;case 35674:return Hj;case 35675:return Ij;case 35676:return Jj;case 5124:case 35670:return Qj;case 35667:case 35671:return Rj;
|
|
|
+case 35668:case 35672:return Sj;case 35669:case 35673:return Tj;case 35678:case 36198:case 36298:case 36306:case 35682:return Kj;case 35679:case 36299:case 36307:return Nj;case 35680:case 36300:case 36308:case 36293:return Pj;case 36289:case 36303:case 36311:case 36292:return Lj}}function Vj(a,b){a.uniform1fv(this.addr,b)}function Wj(a,b){a.uniform1iv(this.addr,b)}function Xj(a,b){a.uniform2iv(this.addr,b)}function Yj(a,b){a.uniform3iv(this.addr,b)}function Zj(a,b){a.uniform4iv(this.addr,b)}function ak(a,
|
|
|
+b){b=Hc(b,this.size,2);a.uniform2fv(this.addr,b)}function bk(a,b){b=Hc(b,this.size,3);a.uniform3fv(this.addr,b)}function ck(a,b){b=Hc(b,this.size,4);a.uniform4fv(this.addr,b)}function dk(a,b){b=Hc(b,this.size,4);a.uniformMatrix2fv(this.addr,!1,b)}function ek(a,b){b=Hc(b,this.size,9);a.uniformMatrix3fv(this.addr,!1,b)}function fk(a,b){b=Hc(b,this.size,16);a.uniformMatrix4fv(this.addr,!1,b)}function gk(a,b,c){var d=b.length,e=zh(c,d);a.uniform1iv(this.addr,e);for(a=0;a!==d;++a)c.safeSetTexture2D(b[a]||
|
|
|
+Eh,e[a])}function hk(a,b,c){var d=b.length,e=zh(c,d);a.uniform1iv(this.addr,e);for(a=0;a!==d;++a)c.safeSetTextureCube(b[a]||Fh,e[a])}function ik(a){switch(a){case 5126:return Vj;case 35664:return ak;case 35665:return bk;case 35666:return ck;case 35674:return dk;case 35675:return ek;case 35676:return fk;case 5124:case 35670:return Wj;case 35667:case 35671:return Xj;case 35668:case 35672:return Yj;case 35669:case 35673:return Zj;case 35678:case 36198:case 36298:case 36306:case 35682:return gk;case 35680:case 36300:case 36308:case 36293:return hk}}
|
|
|
+function jk(a,b,c){this.id=a;this.addr=c;this.cache=[];this.setValue=Uj(b.type)}function Gh(a,b,c){this.id=a;this.addr=c;this.cache=[];this.size=b.size;this.setValue=ik(b.type)}function Hh(a){this.id=a;this.seq=[];this.map={}}function Db(a,b){this.seq=[];this.map={};for(var c=a.getProgramParameter(b,35718),d=0;d<c;++d){var e=a.getActiveUniform(b,d),f=a.getUniformLocation(b,e.name),g=this,k=e.name,l=k.length;for(gg.lastIndex=0;;){var m=gg.exec(k),x=gg.lastIndex,p=m[1],h=m[3];"]"===m[2]&&(p|=0);if(void 0===
|
|
|
+h||"["===h&&x+2===l){k=g;e=void 0===h?new jk(p,e,f):new Gh(p,e,f);k.seq.push(e);k.map[e.id]=e;break}else h=g.map[p],void 0===h&&(h=new Hh(p),p=g,g=h,p.seq.push(g),p.map[g.id]=g),g=h}}}function Ih(a,b,c){b=a.createShader(b);a.shaderSource(b,c);a.compileShader(b);return b}function Jh(a){switch(a){case 3E3:return["Linear","( value )"];case 3001:return["sRGB","( value )"];case 3002:return["RGBE","( value )"];case 3004:return["RGBM","( value, 7.0 )"];case 3005:return["RGBM","( value, 16.0 )"];case 3006:return["RGBD",
|
|
|
+"( value, 256.0 )"];case 3007:return["Gamma","( value, float( GAMMA_FACTOR ) )"];case 3003:return["LogLuv","( value )"];default:throw Error("unsupported encoding: "+a);}}function Kh(a,b,c){var d=a.getShaderParameter(b,35713),e=a.getShaderInfoLog(b).trim();if(d&&""===e)return"";a=a.getShaderSource(b).split("\n");for(b=0;b<a.length;b++)a[b]=b+1+": "+a[b];a=a.join("\n");return"THREE.WebGLShader: gl.getShaderInfoLog() "+c+"\n"+e+a}function Id(a,b){b=Jh(b);return"vec4 "+a+"( vec4 value ) { return "+b[0]+
|
|
|
+"ToLinear"+b[1]+"; }"}function kk(a,b){b=Jh(b);return"vec4 "+a+"( vec4 value ) { return LinearTo"+b[0]+b[1]+"; }"}function lk(a,b){switch(b){case 1:b="Linear";break;case 2:b="Reinhard";break;case 3:b="Uncharted2";break;case 4:b="OptimizedCineon";break;case 5:b="ACESFilmic";break;default:throw Error("unsupported toneMapping: "+b);}return"vec3 "+a+"( vec3 color ) { return "+b+"ToneMapping( color ); }"}function mk(a){var b=[],c;for(c in a){var d=a[c];!1!==d&&b.push("#define "+c+" "+d)}return b.join("\n")}
|
|
|
+function Jd(a){return""!==a}function Lh(a,b){return a.replace(/NUM_DIR_LIGHTS/g,b.numDirLights).replace(/NUM_SPOT_LIGHTS/g,b.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g,b.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,b.numPointLights).replace(/NUM_HEMI_LIGHTS/g,b.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,b.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS/g,b.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,b.numPointLightShadows)}function Mh(a,b){return a.replace(/NUM_CLIPPING_PLANES/g,
|
|
|
+b.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,b.numClippingPlanes-b.numClipIntersection)}function hg(a,b){a=O[b];if(void 0===a)throw Error("Can not resolve #include <"+b+">");return a.replace(ig,hg)}function Nh(a,b,c,d){a="";for(b=parseInt(b);b<parseInt(c);b++)a+=d.replace(/\[ i \]/g,"[ "+b+" ]").replace(/UNROLLED_LOOP_INDEX/g,b);return a}function Oh(a){var b="precision "+a.precision+" float;\nprecision "+a.precision+" int;";"highp"===a.precision?b+="\n#define HIGH_PRECISION":"mediump"===
|
|
|
+a.precision?b+="\n#define MEDIUM_PRECISION":"lowp"===a.precision&&(b+="\n#define LOW_PRECISION");return b}function nk(a){var b="SHADOWMAP_TYPE_BASIC";1===a.shadowMapType?b="SHADOWMAP_TYPE_PCF":2===a.shadowMapType?b="SHADOWMAP_TYPE_PCF_SOFT":3===a.shadowMapType&&(b="SHADOWMAP_TYPE_VSM");return b}function ok(a){var b="ENVMAP_TYPE_CUBE";if(a.envMap)switch(a.envMapMode){case 301:case 302:b="ENVMAP_TYPE_CUBE";break;case 306:case 307:b="ENVMAP_TYPE_CUBE_UV";break;case 303:case 304:b="ENVMAP_TYPE_EQUIREC";
|
|
|
+break;case 305:b="ENVMAP_TYPE_SPHERE"}return b}function pk(a){var b="ENVMAP_MODE_REFLECTION";if(a.envMap)switch(a.envMapMode){case 302:case 304:b="ENVMAP_MODE_REFRACTION"}return b}function qk(a){var b="ENVMAP_BLENDING_NONE";if(a.envMap)switch(a.combine){case 0:b="ENVMAP_BLENDING_MULTIPLY";break;case 1:b="ENVMAP_BLENDING_MIX";break;case 2:b="ENVMAP_BLENDING_ADD"}return b}function rk(a,b,c){var d=a.getContext(),e=c.defines,f=c.vertexShader,g=c.fragmentShader,k=nk(c),l=ok(c),m=pk(c),x=qk(c),p=0<a.gammaFactor?
|
|
|
+a.gammaFactor:1,h=c.isWebGL2?"":[c.extensionDerivatives||c.envMapCubeUV||c.bumpMap||c.tangentSpaceNormalMap||c.clearcoatNormalMap||c.flatShading||"physical"===c.shaderID?"#extension GL_OES_standard_derivatives : enable":"",(c.extensionFragDepth||c.logarithmicDepthBuffer)&&c.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",c.extensionDrawBuffers&&c.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(c.extensionShaderTextureLOD||c.envMap)&&c.rendererExtensionShaderTextureLod?
|
|
|
+"#extension GL_EXT_shader_texture_lod : enable":""].filter(Jd).join("\n"),t=mk(e),r=d.createProgram(),u=c.numMultiviewViews;c.isRawShaderMaterial?(e=[t].filter(Jd).join("\n"),0<e.length&&(e+="\n"),k=[h,t].filter(Jd).join("\n"),0<k.length&&(k+="\n")):(e=[Oh(c),"#define SHADER_NAME "+c.shaderName,t,c.instancing?"#define USE_INSTANCING":"",c.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+p,"#define MAX_BONES "+c.maxBones,c.useFog&&c.fog?"#define USE_FOG":"",c.useFog&&c.fogExp2?
|
|
|
+"#define FOG_EXP2":"",c.map?"#define USE_MAP":"",c.envMap?"#define USE_ENVMAP":"",c.envMap?"#define "+m:"",c.lightMap?"#define USE_LIGHTMAP":"",c.aoMap?"#define USE_AOMAP":"",c.emissiveMap?"#define USE_EMISSIVEMAP":"",c.bumpMap?"#define USE_BUMPMAP":"",c.normalMap?"#define USE_NORMALMAP":"",c.normalMap&&c.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",c.normalMap&&c.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",c.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",c.displacementMap&&
|
|
|
+c.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",c.specularMap?"#define USE_SPECULARMAP":"",c.roughnessMap?"#define USE_ROUGHNESSMAP":"",c.metalnessMap?"#define USE_METALNESSMAP":"",c.alphaMap?"#define USE_ALPHAMAP":"",c.vertexTangents?"#define USE_TANGENT":"",c.vertexColors?"#define USE_COLOR":"",c.vertexUvs?"#define USE_UV":"",c.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",c.flatShading?"#define FLAT_SHADED":"",c.skinning?"#define USE_SKINNING":"",c.useVertexTexture?"#define BONE_TEXTURE":
|
|
|
+"",c.morphTargets?"#define USE_MORPHTARGETS":"",c.morphNormals&&!1===c.flatShading?"#define USE_MORPHNORMALS":"",c.doubleSided?"#define DOUBLE_SIDED":"",c.flipSided?"#define FLIP_SIDED":"",c.shadowMapEnabled?"#define USE_SHADOWMAP":"",c.shadowMapEnabled?"#define "+k:"",c.sizeAttenuation?"#define USE_SIZEATTENUATION":"",c.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",c.logarithmicDepthBuffer&&(c.isWebGL2||c.rendererExtensionFragDepth)?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;",
|
|
|
+"uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#ifdef USE_COLOR","\tattribute vec3 color;","#endif","#ifdef USE_MORPHTARGETS","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;",
|
|
|
+"\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(Jd).join("\n"),
|
|
|
+k=[h,Oh(c),"#define SHADER_NAME "+c.name,t,c.alphaTest?"#define ALPHATEST "+c.alphaTest+(c.alphaTest%1?"":".0"):"","#define GAMMA_FACTOR "+p,c.useFog&&c.fog?"#define USE_FOG":"",c.useFog&&c.fogExp2?"#define FOG_EXP2":"",c.map?"#define USE_MAP":"",c.matcap?"#define USE_MATCAP":"",c.envMap?"#define USE_ENVMAP":"",c.envMap?"#define "+l:"",c.envMap?"#define "+m:"",c.envMap?"#define "+x:"",c.lightMap?"#define USE_LIGHTMAP":"",c.aoMap?"#define USE_AOMAP":"",c.emissiveMap?"#define USE_EMISSIVEMAP":"",c.bumpMap?
|
|
|
+"#define USE_BUMPMAP":"",c.normalMap?"#define USE_NORMALMAP":"",c.normalMap&&c.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",c.normalMap&&c.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",c.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",c.specularMap?"#define USE_SPECULARMAP":"",c.roughnessMap?"#define USE_ROUGHNESSMAP":"",c.metalnessMap?"#define USE_METALNESSMAP":"",c.alphaMap?"#define USE_ALPHAMAP":"",c.sheen?"#define USE_SHEEN":"",c.vertexTangents?"#define USE_TANGENT":
|
|
|
+"",c.vertexColors?"#define USE_COLOR":"",c.vertexUvs?"#define USE_UV":"",c.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",c.gradientMap?"#define USE_GRADIENTMAP":"",c.flatShading?"#define FLAT_SHADED":"",c.doubleSided?"#define DOUBLE_SIDED":"",c.flipSided?"#define FLIP_SIDED":"",c.shadowMapEnabled?"#define USE_SHADOWMAP":"",c.shadowMapEnabled?"#define "+k:"",c.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",c.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",c.logarithmicDepthBuffer?
|
|
|
+"#define USE_LOGDEPTHBUF":"",c.logarithmicDepthBuffer&&(c.isWebGL2||c.rendererExtensionFragDepth)?"#define USE_LOGDEPTHBUF_EXT":"",(c.extensionShaderTextureLOD||c.envMap)&&(c.isWebGL2||c.rendererExtensionShaderTextureLod)?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",0!==c.toneMapping?"#define TONE_MAPPING":"",0!==c.toneMapping?O.tonemapping_pars_fragment:"",0!==c.toneMapping?lk("toneMapping",c.toneMapping):"",c.dithering?"#define DITHERING":
|
|
|
+"",c.outputEncoding||c.mapEncoding||c.matcapEncoding||c.envMapEncoding||c.emissiveMapEncoding||c.lightMapEncoding?O.encodings_pars_fragment:"",c.mapEncoding?Id("mapTexelToLinear",c.mapEncoding):"",c.matcapEncoding?Id("matcapTexelToLinear",c.matcapEncoding):"",c.envMapEncoding?Id("envMapTexelToLinear",c.envMapEncoding):"",c.emissiveMapEncoding?Id("emissiveMapTexelToLinear",c.emissiveMapEncoding):"",c.lightMapEncoding?Id("lightMapTexelToLinear",c.lightMapEncoding):"",c.outputEncoding?kk("linearToOutputTexel",
|
|
|
+c.outputEncoding):"",c.depthPacking?"#define DEPTH_PACKING "+c.depthPacking:"","\n"].filter(Jd).join("\n"));f=f.replace(ig,hg);f=Lh(f,c);f=Mh(f,c);g=g.replace(ig,hg);g=Lh(g,c);g=Mh(g,c);f=f.replace(Ph,Nh);g=g.replace(Ph,Nh);c.isWebGL2&&!c.isRawShaderMaterial&&(l=!1,m=/^\s*#version\s+300\s+es\s*\n/,c.isShaderMaterial&&null!==f.match(m)&&null!==g.match(m)&&(l=!0,f=f.replace(m,""),g=g.replace(m,"")),e="#version 300 es\n\n#define attribute in\n#define varying out\n#define texture2D texture\n"+e,k=["#version 300 es\n\n#define varying in",
|
|
|
+l?"":"out highp vec4 pc_fragColor;",l?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth\n#define texture2D texture\n#define textureCube texture\n#define texture2DProj textureProj\n#define texture2DLodEXT textureLod\n#define texture2DProjLodEXT textureProjLod\n#define textureCubeLodEXT textureLod\n#define texture2DGradEXT textureGrad\n#define texture2DProjGradEXT textureProjGrad\n#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+k,0<u&&(e=e.replace("#version 300 es\n",
|
|
|
+["#version 300 es\n\n#extension GL_OVR_multiview2 : require","layout(num_views = "+u+") in;","#define VIEW_ID gl_ViewID_OVR"].join("\n")),e=e.replace("uniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat3 normalMatrix;",["uniform mat4 modelViewMatrices["+u+"];","uniform mat4 projectionMatrices["+u+"];","uniform mat4 viewMatrices["+u+"];","uniform mat3 normalMatrices["+u+"];","#define modelViewMatrix modelViewMatrices[VIEW_ID]\n#define projectionMatrix projectionMatrices[VIEW_ID]\n#define viewMatrix viewMatrices[VIEW_ID]\n#define normalMatrix normalMatrices[VIEW_ID]"].join("\n")),
|
|
|
k=k.replace("#version 300 es\n","#version 300 es\n\n#extension GL_OVR_multiview2 : require\n#define VIEW_ID gl_ViewID_OVR"),k=k.replace("uniform mat4 viewMatrix;",["uniform mat4 viewMatrices["+u+"];","#define viewMatrix viewMatrices[VIEW_ID]"].join("\n"))));g=k+g;f=Ih(d,35633,e+f);g=Ih(d,35632,g);d.attachShader(r,f);d.attachShader(r,g);void 0!==c.index0AttributeName?d.bindAttribLocation(r,0,c.index0AttributeName):!0===c.morphTargets&&d.bindAttribLocation(r,0,"position");d.linkProgram(r);if(a.debug.checkShaderErrors){a=
|
|
|
d.getProgramInfoLog(r).trim();l=d.getShaderInfoLog(f).trim();m=d.getShaderInfoLog(g).trim();p=x=!0;if(!1===d.getProgramParameter(r,35714))x=!1,h=Kh(d,f,"vertex"),t=Kh(d,g,"fragment"),console.error("THREE.WebGLProgram: shader error: ",d.getError(),"35715",d.getProgramParameter(r,35715),"gl.getProgramInfoLog",a,h,t);else if(""!==a)console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",a);else if(""===l||""===m)p=!1;p&&(this.diagnostics={runnable:x,programLog:a,vertexShader:{log:l,prefix:e},fragmentShader:{log:m,
|
|
|
prefix:k}})}d.deleteShader(f);d.deleteShader(g);var n;this.getUniforms=function(){void 0===n&&(n=new Db(d,r));return n};var w;this.getAttributes=function(){if(void 0===w){for(var a={},b=d.getProgramParameter(r,35721),c=0;c<b;c++){var e=d.getActiveAttrib(r,c).name;a[e]=d.getAttribLocation(r,e)}w=a}return w};this.destroy=function(){d.deleteProgram(r);this.program=void 0};this.name=c.shaderName;this.id=sk++;this.cacheKey=b;this.usedTimes=1;this.program=r;this.vertexShader=f;this.fragmentShader=g;this.numMultiviewViews=
|
|
@@ -170,173 +169,173 @@ a.matrix);a.matrixWorldInverse.getInverse(a.matrixWorld)}var k=this,l=null,m=nul
|
|
|
a};this.getReferenceSpace=function(){return m};this.getSession=function(){return l};this.setSession=function(a){l=a;null!==l&&(l.addEventListener("select",c),l.addEventListener("selectstart",c),l.addEventListener("selectend",c),l.addEventListener("squeeze",c),l.addEventListener("squeezestart",c),l.addEventListener("squeezeend",c),l.addEventListener("end",d),a=b.getContextAttributes(),a=new XRWebGLLayer(l,b,{antialias:a.antialias,alpha:a.alpha,depth:a.depth,stencil:a.stencil}),l.updateRenderState({baseLayer:a}),
|
|
|
l.requestReferenceSpace(x).then(e),l.addEventListener("inputsourceschange",f))};var w=new n,E=new n;this.getCamera=function(a){var b=a.parent,c=y.cameras;g(y,b);for(var d=0;d<c.length;d++)g(c[d],b);a.matrixWorld.copy(y.matrixWorld);a=a.children;d=0;for(b=a.length;d<b;d++)a[d].updateMatrixWorld(!0);w.setFromMatrixPosition(r.matrixWorld);E.setFromMatrixPosition(u.matrixWorld);d=w.distanceTo(E);var e=r.projectionMatrix.elements,f=u.projectionMatrix.elements,k=e[14]/(e[10]-1);a=e[14]/(e[10]+1);b=(e[9]+
|
|
|
1)/e[5];c=(e[9]-1)/e[5];var l=(e[8]-1)/e[0],m=(f[8]+1)/f[0];f=k*l;e=k*m;m=d/(-l+m);l=m*-l;r.matrixWorld.decompose(y.position,y.quaternion,y.scale);y.translateX(l);y.translateZ(m);y.matrixWorld.compose(y.position,y.quaternion,y.scale);y.matrixWorldInverse.getInverse(y.matrixWorld);k+=m;m=a+m;y.projectionMatrix.makePerspective(f-l,e+(d-l),b*a/m*k,c*a/m*k,k,m);return y};var v=null,V=new xh;V.setAnimationLoop(function(b,c){p=c.getViewerPose(m);if(null!==p){var d=p.views,e=l.renderState.baseLayer;a.setFramebuffer(e.framebuffer);
|
|
|
-for(var f=0;f<d.length;f++){var g=d[f],k=e.getViewport(g),x=y.cameras[f];x.matrix.fromArray(g.transform.inverse.matrix).getInverse(x.matrix);x.projectionMatrix.fromArray(g.projectionMatrix);x.viewport.set(k.x,k.y,k.width,k.height);0===f&&y.matrix.copy(x.matrix)}}d=l.inputSources;for(f=0;f<h.length;f++){e=h[f];if(g=d[f])if(g=c.getPose(g.targetRaySpace,m),null!==g){e.matrix.fromArray(g.transform.matrix);e.matrix.decompose(e.position,e.rotation,e.scale);e.visible=!0;continue}e.visible=!1}v&&v(b,c)});
|
|
|
-this.setAnimationLoop=function(a){v=a};this.dispose=function(){}}function og(a){var b;function c(){sa=new wj(I);Ha=new uj(I,sa,a);!1===Ha.isWebGL2&&(sa.get("WEBGL_depth_texture"),sa.get("OES_texture_float"),sa.get("OES_texture_half_float"),sa.get("OES_texture_half_float_linear"),sa.get("OES_standard_derivatives"),sa.get("OES_element_index_uint"),sa.get("ANGLE_instanced_arrays"));sa.get("OES_texture_float_linear");pa=new Vh(I,sa,Ha);aa=new Dk(I,sa,Ha);aa.scissor(T.copy(ja).multiplyScalar(Q).floor());
|
|
|
-aa.viewport(X.copy(R).multiplyScalar(Q).floor());ba=new zj(I);W=new uk;ea=new Ek(I,sa,aa,W,Ha,pa,ba);na=new rj(I);ya=new xj(I,na,ba);ta=new Cj(I,ya,na,ba);Aa=new Bj(I);ua=new tk(z,sa,Ha);xa=new xk;wa=new Ck;oa=new sj(z,aa,ta,A);Ba=new tj(I,sa,ba,Ha);Da=new yj(I,sa,ba,Ha);ba.programs=ua.programs;z.capabilities=Ha;z.extensions=sa;z.properties=W;z.renderLists=xa;z.state=aa;z.info=ba}function d(a){a.preventDefault();console.log("THREE.WebGLRenderer: Context Lost.");H=!0}function e(){console.log("THREE.WebGLRenderer: Context Restored.");
|
|
|
-H=!1;c()}function f(a){a=a.target;a.removeEventListener("dispose",f);g(a);W.remove(a)}function g(a){var b=W.get(a).program;a.program=void 0;void 0!==b&&ua.releaseProgram(b)}function k(a,b){a.render(function(a){z.renderBufferImmediate(a,b)})}function l(a,b,c,d){if(!1!==a.visible){if(a.layers.test(b.layers))if(a.isGroup)c=a.renderOrder;else if(a.isLOD)!0===a.autoUpdate&&a.update(b);else if(a.isLight)F.pushLight(a),a.castShadow&&F.pushShadow(a);else if(a.isSprite){if(!a.frustumCulled||kg.intersectsSprite(a)){d&&
|
|
|
-Gb.setFromMatrixPosition(a.matrixWorld).applyMatrix4(Ld);var e=ta.update(a),f=a.material;f.visible&&B.push(a,e,f,c,Gb.z,null)}}else if(a.isImmediateRenderObject)d&&Gb.setFromMatrixPosition(a.matrixWorld).applyMatrix4(Ld),B.push(a,null,a.material,c,Gb.z,null);else if(a.isMesh||a.isLine||a.isPoints)if(a.isSkinnedMesh&&a.skeleton.frame!==ba.render.frame&&(a.skeleton.update(),a.skeleton.frame=ba.render.frame),!a.frustumCulled||kg.intersectsObject(a))if(d&&Gb.setFromMatrixPosition(a.matrixWorld).applyMatrix4(Ld),
|
|
|
-e=ta.update(a),f=a.material,Array.isArray(f))for(var g=e.groups,k=0,m=g.length;k<m;k++){var p=g[k],x=f[p.materialIndex];x&&x.visible&&B.push(a,e,x,c,Gb.z,p)}else f.visible&&B.push(a,e,f,c,Gb.z,null);a=a.children;k=0;for(m=a.length;k<m;k++)l(a[k],b,c,d)}}function m(a,b,c,d){for(var e=0,f=a.length;e<f;e++){var g=a[e],k=g.object,l=g.geometry,m=void 0===d?g.material:d;g=g.group;if(c.isArrayCamera)if(ca=c,la.enabled&&va.isAvailable())x(k,b,c,l,m,g);else for(var p=c.cameras,h=0,q=p.length;h<q;h++){var r=
|
|
|
-p[h];k.layers.test(r.layers)&&(aa.viewport(X.copy(r.viewport)),F.setupLights(r),x(k,b,r,l,m,g))}else ca=null,x(k,b,c,l,m,g)}}function x(a,c,d,e,f,g){a.onBeforeRender(z,c,d,e,f,g);F=wa.get(c,ca||d);a.modelViewMatrix.multiplyMatrices(d.matrixWorldInverse,a.matrixWorld);a.normalMatrix.getNormalMatrix(a.modelViewMatrix);if(a.isImmediateRenderObject){var l=h(d,c,f,a);aa.setMaterial(f);fa=b=null;ha=!1;k(a,l)}else z.renderBufferDirect(d,c,e,f,a,g);a.onAfterRender(z,c,d,e,f,g);F=wa.get(c,ca||d)}function p(a,
|
|
|
-b,c){var d=W.get(a),e=F.state.lights,k=e.state.version;c=ua.getParameters(a,e.state,F.state.shadowsArray,b,Ta.numPlanes,Ta.numIntersection,c);var l=ua.getProgramCacheKey(c),m=d.program,p=!0;if(void 0===m)a.addEventListener("dispose",f);else if(m.cacheKey!==l)g(a);else{if(d.lightsStateVersion!==k)d.lightsStateVersion=k;else if(void 0!==c.shaderID)return;p=!1}p&&(m=ua.acquireProgram(c,l),d.program=m,d.uniforms=c.uniforms,d.environment=a.isMeshStandardMaterial?b.environment:null,d.outputEncoding=z.outputEncoding,
|
|
|
-a.program=m);c=m.getAttributes();if(a.morphTargets)for(l=a.numSupportedMorphTargets=0;l<z.maxMorphTargets;l++)0<=c["morphTarget"+l]&&a.numSupportedMorphTargets++;if(a.morphNormals)for(l=a.numSupportedMorphNormals=0;l<z.maxMorphNormals;l++)0<=c["morphNormal"+l]&&a.numSupportedMorphNormals++;c=d.uniforms;if(!a.isShaderMaterial&&!a.isRawShaderMaterial||!0===a.clipping)d.numClippingPlanes=Ta.numPlanes,d.numIntersection=Ta.numIntersection,c.clippingPlanes=Ta.uniform;d.fog=b.fog;d.needsLights=a.isMeshLambertMaterial||
|
|
|
-a.isMeshToonMaterial||a.isMeshPhongMaterial||a.isMeshStandardMaterial||a.isShadowMaterial||a.isShaderMaterial&&!0===a.lights;d.lightsStateVersion=k;d.needsLights&&(c.ambientLightColor.value=e.state.ambient,c.lightProbe.value=e.state.probe,c.directionalLights.value=e.state.directional,c.spotLights.value=e.state.spot,c.rectAreaLights.value=e.state.rectArea,c.pointLights.value=e.state.point,c.hemisphereLights.value=e.state.hemi,c.directionalShadowMap.value=e.state.directionalShadowMap,c.directionalShadowMatrix.value=
|
|
|
-e.state.directionalShadowMatrix,c.spotShadowMap.value=e.state.spotShadowMap,c.spotShadowMatrix.value=e.state.spotShadowMatrix,c.pointShadowMap.value=e.state.pointShadowMap,c.pointShadowMatrix.value=e.state.pointShadowMatrix);a=d.program.getUniforms();a=Db.seqWithValue(a.seq,c);d.uniformsList=a}function h(a,b,c,d){ea.resetTextureUnits();var e=b.fog,f=c.isMeshStandardMaterial?b.environment:null,g=W.get(c),k=F.state.lights;qa&&(lg||a!==Z)&&Ta.setState(c.clippingPlanes,c.clipIntersection,c.clipShadows,
|
|
|
-a,g,a===Z&&c.id===Ne);c.version===g.__version&&(void 0===g.program?c.needsUpdate=!0:c.fog&&g.fog!==e?c.needsUpdate=!0:g.environment!==f?c.needsUpdate=!0:g.needsLights&&g.lightsStateVersion!==k.state.version?c.needsUpdate=!0:void 0===g.numClippingPlanes||g.numClippingPlanes===Ta.numPlanes&&g.numIntersection===Ta.numIntersection?g.outputEncoding!==z.outputEncoding&&(c.needsUpdate=!0):c.needsUpdate=!0);c.version!==g.__version&&(p(c,b,d),g.__version=c.version);var l=!1,m=!1,x=!1;b=g.program;k=b.getUniforms();
|
|
|
-var h=g.uniforms;aa.useProgram(b.program)&&(x=m=l=!0);c.id!==Ne&&(Ne=c.id,m=!0);if(l||Z!==a){0<b.numMultiviewViews?va.updateCameraProjectionMatricesUniform(a,k):k.setValue(I,"projectionMatrix",a.projectionMatrix);Ha.logarithmicDepthBuffer&&k.setValue(I,"logDepthBufFC",2/(Math.log(a.far+1)/Math.LN2));Z!==a&&(Z=a,x=m=!0);if(c.isShaderMaterial||c.isMeshPhongMaterial||c.isMeshToonMaterial||c.isMeshStandardMaterial||c.envMap)l=k.map.cameraPosition,void 0!==l&&l.setValue(I,Gb.setFromMatrixPosition(a.matrixWorld));
|
|
|
-(c.isMeshPhongMaterial||c.isMeshToonMaterial||c.isMeshLambertMaterial||c.isMeshBasicMaterial||c.isMeshStandardMaterial||c.isShaderMaterial)&&k.setValue(I,"isOrthographic",!0===a.isOrthographicCamera);if(c.isMeshPhongMaterial||c.isMeshToonMaterial||c.isMeshLambertMaterial||c.isMeshBasicMaterial||c.isMeshStandardMaterial||c.isShaderMaterial||c.skinning)0<b.numMultiviewViews?va.updateCameraViewMatricesUniform(a,k):k.setValue(I,"viewMatrix",a.matrixWorldInverse)}if(c.skinning&&(k.setOptional(I,d,"bindMatrix"),
|
|
|
-k.setOptional(I,d,"bindMatrixInverse"),l=d.skeleton)){var q=l.bones;if(Ha.floatVertexTextures){if(void 0===l.boneTexture){q=Math.sqrt(4*q.length);q=L.ceilPowerOfTwo(q);q=Math.max(q,4);var n=new Float32Array(q*q*4);n.set(l.boneMatrices);var u=new $b(n,q,q,1023,1015);l.boneMatrices=n;l.boneTexture=u;l.boneTextureSize=q}k.setValue(I,"boneTexture",l.boneTexture,ea);k.setValue(I,"boneTextureSize",l.boneTextureSize)}else k.setOptional(I,l,"boneMatrices")}if(m||g.receiveShadow!==d.receiveShadow)g.receiveShadow=
|
|
|
-d.receiveShadow,k.setValue(I,"receiveShadow",d.receiveShadow);if(m){k.setValue(I,"toneMappingExposure",z.toneMappingExposure);k.setValue(I,"toneMappingWhitePoint",z.toneMappingWhitePoint);g.needsLights&&(m=x,h.ambientLightColor.needsUpdate=m,h.lightProbe.needsUpdate=m,h.directionalLights.needsUpdate=m,h.pointLights.needsUpdate=m,h.spotLights.needsUpdate=m,h.rectAreaLights.needsUpdate=m,h.hemisphereLights.needsUpdate=m);e&&c.fog&&(h.fogColor.value.copy(e.color),e.isFog?(h.fogNear.value=e.near,h.fogFar.value=
|
|
|
-e.far):e.isFogExp2&&(h.fogDensity.value=e.density));if(c.isMeshBasicMaterial)t(h,c);else if(c.isMeshLambertMaterial)t(h,c),c.emissiveMap&&(h.emissiveMap.value=c.emissiveMap);else if(c.isMeshToonMaterial)t(h,c),h.specular.value.copy(c.specular),h.shininess.value=Math.max(c.shininess,1E-4),c.gradientMap&&(h.gradientMap.value=c.gradientMap),c.emissiveMap&&(h.emissiveMap.value=c.emissiveMap),c.bumpMap&&(h.bumpMap.value=c.bumpMap,h.bumpScale.value=c.bumpScale,1===c.side&&(h.bumpScale.value*=-1)),c.normalMap&&
|
|
|
-(h.normalMap.value=c.normalMap,h.normalScale.value.copy(c.normalScale),1===c.side&&h.normalScale.value.negate()),c.displacementMap&&(h.displacementMap.value=c.displacementMap,h.displacementScale.value=c.displacementScale,h.displacementBias.value=c.displacementBias);else if(c.isMeshPhongMaterial)t(h,c),h.specular.value.copy(c.specular),h.shininess.value=Math.max(c.shininess,1E-4),c.emissiveMap&&(h.emissiveMap.value=c.emissiveMap),c.bumpMap&&(h.bumpMap.value=c.bumpMap,h.bumpScale.value=c.bumpScale,
|
|
|
-1===c.side&&(h.bumpScale.value*=-1)),c.normalMap&&(h.normalMap.value=c.normalMap,h.normalScale.value.copy(c.normalScale),1===c.side&&h.normalScale.value.negate()),c.displacementMap&&(h.displacementMap.value=c.displacementMap,h.displacementScale.value=c.displacementScale,h.displacementBias.value=c.displacementBias);else if(c.isMeshStandardMaterial)t(h,c,f),c.isMeshPhysicalMaterial?(r(h,c,f),h.reflectivity.value=c.reflectivity,h.clearcoat.value=c.clearcoat,h.clearcoatRoughness.value=c.clearcoatRoughness,
|
|
|
-c.sheen&&h.sheen.value.copy(c.sheen),c.clearcoatNormalMap&&(h.clearcoatNormalScale.value.copy(c.clearcoatNormalScale),h.clearcoatNormalMap.value=c.clearcoatNormalMap,1===c.side&&h.clearcoatNormalScale.value.negate()),h.transparency.value=c.transparency):r(h,c,f);else if(c.isMeshMatcapMaterial)t(h,c),c.matcap&&(h.matcap.value=c.matcap),c.bumpMap&&(h.bumpMap.value=c.bumpMap,h.bumpScale.value=c.bumpScale,1===c.side&&(h.bumpScale.value*=-1)),c.normalMap&&(h.normalMap.value=c.normalMap,h.normalScale.value.copy(c.normalScale),
|
|
|
-1===c.side&&h.normalScale.value.negate()),c.displacementMap&&(h.displacementMap.value=c.displacementMap,h.displacementScale.value=c.displacementScale,h.displacementBias.value=c.displacementBias);else if(c.isMeshDepthMaterial)t(h,c),c.displacementMap&&(h.displacementMap.value=c.displacementMap,h.displacementScale.value=c.displacementScale,h.displacementBias.value=c.displacementBias);else if(c.isMeshDistanceMaterial)t(h,c),c.displacementMap&&(h.displacementMap.value=c.displacementMap,h.displacementScale.value=
|
|
|
-c.displacementScale,h.displacementBias.value=c.displacementBias),h.referencePosition.value.copy(c.referencePosition),h.nearDistance.value=c.nearDistance,h.farDistance.value=c.farDistance;else if(c.isMeshNormalMaterial)t(h,c),c.bumpMap&&(h.bumpMap.value=c.bumpMap,h.bumpScale.value=c.bumpScale,1===c.side&&(h.bumpScale.value*=-1)),c.normalMap&&(h.normalMap.value=c.normalMap,h.normalScale.value.copy(c.normalScale),1===c.side&&h.normalScale.value.negate()),c.displacementMap&&(h.displacementMap.value=c.displacementMap,
|
|
|
-h.displacementScale.value=c.displacementScale,h.displacementBias.value=c.displacementBias);else if(c.isLineBasicMaterial)h.diffuse.value.copy(c.color),h.opacity.value=c.opacity,c.isLineDashedMaterial&&(h.dashSize.value=c.dashSize,h.totalSize.value=c.dashSize+c.gapSize,h.scale.value=c.scale);else if(c.isPointsMaterial){h.diffuse.value.copy(c.color);h.opacity.value=c.opacity;h.size.value=c.size*Q;h.scale.value=.5*J;c.map&&(h.map.value=c.map);c.alphaMap&&(h.alphaMap.value=c.alphaMap);if(c.map)var y=
|
|
|
-c.map;else c.alphaMap&&(y=c.alphaMap);void 0!==y&&(!0===y.matrixAutoUpdate&&y.updateMatrix(),h.uvTransform.value.copy(y.matrix))}else if(c.isSpriteMaterial){h.diffuse.value.copy(c.color);h.opacity.value=c.opacity;h.rotation.value=c.rotation;c.map&&(h.map.value=c.map);c.alphaMap&&(h.alphaMap.value=c.alphaMap);if(c.map)var w=c.map;else c.alphaMap&&(w=c.alphaMap);void 0!==w&&(!0===w.matrixAutoUpdate&&w.updateMatrix(),h.uvTransform.value.copy(w.matrix))}else c.isShadowMaterial&&(h.color.value.copy(c.color),
|
|
|
-h.opacity.value=c.opacity);void 0!==h.ltc_1&&(h.ltc_1.value=C.LTC_1);void 0!==h.ltc_2&&(h.ltc_2.value=C.LTC_2);Db.upload(I,g.uniformsList,h,ea);c.isShaderMaterial&&(c.uniformsNeedUpdate=!1)}c.isShaderMaterial&&!0===c.uniformsNeedUpdate&&(Db.upload(I,g.uniformsList,h,ea),c.uniformsNeedUpdate=!1);c.isSpriteMaterial&&k.setValue(I,"center",d.center);0<b.numMultiviewViews?va.updateObjectMatricesUniforms(d,a,k):(k.setValue(I,"modelViewMatrix",d.modelViewMatrix),k.setValue(I,"normalMatrix",d.normalMatrix));
|
|
|
-k.setValue(I,"modelMatrix",d.matrixWorld);return b}function t(a,b,c){a.opacity.value=b.opacity;b.color&&a.diffuse.value.copy(b.color);b.emissive&&a.emissive.value.copy(b.emissive).multiplyScalar(b.emissiveIntensity);b.map&&(a.map.value=b.map);b.alphaMap&&(a.alphaMap.value=b.alphaMap);b.specularMap&&(a.specularMap.value=b.specularMap);if(c=b.envMap||c)a.envMap.value=c,a.flipEnvMap.value=c.isCubeTexture?-1:1,a.reflectivity.value=b.reflectivity,a.refractionRatio.value=b.refractionRatio,a.maxMipLevel.value=
|
|
|
-W.get(c).__maxMipLevel;b.lightMap&&(a.lightMap.value=b.lightMap,a.lightMapIntensity.value=b.lightMapIntensity);b.aoMap&&(a.aoMap.value=b.aoMap,a.aoMapIntensity.value=b.aoMapIntensity);if(b.map)var d=b.map;else b.specularMap?d=b.specularMap:b.displacementMap?d=b.displacementMap:b.normalMap?d=b.normalMap:b.bumpMap?d=b.bumpMap:b.roughnessMap?d=b.roughnessMap:b.metalnessMap?d=b.metalnessMap:b.alphaMap?d=b.alphaMap:b.emissiveMap&&(d=b.emissiveMap);void 0!==d&&(d.isWebGLRenderTarget&&(d=d.texture),!0===
|
|
|
-d.matrixAutoUpdate&&d.updateMatrix(),a.uvTransform.value.copy(d.matrix));if(b.aoMap)var e=b.aoMap;else b.lightMap&&(e=b.lightMap);void 0!==e&&(e.isWebGLRenderTarget&&(e=e.texture),!0===e.matrixAutoUpdate&&e.updateMatrix(),a.uv2Transform.value.copy(e.matrix))}function r(a,b,c){a.roughness.value=b.roughness;a.metalness.value=b.metalness;b.roughnessMap&&(a.roughnessMap.value=b.roughnessMap);b.metalnessMap&&(a.metalnessMap.value=b.metalnessMap);b.emissiveMap&&(a.emissiveMap.value=b.emissiveMap);b.bumpMap&&
|
|
|
-(a.bumpMap.value=b.bumpMap,a.bumpScale.value=b.bumpScale,1===b.side&&(a.bumpScale.value*=-1));b.normalMap&&(a.normalMap.value=b.normalMap,a.normalScale.value.copy(b.normalScale),1===b.side&&a.normalScale.value.negate());b.displacementMap&&(a.displacementMap.value=b.displacementMap,a.displacementScale.value=b.displacementScale,a.displacementBias.value=b.displacementBias);if(b.envMap||c)a.envMapIntensity.value=b.envMapIntensity}a=a||{};var u=void 0!==a.canvas?a.canvas:document.createElementNS("http://www.w3.org/1999/xhtml",
|
|
|
-"canvas"),y=void 0!==a.context?a.context:null,w=void 0!==a.alpha?a.alpha:!1,E=void 0!==a.depth?a.depth:!0,S=void 0!==a.stencil?a.stencil:!0,V=void 0!==a.antialias?a.antialias:!1,A=void 0!==a.premultipliedAlpha?a.premultipliedAlpha:!0,za=void 0!==a.preserveDrawingBuffer?a.preserveDrawingBuffer:!1,D=void 0!==a.powerPreference?a.powerPreference:"default",G=void 0!==a.failIfMajorPerformanceCaveat?a.failIfMajorPerformanceCaveat:!1,B=null,F=null;this.domElement=u;this.debug={checkShaderErrors:!0};this.sortObjects=
|
|
|
-this.autoClearStencil=this.autoClearDepth=this.autoClearColor=this.autoClear=!0;this.clippingPlanes=[];this.localClippingEnabled=!1;this.gammaFactor=2;this.outputEncoding=3E3;this.physicallyCorrectLights=!1;this.toneMappingWhitePoint=this.toneMappingExposure=this.toneMapping=1;this.maxMorphTargets=8;this.maxMorphNormals=4;var z=this,H=!1,K=null,M=0,N=0,O=null,Y=null,Ne=-1;var fa=b=null;var ha=!1;var Z=null,ca=null,X=new ia,T=new ia,da=null,U=u.width,J=u.height,Q=1,ka=null,ma=null,R=new ia(0,0,U,J),
|
|
|
-ja=new ia(0,0,U,J),jg=!1,kg=new Fd,Ta=new vj,qa=!1,lg=!1,Ld=new P,Gb=new n;try{w={alpha:w,depth:E,stencil:S,antialias:V,premultipliedAlpha:A,preserveDrawingBuffer:za,powerPreference:D,failIfMajorPerformanceCaveat:G,xrCompatible:!0};u.addEventListener("webglcontextlost",d,!1);u.addEventListener("webglcontextrestored",e,!1);var I=y||u.getContext("webgl",w)||u.getContext("experimental-webgl",w);if(null===I){if(null!==u.getContext("webgl"))throw Error("Error creating WebGL context with your selected attributes.");
|
|
|
-throw Error("Error creating WebGL context.");}void 0===I.getShaderPrecisionFormat&&(I.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(Xh){throw console.error("THREE.WebGLRenderer: "+Xh.message),Xh;}var sa,Ha,aa,ba,W,ea,na,ya,ta,ua,xa,wa,oa,Aa,Ba,Da,pa;c();var la=new Wh(z,I);this.xr=la;var va=new Fk(z,I),Fa=new Th(z,ta,Ha.maxTextureSize);this.shadowMap=Fa;this.getContext=function(){return I};this.getContextAttributes=function(){return I.getContextAttributes()};
|
|
|
-this.forceContextLoss=function(){var a=sa.get("WEBGL_lose_context");a&&a.loseContext()};this.forceContextRestore=function(){var a=sa.get("WEBGL_lose_context");a&&a.restoreContext()};this.getPixelRatio=function(){return Q};this.setPixelRatio=function(a){void 0!==a&&(Q=a,this.setSize(U,J,!1))};this.getSize=function(a){void 0===a&&(console.warn("WebGLRenderer: .getsize() now requires a Vector2 as an argument"),a=new v);return a.set(U,J)};this.setSize=function(a,b,c){la.isPresenting?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):
|
|
|
-(U=a,J=b,u.width=Math.floor(a*Q),u.height=Math.floor(b*Q),!1!==c&&(u.style.width=a+"px",u.style.height=b+"px"),this.setViewport(0,0,a,b))};this.getDrawingBufferSize=function(a){void 0===a&&(console.warn("WebGLRenderer: .getdrawingBufferSize() now requires a Vector2 as an argument"),a=new v);return a.set(U*Q,J*Q).floor()};this.setDrawingBufferSize=function(a,b,c){U=a;J=b;Q=c;u.width=Math.floor(a*c);u.height=Math.floor(b*c);this.setViewport(0,0,a,b)};this.getCurrentViewport=function(a){void 0===a&&
|
|
|
-(console.warn("WebGLRenderer: .getCurrentViewport() now requires a Vector4 as an argument"),a=new ia);return a.copy(X)};this.getViewport=function(a){return a.copy(R)};this.setViewport=function(a,b,c,d){a.isVector4?R.set(a.x,a.y,a.z,a.w):R.set(a,b,c,d);aa.viewport(X.copy(R).multiplyScalar(Q).floor())};this.getScissor=function(a){return a.copy(ja)};this.setScissor=function(a,b,c,d){a.isVector4?ja.set(a.x,a.y,a.z,a.w):ja.set(a,b,c,d);aa.scissor(T.copy(ja).multiplyScalar(Q).floor())};this.getScissorTest=
|
|
|
-function(){return jg};this.setScissorTest=function(a){aa.setScissorTest(jg=a)};this.setOpaqueSort=function(a){ka=a};this.setTransparentSort=function(a){ma=a};this.getClearColor=function(){return oa.getClearColor()};this.setClearColor=function(){oa.setClearColor.apply(oa,arguments)};this.getClearAlpha=function(){return oa.getClearAlpha()};this.setClearAlpha=function(){oa.setClearAlpha.apply(oa,arguments)};this.clear=function(a,b,c){var d=0;if(void 0===a||a)d|=16384;if(void 0===b||b)d|=256;if(void 0===
|
|
|
-c||c)d|=1024;I.clear(d)};this.clearColor=function(){this.clear(!0,!1,!1)};this.clearDepth=function(){this.clear(!1,!0,!1)};this.clearStencil=function(){this.clear(!1,!1,!0)};this.dispose=function(){u.removeEventListener("webglcontextlost",d,!1);u.removeEventListener("webglcontextrestored",e,!1);xa.dispose();wa.dispose();W.dispose();ta.dispose();la.dispose();Ca.stop()};this.renderBufferImmediate=function(a,b){aa.initAttributes();var c=W.get(a);a.hasPositions&&!c.position&&(c.position=I.createBuffer());
|
|
|
-a.hasNormals&&!c.normal&&(c.normal=I.createBuffer());a.hasUvs&&!c.uv&&(c.uv=I.createBuffer());a.hasColors&&!c.color&&(c.color=I.createBuffer());b=b.getAttributes();a.hasPositions&&(I.bindBuffer(34962,c.position),I.bufferData(34962,a.positionArray,35048),aa.enableAttribute(b.position),I.vertexAttribPointer(b.position,3,5126,!1,0,0));a.hasNormals&&(I.bindBuffer(34962,c.normal),I.bufferData(34962,a.normalArray,35048),aa.enableAttribute(b.normal),I.vertexAttribPointer(b.normal,3,5126,!1,0,0));a.hasUvs&&
|
|
|
-(I.bindBuffer(34962,c.uv),I.bufferData(34962,a.uvArray,35048),aa.enableAttribute(b.uv),I.vertexAttribPointer(b.uv,2,5126,!1,0,0));a.hasColors&&(I.bindBuffer(34962,c.color),I.bufferData(34962,a.colorArray,35048),aa.enableAttribute(b.color),I.vertexAttribPointer(b.color,3,5126,!1,0,0));aa.disableUnusedAttributes();I.drawArrays(4,0,a.count);a.count=0};var Ga=new nb;this.renderBufferDirect=function(a,c,d,e,f,g){null===c&&(c=Ga);var k=f.isMesh&&0>f.matrixWorld.determinant(),l=h(a,c,e,f);aa.setMaterial(e,
|
|
|
-k);var m=!1;if(b!==d.id||fa!==l.id||ha!==(!0===e.wireframe))b=d.id,fa=l.id,ha=!0===e.wireframe,m=!0;if(e.morphTargets||e.morphNormals)Aa.update(f,d,e,l),m=!0;a=d.index;c=d.attributes.position;if(null===a){if(void 0===c||0===c.count)return}else if(0===a.count)return;var p=1;!0===e.wireframe&&(a=ya.getWireframeAttribute(d),p=2);k=Ba;if(null!==a){var x=na.get(a);k=Da;k.setIndex(x)}if(m){if(!1!==Ha.isWebGL2||!f.isInstancedMesh&&!d.isInstancedBufferGeometry||null!==sa.get("ANGLE_instanced_arrays")){aa.initAttributes();
|
|
|
-m=d.attributes;l=l.getAttributes();var q=e.defaultAttributeValues;for(S in l){var r=l[S];if(0<=r){var t=m[S];if(void 0!==t){var n=t.normalized,u=t.itemSize,y=na.get(t);if(void 0!==y){var w=y.buffer,A=y.type;y=y.bytesPerElement;if(t.isInterleavedBufferAttribute){var E=t.data,v=E.stride;t=t.offset;E&&E.isInstancedInterleavedBuffer?(aa.enableAttributeAndDivisor(r,E.meshPerAttribute),void 0===d.maxInstancedCount&&(d.maxInstancedCount=E.meshPerAttribute*E.count)):aa.enableAttribute(r);I.bindBuffer(34962,
|
|
|
-w);I.vertexAttribPointer(r,u,A,n,v*y,t*y)}else t.isInstancedBufferAttribute?(aa.enableAttributeAndDivisor(r,t.meshPerAttribute),void 0===d.maxInstancedCount&&(d.maxInstancedCount=t.meshPerAttribute*t.count)):aa.enableAttribute(r),I.bindBuffer(34962,w),I.vertexAttribPointer(r,u,A,n,0,0)}}else if("instanceMatrix"===S)y=na.get(f.instanceMatrix),void 0!==y&&(w=y.buffer,A=y.type,aa.enableAttributeAndDivisor(r+0,1),aa.enableAttributeAndDivisor(r+1,1),aa.enableAttributeAndDivisor(r+2,1),aa.enableAttributeAndDivisor(r+
|
|
|
-3,1),I.bindBuffer(34962,w),I.vertexAttribPointer(r+0,4,A,!1,64,0),I.vertexAttribPointer(r+1,4,A,!1,64,16),I.vertexAttribPointer(r+2,4,A,!1,64,32),I.vertexAttribPointer(r+3,4,A,!1,64,48));else if(void 0!==q&&(n=q[S],void 0!==n))switch(n.length){case 2:I.vertexAttrib2fv(r,n);break;case 3:I.vertexAttrib3fv(r,n);break;case 4:I.vertexAttrib4fv(r,n);break;default:I.vertexAttrib1fv(r,n)}}}aa.disableUnusedAttributes()}null!==a&&I.bindBuffer(34963,x.buffer)}var S=d.drawRange.start*p;m=null!==g?g.start*p:0;
|
|
|
-x=Math.max(S,m);g=Math.max(0,Math.min(null!==a?a.count:c.count,S+d.drawRange.count*p,m+(null!==g?g.count*p:Infinity))-1-x+1);0!==g&&(f.isMesh?!0===e.wireframe?(aa.setLineWidth(e.wireframeLinewidth*(null===O?Q:1)),k.setMode(1)):k.setMode(4):f.isLine?(e=e.linewidth,void 0===e&&(e=1),aa.setLineWidth(e*(null===O?Q:1)),f.isLineSegments?k.setMode(1):f.isLineLoop?k.setMode(2):k.setMode(3)):f.isPoints?k.setMode(0):f.isSprite&&k.setMode(4),f.isInstancedMesh?k.renderInstances(d,x,g,f.count):d.isInstancedBufferGeometry?
|
|
|
-k.renderInstances(d,x,g,d.maxInstancedCount):k.render(x,g))};this.compile=function(a,b){F=wa.get(a,b);F.init();a.traverse(function(a){a.isLight&&(F.pushLight(a),a.castShadow&&F.pushShadow(a))});F.setupLights(b);a.traverse(function(b){if(b.material)if(Array.isArray(b.material))for(var c=0;c<b.material.length;c++)p(b.material[c],a,b);else p(b.material,a,b)})};var Ea=null,Ca=new xh;Ca.setAnimationLoop(function(a){la.isPresenting||Ea&&Ea(a)});"undefined"!==typeof window&&Ca.setContext(window);this.setAnimationLoop=
|
|
|
-function(a){Ea=a;la.setAnimationLoop(a);Ca.start()};this.render=function(a,c,d,e){if(void 0!==d){console.warn("THREE.WebGLRenderer.render(): the renderTarget argument has been removed. Use .setRenderTarget() instead.");var f=d}if(void 0!==e){console.warn("THREE.WebGLRenderer.render(): the forceClear argument has been removed. Use .clear() instead.");var g=e}c&&c.isCamera?H||(fa=b=null,ha=!1,Ne=-1,Z=null,!0===a.autoUpdate&&a.updateMatrixWorld(),null===c.parent&&c.updateMatrixWorld(),la.enabled&&la.isPresenting&&
|
|
|
-(c=la.getCamera(c)),F=wa.get(a,c),F.init(),a.onBeforeRender(z,a,c,f||O),Ld.multiplyMatrices(c.projectionMatrix,c.matrixWorldInverse),kg.setFromMatrix(Ld),lg=this.localClippingEnabled,qa=Ta.init(this.clippingPlanes,lg,c),B=xa.get(a,c),B.init(),l(a,c,0,z.sortObjects),!0===z.sortObjects&&B.sort(ka,ma),qa&&Ta.beginShadows(),Fa.render(F.state.shadowsArray,a,c),F.setupLights(c),qa&&Ta.endShadows(),this.info.autoReset&&this.info.reset(),void 0!==f&&this.setRenderTarget(f),la.enabled&&va.isAvailable()&&va.attachCamera(c),
|
|
|
-oa.render(B,a,c,g),d=B.opaque,e=B.transparent,a.overrideMaterial?(f=a.overrideMaterial,d.length&&m(d,a,c,f),e.length&&m(e,a,c,f)):(d.length&&m(d,a,c),e.length&&m(e,a,c)),a.onAfterRender(z,a,c),null!==O&&(ea.updateRenderTargetMipmap(O),ea.updateMultisampleRenderTarget(O)),aa.buffers.depth.setTest(!0),aa.buffers.depth.setMask(!0),aa.buffers.color.setMask(!0),aa.setPolygonOffset(!1),la.enabled&&va.isAvailable()&&va.detachCamera(c),F=B=null):console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")};
|
|
|
-this.setFramebuffer=function(a){K!==a&&null===O&&I.bindFramebuffer(36160,a);K=a};this.getActiveCubeFace=function(){return M};this.getActiveMipmapLevel=function(){return N};this.getRenderTarget=function(){return O};this.setRenderTarget=function(a,b,c){O=a;M=b;N=c;a&&void 0===W.get(a).__webglFramebuffer&&ea.setupRenderTarget(a);var d=K,e=!1;a?(d=W.get(a).__webglFramebuffer,a.isWebGLCubeRenderTarget?(d=d[b||0],e=!0):d=a.isWebGLMultisampleRenderTarget?W.get(a).__webglMultisampledFramebuffer:d,X.copy(a.viewport),
|
|
|
-T.copy(a.scissor),da=a.scissorTest):(X.copy(R).multiplyScalar(Q).floor(),T.copy(ja).multiplyScalar(Q).floor(),da=jg);Y!==d&&(I.bindFramebuffer(36160,d),Y=d);aa.viewport(X);aa.scissor(T);aa.setScissorTest(da);e&&(a=W.get(a.texture),I.framebufferTexture2D(36160,36064,34069+(b||0),a.__webglTexture,c||0))};this.readRenderTargetPixels=function(a,b,c,d,e,f,g){if(a&&a.isWebGLRenderTarget){var k=W.get(a).__webglFramebuffer;a.isWebGLCubeRenderTarget&&void 0!==g&&(k=k[g]);if(k){g=!1;k!==Y&&(I.bindFramebuffer(36160,
|
|
|
-k),g=!0);try{var l=a.texture,m=l.format,h=l.type;1023!==m&&pa.convert(m)!==I.getParameter(35739)?console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format."):1009===h||pa.convert(h)===I.getParameter(35738)||1015===h&&(Ha.isWebGL2||sa.get("OES_texture_float")||sa.get("WEBGL_color_buffer_float"))||1016===h&&(Ha.isWebGL2?sa.get("EXT_color_buffer_float"):sa.get("EXT_color_buffer_half_float"))?36053===I.checkFramebufferStatus(36160)?0<=b&&b<=
|
|
|
-a.width-d&&0<=c&&c<=a.height-e&&I.readPixels(b,c,d,e,pa.convert(m),pa.convert(h),f):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete."):console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.")}finally{g&&I.bindFramebuffer(36160,Y)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")};this.copyFramebufferToTexture=
|
|
|
-function(a,b,c){void 0===c&&(c=0);var d=Math.pow(2,-c),e=Math.floor(b.image.width*d);d=Math.floor(b.image.height*d);var f=pa.convert(b.format);ea.setTexture2D(b,0);I.copyTexImage2D(3553,c,f,a.x,a.y,e,d,0);aa.unbindTexture()};this.copyTextureToTexture=function(a,b,c,d){var e=b.image.width,f=b.image.height,g=pa.convert(c.format),k=pa.convert(c.type);ea.setTexture2D(c,0);b.isDataTexture?I.texSubImage2D(3553,d||0,a.x,a.y,e,f,g,k,b.image.data):I.texSubImage2D(3553,d||0,a.x,a.y,g,k,b.image);aa.unbindTexture()};
|
|
|
-this.initTexture=function(a){ea.setTexture2D(a,0);aa.unbindTexture()};"undefined"!==typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}function Pe(a,b){this.name="";this.color=new B(a);this.density=void 0!==b?b:2.5E-4}function Qe(a,b,c){this.name="";this.color=new B(a);this.near=void 0!==b?b:1;this.far=void 0!==c?c:1E3}function qb(a,b){this.array=a;this.stride=b;this.count=void 0!==a?a.length/b:0;this.usage=35044;this.updateRange={offset:0,count:-1};
|
|
|
-this.version=0}function Od(a,b,c,d){this.data=a;this.itemSize=b;this.offset=c;this.normalized=!0===d}function Hb(a){K.call(this);this.type="SpriteMaterial";this.color=new B(16777215);this.alphaMap=this.map=null;this.rotation=0;this.transparent=this.sizeAttenuation=!0;this.setValues(a)}function Pd(a){G.call(this);this.type="Sprite";if(void 0===Jc){Jc=new z;var b=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]);b=new qb(b,5);Jc.setIndex([0,1,2,0,2,3]);Jc.setAttribute("position",
|
|
|
-new Od(b,3,0,!1));Jc.setAttribute("uv",new Od(b,2,3,!1))}this.geometry=Jc;this.material=void 0!==a?a:new Hb;this.center=new v(.5,.5)}function Re(a,b,c,d,e,f){Kc.subVectors(a,c).addScalar(.5).multiply(d);void 0!==e?(Qd.x=f*Kc.x-e*Kc.y,Qd.y=e*Kc.x+f*Kc.y):Qd.copy(Kc);a.copy(b);a.x+=Qd.x;a.y+=Qd.y;a.applyMatrix4(Yh)}function Rd(){G.call(this);this.type="LOD";Object.defineProperties(this,{levels:{enumerable:!0,value:[]}});this.autoUpdate=!0}function Sd(a,b){a&&a.isGeometry&&console.error("THREE.SkinnedMesh no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");
|
|
|
-U.call(this,a,b);this.type="SkinnedMesh";this.bindMode="attached";this.bindMatrix=new P;this.bindMatrixInverse=new P}function Se(a,b){a=a||[];this.bones=a.slice(0);this.boneMatrices=new Float32Array(16*this.bones.length);this.frame=-1;if(void 0===b)this.calculateInverses();else if(this.bones.length===b.length)this.boneInverses=b.slice(0);else for(console.warn("THREE.Skeleton boneInverses is the wrong length."),this.boneInverses=[],a=0,b=this.bones.length;a<b;a++)this.boneInverses.push(new P)}function pg(){G.call(this);
|
|
|
-this.type="Bone"}function Te(a,b,c){U.call(this,a,b);this.instanceMatrix=new M(new Float32Array(16*c),16);this.count=c}function ka(a){K.call(this);this.type="LineBasicMaterial";this.color=new B(16777215);this.linewidth=1;this.linejoin=this.linecap="round";this.setValues(a)}function Ja(a,b,c){1===c&&console.error("THREE.Line: parameter THREE.LinePieces no longer supported. Use THREE.LineSegments instead.");G.call(this);this.type="Line";this.geometry=void 0!==a?a:new z;this.material=void 0!==b?b:new ka}
|
|
|
-function ma(a,b){Ja.call(this,a,b);this.type="LineSegments"}function Ue(a,b){Ja.call(this,a,b);this.type="LineLoop"}function Ua(a){K.call(this);this.type="PointsMaterial";this.color=new B(16777215);this.alphaMap=this.map=null;this.size=1;this.sizeAttenuation=!0;this.morphTargets=!1;this.setValues(a)}function Lc(a,b){G.call(this);this.type="Points";this.geometry=void 0!==a?a:new z;this.material=void 0!==b?b:new Ua;this.updateMorphTargets()}function qg(a,b,c,d,e,f,g){var k=rg.distanceSqToPoint(a);k<
|
|
|
-c&&(c=new n,rg.closestPointToPoint(a,c),c.applyMatrix4(d),a=e.ray.origin.distanceTo(c),a<e.near||a>e.far||f.push({distance:a,distanceToRay:Math.sqrt(k),point:c,index:b,face:null,object:g}))}function sg(a,b,c,d,e,f,g,k,l){ca.call(this,a,b,c,d,e,f,g,k,l);this.format=void 0!==g?g:1022;this.minFilter=void 0!==f?f:1006;this.magFilter=void 0!==e?e:1006;this.generateMipmaps=!1}function Mc(a,b,c,d,e,f,g,k,l,m,h,p){ca.call(this,null,f,g,k,l,m,d,e,h,p);this.image={width:b,height:c};this.mipmaps=a;this.generateMipmaps=
|
|
|
-this.flipY=!1}function Td(a,b,c,d,e,f,g,k,l){ca.call(this,a,b,c,d,e,f,g,k,l);this.needsUpdate=!0}function Ud(a,b,c,d,e,f,g,k,l,m){m=void 0!==m?m:1026;if(1026!==m&&1027!==m)throw Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===c&&1026===m&&(c=1012);void 0===c&&1027===m&&(c=1020);ca.call(this,null,d,e,f,g,k,m,c,l);this.image={width:a,height:b};this.magFilter=void 0!==g?g:1003;this.minFilter=void 0!==k?k:1003;this.generateMipmaps=this.flipY=!1}function Nc(a){z.call(this);
|
|
|
-this.type="WireframeGeometry";var b=[],c,d,e,f=[0,0],g={},k=["a","b","c"];if(a&&a.isGeometry){var l=a.faces;var m=0;for(d=l.length;m<d;m++){var h=l[m];for(c=0;3>c;c++){var p=h[k[c]];var q=h[k[(c+1)%3]];f[0]=Math.min(p,q);f[1]=Math.max(p,q);p=f[0]+","+f[1];void 0===g[p]&&(g[p]={index1:f[0],index2:f[1]})}}for(p in g)m=g[p],k=a.vertices[m.index1],b.push(k.x,k.y,k.z),k=a.vertices[m.index2],b.push(k.x,k.y,k.z)}else if(a&&a.isBufferGeometry)if(k=new n,null!==a.index){l=a.attributes.position;h=a.index;var t=
|
|
|
-a.groups;0===t.length&&(t=[{start:0,count:h.count,materialIndex:0}]);a=0;for(e=t.length;a<e;++a)for(m=t[a],c=m.start,d=m.count,m=c,d=c+d;m<d;m+=3)for(c=0;3>c;c++)p=h.getX(m+c),q=h.getX(m+(c+1)%3),f[0]=Math.min(p,q),f[1]=Math.max(p,q),p=f[0]+","+f[1],void 0===g[p]&&(g[p]={index1:f[0],index2:f[1]});for(p in g)m=g[p],k.fromBufferAttribute(l,m.index1),b.push(k.x,k.y,k.z),k.fromBufferAttribute(l,m.index2),b.push(k.x,k.y,k.z)}else for(l=a.attributes.position,m=0,d=l.count/3;m<d;m++)for(c=0;3>c;c++)g=3*
|
|
|
-m+c,k.fromBufferAttribute(l,g),b.push(k.x,k.y,k.z),g=3*m+(c+1)%3,k.fromBufferAttribute(l,g),b.push(k.x,k.y,k.z);this.setAttribute("position",new D(b,3))}function Vd(a,b,c){N.call(this);this.type="ParametricGeometry";this.parameters={func:a,slices:b,stacks:c};this.fromBufferGeometry(new Oc(a,b,c));this.mergeVertices()}function Oc(a,b,c){z.call(this);this.type="ParametricBufferGeometry";this.parameters={func:a,slices:b,stacks:c};var d=[],e=[],f=[],g=[],k=new n,l=new n,m=new n,h=new n,p=new n,q,t;3>
|
|
|
-a.length&&console.error("THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter.");var r=b+1;for(q=0;q<=c;q++){var u=q/c;for(t=0;t<=b;t++){var y=t/b;a(y,u,l);e.push(l.x,l.y,l.z);0<=y-1E-5?(a(y-1E-5,u,m),h.subVectors(l,m)):(a(y+1E-5,u,m),h.subVectors(m,l));0<=u-1E-5?(a(y,u-1E-5,m),p.subVectors(l,m)):(a(y,u+1E-5,m),p.subVectors(m,l));k.crossVectors(h,p).normalize();f.push(k.x,k.y,k.z);g.push(y,u)}}for(q=0;q<c;q++)for(t=0;t<b;t++)a=q*r+t+1,k=(q+1)*r+t+1,l=(q+1)*r+t,d.push(q*
|
|
|
-r+t,a,l),d.push(a,k,l);this.setIndex(d);this.setAttribute("position",new D(e,3));this.setAttribute("normal",new D(f,3));this.setAttribute("uv",new D(g,2))}function Wd(a,b,c,d){N.call(this);this.type="PolyhedronGeometry";this.parameters={vertices:a,indices:b,radius:c,detail:d};this.fromBufferGeometry(new Ga(a,b,c,d));this.mergeVertices()}function Ga(a,b,c,d){function e(a){k.push(a.x,a.y,a.z)}function f(b,c){b*=3;c.x=a[b+0];c.y=a[b+1];c.z=a[b+2]}function g(a,b,c,d){0>d&&1===a.x&&(l[b]=a.x-1);0===c.x&&
|
|
|
-0===c.z&&(l[b]=d/2/Math.PI+.5)}z.call(this);this.type="PolyhedronBufferGeometry";this.parameters={vertices:a,indices:b,radius:c,detail:d};c=c||1;d=d||0;var k=[],l=[];(function(a){for(var c=new n,d=new n,g=new n,k=0;k<b.length;k+=3){f(b[k+0],c);f(b[k+1],d);f(b[k+2],g);var l,m,h=c,w=d,E=g,v=Math.pow(2,a),V=[];for(m=0;m<=v;m++){V[m]=[];var A=h.clone().lerp(E,m/v),z=w.clone().lerp(E,m/v),B=v-m;for(l=0;l<=B;l++)V[m][l]=0===l&&m===v?A:A.clone().lerp(z,l/B)}for(m=0;m<v;m++)for(l=0;l<2*(v-m)-1;l++)h=Math.floor(l/
|
|
|
-2),0===l%2?(e(V[m][h+1]),e(V[m+1][h]),e(V[m][h])):(e(V[m][h+1]),e(V[m+1][h+1]),e(V[m+1][h]))}})(d);(function(a){for(var b=new n,c=0;c<k.length;c+=3)b.x=k[c+0],b.y=k[c+1],b.z=k[c+2],b.normalize().multiplyScalar(a),k[c+0]=b.x,k[c+1]=b.y,k[c+2]=b.z})(c);(function(){for(var a=new n,b=0;b<k.length;b+=3)a.x=k[b+0],a.y=k[b+1],a.z=k[b+2],l.push(Math.atan2(a.z,-a.x)/2/Math.PI+.5,1-(Math.atan2(-a.y,Math.sqrt(a.x*a.x+a.z*a.z))/Math.PI+.5));a=new n;b=new n;for(var c=new n,d=new n,e=new v,f=new v,h=new v,y=0,
|
|
|
-w=0;y<k.length;y+=9,w+=6){a.set(k[y+0],k[y+1],k[y+2]);b.set(k[y+3],k[y+4],k[y+5]);c.set(k[y+6],k[y+7],k[y+8]);e.set(l[w+0],l[w+1]);f.set(l[w+2],l[w+3]);h.set(l[w+4],l[w+5]);d.copy(a).add(b).add(c).divideScalar(3);var E=Math.atan2(d.z,-d.x);g(e,w+0,a,E);g(f,w+2,b,E);g(h,w+4,c,E)}for(a=0;a<l.length;a+=6)b=l[a+0],c=l[a+2],d=l[a+4],e=Math.min(b,c,d),.9<Math.max(b,c,d)&&.1>e&&(.2>b&&(l[a+0]+=1),.2>c&&(l[a+2]+=1),.2>d&&(l[a+4]+=1))})();this.setAttribute("position",new D(k,3));this.setAttribute("normal",
|
|
|
-new D(k.slice(),3));this.setAttribute("uv",new D(l,2));0===d?this.computeVertexNormals():this.normalizeNormals()}function Xd(a,b){N.call(this);this.type="TetrahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Pc(a,b));this.mergeVertices()}function Pc(a,b){Ga.call(this,[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],a,b);this.type="TetrahedronBufferGeometry";this.parameters={radius:a,detail:b}}function Yd(a,b){N.call(this);this.type="OctahedronGeometry";this.parameters=
|
|
|
-{radius:a,detail:b};this.fromBufferGeometry(new bc(a,b));this.mergeVertices()}function bc(a,b){Ga.call(this,[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],a,b);this.type="OctahedronBufferGeometry";this.parameters={radius:a,detail:b}}function Zd(a,b){N.call(this);this.type="IcosahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Qc(a,b));this.mergeVertices()}function Qc(a,b){var c=(1+Math.sqrt(5))/2;Ga.call(this,[-1,c,0,1,c,0,
|
|
|
--1,-c,0,1,-c,0,0,-1,c,0,1,c,0,-1,-c,0,1,-c,c,0,-1,c,0,1,-c,0,-1,-c,0,1],[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1],a,b);this.type="IcosahedronBufferGeometry";this.parameters={radius:a,detail:b}}function $d(a,b){N.call(this);this.type="DodecahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Rc(a,b));this.mergeVertices()}function Rc(a,b){var c=(1+Math.sqrt(5))/2,d=1/c;Ga.call(this,
|
|
|
-[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-d,-c,0,-d,c,0,d,-c,0,d,c,-d,-c,0,-d,c,0,d,-c,0,d,c,0,-c,0,-d,c,0,-d,-c,0,d,c,0,d],[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],a,b);this.type="DodecahedronBufferGeometry";this.parameters={radius:a,detail:b}}function ae(a,
|
|
|
-b,c,d,e,f){N.call(this);this.type="TubeGeometry";this.parameters={path:a,tubularSegments:b,radius:c,radialSegments:d,closed:e};void 0!==f&&console.warn("THREE.TubeGeometry: taper has been removed.");a=new cc(a,b,c,d,e);this.tangents=a.tangents;this.normals=a.normals;this.binormals=a.binormals;this.fromBufferGeometry(a);this.mergeVertices()}function cc(a,b,c,d,e){function f(e){h=a.getPointAt(e/b,h);var f=g.normals[e];e=g.binormals[e];for(q=0;q<=d;q++){var m=q/d*Math.PI*2,p=Math.sin(m);m=-Math.cos(m);
|
|
|
-l.x=m*f.x+p*e.x;l.y=m*f.y+p*e.y;l.z=m*f.z+p*e.z;l.normalize();r.push(l.x,l.y,l.z);k.x=h.x+c*l.x;k.y=h.y+c*l.y;k.z=h.z+c*l.z;t.push(k.x,k.y,k.z)}}z.call(this);this.type="TubeBufferGeometry";this.parameters={path:a,tubularSegments:b,radius:c,radialSegments:d,closed:e};b=b||64;c=c||1;d=d||8;e=e||!1;var g=a.computeFrenetFrames(b,e);this.tangents=g.tangents;this.normals=g.normals;this.binormals=g.binormals;var k=new n,l=new n,m=new v,h=new n,p,q,t=[],r=[],u=[],y=[];for(p=0;p<b;p++)f(p);f(!1===e?b:0);for(p=
|
|
|
-0;p<=b;p++)for(q=0;q<=d;q++)m.x=p/b,m.y=q/d,u.push(m.x,m.y);(function(){for(q=1;q<=b;q++)for(p=1;p<=d;p++){var a=(d+1)*q+(p-1),c=(d+1)*q+p,e=(d+1)*(q-1)+p;y.push((d+1)*(q-1)+(p-1),a,e);y.push(a,c,e)}})();this.setIndex(y);this.setAttribute("position",new D(t,3));this.setAttribute("normal",new D(r,3));this.setAttribute("uv",new D(u,2))}function be(a,b,c,d,e,f,g){N.call(this);this.type="TorusKnotGeometry";this.parameters={radius:a,tube:b,tubularSegments:c,radialSegments:d,p:e,q:f};void 0!==g&&console.warn("THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead.");
|
|
|
-this.fromBufferGeometry(new Sc(a,b,c,d,e,f));this.mergeVertices()}function Sc(a,b,c,d,e,f){function g(a,b,c,d,e){var f=Math.sin(a);b=c/b*a;c=Math.cos(b);e.x=d*(2+c)*.5*Math.cos(a);e.y=d*(2+c)*f*.5;e.z=d*Math.sin(b)*.5}z.call(this);this.type="TorusKnotBufferGeometry";this.parameters={radius:a,tube:b,tubularSegments:c,radialSegments:d,p:e,q:f};a=a||1;b=b||.4;c=Math.floor(c)||64;d=Math.floor(d)||8;e=e||2;f=f||3;var k=[],l=[],m=[],h=[],p,q=new n,t=new n,r=new n,u=new n,y=new n,w=new n,v=new n;for(p=0;p<=
|
|
|
-c;++p){var S=p/c*e*Math.PI*2;g(S,e,f,a,r);g(S+.01,e,f,a,u);w.subVectors(u,r);v.addVectors(u,r);y.crossVectors(w,v);v.crossVectors(y,w);y.normalize();v.normalize();for(S=0;S<=d;++S){var V=S/d*Math.PI*2,A=-b*Math.cos(V);V=b*Math.sin(V);q.x=r.x+(A*v.x+V*y.x);q.y=r.y+(A*v.y+V*y.y);q.z=r.z+(A*v.z+V*y.z);l.push(q.x,q.y,q.z);t.subVectors(q,r).normalize();m.push(t.x,t.y,t.z);h.push(p/c);h.push(S/d)}}for(S=1;S<=c;S++)for(p=1;p<=d;p++)a=(d+1)*S+(p-1),b=(d+1)*S+p,e=(d+1)*(S-1)+p,k.push((d+1)*(S-1)+(p-1),a,e),
|
|
|
-k.push(a,b,e);this.setIndex(k);this.setAttribute("position",new D(l,3));this.setAttribute("normal",new D(m,3));this.setAttribute("uv",new D(h,2))}function ce(a,b,c,d,e){N.call(this);this.type="TorusGeometry";this.parameters={radius:a,tube:b,radialSegments:c,tubularSegments:d,arc:e};this.fromBufferGeometry(new Tc(a,b,c,d,e));this.mergeVertices()}function Tc(a,b,c,d,e){z.call(this);this.type="TorusBufferGeometry";this.parameters={radius:a,tube:b,radialSegments:c,tubularSegments:d,arc:e};a=a||1;b=b||
|
|
|
-.4;c=Math.floor(c)||8;d=Math.floor(d)||6;e=e||2*Math.PI;var f=[],g=[],k=[],l=[],m=new n,h=new n,p=new n,q,t;for(q=0;q<=c;q++)for(t=0;t<=d;t++){var r=t/d*e,u=q/c*Math.PI*2;h.x=(a+b*Math.cos(u))*Math.cos(r);h.y=(a+b*Math.cos(u))*Math.sin(r);h.z=b*Math.sin(u);g.push(h.x,h.y,h.z);m.x=a*Math.cos(r);m.y=a*Math.sin(r);p.subVectors(h,m).normalize();k.push(p.x,p.y,p.z);l.push(t/d);l.push(q/c)}for(q=1;q<=c;q++)for(t=1;t<=d;t++)a=(d+1)*(q-1)+t-1,b=(d+1)*(q-1)+t,e=(d+1)*q+t,f.push((d+1)*q+t-1,a,e),f.push(a,b,
|
|
|
-e);this.setIndex(f);this.setAttribute("position",new D(g,3));this.setAttribute("normal",new D(k,3));this.setAttribute("uv",new D(l,2))}function Zh(a,b,c,d,e){for(var f,g=0,k=b,l=c-d;k<c;k+=d)g+=(a[l]-a[k])*(a[k+1]+a[l+1]),l=k;if(e===0<g)for(e=b;e<c;e+=d)f=$h(e,a[e],a[e+1],f);else for(e=c-d;e>=b;e-=d)f=$h(e,a[e],a[e+1],f);f&&dc(f,f.next)&&(de(f),f=f.next);return f}function ee(a,b){if(!a)return a;b||(b=a);do{var c=!1;if(a.steiner||!dc(a,a.next)&&0!==ta(a.prev,a,a.next))a=a.next;else{de(a);a=b=a.prev;
|
|
|
-if(a===a.next)break;c=!0}}while(c||a!==b);return b}function fe(a,b,c,d,e,f,g){if(a){if(!g&&f){var k=a,l=k;do null===l.z&&(l.z=tg(l.x,l.y,d,e,f)),l.prevZ=l.prev,l=l.nextZ=l.next;while(l!==k);l.prevZ.nextZ=null;l.prevZ=null;k=l;var m,h,p,q,t=1;do{l=k;var r=k=null;for(h=0;l;){h++;var n=l;for(m=p=0;m<t&&(p++,n=n.nextZ,n);m++);for(q=t;0<p||0<q&&n;)0!==p&&(0===q||!n||l.z<=n.z)?(m=l,l=l.nextZ,p--):(m=n,n=n.nextZ,q--),r?r.nextZ=m:k=m,m.prevZ=r,r=m;l=n}r.nextZ=null;t*=2}while(1<h)}for(k=a;a.prev!==a.next;){l=
|
|
|
-a.prev;n=a.next;if(f)r=Gk(a,d,e,f);else a:if(r=a,h=r.prev,p=r,t=r.next,0<=ta(h,p,t))r=!1;else{for(m=r.next.next;m!==r.prev;){if(Uc(h.x,h.y,p.x,p.y,t.x,t.y,m.x,m.y)&&0<=ta(m.prev,m,m.next)){r=!1;break a}m=m.next}r=!0}if(r)b.push(l.i/c),b.push(a.i/c),b.push(n.i/c),de(a),k=a=n.next;else if(a=n,a===k){if(!g)fe(ee(a),b,c,d,e,f,1);else if(1===g){g=b;k=c;l=a;do n=l.prev,r=l.next.next,!dc(n,r)&&ai(n,l,l.next,r)&&ge(n,r)&&ge(r,n)&&(g.push(n.i/k),g.push(l.i/k),g.push(r.i/k),de(l),de(l.next),l=a=r),l=l.next;
|
|
|
-while(l!==a);a=l;fe(a,b,c,d,e,f,2)}else if(2===g)a:{g=a;do{for(k=g.next.next;k!==g.prev;){if(l=g.i!==k.i){l=g;n=k;if(r=l.next.i!==n.i&&l.prev.i!==n.i){b:{r=l;do{if(r.i!==l.i&&r.next.i!==l.i&&r.i!==n.i&&r.next.i!==n.i&&ai(r,r.next,l,n)){r=!0;break b}r=r.next}while(r!==l);r=!1}r=!r}if(r=r&&ge(l,n)&&ge(n,l)){r=l;h=!1;p=(l.x+n.x)/2;n=(l.y+n.y)/2;do r.y>n!==r.next.y>n&&r.next.y!==r.y&&p<(r.next.x-r.x)*(n-r.y)/(r.next.y-r.y)+r.x&&(h=!h),r=r.next;while(r!==l);r=h}l=r}if(l){a=bi(g,k);g=ee(g,g.next);a=ee(a,
|
|
|
-a.next);fe(g,b,c,d,e,f);fe(a,b,c,d,e,f);break a}k=k.next}g=g.next}while(g!==a)}break}}}}function Gk(a,b,c,d){var e=a.prev,f=a.next;if(0<=ta(e,a,f))return!1;var g=e.x>a.x?e.x>f.x?e.x:f.x:a.x>f.x?a.x:f.x,k=e.y>a.y?e.y>f.y?e.y:f.y:a.y>f.y?a.y:f.y,l=tg(e.x<a.x?e.x<f.x?e.x:f.x:a.x<f.x?a.x:f.x,e.y<a.y?e.y<f.y?e.y:f.y:a.y<f.y?a.y:f.y,b,c,d);b=tg(g,k,b,c,d);c=a.prevZ;for(d=a.nextZ;c&&c.z>=l&&d&&d.z<=b;){if(c!==a.prev&&c!==a.next&&Uc(e.x,e.y,a.x,a.y,f.x,f.y,c.x,c.y)&&0<=ta(c.prev,c,c.next))return!1;c=c.prevZ;
|
|
|
-if(d!==a.prev&&d!==a.next&&Uc(e.x,e.y,a.x,a.y,f.x,f.y,d.x,d.y)&&0<=ta(d.prev,d,d.next))return!1;d=d.nextZ}for(;c&&c.z>=l;){if(c!==a.prev&&c!==a.next&&Uc(e.x,e.y,a.x,a.y,f.x,f.y,c.x,c.y)&&0<=ta(c.prev,c,c.next))return!1;c=c.prevZ}for(;d&&d.z<=b;){if(d!==a.prev&&d!==a.next&&Uc(e.x,e.y,a.x,a.y,f.x,f.y,d.x,d.y)&&0<=ta(d.prev,d,d.next))return!1;d=d.nextZ}return!0}function Hk(a,b){return a.x-b.x}function Ik(a,b){var c=b,d=a.x,e=a.y,f=-Infinity;do{if(e<=c.y&&e>=c.next.y&&c.next.y!==c.y){var g=c.x+(e-c.y)*
|
|
|
-(c.next.x-c.x)/(c.next.y-c.y);if(g<=d&&g>f){f=g;if(g===d){if(e===c.y)return c;if(e===c.next.y)return c.next}var k=c.x<c.next.x?c:c.next}}c=c.next}while(c!==b);if(!k)return null;if(d===f)return k.prev;b=k;g=k.x;var l=k.y,m=Infinity;for(c=k.next;c!==b;){if(d>=c.x&&c.x>=g&&d!==c.x&&Uc(e<l?d:f,e,g,l,e<l?f:d,e,c.x,c.y)){var h=Math.abs(e-c.y)/(d-c.x);(h<m||h===m&&c.x>k.x)&&ge(c,a)&&(k=c,m=h)}c=c.next}return k}function tg(a,b,c,d,e){a=32767*(a-c)*e;b=32767*(b-d)*e;a=(a|a<<8)&16711935;a=(a|a<<4)&252645135;
|
|
|
-a=(a|a<<2)&858993459;b=(b|b<<8)&16711935;b=(b|b<<4)&252645135;b=(b|b<<2)&858993459;return(a|a<<1)&1431655765|((b|b<<1)&1431655765)<<1}function Jk(a){var b=a,c=a;do{if(b.x<c.x||b.x===c.x&&b.y<c.y)c=b;b=b.next}while(b!==a);return c}function Uc(a,b,c,d,e,f,g,k){return 0<=(e-g)*(b-k)-(a-g)*(f-k)&&0<=(a-g)*(d-k)-(c-g)*(b-k)&&0<=(c-g)*(f-k)-(e-g)*(d-k)}function ta(a,b,c){return(b.y-a.y)*(c.x-b.x)-(b.x-a.x)*(c.y-b.y)}function dc(a,b){return a.x===b.x&&a.y===b.y}function ai(a,b,c,d){return dc(a,c)&&dc(b,
|
|
|
-d)||dc(a,d)&&dc(c,b)?!0:0<ta(a,b,c)!==0<ta(a,b,d)&&0<ta(c,d,a)!==0<ta(c,d,b)}function ge(a,b){return 0>ta(a.prev,a,a.next)?0<=ta(a,b,a.next)&&0<=ta(a,a.prev,b):0>ta(a,b,a.prev)||0>ta(a,a.next,b)}function bi(a,b){var c=new ug(a.i,a.x,a.y),d=new ug(b.i,b.x,b.y),e=a.next,f=b.prev;a.next=b;b.prev=a;c.next=e;e.prev=c;d.next=c;c.prev=d;f.next=d;d.prev=f;return d}function $h(a,b,c,d){a=new ug(a,b,c);d?(a.next=d.next,a.prev=d,d.next.prev=a,d.next=a):(a.prev=a,a.next=a);return a}function de(a){a.next.prev=
|
|
|
-a.prev;a.prev.next=a.next;a.prevZ&&(a.prevZ.nextZ=a.nextZ);a.nextZ&&(a.nextZ.prevZ=a.prevZ)}function ug(a,b,c){this.i=a;this.x=b;this.y=c;this.nextZ=this.prevZ=this.z=this.next=this.prev=null;this.steiner=!1}function ci(a){var b=a.length;2<b&&a[b-1].equals(a[0])&&a.pop()}function di(a,b){for(var c=0;c<b.length;c++)a.push(b[c].x),a.push(b[c].y)}function ec(a,b){N.call(this);this.type="ExtrudeGeometry";this.parameters={shapes:a,options:b};this.fromBufferGeometry(new eb(a,b));this.mergeVertices()}function eb(a,
|
|
|
-b){function c(a){function c(a,b,c){b||console.error("THREE.ExtrudeGeometry: vec does not exist");return b.clone().multiplyScalar(c).add(a)}function g(a,b,c){var d=a.x-b.x;var e=a.y-b.y;var f=c.x-a.x;var g=c.y-a.y,k=d*d+e*e;if(Math.abs(d*g-e*f)>Number.EPSILON){var l=Math.sqrt(k),m=Math.sqrt(f*f+g*g);k=b.x-e/l;b=b.y+d/l;g=((c.x-g/m-k)*g-(c.y+f/m-b)*f)/(d*g-e*f);f=k+d*g-a.x;d=b+e*g-a.y;e=f*f+d*d;if(2>=e)return new v(f,d);e=Math.sqrt(e/2)}else a=!1,d>Number.EPSILON?f>Number.EPSILON&&(a=!0):d<-Number.EPSILON?
|
|
|
-f<-Number.EPSILON&&(a=!0):Math.sign(e)===Math.sign(g)&&(a=!0),a?(f=-e,e=Math.sqrt(k)):(f=d,d=e,e=Math.sqrt(k/2));return new v(f/e,d/e)}function k(a,b){for(J=a.length;0<=--J;){var c=J;var f=J-1;0>f&&(f=a.length-1);var g,k=E+2*D;for(g=0;g<k;g++){var l=Y*g,m=Y*(g+1),h=b+f+l,p=b+f+m;m=b+c+m;r(b+c+l);r(h);r(m);r(h);r(p);r(m);l=e.length/3;l=F.generateSideWallUV(d,e,l-6,l-3,l-2,l-1);u(l[0]);u(l[1]);u(l[3]);u(l[1]);u(l[2]);u(l[3])}}}function l(a,b,c){y.push(a);y.push(b);y.push(c)}function h(a,b,c){r(a);r(b);
|
|
|
-r(c);a=e.length/3;a=F.generateTopUV(d,e,a-3,a-2,a-1);u(a[0]);u(a[1]);u(a[2])}function r(a){e.push(y[3*a]);e.push(y[3*a+1]);e.push(y[3*a+2])}function u(a){f.push(a.x);f.push(a.y)}var y=[],w=void 0!==b.curveSegments?b.curveSegments:12,E=void 0!==b.steps?b.steps:1,S=void 0!==b.depth?b.depth:100,V=void 0!==b.bevelEnabled?b.bevelEnabled:!0,A=void 0!==b.bevelThickness?b.bevelThickness:6,z=void 0!==b.bevelSize?b.bevelSize:A-2,B=void 0!==b.bevelOffset?b.bevelOffset:0,D=void 0!==b.bevelSegments?b.bevelSegments:
|
|
|
-3,C=b.extrudePath,F=void 0!==b.UVGenerator?b.UVGenerator:Kk;void 0!==b.amount&&(console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."),S=b.amount);var G=!1;if(C){var H=C.getSpacedPoints(E);G=!0;V=!1;var K=C.computeFrenetFrames(E,!1);var M=new n;var N=new n;var O=new n}V||(B=z=A=D=0);var L;w=a.extractPoints(w);a=w.shape;var P=w.holes;if(!rb.isClockWise(a)){a=a.reverse();var fa=0;for(L=P.length;fa<L;fa++){var ha=P[fa];rb.isClockWise(ha)&&(P[fa]=ha.reverse())}}var Z=rb.triangulateShape(a,
|
|
|
-P),W=a;fa=0;for(L=P.length;fa<L;fa++)ha=P[fa],a=a.concat(ha);var X,Y=a.length,T,ca=Z.length;w=[];var J=0;var Q=W.length;var U=Q-1;for(X=J+1;J<Q;J++,U++,X++)U===Q&&(U=0),X===Q&&(X=0),w[J]=g(W[J],W[U],W[X]);C=[];var ea=w.concat();fa=0;for(L=P.length;fa<L;fa++){ha=P[fa];var ba=[];J=0;Q=ha.length;U=Q-1;for(X=J+1;J<Q;J++,U++,X++)U===Q&&(U=0),X===Q&&(X=0),ba[J]=g(ha[J],ha[U],ha[X]);C.push(ba);ea=ea.concat(ba)}for(U=0;U<D;U++){Q=U/D;var da=A*Math.cos(Q*Math.PI/2);X=z*Math.sin(Q*Math.PI/2)+B;J=0;for(Q=W.length;J<
|
|
|
-Q;J++){var R=c(W[J],w[J],X);l(R.x,R.y,-da)}fa=0;for(L=P.length;fa<L;fa++)for(ha=P[fa],ba=C[fa],J=0,Q=ha.length;J<Q;J++)R=c(ha[J],ba[J],X),l(R.x,R.y,-da)}X=z+B;for(J=0;J<Y;J++)R=V?c(a[J],ea[J],X):a[J],G?(N.copy(K.normals[0]).multiplyScalar(R.x),M.copy(K.binormals[0]).multiplyScalar(R.y),O.copy(H[0]).add(N).add(M),l(O.x,O.y,O.z)):l(R.x,R.y,0);for(Q=1;Q<=E;Q++)for(J=0;J<Y;J++)R=V?c(a[J],ea[J],X):a[J],G?(N.copy(K.normals[Q]).multiplyScalar(R.x),M.copy(K.binormals[Q]).multiplyScalar(R.y),O.copy(H[Q]).add(N).add(M),
|
|
|
-l(O.x,O.y,O.z)):l(R.x,R.y,S/E*Q);for(U=D-1;0<=U;U--){Q=U/D;da=A*Math.cos(Q*Math.PI/2);X=z*Math.sin(Q*Math.PI/2)+B;J=0;for(Q=W.length;J<Q;J++)R=c(W[J],w[J],X),l(R.x,R.y,S+da);fa=0;for(L=P.length;fa<L;fa++)for(ha=P[fa],ba=C[fa],J=0,Q=ha.length;J<Q;J++)R=c(ha[J],ba[J],X),G?l(R.x,R.y+H[E-1].y,H[E-1].x+da):l(R.x,R.y,S+da)}(function(){var a=e.length/3;if(V){var b=0*Y;for(J=0;J<ca;J++)T=Z[J],h(T[2]+b,T[1]+b,T[0]+b);b=Y*(E+2*D);for(J=0;J<ca;J++)T=Z[J],h(T[0]+b,T[1]+b,T[2]+b)}else{for(J=0;J<ca;J++)T=Z[J],
|
|
|
-h(T[2],T[1],T[0]);for(J=0;J<ca;J++)T=Z[J],h(T[0]+Y*E,T[1]+Y*E,T[2]+Y*E)}d.addGroup(a,e.length/3-a,0)})();(function(){var a=e.length/3,b=0;k(W,b);b+=W.length;fa=0;for(L=P.length;fa<L;fa++)ha=P[fa],k(ha,b),b+=ha.length;d.addGroup(a,e.length/3-a,1)})()}z.call(this);this.type="ExtrudeBufferGeometry";this.parameters={shapes:a,options:b};a=Array.isArray(a)?a:[a];for(var d=this,e=[],f=[],g=0,k=a.length;g<k;g++)c(a[g]);this.setAttribute("position",new D(e,3));this.setAttribute("uv",new D(f,2));this.computeVertexNormals()}
|
|
|
-function ei(a,b,c){c.shapes=[];if(Array.isArray(a))for(var d=0,e=a.length;d<e;d++)c.shapes.push(a[d].uuid);else c.shapes.push(a.uuid);void 0!==b.extrudePath&&(c.options.extrudePath=b.extrudePath.toJSON());return c}function he(a,b){N.call(this);this.type="TextGeometry";this.parameters={text:a,parameters:b};this.fromBufferGeometry(new Vc(a,b));this.mergeVertices()}function Vc(a,b){b=b||{};var c=b.font;if(!c||!c.isFont)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),
|
|
|
-new N;a=c.generateShapes(a,b.size);b.depth=void 0!==b.height?b.height:50;void 0===b.bevelThickness&&(b.bevelThickness=10);void 0===b.bevelSize&&(b.bevelSize=8);void 0===b.bevelEnabled&&(b.bevelEnabled=!1);eb.call(this,a,b);this.type="TextBufferGeometry"}function ie(a,b,c,d,e,f,g){N.call(this);this.type="SphereGeometry";this.parameters={radius:a,widthSegments:b,heightSegments:c,phiStart:d,phiLength:e,thetaStart:f,thetaLength:g};this.fromBufferGeometry(new fc(a,b,c,d,e,f,g));this.mergeVertices()}function fc(a,
|
|
|
-b,c,d,e,f,g){z.call(this);this.type="SphereBufferGeometry";this.parameters={radius:a,widthSegments:b,heightSegments:c,phiStart:d,phiLength:e,thetaStart:f,thetaLength:g};a=a||1;b=Math.max(3,Math.floor(b)||8);c=Math.max(2,Math.floor(c)||6);d=void 0!==d?d:0;e=void 0!==e?e:2*Math.PI;f=void 0!==f?f:0;g=void 0!==g?g:Math.PI;var k=Math.min(f+g,Math.PI),l,m,h=0,p=[],q=new n,t=new n,r=[],u=[],y=[],w=[];for(m=0;m<=c;m++){var v=[],S=m/c,V=0;0==m&&0==f?V=.5/b:m==c&&k==Math.PI&&(V=-.5/b);for(l=0;l<=b;l++){var A=
|
|
|
-l/b;q.x=-a*Math.cos(d+A*e)*Math.sin(f+S*g);q.y=a*Math.cos(f+S*g);q.z=a*Math.sin(d+A*e)*Math.sin(f+S*g);u.push(q.x,q.y,q.z);t.copy(q).normalize();y.push(t.x,t.y,t.z);w.push(A+V,1-S);v.push(h++)}p.push(v)}for(m=0;m<c;m++)for(l=0;l<b;l++)a=p[m][l+1],d=p[m][l],e=p[m+1][l],g=p[m+1][l+1],(0!==m||0<f)&&r.push(a,d,g),(m!==c-1||k<Math.PI)&&r.push(d,e,g);this.setIndex(r);this.setAttribute("position",new D(u,3));this.setAttribute("normal",new D(y,3));this.setAttribute("uv",new D(w,2))}function je(a,b,c,d,e,
|
|
|
-f){N.call(this);this.type="RingGeometry";this.parameters={innerRadius:a,outerRadius:b,thetaSegments:c,phiSegments:d,thetaStart:e,thetaLength:f};this.fromBufferGeometry(new Wc(a,b,c,d,e,f));this.mergeVertices()}function Wc(a,b,c,d,e,f){z.call(this);this.type="RingBufferGeometry";this.parameters={innerRadius:a,outerRadius:b,thetaSegments:c,phiSegments:d,thetaStart:e,thetaLength:f};a=a||.5;b=b||1;e=void 0!==e?e:0;f=void 0!==f?f:2*Math.PI;c=void 0!==c?Math.max(3,c):8;d=void 0!==d?Math.max(1,d):1;var g=
|
|
|
-[],k=[],l=[],m=[],h=a,p=(b-a)/d,q=new n,t=new v,r,u;for(r=0;r<=d;r++){for(u=0;u<=c;u++)a=e+u/c*f,q.x=h*Math.cos(a),q.y=h*Math.sin(a),k.push(q.x,q.y,q.z),l.push(0,0,1),t.x=(q.x/b+1)/2,t.y=(q.y/b+1)/2,m.push(t.x,t.y);h+=p}for(r=0;r<d;r++)for(b=r*(c+1),u=0;u<c;u++)a=u+b,e=a+c+1,f=a+c+2,h=a+1,g.push(a,e,h),g.push(e,f,h);this.setIndex(g);this.setAttribute("position",new D(k,3));this.setAttribute("normal",new D(l,3));this.setAttribute("uv",new D(m,2))}function ke(a,b,c,d){N.call(this);this.type="LatheGeometry";
|
|
|
-this.parameters={points:a,segments:b,phiStart:c,phiLength:d};this.fromBufferGeometry(new Xc(a,b,c,d));this.mergeVertices()}function Xc(a,b,c,d){z.call(this);this.type="LatheBufferGeometry";this.parameters={points:a,segments:b,phiStart:c,phiLength:d};b=Math.floor(b)||12;c=c||0;d=d||2*Math.PI;d=L.clamp(d,0,2*Math.PI);var e=[],f=[],g=[],k=1/b,l=new n,m=new v,h;for(h=0;h<=b;h++){var p=c+h*k*d;var q=Math.sin(p),t=Math.cos(p);for(p=0;p<=a.length-1;p++)l.x=a[p].x*q,l.y=a[p].y,l.z=a[p].x*t,f.push(l.x,l.y,
|
|
|
-l.z),m.x=h/b,m.y=p/(a.length-1),g.push(m.x,m.y)}for(h=0;h<b;h++)for(p=0;p<a.length-1;p++)c=p+h*a.length,k=c+a.length,l=c+a.length+1,m=c+1,e.push(c,k,m),e.push(k,l,m);this.setIndex(e);this.setAttribute("position",new D(f,3));this.setAttribute("uv",new D(g,2));this.computeVertexNormals();if(d===2*Math.PI)for(d=this.attributes.normal.array,e=new n,f=new n,g=new n,c=b*a.length*3,p=h=0;h<a.length;h++,p+=3)e.x=d[p+0],e.y=d[p+1],e.z=d[p+2],f.x=d[c+p+0],f.y=d[c+p+1],f.z=d[c+p+2],g.addVectors(e,f).normalize(),
|
|
|
-d[p+0]=d[c+p+0]=g.x,d[p+1]=d[c+p+1]=g.y,d[p+2]=d[c+p+2]=g.z}function gc(a,b){N.call(this);this.type="ShapeGeometry";"object"===typeof b&&(console.warn("THREE.ShapeGeometry: Options parameter has been removed."),b=b.curveSegments);this.parameters={shapes:a,curveSegments:b};this.fromBufferGeometry(new hc(a,b));this.mergeVertices()}function hc(a,b){function c(a){var c,k=e.length/3;a=a.extractPoints(b);var m=a.shape,h=a.holes;!1===rb.isClockWise(m)&&(m=m.reverse());a=0;for(c=h.length;a<c;a++){var x=h[a];
|
|
|
-!0===rb.isClockWise(x)&&(h[a]=x.reverse())}var n=rb.triangulateShape(m,h);a=0;for(c=h.length;a<c;a++)x=h[a],m=m.concat(x);a=0;for(c=m.length;a<c;a++)x=m[a],e.push(x.x,x.y,0),f.push(0,0,1),g.push(x.x,x.y);a=0;for(c=n.length;a<c;a++)m=n[a],d.push(m[0]+k,m[1]+k,m[2]+k),l+=3}z.call(this);this.type="ShapeBufferGeometry";this.parameters={shapes:a,curveSegments:b};b=b||12;var d=[],e=[],f=[],g=[],k=0,l=0;if(!1===Array.isArray(a))c(a);else for(var m=0;m<a.length;m++)c(a[m]),this.addGroup(k,l,m),k+=l,l=0;this.setIndex(d);
|
|
|
-this.setAttribute("position",new D(e,3));this.setAttribute("normal",new D(f,3));this.setAttribute("uv",new D(g,2))}function fi(a,b){b.shapes=[];if(Array.isArray(a))for(var c=0,d=a.length;c<d;c++)b.shapes.push(a[c].uuid);else b.shapes.push(a.uuid);return b}function Yc(a,b){z.call(this);this.type="EdgesGeometry";this.parameters={thresholdAngle:b};var c=[];b=Math.cos(L.DEG2RAD*(void 0!==b?b:1));var d=[0,0],e={},f=["a","b","c"];if(a.isBufferGeometry){var g=new N;g.fromBufferGeometry(a)}else g=a.clone();
|
|
|
-g.mergeVertices();g.computeFaceNormals();a=g.vertices;g=g.faces;for(var k=0,l=g.length;k<l;k++)for(var m=g[k],h=0;3>h;h++){var p=m[f[h]];var q=m[f[(h+1)%3]];d[0]=Math.min(p,q);d[1]=Math.max(p,q);p=d[0]+","+d[1];void 0===e[p]?e[p]={index1:d[0],index2:d[1],face1:k,face2:void 0}:e[p].face2=k}for(p in e)if(d=e[p],void 0===d.face2||g[d.face1].normal.dot(g[d.face2].normal)<=b)f=a[d.index1],c.push(f.x,f.y,f.z),f=a[d.index2],c.push(f.x,f.y,f.z);this.setAttribute("position",new D(c,3))}function ic(a,b,c,d,
|
|
|
-e,f,g,k){N.call(this);this.type="CylinderGeometry";this.parameters={radiusTop:a,radiusBottom:b,height:c,radialSegments:d,heightSegments:e,openEnded:f,thetaStart:g,thetaLength:k};this.fromBufferGeometry(new sb(a,b,c,d,e,f,g,k));this.mergeVertices()}function sb(a,b,c,d,e,f,g,k){function l(c){var e,f=new v,l=new n,x=0,u=!0===c?a:b,E=!0===c?1:-1;var z=r;for(e=1;e<=d;e++)p.push(0,y*E,0),q.push(0,E,0),t.push(.5,.5),r++;var F=r;for(e=0;e<=d;e++){var B=e/d*k+g,D=Math.cos(B);B=Math.sin(B);l.x=u*B;l.y=y*E;
|
|
|
-l.z=u*D;p.push(l.x,l.y,l.z);q.push(0,E,0);f.x=.5*D+.5;f.y=.5*B*E+.5;t.push(f.x,f.y);r++}for(e=0;e<d;e++)f=z+e,l=F+e,!0===c?h.push(l,l+1,f):h.push(l+1,l,f),x+=3;m.addGroup(w,x,!0===c?1:2);w+=x}z.call(this);this.type="CylinderBufferGeometry";this.parameters={radiusTop:a,radiusBottom:b,height:c,radialSegments:d,heightSegments:e,openEnded:f,thetaStart:g,thetaLength:k};var m=this;a=void 0!==a?a:1;b=void 0!==b?b:1;c=c||1;d=Math.floor(d)||8;e=Math.floor(e)||1;f=void 0!==f?f:!1;g=void 0!==g?g:0;k=void 0!==
|
|
|
-k?k:2*Math.PI;var h=[],p=[],q=[],t=[],r=0,u=[],y=c/2,w=0;(function(){var f,l,x=new n,v=new n,z=0,B=(b-a)/c;for(l=0;l<=e;l++){var D=[],C=l/e,F=C*(b-a)+a;for(f=0;f<=d;f++){var G=f/d,H=G*k+g,K=Math.sin(H);H=Math.cos(H);v.x=F*K;v.y=-C*c+y;v.z=F*H;p.push(v.x,v.y,v.z);x.set(K,B,H).normalize();q.push(x.x,x.y,x.z);t.push(G,1-C);D.push(r++)}u.push(D)}for(f=0;f<d;f++)for(l=0;l<e;l++)x=u[l+1][f],v=u[l+1][f+1],B=u[l][f+1],h.push(u[l][f],x,B),h.push(x,v,B),z+=6;m.addGroup(w,z,0);w+=z})();!1===f&&(0<a&&l(!0),0<
|
|
|
-b&&l(!1));this.setIndex(h);this.setAttribute("position",new D(p,3));this.setAttribute("normal",new D(q,3));this.setAttribute("uv",new D(t,2))}function le(a,b,c,d,e,f,g){ic.call(this,0,a,b,c,d,e,f,g);this.type="ConeGeometry";this.parameters={radius:a,height:b,radialSegments:c,heightSegments:d,openEnded:e,thetaStart:f,thetaLength:g}}function me(a,b,c,d,e,f,g){sb.call(this,0,a,b,c,d,e,f,g);this.type="ConeBufferGeometry";this.parameters={radius:a,height:b,radialSegments:c,heightSegments:d,openEnded:e,
|
|
|
-thetaStart:f,thetaLength:g}}function ne(a,b,c,d){N.call(this);this.type="CircleGeometry";this.parameters={radius:a,segments:b,thetaStart:c,thetaLength:d};this.fromBufferGeometry(new Zc(a,b,c,d));this.mergeVertices()}function Zc(a,b,c,d){z.call(this);this.type="CircleBufferGeometry";this.parameters={radius:a,segments:b,thetaStart:c,thetaLength:d};a=a||1;b=void 0!==b?Math.max(3,b):8;c=void 0!==c?c:0;d=void 0!==d?d:2*Math.PI;var e=[],f=[],g=[],k=[],l,m=new n,h=new v;f.push(0,0,0);g.push(0,0,1);k.push(.5,
|
|
|
-.5);var p=0;for(l=3;p<=b;p++,l+=3){var q=c+p/b*d;m.x=a*Math.cos(q);m.y=a*Math.sin(q);f.push(m.x,m.y,m.z);g.push(0,0,1);h.x=(f[l]/a+1)/2;h.y=(f[l+1]/a+1)/2;k.push(h.x,h.y)}for(l=1;l<=b;l++)e.push(l,l+1,0);this.setIndex(e);this.setAttribute("position",new D(f,3));this.setAttribute("normal",new D(g,3));this.setAttribute("uv",new D(k,2))}function jc(a){K.call(this);this.type="ShadowMaterial";this.color=new B(0);this.transparent=!0;this.setValues(a)}function tb(a){pa.call(this,a);this.type="RawShaderMaterial"}
|
|
|
-function fb(a){K.call(this);this.defines={STANDARD:""};this.type="MeshStandardMaterial";this.color=new B(16777215);this.roughness=1;this.metalness=0;this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new B(0);this.emissiveIntensity=1;this.bumpMap=this.emissiveMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new v(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.envMap=this.alphaMap=
|
|
|
-this.metalnessMap=this.roughnessMap=null;this.envMapIntensity=1;this.refractionRatio=.98;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap="round";this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)}function kc(a){fb.call(this);this.defines={STANDARD:"",PHYSICAL:""};this.type="MeshPhysicalMaterial";this.reflectivity=.5;this.clearcoatRoughness=this.clearcoat=0;this.sheen=null;this.clearcoatNormalScale=new v(1,1);this.clearcoatNormalMap=null;
|
|
|
-this.transparency=0;this.setValues(a)}function Ib(a){K.call(this);this.type="MeshPhongMaterial";this.color=new B(16777215);this.specular=new B(1118481);this.shininess=30;this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new B(0);this.emissiveIntensity=1;this.bumpMap=this.emissiveMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new v(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=
|
|
|
-0;this.envMap=this.alphaMap=this.specularMap=null;this.combine=0;this.reflectivity=1;this.refractionRatio=.98;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap="round";this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)}function lc(a){K.call(this);this.defines={TOON:""};this.type="MeshToonMaterial";this.color=new B(16777215);this.specular=new B(1118481);this.shininess=30;this.lightMap=this.gradientMap=this.map=null;this.lightMapIntensity=1;
|
|
|
-this.aoMap=null;this.aoMapIntensity=1;this.emissive=new B(0);this.emissiveIntensity=1;this.bumpMap=this.emissiveMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new v(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.alphaMap=this.specularMap=null;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap="round";this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)}function mc(a){K.call(this);
|
|
|
-this.type="MeshNormalMaterial";this.bumpMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new v(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.wireframe=!1;this.wireframeLinewidth=1;this.morphNormals=this.morphTargets=this.skinning=this.fog=!1;this.setValues(a)}function nc(a){K.call(this);this.type="MeshLambertMaterial";this.color=new B(16777215);this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=
|
|
|
-1;this.emissive=new B(0);this.emissiveIntensity=1;this.envMap=this.alphaMap=this.specularMap=this.emissiveMap=null;this.combine=0;this.reflectivity=1;this.refractionRatio=.98;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap="round";this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)}function oc(a){K.call(this);this.defines={MATCAP:""};this.type="MeshMatcapMaterial";this.color=new B(16777215);this.bumpMap=this.map=this.matcap=null;this.bumpScale=
|
|
|
-1;this.normalMap=null;this.normalMapType=0;this.normalScale=new v(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.alphaMap=null;this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)}function pc(a){ka.call(this);this.type="LineDashedMaterial";this.scale=1;this.dashSize=3;this.gapSize=1;this.setValues(a)}function Ka(a,b,c,d){this.parameterPositions=a;this._cachedIndex=0;this.resultBuffer=void 0!==d?d:new b.constructor(c);this.sampleValues=b;this.valueSize=
|
|
|
-c}function Ve(a,b,c,d){Ka.call(this,a,b,c,d);this._offsetNext=this._weightNext=this._offsetPrev=this._weightPrev=-0}function oe(a,b,c,d){Ka.call(this,a,b,c,d)}function We(a,b,c,d){Ka.call(this,a,b,c,d)}function ua(a,b,c,d){if(void 0===a)throw Error("THREE.KeyframeTrack: track name is undefined");if(void 0===b||0===b.length)throw Error("THREE.KeyframeTrack: no keyframes in track named "+a);this.name=a;this.times=ba.convertArray(b,this.TimeBufferType);this.values=ba.convertArray(c,this.ValueBufferType);
|
|
|
-this.setInterpolation(d||this.DefaultInterpolation)}function Xe(a,b,c){ua.call(this,a,b,c)}function Ye(a,b,c,d){ua.call(this,a,b,c,d)}function $c(a,b,c,d){ua.call(this,a,b,c,d)}function Ze(a,b,c,d){Ka.call(this,a,b,c,d)}function pe(a,b,c,d){ua.call(this,a,b,c,d)}function $e(a,b,c,d){ua.call(this,a,b,c,d)}function ad(a,b,c,d){ua.call(this,a,b,c,d)}function Pa(a,b,c){this.name=a;this.tracks=c;this.duration=void 0!==b?b:-1;this.uuid=L.generateUUID();0>this.duration&&this.resetDuration()}function Lk(a){switch(a.toLowerCase()){case "scalar":case "double":case "float":case "number":case "integer":return $c;
|
|
|
-case "vector":case "vector2":case "vector3":case "vector4":return ad;case "color":return Ye;case "quaternion":return pe;case "bool":case "boolean":return Xe;case "string":return $e}throw Error("THREE.KeyframeTrack: Unsupported typeName: "+a);}function Mk(a){if(void 0===a.type)throw Error("THREE.KeyframeTrack: track type undefined, can not parse");var b=Lk(a.type);if(void 0===a.times){var c=[],d=[];ba.flattenJSON(a.keys,c,d,"value");a.times=c;a.values=d}return void 0!==b.parse?b.parse(a):new b(a.name,
|
|
|
-a.times,a.values,a.interpolation)}function vg(a,b,c){var d=this,e=!1,f=0,g=0,k=void 0,l=[];this.onStart=void 0;this.onLoad=a;this.onProgress=b;this.onError=c;this.itemStart=function(a){g++;if(!1===e&&void 0!==d.onStart)d.onStart(a,f,g);e=!0};this.itemEnd=function(a){f++;if(void 0!==d.onProgress)d.onProgress(a,f,g);if(f===g&&(e=!1,void 0!==d.onLoad))d.onLoad()};this.itemError=function(a){if(void 0!==d.onError)d.onError(a)};this.resolveURL=function(a){return k?k(a):a};this.setURLModifier=function(a){k=
|
|
|
-a;return this};this.addHandler=function(a,b){l.push(a,b);return this};this.removeHandler=function(a){a=l.indexOf(a);-1!==a&&l.splice(a,2);return this};this.getHandler=function(a){for(var b=0,c=l.length;b<c;b+=2){var d=l[b],e=l[b+1];d.global&&(d.lastIndex=0);if(d.test(a))return e}return null}}function Y(a){this.manager=void 0!==a?a:gi;this.crossOrigin="anonymous";this.resourcePath=this.path=""}function Qa(a){Y.call(this,a)}function wg(a){Y.call(this,a)}function xg(a){Y.call(this,a)}function af(a){Y.call(this,
|
|
|
-a)}function bd(a){Y.call(this,a)}function bf(a){Y.call(this,a)}function cf(a){Y.call(this,a)}function H(){this.type="Curve";this.arcLengthDivisions=200}function La(a,b,c,d,e,f,g,k){H.call(this);this.type="EllipseCurve";this.aX=a||0;this.aY=b||0;this.xRadius=c||1;this.yRadius=d||1;this.aStartAngle=e||0;this.aEndAngle=f||2*Math.PI;this.aClockwise=g||!1;this.aRotation=k||0}function cd(a,b,c,d,e,f){La.call(this,a,b,c,c,d,e,f);this.type="ArcCurve"}function yg(){var a=0,b=0,c=0,d=0;return{initCatmullRom:function(e,
|
|
|
-f,g,k,l){e=l*(g-e);k=l*(k-f);a=f;b=e;c=-3*f+3*g-2*e-k;d=2*f-2*g+e+k},initNonuniformCatmullRom:function(e,f,g,k,l,m,h){e=((f-e)/l-(g-e)/(l+m)+(g-f)/m)*m;k=((g-f)/m-(k-f)/(m+h)+(k-g)/h)*m;a=f;b=e;c=-3*f+3*g-2*e-k;d=2*f-2*g+e+k},calc:function(e){var f=e*e;return a+b*e+c*f+d*f*e}}}function Aa(a,b,c,d){H.call(this);this.type="CatmullRomCurve3";this.points=a||[];this.closed=b||!1;this.curveType=c||"centripetal";this.tension=d||.5}function hi(a,b,c,d,e){b=.5*(d-b);e=.5*(e-c);var f=a*a;return(2*c-2*d+b+e)*
|
|
|
-a*f+(-3*c+3*d-2*b-e)*f+b*a+c}function qe(a,b,c,d){var e=1-a;return e*e*b+2*(1-a)*a*c+a*a*d}function re(a,b,c,d,e){var f=1-a,g=1-a;return f*f*f*b+3*g*g*a*c+3*(1-a)*a*a*d+a*a*a*e}function Va(a,b,c,d){H.call(this);this.type="CubicBezierCurve";this.v0=a||new v;this.v1=b||new v;this.v2=c||new v;this.v3=d||new v}function gb(a,b,c,d){H.call(this);this.type="CubicBezierCurve3";this.v0=a||new n;this.v1=b||new n;this.v2=c||new n;this.v3=d||new n}function Ea(a,b){H.call(this);this.type="LineCurve";this.v1=a||
|
|
|
-new v;this.v2=b||new v}function Wa(a,b){H.call(this);this.type="LineCurve3";this.v1=a||new n;this.v2=b||new n}function Xa(a,b,c){H.call(this);this.type="QuadraticBezierCurve";this.v0=a||new v;this.v1=b||new v;this.v2=c||new v}function hb(a,b,c){H.call(this);this.type="QuadraticBezierCurve3";this.v0=a||new n;this.v1=b||new n;this.v2=c||new n}function Ya(a){H.call(this);this.type="SplineCurve";this.points=a||[]}function ub(){H.call(this);this.type="CurvePath";this.curves=[];this.autoClose=!1}function Za(a){ub.call(this);
|
|
|
-this.type="Path";this.currentPoint=new v;a&&this.setFromPoints(a)}function Jb(a){Za.call(this,a);this.uuid=L.generateUUID();this.type="Shape";this.holes=[]}function da(a,b){G.call(this);this.type="Light";this.color=new B(a);this.intensity=void 0!==b?b:1;this.receiveShadow=void 0}function df(a,b,c){da.call(this,a,c);this.type="HemisphereLight";this.castShadow=void 0;this.position.copy(G.DefaultUp);this.updateMatrix();this.groundColor=new B(b)}function ib(a){this.camera=a;this.bias=0;this.radius=1;
|
|
|
-this.mapSize=new v(512,512);this.mapPass=this.map=null;this.matrix=new P;this._frustum=new Fd;this._frameExtents=new v(1,1);this._viewportCount=1;this._viewports=[new ia(0,0,1,1)]}function ef(){ib.call(this,new qa(50,1,.5,500))}function ff(a,b,c,d,e,f){da.call(this,a,b);this.type="SpotLight";this.position.copy(G.DefaultUp);this.updateMatrix();this.target=new G;Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(a){this.intensity=a/Math.PI}});this.distance=
|
|
|
-void 0!==c?c:0;this.angle=void 0!==d?d:Math.PI/3;this.penumbra=void 0!==e?e:0;this.decay=void 0!==f?f:1;this.shadow=new ef}function zg(){ib.call(this,new qa(90,1,.5,500));this._frameExtents=new v(4,2);this._viewportCount=6;this._viewports=[new ia(2,1,1,1),new ia(0,1,1,1),new ia(3,1,1,1),new ia(1,1,1,1),new ia(3,0,1,1),new ia(1,0,1,1)];this._cubeDirections=[new n(1,0,0),new n(-1,0,0),new n(0,0,1),new n(0,0,-1),new n(0,1,0),new n(0,-1,0)];this._cubeUps=[new n(0,1,0),new n(0,1,0),new n(0,1,0),new n(0,
|
|
|
-1,0),new n(0,0,1),new n(0,0,-1)]}function gf(a,b,c,d){da.call(this,a,b);this.type="PointLight";Object.defineProperty(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(a){this.intensity=a/(4*Math.PI)}});this.distance=void 0!==c?c:0;this.decay=void 0!==d?d:1;this.shadow=new zg}function dd(a,b,c,d,e,f){cb.call(this);this.type="OrthographicCamera";this.zoom=1;this.view=null;this.left=void 0!==a?a:-1;this.right=void 0!==b?b:1;this.top=void 0!==c?c:1;this.bottom=void 0!==d?d:-1;
|
|
|
-this.near=void 0!==e?e:.1;this.far=void 0!==f?f:2E3;this.updateProjectionMatrix()}function hf(){ib.call(this,new dd(-5,5,5,-5,.5,500))}function jf(a,b){da.call(this,a,b);this.type="DirectionalLight";this.position.copy(G.DefaultUp);this.updateMatrix();this.target=new G;this.shadow=new hf}function kf(a,b){da.call(this,a,b);this.type="AmbientLight";this.castShadow=void 0}function lf(a,b,c,d){da.call(this,a,b);this.type="RectAreaLight";this.width=void 0!==c?c:10;this.height=void 0!==d?d:10}function mf(a){Y.call(this,
|
|
|
-a);this.textures={}}function nf(){z.call(this);this.type="InstancedBufferGeometry";this.maxInstancedCount=void 0}function of(a,b,c,d){"number"===typeof c&&(d=c,c=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument."));M.call(this,a,b,c);this.meshPerAttribute=d||1}function pf(a){Y.call(this,a)}function qf(a){Y.call(this,a)}function Ag(a){"undefined"===typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported.");
|
|
|
-"undefined"===typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported.");Y.call(this,a);this.options=void 0}function Bg(){this.type="ShapePath";this.color=new B;this.subPaths=[];this.currentPath=null}function Cg(a){this.type="Font";this.data=a}function Dg(a){Y.call(this,a)}function rf(a){Y.call(this,a)}function sf(){this.coefficients=[];for(var a=0;9>a;a++)this.coefficients.push(new n)}function $a(a,b){da.call(this,void 0,b);this.sh=void 0!==a?a:new sf}function Eg(a,b,c){$a.call(this,
|
|
|
-void 0,c);a=(new B).set(a);c=(new B).set(b);b=new n(a.r,a.g,a.b);a=new n(c.r,c.g,c.b);c=Math.sqrt(Math.PI);var d=c*Math.sqrt(.75);this.sh.coefficients[0].copy(b).add(a).multiplyScalar(c);this.sh.coefficients[1].copy(b).sub(a).multiplyScalar(d)}function Fg(a,b){$a.call(this,void 0,b);a=(new B).set(a);this.sh.coefficients[0].set(a.r,a.g,a.b).multiplyScalar(2*Math.sqrt(Math.PI))}function ii(){this.type="StereoCamera";this.aspect=1;this.eyeSep=.064;this.cameraL=new qa;this.cameraL.layers.enable(1);this.cameraL.matrixAutoUpdate=
|
|
|
-!1;this.cameraR=new qa;this.cameraR.layers.enable(2);this.cameraR.matrixAutoUpdate=!1;this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}function Gg(a){this.autoStart=void 0!==a?a:!0;this.elapsedTime=this.oldTime=this.startTime=0;this.running=!1}function Hg(){G.call(this);this.type="AudioListener";this.context=Ig.getContext();this.gain=this.context.createGain();this.gain.connect(this.context.destination);this.filter=null;this.timeDelta=0;this._clock=new Gg}function ed(a){G.call(this);
|
|
|
-this.type="Audio";this.listener=a;this.context=a.context;this.gain=this.context.createGain();this.gain.connect(a.getInput());this.autoplay=!1;this.buffer=null;this.detune=0;this.loop=!1;this.offset=this.loopEnd=this.loopStart=0;this.duration=void 0;this.playbackRate=1;this.isPlaying=!1;this.hasPlaybackControl=!0;this.sourceType="empty";this._pausedAt=this._startedAt=0;this.filters=[]}function Jg(a){ed.call(this,a);this.panner=this.context.createPanner();this.panner.panningModel="HRTF";this.panner.connect(this.gain)}
|
|
|
-function Kg(a,b){this.analyser=a.context.createAnalyser();this.analyser.fftSize=void 0!==b?b:2048;this.data=new Uint8Array(this.analyser.frequencyBinCount);a.getOutput().connect(this.analyser)}function Lg(a,b,c){this.binding=a;this.valueSize=c;a=Float64Array;switch(b){case "quaternion":b=this._slerp;break;case "string":case "bool":a=Array;b=this._select;break;default:b=this._lerp}this.buffer=new a(4*c);this._mixBufferRegion=b;this.referenceCount=this.useCount=this.cumulativeWeight=0}function ji(a,
|
|
|
-b,c){c=c||Ba.parseTrackName(b);this._targetGroup=a;this._bindings=a.subscribe_(b,c)}function Ba(a,b,c){this.path=b;this.parsedPath=c||Ba.parseTrackName(b);this.node=Ba.findNode(a,this.parsedPath.nodeName)||a;this.rootNode=a}function ki(){this.uuid=L.generateUUID();this._objects=Array.prototype.slice.call(arguments);this.nCachedObjects_=0;var a={};this._indicesByUUID=a;for(var b=0,c=arguments.length;b!==c;++b)a[arguments[b].uuid]=b;this._paths=[];this._parsedPaths=[];this._bindings=[];this._bindingsIndicesByPath=
|
|
|
-{};var d=this;this.stats={objects:{get total(){return d._objects.length},get inUse(){return this.total-d.nCachedObjects_}},get bindingsPerObject(){return d._bindings.length}}}function li(a,b,c){this._mixer=a;this._clip=b;this._localRoot=c||null;a=b.tracks;b=a.length;c=Array(b);for(var d={endingStart:2400,endingEnd:2400},e=0;e!==b;++e){var f=a[e].createInterpolant(null);c[e]=f;f.settings=d}this._interpolantSettings=d;this._interpolants=c;this._propertyBindings=Array(b);this._weightInterpolant=this._timeScaleInterpolant=
|
|
|
-this._byClipCacheIndex=this._cacheIndex=null;this.loop=2201;this._loopCount=-1;this._startTime=null;this.time=0;this._effectiveWeight=this.weight=this._effectiveTimeScale=this.timeScale=1;this.repetitions=Infinity;this.paused=!1;this.enabled=!0;this.clampWhenFinished=!1;this.zeroSlopeAtEnd=this.zeroSlopeAtStart=!0}function Mg(a){this._root=a;this._initMemoryManager();this.time=this._accuIndex=0;this.timeScale=1}function tf(a,b){"string"===typeof a&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),
|
|
|
-a=b);this.value=a}function Ng(a,b,c){qb.call(this,a,b);this.meshPerAttribute=c||1}function mi(a,b,c,d){this.ray=new Ub(a,b);this.near=c||0;this.far=d||Infinity;this.camera=null;this.params={Mesh:{},Line:{},LOD:{},Points:{threshold:1},Sprite:{}};Object.defineProperties(this.params,{PointCloud:{get:function(){console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points.");return this.Points}}})}function ni(a,b){return a.distance-b.distance}function Og(a,b,c,d){if(!1!==a.visible&&
|
|
|
-(a.raycast(b,c),!0===d)){a=a.children;d=0;for(var e=a.length;d<e;d++)Og(a[d],b,c,!0)}}function oi(a,b,c){this.radius=void 0!==a?a:1;this.phi=void 0!==b?b:0;this.theta=void 0!==c?c:0;return this}function pi(a,b,c){this.radius=void 0!==a?a:1;this.theta=void 0!==b?b:0;this.y=void 0!==c?c:0;return this}function Pg(a,b){this.min=void 0!==a?a:new v(Infinity,Infinity);this.max=void 0!==b?b:new v(-Infinity,-Infinity)}function Qg(a,b){this.start=void 0!==a?a:new n;this.end=void 0!==b?b:new n}function se(a){G.call(this);
|
|
|
-this.material=a;this.render=function(){}}function fd(a,b){G.call(this);this.light=a;this.light.updateMatrixWorld();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.color=b;a=new z;b=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(var c=0,d=1;32>c;c++,d++){var e=c/32*Math.PI*2,f=d/32*Math.PI*2;b.push(Math.cos(e),Math.sin(e),1,Math.cos(f),Math.sin(f),1)}a.setAttribute("position",new D(b,3));b=new ka({fog:!1});this.cone=new ma(a,b);this.add(this.cone);this.update()}function qi(a){var b=
|
|
|
-[];a&&a.isBone&&b.push(a);for(var c=0;c<a.children.length;c++)b.push.apply(b,qi(a.children[c]));return b}function gd(a){for(var b=qi(a),c=new z,d=[],e=[],f=new B(0,0,1),g=new B(0,1,0),k=0;k<b.length;k++){var l=b[k];l.parent&&l.parent.isBone&&(d.push(0,0,0),d.push(0,0,0),e.push(f.r,f.g,f.b),e.push(g.r,g.g,g.b))}c.setAttribute("position",new D(d,3));c.setAttribute("color",new D(e,3));d=new ka({vertexColors:2,depthTest:!1,depthWrite:!1,transparent:!0});ma.call(this,c,d);this.root=a;this.bones=b;this.matrix=
|
|
|
-a.matrixWorld;this.matrixAutoUpdate=!1}function hd(a,b,c){this.light=a;this.light.updateMatrixWorld();this.color=c;a=new fc(b,4,2);b=new Na({wireframe:!0,fog:!1});U.call(this,a,b);this.matrix=this.light.matrixWorld;this.matrixAutoUpdate=!1;this.update()}function id(a,b,c){G.call(this);this.light=a;this.light.updateMatrixWorld();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.color=c;a=new bc(b);a.rotateY(.5*Math.PI);this.material=new Na({wireframe:!0,fog:!1});void 0===this.color&&(this.material.vertexColors=
|
|
|
-2);b=a.getAttribute("position");b=new Float32Array(3*b.count);a.setAttribute("color",new M(b,3));this.add(new U(a,this.material));this.update()}function uf(a,b,c,d){a=a||10;b=b||10;c=new B(void 0!==c?c:4473924);d=new B(void 0!==d?d:8947848);var e=b/2,f=a/b,g=a/2;a=[];for(var k=[],l=0,m=0,h=-g;l<=b;l++,h+=f){a.push(-g,0,h,g,0,h);a.push(h,0,-g,h,0,g);var p=l===e?c:d;p.toArray(k,m);m+=3;p.toArray(k,m);m+=3;p.toArray(k,m);m+=3;p.toArray(k,m);m+=3}b=new z;b.setAttribute("position",new D(a,3));b.setAttribute("color",
|
|
|
-new D(k,3));c=new ka({vertexColors:2});ma.call(this,b,c)}function vf(a,b,c,d,e,f){a=a||10;b=b||16;c=c||8;d=d||64;e=new B(void 0!==e?e:4473924);f=new B(void 0!==f?f:8947848);var g=[],k=[],l;for(l=0;l<=b;l++){var m=l/b*2*Math.PI;var h=Math.sin(m)*a;m=Math.cos(m)*a;g.push(0,0,0);g.push(h,0,m);var p=l&1?e:f;k.push(p.r,p.g,p.b);k.push(p.r,p.g,p.b)}for(l=0;l<=c;l++){p=l&1?e:f;var q=a-a/c*l;for(b=0;b<d;b++)m=b/d*2*Math.PI,h=Math.sin(m)*q,m=Math.cos(m)*q,g.push(h,0,m),k.push(p.r,p.g,p.b),m=(b+1)/d*2*Math.PI,
|
|
|
-h=Math.sin(m)*q,m=Math.cos(m)*q,g.push(h,0,m),k.push(p.r,p.g,p.b)}a=new z;a.setAttribute("position",new D(g,3));a.setAttribute("color",new D(k,3));g=new ka({vertexColors:2});ma.call(this,a,g)}function jd(a,b,c){G.call(this);this.light=a;this.light.updateMatrixWorld();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.color=c;void 0===b&&(b=1);a=new z;a.setAttribute("position",new D([-b,b,0,b,b,0,b,-b,0,-b,-b,0,-b,b,0],3));b=new ka({fog:!1});this.lightPlane=new Ja(a,b);this.add(this.lightPlane);
|
|
|
-a=new z;a.setAttribute("position",new D([0,0,0,0,0,1],3));this.targetLine=new Ja(a,b);this.add(this.targetLine);this.update()}function te(a){function b(a,b,d){c(a,d);c(b,d)}function c(a,b){f.push(0,0,0);g.push(b.r,b.g,b.b);void 0===k[a]&&(k[a]=[]);k[a].push(f.length/3-1)}var d=new z,e=new ka({color:16777215,vertexColors:1}),f=[],g=[],k={},l=new B(16755200),m=new B(16711680),h=new B(43775),p=new B(16777215),q=new B(3355443);b("n1","n2",l);b("n2","n4",l);b("n4","n3",l);b("n3","n1",l);b("f1","f2",l);
|
|
|
-b("f2","f4",l);b("f4","f3",l);b("f3","f1",l);b("n1","f1",l);b("n2","f2",l);b("n3","f3",l);b("n4","f4",l);b("p","n1",m);b("p","n2",m);b("p","n3",m);b("p","n4",m);b("u1","u2",h);b("u2","u3",h);b("u3","u1",h);b("c","t",p);b("p","c",q);b("cn1","cn2",q);b("cn3","cn4",q);b("cf1","cf2",q);b("cf3","cf4",q);d.setAttribute("position",new D(f,3));d.setAttribute("color",new D(g,3));ma.call(this,d,e);this.camera=a;this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix();this.matrix=a.matrixWorld;
|
|
|
-this.matrixAutoUpdate=!1;this.pointMap=k;this.update()}function ja(a,b,c,d,e,f,g){wf.set(e,f,g).unproject(d);a=b[a];if(void 0!==a)for(c=c.getAttribute("position"),b=0,d=a.length;b<d;b++)c.setXYZ(a[b],wf.x,wf.y,wf.z)}function vb(a,b){this.object=a;void 0===b&&(b=16776960);a=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]);var c=new Float32Array(24),d=new z;d.setIndex(new M(a,1));d.setAttribute("position",new M(c,3));ma.call(this,d,new ka({color:b}));this.matrixAutoUpdate=!1;this.update()}
|
|
|
-function ue(a,b){this.type="Box3Helper";this.box=a;b=b||16776960;a=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]);var c=new z;c.setIndex(new M(a,1));c.setAttribute("position",new D([1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],3));ma.call(this,c,new ka({color:b}));this.geometry.computeBoundingSphere()}function ve(a,b,c){this.type="PlaneHelper";this.plane=a;this.size=void 0===b?1:b;a=void 0!==c?c:16776960;b=new z;b.setAttribute("position",new D([1,-1,1,-1,1,1,-1,
|
|
|
--1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,0,0,1,0,0,0],3));b.computeBoundingSphere();Ja.call(this,b,new ka({color:a}));b=new z;b.setAttribute("position",new D([1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],3));b.computeBoundingSphere();this.add(new U(b,new Na({color:a,opacity:.2,transparent:!0,depthWrite:!1})))}function wb(a,b,c,d,e,f){G.call(this);void 0===a&&(a=new n(0,0,1));void 0===b&&(b=new n(0,0,0));void 0===c&&(c=1);void 0===d&&(d=16776960);void 0===e&&(e=.2*c);void 0===f&&(f=.2*e);void 0===xf&&
|
|
|
-(xf=new z,xf.setAttribute("position",new D([0,0,0,0,1,0],3)),Rg=new sb(0,.5,1,5,1),Rg.translate(0,-.5,0));this.position.copy(b);this.line=new Ja(xf,new ka({color:d}));this.line.matrixAutoUpdate=!1;this.add(this.line);this.cone=new U(Rg,new Na({color:d}));this.cone.matrixAutoUpdate=!1;this.add(this.cone);this.setDirection(a);this.setLength(c,e,f)}function we(a){a=a||1;var b=[0,0,0,a,0,0,0,0,0,0,a,0,0,0,0,0,0,a];a=new z;a.setAttribute("position",new D(b,3));a.setAttribute("color",new D([1,0,0,1,.6,
|
|
|
-0,0,1,0,.6,1,0,0,0,1,0,.6,1],3));b=new ka({vertexColors:2});ma.call(this,a,b)}function Sg(a){Z=a;Tg(yf)}function ri(a){var b={magFilter:1003,minFilter:1003,generateMipmaps:!1,type:a?a.type:1009,format:a?a.format:1023,encoding:a?a.encoding:3002,depthBuffer:!1,stencilBuffer:!1},c=si(b);c.depthBuffer=a?!1:!0;zf=si(b);return c}function ti(){zf.dispose();Z.setRenderTarget(null);var a=Z.getSize(new v);Z.setViewport(0,0,a.x,a.y)}function Tg(a){var b=new nb;b.add(new U(xe[0],a));Z.compile(b,Ug)}function si(a){a=
|
|
|
-new wa(3*jb,3*jb,a);a.texture.mapping=306;a.texture.name="PMREM.cubeUv";a.scissorTest=!0;return a}function Vg(a,b,c,d){var e=1/Z.getPixelRatio();a=(a+.5)*e;b=(b+.5)*e;c=(c+.5)*e;d=(d+.5)*e;Z.setViewport(a,b,c,d);Z.setScissor(a,b,c,d)}function ui(a){var b=Z.autoClear;Z.autoClear=!1;for(var c=1;c<vi;c++)wi(a,c-1,c,Math.sqrt(Af[c]*Af[c]-Af[c-1]*Af[c-1]),xi[(c-1)%xi.length]);Z.autoClear=b}function wi(a,b,c,d,e){yi(a,zf,b,c,d,"latitudinal",e);yi(zf,a,c,c,d,"longitudinal",e)}function yi(a,b,c,d,e,f,g){"latitudinal"!==
|
|
|
-f&&"longitudinal"!==f&&console.error("blur direction must be either latitudinal or longitudinal!");var k=new nb;k.add(new U(xe[d],yf));var l=yf.uniforms,m=zi[c]-1;m=isFinite(e)?Math.PI/(2*m):2*Math.PI/39;var h=e/m,p=isFinite(e)?1+Math.floor(3*h):20;20<p&&console.warn("sigmaRadians, "+e+", is too large and will clip, as it requested "+p+" samples when the maximum is set to 20");for(var q=[],n=0,r=0;20>r;++r)e=r/h,e=Math.exp(-e*e/2),q.push(e),0==r?n+=e:r<p&&(n+=2*e);for(r=0;r<q.length;r++)q[r]/=n;l.envMap.value=
|
|
|
-a.texture;l.samples.value=p;l.weights.value=q;l.latitudinal.value="latitudinal"===f;g&&(l.poleAxis.value=g);l.dTheta.value=m;l.mipInt.value=8-c;l.inputEncoding.value=kb[a.texture.encoding];l.outputEncoding.value=kb[a.texture.encoding];a=zi[d];e=3*Math.max(0,jb-2*a);d=(0===d?0:2*jb)+2*a*(4<d?d-8+4:0);Z.setRenderTarget(b);Vg(e,d,3*a,2*a);Z.render(k,Ug)}function Ai(){var a=new v(1,1);a=new tb({uniforms:{envMap:{value:null},texelSize:{value:a},inputEncoding:{value:kb[3E3]},outputEncoding:{value:kb[3E3]}},
|
|
|
-vertexShader:Wg(),fragmentShader:"\nprecision mediump float;\nprecision mediump int;\nvarying vec3 vOutputDirection;\nuniform sampler2D envMap;\nuniform vec2 texelSize;\n\n"+Xg()+"\n\n#define RECIPROCAL_PI 0.31830988618\n#define RECIPROCAL_PI2 0.15915494\n\nvoid main() {\n\tgl_FragColor = vec4(0.0);\n\tvec3 outputDirection = normalize(vOutputDirection);\n\tvec2 uv;\n\tuv.y = asin(clamp(outputDirection.y, -1.0, 1.0)) * RECIPROCAL_PI + 0.5;\n\tuv.x = atan(outputDirection.z, outputDirection.x) * RECIPROCAL_PI2 + 0.5;\n\tvec2 f = fract(uv / texelSize - 0.5);\n\tuv -= f * texelSize;\n\tvec3 tl = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n\tuv.x += texelSize.x;\n\tvec3 tr = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n\tuv.y += texelSize.y;\n\tvec3 br = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n\tuv.x -= texelSize.x;\n\tvec3 bl = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n\tvec3 tm = mix(tl, tr, f.x);\n\tvec3 bm = mix(bl, br, f.x);\n\tgl_FragColor.rgb = mix(tm, bm, f.y);\n\tgl_FragColor = linearToOutputTexel(gl_FragColor);\n}\n\t\t",
|
|
|
+for(var f=0;f<d.length;f++){var g=d[f],k=e.getViewport(g),x=y.cameras[f];x.matrix.fromArray(g.transform.matrix);x.projectionMatrix.fromArray(g.projectionMatrix);x.viewport.set(k.x,k.y,k.width,k.height);0===f&&y.matrix.copy(x.matrix)}}d=l.inputSources;for(f=0;f<h.length;f++){e=h[f];if(g=d[f])if(g=c.getPose(g.targetRaySpace,m),null!==g){e.matrix.fromArray(g.transform.matrix);e.matrix.decompose(e.position,e.rotation,e.scale);e.visible=!0;continue}e.visible=!1}v&&v(b,c)});this.setAnimationLoop=function(a){v=
|
|
|
+a};this.dispose=function(){}}function og(a){var b;function c(){sa=new wj(I);Ha=new uj(I,sa,a);!1===Ha.isWebGL2&&(sa.get("WEBGL_depth_texture"),sa.get("OES_texture_float"),sa.get("OES_texture_half_float"),sa.get("OES_texture_half_float_linear"),sa.get("OES_standard_derivatives"),sa.get("OES_element_index_uint"),sa.get("ANGLE_instanced_arrays"));sa.get("OES_texture_float_linear");pa=new Vh(I,sa,Ha);aa=new Dk(I,sa,Ha);aa.scissor(T.copy(ja).multiplyScalar(Q).floor());aa.viewport(X.copy(R).multiplyScalar(Q).floor());
|
|
|
+ba=new zj(I);W=new uk;ea=new Ek(I,sa,aa,W,Ha,pa,ba);na=new rj(I);ya=new xj(I,na,ba);ta=new Cj(I,ya,na,ba);Aa=new Bj(I);ua=new tk(z,sa,Ha);xa=new xk;wa=new Ck;oa=new sj(z,aa,ta,A);Ba=new tj(I,sa,ba,Ha);Da=new yj(I,sa,ba,Ha);ba.programs=ua.programs;z.capabilities=Ha;z.extensions=sa;z.properties=W;z.renderLists=xa;z.state=aa;z.info=ba}function d(a){a.preventDefault();console.log("THREE.WebGLRenderer: Context Lost.");H=!0}function e(){console.log("THREE.WebGLRenderer: Context Restored.");H=!1;c()}function f(a){a=
|
|
|
+a.target;a.removeEventListener("dispose",f);g(a);W.remove(a)}function g(a){var b=W.get(a).program;a.program=void 0;void 0!==b&&ua.releaseProgram(b)}function k(a,b){a.render(function(a){z.renderBufferImmediate(a,b)})}function l(a,b,c,d){if(!1!==a.visible){if(a.layers.test(b.layers))if(a.isGroup)c=a.renderOrder;else if(a.isLOD)!0===a.autoUpdate&&a.update(b);else if(a.isLight)F.pushLight(a),a.castShadow&&F.pushShadow(a);else if(a.isSprite){if(!a.frustumCulled||kg.intersectsSprite(a)){d&&Gb.setFromMatrixPosition(a.matrixWorld).applyMatrix4(Ld);
|
|
|
+var e=ta.update(a),f=a.material;f.visible&&B.push(a,e,f,c,Gb.z,null)}}else if(a.isImmediateRenderObject)d&&Gb.setFromMatrixPosition(a.matrixWorld).applyMatrix4(Ld),B.push(a,null,a.material,c,Gb.z,null);else if(a.isMesh||a.isLine||a.isPoints)if(a.isSkinnedMesh&&a.skeleton.frame!==ba.render.frame&&(a.skeleton.update(),a.skeleton.frame=ba.render.frame),!a.frustumCulled||kg.intersectsObject(a))if(d&&Gb.setFromMatrixPosition(a.matrixWorld).applyMatrix4(Ld),e=ta.update(a),f=a.material,Array.isArray(f))for(var g=
|
|
|
+e.groups,k=0,m=g.length;k<m;k++){var p=g[k],x=f[p.materialIndex];x&&x.visible&&B.push(a,e,x,c,Gb.z,p)}else f.visible&&B.push(a,e,f,c,Gb.z,null);a=a.children;k=0;for(m=a.length;k<m;k++)l(a[k],b,c,d)}}function m(a,b,c,d){for(var e=0,f=a.length;e<f;e++){var g=a[e],k=g.object,l=g.geometry,m=void 0===d?g.material:d;g=g.group;if(c.isArrayCamera)if(ca=c,la.enabled&&va.isAvailable())x(k,b,c,l,m,g);else for(var p=c.cameras,h=0,q=p.length;h<q;h++){var r=p[h];k.layers.test(r.layers)&&(aa.viewport(X.copy(r.viewport)),
|
|
|
+F.setupLights(r),x(k,b,r,l,m,g))}else ca=null,x(k,b,c,l,m,g)}}function x(a,c,d,e,f,g){a.onBeforeRender(z,c,d,e,f,g);F=wa.get(c,ca||d);a.modelViewMatrix.multiplyMatrices(d.matrixWorldInverse,a.matrixWorld);a.normalMatrix.getNormalMatrix(a.modelViewMatrix);if(a.isImmediateRenderObject){var l=h(d,c,f,a);aa.setMaterial(f);fa=b=null;ha=!1;k(a,l)}else z.renderBufferDirect(d,c,e,f,a,g);a.onAfterRender(z,c,d,e,f,g);F=wa.get(c,ca||d)}function p(a,b,c){var d=W.get(a),e=F.state.lights,k=e.state.version;c=ua.getParameters(a,
|
|
|
+e.state,F.state.shadowsArray,b,Ta.numPlanes,Ta.numIntersection,c);var l=ua.getProgramCacheKey(c),m=d.program,p=!0;if(void 0===m)a.addEventListener("dispose",f);else if(m.cacheKey!==l)g(a);else{if(d.lightsStateVersion!==k)d.lightsStateVersion=k;else if(void 0!==c.shaderID)return;p=!1}p&&(m=ua.acquireProgram(c,l),d.program=m,d.uniforms=c.uniforms,d.environment=a.isMeshStandardMaterial?b.environment:null,d.outputEncoding=z.outputEncoding,a.program=m);c=m.getAttributes();if(a.morphTargets)for(l=a.numSupportedMorphTargets=
|
|
|
+0;l<z.maxMorphTargets;l++)0<=c["morphTarget"+l]&&a.numSupportedMorphTargets++;if(a.morphNormals)for(l=a.numSupportedMorphNormals=0;l<z.maxMorphNormals;l++)0<=c["morphNormal"+l]&&a.numSupportedMorphNormals++;c=d.uniforms;if(!a.isShaderMaterial&&!a.isRawShaderMaterial||!0===a.clipping)d.numClippingPlanes=Ta.numPlanes,d.numIntersection=Ta.numIntersection,c.clippingPlanes=Ta.uniform;d.fog=b.fog;d.needsLights=a.isMeshLambertMaterial||a.isMeshToonMaterial||a.isMeshPhongMaterial||a.isMeshStandardMaterial||
|
|
|
+a.isShadowMaterial||a.isShaderMaterial&&!0===a.lights;d.lightsStateVersion=k;d.needsLights&&(c.ambientLightColor.value=e.state.ambient,c.lightProbe.value=e.state.probe,c.directionalLights.value=e.state.directional,c.spotLights.value=e.state.spot,c.rectAreaLights.value=e.state.rectArea,c.pointLights.value=e.state.point,c.hemisphereLights.value=e.state.hemi,c.directionalShadowMap.value=e.state.directionalShadowMap,c.directionalShadowMatrix.value=e.state.directionalShadowMatrix,c.spotShadowMap.value=
|
|
|
+e.state.spotShadowMap,c.spotShadowMatrix.value=e.state.spotShadowMatrix,c.pointShadowMap.value=e.state.pointShadowMap,c.pointShadowMatrix.value=e.state.pointShadowMatrix);a=d.program.getUniforms();a=Db.seqWithValue(a.seq,c);d.uniformsList=a}function h(a,b,c,d){ea.resetTextureUnits();var e=b.fog,f=c.isMeshStandardMaterial?b.environment:null,g=W.get(c),k=F.state.lights;qa&&(lg||a!==Z)&&Ta.setState(c.clippingPlanes,c.clipIntersection,c.clipShadows,a,g,a===Z&&c.id===Ne);c.version===g.__version&&(void 0===
|
|
|
+g.program?c.needsUpdate=!0:c.fog&&g.fog!==e?c.needsUpdate=!0:g.environment!==f?c.needsUpdate=!0:g.needsLights&&g.lightsStateVersion!==k.state.version?c.needsUpdate=!0:void 0===g.numClippingPlanes||g.numClippingPlanes===Ta.numPlanes&&g.numIntersection===Ta.numIntersection?g.outputEncoding!==z.outputEncoding&&(c.needsUpdate=!0):c.needsUpdate=!0);c.version!==g.__version&&(p(c,b,d),g.__version=c.version);var l=!1,m=!1,x=!1;b=g.program;k=b.getUniforms();var h=g.uniforms;aa.useProgram(b.program)&&(x=m=
|
|
|
+l=!0);c.id!==Ne&&(Ne=c.id,m=!0);if(l||Z!==a){0<b.numMultiviewViews?va.updateCameraProjectionMatricesUniform(a,k):k.setValue(I,"projectionMatrix",a.projectionMatrix);Ha.logarithmicDepthBuffer&&k.setValue(I,"logDepthBufFC",2/(Math.log(a.far+1)/Math.LN2));Z!==a&&(Z=a,x=m=!0);if(c.isShaderMaterial||c.isMeshPhongMaterial||c.isMeshToonMaterial||c.isMeshStandardMaterial||c.envMap)l=k.map.cameraPosition,void 0!==l&&l.setValue(I,Gb.setFromMatrixPosition(a.matrixWorld));(c.isMeshPhongMaterial||c.isMeshToonMaterial||
|
|
|
+c.isMeshLambertMaterial||c.isMeshBasicMaterial||c.isMeshStandardMaterial||c.isShaderMaterial)&&k.setValue(I,"isOrthographic",!0===a.isOrthographicCamera);if(c.isMeshPhongMaterial||c.isMeshToonMaterial||c.isMeshLambertMaterial||c.isMeshBasicMaterial||c.isMeshStandardMaterial||c.isShaderMaterial||c.skinning)0<b.numMultiviewViews?va.updateCameraViewMatricesUniform(a,k):k.setValue(I,"viewMatrix",a.matrixWorldInverse)}if(c.skinning&&(k.setOptional(I,d,"bindMatrix"),k.setOptional(I,d,"bindMatrixInverse"),
|
|
|
+l=d.skeleton)){var q=l.bones;if(Ha.floatVertexTextures){if(void 0===l.boneTexture){q=Math.sqrt(4*q.length);q=L.ceilPowerOfTwo(q);q=Math.max(q,4);var n=new Float32Array(q*q*4);n.set(l.boneMatrices);var u=new $b(n,q,q,1023,1015);l.boneMatrices=n;l.boneTexture=u;l.boneTextureSize=q}k.setValue(I,"boneTexture",l.boneTexture,ea);k.setValue(I,"boneTextureSize",l.boneTextureSize)}else k.setOptional(I,l,"boneMatrices")}if(m||g.receiveShadow!==d.receiveShadow)g.receiveShadow=d.receiveShadow,k.setValue(I,"receiveShadow",
|
|
|
+d.receiveShadow);if(m){k.setValue(I,"toneMappingExposure",z.toneMappingExposure);k.setValue(I,"toneMappingWhitePoint",z.toneMappingWhitePoint);g.needsLights&&(m=x,h.ambientLightColor.needsUpdate=m,h.lightProbe.needsUpdate=m,h.directionalLights.needsUpdate=m,h.pointLights.needsUpdate=m,h.spotLights.needsUpdate=m,h.rectAreaLights.needsUpdate=m,h.hemisphereLights.needsUpdate=m);e&&c.fog&&(h.fogColor.value.copy(e.color),e.isFog?(h.fogNear.value=e.near,h.fogFar.value=e.far):e.isFogExp2&&(h.fogDensity.value=
|
|
|
+e.density));if(c.isMeshBasicMaterial)t(h,c);else if(c.isMeshLambertMaterial)t(h,c),c.emissiveMap&&(h.emissiveMap.value=c.emissiveMap);else if(c.isMeshToonMaterial)t(h,c),h.specular.value.copy(c.specular),h.shininess.value=Math.max(c.shininess,1E-4),c.gradientMap&&(h.gradientMap.value=c.gradientMap),c.emissiveMap&&(h.emissiveMap.value=c.emissiveMap),c.bumpMap&&(h.bumpMap.value=c.bumpMap,h.bumpScale.value=c.bumpScale,1===c.side&&(h.bumpScale.value*=-1)),c.normalMap&&(h.normalMap.value=c.normalMap,h.normalScale.value.copy(c.normalScale),
|
|
|
+1===c.side&&h.normalScale.value.negate()),c.displacementMap&&(h.displacementMap.value=c.displacementMap,h.displacementScale.value=c.displacementScale,h.displacementBias.value=c.displacementBias);else if(c.isMeshPhongMaterial)t(h,c),h.specular.value.copy(c.specular),h.shininess.value=Math.max(c.shininess,1E-4),c.emissiveMap&&(h.emissiveMap.value=c.emissiveMap),c.bumpMap&&(h.bumpMap.value=c.bumpMap,h.bumpScale.value=c.bumpScale,1===c.side&&(h.bumpScale.value*=-1)),c.normalMap&&(h.normalMap.value=c.normalMap,
|
|
|
+h.normalScale.value.copy(c.normalScale),1===c.side&&h.normalScale.value.negate()),c.displacementMap&&(h.displacementMap.value=c.displacementMap,h.displacementScale.value=c.displacementScale,h.displacementBias.value=c.displacementBias);else if(c.isMeshStandardMaterial)t(h,c,f),c.isMeshPhysicalMaterial?(r(h,c,f),h.reflectivity.value=c.reflectivity,h.clearcoat.value=c.clearcoat,h.clearcoatRoughness.value=c.clearcoatRoughness,c.sheen&&h.sheen.value.copy(c.sheen),c.clearcoatNormalMap&&(h.clearcoatNormalScale.value.copy(c.clearcoatNormalScale),
|
|
|
+h.clearcoatNormalMap.value=c.clearcoatNormalMap,1===c.side&&h.clearcoatNormalScale.value.negate()),h.transparency.value=c.transparency):r(h,c,f);else if(c.isMeshMatcapMaterial)t(h,c),c.matcap&&(h.matcap.value=c.matcap),c.bumpMap&&(h.bumpMap.value=c.bumpMap,h.bumpScale.value=c.bumpScale,1===c.side&&(h.bumpScale.value*=-1)),c.normalMap&&(h.normalMap.value=c.normalMap,h.normalScale.value.copy(c.normalScale),1===c.side&&h.normalScale.value.negate()),c.displacementMap&&(h.displacementMap.value=c.displacementMap,
|
|
|
+h.displacementScale.value=c.displacementScale,h.displacementBias.value=c.displacementBias);else if(c.isMeshDepthMaterial)t(h,c),c.displacementMap&&(h.displacementMap.value=c.displacementMap,h.displacementScale.value=c.displacementScale,h.displacementBias.value=c.displacementBias);else if(c.isMeshDistanceMaterial)t(h,c),c.displacementMap&&(h.displacementMap.value=c.displacementMap,h.displacementScale.value=c.displacementScale,h.displacementBias.value=c.displacementBias),h.referencePosition.value.copy(c.referencePosition),
|
|
|
+h.nearDistance.value=c.nearDistance,h.farDistance.value=c.farDistance;else if(c.isMeshNormalMaterial)t(h,c),c.bumpMap&&(h.bumpMap.value=c.bumpMap,h.bumpScale.value=c.bumpScale,1===c.side&&(h.bumpScale.value*=-1)),c.normalMap&&(h.normalMap.value=c.normalMap,h.normalScale.value.copy(c.normalScale),1===c.side&&h.normalScale.value.negate()),c.displacementMap&&(h.displacementMap.value=c.displacementMap,h.displacementScale.value=c.displacementScale,h.displacementBias.value=c.displacementBias);else if(c.isLineBasicMaterial)h.diffuse.value.copy(c.color),
|
|
|
+h.opacity.value=c.opacity,c.isLineDashedMaterial&&(h.dashSize.value=c.dashSize,h.totalSize.value=c.dashSize+c.gapSize,h.scale.value=c.scale);else if(c.isPointsMaterial){h.diffuse.value.copy(c.color);h.opacity.value=c.opacity;h.size.value=c.size*Q;h.scale.value=.5*J;c.map&&(h.map.value=c.map);c.alphaMap&&(h.alphaMap.value=c.alphaMap);if(c.map)var y=c.map;else c.alphaMap&&(y=c.alphaMap);void 0!==y&&(!0===y.matrixAutoUpdate&&y.updateMatrix(),h.uvTransform.value.copy(y.matrix))}else if(c.isSpriteMaterial){h.diffuse.value.copy(c.color);
|
|
|
+h.opacity.value=c.opacity;h.rotation.value=c.rotation;c.map&&(h.map.value=c.map);c.alphaMap&&(h.alphaMap.value=c.alphaMap);if(c.map)var w=c.map;else c.alphaMap&&(w=c.alphaMap);void 0!==w&&(!0===w.matrixAutoUpdate&&w.updateMatrix(),h.uvTransform.value.copy(w.matrix))}else c.isShadowMaterial&&(h.color.value.copy(c.color),h.opacity.value=c.opacity);void 0!==h.ltc_1&&(h.ltc_1.value=C.LTC_1);void 0!==h.ltc_2&&(h.ltc_2.value=C.LTC_2);Db.upload(I,g.uniformsList,h,ea);c.isShaderMaterial&&(c.uniformsNeedUpdate=
|
|
|
+!1)}c.isShaderMaterial&&!0===c.uniformsNeedUpdate&&(Db.upload(I,g.uniformsList,h,ea),c.uniformsNeedUpdate=!1);c.isSpriteMaterial&&k.setValue(I,"center",d.center);0<b.numMultiviewViews?va.updateObjectMatricesUniforms(d,a,k):(k.setValue(I,"modelViewMatrix",d.modelViewMatrix),k.setValue(I,"normalMatrix",d.normalMatrix));k.setValue(I,"modelMatrix",d.matrixWorld);return b}function t(a,b,c){a.opacity.value=b.opacity;b.color&&a.diffuse.value.copy(b.color);b.emissive&&a.emissive.value.copy(b.emissive).multiplyScalar(b.emissiveIntensity);
|
|
|
+b.map&&(a.map.value=b.map);b.alphaMap&&(a.alphaMap.value=b.alphaMap);b.specularMap&&(a.specularMap.value=b.specularMap);if(c=b.envMap||c)a.envMap.value=c,a.flipEnvMap.value=c.isCubeTexture?-1:1,a.reflectivity.value=b.reflectivity,a.refractionRatio.value=b.refractionRatio,a.maxMipLevel.value=W.get(c).__maxMipLevel;b.lightMap&&(a.lightMap.value=b.lightMap,a.lightMapIntensity.value=b.lightMapIntensity);b.aoMap&&(a.aoMap.value=b.aoMap,a.aoMapIntensity.value=b.aoMapIntensity);if(b.map)var d=b.map;else b.specularMap?
|
|
|
+d=b.specularMap:b.displacementMap?d=b.displacementMap:b.normalMap?d=b.normalMap:b.bumpMap?d=b.bumpMap:b.roughnessMap?d=b.roughnessMap:b.metalnessMap?d=b.metalnessMap:b.alphaMap?d=b.alphaMap:b.emissiveMap&&(d=b.emissiveMap);void 0!==d&&(d.isWebGLRenderTarget&&(d=d.texture),!0===d.matrixAutoUpdate&&d.updateMatrix(),a.uvTransform.value.copy(d.matrix));if(b.aoMap)var e=b.aoMap;else b.lightMap&&(e=b.lightMap);void 0!==e&&(e.isWebGLRenderTarget&&(e=e.texture),!0===e.matrixAutoUpdate&&e.updateMatrix(),a.uv2Transform.value.copy(e.matrix))}
|
|
|
+function r(a,b,c){a.roughness.value=b.roughness;a.metalness.value=b.metalness;b.roughnessMap&&(a.roughnessMap.value=b.roughnessMap);b.metalnessMap&&(a.metalnessMap.value=b.metalnessMap);b.emissiveMap&&(a.emissiveMap.value=b.emissiveMap);b.bumpMap&&(a.bumpMap.value=b.bumpMap,a.bumpScale.value=b.bumpScale,1===b.side&&(a.bumpScale.value*=-1));b.normalMap&&(a.normalMap.value=b.normalMap,a.normalScale.value.copy(b.normalScale),1===b.side&&a.normalScale.value.negate());b.displacementMap&&(a.displacementMap.value=
|
|
|
+b.displacementMap,a.displacementScale.value=b.displacementScale,a.displacementBias.value=b.displacementBias);if(b.envMap||c)a.envMapIntensity.value=b.envMapIntensity}a=a||{};var u=void 0!==a.canvas?a.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),y=void 0!==a.context?a.context:null,w=void 0!==a.alpha?a.alpha:!1,E=void 0!==a.depth?a.depth:!0,S=void 0!==a.stencil?a.stencil:!0,V=void 0!==a.antialias?a.antialias:!1,A=void 0!==a.premultipliedAlpha?a.premultipliedAlpha:!0,za=void 0!==
|
|
|
+a.preserveDrawingBuffer?a.preserveDrawingBuffer:!1,D=void 0!==a.powerPreference?a.powerPreference:"default",G=void 0!==a.failIfMajorPerformanceCaveat?a.failIfMajorPerformanceCaveat:!1,B=null,F=null;this.domElement=u;this.debug={checkShaderErrors:!0};this.sortObjects=this.autoClearStencil=this.autoClearDepth=this.autoClearColor=this.autoClear=!0;this.clippingPlanes=[];this.localClippingEnabled=!1;this.gammaFactor=2;this.outputEncoding=3E3;this.physicallyCorrectLights=!1;this.toneMappingWhitePoint=
|
|
|
+this.toneMappingExposure=this.toneMapping=1;this.maxMorphTargets=8;this.maxMorphNormals=4;var z=this,H=!1,K=null,M=0,N=0,O=null,Y=null,Ne=-1;var fa=b=null;var ha=!1;var Z=null,ca=null,X=new ia,T=new ia,da=null,U=u.width,J=u.height,Q=1,ka=null,ma=null,R=new ia(0,0,U,J),ja=new ia(0,0,U,J),jg=!1,kg=new Fd,Ta=new vj,qa=!1,lg=!1,Ld=new P,Gb=new n;try{w={alpha:w,depth:E,stencil:S,antialias:V,premultipliedAlpha:A,preserveDrawingBuffer:za,powerPreference:D,failIfMajorPerformanceCaveat:G,xrCompatible:!0};
|
|
|
+u.addEventListener("webglcontextlost",d,!1);u.addEventListener("webglcontextrestored",e,!1);var I=y||u.getContext("webgl",w)||u.getContext("experimental-webgl",w);if(null===I){if(null!==u.getContext("webgl"))throw Error("Error creating WebGL context with your selected attributes.");throw Error("Error creating WebGL context.");}void 0===I.getShaderPrecisionFormat&&(I.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(Xh){throw console.error("THREE.WebGLRenderer: "+
|
|
|
+Xh.message),Xh;}var sa,Ha,aa,ba,W,ea,na,ya,ta,ua,xa,wa,oa,Aa,Ba,Da,pa;c();var la=new Wh(z,I);this.xr=la;var va=new Fk(z,I),Fa=new Th(z,ta,Ha.maxTextureSize);this.shadowMap=Fa;this.getContext=function(){return I};this.getContextAttributes=function(){return I.getContextAttributes()};this.forceContextLoss=function(){var a=sa.get("WEBGL_lose_context");a&&a.loseContext()};this.forceContextRestore=function(){var a=sa.get("WEBGL_lose_context");a&&a.restoreContext()};this.getPixelRatio=function(){return Q};
|
|
|
+this.setPixelRatio=function(a){void 0!==a&&(Q=a,this.setSize(U,J,!1))};this.getSize=function(a){void 0===a&&(console.warn("WebGLRenderer: .getsize() now requires a Vector2 as an argument"),a=new v);return a.set(U,J)};this.setSize=function(a,b,c){la.isPresenting?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(U=a,J=b,u.width=Math.floor(a*Q),u.height=Math.floor(b*Q),!1!==c&&(u.style.width=a+"px",u.style.height=b+"px"),this.setViewport(0,0,a,b))};this.getDrawingBufferSize=
|
|
|
+function(a){void 0===a&&(console.warn("WebGLRenderer: .getdrawingBufferSize() now requires a Vector2 as an argument"),a=new v);return a.set(U*Q,J*Q).floor()};this.setDrawingBufferSize=function(a,b,c){U=a;J=b;Q=c;u.width=Math.floor(a*c);u.height=Math.floor(b*c);this.setViewport(0,0,a,b)};this.getCurrentViewport=function(a){void 0===a&&(console.warn("WebGLRenderer: .getCurrentViewport() now requires a Vector4 as an argument"),a=new ia);return a.copy(X)};this.getViewport=function(a){return a.copy(R)};
|
|
|
+this.setViewport=function(a,b,c,d){a.isVector4?R.set(a.x,a.y,a.z,a.w):R.set(a,b,c,d);aa.viewport(X.copy(R).multiplyScalar(Q).floor())};this.getScissor=function(a){return a.copy(ja)};this.setScissor=function(a,b,c,d){a.isVector4?ja.set(a.x,a.y,a.z,a.w):ja.set(a,b,c,d);aa.scissor(T.copy(ja).multiplyScalar(Q).floor())};this.getScissorTest=function(){return jg};this.setScissorTest=function(a){aa.setScissorTest(jg=a)};this.setOpaqueSort=function(a){ka=a};this.setTransparentSort=function(a){ma=a};this.getClearColor=
|
|
|
+function(){return oa.getClearColor()};this.setClearColor=function(){oa.setClearColor.apply(oa,arguments)};this.getClearAlpha=function(){return oa.getClearAlpha()};this.setClearAlpha=function(){oa.setClearAlpha.apply(oa,arguments)};this.clear=function(a,b,c){var d=0;if(void 0===a||a)d|=16384;if(void 0===b||b)d|=256;if(void 0===c||c)d|=1024;I.clear(d)};this.clearColor=function(){this.clear(!0,!1,!1)};this.clearDepth=function(){this.clear(!1,!0,!1)};this.clearStencil=function(){this.clear(!1,!1,!0)};
|
|
|
+this.dispose=function(){u.removeEventListener("webglcontextlost",d,!1);u.removeEventListener("webglcontextrestored",e,!1);xa.dispose();wa.dispose();W.dispose();ta.dispose();la.dispose();Ca.stop()};this.renderBufferImmediate=function(a,b){aa.initAttributes();var c=W.get(a);a.hasPositions&&!c.position&&(c.position=I.createBuffer());a.hasNormals&&!c.normal&&(c.normal=I.createBuffer());a.hasUvs&&!c.uv&&(c.uv=I.createBuffer());a.hasColors&&!c.color&&(c.color=I.createBuffer());b=b.getAttributes();a.hasPositions&&
|
|
|
+(I.bindBuffer(34962,c.position),I.bufferData(34962,a.positionArray,35048),aa.enableAttribute(b.position),I.vertexAttribPointer(b.position,3,5126,!1,0,0));a.hasNormals&&(I.bindBuffer(34962,c.normal),I.bufferData(34962,a.normalArray,35048),aa.enableAttribute(b.normal),I.vertexAttribPointer(b.normal,3,5126,!1,0,0));a.hasUvs&&(I.bindBuffer(34962,c.uv),I.bufferData(34962,a.uvArray,35048),aa.enableAttribute(b.uv),I.vertexAttribPointer(b.uv,2,5126,!1,0,0));a.hasColors&&(I.bindBuffer(34962,c.color),I.bufferData(34962,
|
|
|
+a.colorArray,35048),aa.enableAttribute(b.color),I.vertexAttribPointer(b.color,3,5126,!1,0,0));aa.disableUnusedAttributes();I.drawArrays(4,0,a.count);a.count=0};var Ga=new nb;this.renderBufferDirect=function(a,c,d,e,f,g){null===c&&(c=Ga);var k=f.isMesh&&0>f.matrixWorld.determinant(),l=h(a,c,e,f);aa.setMaterial(e,k);var m=!1;if(b!==d.id||fa!==l.id||ha!==(!0===e.wireframe))b=d.id,fa=l.id,ha=!0===e.wireframe,m=!0;if(e.morphTargets||e.morphNormals)Aa.update(f,d,e,l),m=!0;a=d.index;c=d.attributes.position;
|
|
|
+if(null===a){if(void 0===c||0===c.count)return}else if(0===a.count)return;var p=1;!0===e.wireframe&&(a=ya.getWireframeAttribute(d),p=2);k=Ba;if(null!==a){var x=na.get(a);k=Da;k.setIndex(x)}if(m){if(!1!==Ha.isWebGL2||!f.isInstancedMesh&&!d.isInstancedBufferGeometry||null!==sa.get("ANGLE_instanced_arrays")){aa.initAttributes();m=d.attributes;l=l.getAttributes();var q=e.defaultAttributeValues;for(S in l){var r=l[S];if(0<=r){var t=m[S];if(void 0!==t){var n=t.normalized,u=t.itemSize,y=na.get(t);if(void 0!==
|
|
|
+y){var w=y.buffer,A=y.type;y=y.bytesPerElement;if(t.isInterleavedBufferAttribute){var E=t.data,v=E.stride;t=t.offset;E&&E.isInstancedInterleavedBuffer?(aa.enableAttributeAndDivisor(r,E.meshPerAttribute),void 0===d.maxInstancedCount&&(d.maxInstancedCount=E.meshPerAttribute*E.count)):aa.enableAttribute(r);I.bindBuffer(34962,w);I.vertexAttribPointer(r,u,A,n,v*y,t*y)}else t.isInstancedBufferAttribute?(aa.enableAttributeAndDivisor(r,t.meshPerAttribute),void 0===d.maxInstancedCount&&(d.maxInstancedCount=
|
|
|
+t.meshPerAttribute*t.count)):aa.enableAttribute(r),I.bindBuffer(34962,w),I.vertexAttribPointer(r,u,A,n,0,0)}}else if("instanceMatrix"===S)y=na.get(f.instanceMatrix),void 0!==y&&(w=y.buffer,A=y.type,aa.enableAttributeAndDivisor(r+0,1),aa.enableAttributeAndDivisor(r+1,1),aa.enableAttributeAndDivisor(r+2,1),aa.enableAttributeAndDivisor(r+3,1),I.bindBuffer(34962,w),I.vertexAttribPointer(r+0,4,A,!1,64,0),I.vertexAttribPointer(r+1,4,A,!1,64,16),I.vertexAttribPointer(r+2,4,A,!1,64,32),I.vertexAttribPointer(r+
|
|
|
+3,4,A,!1,64,48));else if(void 0!==q&&(n=q[S],void 0!==n))switch(n.length){case 2:I.vertexAttrib2fv(r,n);break;case 3:I.vertexAttrib3fv(r,n);break;case 4:I.vertexAttrib4fv(r,n);break;default:I.vertexAttrib1fv(r,n)}}}aa.disableUnusedAttributes()}null!==a&&I.bindBuffer(34963,x.buffer)}var S=d.drawRange.start*p;m=null!==g?g.start*p:0;x=Math.max(S,m);g=Math.max(0,Math.min(null!==a?a.count:c.count,S+d.drawRange.count*p,m+(null!==g?g.count*p:Infinity))-1-x+1);0!==g&&(f.isMesh?!0===e.wireframe?(aa.setLineWidth(e.wireframeLinewidth*
|
|
|
+(null===O?Q:1)),k.setMode(1)):k.setMode(4):f.isLine?(e=e.linewidth,void 0===e&&(e=1),aa.setLineWidth(e*(null===O?Q:1)),f.isLineSegments?k.setMode(1):f.isLineLoop?k.setMode(2):k.setMode(3)):f.isPoints?k.setMode(0):f.isSprite&&k.setMode(4),f.isInstancedMesh?k.renderInstances(d,x,g,f.count):d.isInstancedBufferGeometry?k.renderInstances(d,x,g,d.maxInstancedCount):k.render(x,g))};this.compile=function(a,b){F=wa.get(a,b);F.init();a.traverse(function(a){a.isLight&&(F.pushLight(a),a.castShadow&&F.pushShadow(a))});
|
|
|
+F.setupLights(b);a.traverse(function(b){if(b.material)if(Array.isArray(b.material))for(var c=0;c<b.material.length;c++)p(b.material[c],a,b);else p(b.material,a,b)})};var Ea=null,Ca=new xh;Ca.setAnimationLoop(function(a){la.isPresenting||Ea&&Ea(a)});"undefined"!==typeof window&&Ca.setContext(window);this.setAnimationLoop=function(a){Ea=a;la.setAnimationLoop(a);Ca.start()};this.render=function(a,c,d,e){if(void 0!==d){console.warn("THREE.WebGLRenderer.render(): the renderTarget argument has been removed. Use .setRenderTarget() instead.");
|
|
|
+var f=d}if(void 0!==e){console.warn("THREE.WebGLRenderer.render(): the forceClear argument has been removed. Use .clear() instead.");var g=e}c&&c.isCamera?H||(fa=b=null,ha=!1,Ne=-1,Z=null,!0===a.autoUpdate&&a.updateMatrixWorld(),null===c.parent&&c.updateMatrixWorld(),la.enabled&&la.isPresenting&&(c=la.getCamera(c)),F=wa.get(a,c),F.init(),a.onBeforeRender(z,a,c,f||O),Ld.multiplyMatrices(c.projectionMatrix,c.matrixWorldInverse),kg.setFromMatrix(Ld),lg=this.localClippingEnabled,qa=Ta.init(this.clippingPlanes,
|
|
|
+lg,c),B=xa.get(a,c),B.init(),l(a,c,0,z.sortObjects),!0===z.sortObjects&&B.sort(ka,ma),qa&&Ta.beginShadows(),Fa.render(F.state.shadowsArray,a,c),F.setupLights(c),qa&&Ta.endShadows(),this.info.autoReset&&this.info.reset(),void 0!==f&&this.setRenderTarget(f),la.enabled&&va.isAvailable()&&va.attachCamera(c),oa.render(B,a,c,g),d=B.opaque,e=B.transparent,a.overrideMaterial?(f=a.overrideMaterial,d.length&&m(d,a,c,f),e.length&&m(e,a,c,f)):(d.length&&m(d,a,c),e.length&&m(e,a,c)),a.onAfterRender(z,a,c),null!==
|
|
|
+O&&(ea.updateRenderTargetMipmap(O),ea.updateMultisampleRenderTarget(O)),aa.buffers.depth.setTest(!0),aa.buffers.depth.setMask(!0),aa.buffers.color.setMask(!0),aa.setPolygonOffset(!1),la.enabled&&va.isAvailable()&&va.detachCamera(c),F=B=null):console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")};this.setFramebuffer=function(a){K!==a&&null===O&&I.bindFramebuffer(36160,a);K=a};this.getActiveCubeFace=function(){return M};this.getActiveMipmapLevel=function(){return N};
|
|
|
+this.getRenderTarget=function(){return O};this.setRenderTarget=function(a,b,c){O=a;M=b;N=c;a&&void 0===W.get(a).__webglFramebuffer&&ea.setupRenderTarget(a);var d=K,e=!1;a?(d=W.get(a).__webglFramebuffer,a.isWebGLCubeRenderTarget?(d=d[b||0],e=!0):d=a.isWebGLMultisampleRenderTarget?W.get(a).__webglMultisampledFramebuffer:d,X.copy(a.viewport),T.copy(a.scissor),da=a.scissorTest):(X.copy(R).multiplyScalar(Q).floor(),T.copy(ja).multiplyScalar(Q).floor(),da=jg);Y!==d&&(I.bindFramebuffer(36160,d),Y=d);aa.viewport(X);
|
|
|
+aa.scissor(T);aa.setScissorTest(da);e&&(a=W.get(a.texture),I.framebufferTexture2D(36160,36064,34069+(b||0),a.__webglTexture,c||0))};this.readRenderTargetPixels=function(a,b,c,d,e,f,g){if(a&&a.isWebGLRenderTarget){var k=W.get(a).__webglFramebuffer;a.isWebGLCubeRenderTarget&&void 0!==g&&(k=k[g]);if(k){g=!1;k!==Y&&(I.bindFramebuffer(36160,k),g=!0);try{var l=a.texture,m=l.format,h=l.type;1023!==m&&pa.convert(m)!==I.getParameter(35739)?console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format."):
|
|
|
+1009===h||pa.convert(h)===I.getParameter(35738)||1015===h&&(Ha.isWebGL2||sa.get("OES_texture_float")||sa.get("WEBGL_color_buffer_float"))||1016===h&&(Ha.isWebGL2?sa.get("EXT_color_buffer_float"):sa.get("EXT_color_buffer_half_float"))?36053===I.checkFramebufferStatus(36160)?0<=b&&b<=a.width-d&&0<=c&&c<=a.height-e&&I.readPixels(b,c,d,e,pa.convert(m),pa.convert(h),f):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete."):console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.")}finally{g&&
|
|
|
+I.bindFramebuffer(36160,Y)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")};this.copyFramebufferToTexture=function(a,b,c){void 0===c&&(c=0);var d=Math.pow(2,-c),e=Math.floor(b.image.width*d);d=Math.floor(b.image.height*d);var f=pa.convert(b.format);ea.setTexture2D(b,0);I.copyTexImage2D(3553,c,f,a.x,a.y,e,d,0);aa.unbindTexture()};this.copyTextureToTexture=function(a,b,c,d){var e=b.image.width,f=b.image.height,g=pa.convert(c.format),k=
|
|
|
+pa.convert(c.type);ea.setTexture2D(c,0);b.isDataTexture?I.texSubImage2D(3553,d||0,a.x,a.y,e,f,g,k,b.image.data):I.texSubImage2D(3553,d||0,a.x,a.y,g,k,b.image);aa.unbindTexture()};this.initTexture=function(a){ea.setTexture2D(a,0);aa.unbindTexture()};"undefined"!==typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}function Pe(a,b){this.name="";this.color=new B(a);this.density=void 0!==b?b:2.5E-4}function Qe(a,b,c){this.name="";this.color=new B(a);this.near=
|
|
|
+void 0!==b?b:1;this.far=void 0!==c?c:1E3}function qb(a,b){this.array=a;this.stride=b;this.count=void 0!==a?a.length/b:0;this.usage=35044;this.updateRange={offset:0,count:-1};this.version=0}function Od(a,b,c,d){this.data=a;this.itemSize=b;this.offset=c;this.normalized=!0===d}function Hb(a){K.call(this);this.type="SpriteMaterial";this.color=new B(16777215);this.alphaMap=this.map=null;this.rotation=0;this.transparent=this.sizeAttenuation=!0;this.setValues(a)}function Pd(a){G.call(this);this.type="Sprite";
|
|
|
+if(void 0===Jc){Jc=new z;var b=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]);b=new qb(b,5);Jc.setIndex([0,1,2,0,2,3]);Jc.setAttribute("position",new Od(b,3,0,!1));Jc.setAttribute("uv",new Od(b,2,3,!1))}this.geometry=Jc;this.material=void 0!==a?a:new Hb;this.center=new v(.5,.5)}function Re(a,b,c,d,e,f){Kc.subVectors(a,c).addScalar(.5).multiply(d);void 0!==e?(Qd.x=f*Kc.x-e*Kc.y,Qd.y=e*Kc.x+f*Kc.y):Qd.copy(Kc);a.copy(b);a.x+=Qd.x;a.y+=Qd.y;a.applyMatrix4(Yh)}function Rd(){G.call(this);
|
|
|
+this.type="LOD";Object.defineProperties(this,{levels:{enumerable:!0,value:[]}});this.autoUpdate=!0}function Sd(a,b){a&&a.isGeometry&&console.error("THREE.SkinnedMesh no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");U.call(this,a,b);this.type="SkinnedMesh";this.bindMode="attached";this.bindMatrix=new P;this.bindMatrixInverse=new P}function Se(a,b){a=a||[];this.bones=a.slice(0);this.boneMatrices=new Float32Array(16*this.bones.length);this.frame=-1;if(void 0===b)this.calculateInverses();
|
|
|
+else if(this.bones.length===b.length)this.boneInverses=b.slice(0);else for(console.warn("THREE.Skeleton boneInverses is the wrong length."),this.boneInverses=[],a=0,b=this.bones.length;a<b;a++)this.boneInverses.push(new P)}function pg(){G.call(this);this.type="Bone"}function Te(a,b,c){U.call(this,a,b);this.instanceMatrix=new M(new Float32Array(16*c),16);this.count=c}function ka(a){K.call(this);this.type="LineBasicMaterial";this.color=new B(16777215);this.linewidth=1;this.linejoin=this.linecap="round";
|
|
|
+this.setValues(a)}function Ja(a,b,c){1===c&&console.error("THREE.Line: parameter THREE.LinePieces no longer supported. Use THREE.LineSegments instead.");G.call(this);this.type="Line";this.geometry=void 0!==a?a:new z;this.material=void 0!==b?b:new ka}function ma(a,b){Ja.call(this,a,b);this.type="LineSegments"}function Ue(a,b){Ja.call(this,a,b);this.type="LineLoop"}function Ua(a){K.call(this);this.type="PointsMaterial";this.color=new B(16777215);this.alphaMap=this.map=null;this.size=1;this.sizeAttenuation=
|
|
|
+!0;this.morphTargets=!1;this.setValues(a)}function Lc(a,b){G.call(this);this.type="Points";this.geometry=void 0!==a?a:new z;this.material=void 0!==b?b:new Ua;this.updateMorphTargets()}function qg(a,b,c,d,e,f,g){var k=rg.distanceSqToPoint(a);k<c&&(c=new n,rg.closestPointToPoint(a,c),c.applyMatrix4(d),a=e.ray.origin.distanceTo(c),a<e.near||a>e.far||f.push({distance:a,distanceToRay:Math.sqrt(k),point:c,index:b,face:null,object:g}))}function sg(a,b,c,d,e,f,g,k,l){ca.call(this,a,b,c,d,e,f,g,k,l);this.format=
|
|
|
+void 0!==g?g:1022;this.minFilter=void 0!==f?f:1006;this.magFilter=void 0!==e?e:1006;this.generateMipmaps=!1}function Mc(a,b,c,d,e,f,g,k,l,m,h,p){ca.call(this,null,f,g,k,l,m,d,e,h,p);this.image={width:b,height:c};this.mipmaps=a;this.generateMipmaps=this.flipY=!1}function Td(a,b,c,d,e,f,g,k,l){ca.call(this,a,b,c,d,e,f,g,k,l);this.needsUpdate=!0}function Ud(a,b,c,d,e,f,g,k,l,m){m=void 0!==m?m:1026;if(1026!==m&&1027!==m)throw Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");
|
|
|
+void 0===c&&1026===m&&(c=1012);void 0===c&&1027===m&&(c=1020);ca.call(this,null,d,e,f,g,k,m,c,l);this.image={width:a,height:b};this.magFilter=void 0!==g?g:1003;this.minFilter=void 0!==k?k:1003;this.generateMipmaps=this.flipY=!1}function Nc(a){z.call(this);this.type="WireframeGeometry";var b=[],c,d,e,f=[0,0],g={},k=["a","b","c"];if(a&&a.isGeometry){var l=a.faces;var m=0;for(d=l.length;m<d;m++){var h=l[m];for(c=0;3>c;c++){var p=h[k[c]];var q=h[k[(c+1)%3]];f[0]=Math.min(p,q);f[1]=Math.max(p,q);p=f[0]+
|
|
|
+","+f[1];void 0===g[p]&&(g[p]={index1:f[0],index2:f[1]})}}for(p in g)m=g[p],k=a.vertices[m.index1],b.push(k.x,k.y,k.z),k=a.vertices[m.index2],b.push(k.x,k.y,k.z)}else if(a&&a.isBufferGeometry)if(k=new n,null!==a.index){l=a.attributes.position;h=a.index;var t=a.groups;0===t.length&&(t=[{start:0,count:h.count,materialIndex:0}]);a=0;for(e=t.length;a<e;++a)for(m=t[a],c=m.start,d=m.count,m=c,d=c+d;m<d;m+=3)for(c=0;3>c;c++)p=h.getX(m+c),q=h.getX(m+(c+1)%3),f[0]=Math.min(p,q),f[1]=Math.max(p,q),p=f[0]+","+
|
|
|
+f[1],void 0===g[p]&&(g[p]={index1:f[0],index2:f[1]});for(p in g)m=g[p],k.fromBufferAttribute(l,m.index1),b.push(k.x,k.y,k.z),k.fromBufferAttribute(l,m.index2),b.push(k.x,k.y,k.z)}else for(l=a.attributes.position,m=0,d=l.count/3;m<d;m++)for(c=0;3>c;c++)g=3*m+c,k.fromBufferAttribute(l,g),b.push(k.x,k.y,k.z),g=3*m+(c+1)%3,k.fromBufferAttribute(l,g),b.push(k.x,k.y,k.z);this.setAttribute("position",new D(b,3))}function Vd(a,b,c){N.call(this);this.type="ParametricGeometry";this.parameters={func:a,slices:b,
|
|
|
+stacks:c};this.fromBufferGeometry(new Oc(a,b,c));this.mergeVertices()}function Oc(a,b,c){z.call(this);this.type="ParametricBufferGeometry";this.parameters={func:a,slices:b,stacks:c};var d=[],e=[],f=[],g=[],k=new n,l=new n,m=new n,h=new n,p=new n,q,t;3>a.length&&console.error("THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter.");var r=b+1;for(q=0;q<=c;q++){var u=q/c;for(t=0;t<=b;t++){var y=t/b;a(y,u,l);e.push(l.x,l.y,l.z);0<=y-1E-5?(a(y-1E-5,u,m),h.subVectors(l,m)):(a(y+
|
|
|
+1E-5,u,m),h.subVectors(m,l));0<=u-1E-5?(a(y,u-1E-5,m),p.subVectors(l,m)):(a(y,u+1E-5,m),p.subVectors(m,l));k.crossVectors(h,p).normalize();f.push(k.x,k.y,k.z);g.push(y,u)}}for(q=0;q<c;q++)for(t=0;t<b;t++)a=q*r+t+1,k=(q+1)*r+t+1,l=(q+1)*r+t,d.push(q*r+t,a,l),d.push(a,k,l);this.setIndex(d);this.setAttribute("position",new D(e,3));this.setAttribute("normal",new D(f,3));this.setAttribute("uv",new D(g,2))}function Wd(a,b,c,d){N.call(this);this.type="PolyhedronGeometry";this.parameters={vertices:a,indices:b,
|
|
|
+radius:c,detail:d};this.fromBufferGeometry(new Ga(a,b,c,d));this.mergeVertices()}function Ga(a,b,c,d){function e(a){k.push(a.x,a.y,a.z)}function f(b,c){b*=3;c.x=a[b+0];c.y=a[b+1];c.z=a[b+2]}function g(a,b,c,d){0>d&&1===a.x&&(l[b]=a.x-1);0===c.x&&0===c.z&&(l[b]=d/2/Math.PI+.5)}z.call(this);this.type="PolyhedronBufferGeometry";this.parameters={vertices:a,indices:b,radius:c,detail:d};c=c||1;d=d||0;var k=[],l=[];(function(a){for(var c=new n,d=new n,g=new n,k=0;k<b.length;k+=3){f(b[k+0],c);f(b[k+1],d);
|
|
|
+f(b[k+2],g);var l,m,h=c,w=d,E=g,v=Math.pow(2,a),V=[];for(m=0;m<=v;m++){V[m]=[];var A=h.clone().lerp(E,m/v),z=w.clone().lerp(E,m/v),B=v-m;for(l=0;l<=B;l++)V[m][l]=0===l&&m===v?A:A.clone().lerp(z,l/B)}for(m=0;m<v;m++)for(l=0;l<2*(v-m)-1;l++)h=Math.floor(l/2),0===l%2?(e(V[m][h+1]),e(V[m+1][h]),e(V[m][h])):(e(V[m][h+1]),e(V[m+1][h+1]),e(V[m+1][h]))}})(d);(function(a){for(var b=new n,c=0;c<k.length;c+=3)b.x=k[c+0],b.y=k[c+1],b.z=k[c+2],b.normalize().multiplyScalar(a),k[c+0]=b.x,k[c+1]=b.y,k[c+2]=b.z})(c);
|
|
|
+(function(){for(var a=new n,b=0;b<k.length;b+=3)a.x=k[b+0],a.y=k[b+1],a.z=k[b+2],l.push(Math.atan2(a.z,-a.x)/2/Math.PI+.5,1-(Math.atan2(-a.y,Math.sqrt(a.x*a.x+a.z*a.z))/Math.PI+.5));a=new n;b=new n;for(var c=new n,d=new n,e=new v,f=new v,h=new v,y=0,w=0;y<k.length;y+=9,w+=6){a.set(k[y+0],k[y+1],k[y+2]);b.set(k[y+3],k[y+4],k[y+5]);c.set(k[y+6],k[y+7],k[y+8]);e.set(l[w+0],l[w+1]);f.set(l[w+2],l[w+3]);h.set(l[w+4],l[w+5]);d.copy(a).add(b).add(c).divideScalar(3);var E=Math.atan2(d.z,-d.x);g(e,w+0,a,E);
|
|
|
+g(f,w+2,b,E);g(h,w+4,c,E)}for(a=0;a<l.length;a+=6)b=l[a+0],c=l[a+2],d=l[a+4],e=Math.min(b,c,d),.9<Math.max(b,c,d)&&.1>e&&(.2>b&&(l[a+0]+=1),.2>c&&(l[a+2]+=1),.2>d&&(l[a+4]+=1))})();this.setAttribute("position",new D(k,3));this.setAttribute("normal",new D(k.slice(),3));this.setAttribute("uv",new D(l,2));0===d?this.computeVertexNormals():this.normalizeNormals()}function Xd(a,b){N.call(this);this.type="TetrahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Pc(a,b));this.mergeVertices()}
|
|
|
+function Pc(a,b){Ga.call(this,[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],a,b);this.type="TetrahedronBufferGeometry";this.parameters={radius:a,detail:b}}function Yd(a,b){N.call(this);this.type="OctahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new bc(a,b));this.mergeVertices()}function bc(a,b){Ga.call(this,[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],a,b);this.type="OctahedronBufferGeometry";this.parameters=
|
|
|
+{radius:a,detail:b}}function Zd(a,b){N.call(this);this.type="IcosahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Qc(a,b));this.mergeVertices()}function Qc(a,b){var c=(1+Math.sqrt(5))/2;Ga.call(this,[-1,c,0,1,c,0,-1,-c,0,1,-c,0,0,-1,c,0,1,c,0,-1,-c,0,1,-c,c,0,-1,c,0,1,-c,0,-1,-c,0,1],[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1],a,b);this.type="IcosahedronBufferGeometry";this.parameters=
|
|
|
+{radius:a,detail:b}}function $d(a,b){N.call(this);this.type="DodecahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Rc(a,b));this.mergeVertices()}function Rc(a,b){var c=(1+Math.sqrt(5))/2,d=1/c;Ga.call(this,[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-d,-c,0,-d,c,0,d,-c,0,d,c,-d,-c,0,-d,c,0,d,-c,0,d,c,0,-c,0,-d,c,0,-d,-c,0,d,c,0,d],[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,
|
|
|
+6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],a,b);this.type="DodecahedronBufferGeometry";this.parameters={radius:a,detail:b}}function ae(a,b,c,d,e,f){N.call(this);this.type="TubeGeometry";this.parameters={path:a,tubularSegments:b,radius:c,radialSegments:d,closed:e};void 0!==f&&console.warn("THREE.TubeGeometry: taper has been removed.");a=new cc(a,b,c,d,e);this.tangents=a.tangents;this.normals=
|
|
|
+a.normals;this.binormals=a.binormals;this.fromBufferGeometry(a);this.mergeVertices()}function cc(a,b,c,d,e){function f(e){h=a.getPointAt(e/b,h);var f=g.normals[e];e=g.binormals[e];for(q=0;q<=d;q++){var m=q/d*Math.PI*2,p=Math.sin(m);m=-Math.cos(m);l.x=m*f.x+p*e.x;l.y=m*f.y+p*e.y;l.z=m*f.z+p*e.z;l.normalize();r.push(l.x,l.y,l.z);k.x=h.x+c*l.x;k.y=h.y+c*l.y;k.z=h.z+c*l.z;t.push(k.x,k.y,k.z)}}z.call(this);this.type="TubeBufferGeometry";this.parameters={path:a,tubularSegments:b,radius:c,radialSegments:d,
|
|
|
+closed:e};b=b||64;c=c||1;d=d||8;e=e||!1;var g=a.computeFrenetFrames(b,e);this.tangents=g.tangents;this.normals=g.normals;this.binormals=g.binormals;var k=new n,l=new n,m=new v,h=new n,p,q,t=[],r=[],u=[],y=[];for(p=0;p<b;p++)f(p);f(!1===e?b:0);for(p=0;p<=b;p++)for(q=0;q<=d;q++)m.x=p/b,m.y=q/d,u.push(m.x,m.y);(function(){for(q=1;q<=b;q++)for(p=1;p<=d;p++){var a=(d+1)*q+(p-1),c=(d+1)*q+p,e=(d+1)*(q-1)+p;y.push((d+1)*(q-1)+(p-1),a,e);y.push(a,c,e)}})();this.setIndex(y);this.setAttribute("position",new D(t,
|
|
|
+3));this.setAttribute("normal",new D(r,3));this.setAttribute("uv",new D(u,2))}function be(a,b,c,d,e,f,g){N.call(this);this.type="TorusKnotGeometry";this.parameters={radius:a,tube:b,tubularSegments:c,radialSegments:d,p:e,q:f};void 0!==g&&console.warn("THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead.");this.fromBufferGeometry(new Sc(a,b,c,d,e,f));this.mergeVertices()}function Sc(a,b,c,d,e,f){function g(a,b,c,d,e){var f=Math.sin(a);b=c/b*a;c=Math.cos(b);e.x=d*
|
|
|
+(2+c)*.5*Math.cos(a);e.y=d*(2+c)*f*.5;e.z=d*Math.sin(b)*.5}z.call(this);this.type="TorusKnotBufferGeometry";this.parameters={radius:a,tube:b,tubularSegments:c,radialSegments:d,p:e,q:f};a=a||1;b=b||.4;c=Math.floor(c)||64;d=Math.floor(d)||8;e=e||2;f=f||3;var k=[],l=[],m=[],h=[],p,q=new n,t=new n,r=new n,u=new n,y=new n,w=new n,v=new n;for(p=0;p<=c;++p){var S=p/c*e*Math.PI*2;g(S,e,f,a,r);g(S+.01,e,f,a,u);w.subVectors(u,r);v.addVectors(u,r);y.crossVectors(w,v);v.crossVectors(y,w);y.normalize();v.normalize();
|
|
|
+for(S=0;S<=d;++S){var V=S/d*Math.PI*2,A=-b*Math.cos(V);V=b*Math.sin(V);q.x=r.x+(A*v.x+V*y.x);q.y=r.y+(A*v.y+V*y.y);q.z=r.z+(A*v.z+V*y.z);l.push(q.x,q.y,q.z);t.subVectors(q,r).normalize();m.push(t.x,t.y,t.z);h.push(p/c);h.push(S/d)}}for(S=1;S<=c;S++)for(p=1;p<=d;p++)a=(d+1)*S+(p-1),b=(d+1)*S+p,e=(d+1)*(S-1)+p,k.push((d+1)*(S-1)+(p-1),a,e),k.push(a,b,e);this.setIndex(k);this.setAttribute("position",new D(l,3));this.setAttribute("normal",new D(m,3));this.setAttribute("uv",new D(h,2))}function ce(a,b,
|
|
|
+c,d,e){N.call(this);this.type="TorusGeometry";this.parameters={radius:a,tube:b,radialSegments:c,tubularSegments:d,arc:e};this.fromBufferGeometry(new Tc(a,b,c,d,e));this.mergeVertices()}function Tc(a,b,c,d,e){z.call(this);this.type="TorusBufferGeometry";this.parameters={radius:a,tube:b,radialSegments:c,tubularSegments:d,arc:e};a=a||1;b=b||.4;c=Math.floor(c)||8;d=Math.floor(d)||6;e=e||2*Math.PI;var f=[],g=[],k=[],l=[],m=new n,h=new n,p=new n,q,t;for(q=0;q<=c;q++)for(t=0;t<=d;t++){var r=t/d*e,u=q/c*
|
|
|
+Math.PI*2;h.x=(a+b*Math.cos(u))*Math.cos(r);h.y=(a+b*Math.cos(u))*Math.sin(r);h.z=b*Math.sin(u);g.push(h.x,h.y,h.z);m.x=a*Math.cos(r);m.y=a*Math.sin(r);p.subVectors(h,m).normalize();k.push(p.x,p.y,p.z);l.push(t/d);l.push(q/c)}for(q=1;q<=c;q++)for(t=1;t<=d;t++)a=(d+1)*(q-1)+t-1,b=(d+1)*(q-1)+t,e=(d+1)*q+t,f.push((d+1)*q+t-1,a,e),f.push(a,b,e);this.setIndex(f);this.setAttribute("position",new D(g,3));this.setAttribute("normal",new D(k,3));this.setAttribute("uv",new D(l,2))}function Zh(a,b,c,d,e){for(var f,
|
|
|
+g=0,k=b,l=c-d;k<c;k+=d)g+=(a[l]-a[k])*(a[k+1]+a[l+1]),l=k;if(e===0<g)for(e=b;e<c;e+=d)f=$h(e,a[e],a[e+1],f);else for(e=c-d;e>=b;e-=d)f=$h(e,a[e],a[e+1],f);f&&dc(f,f.next)&&(de(f),f=f.next);return f}function ee(a,b){if(!a)return a;b||(b=a);do{var c=!1;if(a.steiner||!dc(a,a.next)&&0!==ta(a.prev,a,a.next))a=a.next;else{de(a);a=b=a.prev;if(a===a.next)break;c=!0}}while(c||a!==b);return b}function fe(a,b,c,d,e,f,g){if(a){if(!g&&f){var k=a,l=k;do null===l.z&&(l.z=tg(l.x,l.y,d,e,f)),l.prevZ=l.prev,l=l.nextZ=
|
|
|
+l.next;while(l!==k);l.prevZ.nextZ=null;l.prevZ=null;k=l;var m,h,p,q,t=1;do{l=k;var r=k=null;for(h=0;l;){h++;var n=l;for(m=p=0;m<t&&(p++,n=n.nextZ,n);m++);for(q=t;0<p||0<q&&n;)0!==p&&(0===q||!n||l.z<=n.z)?(m=l,l=l.nextZ,p--):(m=n,n=n.nextZ,q--),r?r.nextZ=m:k=m,m.prevZ=r,r=m;l=n}r.nextZ=null;t*=2}while(1<h)}for(k=a;a.prev!==a.next;){l=a.prev;n=a.next;if(f)r=Gk(a,d,e,f);else a:if(r=a,h=r.prev,p=r,t=r.next,0<=ta(h,p,t))r=!1;else{for(m=r.next.next;m!==r.prev;){if(Uc(h.x,h.y,p.x,p.y,t.x,t.y,m.x,m.y)&&0<=
|
|
|
+ta(m.prev,m,m.next)){r=!1;break a}m=m.next}r=!0}if(r)b.push(l.i/c),b.push(a.i/c),b.push(n.i/c),de(a),k=a=n.next;else if(a=n,a===k){if(!g)fe(ee(a),b,c,d,e,f,1);else if(1===g){g=b;k=c;l=a;do n=l.prev,r=l.next.next,!dc(n,r)&&ai(n,l,l.next,r)&&ge(n,r)&&ge(r,n)&&(g.push(n.i/k),g.push(l.i/k),g.push(r.i/k),de(l),de(l.next),l=a=r),l=l.next;while(l!==a);a=l;fe(a,b,c,d,e,f,2)}else if(2===g)a:{g=a;do{for(k=g.next.next;k!==g.prev;){if(l=g.i!==k.i){l=g;n=k;if(r=l.next.i!==n.i&&l.prev.i!==n.i){b:{r=l;do{if(r.i!==
|
|
|
+l.i&&r.next.i!==l.i&&r.i!==n.i&&r.next.i!==n.i&&ai(r,r.next,l,n)){r=!0;break b}r=r.next}while(r!==l);r=!1}r=!r}if(r=r&&ge(l,n)&&ge(n,l)){r=l;h=!1;p=(l.x+n.x)/2;n=(l.y+n.y)/2;do r.y>n!==r.next.y>n&&r.next.y!==r.y&&p<(r.next.x-r.x)*(n-r.y)/(r.next.y-r.y)+r.x&&(h=!h),r=r.next;while(r!==l);r=h}l=r}if(l){a=bi(g,k);g=ee(g,g.next);a=ee(a,a.next);fe(g,b,c,d,e,f);fe(a,b,c,d,e,f);break a}k=k.next}g=g.next}while(g!==a)}break}}}}function Gk(a,b,c,d){var e=a.prev,f=a.next;if(0<=ta(e,a,f))return!1;var g=e.x>a.x?
|
|
|
+e.x>f.x?e.x:f.x:a.x>f.x?a.x:f.x,k=e.y>a.y?e.y>f.y?e.y:f.y:a.y>f.y?a.y:f.y,l=tg(e.x<a.x?e.x<f.x?e.x:f.x:a.x<f.x?a.x:f.x,e.y<a.y?e.y<f.y?e.y:f.y:a.y<f.y?a.y:f.y,b,c,d);b=tg(g,k,b,c,d);c=a.prevZ;for(d=a.nextZ;c&&c.z>=l&&d&&d.z<=b;){if(c!==a.prev&&c!==a.next&&Uc(e.x,e.y,a.x,a.y,f.x,f.y,c.x,c.y)&&0<=ta(c.prev,c,c.next))return!1;c=c.prevZ;if(d!==a.prev&&d!==a.next&&Uc(e.x,e.y,a.x,a.y,f.x,f.y,d.x,d.y)&&0<=ta(d.prev,d,d.next))return!1;d=d.nextZ}for(;c&&c.z>=l;){if(c!==a.prev&&c!==a.next&&Uc(e.x,e.y,a.x,a.y,
|
|
|
+f.x,f.y,c.x,c.y)&&0<=ta(c.prev,c,c.next))return!1;c=c.prevZ}for(;d&&d.z<=b;){if(d!==a.prev&&d!==a.next&&Uc(e.x,e.y,a.x,a.y,f.x,f.y,d.x,d.y)&&0<=ta(d.prev,d,d.next))return!1;d=d.nextZ}return!0}function Hk(a,b){return a.x-b.x}function Ik(a,b){var c=b,d=a.x,e=a.y,f=-Infinity;do{if(e<=c.y&&e>=c.next.y&&c.next.y!==c.y){var g=c.x+(e-c.y)*(c.next.x-c.x)/(c.next.y-c.y);if(g<=d&&g>f){f=g;if(g===d){if(e===c.y)return c;if(e===c.next.y)return c.next}var k=c.x<c.next.x?c:c.next}}c=c.next}while(c!==b);if(!k)return null;
|
|
|
+if(d===f)return k.prev;b=k;g=k.x;var l=k.y,m=Infinity;for(c=k.next;c!==b;){if(d>=c.x&&c.x>=g&&d!==c.x&&Uc(e<l?d:f,e,g,l,e<l?f:d,e,c.x,c.y)){var h=Math.abs(e-c.y)/(d-c.x);(h<m||h===m&&c.x>k.x)&&ge(c,a)&&(k=c,m=h)}c=c.next}return k}function tg(a,b,c,d,e){a=32767*(a-c)*e;b=32767*(b-d)*e;a=(a|a<<8)&16711935;a=(a|a<<4)&252645135;a=(a|a<<2)&858993459;b=(b|b<<8)&16711935;b=(b|b<<4)&252645135;b=(b|b<<2)&858993459;return(a|a<<1)&1431655765|((b|b<<1)&1431655765)<<1}function Jk(a){var b=a,c=a;do{if(b.x<c.x||
|
|
|
+b.x===c.x&&b.y<c.y)c=b;b=b.next}while(b!==a);return c}function Uc(a,b,c,d,e,f,g,k){return 0<=(e-g)*(b-k)-(a-g)*(f-k)&&0<=(a-g)*(d-k)-(c-g)*(b-k)&&0<=(c-g)*(f-k)-(e-g)*(d-k)}function ta(a,b,c){return(b.y-a.y)*(c.x-b.x)-(b.x-a.x)*(c.y-b.y)}function dc(a,b){return a.x===b.x&&a.y===b.y}function ai(a,b,c,d){return dc(a,c)&&dc(b,d)||dc(a,d)&&dc(c,b)?!0:0<ta(a,b,c)!==0<ta(a,b,d)&&0<ta(c,d,a)!==0<ta(c,d,b)}function ge(a,b){return 0>ta(a.prev,a,a.next)?0<=ta(a,b,a.next)&&0<=ta(a,a.prev,b):0>ta(a,b,a.prev)||
|
|
|
+0>ta(a,a.next,b)}function bi(a,b){var c=new ug(a.i,a.x,a.y),d=new ug(b.i,b.x,b.y),e=a.next,f=b.prev;a.next=b;b.prev=a;c.next=e;e.prev=c;d.next=c;c.prev=d;f.next=d;d.prev=f;return d}function $h(a,b,c,d){a=new ug(a,b,c);d?(a.next=d.next,a.prev=d,d.next.prev=a,d.next=a):(a.prev=a,a.next=a);return a}function de(a){a.next.prev=a.prev;a.prev.next=a.next;a.prevZ&&(a.prevZ.nextZ=a.nextZ);a.nextZ&&(a.nextZ.prevZ=a.prevZ)}function ug(a,b,c){this.i=a;this.x=b;this.y=c;this.nextZ=this.prevZ=this.z=this.next=
|
|
|
+this.prev=null;this.steiner=!1}function ci(a){var b=a.length;2<b&&a[b-1].equals(a[0])&&a.pop()}function di(a,b){for(var c=0;c<b.length;c++)a.push(b[c].x),a.push(b[c].y)}function ec(a,b){N.call(this);this.type="ExtrudeGeometry";this.parameters={shapes:a,options:b};this.fromBufferGeometry(new eb(a,b));this.mergeVertices()}function eb(a,b){function c(a){function c(a,b,c){b||console.error("THREE.ExtrudeGeometry: vec does not exist");return b.clone().multiplyScalar(c).add(a)}function g(a,b,c){var d=a.x-
|
|
|
+b.x;var e=a.y-b.y;var f=c.x-a.x;var g=c.y-a.y,k=d*d+e*e;if(Math.abs(d*g-e*f)>Number.EPSILON){var l=Math.sqrt(k),m=Math.sqrt(f*f+g*g);k=b.x-e/l;b=b.y+d/l;g=((c.x-g/m-k)*g-(c.y+f/m-b)*f)/(d*g-e*f);f=k+d*g-a.x;d=b+e*g-a.y;e=f*f+d*d;if(2>=e)return new v(f,d);e=Math.sqrt(e/2)}else a=!1,d>Number.EPSILON?f>Number.EPSILON&&(a=!0):d<-Number.EPSILON?f<-Number.EPSILON&&(a=!0):Math.sign(e)===Math.sign(g)&&(a=!0),a?(f=-e,e=Math.sqrt(k)):(f=d,d=e,e=Math.sqrt(k/2));return new v(f/e,d/e)}function k(a,b){for(J=a.length;0<=
|
|
|
+--J;){var c=J;var f=J-1;0>f&&(f=a.length-1);var g,k=E+2*D;for(g=0;g<k;g++){var l=Y*g,m=Y*(g+1),h=b+f+l,p=b+f+m;m=b+c+m;r(b+c+l);r(h);r(m);r(h);r(p);r(m);l=e.length/3;l=F.generateSideWallUV(d,e,l-6,l-3,l-2,l-1);u(l[0]);u(l[1]);u(l[3]);u(l[1]);u(l[2]);u(l[3])}}}function l(a,b,c){y.push(a);y.push(b);y.push(c)}function h(a,b,c){r(a);r(b);r(c);a=e.length/3;a=F.generateTopUV(d,e,a-3,a-2,a-1);u(a[0]);u(a[1]);u(a[2])}function r(a){e.push(y[3*a]);e.push(y[3*a+1]);e.push(y[3*a+2])}function u(a){f.push(a.x);
|
|
|
+f.push(a.y)}var y=[],w=void 0!==b.curveSegments?b.curveSegments:12,E=void 0!==b.steps?b.steps:1,S=void 0!==b.depth?b.depth:100,V=void 0!==b.bevelEnabled?b.bevelEnabled:!0,A=void 0!==b.bevelThickness?b.bevelThickness:6,z=void 0!==b.bevelSize?b.bevelSize:A-2,B=void 0!==b.bevelOffset?b.bevelOffset:0,D=void 0!==b.bevelSegments?b.bevelSegments:3,C=b.extrudePath,F=void 0!==b.UVGenerator?b.UVGenerator:Kk;void 0!==b.amount&&(console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."),S=
|
|
|
+b.amount);var G=!1;if(C){var H=C.getSpacedPoints(E);G=!0;V=!1;var K=C.computeFrenetFrames(E,!1);var M=new n;var N=new n;var O=new n}V||(B=z=A=D=0);var L;w=a.extractPoints(w);a=w.shape;var P=w.holes;if(!rb.isClockWise(a)){a=a.reverse();var fa=0;for(L=P.length;fa<L;fa++){var ha=P[fa];rb.isClockWise(ha)&&(P[fa]=ha.reverse())}}var Z=rb.triangulateShape(a,P),W=a;fa=0;for(L=P.length;fa<L;fa++)ha=P[fa],a=a.concat(ha);var X,Y=a.length,T,ca=Z.length;w=[];var J=0;var Q=W.length;var U=Q-1;for(X=J+1;J<Q;J++,
|
|
|
+U++,X++)U===Q&&(U=0),X===Q&&(X=0),w[J]=g(W[J],W[U],W[X]);C=[];var ea=w.concat();fa=0;for(L=P.length;fa<L;fa++){ha=P[fa];var ba=[];J=0;Q=ha.length;U=Q-1;for(X=J+1;J<Q;J++,U++,X++)U===Q&&(U=0),X===Q&&(X=0),ba[J]=g(ha[J],ha[U],ha[X]);C.push(ba);ea=ea.concat(ba)}for(U=0;U<D;U++){Q=U/D;var da=A*Math.cos(Q*Math.PI/2);X=z*Math.sin(Q*Math.PI/2)+B;J=0;for(Q=W.length;J<Q;J++){var R=c(W[J],w[J],X);l(R.x,R.y,-da)}fa=0;for(L=P.length;fa<L;fa++)for(ha=P[fa],ba=C[fa],J=0,Q=ha.length;J<Q;J++)R=c(ha[J],ba[J],X),l(R.x,
|
|
|
+R.y,-da)}X=z+B;for(J=0;J<Y;J++)R=V?c(a[J],ea[J],X):a[J],G?(N.copy(K.normals[0]).multiplyScalar(R.x),M.copy(K.binormals[0]).multiplyScalar(R.y),O.copy(H[0]).add(N).add(M),l(O.x,O.y,O.z)):l(R.x,R.y,0);for(Q=1;Q<=E;Q++)for(J=0;J<Y;J++)R=V?c(a[J],ea[J],X):a[J],G?(N.copy(K.normals[Q]).multiplyScalar(R.x),M.copy(K.binormals[Q]).multiplyScalar(R.y),O.copy(H[Q]).add(N).add(M),l(O.x,O.y,O.z)):l(R.x,R.y,S/E*Q);for(U=D-1;0<=U;U--){Q=U/D;da=A*Math.cos(Q*Math.PI/2);X=z*Math.sin(Q*Math.PI/2)+B;J=0;for(Q=W.length;J<
|
|
|
+Q;J++)R=c(W[J],w[J],X),l(R.x,R.y,S+da);fa=0;for(L=P.length;fa<L;fa++)for(ha=P[fa],ba=C[fa],J=0,Q=ha.length;J<Q;J++)R=c(ha[J],ba[J],X),G?l(R.x,R.y+H[E-1].y,H[E-1].x+da):l(R.x,R.y,S+da)}(function(){var a=e.length/3;if(V){var b=0*Y;for(J=0;J<ca;J++)T=Z[J],h(T[2]+b,T[1]+b,T[0]+b);b=Y*(E+2*D);for(J=0;J<ca;J++)T=Z[J],h(T[0]+b,T[1]+b,T[2]+b)}else{for(J=0;J<ca;J++)T=Z[J],h(T[2],T[1],T[0]);for(J=0;J<ca;J++)T=Z[J],h(T[0]+Y*E,T[1]+Y*E,T[2]+Y*E)}d.addGroup(a,e.length/3-a,0)})();(function(){var a=e.length/3,b=
|
|
|
+0;k(W,b);b+=W.length;fa=0;for(L=P.length;fa<L;fa++)ha=P[fa],k(ha,b),b+=ha.length;d.addGroup(a,e.length/3-a,1)})()}z.call(this);this.type="ExtrudeBufferGeometry";this.parameters={shapes:a,options:b};a=Array.isArray(a)?a:[a];for(var d=this,e=[],f=[],g=0,k=a.length;g<k;g++)c(a[g]);this.setAttribute("position",new D(e,3));this.setAttribute("uv",new D(f,2));this.computeVertexNormals()}function ei(a,b,c){c.shapes=[];if(Array.isArray(a))for(var d=0,e=a.length;d<e;d++)c.shapes.push(a[d].uuid);else c.shapes.push(a.uuid);
|
|
|
+void 0!==b.extrudePath&&(c.options.extrudePath=b.extrudePath.toJSON());return c}function he(a,b){N.call(this);this.type="TextGeometry";this.parameters={text:a,parameters:b};this.fromBufferGeometry(new Vc(a,b));this.mergeVertices()}function Vc(a,b){b=b||{};var c=b.font;if(!c||!c.isFont)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new N;a=c.generateShapes(a,b.size);b.depth=void 0!==b.height?b.height:50;void 0===b.bevelThickness&&(b.bevelThickness=10);
|
|
|
+void 0===b.bevelSize&&(b.bevelSize=8);void 0===b.bevelEnabled&&(b.bevelEnabled=!1);eb.call(this,a,b);this.type="TextBufferGeometry"}function ie(a,b,c,d,e,f,g){N.call(this);this.type="SphereGeometry";this.parameters={radius:a,widthSegments:b,heightSegments:c,phiStart:d,phiLength:e,thetaStart:f,thetaLength:g};this.fromBufferGeometry(new fc(a,b,c,d,e,f,g));this.mergeVertices()}function fc(a,b,c,d,e,f,g){z.call(this);this.type="SphereBufferGeometry";this.parameters={radius:a,widthSegments:b,heightSegments:c,
|
|
|
+phiStart:d,phiLength:e,thetaStart:f,thetaLength:g};a=a||1;b=Math.max(3,Math.floor(b)||8);c=Math.max(2,Math.floor(c)||6);d=void 0!==d?d:0;e=void 0!==e?e:2*Math.PI;f=void 0!==f?f:0;g=void 0!==g?g:Math.PI;var k=Math.min(f+g,Math.PI),l,m,h=0,p=[],q=new n,t=new n,r=[],u=[],y=[],w=[];for(m=0;m<=c;m++){var v=[],S=m/c,V=0;0==m&&0==f?V=.5/b:m==c&&k==Math.PI&&(V=-.5/b);for(l=0;l<=b;l++){var A=l/b;q.x=-a*Math.cos(d+A*e)*Math.sin(f+S*g);q.y=a*Math.cos(f+S*g);q.z=a*Math.sin(d+A*e)*Math.sin(f+S*g);u.push(q.x,q.y,
|
|
|
+q.z);t.copy(q).normalize();y.push(t.x,t.y,t.z);w.push(A+V,1-S);v.push(h++)}p.push(v)}for(m=0;m<c;m++)for(l=0;l<b;l++)a=p[m][l+1],d=p[m][l],e=p[m+1][l],g=p[m+1][l+1],(0!==m||0<f)&&r.push(a,d,g),(m!==c-1||k<Math.PI)&&r.push(d,e,g);this.setIndex(r);this.setAttribute("position",new D(u,3));this.setAttribute("normal",new D(y,3));this.setAttribute("uv",new D(w,2))}function je(a,b,c,d,e,f){N.call(this);this.type="RingGeometry";this.parameters={innerRadius:a,outerRadius:b,thetaSegments:c,phiSegments:d,thetaStart:e,
|
|
|
+thetaLength:f};this.fromBufferGeometry(new Wc(a,b,c,d,e,f));this.mergeVertices()}function Wc(a,b,c,d,e,f){z.call(this);this.type="RingBufferGeometry";this.parameters={innerRadius:a,outerRadius:b,thetaSegments:c,phiSegments:d,thetaStart:e,thetaLength:f};a=a||.5;b=b||1;e=void 0!==e?e:0;f=void 0!==f?f:2*Math.PI;c=void 0!==c?Math.max(3,c):8;d=void 0!==d?Math.max(1,d):1;var g=[],k=[],l=[],m=[],h=a,p=(b-a)/d,q=new n,t=new v,r,u;for(r=0;r<=d;r++){for(u=0;u<=c;u++)a=e+u/c*f,q.x=h*Math.cos(a),q.y=h*Math.sin(a),
|
|
|
+k.push(q.x,q.y,q.z),l.push(0,0,1),t.x=(q.x/b+1)/2,t.y=(q.y/b+1)/2,m.push(t.x,t.y);h+=p}for(r=0;r<d;r++)for(b=r*(c+1),u=0;u<c;u++)a=u+b,e=a+c+1,f=a+c+2,h=a+1,g.push(a,e,h),g.push(e,f,h);this.setIndex(g);this.setAttribute("position",new D(k,3));this.setAttribute("normal",new D(l,3));this.setAttribute("uv",new D(m,2))}function ke(a,b,c,d){N.call(this);this.type="LatheGeometry";this.parameters={points:a,segments:b,phiStart:c,phiLength:d};this.fromBufferGeometry(new Xc(a,b,c,d));this.mergeVertices()}function Xc(a,
|
|
|
+b,c,d){z.call(this);this.type="LatheBufferGeometry";this.parameters={points:a,segments:b,phiStart:c,phiLength:d};b=Math.floor(b)||12;c=c||0;d=d||2*Math.PI;d=L.clamp(d,0,2*Math.PI);var e=[],f=[],g=[],k=1/b,l=new n,m=new v,h;for(h=0;h<=b;h++){var p=c+h*k*d;var q=Math.sin(p),t=Math.cos(p);for(p=0;p<=a.length-1;p++)l.x=a[p].x*q,l.y=a[p].y,l.z=a[p].x*t,f.push(l.x,l.y,l.z),m.x=h/b,m.y=p/(a.length-1),g.push(m.x,m.y)}for(h=0;h<b;h++)for(p=0;p<a.length-1;p++)c=p+h*a.length,k=c+a.length,l=c+a.length+1,m=c+
|
|
|
+1,e.push(c,k,m),e.push(k,l,m);this.setIndex(e);this.setAttribute("position",new D(f,3));this.setAttribute("uv",new D(g,2));this.computeVertexNormals();if(d===2*Math.PI)for(d=this.attributes.normal.array,e=new n,f=new n,g=new n,c=b*a.length*3,p=h=0;h<a.length;h++,p+=3)e.x=d[p+0],e.y=d[p+1],e.z=d[p+2],f.x=d[c+p+0],f.y=d[c+p+1],f.z=d[c+p+2],g.addVectors(e,f).normalize(),d[p+0]=d[c+p+0]=g.x,d[p+1]=d[c+p+1]=g.y,d[p+2]=d[c+p+2]=g.z}function gc(a,b){N.call(this);this.type="ShapeGeometry";"object"===typeof b&&
|
|
|
+(console.warn("THREE.ShapeGeometry: Options parameter has been removed."),b=b.curveSegments);this.parameters={shapes:a,curveSegments:b};this.fromBufferGeometry(new hc(a,b));this.mergeVertices()}function hc(a,b){function c(a){var c,k=e.length/3;a=a.extractPoints(b);var m=a.shape,h=a.holes;!1===rb.isClockWise(m)&&(m=m.reverse());a=0;for(c=h.length;a<c;a++){var x=h[a];!0===rb.isClockWise(x)&&(h[a]=x.reverse())}var n=rb.triangulateShape(m,h);a=0;for(c=h.length;a<c;a++)x=h[a],m=m.concat(x);a=0;for(c=m.length;a<
|
|
|
+c;a++)x=m[a],e.push(x.x,x.y,0),f.push(0,0,1),g.push(x.x,x.y);a=0;for(c=n.length;a<c;a++)m=n[a],d.push(m[0]+k,m[1]+k,m[2]+k),l+=3}z.call(this);this.type="ShapeBufferGeometry";this.parameters={shapes:a,curveSegments:b};b=b||12;var d=[],e=[],f=[],g=[],k=0,l=0;if(!1===Array.isArray(a))c(a);else for(var m=0;m<a.length;m++)c(a[m]),this.addGroup(k,l,m),k+=l,l=0;this.setIndex(d);this.setAttribute("position",new D(e,3));this.setAttribute("normal",new D(f,3));this.setAttribute("uv",new D(g,2))}function fi(a,
|
|
|
+b){b.shapes=[];if(Array.isArray(a))for(var c=0,d=a.length;c<d;c++)b.shapes.push(a[c].uuid);else b.shapes.push(a.uuid);return b}function Yc(a,b){z.call(this);this.type="EdgesGeometry";this.parameters={thresholdAngle:b};var c=[];b=Math.cos(L.DEG2RAD*(void 0!==b?b:1));var d=[0,0],e={},f=["a","b","c"];if(a.isBufferGeometry){var g=new N;g.fromBufferGeometry(a)}else g=a.clone();g.mergeVertices();g.computeFaceNormals();a=g.vertices;g=g.faces;for(var k=0,l=g.length;k<l;k++)for(var m=g[k],h=0;3>h;h++){var p=
|
|
|
+m[f[h]];var q=m[f[(h+1)%3]];d[0]=Math.min(p,q);d[1]=Math.max(p,q);p=d[0]+","+d[1];void 0===e[p]?e[p]={index1:d[0],index2:d[1],face1:k,face2:void 0}:e[p].face2=k}for(p in e)if(d=e[p],void 0===d.face2||g[d.face1].normal.dot(g[d.face2].normal)<=b)f=a[d.index1],c.push(f.x,f.y,f.z),f=a[d.index2],c.push(f.x,f.y,f.z);this.setAttribute("position",new D(c,3))}function ic(a,b,c,d,e,f,g,k){N.call(this);this.type="CylinderGeometry";this.parameters={radiusTop:a,radiusBottom:b,height:c,radialSegments:d,heightSegments:e,
|
|
|
+openEnded:f,thetaStart:g,thetaLength:k};this.fromBufferGeometry(new sb(a,b,c,d,e,f,g,k));this.mergeVertices()}function sb(a,b,c,d,e,f,g,k){function l(c){var e,f=new v,l=new n,x=0,u=!0===c?a:b,E=!0===c?1:-1;var z=r;for(e=1;e<=d;e++)p.push(0,y*E,0),q.push(0,E,0),t.push(.5,.5),r++;var F=r;for(e=0;e<=d;e++){var B=e/d*k+g,D=Math.cos(B);B=Math.sin(B);l.x=u*B;l.y=y*E;l.z=u*D;p.push(l.x,l.y,l.z);q.push(0,E,0);f.x=.5*D+.5;f.y=.5*B*E+.5;t.push(f.x,f.y);r++}for(e=0;e<d;e++)f=z+e,l=F+e,!0===c?h.push(l,l+1,f):
|
|
|
+h.push(l+1,l,f),x+=3;m.addGroup(w,x,!0===c?1:2);w+=x}z.call(this);this.type="CylinderBufferGeometry";this.parameters={radiusTop:a,radiusBottom:b,height:c,radialSegments:d,heightSegments:e,openEnded:f,thetaStart:g,thetaLength:k};var m=this;a=void 0!==a?a:1;b=void 0!==b?b:1;c=c||1;d=Math.floor(d)||8;e=Math.floor(e)||1;f=void 0!==f?f:!1;g=void 0!==g?g:0;k=void 0!==k?k:2*Math.PI;var h=[],p=[],q=[],t=[],r=0,u=[],y=c/2,w=0;(function(){var f,l,x=new n,v=new n,z=0,B=(b-a)/c;for(l=0;l<=e;l++){var D=[],C=l/
|
|
|
+e,F=C*(b-a)+a;for(f=0;f<=d;f++){var G=f/d,H=G*k+g,K=Math.sin(H);H=Math.cos(H);v.x=F*K;v.y=-C*c+y;v.z=F*H;p.push(v.x,v.y,v.z);x.set(K,B,H).normalize();q.push(x.x,x.y,x.z);t.push(G,1-C);D.push(r++)}u.push(D)}for(f=0;f<d;f++)for(l=0;l<e;l++)x=u[l+1][f],v=u[l+1][f+1],B=u[l][f+1],h.push(u[l][f],x,B),h.push(x,v,B),z+=6;m.addGroup(w,z,0);w+=z})();!1===f&&(0<a&&l(!0),0<b&&l(!1));this.setIndex(h);this.setAttribute("position",new D(p,3));this.setAttribute("normal",new D(q,3));this.setAttribute("uv",new D(t,
|
|
|
+2))}function le(a,b,c,d,e,f,g){ic.call(this,0,a,b,c,d,e,f,g);this.type="ConeGeometry";this.parameters={radius:a,height:b,radialSegments:c,heightSegments:d,openEnded:e,thetaStart:f,thetaLength:g}}function me(a,b,c,d,e,f,g){sb.call(this,0,a,b,c,d,e,f,g);this.type="ConeBufferGeometry";this.parameters={radius:a,height:b,radialSegments:c,heightSegments:d,openEnded:e,thetaStart:f,thetaLength:g}}function ne(a,b,c,d){N.call(this);this.type="CircleGeometry";this.parameters={radius:a,segments:b,thetaStart:c,
|
|
|
+thetaLength:d};this.fromBufferGeometry(new Zc(a,b,c,d));this.mergeVertices()}function Zc(a,b,c,d){z.call(this);this.type="CircleBufferGeometry";this.parameters={radius:a,segments:b,thetaStart:c,thetaLength:d};a=a||1;b=void 0!==b?Math.max(3,b):8;c=void 0!==c?c:0;d=void 0!==d?d:2*Math.PI;var e=[],f=[],g=[],k=[],l,m=new n,h=new v;f.push(0,0,0);g.push(0,0,1);k.push(.5,.5);var p=0;for(l=3;p<=b;p++,l+=3){var q=c+p/b*d;m.x=a*Math.cos(q);m.y=a*Math.sin(q);f.push(m.x,m.y,m.z);g.push(0,0,1);h.x=(f[l]/a+1)/
|
|
|
+2;h.y=(f[l+1]/a+1)/2;k.push(h.x,h.y)}for(l=1;l<=b;l++)e.push(l,l+1,0);this.setIndex(e);this.setAttribute("position",new D(f,3));this.setAttribute("normal",new D(g,3));this.setAttribute("uv",new D(k,2))}function jc(a){K.call(this);this.type="ShadowMaterial";this.color=new B(0);this.transparent=!0;this.setValues(a)}function tb(a){pa.call(this,a);this.type="RawShaderMaterial"}function fb(a){K.call(this);this.defines={STANDARD:""};this.type="MeshStandardMaterial";this.color=new B(16777215);this.roughness=
|
|
|
+1;this.metalness=0;this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new B(0);this.emissiveIntensity=1;this.bumpMap=this.emissiveMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new v(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.envMap=this.alphaMap=this.metalnessMap=this.roughnessMap=null;this.envMapIntensity=1;this.refractionRatio=.98;this.wireframe=!1;this.wireframeLinewidth=
|
|
|
+1;this.wireframeLinejoin=this.wireframeLinecap="round";this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)}function kc(a){fb.call(this);this.defines={STANDARD:"",PHYSICAL:""};this.type="MeshPhysicalMaterial";this.reflectivity=.5;this.clearcoatRoughness=this.clearcoat=0;this.sheen=null;this.clearcoatNormalScale=new v(1,1);this.clearcoatNormalMap=null;this.transparency=0;this.setValues(a)}function Ib(a){K.call(this);this.type="MeshPhongMaterial";this.color=new B(16777215);this.specular=
|
|
|
+new B(1118481);this.shininess=30;this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new B(0);this.emissiveIntensity=1;this.bumpMap=this.emissiveMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new v(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.envMap=this.alphaMap=this.specularMap=null;this.combine=0;this.reflectivity=1;this.refractionRatio=.98;this.wireframe=!1;this.wireframeLinewidth=
|
|
|
+1;this.wireframeLinejoin=this.wireframeLinecap="round";this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)}function lc(a){K.call(this);this.defines={TOON:""};this.type="MeshToonMaterial";this.color=new B(16777215);this.specular=new B(1118481);this.shininess=30;this.lightMap=this.gradientMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new B(0);this.emissiveIntensity=1;this.bumpMap=this.emissiveMap=null;this.bumpScale=1;this.normalMap=
|
|
|
+null;this.normalMapType=0;this.normalScale=new v(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.alphaMap=this.specularMap=null;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap="round";this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)}function mc(a){K.call(this);this.type="MeshNormalMaterial";this.bumpMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new v(1,1);this.displacementMap=
|
|
|
+null;this.displacementScale=1;this.displacementBias=0;this.wireframe=!1;this.wireframeLinewidth=1;this.morphNormals=this.morphTargets=this.skinning=this.fog=!1;this.setValues(a)}function nc(a){K.call(this);this.type="MeshLambertMaterial";this.color=new B(16777215);this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new B(0);this.emissiveIntensity=1;this.envMap=this.alphaMap=this.specularMap=this.emissiveMap=null;this.combine=0;this.reflectivity=
|
|
|
+1;this.refractionRatio=.98;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap="round";this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)}function oc(a){K.call(this);this.defines={MATCAP:""};this.type="MeshMatcapMaterial";this.color=new B(16777215);this.bumpMap=this.map=this.matcap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new v(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=
|
|
|
+0;this.alphaMap=null;this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)}function pc(a){ka.call(this);this.type="LineDashedMaterial";this.scale=1;this.dashSize=3;this.gapSize=1;this.setValues(a)}function Ka(a,b,c,d){this.parameterPositions=a;this._cachedIndex=0;this.resultBuffer=void 0!==d?d:new b.constructor(c);this.sampleValues=b;this.valueSize=c}function Ve(a,b,c,d){Ka.call(this,a,b,c,d);this._offsetNext=this._weightNext=this._offsetPrev=this._weightPrev=-0}function oe(a,b,c,
|
|
|
+d){Ka.call(this,a,b,c,d)}function We(a,b,c,d){Ka.call(this,a,b,c,d)}function ua(a,b,c,d){if(void 0===a)throw Error("THREE.KeyframeTrack: track name is undefined");if(void 0===b||0===b.length)throw Error("THREE.KeyframeTrack: no keyframes in track named "+a);this.name=a;this.times=ba.convertArray(b,this.TimeBufferType);this.values=ba.convertArray(c,this.ValueBufferType);this.setInterpolation(d||this.DefaultInterpolation)}function Xe(a,b,c){ua.call(this,a,b,c)}function Ye(a,b,c,d){ua.call(this,a,b,
|
|
|
+c,d)}function $c(a,b,c,d){ua.call(this,a,b,c,d)}function Ze(a,b,c,d){Ka.call(this,a,b,c,d)}function pe(a,b,c,d){ua.call(this,a,b,c,d)}function $e(a,b,c,d){ua.call(this,a,b,c,d)}function ad(a,b,c,d){ua.call(this,a,b,c,d)}function Pa(a,b,c){this.name=a;this.tracks=c;this.duration=void 0!==b?b:-1;this.uuid=L.generateUUID();0>this.duration&&this.resetDuration()}function Lk(a){switch(a.toLowerCase()){case "scalar":case "double":case "float":case "number":case "integer":return $c;case "vector":case "vector2":case "vector3":case "vector4":return ad;
|
|
|
+case "color":return Ye;case "quaternion":return pe;case "bool":case "boolean":return Xe;case "string":return $e}throw Error("THREE.KeyframeTrack: Unsupported typeName: "+a);}function Mk(a){if(void 0===a.type)throw Error("THREE.KeyframeTrack: track type undefined, can not parse");var b=Lk(a.type);if(void 0===a.times){var c=[],d=[];ba.flattenJSON(a.keys,c,d,"value");a.times=c;a.values=d}return void 0!==b.parse?b.parse(a):new b(a.name,a.times,a.values,a.interpolation)}function vg(a,b,c){var d=this,e=
|
|
|
+!1,f=0,g=0,k=void 0,l=[];this.onStart=void 0;this.onLoad=a;this.onProgress=b;this.onError=c;this.itemStart=function(a){g++;if(!1===e&&void 0!==d.onStart)d.onStart(a,f,g);e=!0};this.itemEnd=function(a){f++;if(void 0!==d.onProgress)d.onProgress(a,f,g);if(f===g&&(e=!1,void 0!==d.onLoad))d.onLoad()};this.itemError=function(a){if(void 0!==d.onError)d.onError(a)};this.resolveURL=function(a){return k?k(a):a};this.setURLModifier=function(a){k=a;return this};this.addHandler=function(a,b){l.push(a,b);return this};
|
|
|
+this.removeHandler=function(a){a=l.indexOf(a);-1!==a&&l.splice(a,2);return this};this.getHandler=function(a){for(var b=0,c=l.length;b<c;b+=2){var d=l[b],e=l[b+1];d.global&&(d.lastIndex=0);if(d.test(a))return e}return null}}function Y(a){this.manager=void 0!==a?a:gi;this.crossOrigin="anonymous";this.resourcePath=this.path=""}function Qa(a){Y.call(this,a)}function wg(a){Y.call(this,a)}function xg(a){Y.call(this,a)}function af(a){Y.call(this,a)}function bd(a){Y.call(this,a)}function bf(a){Y.call(this,
|
|
|
+a)}function cf(a){Y.call(this,a)}function H(){this.type="Curve";this.arcLengthDivisions=200}function La(a,b,c,d,e,f,g,k){H.call(this);this.type="EllipseCurve";this.aX=a||0;this.aY=b||0;this.xRadius=c||1;this.yRadius=d||1;this.aStartAngle=e||0;this.aEndAngle=f||2*Math.PI;this.aClockwise=g||!1;this.aRotation=k||0}function cd(a,b,c,d,e,f){La.call(this,a,b,c,c,d,e,f);this.type="ArcCurve"}function yg(){var a=0,b=0,c=0,d=0;return{initCatmullRom:function(e,f,g,k,l){e=l*(g-e);k=l*(k-f);a=f;b=e;c=-3*f+3*g-
|
|
|
+2*e-k;d=2*f-2*g+e+k},initNonuniformCatmullRom:function(e,f,g,k,l,m,h){e=((f-e)/l-(g-e)/(l+m)+(g-f)/m)*m;k=((g-f)/m-(k-f)/(m+h)+(k-g)/h)*m;a=f;b=e;c=-3*f+3*g-2*e-k;d=2*f-2*g+e+k},calc:function(e){var f=e*e;return a+b*e+c*f+d*f*e}}}function Aa(a,b,c,d){H.call(this);this.type="CatmullRomCurve3";this.points=a||[];this.closed=b||!1;this.curveType=c||"centripetal";this.tension=d||.5}function hi(a,b,c,d,e){b=.5*(d-b);e=.5*(e-c);var f=a*a;return(2*c-2*d+b+e)*a*f+(-3*c+3*d-2*b-e)*f+b*a+c}function qe(a,b,c,
|
|
|
+d){var e=1-a;return e*e*b+2*(1-a)*a*c+a*a*d}function re(a,b,c,d,e){var f=1-a,g=1-a;return f*f*f*b+3*g*g*a*c+3*(1-a)*a*a*d+a*a*a*e}function Va(a,b,c,d){H.call(this);this.type="CubicBezierCurve";this.v0=a||new v;this.v1=b||new v;this.v2=c||new v;this.v3=d||new v}function gb(a,b,c,d){H.call(this);this.type="CubicBezierCurve3";this.v0=a||new n;this.v1=b||new n;this.v2=c||new n;this.v3=d||new n}function Ea(a,b){H.call(this);this.type="LineCurve";this.v1=a||new v;this.v2=b||new v}function Wa(a,b){H.call(this);
|
|
|
+this.type="LineCurve3";this.v1=a||new n;this.v2=b||new n}function Xa(a,b,c){H.call(this);this.type="QuadraticBezierCurve";this.v0=a||new v;this.v1=b||new v;this.v2=c||new v}function hb(a,b,c){H.call(this);this.type="QuadraticBezierCurve3";this.v0=a||new n;this.v1=b||new n;this.v2=c||new n}function Ya(a){H.call(this);this.type="SplineCurve";this.points=a||[]}function ub(){H.call(this);this.type="CurvePath";this.curves=[];this.autoClose=!1}function Za(a){ub.call(this);this.type="Path";this.currentPoint=
|
|
|
+new v;a&&this.setFromPoints(a)}function Jb(a){Za.call(this,a);this.uuid=L.generateUUID();this.type="Shape";this.holes=[]}function da(a,b){G.call(this);this.type="Light";this.color=new B(a);this.intensity=void 0!==b?b:1;this.receiveShadow=void 0}function df(a,b,c){da.call(this,a,c);this.type="HemisphereLight";this.castShadow=void 0;this.position.copy(G.DefaultUp);this.updateMatrix();this.groundColor=new B(b)}function ib(a){this.camera=a;this.bias=0;this.radius=1;this.mapSize=new v(512,512);this.mapPass=
|
|
|
+this.map=null;this.matrix=new P;this._frustum=new Fd;this._frameExtents=new v(1,1);this._viewportCount=1;this._viewports=[new ia(0,0,1,1)]}function ef(){ib.call(this,new qa(50,1,.5,500))}function ff(a,b,c,d,e,f){da.call(this,a,b);this.type="SpotLight";this.position.copy(G.DefaultUp);this.updateMatrix();this.target=new G;Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(a){this.intensity=a/Math.PI}});this.distance=void 0!==c?c:0;this.angle=void 0!==d?d:
|
|
|
+Math.PI/3;this.penumbra=void 0!==e?e:0;this.decay=void 0!==f?f:1;this.shadow=new ef}function zg(){ib.call(this,new qa(90,1,.5,500));this._frameExtents=new v(4,2);this._viewportCount=6;this._viewports=[new ia(2,1,1,1),new ia(0,1,1,1),new ia(3,1,1,1),new ia(1,1,1,1),new ia(3,0,1,1),new ia(1,0,1,1)];this._cubeDirections=[new n(1,0,0),new n(-1,0,0),new n(0,0,1),new n(0,0,-1),new n(0,1,0),new n(0,-1,0)];this._cubeUps=[new n(0,1,0),new n(0,1,0),new n(0,1,0),new n(0,1,0),new n(0,0,1),new n(0,0,-1)]}function gf(a,
|
|
|
+b,c,d){da.call(this,a,b);this.type="PointLight";Object.defineProperty(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(a){this.intensity=a/(4*Math.PI)}});this.distance=void 0!==c?c:0;this.decay=void 0!==d?d:1;this.shadow=new zg}function dd(a,b,c,d,e,f){cb.call(this);this.type="OrthographicCamera";this.zoom=1;this.view=null;this.left=void 0!==a?a:-1;this.right=void 0!==b?b:1;this.top=void 0!==c?c:1;this.bottom=void 0!==d?d:-1;this.near=void 0!==e?e:.1;this.far=void 0!==f?
|
|
|
+f:2E3;this.updateProjectionMatrix()}function hf(){ib.call(this,new dd(-5,5,5,-5,.5,500))}function jf(a,b){da.call(this,a,b);this.type="DirectionalLight";this.position.copy(G.DefaultUp);this.updateMatrix();this.target=new G;this.shadow=new hf}function kf(a,b){da.call(this,a,b);this.type="AmbientLight";this.castShadow=void 0}function lf(a,b,c,d){da.call(this,a,b);this.type="RectAreaLight";this.width=void 0!==c?c:10;this.height=void 0!==d?d:10}function mf(a){Y.call(this,a);this.textures={}}function nf(){z.call(this);
|
|
|
+this.type="InstancedBufferGeometry";this.maxInstancedCount=void 0}function of(a,b,c,d){"number"===typeof c&&(d=c,c=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument."));M.call(this,a,b,c);this.meshPerAttribute=d||1}function pf(a){Y.call(this,a)}function qf(a){Y.call(this,a)}function Ag(a){"undefined"===typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported.");"undefined"===typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported.");
|
|
|
+Y.call(this,a);this.options=void 0}function Bg(){this.type="ShapePath";this.color=new B;this.subPaths=[];this.currentPath=null}function Cg(a){this.type="Font";this.data=a}function Dg(a){Y.call(this,a)}function rf(a){Y.call(this,a)}function sf(){this.coefficients=[];for(var a=0;9>a;a++)this.coefficients.push(new n)}function $a(a,b){da.call(this,void 0,b);this.sh=void 0!==a?a:new sf}function Eg(a,b,c){$a.call(this,void 0,c);a=(new B).set(a);c=(new B).set(b);b=new n(a.r,a.g,a.b);a=new n(c.r,c.g,c.b);
|
|
|
+c=Math.sqrt(Math.PI);var d=c*Math.sqrt(.75);this.sh.coefficients[0].copy(b).add(a).multiplyScalar(c);this.sh.coefficients[1].copy(b).sub(a).multiplyScalar(d)}function Fg(a,b){$a.call(this,void 0,b);a=(new B).set(a);this.sh.coefficients[0].set(a.r,a.g,a.b).multiplyScalar(2*Math.sqrt(Math.PI))}function ii(){this.type="StereoCamera";this.aspect=1;this.eyeSep=.064;this.cameraL=new qa;this.cameraL.layers.enable(1);this.cameraL.matrixAutoUpdate=!1;this.cameraR=new qa;this.cameraR.layers.enable(2);this.cameraR.matrixAutoUpdate=
|
|
|
+!1;this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}function Gg(a){this.autoStart=void 0!==a?a:!0;this.elapsedTime=this.oldTime=this.startTime=0;this.running=!1}function Hg(){G.call(this);this.type="AudioListener";this.context=Ig.getContext();this.gain=this.context.createGain();this.gain.connect(this.context.destination);this.filter=null;this.timeDelta=0;this._clock=new Gg}function ed(a){G.call(this);this.type="Audio";this.listener=a;this.context=a.context;this.gain=
|
|
|
+this.context.createGain();this.gain.connect(a.getInput());this.autoplay=!1;this.buffer=null;this.detune=0;this.loop=!1;this.offset=this.loopEnd=this.loopStart=0;this.duration=void 0;this.playbackRate=1;this.isPlaying=!1;this.hasPlaybackControl=!0;this.sourceType="empty";this._pausedAt=this._startedAt=0;this.filters=[]}function Jg(a){ed.call(this,a);this.panner=this.context.createPanner();this.panner.panningModel="HRTF";this.panner.connect(this.gain)}function Kg(a,b){this.analyser=a.context.createAnalyser();
|
|
|
+this.analyser.fftSize=void 0!==b?b:2048;this.data=new Uint8Array(this.analyser.frequencyBinCount);a.getOutput().connect(this.analyser)}function Lg(a,b,c){this.binding=a;this.valueSize=c;a=Float64Array;switch(b){case "quaternion":b=this._slerp;break;case "string":case "bool":a=Array;b=this._select;break;default:b=this._lerp}this.buffer=new a(4*c);this._mixBufferRegion=b;this.referenceCount=this.useCount=this.cumulativeWeight=0}function ji(a,b,c){c=c||Ba.parseTrackName(b);this._targetGroup=a;this._bindings=
|
|
|
+a.subscribe_(b,c)}function Ba(a,b,c){this.path=b;this.parsedPath=c||Ba.parseTrackName(b);this.node=Ba.findNode(a,this.parsedPath.nodeName)||a;this.rootNode=a}function ki(){this.uuid=L.generateUUID();this._objects=Array.prototype.slice.call(arguments);this.nCachedObjects_=0;var a={};this._indicesByUUID=a;for(var b=0,c=arguments.length;b!==c;++b)a[arguments[b].uuid]=b;this._paths=[];this._parsedPaths=[];this._bindings=[];this._bindingsIndicesByPath={};var d=this;this.stats={objects:{get total(){return d._objects.length},
|
|
|
+get inUse(){return this.total-d.nCachedObjects_}},get bindingsPerObject(){return d._bindings.length}}}function li(a,b,c){this._mixer=a;this._clip=b;this._localRoot=c||null;a=b.tracks;b=a.length;c=Array(b);for(var d={endingStart:2400,endingEnd:2400},e=0;e!==b;++e){var f=a[e].createInterpolant(null);c[e]=f;f.settings=d}this._interpolantSettings=d;this._interpolants=c;this._propertyBindings=Array(b);this._weightInterpolant=this._timeScaleInterpolant=this._byClipCacheIndex=this._cacheIndex=null;this.loop=
|
|
|
+2201;this._loopCount=-1;this._startTime=null;this.time=0;this._effectiveWeight=this.weight=this._effectiveTimeScale=this.timeScale=1;this.repetitions=Infinity;this.paused=!1;this.enabled=!0;this.clampWhenFinished=!1;this.zeroSlopeAtEnd=this.zeroSlopeAtStart=!0}function Mg(a){this._root=a;this._initMemoryManager();this.time=this._accuIndex=0;this.timeScale=1}function tf(a,b){"string"===typeof a&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),a=b);this.value=a}function Ng(a,b,c){qb.call(this,
|
|
|
+a,b);this.meshPerAttribute=c||1}function mi(a,b,c,d){this.ray=new Ub(a,b);this.near=c||0;this.far=d||Infinity;this.camera=null;this.params={Mesh:{},Line:{},LOD:{},Points:{threshold:1},Sprite:{}};Object.defineProperties(this.params,{PointCloud:{get:function(){console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points.");return this.Points}}})}function ni(a,b){return a.distance-b.distance}function Og(a,b,c,d){if(!1!==a.visible&&(a.raycast(b,c),!0===d)){a=a.children;d=0;for(var e=
|
|
|
+a.length;d<e;d++)Og(a[d],b,c,!0)}}function oi(a,b,c){this.radius=void 0!==a?a:1;this.phi=void 0!==b?b:0;this.theta=void 0!==c?c:0;return this}function pi(a,b,c){this.radius=void 0!==a?a:1;this.theta=void 0!==b?b:0;this.y=void 0!==c?c:0;return this}function Pg(a,b){this.min=void 0!==a?a:new v(Infinity,Infinity);this.max=void 0!==b?b:new v(-Infinity,-Infinity)}function Qg(a,b){this.start=void 0!==a?a:new n;this.end=void 0!==b?b:new n}function se(a){G.call(this);this.material=a;this.render=function(){}}
|
|
|
+function fd(a,b){G.call(this);this.light=a;this.light.updateMatrixWorld();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.color=b;a=new z;b=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(var c=0,d=1;32>c;c++,d++){var e=c/32*Math.PI*2,f=d/32*Math.PI*2;b.push(Math.cos(e),Math.sin(e),1,Math.cos(f),Math.sin(f),1)}a.setAttribute("position",new D(b,3));b=new ka({fog:!1});this.cone=new ma(a,b);this.add(this.cone);this.update()}function qi(a){var b=[];a&&a.isBone&&b.push(a);for(var c=
|
|
|
+0;c<a.children.length;c++)b.push.apply(b,qi(a.children[c]));return b}function gd(a){for(var b=qi(a),c=new z,d=[],e=[],f=new B(0,0,1),g=new B(0,1,0),k=0;k<b.length;k++){var l=b[k];l.parent&&l.parent.isBone&&(d.push(0,0,0),d.push(0,0,0),e.push(f.r,f.g,f.b),e.push(g.r,g.g,g.b))}c.setAttribute("position",new D(d,3));c.setAttribute("color",new D(e,3));d=new ka({vertexColors:2,depthTest:!1,depthWrite:!1,transparent:!0});ma.call(this,c,d);this.root=a;this.bones=b;this.matrix=a.matrixWorld;this.matrixAutoUpdate=
|
|
|
+!1}function hd(a,b,c){this.light=a;this.light.updateMatrixWorld();this.color=c;a=new fc(b,4,2);b=new Na({wireframe:!0,fog:!1});U.call(this,a,b);this.matrix=this.light.matrixWorld;this.matrixAutoUpdate=!1;this.update()}function id(a,b,c){G.call(this);this.light=a;this.light.updateMatrixWorld();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.color=c;a=new bc(b);a.rotateY(.5*Math.PI);this.material=new Na({wireframe:!0,fog:!1});void 0===this.color&&(this.material.vertexColors=2);b=a.getAttribute("position");
|
|
|
+b=new Float32Array(3*b.count);a.setAttribute("color",new M(b,3));this.add(new U(a,this.material));this.update()}function uf(a,b,c,d){a=a||10;b=b||10;c=new B(void 0!==c?c:4473924);d=new B(void 0!==d?d:8947848);var e=b/2,f=a/b,g=a/2;a=[];for(var k=[],l=0,m=0,h=-g;l<=b;l++,h+=f){a.push(-g,0,h,g,0,h);a.push(h,0,-g,h,0,g);var p=l===e?c:d;p.toArray(k,m);m+=3;p.toArray(k,m);m+=3;p.toArray(k,m);m+=3;p.toArray(k,m);m+=3}b=new z;b.setAttribute("position",new D(a,3));b.setAttribute("color",new D(k,3));c=new ka({vertexColors:2});
|
|
|
+ma.call(this,b,c)}function vf(a,b,c,d,e,f){a=a||10;b=b||16;c=c||8;d=d||64;e=new B(void 0!==e?e:4473924);f=new B(void 0!==f?f:8947848);var g=[],k=[],l;for(l=0;l<=b;l++){var m=l/b*2*Math.PI;var h=Math.sin(m)*a;m=Math.cos(m)*a;g.push(0,0,0);g.push(h,0,m);var p=l&1?e:f;k.push(p.r,p.g,p.b);k.push(p.r,p.g,p.b)}for(l=0;l<=c;l++){p=l&1?e:f;var q=a-a/c*l;for(b=0;b<d;b++)m=b/d*2*Math.PI,h=Math.sin(m)*q,m=Math.cos(m)*q,g.push(h,0,m),k.push(p.r,p.g,p.b),m=(b+1)/d*2*Math.PI,h=Math.sin(m)*q,m=Math.cos(m)*q,g.push(h,
|
|
|
+0,m),k.push(p.r,p.g,p.b)}a=new z;a.setAttribute("position",new D(g,3));a.setAttribute("color",new D(k,3));g=new ka({vertexColors:2});ma.call(this,a,g)}function jd(a,b,c){G.call(this);this.light=a;this.light.updateMatrixWorld();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.color=c;void 0===b&&(b=1);a=new z;a.setAttribute("position",new D([-b,b,0,b,b,0,b,-b,0,-b,-b,0,-b,b,0],3));b=new ka({fog:!1});this.lightPlane=new Ja(a,b);this.add(this.lightPlane);a=new z;a.setAttribute("position",new D([0,
|
|
|
+0,0,0,0,1],3));this.targetLine=new Ja(a,b);this.add(this.targetLine);this.update()}function te(a){function b(a,b,d){c(a,d);c(b,d)}function c(a,b){f.push(0,0,0);g.push(b.r,b.g,b.b);void 0===k[a]&&(k[a]=[]);k[a].push(f.length/3-1)}var d=new z,e=new ka({color:16777215,vertexColors:1}),f=[],g=[],k={},l=new B(16755200),m=new B(16711680),h=new B(43775),p=new B(16777215),q=new B(3355443);b("n1","n2",l);b("n2","n4",l);b("n4","n3",l);b("n3","n1",l);b("f1","f2",l);b("f2","f4",l);b("f4","f3",l);b("f3","f1",
|
|
|
+l);b("n1","f1",l);b("n2","f2",l);b("n3","f3",l);b("n4","f4",l);b("p","n1",m);b("p","n2",m);b("p","n3",m);b("p","n4",m);b("u1","u2",h);b("u2","u3",h);b("u3","u1",h);b("c","t",p);b("p","c",q);b("cn1","cn2",q);b("cn3","cn4",q);b("cf1","cf2",q);b("cf3","cf4",q);d.setAttribute("position",new D(f,3));d.setAttribute("color",new D(g,3));ma.call(this,d,e);this.camera=a;this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix();this.matrix=a.matrixWorld;this.matrixAutoUpdate=!1;this.pointMap=
|
|
|
+k;this.update()}function ja(a,b,c,d,e,f,g){wf.set(e,f,g).unproject(d);a=b[a];if(void 0!==a)for(c=c.getAttribute("position"),b=0,d=a.length;b<d;b++)c.setXYZ(a[b],wf.x,wf.y,wf.z)}function vb(a,b){this.object=a;void 0===b&&(b=16776960);a=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]);var c=new Float32Array(24),d=new z;d.setIndex(new M(a,1));d.setAttribute("position",new M(c,3));ma.call(this,d,new ka({color:b}));this.matrixAutoUpdate=!1;this.update()}function ue(a,b){this.type="Box3Helper";
|
|
|
+this.box=a;b=b||16776960;a=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]);var c=new z;c.setIndex(new M(a,1));c.setAttribute("position",new D([1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],3));ma.call(this,c,new ka({color:b}));this.geometry.computeBoundingSphere()}function ve(a,b,c){this.type="PlaneHelper";this.plane=a;this.size=void 0===b?1:b;a=void 0!==c?c:16776960;b=new z;b.setAttribute("position",new D([1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,
|
|
|
+0,0,1,0,0,0],3));b.computeBoundingSphere();Ja.call(this,b,new ka({color:a}));b=new z;b.setAttribute("position",new D([1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],3));b.computeBoundingSphere();this.add(new U(b,new Na({color:a,opacity:.2,transparent:!0,depthWrite:!1})))}function wb(a,b,c,d,e,f){G.call(this);void 0===a&&(a=new n(0,0,1));void 0===b&&(b=new n(0,0,0));void 0===c&&(c=1);void 0===d&&(d=16776960);void 0===e&&(e=.2*c);void 0===f&&(f=.2*e);void 0===xf&&(xf=new z,xf.setAttribute("position",new D([0,
|
|
|
+0,0,0,1,0],3)),Rg=new sb(0,.5,1,5,1),Rg.translate(0,-.5,0));this.position.copy(b);this.line=new Ja(xf,new ka({color:d}));this.line.matrixAutoUpdate=!1;this.add(this.line);this.cone=new U(Rg,new Na({color:d}));this.cone.matrixAutoUpdate=!1;this.add(this.cone);this.setDirection(a);this.setLength(c,e,f)}function we(a){a=a||1;var b=[0,0,0,a,0,0,0,0,0,0,a,0,0,0,0,0,0,a];a=new z;a.setAttribute("position",new D(b,3));a.setAttribute("color",new D([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3));b=new ka({vertexColors:2});
|
|
|
+ma.call(this,a,b)}function Sg(a){Z=a;Tg(yf)}function ri(a){var b={magFilter:1003,minFilter:1003,generateMipmaps:!1,type:a?a.type:1009,format:a?a.format:1023,encoding:a?a.encoding:3002,depthBuffer:!1,stencilBuffer:!1},c=si(b);c.depthBuffer=a?!1:!0;zf=si(b);return c}function ti(){zf.dispose();Z.setRenderTarget(null);var a=Z.getSize(new v);Z.setViewport(0,0,a.x,a.y)}function Tg(a){var b=new nb;b.add(new U(xe[0],a));Z.compile(b,Ug)}function si(a){a=new wa(3*jb,3*jb,a);a.texture.mapping=306;a.texture.name=
|
|
|
+"PMREM.cubeUv";a.scissorTest=!0;return a}function Vg(a,b,c,d){var e=1/Z.getPixelRatio();a=(a+.5)*e;b=(b+.5)*e;c=(c+.5)*e;d=(d+.5)*e;Z.setViewport(a,b,c,d);Z.setScissor(a,b,c,d)}function ui(a){var b=Z.autoClear;Z.autoClear=!1;for(var c=1;c<vi;c++)wi(a,c-1,c,Math.sqrt(Af[c]*Af[c]-Af[c-1]*Af[c-1]),xi[(c-1)%xi.length]);Z.autoClear=b}function wi(a,b,c,d,e){yi(a,zf,b,c,d,"latitudinal",e);yi(zf,a,c,c,d,"longitudinal",e)}function yi(a,b,c,d,e,f,g){"latitudinal"!==f&&"longitudinal"!==f&&console.error("blur direction must be either latitudinal or longitudinal!");
|
|
|
+var k=new nb;k.add(new U(xe[d],yf));var l=yf.uniforms,m=zi[c]-1;m=isFinite(e)?Math.PI/(2*m):2*Math.PI/39;var h=e/m,p=isFinite(e)?1+Math.floor(3*h):20;20<p&&console.warn("sigmaRadians, "+e+", is too large and will clip, as it requested "+p+" samples when the maximum is set to 20");for(var q=[],n=0,r=0;20>r;++r)e=r/h,e=Math.exp(-e*e/2),q.push(e),0==r?n+=e:r<p&&(n+=2*e);for(r=0;r<q.length;r++)q[r]/=n;l.envMap.value=a.texture;l.samples.value=p;l.weights.value=q;l.latitudinal.value="latitudinal"===f;g&&
|
|
|
+(l.poleAxis.value=g);l.dTheta.value=m;l.mipInt.value=8-c;l.inputEncoding.value=kb[a.texture.encoding];l.outputEncoding.value=kb[a.texture.encoding];a=zi[d];e=3*Math.max(0,jb-2*a);d=(0===d?0:2*jb)+2*a*(4<d?d-8+4:0);Z.setRenderTarget(b);Vg(e,d,3*a,2*a);Z.render(k,Ug)}function Ai(){var a=new v(1,1);a=new tb({uniforms:{envMap:{value:null},texelSize:{value:a},inputEncoding:{value:kb[3E3]},outputEncoding:{value:kb[3E3]}},vertexShader:Wg(),fragmentShader:"\nprecision mediump float;\nprecision mediump int;\nvarying vec3 vOutputDirection;\nuniform sampler2D envMap;\nuniform vec2 texelSize;\n\n"+
|
|
|
+Xg()+"\n\n#define RECIPROCAL_PI 0.31830988618\n#define RECIPROCAL_PI2 0.15915494\n\nvoid main() {\n\tgl_FragColor = vec4(0.0);\n\tvec3 outputDirection = normalize(vOutputDirection);\n\tvec2 uv;\n\tuv.y = asin(clamp(outputDirection.y, -1.0, 1.0)) * RECIPROCAL_PI + 0.5;\n\tuv.x = atan(outputDirection.z, outputDirection.x) * RECIPROCAL_PI2 + 0.5;\n\tvec2 f = fract(uv / texelSize - 0.5);\n\tuv -= f * texelSize;\n\tvec3 tl = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n\tuv.x += texelSize.x;\n\tvec3 tr = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n\tuv.y += texelSize.y;\n\tvec3 br = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n\tuv.x -= texelSize.x;\n\tvec3 bl = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n\tvec3 tm = mix(tl, tr, f.x);\n\tvec3 bm = mix(bl, br, f.x);\n\tgl_FragColor.rgb = mix(tm, bm, f.y);\n\tgl_FragColor = linearToOutputTexel(gl_FragColor);\n}\n\t\t",
|
|
|
blending:0,depthTest:!1,depthWrite:!1});a.type="EquirectangularToCubeUV";return a}function Bi(){var a=new tb({uniforms:{envMap:{value:null},inputEncoding:{value:kb[3E3]},outputEncoding:{value:kb[3E3]}},vertexShader:Wg(),fragmentShader:"\nprecision mediump float;\nprecision mediump int;\nvarying vec3 vOutputDirection;\nuniform samplerCube envMap;\n\n"+Xg()+"\n\nvoid main() {\n\tgl_FragColor = vec4(0.0);\n\tgl_FragColor.rgb = envMapTexelToLinear(textureCube(envMap, vec3( - vOutputDirection.x, vOutputDirection.yz ))).rgb;\n\tgl_FragColor = linearToOutputTexel(gl_FragColor);\n}\n\t\t",
|
|
|
blending:0,depthTest:!1,depthWrite:!1});a.type="CubemapToCubeUV";return a}function Wg(){return"\nprecision mediump float;\nprecision mediump int;\nattribute vec3 position;\nattribute vec2 uv;\nattribute float faceIndex;\nvarying vec3 vOutputDirection;\nvec3 getDirection(vec2 uv, float face) {\n\tuv = 2.0 * uv - 1.0;\n\tvec3 direction = vec3(uv, 1.0);\n\tif (face == 0.0) {\n\t\tdirection = direction.zyx;\n\t\tdirection.z *= -1.0;\n\t} else if (face == 1.0) {\n\t\tdirection = direction.xzy;\n\t\tdirection.z *= -1.0;\n\t} else if (face == 3.0) {\n\t\tdirection = direction.zyx;\n\t\tdirection.x *= -1.0;\n\t} else if (face == 4.0) {\n\t\tdirection = direction.xzy;\n\t\tdirection.y *= -1.0;\n\t} else if (face == 5.0) {\n\t\tdirection.xz *= -1.0;\n\t}\n\treturn direction;\n}\nvoid main() {\n\tvOutputDirection = getDirection(uv, faceIndex);\n\tgl_Position = vec4( position, 1.0 );\n}\n\t"}
|
|
|
function Xg(){return"\nuniform int inputEncoding;\nuniform int outputEncoding;\n\n#include <encodings_pars_fragment>\n\nvec4 inputTexelToLinear(vec4 value){\n\tif(inputEncoding == 0){\n\t\treturn value;\n\t}else if(inputEncoding == 1){\n\t\treturn sRGBToLinear(value);\n\t}else if(inputEncoding == 2){\n\t\treturn RGBEToLinear(value);\n\t}else if(inputEncoding == 3){\n\t\treturn RGBMToLinear(value, 7.0);\n\t}else if(inputEncoding == 4){\n\t\treturn RGBMToLinear(value, 16.0);\n\t}else if(inputEncoding == 5){\n\t\treturn RGBDToLinear(value, 256.0);\n\t}else{\n\t\treturn GammaToLinear(value, 2.2);\n\t}\n}\n\nvec4 linearToOutputTexel(vec4 value){\n\tif(outputEncoding == 0){\n\t\treturn value;\n\t}else if(outputEncoding == 1){\n\t\treturn LinearTosRGB(value);\n\t}else if(outputEncoding == 2){\n\t\treturn LinearToRGBE(value);\n\t}else if(outputEncoding == 3){\n\t\treturn LinearToRGBM(value, 7.0);\n\t}else if(outputEncoding == 4){\n\t\treturn LinearToRGBM(value, 16.0);\n\t}else if(outputEncoding == 5){\n\t\treturn LinearToRGBD(value, 256.0);\n\t}else{\n\t\treturn LinearToGamma(value, 2.2);\n\t}\n}\n\nvec4 envMapTexelToLinear(vec4 color) {\n\treturn inputTexelToLinear(color);\n}\n\t"}
|