Last active
September 7, 2021 06:41
-
-
Save russelllim22/203f12909ee184dc26ac76ee1bc8563f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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