3 ms·
This has really nothing to do with js. I could mechanically translate the demo to Haskell or Python and it would perform equally well, as all the heavy computat
by orbifold 12y ago
This has really nothing to do with js. I could mechanically translate the demo to Haskell or Python and it would perform equally well, as all the heavy computations are done on the graphics card and those are given in a C like but implicitely parallel shader language. All this really demonstrates that the webgl bindings to opengl have minimal overhead. One thing that is impressive, how you can trivially and more or less declaratively define a user interface using the browser rendering engine, whereas a similar user interface in a simple opengl demo would have to be very primitive or use a third party library. This makes such webgl demos much nicer to interact with compared to a similar demo written in c, but the actual code is nearly the same, since it is mainly library calls to opengl.