Constructor
new Buffer(array, stride)
Parameters:
Name | Type | Description |
---|---|---|
array | TypedArray |
|
stride | number |
|
Members
array :TypedArray
A typed array with a shared buffer. Stores the geometry data.
Type:
- TypedArray
count :number
Gives the total number of elements in the array.
Type:
- number
stride :number
The number of typed-array elements per vertex.
Type:
- number
updateRange :object
Object containing offset and count.
Type:
- object
- Default Value
- { offset: 0, count: - 1 }
usage :BUFFER_USAGE
Defines the intended usage pattern of the data store for optimization purposes. Corresponds to the usage parameter of WebGLRenderingContext.bufferData().
Type:
- Default Value
- BUFFER_USAGE.STATIC_DRAW
version :number
A version number, incremented every time the data is changed.
Type:
- number
- Default Value
- 0
Methods
clone() → {Buffer}
Return a copy of this buffer.
Returns:
- Type:
- Buffer
copy(source) → {Buffer}
Copies another Buffer to this Buffer.
Parameters:
Name | Type | Description |
---|---|---|
source | Buffer | The buffer to be copied. |
Returns:
- Type:
- Buffer
onUploadCallback()
A callback function that is executed after the Renderer has transferred the attribute array data to the GPU.