websocket cursor data broadcast

This commit is contained in:
2025-11-29 22:35:20 +08:00
parent 723c31afa3
commit 03934c4a03
18 changed files with 594 additions and 74 deletions

View File

@@ -1,5 +1,23 @@
<script>
import { browser } from '$app/environment';
import { onMount, onDestroy } from 'svelte';
import { initCursorTracking, stopCursorTracking } from '../events/cursor';
let { children } = $props();
if (browser) {
onMount(async () => {
try {
await initCursorTracking();
} catch (err) {
console.error("[Scene] Failed to initialize cursor tracking:", err);
}
});
onDestroy(() => {
stopCursorTracking();
});
}
</script>
<div class="size-full bg-transparent">