xxxxxxxxxx
let content = "You can rotate, crop, sign and draw on PDFs and images directly on your Mac desktop — and even on your iPhone or iPad. To get started with Markup, select a file on your Mac, press the Space bar, then click the Markup icon.\n\nWith Stacks, the files on your desktop are automatically organised into related groups — so you can find that important spreadsheet whenever you need it. Just click the desktop, then choose View > Use Stacks.";
// 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(220);
let num = map(mouseX, 0, width, 0, 200);
//let num = map(sin(millis()/1000), -1, 1, 10, 200);
for (let y = 0; y < num; y += 1) {
let rot = map(y, 100, num, 10, PI);
let posx = map(y, 0, num, 0, width);
//let col = map(y, 0, num, 0, 255);
//stroke(col);
push();
translate(posx, 500);
rotate(rot);
noFill();
stroke(0, 0, 0);
ellipse(50, 50, 150, 150, 10);
//arc(0, 0, 150, 150, 0, PI);
//line(0, 0, 100, 0);
pop();
}
// Wort
textSize(250);
textAlign(CENTER, CENTER);
fill(120);
//noStroke();
text("tools", width/2, height/2);
// Hilfe Text
fill(0);
textSize(32);
text("?", 15, 20);
if (mouseX > 0 && mouseX < 30 && mouseY > 0 && mouseY < 30) {
cursor(HAND);
text(content, 20, 40, 500, height);
//text(content, 20, 40, width-20, height-20);
}
else {
cursor(ARROW);
}
}
// Bild speichern
function keyPressed() {
if (key == "s") {
save('tool_grafik.png');
}
}