Real-time shared drawing
- Node, Express
- Paper.js
- Socket.io
Inside the project folder, run:
$ npm install
$ node index.js
Then open 2 browsers at http://localhost:3000
- Paper.js handles the events "onMouseDown" and "onMouseDrag". First, it processes them locally, drawing on the canvas. Then, it sends the event information via a socket to the Node server.
- The server broadcasts the event (sends the event to every socket but the one that sent it).
- Finally, the event is received by other clients, and processed with Paper.js in the same way as it was processed in the client that emitted the message.
- Use Redis to save all the events, in case a new user joins.