A Train Ride in Three.js
For today's #30DayMapChallenge - Network , I was inspired by DLR Rider to try and create a first-person view of a train network. I decided that recreating London's Docklands Light Railway network using just elevation and railway data might look a little boring so instead I've mapped a section of the Swiss railway network. This makes for a much more dramatic journey (although in truth it is only a tiny, tiny part of a much larger network). Bernina Switchbacks 3D is the result: a Three.js experiment that puts you in the driver's seat of a train travelling through the Swiss Alps. You can ride along the railway, reverse direction, change speed and follow your progress on a small interactive map. The 3D landscape is created using elevation tiles from Mapterhorn . These tiles provide digital elevation data which I use to construct a 3D terrain mesh in Three.js. The elevation values are decoded from the RGB colours in the tiles and used to position the vertices of the terr...