Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

getLocalBounds() of Container with ParticleContainers inside


Giedrius
 Share

Recommended Posts

Hi all,

We are drawing ~10k  interactive sprite circles. We are grouping them in separate PIXI.Containers (sectors). Inside those we do another grouping, this time we use particleContainers to speed up with sprites inside. The problem is - when I try to calculate local bounds of sector container which is certainly filled with particle containers and with sprites  - it returns width = 1, height  = 1. Can it be the case because of particleContainers?  Thanks!

Link to comment
Share on other sites

Yep, updateTransform() is blocked for particleContainer children, and its not possible to determine bounds because of that.

https://github.com/pixijs/pixi.js/blob/dev/packages/particles/src/ParticleContainer.js#L187

Its not a miracle container, its a thing that throws out many features in favor of faster rendering.

Its strange that calculateBounds() isnt blocked there, it should be.

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