pixijs: show and hide container with all elements in it

Viewed 2264

I have tab: PIXI.Container with a bunch of sprites on it. I believe this should be so easy, I am new to Pixi, but have knowledge in JS.

I have button. Clicking on button should show/hide given container. However, I cannot get it work.

btn.on('pointerdown',(event) => this.onClick(btn, tab));

How should I hide container with all sprites on it? And then how can I show back container with all sprites on it?

2 Answers

you can use one of these :
anySprite.visible = false
or
anySprite.alpha = 0;

Related