Jump to content

ParticleContainer another addChild


benoit-pixi
 Share

Recommended Posts

Hi,

First post here :)
Is it possible to add another child in a particule container ?

Does I need a sprite sheet and how it works with ParticuleContainer ?

/* 
more setup before
*/

const sprites = new PIXI.ParticleContainer(10000, { … }); 
app.stage.addChild(sprites);

// array of texture
const texture = [
  PIXI.Texture.from('foo.jpg'),
  PIXI.Texture.from('bar.png')
];

// first
let foo = new PIXI.Sprite(texture[0]);
sprites.addChild(foo);   // OK
// second
let bar = new PIXI.Sprite(texture[1]);
sprites.addChild(bar); // not OK and no error in console

/* Then FUN with GSAP */

 

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