asierdev.com

Colophon

The trama

The dots are one fixed <canvas> behind the page. A fragment shader works out, for every pixel, which grid cell it belongs to and how big that cell's dot is, reading the size from a luminance texture of cols × rows texels. Cost follows the number of pixels, not the number of dots.

The first prototype drew about 24,000 circles with Canvas 2D. That took around 8 ms per frame at 1920×1080, and a 144 Hz display leaves about 6.9 ms. In WebGL the JavaScript per frame is under 0.1 ms. Without WebGL, the page falls back to the Canvas 2D version.

vec2 cell = floor(q / u_step), c = (cell + 0.5) * u_step;
float v = texture2D(u_base, (cell + 0.5) / u_grid).r;
float r = u_step*0.62*v, aa = 0.7/u_dpr;
float a = r < 0.35 ? 0.0 : smoothstep(r + aa, r - aa, length(q - c));
gl_FragColor = vec4(u_ink*a, a);

Plates

Each section brings its own plate. When you scroll, the dots migrate from one image to the next. Text reserves its own patch of clean paper, and the name at the top is made of the same dots. Every plate is a plain grayscale image, so adding one means adding a file and a section.

The lens

It sticks to the cursor with no inertia. I tried easing it, and it read as lag.

Stack

HTML, CSS and JavaScript modules, written by hand. No framework, no bundler. It is served from Cloudflare Pages. The contact form posts to a Worker, which sends the message by email through Email Routing. Nothing is stored.

Type and colour

Geist and Geist Mono. One cobalt, #1d3fd0, on paper, #f4f3ee.

Images