Giving every pixel on a web page mass.
When no-one looks at a web page. Is it still a page?
This is a WebGPU port of Dereliction. The page is captured, every pixel becomes a particle, and the words become rigid bodies. Leave it alone and it comes apart. Scroll, and it puts itself back together.
…or just stop moving for five seconds.
What it is
It renders the viewport to pixels in the browser, hands them to a WebGPU compute shader, and gives the words to a rigid-body engine. Gravity can pull on dark pixels only, wind can blow away everything that is not text, letters can fall into a pile, and sand can pour over them for as long as you like.
It is meant to happen to an ordinary page: leave it idle and it comes apart; scroll brings it back.
What holds, what falls
An inheriting CSS custom property on any element:
.sticky { --physics: solid; } /* never moves; sand piles on it */
.card { --physics: rigid; } /* one body, falls as a block */
.block { --physics: frame; } /* falls as a box; words inside */
.fine { --physics: sand; } /* its text is loose grains */
This italic line is marked sand. It will not survive the avalanche; it goes with the paper.
Presets
| words fall as rigid bodies while the paper pours over them as sand | |
| every glyph is its own body | |
| every line becomes a block and tumbles away in a light breeze | |
| an endless trickle of sand through a narrow spout, onto the text | |
| the paper is thrown up and pours down as sand onto text that holds | |
| the same, but the sand keeps coming back in across the top edge | |
| wind on everything that is not text; lightness becomes depth | |
| only the dark pixels get gravity; the light ones are viscous | |
| gravity on everything, drag by lightness | |
| a critically damped spring back to the page |