gpu-curtains
    Preparing search index...

    Interface VertexBufferAttributeParams

    Parameters used to create a VertexBufferAttribute.

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

    Hierarchy (View Summary)

    Index

    Properties

    vertexBuffer?: VertexBuffer

    The VertexBuffer to add this VertexBufferAttribute to.

    name: string

    The name of the VertexBufferAttribute.

    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.

    array?: TypedArray

    VertexBufferAttribute array that will be used by the VertexBuffer.

    verticesStride?: number

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

    normalized?: boolean

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