Jump to content

How to work Invert Mask ?


Recommended Posts


I wanna use mask. but i want to set  outside part of circle

for example. i write following code



this.mask1 = new PIXI.Graphics();
this.mask1.drawCircle(100,100, 100);

this.black = PIXI.Sprite.fromImage('./data/image/512.jpg');
this.black.alpha = 0.5;
this.black.scale.set(1280/512, 720/512);

this.black.mask = this.mask1;



this case  circle part drawn.

but i wanna draw outside part

how can i do this?



Link to comment
Share on other sites


how can i my ask by texture.. 

is it maskFilter?

how can i set like the inverse of  a normal circle mask?

could you tell me simple pseudo code?

i can set masks?   like 'spr.mask = [mask1, mask2]  like filter?


Link to comment
Share on other sites

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.

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.


  • Recently Browsing   0 members

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