Browse Source

Added keeping stats also for point sprites.

alteredq 13 years ago
parent
commit
0fd25ba910
3 changed files with 40 additions and 37 deletions
  1. 24 24
      build/Three.js
  2. 12 12
      build/custom/ThreeWebGL.js
  3. 4 1
      src/renderers/WebGLRenderer.js

+ 24 - 24
build/Three.js

@@ -254,7 +254,7 @@ default:return l.LINEAR}}function F(a){switch(a){case THREE.RepeatWrapping:retur
 case THREE.ByteType:return l.BYTE;case THREE.UnsignedByteType:return l.UNSIGNED_BYTE;case THREE.ShortType:return l.SHORT;case THREE.UnsignedShortType:return l.UNSIGNED_SHORT;case THREE.IntType:return l.INT;case THREE.UnsignedShortType:return l.UNSIGNED_INT;case THREE.FloatType:return l.FLOAT;case THREE.AlphaFormat:return l.ALPHA;case THREE.RGBFormat:return l.RGB;case THREE.RGBAFormat:return l.RGBA;case THREE.LuminanceFormat:return l.LUMINANCE;case THREE.LuminanceAlphaFormat:return l.LUMINANCE_ALPHA}return 0}
 var a=a||{},I=a.canvas!==void 0?a.canvas:document.createElement("canvas"),R=a.precision!==void 0?a.precision:"highp",x=a.antialias!==void 0?a.antialias:!1,A=a.stencil!==void 0?a.stencil:!0,K=a.preserveDrawingBuffer!==void 0?a.preserveDrawingBuffer:!1,X=a.clearColor!==void 0?new THREE.Color(a.clearColor):new THREE.Color(0),T=a.clearAlpha!==void 0?a.clearAlpha:0,$=a.maxLights!==void 0?a.maxLights:4;this.domElement=I;this.context=null;this.autoUpdateScene=this.autoUpdateObjects=this.sortObjects=this.autoClearStencil=
 this.autoClearDepth=this.autoClearColor=this.autoClear=!0;this.physicallyBasedShading=this.gammaOutput=this.gammaInput=!1;this.shadowMapBias=0.0039;this.shadowMapDarkness=0.5;this.shadowMapHeight=this.shadowMapWidth=512;this.shadowCameraNear=1;this.shadowCameraFar=5E3;this.shadowCameraFov=50;this.shadowMapEnabled=!1;this.shadowMapSoft=this.shadowMapAutoUpdate=!0;this.maxMorphTargets=8;this.renderPluginsPre=[];this.renderPluginsPost=[];this.info={memory:{programs:0,geometries:0,textures:0},render:{calls:0,
-vertices:0,faces:0}};var V=this,l,M=[],J=null,L=null,v=-1,Y=null,aa=0,fa=null,ca=null,U=null,N=null,W=null,S=null,da=null,va=null,ea=null,na=0,la=0,sa=0,ia=0,Ba=0,wa=0,xa=new THREE.Frustum,ya=new THREE.Matrix4,za=new THREE.Vector4,Aa={ambient:[0,0,0],directional:{length:0,colors:[],positions:[]},point:{length:0,colors:[],positions:[],distances:[]}};l=function(){var a;try{if(!(a=I.getContext("experimental-webgl",{antialias:x,stencil:A,preserveDrawingBuffer:K})))throw"Error creating WebGL context.";
+vertices:0,faces:0,points:0}};var V=this,l,M=[],J=null,L=null,v=-1,Y=null,aa=0,fa=null,ca=null,U=null,N=null,W=null,S=null,da=null,va=null,ea=null,na=0,la=0,sa=0,ia=0,Ba=0,wa=0,xa=new THREE.Frustum,ya=new THREE.Matrix4,za=new THREE.Vector4,Aa={ambient:[0,0,0],directional:{length:0,colors:[],positions:[]},point:{length:0,colors:[],positions:[],distances:[]}};l=function(){var a;try{if(!(a=I.getContext("experimental-webgl",{antialias:x,stencil:A,preserveDrawingBuffer:K})))throw"Error creating WebGL context.";
 console.log(navigator.userAgent+" | "+a.getParameter(a.VERSION)+" | "+a.getParameter(a.VENDOR)+" | "+a.getParameter(a.RENDERER)+" | "+a.getParameter(a.SHADING_LANGUAGE_VERSION))}catch(b){console.error(b)}return a}();l.clearColor(0,0,0,1);l.clearDepth(1);l.clearStencil(0);l.enable(l.DEPTH_TEST);l.depthFunc(l.LEQUAL);l.frontFace(l.CCW);l.cullFace(l.BACK);l.enable(l.CULL_FACE);l.enable(l.BLEND);l.blendEquation(l.FUNC_ADD);l.blendFunc(l.SRC_ALPHA,l.ONE_MINUS_SRC_ALPHA);l.clearColor(X.r,X.g,X.b,T);this.context=
 l;var qa=l.getParameter(l.MAX_VERTEX_TEXTURE_IMAGE_UNITS)>0;this.getContext=function(){return l};this.supportsVertexTextures=function(){return qa};this.setSize=function(a,b){I.width=a;I.height=b;this.setViewport(0,0,I.width,I.height)};this.setViewport=function(a,b,c,d){na=a;la=b;sa=c;ia=d;l.viewport(na,la,sa,ia)};this.setScissor=function(a,b,c,d){l.scissor(a,b,c,d)};this.enableScissorTest=function(a){a?l.enable(l.SCISSOR_TEST):l.disable(l.SCISSOR_TEST)};this.setClearColorHex=function(a,b){X.setHex(a);
 T=b;l.clearColor(X.r,X.g,X.b,T)};this.setClearColor=function(a,b){X.copy(a);T=b;l.clearColor(X.r,X.g,X.b,T)};this.getClearColor=function(){return X};this.getClearAlpha=function(){return T};this.clear=function(a,b,c){var d=0;if(a===void 0||a)d|=l.COLOR_BUFFER_BIT;if(b===void 0||b)d|=l.DEPTH_BUFFER_BIT;if(c===void 0||c)d|=l.STENCIL_BUFFER_BIT;l.clear(d)};this.clearTarget=function(a,b,c,d){this.setRenderTarget(a);this.clear(b,c,d)};this.addPostPlugin=function(a){a.init(this);this.renderPluginsPost.push(a)};
@@ -270,29 +270,29 @@ h[i[g]],g++}else{var i=[],k=-1,j=0;h=f.morphTargetInfluences;var m,n=h.length;g=
 e.__webglTangentBuffer),l.vertexAttribPointer(b.tangent,4,l.FLOAT,!1,0,0));b.uv>=0&&(e.__webglUVBuffer?(l.bindBuffer(l.ARRAY_BUFFER,e.__webglUVBuffer),l.vertexAttribPointer(b.uv,2,l.FLOAT,!1,0,0),l.enableVertexAttribArray(b.uv)):l.disableVertexAttribArray(b.uv));b.uv2>=0&&(e.__webglUV2Buffer?(l.bindBuffer(l.ARRAY_BUFFER,e.__webglUV2Buffer),l.vertexAttribPointer(b.uv2,2,l.FLOAT,!1,0,0),l.enableVertexAttribArray(b.uv2)):l.disableVertexAttribArray(b.uv2));d.skinning&&b.skinVertexA>=0&&b.skinVertexB>=
 0&&b.skinIndex>=0&&b.skinWeight>=0&&(l.bindBuffer(l.ARRAY_BUFFER,e.__webglSkinVertexABuffer),l.vertexAttribPointer(b.skinVertexA,4,l.FLOAT,!1,0,0),l.bindBuffer(l.ARRAY_BUFFER,e.__webglSkinVertexBBuffer),l.vertexAttribPointer(b.skinVertexB,4,l.FLOAT,!1,0,0),l.bindBuffer(l.ARRAY_BUFFER,e.__webglSkinIndicesBuffer),l.vertexAttribPointer(b.skinIndex,4,l.FLOAT,!1,0,0),l.bindBuffer(l.ARRAY_BUFFER,e.__webglSkinWeightsBuffer),l.vertexAttribPointer(b.skinWeight,4,l.FLOAT,!1,0,0))}f instanceof THREE.Mesh?(d.wireframe?
 (d=d.wireframeLinewidth,d!==ea&&(l.lineWidth(d),ea=d),a&&l.bindBuffer(l.ELEMENT_ARRAY_BUFFER,e.__webglLineBuffer),l.drawElements(l.LINES,e.__webglLineCount,l.UNSIGNED_SHORT,0)):(a&&l.bindBuffer(l.ELEMENT_ARRAY_BUFFER,e.__webglFaceBuffer),l.drawElements(l.TRIANGLES,e.__webglFaceCount,l.UNSIGNED_SHORT,0)),V.info.render.calls++,V.info.render.vertices+=e.__webglFaceCount,V.info.render.faces+=e.__webglFaceCount/3):f instanceof THREE.Line?(f=f.type===THREE.LineStrip?l.LINE_STRIP:l.LINES,d=d.linewidth,d!==
-ea&&(l.lineWidth(d),ea=d),l.drawArrays(f,0,e.__webglLineCount),V.info.render.calls++):f instanceof THREE.ParticleSystem?(l.drawArrays(l.POINTS,0,e.__webglParticleCount),V.info.render.calls++):f instanceof THREE.Ribbon&&(l.drawArrays(l.TRIANGLE_STRIP,0,e.__webglVertexCount),V.info.render.calls++)}};this.render=function(a,b,c,d){var e,f,g,m,n=a.lights,o=a.fog;v=-1;this.autoUpdateObjects&&this.initWebGLObjects(a);b.parent===void 0&&(console.warn("DEPRECATED: Camera hasn't been added to a Scene. Adding it..."),
-a.add(b));this.autoUpdateScene&&a.updateMatrixWorld();i(this.renderPluginsPre,a,b);V.info.render.calls=0;V.info.render.vertices=0;V.info.render.faces=0;b.matrixWorldInverse.getInverse(b.matrixWorld);if(!b._viewMatrixArray)b._viewMatrixArray=new Float32Array(16);b.matrixWorldInverse.flattenToArray(b._viewMatrixArray);if(!b._projectionMatrixArray)b._projectionMatrixArray=new Float32Array(16);b.projectionMatrix.flattenToArray(b._projectionMatrixArray);ya.multiply(b.projectionMatrix,b.matrixWorldInverse);
-xa.setFromMatrix(ya);this.setRenderTarget(c);(this.autoClear||d)&&this.clear(this.autoClearColor,this.autoClearDepth,this.autoClearStencil);m=a.__webglObjects;d=0;for(e=m.length;d<e;d++)if(f=m[d],g=f.object,f.render=!1,g.visible&&(!(g instanceof THREE.Mesh)||!g.frustumCulled||xa.contains(g))){g.matrixWorld.flattenToArray(g._objectMatrixArray);r(g,b);var p=f,s=p.object,q=p.buffer,x=void 0,x=x=void 0,x=s.material;if(x instanceof THREE.MeshFaceMaterial){if(x=q.materialIndex,x>=0)x=s.geometry.materials[x],
-x.transparent?(p.transparent=x,p.opaque=null):(p.opaque=x,p.transparent=null)}else if(x)x.transparent?(p.transparent=x,p.opaque=null):(p.opaque=x,p.transparent=null);f.render=!0;if(this.sortObjects)g.renderDepth?f.z=g.renderDepth:(za.copy(g.position),ya.multiplyVector3(za),f.z=za.z)}this.sortObjects&&m.sort(h);m=a.__webglObjectsImmediate;d=0;for(e=m.length;d<e;d++)if(f=m[d],g=f.object,g.visible)g.matrixAutoUpdate&&g.matrixWorld.flattenToArray(g._objectMatrixArray),r(g,b),g=f.object.material,g.transparent?
-(f.transparent=g,f.opaque=null):(f.opaque=g,f.transparent=null);a.overrideMaterial?(this.setBlending(a.overrideMaterial.blending),this.setDepthTest(a.overrideMaterial.depthTest),t(a.overrideMaterial.depthWrite),u(a.overrideMaterial.polygonOffset,a.overrideMaterial.polygonOffsetFactor,a.overrideMaterial.polygonOffsetUnits),j(a.__webglObjects,!1,"",b,n,o,!0,a.overrideMaterial),k(a.__webglObjectsImmediate,"",b,n,o,!1,a.overrideMaterial)):(this.setBlending(THREE.NormalBlending),j(a.__webglObjects,!0,
-"opaque",b,n,o,!1),k(a.__webglObjectsImmediate,"opaque",b,n,o,!1),j(a.__webglObjects,!1,"transparent",b,n,o,!0),k(a.__webglObjectsImmediate,"transparent",b,n,o,!0));i(this.renderPluginsPost,a,b);c&&c.minFilter!==THREE.NearestFilter&&c.minFilter!==THREE.LinearFilter&&(c instanceof THREE.WebGLRenderTargetCube?(l.bindTexture(l.TEXTURE_CUBE_MAP,c.__webglTexture),l.generateMipmap(l.TEXTURE_CUBE_MAP),l.bindTexture(l.TEXTURE_CUBE_MAP,null)):(l.bindTexture(l.TEXTURE_2D,c.__webglTexture),l.generateMipmap(l.TEXTURE_2D),
-l.bindTexture(l.TEXTURE_2D,null)))};this.renderImmediateObject=function(a,b,c,d,e){var f=q(a,b,c,d,e);Y=-1;V.setObjectFaces(e);e.immediateRenderCallback?e.immediateRenderCallback(f,l,xa):e.render(function(a){V.renderBufferImmediate(a,f,d.shading)})};this.initWebGLObjects=function(a){if(!a.__webglObjects)a.__webglObjects=[],a.__webglObjectsImmediate=[],a.__webglSprites=[],a.__webglFlares=[];for(;a.__objectsAdded.length;){var h=a.__objectsAdded[0],i=a,k=void 0,j=void 0,D=void 0;if(!h.__webglInit)if(h.__webglInit=
-!0,h._modelViewMatrix=new THREE.Matrix4,h._normalMatrixArray=new Float32Array(9),h._modelViewMatrixArray=new Float32Array(16),h._objectMatrixArray=new Float32Array(16),h.matrixWorld.flattenToArray(h._objectMatrixArray),h instanceof THREE.Mesh){j=h.geometry;if(j.geometryGroups===void 0){var D=j,q=void 0,r=void 0,x=void 0,t=void 0,u=void 0,y=void 0,C=void 0,A={},R=D.morphTargets.length;D.geometryGroups={};q=0;for(r=D.faces.length;q<r;q++)x=D.faces[q],t=x.materialIndex,y=t!==void 0?t:-1,A[y]===void 0&&
-(A[y]={hash:y,counter:0}),C=A[y].hash+"_"+A[y].counter,D.geometryGroups[C]===void 0&&(D.geometryGroups[C]={faces3:[],faces4:[],materialIndex:t,vertices:0,numMorphTargets:R}),u=x instanceof THREE.Face3?3:4,D.geometryGroups[C].vertices+u>65535&&(A[y].counter+=1,C=A[y].hash+"_"+A[y].counter,D.geometryGroups[C]===void 0&&(D.geometryGroups[C]={faces3:[],faces4:[],materialIndex:t,vertices:0,numMorphTargets:R})),x instanceof THREE.Face3?D.geometryGroups[C].faces3.push(q):D.geometryGroups[C].faces4.push(q),
-D.geometryGroups[C].vertices+=u;D.geometryGroupsList=[];q=void 0;for(q in D.geometryGroups)D.geometryGroups[q].id=aa++,D.geometryGroupsList.push(D.geometryGroups[q])}for(k in j.geometryGroups)if(D=j.geometryGroups[k],!D.__webglVertexBuffer){q=D;q.__webglVertexBuffer=l.createBuffer();q.__webglNormalBuffer=l.createBuffer();q.__webglTangentBuffer=l.createBuffer();q.__webglColorBuffer=l.createBuffer();q.__webglUVBuffer=l.createBuffer();q.__webglUV2Buffer=l.createBuffer();q.__webglSkinVertexABuffer=l.createBuffer();
-q.__webglSkinVertexBBuffer=l.createBuffer();q.__webglSkinIndicesBuffer=l.createBuffer();q.__webglSkinWeightsBuffer=l.createBuffer();q.__webglFaceBuffer=l.createBuffer();q.__webglLineBuffer=l.createBuffer();if(q.numMorphTargets){x=r=void 0;q.__webglMorphTargetsBuffers=[];r=0;for(x=q.numMorphTargets;r<x;r++)q.__webglMorphTargetsBuffers.push(l.createBuffer())}V.info.memory.geometries++;t=h;u=t.geometry;r=D.faces3;y=D.faces4;q=r.length*3+y.length*4;x=r.length*1+y.length*2;y=r.length*3+y.length*4;r=c(t,
-D);C=g(r);A=d(r);R=e(r);D.__vertexArray=new Float32Array(q*3);if(A)D.__normalArray=new Float32Array(q*3);if(u.hasTangents)D.__tangentArray=new Float32Array(q*4);if(R)D.__colorArray=new Float32Array(q*3);if(C){if(u.faceUvs.length>0||u.faceVertexUvs.length>0)D.__uvArray=new Float32Array(q*2);if(u.faceUvs.length>1||u.faceVertexUvs.length>1)D.__uv2Array=new Float32Array(q*2)}if(t.geometry.skinWeights.length&&t.geometry.skinIndices.length)D.__skinVertexAArray=new Float32Array(q*4),D.__skinVertexBArray=
-new Float32Array(q*4),D.__skinIndexArray=new Float32Array(q*4),D.__skinWeightArray=new Float32Array(q*4);D.__faceArray=new Uint16Array(x*3);D.__lineArray=new Uint16Array(y*2);if(D.numMorphTargets){D.__morphTargetsArrays=[];t=0;for(u=D.numMorphTargets;t<u;t++)D.__morphTargetsArrays.push(new Float32Array(q*3))}D.__webglFaceCount=x*3;D.__webglLineCount=y*2;if(r.attributes){if(D.__webglCustomAttributesList===void 0)D.__webglCustomAttributesList=[];x=void 0;for(x in r.attributes){var t=r.attributes[x],
-u={},K;for(K in t)u[K]=t[K];if(!u.__webglInitialized||u.createUniqueBuffers)u.__webglInitialized=!0,y=1,u.type==="v2"?y=2:u.type==="v3"?y=3:u.type==="v4"?y=4:u.type==="c"&&(y=3),u.size=y,u.array=new Float32Array(q*y),u.buffer=l.createBuffer(),u.buffer.belongsToAttribute=x,t.needsUpdate=!0,u.__original=t;D.__webglCustomAttributesList.push(u)}}D.__inittedArrays=!0;j.__dirtyVertices=!0;j.__dirtyMorphTargets=!0;j.__dirtyElements=!0;j.__dirtyUvs=!0;j.__dirtyNormals=!0;j.__dirtyTangents=!0;j.__dirtyColors=
-!0}}else if(h instanceof THREE.Ribbon){if(j=h.geometry,!j.__webglVertexBuffer)D=j,D.__webglVertexBuffer=l.createBuffer(),D.__webglColorBuffer=l.createBuffer(),V.info.memory.geometries++,D=j,q=D.vertices.length,D.__vertexArray=new Float32Array(q*3),D.__colorArray=new Float32Array(q*3),D.__webglVertexCount=q,j.__dirtyVertices=!0,j.__dirtyColors=!0}else if(h instanceof THREE.Line){if(j=h.geometry,!j.__webglVertexBuffer)D=j,D.__webglVertexBuffer=l.createBuffer(),D.__webglColorBuffer=l.createBuffer(),
-V.info.memory.geometries++,D=j,q=h,r=D.vertices.length,D.__vertexArray=new Float32Array(r*3),D.__colorArray=new Float32Array(r*3),D.__webglLineCount=r,b(D,q),j.__dirtyVertices=!0,j.__dirtyColors=!0}else if(h instanceof THREE.ParticleSystem&&(j=h.geometry,!j.__webglVertexBuffer))D=j,D.__webglVertexBuffer=l.createBuffer(),D.__webglColorBuffer=l.createBuffer(),V.info.geometries++,D=j,q=h,r=D.vertices.length,D.__vertexArray=new Float32Array(r*3),D.__colorArray=new Float32Array(r*3),D.__sortArray=[],D.__webglParticleCount=
-r,b(D,q),j.__dirtyVertices=!0,j.__dirtyColors=!0;if(!h.__webglActive){if(h instanceof THREE.Mesh)for(k in j=h.geometry,j.geometryGroups)D=j.geometryGroups[k],o(i.__webglObjects,D,h);else h instanceof THREE.Ribbon||h instanceof THREE.Line||h instanceof THREE.ParticleSystem?(j=h.geometry,o(i.__webglObjects,j,h)):THREE.MarchingCubes!==void 0&&h instanceof THREE.MarchingCubes||h.immediateRenderCallback?i.__webglObjectsImmediate.push({object:h,opaque:null,transparent:null}):h instanceof THREE.Sprite?i.__webglSprites.push(h):
-h instanceof THREE.LensFlare&&i.__webglFlares.push(h);h.__webglActive=!0}a.__objectsAdded.splice(0,1)}for(;a.__objectsRemoved.length;)h=a.__objectsRemoved[0],i=a,h instanceof THREE.Mesh||h instanceof THREE.ParticleSystem||h instanceof THREE.Ribbon||h instanceof THREE.Line?s(i.__webglObjects,h):h instanceof THREE.Sprite?n(i.__webglSprites,h):h instanceof THREE.LensFlare?n(i.__webglFlares,h):(h instanceof THREE.MarchingCubes||h.immediateRenderCallback)&&s(i.__webglObjectsImmediate,h),h.__webglActive=
-!1,a.__objectsRemoved.splice(0,1);h=0;for(i=a.__webglObjects.length;h<i;h++)if(K=a.__webglObjects[h].object,k=K.geometry,j=x=r=void 0,K instanceof THREE.Mesh){D=0;for(q=k.geometryGroupsList.length;D<q;D++)if(r=k.geometryGroupsList[D],j=c(K,r),x=j.attributes&&p(j),k.__dirtyVertices||k.__dirtyMorphTargets||k.__dirtyElements||k.__dirtyUvs||k.__dirtyNormals||k.__dirtyColors||k.__dirtyTangents||x){var w=K,x=l.DYNAMIC_DRAW,t=!k.dynamic,C=j;if(r.__inittedArrays){var u=d(C),y=e(C),G=g(C),I=u===THREE.SmoothShading,
-J=A=C=void 0,H=void 0,F=void 0,L=void 0,v=void 0,B=void 0,M=void 0,$=J=void 0,Q=void 0,O=void 0,P=void 0,X=H=void 0,U=void 0,Y=void 0,T=H=M=void 0,W=void 0,ca=P=O=Q=v=void 0,N=H=P=O=Q=ca=P=O=Q=ca=P=O=Q=void 0,S=void 0,da=L=void 0,fa=void 0,ja=void 0,va=void 0,ea=void 0,na=$=ja=S=0,la=0,ia=N=J=0,ga=v=X=0,E=0,ma=void 0,ga=r.__vertexArray,fa=r.__uvArray,E=r.__uv2Array,da=r.__normalArray,F=r.__tangentArray,U=r.__colorArray,T=r.__skinVertexAArray,W=r.__skinVertexBArray,B=r.__skinIndexArray,oa=r.__skinWeightArray,
-ca=r.__morphTargetsArrays,R=r.__webglCustomAttributesList,z=void 0,z=r.__faceArray,ma=r.__lineArray,Y=w.geometry,qa=Y.__dirtyElements,sa=Y.__dirtyUvs,L=Y.__dirtyNormals,M=Y.__dirtyTangents,za=Y.__dirtyColors,va=Y.__dirtyMorphTargets,ea=Y.vertices,w=r.faces3,ha=r.faces4,ka=Y.faces,ya=Y.faceVertexUvs[0],Ba=Y.faceVertexUvs[1],wa=Y.skinVerticesA,xa=Y.skinVerticesB,Aa=Y.skinIndices,Ha=Y.skinWeights,Ia=Y.morphTargets;if(Y.__dirtyVertices){C=0;for(A=w.length;C<A;C++)H=ka[w[C]],Q=ea[H.a].position,O=ea[H.b].position,
-P=ea[H.c].position,ga[ja]=Q.x,ga[ja+1]=Q.y,ga[ja+2]=Q.z,ga[ja+3]=O.x,ga[ja+4]=O.y,ga[ja+5]=O.z,ga[ja+6]=P.x,ga[ja+7]=P.y,ga[ja+8]=P.z,ja+=9;C=0;for(A=ha.length;C<A;C++)H=ka[ha[C]],Q=ea[H.a].position,O=ea[H.b].position,P=ea[H.c].position,H=ea[H.d].position,ga[ja]=Q.x,ga[ja+1]=Q.y,ga[ja+2]=Q.z,ga[ja+3]=O.x,ga[ja+4]=O.y,ga[ja+5]=O.z,ga[ja+6]=P.x,ga[ja+7]=P.y,ga[ja+8]=P.z,ga[ja+9]=H.x,ga[ja+10]=H.y,ga[ja+11]=H.z,ja+=12;l.bindBuffer(l.ARRAY_BUFFER,r.__webglVertexBuffer);l.bufferData(l.ARRAY_BUFFER,ga,
-x)}if(va){ja=0;for(va=Ia.length;ja<va;ja++){C=ga=0;for(A=w.length;C<A;C++)H=ka[w[C]],Q=Ia[ja].vertices[H.a].position,O=Ia[ja].vertices[H.b].position,P=Ia[ja].vertices[H.c].position,ea=ca[ja],ea[ga]=Q.x,ea[ga+1]=Q.y,ea[ga+2]=Q.z,ea[ga+3]=O.x,ea[ga+4]=O.y,ea[ga+5]=O.z,ea[ga+6]=P.x,ea[ga+7]=P.y,ea[ga+8]=P.z,ga+=9;C=0;for(A=ha.length;C<A;C++)H=ka[ha[C]],Q=Ia[ja].vertices[H.a].position,O=Ia[ja].vertices[H.b].position,P=Ia[ja].vertices[H.c].position,H=Ia[ja].vertices[H.d].position,ea=ca[ja],ea[ga]=Q.x,
+ea&&(l.lineWidth(d),ea=d),l.drawArrays(f,0,e.__webglLineCount),V.info.render.calls++):f instanceof THREE.ParticleSystem?(l.drawArrays(l.POINTS,0,e.__webglParticleCount),V.info.render.calls++,V.info.render.points+=e.__webglParticleCount):f instanceof THREE.Ribbon&&(l.drawArrays(l.TRIANGLE_STRIP,0,e.__webglVertexCount),V.info.render.calls++)}};this.render=function(a,b,c,d){var e,f,g,m,n=a.lights,o=a.fog;v=-1;this.autoUpdateObjects&&this.initWebGLObjects(a);b.parent===void 0&&(console.warn("DEPRECATED: Camera hasn't been added to a Scene. Adding it..."),
+a.add(b));this.autoUpdateScene&&a.updateMatrixWorld();i(this.renderPluginsPre,a,b);V.info.render.calls=0;V.info.render.vertices=0;V.info.render.faces=0;V.info.render.points=0;b.matrixWorldInverse.getInverse(b.matrixWorld);if(!b._viewMatrixArray)b._viewMatrixArray=new Float32Array(16);b.matrixWorldInverse.flattenToArray(b._viewMatrixArray);if(!b._projectionMatrixArray)b._projectionMatrixArray=new Float32Array(16);b.projectionMatrix.flattenToArray(b._projectionMatrixArray);ya.multiply(b.projectionMatrix,
+b.matrixWorldInverse);xa.setFromMatrix(ya);this.setRenderTarget(c);(this.autoClear||d)&&this.clear(this.autoClearColor,this.autoClearDepth,this.autoClearStencil);m=a.__webglObjects;d=0;for(e=m.length;d<e;d++)if(f=m[d],g=f.object,f.render=!1,g.visible&&(!(g instanceof THREE.Mesh)||!g.frustumCulled||xa.contains(g))){g.matrixWorld.flattenToArray(g._objectMatrixArray);r(g,b);var p=f,s=p.object,q=p.buffer,x=void 0,x=x=void 0,x=s.material;if(x instanceof THREE.MeshFaceMaterial){if(x=q.materialIndex,x>=
+0)x=s.geometry.materials[x],x.transparent?(p.transparent=x,p.opaque=null):(p.opaque=x,p.transparent=null)}else if(x)x.transparent?(p.transparent=x,p.opaque=null):(p.opaque=x,p.transparent=null);f.render=!0;if(this.sortObjects)g.renderDepth?f.z=g.renderDepth:(za.copy(g.position),ya.multiplyVector3(za),f.z=za.z)}this.sortObjects&&m.sort(h);m=a.__webglObjectsImmediate;d=0;for(e=m.length;d<e;d++)if(f=m[d],g=f.object,g.visible)g.matrixAutoUpdate&&g.matrixWorld.flattenToArray(g._objectMatrixArray),r(g,
+b),g=f.object.material,g.transparent?(f.transparent=g,f.opaque=null):(f.opaque=g,f.transparent=null);a.overrideMaterial?(this.setBlending(a.overrideMaterial.blending),this.setDepthTest(a.overrideMaterial.depthTest),t(a.overrideMaterial.depthWrite),u(a.overrideMaterial.polygonOffset,a.overrideMaterial.polygonOffsetFactor,a.overrideMaterial.polygonOffsetUnits),j(a.__webglObjects,!1,"",b,n,o,!0,a.overrideMaterial),k(a.__webglObjectsImmediate,"",b,n,o,!1,a.overrideMaterial)):(this.setBlending(THREE.NormalBlending),
+j(a.__webglObjects,!0,"opaque",b,n,o,!1),k(a.__webglObjectsImmediate,"opaque",b,n,o,!1),j(a.__webglObjects,!1,"transparent",b,n,o,!0),k(a.__webglObjectsImmediate,"transparent",b,n,o,!0));i(this.renderPluginsPost,a,b);c&&c.minFilter!==THREE.NearestFilter&&c.minFilter!==THREE.LinearFilter&&(c instanceof THREE.WebGLRenderTargetCube?(l.bindTexture(l.TEXTURE_CUBE_MAP,c.__webglTexture),l.generateMipmap(l.TEXTURE_CUBE_MAP),l.bindTexture(l.TEXTURE_CUBE_MAP,null)):(l.bindTexture(l.TEXTURE_2D,c.__webglTexture),
+l.generateMipmap(l.TEXTURE_2D),l.bindTexture(l.TEXTURE_2D,null)))};this.renderImmediateObject=function(a,b,c,d,e){var f=q(a,b,c,d,e);Y=-1;V.setObjectFaces(e);e.immediateRenderCallback?e.immediateRenderCallback(f,l,xa):e.render(function(a){V.renderBufferImmediate(a,f,d.shading)})};this.initWebGLObjects=function(a){if(!a.__webglObjects)a.__webglObjects=[],a.__webglObjectsImmediate=[],a.__webglSprites=[],a.__webglFlares=[];for(;a.__objectsAdded.length;){var h=a.__objectsAdded[0],i=a,k=void 0,j=void 0,
+D=void 0;if(!h.__webglInit)if(h.__webglInit=!0,h._modelViewMatrix=new THREE.Matrix4,h._normalMatrixArray=new Float32Array(9),h._modelViewMatrixArray=new Float32Array(16),h._objectMatrixArray=new Float32Array(16),h.matrixWorld.flattenToArray(h._objectMatrixArray),h instanceof THREE.Mesh){j=h.geometry;if(j.geometryGroups===void 0){var D=j,q=void 0,r=void 0,x=void 0,t=void 0,u=void 0,y=void 0,C=void 0,A={},R=D.morphTargets.length;D.geometryGroups={};q=0;for(r=D.faces.length;q<r;q++)x=D.faces[q],t=x.materialIndex,
+y=t!==void 0?t:-1,A[y]===void 0&&(A[y]={hash:y,counter:0}),C=A[y].hash+"_"+A[y].counter,D.geometryGroups[C]===void 0&&(D.geometryGroups[C]={faces3:[],faces4:[],materialIndex:t,vertices:0,numMorphTargets:R}),u=x instanceof THREE.Face3?3:4,D.geometryGroups[C].vertices+u>65535&&(A[y].counter+=1,C=A[y].hash+"_"+A[y].counter,D.geometryGroups[C]===void 0&&(D.geometryGroups[C]={faces3:[],faces4:[],materialIndex:t,vertices:0,numMorphTargets:R})),x instanceof THREE.Face3?D.geometryGroups[C].faces3.push(q):
+D.geometryGroups[C].faces4.push(q),D.geometryGroups[C].vertices+=u;D.geometryGroupsList=[];q=void 0;for(q in D.geometryGroups)D.geometryGroups[q].id=aa++,D.geometryGroupsList.push(D.geometryGroups[q])}for(k in j.geometryGroups)if(D=j.geometryGroups[k],!D.__webglVertexBuffer){q=D;q.__webglVertexBuffer=l.createBuffer();q.__webglNormalBuffer=l.createBuffer();q.__webglTangentBuffer=l.createBuffer();q.__webglColorBuffer=l.createBuffer();q.__webglUVBuffer=l.createBuffer();q.__webglUV2Buffer=l.createBuffer();
+q.__webglSkinVertexABuffer=l.createBuffer();q.__webglSkinVertexBBuffer=l.createBuffer();q.__webglSkinIndicesBuffer=l.createBuffer();q.__webglSkinWeightsBuffer=l.createBuffer();q.__webglFaceBuffer=l.createBuffer();q.__webglLineBuffer=l.createBuffer();if(q.numMorphTargets){x=r=void 0;q.__webglMorphTargetsBuffers=[];r=0;for(x=q.numMorphTargets;r<x;r++)q.__webglMorphTargetsBuffers.push(l.createBuffer())}V.info.memory.geometries++;t=h;u=t.geometry;r=D.faces3;y=D.faces4;q=r.length*3+y.length*4;x=r.length*
+1+y.length*2;y=r.length*3+y.length*4;r=c(t,D);C=g(r);A=d(r);R=e(r);D.__vertexArray=new Float32Array(q*3);if(A)D.__normalArray=new Float32Array(q*3);if(u.hasTangents)D.__tangentArray=new Float32Array(q*4);if(R)D.__colorArray=new Float32Array(q*3);if(C){if(u.faceUvs.length>0||u.faceVertexUvs.length>0)D.__uvArray=new Float32Array(q*2);if(u.faceUvs.length>1||u.faceVertexUvs.length>1)D.__uv2Array=new Float32Array(q*2)}if(t.geometry.skinWeights.length&&t.geometry.skinIndices.length)D.__skinVertexAArray=
+new Float32Array(q*4),D.__skinVertexBArray=new Float32Array(q*4),D.__skinIndexArray=new Float32Array(q*4),D.__skinWeightArray=new Float32Array(q*4);D.__faceArray=new Uint16Array(x*3);D.__lineArray=new Uint16Array(y*2);if(D.numMorphTargets){D.__morphTargetsArrays=[];t=0;for(u=D.numMorphTargets;t<u;t++)D.__morphTargetsArrays.push(new Float32Array(q*3))}D.__webglFaceCount=x*3;D.__webglLineCount=y*2;if(r.attributes){if(D.__webglCustomAttributesList===void 0)D.__webglCustomAttributesList=[];x=void 0;for(x in r.attributes){var t=
+r.attributes[x],u={},K;for(K in t)u[K]=t[K];if(!u.__webglInitialized||u.createUniqueBuffers)u.__webglInitialized=!0,y=1,u.type==="v2"?y=2:u.type==="v3"?y=3:u.type==="v4"?y=4:u.type==="c"&&(y=3),u.size=y,u.array=new Float32Array(q*y),u.buffer=l.createBuffer(),u.buffer.belongsToAttribute=x,t.needsUpdate=!0,u.__original=t;D.__webglCustomAttributesList.push(u)}}D.__inittedArrays=!0;j.__dirtyVertices=!0;j.__dirtyMorphTargets=!0;j.__dirtyElements=!0;j.__dirtyUvs=!0;j.__dirtyNormals=!0;j.__dirtyTangents=
+!0;j.__dirtyColors=!0}}else if(h instanceof THREE.Ribbon){if(j=h.geometry,!j.__webglVertexBuffer)D=j,D.__webglVertexBuffer=l.createBuffer(),D.__webglColorBuffer=l.createBuffer(),V.info.memory.geometries++,D=j,q=D.vertices.length,D.__vertexArray=new Float32Array(q*3),D.__colorArray=new Float32Array(q*3),D.__webglVertexCount=q,j.__dirtyVertices=!0,j.__dirtyColors=!0}else if(h instanceof THREE.Line){if(j=h.geometry,!j.__webglVertexBuffer)D=j,D.__webglVertexBuffer=l.createBuffer(),D.__webglColorBuffer=
+l.createBuffer(),V.info.memory.geometries++,D=j,q=h,r=D.vertices.length,D.__vertexArray=new Float32Array(r*3),D.__colorArray=new Float32Array(r*3),D.__webglLineCount=r,b(D,q),j.__dirtyVertices=!0,j.__dirtyColors=!0}else if(h instanceof THREE.ParticleSystem&&(j=h.geometry,!j.__webglVertexBuffer))D=j,D.__webglVertexBuffer=l.createBuffer(),D.__webglColorBuffer=l.createBuffer(),V.info.geometries++,D=j,q=h,r=D.vertices.length,D.__vertexArray=new Float32Array(r*3),D.__colorArray=new Float32Array(r*3),D.__sortArray=
+[],D.__webglParticleCount=r,b(D,q),j.__dirtyVertices=!0,j.__dirtyColors=!0;if(!h.__webglActive){if(h instanceof THREE.Mesh)for(k in j=h.geometry,j.geometryGroups)D=j.geometryGroups[k],o(i.__webglObjects,D,h);else h instanceof THREE.Ribbon||h instanceof THREE.Line||h instanceof THREE.ParticleSystem?(j=h.geometry,o(i.__webglObjects,j,h)):THREE.MarchingCubes!==void 0&&h instanceof THREE.MarchingCubes||h.immediateRenderCallback?i.__webglObjectsImmediate.push({object:h,opaque:null,transparent:null}):h instanceof
+THREE.Sprite?i.__webglSprites.push(h):h instanceof THREE.LensFlare&&i.__webglFlares.push(h);h.__webglActive=!0}a.__objectsAdded.splice(0,1)}for(;a.__objectsRemoved.length;)h=a.__objectsRemoved[0],i=a,h instanceof THREE.Mesh||h instanceof THREE.ParticleSystem||h instanceof THREE.Ribbon||h instanceof THREE.Line?s(i.__webglObjects,h):h instanceof THREE.Sprite?n(i.__webglSprites,h):h instanceof THREE.LensFlare?n(i.__webglFlares,h):(h instanceof THREE.MarchingCubes||h.immediateRenderCallback)&&s(i.__webglObjectsImmediate,
+h),h.__webglActive=!1,a.__objectsRemoved.splice(0,1);h=0;for(i=a.__webglObjects.length;h<i;h++)if(K=a.__webglObjects[h].object,k=K.geometry,j=x=r=void 0,K instanceof THREE.Mesh){D=0;for(q=k.geometryGroupsList.length;D<q;D++)if(r=k.geometryGroupsList[D],j=c(K,r),x=j.attributes&&p(j),k.__dirtyVertices||k.__dirtyMorphTargets||k.__dirtyElements||k.__dirtyUvs||k.__dirtyNormals||k.__dirtyColors||k.__dirtyTangents||x){var w=K,x=l.DYNAMIC_DRAW,t=!k.dynamic,C=j;if(r.__inittedArrays){var u=d(C),y=e(C),G=g(C),
+I=u===THREE.SmoothShading,J=A=C=void 0,H=void 0,F=void 0,L=void 0,v=void 0,B=void 0,M=void 0,$=J=void 0,Q=void 0,O=void 0,P=void 0,X=H=void 0,U=void 0,Y=void 0,T=H=M=void 0,W=void 0,ca=P=O=Q=v=void 0,N=H=P=O=Q=ca=P=O=Q=ca=P=O=Q=void 0,S=void 0,da=L=void 0,fa=void 0,ja=void 0,va=void 0,ea=void 0,na=$=ja=S=0,la=0,ia=N=J=0,ga=v=X=0,E=0,ma=void 0,ga=r.__vertexArray,fa=r.__uvArray,E=r.__uv2Array,da=r.__normalArray,F=r.__tangentArray,U=r.__colorArray,T=r.__skinVertexAArray,W=r.__skinVertexBArray,B=r.__skinIndexArray,
+oa=r.__skinWeightArray,ca=r.__morphTargetsArrays,R=r.__webglCustomAttributesList,z=void 0,z=r.__faceArray,ma=r.__lineArray,Y=w.geometry,qa=Y.__dirtyElements,sa=Y.__dirtyUvs,L=Y.__dirtyNormals,M=Y.__dirtyTangents,za=Y.__dirtyColors,va=Y.__dirtyMorphTargets,ea=Y.vertices,w=r.faces3,ha=r.faces4,ka=Y.faces,ya=Y.faceVertexUvs[0],Ba=Y.faceVertexUvs[1],wa=Y.skinVerticesA,xa=Y.skinVerticesB,Aa=Y.skinIndices,Ha=Y.skinWeights,Ia=Y.morphTargets;if(Y.__dirtyVertices){C=0;for(A=w.length;C<A;C++)H=ka[w[C]],Q=ea[H.a].position,
+O=ea[H.b].position,P=ea[H.c].position,ga[ja]=Q.x,ga[ja+1]=Q.y,ga[ja+2]=Q.z,ga[ja+3]=O.x,ga[ja+4]=O.y,ga[ja+5]=O.z,ga[ja+6]=P.x,ga[ja+7]=P.y,ga[ja+8]=P.z,ja+=9;C=0;for(A=ha.length;C<A;C++)H=ka[ha[C]],Q=ea[H.a].position,O=ea[H.b].position,P=ea[H.c].position,H=ea[H.d].position,ga[ja]=Q.x,ga[ja+1]=Q.y,ga[ja+2]=Q.z,ga[ja+3]=O.x,ga[ja+4]=O.y,ga[ja+5]=O.z,ga[ja+6]=P.x,ga[ja+7]=P.y,ga[ja+8]=P.z,ga[ja+9]=H.x,ga[ja+10]=H.y,ga[ja+11]=H.z,ja+=12;l.bindBuffer(l.ARRAY_BUFFER,r.__webglVertexBuffer);l.bufferData(l.ARRAY_BUFFER,
+ga,x)}if(va){ja=0;for(va=Ia.length;ja<va;ja++){C=ga=0;for(A=w.length;C<A;C++)H=ka[w[C]],Q=Ia[ja].vertices[H.a].position,O=Ia[ja].vertices[H.b].position,P=Ia[ja].vertices[H.c].position,ea=ca[ja],ea[ga]=Q.x,ea[ga+1]=Q.y,ea[ga+2]=Q.z,ea[ga+3]=O.x,ea[ga+4]=O.y,ea[ga+5]=O.z,ea[ga+6]=P.x,ea[ga+7]=P.y,ea[ga+8]=P.z,ga+=9;C=0;for(A=ha.length;C<A;C++)H=ka[ha[C]],Q=Ia[ja].vertices[H.a].position,O=Ia[ja].vertices[H.b].position,P=Ia[ja].vertices[H.c].position,H=Ia[ja].vertices[H.d].position,ea=ca[ja],ea[ga]=Q.x,
 ea[ga+1]=Q.y,ea[ga+2]=Q.z,ea[ga+3]=O.x,ea[ga+4]=O.y,ea[ga+5]=O.z,ea[ga+6]=P.x,ea[ga+7]=P.y,ea[ga+8]=P.z,ea[ga+9]=H.x,ea[ga+10]=H.y,ea[ga+11]=H.z,ga+=12;l.bindBuffer(l.ARRAY_BUFFER,r.__webglMorphTargetsBuffers[ja]);l.bufferData(l.ARRAY_BUFFER,ca[ja],x)}}if(Ha.length){C=0;for(A=w.length;C<A;C++)H=ka[w[C]],Q=Ha[H.a],O=Ha[H.b],P=Ha[H.c],oa[v]=Q.x,oa[v+1]=Q.y,oa[v+2]=Q.z,oa[v+3]=Q.w,oa[v+4]=O.x,oa[v+5]=O.y,oa[v+6]=O.z,oa[v+7]=O.w,oa[v+8]=P.x,oa[v+9]=P.y,oa[v+10]=P.z,oa[v+11]=P.w,Q=Aa[H.a],O=Aa[H.b],P=
 Aa[H.c],B[v]=Q.x,B[v+1]=Q.y,B[v+2]=Q.z,B[v+3]=Q.w,B[v+4]=O.x,B[v+5]=O.y,B[v+6]=O.z,B[v+7]=O.w,B[v+8]=P.x,B[v+9]=P.y,B[v+10]=P.z,B[v+11]=P.w,Q=wa[H.a],O=wa[H.b],P=wa[H.c],T[v]=Q.x,T[v+1]=Q.y,T[v+2]=Q.z,T[v+3]=1,T[v+4]=O.x,T[v+5]=O.y,T[v+6]=O.z,T[v+7]=1,T[v+8]=P.x,T[v+9]=P.y,T[v+10]=P.z,T[v+11]=1,Q=xa[H.a],O=xa[H.b],P=xa[H.c],W[v]=Q.x,W[v+1]=Q.y,W[v+2]=Q.z,W[v+3]=1,W[v+4]=O.x,W[v+5]=O.y,W[v+6]=O.z,W[v+7]=1,W[v+8]=P.x,W[v+9]=P.y,W[v+10]=P.z,W[v+11]=1,v+=12;C=0;for(A=ha.length;C<A;C++)H=ka[ha[C]],Q=Ha[H.a],
 O=Ha[H.b],P=Ha[H.c],ca=Ha[H.d],oa[v]=Q.x,oa[v+1]=Q.y,oa[v+2]=Q.z,oa[v+3]=Q.w,oa[v+4]=O.x,oa[v+5]=O.y,oa[v+6]=O.z,oa[v+7]=O.w,oa[v+8]=P.x,oa[v+9]=P.y,oa[v+10]=P.z,oa[v+11]=P.w,oa[v+12]=ca.x,oa[v+13]=ca.y,oa[v+14]=ca.z,oa[v+15]=ca.w,Q=Aa[H.a],O=Aa[H.b],P=Aa[H.c],ca=Aa[H.d],B[v]=Q.x,B[v+1]=Q.y,B[v+2]=Q.z,B[v+3]=Q.w,B[v+4]=O.x,B[v+5]=O.y,B[v+6]=O.z,B[v+7]=O.w,B[v+8]=P.x,B[v+9]=P.y,B[v+10]=P.z,B[v+11]=P.w,B[v+12]=ca.x,B[v+13]=ca.y,B[v+14]=ca.z,B[v+15]=ca.w,Q=wa[H.a],O=wa[H.b],P=wa[H.c],ca=wa[H.d],T[v]=

+ 12 - 12
build/custom/ThreeWebGL.js

@@ -208,7 +208,7 @@ default:return e.LINEAR}}function O(a){switch(a){case THREE.RepeatWrapping:retur
 case THREE.ByteType:return e.BYTE;case THREE.UnsignedByteType:return e.UNSIGNED_BYTE;case THREE.ShortType:return e.SHORT;case THREE.UnsignedShortType:return e.UNSIGNED_SHORT;case THREE.IntType:return e.INT;case THREE.UnsignedShortType:return e.UNSIGNED_INT;case THREE.FloatType:return e.FLOAT;case THREE.AlphaFormat:return e.ALPHA;case THREE.RGBFormat:return e.RGB;case THREE.RGBAFormat:return e.RGBA;case THREE.LuminanceFormat:return e.LUMINANCE;case THREE.LuminanceAlphaFormat:return e.LUMINANCE_ALPHA}return 0}
 var a=a||{},ma=a.canvas!==void 0?a.canvas:document.createElement("canvas"),ua=a.precision!==void 0?a.precision:"highp",ha=a.antialias!==void 0?a.antialias:!1,ca=a.stencil!==void 0?a.stencil:!0,pa=a.preserveDrawingBuffer!==void 0?a.preserveDrawingBuffer:!1,ja=a.clearColor!==void 0?new THREE.Color(a.clearColor):new THREE.Color(0),xa=a.clearAlpha!==void 0?a.clearAlpha:0,va=a.maxLights!==void 0?a.maxLights:4;this.domElement=ma;this.context=null;this.autoUpdateScene=this.autoUpdateObjects=this.sortObjects=
 this.autoClearStencil=this.autoClearDepth=this.autoClearColor=this.autoClear=!0;this.physicallyBasedShading=this.gammaOutput=this.gammaInput=!1;this.shadowMapBias=0.0039;this.shadowMapDarkness=0.5;this.shadowMapHeight=this.shadowMapWidth=512;this.shadowCameraNear=1;this.shadowCameraFar=5E3;this.shadowCameraFov=50;this.shadowMapEnabled=!1;this.shadowMapSoft=this.shadowMapAutoUpdate=!0;this.maxMorphTargets=8;this.renderPluginsPre=[];this.renderPluginsPost=[];this.info={memory:{programs:0,geometries:0,
-textures:0},render:{calls:0,vertices:0,faces:0}};var I=this,e,ya=[],S=null,qa=null,H=-1,T=null,na=0,ra=null,Z=null,sa=null,oa=null,wa=null,Ca=null,za=null,Aa=null,ta=null,Ea=0,Fa=0,Ga=0,Ha=0,Ja=0,Ka=0,Ia=new THREE.Frustum,Da=new THREE.Matrix4,Ba=new THREE.Vector4,La={ambient:[0,0,0],directional:{length:0,colors:[],positions:[]},point:{length:0,colors:[],positions:[],distances:[]}};e=function(){var a;try{if(!(a=ma.getContext("experimental-webgl",{antialias:ha,stencil:ca,preserveDrawingBuffer:pa})))throw"Error creating WebGL context.";
+textures:0},render:{calls:0,vertices:0,faces:0,points:0}};var I=this,e,ya=[],S=null,qa=null,H=-1,T=null,na=0,ra=null,Z=null,sa=null,oa=null,wa=null,Ca=null,za=null,Aa=null,ta=null,Ea=0,Fa=0,Ga=0,Ha=0,Ja=0,Ka=0,Ia=new THREE.Frustum,Da=new THREE.Matrix4,Ba=new THREE.Vector4,La={ambient:[0,0,0],directional:{length:0,colors:[],positions:[]},point:{length:0,colors:[],positions:[],distances:[]}};e=function(){var a;try{if(!(a=ma.getContext("experimental-webgl",{antialias:ha,stencil:ca,preserveDrawingBuffer:pa})))throw"Error creating WebGL context.";
 console.log(navigator.userAgent+" | "+a.getParameter(a.VERSION)+" | "+a.getParameter(a.VENDOR)+" | "+a.getParameter(a.RENDERER)+" | "+a.getParameter(a.SHADING_LANGUAGE_VERSION))}catch(b){console.error(b)}return a}();e.clearColor(0,0,0,1);e.clearDepth(1);e.clearStencil(0);e.enable(e.DEPTH_TEST);e.depthFunc(e.LEQUAL);e.frontFace(e.CCW);e.cullFace(e.BACK);e.enable(e.CULL_FACE);e.enable(e.BLEND);e.blendEquation(e.FUNC_ADD);e.blendFunc(e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA);e.clearColor(ja.r,ja.g,ja.b,xa);
 this.context=e;var Ma=e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS)>0;this.getContext=function(){return e};this.supportsVertexTextures=function(){return Ma};this.setSize=function(a,b){ma.width=a;ma.height=b;this.setViewport(0,0,ma.width,ma.height)};this.setViewport=function(a,b,c,d){Ea=a;Fa=b;Ga=c;Ha=d;e.viewport(Ea,Fa,Ga,Ha)};this.setScissor=function(a,b,c,d){e.scissor(a,b,c,d)};this.enableScissorTest=function(a){a?e.enable(e.SCISSOR_TEST):e.disable(e.SCISSOR_TEST)};this.setClearColorHex=function(a,
 b){ja.setHex(a);xa=b;e.clearColor(ja.r,ja.g,ja.b,xa)};this.setClearColor=function(a,b){ja.copy(a);xa=b;e.clearColor(ja.r,ja.g,ja.b,xa)};this.getClearColor=function(){return ja};this.getClearAlpha=function(){return xa};this.clear=function(a,b,c){var d=0;if(a===void 0||a)d|=e.COLOR_BUFFER_BIT;if(b===void 0||b)d|=e.DEPTH_BUFFER_BIT;if(c===void 0||c)d|=e.STENCIL_BUFFER_BIT;e.clear(d)};this.clearTarget=function(a,b,c,d){this.setRenderTarget(a);this.clear(b,c,d)};this.addPostPlugin=function(a){a.init(this);
@@ -224,17 +224,17 @@ f.__webglMorphTargetsBuffers[j[h]]),e.vertexAttribPointer(c["morphTarget"+h],3,e
 3,e.FLOAT,!1,0,0));b.normal>=0&&(e.bindBuffer(e.ARRAY_BUFFER,f.__webglNormalBuffer),e.vertexAttribPointer(b.normal,3,e.FLOAT,!1,0,0));b.tangent>=0&&(e.bindBuffer(e.ARRAY_BUFFER,f.__webglTangentBuffer),e.vertexAttribPointer(b.tangent,4,e.FLOAT,!1,0,0));b.uv>=0&&(f.__webglUVBuffer?(e.bindBuffer(e.ARRAY_BUFFER,f.__webglUVBuffer),e.vertexAttribPointer(b.uv,2,e.FLOAT,!1,0,0),e.enableVertexAttribArray(b.uv)):e.disableVertexAttribArray(b.uv));b.uv2>=0&&(f.__webglUV2Buffer?(e.bindBuffer(e.ARRAY_BUFFER,f.__webglUV2Buffer),
 e.vertexAttribPointer(b.uv2,2,e.FLOAT,!1,0,0),e.enableVertexAttribArray(b.uv2)):e.disableVertexAttribArray(b.uv2));d.skinning&&b.skinVertexA>=0&&b.skinVertexB>=0&&b.skinIndex>=0&&b.skinWeight>=0&&(e.bindBuffer(e.ARRAY_BUFFER,f.__webglSkinVertexABuffer),e.vertexAttribPointer(b.skinVertexA,4,e.FLOAT,!1,0,0),e.bindBuffer(e.ARRAY_BUFFER,f.__webglSkinVertexBBuffer),e.vertexAttribPointer(b.skinVertexB,4,e.FLOAT,!1,0,0),e.bindBuffer(e.ARRAY_BUFFER,f.__webglSkinIndicesBuffer),e.vertexAttribPointer(b.skinIndex,
 4,e.FLOAT,!1,0,0),e.bindBuffer(e.ARRAY_BUFFER,f.__webglSkinWeightsBuffer),e.vertexAttribPointer(b.skinWeight,4,e.FLOAT,!1,0,0))}g instanceof THREE.Mesh?(d.wireframe?(d=d.wireframeLinewidth,d!==ta&&(e.lineWidth(d),ta=d),a&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,f.__webglLineBuffer),e.drawElements(e.LINES,f.__webglLineCount,e.UNSIGNED_SHORT,0)):(a&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,f.__webglFaceBuffer),e.drawElements(e.TRIANGLES,f.__webglFaceCount,e.UNSIGNED_SHORT,0)),I.info.render.calls++,I.info.render.vertices+=
-f.__webglFaceCount,I.info.render.faces+=f.__webglFaceCount/3):g instanceof THREE.Line?(g=g.type===THREE.LineStrip?e.LINE_STRIP:e.LINES,d=d.linewidth,d!==ta&&(e.lineWidth(d),ta=d),e.drawArrays(g,0,f.__webglLineCount),I.info.render.calls++):g instanceof THREE.ParticleSystem?(e.drawArrays(e.POINTS,0,f.__webglParticleCount),I.info.render.calls++):g instanceof THREE.Ribbon&&(e.drawArrays(e.TRIANGLE_STRIP,0,f.__webglVertexCount),I.info.render.calls++)}};this.render=function(a,b,c,d){var f,g,h,n,p=a.lights,
-s=a.fog;H=-1;this.autoUpdateObjects&&this.initWebGLObjects(a);b.parent===void 0&&(console.warn("DEPRECATED: Camera hasn't been added to a Scene. Adding it..."),a.add(b));this.autoUpdateScene&&a.updateMatrixWorld();l(this.renderPluginsPre,a,b);I.info.render.calls=0;I.info.render.vertices=0;I.info.render.faces=0;b.matrixWorldInverse.getInverse(b.matrixWorld);if(!b._viewMatrixArray)b._viewMatrixArray=new Float32Array(16);b.matrixWorldInverse.flattenToArray(b._viewMatrixArray);if(!b._projectionMatrixArray)b._projectionMatrixArray=
-new Float32Array(16);b.projectionMatrix.flattenToArray(b._projectionMatrixArray);Da.multiply(b.projectionMatrix,b.matrixWorldInverse);Ia.setFromMatrix(Da);this.setRenderTarget(c);(this.autoClear||d)&&this.clear(this.autoClearColor,this.autoClearDepth,this.autoClearStencil);n=a.__webglObjects;d=0;for(f=n.length;d<f;d++)if(g=n[d],h=g.object,g.render=!1,h.visible&&(!(h instanceof THREE.Mesh)||!h.frustumCulled||Ia.contains(h))){h.matrixWorld.flattenToArray(h._objectMatrixArray);J(h,b);var t=g,w=t.object,
-m=t.buffer,q=void 0,q=q=void 0,q=w.material;if(q instanceof THREE.MeshFaceMaterial){if(q=m.materialIndex,q>=0)q=w.geometry.materials[q],q.transparent?(t.transparent=q,t.opaque=null):(t.opaque=q,t.transparent=null)}else if(q)q.transparent?(t.transparent=q,t.opaque=null):(t.opaque=q,t.transparent=null);g.render=!0;if(this.sortObjects)h.renderDepth?g.z=h.renderDepth:(Ba.copy(h.position),Da.multiplyVector3(Ba),g.z=Ba.z)}this.sortObjects&&n.sort(i);n=a.__webglObjectsImmediate;d=0;for(f=n.length;d<f;d++)if(g=
-n[d],h=g.object,h.visible)h.matrixAutoUpdate&&h.matrixWorld.flattenToArray(h._objectMatrixArray),J(h,b),h=g.object.material,h.transparent?(g.transparent=h,g.opaque=null):(g.opaque=h,g.transparent=null);a.overrideMaterial?(this.setBlending(a.overrideMaterial.blending),this.setDepthTest(a.overrideMaterial.depthTest),P(a.overrideMaterial.depthWrite),Q(a.overrideMaterial.polygonOffset,a.overrideMaterial.polygonOffsetFactor,a.overrideMaterial.polygonOffsetUnits),k(a.__webglObjects,!1,"",b,p,s,!0,a.overrideMaterial),
-j(a.__webglObjectsImmediate,"",b,p,s,!1,a.overrideMaterial)):(this.setBlending(THREE.NormalBlending),k(a.__webglObjects,!0,"opaque",b,p,s,!1),j(a.__webglObjectsImmediate,"opaque",b,p,s,!1),k(a.__webglObjects,!1,"transparent",b,p,s,!0),j(a.__webglObjectsImmediate,"transparent",b,p,s,!0));l(this.renderPluginsPost,a,b);c&&c.minFilter!==THREE.NearestFilter&&c.minFilter!==THREE.LinearFilter&&(c instanceof THREE.WebGLRenderTargetCube?(e.bindTexture(e.TEXTURE_CUBE_MAP,c.__webglTexture),e.generateMipmap(e.TEXTURE_CUBE_MAP),
-e.bindTexture(e.TEXTURE_CUBE_MAP,null)):(e.bindTexture(e.TEXTURE_2D,c.__webglTexture),e.generateMipmap(e.TEXTURE_2D),e.bindTexture(e.TEXTURE_2D,null)))};this.renderImmediateObject=function(a,b,c,d,f){var g=y(a,b,c,d,f);T=-1;I.setObjectFaces(f);f.immediateRenderCallback?f.immediateRenderCallback(g,e,Ia):f.render(function(a){I.renderBufferImmediate(a,g,d.shading)})};this.initWebGLObjects=function(a){if(!a.__webglObjects)a.__webglObjects=[],a.__webglObjectsImmediate=[],a.__webglSprites=[],a.__webglFlares=
-[];for(;a.__objectsAdded.length;){var i=a.__objectsAdded[0],j=a,k=void 0,l=void 0,F=void 0;if(!i.__webglInit)if(i.__webglInit=!0,i._modelViewMatrix=new THREE.Matrix4,i._normalMatrixArray=new Float32Array(9),i._modelViewMatrixArray=new Float32Array(16),i._objectMatrixArray=new Float32Array(16),i.matrixWorld.flattenToArray(i._objectMatrixArray),i instanceof THREE.Mesh){l=i.geometry;if(l.geometryGroups===void 0){var F=l,G=void 0,v=void 0,y=void 0,C=void 0,t=void 0,D=void 0,m=void 0,q={},J=F.morphTargets.length;
-F.geometryGroups={};G=0;for(v=F.faces.length;G<v;G++)y=F.faces[G],C=y.materialIndex,D=C!==void 0?C:-1,q[D]===void 0&&(q[D]={hash:D,counter:0}),m=q[D].hash+"_"+q[D].counter,F.geometryGroups[m]===void 0&&(F.geometryGroups[m]={faces3:[],faces4:[],materialIndex:C,vertices:0,numMorphTargets:J}),t=y instanceof THREE.Face3?3:4,F.geometryGroups[m].vertices+t>65535&&(q[D].counter+=1,m=q[D].hash+"_"+q[D].counter,F.geometryGroups[m]===void 0&&(F.geometryGroups[m]={faces3:[],faces4:[],materialIndex:C,vertices:0,
-numMorphTargets:J})),y instanceof THREE.Face3?F.geometryGroups[m].faces3.push(G):F.geometryGroups[m].faces4.push(G),F.geometryGroups[m].vertices+=t;F.geometryGroupsList=[];G=void 0;for(G in F.geometryGroups)F.geometryGroups[G].id=na++,F.geometryGroupsList.push(F.geometryGroups[G])}for(k in l.geometryGroups)if(F=l.geometryGroups[k],!F.__webglVertexBuffer){G=F;G.__webglVertexBuffer=e.createBuffer();G.__webglNormalBuffer=e.createBuffer();G.__webglTangentBuffer=e.createBuffer();G.__webglColorBuffer=e.createBuffer();
-G.__webglUVBuffer=e.createBuffer();G.__webglUV2Buffer=e.createBuffer();G.__webglSkinVertexABuffer=e.createBuffer();G.__webglSkinVertexBBuffer=e.createBuffer();G.__webglSkinIndicesBuffer=e.createBuffer();G.__webglSkinWeightsBuffer=e.createBuffer();G.__webglFaceBuffer=e.createBuffer();G.__webglLineBuffer=e.createBuffer();if(G.numMorphTargets){y=v=void 0;G.__webglMorphTargetsBuffers=[];v=0;for(y=G.numMorphTargets;v<y;v++)G.__webglMorphTargetsBuffers.push(e.createBuffer())}I.info.memory.geometries++;
+f.__webglFaceCount,I.info.render.faces+=f.__webglFaceCount/3):g instanceof THREE.Line?(g=g.type===THREE.LineStrip?e.LINE_STRIP:e.LINES,d=d.linewidth,d!==ta&&(e.lineWidth(d),ta=d),e.drawArrays(g,0,f.__webglLineCount),I.info.render.calls++):g instanceof THREE.ParticleSystem?(e.drawArrays(e.POINTS,0,f.__webglParticleCount),I.info.render.calls++,I.info.render.points+=f.__webglParticleCount):g instanceof THREE.Ribbon&&(e.drawArrays(e.TRIANGLE_STRIP,0,f.__webglVertexCount),I.info.render.calls++)}};this.render=
+function(a,b,c,d){var f,g,h,n,p=a.lights,s=a.fog;H=-1;this.autoUpdateObjects&&this.initWebGLObjects(a);b.parent===void 0&&(console.warn("DEPRECATED: Camera hasn't been added to a Scene. Adding it..."),a.add(b));this.autoUpdateScene&&a.updateMatrixWorld();l(this.renderPluginsPre,a,b);I.info.render.calls=0;I.info.render.vertices=0;I.info.render.faces=0;I.info.render.points=0;b.matrixWorldInverse.getInverse(b.matrixWorld);if(!b._viewMatrixArray)b._viewMatrixArray=new Float32Array(16);b.matrixWorldInverse.flattenToArray(b._viewMatrixArray);
+if(!b._projectionMatrixArray)b._projectionMatrixArray=new Float32Array(16);b.projectionMatrix.flattenToArray(b._projectionMatrixArray);Da.multiply(b.projectionMatrix,b.matrixWorldInverse);Ia.setFromMatrix(Da);this.setRenderTarget(c);(this.autoClear||d)&&this.clear(this.autoClearColor,this.autoClearDepth,this.autoClearStencil);n=a.__webglObjects;d=0;for(f=n.length;d<f;d++)if(g=n[d],h=g.object,g.render=!1,h.visible&&(!(h instanceof THREE.Mesh)||!h.frustumCulled||Ia.contains(h))){h.matrixWorld.flattenToArray(h._objectMatrixArray);
+J(h,b);var t=g,w=t.object,m=t.buffer,q=void 0,q=q=void 0,q=w.material;if(q instanceof THREE.MeshFaceMaterial){if(q=m.materialIndex,q>=0)q=w.geometry.materials[q],q.transparent?(t.transparent=q,t.opaque=null):(t.opaque=q,t.transparent=null)}else if(q)q.transparent?(t.transparent=q,t.opaque=null):(t.opaque=q,t.transparent=null);g.render=!0;if(this.sortObjects)h.renderDepth?g.z=h.renderDepth:(Ba.copy(h.position),Da.multiplyVector3(Ba),g.z=Ba.z)}this.sortObjects&&n.sort(i);n=a.__webglObjectsImmediate;
+d=0;for(f=n.length;d<f;d++)if(g=n[d],h=g.object,h.visible)h.matrixAutoUpdate&&h.matrixWorld.flattenToArray(h._objectMatrixArray),J(h,b),h=g.object.material,h.transparent?(g.transparent=h,g.opaque=null):(g.opaque=h,g.transparent=null);a.overrideMaterial?(this.setBlending(a.overrideMaterial.blending),this.setDepthTest(a.overrideMaterial.depthTest),P(a.overrideMaterial.depthWrite),Q(a.overrideMaterial.polygonOffset,a.overrideMaterial.polygonOffsetFactor,a.overrideMaterial.polygonOffsetUnits),k(a.__webglObjects,
+!1,"",b,p,s,!0,a.overrideMaterial),j(a.__webglObjectsImmediate,"",b,p,s,!1,a.overrideMaterial)):(this.setBlending(THREE.NormalBlending),k(a.__webglObjects,!0,"opaque",b,p,s,!1),j(a.__webglObjectsImmediate,"opaque",b,p,s,!1),k(a.__webglObjects,!1,"transparent",b,p,s,!0),j(a.__webglObjectsImmediate,"transparent",b,p,s,!0));l(this.renderPluginsPost,a,b);c&&c.minFilter!==THREE.NearestFilter&&c.minFilter!==THREE.LinearFilter&&(c instanceof THREE.WebGLRenderTargetCube?(e.bindTexture(e.TEXTURE_CUBE_MAP,
+c.__webglTexture),e.generateMipmap(e.TEXTURE_CUBE_MAP),e.bindTexture(e.TEXTURE_CUBE_MAP,null)):(e.bindTexture(e.TEXTURE_2D,c.__webglTexture),e.generateMipmap(e.TEXTURE_2D),e.bindTexture(e.TEXTURE_2D,null)))};this.renderImmediateObject=function(a,b,c,d,f){var g=y(a,b,c,d,f);T=-1;I.setObjectFaces(f);f.immediateRenderCallback?f.immediateRenderCallback(g,e,Ia):f.render(function(a){I.renderBufferImmediate(a,g,d.shading)})};this.initWebGLObjects=function(a){if(!a.__webglObjects)a.__webglObjects=[],a.__webglObjectsImmediate=
+[],a.__webglSprites=[],a.__webglFlares=[];for(;a.__objectsAdded.length;){var i=a.__objectsAdded[0],j=a,k=void 0,l=void 0,F=void 0;if(!i.__webglInit)if(i.__webglInit=!0,i._modelViewMatrix=new THREE.Matrix4,i._normalMatrixArray=new Float32Array(9),i._modelViewMatrixArray=new Float32Array(16),i._objectMatrixArray=new Float32Array(16),i.matrixWorld.flattenToArray(i._objectMatrixArray),i instanceof THREE.Mesh){l=i.geometry;if(l.geometryGroups===void 0){var F=l,G=void 0,v=void 0,y=void 0,C=void 0,t=void 0,
+D=void 0,m=void 0,q={},J=F.morphTargets.length;F.geometryGroups={};G=0;for(v=F.faces.length;G<v;G++)y=F.faces[G],C=y.materialIndex,D=C!==void 0?C:-1,q[D]===void 0&&(q[D]={hash:D,counter:0}),m=q[D].hash+"_"+q[D].counter,F.geometryGroups[m]===void 0&&(F.geometryGroups[m]={faces3:[],faces4:[],materialIndex:C,vertices:0,numMorphTargets:J}),t=y instanceof THREE.Face3?3:4,F.geometryGroups[m].vertices+t>65535&&(q[D].counter+=1,m=q[D].hash+"_"+q[D].counter,F.geometryGroups[m]===void 0&&(F.geometryGroups[m]=
+{faces3:[],faces4:[],materialIndex:C,vertices:0,numMorphTargets:J})),y instanceof THREE.Face3?F.geometryGroups[m].faces3.push(G):F.geometryGroups[m].faces4.push(G),F.geometryGroups[m].vertices+=t;F.geometryGroupsList=[];G=void 0;for(G in F.geometryGroups)F.geometryGroups[G].id=na++,F.geometryGroupsList.push(F.geometryGroups[G])}for(k in l.geometryGroups)if(F=l.geometryGroups[k],!F.__webglVertexBuffer){G=F;G.__webglVertexBuffer=e.createBuffer();G.__webglNormalBuffer=e.createBuffer();G.__webglTangentBuffer=
+e.createBuffer();G.__webglColorBuffer=e.createBuffer();G.__webglUVBuffer=e.createBuffer();G.__webglUV2Buffer=e.createBuffer();G.__webglSkinVertexABuffer=e.createBuffer();G.__webglSkinVertexBBuffer=e.createBuffer();G.__webglSkinIndicesBuffer=e.createBuffer();G.__webglSkinWeightsBuffer=e.createBuffer();G.__webglFaceBuffer=e.createBuffer();G.__webglLineBuffer=e.createBuffer();if(G.numMorphTargets){y=v=void 0;G.__webglMorphTargetsBuffers=[];v=0;for(y=G.numMorphTargets;v<y;v++)G.__webglMorphTargetsBuffers.push(e.createBuffer())}I.info.memory.geometries++;
 C=i;t=C.geometry;v=F.faces3;D=F.faces4;G=v.length*3+D.length*4;y=v.length*1+D.length*2;D=v.length*3+D.length*4;v=d(C,F);m=g(v);q=c(v);J=f(v);F.__vertexArray=new Float32Array(G*3);if(q)F.__normalArray=new Float32Array(G*3);if(t.hasTangents)F.__tangentArray=new Float32Array(G*4);if(J)F.__colorArray=new Float32Array(G*3);if(m){if(t.faceUvs.length>0||t.faceVertexUvs.length>0)F.__uvArray=new Float32Array(G*2);if(t.faceUvs.length>1||t.faceVertexUvs.length>1)F.__uv2Array=new Float32Array(G*2)}if(C.geometry.skinWeights.length&&
 C.geometry.skinIndices.length)F.__skinVertexAArray=new Float32Array(G*4),F.__skinVertexBArray=new Float32Array(G*4),F.__skinIndexArray=new Float32Array(G*4),F.__skinWeightArray=new Float32Array(G*4);F.__faceArray=new Uint16Array(y*3);F.__lineArray=new Uint16Array(D*2);if(F.numMorphTargets){F.__morphTargetsArrays=[];C=0;for(t=F.numMorphTargets;C<t;C++)F.__morphTargetsArrays.push(new Float32Array(G*3))}F.__webglFaceCount=y*3;F.__webglLineCount=D*2;if(v.attributes){if(F.__webglCustomAttributesList===
 void 0)F.__webglCustomAttributesList=[];y=void 0;for(y in v.attributes){var C=v.attributes[y],t={},ka;for(ka in C)t[ka]=C[ka];if(!t.__webglInitialized||t.createUniqueBuffers)t.__webglInitialized=!0,D=1,t.type==="v2"?D=2:t.type==="v3"?D=3:t.type==="v4"?D=4:t.type==="c"&&(D=3),t.size=D,t.array=new Float32Array(G*D),t.buffer=e.createBuffer(),t.buffer.belongsToAttribute=y,C.needsUpdate=!0,t.__original=C;F.__webglCustomAttributesList.push(t)}}F.__inittedArrays=!0;l.__dirtyVertices=!0;l.__dirtyMorphTargets=

+ 4 - 1
src/renderers/WebGLRenderer.js

@@ -88,7 +88,8 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 			calls: 0,
 			vertices: 0,
-			faces: 0
+			faces: 0,
+			points: 0
 
 		}
 
@@ -2897,6 +2898,7 @@ THREE.WebGLRenderer = function ( parameters ) {
 			_gl.drawArrays( _gl.POINTS, 0, geometryGroup.__webglParticleCount );
 
 			_this.info.render.calls ++;
+			_this.info.render.points += geometryGroup.__webglParticleCount;
 
 		// render ribbon
 
@@ -3039,6 +3041,7 @@ THREE.WebGLRenderer = function ( parameters ) {
 		_this.info.render.calls = 0;
 		_this.info.render.vertices = 0;
 		_this.info.render.faces = 0;
+		_this.info.render.points = 0;
 
 		camera.matrixWorldInverse.getInverse( camera.matrixWorld );