mattdesl / canvas-sketch

[beta] A framework for making generative artwork in JavaScript and the browser.
MIT License
5.01k stars 393 forks source link

Programmatically trigger export for penplot #122

Closed Andrewglass1 closed 2 years ago

Andrewglass1 commented 3 years ago

Hello,

Is it possible to automatically trigger an svg export for a penplot sketch using canvas-sketch-cli? Thank you and thank you for this incredibly helpful library.

mattdesl commented 3 years ago

I don't think it's possible triggering it from the Node.js CLI at the moment. If you are in the frontend (the client JS) you can run props.exportFrame() from your code, e.g. triggering it from a window level event (mouse click, or maybe even a websocket message).

mattdesl commented 2 years ago

Closing as hopefully exportFrame should suffice.