Constructor
Methods
add(element) → {VertexFormat}
Add an element to the format
Parameters:
Name | Type | Description |
---|---|---|
element |
VertexElement | A VertexElement instance |
A reference to the instance
getElements() → {Array.<VertexElement>}
Get elements
An array of VertexElement
Array.<VertexElement>
getStreamStride(index) → {number}
Get stride of the asked stream
Parameters:
Name | Type | Description |
---|---|---|
index |
number | Stream index |
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 |
A type, default: stream
isIndicesWaitingUpdate() → {boolean}
Check if indices need an update
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 |
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 |
A reference to the instance
setIndicesAsWaitingUpdate(state) → {VertexFormat}
Indicates if the indices need an update
Parameters:
Name | Type | Description |
---|---|---|
state |
boolean | True to ask an update |
A reference to the instance
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 |
A reference to the instance
setStreamType(index, type) → {VertexFormat}
Get stream's type
Parameters:
Name | Type | Description |
---|---|---|
index |
number | Stream index |
type |
VertexElement.StreamType | A type |
A reference to the instance