update readme with exmaple and dev commands

pull/1/head
Chad von Nau 2015-11-09 03:01:12 -08:00
rodzic 7f419661f7
commit 6e8e49f494
1 zmienionych plików z 25 dodań i 0 usunięć

Wyświetl plik

@ -5,3 +5,28 @@ This is a POC oscilloscope emulator with [live demo](http://m1el.github.io/wosco
Full explanation available on [the blag](http://m1el.github.io/woscope-how/)
Code is available under MIT license.
### Example
```html
<audio id="myAudio" controls src="woscope-music/khrang.mp3"></audio><br>
<canvas id="myCanvas" width="800" height="800"></canvas>
<script src="dist/woscope.js"></script>
<script>
var myCanvas = document.getElementById('myCanvas'),
myAudio = document.getElementById('myAudio');
woscope({
canvas: myCanvas,
audio: myAudio,
callback: function () { htmlAudio.play(); }
});
</script>
```
### Dev commands
```sh
npm install # install dev dependencies
npm run demo # run demo locally with livereload
npm run build # build dist files
npm run lint # check source files with jshint
```