CodingTrain / CodingTrain/Suggestion-Box

I have a while() loop question!!

Open
#291 3 comments 0 reactions 0 assignees View on GitHub
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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.