HyperWerk - Processing workshop - January 2004
Day 3: Interaction & response - slide 01
 


Some leftovers

One more drawing command:
- image(), loadImage(), BImage, tint(), noTint()
One more motion generator: Direction & speed


Interaction & response

- mouseX, mouseY
- mouseMoved()
- mousePressed()
- mouseDragged()
- keyPressed()


Exercises

IN01: Create two images and load them into Processing. Switch between images when the user clicks the mouse button.

IN02: Use mouseX and mouseY to make an object follow the mouse. Animate the object as it moves.

IN03: Make a program that draws when mousePressed() or mouseDragged() are called. Use keyPressed() to change the look of the drawing style (i.e. shape, stroke weight, color etc.)


Links

Files from day 3

 
HyperWerk, Basel 2004 - Marius Watz
Back to index - Next slide