Explore the engineering behind the Rapier3D physics engine and Three.js renderer.
๐ Physics Engine Deep Dive โ ๐ Home & Projects โA real-time 3D Formula 1 simulator built with Three.js and Rapier3D (WebAssembly). Map suspension stiffness, tire compounds, and aero downforce directly to real-world motorsport dynamics right in your browser.
Unlike arcade games with scripted drift physics, this simulator utilizes a true Raycast Vehicle Controller powered by Rapier3D (WASM). In a raycast vehicle model, the car's monocoque is represented as an 800 kg rigid body, while four downward rays measure road clearance at 60 Hz to compute instantaneous suspension travel and contact patch forces.
Calculates spring compression and damping rates per wheel to prevent bottoming out across curbs while maintaining high-speed chassis stability.
Models lateral cornering grip vs. longitudinal braking and acceleration. Soft compounds yield higher peak grip with sharper thermal degradation.
Generates downward force proportional to velocity squared (vยฒ), pressing the tires into the track at high speeds while inducing drag on long straights.
On touch devices, an on-screen interactive Formula 1 steering wheel enables analog-style cornering alongside dedicated accelerator and brake pedals.
Click the ๐๏ธ Garage button to inspect the chassis, adjust suspension stiffness, change tire compounds between soft, medium, and hard, and fine-tune your aerodynamic balance before setting a hot lap.