maitrungduc1410 Posted November 22, 2018 Share Posted November 22, 2018 Hi everyone, I'm new with PIXI, I'm wondering how to use PIXI to draw a line like this (in the picture). For example, the start point is (100, 100), end point is (700, 700). I see this in a site and I know they use quadraticCurve, but I can't decode that part they draw the line. (I think this can also be done with bezierCurveTo) Does anyone know this can help me? Thank you for your answer Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted November 22, 2018 Share Posted November 22, 2018 Graphics functions are almost the same as in Canvas2d https://developer.mozilla.org/ru/docs/Web/API/CanvasRenderingContext2D/quadraticCurveTo https://developer.mozilla.org/ru/docs/Web/API/CanvasRenderingContext2D/quadraticCurveTo maitrungduc1410 1 Quote Link to comment Share on other sites More sharing options...
tywang2006 Posted November 22, 2018 Share Posted November 22, 2018 check strip example and use PIXI.mesh.Rope, get all sample points from your control points(Beizer curve), do Rope on line texture, dont try to d ivan.popelyshev and maitrungduc1410 2 Quote Link to comment Share on other sites More sharing options...
OSUblake Posted November 27, 2018 Share Posted November 27, 2018 Like this. I might have the anchor points backwards. https://codepen.io/osublake/pen/MzqQbz jonforum 1 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.