Skip to main content

VertexBufferOptions

Index

Properties

Properties

optionaldata

data?: Float32Array

Optionally pass pre-seeded data, size parameter is ignored

gl

gl: WebGL2RenderingContext

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

optionalsize

size?: number

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

Ignored if data is passed directly

optionaltype

type?: static | dynamic

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

Default is 'dynamic'