xxxxxxxxxx
function setup() {
createCanvas(windowWidth, windowHeight);
//background(100);
}
function draw() {
background(0);
for(let x = 0; x < width; x = x + 1){
stroke (255, map(x, 0, width, 255, 0), 0)
line (x, 0, mouseX, mouseY)
stroke (0, map(x, 0, width, 255, 127), map(x, 0, width, 0, 255))
line (x, height, mouseX, mouseY)
}
for(let y = 0; y < height; y = y + 1){
stroke (map(y, 0, height, 255, 0), 255, 0)
line (0, y, mouseX, mouseY)
stroke (map(y, 0, height, 255, 0), map(y, 0, height, 0, 127), map(y, 0, height, 0, 255))
line (width, y, mouseX, mouseY)
}
}