mirror of
https://github.com/rough-stuff/rough.git
synced 2026-02-15 16:05:36 -05:00
Update README.md
This commit is contained in:
@@ -13,11 +13,7 @@ The latest Rough.js release (beta version 0.1): [Download](./rough.zip)
|
|||||||
## How to use Rough.js
|
## How to use Rough.js
|
||||||
### Setup
|
### Setup
|
||||||
Initialize a **RoughCanvas** object by passing in the canvas node and the size of the canvas.
|
Initialize a **RoughCanvas** object by passing in the canvas node and the size of the canvas.
|
||||||
Following code snippet draws a rectangle.
|
Following code snippet draws a
|
||||||
```html
|
|
||||||
<script src="dist/rough.min.js"></script>
|
|
||||||
<canvas id="myCanvas"></canvas>
|
|
||||||
```
|
|
||||||
```javascript
|
```javascript
|
||||||
var rough = new RoughCanvas(document.getElementById('myCanvas'), 500, 500);
|
var rough = new RoughCanvas(document.getElementById('myCanvas'), 500, 500);
|
||||||
rough.rectangle(10, 10, 200, 200);
|
rough.rectangle(10, 10, 200, 200);
|
||||||
|
|||||||
Reference in New Issue
Block a user