Jump to content

Layer Depth


AquSe
 Share

Recommended Posts

Hello, I'm a bit new to PixiJS and I've been wondering about layers and depth. Mainly, is there a way to change depth(Besides adding children at different times.) ? I've looked in the documentation, but didn't find anything.

Thanks.

Link to comment
Share on other sites

Welcome to the forum! Yes, all DisplayObjectContainers can manage their children with functions such as swapChildren, addChildAt, as well as directly modifying the children array. All children are drawn in the order they appear in this array, so you could call a custom sort function on this array if you need to.

 

Note that the containers of objects control their children's order, not the children themselves.

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...