Posted by elberry
on October 24, 2008 at 10:36 AM PDT
About a month ago, I posted an issue in my blog, that child nodes were being rendered in spite of their being not within the bounds of the JSGPanel. My test of this was simply checking each SGImage in my TileMap to see if it's visible (via the isVisible method) or not. My findings showed that all the SGImages were always marked as visible even though they weren't actually within the view area of the JSGPanel.
I've since updated my TileMap to go through and find out which Tiles (SGImage) are actually visible based on their location, and size.
However, I am curious as to why Scenegraph doesn't do this already? If each node knows of it's bounds in relation to it's parent, and knows of which JSGPanel it's in, shouldn't the visibility of nodes be based on this? Are my assumptions about the visible property correct? Does Scenegraph actually not render the nodes if they aren't actually within the panel's view? Did I not set the size on the JSGPanel correctly in order to get this functionality? If not, is this a valid feature request?
Original blog post: http://www.townsfolkdesigns.com/blog/elberry/2008/09/06/platform-1-2-til...