Jump to content

Independent render order and position


staff0rd
 Share

Recommended Posts

Phaser extends DisplayObject.updateTransform to allow the passing of a parent object.  This allows objects (that specifically override updateTransform) to be group-moved and -positioned independent of the group that controls their render (z) order.

Is anything similar available in PIXI?

Link to comment
Share on other sites

I have containers that are tweened, so their children's positions are updated with them.  However, I have some children within those containers that need to be tweened with the parent, but displayed in front of all containers - not just its parent.

Dropping in v4 to my v3 project resulted in a blank screen with no errors, so I have not attempted it yet.  Does v4 offer the functionality above?

EDIT - Oh i see that pixi-display is what may add the functionality I want...

Link to comment
Share on other sites

V4 does not offer any kind of z-ordering, but pixi-display can re-order elements without changing render tree according to their "displayGroups". I use it in projects that will soon go into production. Please look at example, its easy enough.

As for your black screen bug, can you tell me which features are you using from this list?

1. filters

2. masks

3. renderTexture

4. new Texture(frame,crop,trim)

 

Link to comment
Share on other sites

2 hours ago, staff0rd said:

@ivan.popelyshev after pulling in that library and extending my typescript definitions to support it, I added a couple of DisplayGroups and this problem was solved by what seemed like magic.  Very nice - thanks a lot.

If you use masks inside generateTexture, you'll have to wait for new build or ask me for it - I just fixed a bug there :)

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