Browse Source

Updated builds.

Mr.doob 11 years ago
parent
commit
bedeb31a22
2 changed files with 19 additions and 14 deletions
  1. 6 1
      build/three.js
  2. 13 13
      build/three.min.js

+ 6 - 1
build/three.js

@@ -15552,9 +15552,14 @@ THREE.CanvasRenderer = function ( parameters ) {
 
 
 		}
 		}
 
 
-
 	};
 	};
 
 
+	// compatibility
+
+	this.clearColor = function () {};
+	this.clearDepth = function () {};
+	this.clearStencil = function () {};
+
 	this.render = function ( scene, camera ) {
 	this.render = function ( scene, camera ) {
 
 
 		if ( camera instanceof THREE.Camera === false ) {
 		if ( camera instanceof THREE.Camera === false ) {

+ 13 - 13
build/three.min.js

@@ -305,19 +305,19 @@ new THREE.Projector,w=void 0!==a.canvas?a.canvas:document.createElement("canvas"
 cb,Ma,fb,sb,pb,va=new THREE.Box2,la=new THREE.Box2,Ea=new THREE.Box2,gb=new THREE.Color,ra=new THREE.Color,fa=new THREE.Color,ta=new THREE.Vector3,Pa,j,Oa,ua,La,Fa,Ra=16;Pa=document.createElement("canvas");Pa.width=Pa.height=2;j=Pa.getContext("2d");j.fillStyle="rgba(0,0,0,1)";j.fillRect(0,0,2,2);Oa=j.getImageData(0,0,2,2);ua=Oa.data;La=document.createElement("canvas");La.width=La.height=Ra;Fa=La.getContext("2d");Fa.translate(-Ra/2,-Ra/2);Fa.scale(Ra,Ra);Ra--;void 0===D.setLineDash&&(D.setLineDash=
 cb,Ma,fb,sb,pb,va=new THREE.Box2,la=new THREE.Box2,Ea=new THREE.Box2,gb=new THREE.Color,ra=new THREE.Color,fa=new THREE.Color,ta=new THREE.Vector3,Pa,j,Oa,ua,La,Fa,Ra=16;Pa=document.createElement("canvas");Pa.width=Pa.height=2;j=Pa.getContext("2d");j.fillStyle="rgba(0,0,0,1)";j.fillRect(0,0,2,2);Oa=j.getImageData(0,0,2,2);ua=Oa.data;La=document.createElement("canvas");La.width=La.height=Ra;Fa=La.getContext("2d");Fa.translate(-Ra/2,-Ra/2);Fa.scale(Ra,Ra);Ra--;void 0===D.setLineDash&&(D.setLineDash=
 void 0!==D.mozDash?function(a){D.mozDash=null!==a[0]?a:null}:function(){});this.domElement=w;this.devicePixelRatio=void 0!==a.devicePixelRatio?a.devicePixelRatio:void 0!==self.devicePixelRatio?self.devicePixelRatio:1;this.sortElements=this.sortObjects=this.autoClear=!0;this.info={render:{vertices:0,faces:0}};this.supportsVertexTextures=function(){};this.setFaceCulling=function(){};this.setSize=function(a,b,c){y=a*this.devicePixelRatio;E=b*this.devicePixelRatio;A=Math.floor(y/2);K=Math.floor(E/2);
 void 0!==D.mozDash?function(a){D.mozDash=null!==a[0]?a:null}:function(){});this.domElement=w;this.devicePixelRatio=void 0!==a.devicePixelRatio?a.devicePixelRatio:void 0!==self.devicePixelRatio?self.devicePixelRatio:1;this.sortElements=this.sortObjects=this.autoClear=!0;this.info={render:{vertices:0,faces:0}};this.supportsVertexTextures=function(){};this.setFaceCulling=function(){};this.setSize=function(a,b,c){y=a*this.devicePixelRatio;E=b*this.devicePixelRatio;A=Math.floor(y/2);K=Math.floor(E/2);
 w.width=y;w.height=E;1!==this.devicePixelRatio&&!1!==c&&(w.style.width=a+"px",w.style.height=b+"px");va.set(new THREE.Vector2(-A,-K),new THREE.Vector2(A,K));la.set(new THREE.Vector2(-A,-K),new THREE.Vector2(A,K));x=1;I=0;na=ca=J=M=B=null};this.setClearColor=function(a,b){F.set(a);O=void 0!==b?b:1;la.set(new THREE.Vector2(-A,-K),new THREE.Vector2(A,K))};this.setClearColorHex=function(a,b){console.warn("DEPRECATED: .setClearColorHex() is being removed. Use .setClearColor() instead.");this.setClearColor(a,
 w.width=y;w.height=E;1!==this.devicePixelRatio&&!1!==c&&(w.style.width=a+"px",w.style.height=b+"px");va.set(new THREE.Vector2(-A,-K),new THREE.Vector2(A,K));la.set(new THREE.Vector2(-A,-K),new THREE.Vector2(A,K));x=1;I=0;na=ca=J=M=B=null};this.setClearColor=function(a,b){F.set(a);O=void 0!==b?b:1;la.set(new THREE.Vector2(-A,-K),new THREE.Vector2(A,K))};this.setClearColorHex=function(a,b){console.warn("DEPRECATED: .setClearColorHex() is being removed. Use .setClearColor() instead.");this.setClearColor(a,
-b)};this.getMaxAnisotropy=function(){return 0};this.clear=function(){D.setTransform(1,0,0,-1,A,K);!1===la.empty()&&(la.intersect(va),la.expandByScalar(2),1>O&&D.clearRect(la.min.x|0,la.min.y|0,la.max.x-la.min.x|0,la.max.y-la.min.y|0),0<O&&(k(THREE.NormalBlending),i(1),s("rgba("+Math.floor(255*F.r)+","+Math.floor(255*F.g)+","+Math.floor(255*F.b)+","+O+")"),D.fillRect(la.min.x|0,la.min.y|0,la.max.x-la.min.x|0,la.max.y-la.min.y|0)),la.makeEmpty())};this.render=function(a,j){if(!1===j instanceof THREE.Camera)console.error("THREE.CanvasRenderer.render: camera is not an instance of THREE.Camera.");
-else{!0===this.autoClear&&this.clear();D.setTransform(1,0,0,-1,A,K);u.info.render.vertices=0;u.info.render.faces=0;r=G.projectScene(a,j,this.sortObjects,this.sortElements);v=r.elements;z=r.lights;Q=j;gb.setRGB(0,0,0);ra.setRGB(0,0,0);fa.setRGB(0,0,0);for(var y=0,F=z.length;y<F;y++){var B=z[y],E=B.color;B instanceof THREE.AmbientLight?gb.add(E):B instanceof THREE.DirectionalLight?ra.add(E):B instanceof THREE.PointLight&&fa.add(E)}y=0;for(F=v.length;y<F;y++){var x=v[y],w=x.material;if(!(void 0===w||
-!1===w.visible)){Ea.makeEmpty();if(x instanceof THREE.RenderableSprite){R=x;R.x*=A;R.y*=K;var B=R,E=x,I=w;i(I.opacity);k(I.blending);x=E.scale.x*A;w=E.scale.y*K;Ea.min.set(B.x-0.5*x,B.y-0.5*w);Ea.max.set(B.x+0.5*x,B.y+0.5*w);!1===va.isIntersectionBox(Ea)?Ea.makeEmpty():I instanceof THREE.SpriteMaterial||I instanceof THREE.ParticleSystemMaterial?(null!==I.map?(E=I.map.image,D.save(),D.translate(B.x,B.y),D.rotate(-I.rotation),D.scale(x,-w),D.drawImage(E,0,0,E.width,E.height,-0.5,-0.5,1,1)):(s(I.color.getStyle()),
-D.save(),D.translate(B.x,B.y),D.rotate(-E.rotation),D.scale(x,w),D.fillRect(-0.5,-0.5,1,1)),D.restore()):I instanceof THREE.SpriteCanvasMaterial&&(t(I.color.getStyle()),s(I.color.getStyle()),D.save(),D.translate(B.x,B.y),D.rotate(-E.rotation),D.scale(x,w),I.program(D),D.restore())}else if(x instanceof THREE.RenderableLine){if(R=x.v1,L=x.v2,R.positionScreen.x*=A,R.positionScreen.y*=K,L.positionScreen.x*=A,L.positionScreen.y*=K,Ea.setFromPoints([R.positionScreen,L.positionScreen]),!0===va.isIntersectionBox(Ea))if(B=
-R,E=L,I=x,x=w,i(x.opacity),k(x.blending),D.beginPath(),D.moveTo(B.positionScreen.x,B.positionScreen.y),D.lineTo(E.positionScreen.x,E.positionScreen.y),x instanceof THREE.LineBasicMaterial){m(x.linewidth);l(x.linecap);p(x.linejoin);if(x.vertexColors!==THREE.VertexColors)t(x.color.getStyle());else if(w=I.vertexColors[0].getStyle(),I=I.vertexColors[1].getStyle(),w===I)t(w);else{try{var O=D.createLinearGradient(B.positionScreen.x,B.positionScreen.y,E.positionScreen.x,E.positionScreen.y);O.addColorStop(0,
-w);O.addColorStop(1,I)}catch(C){O=w}t(O)}D.stroke();Ea.expandByScalar(2*x.linewidth)}else x instanceof THREE.LineDashedMaterial&&(m(x.linewidth),l(x.linecap),p(x.linejoin),t(x.color.getStyle()),q(x.dashSize,x.gapSize),D.stroke(),Ea.expandByScalar(2*x.linewidth),q(null,null))}else if(x instanceof THREE.RenderableFace3){R=x.v1;L=x.v2;da=x.v3;if(-1>R.positionScreen.z||1<R.positionScreen.z)continue;if(-1>L.positionScreen.z||1<L.positionScreen.z)continue;if(-1>da.positionScreen.z||1<da.positionScreen.z)continue;
-R.positionScreen.x*=A;R.positionScreen.y*=K;L.positionScreen.x*=A;L.positionScreen.y*=K;da.positionScreen.x*=A;da.positionScreen.y*=K;0<w.overdraw&&(g(R.positionScreen,L.positionScreen,w.overdraw),g(L.positionScreen,da.positionScreen,w.overdraw),g(da.positionScreen,R.positionScreen,w.overdraw));Ea.setFromPoints([R.positionScreen,L.positionScreen,da.positionScreen]);if(!0===va.isIntersectionBox(Ea)){B=R;E=L;I=da;u.info.render.vertices+=3;u.info.render.faces++;i(w.opacity);k(w.blending);za=B.positionScreen.x;
-Ba=B.positionScreen.y;ba=E.positionScreen.x;Aa=E.positionScreen.y;$=I.positionScreen.x;ea=I.positionScreen.y;var J=za,M=Ba,ca=ba,ka=Aa,na=$,pa=ea;D.beginPath();D.moveTo(J,M);D.lineTo(ca,ka);D.lineTo(na,pa);D.closePath();(w instanceof THREE.MeshLambertMaterial||w instanceof THREE.MeshPhongMaterial)&&null===w.map?(sa.copy(w.color),ha.copy(w.emissive),w.vertexColors===THREE.FaceColors&&sa.multiply(x.color),!1===w.wireframe&&w.shading===THREE.SmoothShading&&3===x.vertexNormalsLength?(P.copy(gb),Y.copy(gb),
-U.copy(gb),b(x.v1.positionWorld,x.vertexNormalsModel[0],P),b(x.v2.positionWorld,x.vertexNormalsModel[1],Y),b(x.v3.positionWorld,x.vertexNormalsModel[2],U),P.multiply(sa).add(ha),Y.multiply(sa).add(ha),U.multiply(sa).add(ha),ja.addColors(Y,U).multiplyScalar(0.5),Qa=h(P,Y,U,ja),f(za,Ba,ba,Aa,$,ea,0,0,1,0,0,1,Qa)):(V.copy(gb),b(x.centroidModel,x.normalModel,V),V.multiply(sa).add(ha),!0===w.wireframe?c(V,w.wireframeLinewidth,w.wireframeLinecap,w.wireframeLinejoin):d(V))):w instanceof THREE.MeshBasicMaterial||
-w instanceof THREE.MeshLambertMaterial||w instanceof THREE.MeshPhongMaterial?null!==w.map?w.map.mapping instanceof THREE.UVMapping&&(wa=x.uvs[0],e(za,Ba,ba,Aa,$,ea,wa[0].x,wa[0].y,wa[1].x,wa[1].y,wa[2].x,wa[2].y,w.map)):null!==w.envMap?w.envMap.mapping instanceof THREE.SphericalReflectionMapping&&(ta.copy(x.vertexNormalsModelView[0]),bb=0.5*ta.x+0.5,cb=0.5*ta.y+0.5,ta.copy(x.vertexNormalsModelView[1]),Ma=0.5*ta.x+0.5,fb=0.5*ta.y+0.5,ta.copy(x.vertexNormalsModelView[2]),sb=0.5*ta.x+0.5,pb=0.5*ta.y+
-0.5,e(za,Ba,ba,Aa,$,ea,bb,cb,Ma,fb,sb,pb,w.envMap)):(V.copy(w.color),w.vertexColors===THREE.FaceColors&&V.multiply(x.color),!0===w.wireframe?c(V,w.wireframeLinewidth,w.wireframeLinecap,w.wireframeLinejoin):d(V)):w instanceof THREE.MeshDepthMaterial?(Da=Q.near,Ua=Q.far,P.r=P.g=P.b=1-n(B.positionScreen.z*B.positionScreen.w,Da,Ua),Y.r=Y.g=Y.b=1-n(E.positionScreen.z*E.positionScreen.w,Da,Ua),U.r=U.g=U.b=1-n(I.positionScreen.z*I.positionScreen.w,Da,Ua),ja.addColors(Y,U).multiplyScalar(0.5),Qa=h(P,Y,U,
-ja),f(za,Ba,ba,Aa,$,ea,0,0,1,0,0,1,Qa)):w instanceof THREE.MeshNormalMaterial&&(B=void 0,w.shading===THREE.FlatShading?(B=x.normalModelView,V.setRGB(B.x,B.y,B.z).multiplyScalar(0.5).addScalar(0.5),!0===w.wireframe?c(V,w.wireframeLinewidth,w.wireframeLinecap,w.wireframeLinejoin):d(V)):w.shading===THREE.SmoothShading&&(B=x.vertexNormalsModelView[0],P.setRGB(B.x,B.y,B.z).multiplyScalar(0.5).addScalar(0.5),B=x.vertexNormalsModelView[1],Y.setRGB(B.x,B.y,B.z).multiplyScalar(0.5).addScalar(0.5),B=x.vertexNormalsModelView[2],
-U.setRGB(B.x,B.y,B.z).multiplyScalar(0.5).addScalar(0.5),ja.addColors(Y,U).multiplyScalar(0.5),Qa=h(P,Y,U,ja),f(za,Ba,ba,Aa,$,ea,0,0,1,0,0,1,Qa)))}}la.union(Ea)}}D.setTransform(1,0,0,1,0,0)}}};THREE.ShaderChunk={fog_pars_fragment:"#ifdef USE_FOG\nuniform vec3 fogColor;\n#ifdef FOG_EXP2\nuniform float fogDensity;\n#else\nuniform float fogNear;\nuniform float fogFar;\n#endif\n#endif",fog_fragment:"#ifdef USE_FOG\nfloat depth = gl_FragCoord.z / gl_FragCoord.w;\n#ifdef FOG_EXP2\nconst float LOG2 = 1.442695;\nfloat fogFactor = exp2( - fogDensity * fogDensity * depth * depth * LOG2 );\nfogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );\n#else\nfloat fogFactor = smoothstep( fogNear, fogFar, depth );\n#endif\ngl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );\n#endif",
+b)};this.getMaxAnisotropy=function(){return 0};this.clear=function(){D.setTransform(1,0,0,-1,A,K);!1===la.empty()&&(la.intersect(va),la.expandByScalar(2),1>O&&D.clearRect(la.min.x|0,la.min.y|0,la.max.x-la.min.x|0,la.max.y-la.min.y|0),0<O&&(k(THREE.NormalBlending),i(1),s("rgba("+Math.floor(255*F.r)+","+Math.floor(255*F.g)+","+Math.floor(255*F.b)+","+O+")"),D.fillRect(la.min.x|0,la.min.y|0,la.max.x-la.min.x|0,la.max.y-la.min.y|0)),la.makeEmpty())};this.clearColor=function(){};this.clearDepth=function(){};
+this.clearStencil=function(){};this.render=function(a,j){if(!1===j instanceof THREE.Camera)console.error("THREE.CanvasRenderer.render: camera is not an instance of THREE.Camera.");else{!0===this.autoClear&&this.clear();D.setTransform(1,0,0,-1,A,K);u.info.render.vertices=0;u.info.render.faces=0;r=G.projectScene(a,j,this.sortObjects,this.sortElements);v=r.elements;z=r.lights;Q=j;gb.setRGB(0,0,0);ra.setRGB(0,0,0);fa.setRGB(0,0,0);for(var y=0,F=z.length;y<F;y++){var B=z[y],E=B.color;B instanceof THREE.AmbientLight?
+gb.add(E):B instanceof THREE.DirectionalLight?ra.add(E):B instanceof THREE.PointLight&&fa.add(E)}y=0;for(F=v.length;y<F;y++){var x=v[y],w=x.material;if(!(void 0===w||!1===w.visible)){Ea.makeEmpty();if(x instanceof THREE.RenderableSprite){R=x;R.x*=A;R.y*=K;var B=R,E=x,I=w;i(I.opacity);k(I.blending);x=E.scale.x*A;w=E.scale.y*K;Ea.min.set(B.x-0.5*x,B.y-0.5*w);Ea.max.set(B.x+0.5*x,B.y+0.5*w);!1===va.isIntersectionBox(Ea)?Ea.makeEmpty():I instanceof THREE.SpriteMaterial||I instanceof THREE.ParticleSystemMaterial?
+(null!==I.map?(E=I.map.image,D.save(),D.translate(B.x,B.y),D.rotate(-I.rotation),D.scale(x,-w),D.drawImage(E,0,0,E.width,E.height,-0.5,-0.5,1,1)):(s(I.color.getStyle()),D.save(),D.translate(B.x,B.y),D.rotate(-E.rotation),D.scale(x,w),D.fillRect(-0.5,-0.5,1,1)),D.restore()):I instanceof THREE.SpriteCanvasMaterial&&(t(I.color.getStyle()),s(I.color.getStyle()),D.save(),D.translate(B.x,B.y),D.rotate(-E.rotation),D.scale(x,w),I.program(D),D.restore())}else if(x instanceof THREE.RenderableLine){if(R=x.v1,
+L=x.v2,R.positionScreen.x*=A,R.positionScreen.y*=K,L.positionScreen.x*=A,L.positionScreen.y*=K,Ea.setFromPoints([R.positionScreen,L.positionScreen]),!0===va.isIntersectionBox(Ea))if(B=R,E=L,I=x,x=w,i(x.opacity),k(x.blending),D.beginPath(),D.moveTo(B.positionScreen.x,B.positionScreen.y),D.lineTo(E.positionScreen.x,E.positionScreen.y),x instanceof THREE.LineBasicMaterial){m(x.linewidth);l(x.linecap);p(x.linejoin);if(x.vertexColors!==THREE.VertexColors)t(x.color.getStyle());else if(w=I.vertexColors[0].getStyle(),
+I=I.vertexColors[1].getStyle(),w===I)t(w);else{try{var O=D.createLinearGradient(B.positionScreen.x,B.positionScreen.y,E.positionScreen.x,E.positionScreen.y);O.addColorStop(0,w);O.addColorStop(1,I)}catch(C){O=w}t(O)}D.stroke();Ea.expandByScalar(2*x.linewidth)}else x instanceof THREE.LineDashedMaterial&&(m(x.linewidth),l(x.linecap),p(x.linejoin),t(x.color.getStyle()),q(x.dashSize,x.gapSize),D.stroke(),Ea.expandByScalar(2*x.linewidth),q(null,null))}else if(x instanceof THREE.RenderableFace3){R=x.v1;
+L=x.v2;da=x.v3;if(-1>R.positionScreen.z||1<R.positionScreen.z)continue;if(-1>L.positionScreen.z||1<L.positionScreen.z)continue;if(-1>da.positionScreen.z||1<da.positionScreen.z)continue;R.positionScreen.x*=A;R.positionScreen.y*=K;L.positionScreen.x*=A;L.positionScreen.y*=K;da.positionScreen.x*=A;da.positionScreen.y*=K;0<w.overdraw&&(g(R.positionScreen,L.positionScreen,w.overdraw),g(L.positionScreen,da.positionScreen,w.overdraw),g(da.positionScreen,R.positionScreen,w.overdraw));Ea.setFromPoints([R.positionScreen,
+L.positionScreen,da.positionScreen]);if(!0===va.isIntersectionBox(Ea)){B=R;E=L;I=da;u.info.render.vertices+=3;u.info.render.faces++;i(w.opacity);k(w.blending);za=B.positionScreen.x;Ba=B.positionScreen.y;ba=E.positionScreen.x;Aa=E.positionScreen.y;$=I.positionScreen.x;ea=I.positionScreen.y;var J=za,M=Ba,ca=ba,ka=Aa,na=$,pa=ea;D.beginPath();D.moveTo(J,M);D.lineTo(ca,ka);D.lineTo(na,pa);D.closePath();(w instanceof THREE.MeshLambertMaterial||w instanceof THREE.MeshPhongMaterial)&&null===w.map?(sa.copy(w.color),
+ha.copy(w.emissive),w.vertexColors===THREE.FaceColors&&sa.multiply(x.color),!1===w.wireframe&&w.shading===THREE.SmoothShading&&3===x.vertexNormalsLength?(P.copy(gb),Y.copy(gb),U.copy(gb),b(x.v1.positionWorld,x.vertexNormalsModel[0],P),b(x.v2.positionWorld,x.vertexNormalsModel[1],Y),b(x.v3.positionWorld,x.vertexNormalsModel[2],U),P.multiply(sa).add(ha),Y.multiply(sa).add(ha),U.multiply(sa).add(ha),ja.addColors(Y,U).multiplyScalar(0.5),Qa=h(P,Y,U,ja),f(za,Ba,ba,Aa,$,ea,0,0,1,0,0,1,Qa)):(V.copy(gb),
+b(x.centroidModel,x.normalModel,V),V.multiply(sa).add(ha),!0===w.wireframe?c(V,w.wireframeLinewidth,w.wireframeLinecap,w.wireframeLinejoin):d(V))):w instanceof THREE.MeshBasicMaterial||w instanceof THREE.MeshLambertMaterial||w instanceof THREE.MeshPhongMaterial?null!==w.map?w.map.mapping instanceof THREE.UVMapping&&(wa=x.uvs[0],e(za,Ba,ba,Aa,$,ea,wa[0].x,wa[0].y,wa[1].x,wa[1].y,wa[2].x,wa[2].y,w.map)):null!==w.envMap?w.envMap.mapping instanceof THREE.SphericalReflectionMapping&&(ta.copy(x.vertexNormalsModelView[0]),
+bb=0.5*ta.x+0.5,cb=0.5*ta.y+0.5,ta.copy(x.vertexNormalsModelView[1]),Ma=0.5*ta.x+0.5,fb=0.5*ta.y+0.5,ta.copy(x.vertexNormalsModelView[2]),sb=0.5*ta.x+0.5,pb=0.5*ta.y+0.5,e(za,Ba,ba,Aa,$,ea,bb,cb,Ma,fb,sb,pb,w.envMap)):(V.copy(w.color),w.vertexColors===THREE.FaceColors&&V.multiply(x.color),!0===w.wireframe?c(V,w.wireframeLinewidth,w.wireframeLinecap,w.wireframeLinejoin):d(V)):w instanceof THREE.MeshDepthMaterial?(Da=Q.near,Ua=Q.far,P.r=P.g=P.b=1-n(B.positionScreen.z*B.positionScreen.w,Da,Ua),Y.r=Y.g=
+Y.b=1-n(E.positionScreen.z*E.positionScreen.w,Da,Ua),U.r=U.g=U.b=1-n(I.positionScreen.z*I.positionScreen.w,Da,Ua),ja.addColors(Y,U).multiplyScalar(0.5),Qa=h(P,Y,U,ja),f(za,Ba,ba,Aa,$,ea,0,0,1,0,0,1,Qa)):w instanceof THREE.MeshNormalMaterial&&(B=void 0,w.shading===THREE.FlatShading?(B=x.normalModelView,V.setRGB(B.x,B.y,B.z).multiplyScalar(0.5).addScalar(0.5),!0===w.wireframe?c(V,w.wireframeLinewidth,w.wireframeLinecap,w.wireframeLinejoin):d(V)):w.shading===THREE.SmoothShading&&(B=x.vertexNormalsModelView[0],
+P.setRGB(B.x,B.y,B.z).multiplyScalar(0.5).addScalar(0.5),B=x.vertexNormalsModelView[1],Y.setRGB(B.x,B.y,B.z).multiplyScalar(0.5).addScalar(0.5),B=x.vertexNormalsModelView[2],U.setRGB(B.x,B.y,B.z).multiplyScalar(0.5).addScalar(0.5),ja.addColors(Y,U).multiplyScalar(0.5),Qa=h(P,Y,U,ja),f(za,Ba,ba,Aa,$,ea,0,0,1,0,0,1,Qa)))}}la.union(Ea)}}D.setTransform(1,0,0,1,0,0)}}};THREE.ShaderChunk={fog_pars_fragment:"#ifdef USE_FOG\nuniform vec3 fogColor;\n#ifdef FOG_EXP2\nuniform float fogDensity;\n#else\nuniform float fogNear;\nuniform float fogFar;\n#endif\n#endif",fog_fragment:"#ifdef USE_FOG\nfloat depth = gl_FragCoord.z / gl_FragCoord.w;\n#ifdef FOG_EXP2\nconst float LOG2 = 1.442695;\nfloat fogFactor = exp2( - fogDensity * fogDensity * depth * depth * LOG2 );\nfogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );\n#else\nfloat fogFactor = smoothstep( fogNear, fogFar, depth );\n#endif\ngl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );\n#endif",
 envmap_pars_fragment:"#ifdef USE_ENVMAP\nuniform float reflectivity;\nuniform samplerCube envMap;\nuniform float flipEnvMap;\nuniform int combine;\n#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\nuniform bool useRefract;\nuniform float refractionRatio;\n#else\nvarying vec3 vReflect;\n#endif\n#endif",envmap_fragment:"#ifdef USE_ENVMAP\nvec3 reflectVec;\n#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\nvec3 cameraToVertex = normalize( vWorldPosition - cameraPosition );\nif ( useRefract ) {\nreflectVec = refract( cameraToVertex, normal, refractionRatio );\n} else { \nreflectVec = reflect( cameraToVertex, normal );\n}\n#else\nreflectVec = vReflect;\n#endif\n#ifdef DOUBLE_SIDED\nfloat flipNormal = ( -1.0 + 2.0 * float( gl_FrontFacing ) );\nvec4 cubeColor = textureCube( envMap, flipNormal * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n#else\nvec4 cubeColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n#endif\n#ifdef GAMMA_INPUT\ncubeColor.xyz *= cubeColor.xyz;\n#endif\nif ( combine == 1 ) {\ngl_FragColor.xyz = mix( gl_FragColor.xyz, cubeColor.xyz, specularStrength * reflectivity );\n} else if ( combine == 2 ) {\ngl_FragColor.xyz += cubeColor.xyz * specularStrength * reflectivity;\n} else {\ngl_FragColor.xyz = mix( gl_FragColor.xyz, gl_FragColor.xyz * cubeColor.xyz, specularStrength * reflectivity );\n}\n#endif",
 envmap_pars_fragment:"#ifdef USE_ENVMAP\nuniform float reflectivity;\nuniform samplerCube envMap;\nuniform float flipEnvMap;\nuniform int combine;\n#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\nuniform bool useRefract;\nuniform float refractionRatio;\n#else\nvarying vec3 vReflect;\n#endif\n#endif",envmap_fragment:"#ifdef USE_ENVMAP\nvec3 reflectVec;\n#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\nvec3 cameraToVertex = normalize( vWorldPosition - cameraPosition );\nif ( useRefract ) {\nreflectVec = refract( cameraToVertex, normal, refractionRatio );\n} else { \nreflectVec = reflect( cameraToVertex, normal );\n}\n#else\nreflectVec = vReflect;\n#endif\n#ifdef DOUBLE_SIDED\nfloat flipNormal = ( -1.0 + 2.0 * float( gl_FrontFacing ) );\nvec4 cubeColor = textureCube( envMap, flipNormal * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n#else\nvec4 cubeColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n#endif\n#ifdef GAMMA_INPUT\ncubeColor.xyz *= cubeColor.xyz;\n#endif\nif ( combine == 1 ) {\ngl_FragColor.xyz = mix( gl_FragColor.xyz, cubeColor.xyz, specularStrength * reflectivity );\n} else if ( combine == 2 ) {\ngl_FragColor.xyz += cubeColor.xyz * specularStrength * reflectivity;\n} else {\ngl_FragColor.xyz = mix( gl_FragColor.xyz, gl_FragColor.xyz * cubeColor.xyz, specularStrength * reflectivity );\n}\n#endif",
 envmap_pars_vertex:"#if defined( USE_ENVMAP ) && ! defined( USE_BUMPMAP ) && ! defined( USE_NORMALMAP )\nvarying vec3 vReflect;\nuniform float refractionRatio;\nuniform bool useRefract;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( PHONG ) || defined( LAMBERT ) || defined ( USE_SHADOWMAP )\n#ifdef USE_SKINNING\nvec4 worldPosition = modelMatrix * skinned;\n#endif\n#if defined( USE_MORPHTARGETS ) && ! defined( USE_SKINNING )\nvec4 worldPosition = modelMatrix * vec4( morphed, 1.0 );\n#endif\n#if ! defined( USE_MORPHTARGETS ) && ! defined( USE_SKINNING )\nvec4 worldPosition = modelMatrix * vec4( position, 1.0 );\n#endif\n#endif",
 envmap_pars_vertex:"#if defined( USE_ENVMAP ) && ! defined( USE_BUMPMAP ) && ! defined( USE_NORMALMAP )\nvarying vec3 vReflect;\nuniform float refractionRatio;\nuniform bool useRefract;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( PHONG ) || defined( LAMBERT ) || defined ( USE_SHADOWMAP )\n#ifdef USE_SKINNING\nvec4 worldPosition = modelMatrix * skinned;\n#endif\n#if defined( USE_MORPHTARGETS ) && ! defined( USE_SKINNING )\nvec4 worldPosition = modelMatrix * vec4( morphed, 1.0 );\n#endif\n#if ! defined( USE_MORPHTARGETS ) && ! defined( USE_SKINNING )\nvec4 worldPosition = modelMatrix * vec4( position, 1.0 );\n#endif\n#endif",
 envmap_vertex:"#if defined( USE_ENVMAP ) && ! defined( USE_BUMPMAP ) && ! defined( USE_NORMALMAP )\nvec3 worldNormal = mat3( modelMatrix[ 0 ].xyz, modelMatrix[ 1 ].xyz, modelMatrix[ 2 ].xyz ) * objectNormal;\nworldNormal = normalize( worldNormal );\nvec3 cameraToVertex = normalize( worldPosition.xyz - cameraPosition );\nif ( useRefract ) {\nvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n} else {\nvReflect = reflect( cameraToVertex, worldNormal );\n}\n#endif",map_particle_pars_fragment:"#ifdef USE_MAP\nuniform sampler2D map;\n#endif",
 envmap_vertex:"#if defined( USE_ENVMAP ) && ! defined( USE_BUMPMAP ) && ! defined( USE_NORMALMAP )\nvec3 worldNormal = mat3( modelMatrix[ 0 ].xyz, modelMatrix[ 1 ].xyz, modelMatrix[ 2 ].xyz ) * objectNormal;\nworldNormal = normalize( worldNormal );\nvec3 cameraToVertex = normalize( worldPosition.xyz - cameraPosition );\nif ( useRefract ) {\nvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n} else {\nvReflect = reflect( cameraToVertex, worldNormal );\n}\n#endif",map_particle_pars_fragment:"#ifdef USE_MAP\nuniform sampler2D map;\n#endif",