Draw a filled rectangle.
X position of the top-left corner
Y position of the top-left corner
Width in pixels
Height in pixels
Color and alpha options (r, g, b, a each 0-1)
sg.drawRect(10, 10, 100, 50, { r: 1, g: 0, b: 0 }); // red rectangle Copy
sg.drawRect(10, 10, 100, 50, { r: 1, g: 0, b: 0 }); // red rectangle
Draw a filled rectangle.