+ 3

How do I make particles in JS

I have seen many amazing codes with a lot of small Spheres moving around Can anyone tell me how to make them

20th Sep 2020, 1:50 PM
Atoms~⚛
Atoms~⚛ - avatar
3 Answers
+ 6
You need something that'll render your graphics, since js is in the tag, I'll suggest the use of the HTML5 Canvas. Create random sphere with random velocities and that's all https://code.sololearn.com/W4BhdlGDum5E/?ref=app
20th Sep 2020, 2:13 PM
Mirielle
Mirielle - avatar
20th Sep 2020, 2:28 PM
Vadivelan
+ 2
In this example you can good see live and analyse how it can be done: https://code.sololearn.com/WC7OD8xAde5m/?ref=app
20th Sep 2020, 4:12 PM
JaScript
JaScript - avatar