Options
All
  • Public
  • Public/Protected
  • All
Menu

The Point object represents a location in a two-dimensional coordinate system, where x represents the horizontal axis and y represents the vertical axis.

memberof

PIXI

implements

IPoint

Hierarchy

  • IPoint
    • PixiPoint

Implements

  • IPoint

Index

Constructors

Properties

Methods

Constructors

constructor

  • new PixiPoint(x?: number, y?: number): PixiPoint
  • Parameters

    • Optional x: number
    • Optional y: number

    Returns PixiPoint

Properties

x

x: number
member

{number} PIXI.Point#x

default

0

y

y: number
member

{number} PIXI.Point#y

default

0

Methods

clone

  • Creates a clone of this point

    Returns PixiPoint

    a copy of the point

copyFrom

  • Copies x and y from the given point

    Parameters

    • p: IPointData

      The point to copy from

    Returns PixiPoint

    Returns itself.

copyTo

  • copyTo(p: IPoint): IPoint
  • Copies x and y into the given point

    Parameters

    • p: IPoint

      The point to copy.

    Returns IPoint

    Given point with values updated

equals

  • equals(p: IPointData): boolean
  • Returns true if the given point is equal to this point

    Parameters

    • p: IPointData

      The point to check

    Returns boolean

    Whether the given point equal to this point

set

  • Sets the point to a new x and y position. If y is omitted, both x and y will be set to x.

    Parameters

    • Optional x: number
    • Optional y: number

    Returns PixiPoint

    Returns itself.

Generated using TypeDoc