d13 Posted October 5, 2017 Share Posted October 5, 2017 Hi Everyone! In v3.0, ParticleContainers had only a limited number of properties you could set: x, y, height, width, scale, pivot and visible. However, the current docs state that ParticleContainer extends Container: http://pixijs.download/release/docs/PIXI.particles.ParticleContainer.html Does that mean it how has access to all ordinary Container properties? ivan.popelyshev 1 Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted October 5, 2017 Share Posted October 5, 2017 In v3 it also extended container, nothing has changed. ParticleContainer is limited towards its children. 1. only one base texture for all elements inside 2. children cant have children 3. maxSize should be set correctly in constructor, otherwise it'll crash. There are 5 properties in particlecontainer: position, uvs, rotation, alpha-tint, scale. You have to choose which properties of children will be uploaded in dynamic buffer, thus you will be able to change them in runtime. Look at http://pixijs.github.io/examples/#/demos/batch.js. 1. scale can be static, maggots arent scaled in runtime - so you dont have to specify it. 2. uvs are static too, all maggots dont change their texture region 3. alpha-tint can be static because its set up at the start, its not changing 4. try to set position to false, you'll see how are they only rotating 5. try to set rotation to false, and you'll see how they are only changing position. SUMMARY: it has differences from v3, but , in general, if something has inherited properties it doesnt mean that those properties are actually working. There are plugins with different containers that are somehow better but limited. Also Flash had those kind of objects too P.S. Dont forget to like my post. d13 and Vitalije 2 Quote Link to comment Share on other sites More sharing options...
d13 Posted October 5, 2017 Author Share Posted October 5, 2017 Thank you - that explains it! Also, I wasn't aware that `alpha-tint` is now a single property, so that helps. But I do have one further question: what do `batchSize` and `autoResize` do? Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted October 5, 2017 Share Posted October 5, 2017 There wasnt tint before 4.5.6 in particlecontainer. Since in spriterenderer its packed into same 4 bytes as alpha, we made it a single property. Please consult the sourceCode about both of things, I'm too tired. 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.