JavaScript and 3d graphics don't mix

Fdbdc4176840d77fe6a8deca457595ab
1
dk 158 Jan 06, 2014 at 23:45 javascript webgl

Discuss link: JavaScript and 3d graphics don't mix (mortoray.com)

4 Replies

Please log in or register to post a reply.

A638aa42130293f319eda7fa4ba121f4
1
fireside 141 Jan 07, 2014 at 03:23

Seems to mostly complain about type safety, which I agree with. The cloning position thing, it seems like wouldn’t be very hard to work around and passing by reference is kind of a necessity.

6837d514b487de395be51432d9cdd078
1
TheNut 179 Jan 07, 2014 at 03:41

The three major issues he posted are indeed a problem, although they are just inconveniences. I’ve learned to accept that for the greater good that browsers at least offer the ability to become gaming platforms and even much more. Plus you get use to the limitations rather quickly and just work with it. ECMAScript 7.0 has plans to evolve the language from out of the stone age. Overloading, concurrency, real classes.

I personally would not recommend emscripten as an alternative. Last I tried to use it, it was like trying to build a rocket ship to land on the moon. Documentation was equivalent to interpreting hieroglyphics, toolchain could only run on Linux, requires CLang, and special platform handling. You can’t just dumbo drop Win32 or OpenSSL stuff in there and expect a working JavaScript app. Even if you spend the time to familiarize yourself with that, you’re going to be building huge JavaScript applications. All that bytecode is going to translate into JavaScript code. At least with a pure JS framework, the browser is responsible for streaming MP3s, loading PNGs, JPEGS, etc. Compact, efficient, and using native browser functions. It’s a nice idea in principle, but I just don’t think it’s the right way. I’d sooner promote Google’s native client, which would make more sense.

A638aa42130293f319eda7fa4ba121f4
0
fireside 141 Jan 07, 2014 at 04:08

Javascript has quite a ways to go before it’s really useful for 3d, but I think it will get there. I don’t think native client will be around much longer because it’s kind of the same as java’s write once, run everywhere. That doesn’t work very well in practice because you have to keep fixing each individual application. It’s kind of write once, fix everywhere. We kind of have the same problem with javascript and browsers, but I think with standards it will work out.

A638aa42130293f319eda7fa4ba121f4
0
fireside 141 Jan 07, 2014 at 05:40

I guess Google chrome can read asm.js now. I can run Epic Citadel at 43 frames per second, 1600 x 900 on my amd laptop with an A8.