Constructor
new Buffer(array, stride)
Parameters:
Name | Type | Description |
---|---|---|
array | TypedArray | - A typed array with a shared buffer. Stores the geometry data. |
stride | Number | - The number of typed-array elements per vertex. |
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 :t3d.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
- t3d.BUFFER_USAGE.STATIC_DRAW
version :Number
A version number, incremented every time the data is changed.
Type:
- Number
- Default Value
- 0
Methods
clone() → {t3d.Buffer}
Return a copy of this buffer.
Returns:
- Type:
- t3d.
Buffer
copy(source) → {t3d.Buffer}
Copies another Buffer to this Buffer.
Parameters:
Name | Type | Description |
---|---|---|
source | t3d. | The buffer to be copied. |
Returns:
- Type:
- t3d.
Buffer
onUploadCallback()
A callback function that is executed after the Renderer has transferred the attribute array data to the GPU.