Class: Circle

Circle


new Circle( [radius])

Parameters:
Name Type Argument Default Description
radius number <optional>
4

Radius of this circle

Source:

Members


radius :number

Type:
  • number
Default Value:
  • 0
Source:

radius

Radius of circle.

Properties:
Name Type Description
radius number
Default Value:
  • 4
Source:

type :number

The type of the object, mainly used to avoid instanceof checks

Type:
  • number
Source:

<constant> type :number

Type of this shape, should always be CIRC.

Type:
  • number
Source:

x :number

Type:
  • number
Default Value:
  • 0
Source:

y :number

Type:
  • number
Default Value:
  • 0
Source:

Methods


clone()

Creates a clone of this Circle instance

Source:
Returns:

a copy of the Circle

Type
Circle

contains(x, y)

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

Source:
Returns:

Whether the x/y coordinates are within this Circle

Type
boolean

getBounds()

Returns the framing rectangle of the circle as a Rectangle object

Source:
Returns:

the framing rectangle

Type
Rectangle

Class: Circle

Circle

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


new Circle(x, y, radius)

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:

Members


radius :number

Type:
  • number
Default Value:
  • 0
Source:

radius

Radius of circle.

Properties:
Name Type Description
radius number
Default Value:
  • 4
Source:

type :number

The type of the object, mainly used to avoid instanceof checks

Type:
  • number
Source:

<constant> type :number

Type of this shape, should always be CIRC.

Type:
  • number
Source:

x :number

Type:
  • number
Default Value:
  • 0
Source:

y :number

Type:
  • number
Default Value:
  • 0
Source:

Methods


clone()

Creates a clone of this Circle instance

Source:
Returns:

a copy of the Circle

Type
Circle

contains(x, y)

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

Source:
Returns:

Whether the x/y coordinates are within this Circle

Type
boolean

getBounds()

Returns the framing rectangle of the circle as a Rectangle object

Source:
Returns:

the framing rectangle

Type
Rectangle

Class: Circle

Circle


new Circle()

Circle shape for physic body.

Source:

Members


radius :number

Type:
  • number
Default Value:
  • 0
Source:

radius

Radius of circle.

Properties:
Name Type Description
radius number
Default Value:
  • 4
Source:

type :number

The type of the object, mainly used to avoid instanceof checks

Type:
  • number
Source:

<constant> type :number

Type of this shape, should always be CIRC.

Type:
  • number
Source:

x :number

Type:
  • number
Default Value:
  • 0
Source:

y :number

Type:
  • number
Default Value:
  • 0
Source:

Methods


clone()

Creates a clone of this Circle instance

Source:
Returns:

a copy of the Circle

Type
Circle

contains(x, y)

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

Source:
Returns:

Whether the x/y coordinates are within this Circle

Type
boolean

getBounds()

Returns the framing rectangle of the circle as a Rectangle object

Source:
Returns:

the framing rectangle

Type
Rectangle