<script>
import { tweened } from 'svelte/motion'
import { quadInOut as easing } from 'svelte/easing'
let value = tweened(0);
function handleInput(e) {
value.set(parseInt(e.target.value, 0), {duration: 0})
}
function handleRelease() {
if($value === 0) return;
value
.set(0, { duration: 1000, easing });
}
$: offset = $value * 3;
$: angle = $value * 14.2;
$: charge = offset / 8;
</script>
<style>
:global(body) {
background: #f2f2f2;
color: #1c1c1a;
padding: 0;
}
div {
width: 100%;
max-width: 600px;
margin: 1rem auto;
}
input {
width: 100%;
}