5.17: Introduction to Matter.js - The Nature of Code

This video is an introduction to the Matter.js, a 2D JavaScript physics library that supports rigid body collisions and constraints. In this video I show you how to set up your code to use the library in combination with p5.js for rendering. Code: https://thecodingtrain.com/tracks/the... šŸ•¹ļø p5.js Web Editor Sketch: https://editor.p5js.org/codingtrain/s... šŸŽ„ Previous:    • 5.7Ā PathĀ FollowingĀ (Steering)Ā -Ā NatureĀ ofĀ ...Ā Ā  šŸŽ„ Next:    • 5.18:Ā IntroductionĀ toĀ Matter.jsĀ ContinuedĀ ...Ā Ā  šŸŽ„ All:    • TheĀ NatureĀ ofĀ CodeĀ Ā  References: šŸ”— Nature of Code: https://nature-of-code-2nd-edition.ne... šŸ”— Matter.js: https://brm.io/matter-js/ Videos: šŸš‚ Matter.js playlist:    • 5.17:Ā IntroductionĀ toĀ Matter.jsĀ -Ā TheĀ Natu...Ā Ā  Timestamps: 0:00 Introduction to Matter.js 1:50 Simple Example 2:30 Getting started 3:40 Module aliases 5:15 Creating bodies in the world 6:04 Matter.js documentation 7:51 Engine.run() is deprecated 8:58 Use the physics engine to figure out the location of the box 10:07 Data tracked about the object 13:13 Adding a body to the world 14:40 Refactor code 19:00 Add a ground 19:51 Static Bodies 22:23 Drawing elements in a way that matches expectation of physics engine 27:07 Add options for friction and restitution. 30:42 Increase thickness of the ground 31:44 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... #physicsengine #matterjs #p5js #javascript