Skip to main content

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
ParameterTypeDescription
entitynumberThe 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

ParameterTypeDescription
handlenumberThe 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

ParameterTypeDescription
handlenumberThe mesh handle

Returns

boolean

boolean indicating success


RecalcNormals()

static RecalcNormals(handle): boolean;

Defined in: render/mesh.ts:118

Recalculate normals for the mesh

Parameters

ParameterTypeDescription
handlenumberThe 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

ParameterTypeDescription
handlenumberThe mesh handle
normalsnumber[]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

ParameterTypeDescription
handlenumberThe mesh handle
indicesnumber[]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

ParameterTypeDescription
handlenumberThe mesh handle
uvsnumber[]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

ParameterTypeDescription
handlenumberThe mesh handle
verticesnumber[]Array of vertex positions

Returns

boolean

boolean indicating success