I am using the PixiJS framework to create a 2D RPG Game.

How can I create a PIXI.Container with a transparent background which I can render on top of my main stage container?

My goal is it to have 4 layers which contain PIXI.Sprites and PIXI.Texts:

layer 1 should be rendered beneath the player
layer 2 should be rendered above layer 1
layer 3 should be rendered above the player and above layer 1 and layer 2
layer 4 should be rendered above everything else for debug information

In case I can cannot use multiple PIXI.Container then how else could I achieve this effect?


If you for some reason don't want to use preordered containers, then you need to sort the render list.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.