adjisena.com / lab

Route draw

A 180 km route that draws itself as you scroll. The elevation fills underneath, and the distance, elevation and section update with every frame. Scroll down to run it.

The challenge
Jakarta to Bandung
Jakarta Bandung
0 km
Distance
0 ft
Elevation
4,695 ft
Highest point · km 90
Start · Jakarta
Section

The route section of sbmrc.sbm-itb.ac.id, the site for SBM ITB's 180 km relay at the ITB Ultramarathon 2026. See the case study.

The race organiser only published the route as an image. The 95-point line was traced out of it (skeleton, nearest-neighbour walk, smoothing), and the 200-point elevation series was sampled from the same image.

A tall wrapper holds a sticky stage. Progress is how far the wrapper has scrolled past the top, divided by its height minus the stage's height.

The line is drawn with stroke-dashoffset, and the dot rides getPointAtLength. The elevation fill is clipped by a rectangle whose width follows progress. One requestAnimationFrame per scroll keeps it smooth.

With reduced motion turned on, the stage stops sticking and the route shows complete.

Everything lives in this page: the .rd styles in the head and the script at the bottom. Swap the two route paths, the elevation paths, ELEV, PEAK, the total distance and LEGS for another course.