Skip to content
Ali Shakiba edited this page Feb 4, 2021 · 26 revisions

Learning the basics

Planck.js user manual is ported from Box2D with update for JavaScript, it is the best place to start learning Planck.js. It will help you learn the basics, which is first step for using Planck.js in your games. You can start from Overview section, other sections are available from the sidebar menu.

Run your code and explore examples

Planck.js library is physics simulation and doesn't render anything itself. However, for learning, development and debugging you can use Planck.js testbed. Testbed runs simulation and visualize your world.

There are different ways to run testbed code, the easiest way is Space―Space is an online playground for Planck.js. You can browse examples and edit them, or create new ones. See Testbed section to learn more about testbed API and usage.

For production you can create or use an existing integration or renderer. See Rendering for more information.

Explore the API

API Doc includes list of classes and methods exported from TypeScript definition files. This is helpful if you need to find out what classes/methods are available.

Online resources and advanced usage

After learning Planck.js basics and how to run your code, there are plenty of Box2D resources available online to learn advanced topics. Here are few great examples:

  • iforce2d - A collection of helpful Box2D tutorials
  • Box2D tutorials by Emanuele Feronato

Physics engine algorithms

If are interested in learning about algorithms used in Box2D/Planck.js following resources are helpful. However this is not needed for using the library.

Clone this wiki locally