JohnMcLear/draw — pull request #29 by tranek (2013-05-02 03:30:25+00:00)
Title: Added paper module for nodejs and ueberDB support - persistent sketches

Added paper module for nodejs. Since there is a bug in the acorn library used by the paper nodejs module, I included the paper nodejs module in the repository instead of just requiring the user to install it with the fixed acorn lib. The paperjs developers are aware of the problem and are investigating if updating to the latest acorn version fixes it or if they need to push my fix into their repo. I didn't include paper in the package.json because it is not in the npm repository yet and needs to be installed from the git (npm install git://github.com/paperjs/paper.js.git).

The paperjs node module requires the Canvas node module (https://github.com/LearnBoost/node-canvas). I couldn't include that because it is OS dependent and needs to be compiled on the specific OS in use. That one is a bit tricky to compile as it needs the Cairo library (libcairo on Ubuntu and it comes with GTK on Windows - install to C:\GTK).

Added ueberDB support (dirty db only for now) for persistent sketches based on the room name - issue #3. The paper module allows us to run a canvas on the server with a paper project for each room. The projects have a built in exportJSON() function which exports itself to a JSON blob for storing into the database. Unfortunately there is a bug where the fill color for paths don't include the alpha channel. I opened an issue about this on the paperjs GitHub.

I think this brings us to Milestone 1.