Creates a new Point
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
x |
number |
<optional> |
0 |
position of the point on the x axis |
y |
number |
<optional> |
0 |
position of the point on the y axis |
Implements
- IPoint
Members
Position of the point on the x axis
- Default Value:
- 0
Position of the point on the y axis
- Default Value:
- 0
Methods
clone () PIXI.Point
Creates a clone of this point
Returns:
Type | Description |
---|---|
PIXI.Point | A clone of this point |
Copies x
and y
from the given point into this point
Name | Type | Description |
---|---|---|
p |
IPointData |
The point to copy from |
Returns:
Type | Description |
---|---|
this | The point instance itself |
Copies this point's x and y into the given point (p
).
Name | Type | Description |
---|---|---|
p |
T |
The point to copy to. Can be any of type that is or extends |
Returns:
Type | Description |
---|---|
T | The point (p ) with values updated |
Accepts another point (p
) and returns true
if the given point is equal to this point
Name | Type | Description |
---|---|---|
p |
IPointData |
The point to check |
Returns:
Type | Description |
---|---|
boolean | Returns true if both x and y are equal |
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 | Attributes | Default | Description |
---|---|---|---|---|
x |
number |
<optional> |
0 |
position of the point on the |
y |
number |
<optional> |
x |
position of the point on the |
Returns:
Type | Description |
---|---|
this | The point instance itself |