Skip to content

Commit bc5e026

Browse files
committed
More general description of anchor requirement in bezierVertex
1 parent e1173ee commit bc5e026

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/shape/vertex.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,10 +409,16 @@ function vertex(p5, fn){
409409
* <a href="#/p5/bezier">bezier()</a> function. `bezierVertex()` must be
410410
* called between the
411411
* <a href="#/p5/beginShape">beginShape()</a> and
412-
* <a href="#/p5/endShape">endShape()</a> functions. There must be at least
413-
* one call to <a href="#/p5/vertex">bezierVertex()</a>, before
412+
* <a href="#/p5/endShape">endShape()</a> functions.
413+
* Bézier need a starting point. Building a shape
414+
* only wiht Bézier curves needs one initial
415+
* call to <a href="#/p5/vertex">bezierVertex()</a>, before
414416
* a number of `bezierVertex()` calls that is a multiple of the parameter
415417
* set by <a href="#/p5/bezierOrder">bezierOrder(...)</a> (default 3).
418+
* But shapes can mix different types of vertices, so if there
419+
* are some previous vertizes, then the initial anchor is not needed,
420+
* only the multiples of 3 (or the Bézier order) calls to
421+
* `bezierVertext` for each curve.
416422
*
417423
* Each curve of order 3 requires three calls to `bezierVertext`, so
418424
* 2 curves would need 7 calls to `bezierVertex()`:

0 commit comments

Comments
 (0)