Jump to content



Recommended Posts

Apologies for the continued bitmapData questions...


Is it possible to use alphaMask & copyPixels in the way the way that you could in Flash? What I'm trying to do is draw to an existing bitmapdata (which I've got working fine), but I want the drawn image to be masked so that the transparent parts of the base image remain transparent.


I think this could be possible in Phaser over 2/3 steps (create a blank bitmapdata the size of the base bitmapdata, draw the new image to that, apply the alphaMask to it, then draw that on to the base bitmapdata). 


But I'm not 100% about the above as maybe I'd have to save the images to the Game.Cache in order to do the masking? With AS3s copypixels, you could apply the mask at the time of copying.


Or, is there an easier way?

Link to comment
Share on other sites


  • Recently Browsing   0 members

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