rossi46 Posted June 15, 2017 Share Posted June 15, 2017 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; Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted June 15, 2017 Share Posted June 15, 2017 1. Do you use "window.devicePixelRatio"? 2. Sprite mask works only in WebGL mode. Quote Link to comment Share on other sites More sharing options...
tywang2006 Posted June 15, 2017 Share Posted June 15, 2017 which mask are you using, gradient mask is only working with webgl. Quote Link to comment Share on other sites More sharing options...
rossi46 Posted June 16, 2017 Author Share Posted June 16, 2017 9 hours ago, tywang2006 said: which mask are you using, gradient mask is only working with webgl. I use sprite mask Quote Link to comment Share on other sites More sharing options...
rossi46 Posted June 16, 2017 Author Share Posted June 16, 2017 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 Quote Link to comment Share on other sites More sharing options...
tywang2006 Posted June 16, 2017 Share Posted June 16, 2017 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.