StorageBufferAttribute.js 366 B

1234567891011121314151617
  1. import { BufferAttribute } from 'three';
  2. class StorageBufferAttribute extends BufferAttribute {
  3. constructor( array, itemSize, typeClass = Float32Array ) {
  4. if ( ArrayBuffer.isView( array ) === false ) array = new typeClass( array * itemSize );
  5. super( array, itemSize );
  6. this.isStorageBufferAttribute = true;
  7. }
  8. }
  9. export default StorageBufferAttribute;