← All notes

How we built dakuta.dev: ink, WebGL and very little JavaScript

A static site, a hand-written shader and one rule for every effect on the page. Notes on how our new website works.

For our new website we gave ourselves one idea and one rule. The idea: ink on paper, the splash from our logo, alive. The rule: every effect has to earn its place, and the page still has to show up in about a second on an ordinary phone.

A static site, on purpose

dakuta.dev is built with Astro and served as plain HTML files. There is no React and no client-side framework. The interactive parts are small TypeScript modules, one for each job. The fonts, Instrument Serif, Geist and Geist Mono, are served from our own domain, so no visitor data goes to a font service.

The ink

The splash on the first screen is a few dozen circles drawn by a WebGL shader we wrote ourselves. For each pixel, the shader adds up how close it is to every circle; where the sum crosses a threshold, the pixel is ink. It is an old trick called metaballs, and it is why the drops merge so softly when they touch.

The splash reaches for your cursor, scatters drops when you click and takes on a product’s colour when you hover its name. The same renderer draws the coloured drops in our contact section and the ink that floods the screen when you open a product.

Two details keep it light. All the canvases share one animation loop and stop drawing when they are off screen. And when a browser has no graphics card to work with, as in some virtual machines or the tools that test page speed, the shader draws at a lower resolution and 30 frames per second instead of slowing the page down.

Moving between pages

When you open a product, ink floods the screen in its colour, and the product page arrives already painted that colour. There is no single-page-app machinery behind it: the colour is handed to the next page in session storage, and a tiny inline script paints it before the first frame. Going back pulls the ink into the button you came from.

Very little JavaScript

The home page uses GSAP for its scroll scenes. No other page loads it. The cursor, the magnetic buttons, the ink transitions and the logo run on a few small helpers of our own, and the product demos use the animation API built into the browser. Our privacy page loads about 34 KB of JavaScript in total, and less than half of that once compressed.

For everyone

If your system asks for reduced motion, everything holds still: the splash is drawn once, page transitions become ordinary page loads, and nothing depends on animation to make sense. Every demo works with a keyboard, and we check contrast in both the light and the dark theme, at desktop and phone widths.

What we would tell another team

Pick one idea and take it all the way. Measure on a slow phone, not on your laptop. And let the quiet parts, fast loading, readable text and a keyboard that works, carry as much weight as the shader. People notice them most when they are missing.

More from the journal

  1. 3 min readKolo SetsDraft

    Why we forget, and how Kolo plans your reviews

    The forgetting curve, the classic SM-2 algorithm, and the small changes we made to it in Perigee, the review engine inside Kolo.
  2. 2 min readbøy!Draft

    En, ei, et: making peace with Norwegian gender

    Why grammatical gender matters more than it seems, why you only have one real choice to make, and four habits that help it stick.