0

[CANVAS] repeat infinitly creting circles

here is the demo : https://code.sololearn.com/WzRcgzM411L1/?ref=app can you help me to do this idea infinitly BUT optimized ? thanks

19th Mar 2018, 6:41 PM
NoxFly
NoxFly - avatar
4 ответов
+ 7
You should create a circle object that accepts x and y coordinates , radius and color. You also need an array where you add new circles. Now, using RequestAnimationFrame or setInterval, check if the radius of the last circle in the array reaches your desired max radius. If it does, push another circle in the array.
19th Mar 2018, 11:03 PM
Jonathan Pizarra (JS Challenger)
Jonathan Pizarra (JS Challenger) - avatar
+ 3
x)
21st Mar 2018, 4:06 PM
NoxFly
NoxFly - avatar
+ 1
Hi
20th Mar 2018, 5:50 AM
Ahmed Hassoun
Ahmed Hassoun - avatar
+ 1
the animated name changer is really cool
21st Mar 2018, 4:00 PM
Daron Anderson
Daron Anderson - avatar