|
@@ -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, {
|