TriangleMesh

constructor(positions: Array<Position>, indices: IntArray, attributes: ShapeAttributes = ShapeAttributes())

Parameters

positions

An array containing the mesh vertices. There must be no more than 65536 positions. Use split to subdivide large meshes into smaller ones that fit this limit.

indices

An array of integers identifying the positions of each mesh triangle. Each sequence of three indices defines one triangle in the mesh. The indices identify the index of the position in the associated positions array. The indices for each triangle should be in counter-clockwise order to identify the triangles as front-facing.

attributes

The attributes to associate with this mesh. May be null, in which case default attributes are associated.