How could one color a line or a group of lines in p5 webgl canvas with linear gradient?
Hi @blkpanther,
I’m not aware of a build-in function which do, but here’s an example on how could be done. Sorry, for bad naming convention an eventually typos, but code it on a quick on my mobile (which is a mess with web editors). Nevertheless, hope it helps…
Cheers
— mnse
PS: I’ll try to refine it, when back on my box
1 Like
thanks. I get the idea and it works.
I’m wondering if shader can be used for this purpose but yet to find an example.