gpu-curtains
    Preparing search index...

    Interface VertexBufferAttribute

    A VertexBufferAttribute holds geometry data to be sent to the vertex shader. Most common geometry attributes are 'position' and 'uv'.

    interface VertexBufferAttribute {
        vertexBuffer?: VertexBuffer;
        name: string;
        array?: TypedArray;
        normalized?: boolean;
        type: string;
        bufferFormat: GPUVertexFormat;
        size: number;
        bufferOffset: number;
        verticesStride: number;
    }

    Hierarchy (View Summary)

    Index

    Properties

    vertexBuffer?: VertexBuffer

    The VertexBuffer to add this VertexBufferAttribute to.

    name: string

    The name of the VertexBufferAttribute.

    array?: TypedArray

    VertexBufferAttribute array that will be used by the VertexBuffer.

    normalized?: boolean

    Whether this attribute should be normalized from [0, 255] range to [0, 1] range.

    type: string

    The WGSL type of the VertexBufferAttribute, i.e. "f32", "vec2f", "vec3f", etc.

    bufferFormat: GPUVertexFormat

    The buffer format of the VertexBufferAttribute, i.e. "float32", "float32x2", "float32x3", etc.

    size: number

    The size of the VertexBufferAttribute. A "f32" is of size 1, a "vec2f" of size 2, a "vec3f" of size 3, etc.

    bufferOffset: number

    Bytes offset of the array inside the VertexBuffer array.

    verticesStride: number

    Use this VertexBufferAttribute for every X vertices. Useful for vertex/face color, etc.