3D Map Route (map-route)
┌──────────────────────┐
│ [▲ 9 min] │ ETA card counts down, then "Arrived"
│ ┌Iron Yard Gym┐ │ destination card after the pin lands
│ ▒▒ ▒▒ 📍 ▒▒ │ white 3D blocks, parks, a river
│ ▒▒ ━━━━━━━┛ ▒▒ │ the route draws itself, the camera rides along
│ ▒▒ ┃ ▒▒ ▒▒ │ and pulls back at the end
└──────────────────────┘
Setup Check
SKILL_DIR is the directory containing this SKILL.md file (check the path in <skills>).
SKILL_DIR="$(python3 -c 'import os,sys; print(os.path.realpath(sys.argv[1]))' "<directory containing this SKILL.md>")"
KIT="$(python3 -c 'import os,sys; print(os.path.realpath(os.path.join(sys.argv[1], "..", "..", "kit")))' "$SKILL_DIR")"
[ -s "$KIT/node_modules/three/build/three.module.js" ] || bash "$KIT/setup.sh"
Requires ffmpeg, node (18+), python3 (3.9+), and WebGL via headless Chrome.
Steps
- Gather trip details. Get the destination name, travel time (
minutes), anddistance(e.g."home to the gym, 2.8 km, 9 min"). If only one of time or distance is given, estimate the other (walking ~12 min/km, cycling ~4 min/km, urban driving ~2 min/km) and tell the user. - Write the spec. Create
<name>.map.jsonusing the schema below. - Validate & quick snapshot.
Inspect the snapshot PNG withpython3 "$SKILL_DIR/build.py" <name>.map.json --check python3 "$SKILL_DIR/build.py" <name>.map.json --snap 3.8read_filebefore doing the full 3D render. - Render. Run:
Takes ~1.5 minutes (WebGL in headless Chrome; apython3 "$SKILL_DIR/build.py" <name>.map.jsonsub_timeline_readiness_timeoutwarning from HyperFrames is normal). - Visual QA (Required). Inspect
<name>.map.sheet.jpgwithread_file:- The destination card fits completely inside the red safe-area box without clipping.
- Street/place labels do not collide with the ETA card or destination card.
- Hand over. Return clickable links to the
.mp4and.sheet.jpg.
Spec Schema
{
"destination": "Iron Yard Gym",
"minutes": 9,
"distance": 2.8,
"unit": "km",
"places": ["North Quay", "Botanic Gardens", "Market Hall", "Elm Park", "The Canal"],
"accent": "#2f7cf6",
"seed": 7
}
destination,minutes,distance(required). Keepdestination<= ~26 chars.unit:"km"or"mi".places: 5 short grey labels at fixed map spots:[near start, far-left park, mid-route block, far-right park, river]. Use local-sounding names or""to hide any label.accent: 6-digit hex color for the route, moving dot, and ETA icon. The pin stays red.seed: Any integer; changes building and park layout.hold(optional): Extra seconds at the end.out(optional): Custom output.mp4path.
Custom Route Shape (Advanced)
The default path goes up, right, up, right. To change it, copy "$SKILL_DIR/template.html" next to the spec, add "template": "template.html" to the spec, and edit WP ([x, z] waypoints sitting on street grid multiples of 4; x in -36..36, z in -88..24, north is -z). Update the final pullback target (new THREE.Vector3(3, 0, -27)) and LBL positions to match, then verify with --snap 3.8.
Taste Rules
- Short, realistic place names; destination card holds ~26 characters comfortably.
- Keep it clean: one route, one red pin, no extra arrows or callouts.