|
@@ -19,6 +19,7 @@ import {
|
|
|
BufferAttribute
|
|
|
} from './core/BufferAttribute.js';
|
|
|
import { BufferGeometry } from './core/BufferGeometry.js';
|
|
|
+import { InterleavedBuffer } from './core/InterleavedBuffer.js';
|
|
|
import { Face3 } from './core/Face3.js';
|
|
|
import { Geometry } from './core/Geometry.js';
|
|
|
import { Object3D } from './core/Object3D.js';
|
|
@@ -1163,11 +1164,32 @@ 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 ) {
|
|
|
+
|
|
|
+ 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;
|
|
|
+ this.array = array;
|
|
|
+
|
|
|
+ return this;
|
|
|
+
|
|
|
}
|
|
|
|
|
|
} );
|
|
@@ -1231,6 +1253,27 @@ Object.defineProperties( BufferGeometry.prototype, {
|
|
|
|
|
|
} );
|
|
|
|
|
|
+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;
|
|
|
+ this.array = array;
|
|
|
+
|
|
|
+ return this;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+} );
|
|
|
+
|
|
|
//
|
|
|
|
|
|
Object.assign( ExtrudeBufferGeometry.prototype, {
|