BufferUtils

BufferUtils

Utility for creating index buffers of appropriate type

Constructor

new BufferUtils()

Methods

(static) cloneTypedArray(source) → {Uint16Array|Uint8Array|Uint32Array}

Returns a clone of the supplied typed array

Parameters:
Name Type Description
source Uint16Array | Uint8Array | Uint32Array

(static) createIndexBuffer(indexCount, vertexCount) → {Uint16Array|Uint8Array|Uint32Array}

Creates an index buffer of a type appropriate to store the supplied number of vertices

Parameters:
Name Type Description
indexCount number

Number of indices

vertexCount number

Number of vertices