Jump to content

generateTexture (v4)


Hachi
 Share

Recommended Posts

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

Link to comment
Share on other sites

  • 2 weeks later...

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