3D web game: Three.js + Rapier + Vite
3D games and explorable worlds that run in a browser tab — a link instead of an install.
Sources verified Sep 2026
Circumstances — when to use it
- The game should run from a link — itch.io, a portfolio, a campaign site — with nothing to install
- Modest 3D scenes: driving, exploring, arcade physics, small arenas
- A web team that works in JavaScript or TypeScript, possibly React
- You want to own the architecture rather than adopt a full engine and its editor
Synergy — how the pieces fit
Three.js renders the scene with WebGL, or its WebGPU renderer where supported, while you own the game loop, input, and structure. Rapier supplies rigid-body physics, colliders, and character controllers, compiled from Rust to WebAssembly so it stays fast in the browser. Vite gives instant reloads while you tune the feel and bundles the WebAssembly and assets for production; the build is static files that any CDN or itch.io can host. Teams working in React can write the same scene as components with React Three Fiber and @react-three/rapier. Budget draw calls, texture sizes, and total download from day one — they decide whether the game runs on mid-range phones.
The tech and its role
Architectural examples
Each example links to a public source — no claims about private internals.
Bruno Simon's portfolio (folio-2025)
An explorable 3D driving world built with Three.js, Rapier physics, and Vite, with its source on GitHub.
source · 2025Slow Roads
A procedurally generated driving game built on Three.js. Its web.dev case study covers generating assets on the client instead of downloading them and adapting to everything from high-end desktops to old phones. (Three.js example; not a claim about Rapier or Vite.)
sourceSkip if
Skip if the game needs large worlds, console releases, or an editor-driven workflow for designers — a full engine such as Godot or PlayCanvas fits better.