polygon component
A filled, textured 2D polygon from the mesh asset's points and triangles. With skin weights, the rig skeleton names deforms it.
On this page
2d · render · animation · 15 properties · 2D
A filled, textured 2D polygon from the mesh asset's points and triangles. With skin weights, the rig skeleton names deforms it.
In a scene, polygon is the node key that applies it. A script reaches each property below as a field on node.polygon: reading one asks the running component, and assigning one leaves the rest alone. The whole table is node.polygon.get() and node.polygon.set(table).
Properties
| property | type | default | description |
|---|---|---|---|
blend_mode |
enum | auto |
How the surface lands on what is under it: straight alpha, a colour that already carries its alpha, added light, multiplied shade, screen, or opaque. auto is premultiplied for a texture uploaded with premultiply, else alpha One of auto, alpha, premultiplied, add, multiply, screen, opaque. |
color |
color | [1,1,1,1] |
Tint, as channel floats or #rrggbb / #rrggbbaa |
cull_back_faces |
bool | false |
Skip a triangle whose back faces the viewer, as a negative scale turns one |
dot_color |
color | [1,1,1,1] |
The dots' colour. Not drawn on a skinned polygon, which a rig poses in Balaur's own vertex stage |
dot_size |
float | 0 |
Size of a dot drawn on every vertex; zero draws none. Not drawn on a skinned polygon, which a rig poses in Balaur's own vertex stage At least 0. |
dot_sizing |
enum | world |
What dot_size counts: world is world units, which the camera's zoom scales, screen is pixels One of world, screen. |
draw_surface |
bool | true |
Whether the surface draws; off leaves the wireframe and the dots alone |
material |
asset · material |
— | The material this draws with; empty takes an inherited material component, else the built-in one |
mesh |
asset · mesh |
— | Vertices, triangulation, UVs and skin weights; positions are [x, y] in the node's space |
pixels_per_unit |
float | 100 |
Texture pixels per world unit, for the default UV mapping At least 0.01. |
skeleton |
node | — | The rig root; empty means this node |
texture |
asset · texture |
— | Image file, project-relative, or a texture asset; empty draws the tint alone |
wireframe_color |
color | [1,1,1,1] |
The wireframe's colour. Not drawn on a skinned polygon, which a rig poses in Balaur's own vertex stage |
wireframe_sizing |
enum | world |
What wireframe_width counts: world is world units, which the camera's zoom scales, screen is pixels One of world, screen. |
wireframe_width |
float | 0 |
Width of a line drawn along every triangle edge, not the outline; zero draws none. Not drawn on a skinned polygon, which a rig poses in Balaur's own vertex stage At least 0. |
Asset types this component references: material, mesh, texture.