Reference splineProperty()

splineProperty()

Sets the property of a curve.

For example, set tightness, use splineProperty('tightness', t), with t between 0 and 1, at 0 as default.

Spline curves are like cables that are attached to a set of points. Adjusting tightness adjusts how tightly the cable is attached to the points. The parameter, tightness, determines how the curve fits to the vertex points. By default, tightness is set to 0. Setting tightness to 1, as in splineProperty('tightness', 1), connects the curve's points using straight lines. Values in the range from –5 to 5 deform curves while leaving them recognizable.

This function can also be used to set 'ends' property (see also: the curveDetail() example), such as: splineProperty('ends', EXCLUDE) to exclude vertices, or splineProperty('ends', INCLUDE) to include them.

Examples

Syntax

splineProperty(property, value)
splineProperty(property)

Parameters

property
String:
value
Value to set the given property to.

Returns

The current value for the given property.
Notice any errors or typos? Please let us know. Please feel free to edit src/shape/custom_shapes.js and open a pull request!

Related References