xxxxxxxxxx
function setup() {
createCanvas(windowWidth, windowHeight);
}
// Global
var nRows = 75;
function draw() {
background(100);
for(var i = 0; i <= nRows; i++) {
//top
stroke(map(mouseX, 0, width, 0, 255), map(i*10, 0, width, 0, 255), 70);
line(width/nRows*i, 0, mouseX, mouseY);
//bottom
stroke(map(mouseY, 0, width, 0, 255), map(i*10, 0, width, 0, 255), 100);
line(width/nRows*i, height, mouseX, mouseY);
}
}