Phaser API Documentation


Member of: Phaser.Geom.Circle

getPoints(quantity, [stepRate], [output])


Returns an array of Point objects containing the coordinates of the points around the circumference of the Circle, based on the given quantity or stepRate values.


name type arguments description
quantity number

The amount of points to return. If a falsey value the quantity will be derived from the stepRate instead.

stepRate number <optional>

Sets the quantity by getting the circumference of the circle and dividing it by the stepRate.

output array | Array.<Phaser.Geom.Point> <optional>

An array to insert the points in to. If not provided a new array will be created.


An array of Point objects pertaining to the points around the circumference of the circle.

Since: 3.0.0