From 5d6d6b4ddc5bc66c05ec433cd6daadb2692286f0 Mon Sep 17 00:00:00 2001 From: Thomas Hallock Date: Wed, 19 Nov 2025 09:14:36 -0600 Subject: [PATCH] fix: add custom cursor when pointer lock is active MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When pointer lock is active, the browser hides the native cursor. Add a custom crosshair cursor that follows the tracked position: - 20px circle with crosshair lines - Blue color (matches theme) - Positioned at tracked cursor coordinates - Only visible when pointerLocked is true This ensures users can always see where they're pointing. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .../components/MapRenderer.tsx | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/apps/web/src/arcade-games/know-your-world/components/MapRenderer.tsx b/apps/web/src/arcade-games/know-your-world/components/MapRenderer.tsx index f1704262..7807b0a7 100644 --- a/apps/web/src/arcade-games/know-your-world/components/MapRenderer.tsx +++ b/apps/web/src/arcade-games/know-your-world/components/MapRenderer.tsx @@ -1221,6 +1221,51 @@ export function MapRenderer({ ))} + {/* Custom Cursor - Visible when pointer lock is active */} + {pointerLocked && cursorPosition && ( +
+ {/* Crosshair */} +
+
+
+ )} + {/* Magnifier Window - Always rendered when cursor exists, opacity controlled by spring */} {cursorPosition && svgRef.current && containerRef.current && (