Helper around vertex buffer to simplify creating and uploading geometry

Under the hood uses Float32Array

Hierarchy

  • VertexBuffer

Constructors

Properties

Methods

Constructors

Properties

buffer: WebGLBuffer

Access to the webgl buffer handle

bufferData: Float32Array

Access to the raw data of the vertex buffer

type: "static" | "dynamic" = 'dynamic'

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

Default is 'dynamic'

Methods