An AI skill that turns books into animated, narrated, interactive web experiences
JavaScript ai-agentsai-educationanimationclaudeclaude-codeclaude-skillsedtecheducationinteractive-textbookscormtext-to-video
feat(site): The Pandemic page lists the six shorts
yzrce324a6710fd
diff --git a/site/_redirects b/site/_redirectsindex 7575d66..02de0d2 100644--- a/site/_redirects+++ b/site/_redirects@@ -139,5 +139,6 @@/ch67/* /elementary-algebra/ch67/:splat 301/ch68/* /elementary-algebra/ch68/:splat 301-# Madness shorts have no page of their own; their home button lands on the series page.+# Shorts have no page of their own; their home button lands on the series page./madness-shorts/ /madness/#shorts 302+/pandemic-shorts/ /pandemic/#shorts 302diff --git a/site/pandemic-shorts/ch00/audio/en/card.mp3 b/site/pandemic-shorts/ch00/audio/en/card.mp3deleted file mode 100644index c13b13d..0000000Binary files a/site/pandemic-shorts/ch00/audio/en/card.mp3 and /dev/null differdiff --git a/site/pandemic-shorts/ch00/audio/en/empty.mp3 b/site/pandemic-shorts/ch00/audio/en/empty.mp3deleted file mode 100644index 4585e5f..0000000Binary files a/site/pandemic-shorts/ch00/audio/en/empty.mp3 and /dev/null differdiff --git a/site/pandemic-shorts/ch00/audio/en/gone.mp3 b/site/pandemic-shorts/ch00/audio/en/gone.mp3deleted file mode 100644index 3d5e1fe..0000000Binary files a/site/pandemic-shorts/ch00/audio/en/gone.mp3 and /dev/null differdiff --git a/site/pandemic-shorts/ch00/audio/en/timings.js b/site/pandemic-shorts/ch00/audio/en/timings.jsdeleted file mode 100644index 2428082..0000000--- a/site/pandemic-shorts/ch00/audio/en/timings.js+++ /dev/null@@ -1,9 +0,0 @@-// hand-written for the sample: clips cut from site/pandemic/ch01/audio/en (gone, empty) at their sentence pauses;-// card is silence-window.TIMINGS = {- "gone": {"dur": 7.6, "marks": {"locks": 0, "but": 1.964, "feb": 4.655, "every": 5.8, "butone": 6.6},- "cues": [[0.0, "Wuhan locks down."], [1.964, "But the virus has already left."], [4.655, "By the end of February it is on every continent but one."]]},- "card": {"dur": 3.2, "marks": {}, "cues": []},- "empty": {"dur": 7.3, "marks": {"schools": 0, "billion": 2.873},- "cues": [[0.0, "Schools close."], [2.873, "By September, more than a billion students have been kept out of class."]]}-};diff --git a/site/pandemic-shorts/ch00/audio/sfx/bang.mp3 b/site/pandemic-shorts/ch00/audio/sfx/bang.mp3deleted file mode 100644index bca3598..0000000Binary files a/site/pandemic-shorts/ch00/audio/sfx/bang.mp3 and /dev/null differdiff --git a/site/pandemic-shorts/ch00/audio/sfx/thud.mp3 b/site/pandemic-shorts/ch00/audio/sfx/thud.mp3deleted file mode 100644index 41e5a96..0000000Binary files a/site/pandemic-shorts/ch00/audio/sfx/thud.mp3 and /dev/null differdiff --git a/site/pandemic-shorts/ch00/audio/sfx/tick.mp3 b/site/pandemic-shorts/ch00/audio/sfx/tick.mp3deleted file mode 100644index 2e1e687..0000000Binary files a/site/pandemic-shorts/ch00/audio/sfx/tick.mp3 and /dev/null differdiff --git a/site/pandemic-shorts/ch00/audio/sfx/whoosh.mp3 b/site/pandemic-shorts/ch00/audio/sfx/whoosh.mp3deleted file mode 100644index 6c63e5e..0000000Binary files a/site/pandemic-shorts/ch00/audio/sfx/whoosh.mp3 and /dev/null differdiff --git a/site/pandemic-shorts/ch00/index.html b/site/pandemic-shorts/ch00/index.htmldeleted file mode 100644index 7830a4b..0000000--- a/site/pandemic-shorts/ch00/index.html+++ /dev/null@@ -1,85 +0,0 @@-<!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 · 0 · The pieces</title>-<link rel="stylesheet" href="../lib/engine.css">-<link rel="expect" href="#bar" blocking="render">-</head>-<body>-<!-- The series base's sample: three beats proving the shared pieces (lib/pandemic.js, lib/pglobe.js). Not an episode. -->-<script src="../lib/engine.js"></script>-<script src="audio/en/timings.js"></script>-<script src="../img/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>-'use strict';-const CHAPTER = { number: 0, title: 'The pieces', minutes: 1, language: 'en', next: '../ch01/' };--const ROUTES1 = ['Tokyo', 'Seoul', 'Bangkok', 'Singapore', 'Delhi', 'Tehran', 'Moscow', 'Milan', 'Paris', 'London', 'Madrid', 'Berlin', 'Cairo', 'Lagos', 'Sydney'];-const ROUTES2 = ['New York', 'Sao Paulo', 'Mexico City'];--/* ---------- beats ---------- */-const OPEN_PRE = .3;-const BEATS = [- // 0. The globe turns to Wuhan and hands over to the paper map; red arcs carry the virus out, Europe seeds the Americas- ['gone', 'Already left', (m, D) => {- const p = panel(0);- const s = shot(p, 0, undefined, { bg: NIGHT });- const but = m('but'), tHand = 1.5, tOut = but + .1, tTurn = m('every') - .4;- // one view for globe and map: the hand-over at tHand is invisible apart from the paper- const view = t => {- const a = smooth(ramp01(t, 0, tHand)), b = smooth(ramp01(t, tOut, tOut + 2.2)), c = smooth(ramp01(t, tTurn, tTurn + 1.6));- return { lon: 60 + (WUHAN[0] - 60) * a + (78 - WUHAN[0]) * b + (15 - 78) * c,- lat: 8 + (WUHAN[1] - 8) * a + (30 - WUHAN[1]) * b + (25 - 30) * c,- H: 1.1 * (.42 / 1.1) ** a * (.95 / .42) ** b * (1.02 / .95) ** c };- };- Globe.clearMarks(); Globe.dot(...WUHAN);- globeShot(s, D, view, () => 1, null, { on: [0, tHand + .5] });- const mp = G(s, { o: 0 });- show(mp, tHand, .45, lin);- const tA = i => tOut + .3 + i * .17, tB = i => tTurn + .9 + i * .25;- paperMap(mp, D, view, {- prov: (n, t) => n === 'Hubei' ? ramp01(t, .3, .6) : 0,- lit: (c, t) => c === 'ITA' ? .45 * ramp01(t, tA(7) + .8, tA(7) + 1.1) : 0,- dots: [[...WUHAN, .2, 9]],- routes: [...ROUTES1.map((n, i) => [WUHAN, CITIES[n], tA(i), .8]), ...ROUTES2.map((n, i) => [CITIES.Milan, CITIES[n], tB(i), .9])],- cities: [['Wuhan', .5], ['Milan', tA(7) + .8, 'l'], ['New York', tB(0) + .9, 'l']],- on: [tHand - .05, D + 1],- });- hide(word(s, 'Wuhan locks down', CX - 20, 260, 0, { size: 110, fill: LIGHT, stroke: DARK }), but - .15, .15, lin);- word(s, 'Already gone', CX - 20, 260, but, { size: 130, fill: LIGHT, stroke: DARK });- sfx('gone', but, 'whoosh', .5);- word(s, 'Every continent', CX - 20, 1120, m('every'), { size: 100, fill: LIGHT, stroke: DARK });- word(s, 'but one', CX - 20, 1240, m('butone'), { size: 100, fill: RED, stroke: DARK });- }, { 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, 1, 1.3);- }],-- // 2. A found photograph, full bleed, with its word; then the end card naming the next episode- ['empty', 'Schools close', (m, D) => {- const p = panel(0);- const nx = 5.6; // the end card, after the voice (the clip is padded with silence to 7.3 s)- let s = shot(p, 0, nx, { whip: true });- found(s, 'school-empty-classroom', 'U.S. Army photo, Pfc. Kaden Pitt', 0, nx, { s0: 1.0, s1: 1.18, dx: -40, dim: .25 });- word(s, 'Schools close', CX - 20, 300, .1, { size: 120, fill: LIGHT, stroke: DARK });- word(s, '1 billion', CX - 20, 1100, m('billion'), { size: 170, fill: MARK, stroke: DARK });- word(s, 'students out of class', CX - 20, 1210, m('billion') + .3, { size: 64, fill: LIGHT, stroke: DARK });- s = shot(p, nx, undefined, { bg: DARK, swipe: true });- endCard(s, nx, 1);- }],-].map(shortsBeat);--startPandemic();-</script>-</body>-</html>diff --git a/site/pandemic-shorts/lib/README-episodes.md b/site/pandemic-shorts/lib/README-episodes.mddeleted file mode 100644index 57dfd4f..0000000--- a/site/pandemic-shorts/lib/README-episodes.md+++ /dev/null@@ -1,57 +0,0 @@-# The Pandemic shorts: what the base gives an episode--`ch00/` is the sample that uses every piece: watch it first (`?beat=0`), then read its page. It is not an episode.--## Files--| File | What it gives |-|---|---|-| `lib/engine.*`, `math.js`, … | the engine (engine-v2.6, `engine.py`); upright stage with `<html data-stage="portrait">` |-| `lib/shorts.js` | the shorts kit: `shot`, `photo`, `word`, `label`, `band`, `counter`, `stamp`, `meme`, `srcTag`, `shortsBeat`, … Its colours are this series' night palette |-| `lib/pandemic.js` | the series' pieces; its API is the comment block at its top |-| `lib/pglobe.js` | the film's night globe, upright (three.js in `lib/vendor/`); loaded by `startPandemic()`, used through `globeShot()` |-| `lib/book.css`, `fonts.css`, `fonts/` | the night palette for the player; Oswald and EB Garamond |-| `img/*.webp`, `img/SOURCES.md` | the film's pictures with their sources and licences. Credit each found picture on screen with `found()` (or `srcTag()`) as SOURCES.md says |-| `img/art.js` | `window.ART`, every picture's size, for `plate()` and `wide()`. Your own pictures go in `img/chNN-art.js` (`prep.py … --art chNN-art.js`), loaded after `art.js` |-| `img/geo-lite.js` | `GEO_LITE`: countries in lon/lat for `paperMap()` (Natural Earth 110m and 50m), China's provinces, `CITIES` |-| `img/geo.js`, `geo-world.js`, `geo-eu.js`, `spread.js`, `waves.js`, `quiet.js` | the film's data, as it was. `geo-world.js` has per-country weekly data (`GEO_W.countries[iso]`: stay-home weeks, deaths per million) keyed like `paperMap`'s `lit`; the projected paths in these files are for the wide film, too heavy for Firefox upright: draw countries with `paperMap()` |--## A chapter page--Start from `ch00/index.html`. Script order:--```html-<script src="../lib/engine.js"></script>-<script src="audio/en/timings.js"></script>-<script src="../img/art.js"></script>-<script src="../img/chNN-art.js"></script> <!-- your own pictures' sizes, if any -->-<script src="../img/geo-lite.js"></script>-<script src="../img/spread.js"></script> <!-- only if you use the film's data -->-<script src="../lib/icons.js"></script>-<script src="../lib/shorts.js"></script>-<script src="../lib/pandemic.js"></script>-<script src="chNN.js"></script> <!-- your episode's own helpers, if any -->-<script> … CHAPTER, BEATS (tuples .map(shortsBeat)), music(…) … startPandemic(); </script>-```--Call `startPandemic()` instead of `startShorts()`: it also loads the globe and the paper grain. Set `CHAPTER.next` to the next episode (`'../ch02/'`); ch06 has none.--## Look--- Ground `DARK` #0b0d11 night, ink `LIGHT` #f3ede0 cream, `RED` #e5402f for the virus only (cases, spread, deaths), `MARK` #f4c430 yellow, `MUTED` grey. Map: `MAPLAND` paper, `MAPSEA`, `MAPINK`, `MAPLINE`.-- Lit without the virus: the series card rim, the end card's 'Next' and `liChip`'s ring (`ring` option) are `MARK`; light a country for something else (a stay-home order, a vaccine) with `paperMap(…, { litFill: MARK })`.-- Key words Oswald 600 (`word()`, `SANS`), quotes EB Garamond italic (`SERIF`).-- Words inside x 50–810, y 130–1290. `safe.py chNN --query tags` checks it; `paperMap` keeps its city labels inside.-- `photo()` tags a picture "AI illustration"; a found photograph goes through `found(g, name, source, t0, t1)`.--## The globe and the map--One view object drives both: `{ lon, lat, H }` where the Earth's radius is 450 / H px, as in the film (1.15 the whole world, .42 China, .02 a province). Put `globeShot()` and `paperMap()` in the same shot with the same `view(t)`, fade the map's group in over a few tenths, and pass each an `on: [t0, t1]` window so only the visible one is drawn (Firefox pays for every drawn layer). `M.xy(ll, t)` gives screen px of a lon/lat for your own marks. Measured in headless Firefox: 16.7 ms a frame on the globe-to-map beat.--## Port--Serve your own worktree's `site` on your own port (`python3 .claude/skills/papermorph/scripts/serve.py <port> site`); 8790 belongs to the base. Pass `--url http://localhost:<port>/pandemic-shorts/` to `shot.py`, `strip.py`, `perf.py`, `safe.py`, `export.py`.--## Do not edit--`lib/` (engine, `shorts.js`, `pandemic.js`, `pglobe.js`, `book.css`), `img/art.js`, `img/geo-lite.js`, the film's files in `img/` and `ch00/`. A piece you need that is missing goes in your episode's own folder (`chNN/chNN.js`); tell the coordinator if it should move into the base. Your own pictures go in `img/` under names no other episode uses (`ep3-…`), with their rows added to `img/SOURCES.md` at the end, in one block for your episode.diff --git a/site/pandemic/img/still-shorts-ch01.webp b/site/pandemic/img/still-shorts-ch01.webpnew file mode 100644index 0000000..a05edbaBinary files /dev/null and b/site/pandemic/img/still-shorts-ch01.webp differdiff --git a/site/pandemic/img/still-shorts-ch02.webp b/site/pandemic/img/still-shorts-ch02.webpnew file mode 100644index 0000000..a3da774Binary files /dev/null and b/site/pandemic/img/still-shorts-ch02.webp differdiff --git a/site/pandemic/img/still-shorts-ch03.webp b/site/pandemic/img/still-shorts-ch03.webpnew file mode 100644index 0000000..7d0957dBinary files /dev/null and b/site/pandemic/img/still-shorts-ch03.webp differdiff --git a/site/pandemic/img/still-shorts-ch04.webp b/site/pandemic/img/still-shorts-ch04.webpnew file mode 100644index 0000000..e50cc90Binary files /dev/null and b/site/pandemic/img/still-shorts-ch04.webp differdiff --git a/site/pandemic/img/still-shorts-ch05.webp b/site/pandemic/img/still-shorts-ch05.webpnew file mode 100644index 0000000..9ae3955Binary files /dev/null and b/site/pandemic/img/still-shorts-ch05.webp differdiff --git a/site/pandemic/img/still-shorts-ch06.webp b/site/pandemic/img/still-shorts-ch06.webpnew file mode 100644index 0000000..788e540Binary files /dev/null and b/site/pandemic/img/still-shorts-ch06.webp differdiff --git a/site/pandemic/index.html b/site/pandemic/index.htmlindex 654fd88..90382a7 100644--- a/site/pandemic/index.html+++ b/site/pandemic/index.html@@ -4,7 +4,7 @@<meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>The Pandemic</title>-<meta name="description" content="A seven-minute documentary on COVID-19, from Wuhan to the unanswered question of where it came from, and how it was made with the Papermorph Skill.">+<meta name="description" content="A seven-minute documentary on COVID-19, from Wuhan to the unanswered question of where it came from, and the same story as six upright shorts, and how it was made with the Papermorph Skill."><link rel="stylesheet" href="lib/fonts.css"><link rel="stylesheet" href="lib/book.css"><!-- only for --progress-key, if the book sets one --><style>@@ -46,8 +46,20 @@.credits h2 { font: 600 20px/1.3 var(--key); letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }.credits h3 { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; margin: 18px 0 6px; color: var(--ink); }.credits ul { margin: 0; padding-left: 18px; columns: 2 340px; }+ .shorts { max-width: 1180px; margin: 0 auto; padding: 36px 24px 8px; }+ .shorts h2 { margin: 0; font: 600 26px/1.2 var(--key); letter-spacing: .06em; text-transform: uppercase; }+ .shorts > p { margin: 4px 0 0; color: var(--soft); font: 16px/1.5 var(--ui); }+ .shorts ul { list-style: none; padding: 0; margin: 18px 0 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }+ .shorts a { display: flex; flex-direction: column; height: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; text-decoration: none; transition: border-color .15s, transform .15s; }+ .shorts a:hover, .shorts a:focus-visible { border-color: var(--accent); transform: translateY(-2px); }+ .shorts img { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; }+ .shorts small { margin: 10px 12px 0; color: var(--soft); font: 600 12px/1.3 var(--ui); letter-spacing: .04em; text-transform: uppercase; }+ .shorts b { margin: 2px 12px 4px; font: 600 19px/1.2 var(--key); letter-spacing: .03em; text-transform: uppercase; }+ .shorts span { margin: 0 12px 12px; color: var(--soft); font: 14px/1.45 var(--ui); }+ .shorts .watched small::after { content: " · ✓ watched"; color: var(--accent); }+ @media (max-width: 1000px) { .shorts ul { grid-template-columns: repeat(3, 1fr); } }@media (max-width: 860px) { figure { margin: 22px 0; } figcaption { margin: 8px 0 0; } }- @media (max-width: 760px) { header { grid-template-columns: 1fr; gap: 24px; } header .film span { left: 10px; bottom: 10px; padding: 7px 11px; font-size: 13px; } .pair, .numbers { grid-template-columns: 1fr; } }+ @media (max-width: 760px) { header { grid-template-columns: 1fr; gap: 24px; } header .film span { left: 10px; bottom: 10px; padding: 7px 11px; font-size: 13px; } .pair, .numbers { grid-template-columns: 1fr; } .shorts ul { grid-template-columns: 1fr 1fr; } }</style></head><body>@@ -64,6 +76,12 @@</header></div>+<section class="shorts">+ <h2 id="shorts">As shorts</h2>+ <p>The same film told upright for a phone, in six episodes of about a minute and a quarter.</p>+ <ul id="shortList"></ul>+</section>+<main><h2>What we set out to do</h2><p>Our earlier documentary, <a href="../madness/"><i>Madness and Civilization</i></a>, is pictures and words. This one tries the other kind of explainer, the kind Vox and Johnny Harris make: maps that move, numbers that land on the word that says them, documents pulled into frame and marked up. The subject was chosen for that: the pandemic happened on a map, day by day, and almost everything about it was counted.</p>@@ -135,6 +153,7 @@<section class="credits"><h2>Sources and credits</h2><p>Narration written from Wikipedia (“COVID-19 pandemic”, “COVID-19 pandemic in Italy”, “COVID-19 pandemic in New York City”, “Origin of SARS-CoV-2”) and Our World in Data (CC BY 4.0); the WHO quotations are from the Director-General's remarks of 11 March 2020 and the statement of 5 May 2023. Voice: ElevenLabs v4. Music: Google Lyria 3, made for this film. Type: Oswald and EB Garamond (SIL Open Font License, <code>lib/fonts/</code>). The seven doctors besides Li Wenliang, who are not identified, are stand-ins made with an image model and tagged as such on screen.</p>+ <p>The shorts reuse the film’s pictures, maps and music, with a new script and voice for each episode. Pictures marked “AI illustration” on screen were made with an image model (gpt-image via OpenRouter); the breadline photograph is from the U.S. National Archives (public domain); the estimate of 27 million deaths is The Economist’s excess-death model. Every file of the shorts is listed with its source in <a href="../pandemic-shorts/img/SOURCES.md">SOURCES.md</a>.</p><h3>Pictures</h3><ul><li><a href="https://commons.wikimedia.org/wiki/File:Novel_Coronavirus_SARS-CoV-2_(49597020718).jpg">Novel Coronavirus SARS-CoV-2</a>, NIAID · Public domain</li>@@ -171,6 +190,21 @@const key = getComputedStyle(document.documentElement).getPropertyValue('--progress-key').trim().replace(/^["']|["']$/g, '')|| 'animebook:progress:' + new URL('.', location.href).pathname;try { if ((JSON.parse(localStorage.getItem(key) || '{}').done || []).includes(1)) document.getElementById('film').classList.add('watched'); } catch {}+// Shorts live in their own folder (../pandemic-shorts/), so their progress is kept under that folder's key.+const SHORTS = [+ { title: 'The Warning', still: 'img/still-shorts-ch01.webp', alt: 'Li Wenliang in a mask inside a white ring, under the words This doctor warned a new virus.', line: 'A doctor warned his friends about a new virus. The police made him sign that it was untrue.' },+ { title: 'Too Late', still: 'img/still-shorts-ch02.webp', alt: 'A paper globe with a dashed flight line from Beijing to Rome crossed out, stamped Flights stopped.', line: 'Italy stopped every flight from China. It still became Europe’s first big outbreak.' },+ { title: 'The World Stops', still: 'img/still-shorts-ch03.webp', alt: 'An empty street of shops, under the words More than half of humanity.', line: 'In April 2020, more than half of humanity was told the same thing: stay home.' },+ { title: 'The Race', still: 'img/still-shorts-ch04.webp', alt: 'A gloved hand giving a vaccine injection in an arm, under the words April 2021, a vaccine dose.', line: 'By April 2021, one in four people in rich countries had a vaccine dose. In poor countries: one in five hundred.' },+ { title: 'The Count', still: 'img/still-shorts-ch05.webp', alt: 'Rows of graves seen from above, under the word Officially and the number 7,115,706.', line: 'Officially, COVID killed 7.1 million people. The best estimate is closer to 27 million.' },+ { title: 'The Origin', still: 'img/still-shorts-ch06.webp', alt: 'East Asia at night from space, under the words We still don’t know.', line: 'Over seven million deaths. And we still don’t know where it started.' },+];+let seen = [];+try { seen = JSON.parse(localStorage.getItem('animebook:progress:' + new URL('../pandemic-shorts/', location.href).pathname) || '{}').done || []; } catch {}+const esc = s => String(s).replace(/&/g, '&').replace(/</g, '<').replace(/"/g, '"');+document.getElementById('shortList').innerHTML = SHORTS.map((e, i) => `<li${seen.includes(i + 1) ? ' class="watched"' : ''}>+ <a href="../pandemic-shorts/ch0${i + 1}/"><img src="${esc(e.still)}" width="600" height="1067" alt="${esc(e.alt)}" loading="lazy">+ <small>Episode ${i + 1}</small><b>${esc(e.title)}</b><span>${esc(e.line)}</span></a></li>`).join('');</script></body></html>