Three.js 3D Timeline of History (Helix Fly-Through)
Six centuries of milestones in science, technology, exploration and politics on a 3D helix or straight rail in Three.js, with a compressed time scale, spans drawn as arcs and a fly-through camera.
Key topics: 3d timeline, history timeline, three.js timeline, helix visualization, fly through, chronology
Game Over
What this code does
- Mapping: year → curve parameter u → position on a CatmullRom rail; the √ scale gives crowded recent centuries more room.
- Lanes: events alternate across three lanes on stems so labels don't collide.
- Spans: wars, revolutions and voyages with an end year become thick tube arcs along the rail.
- Fly-Through: OrbitControls' target glides along the curve while the camera offset is preserved, so you can still orbit mid-flight.
- Categories: filter science, technology, exploration and politics independently.
- Controls: rail shape, time scale, fly-through, speed and categories.
Related Demos
Continue Learning
JavaScript Implementation
// Events on a 3D helix: year → curve parameter → position; labels as sprites
const u = (year) => 1 - Math.sqrt(1 - (year - 1400) / 630) // compress older centuries
const at = (u, lane = 0) => {
const a = u * Math.PI * 5, r = 6 + lane * 0.8
return new THREE.Vector3(Math.cos(a) * r, -8 + u * 22, Math.sin(a) * r)
}
const rail = new THREE.CatmullRomCurve3(Array.from({ length: 401 }, (_, k) => at(k / 400)))
scene.add(new THREE.Mesh(new THREE.TubeGeometry(rail, 600, 0.06, 8), railMaterial))
for (const e of events) { const label = makeLabel(e.title); label.position.copy(at(u(e.year), 2)); scene.add(label) }