Setup your screen, draw a rectangle, move it around and change some colors.
Installing Processing and completing the following 8 steps took us about 90 minutes with 2-3 mentors and 5 kids.
There are 8 git tags, named step-1
.. step-8
, just checkout one step at
the time.
git co step-1
- try to change the width and height
- try to move it around
- try to change size
- show the documentation: http://www.processing.org/reference/rect_.html
- show that googleing for
processing rect
gives you help - try to change to rounded corners
- talk about X and Y, what can mouseX and mouseY represent?
- try to add only mouseX first
- talk about RGB, how colors are represented, relate to html/css
- try online at http://www.rapidtables.com/web/color/RGB_Color.htm
- try different combinations of fill
- try changeing background colors
- how to do something if a key is pressed.
- 'if key is pressed, do this'
- set background color to something new when a key is pressed
- only paint rectangle when mouse is pressed
- to make it more impressive, try a random number for the color :)