bitcraftlab / p5.gui

p5.gui magically generates a graphical user interface for your p5.js sketches
https://bitcraftlab.github.io/p5.gui
MIT License
357 stars 91 forks source link

endShape(CLOSE) won't treat the star's beginning point like a join #14

Closed escape0707 closed 5 years ago

escape0707 commented 5 years ago

image

Notice the top vertex. Is this a p5js bug? Should we file this to them?

Or is this by design and we should use:

beginShape();
for(var i = 0; i < 2 * n + 2; i++) {
escape0707 commented 5 years ago

Well, by further digging p5js API, I learned strokeCap() and strokeJoin() function. But non of these function can make the beginning point plot like a join point. Am I still missing something or we have to +2 to the loop?

escape0707 commented 5 years ago

This issue is confirmed and fixed by p5js community in the issue referenced above. Cheer and closing this one now!