Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
`me.Container.childBounds` and ``me.Container.bounds` are redundant #767
Comments
|
That would be really expensive for anything like |
|
good point, I forgot about it. Although we could make it a user configurable option through a boolean flag, and being disable by default. this solves the root container scenario and the particle container, while allowing the user to enable it when needed for child container(s). |
|
You mean having an extra rect in the space invaders tutorial? https://github.com/melonjs/tutorial-space-invaders/blob/gh-pages/tutorial_step5/js/enemy_manager.js#L7 I'm fine with it, as it's more "special" behaviour, and is easily dictated in what's going on. I think too many settings complicates the system. |
|
@agmcleod I actually removed the local copy of but what I was suggesting is to also remove |
|
I think we're coming full-circle on this issue. We've had discussions in the past about the Here are a few considerations off the top of my head:
|
|
so I wanted to come back on this one. Can't we define some flag, that define if bounds should be automatically updated ? it would then be on by default for anything, except container ? I really dislike this double bounds objects in container, and it just adds extra complexity to everything. |
I think I was probably the one adding the former one, but while updating the space invaders tutorial and simplifying the tutorial code to use it, i realised that having a separate rect for child bounds deserve no real useful purpose, and that we should rather resize the bounds rect directly .
unless i'm missing a use case here ?
also, i think we should automatically update the container bounds when add/removing childs. (except or the root container)
what do you think ?