xxxxxxxxxx
37
function setup() {
createCanvas(20, 1440);
noLoop();
}
function draw() {
background(255);
stroke(0);
fill(255)
rect(0, 0, 20, 1440, 2)
var cellHeight = (1440/8)/8;
var activeTile = 0;
for( var i = 0 ; i < 1440 ; i+=(1440/8))
{
stroke(0)
line(0, i, 20, i);
for( var y = 0 ; y < 8 ; y++)
{
if(y == activeTile)
fill(random(100, 255), random(100, 255), random(100, 255))
else
fill(255)
rect(0, i+y*cellHeight, 20, cellHeight);
}
activeTile += 1;
}
saveCanvas('gridVSlider', 'png');
}