Capítulo 342 de 859
A base class extending Curve. CurvePath is simply an array of connected curves, but retains the API of a curve.
Constructor
| Signature |
|---|
new CurvePath() |
Properties
| Property | Description |
|---|---|
.autoClose : boolean | Whether the path should automatically be closed by a line curve. |
.curves : Array.<Curve> | An array of curves defining the path. |
Methods
| Method | Description |
|---|---|
.add( curve : Curve ) | Adds a curve to this curve path. |
.closePath() : CurvePath | Adds a line curve to close the path. |
.getCurveLengths() : Array.<number> | Returns list of cumulative curve lengths of the defined curves. |
| `.getPoint( t : number, optionalTarget : Vector2 | Vector3 ) : Vector2 |