xxxxxxxxxx
34
/*
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. Add color in some way
*/
let total = 50;
let columnWidth;
let t = 0;
function setup() {
createCanvas(windowWidth, windowHeight);
columnWidth = width / total;s
noFill();
noStroke();
background(255);
strokeWeight(2);
}
function draw() {
for (let counter = 0; counter < total; counter += 3) {
let x = counter * columnWidth;
let y = height / 4;
let colHeight = height / 3;
fill(noise(t+10)*255,noise(t+50)*255,noise(t+100)*255);
t += 0.001;
rect(x, y, columnWidth, colHeight);
}
}