Jump to content

Use png as a child of mask container in pixi.js


Recommended Posts

Hello. I have a scene where I scratch some of background. For this purpose I use masks to display scratched things. The problem is that when I initialize the scene I need some shape to be already scratched and then dynamically scratch other background. As a mask I use container where I add scratched areas so they work fine, but when I add my png shape to this container it displays as a rectangle, not as a shape I need.

enter image description here

When I use this png sprite as a mask, not as a child of mask container it displays fine. But in this case I cant scratch other areas of background.

enter image description here

Am I missing something or is there another solution I should try?


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