Mesh
Mesh
Wrapper around a native mesh data
Kind: global class
new Mesh (params)
Constructor
Param | Type | Description |
---|---|---|
params | Either index to wrap or set of parameters to create a new mesh | |
params.indexData | Array.<number> | Index data values |
params.indexType | MeshIndexType | Index type |
params.vertexData | Array.<number> | Interleaved vertex data values. A vertex is a set of 8 float values: - 0-3 Position - 4-7 Normal - 7-8 Texture Coordinate |
.vertexData ⇒ Float32Array
Kind: instance property of Mesh
Returns: Float32Array - Vertex data (read-only)
.indexData ⇒ Uint8Array | Uint16Array | Uint32Array
Kind: instance property of Mesh
Returns: Uint8Array | Uint16Array | Uint32Array - Index data (read-only) or
null if the mesh is not indexed
.VERTEX_FLOAT_SIZE
Size of a vertex in float elements
Kind: static property of Mesh
.VERTEX_SIZE
Size of a vertex in bytes
Kind: static property of Mesh
.POS
Position attribute offsets in float elements
Kind: static property of Mesh
.TEXCOORD
Texture coordinate attribute offsets in float elements
Kind: static property of Mesh
.NORMAL
Normal attribute offsets in float elements
Kind: static property of Mesh