diff --git a/build/three.js b/build/three.js index 8c0cf325bbd0999c6229037be1642666b77c0286..8c8c32d74a445ba049fb55e765d762687b61aff4 100644 --- a/build/three.js +++ b/build/three.js @@ -5542,7 +5542,9 @@ THREE.GeometryLibrary = []; THREE.BufferGeometry = function () { - this.id = THREE.GeometryCount ++; + THREE.GeometryLibrary.push( this ); + + this.id = THREE.GeometryIdCount ++; // attributes diff --git a/build/three.min.js b/build/three.min.js index 7e7acd4ee6af0efabd29c738712c8fab96fabb20..440e25576b3201a6a9330fe7f2b1aeac1831d907 100644 --- a/build/three.min.js +++ b/build/three.min.js @@ -117,7 +117,8 @@ G[b]=new THREE.Vector3;b=0;for(c=this.faces.length;bc.x&&(c.x=a.x),a.yc.y&&(c.y=a.y),a.z c.z&&(c.z=a.z)}else this.boundingBox.min.set(0,0,0),this.boundingBox.max.set(0,0,0)},computeBoundingSphere:function(){var a=0;null===this.boundingSphere&&(this.boundingSphere={radius:0});for(var b=0,c=this.vertices.length;ba&&(a=d)}this.boundingSphere.radius=Math.sqrt(a)},mergeVertices:function(){var a={},b=[],c=[],d,e=Math.pow(10,4),f,g,h,i;f=0;for(g=this.vertices.length;fb.max.x&&(b.max.x=c),db.max.y&&(b.max.y=d),eb.max.z&&(b.max.z=e);if(void 0===a||0===a.length)this.boundingBox.min.set(0,0,0),this.boundingBox.max.set(0,0,0)},computeBoundingSphere:function(){this.boundingSphere||(this.boundingSphere={radius:0});var a=this.attributes.position.array; if(a){for(var b,c=0,d,e,f=0,g=a.length;fc&&(c=b);this.boundingSphere.radius=Math.sqrt(c)}},computeVertexNormals:function(){if(this.attributes.position&&this.attributes.index){var a,b,c,d;a=this.attributes.position.array.length;if(void 0===this.attributes.normal)this.attributes.normal={itemSize:3,array:new Float32Array(a),numItems:a};else{a=0;for(b=this.attributes.normal.array.length;a