Skip to content

Instantly share code, notes, and snippets.

@leanda
Created June 10, 2017 10:17
Show Gist options
  • Save leanda/6ec49f08076ef8c07f4f44a31974c48c to your computer and use it in GitHub Desktop.
Save leanda/6ec49f08076ef8c07f4f44a31974c48c to your computer and use it in GitHub Desktop.
Draw x across the screen
function setup() {
createCanvas(windowWidth, windowHeight);
noFill();
}
function draw() {
background(255);
for (var x = 50; x <= width-50; x += 50) {
for (var y = 50; y <= height-50; y += 50) {
line(x-5, y-5, x+5, y+5);
line(x+5, y-5, x-5, y+5);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment