I made Tabloaf , a pixel cat for Chrome and Firefox. It walks across whatever page you have open, sits on pictures and headings, and chases a ball of yarn.
TL;DR: while the cat walks, Chrome's GPU process went from 15β17% of a core to ~7%, and Firefox's page process from 19β20% to ~2%.
Chrome renders the page in a renderer process and composites layers in a separate GPU process. In Firefox the page (content) process is roughly the renderer. Every percentage here is CPU time as a share of one core, not GPU load.
The default cat is 60Γ48 CSS pixels. A rectangular hit box would also catch clicks in the empty space around its ears and tail, so I clipped the clickable area to the cat's outline with clip-path .
I put that clip on the canvas that was already moving.
Moving the walk off the frame loop
An earlier version saved CPU by stepping the walk one art pixel at a time, but it looked jerky.β¦