This creates a new GLBufferAttribute object.
Must be a WebGLBuffer. See .buffer
One of WebGL Data Types. See .type
How many values make up each item (vertex). See .itemSize
1
, 2
or 4
. The corresponding size (in bytes) for the given type param. See .elementSize
The expected number of vertices in VBO. See .count
The current WebGLBuffer instance.
The expected number of vertices in VBO.
Stores the corresponding size in bytes for the current .type property value.
The corresponding size (in bytes) for the given "type" param.
GLenum
)Readonly
isGLBufferRead-only flag to check if a given object is of type GLBufferAttribute.
How many values make up each item (vertex).
Optional name for this attribute instance.
A WebGL Data Type describing the underlying VBO contents.
GLenum
)Set this property together with .elementSize. The recommended way is using the .setType() method.
A version number, incremented every time the needsUpdate property is set to true.
Setting this to true increments .version.
Sets the .buffer property.
Sets the count property.
Sets the itemSize property.
Sets the both type and elementSize properties.
This buffer attribute class does not construct a VBO. Instead, it uses whatever VBO is passed in constructor and can later be altered via the .buffer property.
Remarks
It is required to pass additional params alongside the VBO Those are: the GL context, the GL data type, the number of components per vertex, the number of bytes per component, and the number of vertices.
See