Jump to content

Donut-shaped / inverse mask in Phaser


akg
 Share

Recommended Posts

I am trying to get a donut-shaped mask in Phaser (essentially the inverse of a regular mask). The mask shape is dynamic so it needs to be a Phaser.Graphics polygon object.


Desired result:


The blue shape is the sprite I want to mask, the hole in it is the mask itself.


ur1Ac.png


I've searched the Phaser and Pixi v2 documentation and forums - found nothing though. Anybody who knows how I can do this?


If it is not possible, I am thinking of dividing the mask up into eight polygons:


tYfkk.png


How sound is that idea? Is that going to be expensive or would it be ok? Or any other ways to achieve this?


Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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