loading text

This commit is contained in:
cupcakearmy 2021-02-09 13:51:39 +01:00
parent 3c54aa7874
commit f34f2c441d
No known key found for this signature in database
GPG Key ID: D28129AE5654D9D9

View File

@ -7,8 +7,8 @@
const springed = spring( const springed = spring(
{ scroll: 0 }, { scroll: 0 },
{ {
stiffness: 0.02, stiffness: 0.05,
damping: 0.75, damping: 0.7,
} }
) )
@ -31,18 +31,33 @@
$: updateState($springed.scroll) $: updateState($springed.scroll)
</script> </script>
<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg" version="1.1"> <div>
<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg" version="1.1">
<path bind:this={el} fill="var(--clr-secondary)" d="" /> <path bind:this={el} fill="var(--clr-secondary)" d="" />
</svg> </svg>
<span>{$scroll.toFixed(2)}</span>
</div>
<style> <style>
svg { div {
position: fixed; position: fixed;
bottom: 1em; bottom: 1em;
right: 1em; right: 1em;
pointer-events: none;
text-align: center;
}
span {
display: block;
font-size: 0.5em;
background-color: var(--clr-primary);
height: 1.5em;
}
svg {
border: 0.125em solid var(--clr-primary); border: 0.125em solid var(--clr-primary);
width: 2em; width: 2em;
height: 2em; height: 2em;
pointer-events: none; position: relative;
top: 0.45em;
} }
</style> </style>