Constructor
new Point(x, y)
- Description:
- Create a point
- Source:
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
x |
number |
<optional> |
0
|
X - x-axis coordinate |
y |
number |
<optional> |
0
|
Y - y-axis coordinate |
options |
Options | Ancillary properties |
Parameters:
Name | Type | Description |
---|---|---|
x |
number | X coordinate value |
y |
number | Y coordinate value |
Methods
canvas(value)
- Description:
- Set canvas value
- Source:
- See:
Parameters:
Name | Type | Description |
---|---|---|
value |
string | Canvas id |
canvas() → {string}
- Description:
- Get canvas value
- Source:
- See:
Returns:
Canvas id
- Type
- string
center() → {Point}
- Description:
- Get center of this object
- Source:
Returns:
Center point coordinates
- Type
- Point
drawOptions(offset)
- Description:
- Draws associated options
- Source:
Parameters:
Name | Type | Default | Description |
---|---|---|---|
offset |
number |
20
|
Offset of drawable options |
invert()
- Description:
- Invert x & y coordinate values
- Source:
move(degree, distance)
- Description:
- Move this object
- Source:
Parameters:
Name | Type | Description |
---|---|---|
degree |
number | Direction to move; in degrees |
distance |
number | Distance to move |
options() → {Options}
- Description:
- Get options
- Source:
Returns:
Options object
- Type
- Options
x(value)
- Description:
- Set x-axis value
- Source:
Parameters:
Name | Type | Description |
---|---|---|
value |
number | X coordinate value |
x() → {number}
- Description:
- Get x-axis value
- Source:
Returns:
X coordinate value
- Type
- number
y(value)
- Description:
- Set the y-axis value
- Source:
Parameters:
Name | Type | Description |
---|---|---|
value |
number | Y coordinate value |
y() → {number}
- Description:
- Get y-axis value
- Source:
Returns:
Y coordinate value
- Type
- number