SceneJS, Three.js and PhiloGL – WebGL performance test
UPDATED POST HERE: http://granular.cs.umu.se/browserphysics/?p=7
We can see that the FPS drops down below 60 around 600 cubes for Three.js and SceneJS. The corresponding number for WebGL without a scenegraph is 1000, and for the non-browser OpenSceneGraph (C++) it’s 3000.
Conclusions: We get a performance drop (~66 percentage units) when moving from OpenGL to WebGL. When using a scenegraph, we drop even more (80). I guess the web is not ready for heavy 3D graphics yet.
Usage notes: All of the scenegraph libraries have nice APIs. I like SceneJS the most because of its JSON-like API, it is very easy to learn because you can acutally see the scenegraph tree in the code. Three.js has got another type of API which is similar but uses no JSON. PhiloGL seems to me like some extra functions that helps you use native WebGL, the WebGL interface is not 100% encapsulated which makes it a bit harder to learn.
Tech notes: The tests were made using a desktop machine with an Intel i7 quadcore 2.8 GHz processor and 8Gb RAM. The operative system used was Ubuntu 10.04 (Lucid). The web browser used was Chromium 15 (I tried Firefox 6.0 also, its performance was about the same). When making these tests, I tried to cut down on the instanciations as much as I could to get more performance. The non-scenegraph test was made with pure WebGL with the support from webgl-utils.js and glMatrix.js.