Skip to content

Commit d80a6d3

Browse files
committed
Added ends splineProperty docs
1 parent 202dcdc commit d80a6d3

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

src/shape/custom_shapes.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2058,7 +2058,9 @@ function customShapes(p5, fn) {
20582058
};
20592059

20602060
/**
2061-
* Sets the property of a curve. For example, set tightness,
2061+
* Sets the property of a curve.
2062+
*
2063+
* For example, set tightness,
20622064
* use `splineProperty('tightness', t)`, with `t` between 0 and 1,
20632065
* at 0 as default.
20642066
*
@@ -2071,6 +2073,11 @@ function customShapes(p5, fn) {
20712073
* using straight lines. Values in the range from –5 to 5
20722074
* deform curves while leaving them recognizable.
20732075
*
2076+
* This function can also be used to set 'ends' property
2077+
* (see also: the <a href="#/p5/curveDetail">curveDetail()</a> example),
2078+
* such as: `splineProperty('ends', EXCLUDE)` to exclude
2079+
* vertices, or `splineProperty('ends', INCLUDE)` to include them.
2080+
*
20742081
* @method splineProperty
20752082
* @param {String} property
20762083
* @param value Value to set the given property to.

src/webgl/3d_primitives.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2726,6 +2726,9 @@ function primitives3D(p5, fn){
27262726
*
27272727
* // Set the curveDetail() to 0.5
27282728
* curveDetail(0.5);
2729+
*
2730+
* // Do not show all the vertices
2731+
* splineProperty('ends', EXCLUDE)
27292732
*
27302733
* // Draw a black spline curve.
27312734
* noFill();

0 commit comments

Comments
 (0)