Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/shape/custom_shapes.js
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ class SplineSegment extends Segment {
points.unshift(prevVertex);
points.push(this.vertices.at(-1));
} else if (this._splineProperties.ends === constants.JOIN) {
points.unshift(this.vertices.at(-1), prevVertex);
points.unshift(this.vertices.at(-1));
points.push(prevVertex, this.vertices.at(0));
}

Expand Down
10 changes: 10 additions & 0 deletions test/unit/visual/cases/shapes.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,16 @@ visualSuite('Shape drawing', function() {
screenshot();
});

visualTest('Drawing simple closed curves', function(p5, screenshot) {
setup(p5);
p5.beginShape();
p5.splineVertex(10, 10);
p5.splineVertex(15, 40);
p5.splineVertex(40, 35);
p5.endShape(p5.CLOSE);
screenshot();
});

visualTest('Drawing with curves with tightness', function(p5, screenshot) {
setup(p5);
p5.splineProperty('tightness', -1);
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"numScreenshots": 1
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"numScreenshots": 1
}