Animation · project 17 of 37
Use your compass in 60 seconds.
A 65-second stop-motion short on the lensatic compass: hold it flat, take a bearing, set the ring and walk, find the way home, allow for declination.
BeforeA long manual, a ten-minute video, and nobody in the group watches either before the hike.
AfterA 65-second stop-motion film everyone watches in the car park: flat, bearing, ring, way home, declination.
What it is worthThe five compass steps in one minute, easy to share, with a link to the full course. Instead of long manuals and long videos nobody finishes.
How to use it
- Turn the sound on and play the film. It plays even when an iPhone is on silent.
- Read the five steps under it, or download the film to share.
- Open the full course, Compass Trail, to practise each step with your own moves.
Where it helps most
- Sharing with family, friends or a scout group before a hike.
- A first look before taking the full Compass Trail course.
The idea
Right after the Compass Trail course went live, I wanted a short version in a different style to share: stop motion, short format. The course teaches it properly; this one fits in a minute and makes people want to try.
The build
Claude wrote eight scenes and twenty short sentences from the course's own facts, voiced them with Kokoro (af_heart) and checked every sentence with Whisper. The cutouts are drawn in SVG (compass, hiker, tree, rocks, car, phone, map, north arrows) and given a paper edge and a cast shadow on a cardboard texture made in code. The stop-motion feel comes from moving everything at 12 poses a second, adding a small random shake to each pose and changing film grain. Each frame was rendered with Playwright and joined into a 9:16 video under a soft music pad. Limits: the declination figure is for El Paso in late 2026 and changes with place and year; it is a learning film, not navigation training.
Free to take
Build your own.
Copy the skill, paste it into your own AI, and say what you want different. How to use a skill, step by step ›
Get the skillThe instructions your AI follows. Works in Claude, ChatGPT, Gemini or any other
# Master prompt: Use your compass in 60 seconds (stop-motion short)
Make a vertical 9:16 short, 1080x1920 at 30 fps, about 60 to 65 seconds, that teaches the five things that matter most about a lensatic compass. It is the quick, shareable version of the free course Compass Trail (sghadimi.com/compass) and links back to it.
LOOK: stop motion. Paper cutouts with a white paper edge and a soft cast shadow, lying on a cardboard table (warm tan, fine noise, fibres, a vignette). Everything moves in poses at 12 a second, not smoothly: each pose holds for two or three video frames, and every cutout gets a tiny random shift and turn on each pose, as if moved by hand. Light film grain that changes every pose. Labels are paper tags that pop in with a stepped overshoot on the word that names them. The compass cutout matches the real one: olive body, lid with a wire, ring numbered 0 to 33 with a black line, a floating white card with a green north arrow and E S W, a red index line, a bubble level and a rear sight with a lens. The card turns with the heading and the ring turns with the set bearing, both in steps.
LAYOUT: a paper title strip on the left (Compass Trail, "Use your compass in 60 seconds"); on the right a mini paper compass badge that shows the bearing of the moment (N, 062°, 242°, −7°); eight progress dots; the scene in the middle; a paper caption box for every sentence; the course address and the sources (US Army FM 3-25.26, NOAA World Magnetic Model) on every frame.
SCRIPT, eight scenes, two or three short sentences each, numbers written as words: the hook (a dead phone with no signal; this little compass can still get you home); the parts (it knows one thing, north; the wire aims, the lens reads, the ring holds your number); hold it flat (bubble centered, away from cars, keys and phones, with red X stickers); take a bearing (a paper hiker, a tree, a dashed sight line; read sixty-two under the index line); set it and walk (ring line onto the arrow; turn your body, not the ring; hop rock to rock); the way home (add or subtract one hundred eighty; sixty-two out, two hundred forty-two home, a walk out and back to the car); declination (map north star and compass north arrow, about seven degrees apart near El Paso; map to compass subtract, compass to map add); the end (the compass knows north, you know the rest; practice in a park first and tell someone your plan).
VOICE: Kokoro v1.0 af_heart, speed 1.0, 0.3 s between sentences and 0.65 s between scenes; check every sentence with Whisper (sherpa-onnx whisper-turbo) and fix any word that comes back wrong. A soft chord pad under it at low volume, voice high-passed at 70 Hz, a limiter at 0.95, AAC, fast start.
RENDER: a page driven by render(t) from the timing file, screenshotted frame by frame with Playwright, one MP4 per scene, joined, mixed; a contact sheet of the busiest moments looked at before the full render. Publish a 720x1280 web copy on a page that plays the video, lists the five steps, credits the sources, and links to the course.
FINISH: look at a contact sheet of the busiest moment in every scene before the full render: nothing covers the caption, the title strip or the badge; cutouts do not hide behind the ground; every label sits clear of the art.
STRESS TEST: play the published page at 320x568, 393x700, 740x360 and 1366x800 in light and dark mode; the video fits without sideways scrolling, the download link works, and the film plays with sound on a silenced iPhone because it is a plain video element.
Get the code4 files, exactly as they run on this site · free under the MIT license
The film is a video, rendered once from anim_compass.html with the timing file beside it (docs/compass-trail/short); the page on the site only plays it, with no script.
anim_compass.html (the film page that renders every frame)219 lines
<!DOCTYPE html>
<html><head><meta charset="utf-8">
<style>
@font-face{font-family:Inter;src:url("file:///home/claude/fonts/inter/InterVariable.woff2") format("woff2");font-weight:100 900}
*{box-sizing:border-box}
html,body{margin:0;width:1080px;height:1920px;overflow:hidden;font-family:Inter,sans-serif;background:#B88A55}
#bg{position:absolute;inset:0}
.cut{position:absolute;left:0;top:0;transform-origin:50% 50%;filter:drop-shadow(3px 0 0 #FFF8EA) drop-shadow(-3px 0 0 #FFF8EA) drop-shadow(0 3px 0 #FFF8EA) drop-shadow(0 -3px 0 #FFF8EA) drop-shadow(10px 16px 8px rgba(40,22,5,.38))}
.cut svg{display:block;width:100%;height:auto;overflow:visible}
.tag{position:absolute;left:0;top:0;transform-origin:50% 50%;background:#FFFBF0;color:#2A2118;font-weight:800;font-size:46px;padding:16px 28px 14px;border-radius:6px;white-space:nowrap;box-shadow:6px 10px 0 rgba(40,22,5,.25)}
.tag.red{background:#C2412D;color:#fff}.tag.green{background:#3F5E2A;color:#fff}.tag.blue{background:#1D5E89;color:#fff}.tag.big{font-size:64px;padding:22px 36px 18px}
#head{position:absolute;left:48px;top:56px;background:#FFFBF0;padding:22px 34px 20px;border-radius:8px;box-shadow:8px 12px 0 rgba(40,22,5,.25);transform:rotate(-1.5deg)}
#head b{display:block;font-size:58px;font-weight:900;color:#3F5E2A;letter-spacing:-.01em}
#head span{display:block;font-size:30px;font-weight:600;color:#5A4A3A;margin-top:2px}
#badge{position:absolute;right:52px;top:48px;width:190px;height:190px}
#dots{position:absolute;left:0;right:0;top:268px;display:flex;justify-content:center;gap:22px}
#dots i{width:26px;height:26px;border-radius:50%;background:#E9D3AE;box-shadow:3px 5px 0 rgba(40,22,5,.25)}
#dots i.on{background:#3F5E2A}#dots i.now{background:#C2412D;transform:scale(1.3)}
#cap{position:absolute;left:70px;right:70px;top:1430px;min-height:250px;background:#FFFBF0;border-radius:10px;padding:36px 46px;font-size:58px;line-height:1.28;font-weight:700;color:#2A2118;box-shadow:10px 14px 0 rgba(40,22,5,.28);display:flex;align-items:center;justify-content:center;text-align:center}
#src{position:absolute;left:60px;right:60px;bottom:52px;text-align:center;font-size:27px;line-height:1.4;font-weight:600;color:#3A2A18;opacity:.85}
#ov{position:absolute;inset:0;width:1080px;height:1920px;pointer-events:none}
#grain{position:absolute;inset:0;pointer-events:none;mix-blend-mode:multiply}
</style></head><body>
<canvas id="bg" width="1080" height="1920"></canvas>
<div id="head"><b>Compass Trail</b><span>Use your compass in 60 seconds</span></div>
<div id="badge"></div>
<div id="dots"></div>
<svg id="ov" viewBox="0 0 1080 1920"></svg>
<div id="world"></div>
<div id="cap"></div>
<div id="src">From the free course Compass Trail · sghadimi.com/compass<br>Facts: US Army FM 3-25.26 · NOAA World Magnetic Model (Nov 2026)</div>
<canvas id="grain" width="540" height="960"></canvas>
<script>
var TM = __TIMING__;
var FPS_SM = 12; // the stop-motion frame rate: every pose is held for 2-3 video frames
function $(i){ return document.getElementById(i); }
function hash(n){ n = (n ^ 61) ^ (n >>> 16); n = n + (n << 3); n = n ^ (n >>> 4); n = Math.imul(n, 0x27d4eb2d); n = n ^ (n >>> 15); return ((n >>> 0) % 10000) / 10000; }
var SCN = {}; TM.scenes.forEach(function(s, i){ SCN[s.id] = s; s.idx = i; });
function S(id, k, f){ var s = SCN[id], x = s.s[Math.min(k, s.s.length - 1)]; return x.start + x.dur * (f || 0); }
/* ---------- paper art ---------- */
function compassSVG(){
var t = '', n = '', c = '';
for(var a = 0; a < 360; a += 10){ var r = a * Math.PI / 180, big = a % 30 === 0; t += 'M' + (Math.sin(r) * 150).toFixed(1) + ' ' + (-Math.cos(r) * 150).toFixed(1) + 'L' + (Math.sin(r) * (big ? 132 : 140)).toFixed(1) + ' ' + (-Math.cos(r) * (big ? 132 : 140)).toFixed(1); }
for(var b = 0; b < 360; b += 30){ var r2 = b * Math.PI / 180; n += '<text x="' + (Math.sin(r2) * 118).toFixed(1) + '" y="' + (-Math.cos(r2) * 118 + 9).toFixed(1) + '" font-size="24" font-weight="800" text-anchor="middle" fill="#33301F">' + (b / 10) + '</text>'; }
[['E', 90], ['S', 180], ['W', 270]].forEach(function(p){ var r3 = p[1] * Math.PI / 180; c += '<text x="' + (Math.sin(r3) * 66).toFixed(1) + '" y="' + (-Math.cos(r3) * 66 + 12).toFixed(1) + '" font-size="34" font-weight="900" text-anchor="middle" fill="#1B2230" transform="rotate(' + p[1] + ' ' + (Math.sin(r3) * 66).toFixed(1) + ' ' + (-Math.cos(r3) * 66).toFixed(1) + ')">' + p[0] + '</text>'; });
return '<svg viewBox="-200 -400 400 680">' +
'<g class="lid"><rect x="-70" y="-390" width="140" height="190" rx="18" fill="#5B6B2F"/><rect x="-48" y="-366" width="96" height="140" rx="10" fill="#D8E7EA"/><path d="M0-362V-232" stroke="#1B2230" stroke-width="5"/><rect x="-60" y="-210" width="120" height="16" rx="8" fill="#47551F"/></g>' +
'<rect x="-190" y="-196" width="380" height="410" rx="38" fill="#5B6B2F"/><rect x="-176" y="-182" width="352" height="382" rx="30" fill="none" stroke="#6F8040" stroke-width="4"/>' +
'<path d="' + Array.from({length: 22}, function(_, i){ return 'M' + (-160 + i * 15) + ' 206v' + (i % 5 ? -10 : -18); }).join('') + '" stroke="#F4F1E6" stroke-width="3"/>' +
'<g class="ring"><circle r="164" fill="#ECE8DA" stroke="#B9B4A2" stroke-width="4"/><path d="' + t + '" stroke="#5B5747" stroke-width="3"/>' + n + '<path class="rline" d="M0 6V-128" stroke="#2B2B2B" stroke-width="7" stroke-linecap="round"/></g>' +
'<g class="card"><circle r="104" fill="#FBFAF4" stroke="#C9C4B1" stroke-width="3"/>' + c + '<path d="M0-100L18-52H-18Z" fill="#3EC46A" stroke="#1E7A3C" stroke-width="3" stroke-linejoin="round"/><text y="-22" font-size="30" font-weight="900" text-anchor="middle" fill="#1B2230">N</text></g>' +
'<circle r="7" fill="#8E99A4"/><path d="M0-196V-112" stroke="#C0392B" stroke-width="7" stroke-linecap="round"/><path d="M-13-200h26l-13 18z" fill="#C0392B"/>' +
'<g transform="translate(-138 150)"><circle r="26" fill="#E8F3E2" stroke="#B9C4C6" stroke-width="4"/><circle class="bub" r="10" fill="#fff" stroke="#9DB59A" stroke-width="2"/></g>' +
'<g transform="translate(0 232)"><rect x="-56" y="-16" width="112" height="70" rx="14" fill="#5B6B2F"/><circle cy="18" r="22" fill="#BFD9E6" stroke="#E8F1F4" stroke-width="5"/></g>' +
'</svg>';
}
var ART = {
phone: '<svg viewBox="0 0 300 560"><rect width="300" height="560" rx="44" fill="#1B2230"/><rect x="18" y="58" width="264" height="470" rx="18" fill="#9AA5B1"/><rect x="110" y="22" width="80" height="14" rx="7" fill="#2C3646"/><g transform="translate(150 260)"><rect x="-60" y="-28" width="110" height="56" rx="8" fill="none" stroke="#fff" stroke-width="8"/><rect x="50" y="-12" width="12" height="24" rx="3" fill="#fff"/><rect x="-50" y="-18" width="12" height="36" fill="#C2412D"/></g><text x="150" y="360" font-size="54" font-weight="900" text-anchor="middle" fill="#C2412D">1%</text></svg>',
tree: '<svg viewBox="0 0 220 300"><ellipse cx="110" cy="290" rx="70" ry="10" fill="rgba(0,0,0,.18)"/><rect x="96" y="170" width="28" height="120" rx="8" fill="#7A5532"/><circle cx="110" cy="110" r="88" fill="#4E8A3E"/><circle cx="58" cy="150" r="50" fill="#5E9C4A"/><circle cx="164" cy="146" r="52" fill="#5E9C4A"/></svg>',
hiker: '<svg viewBox="0 0 160 300"><path d="M58 290l12-90M102 290l-6-90" stroke="#3A3A44" stroke-width="22" stroke-linecap="round"/><rect x="18" y="96" width="50" height="96" rx="18" fill="#C2412D"/><rect x="44" y="90" width="76" height="120" rx="28" fill="#1D5E89"/><circle cx="84" cy="56" r="38" fill="#E9B98F"/><path d="M38 34h92M56 4h56v30H56z" fill="#5B6B2F" stroke="#5B6B2F" stroke-width="10" stroke-linecap="round"/></svg>',
rock: '<svg viewBox="0 0 160 90"><path d="M10 80C6 40 40 10 80 12s70 30 70 68z" fill="#A89A86"/><path d="M40 40c20-12 50-14 70 0" stroke="#C9BCA8" stroke-width="8" fill="none" stroke-linecap="round"/></svg>',
truck: '<svg viewBox="0 0 320 190"><rect x="10" y="40" width="190" height="100" rx="14" fill="#8C2F2F"/><path d="M200 70h70l40 44v26H200z" fill="#8C2F2F"/><rect x="220" y="82" width="50" height="34" rx="6" fill="#BFD9E6"/><circle cx="70" cy="150" r="32" fill="#2B2B2B"/><circle cx="250" cy="150" r="32" fill="#2B2B2B"/><circle cx="70" cy="150" r="12" fill="#999"/><circle cx="250" cy="150" r="12" fill="#999"/></svg>',
keys: '<svg viewBox="0 0 200 200"><circle cx="70" cy="70" r="46" fill="none" stroke="#C9A227" stroke-width="18"/><path d="M100 100l70 70M140 140l-16 16M158 158l-16 16" stroke="#9AA5B1" stroke-width="20" stroke-linecap="round"/></svg>',
phone2: '<svg viewBox="0 0 120 220"><rect width="120" height="220" rx="20" fill="#1B2230"/><rect x="10" y="26" width="100" height="180" rx="10" fill="#5B8DB8"/></svg>',
x: '<svg viewBox="0 0 120 120"><circle cx="60" cy="60" r="56" fill="#C2412D"/><path d="M34 34l52 52M86 34l-52 52" stroke="#fff" stroke-width="16" stroke-linecap="round"/></svg>',
car: '<svg viewBox="0 0 260 140"><path d="M20 90l30-50h140l40 50v30H20z" fill="#1D5E89"/><rect x="70" y="50" width="50" height="34" rx="6" fill="#BFD9E6"/><rect x="132" y="50" width="50" height="34" rx="6" fill="#BFD9E6"/><circle cx="70" cy="122" r="22" fill="#2B2B2B"/><circle cx="196" cy="122" r="22" fill="#2B2B2B"/></svg>',
hill: '<svg viewBox="0 0 1080 420"><path d="M0 160C200 60 380 120 540 90S880 20 1080 110V420H0z" fill="#D9C08C"/><path d="M0 250C240 190 420 240 620 200S900 160 1080 210V420H0z" fill="#E7D3A8"/></svg>',
map: '<svg viewBox="0 0 700 560"><rect width="700" height="560" rx="16" fill="#FBF6E4"/><path d="M140 20V540M280 20V540M420 20V540M560 20V540" stroke="#BFD4EA" stroke-width="4"/><path d="M20 400C160 330 260 400 380 320S560 220 690 260M20 470C180 420 300 480 430 400S600 330 690 360M200 160C300 120 380 170 480 130" fill="none" stroke="#D6B07C" stroke-width="5"/><path d="M60 500C200 430 260 380 340 300S500 160 600 90" fill="none" stroke="#C0392B" stroke-width="6" stroke-dasharray="18 12"/></svg>',
star: '<svg viewBox="0 0 120 520"><path d="M60 510V90" stroke="#1B2230" stroke-width="14" stroke-linecap="round"/><path d="M60 0l14 34 36 2-28 24 9 36-31-20-31 20 9-36L10 36l36-2z" fill="#C98A00"/></svg>',
magnet: '<svg viewBox="0 0 120 520"><path d="M60 510V90" stroke="#C0392B" stroke-width="14" stroke-linecap="round"/><path d="M60 10l38 90H22z" fill="#C0392B"/></svg>'
};
/* ---------- elements ---------- */
var EL = {};
function cut(id, art, w){ var d = document.createElement('div'); d.className = 'cut'; d.innerHTML = art; d.style.width = w + 'px'; $('world').appendChild(d); EL[id] = { node: d, w: w, h: 0 }; return d; }
function tag(id, text, cls){ var d = document.createElement('div'); d.className = 'tag ' + (cls || ''); d.textContent = text; $('world').appendChild(d); EL[id] = { node: d, tag: true }; return d; }
cut('hill', ART.hill, 1080); cut('map', ART.map, 760);
cut('compass', compassSVG(), 560);
cut('phone', ART.phone, 330); cut('tree', ART.tree, 230); cut('hiker', ART.hiker, 150);
cut('rock1', ART.rock, 130); cut('rock2', ART.rock, 130); cut('rock3', ART.rock, 130);
cut('truck', ART.truck, 300); cut('keys', ART.keys, 170); cut('phone2', ART.phone2, 110);
cut('x1', ART.x, 100); cut('x2', ART.x, 100); cut('x3', ART.x, 100);
cut('car', ART.car, 240); cut('star', ART.star, 96); cut('magnet', ART.magnet, 96);
[['nosig', 'No signal', 'red'], ['tN', 'N: always north', 'green'], ['tWire', 'wire: aim'], ['tLens', 'lens: read'], ['tRing', 'ring: set'],
['tBub', 'bubble in the center', 'green'], ['tFar', 'cars 18 m · fences 10 m', 'red'], ['t62', '062°', 'big'], ['tLine', 'ring line on the arrow', 'green'],
['tBody', 'turn your body, not the ring'], ['tAdd', 'under 180: add 180'], ['tSub', 'over 180: subtract 180'], ['tOut', '62° out', 'blue'], ['tHome', '242° home', 'red'],
['tTrue', 'map north', 'blue'], ['tMag', 'compass north', 'red'], ['t7', '≈ 7°', 'big'], ['tM2C', 'map → compass: −7'], ['tC2M', 'compass → map: +7'],
['tEnd1', 'The compass knows north.', 'big'], ['tEnd2', 'You know the rest.', 'big green'], ['tSite', 'sghadimi.com/compass', 'blue']].forEach(function(a){ tag(a[0], a[1], a[2]); });
var compassNode = EL.compass.node, CARD = compassNode.querySelector('.card'), RING = compassNode.querySelector('.ring'), BUB = compassNode.querySelector('.bub');
/* the header badge: a mini paper compass that shows the number of the moment */
$('badge').innerHTML = '<svg viewBox="0 0 200 200" style="filter:drop-shadow(6px 10px 0 rgba(40,22,5,.25))"><circle cx="100" cy="100" r="92" fill="#5B6B2F" stroke="#FFF8EA" stroke-width="8"/><circle cx="100" cy="100" r="66" fill="#FBFAF4"/><path id="bArw" d="M100 42l12 30H88z" fill="#3EC46A" stroke="#1E7A3C" stroke-width="2"/><text id="bTxt" x="100" y="128" font-size="38" font-weight="900" text-anchor="middle" fill="#1B2230">N</text></svg>';
for(var i = 0; i < TM.scenes.length; i++) $('dots').appendChild(document.createElement('i'));
/* ---------- the cardboard table, drawn once ---------- */
(function(){
var c = $('bg').getContext('2d'), g = c.createRadialGradient(540, 900, 200, 540, 960, 1200); g.addColorStop(0, '#CFA56E'); g.addColorStop(1, '#9C7343');
c.fillStyle = g; c.fillRect(0, 0, 1080, 1920);
var im = c.getImageData(0, 0, 1080, 1920), d = im.data, seed = 7;
function rnd(){ seed = (seed * 16807) % 2147483647; return seed / 2147483647; }
for(var p = 0; p < d.length; p += 4){ var v = (rnd() - .5) * 22; d[p] += v; d[p + 1] += v; d[p + 2] += v * .8; }
c.putImageData(im, 0, 0); c.globalAlpha = .07; c.strokeStyle = '#5A3A1A';
for(var k = 0; k < 900; k++){ var x = rnd() * 1080, y = rnd() * 1920; c.lineWidth = 1 + rnd() * 2; c.beginPath(); c.moveTo(x, y); c.lineTo(x + 20 + rnd() * 60, y + (rnd() - .5) * 6); c.stroke(); }
})();
/* ---------- the stepped clock and the jitter that makes it look hand-moved ---------- */
var step = 0;
function J(id, amp){ var h = 0; for(var i = 0; i < id.length; i++) h = h * 31 + id.charCodeAt(i) | 0; return (hash(step * 977 + h) - .5) * 2 * amp; }
var POP = [.55, 1.14, .97, 1];
function popK(t, t0){ if(t < t0) return 0; var k = Math.floor((t - t0) * FPS_SM); return k >= POP.length ? 1 : POP[k]; }
function lerpStep(t, t0, dur, n){ if(t <= t0) return 0; var k = Math.min(1, (t - t0) / dur); return Math.round(k * n) / n; }
function place(id, x, y, opts){
opts = opts || {}; var e = EL[id], n = e.node, s = opts.s == null ? 1 : opts.s;
if(s <= 0){ n.style.display = 'none'; return; }
n.style.display = 'block';
var w = n.offsetWidth, h = n.offsetHeight, jit = opts.still ? 0 : 1;
var tx = x - w / 2 + J(id + 'x', 3.2) * jit, ty = y - h / 2 + J(id + 'y', 3.2) * jit, rot = (opts.r || 0) + J(id + 'r', 0.9) * jit;
n.style.transform = 'translate(' + tx.toFixed(1) + 'px,' + ty.toFixed(1) + 'px) rotate(' + rot.toFixed(2) + 'deg) scale(' + s + ')';
}
function hideAll(){ Object.keys(EL).forEach(function(k){ EL[k].node.style.display = 'none'; }); $('ov').innerHTML = ''; }
function setCompass(card, ring, bub){ CARD.setAttribute('transform', 'rotate(' + (-card).toFixed(1) + ')'); RING.setAttribute('transform', 'rotate(' + (-ring).toFixed(1) + ')'); BUB.setAttribute('transform', 'translate(' + (bub || 0) + ' ' + (bub ? -bub * .7 : 0) + ')'); }
function stepTurn(t, t0, dur, from, to){ return from + (to - from) * lerpStep(t, t0, dur, Math.max(2, Math.round(dur * 8))); }
function dash(d, t, t0, dur, color){ var k = lerpStep(t, t0, dur, 8); if(k <= 0) return; var p = document.createElementNS('http://www.w3.org/2000/svg', 'path'); p.setAttribute('d', d); p.setAttribute('fill', 'none'); p.setAttribute('stroke', color || '#FFFBF0'); p.setAttribute('stroke-width', '14'); p.setAttribute('stroke-linecap', 'round'); $('ov').appendChild(p); var L = p.getTotalLength(); p.setAttribute('stroke-dasharray', dashUpTo(L, L * k)); }
function dashUpTo(L, upto){ var a = [], s = 0; while(s < upto){ var on = Math.min(26, upto - s); a.push(on.toFixed(1)); s += on; if(s >= upto) break; a.push(22); s += 22; } a.push(L + 100); return a.join(' '); }
function pathAt(d, k){ var p = document.createElementNS('http://www.w3.org/2000/svg', 'path'); p.setAttribute('d', d); $('ov').appendChild(p); var a = p.getPointAtLength(p.getTotalLength() * k); $('ov').removeChild(p); return a; }
/* ---------- the scenes ---------- */
var SC = {
hook: function(t){
var out = lerpStep(t, S('hook', 1, 0), .6, 4);
place('phone', 540 - 900 * out, 820, { s: popK(t, S('hook', 0, 0)), r: -4 + J('ph', 3) });
place('nosig', 540 - 900 * out, 560, { s: popK(t, S('hook', 0, .55)), r: 3 });
place('compass', 540 + 900 * (1 - lerpStep(t, S('hook', 1, 0), .7, 5)), 840, { s: t >= S('hook', 1, 0) ? 1 : 0, r: 4 });
setCompass(stepTurn(t, S('hook', 1, .3), 1.2, 60, 0), 0, 0); return 'N';
},
why: function(t){
place('compass', 540, 860, { r: 0 });
setCompass(stepTurn(t, S('why', 0, 0), 1.2, 40, 0), stepTurn(t, S('why', 2, .1), 1, 0, 30), 0);
place('tN', 790, 600, { s: popK(t, S('why', 0, .45)), r: 4 });
place('tWire', 290, 470, { s: popK(t, S('why', 1, .05)), r: -4 });
place('tLens', 300, 1260, { s: popK(t, S('why', 1, .55)), r: 3 });
place('tRing', 860, 1080, { s: popK(t, S('why', 2, .15)), r: -3 });
return 'N';
},
s1: function(t){
place('compass', 540, 740, { s: .82 });
var tilt = t < S('s1', 0, .6) ? 22 : 0; setCompass(tilt ? J('w', 8) : 0, 0, tilt);
place('tBub', 540, 380, { s: popK(t, S('s1', 0, .6)), r: -2 });
var t1 = S('s1', 1, .45), t2 = S('s1', 1, .6), t3 = S('s1', 1, .75);
place('truck', 210, 1220, { s: popK(t, t1), r: -3 }); place('keys', 540, 1230, { s: popK(t, t2), r: 6 }); place('phone2', 860, 1220, { s: popK(t, t3), r: -6 });
place('x1', 290, 1160, { s: popK(t, t1 + .25) }); place('x2', 610, 1160, { s: popK(t, t2 + .25) }); place('x3', 920, 1150, { s: popK(t, t3 + .25) });
place('tFar', 540, 1360, { s: popK(t, t3 + .5), r: 2 });
return 'N';
},
s2: function(t){
place('hill', 540, 1210, { still: true }); place('tree', 880, 1020, { r: 1 }); place('hiker', 200, 1170, { r: -2 });
place('compass', 540, 610, { s: .62 });
setCompass(stepTurn(t, S('s2', 2, .1), 1.6, 0, 62), 0, 0);
dash('M250 1050 L860 960', t, S('s2', 1, .3), 1.2);
place('t62', 830, 450, { s: popK(t, S('s2', 2, .8)), r: 4 });
return t >= S('s2', 2, .8) ? '062°' : 'N';
},
s3: function(t){
place('hill', 540, 1210, { still: true }); place('tree', 900, 1020, { r: 1 });
place('compass', 540, 610, { s: .62 });
setCompass(62, stepTurn(t, S('s3', 1, .1), 1.4, 0, 62), 0);
place('tLine', 540, 300 + 60, { s: popK(t, S('s3', 1, .75)), r: -2 });
var R = [[330, 1170], [530, 1110], [720, 1060]]; R.forEach(function(p, i){ place('rock' + (i + 1), p[0], p[1], { r: i * 4 }); });
var hops = [[160, 1160]].concat(R.map(function(p){ return [p[0], p[1] - 110]; })), t0 = S('s3', 2, .25), k = Math.max(0, Math.min(3, Math.floor((t - t0) / .7) + 1));
if(t < t0) k = 0; var hp = hops[k], hopUp = (t > t0 && ((t - t0) % .7) < .17) ? -40 : 0;
place('hiker', hp[0], hp[1] + hopUp, { r: hopUp ? 6 : -2 });
place('tBody', 540, 1360, { s: popK(t, S('s3', 2, .05)), r: 2 });
return '062°';
},
s4: function(t){
place('car', 190, 1250, { r: -2 }); place('tree', 880, 840, { r: 1 });
place('tAdd', 540, 420, { s: popK(t, S('s4', 1, .05)), r: -3 }); place('tSub', 540, 560, { s: popK(t, S('s4', 1, .55)), r: 2 });
var tOut = S('s4', 2, .05), tHome = S('s4', 2, .5);
dash('M250 1160 L820 900', t, tOut, .8, '#1D5E89');
dash('M820 960 L280 1210', t, tHome, .8, '#C2412D');
place('tOut', 640, 900, { s: popK(t, tOut + .2), r: -6 }); place('tHome', 470, 1260, { s: popK(t, tHome + .2), r: 4 });
var walk = t < tOut ? 0 : t < tHome ? lerpStep(t, tOut, .9, 5) : 1 - lerpStep(t, tHome, 1.1, 6);
place('hiker', 300 + 500 * walk, 1110 - 230 * walk, { r: -2 });
return t >= tHome ? '242°' : '062°';
},
s5: function(t){
place('map', 540, 900, { r: -2, still: false });
place('star', 470, 860, { s: popK(t, S('s5', 0, .35)) });
var mag = popK(t, S('s5', 1, .05)); place('magnet', 560, 860, { s: mag, r: 12 });
place('tTrue', 330, 560, { s: popK(t, S('s5', 0, .5)), r: -4 }); place('tMag', 780, 560, { s: popK(t, S('s5', 1, .2)), r: 4 });
place('t7', 540, 470, { s: popK(t, S('s5', 1, .65)), r: 2 });
place('tM2C', 540, 1250, { s: popK(t, S('s5', 2, .05)), r: -2 }); place('tC2M', 540, 1370, { s: popK(t, S('s5', 2, .55)), r: 2 });
return t >= S('s5', 2, .05) ? '−7°' : 'N';
},
end: function(t){
place('compass', 700, 820, { s: .78, r: 3 }); setCompass(0, 0, 0);
place('hiker', 280, 900, { r: -3 });
place('tEnd1', 540, 1180, { s: popK(t, S('end', 0, 0)), r: -2 }); place('tEnd2', 540, 1310, { s: popK(t, S('end', 1, 0)), r: 2 });
place('tSite', 540, 470, { s: popK(t, S('end', 2, .3)), r: -3 });
return 'N';
}
};
function render(t){
step = Math.floor(t * FPS_SM); var tq = step / FPS_SM;
hideAll();
var cur = TM.scenes[0]; TM.scenes.forEach(function(s){ if(t >= s.start) cur = s; });
var b = SC[cur.id](tq);
$('bTxt').textContent = b; $('bTxt').setAttribute('font-size', b.length > 2 ? 36 : 44);
var dl = $('dots').children; for(var i = 0; i < dl.length; i++) dl[i].className = i < cur.idx ? 'on' : i === cur.idx ? 'now' : '';
var txt = ''; TM.scenes.forEach(function(s){ s.s.forEach(function(x){ if(t >= x.start - .05) txt = x.text; }); });
if(t > TM.total - 1.2) txt = 'The compass knows north. You know the rest.';
$('cap').textContent = txt;
$('cap').style.transform = 'rotate(' + (-.6 + J('cap', .25)).toFixed(2) + 'deg)';
$('head').style.transform = 'rotate(' + (-1.5 + J('head', .2)).toFixed(2) + 'deg)';
/* film grain that changes every stop-motion frame */
var g = $('grain').getContext('2d'), im = g.createImageData(540, 960), d = im.data, sd = step * 7919 + 1;
for(var p = 0; p < d.length; p += 4){ sd = (sd * 16807) % 2147483647; var v = 235 + (sd % 21); d[p] = d[p + 1] = d[p + 2] = v; d[p + 3] = 255; }
g.putImageData(im, 0, 0); $('grain').style.width = '1080px'; $('grain').style.height = '1920px'; $('grain').style.opacity = .16;
}
document.fonts.ready.then(function(){ render(0); window.READY = true; });
</script></body></html>
script_en.json (the twenty sentences)41 lines
[
{"id": "hook", "s": [
"Your phone is dead, and the trail is gone.",
"This little compass can still get you home."
]},
{"id": "why", "s": [
"It knows one thing: where north is.",
"The wire in the lid aims, and the lens reads the dial.",
"The ring turns to hold your number."
]},
{"id": "s1", "s": [
"Step one: hold it flat.",
"Center the bubble, and keep it away from cars, keys and phones."
]},
{"id": "s2", "s": [
"Step two: take a bearing.",
"Look through the slot, and line up the wire with the tree.",
"Then read the number under the index line: sixty-two."
]},
{"id": "s3", "s": [
"Step three: set it, and walk.",
"Turn the ring until its line sits on the arrow.",
"Then turn your body, not the ring, and walk from landmark to landmark."
]},
{"id": "s4", "s": [
"Step four: the way home.",
"Under one hundred eighty, add one hundred eighty. Over it, subtract.",
"Sixty-two out means two hundred forty-two home."
]},
{"id": "s5", "s": [
"Step five: map north is not compass north.",
"Near El Paso, they are about seven degrees apart.",
"Map to compass, subtract seven. Compass to map, add seven."
]},
{"id": "end", "s": [
"The compass knows north.",
"You know the rest.",
"Practice in a park first, and always tell someone your plan."
]}
]
index.html (the page on the site)54 lines
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="color-scheme" content="light dark">
<title>Use your compass in 60 seconds | Shahrouz Ghadimi</title>
<meta name="description" content="A stop-motion short on the lensatic compass: hold it flat, take a bearing, set the ring and walk, find the way home, and allow for declination.">
<link rel="icon" href="../../favicon.svg" type="image/svg+xml">
<link rel="stylesheet" href="./short.css">
</head>
<body>
<header class="top">
<a class="back" href="../">← Animations</a>
</header>
<main id="main">
<section class="intro">
<h1>Use your compass in 60 seconds</h1>
<p class="lede">A stop-motion short on the lensatic compass, the green kind with a wire in the lid. Paper cutouts on a cardboard table, one voice, a caption for every sentence.</p>
<p class="why">The quick version of my free course Compass Trail. The compass knows north. You know the rest.</p>
</section>
<section class="player" aria-label="Film">
<div class="frame">
<video controls playsinline preload="metadata" poster="./poster.jpg" src="./compass-short.mp4" aria-label="Use your compass in 60 seconds, a stop-motion short">
Your browser cannot play this video. <a href="./compass-short.mp4">Download the film</a>.
</video>
</div>
<p class="hint">Sound on. It plays even when an iPhone is on silent. Captions are drawn into the film.</p>
<p class="dl"><a href="./compass-short.mp4" download="compass-in-60-seconds.mp4">Download (MP4, 65 s, 6.6 MB)</a></p>
</section>
<section class="notes" aria-label="The five steps, in short">
<h2>The five steps, in short</h2>
<ol>
<li><b>Hold it flat.</b> Bubble in the center. About 18 m from cars and 10 m from wire fences, with keys and phone in a pocket.</li>
<li><b>Take a bearing.</b> Slot, wire and target in one line, then read the number under the index line.</li>
<li><b>Set it and walk.</b> Turn the ring onto the arrow. Then turn your body, not the ring, and walk from landmark to landmark.</li>
<li><b>The way home.</b> Under 180, add 180. Over it, subtract. 62° out is 242° home.</li>
<li><b>Map north is not compass north.</b> Near El Paso about 7° east in late 2026. Map to compass, subtract. Compass to map, add. Look up your own number.</li>
</ol>
<p class="care">Practice in a park first, and always tell someone your plan.</p>
<a class="course" href="../../compass/">Learn it properly: Compass Trail<span>The free narrated course: a short film, 12 stops, one real walk and seven habits.</span></a>
</section>
<footer class="credit">
<p>Facts: US Army FM 3-25.26 (map reading and land navigation) and the NOAA World Magnetic Model. A learning film, not a substitute for in-person navigation training.</p>
<p>Voice: Kokoro (Heart). <a href="../../cases/compass-trail/">How it was made</a></p>
</footer>
</main>
</body>
</html>
short.css31 lines
/* Use your compass in 60 seconds: a stop-motion short from the Compass Trail course. Cardboard and paper, like the film. */
:root{--bg:#efe4cf;--ink:#2a2118;--mut:#6a5640;--card:#fffbf0;--line:#d9c7a3;--olive:#3f5e2a;--red:#c2412d}
@media (prefers-color-scheme:dark){:root{--bg:#1a140c;--ink:#f3ead9;--mut:#c7b593;--card:#272015;--line:#3e3324}}
*{box-sizing:border-box;min-width:0}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--ink);font:16px/1.6 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;overflow-x:clip}
a{color:var(--olive)}
@media (prefers-color-scheme:dark){a{color:#9cc77e}}
a:focus-visible{outline:2px solid var(--red);outline-offset:3px}
.top{padding:14px max(4vw,16px)}
.back{color:var(--mut);text-decoration:none;font-size:15px}
.back:hover{color:var(--ink)}
main{max-width:620px;margin:0 auto;padding:0 16px 48px}
.intro h1{font-size:clamp(30px,6vw,44px);line-height:1.1;margin:6px 0 10px;text-wrap:balance}
.lede{color:var(--mut);margin:0 0 12px}
.why{margin:0 0 22px;padding:14px 16px;border-inline-start:3px solid var(--olive);background:var(--card);border-radius:0 12px 12px 0}
.frame{background:#fffbf0;border-radius:20px;padding:8px;box-shadow:0 18px 44px rgba(60,35,10,.3);max-width:calc(78vh * 9 / 16 + 16px);margin-inline:auto}
video{display:block;width:100%;max-height:78vh;aspect-ratio:9/16;margin:0 auto;border-radius:14px;background:#b88a55;object-fit:contain}
.hint{color:var(--mut);font-size:14px;margin:10px 0 6px}
.dl{display:flex;flex-wrap:wrap;gap:8px 18px;font-size:14px;margin:0 0 26px}
.notes h2{font-size:22px;margin:0 0 10px}
.notes ol{margin:0;padding-inline-start:22px;display:grid;gap:8px}
.notes li{background:var(--card);border-radius:14px;padding:10px 14px}
.notes li::marker{color:var(--olive);font-weight:800}
.care{margin:14px 0 0;padding:12px 16px;border-radius:12px;background:rgba(194,65,45,.12);font-weight:600}
.course{display:block;margin:22px 0 0;padding:16px 18px;border-radius:14px;background:var(--olive);color:#fff;text-decoration:none;font-weight:700}
.course span{display:block;font-weight:500;opacity:.9;font-size:15px}
.credit{margin-top:28px;color:var(--mut);font-size:14px;border-top:1px solid var(--line);padding-top:14px}
@media (max-width:380px){.intro h1{font-size:28px}}
@media (orientation:landscape) and (max-height:500px){video{max-height:86vh}.frame{max-width:calc(86vh * 9 / 16 + 16px)}}
Need an interactive piece for your business or audience?
A product explainer, a training walkthrough, a simulation people can play with. This one is free to take. I can build yours for a fixed price agreed up front, and the first call is free.