class Path2
Creates a Path2 object from the starting 2D coordinates x and y.
Name | Type | Description | |
---|---|---|---|
x | number | ||
y | number |
Adds a new segment until the passed coordinates (x, y) to the current Path2.
Returns the updated Path2.
Name | Type | Description | |
---|---|---|---|
x | number | ||
y | number |
Adds numberOfSegments segments according to the arc definition (middle point coordinates, end point coordinates, the arc start point being the current Path2 last point) to the current Path2.
Returns the updated Path2.
Name | Type | Description | |
---|---|---|---|
midX | number | ||
midY | number | ||
endX | number | ||
endY | number |
Closes the Path2.
Returns the Path2.
Returns the Path2 total length (float).
Returns the Path2 internal array of points.
Returns a new Vector2 located at a percentage of the Path2 total length on this path.
Name | Type | Description | |
---|---|---|---|
normalizedLengthPosition | number |
Returns a new Path2 starting at the coordinates (x, y).
Name | Type | Description | |
---|---|---|---|
x | number | ||
y | number |