Hachi Posted June 15, 2016 Share Posted June 15, 2016 I am trying to set a mask up, with generateTexture. The only problem I'm having is the placement of the sprite / container. From what I understand generateTexture should take sprite or container position into account, right? If not, then I'm wondering what are the alternatives? If it should, then I'm wondering what I'm doing wrong? There is a plunkr of it here (https://plnkr.co/edit/HU9YwhqBiRfG5J1mILxG?p=preview). The only relevant parts are lines 88 - 108, everything before that is setting up the game (preloading etc.). It works correctly, but it might be difficult to notice the mask, but you can notice it when you drag the map around. This is because the mask is not where I would intend it to be, since it seems to ignore the position (sprite and container position). Quote Link to comment Share on other sites More sharing options...
Hachi Posted June 25, 2016 Author Share Posted June 25, 2016 I guess using separate canvas should fix the issue, like instructed here: (and in this plunkr I tested it with) https://plnkr.co/edit/FF6HUUN88kmEHu8HDRRa?p=preview Though I haven't yet checked do I get any issues in my particular case, but it should be fine with that. 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.