Accueil / npm / three@0.171.0 / src / renderers / common / StorageBufferAttribute.js

StorageBufferAttribute.js

import { BufferAttribute } from '../../core/BufferAttribute.js';

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;

Exemple