new Point(x, y)
The Point object represents a location in a two-dimensional coordinate system, where x represents the horizontal axis and y represents the vertical axis.
Parameters
Name | Type | Description |
---|---|---|
x |
Number | position of the point on the x axis |
y |
Number | position of the point on the y axis |
- Source code: pixi/geom/Point.js, line 5
Public Properties
-
x : number
-
- Default Value
- 0
- Source code: pixi/geom/Point.js, line 15
-
y : number
-
- Default Value
- 0
- Source code: pixi/geom/Point.js, line 22
Public Methods
-
clone() → {PIXI.Point}
-
Creates a clone of this point
Returns
a copy of the point
- Source code: pixi/geom/Point.js, line 30
-
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.
Parameters
Name Type Argument 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
- Source code: pixi/geom/Point.js, line 41