websocket cursor data broadcast
This commit is contained in:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user