Open JannikIbsen opened 7 years ago
Hi Jannik!
Thanks! Yeah, Winnie also pointed the for loops out, but thank you for adding how to merge them (as I wasn't really sure how to do so)!
I really like your suggestion - can you name a function or something I can look up for something that could kill the function? I would love to hear your suggestion for how to do something like that so I can look it up myself as well!
Again, thanks!
I really like the concept behind the program and how you aim to challenge our understanding of something as basic as a circle.
Your code is super clean and easy to follow, the only minor adjustment i would make in terms of performance would be the following:
You have two for loops which you could merge into one:
for (var i = 0; i < numOfThings; i++) { //for loop to ensure random coordinates posX[i] = random(width); posY[i] = random(height); }
As for suggestions, i think it would look super cool if you make a "kill" function for the circles, so after a certain amount has spawned they will dissapear, providing more of a "flow" in the user experience so you don't end up with a complete white screen due to overlap.
Also, changing the FPS gives quite an interesting look :)