lovr.math.newCurve
EditCreates a new Curve
from a list of control points.
Create a Curve from a set of initial control points.
Arguments
Name | Type | Description |
x | number | The x coordinate of the first control point. |
y | number | The y coordinate of the first control point. |
z | number | The z coordinate of the first control point. |
... | * | Additional control points. |
Returns
Name | Type | Description |
curve | Curve | The new Curve. |
Create a Curve from a set of initial control points, using vectors.
Arguments
Name | Type | Description |
v | Vec3 | The first control point. |
... | * | Additional control points. |
Returns
Name | Type | Description |
curve | Curve | The new Curve. |
Create a Curve from control points in a table. The table values can be numbers or Vec3
objects.
Arguments
Name | Type | Description |
points | table |
A table of control points, formatted as numbers or Vec3 objects.
|
Returns
Name | Type | Description |
curve | Curve | The new Curve. |
Create an empty Curve, reserving space ahead of time for a certain number of control points.
Arguments
Name | Type | Description |
n | number | The number of points to reserve for the Curve. |
Returns
Name | Type | Description |
curve | Curve | The new Curve. |