Sharpleaf Posted November 3, 2015 Share Posted November 3, 2015 I have a few particle containers that I wanted to add a filter to. Now, I know that this can't be done, I've tried And I understand why you can't. So, my solution was to take those particle containers and add them to a regular container and then add my displacement filter to the regular (parent) container. My question is: does this defeat the purpose of the using the particle containers in the first place (performance)? I don't know if this "undoes" what particles containers "do". Thanks! Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted November 3, 2015 Share Posted November 3, 2015 What classes/libs are you using exactly? Quote Link to comment Share on other sites More sharing options...
Sharpleaf Posted November 3, 2015 Author Share Posted November 3, 2015 What classes/libs are you using exactly? Hi Ivan!!I have 2 PIXI.ParticleContainer's inside 1 PIXI.ContainerJust curious if throwing those 2 particle containers inside a regular container defeats the purpose if the performance gains of the particle containers. Thanks! Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted November 3, 2015 Share Posted November 3, 2015 Hi Ivan!!I have 2 PIXI.ParticleContainer's inside 1 PIXI.ContainerJust curious if throwing those 2 particle containers inside a regular container defeats the purpose if the performance gains of the particle containers. Thanks! Hey Sharpleaf! Ok, I read the code. Regular container's renderWebGL method deals with filters and masks, and then calls render method of childrens.Particle container renderWebGL calls his older brother ParticleRenderer which is tracking childrens parameters. These two behaviours are so different , that its better to stack two objects inside each other than try to inherit it and make SuperParticleContainer. And it only costs one extra updateTransform() call, which does not affect the performance. Ivan. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.