3 ms·
Emscripten and asm.js are frankly amazing. I ported OpenSCAD to Javascript with it: http://www.fabfabbers.com/openscad/ http://www.fabfabbers.com/openscad/ Wit
by marcosscriven 13y ago
Emscripten and asm.js are frankly amazing. I ported OpenSCAD to Javascript with it: http://www.fabfabbers.com/openscad/ http://www.fabfabbers.com/openscad/
With asm.js in Firefox nightly it's nearly native speed.
- hugs 13y agoWow! Awesome! Sorry I missed it when you posted this the other day. (https://news.ycombinator.com/item?id=5775859 https://news.ycombinator.com/item?id=5775859) OpenSCAD in JavaScript is worth a top-post all by itself. I know of OpenJSCad and CoffeeSCAD, but I prefer the simplicity of plain old OpenSCAD. I do all my 3D design with OpenSCAD.
- MHordecki 13y agoCuriously, even though compilation is indeed near real-time in Firefox, the rendering of the model itself is really jaggy (when rotating). This is not the case with Chrome, where it renders smoothly. For reference, I'm using 2012 MBA with Firefox 23.0a2 (2013-05-30) (clean profile, just to be sure) and Chrome 27.0.1453.93.
- kevingadd 13y agoIIRC FF still doesn't use vsync for requestAnimationFrame so that could cause rotating to look less smooth.
- marcosscriven 13y agoAh... that's interesting. Thanks for the info Kevin, I'll look into that (my poor WebGL coding notwithstanding!)
- marcosscriven 13y agoYes this is something I noticed too (as in the stuttering in FF compared to Chrome). I implemented an image based CSG algorithm directly in WebGL (the one place where Emscripten couldn't help), so I would imagine that could be vastly improved, as its the first time I've ever done anything in OpenGL of any variety.