2 ms·
In my case, it's helped me to learn. It's a point of pride to me that my JS canvas library has no direct dependencies, but there's some things I can't get my he
by rikroots 2y ago
In my case, it's helped me to learn. It's a point of pride to me that my JS canvas library has no direct dependencies, but there's some things I can't get my head around. For those - in particular a pseudo-random number generator and a really fast gaussian blur filter - I copied code and learned by adapting it to work well with the rest of the library's ecosystem.
In other cases, I've taken inspiration from other libraries and implemented that functionality from scratch. The library's entire filters system was inspired by the way SVG allows users to build filters from building blocks. For the color system I should have reached for a well-maintained library (such as color.js) but instead chose to implement my own system using the CSS Color Module 4 spec as my guide. I've probably learned too much about color gamuts but if a question about the difference between D50 and D65 white points ever comes up in a pub quiz, I'll have the answer!
- eviks 2y agoYou've mostly described the DIY part which I've specifically excluded, as its connection to learning is obvious
- antifa 2y ago> JS canvas library Is that publicly available anywhere?
- rikroots 2y agoOh, yes. I regularly spam HN with links to various parts of it. Check the submissions link in my profile.