Question

I want to use node.js and processing.js together and route a canvas to an X window. Basically I want to tinker with some LCD displays and a Raspberry Pi, but I want to use JavaScript to do some neat stuff without using a browser.

I want to emphasize that I'm trying to do it this way because I want to, not for any other reason or for anyone else - although I'm all ears to alternatives. I'm asking the more impatient gurus to be gentle.

To clarify (hopefully), I want to use node.js and processing.js to display some arbitrary JavaScript code to interface network and display graphics and render result to X instead of using a browser.

Thanks in advance!

Was it helpful?

Solution 2

The good news, yes it can be done: https://github.com/halfninja/node-processing

The bad news that module hasn't been updated in two years. However the important part, the canvas is well maintained: https://github.com/LearnBoost/node-canvas

OTHER TIPS

No idea if you can do that, since node.js isn't a browser, and doesn't have a DOM parser (of the quality a browser gives you) or canvas2d context (again, of the quality a browser offers). If you want to use headless JS, have a look at something like Phantom.js, http://phantomjs.org, (a UI-less browser engine) rather than Node.js (which is a JavaScript server). Phantom.js sounds like it fits what you want to do much more than Node.js

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top