![]() When the selected plane moved back into place it would move through the other planes on its way. This was a problem when you selected one of the planes that was not directly next to the selected one. Oh, and while I was at it I made a modification to get around the z-ordering issue. This is pretty easy, basically what I did for a child that I wanted animated was add the following code in MXML:ĮnterFrame="(new Fle圎vent(Fle圎vent.UPDATE_COMPLETE))"Īnd that ensures that the child will always be updated. One note about this: if you have animations in your child components that do not dispatch updateComplete events you’ll have to manually dispatch updateComplete over and over. This ensures that our material is always up-to-date. Whenever an updateComplete event fires the material re-renders. This material is non animated, but listens for Fle圎vent.UPDATE_COMPLETE events fired from the child (and all of the child’s children if it has any). I added a new material that I called FlexMaterial (and the associated reflected version, ReflectionFlexMaterial). The second improvement was to not use animated materials. This means that once the movement has stopped (ie the selected child comes to rest in the center), the component no longer uses much CPU at all. If not we just ignore and don’t waste CPU power. If so, we make PaperVision 3D render the scene. Basically in our enter frame handler we check if Tweener is currently tweening the selected child. This is a sweet improvement that Brock Brinkerhoff suggested in an email he sent me (thanks Brock!). Instead of telling you to get faster computers I decided to make a few small modifications to speed things up.įirst, instead of rendering every frame we’re now rendering only while the animation is happening. So you poor people out there with computers from the 1980s complained that the component made your browser shoot up to 110% cpu and all that. ![]() This is the lazy approach that ensures that the 3D scene always looks right, but it also kills performance. ![]() When I first released the component I took the shotgun approach to rendering, which meant I rendered the entire scene every frame and all the materials were animated.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |