#web
9 notes · ← All notes
- Couple Court at /siam: a courtroom in the browserA showcase page for the Siam app with a pocket courtroom that rules in the page, then in one afternoon: a public jury, a verdict you can verify with WebCrypto, paw-print seals, share cards drawn on a canvas, and each judge speaking in its own voice.
- Drawing a share card on a canvasMaking a downloadable 3:4 or 9:16 PNG in the browser: canvas sizes, text that wraps Chinese without spaces, punctuation that must not start a line, clamping to two lines with an ellipsis, images that may fail, and toBlob.
- Making a document verifiable: canonical JSON, a hash, a signatureHow a verdict on /siam proves it was not edited: sort the keys so the same data always serialises the same way, hash it with SHA-256, sign the hash with Ed25519, check both in the browser with WebCrypto, and optionally anchor the hash in Bitcoin with OpenTimestamps.
- A brake game at /gameA 3D brake-or-flip game added as a plain static page with vendored three.js, then three quick rounds of changes: jets to 383 mph, no limit on the jets, and a barrier leap that ends the run on touchdown without changing any score.
- A fixed-step game loopWhy a browser game should advance its physics in equal steps instead of by frame time, the accumulator loop that does it, slow motion for free, and keeping the physics in a module with no DOM so Node can test it.
- Making game sounds with the Web Audio APINo audio files: an electric motor, wind, tyre squeal, jets and one-shot effects built from oscillators, a buffer of noise, filters and gain envelopes, plus the autoplay rule that makes you wait for a tap.
- HTTP status codes for error pagesThe handful of status codes a site actually shows, the 401 vs 403 difference, Basic auth, and making error pages part of the design.
- Picking a language and translating a siteString tables instead of hard-coded text, how to choose a visitor’s language, placeholders, and caching machine translation.
- Standards are letters to strangersISO 8601, UTF-8, semantic HTML: following a standard is being polite to people you’ve never met. Plus a small quiz.