Skip to content

Commit

Permalink
fixed beefy example; included usage with node-canvas
Browse files Browse the repository at this point in the history
  • Loading branch information
jdan committed May 4, 2014
1 parent d7d3fe8 commit 4d2e873
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,33 @@ changes, **or** you can use [beefy](https://github.com/chrisdickinson/beefy) lik

```
$ npm install -g beefy
$ beefy index.js --live
$ beefy index.js:build/isomer.js --live
listening on http://localhost:9966/
```

Navigate to `http://localhost:9966/test` to load the testing page.
Beefy will rebuild the project automatically when you make a change, and as a
bonus, the testing page will reload thanks to an included livereload
script.

## With node-canvas

Isomer also accepts the canvas provided by [node-canvas](https://github.com/learnboost/node-canvas),
meaning you can generated isometric graphics on the command line.

```javascript
var Canvas = require('canvas');
var canvas = new Canvas(400, 400);
var Isomer = require('isomer'); // npm install isomer
var fs = require('fs');
var out = fs.createWriteStream('output.png');

var iso = new Isomer(canvas);
iso.add(Isomer.Shape.Prism(Isomer.Point.ORIGIN));

canvas.pngStream().pipe(out);
```

## More Info

For more info, check out the [official project page](http://jdan.github.io/isomer).
Expand Down

0 comments on commit 4d2e873

Please sign in to comment.