Back to Experiments

F1 Car

Nov 12th, 2026

A Formula 1 car built entirely in code with three.js. Spin it around, repaint it in a handful of team-inspired liveries, and switch on a wind tunnel to watch the air flow over it.

3dthree.jswebgl

Your browser couldn't start WebGL, so the car can't be drawn here.

Drag to spin the car, scroll or pinch to zoom, and pick a livery to repaint it. Turn on the wind tunnel, then tap any part of the car to send a jet of smoke over it.

How it works

There's no 3D model file behind this. The car is built in code with three.js when the page loads. The nose, monocoque, engine cover and sidepods are each a single shape swept along the length of the car, with a cross-section that morphs from slot to slot as it goes: narrow and round at the nose tip, wide and boxy at the cockpit, tall at the airbox, then tapering into the gearbox. The wings are classic aerofoil profiles pushed out sideways, the tyres are a cross-section spun around the axle, and the halo is a tube bent along a curve.

Every painted part shares one of a handful of materials: primary, secondary, accent, helmet and rims. A livery is just five colours, so swapping one blends those materials from old to new. Carbon, rubber and the visor never change. The numbers and names are drawn onto small canvases and projected onto the nose, shark fin and rear wing endplates. Those get redrawn every time you switch.

The reflections come from a virtual photo studio that three.js renders once and wraps around the car, so the clearcoat picks up soft highlights. A single overhead light casts the shadow on the turntable. The liveries borrow team colours. The logos, sponsors and names are all left out.

The wind tunnel isn't real CFD. Each streak asks a small function which way the air is moving where it is, and that function steers the oncoming air around a few simple shapes standing in for the car, speeding it up over the shoulders of the bodywork. Hand-tuned effects sit on top of that: the wings are upside down, so they throw air upward behind them. Vortices roll off the wing tips, the floor squeezes air underneath and the diffuser drags it up the back, and the tyres and gearbox leave a churning wake. Colour shows speed, from blue for slow air through green to red for fast. Opening DRS flattens the rear flap, which weakens that upwash and the drag behind the wing.