Coding Challenge 177: Soft Body Physics
The Coding Train The Coding Train
1.68M subscribers
145,592 views
0

 Published On Apr 13, 2023

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...

🚀 Watch this video ad-free on Nebula https://nebula.tv/videos/codingtrain-...

p5.js Web Editor Sketches:
🕹️ Soft Body Character: https://editor.p5js.org/codingtrain/s...
🕹️ Soft Body Character Enhanced: https://editor.p5js.org/codingtrain/s...
🕹️ Soft Body Dancing Skeleton: https://editor.p5js.org/codingtrain/s...
🕹️ Soft Body Letters: https://editor.p5js.org/codingtrain/s...
🕹️ Blank Canvas: https://editor.p5js.org/codingtrain/s...

🎥 Previous video:    • Coding Challenge 176: Buffon's Needle  
🎥 All videos:    • Coding Challenges  

References:
đź”— Nature of Code: https://nature-of-code-2nd-edition.ne...
đź”— ToxicLibs.js: http://haptic-data.com/toxiclibsjs/
đź”— ToxicLibs Java Reference: https://shiffman.github.io/toxiclibs-...
đź”— Advanced Character Physics: http://www.cs.cmu.edu/afs/cs/academic...
đź”— Thi.ng: https://thi.ng/

Videos:
🚂 Toxiclibs Verlet Physics playlist:    • 5.13: What is Toxiclibs Verlet Physic...  
🚂 Matter.js playlist:    • 5.17: Introduction to Matter.js - The...  
🎥 Physics of JellyCar:    • Physics of JellyCar: Soft Body Physic...  
🎥 The Making of Nokia and Friends:    • Nokia Friends (Making of, 2008)  

Related Coding Challenges:
🚂 20 3D Cloth with Toxiclibs:    • Coding Challenge #20: 3D Cloth with t...  
🚂 63 Texturing Cloth Simulation:    • Coding Challenge #63.1: Texturing Clo...  

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/pas...
đźš© Suggest Topics: https://github.com/CodingTrain/Sugges...
đź’ˇ GitHub: https://github.com/CodingTrain
đź’¬ Discord: https://thecodingtrain.com/discord
đź’– Membership: http://youtube.com/thecodingtrain/join
đź›’ Store: https://standard.tv/codingtrain
🖋️ Twitter:   / thecodingtrain  
📸 Instagram:   / the.coding.train  

🎥 Coding Challenges:    • Coding Challenges  
🎥 Intro to Programming:    • Start learning here!  

đź”— 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-o...

This description was auto-generated. If you see a problem, please open an issue: https://github.com/CodingTrain/thecod...

#softbody #toxiclibs #verletphysics #p5js #javascript

show more

Share/Embed