Closed TheDhejavu closed 4 years ago
What is the old version and the latest version you are referring, too?
In 3.x this code doesnt work anymore. Especially the line path.pointAt(eased * length)
beccause the parameters have changed. You only get the position passed to the during function and nothing else.
As a general tip: debugging would have showed you this. You can be new to svg.js but as long as you are good with js in general you can easily dig depper to find your mistake :)
@Fuzzyma thanks for the response, I actually did dive deeper to debug the error but the documentation for .during(function(pos, morph, eased, situation)
indicates that 4 params are meant to be parsed into the callback function of during
but only the first param seems to be valid while the rest of the parameter returns undefined. The old version I'm referring to is 2.x, it works well using that but I don't want to settle for an old version because I believe the new version might offer some new and improved features.
In that case the documentation is wrong. As a matter of fact only the position is passed.
Would you mind raising an issue about that in the docs repo?
Alright. I will do that now
Here is a working solution if you find this error https://codesandbox.io/s/old-currying-ps5k7k?file=/src/index.js
Failed to execute 'getPointAtLength' on 'SVGGeometryElement': The provided float value is non-finite
I notice that eased returns undefined in the latest version of svgjs, old version doesn't behave like this,
NOTE: I'm new to svgjs