xxxxxxxxxx
25
function setup() {
createCanvas(400, 400);
colorMode(HSB);
}
function draw() {
background(0);
// let xinc = map(mouseY, 0, height, 1, 50);
// xinc = constrain(xinc, 1, Infinity);
// for (let x = 0; x < width; x += xinc) {
// let h = (map(x, 0, height, 0, 360) + frameCount) % 360;
// line(x, 0, x, height);
// }
let yinc = map(mouseX, 0, width, 1, 50);
yinc = constrain(yinc, 1, Infinity);
for (let y = 0; y < height; y += yinc) {
let h = (map(y, 0, height, 0, 360) + frameCount) % 360;
stroke(h, 255, 255);
strokeWeight(4);
line(0, y, width, y);
}
}