lovr.math.newCurve

Edit

Creates a new Curve from a list of control points.





Create a Curve from a set of initial control points.

Arguments

NameTypeDescription
xnumber The x coordinate of the first control point.
ynumber The y coordinate of the first control point.
znumber The z coordinate of the first control point.
...* Additional control points.

Returns

NameTypeDescription
curveCurve The new Curve.

Create a Curve from a set of initial control points, using vectors.

Arguments

NameTypeDescription
vVec3 The first control point.
...* Additional control points.

Returns

NameTypeDescription
curveCurve The new Curve.

Create a Curve from control points in a table. The table values can be numbers or Vec3 objects.

Arguments

NameTypeDescription
pointstable A table of control points, formatted as numbers or Vec3 objects.

Returns

NameTypeDescription
curveCurve The new Curve.

Create an empty Curve, reserving space ahead of time for a certain number of control points.

Arguments

NameTypeDescription
nnumber The number of points to reserve for the Curve.

Returns

NameTypeDescription
curveCurve The new Curve.

See also