API

Interface IVertexBufferOptions

Options to be used when creating a vertex buffer

interface IVertexBufferOptions {
    divisor?: number;
    instanced?: boolean;
    label?: string;
    normalized?: boolean;
    offset?: number;
    postponeInternalCreation?: boolean;
    size?: number;
    stride?: number;
    takeBufferOwnership?: boolean;
    type?: number;
    updatable?: boolean;
    useBytes?: boolean;
}
Index
divisor?: number

defines the instance divisor to use (default: 1, only used if instanced is true)

instanced?: boolean

whether the buffer is instanced (default: false)

label?: string

label to use for this vertex buffer (debugging purpose)

normalized?: boolean

whether the data contains normalized data (default: false)

offset?: number

the offset of the data (default: 0)

postponeInternalCreation?: boolean

whether to postpone creating the internal WebGL buffer (default: false)

size?: number

the number of components (will be automatically computed from the kind parameter if not specified)

stride?: number

the stride (will be automatically computed from the kind parameter if not specified)

takeBufferOwnership?: boolean

defines if the buffer should be released when the vertex buffer is disposed (default: false)

type?: number

the type of the component (will be deduce from the data parameter if not specified)

updatable?: boolean

whether the data is updatable (default: false)

useBytes?: boolean

set to true if stride and offset are in bytes (default: false)