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

ParameterTypeDefault
widthNumber100
heightNumber100
corner_radiusNumber0
analyticalBooleantrue
subdivisionsNumber1
fillOneOf([Color, FieldOf(Color), ColorArray, Field, Material, MaterialArray, RasterArray])rgba(1.00, 1.00, 1.00, 1.00)
strokeOneOf([Color, FieldOf(Color), ColorArray, Field, Material, MaterialArray, RasterArray])rgba(0.00, 0.00, 0.00, 1.00)
stroke_widthNumber0
positionVec3(0, 0, 0)
rotationVec3(0, 0, 0)
scaleVec3(1, 1, 1)
anchorVec3(0, 0, 0)
opacityNumber1

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

  1. Add a Rectangle. Set width and height for the box.

  2. Raise Corner Radius to round the corners.

  3. Wire a Color or Image node into Fill to drive the surface from the graph.

  4. For a 3D panel, turn Analytical off and raise Subdivisions to get a grid you can displace.

See also

Circle · Line · Subdivide · Geometry (meshes)