coter Posted September 21, 2015 Share Posted September 21, 2015 Why does the method arcTo not work? http://codepen.io/anon/pen/VvjWZz?editors=101 P.S. v 3.0.7P.P.S. arc also does not work..P.P.P.S. bezierCurveTo works, but for some reason it closes (end connects to the beginning)... Quote Link to comment Share on other sites More sharing options...
coolblue Posted September 21, 2015 Share Posted September 21, 2015 addgraphics.moveTo(0,0)at line 25 Quote Link to comment Share on other sites More sharing options...
coter Posted September 21, 2015 Author Share Posted September 21, 2015 addgraphics.moveTo(0,0)at line 25But I don't need to coordinates 0,0I need 100, 100. But it doesn't work... And how to make so that the ends are not closed? Quote Link to comment Share on other sites More sharing options...
coolblue Posted September 21, 2015 Share Posted September 21, 2015 Yes, sorry, I should have said 100,100 but I see what you mean, the codepen doesn't work... Quote Link to comment Share on other sites More sharing options...
coter Posted September 21, 2015 Author Share Posted September 21, 2015 In pixi,js there is access to native canvas? Quote Link to comment Share on other sites More sharing options...
coolblue Posted September 23, 2015 Share Posted September 23, 2015 OK, The documentation for arcTo is completely wrong: the way this method works is actually the same as 2d canvas context arcTo as described here. The x1,y1 point is not the starting point of the arc, it is the second point of the first tangent. The first tangent is from x0,y0 to x1,y1 which, in your case is 100,100 to 100,100. Based on this, your example is not a feasible shape because your initial tangent is a zero length line. It's not clear what you are trying to draw. coter 1 Quote Link to comment Share on other sites More sharing options...
xerver Posted September 27, 2015 Share Posted September 27, 2015 OK,The documentation for arcTo is completely wrong: the way this method works is actually the same as 2d canvas context arcTo as described here. The x1,y1 point is not the starting point of the arc, it is the second point of the first tangent. The first tangent is from x0,y0 to x1,y1 which, in your case is 100,100 to 100,100.Based on this, your example is not a feasible shape because your initial tangent is a zero length line.It's not clear what you are trying to draw. Hey coolblue, would you mind putting in a PR to fix those docs? Thanks! Quote Link to comment Share on other sites More sharing options...
coolblue Posted September 27, 2015 Share Posted September 27, 2015 Yep, ok, will do. Quote Link to comment Share on other sites More sharing options...
Had Posted June 12, 2019 Share Posted June 12, 2019 Quote The x1,y1 point is not the starting point of the arc, it is the second point of the first tangent. I believe this has not been fixed yet in the docs, in case anyone else stumbles over this. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.