🐱 Home Blog About

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.

oof

THE test image.

So, kids… don’t ever do html it is a world of pain

May 9, 2021 21:12:16

<<<< | Back | >>>>