Skip to content

Commit d626147

Browse files
committed
Update curveDetail docs
1 parent 9b328d1 commit d626147

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

src/webgl/3d_primitives.js

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2671,15 +2671,13 @@ function primitives3D(p5, fn){
26712671
* In WebGL mode, smooth shapes are drawn using many flat segments. Adding
26722672
* more flat segments makes shapes appear smoother.
26732673
*
2674-
* The parameter, `detail`, is the number of segments to use while drawing a
2675-
* spline curve. For example, calling `curveDetail(5)` will use 5 segments to
2676-
* draw curves with the <a href="#/p5/curve">curve()</a> function. By
2677-
* default,`detail` is 20.
2674+
* The parameter, `detail`, is the density of segments to use while drawing a
2675+
* spline curve.
26782676
*
26792677
* Note: `curveDetail()` has no effect in 2D mode.
26802678
*
26812679
* @method curveDetail
2682-
* @param {Number} resolution number of segments to use. Defaults to 20.
2680+
* @param {Number} resolution number of segments to use. Default it 1/4
26832681
* @chainable
26842682
*
26852683
* @example
@@ -2694,12 +2692,12 @@ function primitives3D(p5, fn){
26942692
* noFill();
26952693
* strokeWeight(1);
26962694
* stroke(0);
2697-
* curve(5, 26, 73, 24, 73, 61, 15, 65);
2695+
* spline(5, 26, 73, 24, 73, 61, 15, 65);
26982696
*
26992697
* // Draw red spline curves from the anchor points to the control points.
27002698
* stroke(255, 0, 0);
2701-
* curve(5, 26, 5, 26, 73, 24, 73, 61);
2702-
* curve(73, 24, 73, 61, 15, 65, 15, 65);
2699+
* spline(5, 26, 5, 26, 73, 24, 73, 61);
2700+
* spline(73, 24, 73, 61, 15, 65, 15, 65);
27032701
*
27042702
* // Draw the anchor points in black.
27052703
* strokeWeight(5);
@@ -2726,19 +2724,19 @@ function primitives3D(p5, fn){
27262724
*
27272725
* background(200);
27282726
*
2729-
* // Set the curveDetail() to 3.
2730-
* curveDetail(3);
2727+
* // Set the curveDetail() to 0.5
2728+
* curveDetail(0.5);
27312729
*
27322730
* // Draw a black spline curve.
27332731
* noFill();
27342732
* strokeWeight(1);
27352733
* stroke(0);
2736-
* curve(-45, -24, 0, 23, -26, 0, 23, 11, 0, -35, 15, 0);
2734+
* spline(-45, -24, 0, 23, -26, 0, 23, 11, 0, -35, 15, 0);
27372735
*
27382736
* // Draw red spline curves from the anchor points to the control points.
2739-
* stroke(255, 0, 0);
2740-
* curve(-45, -24, 0, -45, -24, 0, 23, -26, 0, 23, 11, 0);
2741-
* curve(23, -26, 0, 23, 11, 0, -35, 15, 0, -35, 15, 0);
2737+
* spline(255, 0, 0);
2738+
* spline(-45, -24, 0, -45, -24, 0, 23, -26, 0, 23, 11, 0);
2739+
* spline(23, -26, 0, 23, 11, 0, -35, 15, 0, -35, 15, 0);
27422740
*
27432741
* // Draw the anchor points in black.
27442742
* strokeWeight(5);

0 commit comments

Comments
 (0)