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
| Field | Script name | Kind | Default | What it does | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Vertices | vertices | list | empty | The points that make up the shape, in local units. | ||||||||||||||||||||
| ||||||||||||||||||||||||
| Indices | indices | list | empty | Which points make each triangle, three at a time, counted from 0 in the order of Vertices. | ||||||||||||||||||||
| Texture | texture | asset | none | The texture this shape is drawn with; empty draws a flat colour. | ||||||||||||||||||||
| Color | color | colour | #000000, 0% opaque | Tint multiplied with each point's own colour. | ||||||||||||||||||||
| Sort Layer | layer | number | 0 | Lower draws first. | ||||||||||||||||||||
| Opaque | opaque | checkbox | off | Draw 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. | ||||||||||||||||||||