Jump to content

Drawing with Pixi.js


Recommended Posts

I want to create a web app that will allow you to draw pictures. I have tried using PIXI's graphics library and it sort of works, but there are some issues. I was attempting to use LineTo which basically draws a line between two points. The issue I have come across is if I increase the line thickness, any rotation causes gaps and weird edges.


I have also tried creating circles instead of lines. For slow movements this looks great, but with quick mouse swipes, there are gaps between the circles.


Does anyone know of a better way to code this using PIXI? Maybe PIXI is not the best library for this sort of thing?


Let me know if you need more details. I have attached a screenshot showing the problem I am experiencing.





Link to comment
Share on other sites

Hi All,


I have fixed the issue I was having with the lines. Now they are all connected and look a lot better. The issue I am having now is that the lines look relatively jagged. I have tried enabling AA where I created the renderer, but I can not see any difference.


Is there another way to enable anti-aliasing or a better way to smooth out the lines and circles?


I heard there is a way to render the graphics larger and then scale them down, but I am not quite sure about that.


If anyone can help with this, I would greatly appreciate it.



Link to comment
Share on other sites

I have fixed the issue I was having with the lines. Now they are all connected and look a lot better. 

Hello.. how did you end up connecting the points?

Would you need to compare the position of two points, get the angle between the first and second, and then draw a curved lined between them?

Link to comment
Share on other sites

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.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...