Skip to main content

Module presence

Module presence 

Source
Expand description

Presence relay client — the live transport for shared worlds.

Built against presence-wire-v0.1: connects to a WebSocket relay (wss://<relay>/thread/:worldId), sends the local player’s pose, and forwards other travelers’ poses into PresenceState. Runs its socket on a background thread and talks to the render loop over channels, so the frame never blocks and a missing/unreachable relay simply degrades to solo (the world keeps running). Ready to connect the instant the relay deploys; until then it logs and stays solo.

Structs§

PresenceClient
Handle to the presence relay connection.
TravelerHello
A traveler’s announced identity (from welcome.occupants[] or a join), handed back by PresenceClient::drain so the browser can fetch their descriptor and render “them” instead of a placeholder.