02:145.16: Attraction Behaviors in Toxiclibs VerletPhysics - The Nature of Code
From the creator
This video explains how to add an attraction behavior to a particle. Code: https://thecodingtrain.com/tracks/physics-libraries/physics-libraries/toxiclibs/4-attraction-behavior ๐น๏ธ p5.js Web Editor Sketch: https://editor.p5js.org/natureofcode/sketches/tjIs8XaXP ๐ฅ Previous: https://youtu.be/YskU_gJpc0c ๐ฅ Next: https://youtu.be/jrk_lOg_pVA References: ๐ Nature of Code: https://nature-of-code-2nd-edition.netlify.app/ ๐ ToxicLibs.js: http://haptic-data.com/toxiclibsjs/ ๐ ToxicLibs Java Reference: https://shiffman.github.io/toxiclibs-javadocs/ Videos: ๐ https://youtu.be/E67e0RX-7Ew Timestamps: 0:00 Introduction 0:56 Assign an attraction behavior to a particle 2:45 Strength of attraction 3:45 Faking collision-like behavior 6:39 Adding a new attraction behavior 7:14 The key word "this" 9:57 Suggested exercises Editing by Mathieu Blanchette Animations by Jason Heglund Music from Epidemic Sound ๐ Website: https://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 ๐ Membership: http://youtube.com/thecodingtrain/join ๐ Store: https://standard.tv/codingtrain ๐๏ธ Twitter: https://twitter.com/thecodingtrain ๐ธ Instagram: https://www.instagram.com/the.coding.train/ ๐ฅ https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH ๐ฅ https://www.youtube.com/playlist?list=PLRqwX-V7
Published 2015-08-08 ยท Watch on YouTube โ
Availability and playback restrictions are controlled by the original channel.





