Skip to content Skip to sidebar Skip to footer

How To Apply Mask In Pixijs Container That Will Not Show It's Color At Page Refresh?

I'm using the code below to apply a mask in a container, but after I click the refresh button on page (chrome) the pixi stage becomes completely white until the refresh completes.

Solution 1:

The mask shouldn't be a child of the container. You're creating a sprite, adding it as a visible child, and then using the sprite's boundary rectangle as a mask.

Remove the addChild() call, and it will mask properly, but in addition, you should set the container mast to a PIXI.Rectangle instead of a sprite, if all you're doing is masking a rectangular area.


Post a Comment for "How To Apply Mask In Pixijs Container That Will Not Show It's Color At Page Refresh?"