Closed ekosz closed 8 years ago
You are right, Bezier curves only work for three or more points. They should not give an error - on two points it would make sense to just draw the line between the points - so it was a mistake on my part.
I am correcting this error, but right now I am in the mid of a translation. Many people are leaving coffeescript for ES6 and I do not want to leave paths.js on a dead end, hence I am rewriting it into ES6. I am almost done, so I should have a new release by the end of the week or so. After that, I will fix the issue.
In the meantime, you can check that you are using at least three points, and when you get less, use a line.
I have fixed the issue on the version that is coming in a few days. I could quickly fix it on the coffeescript version as well, but then making a release takes a little time
Should be fixed now in version 0.4.0-beta
@andreaferretti Awesome, should I close this issue?
Sorry for bothering you with this, I figured the multiple points out a couple hours after opening this issue and reading the source code for a bit.
Sure, just check it works for you before closing! ;-)
Hi there I'm using paths-js version 0.3.5 and I'm having issues with Bezier curves. Anytime I try to generate a curve either though a
SmothCurve
graph or directly using theBezier
function, I get an error. Here is a way to reproduce the error.As you can see, even the simple example going from (0,0) to (1,1) errors out. Is there something I'm doing wrong here?