p5.js-website
p5.js-website copied to clipboard
(WIP) thumbnail fetcher prototype
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
Imagecomponent - 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.