• VertexBufferOptions



data?: Float32Array

Optionally pass pre-seeded data, size parameter is ignored

gl: WebGL2RenderingContext

WebGL2RenderingContext this layout will be attached to, these cannot be reused across contexts.

size?: number

Size in number of floats, so [4.2, 4.0, 2.1] is size = 3

Ignored if data is passed directly

type?: "dynamic" | "static"

If the vertices never change switching 'static' can be more efficient on the gpu

Default is 'dynamic'