gendarme Posted December 16, 2015 Share Posted December 16, 2015 I am using a JavaScript library called PIXI and am looking for a way to "zoom" in my game. A search on the internet suggested that I put everything inside a DisplayObjectContainer and then resize it to simulate a zoom-effect..The thing is that I already have Container (aka stage), and I think that is resizable too. So I don't understand the reason behind using a DisplayObjectContainer when you have a Container already. And frankly, I don't even see the difference between them. This page says the following about DisplayObjectContainer:A DisplayObjectContainer represents a collection of display objects. It is the base class of all display objects that act as a container for other objects. This other page says the following about Container:A Container represents a collection of display objects. It is the base class of all display objects that act as a container for other objects. The only possible scenario I can imagine is that one of these container-objects are outdated and belong to an older version of PIXI, which isn't too unrealistic since PIXI is rather new and could change a lot. But this is just a guess. TL;DR: What is the difference between DisplayObjectContainer and Container? Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted December 16, 2015 Share Posted December 16, 2015 DisplayObjectContainer worked in old 2.0, Container belongs to 3.0. Follow the examples: http://pixijs.github.io/examples/ It seems that docs at pixijs.com are outdated: 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.