Three.js Airport Terminal (Large Interior Space)

A large-span airport terminal in Three.js with a wave roof on branching steel columns, a glass airside facade, gate seating, a live departures board drawn to a canvas texture, an instanced crowd, parked and taxiing aircraft, and a camera tour.

Key topics: airport terminal, three.js interior, architectural visualization, large span roof, crowd simulation, canvas texture

What this code does

- Roof: a dense plane displaced by y = H + sin(3πx/L)·2 − (z/D)²·4 gives a wave in plan and a shallow camber in section.
- Tree Columns: each trunk splits into four branches oriented with setFromUnitVectors toward points on the roof surface.
- Departures Board: a canvas redrawn every few seconds with flight statuses, uploaded via texture.needsUpdate, with fictional flights.
- Crowd: hundreds of capsules in one InstancedMesh lerp between random waypoints, and a quarter sit at gates.
- Apron: aircraft from primitives at jet bridges, plus one taxiing on a loop.
- Controls: time of day, travellers, aircraft and tour.

Continue Learning

JavaScript Implementation

ES6+
// Large-span wave roof: displace a dense plane, then hold it up with branching "tree" columns
const roof = new THREE.PlaneGeometry(148, 50, 140, 30).rotateX(-Math.PI / 2)
const p = roof.attributes.position
for (let i = 0; i < p.count; i++) p.setY(i, 16 + Math.sin(p.getX(i) / 140 * Math.PI * 3) * 2 - (p.getZ(i) / 40) ** 2 * 4)
roof.computeVertexNormals()
// Departures board: redraw a canvas every few seconds and flag texture.needsUpdate
ctx.fillText(`${time}  ${flight}  ${dest}  ${gate}  ${status}`, 30, 145 + row * 36); boardTexture.needsUpdate = true
// Crowd: one InstancedMesh of capsules lerping between random waypoints