Arrays - p5.js Sketch #5
- anmonaco
- Dec 8, 2018
- 1 min read
Updated: Dec 9, 2018
I created a sketch of a thanksgiving table. I put all of my favorite thanksgiving foods into the array. Next I created this table and background using shapes. After that I added images for some of the items on the table. Then I had to find images of all the foods, and after making them transparent, defined the array so that when the words were clicked on, the food images would change with the array.
One of the challenges I faced was making the array change in conjunction with the image. I solved this by defining each image to a particular corresponding number in the array. In the end I added a random function for the color of the food, and my thanksgiving dinner sketch was fully finished!
Here is the link to my sketch: https://editor.p5js.org/anna10128/sketches/rJUhmWiAm

Comments