p5.js is a client-side JS platform that empowers artists, designers, students, and anyone to learn to code and express themselves creatively on the web. It is based on the core principles of Processing. http://twitter.com/p5xjs —
function setup() {
createCanvas(400, 400);
saveGif('mySketch', 5, { units: "frames" });
noLoop();
}
function draw() {
background(220);
console.log("draw");
}
It'd be great to have the ability to create animated Gifs from graphics that aren't possible to create real-time (e.g. because each frame requires a web API call, which takes multiple seconds to complete). p5's redraw() function would be great for this to use (i.e. this invokes draw whenever a frame is ready to be added to the animation). Unfortunately, the current implementation of saveGif() does not seem to honor noLoop() - as the draw function is called periodically regardless.
Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, please make sure to fill out the inputs in the issue forms. Thank you!
Most appropriate sub-area of p5.js?
p5.js version
1.11.0
Web browser and version
130.0.6723.92
Operating system
macOS
Steps to reproduce this
Steps:
Snippet:
It'd be great to have the ability to create animated Gifs from graphics that aren't possible to create real-time (e.g. because each frame requires a web API call, which takes multiple seconds to complete). p5's
redraw()
function would be great for this to use (i.e. this invokes draw whenever a frame is ready to be added to the animation). Unfortunately, the current implementation ofsaveGif()
does not seem to honornoLoop()
- as the draw function is called periodically regardless.