processing / p5.js

p5.js is a client-side JS platform that empowers artists, designers, students, and anyone to learn to code and express themselves creatively on the web. It is based on the core principles of Processing. http://twitter.com/p5xjs —
http://p5js.org/
GNU Lesser General Public License v2.1
21.13k stars 3.23k forks source link

Fix for fill artifact in WebGL mode when rendering in LINE mode using beginShape #6827

Closed RandomGamingDev closed 4 months ago

RandomGamingDev commented 4 months ago

Resolves #6826

Changes:

Adds a local variable called is_line within p5.RendererGL.prototype.endShape and uses that to check whether or not to apply fill.

Screenshots of the change:

Here's the sketch demonstrating the issue (This is using the unfixed version of p5.js, but if you'd like to use the fixed version just comment out the default import for the p5.min.js import) https://editor.p5js.org/PotatoBoy/sketches/XOezf6_IR Without the fix: image With the fix: image

PR Checklist

Qianqianye commented 4 months ago

Looks good. Thanks!