Aktionen

Benutzer

Justus: Unterschied zwischen den Versionen

Aus exmediawiki

Justus (Diskussion | Beiträge)
Justus (Diskussion | Beiträge)
Zeile 5: Zeile 5:
break
break


Code:
==Code01:==


function setup() {
function setup() {
Zeile 29: Zeile 29:


https://editor.p5js.org/jkfmn/full/-Do64urgx
https://editor.p5js.org/jkfmn/full/-Do64urgx
==Code02:==
function setup() {
  createCanvas(400, 600);
  noLoop(); //Loop an/aus
  noFill();
 
}
function draw() {
  background(220);
 
  let rectHeight = random(50, 100); //variable für die des dreiecks vergeben
  let rectWidth = random(50, 100);
  let rectX = width/2 - random(50,100)/2; //einfach Wert durch random() ersetzt
  let rectY = height/2 - random(50,100)/2;
 
 
  rect(rectX,rectY,rectWidth,rectHeight)
 
  //how to safe the singular frames???
 
}
https://editor.p5js.org/jkfmn/full/pf3QVzbWD
<br>
<br>
<br>

Version vom 12. Mai 2025, 15:08 Uhr

120525


break

Code01:

function setup() {

 createCanvas(400, 400);
 noFill();
 

}

function draw() {

 background(220);
 rect(width / 2 - 100 / 2, height / 2 - 100 / 2, 100, 100);
 rect(width / 2 - 200 / 2, height / 2 - 250 / 2, 200, 250);
 rect(width / 2 - 150 / 2, height / 2 - 230 / 2, 150, 230);
 rect(width / 2 - 40 / 2, height / 2 - 40 / 2, 40, 40);
 rect(width / 2 - 190 / 2, height / 2 - 260 / 2, 190, 260);

}





https://editor.p5js.org/jkfmn/full/-Do64urgx



Code02:

function setup() {

 createCanvas(400, 600);
 noLoop(); //Loop an/aus
 noFill();
 

}

function draw() {

 background(220);
 
 let rectHeight = random(50, 100); //variable für die des dreiecks vergeben
 let rectWidth = random(50, 100);
 let rectX = width/2 - random(50,100)/2; //einfach Wert durch random() ersetzt
 let rectY = height/2 - random(50,100)/2;
 
 
 rect(rectX,rectY,rectWidth,rectHeight)
 
 //how to safe the singular frames???
 

}


https://editor.p5js.org/jkfmn/full/pf3QVzbWD