matsandClaude Sonnet 5 8474a85ed2
Build and Publish / Metadata (push) Successful in 1s
Build and Publish / BuildAndDeployAmd64 (push) Successful in 51s
fix(spatial): decorrelate spawn radius from angle to stop avatar overlap
The previous spawn fix (radius 20 -> 6) traded one problem for another:
hashing only the angle onto a small fixed-radius ring means two names
whose hashes land near the same angle bucket (only 360 of them) now
separate by just a few pixels of arc instead of dozens, since arc
length scales with radius. Confirmed against the actual guest names
from a live session (guest-pxj6/guest-rd7o): old algorithm placed them
~11 room units apart, easily close enough for their ~34px graph nodes
to visually merge into what looked like a single dot.

Now the radius is hashed independently from the angle (8-19 units), so
an angle collision no longer implies a full positional overlap. Same
test names now land ~27.6 units apart. Still well within the range
that keeps audio at full gain (refDistance=4).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 11:58:11 +02:00

gibbz voice — POC

Discord-clone proof of concept: peer-to-peer WebRTC voice chat + screen sharing with position-based spatial audio and pluggable STUN/TURN.

Run (Node 18+, only dep is ws):

npm install
PORT=8081 npm start
# open http://localhost:8081, click a voice channel, allow mic

What works

  • Mesh WebRTC voice (perfect negotiation; lowest peer id initiates)
  • Screen share with audio (mic is spatialized, screen audio plays direct)
  • Spatial audio: drag your avatar on the plane; remote mics run through a PannerNode (HRTF, inverse distance). Positions sync over signaling.
  • Custom STUN/TURN: gear icon → JSON override in localStorage, applied on next join. Server default comes from env (below).
  • Mute (M), deafen (D), per-peer volume, speaking indicators.

ICE configuration (server side)

Env var Meaning
STUN_URLS comma-separated stun: urls (Google defaults)
TURN_URLS comma-separated turn:/turns: urls
TURN_USERNAME / TURN_CREDENTIAL static TURN creds
ICE_SERVERS_JSON full {"iceServers":[...]} override, wins over the above
PORT / HOST listen address (default 8081 / 0.0.0.0)

Example with coturn:

TURN_URLS='turn:turn.example.com:3478?transport=udp,turns:turn.example.com:5349' \
TURN_USERNAME=mats TURN_CREDENTIAL=secret npm start

POC shortcuts (productionize later)

  • No auth, no reconnection, rooms are in-memory, signaling is unencrypted ws behind the preview ingress (use wss/TLS in front for real deploys).
  • No media server: N² mesh — fine for small rooms, needs SFU (mediasoup/livekit) beyond ~6–8 participants.
  • Text channels are decorative. No persistence, no rate limiting.
  • Screen-share negotiation storms on join/leave are expected at small scale.
S
Description
No description provided
Readme
38 MiB
0 Stars 1 Watchers 0 Forks
Languages
JavaScript 75.1%
CSS 16.2%
HTML 7.5%
Makefile 0.9%
Dockerfile 0.3%