Three.js
HexGL
HexGL is a futuristic browser race built on Three.js. It is older than the current three npm line, but it is still the game people mean when they ask for a Three.js racing example you can clone.

Three.jsracingJavaScriptMITExample
Ad
Who it is for
- JavaScript developers targeting WebGL
- People comparing Three.js games to a full engine like Godot
- Intermediate: expect to modernize imports
What you can learn
- A complete Three.js game loop: track, ship, camera
- Browser performance tricks from a shipped web racer
- How a 2010s WebGL game is structured versus a Phaser scene
Clone and run
- Clone BKcore/HexGL.
- Serve the folder with any static server (npx serve, or the repo’s stated command). Do not double-click index.html if modules fail.
- Use a Chromium browser. Track assets are large; wait for the first load.
This is a game, not an engine tutorial. APIs have moved. Use it to learn camera and speed feel, then rebuild pieces on a current three package if you ship in 2026.
Public repositories. The short descriptions are written for this site.
Editorial notes reviewed 2026-10-05.
Related source

Racing game
Small racing loop using Three.js and the react-three stack.

Drakonas
Bullet-hell shooter rendered with Three.js.

Three.js tower defense
3D tower defense on Three.js.

3d.city
City builder used to stress WebGL and Three.js.

Astray
WebGL maze using Three.js and 2D physics.
Pirate 3D
Three.js scene packaged toward iOS with Capacitor.