Renderables
Spline
A smooth open curve through a list of points.
Object type renderable pins
A spline draws a smooth curve through its points, in order, without
closing it. Unlike a Bezier, it passes through every
point: there are no control points to place. The points are relative to its
position. Like every Line, it has a stroke and no
fill.
Hierarchy
- Parents
Line→Renderable- Subtypes
- None
Properties
| Name | Type | Notes |
|---|---|---|
| position | Point | from Renderable |
| rotation | number | from Renderable |
| scale | number | from Renderable |
| opacity | number | read-only from Renderable |
| blendMode | BlendMode | read-only from Renderable |
| stroke | Stroke | from Line |
| points | Array<Point> | |
| tension | number |
Nodes
Break Spline
Node id break/Spline
Inputs
| Name | Type | Default | Notes |
|---|---|---|---|
| object | Spline | type default |
Outputs
Make Spline
Node id make/Spline
Inputs
| Name | Type | Default | Notes |
|---|---|---|---|
| position | Point | { x: 0, y: 0 } | |
| rotation | number | 0 | |
| scale | number | 1 | |
| stroke | Stroke | { width: 1, color: { r: 0, g: 0, b: 0, a: 1 }, dashStyle: "SOLID", caps: "round" } | |
| points | Array<Point> | [{ x: -150, y: 0 }, { x: -50, y: -75 }, { x: 50, y: 75 }, { x: 150, y: 0 }] | |
| tension | number | 0 |
Outputs
| Name | Type | Notes |
|---|---|---|
| object | Spline |
Set Spline
Node id set/Spline
Inputs
| Name | Type | Default | Notes |
|---|---|---|---|
| object | Spline | type default | |
| position | Point | — | |
| rotation | number | — | |
| scale | number | — | |
| stroke | Stroke | — | |
| points | Array<Point> | — | |
| tension | number | — |
Outputs
| Name | Type | Notes |
|---|---|---|
| object | Spline |
Lerp Spline
Node id lerp/Spline
Inputs
Outputs
| Name | Type | Notes |
|---|---|---|
| result | Spline |
Notes
- The curve. Between each pair of neighbouring points the spline is one cubic Bézier curve, shaped by the points around it (a centripetal Catmull-Rom spline). Unevenly spaced points don't make it loop or form sharp kinks, and exported SVG files keep the exact curves.
- Ends. The curve starts at the first point and ends at the last one, heading along the first and last piece.
- Tension.
tension, from 0 to 1, straightens the curve: 0 (the default) is the smoothest, 1 gives the same straight pieces as a Polyline through the points. Values outside 0 to 1 are a node error. - Few points. With fewer than 2 different points, nothing is drawn (no error). A point repeated right after itself counts once.
- Default. Make Spline gives a wave through (-150, 0), (-50, -75), (50, 75) and (150, 0).
- From other nodes.
pointsis anArray<Point>: e.g. from Sample, a lattice or Jitter, or a Make Polyline's points through Break Polyline. - Path nodes. Point At and Sample give
each piece an equal share of
t, whatever its length:t= 0.5 on a spline through 3 points is the middle point. Segments doesn't work on splines.
Lerp
Lerp Spline blends each point with the point at the same index, the tension,
the transform and the stroke. Both splines must have the same number of
points, else it's a node error. t is clamped to 0, 1.
Related types
- ClosedSpline, the closed, filled version.
- Polyline, for straight pieces.
- Bezier, for one curve shaped by control points.