12
Adding Physics and Sounds to Your Scene
In this chapter, we’ll look at Rapier, another library you can use to extend the basic functionality of Three.js. Rapier is a library that allows you to introduce physics into your 3D scene. By physics, we mean that your objects are subject to gravity – they can collide with one another, can be moved by applying impulses, and can be constrained in their movement by different types of joints. Besides physics, we’ll also look at how Three.js can help you with adding spatial sounds to your scene.
In this chapter, we’ll discuss the following topics:
- Creating a Rapier scene where your objects are subject to gravity and can collide with one another
- Showing how to change the friction and restitution (bounciness) ...
Get Learn Three.js - Fourth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.