Skip to content

Commit c8a5a71

Browse files
authored
fixing splinePoint() and splineTangent()
1 parent a4981a0 commit c8a5a71

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

src/shape/curves.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,10 @@ function curves(p5, fn){
710710
* createCanvas(100, 100);
711711
*
712712
* background(200);
713-
*
713+
*
714+
* // Exclude the ends—skip the outer spans (p0→p1 and p2→p3) so only the middle span (p1→p2) is drawn.
715+
* splineProperty('ends', EXCLUDE);
716+
*
714717
* // Set the coordinates for the curve's anchor and control points.
715718
* let x1 = 5;
716719
* let y1 = 26;
@@ -758,7 +761,10 @@ function curves(p5, fn){
758761
*
759762
* function draw() {
760763
* background(200);
761-
*
764+
*
765+
* // Exclude the ends—skip the outer spans (p0→p1 and p2→p3) so only the middle span (p1→p2) is drawn.
766+
* splineProperty('ends', EXCLUDE);
767+
*
762768
* // Set the coordinates for the curve's anchor and control points.
763769
* let x1 = 5;
764770
* let y1 = 26;
@@ -837,6 +843,9 @@ function curves(p5, fn){
837843
*
838844
* background(200);
839845
*
846+
* // Exclude the ends—skip the outer spans (p0→p1 and p2→p3) so only the middle span (p1→p2) is drawn.
847+
* splineProperty('ends', EXCLUDE);
848+
*
840849
* // Set the coordinates for the curve's anchor and control points.
841850
* let x1 = 5;
842851
* let y1 = 26;

0 commit comments

Comments
 (0)