Hacker News new | past | comments | ask | show | jobs | submit login

This is not really possible at the moment. This 3D version is using WebGL in Javascript running as a web-application, while the downloadable binary is implemented in C.



So the C version can use the OpenGL C API. Three.js is a big abstraction layer on top of WebGL, but it's certainly in the realm of possibilities. There are C abstraction layers as well.


Electron?


I think i'd prefer something native.


Electron apps can work great. I have noticed a general bias against all Electron apps and I think it is because of how poorly Atom performed when it was first released. Virtual Studio Code, and RStudio are shinning examples of a good Electron App.


I've run many other Electron apps - they all suffer from the same problems. Ugly non-native UI, DPI scaling that doesn't quite work right, poor platform integration and massive binaries.

Additionally, with something like this, I'd imagine it would be quite possible to port to a simple Node based system with OpenGL support without the need to embed a browser. Would probably improve performance too due to removed sandboxing.


there are no node based systems with opengl support.


There's a node-webgl package which provides all of the OpenGL ES features with no need for the web browser part, there's also SDL and GLFW bindings available. While it's not full OpenGL - I couldn't find any well maintained GL bindings at least - it should be completely sufficient to port a WebGL project.


I've searched a lot for such a package, most are five years old and doesn't work. Best I could find was the x11 package, but most examples doesn't work. And if you go with a wrapper you could as well use Electron or nw.js witch I'm using atm.


Why?

I mean WebGL has hardware acceleration, modern JS is quite fast. Is it just about performance or is there anything else?


JS is still slower than native code, and has worse memory consumption.


Even disregarding JS vs. native, WebGL has a big perf overhead because it's sand boxing API calls


ok




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: