Opus Motion ★ Star on GitHub

Data · map-route

Map route

Top-down illustrated paper map (fields, river, trees, blossoms) with a marker flying a curved dotted route, a red bearing vector with angle arc and distance ticks, a dashed line to the sun; hop style hops leg by leg leaving popping dots.

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

Map route: three frames of the animated chart, start, middle and end
Map route — start, middle and end of the 9.0-second motion.

What Map route is for

Journeys, routes, foraging / delivery paths, travel distances, "from A to B" explainers.

  • map
  • route
  • journey
  • path
  • distance
  • travel
  • range line
  • measure
  • how far
  • satellite
  • ruler

Details

Category
Animated charts & data visualisation
Length
9.0 s (270 frames at 30 fps)
Formats
16:9, 1:1, 9:16
Weight
light
Transparent overlay
no
Seamless loop
no
Text props
waypoints unit
Colour props
paper trailColor vectorColor sunColor
Image props
src
Mood
light, paper, nature
Roles
subject
Pairs with
Chapter header, Number counter, Story caption box

Use Map route in Remotion, React or HTML

Remotion project

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

# render an mp4 (run in the library folder)
node cli/mgl.mjs render map-route --props '{"waypoints":[{"x":-0.62,"y":0.55,"label":"Hive"},{"x":-0.18,"y":0.12,"label":"Clover"},{"x":0.32,"y":0.32,"label":"Orchard"},{"x":0.6,"y":-0.25,"label":"Lavender"},{"x":0.12,"y":-0.62,"label":"Meadow"}],"unit":"km","paper":"#C0D288","trailColor":"#24221C","vectorColor":"#C83230","sunColor":"#E8A93A","src":""}'

# or export for apps / editors: mp4 | webm-alpha | prores-alpha | gif | png | poster
node cli/mgl.mjs export map-route --as mp4 --props '{"waypoints":[{"x":-0.62,"y":0.55,"label":"Hive"},{"x":-0.18,"y":0.12,"label":"Clover"},{"x":0.32,"y":0.32,"label":"Orchard"},{"x":0.6,"y":-0.25,"label":"Lavender"},{"x":0.12,"y":-0.62,"label":"Meadow"}],"unit":"km","paper":"#C0D288","trailColor":"#24221C","vectorColor":"#C83230","sunColor":"#E8A93A","src":""}'

React / Next.js

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

<MotionPlayer
  motion="map-route"
  props={{
    waypoints: [
      {x: -0.62, y: 0.55, label: 'Hive'},
      {x: -0.18, y: 0.12, label: 'Clover'},
      {x: 0.32, y: 0.32, label: 'Orchard'},
      {x: 0.6, y: -0.25, label: 'Lavender'},
      {x: 0.12, y: -0.62, label: 'Meadow'},
    ],
    unit: 'km',
    paper: '#C0D288',
    trailColor: '#24221C',
    vectorColor: '#C83230',
    sunColor: '#E8A93A',
    src: '',
  }}
  playOnView
  loop="auto"
/>

Plain HTML / WordPress

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

<opus-motion motion="map-route"
  props='{"waypoints":[{"x":-0.62,"y":0.55,"label":"Hive"},{"x":-0.18,"y":0.12,"label":"Clover"},{"x":0.32,"y":0.32,"label":"Orchard"},{"x":0.6,"y":-0.25,"label":"Lavender"},{"x":0.12,"y":-0.62,"label":"Meadow"}],"unit":"km","paper":"#C0D288","trailColor":"#24221C","vectorColor":"#C83230","sunColor":"#E8A93A","src":""}'>
</opus-motion>

Compose spec (multi-scene video)

json
{
  "width": 1920,
  "height": 1080,
  "fps": 30,
  "scenes": [
    {
      "motion": "map-route",
      "props": {
        "waypoints": [
          {
            "x": -0.62,
            "y": 0.55,
            "label": "Hive"
          },
          {
            "x": -0.18,
            "y": 0.12,
            "label": "Clover"
          },
          {
            "x": 0.32,
            "y": 0.32,
            "label": "Orchard"
          },
          {
            "x": 0.6,
            "y": -0.25,
            "label": "Lavender"
          },
          {
            "x": 0.12,
            "y": -0.62,
            "label": "Meadow"
          }
        ],
        "unit": "km",
        "paper": "#C0D288",
        "trailColor": "#24221C",
        "vectorColor": "#C83230",
        "sunColor": "#E8A93A",
        "src": ""
      }
    }
  ]
}

Map route props

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

PropDefaultWhat it does
waypoints[{"x":-0.62,"y":0.55,"label":"Hive"},{"x":-0.18,"y":0.12,"label":"Clover"},{"x":0.32,"y…route stops {x, y, label} in map space -1..1 (first = start, last = bearing target)
style"flight"flight = smooth curve; hop = straight legs with hop arcs, popping dots and landing rings; range = ticked measuring line A to B over imagery (camera chases the tip, pulls back, reading lands)
trail"dots"dots | dash (marching) | line
marker"bee"bee | pin | dot
showBearingtruered bearing vector, angle arc and distance ticks from the start
showSuntruesun icon with dashed tie line to the marker
distanceKm2.4distance shown at the end of the route
seed6map layout seed
paper"#C0D288"map base colour
trailColor"#24221C"
vectorColor"#C83230"
sunColor"#E8A93A"
zoom1camera zoom
from[0.2,0.68]range: start point as frame fractions [x, y]
to[0.8,0.32]range: end point as frame fractions [x, y]
unit"km"range: unit shown after the rolling value
src""range: public/ image used as the ground (empty = procedural satellite-style ground)
corridortruerange: light a corridor along the line and dim the rest
chasetruerange: camera follows the line tip then pulls back
labelA"A"range: label of the start marker
labelB"B"range: label of the end marker

Notes & credits

Technique sources:

  • video6 32-40 s (map-flight-path, waggle-dance-diagram)
  • video22 (hop-move-dotted-trail)