3 ms·
I don't know about a WebGL API on node.js, but I'm currently updating a set of bindings for SDL to SDL2. (https://github.com/Freezerburn/node-sdl https://github
by FreezerburnV 13y ago
I don't know about a WebGL API on node.js, but I'm currently updating a set of bindings for SDL to SDL2. (https://github.com/Freezerburn/node-sdl https://github.com/Freezerburn/node-sdl) Theoretically, you could use the same WebGL code, and add a few lines of code to open up a window, plus possibly some slightly different code for loading images, and re-use the rest of your logic on the client side. Change the code a little bit more, and it could optionally open a WebGL window in the DOM or an SDL2 window depending on the environment. Presto, you have a game which is easily portable. (not counting for oddities in drivers for different OSes)
Though that's all in theory. It could be a pie-in-the-sky ideal that doesn't exist yet.