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.
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
and the number of vertices.
The most common use case for this class is when some kind of GPGPU
calculation interferes or even produces the VBOs in question.
gl — Must be a [link:https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext].
buffer — Must be a [link:https://developer.mozilla.org/en-US/docs/Web/API/WebGLBuffer].
type — One of [link:https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants#Data_types].
itemSize — The number of values of the array that should be associated with
a particular vertex. For instance, if this
attribute is storing a 3-component vector (such as a position, normal, or color), then itemSize should be 3.
count — The expected number of vertices in VBO.
normalized — (optional) Applies to integer data only. Indicates how the underlying data
in the buffer maps to the values in the GLSL code. For instance, if [page:TypedArray array] is an instance
of UInt16Array, and [page:Boolean normalized] is true, the values 0 - +65535 in the array
data will be mapped to 0.0f - +1.0f in the GLSL attribute. An Int16Array (signed) would map
from -32767 - +32767 to -1.0f - +1.0f. If [page:Boolean normalized] is false, the values
will be converted to floats unmodified, i.e. 32767 becomes 32767.0f.
The current WebGLBuffer instance.
The expected number of vertices in VBO.
Indicates how the underlying data in the buffer maps to the values in the GLSL shader code. See the constructor above for details.
How many values make up each item (vertex).
Stores the corresponding size in bytes for the current *type* property value.
Don't touch.
A WebGL Data Type describing the underlying VBO contents.
Setting this is only allowed with *setType*.
Should be *true*.
Sets the *buffer* property.
Sets the *type* property.
Sets the *itemSize* property.
Sets the *count* property.