Deepwatch

Keyboard shortcuts

Space or k
Play or pause
j and l
Back or forward 10 seconds
Left and right arrows
Back or forward 5 seconds
f
Fullscreen
m
Mute or unmute
Shift and < or >
Slower or faster
?
Show or hide this list

5.16: Attraction Behaviors in Toxiclibs VerletPhysics - The Nature of Code

The Coding Train, 12 min, 7.2K views, Aug 8, 2015

Chapters

Show description

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-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 This description was auto-generated. If you see a problem, please open an issue: https://github.com/CodingTrain/thecodingtrain.com/issues/new #physicsengine #toxiclibs #attraction #java

When you're done