The Circle object is used to help draw graphics and can also be used to specify a hit area for displayObjects.

Memberof

PIXI

Constructors

Properties

Methods

Constructors

  • Parameters

    • Optional x: number

      The X coordinate of the center of this circle

    • Optional y: number

      The Y coordinate of the center of this circle

    • Optional radius: number

      The radius of the circle

    Returns Circle

Properties

radius: number

Default

0
type: CIRC

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

Default

PIXI.SHAPES.CIRC

See

PIXI.SHAPES

x: number

Default

0
y: number

Default

0

Methods

  • Creates a clone of this Circle instance

    Returns Circle

    A copy of the Circle

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

    Parameters

    • 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

  • Returns the framing rectangle of the circle as a Rectangle object

    Returns Rectangle

    The framing rectangle

Generated using TypeDoc