Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Masking don't work with pixi/layers #103

Open
jacobdab opened this issue Jul 16, 2023 · 0 comments
Open

Masking don't work with pixi/layers #103

jacobdab opened this issue Jul 16, 2023 · 0 comments

Comments

@jacobdab
Copy link

jacobdab commented Jul 16, 2023

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant