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.
- Host: GitHub
- URL: https://github.com/sametcodes/p5-recorder
- Owner: sametcodes
- License: mit
- Created: 2019-02-25T20:28:28.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-02-26T07:13:09.000Z (over 7 years ago)
- Last Synced: 2026-01-29T21:26:53.130Z (4 months ago)
- Topics: canvas, gif, p5js, recorder
- Homepage:
- Size: 470 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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/