Skip to content

An AI skill that turns books into animated, narrated, interactive web experiences

feat(pandemic-shorts): ch03 The World Stops

yzrd6382c94e05b
diff --git a/site/pandemic-shorts/ch03/audio/bgm/ep3.mp3 b/site/pandemic-shorts/ch03/audio/bgm/ep3.mp3
new file mode 100644
index 0000000..ceec74f
Binary files /dev/null and b/site/pandemic-shorts/ch03/audio/bgm/ep3.mp3 differ
diff --git a/site/pandemic-shorts/ch03/audio/en/.speed b/site/pandemic-shorts/ch03/audio/en/.speed
new file mode 100644
index 0000000..b123147
--- /dev/null
+++ b/site/pandemic-shorts/ch03/audio/en/.speed
@@ -0,0 +1 @@
+1.1
\ No newline at end of file
diff --git a/site/pandemic-shorts/ch03/audio/en/card.mp3 b/site/pandemic-shorts/ch03/audio/en/card.mp3
new file mode 100644
index 0000000..d77c3b8
Binary files /dev/null and b/site/pandemic-shorts/ch03/audio/en/card.mp3 differ
diff --git a/site/pandemic-shorts/ch03/audio/en/end.mp3 b/site/pandemic-shorts/ch03/audio/en/end.mp3
new file mode 100644
index 0000000..9490d21
Binary files /dev/null and b/site/pandemic-shorts/ch03/audio/en/end.mp3 differ
diff --git a/site/pandemic-shorts/ch03/audio/en/hook.mp3 b/site/pandemic-shorts/ch03/audio/en/hook.mp3
new file mode 100644
index 0000000..65fb6a3
Binary files /dev/null and b/site/pandemic-shorts/ch03/audio/en/hook.mp3 differ
diff --git a/site/pandemic-shorts/ch03/audio/en/jobs.mp3 b/site/pandemic-shorts/ch03/audio/en/jobs.mp3
new file mode 100644
index 0000000..e0aa778
Binary files /dev/null and b/site/pandemic-shorts/ch03/audio/en/jobs.mp3 differ
diff --git a/site/pandemic-shorts/ch03/audio/en/money.mp3 b/site/pandemic-shorts/ch03/audio/en/money.mp3
new file mode 100644
index 0000000..b9ac404
Binary files /dev/null and b/site/pandemic-shorts/ch03/audio/en/money.mp3 differ
diff --git a/site/pandemic-shorts/ch03/audio/en/orders.mp3 b/site/pandemic-shorts/ch03/audio/en/orders.mp3
new file mode 100644
index 0000000..f585935
Binary files /dev/null and b/site/pandemic-shorts/ch03/audio/en/orders.mp3 differ
diff --git a/site/pandemic-shorts/ch03/audio/en/schools.mp3 b/site/pandemic-shorts/ch03/audio/en/schools.mp3
new file mode 100644
index 0000000..f5a9664
Binary files /dev/null and b/site/pandemic-shorts/ch03/audio/en/schools.mp3 differ
diff --git a/site/pandemic-shorts/ch03/audio/en/shops.mp3 b/site/pandemic-shorts/ch03/audio/en/shops.mp3
new file mode 100644
index 0000000..7cb21db
Binary files /dev/null and b/site/pandemic-shorts/ch03/audio/en/shops.mp3 differ
diff --git a/site/pandemic-shorts/ch03/audio/en/sky.mp3 b/site/pandemic-shorts/ch03/audio/en/sky.mp3
new file mode 100644
index 0000000..2edf3b1
Binary files /dev/null and b/site/pandemic-shorts/ch03/audio/en/sky.mp3 differ
diff --git a/site/pandemic-shorts/ch03/audio/en/timings.js b/site/pandemic-shorts/ch03/audio/en/timings.js
new file mode 100644
index 0000000..7330567
--- /dev/null
+++ b/site/pandemic-shorts/ch03/audio/en/timings.js
@@ -0,0 +1 @@
+window.TIMINGS = {"hook": {"dur": 5.638, "marks": {"april": 0.0, "half": 1.8, "same": 3.491, "stay": 4.582}, "cues": [[0.0, "In April twenty twenty, more than half of humanity was told the same thing:"], [4.582, "stay home."]]}, "card": {"dur": 3.365, "marks": {"series": 0.0, "three": 1.073, "title": 2.036}, "cues": [[0.0, "The Pandemic."], [1.073, "Part three:"], [2.036, "the world stops."]]}, "orders": {"dur": 5.909, "marks": {"march": 0.164, "eighty": 1.427, "ordered": 2.473, "april": 3.364, "k120": 4.66}, "cues": [[0.0, "By late March, more than eighty countries had ordered it."], [3.327, "By early April, more than a hundred and twenty."]]}, "schools": {"dur": 5.321, "marks": {"schools": 0.0, "sept": 1.418, "billion": 2.6, "kept": 4.036}, "cues": [[0.0, "Schools closed."], [1.345, "By September, more than a billion students had been kept out of class."]]}, "shops": {"dur": 6.101, "marks": {"shelves": 0.0, "streets": 1.327, "shops": 2.764, "forty": 3.991, "sixty": 4.72}, "cues": [[0.0, "Shelves emptied."], [1.327, "Streets went quiet."], [2.764, "Shops lost forty to sixty percent of their customers."]]}, "jobs": {"dur": 4.291, "marks": {"us": 0.2, "forty": 2.064, "jobs": 2.782}, "cues": [[0.0, "In the United States alone, more than forty million jobs were gone."]]}, "money": {"dur": 8.638, "marks": {"world": 0.0, "trillion": 1.436, "less": 3.273, "nine": 4.8, "worst": 6.145, "depression": 7.527}, "cues": [[0.0, "Worldwide, people earned three and a half trillion dollars less from their work, in nine months."], [5.982, "The worst recession since the Great Depression."]]}, "sky": {"dur": 6.675, "marks": {"pause": 0.836, "sky": 1.818, "china": 3.236, "fall": 5.236, "half": 5.945}, "cues": [[0.0, "And with the world on pause, the sky changed."], [3.236, "Over China, nitrogen oxide emissions fell by half."]]}, "end": {"dur": 7.985, "marks": {"wait": 0.0, "pause": 2.855, "back": 4.364, "changing": 5.527, "next": 6.545, "race": 7.164}, "cues": [[0.0, "Everyone waited for it to pass."], [1.909, "But it was only a pause."], [3.727, "The virus was coming back, and changing."], [6.545, "Next:"], [7.164, "the race."]]}};
diff --git a/site/pandemic-shorts/ch03/audio/sfx/thud.mp3 b/site/pandemic-shorts/ch03/audio/sfx/thud.mp3
new file mode 100644
index 0000000..41e5a96
Binary files /dev/null and b/site/pandemic-shorts/ch03/audio/sfx/thud.mp3 differ
diff --git a/site/pandemic-shorts/ch03/audio/sfx/tick.mp3 b/site/pandemic-shorts/ch03/audio/sfx/tick.mp3
new file mode 100644
index 0000000..2e1e687
Binary files /dev/null and b/site/pandemic-shorts/ch03/audio/sfx/tick.mp3 differ
diff --git a/site/pandemic-shorts/ch03/audio/sfx/whoosh.mp3 b/site/pandemic-shorts/ch03/audio/sfx/whoosh.mp3
new file mode 100644
index 0000000..6c63e5e
Binary files /dev/null and b/site/pandemic-shorts/ch03/audio/sfx/whoosh.mp3 differ
diff --git a/site/pandemic-shorts/ch03/ch03.js b/site/pandemic-shorts/ch03/ch03.js
new file mode 100644
index 0000000..38f6c11
--- /dev/null
+++ b/site/pandemic-shorts/ch03/ch03.js
@@ -0,0 +1,60 @@
+/* ch03.js: The World Stops' own pieces, loaded after pandemic.js and stay.js.
+ hatchMap(p, D, view, hatch, { on }) ink hatching over paperMap() on the same view(t): hatch(iso, t) > 0 for each country
+ with a stay-at-home order (red is the virus, so orders are ink, as in the film);
+ redrawn only when the view or the set changes: keep view(t) still, move a wrapper
+ stayOn(iso, day) · stayWeek(iso, i) the orders from stay.js: in force by day 'YYYY-MM-DD' / in week i from WEEK0
+ crop(g, name, [sx, sy, sw, sh], x, y, w, h) part of a picture (source px) drawn into the box x, y, w, h */
+'use strict';
+const stayOn = (iso, day) => !!STAY[iso] && STAY[iso][0] <= day;
+const stayWeek = (iso, i) => !!STAY[iso] && STAY[iso][1][i] === '1';
+const dayAt = (d0, d1, q) => new Date(Date.parse(d0) + Math.round((Date.parse(d1) - Date.parse(d0)) / 864e5 * q) * 864e5).toISOString().slice(0, 10);
+const dayFmt = d => new Date(d + 'T12:00Z').toLocaleDateString('en-GB', { day: 'numeric', month: 'long', year: 'numeric', timeZone: 'UTC' }).toUpperCase();
+
+// the projection is paperMap's (pandemic.js): one canvas more, drawing only the hatched countries
+function hatchMap(p, D, view, hatch, { on } = {}) {
+ const geo = geoData(), g = G(p, {}), fo = mk('foreignObject', { x: 0, y: 0, width: W, height: H }, g);
+ const cv = document.createElement('canvas'); cv.width = W * PX; cv.height = H * PX;
+ cv.style.cssText = `width:${W}px;height:${H}px;display:block`;
+ fo.appendChild(cv);
+ const ctx = cv.getContext('2d');
+ const tile = document.createElement('canvas'); tile.width = tile.height = 12;
+ const tc = tile.getContext('2d'); tc.strokeStyle = MAPINK; tc.lineWidth = 2.6;
+ tc.beginPath(); tc.moveTo(-3, 15); tc.lineTo(15, -3); tc.moveTo(-3, 3); tc.lineTo(3, -3); tc.moveTo(9, 15); tc.lineTo(15, 9); tc.stroke();
+ const pat = ctx.createPattern(tile, 'repeat');
+ const ring = (r, v) => {
+ for (let i = 0; i < r.n; i++) {
+ const dl = r.lam[i] - v.l0, cdl = Math.cos(dl), cp = r.cphi[i], sp = r.sphi[i];
+ let x = cp * Math.sin(dl), y = v.cf0 * sp - v.sf0 * cp * cdl;
+ if (v.sf0 * sp + v.cf0 * cp * cdl < 0) { const l = Math.hypot(x, y) || 1; x /= l; y /= l; }
+ i ? ctx.lineTo(v.cx + v.k * x, v.cy - v.k * y) : ctx.moveTo(v.cx + v.k * x, v.cy - v.k * y);
+ }
+ ctx.closePath();
+ };
+ const L = geo.lod[0], keys = Object.keys(L);
+ let drawn = null; // what is on the canvas: redrawn only when the view or the hatched set changes (Firefox)
+ clockRun(t => {
+ const s = { lon: 0, lat: 0, H: 1.15, ...view(t) }, live = !on || (t >= on[0] && t <= on[1]);
+ const sig = live ? JSON.stringify(s) + keys.map(c => hatch(c, t) > 0 ? 1 : 0).join('') : '';
+ if (sig === drawn) return;
+ drawn = sig;
+ ctx.setTransform(1, 0, 0, 1, 0, 0); ctx.clearRect(0, 0, cv.width, cv.height);
+ if (!live) return;
+ const f0 = s.lat * DEG;
+ const v = { l0: s.lon * DEG, sf0: Math.sin(f0), cf0: Math.cos(f0), k: 450 / s.H, cx: W / 2 + (s.dx || 0), cy: H / 2 + (s.dy || 0) };
+ ctx.setTransform(PX, 0, 0, PX, 0, 0);
+ ctx.beginPath(); ctx.arc(v.cx, v.cy, v.k, 0, 2 * Math.PI); ctx.save(); ctx.clip();
+ for (const c of keys) {
+ const a = hatch(c, t) > 0 ? 1 : 0; if (!a) continue;
+ ctx.beginPath(); for (const r of L[c]) ring(r, v);
+ ctx.globalAlpha = a * .7; ctx.fillStyle = pat; ctx.fill(); ctx.globalAlpha = a * .12; ctx.fillStyle = MAPINK; ctx.fill();
+ }
+ ctx.globalAlpha = 1; ctx.restore();
+ }, D, { tail: true });
+ return g;
+}
+
+function crop(g, name, [sx, sy, sw, sh], x, y, w, h) {
+ const [iw, ih] = ART[name], sv = mk('svg', { x, y, width: w, height: h, viewBox: `${sx} ${sy} ${sw} ${sh}`, preserveAspectRatio: 'xMidYMid slice' }, g);
+ mk('image', { href: `../img/${name}.webp`, x: 0, y: 0, width: iw, height: ih }, sv);
+ return sv;
+}
diff --git a/site/pandemic-shorts/ch03/index.html b/site/pandemic-shorts/ch03/index.html
new file mode 100644
index 0000000..8b2054c
--- /dev/null
+++ b/site/pandemic-shorts/ch03/index.html
@@ -0,0 +1,234 @@
+<!doctype html>
+<html lang="en" data-stage="portrait">
+<head>
+<meta charset="utf-8">
+<meta name="viewport" content="width=device-width, initial-scale=1">
+<title>The Pandemic · 3 · The World Stops</title>
+<link rel="stylesheet" href="../lib/engine.css">
+<link rel="expect" href="#bar" blocking="render">
+</head>
+<body>
+<script src="../lib/engine.js"></script>
+<script src="audio/en/timings.js"></script>
+<script src="../img/art.js"></script>
+<script src="../img/ch03-art.js"></script>
+<script src="../img/geo-lite.js"></script>
+<script src="../lib/icons.js"></script>
+<script src="../lib/shorts.js"></script>
+<script src="../lib/pandemic.js"></script>
+<script src="stay.js"></script>
+<script src="ch03.js"></script>
+<script>
+'use strict';
+const CHAPTER = { number: 3, title: 'The World Stops', minutes: 1, language: 'en', next: '../ch04/' };
+
+// a dark band behind words over a photograph, y0..y1
+const shade = (s, y0, y1, t0) => { const g = G(s, { o: 0 }); rect(g, 0, y0, W, y1 - y0, { fill: DARK, opacity: .62 }); show(g, t0, .2, lin); return g; };
+const STAY_TAG = 'Stay-at-home orders · Our World in Data';
+
+/* ---------- beats ---------- */
+const OPEN_PRE = .3;
+const BEATS = [
+ // 0. The hook over empty roads already moving: half of humanity, told to stay home
+ ['hook', 'Stay home', (m, D) => {
+ const p = panel(0);
+ const hf = m('half'), sm = m('same'), st = m('stay');
+ let s = shot(p, 0, hf);
+ wide(s, 'street-hwy407', [[0, .47, .45, 1.3], [hf + .3, .47, .41, 1.75]]);
+ srcTag(s, 'Highway 407, Ontario · Raysonho, CC0', 50, 150, 0);
+ word(s, 'April 2020', CX - 20, 290, 0, { size: 110, fill: LIGHT, stroke: DARK });
+ s = shot(p, hf, sm);
+ wide(s, 'street-glenview-24', [[hf, .62, .6, 1.05], [sm + .3, .74, .6, 1.2]]);
+ srcTag(s, 'Glenview, Illinois · C. E. Miller, public domain', 50, 150, hf);
+ word(s, 'More than half', CX - 20, 1040, hf, { size: 110, fill: LIGHT, stroke: DARK });
+ word(s, 'of humanity', CX - 20, 1170, hf + .3, { size: 110, fill: LIGHT, stroke: DARK });
+ sfx('hook', hf, 'whoosh', .35);
+ s = shot(p, sm, undefined);
+ wide(s, 'airport-pek-empty', [[sm, .7, .6, 1.0], [D + .8, .8, .62, 1.22]]);
+ srcTag(s, 'Beijing Capital Airport · Mx. Granger, CC0', 50, 150, sm);
+ word(s, 'Stay home', CX - 20, 860, st, { size: 210, fill: LIGHT, stroke: DARK, from: 1.3, dur: .16 });
+ sfx('hook', st, 'thud', 1.3);
+ }, { pre: OPEN_PRE }],
+
+ // 1. Which series, which episode
+ ['card', 'The series', (m, D) => {
+ const p = panel(0);
+ const s = shot(p, 0, undefined, { bg: DARK, swipe: 'quiet' });
+ seriesCard(s, 0, 3, m('three'));
+ }],
+
+ // 2. How fast: the map hatches country by country, the count runs with the date
+ ['orders', 'Eighty, then 120', (m, D) => {
+ const p = panel(0);
+ const e8 = m('eighty'), k12 = m('k120');
+ const s = shot(p, 0, undefined, { bg: DARK, whip: true });
+ const view = () => ({ lon: 46, lat: 27, H: .66 }); // still: the canvases redraw only when they must; the push is the wrapper's
+ const mw = G(s, { x: CX, y: H / 2 }), mg = G(mw, { x: -CX, y: -H / 2 });
+ const day = t => t < m('april') ? dayAt('2020-03-18', '2020-03-26', ramp01(t, .1, e8)) : dayAt('2020-03-26', '2020-04-07', ramp01(t, m('april'), k12));
+ paperMap(mg, D, view);
+ hatchMap(mg, D, view, (c, t) => stayOn(c, day(t)) ? 1 : 0);
+ srcTag(s, STAY_TAG, 50, 150, 0);
+ const dc = G(s, { x: CX - 20, y: 270 });
+ rect(dc, -230, -52, 460, 72, { fill: DARK, rx: 6 });
+ const dt = T(dc, '', { y: 0, size: 46, fill: LIGHT, font: SANS, weight: 600, anchor: 'middle' });
+ const box = G(s, { x: CX - 20, y: 1120, o: 0 });
+ rect(box, -300, -150, 600, 270, { fill: DARK, rx: 10, opacity: .9 });
+ const n = T(box, '0', { y: 10, size: 170, fill: LIGHT, font: SANS, weight: 600, anchor: 'middle' });
+ T(box, 'COUNTRIES: STAY HOME', { y: 85, size: 44, fill: MUTED, font: SANS, weight: 500, anchor: 'middle' }).setAttribute('letter-spacing', '.08em');
+ const keys = Object.keys(STAY);
+ clockRun(t => { const d = day(t); dt.textContent = dayFmt(d); n.textContent = keys.filter(c => stayOn(c, d)).length; }, D, { tail: true });
+ tw(box, { o: 1 }, .3, .25);
+ tw(n, { s: 1.15 }, e8, .15, out); tw(n, { s: 1 }, e8 + .15, .2);
+ tw(n, { s: 1.15 }, k12, .15, out); tw(n, { s: 1 }, k12 + .15, .2);
+ sfx('orders', e8, 'tick', 1); sfx('orders', k12, 'tick', 1.2);
+ }],
+
+ // 3. Schools: the gate, the empty room, a billion students at home
+ ['schools', 'A billion students', (m, D) => {
+ const p = panel(0);
+ const sp = m('sept'), bn = m('billion');
+ let s = shot(p, 0, sp, { whip: true });
+ wide(s, 'school-closed-banner', [[0, .22, .5, 1.45], [sp + .3, .2, .48, 1.7]]);
+ srcTag(s, 'Rialto, California · Cyan&Orange, CC0', 50, 150, 0);
+ word(s, 'Schools closed', CX - 20, 1150, .1, { size: 120, fill: LIGHT, stroke: DARK });
+ s = shot(p, sp, bn);
+ wide(s, 'school-empty-classroom', [[sp, .42, .6, 1.0], [bn + .3, .55, .6, 1.15]]);
+ srcTag(s, 'U.S. Army photo, Pfc. Kaden Pitt', 50, 150, sp);
+ label(s, 'By September 2020', CX - 20, 1150, sp + .05, { size: 64, fill: DARK, colour: LIGHT });
+ s = shot(p, bn, undefined);
+ photo(s, 'ep3-remote-kid', bn, D + .8, { s0: 1.0, s1: 1.12, dy: -30 });
+ shade(s, 960, 1300, bn - .05);
+ counter(s, 1e9, CX - 20, 1120, bn, { size: 118, fill: LIGHT, dur: .9 });
+ word(s, 'Students out of class', CX - 20, 1210, bn + .5, { size: 60, fill: LIGHT });
+ srcTag(s, 'UNESCO, via Wikipedia', 50, 1272, bn + .5);
+ }],
+
+ // 4. Shelves, streets, shops: of every ten shoppers, four to six stay away
+ ['shops', 'Shops', (m, D) => {
+ const p = panel(0);
+ const st = m('streets'), sh = m('shops'), f4 = m('forty'), s6 = m('sixty');
+ let s = shot(p, 0, st, { whip: true });
+ wide(s, 'shelves-empty', [[0, .45, .5, 1.0], [st + .3, .55, .5, 1.12]]);
+ srcTag(s, 'Dan Keck, CC0', 50, 150, 0);
+ word(s, 'Shelves empty', CX - 20, 1150, .1, { size: 120, fill: LIGHT, stroke: DARK });
+ s = shot(p, st, sh);
+ wide(s, 'street-glenview-05', [[st, .3, .6, 1.0], [sh + .3, .42, .6, 1.12]]);
+ srcTag(s, 'Glenview, Illinois · C. E. Miller, public domain', 50, 150, st);
+ word(s, 'Streets quiet', CX - 20, 1150, st + .05, { size: 120, fill: LIGHT, stroke: DARK });
+ s = shot(p, sh, undefined);
+ photo(s, 'ep3-mall-empty', sh, D + .8, { s0: 1.0, s1: 1.1, dim: .35 });
+ label(s, 'Shop visitors', CX - 20, 300, sh + .05, { size: 60, fill: LIGHT, colour: DARK });
+ const ppl = icons(s, 'person', 10, 5, CX - 20 - 300, 470, 120, LIGHT, sh + .1, .5);
+ ppl.forEach((e, i) => { if (i >= 6) tw(e, { o: .18 }, f4, .25); else if (i >= 4) tw(e, { o: .18 }, s6, .25); });
+ shade(s, 1000, 1300, f4 - .05);
+ const a = word(s, '−40%', CX - 20, 1200, f4, { size: 200, fill: MARK });
+ hide(a, s6, .05, lin);
+ word(s, '−60%', CX - 20, 1200, s6, { size: 200, fill: MARK });
+ sfx('shops', f4, 'tick', .9); sfx('shops', s6, 'tick', 1.1);
+ srcTag(s, 'Retail foot traffic, spring 2020 · Wikipedia', 50, 1272, f4 + .3);
+ }],
+
+ // 5. Forty million US jobs
+ ['jobs', 'Forty million jobs', (m, D) => {
+ const p = panel(0);
+ const f4 = m('forty');
+ let s = shot(p, 0, f4, { bg: DARK, whip: true });
+ const pl = plate(s, 'closed-sign-temporary', CX - 20, 680, { w: 800, r: -2 });
+ tw(pl, { s: 1.12 }, 0, f4 + .3, lin);
+ srcTag(s, 'Alabama Extension, CC0', 50, 150, 0);
+ label(s, 'United States', CX - 20, 1150, m('us'), { size: 76, fill: DARK, colour: LIGHT });
+ s = shot(p, f4, undefined);
+ photo(s, 'ep3-jobs-queue', f4, D + .8, { s0: 1.0, s1: 1.12, dx: 20 });
+ shade(s, 930, 1300, f4 - .05);
+ word(s, 'More than', CX - 20, 1000, f4, { size: 56, fill: MUTED });
+ counter(s, 40e6, CX - 20, 1130, f4, { size: 140, fill: LIGHT, dur: .8 });
+ word(s, 'US jobs gone', CX - 20, 1225, m('jobs'), { size: 70, fill: LIGHT });
+ srcTag(s, 'Wikipedia', 50, 1272, f4 + .3);
+ }],
+
+ // 6. The world's pay: $3.5 trillion less in nine months; the worst since the breadlines of the 1930s
+ ['money', 'Three and a half trillion', (m, D) => {
+ const p = panel(0);
+ const tr = m('trillion'), ws = m('worst'), dp = m('depression');
+ let s = shot(p, 0, ws, { bg: NIGHT, whip: true });
+ const view = t => ({ lon: 10 + 9 * t, lat: 18, H: 1.3, dy: -240 });
+ globeShot(s, D, view, null, null, { on: [0, ws + .4] });
+ word(s, 'Worldwide', CX - 20, 1000, .05, { size: 80, fill: MUTED });
+ const v = T(s, '', { x: CX - 20, y: 1130, size: 130, fill: LIGHT, font: SANS, weight: 600, anchor: 'middle', o: 0 });
+ show(v, tr - .1, .1, lin);
+ prog(q => { v.textContent = '$' + (3.5 * q).toFixed(1) + ' trillion'.toUpperCase(); }, tr, 1.0, out);
+ for (let k = 0; k < 6; k++) sfx('money', tr + k / 6, 'tick', .45);
+ word(s, 'Less pay from work', CX - 20, 1230, m('less'), { size: 66, fill: LIGHT });
+ label(s, 'Jan–Sep 2020', CX - 20, 300, m('nine'), { size: 60, fill: LIGHT, colour: DARK });
+ srcTag(s, 'International Labour Organization, via Wikipedia', 50, 150, tr + .3);
+ s = shot(p, ws, undefined);
+ wide(s, 'ep3-breadline', [[ws, .5, .62, 1.0], [D + .8, .55, .5, 1.18]]);
+ rect(s, 0, 0, W, H, { fill: '#000', opacity: .2 });
+ srcTag(s, 'Breadline, New York, 1932 · U.S. National Archives, public domain', 50, 150, ws);
+ word(s, 'The worst recession since', CX - 20, 1040, ws + .05, { size: 72, fill: LIGHT, stroke: DARK });
+ word(s, 'The Great Depression', CX - 20, 1170, dp, { size: 110, fill: MARK, stroke: DARK });
+ sfx('money', dp, 'thud', 1);
+ }],
+
+ // 7. The sky: up from the empty road, then NASA's January and February over China
+ ['sky', 'Clear skies', (m, D) => {
+ const p = panel(0);
+ const ch = m('china'), fl = m('fall');
+ let s = shot(p, 0, ch, { whip: true });
+ wide(s, 'street-hwy407', [[0, .5, .72, 1.6], [ch + .3, .5, .2, 1.6]]);
+ srcTag(s, 'Highway 407, Ontario · Raysonho, CC0', 50, 150, 0);
+ word(s, 'The sky changed', CX - 20, 1150, m('sky'), { size: 110, fill: LIGHT, stroke: DARK });
+ s = shot(p, ch, undefined, { bg: '#f4f6f8' });
+ const cam = G(s, { x: CX, y: 760, s: 1 });
+ tw(cam, { s: 1.08 }, ch, D + .8 - ch, lin);
+ const jan = G(cam, {}), feb = G(cam, { o: 0 });
+ crop(jan, 'no2-china', [0, 0, 358, 470], -420, -560, 840, 1103);
+ crop(feb, 'no2-china', [362, 0, 358, 470], -420, -560, 840, 1103);
+ // February wipes down over January as the emissions fall
+ const id = 'ep3wipe', cr = mk('rect', { x: -430, y: -570, width: 860, height: 0 }, mk('clipPath', { id }, mk('defs', {}, s)));
+ feb.setAttribute('clip-path', `url(#${id})`); show(feb, fl - .3, .01, lin);
+ prog(q => cr.setAttribute('height', 1130 * q), fl - .3, .7, io);
+ sfx('sky', fl - .3, 'whoosh', .4);
+ srcTag(s, 'Nitrogen dioxide · NASA Earth Observatory, public domain', 50, 150, ch);
+ label(s, 'Nitrogen oxides −50%', CX - 20, 1190, m('half') - .05, { size: 64, fill: DARK, colour: LIGHT });
+ srcTag(s, 'Emissions in China · Wikipedia', 50, 1272, m('half') + .2);
+ }],
+
+ // 8. The end: waiting; the orders lift over the summer and come back; the virus changes; next, the race
+ ['end', 'Only a pause', (m, D) => {
+ const p = panel(0);
+ const pa = m('pause'), bk = m('back'), cg = m('changing'), nx = m('next');
+ let s = shot(p, 0, pa, { whip: true });
+ wide(s, 'street-glenview-24', [[0, .55, .6, 1.0], [pa + .3, .66, .6, 1.15]]);
+ srcTag(s, 'Glenview, Illinois · C. E. Miller, public domain', 50, 150, 0);
+ word(s, 'Waiting', CX - 20, 1150, .1, { size: 140, fill: LIGHT, stroke: DARK });
+ s = shot(p, pa, cg, { bg: DARK, swipe: 'quiet' });
+ const view = () => ({ lon: 30, lat: 22, H: .82 });
+ const mw = G(s, { x: CX, y: H / 2 }), mg = G(mw, { x: -CX, y: -H / 2 });
+ prog(q => put(mg, { x: -CX + 8 * Math.sin(q * 30) * (1 - q) }), bk, .5, lin); // a jolt as it comes back
+ const wk = t => Math.round(t < bk ? 6 + 25 * ramp01(t, pa + .2, bk - .1) : 31 + 16 * ramp01(t, bk, cg - .15));
+ paperMap(mg, D, view, { on: [pa - .1, cg + .4] });
+ hatchMap(mg, D, view, (c, t) => stayWeek(c, wk(t)) ? 1 : 0, { on: [pa - .1, cg + .4] });
+ srcTag(s, STAY_TAG, 50, 150, pa);
+ const dc = G(s, { x: CX - 20, y: 270 });
+ rect(dc, -230, -52, 460, 72, { fill: DARK, rx: 6 });
+ const dt = T(dc, '', { y: 0, size: 46, fill: LIGHT, font: SANS, weight: 600, anchor: 'middle' });
+ clockRun(t => { dt.textContent = dayFmt(new Date(Date.parse(WEEK0) + wk(t) * 7 * 864e5).toISOString().slice(0, 10)); }, D, { tail: true });
+ const op = word(s, 'Only a pause', CX - 20, 1170, pa + .05, { size: 130, fill: LIGHT, stroke: DARK });
+ hide(op, bk - .05, .05, lin);
+ word(s, 'It comes back', CX - 20, 1170, bk, { size: 130, fill: MARK, stroke: DARK });
+ sfx('end', bk, 'thud', 1.1);
+ s = shot(p, cg, nx, { whip: true });
+ found(s, 'virus-sem-red', 'SARS-CoV-2 · NIAID, public domain', cg, nx + .3, { s0: 1.05, s1: 1.3 });
+ word(s, 'Changing', CX - 20, 1150, cg + .05, { size: 150, fill: RED, stroke: DARK });
+ s = shot(p, nx, undefined, { bg: DARK, swipe: true });
+ endCard(s, nx, 3);
+ }],
+].map(shortsBeat);
+
+// One track for the whole film; ?bgm= sets its level by ear (gain under the ducking to 30 %)
+music('audio/bgm/ep3.mp3', undefined, +(new URLSearchParams(location.search).get('bgm') || .4), .05);
+startPandemic();
+</script>
+</body>
+</html>
diff --git a/site/pandemic-shorts/ch03/stay.js b/site/pandemic-shorts/ch03/stay.js
new file mode 100644
index 0000000..2330c3a
--- /dev/null
+++ b/site/pandemic-shorts/ch03/stay.js
@@ -0,0 +1,2 @@
+// stay-at-home orders (required, OxCGRT c6m >= 2) per country: [first day, weekly 1/0 from WEEK0], Our World in Data, CC BY 4.0
+const WEEK0 = "2020-03-02", STAY = {"AFG":["2020-03-25","000011111111111111111111110000000000000000000000"],"ALB":["2020-03-13","001111111111100000000000000000000000011111111111"],"DZA":["2020-03-23","000111111111111111111111111111111111111111111111"],"AGO":["2020-03-27","000011111111100000011111111110000000000000000000"],"ARG":["2020-03-19","000111111111111111111111111111111111111111111111"],"ABW":["2020-03-29","000011111111100000000000001111111100000000001101"],"AUS":["2020-04-02","000001111110000000111111111111111110000000111000"],"AUT":["2020-03-16","001111111000000000000000000000000111111111111111"],"AZE":["2020-03-31","000001111110000111111111111110000000000001111110"],"BHS":["2020-03-20","000111111111111111111111111111111111111111111111"],"BHR":["2020-09-17","000000000000000000000000000001111111111110000000"],"BGD":["2020-03-19","000100111111100011111111111111111111111111111111"],"BRB":["2020-04-03","000001111111111111000000000000000000000000001111"],"BEL":["2020-03-18","000111111111110000000010110000000111111111111111"],"BLZ":["2020-04-27","000000001111111111000000000000000000000000001111"],"BMU":["2020-04-04","000001111111111111110000000000000000000001111111"],"BTN":["2020-08-11","000000000000000000000000111111111111111000111111"],"BOL":["2020-03-17","000111111111111111111111111111111111111100000000"],"BIH":["2020-03-20","000111111111000000000000000000000000011111111111"],"BWA":["2020-04-02","000001111111000100000011000000000000000000011111"],"BRA":["2020-05-05","000000000011111111111111111111111111111111111111"],"BRN":["2021-08-09","000000000000000000000000000000000000000000000000"],"BGR":["2020-03-18","000110011100000000000000000000000000000000000000"],"BFA":["2020-03-21","000111111111100000000000000000000000000000000000"],"KHM":["2020-11-30","000000000000000000000000000000000000000111000000"],"CAN":["2020-03-18","000111111111000000000000000000011111111111111111"],"CPV":["2020-04-01","000001111111111111111000000000000000000000000000"],"CAF":["2020-05-08","000000000011111000000000000000000000000000000111"],"TCD":["2020-04-02","000001111111111111111111111111111111111111100111"],"CHL":["2020-03-25","000011111111111111111111111111111111111111111111"],"CHN":["2020-02-01","111111000011111111111111111001001111111111111111"],"COL":["2020-03-25","000011111111111111111111111000000000000000000111"],"COG":["2020-03-28","000011111111111111111111111111111111111111111111"],"HRV":["2020-03-20","000111111100000000000000000000000000000000000000"],"CUB":["2020-03-24","000011111111111100000000000111100000000000000000"],"CYP":["2020-03-24","000011111111000000000000000000000011111111110111"],"CZE":["2020-03-15","001111110000000000000000000000000011111100011111"],"COD":["2020-04-06","000001111111111111111000000000000000000000111111"],"DJI":["2020-03-23","000111111110000000000000000000000000000000000000"],"DMA":["2020-04-01","000001111110000000000000000000000000000011100000"],"DOM":["2020-04-18","000000011111111110001111111111111111111111111111"],"TLS":["2020-11-17","000000000000000000000000000000000000001111111111"],"ECU":["2020-03-17","000111111111111111111111111100000000000000110000"],"EGY":["2020-03-25","000011111111111110000000000000000000000000000000"],"SLV":["2020-03-21","000111111111111111111111111111111111111111111110"],"ERI":["2020-04-01","000001111111111111111111111111111111111111111111"],"EST":["2020-03-29","000011111110000000000000000000000000000000000000"],"SWZ":["2020-03-27","000011111111111111111111100000000000000000000111"],"FJI":["2020-03-19","000111111111111111111111111111111111111111111111"],"FRA":["2020-03-17","000111111100000000000000000000000111111111111111"],"GAB":["2020-03-21","000111111111111111111111111111111111111111111111"],"GMB":["2020-08-06","000000000000000000000001111111110000000000000000"],"GEO":["2020-03-23","000111111111011000000000000000000000111111111111"],"DEU":["2020-03-21","000111111100000000000000000000000010000000111111"],"GHA":["2020-03-30","000011100000000000000000000000000000000000000000"],"GRC":["2020-03-23","000111111111100000000000000000000000111111111111"],"GUM":["2020-08-15","000000000000000000000000111111000000000000000000"],"GTM":["2020-03-22","000111111111111111111111111111100000000000000000"],"GIN":["2020-03-30","000011111111111111111111111111111111111111111111"],"GUY":["2020-04-03","000001111111111100111111111111111111111111111111"],"HTI":["2020-03-19","000111111111111111110000000001111111111111000011"],"HND":["2020-03-16","001111111111111111111111111111111111111111111111"],"HUN":["2020-03-27","000011111110000000000000000000000000111111111111"],"IND":["2020-03-22","000111111111111111111111111111111111111111111111"],"IDN":["2020-04-10","000000111111111111111111111111110001111111111111"],"IRN":["2020-10-06","000000000000000000000000000000001000001111111111"],"IRQ":["2020-03-13","001111111111111111111111111111000000000000000000"],"IRL":["2020-03-28","000011111110000000000000000000000011111111101111"],"ISR":["2020-03-20","000111111111111111110000000001111110111111111111"],"ITA":["2020-02-23","111111111111111111111111111111111111111111111111"],"JAM":["2020-03-13","001101111111111111111111111111111111111111111111"],"JOR":["2020-03-18","000111111110000000000000111111111111111111111111"],"KAZ":["2020-03-19","000111111111111111000000111111111110000111110000"],"KEN":["2020-03-27","000011111111111111111111111111111111111111111111"],"KIR":["2020-04-01","000001100000000000000000000000000000000000000000"],"KWT":["2020-03-22","000111111111111111111100000000000000000000000000"],"KGZ":["2020-03-25","000011111111111111111111111111100000000000000000"],"LAO":["2020-03-30","000011111000000000000000000000000000000000000000"],"LVA":["2020-12-30","000000000000000000000000000000000000000000001000"],"LBN":["2020-03-18","000111111000000000000011011111111110011111111111"],"LSO":["2020-03-18","000111111100000000000000000000000000000000000111"],"LBR":["2020-03-21","000111111111111111111100000000000000000000000000"],"LBY":["2020-03-22","000111111111111111111111111111111110000000111111"],"LTU":["2020-12-16","000000000000000000000000000000000000000000111111"],"LUX":["2020-03-17","000111100000000000000000000000000001111111111111"],"MAC":["2022-06-19","000000000000000000000000000000000000000000000000"],"MDG":["2020-03-23","000111100001111111111111000000000000000000000000"],"MWI":["2021-03-09","000000000000000000000000000000000000000000000000"],"MYS":["2020-03-27","000011011000000000000011111111000111111111111111"],"MLI":["2020-03-26","000011111100000000000000000000000000000000000000"],"MLT":["2020-03-28","000011111111110000000000000000000000000000000000"],"MRT":["2020-03-19","000111111111111111100000000000000000000001111111"],"MUS":["2020-03-23","000111111111100000000000000000000000000000000000"],"MEX":["2020-03-30","000011111111111111111111111101111111111111111111"],"MDA":["2020-03-24","000011111110000000000000000000000000000000000000"],"MCO":["2020-03-15","001111111000000000000000000000000001111111111111"],"MNG":["2020-11-12","000000000000000000000000000000000000011111111111"],"MAR":["2020-03-20","000111111111111110000001111111111111111111111111"],"MOZ":["2021-02-04","000000000000000000000000000000000000000000000000"],"MMR":["2020-04-14","000000011111111111111111111111111111111111111111"],"NAM":["2020-03-27","000011111100000000000000000111110000000000011110"],"NPL":["2020-03-23","000111111111111111111111111111110000000000000000"],"NLD":["2020-03-23","000111111100000000000000000000000000000000000001"],"NZL":["2020-03-23","000111111110000000000000110000000000000000000000"],"NER":["2020-03-29","000011000000000000000000000000000000000000000000"],"NGA":["2020-03-29","000011111111111111111111111111111111111111111111"],"OMN":["2020-04-10","000000111111000111111111111111111100000000000000"],"PAK":["2020-03-23","000111111111110011111110000000011111111111111111"],"PSE":["2020-03-22","000111111111111111111111111111111100011111111111"],"PAN":["2020-03-25","000011111111111111111111111111111100000011111111"],"PNG":["2020-04-07","000000110000000000000001000000000000000000001111"],"PRY":["2020-03-17","000111111111111111111111111111111111111111111111"],"PER":["2020-03-15","001111111111111111111111111111111111111111111111"],"PHL":["2020-03-15","001111111111100111111111100000001111111111111111"],"POL":["2020-03-31","000001100000000000000000000000000000000000000000"],"PRT":["2020-03-19","000111111000000000000000000000000011111111110111"],"PRI":["2020-03-15","001111111111111100001111111111111111111111111111"],"QAT":["2021-04-09","000000000000000000000000000000000000000000000000"],"ROU":["2020-03-25","000011111110000000000000000000000000111111111111"],"RUS":["2020-03-30","000011111111111000000000000000000000000000000000"],"RWA":["2020-03-21","000111111111111111111111111111111111111111111111"],"SMR":["2020-04-10","000000111000000000000000000000000000000000111111"],"SAU":["2020-03-23","000111111111111100000000000000000000000000000000"],"SEN":["2020-03-25","000011111111111111000000000000000000000000000111"],"SRB":["2020-03-15","001111111100000000000000000000000000000000000000"],"SYC":["2020-04-08","000000111000000000000000000000000000000000000111"],"SLE":["2020-04-05","000001110100000000000000000000000000000000000001"],"SGP":["2020-04-08","000000111111111100000000000000000000000000000000"],"SVK":["2020-04-08","000000100000000000000000000000000011111111111111"],"SVN":["2020-10-20","000000000000000000000000000000000011111111111111"],"SLB":["2020-05-20","000000000000000000000000000000000000000000000000"],"SOM":["2020-04-11","000000111111111110000000000011110000000000000000"],"ZAF":["2020-03-26","000011111111100000011111111111111111111111111111"],"KOR":["2020-03-21","000111100000000000000000000000000000000000000000"],"SSD":["2020-04-18","000000011111111111100001111110000000000000000000"],"ESP":["2020-03-14","001111111111100000001110000000000011111111111111"],"LKA":["2020-03-18","000111111111111110000000000000000001111111111111"],"SDN":["2020-04-18","000000011111111111100000000010000000000000000000"],"SUR":["2020-03-28","000011111111011111111001111111111111111111111111"],"SYR":["2020-03-25","000011111111100000000000000000000000110000000000"],"TWN":["2021-05-19","000000000000000000000000000000000000000000000000"],"TJK":["2020-05-09","000000000010000000000000000000000000000000000000"],"THA":["2021-01-16","000000000000000000000000000000000000000000000010"],"TGO":["2020-04-02","000001111111111000000000000000000000000001110000"],"TON":["2020-03-29","000011111111111111111111111111111111111111111111"],"TTO":["2020-03-30","000011111111110000000000000000000000000000000000"],"TUN":["2020-03-20","000111111110000000000000000000001111111111111111"],"TUR":["2020-03-21","000111111111111111111111111000001000000000001000"],"TKM":["2021-12-05","000000000000000000000000000000000000000000000000"],"UGA":["2020-03-30","000011111111111111111111111111111111111111111100"],"ARE":["2020-03-23","000111111000000000000000000000000000000000000000"],"GBR":["2020-03-22","000111111110000000000000000000000011000000111111"],"USA":["2020-03-15","001111111111111111111111111111111111111111111111"],"VIR":["2020-03-25","000011111000000000000000111100000000000000000000"],"URY":["2020-04-02","000001000000000000000000000000000000000000000000"],"UZB":["2020-03-27","000011111111111111111111000000000000000000000000"],"VUT":["2022-03-07","000000000000000000000000000000000000000000000000"],"VEN":["2020-03-13","001111111111111011111111111111111111111111111111"],"VNM":["2020-04-01","000001110000000000000111111111100000000001111111"],"YEM":["2020-05-28","000000000000011111100000000000011110000000111111"],"ZMB":["2020-04-15","000000011100000000000000000000000000000000000000"],"ZWE":["2020-03-30","000011111111110000000111111111111111111111111111"]};
diff --git a/site/pandemic-shorts/img/SOURCES.md b/site/pandemic-shorts/img/SOURCES.md
index 769515b..18a99cb 100644
--- a/site/pandemic-shorts/img/SOURCES.md
+++ b/site/pandemic-shorts/img/SOURCES.md
@@ -39,3 +39,11 @@ The code in this repository is MIT. The pictures and data here keep their own li
| File | Source | Author | Licence |
|---|---|---|---|
| `geo-lite.js` | [Natural Earth](https://www.naturalearthdata.com/) 110m and 50m countries, 10m provinces and populated places, simplified (books/pandemic-shorts/geo-lite.py) | Natural Earth | Public domain |
+
+### ch03 · The World Stops
+
+| File | Source | Author | Licence |
+|---|---|---|---|
+| `ep3-remote-kid.webp`, `ep3-mall-empty.webp`, `ep3-jobs-queue.webp` | Generated with an image model (gpt-image-2.5-flare via OpenRouter, low quality) | AI illustration | Unnamed stand-ins, no faces; tagged on screen |
+| `ep3-breadline.webp` | [Depression, Breadlines-long line of people waiting to be fed, New York City](https://commons.wikimedia.org/wiki/File:Depression,_Breadlines-long_line_of_people_waiting_to_be_fed,_New_York_City_-_NARA_-_196499.tif), NARA 196499, c. February 1932 | U.S. National Archives and Records Administration | Public domain |
+| `../ch03/stay.js` | Stay-at-home requirements (OxCGRT c6m, level 2 or more), [Our World in Data](https://ourworldindata.org/covid-stay-home-restrictions) | Our World in Data | CC BY 4.0 |
diff --git a/site/pandemic-shorts/img/ch03-art.js b/site/pandemic-shorts/img/ch03-art.js
new file mode 100644
index 0000000..044c923
--- /dev/null
+++ b/site/pandemic-shorts/img/ch03-art.js
@@ -0,0 +1 @@
+Object.assign(window.ART, {"ep3-remote-kid":[864,1536],"ep3-mall-empty":[864,1536],"ep3-jobs-queue":[864,1536],"ep3-breadline":[1280,1589]});
diff --git a/site/pandemic-shorts/img/ep3-breadline.webp b/site/pandemic-shorts/img/ep3-breadline.webp
new file mode 100644
index 0000000..775d7d5
Binary files /dev/null and b/site/pandemic-shorts/img/ep3-breadline.webp differ
diff --git a/site/pandemic-shorts/img/ep3-jobs-queue.webp b/site/pandemic-shorts/img/ep3-jobs-queue.webp
new file mode 100644
index 0000000..545d0d3
Binary files /dev/null and b/site/pandemic-shorts/img/ep3-jobs-queue.webp differ
diff --git a/site/pandemic-shorts/img/ep3-mall-empty.webp b/site/pandemic-shorts/img/ep3-mall-empty.webp
new file mode 100644
index 0000000..94c6143
Binary files /dev/null and b/site/pandemic-shorts/img/ep3-mall-empty.webp differ
diff --git a/site/pandemic-shorts/img/ep3-remote-kid.webp b/site/pandemic-shorts/img/ep3-remote-kid.webp
new file mode 100644
index 0000000..9a93190
Binary files /dev/null and b/site/pandemic-shorts/img/ep3-remote-kid.webp differ