Browse Source

make Geometry.mergeVertices 2x faster.

Ben Houston 12 years ago
parent
commit
f96b8b94df
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/core/Geometry.js

+ 1 - 1
src/core/Geometry.js

@@ -620,7 +620,7 @@ THREE.Geometry.prototype = {
 		for ( i = 0, il = this.vertices.length; i < il; i ++ ) {
 
 			v = this.vertices[ i ];
-			key = [ Math.round( v.x * precision ), Math.round( v.y * precision ), Math.round( v.z * precision ) ].join( '_' );
+			key = (( v.x * precision ) | 0 ) + '_' + (( v.y * precision ) | 0 ) + '_' + (( v.z * precision ) | 0 );
 
 			if ( verticesMap[ key ] === undefined ) {