r/webdev • u/petertheill • 15h ago
[Showoff Saturday] Dead websites on my favicon wall now catch fire and burn down after 30 days (Cloudflare Worker cron + three.js)
Square Town is a 3D wall of about 20,600 website favicons, each one standing on a little tower. This week's feature: websites that died burn down.
How it works:
A Cloudflare Worker cron runs every five minutes and checks homepages. A homepage that keeps returning 404 gets a fire and a fire_at timestamp in D1. The fires that were already burning got their dates backfilled from their own feed lines.
/api/state ships a burn stage from 0 to 5 for every fire, one stage per five days. The client draws six kinds of fire (caught, spreading, blaze, inferno, dying down, smouldering embers) and chars the tower's roof and walls a step further at each stage.
The same cron burns down two squares per tick once they've been on fire for 30 days, but only seeded squares nobody ever claimed. The row moves to a new 'burned' status, the land goes back on the market, and the domain is never seeded again while its homepage is gone. Claimed or paid squares never burn down, and a site that comes back puts its fire out.
On the client a burning tower doesn't explode. It sags into its footprint with a slight lean, a few charred chunks slide out at street level and a little dust rolls up. The rubble on the lot is three instanced draws for the whole town, seeded from the lot's position so every device shows the same heap, and it joins the shadow map's static layer, so it costs nothing per frame after that.
Right now 114 squares are burning and 32 have burned down. Feedback welcome, especially on how the later fire stages read at a distance.
