xxxxxxxxxx
var counter = 0;
function setup() {
createCanvas(windowWidth, windowHeight);
background(0);
}
function draw() {
background(0);
//background(mouseY/10); //hintergrundfarbe ändert sich von dunkel zu hell
rectMode(CENTER);
translate(0, height / 2);
//mouseX/1000
//let num = map(mouseY*3, 0, width, 0, 200);
//let num = map(sin(millis()/1000), -1, 1, 10, 200);
let num = map( mouseY*2, 0, width, 0, 200);
for (let y = 0; y < num; y += 1) {
let rot = map(y, 0, num, 0, PI*8);
let posx = map(y, 0, num, 0, height);
//let col = map(0,y, 0, num, y*10);
//stroke(col);
push();
translate(width/2, posx-width*0.25);
rotate(rot);
noFill();
stroke(255,20,10);
rect(0, 0, 100+6*y, 100+6*y); // Verändern des Multiplikators lässt die Öffnung größer und kleiner werden
//arc(0, 0, 150, 150, 0, PI);
//line(0, 0, 100, 0);
pop();
}
}