# joaoramires.xyz

This site: my room in Belo Horizonte as a 3D diorama on local time, drawn three ways (pixel art, inked comic, photoreal), with a manual for reading it.

- **Where**: After hours
- **Status**: Shipped
- **Year**: 2026

The site you’re reading. It has two modes: the room, which you walk around, and the manual, which you read. Both have the same content; the manual is plain HTML and works without JavaScript.[^1]

The room is built from code when the page loads:

- **The models** are boxes, cylinders, cut spheres, tubes and extruded shapes, assembled in TypeScript. The [payphone](https://en.wikipedia.org/wiki/Orelh%C3%A3o) is a cut sphere; the [cobogó](https://en.wikipedia.org/wiki/Cobog%C3%B3) wall is a square with holes, instanced eighty-four times. Each object says what it’s made of (oak, plaster, brushed steel, woven cotton) and leaves the look to the art style.
- **The art styles** are three ways to draw the same models, and you can switch between them at any time:

  - *Pixel art* renders the scene small and blows it up, with outlines from depth and normal edges and ordered-dither posterization. Its textures are painted at about fifty texels per meter.
  - *Inked comic* renders at full resolution with toon shading in three flat bands, hatching in the darkest patches, and a pass that inks a line wherever depth, surface or object changes.
  - *Photoreal* uses physically based materials generated from noise, soft shadows from the real sun, skylight through the window, ambient occlusion, a little bloom and filmic tone mapping. It also gets the finer models: every key on the keyboard, the payphone’s coiled cord. If your device can’t keep up, it quietly steps its quality down.
- **The switch** builds the new style’s room out of sight, then redraws the page: the new style spreads from where you picked it like ink soaking into paper, with the room, the buttons and the panels changing in one stroke. The camera, the hour, the terminal and the cartridge in the console all stay where they were.
- **The light** follows the real sun and moon over [Belo Horizonte](https://en.wikipedia.org/wiki/Belo_Horizonte), the weather comes from Open-Meteo, and every sound is synthesized in Web Audio.
- **The computer** runs a small Ruby interpreter whose objects are the room.

The writing has its own tool. A small command line, `bin/site`, starts an article and its Portuguese translation, checks both before they go live (privacy rules, broken links, a translation that drifted from the English), and deploys only what is merged on master.

If your system asks for reduced motion, the site opens in the manual.

## Built with

- Astro
- TypeScript
- three.js
- Web Audio

## Log

1. 2026-11: bin/site: a command line that checks, translates and ships each article
2. 2026-11: Live on Cloudflare, every article in English and Brazilian Portuguese
3. 2026-11: One room, three art styles: switch between pixel art, inked and photoreal, and watch it redraw
4. 2026-11: Rendered the room photoreal: real materials, soft shadows, sunlight through the cobogó
5. 2026-11: Redrew the room and my portrait as an inked comic, in full resolution
6. 2026-11: irb on the desk computer, wired to the room
7. 2026-11: The room: procedural models, pixel renderer, live sun, moon and weather
8. 2026-11: Cut my pixel portrait out at its native 90 × 90 pixels

[^1]: The room only loads three.js when you’re actually in it, so the manual stays light.
