tubeshowcase●1,671,016 videos♡ My collection 0
← Learn to Code

Learn to Code32:25

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

The Coding Train ↗

From the creator

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-nature-of-code-2/noc/6-physics-libraries/1-matterjs-introduction 🕹️ p5.js Web Editor Sketch: https://editor.p5js.org/codingtrain/sketches/dian0t-5j 🎥 Previous: https://youtu.be/rlZYT-uvmGQ?list=PLRqwX-V7Uu6ZV4yEcW3uDwOgGXKUUsPOM 🎥 Next: https://youtu.be/uITcoKpbQq4?list=PLRqwX-V7Uu6ZV4yEcW3uDwOgGXKUUsPOM 🎥 All: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZV4yEcW3uDwOgGXKUUsPOM References: 🔗 Nature of Code: https://nature-of-code-2nd-edition.netlify.app/ 🔗 Matter.js: https://brm.io/matter-js/ Videos: 🚂 Matter.js playlist: https://www.youtube.com/watch?v=urR596FsU68&list=PLRqwX-V7Uu6bLh3T_4wtrmVHOrOEM1ig_ 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 Blanc

Published 2017-03-07 · Watch on YouTube ↗
Availability and playback restrictions are controlled by the original channel.

Keep exploring Learn to Code