Buckets:

imerfanrajabee's picture
download
raw
1.15 kB
import StorageBuffer from '../StorageBuffer.js';
import { NodeAccess } from '../../../nodes/core/constants.js';
let _id = 0;
/**
* A special form of storage buffer binding type.
* It's buffer value is managed by a node object.
*
* @private
* @augments StorageBuffer
*/
class NodeStorageBuffer extends StorageBuffer {
/**
* Constructs a new node-based storage buffer.
*
* @param {StorageBufferNode} nodeUniform - The storage buffer node.
* @param {UniformGroupNode} groupNode - The uniform group node.
*/
constructor( nodeUniform, groupNode ) {
super( 'StorageBuffer_' + _id ++, nodeUniform ? nodeUniform.value : null );
/**
* The node uniform.
*
* @type {StorageBufferNode}
*/
this.nodeUniform = nodeUniform;
/**
* The access type.
*
* @type {string}
*/
this.access = nodeUniform ? nodeUniform.access : NodeAccess.READ_WRITE;
/**
* The uniform group node.
*
* @type {UniformGroupNode}
*/
this.groupNode = groupNode;
}
/**
* The storage buffer.
*
* @type {BufferAttribute}
*/
get buffer() {
return this.nodeUniform.value;
}
}
export default NodeStorageBuffer;

Xet Storage Details

Size:
1.15 kB
·
Xet hash:
bfacb461769d50ca218805fa28bdaaeeaacdc9833c600f2a8d29d91c2323eb41

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.