瀏覽代碼

Updated builds.

Mr.doob 14 年之前
父節點
當前提交
699bbb749d
共有 2 個文件被更改,包括 16 次插入16 次删除
  1. 8 8
      build/Three.js
  2. 8 8
      build/custom/ThreeWebGL.js

+ 8 - 8
build/Three.js

@@ -230,8 +230,8 @@ m.image.__webglTextureCube)}}else z(m,c);f.uniformMatrix4fv(j.modelViewMatrix,!1
 THREE.MeshPhongMaterial||e instanceof THREE.MeshLambertMaterial||e instanceof THREE.MeshShaderMaterial||e.skinning)&&j.viewMatrix!==null&&f.uniformMatrix4fv(j.viewMatrix,!1,W);if(e instanceof THREE.ShadowVolumeDynamicMaterial)b=k.directionalLightDirection.value,b[0]=-d[1].position.x,b[1]=-d[1].position.y,b[2]=-d[1].position.z,f.uniform3fv(j.directionalLightDirection,b),f.uniformMatrix4fv(j.objectMatrix,!1,g._objectMatrixArray),f.uniformMatrix4fv(j.viewMatrix,!1,W);e.skinning&&(f.uniformMatrix4fv(j.cameraInverseMatrix,
 !1,W),f.uniformMatrix4fv(j.boneGlobalMatrices,!1,g.boneMatrices));return h}function e(b,c,e,g,h,j){if(g.opacity!=0){var k,b=d(b,c,e,g,j).attributes;if(!g.morphTargets&&b.position>=0)f.bindBuffer(f.ARRAY_BUFFER,h.__webglVertexBuffer),f.vertexAttribPointer(b.position,3,f.FLOAT,!1,0,0);else{c=g.program.attributes;j.morphTargetBase!==-1?(f.bindBuffer(f.ARRAY_BUFFER,h.__webglMorphTargetsBuffers[j.morphTargetBase]),f.vertexAttribPointer(c.position,3,f.FLOAT,!1,0,0)):c.position>=0&&(f.bindBuffer(f.ARRAY_BUFFER,
 h.__webglVertexBuffer),f.vertexAttribPointer(c.position,3,f.FLOAT,!1,0,0));if(j.morphTargetForcedOrder.length)for(var e=0,m=j.morphTargetForcedOrder,n=j.morphTargetInfluences;e<g.numSupportedMorphTargets&&e<m.length;)f.bindBuffer(f.ARRAY_BUFFER,h.__webglMorphTargetsBuffers[m[e]]),f.vertexAttribPointer(c["morphTarget"+e],3,f.FLOAT,!1,0,0),j.__webglMorphTargetInfluences[e]=n[m[e]],e++;else{var m=[],o=-1,p=0,n=j.morphTargetInfluences,t,u=n.length,e=0;for(j.morphTargetBase!==-1&&(m[j.morphTargetBase]=
-!0);e<g.numSupportedMorphTargets;){for(t=0;t<u;t++)!m[t]&&n[t]>o&&(p=t,o=n[p]);f.bindBuffer(f.ARRAY_BUFFER,h.__webglMorphTargetsBuffers[p]);f.vertexAttribPointer(c["morphTarget"+e],3,f.FLOAT,!1,0,0);j.__webglMorphTargetInfluences[e]=o;m[p]=1;o=-1;e++}}g.program.uniforms.morphTargetInfluences!==null&&f.uniform1fv(g.program.uniforms.morphTargetInfluences,j.__webglMorphTargetInfluences)}if(g.attributes)for(k in g.attributes)b[k]!==void 0&&b[k]>=0&&(c=g.attributes[k],c.buffer&&(f.bindBuffer(f.ARRAY_BUFFER,
-c.buffer),f.vertexAttribPointer(b[k],c.size,f.FLOAT,!1,0,0)));b.color>=0&&(f.bindBuffer(f.ARRAY_BUFFER,h.__webglColorBuffer),f.vertexAttribPointer(b.color,3,f.FLOAT,!1,0,0));b.normal>=0&&(f.bindBuffer(f.ARRAY_BUFFER,h.__webglNormalBuffer),f.vertexAttribPointer(b.normal,3,f.FLOAT,!1,0,0));b.tangent>=0&&(f.bindBuffer(f.ARRAY_BUFFER,h.__webglTangentBuffer),f.vertexAttribPointer(b.tangent,4,f.FLOAT,!1,0,0));b.uv>=0&&(h.__webglUVBuffer?(f.bindBuffer(f.ARRAY_BUFFER,h.__webglUVBuffer),f.vertexAttribPointer(b.uv,
+!0);e<g.numSupportedMorphTargets;){for(t=0;t<u;t++)!m[t]&&n[t]>o&&(p=t,o=n[p]);f.bindBuffer(f.ARRAY_BUFFER,h.__webglMorphTargetsBuffers[p]);f.vertexAttribPointer(c["morphTarget"+e],3,f.FLOAT,!1,0,0);j.__webglMorphTargetInfluences[e]=o;m[p]=1;o=-1;e++}}g.program.uniforms.morphTargetInfluences!==null&&f.uniform1fv(g.program.uniforms.morphTargetInfluences,j.__webglMorphTargetInfluences)}if(h.__webglCustomAttributes)for(k in h.__webglCustomAttributes)b[k]>=0&&(c=h.__webglCustomAttributes[k],f.bindBuffer(f.ARRAY_BUFFER,
+c.buffer),f.vertexAttribPointer(b[k],c.size,f.FLOAT,!1,0,0));b.color>=0&&(f.bindBuffer(f.ARRAY_BUFFER,h.__webglColorBuffer),f.vertexAttribPointer(b.color,3,f.FLOAT,!1,0,0));b.normal>=0&&(f.bindBuffer(f.ARRAY_BUFFER,h.__webglNormalBuffer),f.vertexAttribPointer(b.normal,3,f.FLOAT,!1,0,0));b.tangent>=0&&(f.bindBuffer(f.ARRAY_BUFFER,h.__webglTangentBuffer),f.vertexAttribPointer(b.tangent,4,f.FLOAT,!1,0,0));b.uv>=0&&(h.__webglUVBuffer?(f.bindBuffer(f.ARRAY_BUFFER,h.__webglUVBuffer),f.vertexAttribPointer(b.uv,
 2,f.FLOAT,!1,0,0),f.enableVertexAttribArray(b.uv)):f.disableVertexAttribArray(b.uv));b.uv2>=0&&(h.__webglUV2Buffer?(f.bindBuffer(f.ARRAY_BUFFER,h.__webglUV2Buffer),f.vertexAttribPointer(b.uv2,2,f.FLOAT,!1,0,0),f.enableVertexAttribArray(b.uv2)):f.disableVertexAttribArray(b.uv2));g.skinning&&b.skinVertexA>=0&&b.skinVertexB>=0&&b.skinIndex>=0&&b.skinWeight>=0&&(f.bindBuffer(f.ARRAY_BUFFER,h.__webglSkinVertexABuffer),f.vertexAttribPointer(b.skinVertexA,4,f.FLOAT,!1,0,0),f.bindBuffer(f.ARRAY_BUFFER,h.__webglSkinVertexBBuffer),
 f.vertexAttribPointer(b.skinVertexB,4,f.FLOAT,!1,0,0),f.bindBuffer(f.ARRAY_BUFFER,h.__webglSkinIndicesBuffer),f.vertexAttribPointer(b.skinIndex,4,f.FLOAT,!1,0,0),f.bindBuffer(f.ARRAY_BUFFER,h.__webglSkinWeightsBuffer),f.vertexAttribPointer(b.skinWeight,4,f.FLOAT,!1,0,0));j instanceof THREE.Mesh?(g.wireframe?(f.lineWidth(g.wireframeLinewidth),f.bindBuffer(f.ELEMENT_ARRAY_BUFFER,h.__webglLineBuffer),f.drawElements(f.LINES,h.__webglLineCount,f.UNSIGNED_SHORT,0)):(f.bindBuffer(f.ELEMENT_ARRAY_BUFFER,
 h.__webglFaceBuffer),f.drawElements(f.TRIANGLES,h.__webglFaceCount,f.UNSIGNED_SHORT,0)),N.data.vertices+=h.__webglFaceCount,N.data.faces+=h.__webglFaceCount/3,N.data.drawCalls++):j instanceof THREE.Line?(j=j.type==THREE.LineStrip?f.LINE_STRIP:f.LINES,f.lineWidth(g.linewidth),f.drawArrays(j,0,h.__webglLineCount),N.data.drawCalls++):j instanceof THREE.ParticleSystem?(f.drawArrays(f.POINTS,0,h.__webglParticleCount),N.data.drawCalls++):j instanceof THREE.Ribbon&&(f.drawArrays(f.TRIANGLE_STRIP,0,h.__webglVertexCount),
@@ -323,12 +323,12 @@ f.createBuffer();j.__webglNormalBuffer=f.createBuffer();j.__webglTangentBuffer=f
 n.materials.length;z<l;z++)(E=n.materials[z])&&o.push(E)}else(E=z)&&o.push(E);n=o;a:{A=p=void 0;u=n.length;for(p=0;p<u;p++)if(A=n[p],A.map||A.lightMap||A instanceof THREE.MeshShaderMaterial){p=!0;break a}p=!1}a:{A=n;o=u=void 0;z=A.length;for(u=0;u<z;u++)if(o=A[u],!(o instanceof THREE.MeshBasicMaterial&&!o.envMap||o instanceof THREE.MeshDepthMaterial)){A=o&&o.shading!=void 0&&o.shading==THREE.SmoothShading?THREE.SmoothShading:THREE.FlatShading;break a}A=!1}a:{o=u=void 0;z=n.length;for(u=0;u<z;u++)if(o=
 n[u],o.vertexColors){o=o.vertexColors;break a}o=!1}j.__vertexArray=new Float32Array(m*3);if(A)j.__normalArray=new Float32Array(m*3);if(t.hasTangents)j.__tangentArray=new Float32Array(m*4);if(o)j.__colorArray=new Float32Array(m*3);if(p){if(t.faceUvs.length>0||t.faceVertexUvs.length>0)j.__uvArray=new Float32Array(m*2);if(t.faceUvs.length>1||t.faceVertexUvs.length>1)j.__uv2Array=new Float32Array(m*2)}if(k.geometry.skinWeights.length&&k.geometry.skinIndices.length)j.__skinVertexAArray=new Float32Array(m*
 4),j.__skinVertexBArray=new Float32Array(m*4),j.__skinIndexArray=new Float32Array(m*4),j.__skinWeightArray=new Float32Array(m*4);j.__faceArray=new Uint16Array(v*3+(k.geometry.edgeFaces?k.geometry.edgeFaces.length*6:0));j.__lineArray=new Uint16Array(J*2);if(j.numMorphTargets){j.__morphTargetsArrays=[];t=0;for(u=j.numMorphTargets;t<u;t++)j.__morphTargetsArrays.push(new Float32Array(m*3))}j.__needsSmoothNormals=A==THREE.SmoothShading;j.__uvType=p;j.__vertexColorType=o;j.__normalType=A;j.__webglFaceCount=
-v*3+(k.geometry.edgeFaces?k.geometry.edgeFaces.length*6:0);j.__webglLineCount=J*2;t=0;for(u=n.length;t<u;t++)if(n[t].attributes)for(a in j.__webglCustomAttributes={},n[t].attributes){p=n[t].attributes[a];if(!p.__webglInitialized||p.createUniqueBuffers)p.__webglInitialized=!0,v=1,p.type==="v2"?v=2:p.type==="v3"?v=3:p.type==="v4"?v=4:p.type==="c"&&(v=3),p.size=v,p.needsUpdate=!0,p.array=new Float32Array(m*v),p.buffer=f.createBuffer(),p.buffer.belongsToAttribute=a;j.__webglCustomAttributes[a]=p}j.__inittedArrays=
-!0;h.__dirtyVertices=!0;h.__dirtyMorphTargets=!0;h.__dirtyElements=!0;h.__dirtyUvs=!0;h.__dirtyNormals=!0;h.__dirtyTangents=!0;h.__dirtyColors=!0}d instanceof THREE.ShadowVolume?x(c.__webglShadowVolumes,g,d):x(c.__webglObjects,g,d)}else if(d instanceof THREE.LensFlare)x(c.__webglLensFlares,void 0,d);else if(d instanceof THREE.Ribbon){h=d.geometry;if(!h.__webglVertexBuffer)e=h,e.__webglVertexBuffer=f.createBuffer(),e.__webglColorBuffer=f.createBuffer(),e=h,g=e.vertices.length,e.__vertexArray=new Float32Array(g*
-3),e.__colorArray=new Float32Array(g*3),e.__webglVertexCount=g,h.__dirtyVertices=!0,h.__dirtyColors=!0;x(c.__webglObjects,h,d)}else if(d instanceof THREE.Line){h=d.geometry;if(!h.__webglVertexBuffer)e=h,e.__webglVertexBuffer=f.createBuffer(),e.__webglColorBuffer=f.createBuffer(),e=h,g=e.vertices.length,e.__vertexArray=new Float32Array(g*3),e.__colorArray=new Float32Array(g*3),e.__webglLineCount=g,h.__dirtyVertices=!0,h.__dirtyColors=!0;x(c.__webglObjects,h,d)}else if(d instanceof THREE.ParticleSystem){h=
-d.geometry;if(!h.__webglVertexBuffer)e=h,e.__webglVertexBuffer=f.createBuffer(),e.__webglColorBuffer=f.createBuffer(),e=h,g=e.vertices.length,e.__vertexArray=new Float32Array(g*3),e.__colorArray=new Float32Array(g*3),e.__sortArray=[],e.__webglParticleCount=g,h.__dirtyVertices=!0,h.__dirtyColors=!0;x(c.__webglObjects,h,d)}else THREE.MarchingCubes!==void 0&&d instanceof THREE.MarchingCubes?c.__webglObjectsImmediate.push({object:d,opaque:{list:[],count:0},transparent:{list:[],count:0}}):d instanceof
-THREE.Sprite&&c.__webglSprites.push(d);b.__objectsAdded.splice(0,1)}for(;b.__objectsRemoved.length;){d=b.__objectsRemoved[0];c=b;e=h=void 0;if(d instanceof THREE.Mesh)for(h=c.__webglObjects.length-1;h>=0;h--){if(e=c.__webglObjects[h].object,d==e){c.__webglObjects.splice(h,1);break}}else if(d instanceof THREE.Sprite)for(h=c.__webglSprites.length-1;h>=0;h--)if(e=c.__webglSprites[h],d==e){c.__webglSprites.splice(h,1);break}b.__objectsRemoved.splice(0,1)}d=0;for(c=b.__webglObjects.length;d<c;d++)y(b.__webglObjects[d].object,
-b);d=0;for(c=b.__webglShadowVolumes.length;d<c;d++)y(b.__webglShadowVolumes[d].object,b);d=0;for(c=b.__webglLensFlares.length;d<c;d++)y(b.__webglLensFlares[d].object,b)};this.setFaceCulling=function(b,d){b?(!d||d=="ccw"?f.frontFace(f.CCW):f.frontFace(f.CW),b=="back"?f.cullFace(f.BACK):b=="front"?f.cullFace(f.FRONT):f.cullFace(f.FRONT_AND_BACK),f.enable(f.CULL_FACE)):f.disable(f.CULL_FACE)};this.supportsVertexTextures=function(){return va}};
+v*3+(k.geometry.edgeFaces?k.geometry.edgeFaces.length*6:0);j.__webglLineCount=J*2;t=0;for(u=n.length;t<u;t++)if(n[t].attributes)for(a in j.__webglCustomAttributes={},n[t].attributes){p={};for(prop in n[t].attributes[a])p[prop]=n[t].attributes[a][prop];if(!p.__webglInitialized||p.createUniqueBuffers)p.__webglInitialized=!0,v=1,p.type==="v2"?v=2:p.type==="v3"?v=3:p.type==="v4"?v=4:p.type==="c"&&(v=3),p.size=v,p.needsUpdate=!0,p.array=new Float32Array(m*v),p.buffer=f.createBuffer(),p.buffer.belongsToAttribute=
+a;j.__webglCustomAttributes[a]=p}j.__inittedArrays=!0;h.__dirtyVertices=!0;h.__dirtyMorphTargets=!0;h.__dirtyElements=!0;h.__dirtyUvs=!0;h.__dirtyNormals=!0;h.__dirtyTangents=!0;h.__dirtyColors=!0}d instanceof THREE.ShadowVolume?x(c.__webglShadowVolumes,g,d):x(c.__webglObjects,g,d)}else if(d instanceof THREE.LensFlare)x(c.__webglLensFlares,void 0,d);else if(d instanceof THREE.Ribbon){h=d.geometry;if(!h.__webglVertexBuffer)e=h,e.__webglVertexBuffer=f.createBuffer(),e.__webglColorBuffer=f.createBuffer(),
+e=h,g=e.vertices.length,e.__vertexArray=new Float32Array(g*3),e.__colorArray=new Float32Array(g*3),e.__webglVertexCount=g,h.__dirtyVertices=!0,h.__dirtyColors=!0;x(c.__webglObjects,h,d)}else if(d instanceof THREE.Line){h=d.geometry;if(!h.__webglVertexBuffer)e=h,e.__webglVertexBuffer=f.createBuffer(),e.__webglColorBuffer=f.createBuffer(),e=h,g=e.vertices.length,e.__vertexArray=new Float32Array(g*3),e.__colorArray=new Float32Array(g*3),e.__webglLineCount=g,h.__dirtyVertices=!0,h.__dirtyColors=!0;x(c.__webglObjects,
+h,d)}else if(d instanceof THREE.ParticleSystem){h=d.geometry;if(!h.__webglVertexBuffer)e=h,e.__webglVertexBuffer=f.createBuffer(),e.__webglColorBuffer=f.createBuffer(),e=h,g=e.vertices.length,e.__vertexArray=new Float32Array(g*3),e.__colorArray=new Float32Array(g*3),e.__sortArray=[],e.__webglParticleCount=g,h.__dirtyVertices=!0,h.__dirtyColors=!0;x(c.__webglObjects,h,d)}else THREE.MarchingCubes!==void 0&&d instanceof THREE.MarchingCubes?c.__webglObjectsImmediate.push({object:d,opaque:{list:[],count:0},
+transparent:{list:[],count:0}}):d instanceof THREE.Sprite&&c.__webglSprites.push(d);b.__objectsAdded.splice(0,1)}for(;b.__objectsRemoved.length;){d=b.__objectsRemoved[0];c=b;e=h=void 0;if(d instanceof THREE.Mesh)for(h=c.__webglObjects.length-1;h>=0;h--){if(e=c.__webglObjects[h].object,d==e){c.__webglObjects.splice(h,1);break}}else if(d instanceof THREE.Sprite)for(h=c.__webglSprites.length-1;h>=0;h--)if(e=c.__webglSprites[h],d==e){c.__webglSprites.splice(h,1);break}b.__objectsRemoved.splice(0,1)}d=
+0;for(c=b.__webglObjects.length;d<c;d++)y(b.__webglObjects[d].object,b);d=0;for(c=b.__webglShadowVolumes.length;d<c;d++)y(b.__webglShadowVolumes[d].object,b);d=0;for(c=b.__webglLensFlares.length;d<c;d++)y(b.__webglLensFlares[d].object,b)};this.setFaceCulling=function(b,d){b?(!d||d=="ccw"?f.frontFace(f.CCW):f.frontFace(f.CW),b=="back"?f.cullFace(f.BACK):b=="front"?f.cullFace(f.FRONT):f.cullFace(f.FRONT_AND_BACK),f.enable(f.CULL_FACE)):f.disable(f.CULL_FACE)};this.supportsVertexTextures=function(){return va}};
 THREE.WebGLRenderTarget=function(b,c,d){this.width=b;this.height=c;d=d||{};this.wrapS=d.wrapS!==void 0?d.wrapS:THREE.ClampToEdgeWrapping;this.wrapT=d.wrapT!==void 0?d.wrapT:THREE.ClampToEdgeWrapping;this.magFilter=d.magFilter!==void 0?d.magFilter:THREE.LinearFilter;this.minFilter=d.minFilter!==void 0?d.minFilter:THREE.LinearMipMapLinearFilter;this.format=d.format!==void 0?d.format:THREE.RGBAFormat;this.type=d.type!==void 0?d.type:THREE.UnsignedByteType;this.depthBuffer=d.depthBuffer!==void 0?d.depthBuffer:
 !0;this.stencilBuffer=d.stencilBuffer!==void 0?d.stencilBuffer:!0};
 THREE.SoundRenderer=function(){this.volume=1;this.domElement=document.createElement("div");this.domElement.id="THREESound";this.cameraPosition=new THREE.Vector3;this.soundPosition=new THREE.Vector3;this.render=function(b,c,d){d&&b.update(void 0,!1,c);var d=b.sounds,e,g=d.length;for(e=0;e<g;e++)b=d[e],this.soundPosition.set(b.matrixWorld.n14,b.matrixWorld.n24,b.matrixWorld.n34),this.soundPosition.subSelf(c.position),b.isPlaying&&b.isLoaded&&(b.isAddedToDOM||b.addToDOM(this.domElement),b.calculateVolumeAndPan(this.soundPosition))}};

+ 8 - 8
build/custom/ThreeWebGL.js

@@ -190,8 +190,8 @@ k.image.__webglTextureCube)}}else x(k,e);c.uniformMatrix4fv(i.modelViewMatrix,!1
 THREE.MeshPhongMaterial||f instanceof THREE.MeshLambertMaterial||f instanceof THREE.MeshShaderMaterial||f.skinning)&&i.viewMatrix!==null&&c.uniformMatrix4fv(i.viewMatrix,!1,la);if(f instanceof THREE.ShadowVolumeDynamicMaterial)b=j.directionalLightDirection.value,b[0]=-d[1].position.x,b[1]=-d[1].position.y,b[2]=-d[1].position.z,c.uniform3fv(i.directionalLightDirection,b),c.uniformMatrix4fv(i.objectMatrix,!1,h._objectMatrixArray),c.uniformMatrix4fv(i.viewMatrix,!1,la);f.skinning&&(c.uniformMatrix4fv(i.cameraInverseMatrix,
 !1,la),c.uniformMatrix4fv(i.boneGlobalMatrices,!1,h.boneMatrices));return g}function f(b,d,f,h,g,i){if(h.opacity!=0){var j,b=e(b,d,f,h,i).attributes;if(!h.morphTargets&&b.position>=0)c.bindBuffer(c.ARRAY_BUFFER,g.__webglVertexBuffer),c.vertexAttribPointer(b.position,3,c.FLOAT,!1,0,0);else{d=h.program.attributes;i.morphTargetBase!==-1?(c.bindBuffer(c.ARRAY_BUFFER,g.__webglMorphTargetsBuffers[i.morphTargetBase]),c.vertexAttribPointer(d.position,3,c.FLOAT,!1,0,0)):d.position>=0&&(c.bindBuffer(c.ARRAY_BUFFER,
 g.__webglVertexBuffer),c.vertexAttribPointer(d.position,3,c.FLOAT,!1,0,0));if(i.morphTargetForcedOrder.length)for(var f=0,k=i.morphTargetForcedOrder,o=i.morphTargetInfluences;f<h.numSupportedMorphTargets&&f<k.length;)c.bindBuffer(c.ARRAY_BUFFER,g.__webglMorphTargetsBuffers[k[f]]),c.vertexAttribPointer(d["morphTarget"+f],3,c.FLOAT,!1,0,0),i.__webglMorphTargetInfluences[f]=o[k[f]],f++;else{var k=[],n=-1,p=0,o=i.morphTargetInfluences,G,ua=o.length,f=0;for(i.morphTargetBase!==-1&&(k[i.morphTargetBase]=
-!0);f<h.numSupportedMorphTargets;){for(G=0;G<ua;G++)!k[G]&&o[G]>n&&(p=G,n=o[p]);c.bindBuffer(c.ARRAY_BUFFER,g.__webglMorphTargetsBuffers[p]);c.vertexAttribPointer(d["morphTarget"+f],3,c.FLOAT,!1,0,0);i.__webglMorphTargetInfluences[f]=n;k[p]=1;n=-1;f++}}h.program.uniforms.morphTargetInfluences!==null&&c.uniform1fv(h.program.uniforms.morphTargetInfluences,i.__webglMorphTargetInfluences)}if(h.attributes)for(j in h.attributes)b[j]!==void 0&&b[j]>=0&&(d=h.attributes[j],d.buffer&&(c.bindBuffer(c.ARRAY_BUFFER,
-d.buffer),c.vertexAttribPointer(b[j],d.size,c.FLOAT,!1,0,0)));b.color>=0&&(c.bindBuffer(c.ARRAY_BUFFER,g.__webglColorBuffer),c.vertexAttribPointer(b.color,3,c.FLOAT,!1,0,0));b.normal>=0&&(c.bindBuffer(c.ARRAY_BUFFER,g.__webglNormalBuffer),c.vertexAttribPointer(b.normal,3,c.FLOAT,!1,0,0));b.tangent>=0&&(c.bindBuffer(c.ARRAY_BUFFER,g.__webglTangentBuffer),c.vertexAttribPointer(b.tangent,4,c.FLOAT,!1,0,0));b.uv>=0&&(g.__webglUVBuffer?(c.bindBuffer(c.ARRAY_BUFFER,g.__webglUVBuffer),c.vertexAttribPointer(b.uv,
+!0);f<h.numSupportedMorphTargets;){for(G=0;G<ua;G++)!k[G]&&o[G]>n&&(p=G,n=o[p]);c.bindBuffer(c.ARRAY_BUFFER,g.__webglMorphTargetsBuffers[p]);c.vertexAttribPointer(d["morphTarget"+f],3,c.FLOAT,!1,0,0);i.__webglMorphTargetInfluences[f]=n;k[p]=1;n=-1;f++}}h.program.uniforms.morphTargetInfluences!==null&&c.uniform1fv(h.program.uniforms.morphTargetInfluences,i.__webglMorphTargetInfluences)}if(g.__webglCustomAttributes)for(j in g.__webglCustomAttributes)b[j]>=0&&(d=g.__webglCustomAttributes[j],c.bindBuffer(c.ARRAY_BUFFER,
+d.buffer),c.vertexAttribPointer(b[j],d.size,c.FLOAT,!1,0,0));b.color>=0&&(c.bindBuffer(c.ARRAY_BUFFER,g.__webglColorBuffer),c.vertexAttribPointer(b.color,3,c.FLOAT,!1,0,0));b.normal>=0&&(c.bindBuffer(c.ARRAY_BUFFER,g.__webglNormalBuffer),c.vertexAttribPointer(b.normal,3,c.FLOAT,!1,0,0));b.tangent>=0&&(c.bindBuffer(c.ARRAY_BUFFER,g.__webglTangentBuffer),c.vertexAttribPointer(b.tangent,4,c.FLOAT,!1,0,0));b.uv>=0&&(g.__webglUVBuffer?(c.bindBuffer(c.ARRAY_BUFFER,g.__webglUVBuffer),c.vertexAttribPointer(b.uv,
 2,c.FLOAT,!1,0,0),c.enableVertexAttribArray(b.uv)):c.disableVertexAttribArray(b.uv));b.uv2>=0&&(g.__webglUV2Buffer?(c.bindBuffer(c.ARRAY_BUFFER,g.__webglUV2Buffer),c.vertexAttribPointer(b.uv2,2,c.FLOAT,!1,0,0),c.enableVertexAttribArray(b.uv2)):c.disableVertexAttribArray(b.uv2));h.skinning&&b.skinVertexA>=0&&b.skinVertexB>=0&&b.skinIndex>=0&&b.skinWeight>=0&&(c.bindBuffer(c.ARRAY_BUFFER,g.__webglSkinVertexABuffer),c.vertexAttribPointer(b.skinVertexA,4,c.FLOAT,!1,0,0),c.bindBuffer(c.ARRAY_BUFFER,g.__webglSkinVertexBBuffer),
 c.vertexAttribPointer(b.skinVertexB,4,c.FLOAT,!1,0,0),c.bindBuffer(c.ARRAY_BUFFER,g.__webglSkinIndicesBuffer),c.vertexAttribPointer(b.skinIndex,4,c.FLOAT,!1,0,0),c.bindBuffer(c.ARRAY_BUFFER,g.__webglSkinWeightsBuffer),c.vertexAttribPointer(b.skinWeight,4,c.FLOAT,!1,0,0));i instanceof THREE.Mesh?(h.wireframe?(c.lineWidth(h.wireframeLinewidth),c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,g.__webglLineBuffer),c.drawElements(c.LINES,g.__webglLineCount,c.UNSIGNED_SHORT,0)):(c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,
 g.__webglFaceBuffer),c.drawElements(c.TRIANGLES,g.__webglFaceCount,c.UNSIGNED_SHORT,0)),$.data.vertices+=g.__webglFaceCount,$.data.faces+=g.__webglFaceCount/3,$.data.drawCalls++):i instanceof THREE.Line?(i=i.type==THREE.LineStrip?c.LINE_STRIP:c.LINES,c.lineWidth(h.linewidth),c.drawArrays(i,0,g.__webglLineCount),$.data.drawCalls++):i instanceof THREE.ParticleSystem?(c.drawArrays(c.POINTS,0,g.__webglParticleCount),$.data.drawCalls++):i instanceof THREE.Ribbon&&(c.drawArrays(c.TRIANGLE_STRIP,0,g.__webglVertexCount),
@@ -283,11 +283,11 @@ c.createBuffer();i.__webglNormalBuffer=c.createBuffer();i.__webglTangentBuffer=c
 n.materials.length;x<l;x++)(z=n.materials[x])&&o.push(z)}else(z=x)&&o.push(z);n=o;a:{u=p=void 0;r=n.length;for(p=0;p<r;p++)if(u=n[p],u.map||u.lightMap||u instanceof THREE.MeshShaderMaterial){p=!0;break a}p=!1}a:{r=u=void 0;o=n.length;for(u=0;u<o;u++)if(r=n[u],!(r instanceof THREE.MeshBasicMaterial&&!r.envMap||r instanceof THREE.MeshDepthMaterial)){u=r&&r.shading!=void 0&&r.shading==THREE.SmoothShading?THREE.SmoothShading:THREE.FlatShading;break a}u=!1}a:{o=r=void 0;x=n.length;for(r=0;r<x;r++)if(o=
 n[r],o.vertexColors){o=o.vertexColors;break a}o=!1}i.__vertexArray=new Float32Array(k*3);if(u)i.__normalArray=new Float32Array(k*3);if(q.hasTangents)i.__tangentArray=new Float32Array(k*4);if(o)i.__colorArray=new Float32Array(k*3);if(p){if(q.faceUvs.length>0||q.faceVertexUvs.length>0)i.__uvArray=new Float32Array(k*2);if(q.faceUvs.length>1||q.faceVertexUvs.length>1)i.__uv2Array=new Float32Array(k*2)}if(j.geometry.skinWeights.length&&j.geometry.skinIndices.length)i.__skinVertexAArray=new Float32Array(k*
 4),i.__skinVertexBArray=new Float32Array(k*4),i.__skinIndexArray=new Float32Array(k*4),i.__skinWeightArray=new Float32Array(k*4);i.__faceArray=new Uint16Array(t*3+(j.geometry.edgeFaces?j.geometry.edgeFaces.length*6:0));i.__lineArray=new Uint16Array(v*2);if(i.numMorphTargets){i.__morphTargetsArrays=[];q=0;for(r=i.numMorphTargets;q<r;q++)i.__morphTargetsArrays.push(new Float32Array(k*3))}i.__needsSmoothNormals=u==THREE.SmoothShading;i.__uvType=p;i.__vertexColorType=o;i.__normalType=u;i.__webglFaceCount=
-t*3+(j.geometry.edgeFaces?j.geometry.edgeFaces.length*6:0);i.__webglLineCount=v*2;q=0;for(r=n.length;q<r;q++)if(n[q].attributes)for(a in i.__webglCustomAttributes={},n[q].attributes){p=n[q].attributes[a];if(!p.__webglInitialized||p.createUniqueBuffers)p.__webglInitialized=!0,t=1,p.type==="v2"?t=2:p.type==="v3"?t=3:p.type==="v4"?t=4:p.type==="c"&&(t=3),p.size=t,p.needsUpdate=!0,p.array=new Float32Array(k*t),p.buffer=c.createBuffer(),p.buffer.belongsToAttribute=a;i.__webglCustomAttributes[a]=p}i.__inittedArrays=
-!0;g.__dirtyVertices=!0;g.__dirtyMorphTargets=!0;g.__dirtyElements=!0;g.__dirtyUvs=!0;g.__dirtyNormals=!0;g.__dirtyTangents=!0;g.__dirtyColors=!0}d instanceof THREE.ShadowVolume?Q(e.__webglShadowVolumes,h,d):Q(e.__webglObjects,h,d)}else if(d instanceof THREE.LensFlare)Q(e.__webglLensFlares,void 0,d);else if(d instanceof THREE.Ribbon){g=d.geometry;if(!g.__webglVertexBuffer)f=g,f.__webglVertexBuffer=c.createBuffer(),f.__webglColorBuffer=c.createBuffer(),f=g,h=f.vertices.length,f.__vertexArray=new Float32Array(h*
-3),f.__colorArray=new Float32Array(h*3),f.__webglVertexCount=h,g.__dirtyVertices=!0,g.__dirtyColors=!0;Q(e.__webglObjects,g,d)}else if(d instanceof THREE.Line){g=d.geometry;if(!g.__webglVertexBuffer)f=g,f.__webglVertexBuffer=c.createBuffer(),f.__webglColorBuffer=c.createBuffer(),f=g,h=f.vertices.length,f.__vertexArray=new Float32Array(h*3),f.__colorArray=new Float32Array(h*3),f.__webglLineCount=h,g.__dirtyVertices=!0,g.__dirtyColors=!0;Q(e.__webglObjects,g,d)}else if(d instanceof THREE.ParticleSystem){g=
-d.geometry;if(!g.__webglVertexBuffer)f=g,f.__webglVertexBuffer=c.createBuffer(),f.__webglColorBuffer=c.createBuffer(),f=g,h=f.vertices.length,f.__vertexArray=new Float32Array(h*3),f.__colorArray=new Float32Array(h*3),f.__sortArray=[],f.__webglParticleCount=h,g.__dirtyVertices=!0,g.__dirtyColors=!0;Q(e.__webglObjects,g,d)}else THREE.MarchingCubes!==void 0&&d instanceof THREE.MarchingCubes?e.__webglObjectsImmediate.push({object:d,opaque:{list:[],count:0},transparent:{list:[],count:0}}):d instanceof
-THREE.Sprite&&e.__webglSprites.push(d);b.__objectsAdded.splice(0,1)}for(;b.__objectsRemoved.length;){d=b.__objectsRemoved[0];e=b;f=g=void 0;if(d instanceof THREE.Mesh)for(g=e.__webglObjects.length-1;g>=0;g--){if(f=e.__webglObjects[g].object,d==f){e.__webglObjects.splice(g,1);break}}else if(d instanceof THREE.Sprite)for(g=e.__webglSprites.length-1;g>=0;g--)if(f=e.__webglSprites[g],d==f){e.__webglSprites.splice(g,1);break}b.__objectsRemoved.splice(0,1)}d=0;for(e=b.__webglObjects.length;d<e;d++)y(b.__webglObjects[d].object,
-b);d=0;for(e=b.__webglShadowVolumes.length;d<e;d++)y(b.__webglShadowVolumes[d].object,b);d=0;for(e=b.__webglLensFlares.length;d<e;d++)y(b.__webglLensFlares[d].object,b)};this.setFaceCulling=function(b,d){b?(!d||d=="ccw"?c.frontFace(c.CCW):c.frontFace(c.CW),b=="back"?c.cullFace(c.BACK):b=="front"?c.cullFace(c.FRONT):c.cullFace(c.FRONT_AND_BACK),c.enable(c.CULL_FACE)):c.disable(c.CULL_FACE)};this.supportsVertexTextures=function(){return Fa}};
+t*3+(j.geometry.edgeFaces?j.geometry.edgeFaces.length*6:0);i.__webglLineCount=v*2;q=0;for(r=n.length;q<r;q++)if(n[q].attributes)for(a in i.__webglCustomAttributes={},n[q].attributes){p={};for(prop in n[q].attributes[a])p[prop]=n[q].attributes[a][prop];if(!p.__webglInitialized||p.createUniqueBuffers)p.__webglInitialized=!0,t=1,p.type==="v2"?t=2:p.type==="v3"?t=3:p.type==="v4"?t=4:p.type==="c"&&(t=3),p.size=t,p.needsUpdate=!0,p.array=new Float32Array(k*t),p.buffer=c.createBuffer(),p.buffer.belongsToAttribute=
+a;i.__webglCustomAttributes[a]=p}i.__inittedArrays=!0;g.__dirtyVertices=!0;g.__dirtyMorphTargets=!0;g.__dirtyElements=!0;g.__dirtyUvs=!0;g.__dirtyNormals=!0;g.__dirtyTangents=!0;g.__dirtyColors=!0}d instanceof THREE.ShadowVolume?Q(e.__webglShadowVolumes,h,d):Q(e.__webglObjects,h,d)}else if(d instanceof THREE.LensFlare)Q(e.__webglLensFlares,void 0,d);else if(d instanceof THREE.Ribbon){g=d.geometry;if(!g.__webglVertexBuffer)f=g,f.__webglVertexBuffer=c.createBuffer(),f.__webglColorBuffer=c.createBuffer(),
+f=g,h=f.vertices.length,f.__vertexArray=new Float32Array(h*3),f.__colorArray=new Float32Array(h*3),f.__webglVertexCount=h,g.__dirtyVertices=!0,g.__dirtyColors=!0;Q(e.__webglObjects,g,d)}else if(d instanceof THREE.Line){g=d.geometry;if(!g.__webglVertexBuffer)f=g,f.__webglVertexBuffer=c.createBuffer(),f.__webglColorBuffer=c.createBuffer(),f=g,h=f.vertices.length,f.__vertexArray=new Float32Array(h*3),f.__colorArray=new Float32Array(h*3),f.__webglLineCount=h,g.__dirtyVertices=!0,g.__dirtyColors=!0;Q(e.__webglObjects,
+g,d)}else if(d instanceof THREE.ParticleSystem){g=d.geometry;if(!g.__webglVertexBuffer)f=g,f.__webglVertexBuffer=c.createBuffer(),f.__webglColorBuffer=c.createBuffer(),f=g,h=f.vertices.length,f.__vertexArray=new Float32Array(h*3),f.__colorArray=new Float32Array(h*3),f.__sortArray=[],f.__webglParticleCount=h,g.__dirtyVertices=!0,g.__dirtyColors=!0;Q(e.__webglObjects,g,d)}else THREE.MarchingCubes!==void 0&&d instanceof THREE.MarchingCubes?e.__webglObjectsImmediate.push({object:d,opaque:{list:[],count:0},
+transparent:{list:[],count:0}}):d instanceof THREE.Sprite&&e.__webglSprites.push(d);b.__objectsAdded.splice(0,1)}for(;b.__objectsRemoved.length;){d=b.__objectsRemoved[0];e=b;f=g=void 0;if(d instanceof THREE.Mesh)for(g=e.__webglObjects.length-1;g>=0;g--){if(f=e.__webglObjects[g].object,d==f){e.__webglObjects.splice(g,1);break}}else if(d instanceof THREE.Sprite)for(g=e.__webglSprites.length-1;g>=0;g--)if(f=e.__webglSprites[g],d==f){e.__webglSprites.splice(g,1);break}b.__objectsRemoved.splice(0,1)}d=
+0;for(e=b.__webglObjects.length;d<e;d++)y(b.__webglObjects[d].object,b);d=0;for(e=b.__webglShadowVolumes.length;d<e;d++)y(b.__webglShadowVolumes[d].object,b);d=0;for(e=b.__webglLensFlares.length;d<e;d++)y(b.__webglLensFlares[d].object,b)};this.setFaceCulling=function(b,d){b?(!d||d=="ccw"?c.frontFace(c.CCW):c.frontFace(c.CW),b=="back"?c.cullFace(c.BACK):b=="front"?c.cullFace(c.FRONT):c.cullFace(c.FRONT_AND_BACK),c.enable(c.CULL_FACE)):c.disable(c.CULL_FACE)};this.supportsVertexTextures=function(){return Fa}};
 THREE.WebGLRenderTarget=function(b,d,e){this.width=b;this.height=d;e=e||{};this.wrapS=e.wrapS!==void 0?e.wrapS:THREE.ClampToEdgeWrapping;this.wrapT=e.wrapT!==void 0?e.wrapT:THREE.ClampToEdgeWrapping;this.magFilter=e.magFilter!==void 0?e.magFilter:THREE.LinearFilter;this.minFilter=e.minFilter!==void 0?e.minFilter:THREE.LinearMipMapLinearFilter;this.format=e.format!==void 0?e.format:THREE.RGBAFormat;this.type=e.type!==void 0?e.type:THREE.UnsignedByteType;this.depthBuffer=e.depthBuffer!==void 0?e.depthBuffer:
 !0;this.stencilBuffer=e.stencilBuffer!==void 0?e.stencilBuffer:!0};