Skip to content

Instantly share code, notes, and snippets.

@russelllim22
Last active September 7, 2021 06:41
Show Gist options
  • Save russelllim22/203f12909ee184dc26ac76ee1bc8563f to your computer and use it in GitHub Desktop.
Save russelllim22/203f12909ee184dc26ac76ee1bc8563f to your computer and use it in GitHub Desktop.
<script>
import { tweened } from 'svelte/motion';
import { cubicOut } from 'svelte/easing';
export let currentAngle, showAngle, showLength;
const lengthTween = tweened(0, {
duration: 400,
easing: cubicOut
});
$: {
if(["sin","cos","tan"].includes(showLength)){
lengthTween.set( 1 );
}
else{
lengthTween.set( 0 );
}
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment