Feb 11, 2021
Loops and Conditionals
For this first sketch I utilized
- “mouseIsPressed” to trigger the clean slate
- “mousex” and “mousey” to create the painting effect that follows the cursor.
In my second sketch I utilized the variables below to create an ellipse that bounces around the boarders of the sketch while leaving a slight trail behind.
- variables x and y (along with width and height barriers)
- variables speed and speed y
My 3rd sketch utilizes a nested for loop to create a repeated design that features a gradient.
In this sketch I used a mouse is pressed function along with a makeshift hovering feature using “and” statements to create a sketch that holds a black rectangle, until hovered on which will turn it yellow, and if you press it, 3 more shapes will appear creating face.