Skip to content

Commit 9b328d1

Browse files
committed
Getter docs
1 parent 73e49d3 commit 9b328d1

File tree

1 file changed

+23
-6
lines changed

1 file changed

+23
-6
lines changed

src/shape/custom_shapes.js

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1638,9 +1638,15 @@ function customShapes(p5, fn) {
16381638
* </code>
16391639
* </div>
16401640
*/
1641+
/**
1642+
* @method bezierOrder
1643+
* @returns {Number} The current Bézier order.
1644+
*/
16411645
fn.bezierOrder = function(order) {
16421646
return this._renderer.bezierOrder(order);
16431647
};
1648+
1649+
16441650
/**
16451651
* Adds a spline curve segment to a custom shape.
16461652
*
@@ -2089,29 +2095,40 @@ function customShapes(p5, fn) {
20892095
* // Draw the curve.
20902096
* noFill();
20912097
* beginShape();
2092-
* curveVertex(10, 26);
2093-
* curveVertex(10, 26);
2094-
* curveVertex(83, 24);
2095-
* curveVertex(83, 61);
2096-
* curveVertex(25, 65);
2097-
* curveVertex(25, 65);
2098+
* splineVertex(10, 26);
2099+
* splineVertex(10, 26);
2100+
* splineVertex(83, 24);
2101+
* splineVertex(83, 61);
2102+
* splineVertex(25, 65);
2103+
* splineVertex(25, 65);
20982104
* endShape();
20992105
* }
21002106
* </code>
21012107
* </div>
21022108
*/
2109+
/**
2110+
* @method splineProperty
2111+
* @param {String} property
2112+
* @returns value The current value for the given property.
2113+
*/
21032114
fn.splineProperty = function(property, value) {
21042115
return this._renderer.splineProperty(property, value);
21052116
};
21062117

21072118
/**
2119+
* Get or set multiple spline properties at once.
2120+
*
21082121
* Similar to <a href="#/p5/splineProperty">splineProperty()</a>:
21092122
* `splineProperty('tightness', t)` is the same as
21102123
* `splineProperties({'tightness': t})`
21112124
*
21122125
* @method splineProperties
21132126
* @param {Object} properties An object containing key-value pairs to set.
21142127
*/
2128+
/**
2129+
* @method splineProperties
2130+
* @returns {Object} The current spline properties.
2131+
*/
21152132
fn.splineProperties = function(values) {
21162133
return this._renderer.splineProperties(values);
21172134
};

0 commit comments

Comments
 (0)