Hello, I've found that the beginShape() / endShape function does not take into account the stroke() value when drawing in the WebGL mode. It seems to me as if the fill() value overrid the stroke() value, since the lines are colored with this value. However this is problematic when we need to color the lines with a different color than the sides, and specially since the line(), point() and ellipse() functions do not work in WebGL, what forces the use of beginShape() / endShape(), even for simple shapes.
Also, the strokeWeight() is not respected by the beginShape() / endShape() objects....
Any help will be appreciated! Thanks!
Agreed. In java processing produces this but the javascript implementation differs as no outlines/wireframe gets created. java tutorial https://www.youtube.com/watch?v=IKB1hWWedMk
I would like to second CosmicChild's findings here — would love to be able to specify strokeWeight() for beginShape(), especially as line() doesn't work in WEBGL as of this writing. Many thanks!
I ended up rendering to a separate transparent pgraphics object and then drawing it at coordinates (0,0), (0,1), (1,0) and (1,1) of the main canvas to get a thickness effect.
Of course this is much more demanding on the CPU and will only work in certain cases...
Yeah, 4X more taxing on the CPU... Good workaround but I hope the 5js folks can implement lines...
Yeah. Came here to say the same thing. Would be great to see this solved, as it makes it impossible for me to use p5.js with this limitation. :(
hi all, just to give an update.. we are doing work on webgl mode this summer and so realistically, you can expect this fix by september.
fixed with #2145
Most helpful comment
hi all, just to give an update.. we are doing work on webgl mode this summer and so realistically, you can expect this fix by september.