Class: Point

PIXI. Point

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

new PIXI.Point(x, y)

Name Type Default Description
x number 0 optional

position of the point on the x axis

y number 0 optional

position of the point on the y axis

Members

xnumber

Default Value:
  • 0

ynumber

Default Value:
  • 0

Methods

Creates a clone of this point

Returns:
Type Description
PIXI.Point a copy of the point

Copies x and y from the given point

Name Type Description
p PIXI.Point

The point to copy.

equals(p){boolean}

Returns true if the given point is equal to this point

Name Type Description
p PIXI.Point

The point to check

Returns:
Type Description
boolean Whether the given point equal to this point

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

Name Type Default Description
x number 0 optional

position of the point on the x axis

y number 0 optional

position of the point on the y axis