This whole page is drawn by a shader.
The browser lays this page out as ordinary HTML, hands its pixels to the graphics card, and a WebGPU shader draws them. Move the pointer, press anywhere, or scroll, and the page ripples. Pick another effect at the top for light, weather, fire or water. Underneath, it is still a web page.
See how it worksHow it works
-
The page moves into a canvas.
A canvas marked
content="drawable"lays out the elements inside it, and any of them markeddrawablecan be drawn by the canvas. [1] This page's script moves the whole page into one. -
The browser paints it to a texture.
When anything inside changes, the canvas is sent a
paintevent. [1] One call,drawElementImageToTexture, then copies the page into a WebGPU texture. [2] Nothing is screenshotted. -
A shader draws the texture.
The shader decides what each pixel shows. It can push them aside along a shockwave, light the ground behind the words, or let snow and water settle on the page's own shapes.
Still a web page
These are the page's own elements, not a picture of them, so what a web page does still works.
- Select this sentence and copy it.
- Press Tab to walk through the links and buttons. The focus ring is drawn through the shader too.
- Hover a button and its colour changes.
- Clicks land where the page was laid out, because the script tells the browser where the page sits. [2]
- Chrome's documentation says content inside the canvas is offered to assistive technology as ordinary page content. [1]
Questions
Which browsers show the effect?
Chrome's documentation says HTML-in-Canvas shipped in Chrome 157. [1] The effect also needs WebGPU. Anywhere else you get this same page without it.
What happens without it?
The script does nothing and the page stays plain HTML. Turn effects off at the top of the page to see exactly that.
Does the effect move what I can click?
No. Clicks land where the page was laid out. As a shockwave passes, it pushes what you see aside by up to 22 pixels for a moment, and it is gone in about two seconds. Rain on the glass bends what is under a drop by up to 6 pixels. The other effects draw around the page's content and leave it where it is.
Is the page redrawn all the time?
With Ripples, no. The page is handed to the graphics card only when it changes, and frames are drawn only while something is moving. At rest it draws nothing. Measured here: no frames and no uploads over 600 ms at rest. The other effects are always moving, so they draw every frame while they are chosen, but the page itself is still handed over only when it changes.
What if I would rather it kept still?
Use the effects control at the top. Where your system asks for reduced motion, effects start off. The Effect menu beside it chooses which effect runs, and choosing one turns effects on.
Where does the water come from?
It is the liquid from Aquaclysm, a game by the same author: particles on the graphics card, counted into a grid, pushed apart where they crowd and pulled down. Here the page's own text and boxes are the walls it runs over.
Say hello
A small form appears here when script is on.