Skip to content

coderdojo-malmo/processing-example-rectangle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

Processing Example: Rectangle

About

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.

Instructions

There are 8 git tags, named step-1 .. step-8, just checkout one step at the time.

git co step-1

Step-1 - Setup screen size

  • try to change the width and height

Step-2 - Draw a rectangle

Step-3 - Draw at mouse position

  • talk about X and Y, what can mouseX and mouseY represent?
  • try to add only mouseX first

Step-4 - Change rect color

Step-5 - Change background

  • try changeing background colors

Step-6 - If key is pressed

  • 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

Step-7 - Draw when mouse is pressed

  • only paint rectangle when mouse is pressed

Step-8 - Random color is fun

  • to make it more impressive, try a random number for the color :)

Releases

No releases published

Packages

No packages published