2.1 – Setup, Draw, and Mouse Interaction

Error handling

  • Typos, line handling, multiple errors
  • println();
Program flow
  • Applications run over a period of time
  • void setup(){} –> Happens once
  • void draw() {} –> Happens over and over again
  • Blocks of code –> {}
  • background(); –> Difference between setup and draw
  • smooth();
Events
  • mouseX and mouseY
  • pmouseX and pmouseY
  • void mousePressed(){}
  • void keyPressed(){}
  • void mouseDragged(){}
Print this page

Leave a Reply

Your email address will not be published. Required fields are marked *