world (ptr.pet/world/) #
low-res three.js bus line + receiver doll world for ptr.pet.
at /world/, it connects to wss://ptr.pet/_api/world/ws for shared bus-line rooms and frequency ghosts (falling back to an identical local bus clock when offline), reads live log/entries/guestbook/now-playing state from GET /_api/world (falling back to read-only ATProto/Constellation XRPC, then the baked snapshot in src/data.js), posts guestbook wishes via POST /_api/world, and sends mailbox notes via GET /_api/pushnotif. when built with --base ./ (bun run build:artifact), it runs standalone with localStorage fallback.
build & regenerate static/world/ #
static/world/ is generated output committed to the repo so endpoint's Nix build (nix/default.nix + nix/modules.nix) serves /world/ straight through sirv and @sveltejs/adapter-node precompression without adding three or a second Vite build to the root bun.lock FOD.
active iteration happens in /tmp/fable_duet; after syncing changes into world/, regenerate static/world/ with:
cd world
bun install --frozen-lockfile
bun run build
bun run build outputs directly to ../static/world with base: '/world/' and emptyOutDir: true. index.html carries <base href="%BASE_URL%"> so both /world and /world/ resolve relative assets (m/, e/, f/, btn/, assets/) against /world/.
renaming /world/ #
if you move /world/ to another path, change these two places together and rebuild world/:
world/vite.config.js:base: '/world/'andbuild.outDir: '../static/world'src/routes/(site)/+layout.svelte:const WORLD_PATH = 'world/';
credits & third-party code #
- built by
fable-denpa(world, shaders/materials, verlet physics, dolls, megastructures, puppet avatar, dither3d) andfable-cook(stops, far-side road, bus, radio, objects,/_api/world& live site wiring). src/dither3d.jsis an MPL-2.0 port of Rune Skovbo Johansen's Surface-Stable Fractal Dithering (https://github.com/runevision/Dither3D); its/*!license header stays in the minified bundle.