Jump to content

Graphics arc internals


Recommended Posts

That's because its intended to work both for canvas and webgl.

If you want perfect curves - create a canvas element, use context api and then wrap it into "new BaseTexture(myCanvas)", or "BaseTexture.fromCanvas(myCanvas)" or "Texture.fromCanvas(myCanvas)", dont forget to update base texture every time you change something on canvas.

Link to comment
Share on other sites

4 hours ago, shabeerahmedshah said:

Could anyone help me in making the graphics event-transparent so that I can get the click event on the sprite which is underneath the graphics?

Its easy. Just override Graphics.containsPoint : https://github.com/pixijs/pixi.js/blob/master/src/core/graphics/Graphics.js#L921 , make it so it stores number of shape which actually contains that point in some variable, like "this._interactedShape"

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