Browse Source

Updated builds.

Mr.doob 5 years ago
parent
commit
7b1648436c
3 changed files with 185 additions and 173 deletions
  1. 40 34
      build/three.js
  2. 105 105
      build/three.min.js
  3. 40 34
      build/three.module.js

+ 40 - 34
build/three.js

@@ -8869,21 +8869,6 @@
 
 		onUploadCallback: function () {},
 
-		setArray: function ( array ) {
-
-			if ( Array.isArray( array ) ) {
-
-				throw new TypeError( 'THREE.BufferAttribute: array should be a Typed Array.' );
-
-			}
-
-			this.count = array !== undefined ? array.length / this.itemSize : 0;
-			this.array = array;
-
-			return this;
-
-		},
-
 		setDynamic: function ( value ) {
 
 			this.dynamic = value;
@@ -9635,9 +9620,7 @@
 
 			}
 
-			this.attributes[ name ] = attribute;
-
-			return this;
+			return this.setAttribute( name, attribute );
 
 		},
 
@@ -9647,6 +9630,14 @@
 
 		},
 
+		setAttribute: function ( name, attribute ) {
+
+			this.attributes[ name ] = attribute;
+
+			return this;
+
+		},
+
 		removeAttribute: function ( name ) {
 
 			delete this.attributes[ name ];
@@ -25993,21 +25984,6 @@
 
 		onUploadCallback: function () {},
 
-		setArray: function ( array ) {
-
-			if ( Array.isArray( array ) ) {
-
-				throw new TypeError( 'THREE.BufferAttribute: array should be a Typed Array.' );
-
-			}
-
-			this.count = array !== undefined ? array.length / this.stride : 0;
-			this.array = array;
-
-			return this;
-
-		},
-
 		setDynamic: function ( value ) {
 
 			this.dynamic = value;
@@ -48169,11 +48145,26 @@
 				return this.array.length;
 
 			}
-		},
+		}
+
+	} );
+
+	Object.assign( BufferAttribute.prototype, {
+
 		copyIndicesArray: function ( /* indices */ ) {
 
 			console.error( 'THREE.BufferAttribute: .copyIndicesArray() has been removed.' );
 
+		},
+		setArray: function ( array ) {
+
+			console.warn( 'THREE.BufferAttribute: .setArray has been deprecated. Use BufferGeometry .setAttribute to replace/resize attribute buffers' );
+
+			this.count = array !== undefined ? array.length / this.itemSize : 0;
+			this.array = array;
+
+			return this;
+
 		}
 
 	} );
@@ -48237,6 +48228,21 @@
 
 	} );
 
+	Object.assign( InterleavedBuffer.prototype, {
+
+		setArray: function ( array ) {
+
+			console.warn( 'THREE.InterleavedBuffer: .setArray has been deprecated. Use BufferGeometry .setAttribute to replace/resize attribute buffers' );
+
+			this.count = array !== undefined ? array.length / this.stride : 0;
+			this.array = array;
+
+			return this;
+
+		}
+
+	} );
+
 	//
 
 	Object.assign( ExtrudeBufferGeometry.prototype, {

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


+ 40 - 34
build/three.module.js

@@ -8863,21 +8863,6 @@ Object.assign( BufferAttribute.prototype, {
 
 	onUploadCallback: function () {},
 
-	setArray: function ( array ) {
-
-		if ( Array.isArray( array ) ) {
-
-			throw new TypeError( 'THREE.BufferAttribute: array should be a Typed Array.' );
-
-		}
-
-		this.count = array !== undefined ? array.length / this.itemSize : 0;
-		this.array = array;
-
-		return this;
-
-	},
-
 	setDynamic: function ( value ) {
 
 		this.dynamic = value;
@@ -9629,9 +9614,7 @@ BufferGeometry.prototype = Object.assign( Object.create( EventDispatcher.prototy
 
 		}
 
-		this.attributes[ name ] = attribute;
-
-		return this;
+		return this.setAttribute( name, attribute );
 
 	},
 
@@ -9641,6 +9624,14 @@ BufferGeometry.prototype = Object.assign( Object.create( EventDispatcher.prototy
 
 	},
 
+	setAttribute: function ( name, attribute ) {
+
+		this.attributes[ name ] = attribute;
+
+		return this;
+
+	},
+
 	removeAttribute: function ( name ) {
 
 		delete this.attributes[ name ];
@@ -25982,21 +25973,6 @@ Object.assign( InterleavedBuffer.prototype, {
 
 	onUploadCallback: function () {},
 
-	setArray: function ( array ) {
-
-		if ( Array.isArray( array ) ) {
-
-			throw new TypeError( 'THREE.BufferAttribute: array should be a Typed Array.' );
-
-		}
-
-		this.count = array !== undefined ? array.length / this.stride : 0;
-		this.array = array;
-
-		return this;
-
-	},
-
 	setDynamic: function ( value ) {
 
 		this.dynamic = value;
@@ -48160,11 +48136,26 @@ Object.defineProperties( BufferAttribute.prototype, {
 			return this.array.length;
 
 		}
-	},
+	}
+
+} );
+
+Object.assign( BufferAttribute.prototype, {
+
 	copyIndicesArray: function ( /* indices */ ) {
 
 		console.error( 'THREE.BufferAttribute: .copyIndicesArray() has been removed.' );
 
+	},
+	setArray: function ( array ) {
+
+		console.warn( 'THREE.BufferAttribute: .setArray has been deprecated. Use BufferGeometry .setAttribute to replace/resize attribute buffers' );
+
+		this.count = array !== undefined ? array.length / this.itemSize : 0;
+		this.array = array;
+
+		return this;
+
 	}
 
 } );
@@ -48228,6 +48219,21 @@ Object.defineProperties( BufferGeometry.prototype, {
 
 } );
 
+Object.assign( InterleavedBuffer.prototype, {
+
+	setArray: function ( array ) {
+
+		console.warn( 'THREE.InterleavedBuffer: .setArray has been deprecated. Use BufferGeometry .setAttribute to replace/resize attribute buffers' );
+
+		this.count = array !== undefined ? array.length / this.stride : 0;
+		this.array = array;
+
+		return this;
+
+	}
+
+} );
+
 //
 
 Object.assign( ExtrudeBufferGeometry.prototype, {

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