Explorar o código

Updated builds.

Mr.doob %!s(int64=11) %!d(string=hai) anos
pai
achega
684e417a71
Modificáronse 2 ficheiros con 162 adicións e 188 borrados
  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 */

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 160 - 160
build/three.min.js


Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio