Skip to content

Instantly share code, notes, and snippets.

@claytical
Created January 20, 2016 16:35
Show Gist options
  • Save claytical/dcbdc400c7eef0bf7cb7 to your computer and use it in GitHub Desktop.
Save claytical/dcbdc400c7eef0bf7cb7 to your computer and use it in GitHub Desktop.
Adding
var x = 0;
function setup() {
createCanvas(400,400);
/* variables declared inside of a function are
only available in that specific function.
*/
}
function draw() {
ellipse(x, 40, 10, 10);
x = x + 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment