Browse Source

Updated builds.

Mr.doob 11 years ago
parent
commit
c74f7fd21e
2 changed files with 7 additions and 1 deletions
  1. 6 0
      build/three.js
  2. 1 1
      build/three.min.js

+ 6 - 0
build/three.js

@@ -8908,6 +8908,12 @@ THREE.BufferAttribute.prototype = {
 
 	constructor: THREE.BufferAttribute,
 
+	get length () {
+
+		return this.array.length;
+
+	},
+
 	set: function ( value ) {
 
 		this.array.set( value );

+ 1 - 1
build/three.min.js

@@ -181,7 +181,7 @@ s.vertexNormalsLength=H.length;H=0;for(za=Math.min(B.length,3);H<za;H++)if(y=B[H
 x=B.length;r<x;r+=2)I.pushLine(B[r],B[r+1]);else for(r=0,x=A.length/3-1;r<x;r++)I.pushLine(r,r+1)}}else{if(r instanceof THREE.Geometry&&(ka.multiplyMatrices(Y,R),v=q.geometry.vertices,0!==v.length))for(oa=a(),oa.positionScreen.copy(v[0]).applyMatrix4(ka),r=q.type===THREE.LinePieces?2:1,ia=1,ya=v.length;ia<ya;ia++)oa=a(),oa.positionScreen.copy(v[ia]).applyMatrix4(ka),0<(ia+1)%r||(W=p[n-2],O.copy(oa.positionScreen),S.copy(W.positionScreen),!0===e(O,S)&&(O.multiplyScalar(1/O.w),S.multiplyScalar(1/S.w),
 w=c(),w.id=q.id,w.v1.positionScreen.copy(O),w.v2.positionScreen.copy(S),w.z=Math.max(O.z,S.z),w.material=q.material,q.material.vertexColors===THREE.VertexColors&&(w.vertexColors[0].copy(q.geometry.colors[ia]),w.vertexColors[1].copy(q.geometry.colors[ia-1])),K.elements.push(w)))}else q instanceof THREE.Sprite&&(N.set(R.elements[12],R.elements[13],R.elements[14],1),N.applyMatrix4(Y),r=1/N.w,N.z*=r,-1<=N.z&&1>=N.z&&(P===C?(x=new THREE.RenderableSprite,F.push(x),C++,P++,G=x):G=F[P++],G.id=q.id,G.x=N.x*
 r,G.y=N.y*r,G.z=N.z,G.object=q,G.rotation=q.rotation,G.scale.x=q.scale.x*Math.abs(G.x-(N.x+h.projectionMatrix.elements[0])/(N.w+h.projectionMatrix.elements[12])),G.scale.y=q.scale.y*Math.abs(G.y-(N.y+h.projectionMatrix.elements[5])/(N.w+h.projectionMatrix.elements[13])),G.material=q.material,K.elements.push(G)));!0===l&&K.elements.sort(d);return K}};THREE.Face3=function(a,b,c,d,e,f){this.a=a;this.b=b;this.c=c;this.normal=d instanceof THREE.Vector3?d:new THREE.Vector3;this.vertexNormals=d instanceof Array?d:[];this.color=e instanceof THREE.Color?e:new THREE.Color;this.vertexColors=e instanceof Array?e:[];this.vertexTangents=[];this.materialIndex=void 0!==f?f:0};
-THREE.Face3.prototype={constructor:THREE.Face3,clone:function(){var a=new THREE.Face3(this.a,this.b,this.c);a.normal.copy(this.normal);a.color.copy(this.color);a.materialIndex=this.materialIndex;var b,c;b=0;for(c=this.vertexNormals.length;b<c;b++)a.vertexNormals[b]=this.vertexNormals[b].clone();b=0;for(c=this.vertexColors.length;b<c;b++)a.vertexColors[b]=this.vertexColors[b].clone();b=0;for(c=this.vertexTangents.length;b<c;b++)a.vertexTangents[b]=this.vertexTangents[b].clone();return a}};THREE.Face4=function(a,b,c,d,e,f,g){console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead.");return new THREE.Face3(a,b,c,e,f,g)};THREE.BufferAttribute=function(){};THREE.BufferAttribute.prototype={constructor:THREE.BufferAttribute,set:function(a){this.array.set(a)},setX:function(a,b){this.array[a*this.itemSize]=b},setY:function(a,b){this.array[a*this.itemSize+1]=b},setZ:function(a,b){this.array[a*this.itemSize+2]=b},setXY:function(a,b,c){a*=this.itemSize;this.array[a]=b;this.array[a+1]=c},setXYZ:function(a,b,c,d){a*=this.itemSize;this.array[a]=b;this.array[a+1]=c;this.array[a+2]=d}};
+THREE.Face3.prototype={constructor:THREE.Face3,clone:function(){var a=new THREE.Face3(this.a,this.b,this.c);a.normal.copy(this.normal);a.color.copy(this.color);a.materialIndex=this.materialIndex;var b,c;b=0;for(c=this.vertexNormals.length;b<c;b++)a.vertexNormals[b]=this.vertexNormals[b].clone();b=0;for(c=this.vertexColors.length;b<c;b++)a.vertexColors[b]=this.vertexColors[b].clone();b=0;for(c=this.vertexTangents.length;b<c;b++)a.vertexTangents[b]=this.vertexTangents[b].clone();return a}};THREE.Face4=function(a,b,c,d,e,f,g){console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead.");return new THREE.Face3(a,b,c,e,f,g)};THREE.BufferAttribute=function(){};THREE.BufferAttribute.prototype={constructor:THREE.BufferAttribute,get length(){return this.array.length},set:function(a){this.array.set(a)},setX:function(a,b){this.array[a*this.itemSize]=b},setY:function(a,b){this.array[a*this.itemSize+1]=b},setZ:function(a,b){this.array[a*this.itemSize+2]=b},setXY:function(a,b,c){a*=this.itemSize;this.array[a]=b;this.array[a+1]=c},setXYZ:function(a,b,c,d){a*=this.itemSize;this.array[a]=b;this.array[a+1]=c;this.array[a+2]=d}};
 THREE.Int8Attribute=function(a,b){this.array=new Int8Array(a*b);this.itemSize=b};THREE.Int8Attribute.prototype=Object.create(THREE.BufferAttribute.prototype);THREE.Uint8Attribute=function(a,b){this.array=new Uint8Array(a*b);this.itemSize=b};THREE.Uint8Attribute.prototype=Object.create(THREE.BufferAttribute.prototype);THREE.Uint8ClampedAttribute=function(a,b){this.array=new Uint8ClampedArray(a*b);this.itemSize=b};THREE.Uint8ClampedAttribute.prototype=Object.create(THREE.BufferAttribute.prototype);
 THREE.Int16Attribute=function(a,b){this.array=new Int16Array(a*b);this.itemSize=b};THREE.Int16Attribute.prototype=Object.create(THREE.BufferAttribute.prototype);THREE.Uint16Attribute=function(a,b){this.array=new Uint16Array(a*b);this.itemSize=b};THREE.Uint16Attribute.prototype=Object.create(THREE.BufferAttribute.prototype);THREE.Int32Attribute=function(a,b){this.array=new Int32Array(a*b);this.itemSize=b};THREE.Int32Attribute.prototype=Object.create(THREE.BufferAttribute.prototype);
 THREE.Uint32Attribute=function(a,b){this.array=new Uint32Array(a*b);this.itemSize=b};THREE.Uint32Attribute.prototype=Object.create(THREE.BufferAttribute.prototype);THREE.Float32Attribute=function(a,b){this.array=new Float32Array(a*b);this.itemSize=b};THREE.Float32Attribute.prototype=Object.create(THREE.BufferAttribute.prototype);THREE.Float64Attribute=function(a,b){this.array=new Float64Array(a*b);this.itemSize=b};THREE.Float64Attribute.prototype=Object.create(THREE.BufferAttribute.prototype);THREE.BufferGeometry=function(){this.id=THREE.GeometryIdCount++;this.uuid=THREE.Math.generateUUID();this.name="";this.attributes={};this.offsets=this.drawcalls=[];this.boundingSphere=this.boundingBox=null};