Jump to content

Confusion around "Container" and "DisplayObjectContainer"


gendarme
 Share

Recommended Posts

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?

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...