Class: Circle

PIXI. Circle

new Circle(x, y, radius)

The Circle object can be used to specify a hit area for displayObjects

Parameters:
Name Type Description
x Number

The X coordinate of the center of this circle

y Number

The Y coordinate of the center of this circle

radius Number

The radius of the circle

Source - pixi/geom/Circle.js, line 5

Members

radius :Number

Default Value:
  • 0
Source - pixi/geom/Circle.js, line 30

x :Number

Default Value:
  • 0
Source - pixi/geom/Circle.js, line 16

y :Number

Default Value:
  • 0
Source - pixi/geom/Circle.js, line 23

Methods

clone() → {PIXI.Circle}

Creates a clone of this Circle instance

Returns:

a copy of the Circle

Source - pixi/geom/Circle.js, line 38

contains(x, y) → {Boolean}

Checks whether the x and y coordinates given are contained within this circle

Parameters:
Name Type Description
x Number

The X coordinate of the point to test

y Number

The Y coordinate of the point to test

Returns:
Boolean -

Whether the x/y coordinates are within this Circle

Source - pixi/geom/Circle.js, line 49

getBounds() → {PIXI.Rectangle}

Returns the framing rectangle of the circle as a PIXI.Rectangle object

Returns:

the framing rectangle

Source - pixi/geom/Circle.js, line 72
Phaser Copyright © 2012-2014 Photon Storm Ltd.
Documentation generated by JSDoc 3.3.0-dev on Sat Nov 15 2014 19:55:11 GMT-0000 (GMT) using the DocStrap template.