I've been working with a Javascript library, namely, canvas-lib and I'm using Node.JS/Socket.io on the server side so I can pass events between clients.
I'm using an architecture in which only 1 client at a time is allowed control over the canvas since I'm making kind of a "scratch" game which is controlled by a mobile device and displayed on an second (bigger) screen.
You can see a diagram of the architecture here.
The thing is, currently the canvas interaction is done on the client side on a script for that effect which causes the some problems:
My objectives are:
In order to achieve this, I believe I must get the canvas-lib to work on node, so how can I achieve this since the lib is not ready for that yet? How can I turn a regular library into a Node library?
Well,
if you're developing a library which does stuff specifically for browsers I can't see any point in making a Node package for it.
But anyway, please take a look at the Node Package Manager (NPM for short), it'll help you whenever you need to develop some Node library.
Some of the things I've done to make Fabric.js node-compatible:
Or you can just use the library that already provides support for node ;)