Wk 3: 09/18/19-09/25/19 (version 1)
I didn’t give myself enough time this week to execute something I’m happy with. In it’s current state, the site is a mess and drawing in it is not easy. Hoping to improve upon this for the coming week.
The redo button also clears the canvas but doesn’t do it for everyone, though it is using “socket.emit”
Code: https://github.com/emilylin-itp/live-web/tree/gh-pages/wk3/wk3_wig
Helpful Resources:
- https://lab.hakim.se/particles/02/
- https://www.w3schools.com/tags/canvas_lineto.asp
- https://www.w3schools.com/tags/canvas_beginpath.asp
- https://www.w3schools.com/jsref/event_clientx.asp
- https://www.w3schools.com/jsref/obj_mouseevent.asp
- https://github.com/pstakoun/socket.io-drawing
- https://stackoverflow.com/questions/3783419/smooth-user-drawn-lines-in-canvas
- https://stackoverflow.com/questions/2142535/how-to-clear-the-canvas-for-redrawing
- http://code-and.coffee/post/2015/collaborative-drawing-canvas-node-websocket/ (this one was nice!)
Command Lines to remember:
npm install socket.io --save npm install express --save npm init more filename.txt (to read what is in the file) touch filename (to make a file) Npm install json sudo npm install -g forever forever start server.js forever list