Optional
vertexThe VertexBuffer to add this VertexBufferAttribute to.
The name of the VertexBufferAttribute.
Optional
arrayVertexBufferAttribute array that will be used by the VertexBuffer.
The WGSL type of the VertexBufferAttribute, i.e. "f32"
, "vec2f"
, "vec3f"
, etc.
The buffer format of the VertexBufferAttribute, i.e. "float32"
, "float32x2"
, "float32x3"
, etc.
The length of the array.
The size of the VertexBufferAttribute. A "f32"
is of size 1
, a "vec2f"
of size 2
, a "vec3f"
of size 3
, etc.
Offset of the array inside the VertexBuffer array.
Bytes offset of the array inside the VertexBuffer array.
Use this VertexBufferAttribute for every X vertices. Useful for vertex/face color, etc.
A VertexBufferAttribute holds geometry data to be sent to the vertex shader. Most common geometry attributes are 'position' and 'uv'.