Browse Source

Updated builds.

Mr.doob 11 years ago
parent
commit
684e417a71
2 changed files with 162 additions and 188 deletions
  1. 2 28
      build/three.js
  2. 160 160
      build/three.min.js

+ 2 - 28
build/three.js

@@ -8911,26 +8911,7 @@ THREE.BufferAttribute.prototype = {
 
 	clone: function () {
 
-		var attribute = new THREE.BufferAttribute( null, this.itemSize );
-
-		var types = [ Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array ];
-
-		var sourceArray = this.array;
-
-		for ( var i = 0, il = types.length; i < il; i ++ ) {
-
-			var type = types[ i ];
-
-			if ( sourceArray instanceof type ) {
-
-				attribute.array = new type( sourceArray );
-				break;
-
-			}
-
-		}
-
-		return attribute;
+		return new THREE.BufferAttribute( new this.array.constructor( this.array ), this.itemSize );
 
 	}
 
@@ -9835,18 +9816,11 @@ THREE.BufferGeometry.prototype = {
 
 		/* Create a copy of all attributes for reordering. */
 		var sortedAttributes = {};
-		var types = [ Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array ];
 		for ( var attr in this.attributes ) {
 			if ( attr == 'index' )
 				continue;
 			var sourceArray = this.attributes[ attr ].array;
-			for ( var i = 0, il = types.length; i < il; i ++ ) {
-				var type = types[ i ];
-				if ( sourceArray instanceof type ) {
-					sortedAttributes[ attr ] = new type( this.attributes[ attr ].itemSize * vertexCount );
-					break;
-				}
-			}
+			sortedAttributes[ attr ] = new sourceArray.constructor( this.attributes[ attr ].itemSize * vertexCount );
 		}
 
 		/* Move attribute positions based on the new index map */

File diff suppressed because it is too large
+ 160 - 160
build/three.min.js


Some files were not shown because too many files changed in this diff