actionscript3 isometric library (v1/v2)
Some significant changes to the render process
April 29, 2009Posted by on
A few bugs had been logged regarding invalidation, invalidation flag and associated events. In addressing these bugs I had to rewire the way the render phase takes place internally for the IsoContainer subclasses. Rendering is now a 3 step process consisting of the following:
- preRenderLogic() – This is where the IsoEvent.RENDER gets dispatched. This event is basically saying “hey I am starting the rendering process”.
- renderLogic() – if you plan on extending any IsoContainer, your render logic will be placed here. Make sure to call super.renderLogic as well
- postRenderLogic() – This is where the IsoEvent.RENDER_COMPLETE gets fired. It is also a place to do any last minute clean up.
If you were previously listening for the IsoEvent.RENDER expecting that you would execute your listener AFTER the rendering process took place, you will need to switch to listening for the RENDER_COMPLETE event instead.
I am also working on a performance update in order to get the recursivity of rendering down to a single loop pass. Currently if you have extended rendering logic, you may have had to call render on the children multiple times. This is costly and unnecessary. I am looking to address that in the next update.
Keep in mind that these current changes are located on a maintenance branch for testing – https://as3isolib.googlecode.com/svn/branches/20090429 (general maintenance) . Once I either hear back from you that there are some/no issues with this change, I will merge it into the main trunk.
Shoot me an email if you find any issues with these changes.