Class

VertexElement

VertexElement(usage, stream, type, countnullable, normalizenullable)

Represent one of the element of a vertex. It can be a position, a normal, a color, ….

Constructor

new VertexElement(usage, stream, type, countnullable, normalizenullable)

Constructor
Parameters:
Name Type Attributes Default Description
usage VertexElement.Usage Element usage
stream number Stream index
type VertexElement.Type Type of element
count number <nullable>
0 Value count, ex: A "vec2" will have "2" for this parameter
normalize boolean <nullable>
false True to ask rendering API to normalize values

View Source VertexFormat.js, line 7

Members

number

static StreamType

Type of stream available
Properties:
Name Type Description
Static number
Dynamic number
Stream number

View Source VertexFormat.js, line 80

number

static Type

VertexElement's types
Properties:
Name Type Description
Byte number
Float number
Int number
Short number

View Source VertexFormat.js, line 91

number

static Usage

VertexElement's usage
Properties:
Name Type Description
Position number
Color number
UVS number
Normal number
Tangent number

View Source VertexFormat.js, line 103

number

count

Value count for this element

View Source VertexFormat.js, line 24

boolean

normalize

Indicates if the value need to be normalized by the graphic API

View Source VertexFormat.js, line 32

number

offset

Offset in the vertex data

View Source VertexFormat.js, line 40

number

stream

Stream index

View Source VertexFormat.js, line 48

number

stride

Stream stride.

View Source VertexFormat.js, line 55