Skip to content

Instantly share code, notes, and snippets.

@lizzybrooks
Forked from nataliefreed/showMouseCoordinates.js
Created September 15, 2017 21:54
Show Gist options
  • Save lizzybrooks/d42cd17ea682717970717d6d1c5bef69 to your computer and use it in GitHub Desktop.
Save lizzybrooks/d42cd17ea682717970717d6d1c5bef69 to your computer and use it in GitHub Desktop.
function setup() {
}
function draw() {
drawMouseCoordinates();
}
function drawMouseCoordinates() {
push();
noStroke();
fill(255);
rect(0, 0, 75, 30);
fill(0);
stroke(0);
text(mouseX + ", " + mouseY, 10, 20);
pop();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment