Replace hand-rolled spatial canvas drag with Konva
The custom pointer-capture + frozen-camera drag math was fragile and felt worse than before. Konva handles the drag gesture itself; the "me" node's screen position stays pinned to the stage center via dragBoundFunc + a worldLayer offset that recenters on every dragmove, so the world pans under the avatar instead of the avatar drifting off center. Grid, peers, and the audible-range circle all live in the same world-space layer so they pan together. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5ecf415f64
commit
099d637815
4 files changed
+152
-109
No files matched your search
+1
-1
@@ -72,7 +72,7 @@
|
||||
<span>SPATIAL AUDIO</span>
|
||||
<span class="hint">drag <b>your</b> avatar — others hear you shift; you hear them relative to position</span>
|
||||
</div>
|
||||
<canvas id="spatial"></canvas>
|
||||
<div id="spatial"></div>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user