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