Hello Background My Old Friend
CSS Filters roast CPU harder than your friends you
So it turns out that animated CSS filters are the worst thing for a potato computer. I have replaced the good old CSS background with a WebGL canvas, in case the WebGL canvas somehow fails you get a static image instead.
I used the TWGL library to create the background. TWGL just wraps boring and verbose parts of WebGL into nice abstractions which are more enjoyable to use.
Why not three.js?
Unnecessary abstractions. Three.js wouldâve gotten in my way with its cameras, shmameras and other things designed to make life easier, I only need to draw a single quad.
Unnecessarily big. As of May 5th 2021 official minimized three.js build was 591 KB big, in comparison TWGL takes 48.9 KB. Isnât 591 KB too much to just draw a single quad? Of course size doesnât matter much in the world of high speed internet and where websites supply megabytes of pure javascript. So this reason is purely aesthetic đ
Now a different lesson, I was very confused with UV maps and it turns out that the rug texture I use does not have âupâ or âdownâ when squished. So please when you are making test textures, make them have text, or arrows, at least something so you would know the direction.
THE test image.
So, kids⊠donât ever do html it is a world of pain