These are chat archives for pixijs/pixi.js

14th
Mar 2018
Allan Reyes
@allanbreyes
Mar 14 2018 04:24
Hi, everyone! Excited to start digging into pixi.js.
Matt Colman
@matt_colman_twitter
Mar 14 2018 05:00
anyone know how to sort children in a Container?
Matt Colman
@matt_colman_twitter
Mar 14 2018 05:52
it seems container.children.sort((a, b) => a.x - b.x) works, despite the docs saying children is readonly
Chad Engler
@englercj
Mar 14 2018 15:00
children is readonly in that you shouldn't add/remove elements from it without calling addChild/removeChild
Sam Stonehouse
@SamStonehouse
Mar 14 2018 18:00
Is there a way to get a TilingSprite to repeat on only one axis? I have a transparent top edge on some of my textures which end up having artifacts from the next tile along when scaling
Matt Colman
@matt_colman_twitter
Mar 14 2018 22:26
well there is an onChildrenChange hook that doesn't get called when I sort them manually. It gets called if you swapChildren, but I'm not sure it matters.
from what I can tell onChildrenChange only gets used by ParticleContainer so this method of sorting children should be fine