Opus Motion ★ Star on GitHub

Maps · elevation-profile

Elevation profile

A route elevation line draws left to right, coloured by steepness, with a moving marker and live distance / total gain / grade readouts and a peak flag.

A free, MIT-licensed animated map from the Opus Motion Library — 616 motions for Remotion, React and plain HTML.

Elevation profile: three frames of the animated map, start, middle and end
Elevation profile — start, middle and end of the 7.0-second motion.

What Elevation profile is for

Hike, ride, run and race route explainers, stage profiles, any height-versus-distance story. Pass `data` (heights, evenly spaced along the route) and `distance`.

  • map
  • elevation
  • profile
  • route
  • hiking
  • cycling
  • running
  • chart
  • altitude
  • gradient
  • terrain

Details

Category
Animated maps & geo graphics
Length
7.0 s (210 frames at 30 fps)
Formats
16:9, 1:1, 9:16
Weight
light
Transparent overlay
yes
Seamless loop
no
Text props
title subtitle unit
Colour props
background ink accent accent2
Mood
nature, hud
Roles
subject

Use Elevation profile in Remotion, React or HTML

Remotion project

terminal
# copy this motion into your Remotion project
node cli/mgl.mjs add elevation-profile --to ../my-app/src

# render an mp4 (run in the library folder)
node cli/mgl.mjs render elevation-profile --props '{"title":"Route profile","subtitle":"Distance against elevation","unit":"m","background":"#0B1220","ink":"#E8EEF9","accent":"#FF7A59","accent2":"#4CC9F0"}'

# or export for apps / editors: mp4 | webm-alpha | prores-alpha | gif | png | poster
node cli/mgl.mjs export elevation-profile --as webm-alpha --props '{"title":"Route profile","subtitle":"Distance against elevation","unit":"m","background":"#0B1220","ink":"#E8EEF9","accent":"#FF7A59","accent2":"#4CC9F0"}'

React / Next.js

tsx
import {MotionPlayer} from 'opus-motion-library/web';

<MotionPlayer
  motion="elevation-profile"
  props={{
    title: 'Route profile',
    subtitle: 'Distance against elevation',
    unit: 'm',
    background: '#0B1220',
    ink: '#E8EEF9',
    accent: '#FF7A59',
    accent2: '#4CC9F0',
  }}
  playOnView
  loop="auto"
/>

Plain HTML / WordPress

html
<script src="opus-motion.element.js" defer></script>

<opus-motion motion="elevation-profile"
  props='{"title":"Route profile","subtitle":"Distance against elevation","unit":"m","background":"#0B1220","ink":"#E8EEF9","accent":"#FF7A59","accent2":"#4CC9F0"}'>
</opus-motion>

Compose spec (multi-scene video)

json
{
  "width": 1920,
  "height": 1080,
  "fps": 30,
  "scenes": [
    {
      "motion": "elevation-profile",
      "props": {
        "title": "Route profile",
        "subtitle": "Distance against elevation",
        "unit": "m",
        "background": "#0B1220",
        "ink": "#E8EEF9",
        "accent": "#FF7A59",
        "accent2": "#4CC9F0"
      }
    }
  ]
}

Elevation profile props

16 parameters — change any of them to make the motion yours.

PropDefaultWhat it does
data[214,258,275,278,286,314,356,393,403,383,347,324,333,376,433,480,504,513,524,556,609,66…elevation samples along the route (any unit, evenly spaced, 2+ numbers)
distance42total route length, shown on the x axis and distance readout
title"Route profile"headline
subtitle"Distance against elevation"line under the headline
unit"m"height unit label (m, ft)
distUnit"km"distance unit label (km, mi)
colorByGradetruecolour the line by steepness (accent = steep up, accent2 = flat/down)
showPeaktrueflag the highest point
speed1timeline speed multiplier
startAt0frame to start at
background"#0B1220"background colour or "transparent"
ink"#E8EEF9"text / axis colour
accent"#FF7A59"steep climbs, area glow, gain readout
accent2"#4CC9F0"flat and downhill colour
fontFamily"stub"CSS font-family
monoFamily"stub"CSS font-family for axis numbers

Notes & credits

Technique sources:

  • original (round 3)