This project explores applying physics to a 3D scene created with Three.js and React Three Fiber. At its core, it features a spinning, rectangular block. Numerous models fall into the scene under the effects of gravity and are bounced around by the block, reacting as would be reasonably expected in the real world for their individual shapes.
The project also displays a performance monitor for profiling different performance indicators, such as FPS, memory usage, and GPU load.
The work was undertaken as one of many steps in acquiring my Three.js certification through Three.js Journey.
A running demo of the project can be viewed at https://dvdjrnx.github.io/3d-physics
- Clone the repository.
- Install the required dependencies by running
npm install
.
To start the project, run the following command:
npm run dev