Closed liho98 closed 1 year ago
If the value is non-finite I guess eased * length
gives you either NaN
or Infinity
. You could log that value to check. Where did you find the example?
Yes, i have logged the variable eased
its undefined, and the example is found from the svg js 3.0 official website https://svgjs.com/docs/3.0/tutorials/
Jeah ok, the tutorials are not up to date. I didnt even know that they exist :D
So, in this example; how does one utilize easing in the during(pos) function? Since the easing variable doesn't seem to exist anymore?
Are you supposed to use: eased_pos = SVG.easing['<>'](pos); ?
Yes, the easing functions are accessible to anyone and the eased variable was just exactly that.
Why not update documentation(and examples) to reflect this change in functionality? Makes this superb library more accessible, and must demand very little effort!
Anyway, thx for your reply
well - I just spend 20 days of free time straight to write tests. Feel free to update the examples and create a PR with a new link.
I hear you, thank you for your efforts - a PR is coming.
Up until now @enlitendelfin you haven't made a PR? Or it hasn't been merged? Unfortunately, I am yet having this same error. Sincerely, I don't know my way around it or how much might have changed. All of this with no single documentation have been made.
It makes it terrible to even try to update the doc that is over 4 years old.
If you face this same problem here is a working version https://codesandbox.io/s/old-currying-ps5k7k?file=/src/index.js
I will start updating the docs in coming weeks. This library is cool, but the documentation is limiting.
Failed to execute 'getPointAtLength' on 'SVGGeometryElement': The provided float value is non-finite.
Explanation
I was trying the example and tutorial from the svg js website animating along the path but it throw exception. I am expecting it work with 3.0 svg js, since i failed to get the point from the path, im unable to move my object along the predefined path.
After replaced
eased
withpos
and it works, i think the tutorial or example have been outdated and should be updated.