Welcome to Chapter 4 of The Nature of Code: Particle Systems! I begin by coding a simple particle system in p5.js. I convert the Mover class into a Particle class, add a lifetime property and organize a collection of particles into an array

Timestamps:
0:00​ Welcome to chapter 4!
0:24​ Explain! What is a particle system?
1:24​ Explain! What do we have to code?
2:01​ Code! Let’s make a particle class!
2:46​ Code! Adding a lifetime property.
3:41​ Code! Many particles!
5:16​ Code! Emitting particles.
5:51​ Code! Removing finished particles from the array.
7:59​ Code! Let’s make a few tweaks to this system?
8:55​ What’s next?

🕹️ p5.js Web Editor Sketch: https://editor.p5js.org/codingtrain/s…

📄 Code of Conduct: https://github.com/CodingTrain/Code-o…

Subscribe: https://www.youtube.com/channel/UCvjgXvBlbQiydffZU7m1_aw

#javascript

Particle System Simulation in p5.js - The Nature of Code
2.00 GEEK