Rectangle
A rectangle with optional corner rounding.
What it does
Rectangle draws a box from a width and a height, with optional rounded corners. Like Circle it is an analytic shape by default: crisp at any zoom, composited as a flat 2D layer. Corner Radius rounds the corners, clamped to half the shorter side, so a large value on a square gives a capsule.
Turn Analytical off to tessellate the rectangle into a Geometry plane mesh for the 3D scene. On sharp-cornered meshes, Subdivisions lays out a regular grid across the face for cloth simulation or per-vertex displacement.
When to use it
A box, card, panel, or bar: a UI backdrop, a frame, a swatch
A rounded rectangle: raise Corner Radius
A subdividable plane in 3D: turn Analytical off and raise Subdivisions for a grid to displace or simulate
| Parameter | Type | Default | What it does |
|---|---|---|---|
width | Number | 100 | Rectangle width |
height | Number | 100 | Rectangle height |
corner_radius | Number | 0 | Corner radius (0 = sharp corners), clamped to half the shorter side. When non-analytic, a rounded rectangle tessellates as an earcut mesh (the subdivision grid only applies to sharp corners). |
analytical | Boolean | true | Analytic: emit a resolution-independent CRC path (composites as a flat 2D layer). Turn off to tessellate into a Geometry plane mesh you can subdivide and use in the 3D scene. |
subdivisions | Number | 1 | Grid subdivisions along each axis for the non-analytic SHARP-cornered mesh (1 = plain quad). Higher values give a regular grid for cloth simulation / per-vertex displacement. Ignored when analytic, or when corner radius > 0 (rounded meshes are earcut, not gridded). |
fill | Color or Color Field or Color[] or Field or Material or Material[] or Frame Sequence | rgba(1.00, 1.00, 1.00, 1.00) | Fill color, or connect a Fill/Color/Image node |
stroke | Color or Color Field or Color[] or Field or Material or Material[] or Frame Sequence | rgba(0.00, 0.00, 0.00, 1.00) | Stroke color, or connect a Stroke/Color node |
stroke_width | Number | 0 | Stroke width (0 = no stroke) |
position | Vec3 | (0, 0, 0) | Translation (X, Y, Z) |
rotation | Vec3 | (0, 0, 0) | Rotation in degrees (X, Y, Z) |
scale | Vec3 | (1, 1, 1) | Scale (X, Y, Z) |
anchor | Vec3 | (0, 0, 0) | Pivot offset (X, Y, Z) — rotation/scale orbit this point |
opacity | Number | 1 | Layer opacity (0 = transparent, 1 = opaque). Editable, wirable, keyframable. |
Gotchas
Subdivisions apply only to a sharp-cornered, non-analytic mesh. They are ignored while Analytical is on, and ignored when Corner Radius is above 0, since rounded meshes are triangulated by earcut rather than gridded.
Corner Radius is clamped to half the shorter side. Push it to the max on a square for a capsule.
Worked example
Add a Rectangle. Set width and height for the box.
Raise Corner Radius to round the corners.
Wire a Color or Image node into Fill to drive the surface from the graph.
For a 3D panel, turn Analytical off and raise Subdivisions to get a grid you can displace.
See also
Circle · Line · Subdivide · Geometry (meshes)