Help with P5.js Project


I’m new to coding and I’m struggling trying to get my code to do what I want it to.
My idea was to have 4 different buttons that, when clicked, change the colour scheme of the composition and have a unique effect that can only happen when that specific button is pressed (example: rain pouring, birds flying in when mouse is clicked, etc.).
I’ve come up with code for some of the individual pieces but can’t figure out how to put it all together and make it function properly. Any ideas on how I might be able to make this work? (And feel free to let me know how I can clean up my code/make it more efficient).

This is my code right now:

And this is a separate code for the birds I wanted to put in:

1 Like

after the first 2 hard coded buttons it is a good idea to ask.

step 1: use variables and functions

next… here

1 Like