2

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!

2 Answers 2

1

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

Sign up to request clarification or add additional context in comments.

Comments

0

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

1 Comment

Neat stuff! It's sad to see orphaned projects that seem useful. Thanks a lot!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.