An open API service indexing awesome lists of open source software.

https://github.com/sametcodes/p5-recorder

A simple class for creating gif on p5.js canvas.
https://github.com/sametcodes/p5-recorder

canvas gif p5js recorder

Last synced: 4 months ago
JSON representation

A simple class for creating gif on p5.js canvas.

Awesome Lists containing this project

README

          

## p5-recorder
p5-recorder is a deadly simple class that be able to create gif from `canvas` for [p5.js](https://p5js.org/). Depends on [CCapture.all.js](https://github.com/spite/ccapture.js/blob/master/build/CCapture.all.min.js) and [gif.worker.js](https://github.com/jnordberg/gif.js/blob/master/dist/gif.worker.js)

### Usage
```javascript
var recorder;

function setup(){
recorder = new P5Recorder({gifLength: 100});
createCanvas(windowWidth, windowHeight);
}

function draw(){
//draw something on canvas...
recorder.capture(frameCount);
}
```

Don't forget to include the dependencies.
```html

```

### Example
https://selmansamet.github.io/p5-recorder/examples/