Jump to content

Changing the size of particlecontainer


Exca
 Share

Recommended Posts

Adding objects as long as the max size is not exceeded works. But if the amount of children exceeds maxsize the rest wont get rendered in webgl. What I would like to do is adjust the maxsize dynamically. One way would be just destroying the particlecontainer and building new one with larger size. Or build one initially that supports the maximum amount of particles.

Link to comment
Share on other sites

Good question, the direct answer is: No, you can't change the max size of a ParticleContainer after creation easily.

Normally you would just create one with the max size that you will have, I would only worry about reducing that number and dynamically creating containers if your max size seems to cause perf issues at the lower size. Or if you think that the transition between the two states (low max, and higher max) will almost never happen. Unless the difference between the small and large is a few thousand, I wouldn't worry about it, just do the big one always.

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