Create a new IndexBuffer instance.
The graphics device used to manage this index buffer.
The type of each index to be stored in the index buffer. Can be:
The number of indices to be stored in the index buffer.
Optional
usage: number = BUFFER_STATICThe usage type of the vertex buffer. Can be:
Defaults to BUFFER_STATIC.
Optional
initialData: ArrayBufferInitial data. If left unspecified, the index buffer will be initialized to zeros.
Optional
options: { Object for passing optional arguments.
Defines if the index buffer can be used as a storage buffer by a compute shader. Defaults to false. Only supported on WebGPU.
Gives access to the block of memory that stores the buffer's indices.
A contiguous block of memory where index data can be written to.
An index buffer stores index values into a VertexBuffer. Indexed graphical primitives can normally utilize less memory that unindexed primitives (if vertices are shared).
Typically, index buffers are set on Mesh objects.