O'Reilly logo

Learning Three.js: The JavaScript 3D Library for WebGL by Jos Dirksen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 12. Adding Physics to Your Scene with Physijs

In this final chapter we'll look at another library that you can use to extend the basic functionality of Three.js. The library we'll discuss in this chapter is called Physijs. Physijs is a library that allows you to introduce physics into your 3D scene. By physics, we mean that our objects are subject to gravity—they can collide with each other, can be moved by applying impulse, and can be constrained in their movement through hinges and sliders. This library makes use of another well known physics engine named ammo.js.

In this chapter we'll look at how Physijs allows you to do the following:

  • Create a Physijs scene where your objects are subject to gravity and can collide with each other
  • Show ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required