I have the impression that the ZIndex property doesn't work at all.
No matter what value is set, it's the order of addition to the Stage that matters, not the ZIndex.
I thought it worked like this:
Application creation
Creation of layers / groups (with ZIndexes)
Sprite creation etc.
Add sprites to groups (parentGroup)
I tested with two groups, the first with a ZIndex of 20 and the second with a ZIndex of 1. The first should naturally be displayed above the first.
Obviously, this isn't the case: I have to add the first layer to the stage last so that it appears in the foreground.
In my application, I use Pixi/Viewport, but I've tested it without and I get the same behavior.
I've moved the editLayer so that it's added first, but when I change the ZIndex nothing happens. So I don't really understand the purpose of this property... In my application I need to be able to add/edit layers, which would require me to manually manage the order of the layers in the stage stack, is this normal?
Hello,
I have the impression that the ZIndex property doesn't work at all.
No matter what value is set, it's the order of addition to the Stage that matters, not the ZIndex.
I thought it worked like this:
I tested with two groups, the first with a ZIndex of 20 and the second with a ZIndex of 1. The first should naturally be displayed above the first. Obviously, this isn't the case: I have to add the first layer to the stage last so that it appears in the foreground.
In my application, I use Pixi/Viewport, but I've tested it without and I get the same behavior.
I'm in Pixi v7, here's a Fork of an example (not in V7): https://replit.com/join/ytxdmaalua-pierrebouvet1
I've moved the editLayer so that it's added first, but when I change the ZIndex nothing happens. So I don't really understand the purpose of this property... In my application I need to be able to add/edit layers, which would require me to manually manage the order of the layers in the stage stack, is this normal?