Jump to content

[PIXI] Properties of ParticleContainers in v4.x


Recommended Posts

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:


Does that mean it how has access to all ordinary Container properties?

Link to comment
Share on other sites

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.

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.

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.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...