Create a new VertexBuffer instance.
The graphics device used to manage this vertex buffer.
The vertex format of this vertex buffer.
The number of vertices that this vertex buffer will hold.
Optionaloptions: { data?: ArrayBuffer; storage?: boolean; usage?: number }Object for passing optional arguments.
Optionaldata?: ArrayBufferInitial data.
Optionalstorage?: booleanDefines if the vertex buffer can be used as a storage buffer by a compute shader. Defaults to false. Only supported on WebGPU.
Optionalusage?: numberThe usage type of the vertex buffer (see BUFFER_*). Defaults to BUFFER_STATIC.
Frees resources associated with this vertex buffer.
Returns the data format of the specified vertex buffer.
The data format of the specified vertex buffer.
Returns the number of vertices stored in the specified vertex buffer.
The number of vertices stored in the vertex buffer.
Returns the usage type of the specified vertex buffer. This indicates whether the buffer can be modified once and used many times BUFFER_STATIC, modified repeatedly and used many times BUFFER_DYNAMIC or modified once and used at most a few times BUFFER_STREAM.
The usage type of the vertex buffer (see BUFFER_*).
Returns a mapped memory block representing the content of the vertex buffer.
An array containing the byte data stored in the vertex buffer.
Copies data into vertex buffer's memory.
Optionaldata: ArrayBufferSource data to copy.
True if function finished successfully, false otherwise.
Notifies the graphics engine that the client side copy of the vertex buffer's memory can be returned to the control of the graphics driver.
A vertex buffer is the mechanism via which the application specifies vertex data to the graphics hardware.