I've been looking all over the internet for this. I'd like to know if there is any Node.js packages/bindigs/libraries that allow you to make an application that draws on the screen without node-webkit(NW.js)/Electron or other implementations based on browsers. Maybe something that binds to opengl with support for 2D graphics?
Let me know if you know some names or links. If not I might have to write something myself.
Thank you guys.
There is an experimental project : https://github.com/creationix/node-sdl
This basically provides bindings to the SDL library:
Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D.
If you can get it compiled, you can try the example scripts in nodejs.
node-opencv
or OpenCV in general should allow you this. At least it has a HighGUI
class, which gives you native window contexts to display image data. With a lot of hacking you can build something you require. But I would suggest using browser contexts and HTMLCanvas
anyhow. It gives you all you need out of the box. You just need to set it up properly.
Edit:
As per @Zorgatone's suggestion, GTK
could be a very good library for that purpose, though node bindings are very stale.
There are projects that brings
but unfortunately the last commits seem to be for old node.js versions.
It will be substantial work to make the bindings work with a recent version of node but those a interesting starting points.
V8-GL intends to provide bindings for creating 2D-3D graphics on the desktop with javascript.The Status is not completed yet, but maybe it is enough for what you are trying to do https://github.com/philogb/V8-GL Another thing i just found out is, that it actually uses immediate mode, which is deprecated but still works.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With