forked from Rockachopa/the-matrix
- js/config.js: connection config with URL param + env var override - WS URL, auth token, mock mode toggle - Computed isLive and wsUrlWithAuth getters - Resolves #7 (config.js) - Resolves #11 (Phase 1 shared-secret auth via query param) - js/websocket.js: refactored to use Config for live/mock switching - Live mode: real WS with reconnection + exponential backoff - Auth token appended as ?token= on WS connect - agent_joined handler dispatches to addAgent() for hot-add - sendMessage() public API for UI → backend communication - js/agents.js: dynamic agent hot-add and removal - addAgent(def): spawns 3D avatar at runtime without reload - autoPlace(): finds unoccupied circular slot (radius 8+) - removeAgent(id): clean dispose + connection line rebuild - Connection distance threshold 8→14 for larger agent rings - Resolves #12 (dynamic agent hot-add)
2.0 KiB
2.0 KiB