Get smooth start and end on shape

This commit is contained in:
Luke Murphy 2020-02-03 09:03:47 +01:00
parent 0f107ce7a2
commit 6b64133298
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC

View File

@ -262,9 +262,11 @@ class GeneratedShape {
curveTightness(this.organicConstant);
beginShape();
curveVertex(this.xs[this.xs.length - 1], this.ys[this.ys.length - 1]);
for (let i = 0; i < this.edges; i++) {
curveVertex(this.xs[i], this.ys[i]);
}
curveVertex(this.xs[0], this.ys[0]);
endShape(CLOSE);
}