three
Version:
JavaScript 3D library
18 lines (9 loc) • 384 B
JavaScript
import { InstancedBufferAttribute } from 'three';
class StorageBufferAttribute extends InstancedBufferAttribute {
constructor( array, itemSize, typeClass = Float32Array ) {
if ( ArrayBuffer.isView( array ) === false ) array = new typeClass( array * itemSize );
super( array, itemSize );
this.isStorageBufferAttribute = true;
}
}
export default StorageBufferAttribute;