text: THREE.ConvolutionShader={defines:{KERNEL_SIZE_FLOAT:"25.0",KERNEL_SIZE_INT:"25",},uniforms:{tDiffuse:{type:"t",value:null},uImageIncrement:{type:"v2",value:new THREE.Vector2(0.001953125,0)},cKernel:{type:"fv1",value:[]}},vertexShader:["uniform vec2 uImageIncrement;","varying vec2 vUv;","void main() {","vUv = uv - ( ( KERNEL_SIZE_FLOAT - 1.0 ) / 2.0 ) * uImageIncrement;","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform float cKernel[ KERNEL_SIZE_INT ];","uniform sampler2D tDiffuse;","uniform vec2 uImageIncrement;","varying vec2 vUv;","void main() {","vec2 imageCoord = vUv;","vec4 sum = vec4( 0.0, 0.0, 0.0, 0.0 );","for( int i = 0; i < KERNEL_SIZE_INT; i ++ ) {","sum += texture2D( tDiffuse, imageCoord ) * cKernel[ i ];","imageCoord += uImageIncrement;","}","gl_FragColor = sum;","}"].join("\n"),buildKernel:function(f){function e(i,j){return Math.exp(-(i*i)/(2*j*j))}var c,b,d,h,g=25,a=2*Math.ceil(f*3)+1;if(a>g){a=g}h=(a-1)*0.5;b=new Array(a);d=0;for(c=0;c<a;++c){b[c]=e(c-h,f);d+=b[c]}for(c=0;c<a;++c){b[c]/=d}return b}};THREE.VignetteShader={uniforms:{tDiffuse:{type:"t",value:null},offset:{type:"f",value:1},darkness:{type:"f",value:1}},vertexShader:["varying vec2 vUv;","void main() {","vUv = uv;","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform float offset;","uniform float darkness;","uniform sampler2D tDiffuse;","varying vec2 vUv;","void main() {","vec4 texel = texture2D( tDiffuse, vUv );","vec2 uv = ( vUv - vec2( 0.5 ) ) * vec2( offset );","gl_FragColor = vec4( mix( texel.rgb, vec3( 1.0 - darkness ), dot( uv, uv ) ), texel.a );","}"].join("\n")};THREE.CopyShader={uniforms:{tDiffuse:{type:"t",value:null},opacity:{type:"f",value:1}},vertexShader:["varying vec2 vUv;","void main() {","vUv = uv;","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform float opacity;","uniform sampler2D tDiffuse;","varying vec2 vUv;","void main() {","vec4 texel = texture2D( tDiffuse, vUv );","gl_FragColor = opacity * texel;","}"].join("\n")};THREE.VerticalBlurShader={uniforms:{tDiffuse:{type:"t",value:null},v:{type:"f",value:1/512}},vertexShader:["varying vec2 vUv;","void main() {","vUv = uv;","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform sampler2D tDiffuse;","uniform float v;","varying vec2 vUv;","void main() {","vec4 sum = vec4( 0.0 );","sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 4.0 * v ) ) * 0.051;","sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 3.0 * v ) ) * 0.0918;","sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 2.0 * v ) ) * 0.12245;","sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 1.0 * v ) ) * 0.1531;","sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y ) ) * 0.1633;","sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 1.0 * v ) ) * 0.1531;","sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 2.0 * v ) ) * 0.12245;","sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 3.0 * v ) ) * 0.0918;","sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 4.0 * v ) ) * 0.051;","gl_FragColor = sum;","}"].join("\n")};THREE.HorizontalBlurShader={uniforms:{tDiffuse:{type:"t",value:null},h:{type:"f",value:1/512}},vertexShader:["varying vec2 vUv;","void main() {","vUv = uv;","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform sampler2D tDiffuse;","uniform float h;","varying vec2 vUv;","void main() {","vec4 sum = vec4( 0.0 );","sum += texture2D( tDiffuse, vec2( vUv.x - 4.0 * h, vUv.y ) ) * 0.051;","sum += texture2D( tDiffuse, vec2( vUv.x - 3.0 * h, vUv.y ) ) * 0.0918;","sum += texture2D( tDiffuse, vec2( vUv.x - 2.0 * h, vUv.y ) ) * 0.12245;","sum += texture2D( tDiffuse, vec2( vUv.x - 1.0 * h, vUv.y ) ) * 0.1531;","sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y ) ) * 0.1633;","sum += texture2D( tDiffuse, vec2( vUv.x + 1.0 * h, vUv.y ) ) * 0.1531;","sum += texture2D( tDiffuse, vec2( vUv.x + 2.0 * h, vUv.y ) ) * 0.12245;","sum += texture2D( tDiffuse, vec2( vUv.x + 3.0 * h, vUv.y ) ) * 0.0918;","sum += texture2D( tDiffuse, vec2( vUv.x + 4.0 * h, vUv.y ) ) * 0.051;","gl_FragColor = sum;","}"].join("\n")};THREE.FXAAShader={uniforms:{tDiffuse:{type:"t",value:null},resolution:{type:"v2",value:new THREE.Vector2(1/1024,1/512)}},vertexShader:["varying vec2 vUv;","void main() {","vUv = uv;","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform sampler2D tDiffuse;","uniform vec2 resolution;","varying vec2 vUv;","#define FXAA_REDUCE_MIN   (1.0/128.0)","#define FXAA_REDUCE_MUL   (1.0/8.0)","#define FXAA_SPAN_MAX     8.0","void main() {","vec3 rgbNW = texture2D( tDiffuse, ( gl_FragCoord.xy + vec2( -1.0, -1.0 ) ) * resolution ).xyz;","vec3 rgbNE = texture2D( tDiffuse, ( gl_FragCoord.xy + vec2( 1.0, -1.0 ) ) * resolution ).xyz;","vec3 rgbSW = texture2D( tDiffuse, ( gl_FragCoord.xy + vec2( -1.0, 1.0 ) ) * resolution ).xyz;","vec3 rgbSE = texture2D( tDiffuse, ( gl_FragCoord.xy + vec2( 1.0, 1.0 ) ) * resolution ).xyz;","vec4 rgbaM  = texture2D( tDiffuse,  gl_FragCoord.xy  * resolution );","vec3 rgbM  = rgbaM.xyz;","float opacity  = rgbaM.w;","vec3 luma = vec3( 0.299, 0.587, 0.114 );","float lumaNW = dot( rgbNW, luma );","float lumaNE = dot( rgbNE, luma );","float lumaSW = dot( rgbSW, luma );","float lumaSE = dot( rgbSE, luma );","float lumaM  = dot( rgbM,  luma );","float lumaMin = min( lumaM, min( min( lumaNW, lumaNE ), min( lumaSW, lumaSE ) ) );","float lumaMax = max( lumaM, max( max( lumaNW, lumaNE) , max( lumaSW, lumaSE ) ) );","vec2 dir;","dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE));","dir.y =  ((lumaNW + lumaSW) - (lumaNE + lumaSE));","float dirReduce = max( ( lumaNW + lumaNE + lumaSW + lumaSE ) * ( 0.25 * FXAA_REDUCE_MUL ), FXAA_REDUCE_MIN );","float rcpDirMin = 1.0 / ( min( abs( dir.x ), abs( dir.y ) ) + dirReduce );","dir = min( vec2( FXAA_SPAN_MAX,  FXAA_SPAN_MAX),","max( vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX),","dir * rcpDirMin)) * resolution;","vec3 rgbA = 0.5 * (","texture2D( tDiffuse, gl_FragCoord.xy  * resolution + dir * ( 1.0 / 3.0 - 0.5 ) ).xyz +","texture2D( tDiffuse, gl_FragCoord.xy  * resolution + dir * ( 2.0 / 3.0 - 0.5 ) ).xyz );","vec3 rgbB = rgbA * 0.5 + 0.25 * (","texture2D( tDiffuse, gl_FragCoord.xy  * resolution + dir * -0.5 ).xyz +","texture2D( tDiffuse, gl_FragCoord.xy  * resolution + dir * 0.5 ).xyz );","float lumaB = dot( rgbB, luma );","if ( ( lumaB < lumaMin ) || ( lumaB > lumaMax ) ) {","gl_FragColor = vec4( rgbA, opacity );","} else {","gl_FragColor = vec4( rgbB, opacity );","}","}"].join("\n")};THREE.EffectComposer=function(d,c){this.renderer=d;this.renderTarget1=c;if(this.renderTarget1===undefined){var b=window.innerWidth||1;var a=window.innerHeight||1;this.renderTargetParameters={minFilter:THREE.LinearFilter,magFilter:THREE.LinearFilter,format:THREE.RGBFormat,stencilBuffer:false};this.renderTarget1=new THREE.WebGLRenderTarget(b,a,this.renderTargetParameters)}this.renderTarget2=this.renderTarget1.clone();this.writeBuffer=this.renderTarget1;this.readBuffer=this.renderTarget2;this.passes=[];if(THREE.CopyShader===undefined){console.error("THREE.EffectComposer relies on THREE.CopyShader")}this.copyPass=new THREE.ShaderPass(THREE.CopyShader)};THREE.EffectComposer.prototype={swapBuffers:function(){var a=this.readBuffer;this.readBuffer=this.writeBuffer;this.writeBuffer=a},addPass:function(a){this.passes.push(a)},render:function(f){this.writeBuffer=this.renderTarget1;this.readBuffer=this.renderTarget2;var a=false;var e,d,b=this.passes.length;for(d=0;d<b;d++){e=this.passes[d];if(!e.enabled){continue}e.render(this.renderer,this.writeBuffer,this.readBuffer,f,a);if(e.needsSwap){if(a){var c=this.renderer.context;c.stencilFunc(c.NOTEQUAL,1,4294967295);this.copyPass.render(this.renderer,this.writeBuffer,this.readBuffer,f);c.stencilFunc(c.EQUAL,1,4294967295)}this.swapBuffers()}if(e instanceof THREE.MaskPass){a=true}else{if(e instanceof THREE.ClearMaskPass){a=false}}}},reset:function(a){this.renderTarget1=a;if(this.renderTarget1===undefined){this.renderTarget1=new THREE.WebGLRenderTarget(window.innerWidth,window.innerHeight,this.renderTargetParameters)}this.renderTarget2=this.renderTarget1.clone();this.writeBuffer=this.renderTarget1;this.readBuffer=this.renderTarget2}};THREE.EffectComposer.camera=new THREE.OrthographicCamera(-1,1,1,-1,0,1);THREE.EffectComposer.quad=new THREE.Mesh(new THREE.PlaneGeometry(2,2),null);THREE.EffectComposer.scene=new THREE.Scene();THREE.EffectComposer.scene.add(THREE.EffectComposer.quad);THREE.MaskPass=function(b,a){this.scene=b;this.camera=a;this.enabled=true;this.clear=true;this.needsSwap=false;this.inverse=false};THREE.MaskPass.prototype={render:function(e,f,d,g){var c=e.context;c.colorMask(false,false,false,false);c.depthMask(false);var b,a;if(this.inverse){b=0;a=1}else{b=1;a=0}c.enable(c.STENCIL_TEST);c.stencilOp(c.REPLACE,c.REPLACE,c.REPLACE);c.stencilFunc(c.ALWAYS,b,4294967295);c.clearStencil(a);e.render(this.scene,this.camera,d,this.clear);e.render(this.scene,this.camera,f,this.clear);c.colorMask(true,true,true,true);c.depthMask(true);c.stencilFunc(c.EQUAL,1,4294967295);c.stencilOp(c.KEEP,c.KEEP,c.KEEP)}};THREE.ClearMaskPass=function(){this.enabled=true};THREE.ClearMaskPass.prototype={render:function(c,d,b,e){var a=c.context;a.disable(a.STENCIL_TEST)}};THREE.RenderPass=function(e,c,a,d,b){this.scene=e;this.camera=c;this.overrideMaterial=a;this.clearColor=d;this.clearAlpha=(b!==undefined)?b:1;this.oldClearColor=new THREE.Color();this.oldClearAlpha=1;this.enabled=true;this.clear=true;this.needsSwap=false};THREE.RenderPass.prototype={render:function(b,c,a,d){this.scene.overrideMaterial=this.overrideMaterial;if(this.clearColor){this.oldClearColor.copy(b.getClearColor());this.oldClearAlpha=b.getClearAlpha();b.setClearColor(this.clearColor,this.clearAlpha)}b.render(this.scene,this.camera,a,this.clear);if(this.clearColor){b.setClearColor(this.oldClearColor,this.oldClearAlpha)}this.scene.overrideMaterial=null}};THREE.ShaderPass=function(a,b){this.textureID=(b!==undefined)?b:"tDiffuse";this.uniforms=THREE.UniformsUtils.clone(a.uniforms);this.material=new THREE.ShaderMaterial({uniforms:this.uniforms,vertexShader:a.vertexShader,fragmentShader:a.fragmentShader});this.renderToScreen=false;this.enabled=true;this.needsSwap=true;this.clear=false};THREE.ShaderPass.prototype={render:function(b,c,a,d){if(this.uniforms[this.textureID]){this.uniforms[this.textureID].value=a}THREE.EffectComposer.quad.material=this.material;if(this.renderToScreen){b.render(THREE.EffectComposer.scene,THREE.EffectComposer.camera)}else{b.render(THREE.EffectComposer.scene,THREE.EffectComposer.camera,c,this.clear)}}};THREE.BloomPass=function(g,a,f,d){g=(g!==undefined)?g:1;a=(a!==undefined)?a:25;f=(f!==undefined)?f:4;d=(d!==undefined)?d:256;var e={minFilter:THREE.LinearFilter,magFilter:THREE.LinearFilter,format:THREE.RGBFormat};this.renderTargetX=new THREE.WebGLRenderTarget(d,d,e);this.renderTargetY=new THREE.WebGLRenderTarget(d,d,e);if(THREE.CopyShader===undefined){console.error("THREE.BloomPass relies on THREE.CopyShader")}var c=THREE.CopyShader;this.copyUniforms=THREE.UniformsUtils.clone(c.uniforms);this.copyUniforms.opacity.value=g;this.materialCopy=new THREE.ShaderMaterial({uniforms:this.copyUniforms,vertexShader:c.vertexShader,fragmentShader:c.fragmentShader,blending:THREE.AdditiveBlending,transparent:true});if(THREE.ConvolutionShader===undefined){console.error("THREE.BloomPass relies on THREE.ConvolutionShader")}var b=THREE.ConvolutionShader;this.convolutionUniforms=THREE.UniformsUtils.clone(b.uniforms);this.convolutionUniforms.uImageIncrement.value=THREE.BloomPass.blurx;this.convolutionUniforms.cKernel.value=THREE.ConvolutionShader.buildKernel(f);this.materialConvolution=new THREE.ShaderMaterial({uniforms:this.convolutionUniforms,vertexShader:b.vertexShader,fragmentShader:b.fragmentShader,defines:{KERNEL_SIZE_FLOAT:a.toFixed(1),KERNEL_SIZE_INT:a.toFixed(0)}});this.enabled=true;this.needsSwap=false;this.clear=false};THREE.BloomPass.prototype={render:function(c,d,b,e,a){if(a){c.context.disable(c.context.STENCIL_TEST)}THREE.EffectComposer.quad.material=this.materialConvolution;this.convolutionUniforms.tDiffuse.value=b;this.convolutionUniforms.uImageIncrement.value=THREE.BloomPass.blurX;c.render(THREE.EffectComposer.scene,THREE.EffectComposer.camera,this.renderTargetX,true);this.convolutionUniforms.tDiffuse.value=this.renderTargetX;this.convolutionUniforms.uImageIncrement.value=THREE.BloomPass.blurY;c.render(THREE.EffectComposer.scene,THREE.EffectComposer.camera,this.renderTargetY,true);THREE.EffectComposer.quad.material=this.materialCopy;this.copyUniforms.tDiffuse.value=this.renderTargetY;if(a){c.context.enable(c.context.STENCIL_TEST)}c.render(THREE.EffectComposer.scene,THREE.EffectComposer.camera,b,this.clear)}};THREE.BloomPass.blurX=new THREE.Vector2(0.001953125,0);THREE.BloomPass.blurY=new THREE.Vector2(0,0.001953125);