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 |
|---|---|---|
width | Number | 100 |
height | Number | 100 |
corner_radius | Number | 0 |
analytical | Boolean | true |
subdivisions | Number | 1 |
fill | OneOf([Color, FieldOf(Color), ColorArray, Field, Material, MaterialArray, RasterArray]) | rgba(1.00, 1.00, 1.00, 1.00) |
stroke | OneOf([Color, FieldOf(Color), ColorArray, Field, Material, MaterialArray, RasterArray]) | rgba(0.00, 0.00, 0.00, 1.00) |
stroke_width | Number | 0 |
position | Vec3 | (0, 0, 0) |
rotation | Vec3 | (0, 0, 0) |
scale | Vec3 | (1, 1, 1) |
anchor | Vec3 | (0, 0, 0) |
opacity | Number | 1 |
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)