Jump to content

Change Position for SpriteMaskFilter


ashenemy
 Share

Recommended Posts

Hello
I have 2 sprite
One size 1000 by 500
Second 100 per 100
It is necessary to specify the second sprite as a mask for the first
I'm using the SpriteMaskFilter class
All works except one, I can not understand how to specify the position of the mask, it is necessary that it would be possible to move it
Thank you in advance

Link to comment
Share on other sites

16 hours ago, ivan.popelyshev said:

According to https://github.com/pixijs/pixi.js/blob/dev/src/core/renderers/webgl/filters/spriteMask/SpriteMaskFilter.js , when you create that filter, you can specify a mask sprite. If you want to use another sprite, just change "sprite" field and make sure that one sprite is not renderable.

Tnx))

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.

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

Loading...
 Share

  • Recently Browsing   0 members

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