Day 8
Objective: SWBAT (Students will be able to…)
- Differentiate between local and global variables (variable scope)
- Track movement of the mouse
- Use the following built-in variables:
mouseX
,mouseY
,pmouseX
,pmouseY
,mousePressed
,mouseButton
- Use the following built-in functions:
mouseClicked()
,mouseDragged()
- Use the following built-in variables:
Agenda
- Discuss variable scope
- Go over techniques for tracking mouse movement
- Review built-in variables
- Day 8 Assignment:
Processing the Mouse
Source Files
Optional
Assignment: BYL (Before you leave…)
- Complete the Sparkfun Activity:
Processing the Mouse
- Extend the program’s functionality by adding more variables and user interaction
- Create your own original program that interacts with the movements and events associated with the mouse (
mousePressed
,mouseClicked()
,mouseDragged()
) - Optional: Add “easing” to track your mouse movements more smoothly (see Sketch 5-8 and Sketch 5-9 - pg. 54-56 in GSP)