Phaser API Documentation

  Version: 
circle([x], [y], [radius], [fillColor], [fillAlpha])

Description:

Creates a new Circle Shape Game Object and adds it to the Scene.

A Circle is an Arc with no defined start and end angle, making it render as a complete circle.

Note: This method will only be available if the Arc Game Object has been built into Phaser.

Parameters:

name type arguments Default description
x number <optional> 0

The horizontal position of this Game Object in the world.

y number <optional> 0

The vertical position of this Game Object in the world.

radius number <optional> 128

The radius of the circle.

fillColor number <optional>

The color the circle will be filled with, i.e. 0xff0000 for red.

fillAlpha number <optional>

The alpha the circle will be filled with. You can also set the alpha of the overall Shape using its alpha property.

Returns:
Description:

The Game Object that was created.

Since: 3.13.0