Skip to content

Instantly share code, notes, and snippets.

@lmccart
Created January 29, 2014 21:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lmccart/8697477 to your computer and use it in GitHub Desktop.
Save lmccart/8697477 to your computer and use it in GitHub Desktop.
// mouse events - mousePressed(), mouseReleased(), mouseMoved(), mouseDragged()
// runs once each time unlike mousepressed
var gray = 0;
function setup() {
createGraphics(600, 400);
}
function draw() {
background(gray);
}
function mousePressed() {
gray += 20;
console.log(gray)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment