CodingTrain / CodingTrain/Suggestion-Box
I have a while() loop question!!
Open
Question
Solved
- Dominant language
- No language data
- Stars
- 570
- Forks
- 85
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.