param w
- The width of the rectangle.
param h
- The height of the rectangle.
param opt
- Options for the rectangle component. See RectCompOpt.
const obstacle = add([
pos(80, 120),
rect(20, 40),
outline(4),
area(),
])
returns The rectangle component.
group Components