Class

VertexFormat

VertexFormat()

Indicates the format of a vertex

Constructor

new VertexFormat()

Constructor

View Source VertexFormat.js, line 116

Methods

add(element) → {VertexFormat}

Add an element to the format
Parameters:
Name Type Description
element VertexElement A VertexElement instance

View Source VertexFormat.js, line 168

A reference to the instance
VertexFormat

getElements() → {Array.<VertexElement>}

Get elements

View Source VertexFormat.js, line 284

An array of VertexElement
Array.<VertexElement>

getStreamStride(index) → {number}

Get stride of the asked stream
Parameters:
Name Type Description
index number Stream index

View Source VertexFormat.js, line 294

A stride value, 0 if the stream don't exist
number

getStreamType(index) → {VertexElement.StreamType}

Get stream's type
Parameters:
Name Type Description
index number Stream index

View Source VertexFormat.js, line 304

A type, default: stream

isIndicesWaitingUpdate() → {boolean}

Check if indices need an update

View Source VertexFormat.js, line 313

True if the indices need an update, otherwise false
boolean

isStreamWaitingUpdate(index) → {boolean}

Check if the asked stream need an update
Parameters:
Name Type Description
index number Stream index

View Source VertexFormat.js, line 323

True if the stream need an update, otherwise false
boolean

set(elements) → {VertexFormat}

Set elements
Parameters:
Name Type Description
elements Array.<VertexElement> An array of VertexElement instance

View Source VertexFormat.js, line 181

A reference to the instance
VertexFormat

setIndicesAsWaitingUpdate(state) → {VertexFormat}

Indicates if the indices need an update
Parameters:
Name Type Description
state boolean True to ask an update

View Source VertexFormat.js, line 256

A reference to the instance
VertexFormat

setStreamAsWaitingUpdate(usage, state) → {VertexFormat}

Indicates if the stream need an update
Parameters:
Name Type Description
usage VertexElement.Usage Stream usage
state boolean True to ask an update

View Source VertexFormat.js, line 269

A reference to the instance
VertexFormat

setStreamType(index, type) → {VertexFormat}

Get stream's type
Parameters:
Name Type Description
index number Stream index
type VertexElement.StreamType A type

View Source VertexFormat.js, line 195

A reference to the instance
VertexFormat