# Not working arcTo method

## Recommended Posts

Why does the method arcTo not work? http://codepen.io/anon/pen/VvjWZz?editors=101

P.S. v 3.0.7

P.P.S. arc also does not work..

P.P.P.S. bezierCurveTo works, but for some reason it closes (end connects to the beginning)...

##### Share on other sites

`graphics.moveTo(0,0)`

at line 25

##### Share on other sites

`graphics.moveTo(0,0)`

at line 25

But I don't need to coordinates 0,0
I need 100, 100. But it doesn't work...

And how to make so that the ends are not closed?

##### Share on other sites

Yes, sorry, I should have said 100,100 but I see what you mean, the codepen doesn't work...

##### Share on other sites
In pixi,js there is access to native canvas?

##### Share on other sites

OK,

1. 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.
2. Based on this, your example is not a feasible shape because your initial tangent is a zero length line.
3. It's not clear what you are trying to draw.

##### Share on other sites

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!

##### Share on other sites

Yep, ok, will do.

##### Share on other sites
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.

## 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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.