xxxxxxxxxx
var counter = 0;
function setup() {
createCanvas(windowWidth, windowHeight);
background(0);
}
function draw() {
background(0);
rectMode(CENTER);
translate(0, 0);
mouseX/1000
let num = map(mouseX, 0, width, 0, 200);
for (let y = 10; y < num; y += 1) {
let rot = map(y, 4, num, 0, PI);
let posx = map(y, 1, num, 0, width);
push();
translate(posx, 0);
rotate(rot);
noFill();
stroke(6,0,255);
line(0, 0, 500, 0);
pop();
}
}