[claude] 3D audio positioning — sounds come from their source (#239) #352

Merged
Timmy merged 1 commits from claude/issue-239 into main 2026-03-24 05:25:10 +00:00

1 Commits

Author SHA1 Message Date
Alexander Whitestone
0715d93d08 feat: 3D audio positioning — sounds come from the direction of their source
Some checks failed
CI / validate (pull_request) Failing after 15s
CI / auto-merge (pull_request) Has been skipped
- Add updateAudioListener() called each frame to sync the Web Audio API
  listener position/orientation with the Three.js camera
- Add createPanner() helper for HRTF-positioned sound sources
- Sparkle plucks now spawn at random 3D positions floating above the
  platform so they drift in from all directions
- Add startPortalHums(): each portal emits a quiet positional hum at its
  world coordinate (x, y, z) so portals can be heard panning as the
  listener orbits; hums start when both audio and portal data are ready
- stopAmbient() disconnects and clears all positionedPanners and resets
  portalHumsStarted so restart is clean

Fixes #239

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 01:14:32 -04:00