Search code examples
htmlsvgwebgljquery-svg

Cross Browser support Three Dimensional Model


I have to create a three dimensional model in a browser based application. This application should work on all major browsers.I want a technology other than java applet and flash.Can anyone please clarify my below questions?

  1. What will be the best option to create a three dimensional model in a browser based environment ie WebGL or SVG?

  2. Do we get any third party library for doing three dimensional applications in web browser?

  3. I found that WebGL is supporting in Google chrome and Firefox. Then What will be the work around for supporting WebGL in other browsers?

Solution

    1. It's more likely to be a choice between WebGL and Canvas. Support for Canvas is pretty much universal in all major MODERN browsers. WebGL less so. In theory, the right library (see next) will allow you to choose the appropriate rendering context based on feature detection.
    2. three.js is probably your best bet and is more than capable of allowing you to import and manipulate your model.
    3. See answer 1: either target Canvas directly or as the fall-back for a WebGL rendering context.

    If you need to support IE 8 and below you will probably need to consider Flash as a fallback. three.js, as I understand it, is more or less a port of the popular Flash 3D engine Papervision. I'm not sure the project is maintained anymore but, if you do require a Flash fallback, it might be worth considering because of the similarities in the API.