Interface: IPoint

PIXI.IPoint

Common interface for points. Both Point and ObservablePoint implement it

Members

x number

X coord

y number

Y coord

Methods

copyFrom (p)this

Copies x and y from the given point

Name Type Description
p PIXI.IPoint

The point to copy from

Returns:
Type Description
this Returns itself.

Copies x and y into the given point

Name Type Description
p PIXI.IPoint

The point to copy.

Returns:
Type Description
PIXI.IPoint Given point with values updated

equals (p)boolean

Returns true if the given point is equal to this point

Name Type Description
p PIXI.IPoint

The point to check

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

set (x, y)

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 x optional

position of the point on the y axis