CodingTrain / CodingTrain/Suggestion-Box

I have a while() loop question!!

Aperta
#291 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Question Solved
Lingua principale
Nessun dato sulla lingua
Stelle
570
Fork
85
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

My goal is to draw a circle at the begining and to make it grow. I can't find the problem to my code in the while loop..

Here's my code:

function setup() {
createCanvas(400, 400);
background(51);
}
function draw() {
Circle(150, 100);

while(Circle.size < 400) {
Circle.size = Circle.size + 1;
Circle();
}
}

var Circle = function circle(color, size) {
noStroke();
this.color = fill(color);
ellipse(width/2, height/2, size, size);
}

Please help..

-Max

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Start with the code in the issue, focusing on setup(), draw(), the while loop, and Circle. Run the example in the project context and compare its behavior with the stated goal: draw a circle at the beginning and make it grow.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
javascript
Ambito
frontend
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
20/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.