Slowin Posted June 26, 2013 Share Posted June 26, 2013 Hi, I'm using pixi.js for a few days now and it seems to be great. Right now I add sprites directly to the stage, but I want to create a DisplayObjectContainer and put all my sprites into it, so I can scale everything at once, Would anyone be so nice to show me the basic code I need for this? Thanks in advance! Quote Link to comment Share on other sites More sharing options...
Seby Posted June 26, 2013 Share Posted June 26, 2013 Do only this var myStage...var myContainer = new PIXI.DisplayObjectContainer();var mySprite...myContainer.addChild(mySprite);mystage.addChild(myContainer); And you can move your containermyContainer.position.x = 500; etc... Quote Link to comment Share on other sites More sharing options...
Slowin Posted June 26, 2013 Author Share Posted June 26, 2013 Great, thank you very much! Quote Link to comment Share on other sites More sharing options...
Seby Posted June 26, 2013 Share Posted June 26, 2013 Np Good luck 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.