Sign in to follow this  
rossi46

mask not run?

Recommended Posts

i create mask in my game but in some pc, it not run? Here my code

that.mask = new Sprite(TextureCache["mask"]);
        that.mask.position.set(that.size[0] / 2 - 8, that.size[1] / 2 - 12);
        that.mask.anchor.set(0.5);
        that.mainContainer.addChild(that.mask);
        that.mainContainer.mask = that.mask;

 

norrmal-with-mask.jpg

not-mask.jpg

Share this post


Link to post
Share on other sites
10 hours ago, ivan.popelyshev said:

1. Do you use "window.devicePixelRatio"? 

2. Sprite mask works only in WebGL mode.

No. I use the lastest chrome on pc window 10. firefox is normal

Share this post


Link to post
Share on other sites

that is weird, I did slot as well, it works perfectly for me. I suggest to remove that.mainContainer.mask then check if your mask covered the area of your reels.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.