I'm using https://github.com/and-who/react-p5-wrapper to have p5 in my React file. I've a question about doing things asynchronously.
So in my Sketch file, instead of
p5.keyPressed = () => {
...
...
bunch of chaining setTimeout (..., 1000)
}
Can I do,
async p5.keyPressed = () => {
...
...
await p5.delay(1000)
}
What's the right syntax to do this?