Skip to content

Search

Documentation

polygon

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 · 6 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
color color [1,1,1,1] Tint, as channel floats or #rrggbb / #rrggbbaa
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

Asset types this component references: material, mesh, texture.

Are you sure?