🏍️ Adds motionservice with data sync
This commit is contained in:
@@ -1,14 +1,16 @@
|
||||
<script lang="ts">
|
||||
import Controls from './Controls.svelte';
|
||||
import { socket } from '$lib/stores';
|
||||
import Spinner from '$lib/components/Spinner.svelte';
|
||||
</script>
|
||||
<div>
|
||||
{#if $socket}
|
||||
<Controls />
|
||||
<slot/>
|
||||
{:else}
|
||||
<div class="flex justify-center items-center">
|
||||
{#if !$socket}
|
||||
<div class="flex flex-col h-full justify-center items-center">
|
||||
<Spinner/>
|
||||
<h2>Waiting for connection</h2>
|
||||
</div>
|
||||
{:else}
|
||||
<Controls />
|
||||
<slot/>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
let right: nipplejs.JoystickManager;
|
||||
|
||||
let throttle_timing = 40;
|
||||
let data = new Int8Array(7);
|
||||
let data = new Array(7);
|
||||
|
||||
onMount(() => {
|
||||
left = nipplejs.create({
|
||||
|
||||
Reference in New Issue
Block a user