Răsfoiți Sursa

Three.Legacy: Removed array checks in setArray() functions.

Mr.doob 5 ani în urmă
părinte
comite
bc6d76bcc8
1 a modificat fișierele cu 0 adăugiri și 12 ștergeri
  1. 0 12
      src/Three.Legacy.js

+ 0 - 12
src/Three.Legacy.js

@@ -1177,12 +1177,6 @@ Object.assign( BufferAttribute.prototype, {
 	},
 	setArray: function ( array ) {
 
-		if ( Array.isArray( array ) ) {
-
-			throw new TypeError( 'THREE.BufferAttribute: array should be a Typed 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;
@@ -1257,12 +1251,6 @@ Object.assign( InterleavedBuffer.prototype, {
 
 	setArray: function ( array ) {
 
-		if ( Array.isArray( array ) ) {
-
-			throw new TypeError( 'THREE.BufferAttribute: array should be a Typed 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;