CLASSES
TagsA - Z

VertexBuffer

Description

class VertexBuffer

Constructor

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

Parameters

Name Type Description
engine any
data number[] or Float32Array or Buffer
kind string
updatable boolean
optional postponeInternalCreation boolean
optional stride number
optional instanced boolean
optional offset number

Members

Float32Array : ()

static PositionKind : string

static NormalKind : string

static TangentKind : string

static UVKind : string

static UV2Kind : string

static UV3Kind : string

static UV4Kind : string

static UV5Kind : string

static UV6Kind : string

static ColorKind : string

static MatricesIndicesKind : string

static MatricesWeightsKind : string

static MatricesIndicesExtraKind : string

static MatricesWeightsExtraKind : string

Methods

getKind() string

Returns the kind of the VertexBuffer (string).

isUpdatable() boolean

Boolean : is the VertexBuffer updatable ?

getData() number[]

Returns an array of numbers or a Float32Array containing the VertexBuffer data.

getBuffer() WebGLBuffer

Returns the WebGLBuffer associated to the VertexBuffer.

getStrideSize() number

Returns the stride of the VertexBuffer (integer).

getOffset() number

Returns the offset (integer).

getSize() number

Returns the VertexBuffer total size (integer).

getIsInstanced() boolean

Boolean : is the WebGLBuffer of the VertexBuffer instanced now ?

getInstanceDivisor() number

Returns the instancing divisor, zero for non-instanced (integer).

create(data, Float32Array) void

Creates the underlying WebGLBuffer from the passed numeric array or Float32Array.

Returns the created WebGLBuffer.

Parameters

Name Type Description
optional data number[] or Float32Array

update(data, Float32Array) void

Updates the underlying WebGLBuffer according to the passed numeric array or Float32Array.

Returns the updated WebGLBuffer.

Parameters

Name Type Description
data number[] or Float32Array

updateDirectly(data, offset) void

Updates directly the underlying WebGLBuffer according to the passed numeric array or Float32Array.

Returns the directly updated WebGLBuffer.

Parameters

Name Type Description
data Float32Array
offset number

dispose() void

Disposes the VertexBuffer and the underlying WebGLBuffer.