DEV Community

Discussion on: Let's build a rainbow on a canvas from scratch! 🌈📐

Collapse
valeriavg profile image
Valeria

I find it much easier to make gradients with WebGL. You should give it a try too :-)

Collapse
thormeier profile image
Pascal Thormeier Author

Agreed, there's specialized tools for this that are much simpler to handle!

I wanted to do it from scratch entirely and show how to approach this problem from a mathematical point of view with the most basic tools at hand. This post was meant to be more about thinking patterns, I could've emphasized that more 😅

Collapse
valeriavg profile image
Valeria

I didn't mean it as an offence in any way. I enjoy your posts and this one is not an exception 👍
So let me rephrase: those looking to draw heavily optimized 2D graphics, especially gradients should take a look at WebGL, where the computation is performed on GPU directly. It's not as scary as it sounds 😃

Thread Thread
thormeier profile image
Pascal Thormeier Author

No offence taken! Sorry if my answer came over as too defensive, I think I misunderstood your original comment a bit. I'm really glad you enjoy my articles, thank you so much 😀

I should really dive deeper into WebGL, I've seen amazing things built with it. You're absolutely right!