Jump to content

Question on Z-Indexing


KamiFightingSpirit
 Share

Recommended Posts

I have a container that is filled with objects, each of these objects have children. When the user hovers over the objects the children appear visually on the screen. However, the children do not appear in front of all objects in the grandfather container, only it's immediate parent. Is there a way to make it appear in front of all objects in the grandfather container as well?

Link to comment
Share on other sites

I believe it is happening because the higher z-indexed parent's siblings are always indexed higher than the children of that parent ( their nieces/nephews).

 

Is there a way to remove the connection between the parent's z-index and it's children and instead just use a global z-index?

Edited by KamiFightingSpirit
Link to comment
Share on other sites

Here's the plugin for it:

https://github.com/pixijs/pixi-layers

You can see "z-index" word in examples and use it with CTRL+C but I advice you to go through the README. Layers are better than z-index.

1. You might even not need to set numbers for z-index ;)

2. Its clear how masks and filters work in those elements.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...