A VertexBuffer is an object regrouping one or multiple VertexBufferAttribute into a single array and its associated GPUBuffer

interface VertexBuffer {
    buffer: Buffer;
    bufferOffset: number;
    bufferSize: number;
    name: string;
    stepMode: GPUVertexStepMode;
    arrayStride: number;
    bufferLength: number;
    attributes: VertexBufferAttribute[];
    array: TypedArray;
}

Hierarchy (view full)

Properties

buffer: Buffer

GPUBuffer sent to the render pipeline

bufferOffset: number

Number representing the offset at which the data begins in the GPUBuffer.

bufferSize: number

Size in bytes of the data contained in the GPUBuffer.

name: string

The name of the VertexBuffer

stepMode: GPUVertexStepMode

Whether this VertexBuffer holds data relative to vertices or instances

arrayStride: number
bufferLength: number
attributes: VertexBufferAttribute[]

Array of VertexBufferAttribute used by this VertexBuffer

array: TypedArray

VertexBuffer data array to be used by the GPUBuffer