Constructs a new ArrayBuffer
Parameters
| Name |
Type |
Attributes |
Default |
Description |
params |
object
|
<optional>
|
{}
|
options
Properties
| Name |
Type |
Attributes |
Default |
Description |
context |
string
|
|
|
context webgl |
data |
object
|
<optional>
|
null
|
data of the buffer |
usage |
number
|
<optional>
|
STATIC_DRAW
|
webgl draw usage |
divisor |
number
|
<optional>
|
null
|
divisor for instancing |
|
Methods
set the attribute pointer
Parameters
| Name |
Type |
Description |
attribute |
object
|
attribute |
set the attribute pointer
Parameters
| Name |
Type |
Description |
attribute |
object
|
attribute |
divisor |
number
|
divisor |
compute the length of the buffer depending of the data type
Parameters
| Name |
Type |
Description |
attribSize |
number
|
attribSize |
add data to the arrayBuffer
Parameters
| Name |
Type |
Description |
data |
Float32Array
|
data |
draw(mode, offsetopt)
draw the arrayBuffer
Parameters
| Name |
Type |
Attributes |
Default |
Description |
mode |
object
|
|
|
webgl mode gl.TRIANGLES... |
offset |
number
|
<optional>
|
0
|
offset for strided data |