How do i save a canvas on p5js web editor after drawing on it?

Viewed 92

Screenshot

The save function only saves the board as it starts, how do I save the canvas after drawing on it?

1 Answers

Add the following to your sketch. On my system it places the image in the Downloads folder.

function keyTyped() {
  if (key == 's') {
    saveCanvas('photo', 'png');
  }
}
Related