We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6d70c7a + 9d7cde2 commit 026ea70Copy full SHA for 026ea70
src/image/loading_displaying.js
@@ -317,6 +317,14 @@ p5.prototype.saveGif = async function(
317
// stop the loop since we are going to manually redraw
318
this.noLoop();
319
320
+ // Defer execution until the rest of the call stack finishes, allowing the
321
+ // rest of `setup` to be called (and, importantly, canvases hidden in setup
322
+ // to be unhidden.)
323
+ //
324
+ // Waiting on this empty promise means we'll continue as soon as setup
325
+ // finishes without waiting for another frame.
326
+ await Promise.resolve();
327
+
328
while (frameIterator < totalNumberOfFrames) {
329
/*
330
we draw the next frame. this is important, since
0 commit comments