dbaltaza.pt disc

dbaltaza.pt

TypeScript project · featured · web, performance, TypeScript

A game-console portfolio where every project is a pre-rendered disc: Vite + TypeScript, no framework, and a paint budget the tests measure.

Open it in the console View the code on GitHub Resume (PDF) LinkedIn

The problem

Turn my portfolio into a PSP/PS2-era game console where every project is a disc, without giving up what a portfolio is for: loading fast on a phone, reading well for recruiters and search engines, and working by keyboard, gamepad and screen reader. Smooth had to be something a test can measure, not a feeling.

What I built

The hard part

Holding the paint budget. The backdrop takes the colour of the selected disc and fades to the next one over 1.2 s; written as a transition of one CSS colour, it repainted the whole screen on every frame, and stepping through five discs cost 44 ms of paint against a budget of 30. It is now a cross-fade: the new colour is painted once on a layer above and only that layer's opacity animates, on the compositor. The gradient is linear in the colour, so it shows exactly the same shades. The hover tilt had the same kind of bug: a perspective on the disc put its shadows in 3D and made Chrome re-raster every disc in the carousel on every frame, until the tilt carried its own perspective().

Built with

More projects