mirror of
https://github.com/artiemis/artie.moe.git
synced 2026-02-14 09:01:55 +00:00
mobile player placement
This commit is contained in:
parent
333e226ba4
commit
aa2ad05dfd
@ -77,7 +77,6 @@
|
||||
}
|
||||
|
||||
function handlePressDown() {
|
||||
console.log("handlePressDown");
|
||||
model.motion("Tap");
|
||||
|
||||
holdTimeout = window.setTimeout(() => {
|
||||
@ -88,7 +87,6 @@
|
||||
}
|
||||
|
||||
function handlePressUp() {
|
||||
console.log("handlePressUp");
|
||||
clearTimeout(holdTimeout);
|
||||
holdTimeout = undefined;
|
||||
}
|
||||
@ -168,24 +166,40 @@
|
||||
});
|
||||
</script>
|
||||
|
||||
{#snippet player(mobile = false)}
|
||||
{#snippet label()}
|
||||
{#if volumeLabel}
|
||||
<div transition:fade={{ duration: 100 }} class="text-purple-300">
|
||||
{volumeLabel}
|
||||
</div>
|
||||
{/if}
|
||||
{/snippet}
|
||||
{#if audio}
|
||||
{#if !mobile}
|
||||
{@render label()}
|
||||
{/if}
|
||||
<input
|
||||
bind:value={volume}
|
||||
oninput={showVolumeLabel}
|
||||
transition:fade={{ duration: 100 }}
|
||||
type="range"
|
||||
class="lg:w-48 lg:h-2 w-32 h-2 rounded-xl appearance-none bg-purple-300 accent-purple-400 cursor-pointer"
|
||||
/>
|
||||
{#if mobile}
|
||||
{@render label()}
|
||||
{/if}
|
||||
{/if}
|
||||
{/snippet}
|
||||
|
||||
<svelte:window onkeydown={handleKeyDown} />
|
||||
|
||||
<div class="lg:hidden fixed top-4 right-6 z-10">
|
||||
{@render player(true)}
|
||||
</div>
|
||||
|
||||
<div class="grid fixed left-0 bottom-0 z-10 {gap}">
|
||||
<div class="mx-auto">
|
||||
{#if audio}
|
||||
{#if volumeLabel}
|
||||
<div transition:fade={{ duration: 100 }} class="text-purple-300">
|
||||
{volumeLabel}
|
||||
</div>
|
||||
{/if}
|
||||
<input
|
||||
bind:value={volume}
|
||||
oninput={showVolumeLabel}
|
||||
transition:fade={{ duration: 100 }}
|
||||
type="range"
|
||||
class="lg:w-48 lg:h-2 w-32 h-2 rounded-xl appearance-none bg-purple-300 accent-purple-400 cursor-pointer"
|
||||
/>
|
||||
{/if}
|
||||
<div class="mx-auto hidden lg:block">
|
||||
{@render player()}
|
||||
</div>
|
||||
<canvas
|
||||
bind:this={canvas}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user