Masking don't work with pixi/layers
Opened this issue · 0 comments
jacobdab commented
Hey,
When added @pixi/layers to my project with it breaks all mask that hide what's outside of them:
let layer = window.layer = new Layer(); // happens in init.js
layer.group.enableSort = true;
sprite.parentLayer = layer // added to function that creates all sprites and containers
const mask = new PIXI.Sprite(PIXI.Texture.WHITE); // example of using code which works without @pixi/layers
mask.width = serversContainer.width;
mask.height = serverFrame.height - (serversContainer.y - serverFrame.y) - calculateYMargin(signUpPositions.CHOOSE_SERVER.FRAME_BORDER_SIZE.y);
serversContainer.addChild(mask);
serversContainer.mask = mask;
Dependencies versions:
"pixi.js": "6.2.2",
"@pixi/layers": "1.0.11",
"pixi-spine": "^3.0.13",
EDIT:
Updated to latest and still masking don't work even without @pixi/layers.
What can I do to make it work?