Fixed line drawing in WebGL when there is a previously defined texture#5982
Conversation
|
🎉 Thanks for opening this pull request! Please check out our contributing guidelines if you haven't already. And be sure to add yourself to the list of contributors on the readme page! |
davepagurek
left a comment
There was a problem hiding this comment.
Thanks for making this change happen! I tested locally, looks good!
davepagurek
left a comment
There was a problem hiding this comment.
Oh, the tests caught something I didn't test: drawing an image using image() now adds lines. Demo here, try toggling which p5 import in index.html is commented to see how p5 1.5.0 behaves: https://editor.p5js.org/davepagurek/sketches/nbzbYeVbp
I think we probably just need to call noStroke() in the WebGL implementation of image(): https://github.com/processing/p5.js/blob/main/src/webgl/3d_primitives.js#L1998
|
|
||
| this._pInst.noLights(); | ||
|
|
||
| noStroke(); |
There was a problem hiding this comment.
Right now the tests are still failing, I believe it's because we can't call the global noStroke() here in case p5 is running in instance mode. I think calling this._pInst.noStroke() should fix it though!
davepagurek
left a comment
There was a problem hiding this comment.
Awesome, thanks for making those changes!
Resolves #5440
Changes:
Removed
&& this.drawMode !== constants.TEXTUREfromcalculateStroke.Screenshots of the change:
Using the example from #5440,
PR Checklist
npm run lintpasses