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
Optionalnormalized: booleanWhether the data are normalized or not.
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)ReadonlyisRead-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.
Applies to integer data only. Indicates how the underlying data in the buffer maps to
the values in the GLSL code. For instance, if buffer contains data of gl.UNSIGNED_SHORT,
and normalized is true, the values 0 - +65535 in the buffer data will be mapped to
0.0f - +1.0f in the GLSL attribute. If normalized is false, the values will be converted
to floats unmodified, i.e. 65535 becomes 65535.0f.
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.
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