|
|
@ -12,76 +12,8 @@
|
|
|
|
const dispatch = createEventDispatcher();
|
|
|
|
const dispatch = createEventDispatcher();
|
|
|
|
|
|
|
|
|
|
|
|
$: mobile = width && width < 600
|
|
|
|
$: mobile = width && width < 600
|
|
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="easing-sidebar">
|
|
|
|
|
|
|
|
<div class="easing-types">
|
|
|
|
|
|
|
|
<h3>Ease</h3>
|
|
|
|
|
|
|
|
{#if mobile}
|
|
|
|
|
|
|
|
<select bind:value={current_ease}>
|
|
|
|
|
|
|
|
{#each [...eases] as [name]}
|
|
|
|
|
|
|
|
<option
|
|
|
|
|
|
|
|
value={name}
|
|
|
|
|
|
|
|
class:selected={name === current_ease}
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
{name}
|
|
|
|
|
|
|
|
</option>
|
|
|
|
|
|
|
|
{/each}
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
{:else}
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
|
|
|
|
{#each [...eases] as [name]}
|
|
|
|
|
|
|
|
<li
|
|
|
|
|
|
|
|
class:selected={name === current_ease}
|
|
|
|
|
|
|
|
on:click={() => current_ease = name}
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
{name}
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
{/each}
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
{/if}
|
|
|
|
|
|
|
|
<h3>Type</h3>
|
|
|
|
|
|
|
|
{#if mobile }
|
|
|
|
|
|
|
|
<select bind:value={current_type}>
|
|
|
|
|
|
|
|
{#each types as [name, type]}
|
|
|
|
|
|
|
|
<option
|
|
|
|
|
|
|
|
value={type}
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
{name}
|
|
|
|
|
|
|
|
</option>
|
|
|
|
|
|
|
|
{/each}
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
{:else}
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
|
|
|
|
{#each types as [name, type]}
|
|
|
|
|
|
|
|
<li
|
|
|
|
|
|
|
|
class:selected={type === current_type}
|
|
|
|
|
|
|
|
on:click={() => current_type = type}
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
{name}
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
{/each}
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
{/if}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<h4>
|
|
|
|
|
|
|
|
Duration
|
|
|
|
|
|
|
|
</h4>
|
|
|
|
|
|
|
|
<div class="duration">
|
|
|
|
|
|
|
|
<span>
|
|
|
|
|
|
|
|
<input type="number" bind:value={duration} min="0" step="100"/>
|
|
|
|
|
|
|
|
<button class="number" on:click={() => duration -= 100}>-</button>
|
|
|
|
|
|
|
|
<button class="number" on:click={() => duration += 100}>+</button>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<button class="play" on:click={() => dispatch('play')}>
|
|
|
|
|
|
|
|
{playing ? 'Restart' : 'Play'}
|
|
|
|
|
|
|
|
</button>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
<style>
|
|
|
|
.easing-sidebar {
|
|
|
|
.easing-sidebar {
|
|
|
|
width: 11em;
|
|
|
|
width: 11em;
|
|
|
@ -187,3 +119,70 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</style>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="easing-sidebar">
|
|
|
|
|
|
|
|
<div class="easing-types">
|
|
|
|
|
|
|
|
<h3>Ease</h3>
|
|
|
|
|
|
|
|
{#if mobile}
|
|
|
|
|
|
|
|
<select bind:value={current_ease}>
|
|
|
|
|
|
|
|
{#each [...eases] as [name]}
|
|
|
|
|
|
|
|
<option
|
|
|
|
|
|
|
|
value={name}
|
|
|
|
|
|
|
|
class:selected={name === current_ease}
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
{name}
|
|
|
|
|
|
|
|
</option>
|
|
|
|
|
|
|
|
{/each}
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
{:else}
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
|
|
|
|
{#each [...eases] as [name]}
|
|
|
|
|
|
|
|
<li
|
|
|
|
|
|
|
|
class:selected={name === current_ease}
|
|
|
|
|
|
|
|
on:click={() => current_ease = name}
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
{name}
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
{/each}
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
{/if}
|
|
|
|
|
|
|
|
<h3>Type</h3>
|
|
|
|
|
|
|
|
{#if mobile }
|
|
|
|
|
|
|
|
<select bind:value={current_type}>
|
|
|
|
|
|
|
|
{#each types as [name, type]}
|
|
|
|
|
|
|
|
<option
|
|
|
|
|
|
|
|
value={type}
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
{name}
|
|
|
|
|
|
|
|
</option>
|
|
|
|
|
|
|
|
{/each}
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
{:else}
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
|
|
|
|
{#each types as [name, type]}
|
|
|
|
|
|
|
|
<li
|
|
|
|
|
|
|
|
class:selected={type === current_type}
|
|
|
|
|
|
|
|
on:click={() => current_type = type}
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
{name}
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
{/each}
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
{/if}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<h4>
|
|
|
|
|
|
|
|
Duration
|
|
|
|
|
|
|
|
</h4>
|
|
|
|
|
|
|
|
<div class="duration">
|
|
|
|
|
|
|
|
<span>
|
|
|
|
|
|
|
|
<input type="number" bind:value={duration} min="0" step="100"/>
|
|
|
|
|
|
|
|
<button class="number" on:click={() => duration -= 100}>-</button>
|
|
|
|
|
|
|
|
<button class="number" on:click={() => duration += 100}>+</button>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<button class="play" on:click={() => dispatch('play')}>
|
|
|
|
|
|
|
|
{playing ? 'Restart' : 'Play'}
|
|
|
|
|
|
|
|
</button>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|