Skip to content

drawType in example conflicts with docs and type annotation #190

Open
@bchirlsbiodigital

Description

@bchirlsbiodigital

Refer to the following code from the dynamic buffers example:

    const arrays = {
      spread: { data: spreadArray, numComponents: 1 },
      height: { data: heightArray, numComponents: 1, drawType: gl.DYNAMIC_DRAW },
    };
    const bufferInfo = twgl.createBufferInfoFromArrays(gl, arrays);

If I'm following the documentation correctly, each array passed to createBufferInfoFromArrays should be an ArraySpec, which does not include the drawType property. It looks like the function does actually use the property, so I think it's the docs/types that are incomplete not the example.

Could you please clarify here or update the example, docs or types to reflect the proper way to set drawType on an attribute?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions