Save an array of graphics objects as zip?

So I have an array of objects created with createGraphics() and I want to download them all in a zip file, instead of just downloading them one by one with save().

I've looked briefly at js librarys such as jszip and zip.js, but just want to see if anyone else has done something similar before diving in to it.

Answers

  • _vk_vk
    edited November 2015

    Don't know about zip. Bt you cold use saveFrames() to loop trough an array and save all in one pass .

    HEALTH WARNING: see post below :)

  • edited November 2015

    saveFrames should come with a serious health warning: it can invoke a large number of save image dialogues which are far from practical to use and can crash your browser. Search and you'll find several recent threads (such as this one) discussing its use, including use of a callback function. The latter should in theory allow wrapping several frames into a zip file. Not sure if there's support for this in p5js yet, but there are JS libraries (such as jszip) available that do this...

Sign In or Register to comment.