Back to Browse

Coding Challenge 177: Soft Body Physics

180.5K views
Apr 13, 2023
29:08

Embark on a squishy adventure as I attempt to create a soft body physics simulation for a character with toxiclibs.js and p5.js! Code: https://thecodingtrain.com/challenges/177-soft-body-character πŸš€ Watch this video ad-free on Nebula https://nebula.tv/videos/codingtrain-coding-challenge-177-soft-body-character p5.js Web Editor Sketches: πŸ•ΉοΈ Soft Body Character: https://editor.p5js.org/codingtrain/sketches/2PInK4yQ2 πŸ•ΉοΈ Soft Body Character Enhanced: https://editor.p5js.org/codingtrain/sketches/6hhdl9omt πŸ•ΉοΈ Soft Body Dancing Skeleton: https://editor.p5js.org/codingtrain/sketches/dg1wrHrpg πŸ•ΉοΈ Soft Body Letters: https://editor.p5js.org/codingtrain/sketches/8MyUnoi13 πŸ•ΉοΈ Blank Canvas: https://editor.p5js.org/codingtrain/sketches/ccwlnhtji πŸŽ₯ Previous video: https://youtu.be/h5ZNcAPXxew?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH πŸŽ₯ All videos: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH 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/ πŸ”— Advanced Character Physics: http://www.cs.cmu.edu/afs/cs/academic/class/15462-s13/www/lec_slides/Jakobsen.pdf πŸ”— Thi.ng: https://thi.ng/ Videos: πŸš‚ Toxiclibs Verlet Physics playlist: https://www.youtube.com/watch?v=E67e0RX-7Ew&list=PLRqwX-V7Uu6aiaU4s30tXvUmwGMlb9UUS πŸš‚ Matter.js playlist: https://www.youtube.com/watch?v=urR596FsU68&list=PLRqwX-V7Uu6bLh3T_4wtrmVHOrOEM1ig_ πŸŽ₯ Physics of JellyCar: https://youtu.be/3OmkehAJoyo πŸŽ₯ The Making of Nokia and Friends: https://www.youtube.com/watch?v=g20QOQP6kSU Related Coding Challenges: πŸš‚ 20 3D Cloth with Toxiclibs: https://youtu.be/jrk_lOg_pVA πŸš‚ 63 Texturing Cloth Simulation: https://youtu.be/JunJzIe0hEo Timestamps: 0:00 Introduction 2:51 Physics libraries 5:30 Elements in ToxicLibs 5:47 Start coding 7:04 Object destructuring 8:10 Add gravity 9:00 Adding elements to the world 10:35 Updating the physics world 11:40 Adding a spring 15:23 Refactor code 18:07 Inheritance 18:57 Super class 23:31 Spring length 25:44 Create a closed-filled shape to draw the character 26:49 Suggestions for variations 27:07 Other types of springs 27:36 Update about the Nature of Code book! 28:56 Outro 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/ πŸŽ₯ 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 This description was auto-generated. If you see a problem, please open an issue: https://github.com/CodingTrain/thecodingtrain.com/issues/new #softbody #toxiclibs #verletphysics #p5js #javascript

Download

1 formats

Video Formats

360pmp483.7 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

Coding Challenge 177: Soft Body Physics | NatokHD