Skip to content

Instantly share code, notes, and snippets.

@mimetaur
Created November 1, 2019 16:54
Show Gist options
  • Save mimetaur/72043a3175a922364243df350e26767e to your computer and use it in GitHub Desktop.
Save mimetaur/72043a3175a922364243df350e26767e to your computer and use it in GitHub Desktop.
Code 1 2019 - Week 6 Sketch #3 Solution
function setup() {
createCanvas(400, 400);
}
function draw() {
background(227);
rectMode(CENTER);
fill(0, 120, 180);
drawGrid();
}
function drawGrid() {
for (let i = 40; i < width; i = i + 40) {
for (let j = 40; j < height; j = j + 40) {
rect(i, j, 30, 30);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment