// create a rectangle with screen size
let rectangle = add([
rect(width(), height()),
color(GREEN),
]);
// resize the rectangle to screen size
onResize(() => {
debug.log(`Old Size: ${rectangle.width}x${rectangle.height}`);
rectangle.width = width();
rectangle.height = height();
debug.log(`New Size: ${rectangle.width}x${rectangle.height}`);
});