Rectangle

You can create a Rectangle by dropping the Rectangle block, from the Blocks view, on the scene.

Create a rectangle.

You can change the size of the Rectangle in the Size section or you can use the Size tool.

Change the rectangle size.

The Rectangle code is generated by the scene compiler using the rectangle object factory:

const rectangle = this.add.rectangle(10, 10, 100, 100);