SVG/Canvas vs Flash for FloorPlanner app

若如初见. 提交于 2019-12-23 18:34:09

问题


I'm planning to create a floor planner app that allows users to draw, resize, move and rotate objects with the mouse. I was just wondering if it would be better to use Flash or Javascript. If using Javascript, should I use canvas or SVG? The app will allow drag selection to select multiple items.

I'm trying to make up my mind with performance and browser support placed as top priority. Do you guys have any suggestions and resources that you could point me to if Javascript is the better option?


回答1:


I would absolutely go for SVG for this application. (and I say this as a lover of Canvas)

You won't need the performance of Canvas since the floorplan won't be animated. If you expect your floorplans to dance and sing and play Tetris then you'd want Canvas.

All SVG objects are already DOM objects and have all the associated event handlers, which will allow you to create your application much faster with less headaches. With Canvas you'd have to do all the hit-detection and keeping track on your own.

SVG/VML is supported in all major browsers (all the way down to Internet Explorer 6!) so you'll have maximum compatibility.



来源:https://stackoverflow.com/questions/6118546/svg-canvas-vs-flash-for-floorplanner-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!