Tutorial 01: Basics
BrowsersWebGL is supported by the most widespread browsers. See the following table for browsers and the version, since they support WebGL :
|Firefox||Version 4||If WebGL is not enabled, type "about:config" in your adress bar, search for "webgl.force-enabled" and switch it to "true".|
|Safari||Version 5.1||If WebGL is not enabled, open a terminal and execute "defaults write com.apple.Safari WebKitWebGLEnabled -bool YES".|
|Internet Explorer||Version 11||Older versions need one of the two already retired plugins 'Chrome Frame' or 'IEWebGL'.|
So this is the first time, that you can provide 3D content without forcing the users to install special libraries or viewers. The currently well browser support will still be improved in the next time.
But even when a user with a non WebGL browser visits your page, Three.js gives you the possibility to share your content. You can render the scene with a hardware accelerated WebGL renderer, or, if WebGL is not supported, with a HTML 5 canvas renderer or a SVG renderer. To be honest, the canvas and the SVG renderer have some limitations in comparison to the WebGL renderer, but you can render your scene.
- Renderers: Canvas (HTML 5), SVG and WebGL. The Canvas renderer has some limitations in contrast to the WebGL renderer (e. g. no pixel z sorting).
- Cameras: Perspective and orthographic
- Lights: Ambient, direction, point and spot lights
- Materials: Lambert, phong and more
- Shaders: Vertex and fragment
- Loaders: Binary, image and JSON
- Additional libraries: CSG, physics, tweening, ...
- ...: see