Ask coding questions

← Back to all posts
wont work
JacksonD9
Voters
JacksonD9
Comments
hotnewtop
Coder100

hi you have added some code that is severely lagging your website because p5js runs everything inside the draw function 60 times, and you are attaching an event that isn't super fast to do, so that's why nothing looks like its happening.

Remove the code, and perhaps look at mouseClicked?
https://p5js.org/reference/#/p5/mouseClicked