File tree 1 file changed +7
-3
lines changed
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -420,15 +420,19 @@ p5.prototype.saveGif = function(pImg, filename) {
420
420
* as an argument to the callback function as an array of objects, with the
421
421
* size of array equal to the total number of frames.
422
422
*
423
- * Note that <a href="#/p5.Image/saveFrames">saveFrames()</a> will only save the first 15 frames of an animation.
423
+ * The arguments `duration` and `framerate` are constrained to be less or equal to 15 and 22, respectively, which means you
424
+ * can only download a maximum of 15 seconds worth of frames at 22 frames per second, adding up to 330 frames.
425
+ * This is done in order to avoid memory problems since a large enough canvas can fill up the memory in your computer
426
+ * very easily and crash your program or even your browser.
427
+ *
424
428
* To export longer animations, you might look into a library like
425
429
* <a href="https://github.com/spite/ccapture.js/">ccapture.js</a>.
426
430
*
427
431
* @method saveFrames
428
432
* @param {String } filename
429
433
* @param {String } extension 'jpg' or 'png'
430
- * @param {Number } duration Duration in seconds to save the frames for.
431
- * @param {Number } framerate Framerate to save the frames in.
434
+ * @param {Number } duration Duration in seconds to save the frames for. This parameter will be constrained to be less or equal to 15.
435
+ * @param {Number } framerate Framerate to save the frames in. This parameter will be constrained to be less or equal to 22.
432
436
* @param {function(Array) } [callback] A callback function that will be executed
433
437
to handle the image data. This function
434
438
should accept an array as argument. The
You can’t perform that action at this time.
0 commit comments