Open haibert opened 3 years ago
I looks like this is because the path is closed more than once, I'm looking to see if something can be done there.
I added a test case for $PATH1 and it seems to be parsed properly. Could the issue be from the interpolatePath? Paths needs to have the same number of commands to be interpolated.
Ty for looking into the issue William!
I can confirm that the difference between the number of commands is the reason the interpolatePath fails, but this is strange. I have prepared a snack that show you how this limitation doesn't exist when using the interpolator from flubberimport { interpolate } from 'flubber'
. I just don't think this library works with reanimated 👎🏼
If you run the Snack you will see that you can interpolate from one SVG to another that has different number of commands using the original react native Animated API, along with flubbers interpolator. Im tying to achieve the same results.. only with reanimated.
redash is not nearly as sophisticated than flubber to do path interpolations but thanks for pointing me to flubber, I will definitely take inspiration from it to make the interpolation more flexible.
Thank you William! Also you could check out interpolatePath from d3-interpolate-path I think that was is a good one as well.
Hello all,
Im trying to interpolate between two different SVG Paths. Im using the example code from the documentation but when I replace the SVG path string provided in the examples with any other SVG path I get the following error. The parser seems to have some sort of limitation i'm not aware of ? Its just a simple path of a home icon.