Created
November 13, 2017 19:11
-
-
Save lizzybrooks/e4e30ee0c9598776d9214d73cebf0d35 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var button; | |
function setup() { | |
createCanvas(400, 400); | |
background(0); | |
button = createButton('click me'); | |
button.position(19, 19); | |
//object.mousePressed(function() { yourFunction(yourInputs);}); | |
button.mousePressed(function() {makeCircle(random(0,400),random(0,400));}); | |
} | |
function draw(){ | |
makeCircle(200,200); | |
} | |
function changeBG() { | |
var val = random(255); | |
background(val); | |
} | |
function makeCircle(x,y) { | |
ellipse(x,y, 50,50); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment