TagsA - Z



class VertexBuffer

Creates a new VertexBuffer. Methods of VertexBuffer interface are used to manipulate vertex buffer resources


new VertexBuffer(engine, data, Buffer, kind, updatable, postponeInternalCreation, stride, instanced, offset, size)


Name Type Description
engine any @param engine
data number[] or Buffer VertexData into buffer
kind string The kind of vertex buffer (defined as static variables in VertexBuffer class)
updatable boolean True if the vertex buffer should be dynamic, false otherwise.
optional postponeInternalCreation boolean @param postponeInternalCreation
optional stride number
optional instanced boolean
optional offset number


static PositionKind : string

The position kind

static NormalKind : string

The normal kind

static UVKind : string

The UV kind

static UV2Kind : string

The UV2 kind

static UV3Kind : string

static UV4Kind : string

static UV5Kind : string

static UV6Kind : string

static ColorKind : string

The color kind

static MatricesIndicesKind : string

The matrice indice kind

static MatricesWeightsKind : string

The matrice weight kind

static MatricesIndicesExtraKind : string

static MatricesWeightsExtraKind : string


getKind() → string

isUpdatable() → boolean

Return true if it's updatable

getData() → number[]

Get the data

getBuffer() → WebGLBuffer

Get the buffer

getStrideSize() → number

Get stride size

getOffset() → number

getSize() → number

getIsInstanced() → boolean

create(data) → void

Create a vertex buffer


Name Type Description
optional data number[] VertexData into buffer

update(data) → void

Update vertex buffer


Name Type Description
data number[] VertexData into buffer

updateDirectly(data, offset) → void

Update vertex buffer directly


Name Type Description
data Float32Array VertexData into buffer
offset number

dispose() → void