p5.js-website icon indicating copy to clipboard operation
p5.js-website copied to clipboard

(WIP) thumbnail fetcher prototype

Open davepagurek opened this issue 1 year ago • 0 comments

This is an attempt to see how feasible something like this would be. The idea is to open a Puppeteer window with the sketch we want to load, set the display density so that we can get a decently high res image, and then capture the contents of the canvas.

Some major drawbacks of this approach:

  • Haven't figured out yet how to hook these dynamically saved images into the Image component
  • Takes some time to load and save each one (I added a semaphore to make sure only 3 puppeteer windows run at once, I accidentally had all of them at once at first and my laptop did not like it)
  • Takes a bad screenshot of any sketch that needs user interaction.

davepagurek avatar Apr 11 '24 16:04 davepagurek