Description

Mesh topology types used by MeshBuilder.

Example

// Constructs a new mesh builder
var builder = new MeshBuilder([
{ name: "position", components: 3 },
{ name: "normal", components: 3, normalized: true },
{ name: "texture0", components: 2 },
{ name: "color", components: 4 },
]);

builder.topology = MeshTopology.Triangles;
builder.indexType = MeshIndexType.UInt16;

Enumeration Members

LineStrip: number

Description

Draws connected line segments. Starting with the second vertex, a line is drawn between each vertex and the preceding one.

Lines: number

Description

Draws unconnected line segments. Each group of two vertices specifies a new line segment.

Points: number

Description

Draws individual points. Each vertex specifies a new point to draw.

TriangleFan: number

Description

Draws connected triangles sharing one central vertex. The first vertex is the shared one, or "hub" vertex. Starting with the third vertex, each vertex forms a triangle connecting with the previous vertex and hub vertex.

TriangleStrip: number

Description

Draws connected triangles in a strip. After the first two vertices, each vertex defines the third point on a new triangle extending from the previous one.

Triangles: number

Description

Draws unconnected triangles. Each group of three vertices specifies a new triangle.

Generated using TypeDoc