xxxxxxxxxx
let content = "how to \n move your mouse accross the screen to move the half circles, creating a rotation tube! \n \npress s and a screenshot will be created automatically! ";
// Umbrüche sind als \n (break) im Text zu deklarieren
let sora;
// Font laden
function preload() {
sora = loadFont('Sora-SemiBold.ttf');
}
function setup() {
createCanvas(1920, 1080);
textFont(sora); // Font setzen
}
function draw() {
background(0);
// Euer Code
//noFill();
//stroke(50);
//for (x=0; x<width; x+=1+mouseX/2)
// ellipse(x, height/2, sin(millis()/1000)*400, mouseY+sin(millis()/1000)*400);
var counter = 0; //code start
//function setup() {
// createCanvas(windowWidth, windowHeight);
// background(0);
//
//function draw() {
//background(0);
rectMode(CENTER);
translate(4, height / 2);
mouseX/1000
let num = map(mouseX, 0, width, 0, 200);
for (let y = 0; y < num; y += 1) {
let rot = map(y, 0, num, 90, PI);
let posx = map(y, 0, num, 0, width);
//let col = map(y, 0, num, 0, 255);
//stroke(col);
push();
translate(posx, 0);
rotate(rot);
noFill();
stroke(255);
stroke (200,60,90)
//rect(0, 0, 300, 150);
rect(1000, 300, 0, 0);// tiny sparkles
rect(0, 0, 300, 0); //line
arc(0, 0, 300, 300, 0, PI);//half circle
//line(300, 0, 0, 0);
//line(-300, 0, 0, 300);
//line(0, 500, 0, 0);
//line(0, -500, 0, 0);
pop();
}
//code end
// Wort
textSize(250);
textAlign(CENTER, CENTER);
fill(200,60,90);
//noStroke();
text("find", width/2, height/800);
// Hilfe Text
fill(200);
textSize(32);
text("?", 20, -525);
if (mouseX > 0 && mouseX < 30 && mouseY > 0 && mouseY < 30) {
cursor(HAND);
text(content, 500, -400, 500, height);
//text(content, 20, 40, width-20, height-20);
}
else {
cursor(ARROW);
}
}
// Bild speichern
function keyPressed() {
if (key == "s") {
save('tool_grafik.png');
}
}