node-ejs-renderer/node_modules/three/examples/jsm/renderers/common/StorageBufferAttribute.js

18 lines
366 B
JavaScript
Raw Normal View History

2024-06-09 13:55:01 -04:00
import { BufferAttribute } from 'three';
class StorageBufferAttribute extends BufferAttribute {
constructor( array, itemSize, typeClass = Float32Array ) {
if ( ArrayBuffer.isView( array ) === false ) array = new typeClass( array * itemSize );
super( array, itemSize );
this.isStorageBufferAttribute = true;
}
}
export default StorageBufferAttribute;