Create a new Open Processing sketch.
Open your sketch “icecreamcone”. Save as a Fork and name it icecreamcone_mXmY.
Change your code so that the color of your ice cream changes based on the location of your mouse.
Make sure the ice cream is inside the cone (not on top of the cone).
When you move the mouse, are there areas of the screen where the mouse doesn’t change the ice cream color? Why?
- (Advanced/Not Required: Check out the “map()” function at p5js.org for a way around this…)
Is there a limit to the colors you can choose using
mouseY inside the
fill() function? Why?
Go back to: Variables