Skip to content

Commit 65840ef

Browse files
committed
.
1 parent b560efb commit 65840ef

File tree

1 file changed

+29
-6
lines changed

1 file changed

+29
-6
lines changed

README.md

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,42 @@
77
<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.
88
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).
99

10-
## Documentation & Examples
10+
## Install
1111

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+
```
1329

14-
## API
30+
and check out more examples at [roughjs.com](https://roughjs.com).
1531

16-
[Rough.js API](https://github.com/pshihn/rough/wiki)
32+
## API & Documentation
1733

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)
1939

20-
The latest Rough.js release (beta version 0.1): [Download](https://roughjs.com/builds/rough.zip)
2140

2241
## Credits
2342

2443
This project was inspired by [Handy](http://www.gicentre.net/handy/), a java based library for [Processing](https://processing.org/).
2544
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

Comments
 (0)