Skip to main content
Version: Next

Spline

Draws a curved line through a series of two or more points.

Parameters

NameTypeDescription
colorstringThe color of the spline. Defaults to black.
weightNumberThe thickness of the spline. Defaults to 1.
curvatureNumberThe amount of curve in the spline. Defaults to 0.5.

Variadic Parameters (Points)

A Spline requires at least two points to be defined. You can add as many points as you like.

NameTypeDescription
xNumberThe x-coordinate of a point on the spline.
yNumberThe y-coordinate of a point on the spline.
pNumberThe pressure at this point (optional).

Example

Spline(x1: 10, y1: 90, x2: 50, y2: 10, x3: 90, y3: 90, color: 'blue', weight: 2)