Is there a way to manipulate OffscreenCanvas with p5? As far as I understand the source code, createGraphics
does not use it.
Short answer: not yet
OffscreenCanvas is still not entirely supported by all browsers but it has been announced that this should be resolved this year.
We’ve discussed this on the p5.js Discord before and here is what @davepagurek had to say about OffscreenCanvas:
If you’re specifically interested in offscreen buffer performance, you might want to check out Dave’s p5.framebuffer library.
I hope this helps. Let me know if you have any other questions.
3 Likes
As @sableRaph 's answer points out, p5 doesn’t support OffscreenCanvas yet.
However, I wrote a small wrapper to do the trick: GitHub - Real-John-Cheung/p5.OffscreenCanvas: A library for manipulating OffscreenCanvas with p5 . Hope it helps if you need something like this
2 Likes