Skip to content

Components

Mesh

Draws a shape from points and triangles supplied directly, for geometry a generator or an importer produced: a terrain chunk, a deformed surface. For dragging points by hand, use a Polygon instead.

On this page

Add it

+ Add node → Mesh creates a node with it already on. Already have a node for it? Add component → MeshComponent.

From a script

A script on the same node writes these fields by name. MeshComponent is the name to pass.

rgs
set_colour("MeshComponent", "color", vec4(0.0, 0.0, 0.0, 0.0));
set_flag("MeshComponent", "opaque", false);

Fields

FieldScript nameKindDefaultWhat it does
VerticesverticeslistemptyThe points that make up the shape, in local units.
FieldScript nameKindDefaultWhat it does
Positionpositiontwo numbers (x, y)nonePosition in local units.
Uvuvtwo numbers (x, y)noneWhich part of the picture is drawn at this point.
ColorcolorcolournoneThis point's own colour.
IndicesindiceslistemptyWhich points make each triangle, three at a time, counted from 0 in the order of Vertices.
TexturetextureassetnoneThe texture this shape is drawn with; empty draws a flat colour.
Colorcolorcolour#000000, 0% opaqueTint multiplied with each point's own colour.
Sort Layerlayernumber0Lower draws first.
OpaqueopaquecheckboxoffDraw without blending, for a backmost shape nothing shows through: its see-through parts, and a see-through Color, come out dark instead of showing what is behind.