Browse Source

Updated builds.

Mr.doob 8 years ago
parent
commit
7043f05c80
3 changed files with 174 additions and 285 deletions
  1. 23 41
      build/three.js
  2. 128 203
      build/three.min.js
  3. 23 41
      build/three.module.js

+ 23 - 41
build/three.js

@@ -354,44 +354,6 @@
 
 		}(),
 
-		// http://stackoverflow.com/questions/1669190/javascript-min-max-array-values/13440842#13440842
-
-		arrayMin: function ( array ) {
-
-			var length = array.length, min = Infinity;
-
-			while ( length -- ) {
-
-				if ( array[ length ] < min ) {
-
-					min = array[ length ];
-
-				}
-
-			}
-
-			return min;
-
-		},
-
-		arrayMax: function ( array ) {
-
-			var length = array.length, max = - Infinity;
-
-			while ( length -- ) {
-
-				if ( array[ length ] > max ) {
-
-					max = array[ length ];
-
-				}
-
-			}
-
-			return max;
-
-		},
-
 		clamp: function ( value, min, max ) {
 
 			return Math.max( min, Math.min( max, value ) );
@@ -12431,6 +12393,26 @@
 
 	} );
 
+	// http://stackoverflow.com/questions/1669190/javascript-min-max-array-values/13440842#13440842
+
+	function arrayMax( array ) {
+
+		var length = array.length, max = - Infinity;
+
+		while ( length -- ) {
+
+			if ( array[ length ] > max ) {
+
+				max = array[ length ];
+
+			}
+
+		}
+
+		return max;
+
+	}
+
 	/**
 	 * @author mrdoob / http://mrdoob.com/
 	 * @author kile / http://kile.stravaganza.org/
@@ -13907,7 +13889,7 @@
 
 			if ( Array.isArray( index ) ) {
 
-				this.index = new ( _Math.arrayMax( index ) > 65535 ? Uint32BufferAttribute : Uint16BufferAttribute )( index, 1 );
+				this.index = new ( arrayMax( index ) > 65535 ? Uint32BufferAttribute : Uint16BufferAttribute )( index, 1 );
 
 			} else {
 
@@ -14369,7 +14351,7 @@
 
 			if ( geometry.indices.length > 0 ) {
 
-				var TypeArray = _Math.arrayMax( geometry.indices ) > 65535 ? Uint32Array : Uint16Array;
+				var TypeArray = arrayMax( geometry.indices ) > 65535 ? Uint32Array : Uint16Array;
 				var indices = new TypeArray( geometry.indices.length * 3 );
 				this.setIndex( new BufferAttribute( indices, 1 ).copyIndicesArray( geometry.indices ) );
 
@@ -17658,7 +17640,7 @@
 
 			// console.timeEnd( 'wireframe' );
 
-			var attribute = new ( _Math.arrayMax( indices ) > 65535 ? Uint32BufferAttribute : Uint16BufferAttribute )( indices, 1 );
+			var attribute = new ( arrayMax( indices ) > 65535 ? Uint32BufferAttribute : Uint16BufferAttribute )( indices, 1 );
 
 			updateAttribute( attribute, gl.ELEMENT_ARRAY_BUFFER );
 

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


+ 23 - 41
build/three.module.js

@@ -348,44 +348,6 @@ var _Math = {
 
 	}(),
 
-	// http://stackoverflow.com/questions/1669190/javascript-min-max-array-values/13440842#13440842
-
-	arrayMin: function ( array ) {
-
-		var length = array.length, min = Infinity;
-
-		while ( length -- ) {
-
-			if ( array[ length ] < min ) {
-
-				min = array[ length ];
-
-			}
-
-		}
-
-		return min;
-
-	},
-
-	arrayMax: function ( array ) {
-
-		var length = array.length, max = - Infinity;
-
-		while ( length -- ) {
-
-			if ( array[ length ] > max ) {
-
-				max = array[ length ];
-
-			}
-
-		}
-
-		return max;
-
-	},
-
 	clamp: function ( value, min, max ) {
 
 		return Math.max( min, Math.min( max, value ) );
@@ -12425,6 +12387,26 @@ Object.assign( DirectGeometry.prototype, {
 
 } );
 
+// http://stackoverflow.com/questions/1669190/javascript-min-max-array-values/13440842#13440842
+
+function arrayMax( array ) {
+
+	var length = array.length, max = - Infinity;
+
+	while ( length -- ) {
+
+		if ( array[ length ] > max ) {
+
+			max = array[ length ];
+
+		}
+
+	}
+
+	return max;
+
+}
+
 /**
  * @author mrdoob / http://mrdoob.com/
  * @author kile / http://kile.stravaganza.org/
@@ -13901,7 +13883,7 @@ BufferGeometry.prototype = {
 
 		if ( Array.isArray( index ) ) {
 
-			this.index = new ( _Math.arrayMax( index ) > 65535 ? Uint32BufferAttribute : Uint16BufferAttribute )( index, 1 );
+			this.index = new ( arrayMax( index ) > 65535 ? Uint32BufferAttribute : Uint16BufferAttribute )( index, 1 );
 
 		} else {
 
@@ -14363,7 +14345,7 @@ BufferGeometry.prototype = {
 
 		if ( geometry.indices.length > 0 ) {
 
-			var TypeArray = _Math.arrayMax( geometry.indices ) > 65535 ? Uint32Array : Uint16Array;
+			var TypeArray = arrayMax( geometry.indices ) > 65535 ? Uint32Array : Uint16Array;
 			var indices = new TypeArray( geometry.indices.length * 3 );
 			this.setIndex( new BufferAttribute( indices, 1 ).copyIndicesArray( geometry.indices ) );
 
@@ -17652,7 +17634,7 @@ function WebGLObjects( gl, properties, info ) {
 
 		// console.timeEnd( 'wireframe' );
 
-		var attribute = new ( _Math.arrayMax( indices ) > 65535 ? Uint32BufferAttribute : Uint16BufferAttribute )( indices, 1 );
+		var attribute = new ( arrayMax( indices ) > 65535 ? Uint32BufferAttribute : Uint16BufferAttribute )( indices, 1 );
 
 		updateAttribute( attribute, gl.ELEMENT_ARRAY_BUFFER );
 

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