4.3: Particle Systems with Inheritance - The Nature of Code
Описание
Have you ever wondered how the concepts of inheritance and polymorphism fit into the Nature of Code Particle system examples in p5.js? Code: https://thecodingtrain.com/tracks/the-nature-of-code-2/noc/4-particles/3-particle-inheritance
🕹️ p5.js Web Editor Sketch: https://editor.p5js.org/codingtrain/sketches/vYgv7Xagg
🎥 Previous: https://youtu.be/8a5BkwuZRK0?list=PLRqwX-V7Uu6ZV4yEcW3uDwOgGXKUUsPOM
🎥 Next: https://youtu.be/pUhv2CA0omA?list=PLRqwX-V7Uu6ZV4yEcW3uDwOgGXKUUsPOM
🎥 All: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZV4yEcW3uDwOgGXKUUsPOM
Other videos mentioned in this video:
🎥 Inheritance in JavaScript: https://youtu.be/MfxBfRD0FVU
🎥 Polymorphism in JavaScript: https://youtu.be/8a5BkwuZRK0
Timestamps:
0:00 Hi!
0:27 Make particle extend p5.Vector.
1:23 Let's make a class that extends Particle.
2:52 Javascript file order matters, sometimes.
3:26 We need to use the Confetti class.
4:00 What if we want both confetti and particles.
4:32 Some exercises you could try.
4:47 When might you want to extend a class?
5:52 What's next?
Editing by Mathieu Blanchette
Animations by Jason Heglund
Music from Epidemic Sound
🚂 Website: http://thecodingtrain.com/
👾 Share Your Creation! https://thecodingtrain.com/guides/passenger-showcase-guide
🚩 Suggest Topics: https://github.com/CodingTrain/Suggestion-Box
💡 GitHub: https://github.com/CodingTrain
💬 Discord: https://thecodingtrain.com/discord
✪ Nebula: https://go.nebula.tv/codingtrain
💖 Membership: http://youtube.com/thecodingtrain/join
🛒 Store: https://standard.tv/codingtrain
🖋️ Twitter: https://twitter.com/thecodingtrain
📸 Instagram: https://www.instagram.com/the.coding.train/
🎥 Coding Challenges: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
🎥 Intro to Programming: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA
🔗 p5.js: https://p5js.org
🔗 p5.js Web Editor: https://editor.p5js.org/
🔗 Processing: https://processing.org
📄 Code of Conduct: https://github.com/CodingTrain/Code-of-Conduct
Рекомендуемые видео




















