xxxxxxxxxx
26
function setup() {
createCanvas(1000, 1000);
noLoop();
angleMode(DEGREES);
}
function randomInteger (min, max) {
return Math.floor(min + ((max-min) * Math.random()))
}
function pick (inputArray) {
return inputArray[randomInteger(0,inputArray.length)]
}
function draw() {
background(220);
let toastRed = 0;
let toastBlue = 255;
for (let i = 0; i < 25; i++) {
toastRed = toastRed + 20;
toastBlue = toastBlue -20;
fill(255 * Math.random(),255 * Math.random(),255 * Math.random());
rect(300 + 2* 20 + (i*20), 2* 190, 2* 10, 2* 10)
}
}