Skip to content

Commit

Permalink
"Collaborative" Canvas Designer i.e. Canvas-Drawing tool added.
Browse files Browse the repository at this point in the history
  • Loading branch information
muaz-khan committed Aug 9, 2014
0 parents commit 30a54fe
Show file tree
Hide file tree
Showing 16 changed files with 3,375 additions and 0 deletions.
433 changes: 433 additions & 0 deletions Help/index.html

Large diffs are not rendered by default.

58 changes: 58 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
## [Canvas Designer](https://github.com/muaz-khan/Canvas-Designer) / [Demo](https://www.webrtc-experiment.com/Canvas-Designer/)

Note: Original Canvas-Drawing tool is hosted here: https://canvas-designer.appspot.com/

"Collaborative" [Canvas Designer](https://github.com/muaz-khan/Canvas-Designer) i.e. Canvas-Drawing tool allows you draw bezier/quadratic curves, rectangles, circles and lines. You can also set strokes, back/forth colors and much more.

This speciality of this drawing-tool is that, it generates Canvas2D code for you; so simply draw and get the code!

Also, you can collaborate your drawing with up to 15 users; and everything is synced from all users. So, if you draw a line and your friend-A draws quadratic curve and friend-B draws rectangle then everythign will be synced among all users!

<img src="https://cdn.webrtc-experiment.com/images/Canvas-Designer.gif" />

=

## WebRTC?

[Canvas Designer](https://github.com/muaz-khan/Canvas-Designer) is using [RTCMultiConnection.js](http://www.RTCMultiConnection.org/) to setup realtime data connection. This allows adding realtime media connection features in less than 2-minutes!

E.g.

```javascript
// whilst doing collaboration, you can add any kind of media stream
// single or multiple, it doesn't matters who shares and how!!!
connection.addStream({ audio: true, video: true });
```

Read more here: http://www.rtcmulticonnection.org/docs/

=

## Links

1. https://www.webrtc-experiment.com/Canvas-Designer/
2. https://github.com/muaz-khan/Canvas-Designer
3. https://canvas-designer.appspot.com/

Original source-code was shared 2-years back, here: https://github.com/muaz-khan/Everything/tree/gh-pages/Canvas/Tools/Designer

There is a similar "tinny" tool, however it isn't yet supporting collaboration: https://canvature.appspot.com/

And WebRTC-Experiments! https://github.com/muaz-khan/WebRTC-Experiment

=

## How to use my own library or code?

Do two things:

1. Edit `share-drawings.js` to add your own WebRTC code.
2. Open `decorator.js` and scroll to line 338. This line is using `connection.send`. You simply need to replace it with your own code e.g. `webrtc_connection.sendData(..)`.

Now the tool is using your own WebRTC implementation!

=

## License

[Canvas Designer](https://github.com/muaz-khan/Canvas-Designer) is released under [MIT licence](https://www.webrtc-experiment.com/licence/) . Copyright (c) [Muaz Khan](https://plus.google.com/+MuazKhan).
Loading

1 comment on commit 30a54fe

@nileshbutanicmetric
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can I set background image on canvas element(main-canvas)

Please sign in to comment.