Class used to store data that will be store in GPU memory
the data to use for this buffer
whether the data is updatable
the stride (optional)
whether to postpone creating the internal WebGL buffer (optional)
whether the buffer is instanced (optional)
set to true if the stride in in bytes (optional)
Gets the byte stride.
Create a new VertexBuffer based on the current buffer
defines the vertex buffer kind (position, normal, etc.)
defines offset in the buffer (0 by default)
defines the size in floats of attributes (position is 3 for instance)
defines the stride size in floats in the buffer (the offset to apply to reach next value when data is interleaved)
defines if the vertex buffer contains indexed data
defines if the offset and stride are in bytes
the new vertex buffer
Release all resources
Gets the stride in float32 units (i.e. byte stride / 4). May not be an integer if the byte stride is not divisible by 4. DEPRECATED. Use byteStride instead.
the stride in float32 units
Gets a boolean indicating if the Buffer is updatable?
true if the buffer is updatable
Update current buffer data
defines the data to store
Updates the data directly.
the new data
the new offset
the vertex count (optional)
set to true if the offset is in bytes
Generated using TypeDoc