Code Monkey home page Code Monkey logo

socket.io-draw's Introduction

Shared Boards

An online website of rooms/namespaces which users can join in to draw on shared boards while chatting.

Client-Server

The "app" uses SOCKET.IO 2.x library (which has a very good API and documentation) to allow users to communicate via a server which only broadcasts their messages to each other. Both the server (Node.js) and the client (Browser JS) are setup in this project. Just run npm install && npm start and you are good to go on localhost:3000/lobby.

Play

Open two browser tabs on localhost:3000/lobby and join the same room. Now you have two connected clients.

Drawing Canvas

The drawing is done on an HTML5 canvas. Mouse events for drawing, and other events such as color change, and thickness change are communicated to other users connected to the same namespace (room) on that same server.

Chat

A chat functionality is also implemented so that users can chat and draw at the same time.

Experimental

This is meant as an example and by no means is it production-ready. Feel free to experiment with it to learn the concepts and the API of the library used. I have written some comments here and there. But, I might have left few things out.

If you find this helpful please let me know that I made something useful. Thanks.

socket.io-draw's People

Contributors

hassanalgoz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.