""].filter(g).join("\n")}functionf(a){varb=[],c;for(cina){vard=a[c];!1!==d&&b.push("#define "+c+""+d)}returnb.join("\n")}functiong(a){return""!==a}functionh(a,b){returna.replace(/NUM_DIR_LIGHTS/g,b.numDirLights).replace(/NUM_SPOT_LIGHTS/g,b.numSpotLights).replace(/NUM_POINT_LIGHTS/g,b.numPointLights).replace(/NUM_HEMI_LIGHTS/g,b.numHemiLights)}functionk(a){returna.replace(/#include +<([\w\d.]+)>/g,function(a,b){varc=THREE.ShaderChunk[b];if(void0===c)throwError("Can not resolve #include <"+
b+">");returnk(c)})}functionl(a){returna.replace(/for \( int i \=(\d+)\; i < (\d+)\; i \+\+\)\{([\s\S]+?)(?=\})\}/g,function(a,b,c,d){a="";for(b=parseInt(b);b<parseInt(c);b++)a+=d.replace(/\[ i \]/g,"[ "+b+" ]");returna})}varn=0;returnfunction(a,m,q,r){vars=a.context,t=q.extensions,u=q.defines,v=q.__webglShader.vertexShader,C=q.__webglShader.fragmentShader,w="SHADOWMAP_TYPE_BASIC";r.shadowMapType===THREE.PCFShadowMap?w="SHADOWMAP_TYPE_PCF":r.shadowMapType===THREE.PCFSoftShadowMap&&(w="SHADOWMAP_TYPE_PCF_SOFT");
c).name;a[d]=s.getAttribLocation(B,d)}K=a}return K};this.destroy=function(){s.deleteProgram(B);this.program=void 0};Object.defineProperties(this,{uniforms:{get:function(){console.warn("THREE.WebGLProgram: .uniforms is now .getUniforms().");return this.getUniforms()}},attributes:{get:function(){console.warn("THREE.WebGLProgram: .attributes is now .getAttributes().");return this.getAttributes()}}});this.id=n++;this.code=m;this.usedTimes=1;this.program=B;this.vertexShader=v;this.fragmentShader=C;return this}}();
this.program=void0};Object.defineProperties(this,{uniforms:{get:function(){console.warn("THREE.WebGLProgram: .uniforms is now .getUniforms().");returnthis.getUniforms()}},attributes:{get:function(){console.warn("THREE.WebGLProgram: .attributes is now .getAttributes().");returnthis.getAttributes()}}});this.id=n++;this.code=m;this.usedTimes=1;this.program=B;this.vertexShader=v;this.fragmentShader=C;returnthis}}();
THREE.WebGLPrograms=function(a,b){functionc(a,b){varc;a?ainstanceofTHREE.Texture?c=a.encoding:ainstanceofTHREE.WebGLRenderTarget&&(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don't use render targets as textures. Use their .texture property instead."),c=a.texture.encoding):c=THREE.LinearEncoding;c===THREE.LinearEncoding&&b&&(c=THREE.GammaEncoding);returnc}vard=[],e={MeshDepthMaterial:"depth",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",
this.getParameters=function(d,f,k,l,n){varp=e[d.type],m;b.floatVertexTextures&&n&&n.skeleton&&n.skeleton.useVertexTexture?m=1024:(m=Math.floor((b.maxVertexUniforms-20)/4),void0!==n&&ninstanceofTHREE.SkinnedMesh&&(m=Math.min(n.skeleton.bones.length,m),m<n.skeleton.bones.length&&console.warn("WebGLRenderer: too many bones - "+n.skeleton.bones.length+", this GPU supports just "+m+" (try OpenGL instead of ANGLE)")));varq=a.getPrecision();null!==d.precision&&(q=b.getMaxPrecision(d.precision),q!==