Skip to content

five-on-it / packages/world/src/level / MeshDef

Interface: MeshDef ​

Defined in: packages/world/src/level.ts:54

A mesh: vertices as a flat list (x, y, z, x, y, z, …), triangles as indices into them, and the groups it is drawn as. A mesh with no group is a collider nobody sees (the slope under a flight of stairs); indices outside every group are collided with, not drawn.

Properties ​

groups ​

groups: MeshGroup[]

Defined in: packages/world/src/level.ts:60

The runs of triangles drawn, with their colours.


indices ​

indices: number[]

Defined in: packages/world/src/level.ts:58

Triangle vertex indices, three per triangle, counter-clockwise seen from outside.


vertices ​

vertices: number[]

Defined in: packages/world/src/level.ts:56

Vertex positions, three numbers each, in the mesh's own frame (m).