ASSIGNMENT #6 - HTML + P5 DOM

For this assignment I used one of my previous sketches and switched out the slider for 2 buttons using html in order to change the object’s state.

My main struggle was I previously nested my for loops for the checkerboard background into 1. This were in draw. In this setup, the smiley/sad faces were constantly being placed under the background so I couldn’t see them. I tried to move the nested for loop into setup but it wasn’t working so I separated them back into separate for loops and it worked. I am sure there is a simpler way to do this but I couldn’t figure it out.

Screen Shot 2018-10-18 at 9.02.44 AM.png