Appearance
Sketch Examples
The sketch examples below are rendered via npm run docs:examples and use transparent backgrounds with light strokes for dark docs themes.
Line
ts
sketchLine("line-1", [-40, -20], [40, 20]);Arc
ts
sketchArc("arc-1", [30, 0], [0, 30], [0, 0], "ccw");Circle
ts
sketchCircle("circle-1", [0, 0], 22);Ellipse
ts
sketchEllipse("ellipse-1", [0, 0], 26, 12, { rotation: exprLiteral(20, "deg") });Rectangle (Center)
ts
sketchRectCenter("rect-center", [0, 0], 60, 32, { rotation: exprLiteral(10, "deg") });Rectangle (Corner)
ts
sketchRectCorner("rect-corner", [-25, -12], 60, 30, { rotation: exprLiteral(-8, "deg") });Slot
ts
sketchSlot("slot-1", [0, 0], 70, 16, { rotation: exprLiteral(12, "deg") });Polygon
ts
sketchPolygon("poly-1", [0, 0], 24, 6);Spline
ts
sketchSpline("spline-1", [
[-30, -10],
[-10, 20],
[10, 10],
[30, -15],
]);Point
ts
sketchPoint("point-1", [0, 0]);Rectangle Array
ts
sketchArray(
{ count: [3, 2], spacing: [28, 18], origin: [-28, -9] },
({ index, offset }) => sketchRectCenter(`rect-${index}`, offset, 18, 10)
);