开发者

SVG/Canvas vs Flash for FloorPlanner app

开发者 https://www.devze.com 2023-03-08 00:13 出处:网络
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 Jav

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 priorit开发者_开发技巧y. Do you guys have any suggestions and resources that you could point me to if Javascript is the better option?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消