Ccapture to save graphics vs canvas

In fact ccapture is made for <canvas> element and not for p5.js, you need to pass an element. You can get a reference by graphics.elt so you can write

  capturer.capture(newGraphic.elt)

I haven’t checked the result but the code seems running.

(Initially I was lazy to search for ccapture, and you can blame me for the laziness, but if you would’ve added a link to ccapture it may have been a bit easier… I understand you cannot give the whole code but it is always a good practice to provide all the information when you ask on a forum)

2 Likes