Skip to main content

Module home

Module home 

Source
Expand description

The home-space — the browser’s about:home, except it’s a world you own.

A browser shouldn’t greet you with a launcher dialog; it should open somewhere. On the Thread that somewhere is yours: a small local world, materialized on first launch, that grows with you. Starred worlds (crate::bookmarks) appear around it as veils — your personal constellation, walkable instead of listed — and build mode adds blocks that persist. It is a plain world.json in the standard manifest format: view-source culture applies to your own home too, and because it is a real world, one day you can host it and receive visitors.

The home has a well-known Locator, HOME_LOCATOR (thread://home) — the Thread’s localhost. The resolver maps it straight to the local file, never the network, which makes home first-class everywhere a Locator goes: the address bar, back/forward history, the H key, even a portal’s to.

Structs§

PaletteEntry
One block kind build mode can place. scale is the placed size (builtin primitives are unit-sized) and rest_y the height its center sits at so it rests on the floor.

Constants§

FRONT_DOOR
The Thread’s public front door — the home’s one permanent veil, so a fresh home is never a dead end.
HOME_LOCATOR
The home-space’s well-known Locator — resolved to the local home file, never the network (the Thread’s localhost).
PALETTE
The build-mode palette. Prefab ids live in the home’s own 60.10.* range so they never collide with a world’s authored prefabs.

Functions§

add_placement
Place one block from the palette (build mode). Ensures the palette prefab exists in the manifest (homes seeded before a palette addition still work), then appends a uniquely-named built: placement. Returns success.
default_dir
Where the home world lives: ~/.config/infinite/home/ (beside bookmarks.json, via the same XDG_CONFIG_HOME convention).
ensure
Create the starter home if it doesn’t exist yet; returns the manifest path. Never overwrites — the home is the user’s, we only seed it once.
is_home
Whether a Locator addresses the traveler’s own home-space (thread://home, with or without a #place / @when suffix). The resolver uses this to keep home off the network; the browser uses it to gate build mode.
remove_placement_near
Remove the built block nearest position (within radius). Only touches built: placements — the floor, the hearth, and anything hand-authored are not removable by accident. Returns whether a block was removed.
served_manifest
The home manifest as served to GUESTS (presence injected): an owner-tied P2P room at room_url. The disk copy is untouched — the owner’s own walk through their home never sees this block; only the invite host serves it.
sync_recents
Regenerate the home’s recent-walks veils (recent: portals) from the traveler’s Recents — the eastern arc, freshest nearest the front door. Mirrors sync_veils’s contract: only recent: portals are touched, and places already reachable through another home veil (a starred world, the front door) are skipped rather than doubled.
sync_veils
Regenerate the home’s bookmark veils (fav: portals) from the current bookmark list. Star a world → a veil appears at home; unstar → it fades.
upgrade
Bring an existing home up to the current estate — additive and marked: only estate: pieces are ever added, nothing the user placed is touched, and a home that already has its estate is left alone. Also warms the hearth (a light on the seeded hearthstone) and refreshes the seeded sky and description — but only when they still carry their original values.
world_path
The home world’s manifest file within its directory.