benoit-pixi Posted June 19, 2020 Share Posted June 19, 2020 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 */ Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted June 19, 2020 Share Posted June 19, 2020 yes, all children need to be from the same spritesheet. Quote Link to comment Share on other sites More sharing options...
benoit-pixi Posted June 19, 2020 Author Share Posted June 19, 2020 So that's mean a big sprite and a json ? 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.