用于FloorPlanner应用程序的SVG / Canvas和Flash [英] SVG/Canvas vs Flash for FloorPlanner app

查看:134
本文介绍了用于FloorPlanner应用程序的SVG / Canvas和Flash的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我打算创建一个楼层规划器应用程序,允许用户使用鼠标绘制,调整大小,移动和旋转对象。我只是想知道如果它会更好地使用Flash或Javascript。如果使用Javascript,我应该使用canvas还是SVG?该应用程序将允许拖动选择选择多个项目。

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?

推荐答案

我绝对会去的用于此应用程序的SVG。 (我说这是Canvas的情人)

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

你不需要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.

所有SVG对象都已经是DOM对象,并拥有所有相关的事件处理程序将允许您更快地创建您的应用程序,减少头痛。使用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在所有主流浏览器中都支持Internet Explorer 6!),因此您将具有最大的兼容性。

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

这篇关于用于FloorPlanner应用程序的SVG / Canvas和Flash的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆