react-native-svg-animations icon indicating copy to clipboard operation
react-native-svg-animations copied to clipboard

How to add marker to the end of the path?

Open brandonburns opened this issue 3 years ago • 2 comments

I'm trying to find a way to add in a marker to the end of the animated path. Can this be done? If this is not implemented, do you have a suggestion as to how I could go about this? I am using the animated path to show a user's journey, and wanted to have a blinking circle to indicate their position at the front of the path.

An example of what I'm talking about can be seen here with the dog at the front of the path https://saschwarz.github.io/react-svgpathplayer/

That library has not been updated in 4 years, so I was hoping there was a way to achieve this with this library?

brandonburns avatar Nov 29 '20 20:11 brandonburns

Hi @brandonburns , you might need to add a custom component that animates (changes x and y coords) together with the SVGpath end.

73R3WY avatar Dec 03 '20 17:12 73R3WY

Thank you for your reply, is there a way that I could grab this data from the AnimatedSVGPath? This the x and y coordinates have to be somewhere for the animated line to know where to stop each frame, so is there a way I can access this data each frame?

brandonburns avatar Jan 17 '21 06:01 brandonburns