Lens Scripting API

    Enumeration MeshTopology

    Mesh topology types used by MeshBuilder.

    // 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;
    Index

    Enumeration Members

    Lines: number

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

    LineStrip: number

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

    Points: number

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

    TriangleFan: number

    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.

    Triangles: number

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

    TriangleStrip: number

    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.

    MMNEPVFCICPMFPCPTTAAATR