Why is View3D a Sprite?

Software: Away3D 4.x

ASWC, Member
Posted: 18 April 2012 07:28 PM   Total Posts: 76

We all know that the new Stage3D features that away3d 4 is built on is not part of the Flash display list, it is displayed on the stage background. When I first used away3d 4 it did struck me to have to add my View3D to the display list. I can’t say that I looked closely at the code but it seems logical to assume that its only purpose is to get a reference to the stage and then a valid Stage3D. If I’m wrong then stop me here. Anyway, we could say it’s like that to keep consistency with previous away3D versions or it’s like that so away3d can display a menu content on right click and other reasons but it seems to me that View3D has no real business being a Sprite or anything related to a display list for that matter. In fact that design becomes totally weird when trying to use a view as a Sprite (not saying I did but beginners might) since pretty much many properties and methods should truly be overrided to prevent any use of normal Sprite object. Also you might be tempted to add your view (Sprite) to the display list after setting up everything which in this case will only produce errors since a View3D needs a Stage3D to work. I guess my question and point would be here. Why not making a View3D what it really is and simply init it with a property like stage or stage3D ? It’s not a criticism, it’s a discussion.

   
   
‹‹ Texture streaming

X

Away3D Forum

Member Login

Username

Password

Remember_me



X