Browse Source

Updated builds.

Mr.doob 9 years ago
parent
commit
132d9c7363
2 changed files with 6 additions and 6 deletions
  1. 5 5
      build/three.js
  2. 1 1
      build/three.min.js

+ 5 - 5
build/three.js

@@ -21724,7 +21724,7 @@ THREE.Mesh = function ( geometry, material ) {
 	this.material = material !== undefined ? material : new THREE.MeshBasicMaterial( { color: Math.random() * 0xffffff } );
 
 	this.drawMode = THREE.TrianglesDrawMode;
-	
+
 	this.updateMorphTargets();
 
 };
@@ -21732,9 +21732,9 @@ THREE.Mesh = function ( geometry, material ) {
 THREE.Mesh.prototype = Object.create( THREE.Object3D.prototype );
 THREE.Mesh.prototype.constructor = THREE.Mesh;
 
-THREE.Mesh.prototype.setDrawMode = function ( mode ) {
+THREE.Mesh.prototype.setDrawMode = function ( value ) {
 
-	this.drawMode = mode;
+	this.drawMode = value;
 
 };
 
@@ -25320,8 +25320,8 @@ THREE.WebGLRenderer = function ( parameters ) {
 				renderer.setMode( _gl.LINES );
 
 			} else {
-				
-				switch ( object.mode ) {
+
+				switch ( object.drawMode ) {
 
 					case THREE.TrianglesDrawMode:
 						renderer.setMode( _gl.TRIANGLES );

+ 1 - 1
build/three.min.js

@@ -643,7 +643,7 @@ b){a=[];c=0;for(l=b.length;c<l;c++){var m=b[c];a.push([m,c])}a.sort(k);8<a.lengt
 s.uniform1fv(a.morphTargetInfluences,oa);l=!0}b=d.index;c=d.attributes.position;!0===e.wireframe&&(b=na.getWireframeAttribute(d));null!==b?(a=Ba,a.setIndex(b)):a=Aa;if(l){a:{var l=void 0,q;if(d instanceof THREE.InstancedBufferGeometry&&(q=U.get("ANGLE_instanced_arrays"),null===q)){console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");break a}void 0===l&&(l=0);I.initAttributes();var m=d.attributes,
 h=h.getAttributes(),n=e.defaultAttributeValues,p;for(p in h){var r=h[p];if(0<=r){var t=m[p];if(void 0!==t){var v=t.itemSize,x=na.getAttributeBuffer(t);if(t instanceof THREE.InterleavedBufferAttribute){var D=t.data,F=D.stride,t=t.offset;D instanceof THREE.InstancedInterleavedBuffer?(I.enableAttributeAndDivisor(r,D.meshPerAttribute,q),void 0===d.maxInstancedCount&&(d.maxInstancedCount=D.meshPerAttribute*D.count)):I.enableAttribute(r);s.bindBuffer(s.ARRAY_BUFFER,x);s.vertexAttribPointer(r,v,s.FLOAT,
 !1,F*D.array.BYTES_PER_ELEMENT,(l*F+t)*D.array.BYTES_PER_ELEMENT)}else t instanceof THREE.InstancedBufferAttribute?(I.enableAttributeAndDivisor(r,t.meshPerAttribute,q),void 0===d.maxInstancedCount&&(d.maxInstancedCount=t.meshPerAttribute*t.count)):I.enableAttribute(r),s.bindBuffer(s.ARRAY_BUFFER,x),s.vertexAttribPointer(r,v,s.FLOAT,!1,0,l*v*4)}else if(void 0!==n&&(v=n[p],void 0!==v))switch(v.length){case 2:s.vertexAttrib2fv(r,v);break;case 3:s.vertexAttrib3fv(r,v);break;case 4:s.vertexAttrib4fv(r,
-v);break;default:s.vertexAttrib1fv(r,v)}}}I.disableUnusedAttributes()}null!==b&&s.bindBuffer(s.ELEMENT_ARRAY_BUFFER,na.getAttributeBuffer(b))}q=Infinity;null!==b?q=b.count:void 0!==c&&(q=c.count);p=d.drawRange.start;b=d.drawRange.count;c=null!==g?g.start:0;l=null!==g?g.count:Infinity;g=Math.max(0,p,c);q=Math.min(0+q,p+b,c+l)-1;q=Math.max(0,q-g+1);if(f instanceof THREE.Mesh){if(!0===e.wireframe)I.setLineWidth(e.wireframeLinewidth*G),a.setMode(s.LINES);else switch(f.mode){case THREE.TrianglesDrawMode:a.setMode(s.TRIANGLES);
+v);break;default:s.vertexAttrib1fv(r,v)}}}I.disableUnusedAttributes()}null!==b&&s.bindBuffer(s.ELEMENT_ARRAY_BUFFER,na.getAttributeBuffer(b))}q=Infinity;null!==b?q=b.count:void 0!==c&&(q=c.count);p=d.drawRange.start;b=d.drawRange.count;c=null!==g?g.start:0;l=null!==g?g.count:Infinity;g=Math.max(0,p,c);q=Math.min(0+q,p+b,c+l)-1;q=Math.max(0,q-g+1);if(f instanceof THREE.Mesh){if(!0===e.wireframe)I.setLineWidth(e.wireframeLinewidth*G),a.setMode(s.LINES);else switch(f.drawMode){case THREE.TrianglesDrawMode:a.setMode(s.TRIANGLES);
 break;case THREE.TriangleStripDrawMode:a.setMode(s.TRIANGLE_STRIP);break;case THREE.TriangleFanDrawMode:a.setMode(s.TRIANGLE_FAN)}d instanceof THREE.InstancedBufferGeometry&&0<d.maxInstancedCount?a.renderInstances(d):a.render(g,q)}else f instanceof THREE.Line?(d=e.linewidth,void 0===d&&(d=1),I.setLineWidth(d*G),f instanceof THREE.LineSegments?a.setMode(s.LINES):a.setMode(s.LINE_STRIP),a.render(g,q)):f instanceof THREE.Points&&(a.setMode(s.POINTS),a.render(g,q))};this.render=function(a,b,c,d){if(!1===
 b instanceof THREE.Camera)console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");else{var e=a.fog;ka="";pa=-1;ja=null;!0===a.autoUpdate&&a.updateMatrixWorld();null===b.parent&&b.updateMatrixWorld();b.matrixWorldInverse.getInverse(b.matrixWorld);qa.multiplyMatrices(b.projectionMatrix,b.matrixWorldInverse);ua.setFromMatrix(qa);V.length=0;ma=ea=-1;$.length=0;va.length=0;q(a,b);Y.length=ea+1;aa.length=ma+1;!0===Z.sortObjects&&(Y.sort(m),aa.sort(p));var f=V,g,h,k,l=0,n=
 0,t=0,v,u,w,D=b.matrixWorldInverse,F=0,E=0,B=0,z=0;T.shadows=0;g=T.shadowsPointLight=0;for(h=f.length;g<h;g++)if(k=f[g],v=k.color,u=k.intensity,w=k.distance,k instanceof THREE.AmbientLight)l+=v.r,n+=v.g,t+=v.b;else if(k instanceof THREE.DirectionalLight){k.__webglUniforms||(k.__webglUniforms={direction:new THREE.Vector3,color:new THREE.Color});var A=k.__webglUniforms;A.direction.setFromMatrixPosition(k.matrixWorld);W.setFromMatrixPosition(k.target.matrixWorld);A.direction.sub(W);A.direction.transformDirection(D);