Skip to content

Instantly share code, notes, and snippets.

@russelllim22
Last active September 7, 2021 08:53
Show Gist options
  • Save russelllim22/ba70cb4f86d8abcd9f04fe9d3d70cd3e to your computer and use it in GitHub Desktop.
Save russelllim22/ba70cb4f86d8abcd9f04fe9d3d70cd3e to your computer and use it in GitHub Desktop.
<line id="cosArrow"
x1="110"
y1="115"
x2="{$lengthTween * Math.cos(currentAngle * Math.PI / 180) * 100 + 110}"
y2="115" stroke="goldenrod"
style="opacity: {(showLength === "cos") ? 1 : 0}"
stroke-width="3"
marker-end="{[-270,-90,90,270,450].includes(parseInt(currentAngle)) ? "url(#gold-point)" : "url(#gold-arrow)"}"
/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment