xxxxxxxxxx
35
/*
Part 1
1. Do some debugging. Unscramble the code to create what you see on the screen. One thing at a time. Start with what you recognize.
2. (Extra) Add color in some way
*/
let total = 20;
let columnWidth;
function setup() {
stroke(0);
strokeWeight(2);
createCanvas(windowWidth, windowHeight);
// let from = color(240, 128, 128);
// let to = color(178, 34, 34);
// // let interA- lerpColor(from, to, 0.33)
}
function draw() {
background(255, 30);
columnWidth = width / total;
for (let counter = 0; counter < total; counter++) {
let x = counter * columnWidth;
let y = height / 4;
let colHeight = height / 3;
rect(x, y, columnWidth, colHeight);
}
}