Day 5: Make Code Interactive
Day 5: Make Code Interactive
VIDEO LESSON
Today's Topics:
Mouse input
mouseX, mouseY
mouseIsPressed
Keyboard input
keyPressed()
Key codes
Event functions
saveCanvas()
RESOURCES
reference sheet:
template:
note: You may not be able to fully view the sketches above -- open them in a new tab! Double click the sketch title and press "open in new tab." Click </> in the top right corner to view the code!
demo:
REFLECTION QUESTIONS
What are some ways your code can respond to a person's mouse or keyboard?
What is one interaction you added to your project? What happens when someone interacts with it?
If you could make your project respond to one more action, what would you choose?