getting all child objects of Object3DContainer

Software: Away3D 4.x

Avatar
FlyOn, Jr. Member
Posted: 06 December 2011 11:12 AM   Total Posts: 36

Im am extending Object3DContainer, and I often need to go through all its childObjects. Since _children is a private property of Object3DContainer I now do it like this:

public function get children():Array
{
 
var res:Array = new Array();
 for (var 
i:Number 0numChildreni++){
  res
.push(getChildAt(i));
 
}
 
return res;

But this isn’t a very proper way to do that every time I need the children..

Would it be an idea to make _children a protected property?
And if so, would such a small thing be something I request a merge (or what’s it called?) for on GitHub? (sorry, I’m a bit new to that)

Or is this perhaps where I should be using the new EntityCollector?

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X