take http://pixijs.github.io/examples/#/demos/text-demo.js for example,
I added a container named view to stage,
and add textSample to view,
then, the textSample won't be displayed, is it correct or a bug?
It's correct.. and the reason is the ordering of the children.
You see, within the init() function you have
// add a shiny background...
var background = PIXI.Sprite.fromImage('required/assets/textDemoBG.jpg');
stage.addChild(background);
This background is added _after_ your new view container is added, and so will be drawn after anything added to your new view container.
If you move the
var view = new PIXI.Container();
stage.addChild(view)
to just before
view.addChild(textSample);
You'll see it works just fine :)
got it, thanks a lot.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
It's correct.. and the reason is the ordering of the children.
You see, within the init() function you have
This background is added _after_ your new view container is added, and so will be drawn after anything added to your new view container.
If you move the
to just before
view.addChild(textSample);
You'll see it works just fine :)