added mapped cursor position

This commit is contained in:
2025-11-25 15:00:18 +08:00
parent 4f90bd754a
commit b22fdac39c
7 changed files with 75 additions and 28 deletions

View File

@@ -2,7 +2,7 @@
import { cursorPositionOnScreen } from "../../channels/cursor";
</script>
<div class="w-svw h-svh p-4">
<div class="w-svw h-svh p-4 relative">
<div
class="size-max mx-auto bg-base-100 border-base-200 border px-4 py-3 rounded-xl"
>
@@ -10,9 +10,14 @@
<p class="text-xl">Friendolls</p>
<p class="text-sm opacity-50">Scene Screen</p>
<div class="mt-4">
<span class="font-mono"
>Cursor: ({$cursorPositionOnScreen.x}, {$cursorPositionOnScreen.y})</span
>
<span class="font-mono">
Cursor: ({$cursorPositionOnScreen.raw.x}, {$cursorPositionOnScreen.raw
.y})
</span>
<span class="font-mono">
Cursor: ({$cursorPositionOnScreen.mapped.x}, {$cursorPositionOnScreen
.mapped.y})
</span>
</div>
</div>
</div>