xxxxxxxxxx
41
let builders = [];
let cols = ["#121617","#002d7a","#3a5fcf","#2fc2ee","#96e5ed","#f1e4ed","#917bb7","#db3a34","#ff661f","#ffb41f"];
let c = 20;
let y = 0;
let xoff = 0.001;
let noiseoff = 1000;
let ns = 0;
function setup() {
createCanvas(600, 400);
for(a = 0; a < width / c + 1; a ++){
for(b = 0; b < height / (4); b++){
builders[builders.length] = new Builder(a * c, b * c, builders.length);
}
}
background(0);
// blendMode(ADD);
}
function draw() {
noiseSeed(34);
background(0, 190);
// for(a = 0; a < width / 10; a++){
// for(b = 0; b < height / 10; b++){
// noStroke()
// fill(noise(a*10 / noiseoff, b * 10 / noiseoff, xoff) * 255);
// rect(a * 10, b * 10, 10);
// }
// }
for(i = 0; i < builders.length; i++){
if(builders[i] !== undefined){
builders[i].move();
}
}
xoff = xoff + 0.001;
}
function mousePressed(){
ns = ns + 1;
return false;
}