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.
Expects a Integer
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.
This is a constant value
true
How many values make up each item (vertex).
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.
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.
Expects a Integer
Setting this to true increments .version.
set-only property.
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