Documentation
    Preparing search index...

    Interface WgpuGeometryRecord

    Everything one cached geometry needs at draw time.

    interface WgpuGeometryRecord {
        colorBuffer: GpuBuffer | null;
        count: number;
        indexBuffer: GpuBuffer | null;
        indexFormat: "uint16" | "uint32" | null;
        jointBuffer: GpuBuffer | null;
        normalBuffer: GpuBuffer | null;
        positionBuffer: GpuBuffer;
        topology: "triangle-list" | "line-list";
        uvBuffer: GpuBuffer | null;
        version: number;
        weightBuffer: GpuBuffer | null;
    }
    Index
    colorBuffer: GpuBuffer | null

    Buffer backing the optional per-vertex colour attribute, or null.

    count: number

    Vertices or indices to draw (§53's drawCount).

    indexBuffer: GpuBuffer | null

    Index buffer, or null for a non-indexed geometry.

    indexFormat: "uint16" | "uint32" | null

    "uint16" or "uint32", or null when there are no indices.

    jointBuffer: GpuBuffer | null

    Buffer backing the optional per-vertex joint-index attribute (§54, RFC 0003: four uint16 influences, shader location 4), or null — for a geometry that carries none, and for one whose joints have not been asked for yet (acquire's skinning parameter). Mutable for the same upgrade normalBuffer uses: a record first acquired unskinned meets its first skinned draw and uploads one stream.

    normalBuffer: GpuBuffer | null

    Buffer backing the optional per-vertex normal attribute (§53, §68), or null — for a geometry that carries none, and for one whose normals have not been asked for yet (see acquire's normals parameter): the shaded draw paths read this member to pick the variant, so null means "shade without normals" in both cases, which is exactly GL's default- attribute behaviour for the first and the pre-upload state for the second.

    The one mutable member: an upgrade writes the buffer into the live record rather than re-uploading four streams that have not changed.

    positionBuffer: GpuBuffer

    Buffer backing the position attribute (slot 0).

    topology: "triangle-list" | "line-list"

    WebGPU topology for §53's draw mode.

    uvBuffer: GpuBuffer | null

    Buffer backing the optional per-vertex uv attribute (§53, §77), or null.

    No slot number here, and none on colorBuffer any more: a slot index is positional in the variant's vertex layout (wgpu-unlit.ts), so a record cannot name one — a coloured, textured draw binds uvs to slot 2 and an uncoloured, textured one binds them to slot 1.

    version: number

    BufferGeometry.version this record was uploaded from.

    weightBuffer: GpuBuffer | null

    Buffer backing the optional per-vertex influence-weight attribute (§54: four f32 weights, shader location 5), or null. Paired with WgpuGeometryRecord.jointBuffer; the two upgrade together.