Win 7 x 64 + Chrome runs fine (home) Win XP x32 + Chrome runs fine also (work)
When it comes to design patterns, I would suggest to only implement them if it is really needed. An MVC is fine but I often find it has been used when it has not been needed and has unnecessarily over complicated many a project. I am no guru when it comes to design patterns but this is what works for me: 1. Keep it simple 2. Evaluate how big the project is and if it merits the use of an MVC make sure you add time to compensate for the implementation and meeting the requirements of following the rules of an MVC. Also evaluate any issues it will present throughout the project, especially when handing it over to freelancers or fellow co-workers. 3. Name your variables accordingly, no need to short cut names, describe what they are and what they will be used for 4. Name your functions to what they do ex: generate, drawScene, homeSceneConstants etc 5. Name your classes to what they do, ex: Away3DSetup.as etc 6. Use a global variables class, constants, static variables class etc for data modifiers ex: MyProjectNameVariables.as, MyProjectNameConstants.as etc Personally I pref' to build to a modular folder structure with the model and view combined managed by a controller. Implementing singletons, factorys and observer patterns where needed (each page of your site has it's classes encapsulated in its own folder or a ui folder for small projects). But if I were forced to use a MVC I would follow its rules: http://www.adobe.com/devnet/flash/articles/mv_controller.html *Model* Stores the data and application logic for the interface *View* Renders the interface (usually to the screen) *Controller* Responds to user input by modifying the model So all/nearly all variables would be defined within the model, time consuming to say the least. D On 6 September 2010 10:20, dp <[email protected]> wrote: > Hi, that's good to hear. > > Well I know away3D works flawlessly for what I'm doing, since my > original non design patterned projects work fine. > > Its only now since I've started with a very basic MVC structure. In > the example I'm working with right now - basically the Frustum hotel > room demo which now runs slowly. > > I guess one thing I'm not sure about is where do I instantiate the > camera? in the model? and then reference this camera in the view and > controller? or do I just store all the variables here such as > _camX:Number? and initiate the camera only in the view? > > > On Sep 5, 2:40 pm, Aji Pamungkas <[email protected]> wrote: > > Hello dp, i'm using PureMVC. I'm doing the same things like you do, > > but i don't have any problem with the performance. > > I put all the data in Model parts, and I put all the view components > > in View parts. > > > > Usually, the performance will decrease because of too many polygons in > > one screen that need to be rendered. > > But... I also find out that, when I use Chrome and set camera lens to > > PerspectiveLens, I will get 2 fps. But when i'm using Firefox or Flash > > Player in desktop, I will get 22 fps, approximately to render 2000 > > polygons. > > So... I just set my camera lens to the other lens in Away3D, and > > everything works good. :D > > > > On Sep 5, 2:46 pm, dp <[email protected]> wrote: > > > > > > > > > I'm trying to improve my coding skills by implementing an MVC pattern > > > for a simple 3D app I have made. I have the basics working, but have > > > noticed a major performance decrease. > > > > > Currently I have the controller handling the user input and computing > > > all the camera parameters, then updates these values in the model, > > > which notifys the view, which in turn requests the new data and > > > renders the scene. > > > > > am i going about this the wrong way? should all of this be kept in the > > > view for performance reasons? any general pointers greatly > > > appreciated. thanks. >
