|
7 | 7 | <b>Rough.js</b> is a light weight, stand-alone [Canvas](https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API) based library that lets you draw in a _sketchy_, _hand-drawn-like_, style.
|
8 | 8 | The library defines primitives to draw lines, curves, arcs, polygons, circles, and ellipses. It also supports drawing [SVG paths](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths).
|
9 | 9 |
|
10 |
| -## Documentation & Examples |
| 10 | +## Install |
11 | 11 |
|
12 |
| -Check out the website: [roughjs.com](https://roughjs.com) |
| 12 | +The latest Rough.js can be downloaded from the [dist folder](https://github.com/pshihn/rough/tree/master/dist). |
| 13 | + |
| 14 | +or from npm: |
| 15 | + |
| 16 | +``` |
| 17 | +npm install --save roughjs |
| 18 | +``` |
| 19 | + |
| 20 | +## Usage |
| 21 | + |
| 22 | +```js |
| 23 | +const rough = new RoughCanvas(document.getElementById('canvas'), 800, 800); |
| 24 | +rough.rectangle(5, 5, 90, 90); |
| 25 | +rough.circle(80, 170, 50); |
| 26 | +rough.ellipse(300, 100, 150, 80); |
| 27 | +rough.line(80, 170, 300, 100); |
| 28 | +``` |
13 | 29 |
|
14 |
| -## API |
| 30 | +and check out more examples at [roughjs.com](https://roughjs.com). |
15 | 31 |
|
16 |
| -[Rough.js API](https://github.com/pshihn/rough/wiki) |
| 32 | +## API & Documentation |
17 | 33 |
|
18 |
| -## Releases |
| 34 | +Check out the website: [roughjs.com](https://roughjs.com) |
| 35 | + |
| 36 | +and |
| 37 | + |
| 38 | +[Full Rough.js API](https://github.com/pshihn/rough/wiki) |
19 | 39 |
|
20 |
| -The latest Rough.js release (beta version 0.1): [Download](https://roughjs.com/builds/rough.zip) |
21 | 40 |
|
22 | 41 | ## Credits
|
23 | 42 |
|
24 | 43 | This project was inspired by [Handy](http://www.gicentre.net/handy/), a java based library for [Processing](https://processing.org/).
|
25 | 44 | Rough.js borrows some core algorithms from Handy, but it is _not a JS port_ for processing.js.
|
| 45 | + |
| 46 | + |
| 47 | +## License |
| 48 | +[MIT License](https://github.com/pshihn/rough/blob/master/LICENSE) (c) [Preet Shihn](https://twitter.com/preetster) |
0 commit comments