i have curved paths that animate using the animate
element. it does animate the path in combination with @keyframes
, but when i add markers inside the curved path, the markers do not animate. i tested one using a simple path by changing the path values attribute. it worked perfectly using a simple path but how do i get the marker elements animate with the curved path?
codepen demo: https://codepen.io/tfss/pen/yZoBLo using simple and curved paths
Since what you have is a Bézier curve, you can calculate the points to draw the curve from the origin to the new position. To understand what comes next you need to understand what is a Bézier curve.
In the next example I'm using an input type range to change the curve. You may animate it instead. Please read the comments in the code.
You may find this post about Bézier curves useful: How to add a point to a Cubic Bézier Curve In SVG
For a different approach you may like to read this answer: Stroke animation, how to attach another path to the appearing stroke?
I hope this helps.