Creating a Visual in p5.js
- Kimberly Agosto
- Dec 7, 2018
- 1 min read
I created a visual in p5.js using function draw() and I used rect to make different sized rectangles. I had two variables that I used to create a series of boolean logic statements that made my shapes move x and y positions, and also change their width and height positions if I wanted to manipulate them. The challenges in this sketch was figure out what the boolean logic did to each of the parameters of the shape, and I had to do multiple test trials before I was set on having the variable interact with parameters of certain shapes.
code: https://editor.p5js.org/kimagosto/sketches/HJu-f63pm
screenshot of canvas:

Comentários