These are chat archives for pixijs/pixi.js

27th
Apr 2015
Syynth
@Syynth
Apr 27 2015 05:24
webpack has a loader than can run browserify transforms, but I wasn't able/motivated to find a way to make that work, so I've decided to just use browserify for the time being
Hugo Queirós
@hugofqueiros
Apr 27 2015 14:21
Hey! I'm upgrading my code to use the new PIXI v3. I'm trying to render 2 containers with different particles on each one. On the former version v2 i added 2 containers to a PIXI.stage and rendered the stage object on each animation frame. Now i'm trying to render the 2 containers separately ( ParticleContainer() ) since v3 now tells me it's no longer necessary to use a stage object. The problem is... calling render() on triggers the last container to render. for example calling render(container1); render(container2); only renders the last container. Also, adding the different sprites (different textures) to the same containers, doesn't work... the particles keep the first texture to be added on the container (which is completely odd). What am i doing wrong? The solution using a PIXI.stage object works like a charm
Chad Engler
@englercj
Apr 27 2015 14:25
var root = new PIXI.Container();

root.addChild(container1);
root.addChild(container2);

renderer.render(root);
There is no stage object, but you should still only render a single item. Calling render can clear the rendering viewport so you could disable that if you want, but it is more efficient to just call render() once.
Hugo Queirós
@hugofqueiros
Apr 27 2015 14:32
Thank you for the quick aswer, that worked :smile:
Chad Engler
@englercj
Apr 27 2015 14:32
Anytime :)
Hugo Queirós
@hugofqueiros
Apr 27 2015 17:41
Can someone point me to a example of interaction for v3, can't seem to put them to work.
Hugo Queirós
@hugofqueiros
Apr 27 2015 18:38
nevermind that got it