Class: MeshManager
Defined in: render/mesh.ts:11
Constructors
Constructor
new MeshManager(): MeshManager;
Returns
MeshManager
Methods
Create()
Call Signature
static Create(): number;
Defined in: render/mesh.ts:16
Create a new mesh
Returns
number
The mesh handle
Call Signature
static Create(entity): number;
Defined in: render/mesh.ts:22
Create a new mesh and attach it to a renderable component
Parameters
| Parameter | Type | Description |
|---|---|---|
entity | number | The entity with the renderable component |
Returns
number
The mesh handle
Destroy()
static Destroy(handle): boolean;
Defined in: render/mesh.ts:45
Destroy a mesh
Parameters
| Parameter | Type | Description |
|---|---|---|
handle | number | The mesh handle to destroy |
Returns
boolean
boolean indicating success
RecalcBounds()
static RecalcBounds(handle): boolean;
Defined in: render/mesh.ts:129
Recalculate bounds for the mesh
Parameters
| Parameter | Type | Description |
|---|---|---|
handle | number | The mesh handle |
Returns
boolean
boolean indicating success
RecalcNormals()
static RecalcNormals(handle): boolean;
Defined in: render/mesh.ts:118
Recalculate normals for the mesh
Parameters
| Parameter | Type | Description |
|---|---|---|
handle | number | The mesh handle |
Returns
boolean
boolean indicating success
SetNormals()
static SetNormals(handle, normals): boolean;
Defined in: render/mesh.ts:103
Set the normals for the mesh
Parameters
| Parameter | Type | Description |
|---|---|---|
handle | number | The mesh handle |
normals | number[] | Array of normal vectors |
Returns
boolean
boolean indicating success
SetTriangles()
static SetTriangles(handle, indices): boolean;
Defined in: render/mesh.ts:71
Set the triangles (indices) for the mesh
Parameters
| Parameter | Type | Description |
|---|---|---|
handle | number | The mesh handle |
indices | number[] | Array of triangle indices |
Returns
boolean
boolean indicating success
SetUVs()
static SetUVs(handle, uvs): boolean;
Defined in: render/mesh.ts:87
Set the UV coordinates for the mesh
Parameters
| Parameter | Type | Description |
|---|---|---|
handle | number | The mesh handle |
uvs | number[] | Array of UV coordinates |
Returns
boolean
boolean indicating success
SetVertices()
static SetVertices(handle, vertices): boolean;
Defined in: render/mesh.ts:55
Set the vertices for the mesh
Parameters
| Parameter | Type | Description |
|---|---|---|
handle | number | The mesh handle |
vertices | number[] | Array of vertex positions |
Returns
boolean
boolean indicating success