Skip to content

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

feat(site): Joke Collection episode 4, The Dog Ate My Homework

yzr0c1cbad1d034
diff --git a/site/index.html b/site/index.html
index ac18f9b..056f2e3 100644
--- a/site/index.html
+++ b/site/index.html
@@ -38,8 +38,8 @@
<a class="book-hotspot red-book" data-book="little-red-riding-hood" href="little-red-riding-hood/" aria-label="Open Little Red Riding Hood, a paper-cutout stop-motion picture book and how it was made">
<span class="book-caption"><strong>Little Red Riding Hood <span aria-hidden="true">↗</span></strong><small>Paper-cutout stop motion · how it was made</small></span>
</a>
- <a class="book-hotspot joke-book" data-book="joke-collection" href="joke-collection/" aria-label="Open Joke Collection, short animated jokes, two episodes">
- <span class="book-caption"><strong>Joke Collection <span aria-hidden="true">↗</span></strong><small>2 episodes · how they were made</small></span>
+ <a class="book-hotspot joke-book" data-book="joke-collection" href="joke-collection/" aria-label="Open Joke Collection, short animated jokes, four episodes">
+ <span class="book-caption"><strong>Joke Collection <span aria-hidden="true">↗</span></strong><small>4 episodes · how they were made</small></span>
</a>
</section>
<section class="shelf-tier" aria-labelledby="curious-title">
diff --git a/site/joke-collection/ch03/index.html b/site/joke-collection/ch03/index.html
index 42d6afd..b445420 100644
--- a/site/joke-collection/ch03/index.html
+++ b/site/joke-collection/ch03/index.html
@@ -25,7 +25,7 @@
<script src="scene4.js"></script>
<script>
'use strict';
-const CHAPTER = { number: 3, title: 'How to Move a Cow', minutes: 2, language: 'en' };
+const CHAPTER = { number: 3, title: 'How to Move a Cow', minutes: 2, language: 'en', next: '../ch04/' };
// captions on the first time: half the film is Chinese and Hindi
try { if (localStorage.getItem('captions') === null) setCaptions(true); } catch {}
diff --git a/site/joke-collection/ch04/audio/en/mouths.js b/site/joke-collection/ch04/audio/en/mouths.js
new file mode 100644
index 0000000..9d60920
--- /dev/null
+++ b/site/joke-collection/ch04/audio/en/mouths.js
@@ -0,0 +1 @@
+window.MOUTHS = {"s01":[[0.102,"A"],[0.206,"C"],[0.31,"B"],[0.389,"C"],[0.468,"B"],[0.546,"A"],[0.625,"D"],[0.703,"B"],[0.782,"C"],[0.975,"A"],[1.079,"E"],[1.183,"B"],[1.258,"C"],[1.334,"G"],[1.409,"C"],[1.485,"B"],[1.56,"B"],[1.621,"C"],[1.682,"B"],[1.743,"B"],[1.795,"C"],[1.847,"B"],[1.899,"B"],[1.978,"E"],[2.056,"A"],[2.135,"C"],[2.213,"F"],[2.292,"E"],[2.37,"B"],[2.449,"X"],[3.464,"A"],[3.542,"F"],[3.62,"B"],[3.698,"A"],[3.822,"E"],[3.945,"D"],[4.029,"H"],[4.112,"F"],[4.195,"C"],[4.279,"B"],[4.362,"B"],[4.431,"D"],[4.501,"B"],[4.57,"D"],[4.616,"B"],[4.661,"C"],[4.771,"B"],[4.881,"F"],[4.991,"B"],[5.101,"C"],[5.211,"X"]],"s02":[[0.111,"A"],[0.271,"E"],[0.431,"B"],[0.51,"E"],[0.588,"A"],[0.667,"C"],[0.745,"F"],[0.824,"E"],[0.903,"B"],[0.981,"X"]],"s02b":[[0.094,"B"],[0.165,"C"],[0.236,"F"],[0.331,"C"],[0.426,"B"],[0.521,"B"],[0.591,"F"],[0.66,"B"],[0.73,"C"],[1.005,"B"],[1.28,"X"]],"s02c":[[0.111,"A"],[0.271,"E"],[0.431,"B"],[0.51,"E"],[0.588,"A"],[0.667,"C"],[0.745,"F"],[0.824,"E"],[0.903,"B"],[0.981,"X"]],"s02d":[[0.097,"D"],[0.234,"H"],[0.372,"C"],[0.509,"B"],[0.647,"X"]],"s02e":[[0.111,"A"],[0.271,"E"],[0.431,"B"],[0.51,"E"],[0.588,"A"],[0.667,"C"],[0.745,"F"],[0.824,"E"],[0.903,"B"],[0.981,"X"]],"s02f":[[0.094,"A"],[0.187,"C"],[0.28,"B"],[0.386,"E"],[0.492,"B"],[0.598,"D"],[0.649,"B"],[0.701,"C"],[0.752,"C"],[1.027,"B"],[1.302,"X"]],"s03":[[0.111,"A"],[0.386,"E"],[0.661,"X"],[1.723,"C"],[1.814,"F"],[1.905,"B"],[1.982,"E"],[2.058,"B"],[2.134,"B"],[2.184,"D"],[2.233,"G"],[2.283,"C"],[2.332,"D"],[2.439,"B"],[2.622,"E"],[2.806,"B"],[2.989,"X"]],"s03b":[[0.094,"C"],[0.369,"B"],[0.644,"X"]],"s04":[[0.102,"C"],[0.323,"D"],[0.407,"H"],[0.49,"F"],[0.573,"C"],[0.657,"B"],[0.74,"B"],[0.797,"C"],[0.853,"B"],[0.909,"A"],[0.981,"C"],[1.053,"B"],[1.131,"E"],[1.21,"A"],[1.288,"C"],[1.367,"F"],[1.445,"E"],[1.524,"B"],[1.603,"X"],[2.63,"F"],[2.722,"B"],[2.814,"F"],[2.905,"D"],[2.997,"H"],[3.089,"C"],[3.229,"D"],[3.301,"B"],[3.372,"A"],[3.451,"B"],[3.53,"C"],[3.608,"B"],[3.687,"G"],[3.765,"D"],[3.844,"B"],[3.922,"X"]],"s05":[[0.094,"B"],[0.145,"D"],[0.196,"B"],[0.247,"C"],[0.346,"B"],[0.415,"C"],[0.485,"B"],[0.554,"C"],[0.587,"F"],[0.62,"B"],[0.653,"B"],[0.836,"E"],[1.02,"B"],[1.203,"X"]],"s05b":[[0.103,"G"],[0.206,"C"],[0.309,"G"],[0.412,"C"],[0.515,"C"],[0.653,"F"],[0.79,"D"],[0.928,"B"],[1.065,"X"]],"s06":[[0.111,"A"],[0.271,"E"],[0.431,"B"],[0.51,"E"],[0.588,"A"],[0.667,"C"],[0.745,"F"],[0.824,"E"],[0.903,"B"],[0.981,"X"]],"s06b":[[0.094,"C"],[0.172,"B"],[0.251,"C"],[0.33,"A"],[0.408,"C"],[0.487,"B"],[0.565,"D"],[1.115,"X"]],"s07":[[0.111,"B"],[0.263,"E"],[0.416,"E"],[0.691,"B"],[1.026,"B"],[1.209,"C"],[1.392,"B"],[1.576,"X"]],"s08":[[0.111,"D"],[0.218,"B"],[0.324,"C"],[0.508,"F"],[0.691,"B"],[0.874,"X"]],"s09":[[0.095,"B"],[0.175,"C"],[0.255,"B"],[0.357,"E"],[0.459,"B"],[0.561,"D"],[0.618,"B"],[0.675,"C"],[0.732,"C"],[1.007,"B"],[1.282,"X"]],"s10":[[0.111,"E"],[0.225,"G"],[0.34,"B"],[0.454,"F"],[0.568,"B"],[0.683,"C"],[0.797,"B"],[0.873,"C"],[0.949,"B"],[1.133,"C"],[1.316,"B"],[1.499,"X"],[2.5,"B"],[2.569,"C"],[2.638,"B"],[2.706,"C"],[2.775,"B"],[2.844,"C"],[2.912,"E"],[2.981,"B"],[3.05,"X"],[4.405,"D"],[4.604,"H"],[4.802,"B"],[4.985,"C"],[5.168,"E"],[5.221,"G"],[5.274,"C"],[5.549,"F"],[5.824,"X"]],"s11":[[0.094,"B"],[0.231,"F"],[0.369,"B"],[0.506,"C"],[0.644,"X"],[1.294,"F"],[1.367,"B"],[1.44,"C"],[1.513,"B"],[1.552,"E"],[1.59,"C"],[1.628,"B"],[1.667,"C"],[1.707,"F"],[1.747,"B"],[1.787,"B"],[1.839,"E"],[1.891,"A"],[1.942,"C"],[1.994,"F"],[2.046,"E"],[2.097,"B"],[2.149,"B"],[2.223,"A"],[2.297,"C"],[2.371,"H"],[2.445,"H"],[2.497,"C"],[2.549,"B"],[2.601,"C"],[2.654,"A"],[2.837,"F"],[3.02,"B"],[3.204,"X"]],"s11b":[[0.095,"A"],[0.141,"C"],[0.186,"B"],[0.232,"D"],[0.277,"F"],[0.323,"B"],[0.368,"C"],[0.414,"C"],[0.505,"B"],[0.607,"E"],[0.709,"C"],[0.755,"B"],[0.8,"D"],[0.863,"B"],[0.925,"A"],[1.004,"B"],[1.082,"C"],[1.161,"B"],[1.239,"G"],[1.318,"D"],[1.396,"B"],[1.475,"X"]],"s12":[[0.095,"C"],[0.175,"F"],[0.255,"B"],[0.51,"F"],[0.766,"C"],[0.902,"H"],[0.955,"C"],[1.007,"B"],[1.059,"C"],[1.111,"B"],[1.164,"B"],[1.214,"E"],[1.264,"A"],[1.315,"C"],[1.365,"B"],[1.415,"C"],[1.466,"B"],[1.516,"B"],[1.653,"E"],[1.791,"B"],[1.928,"C"],[2.066,"X"],[2.716,"D"],[2.841,"H"],[3.0,"C"],[3.159,"C"],[3.256,"B"],[3.352,"H"],[3.392,"C"],[3.432,"B"],[3.472,"C"],[3.511,"D"],[3.602,"B"],[3.786,"E"],[3.969,"B"],[4.152,"X"],[4.818,"C"],[4.915,"F"],[5.011,"A"],[5.068,"B"],[5.125,"C"],[5.182,"B"],[5.239,"C"],[5.284,"B"],[5.33,"B"],[5.375,"E"],[5.42,"B"],[5.604,"F"],[5.787,"H"],[6.045,"D"],[6.091,"B"],[6.136,"C"],[6.188,"B"],[6.239,"C"],[6.352,"B"],[6.466,"C"],[6.508,"F"],[6.549,"B"],[6.591,"A"],[6.689,"C"],[6.788,"B"],[6.886,"G"],[6.957,"B"],[7.028,"C"],[7.099,"B"],[7.17,"B"],[7.249,"E"],[7.328,"A"],[7.406,"C"],[7.485,"F"],[7.563,"E"],[7.642,"B"],[7.72,"X"]],"s12b":[[0.094,"B"],[0.231,"F"],[0.369,"B"],[0.506,"C"],[0.644,"X"],[1.294,"B"],[1.385,"D"],[1.477,"B"],[1.568,"A"],[1.637,"C"],[1.706,"F"],[1.774,"B"],[1.843,"C"],[1.912,"G"],[1.981,"F"],[2.049,"H"],[2.118,"X"]],"s13":[[0.111,"A"],[0.271,"E"],[0.431,"B"],[0.51,"E"],[0.588,"A"],[0.667,"C"],[0.745,"F"],[0.824,"E"],[0.903,"B"],[0.981,"X"]],"s13b":[[0.111,"A"],[0.386,"E"],[0.661,"X"],[1.723,"C"],[1.852,"B"],[1.982,"A"],[2.073,"C"],[2.165,"B"],[2.257,"G"],[2.348,"C"],[2.44,"B"],[2.532,"X"]],"s13c":[[0.094,"C"],[0.369,"B"],[0.644,"X"],[1.206,"B"],[1.283,"C"],[1.36,"B"],[1.466,"E"],[1.572,"B"],[1.678,"B"],[1.725,"C"],[1.773,"B"],[1.82,"C"],[2.095,"B"],[2.37,"X"]]};
diff --git a/site/joke-collection/ch04/audio/en/s01.mp3 b/site/joke-collection/ch04/audio/en/s01.mp3
new file mode 100644
index 0000000..39dff0d
Binary files /dev/null and b/site/joke-collection/ch04/audio/en/s01.mp3 differ
diff --git a/site/joke-collection/ch04/audio/en/s02.mp3 b/site/joke-collection/ch04/audio/en/s02.mp3
new file mode 100644
index 0000000..3bb9c6c
Binary files /dev/null and b/site/joke-collection/ch04/audio/en/s02.mp3 differ
diff --git a/site/joke-collection/ch04/audio/en/s02b.mp3 b/site/joke-collection/ch04/audio/en/s02b.mp3
new file mode 100644
index 0000000..2883350
Binary files /dev/null and b/site/joke-collection/ch04/audio/en/s02b.mp3 differ
diff --git a/site/joke-collection/ch04/audio/en/s02c.mp3 b/site/joke-collection/ch04/audio/en/s02c.mp3
new file mode 100644
index 0000000..3bb9c6c
Binary files /dev/null and b/site/joke-collection/ch04/audio/en/s02c.mp3 differ
diff --git a/site/joke-collection/ch04/audio/en/s02d.mp3 b/site/joke-collection/ch04/audio/en/s02d.mp3
new file mode 100644
index 0000000..11a5139
Binary files /dev/null and b/site/joke-collection/ch04/audio/en/s02d.mp3 differ
diff --git a/site/joke-collection/ch04/audio/en/s02e.mp3 b/site/joke-collection/ch04/audio/en/s02e.mp3
new file mode 100644
index 0000000..3bb9c6c
Binary files /dev/null and b/site/joke-collection/ch04/audio/en/s02e.mp3 differ
diff --git a/site/joke-collection/ch04/audio/en/s02f.mp3 b/site/joke-collection/ch04/audio/en/s02f.mp3
new file mode 100644
index 0000000..83dc319
Binary files /dev/null and b/site/joke-collection/ch04/audio/en/s02f.mp3 differ
diff --git a/site/joke-collection/ch04/audio/en/s03.mp3 b/site/joke-collection/ch04/audio/en/s03.mp3
new file mode 100644
index 0000000..7e6bf76
Binary files /dev/null and b/site/joke-collection/ch04/audio/en/s03.mp3 differ
diff --git a/site/joke-collection/ch04/audio/en/s03b.mp3 b/site/joke-collection/ch04/audio/en/s03b.mp3
new file mode 100644
index 0000000..0338a54
Binary files /dev/null and b/site/joke-collection/ch04/audio/en/s03b.mp3 differ
diff --git a/site/joke-collection/ch04/audio/en/s04.mp3 b/site/joke-collection/ch04/audio/en/s04.mp3
new file mode 100644
index 0000000..42e44c5
Binary files /dev/null and b/site/joke-collection/ch04/audio/en/s04.mp3 differ
diff --git a/site/joke-collection/ch04/audio/en/s05.mp3 b/site/joke-collection/ch04/audio/en/s05.mp3
new file mode 100644
index 0000000..3a05f3f
Binary files /dev/null and b/site/joke-collection/ch04/audio/en/s05.mp3 differ
diff --git a/site/joke-collection/ch04/audio/en/s05b.mp3 b/site/joke-collection/ch04/audio/en/s05b.mp3
new file mode 100644
index 0000000..97da7a6
Binary files /dev/null and b/site/joke-collection/ch04/audio/en/s05b.mp3 differ
diff --git a/site/joke-collection/ch04/audio/en/s06.mp3 b/site/joke-collection/ch04/audio/en/s06.mp3
new file mode 100644
index 0000000..3bb9c6c
Binary files /dev/null and b/site/joke-collection/ch04/audio/en/s06.mp3 differ
diff --git a/site/joke-collection/ch04/audio/en/s06b.mp3 b/site/joke-collection/ch04/audio/en/s06b.mp3
new file mode 100644
index 0000000..ae8deef
Binary files /dev/null and b/site/joke-collection/ch04/audio/en/s06b.mp3 differ
diff --git a/site/joke-collection/ch04/audio/en/s07.mp3 b/site/joke-collection/ch04/audio/en/s07.mp3
new file mode 100644
index 0000000..8a59af4
Binary files /dev/null and b/site/joke-collection/ch04/audio/en/s07.mp3 differ
diff --git a/site/joke-collection/ch04/audio/en/s08.mp3 b/site/joke-collection/ch04/audio/en/s08.mp3
new file mode 100644
index 0000000..0bef404
Binary files /dev/null and b/site/joke-collection/ch04/audio/en/s08.mp3 differ
diff --git a/site/joke-collection/ch04/audio/en/s09.mp3 b/site/joke-collection/ch04/audio/en/s09.mp3
new file mode 100644
index 0000000..8d59fec
Binary files /dev/null and b/site/joke-collection/ch04/audio/en/s09.mp3 differ
diff --git a/site/joke-collection/ch04/audio/en/s10.mp3 b/site/joke-collection/ch04/audio/en/s10.mp3
new file mode 100644
index 0000000..9211fb4
Binary files /dev/null and b/site/joke-collection/ch04/audio/en/s10.mp3 differ
diff --git a/site/joke-collection/ch04/audio/en/s11.mp3 b/site/joke-collection/ch04/audio/en/s11.mp3
new file mode 100644
index 0000000..41b2470
Binary files /dev/null and b/site/joke-collection/ch04/audio/en/s11.mp3 differ
diff --git a/site/joke-collection/ch04/audio/en/s11b.mp3 b/site/joke-collection/ch04/audio/en/s11b.mp3
new file mode 100644
index 0000000..df955a9
Binary files /dev/null and b/site/joke-collection/ch04/audio/en/s11b.mp3 differ
diff --git a/site/joke-collection/ch04/audio/en/s12.mp3 b/site/joke-collection/ch04/audio/en/s12.mp3
new file mode 100644
index 0000000..d26ab76
Binary files /dev/null and b/site/joke-collection/ch04/audio/en/s12.mp3 differ
diff --git a/site/joke-collection/ch04/audio/en/s12b.mp3 b/site/joke-collection/ch04/audio/en/s12b.mp3
new file mode 100644
index 0000000..6c37ec5
Binary files /dev/null and b/site/joke-collection/ch04/audio/en/s12b.mp3 differ
diff --git a/site/joke-collection/ch04/audio/en/s13.mp3 b/site/joke-collection/ch04/audio/en/s13.mp3
new file mode 100644
index 0000000..3bb9c6c
Binary files /dev/null and b/site/joke-collection/ch04/audio/en/s13.mp3 differ
diff --git a/site/joke-collection/ch04/audio/en/s13b.mp3 b/site/joke-collection/ch04/audio/en/s13b.mp3
new file mode 100644
index 0000000..1a878d2
Binary files /dev/null and b/site/joke-collection/ch04/audio/en/s13b.mp3 differ
diff --git a/site/joke-collection/ch04/audio/en/s13c.mp3 b/site/joke-collection/ch04/audio/en/s13c.mp3
new file mode 100644
index 0000000..7f969d1
Binary files /dev/null and b/site/joke-collection/ch04/audio/en/s13c.mp3 differ
diff --git a/site/joke-collection/ch04/audio/en/scene1.mp3 b/site/joke-collection/ch04/audio/en/scene1.mp3
new file mode 100644
index 0000000..07c443e
Binary files /dev/null and b/site/joke-collection/ch04/audio/en/scene1.mp3 differ
diff --git a/site/joke-collection/ch04/audio/en/scene2.mp3 b/site/joke-collection/ch04/audio/en/scene2.mp3
new file mode 100644
index 0000000..993561b
Binary files /dev/null and b/site/joke-collection/ch04/audio/en/scene2.mp3 differ
diff --git a/site/joke-collection/ch04/audio/en/scene3.mp3 b/site/joke-collection/ch04/audio/en/scene3.mp3
new file mode 100644
index 0000000..8b6aef2
Binary files /dev/null and b/site/joke-collection/ch04/audio/en/scene3.mp3 differ
diff --git a/site/joke-collection/ch04/audio/en/scene4.mp3 b/site/joke-collection/ch04/audio/en/scene4.mp3
new file mode 100644
index 0000000..dee51a9
Binary files /dev/null and b/site/joke-collection/ch04/audio/en/scene4.mp3 differ
diff --git a/site/joke-collection/ch04/audio/en/shots.js b/site/joke-collection/ch04/audio/en/shots.js
new file mode 100644
index 0000000..2e7071b
--- /dev/null
+++ b/site/joke-collection/ch04/audio/en/shots.js
@@ -0,0 +1,19 @@
+TIMINGS.scene1 = {"dur": 31.648, "marks": {}, "cues": [[0.102, "My deskmate Bo never did his homework.", 3.763], [3.464, "But Bo always had an excuse.", 5.694], [7.173, "Bo.", 7.792], [7.493, "Homework.", 8.564], [9.816, "The wind took it.", 10.947], [11.881, "Bo.", 12.5], [12.201, "Homework.", 13.272], [14.524, "Aliens.", 15.516], [16.757, "Bo.", 17.376], [17.077, "Homework.", 18.148], [19.4, "My dog ate it.", 20.549], [22.233, "Bo.", 24.144], [23.845, "You don't have a dog.", 25.465], [28.476, "Yet.", 29.168]], "parts": {"s01": 0, "s02": 6.662, "s02b": 9.716, "s02c": 11.77, "s02d": 14.424, "s02e": 16.646, "s02f": 19.3, "s03": 21.522, "s03b": 26.576}};
+TIMINGS.scene2 = {"dur": 32.626, "marks": {}, "cues": [[0.102, "I always did my homework.", 2.929], [3.83, "Usually at breakfast.", 5.587], [7.642, "Can I rent your dog?", 8.91], [10.367, "Five yuan.", 11.67], [14.341, "Bo.", 14.96], [14.661, "Homework.", 15.732], [18.984, "Exhibit A.", 20.092], [21.217, "Go on, then.", 22.87]], "parts": {"s04": 0, "s05": 6.542, "s05b": 9.764, "s06": 13.63, "s06b": 16.884, "s07": 21.106}};
+TIMINGS.scene3 = {"dur": 24.668, "marks": {}, "cues": [[0.111, "And yours?", 1.324], [4.362, "The dog ate it.", 5.49], [9.595, "Of course he did.", 12.283], [11.984, "Detention.", 14.188], [13.889, "All three of you.", 15.449], [16.678, "Dude.", 18.171], [17.872, "Why does your homework smell like buns?", 20.0], [20.916, "Because I do it at breakfast!", 22.676]], "parts": {"s08": 0, "s09": 2.462, "s10": 9.484, "s11": 16.578, "s11b": 20.816}};
+TIMINGS.scene4 = {"dur": 28.076, "marks": {}, "cues": [[0.1, "You know, I learned something today.", 3.015], [2.716, "A lie is like a dog.", 5.117], [4.818, "You bring it to school, and it eats your best friend's homework.", 8.031], [9.594, "Dude.", 11.087], [10.788, "That's beautiful.", 11.913], [13.883, "Bo.", 14.502], [14.203, "Homework.", 15.274], [17.737, "Bo.", 19.648], [19.349, "It's perfect.", 20.649], [21.868, "Yeah.", 23.273], [22.974, "The dog did it.", 24.089]], "parts": {"s12": 0, "s12b": 8.894, "s13": 12.772, "s13b": 16.426, "s13c": 21.768}};
+MOUTHS.s02 = [[0.049, "X"], [0.511, "A"], [0.671, "E"], [0.831, "B"], [0.91, "E"], [0.988, "A"], [1.067, "C"], [1.145, "F"], [1.224, "E"], [1.303, "B"], [1.381, "X"]];
+MOUTHS.s03 = [[0.049, "X"], [0.711, "A"], [0.986, "E"], [1.261, "X"], [2.323, "C"], [2.414, "F"], [2.505, "B"], [2.582, "E"], [2.658, "B"], [2.734, "B"], [2.784, "D"], [2.833, "G"], [2.883, "C"], [2.932, "D"], [3.039, "B"], [3.222, "E"], [3.406, "B"], [3.589, "X"]];
+MOUTHS.s03b = [[0.049, "X"], [1.894, "C"], [2.169, "B"], [2.444, "X"], [3.599, "X"]];
+MOUTHS.s04 = [[0.102, "C"], [0.323, "D"], [0.407, "H"], [0.49, "F"], [0.573, "C"], [0.657, "B"], [0.74, "B"], [0.797, "C"], [0.853, "B"], [0.909, "A"], [0.981, "C"], [1.053, "B"], [1.131, "E"], [1.21, "A"], [1.288, "C"], [1.367, "F"], [1.445, "E"], [1.524, "B"], [1.603, "X"], [2.629, "X"], [3.83, "F"], [3.922, "B"], [4.014, "F"], [4.105, "D"], [4.197, "H"], [4.289, "C"], [4.429, "D"], [4.501, "B"], [4.572, "A"], [4.651, "B"], [4.73, "C"], [4.808, "B"], [4.887, "G"], [4.965, "D"], [5.044, "B"], [5.122, "X"]];
+MOUTHS.s05 = [[0.049, "X"], [1.094, "B"], [1.145, "D"], [1.196, "B"], [1.247, "C"], [1.346, "B"], [1.415, "C"], [1.485, "B"], [1.554, "C"], [1.587, "F"], [1.62, "B"], [1.653, "B"], [1.836, "E"], [2.02, "B"], [2.203, "X"]];
+MOUTHS.s05b = [[0.049, "X"], [0.603, "G"], [0.706, "C"], [0.809, "G"], [0.912, "C"], [1.015, "C"], [1.153, "F"], [1.29, "D"], [1.428, "B"], [1.565, "X"], [2.449, "X"]];
+MOUTHS.s06 = [[0.049, "X"], [0.711, "A"], [0.871, "E"], [1.031, "B"], [1.11, "E"], [1.188, "A"], [1.267, "C"], [1.345, "F"], [1.424, "E"], [1.503, "B"], [1.581, "X"]];
+MOUTHS.s06b = [[0.049, "X"], [2.094, "C"], [2.172, "B"], [2.251, "C"], [2.33, "A"], [2.408, "C"], [2.487, "B"], [2.565, "D"], [3.115, "X"]];
+MOUTHS.s07 = [[0.111, "B"], [0.263, "E"], [0.416, "E"], [0.691, "B"], [1.026, "B"], [1.209, "C"], [1.392, "B"], [1.576, "X"], [2.449, "X"]];
+MOUTHS.s09 = [[0.049, "X"], [1.895, "B"], [1.975, "C"], [2.055, "B"], [2.157, "E"], [2.259, "B"], [2.361, "D"], [2.418, "B"], [2.475, "C"], [2.532, "C"], [2.807, "B"], [3.082, "X"], [3.599, "X"]];
+MOUTHS.s11b = [[0.095, "A"], [0.141, "C"], [0.186, "B"], [0.232, "D"], [0.277, "F"], [0.323, "B"], [0.368, "C"], [0.414, "C"], [0.505, "B"], [0.607, "E"], [0.709, "C"], [0.755, "B"], [0.8, "D"], [0.863, "B"], [0.925, "A"], [1.004, "B"], [1.082, "C"], [1.161, "B"], [1.239, "G"], [1.318, "D"], [1.396, "B"], [1.475, "X"], [2.299, "X"]];
+MOUTHS.s12b = [[0.049, "X"], [0.694, "B"], [0.831, "F"], [0.969, "B"], [1.106, "C"], [1.244, "X"], [1.894, "B"], [1.985, "D"], [2.077, "B"], [2.168, "A"], [2.237, "C"], [2.306, "F"], [2.374, "B"], [2.443, "C"], [2.512, "G"], [2.581, "F"], [2.649, "H"], [2.718, "X"]];
+MOUTHS.s13 = [[0.049, "X"], [1.111, "A"], [1.271, "E"], [1.431, "B"], [1.51, "E"], [1.588, "A"], [1.667, "C"], [1.745, "F"], [1.824, "E"], [1.903, "B"], [1.981, "X"]];
+MOUTHS.s13b = [[0.049, "X"], [1.311, "A"], [1.586, "E"], [1.861, "X"], [2.923, "C"], [3.052, "B"], [3.182, "A"], [3.273, "C"], [3.365, "B"], [3.457, "G"], [3.548, "C"], [3.64, "B"], [3.732, "X"]];
+MOUTHS.s13c = [[0.094, "C"], [0.369, "B"], [0.644, "X"], [1.206, "B"], [1.283, "C"], [1.36, "B"], [1.466, "E"], [1.572, "B"], [1.678, "B"], [1.725, "C"], [1.773, "B"], [1.82, "C"], [2.095, "B"], [2.369, "X"], [5.87, "X"]];
diff --git a/site/joke-collection/ch04/audio/en/timings.js b/site/joke-collection/ch04/audio/en/timings.js
new file mode 100644
index 0000000..8a3fb68
--- /dev/null
+++ b/site/joke-collection/ch04/audio/en/timings.js
@@ -0,0 +1,316 @@
+window.TIMINGS = {
+ "s01": {
+ "dur": 6.312,
+ "marks": {},
+ "cues": [
+ [
+ 0.102,
+ "My deskmate Bo never did his homework."
+ ],
+ [
+ 3.464,
+ "But Bo always had an excuse."
+ ]
+ ]
+ },
+ "s02": {
+ "dur": 2.304,
+ "marks": {},
+ "cues": [
+ [
+ 0.111,
+ "Bo."
+ ],
+ [
+ 0.431,
+ "Homework."
+ ]
+ ]
+ },
+ "s02b": {
+ "dur": 1.704,
+ "marks": {},
+ "cues": [
+ [
+ 0.094,
+ "The wind took it."
+ ]
+ ]
+ },
+ "s02c": {
+ "dur": 2.304,
+ "marks": {},
+ "cues": [
+ [
+ 0.111,
+ "Bo."
+ ],
+ [
+ 0.431,
+ "Homework."
+ ]
+ ]
+ },
+ "s02d": {
+ "dur": 1.872,
+ "marks": {},
+ "cues": [
+ [
+ 0.097,
+ "Aliens."
+ ]
+ ]
+ },
+ "s02e": {
+ "dur": 2.304,
+ "marks": {},
+ "cues": [
+ [
+ 0.111,
+ "Bo."
+ ],
+ [
+ 0.431,
+ "Homework."
+ ]
+ ]
+ },
+ "s02f": {
+ "dur": 1.872,
+ "marks": {},
+ "cues": [
+ [
+ 0.094,
+ "My dog ate it."
+ ]
+ ]
+ },
+ "s03": {
+ "dur": 4.104,
+ "marks": {},
+ "cues": [
+ [
+ 0.111,
+ "Bo."
+ ],
+ [
+ 1.723,
+ "You don't have a dog."
+ ]
+ ]
+ },
+ "s03b": {
+ "dur": 1.872,
+ "marks": {},
+ "cues": [
+ [
+ 0.094,
+ "Yet."
+ ]
+ ]
+ },
+ "s04": {
+ "dur": 4.992,
+ "marks": {},
+ "cues": [
+ [
+ 0.102,
+ "I always did my homework."
+ ],
+ [
+ 2.63,
+ "Usually at breakfast."
+ ]
+ ]
+ },
+ "s05": {
+ "dur": 1.872,
+ "marks": {},
+ "cues": [
+ [
+ 0.094,
+ "Can I rent your dog?"
+ ]
+ ]
+ },
+ "s05b": {
+ "dur": 2.016,
+ "marks": {},
+ "cues": [
+ [
+ 0.103,
+ "Five yuan."
+ ]
+ ]
+ },
+ "s06": {
+ "dur": 2.304,
+ "marks": {},
+ "cues": [
+ [
+ 0.111,
+ "Bo."
+ ],
+ [
+ 0.431,
+ "Homework."
+ ]
+ ]
+ },
+ "s06b": {
+ "dur": 1.872,
+ "marks": {},
+ "cues": [
+ [
+ 0.094,
+ "Exhibit A."
+ ]
+ ]
+ },
+ "s07": {
+ "dur": 2.52,
+ "marks": {},
+ "cues": [
+ [
+ 0.111,
+ "Go on, then."
+ ]
+ ]
+ },
+ "s08": {
+ "dur": 2.112,
+ "marks": {},
+ "cues": [
+ [
+ 0.111,
+ "And yours?"
+ ]
+ ]
+ },
+ "s09": {
+ "dur": 1.872,
+ "marks": {},
+ "cues": [
+ [
+ 0.095,
+ "The dog ate it."
+ ]
+ ]
+ },
+ "s10": {
+ "dur": 6.744,
+ "marks": {},
+ "cues": [
+ [
+ 0.111,
+ "Of course he did."
+ ],
+ [
+ 2.5,
+ "Detention."
+ ],
+ [
+ 4.405,
+ "All three of you."
+ ]
+ ]
+ },
+ "s11": {
+ "dur": 3.888,
+ "marks": {},
+ "cues": [
+ [
+ 0.094,
+ "Dude."
+ ],
+ [
+ 1.294,
+ "Why does your homework smell like buns?"
+ ]
+ ]
+ },
+ "s11b": {
+ "dur": 2.352,
+ "marks": {},
+ "cues": [
+ [
+ 0.095,
+ "Because I do it at breakfast!"
+ ]
+ ]
+ },
+ "s12": {
+ "dur": 8.544,
+ "marks": {},
+ "cues": [
+ [
+ 0.095,
+ "You know, I learned something today."
+ ],
+ [
+ 2.716,
+ "A lie is like a dog."
+ ],
+ [
+ 4.818,
+ "You bring it to school, and it eats your best friend's homework."
+ ]
+ ]
+ },
+ "s12b": {
+ "dur": 2.928,
+ "marks": {},
+ "cues": [
+ [
+ 0.094,
+ "Dude."
+ ],
+ [
+ 1.294,
+ "That's beautiful."
+ ]
+ ]
+ },
+ "s13": {
+ "dur": 2.304,
+ "marks": {},
+ "cues": [
+ [
+ 0.111,
+ "Bo."
+ ],
+ [
+ 0.431,
+ "Homework."
+ ]
+ ]
+ },
+ "s13b": {
+ "dur": 3.792,
+ "marks": {},
+ "cues": [
+ [
+ 0.111,
+ "Bo."
+ ],
+ [
+ 1.723,
+ "It's perfect."
+ ]
+ ]
+ },
+ "s13c": {
+ "dur": 2.808,
+ "marks": {},
+ "cues": [
+ [
+ 0.094,
+ "Yeah."
+ ],
+ [
+ 1.206,
+ "The dog did it."
+ ]
+ ]
+ }
+};
diff --git a/site/joke-collection/ch04/audio/sfx/bark.mp3 b/site/joke-collection/ch04/audio/sfx/bark.mp3
new file mode 100644
index 0000000..5cbebae
Binary files /dev/null and b/site/joke-collection/ch04/audio/sfx/bark.mp3 differ
diff --git a/site/joke-collection/ch04/audio/sfx/bell.mp3 b/site/joke-collection/ch04/audio/sfx/bell.mp3
new file mode 100644
index 0000000..5009865
Binary files /dev/null and b/site/joke-collection/ch04/audio/sfx/bell.mp3 differ
diff --git a/site/joke-collection/ch04/audio/sfx/burp.mp3 b/site/joke-collection/ch04/audio/sfx/burp.mp3
new file mode 100644
index 0000000..ba01322
Binary files /dev/null and b/site/joke-collection/ch04/audio/sfx/burp.mp3 differ
diff --git a/site/joke-collection/ch04/audio/sfx/chair.mp3 b/site/joke-collection/ch04/audio/sfx/chair.mp3
new file mode 100644
index 0000000..8a4d03b
Binary files /dev/null and b/site/joke-collection/ch04/audio/sfx/chair.mp3 differ
diff --git a/site/joke-collection/ch04/audio/sfx/chomp.mp3 b/site/joke-collection/ch04/audio/sfx/chomp.mp3
new file mode 100644
index 0000000..0f35c2e
Binary files /dev/null and b/site/joke-collection/ch04/audio/sfx/chomp.mp3 differ
diff --git a/site/joke-collection/ch04/audio/sfx/crickets.mp3 b/site/joke-collection/ch04/audio/sfx/crickets.mp3
new file mode 100644
index 0000000..bcf7ebb
Binary files /dev/null and b/site/joke-collection/ch04/audio/sfx/crickets.mp3 differ
diff --git a/site/joke-collection/ch04/audio/sfx/door.mp3 b/site/joke-collection/ch04/audio/sfx/door.mp3
new file mode 100644
index 0000000..37bae91
Binary files /dev/null and b/site/joke-collection/ch04/audio/sfx/door.mp3 differ
diff --git a/site/joke-collection/ch04/audio/sfx/fly.mp3 b/site/joke-collection/ch04/audio/sfx/fly.mp3
new file mode 100644
index 0000000..31b9666
Binary files /dev/null and b/site/joke-collection/ch04/audio/sfx/fly.mp3 differ
diff --git a/site/joke-collection/ch04/audio/sfx/growl.mp3 b/site/joke-collection/ch04/audio/sfx/growl.mp3
new file mode 100644
index 0000000..9426861
Binary files /dev/null and b/site/joke-collection/ch04/audio/sfx/growl.mp3 differ
diff --git a/site/joke-collection/ch04/audio/sfx/gulp.mp3 b/site/joke-collection/ch04/audio/sfx/gulp.mp3
new file mode 100644
index 0000000..74b60df
Binary files /dev/null and b/site/joke-collection/ch04/audio/sfx/gulp.mp3 differ
diff --git a/site/joke-collection/ch04/audio/sfx/lick.mp3 b/site/joke-collection/ch04/audio/sfx/lick.mp3
new file mode 100644
index 0000000..eb12334
Binary files /dev/null and b/site/joke-collection/ch04/audio/sfx/lick.mp3 differ
diff --git a/site/joke-collection/ch04/audio/sfx/plop.mp3 b/site/joke-collection/ch04/audio/sfx/plop.mp3
new file mode 100644
index 0000000..33579aa
Binary files /dev/null and b/site/joke-collection/ch04/audio/sfx/plop.mp3 differ
diff --git a/site/joke-collection/ch04/audio/sfx/rain.mp3 b/site/joke-collection/ch04/audio/sfx/rain.mp3
new file mode 100644
index 0000000..a1fc58e
Binary files /dev/null and b/site/joke-collection/ch04/audio/sfx/rain.mp3 differ
diff --git a/site/joke-collection/ch04/audio/sfx/sniff.mp3 b/site/joke-collection/ch04/audio/sfx/sniff.mp3
new file mode 100644
index 0000000..37f3fbb
Binary files /dev/null and b/site/joke-collection/ch04/audio/sfx/sniff.mp3 differ
diff --git a/site/joke-collection/ch04/audio/sfx/sting.mp3 b/site/joke-collection/ch04/audio/sfx/sting.mp3
new file mode 100644
index 0000000..af1219c
Binary files /dev/null and b/site/joke-collection/ch04/audio/sfx/sting.mp3 differ
diff --git a/site/joke-collection/ch04/audio/sfx/tick.mp3 b/site/joke-collection/ch04/audio/sfx/tick.mp3
new file mode 100644
index 0000000..473ca36
Binary files /dev/null and b/site/joke-collection/ch04/audio/sfx/tick.mp3 differ
diff --git a/site/joke-collection/ch04/audio/sfx/violin.mp3 b/site/joke-collection/ch04/audio/sfx/violin.mp3
new file mode 100644
index 0000000..8eee69d
Binary files /dev/null and b/site/joke-collection/ch04/audio/sfx/violin.mp3 differ
diff --git a/site/joke-collection/ch04/audio/sfx/whoosh.mp3 b/site/joke-collection/ch04/audio/sfx/whoosh.mp3
new file mode 100644
index 0000000..feb4d22
Binary files /dev/null and b/site/joke-collection/ch04/audio/sfx/whoosh.mp3 differ
diff --git a/site/joke-collection/ch04/index.html b/site/joke-collection/ch04/index.html
new file mode 100644
index 0000000..ddaf89f
--- /dev/null
+++ b/site/joke-collection/ch04/index.html
@@ -0,0 +1,71 @@
+<!doctype html>
+<html lang="en">
+<head>
+<meta charset="utf-8">
+<meta name="viewport" content="width=device-width, initial-scale=1">
+<title>The Dog Ate My Homework</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="../img/sets/sets.js"></script>
+<script src="../img/puppets/baked.js" onerror="0"></script>
+<script src="../lib/paper.js"></script>
+<script src="../lib/cast.js"></script>
+<script src="audio/en/timings.js"></script>
+<script src="audio/en/mouths.js"></script>
+<script src="audio/en/shots.js"></script>
+<script src="../lib/shared.js"></script>
+<script src="scene1.js"></script>
+<script src="scene2.js"></script>
+<script src="scene3.js"></script>
+<script src="scene4.js"></script>
+<script>
+'use strict';
+const CHAPTER = { number: 4, title: 'The Dog Ate My Homework', minutes: 2, language: 'en' };
+try { if (localStorage.getItem('captions') === null) setCaptions(true); } catch {}
+
+/* ---------- beats: one per scene ---------- */
+const BEATS = [
+ ['scene1', 'The excuses', (m, D) => scene1(panel(0), D), { lead: false, pre: PRE1 }],
+ ['scene2', 'Exhibit A', (m, D) => scene2(panel(0), D), { lead: false, pre: PRE2 }],
+ ['scene3', 'The victim', (m, D) => scene3(panel(0), D), { lead: false, pre: PRE3 }],
+ ['scene4', 'What we learned', (m, D) => scene4(panel(0), D), { lead: false, pre: PRE4 }],
+].map(([id, title, run, extra]) => ({ id, title, run, ...extra }));
+
+/* ---------- background music ----------
+ The Three Little Pigs' score (Lyria), reused: one track per listed scene, its position the time since the track's
+ first scene began, so pausing and seeking keep it in step; 0.8 s crossfades; lower under speech. Scene 3 is silent.
+ The files are episode 2's; scenes may set window.MUSIC_OFF[scene](t) to drop it for a silence. */
+const BGM = [['m3-chimney', ['scene1'], .22], ['m1-home', ['scene2'], .3], ['m4-ending', ['scene4'], .3]]
+ .map(([n, beats, gain]) => ({ n, beats, gain, a: Object.assign(new Audio(`../ch02/audio/bgm/${n}.mp3`), { preload: 'auto', loop: true, volume: 0 }), v: 0 }));
+const beatLen = id => { const b = BEATS.find(x => x.id === id); return (b.pre || 0) + TIMINGS[id].dur + .6; };
+let lastTick = performance.now(), duck = .3;
+function bgmTick(now) {
+ const dt = Math.min(.1, (now - lastTick) / 1000); lastTick = now;
+ const id = BEATS[P.i]?.id, on = P.started && P.playing && !P.waiting && !P.done;
+ // the music ducks well under the voices for the whole of a scene that has them (its silent opening and tail too, so
+ // it does not swell between lines), easing over about half a second
+ duck += Math.max(-dt, Math.min(dt, (P.audio ? .3 : .7) - duck));
+ const vol = +(document.getElementById('volume')?.value ?? 1) * duck;
+ for (const m of BGM) {
+ const k = m.beats.indexOf(id), current = on && k >= 0 && !(window.MUSIC_OFF?.[id]?.(P.t));
+ m.v = Math.max(0, Math.min(1, m.v + (current ? 1 : -1) * dt / .8));
+ m.a.volume = m.v * m.gain * vol;
+ if (current) {
+ const want = (m.beats.slice(0, k).reduce((s, b) => s + beatLen(b), 0) + P.t) % (m.a.duration || 1e9);
+ if (Math.abs(m.a.currentTime - want) > .5) m.a.currentTime = want;
+ if (m.a.paused) m.a.play().catch(() => {});
+ } else if (m.v === 0 && !m.a.paused) m.a.pause();
+ }
+ if (!on && !P.done) for (const m of BGM) m.a.pause();
+ requestAnimationFrame(bgmTick);
+}
+requestAnimationFrame(bgmTick);
+paperWarm(g => { mePuppet(g); boPuppet(g); auntPuppet(g); teacherPuppet(g); dogPuppet(g); classmate(g, 'bowl', '#1c1a1a');
+ prop(g, deskSVG(0, 0, 1) + bunSVG() + hwSVG() + hwSVG({ grease: true }) + hwSVG({ blank: true }) + pencilSVG); });
+boot();
+</script>
+</body>
+</html>
diff --git a/site/joke-collection/ch04/scene1.js b/site/joke-collection/ch04/scene1.js
new file mode 100644
index 0000000..4b02b53
--- /dev/null
+++ b/site/joke-collection/ch04/scene1.js
@@ -0,0 +1,92 @@
+/* scene1.js — 起, the excuses. Wide of the class (narrator); the two-shot, seated: Me writes his homework, Bo has nothing
+ (that is who "I" is); Bo close-up for "an excuse" (smug); then shot/reverse: the teacher asks "Bo. Homework." (same
+ framing, same pose, every time) and Bo, on his feet in the two-shot, answers dead straight with a gesture per excuse
+ while Me reacts a little more each time. Teacher close-up for the dog line, Bo close-up for the silence and "Yet.",
+ then the sting. */
+'use strict';
+const PRE1 = 1.0; // the wide first, then the narrator
+
+// shot times (beat clock = PRE1 + audio time)
+const S1 = { two0: 1.9, smug: 4.25, two0b: 5.9, tch1: 7.75, two1: 10.0, tch2: 12.6, two2: 15.25, tch3: 17.5, two3: 20.1, cu: 22.4, bo: 26.7, sting: 30.15 };
+sfx('scene1', S1.two1 - .05, 'chair');
+sfx('scene1', S1.sting, 'sting');
+
+function scene1(p, D) {
+ const c = classroom(p, { pen: `<g transform="translate(-20,-30) rotate(55)">${pencilSVG}</g>` }), cam = c.cam, tc = teacherSet(p), tcam = tc.cam;
+ const BO_CU = { x: 920, y: 470, z: 2.8 }, BO_SIT_CU = { x: 930, y: 540, z: 2.6 }, TCH = { x: 1060, y: 480, z: 1.5 };
+ // Me's homework lying on the desk (foreshortened), drawn over the desk top; shown in the seated shots only
+ const sheet = prop(cam.stage, `<g filter="url(#paper)"><path d="M-52,-2 L-40,-20 H44 L56,-2 Z" fill="#fbfaf4"/>${[-15,-10,-5].map(y => `<path d="M-30,${y} h56" stroke="#3a4f86" stroke-width="1.6"/>`).join('')}</g>`);
+ tf(sheet, `translate(${c.ME.x + 20},722)`);
+ cam.cut({ x: 800, y: 450, z: 1 }, 0); // 1 wide on the class
+ cam.cut(TWO, S1.two0).soft(S1.two0, false); // 2 two-shot, seated: Me writes, Bo idles
+ cam.cut(BO_SIT_CU, S1.smug).soft(S1.smug, true); // 3 Bo, smug: "an excuse"
+ cam.cut(TWO, S1.two0b).soft(S1.two0b, false); // 4 back to the two-shot; Bo sits up
+ cam.cut(TWO, S1.two1).cut(TWO, S1.two2).cut(TWO, S1.two3); // 6,8,10 Bo up, two-shot
+ cam.cut(BO_CU, S1.bo).soft(S1.bo, true); // 12 Bo close-up
+ tcam.cut(TCH, 0).cut(TEACH_CU, S1.cu).soft(S1.cu, true); // 5,7,9 teacher medium; 11 close-up
+
+ const teacherOn = q => between(q, S1.tch1, S1.two1) || between(q, S1.tch2, S1.two2) || between(q, S1.tch3, S1.two3) || between(q, S1.cu, S1.bo);
+ const wide = q => q < S1.two0, smug = q => between(q, S1.smug, S1.two0b);
+ const two = q => between(q, S1.two0, S1.smug) || between(q, S1.two0b, S1.tch1) || between(q, S1.two1, S1.tch2) || between(q, S1.two2, S1.tch3) || between(q, S1.two3, S1.cu);
+ const boCU = q => q >= S1.bo;
+ // each excuse: Bo's gesture (from the word) and Me's reaction
+ const X = [S1.two1 + .8, S1.two2 + .27, S1.two3 + .29]; // "wind", "Aliens", "dog" as heard in the two-shot
+ const ramp = (q, a, b, v0, v1) => v0 + (v1 - v0) * ease(span(q, a, b));
+ const narrow = m => ({ D: 'B', C: 'B', H: 'G', E: 'F' }[m] || m); // the teacher's mouth stays small: deadpan
+
+ stopClock(D, (q, f) => {
+ const t = teacherOn(q), w = wide(q), tw = two(q), sm = smug(q), bc = boCU(q);
+ vis(tcam.root, t); vis(cam.root, !t);
+ cam.apply(q, f); tcam.apply(q, f); vis(sheet, q < S1.tch1);
+ for (const m of c.mates) vis(m.p.g, w || tw);
+ vis(c.me.g, w || tw); vis(c.bo.g, w || tw || sm || bc);
+ if (w || tw) c.matesPose(q, f);
+ const mouth = (...cl) => { const m = lips(q, 'scene1', PRE1, ...cl); return m === 'X' ? 'flat' : m; };
+
+ // the teacher: deadpan, identical in every shot; one blink in each wait, eyes drift a hair; one blink between the two lines
+ tc.t.pose({ ...TEACHER, lids: .45, look: 0, eyeX: between(q, 8.6, 9.2) || between(q, 18.3, 18.9) ? .35 : between(q, 13.3, 13.9) ? -.35 : 0,
+ mouth: narrow(mouth('s02', 's02c', 's02e', 's03')), armR: 0,
+ shut: blinking(q, [8.9, 13.7, 18.4, 24.1, 26.0]) }, f);
+
+ // Bo: idles in the first two-shot (eyes up, a slow head tilt), sits up at the teacher's name, on his feet from the cut
+ const sit = q < S1.tch1;
+ const gest = { armR: 0, armL: 0, look: 0, eyeX: 0, eyeY: 0, headR: 0, brow: 0 };
+ if (sit) {
+ if (q < S1.smug) Object.assign(gest, { eyeY: -.8, look: -.2, headR: -3 + 2 * Math.sin(q * 1.6), armR: 8 + 4 * Math.sin(q * 2.2) }); // gazes at the ceiling, fidgets
+ else if (q < S1.two0b) Object.assign(gest, { eyeX: -.4, headR: 4, brow: -.3 }); // smug
+ else Object.assign(gest, { eyeY: q < 7.2 ? -.6 : 0, headR: q < 7.2 ? -2 : 0 });
+ } else if (q >= S1.two1 && q < S1.tch2) { // "The wind took it": the flat of the hand wafts out toward the window
+ Object.assign(gest, { armR: q < X[0] - .1 ? 20 : ramp(q, X[0] - .1, X[0] + .9, 70, 125) * (q < X[0] + 1.2 ? 1 : 1 - span(q, X[0] + 1.2, X[0] + 1.6)), headR: 2 * span(q, X[0], X[0] + .6) });
+ } else if (q >= S1.two2 && q < S1.tch3) { // "Aliens": a forefinger straight up, eyes up with it
+ const up = span(q, X[1] - .15, X[1] + .35), dn = span(q, X[1] + 1.4, X[1] + 1.8);
+ Object.assign(gest, { armR: 150 * up * (1 - dn), eyeY: -.7 * up * (1 - dn), headR: -3 * up * (1 - dn) });
+ } else if (q >= S1.two3 && q < S1.cu) { // "My dog ate it": both hands out, palms up: what can I do
+ const o = span(q, X[2] - .15, X[2] + .3) * (1 - span(q, X[2] + 1.5, X[2] + 1.9));
+ Object.assign(gest, { armR: 58 * o, armL: 58 * o, headR: 4 * o, brow: .4 * o });
+ }
+ if (bc) { // the silence: eyes slide left, back, a blink, then "Yet." and the smug face
+ const away = between(q, 27.5, 28.3) ? -1 : between(q, 28.3, 28.5) ? -.4 : 0;
+ Object.assign(gest, { eyeX: away, look: away * .3, eyeY: between(q, 28.9, 29.4) ? -.3 : 0, headR: q > 29.8 ? -3 : 0, brow: q > 29.55 ? -.3 : 0 });
+ }
+ const boMouth = bc && q > 29.95 ? 'smile' : mouth('s02b', 's02d', 's02f', 's03b');
+ c.bo.pose({ ...(sit ? c.BO : c.BO_UP), ...gest, sit, lids: bc ? .45 : sm ? .2 : .3, mouth: sm ? (q > S1.smug + .5 ? 'smile' : 'X') : boMouth,
+ shut: blinking(q, [2.4, 5.9, 12.2, 18.9, 23.6, 27.0, 28.7, 31.4]) }, f);
+
+ // Me, left: writing in the first two-shot, then a bigger reaction to each excuse
+ const k = X.filter(x => q >= x - .1).length, kx = X[Math.max(0, k - 1)];
+ const me = { ...c.ME, sit: true, look: 0, eyeX: 0, eyeY: 0, lids: .1, mouth: 'flat', brow: 0, headR: 0, armL: 0, armR: 0, hold: null, holdL: null,
+ shut: blinking(q, [3.3, 8.5, 14.3, 21.5]) };
+ if (q < S1.tch1) { // head bent over a sheet, pencil scratching; one glance at Bo at the cut back (5.9–6.9)
+ const gl = between(q, S1.two0b + .2, S1.two0b + 1.2);
+ Object.assign(me, { holdL: 'pen', armR: -30, armL: -62 + 7 * onTwos(q), eyeY: gl ? 0 : .8, eyeX: gl ? 1 : 0, look: gl ? .5 : .2, lids: gl ? .25 : .15,
+ headR: gl ? 0 : 2, mouth: gl ? 'flat' : 'chew', shut: blinking(q, [3.3, 6.7]) });
+ } else if (k > 0) {
+ const dt = q - kx;
+ if (k === 1) Object.assign(me, { look: .5 * span(q, kx, kx + .2), eyeX: dt < 1.4 ? 1 : 0, lids: dt < 1.4 ? .3 : .22 }); // a sideways look at Bo
+ if (k === 2) Object.assign(me, { look: .5, eyeX: 1, eyeY: -.8 * span(q, kx, kx + .3) * (dt < 1.4 ? 1 : 0), lids: .3, brow: -.35, headR: 2, mouth: 'frown' }); // eyes follow the finger up, a frown
+ if (k === 3) Object.assign(me, { look: .3 * (dt < .4), eyeX: dt < .4 ? 1 : 0, lids: .4, mouth: 'frown', brow: .3,
+ shut: dt > .5 && dt < 1.3, headR: 4 * span(q, kx + .4, kx + .9), bob: 6 * span(q, kx + .4, kx + .9) }); // eyes shut, head sinks
+ }
+ c.me.pose(me, f);
+ });
+}
diff --git a/site/joke-collection/ch04/scene2.js b/site/joke-collection/ch04/scene2.js
new file mode 100644
index 0000000..ac2bcf3
--- /dev/null
+++ b/site/joke-collection/ch04/scene2.js
@@ -0,0 +1,241 @@
+/* scene2.js — 承, Exhibit A. At the stall Me's bun drips oil on his homework (insert), the sleeping dog sniffs toward
+ him (insert), Bo gets his idea and rents the seller's dog. In class the teacher asks, Bo lifts the dog from behind the
+ desk onto it ("Exhibit A."), the dog sniffs Bo's blank sheet, snubs it, then follows its nose to Me's greasy one and
+ eats it in three bites. Ends on Me's close-up, still pinching a scrap of paper. */
+'use strict';
+const PRE2 = 1.0;
+const A2 = a => PRE2 + a; // audio-relative time -> beat clock
+// the music drops out just before the crickets and stays out: the eating plays in silence
+window.MUSIC_OFF = { ...(window.MUSIC_OFF || {}), scene2: t => t >= A2(24.5) };
+
+/* ---------- scene-only props ---------- */
+const s2sheet = (o, dx) => `<g transform="translate(${dx},0)">${hwSVG(o)}</g>`; // a sheet held by its lower left corner, the mitten under it
+const s2drop = '<g filter="url(#paper)"><path d="M0,-11 Q8,3 0,9 Q-8,3 0,-11 Z" fill="#e0b25a"/></g>';
+const s2mitten = '<g filter="url(#paper)"><rect x="-14" y="-52" width="28" height="52" rx="13" fill="#3563c0"/><path d="M7,-50 v48" stroke="#f4f1ea" stroke-width="5"/><circle r="18" fill="#f2efe6"/><ellipse cx="-14" cy="-10" rx="7" ry="10" fill="#f2efe6"/></g>';
+// Me's sheet after a bite: the right side is gone up to x = R (local), the edge ragged with four round bites
+const s2eaten = R => {
+ const n = Math.floor((R - 8 + 26) / 12), lines = [-78, -66, -54, -42, -30, -18].filter(() => n > 0)
+ .map(y => `<path d="M-26,${y} q6,-4 12,0${' t12,0'.repeat(Math.max(0, n - 1))}" fill="none" stroke="#3a4f86" stroke-width="2.2"/>`).join('');
+ return `<g filter="url(#paper)"><path d="M-34,-92 H${R}${' q-13,11 0,22'.repeat(4)} V-4 H-34 Z" fill="#fbfaf4"/><path d="M-34,-90 V-4" stroke="#e89a9a" stroke-width="2"/>${lines}
+ ${R > 0 ? '<ellipse cx="-4" cy="-37" rx="8" ry="9" fill="#c98f2e" opacity=".7"/>' : ''}</g>`;
+};
+// Me's sheet is in his left (screen-left) hand at the stall and in class; Bo's blank one in his right (outer) hand
+const S2HOLDS = { bun: `<g transform="scale(1.7)">${bunSVG()}</g>`, bite: `<g transform="scale(1.7)">${bunSVG(true)}</g>`,
+ hw: s2sheet({}, 40), hwS: s2sheet({ grease: true }, 40), hwG: s2sheet({ grease: 'big' }, 40),
+ e1: `<g transform="translate(40,0)">${s2eaten(12)}</g>`, e2: `<g transform="translate(40,0)">${s2eaten(-12)}</g>`,
+ scrap: `<g transform="translate(8,-20) scale(1.5)">${scrapSVG}</g>`, bhw: s2sheet({ blank: true, name: 'Bo' }, 0) };
+
+/* ---------- timeline (audio-relative seconds; the picture is cut on these) ---------- */
+const S2 = {
+ // stall: wide, insert of the drop, trio, dog insert (sleeping sniff), trio, Bo idea, medium, seller, dog
+ ins: 1.7, drop: 2.3, plop: 2.65, trio: 3.1, dogIns: 4.25, trio2: 5.05, sniffD: 4.35, boIdea: 5.65, med: 7.5, aunt: 10.1, dogCU: 11.85,
+ // class: teacher medium, two-shot (Bo stands, ducks, lifts the dog, presents it), teacher close-up, the sniff, the eating
+ tmed: 13.7, two: 15.95, duck: 16.35, down: 17.0, rise: 17.2, over: 18.0, land: 18.35, present: 18.75, fetch: 19.9, back: 20.2, tcu: 20.65,
+ tight: 23.1, raise: 23.3, insBlank: 23.65, tight2: 24.45, crick: 25.0, tcu2: 25.55, meCU: 26.1, dogCU2: 26.65, turn: 27.1, pan: 27.8,
+ meCU2: 28.65, insBite: 29.25, chomp: [29.75, 30.35, 30.95], tight3: 31.45, gulp: 31.55, meCU3: 32.35 };
+sfx('scene2', A2(S2.plop), 'plop');
+sfx('scene2', A2(S2.sniffD), 'sniff', .6);
+sfx('scene2', A2(S2.two - .1), 'chair');
+sfx('scene2', A2(S2.insBlank), 'sniff');
+sfx('scene2', A2(S2.crick), 'crickets');
+sfx('scene2', A2(S2.dogCU2 + .1), 'sniff');
+sfx('scene2', A2(S2.pan + .1), 'sniff');
+S2.chomp.forEach(t => sfx('scene2', A2(t), 'chomp'));
+sfx('scene2', A2(S2.gulp), 'gulp');
+
+// the arm angle (the kit's armL/armR value) that puts a hand of length 72 as near (tx, ty) as it reaches, from a shoulder at (sx, sy)
+function s2reach(sx, sy, tx, ty, side) {
+ const dx = tx - sx, dy = ty - sy, d = Math.hypot(dx, dy), k = Math.min(1, 72 / d), th = Math.atan2(-dx, dy) * 180 / Math.PI;
+ return { arm: side === 'L' ? th - 24 : -24 - th, th, hx: sx + dx * k, hy: sy + dy * k };
+}
+
+function scene2(p, D) {
+ const st = stallSet(p, S2HOLDS), sc = st.cam, c = classroom(p, S2HOLDS), cc = c.cam, tc = teacherSet(p), tcam = tc.cam;
+ const DOG_STALL = { x: 1010, y: 836, s: .9 };
+ const dogS = dogPuppet(sc.stage);
+ const deskG = cc.stage.lastChild; // the front desk: the dog rises behind it, then stands on it
+ const dogL = mk('g', {}, cc.stage), dogC = dogPuppet(dogL);
+ const handsPR = [prop(dogL, s2mitten), prop(dogL, s2mitten)]; // Bo's hands over the dog while he lifts it
+ const drop = prop(sc.stage, s2drop);
+ // the seller's open hand held out toward Bo (five fingers: five yuan), drawn over the counter because the cart hides her own arm
+ const palm = prop(sc.stage, `<g filter="url(#paper)"><path d="M1240,522 L1170,540" stroke="#c94a3c" stroke-width="30" stroke-linecap="round"/><g transform="translate(1150,528)">${
+ [-62, -30, -10, 10, 30].map((r, i) => `<rect x="-5" y="${i ? -54 : -42}" width="10" height="${i ? 42 : 30}" rx="5" fill="#f7d9bb" transform="rotate(${r})"/>`).join('')}<ellipse rx="21" ry="22" fill="#f7d9bb"/></g></g>`);
+
+ // stall views: wide, oil insert on Me's hands, trio, dog, Bo close-up, medium with all four, seller
+ const INS_OIL = { x: 490, y: 665, z: 5 }, TRIO = { x: 740, y: 640, z: 1.9 }, BO_ST = { x: 800, y: 560, z: 2.5 }, MED = { x: 900, y: 570, z: 1.5 },
+ AUNT_CU = { x: 1270, y: 500, z: 2.2 }, DOG_ST = { x: 960, y: 770, z: 3.2 };
+ sc.cut(STALL_VIEW, 0).cut(INS_OIL, A2(S2.ins)).cut(TRIO, A2(S2.trio)).cut(DOG_ST, A2(S2.dogIns)).cut(TRIO, A2(S2.trio2)).cut(BO_ST, A2(S2.boIdea)).cut(MED, A2(S2.med))
+ .cut(AUNT_CU, A2(S2.aunt)).cut(DOG_ST, A2(S2.dogCU));
+ sc.soft(A2(S2.ins), true).soft(A2(S2.trio), false).soft(A2(S2.dogIns), true).soft(A2(S2.trio2), false).soft(A2(S2.boIdea), true).soft(A2(S2.med), false).soft(A2(S2.aunt), true);
+ // teacher: medium (x kept inside the set), then close-ups
+ const TEACH_MED = { x: 1060, y: 530, z: 1.5 };
+ tcam.cut(TEACH_MED, 0).cut(TEACH_CU, A2(S2.tcu)).soft(A2(S2.tcu), true);
+ // class: two-shot, tight on Bo and the dog, insert of the blank sheet, reactions, dog, pan to the oil, Me, insert of the bites, the gulp
+ const TIGHT = { x: 900, y: 610, z: 2.6 }, INS_BLANK = { x: 985, y: 630, z: 3.6 }, BO_CU = { x: 930, y: 540, z: 2.8 }, ME_CU = { x: 680, y: 570, z: 2.8 },
+ DOG_CU = { x: 945, y: 630, z: 5.4 }, DOG_CU1 = { x: 800, y: 630, z: 5.4 }, PAN0 = { x: 770, y: 640, z: 4.2 }, PAN1 = { x: 640, y: 610, z: 4.2 },
+ INS_BITE = { x: 690, y: 635, z: 3.7 }, GULP = { x: 770, y: 630, z: 3 };
+ cc.cut(TWO, 0).cut(TIGHT, A2(S2.tight)).cut(INS_BLANK, A2(S2.insBlank)).cut(TIGHT, A2(S2.tight2)).cut(BO_CU, A2(S2.crick)).cut(ME_CU, A2(S2.meCU))
+ .cut(DOG_CU, A2(S2.dogCU2)).to(DOG_CU1, A2(S2.turn - .05), .6) // the camera follows the dog's head round
+ .cut(PAN0, A2(S2.pan)).to(PAN1, A2(S2.pan + .05), .7) // then slides along its nose to the oil stain
+ .cut(ME_CU, A2(S2.meCU2)).cut(INS_BITE, A2(S2.insBite)).cut(GULP, A2(S2.tight3)).cut(ME_CU, A2(S2.meCU3));
+ cc.soft(A2(S2.insBlank), true).soft(A2(S2.tight2), false).soft(A2(S2.crick), true).soft(A2(S2.pan), true).soft(A2(S2.tight3), false).soft(A2(S2.meCU3), true);
+
+ stopClock(D, (q, f) => {
+ const a = q - PRE2;
+ // which shot is on: [from, name]
+ const SH = [[0, 'wide'], [S2.ins, 'ins'], [S2.trio, 'trio'], [S2.dogIns, 'dogST'], [S2.trio2, 'trio'], [S2.boIdea, 'boST'], [S2.med, 'med'], [S2.aunt, 'auntCU'], [S2.dogCU, 'dogST'],
+ [S2.tmed, 'tmed'], [S2.two, 'two'], [S2.tcu, 'tcu'], [S2.tight, 'tight'], [S2.insBlank, 'insBlank'], [S2.tight2, 'tight'], [S2.crick, 'boCU'], [S2.tcu2, 'tcu'], [S2.meCU, 'meCU'],
+ [S2.dogCU2, 'dogCU'], [S2.pan, 'pan'], [S2.meCU2, 'meCU'], [S2.insBite, 'insBite'], [S2.tight3, 'gulp'], [S2.meCU3, 'meCU']];
+ let shot = 'wide'; for (const [t, n] of SH) if (a >= t) shot = n;
+ const inStall = a < S2.tmed, inTeach = shot === 'tmed' || shot === 'tcu', inClass = !inStall && !inTeach;
+ vis(sc.root, inStall); vis(tcam.root, inTeach); vis(cc.root, inClass);
+ sc.apply(q, f); tcam.apply(q, f); cc.apply(q, f);
+ const blink = (...t) => blinking(q, t.map(A2));
+ const is = (...n) => n.includes(shot);
+
+ /* ---- the stall ---- */
+ if (inStall) {
+ const dripping = a >= S2.drop && a < S2.plop + .05, stained = a >= S2.plop;
+ const up = .5 + .5 * Math.sin(a * 3.4); // the bun goes to his mouth and back
+ const reading = Math.floor(a * 1.3) % 2 ? -.6 : .2;
+ const inIns = is('ins'), startled = a >= S2.plop && a < S2.plop + 1.4;
+ // Me: bun in the right hand, homework in the left; in the insert the bun hangs over the sheet and drips
+ const armR = inIns ? -128 : -112 - 8 * up;
+ vis(st.me.g, is('wide', 'ins', 'trio', 'med'));
+ st.me.pose({ x: STALL.me, y: STALL.ground, s: STALL.s, look: is('med') ? .1 : -.4, eyeX: is('med') ? 1 : startled ? -1 : reading, eyeY: .55, lids: .3, headR: -3,
+ mouth: startled || inIns ? 'flat' : chew(q), shut: blink(1.2, 5.3, 8.4, 9.9), hold: a >= 1.1 ? 'bite' : 'bun', holdL: !stained ? 'hw' : a < S2.plop + .2 ? 'hwS' : 'hwG',
+ armL: -52, armR, bob: inIns || startled ? 0 : -1.5 * up }, f);
+ // the drop falls from the bun onto the sheet
+ vis(drop, dripping && inIns);
+ if (dripping) { const u = (a - S2.drop) / (S2.plop + .05 - S2.drop);
+ tf(drop, `translate(${(482 - 18 * u).toFixed(1)},${(652 + 37 * u * u).toFixed(1)}) scale(${(1 + .3 * Math.min(1, u * 3)).toFixed(2)})`); }
+ // Bo: waits; looks at the dog; the idea (a beat of silence); "Can I rent your dog?" pointing at it; hand down
+ const ask = lips(q, 'scene2', PRE2, 's05');
+ const point = a >= S2.med - .1 && a < 9.4 ? ease((a - S2.med + .1) / .25) * (1 - ease((a - 9.1) / .3)) : 0;
+ const boIdea = a >= 6.5 && a < S2.med;
+ vis(st.bo.g, is('wide', 'trio', 'boST', 'med'));
+ const dogLook = a >= 4.4;
+ st.bo.pose({ x: STALL.bo, y: STALL.ground, s: STALL.s, look: is('boST') ? .5 : dogLook ? .7 : -.5, eyeX: dogLook ? 1 : -1, eyeY: dogLook ? .8 : 0,
+ lids: boIdea ? 0 : .2, brow: boIdea ? .5 : 0, headR: is('boST') ? 2 : 3 * point,
+ mouth: boIdea && a > 6.95 ? 'smile' : ask === 'X' ? 'flat' : ask, shut: blink(2.1, 4.0, 6.2, 8.4, 10.6),
+ armR: 14 + 36 * point - (point ? 0 : 14), bob: 0 }, f);
+ // the seller, deadpan, palm out toward Bo for the five yuan
+ const price = lips(q, 'scene2', PRE2, 's05b');
+ vis(st.aunt.g, is('wide', 'med', 'auntCU', 'trio'));
+ st.aunt.pose({ ...STALL.aunt, look: -.5, eyeX: -1, lids: .35, mouth: price === 'X' ? 'flat' : price, shut: blink(3.0, 7.6, 11.0, 12.2), armL: 0 }, f);
+ vis(palm, a >= 9.7 && a < 12.6 && is('med', 'auntCU')); tf(palm, `translate(0,${(34 * (1 - ease((a - 9.7) / .3))).toFixed(1)})`);
+ // the dog: asleep, breathing; sniffs toward Me in its sleep (insert); after the price wakes: eye opens, head up, then it rises
+ vis(dogS.g, is('wide', 'trio', 'med', 'dogST'));
+ const sn = a >= S2.sniffD && a < S2.sniffD + .8, rise0 = 12.35, u = ease((a - rise0) / .45);
+ const dg = { ...DOG_STALL, dir: -1, lie: 1, bob: .9 * Math.sin(a * 2.2), lids: .8, eyeX: -.6 };
+ if (sn) Object.assign(dg, { sniff: true, headR: 20 * ease((a - S2.sniffD) / .25) * (1 - ease((a - S2.sniffD - .55) / .25)), ear: 8 * Math.sin((a - S2.sniffD) * 14) });
+ if (a >= 11.2) Object.assign(dg, { headR: 10 * ease((a - 11.2) / .7), ear: 8 * ease((a - 11.2) / .7) }); // heard the price
+ if (a >= 12.0) Object.assign(dg, { lie: 'awake', lids: .8 - .4 * ease((a - 12.0) / .3), headR: 14, tail: 8 * Math.sin((a - 12.0) * 16) }); // one eye, the tail thumps
+ if (a >= rise0) Object.assign(dg, { lie: 1 - u, sit: u, bob: .3 * Math.sin(a * 2.2), headR: 14 - 6 * u, shut: false, lids: .4, tail: 6, wag: a >= rise0 + .9 && a < rise0 + 1.6 });
+ dogS.pose(dg, f);
+ }
+
+ /* ---- the teacher ---- */
+ if (inTeach) {
+ const l = lips(q, 'scene2', PRE2, 's06', 's07');
+ tc.t.pose({ ...TEACHER, look: 0, eyeX: 0, lids: .45, mouth: l === 'X' ? 'flat' : l, shut: blink(14.0, 14.6, 20.9, 21.9, 22.6, 25.8), headR: shot === 'tcu' ? 1 : 0 }, f);
+ }
+
+ /* ---- the boys' desk ---- */
+ if (inClass) {
+ const full = is('two', 'tight', 'gulp');
+ // --- Bo: stands, ducks under the desk, lifts the dog, presents it with open palms ("Exhibit A."), fetches his blank sheet ---
+ const ex = lips(q, 'scene2', PRE2, 's06b');
+ const duckA = ease((a - S2.duck) / (S2.down - S2.duck)) * (1 - ease((a - S2.rise) / (S2.over - S2.rise)));
+ const duckB = ease((a - S2.fetch) / .22) * (1 - ease((a - S2.back) / .25));
+ const dep = 110 * duckA + 110 * duckB;
+ const bo = { ...c.BO_UP, y: c.BO_UP.y + dep, sit: dep > 30, look: -.7 + .5 * (a > S2.land), eyeX: -1, lids: .15, mouth: ex === 'X' ? 'flat' : ex, shut: blink(16.7, 19.5, 24.6, 25.2),
+ brow: 0, hold: null, headR: 0, armL: 0, armR: 0 };
+ // the lift: both hands under the dog, which rises from behind the desk, goes over it and is set down
+ const dogX = 880;
+ let feet = 900, hands = false;
+ if (a >= S2.rise && a < S2.over) { const u = ease((a - S2.rise) / (S2.over - S2.rise)); feet = 860 + (686 - 860) * u; hands = true; }
+ else if (a >= S2.over && a < S2.land) { const u = ease((a - S2.over) / (S2.land - S2.over)); feet = 686 + (DOG_DESK.y - 686) * u; hands = true; }
+ else if (a >= S2.land) feet = DOG_DESK.y;
+ const sh = side => [c.BO.x + (side === 'L' ? -54 : 54), c.BO_UP.y + dep - 146];
+ handsPR.forEach(h => vis(h, false));
+ if (hands) {
+ const belly = feet - 42, hx = a < S2.over ? 860 : 860 + 20 * ease((a - S2.over) / (S2.land - S2.over));
+ const rl = s2reach(...sh('L'), hx - 30, belly, 'L'), rr = s2reach(...sh('R'), hx + 50, belly, 'R');
+ bo.armL = rl.arm; bo.armR = rr.arm;
+ [[handsPR[0], rl], [handsPR[1], rr]].forEach(([h, r]) => { vis(h, feet < 770); tf(h, `translate(${r.hx.toFixed(1)},${r.hy.toFixed(1)}) rotate(${r.th.toFixed(1)})`); });
+ }
+ if (a >= S2.duck && a < S2.rise) bo.lids = .3;
+ if (a >= S2.land) {
+ // let go; on "Exhibit A." both palms open toward the dog; then down under the desk for the blank sheet (after "A.")
+ const pa = ease((a - S2.present) / .3) * (1 - ease((a - S2.fetch) / .2));
+ bo.armL = 6 + 42 * pa; bo.armR = 6 + 42 * pa; bo.headR = 3 * pa;
+ if (a >= S2.back) { bo.hold = 'bhw'; bo.armR = 6 - 36 * ease((a - S2.raise) / .35); bo.armL = 6; }
+ if (a >= S2.tight3 - .3) { bo.brow = .5 * ease((a - S2.tight3 + .3) / .3); bo.look = -.5; bo.mouth = 'O'; bo.armR = -30 + 36 * ease((a - S2.tight3 - .3) / .4); }
+ }
+ vis(c.bo.g, is('two', 'tight', 'gulp', 'insBlank', 'boCU', 'dogCU')); c.bo.pose(bo, f);
+
+ // --- Me: the greasy sheet in his left hand, in front of his chest, the mitten under its corner ---
+ const T = S2.chomp, cnt = T.filter(t => a >= t).length; // bites finished (the sheet changes on the frame the jaw closes)
+ const eaten = cnt >= 3;
+ const holdL = eaten ? 'scrap' : ['hwG', 'e1', 'e2'][cnt];
+ const fear = ease((a - (S2.meCU2 - .3)) / .3) * (a < 31.9 ? 1 : 1 - ease((a - 31.9) / .5) * .5);
+ const scared = a >= S2.meCU2 - .3;
+ const meLook = a < S2.rise ? .3 : a < S2.back ? .6 : a < S2.tcu ? .3 : .6;
+ const me = { ...c.ME, sit: true, look: scared ? .6 : meLook, eyeX: scared ? 1 : a < S2.land ? .8 : a < S2.dogCU2 ? .4 : 1, eyeY: .3,
+ lids: .38 - .38 * fear * (a < S2.meCU3 ? 1 : .6), brow: .8 * fear, mouth: fear > .6 ? 'O' : fear > .2 ? 'B' : 'flat', headR: -3 * fear,
+ shut: blink(16.4, 21.2, 26.2, 27.0, 31.8, 33.0) && fear < .3, holdL, hold: null, armL: -62, armR: 0, squash: fear > .5 && a < S2.tight3 ? .03 : 0 };
+ if (a >= S2.meCU3) Object.assign(me, { armL: -70, lids: .15, brow: .5, mouth: a < S2.meCU3 + .8 ? 'O' : 'flat', shut: blink(33.1) });
+ vis(c.me.g, is('two', 'tight', 'gulp', 'meCU', 'pan', 'insBite', 'dogCU')); c.me.pose(me, f);
+
+ // --- the dog ---
+ const dogP = { ...DOG_DESK, x: dogX, dir: 1, bob: .5 * Math.sin(a * 2.4), tail: 5, ear: 3 * Math.sin(a * 1.7) + 4 * (blinking(q, [A2(21.0), A2(24.0)]) ? 1 : 0), shut: blink(21.5, 24.0, 28.4, 31.7), lids: .1, eyeX: 0, y: feet };
+ vis(dogC.g, a >= S2.rise && is('two', 'tight', 'gulp', 'insBlank', 'dogCU', 'pan', 'insBite'));
+ // behind the desk while it is lifted over it, in front of it once it is clear
+ const onTop = a >= S2.over;
+ if (onTop !== dogL._top) { dogL._top = onTop; if (onTop) cc.stage.appendChild(dogL); else cc.stage.insertBefore(dogL, deskG); }
+ if (a >= S2.rise) { // carried: head down, tail drooping, ears back; eased out as it is set down
+ const w = 1 - ease((a - S2.land) / .4);
+ Object.assign(dogP, { headR: -8 * w, tail: 5 - 27 * w, ear: 14 * w, eyeX: .6 * w, lids: .1 + .2 * w });
+ if (a >= S2.land && a < S2.land + .4) dogP.y = DOG_DESK.y + 5 * Math.sin(Math.PI * (a - S2.land) / .4);
+ if (a >= S2.present && a < S2.fetch) Object.assign(dogP, { headR: 8, eyeX: 0 }); // presented: head up, facing the class
+ }
+ // sniffs Bo's blank sheet (nose on the paper), then snubs it: nose in the air, eyes half shut, a "hmph" blink, a step back
+ if (a >= S2.insBlank - .4 && a < S2.tight2) Object.assign(dogP, { sniff: a >= S2.insBlank, headR: 14 + 3 * Math.sin((a - S2.insBlank) * 18), eyeX: 1, x: dogX + 14 * ease((a - S2.insBlank + .4) / .4) });
+ if (a >= S2.tight2) { const u = ease((a - S2.tight2) / .4);
+ Object.assign(dogP, { headR: 14 + 22 * u, lids: .1 + .5 * u, eyeX: 1 - 2 * u, x: dogX + 14 - 24 * u, tail: 5 - 5 * u, shut: a >= S2.tight2 + .45 && a < S2.tight2 + .7 }); }
+ // close-up: the nose twitches, the head rises, then the whole dog turns toward Me in six steps while stepping over
+ if (a >= S2.dogCU2 && a < S2.turn) Object.assign(dogP, { sniff: true, headR: 36 - 22 * ease((a - S2.dogCU2) / .4), lids: .6 - .5 * ease((a - S2.dogCU2) / .5), eyeX: -.4, x: dogX - 10 });
+ const REST = 830;
+ if (a >= S2.turn) {
+ const t = (a - S2.turn) / .5, seq = [1, .7, .35, -.35, -.7, -1];
+ dogP.dir = seq[Math.max(0, Math.min(5, Math.floor(t * 6)))];
+ Object.assign(dogP, { headR: 14, lids: .1, eyeX: 1, sniff: a < S2.pan + .9, x: (dogX - 10) + (REST - dogX + 10) * ease(t), bob: .5 * Math.sin(a * 2.4) - 4 * Math.sin(Math.PI * Math.min(1, Math.max(0, t))) });
+ }
+ // the three bites: head back, then jaw wide and a lunge at the sheet's right edge, closing on it; held, then back for a beat
+ const TIP = [684, 662, 638];
+ let lunge = REST, jaw = 0, head = 4;
+ if (a >= S2.insBite - .3) {
+ for (let k = 0; k < 3; k++) {
+ const t = T[k], x = TIP[k] + 105;
+ if (a >= t - .3 && a < t) { const u = ease((a - (t - .3)) / .22); jaw = .8 * u; lunge = (k ? TIP[k - 1] + 105 + 28 : REST) + (x - (k ? TIP[k - 1] + 105 + 28 : REST)) * u; head = -2; }
+ else if (a >= t && a < t + .15) { lunge = x; jaw = 0; head = -2; }
+ else if (a >= t + .15 && a < t + .3) { lunge = x + (k < 2 ? 28 : REST - x) * ease((a - t - .15) / .15); head = -2 + 6 * ease((a - t - .15) / .15); }
+ }
+ if (a >= T[2] + .3) lunge = REST;
+ dogP.x = lunge; dogP.jaw = jaw; dogP.headR = head; dogP.lids = .1; dogP.eyeX = 1; dogP.sniff = false;
+ if (a >= T[0] - .3 && a < T[2] + .3 && jaw === 0 && !(T.some(t => a >= t && a < t + .15))) dogP.jaw = .2 * (onTwos(q) > 0); // chewing between bites
+ if (a >= T[2] + .3) { dogP.jaw = a < S2.gulp - .1 ? .22 * (onTwos(q) > 0) : 0; dogP.headR = 4; dogP.lids = .3; }
+ if (a >= S2.gulp - .1 && a < S2.gulp + .45) { const g = Math.sin(Math.PI * ease((a - S2.gulp + .1) / .55)); dogP.headR = 4 + 16 * g; dogP.bob = (dogP.bob || 0) - 3 * g; }
+ if (a >= S2.gulp + .6) { dogP.wag = true; dogP.tail = 14; dogP.headR = 2; dogP.eyeX = 1; }
+ dogP.dir = -1;
+ }
+ dogP.glasses = false;
+ dogC.pose(dogP, f);
+
+ // the class: heads turn toward the dog once it comes up; only the wider shots show them
+ for (const m of c.mates) vis(m.p.g, full);
+ if (full) { if (a >= S2.rise) c.matesPose(q, f, { lookAt: 800, t0: A2(S2.rise + .3) }); else c.matesPose(q, f); }
+ }
+ });
+}
diff --git a/site/joke-collection/ch04/scene3.js b/site/joke-collection/ch04/scene3.js
new file mode 100644
index 0000000..6c3bd83
--- /dev/null
+++ b/site/joke-collection/ch04/scene3.js
@@ -0,0 +1,131 @@
+/* scene3.js — 转, the victim. Teacher close-up "And yours?"; Me close-up, lip trembling, his eyes slide off to the dog; the
+ dog close-up (a scrap of homework at its mouth corner: the evidence); Me close-up, "The dog ate it."; a half-wide where the
+ front rows turn to stare at Me; the dog's burp in close-up; Bo sits; teacher close-up "Of course he did. Detention.";
+ "All three of you." cuts to the two-shot where Me droops, Bo rolls his eyes and the dog's ears fall and it lies down;
+ a tighter two-shot for Bo's whisper and Me's shout; the dog sits up and licks its lips. No music in this scene. */
+'use strict';
+const PRE3 = .3; // scene 2 ends on Me's close-up, so we cut straight to the teacher
+
+/* ---------- cues (beat-clock seconds = PRE3 + audio time) ---------- */
+const S3 = { me: 1.6, dogCU: 3.3, me2: 4.1, half: 6.0, turn: 6.15, burp: 7.1, half2: 7.8, bosit: 7.95, tchr: 9.0, look: 13.9, two: 14.55,
+ tight: 16.0, yell: 21.15, lick: 22.75, lick2: 23.95 };
+sfx('scene3', S3.burp, 'burp');
+sfx('scene3', S3.bosit, 'chair');
+sfx('scene3', S3.lick, 'lick');
+sfx('scene3', S3.lick2, 'lick', .8);
+
+const S3SCRAP = `<g transform="translate(-4,6) rotate(-25) scale(1.7)">${scrapSVG}</g>`; // hangs from the corner of the mouth
+
+function scene3(p, D) {
+ const c = classroom(p), cam = c.cam;
+ const dog = dogPuppet(cam.stage, { holds: { scrap: S3SCRAP, scrap2: `<g transform="scale(.55)">${S3SCRAP}</g>` } });
+ const tc = teacherSet(p), tcam = tc.cam;
+ const DOGX = 830; // a little left of DOG_DESK: its head in the gap, its body not only on Bo
+ const ME_CU = { x: 680, y: 570, z: 2.8 }, DOG_CU = { x: 765, y: 655, z: 5 }, HALF = { x: 800, y: 560, z: 1.35 }, TIGHT = { x: 800, y: 590, z: 2.5 };
+ cam.cut(ME_CU, 0).soft(0, true).cut(DOG_CU, S3.dogCU).cut(ME_CU, S3.me2).cut(HALF, S3.half).soft(S3.half, false)
+ .cut(DOG_CU, S3.burp).soft(S3.burp, true).cut(HALF, S3.half2).soft(S3.half2, false).cut(TWO, S3.two).cut(TIGHT, S3.tight)
+ .to({ ...TIGHT, z: 2.7 }, S3.tight, 6); // a slow push-in on the whisper and the shout
+ tcam.cut(TEACH_CU, 0).soft(0, true);
+ // a manga anger mark at Me's temple for the shout (his hair hides his brows)
+ const mark = prop(cam.stage, '<g stroke="#d8322c" stroke-width="7" fill="none" stroke-linecap="round" filter="url(#paper)"><path d="M-16,-6 Q-6,-6 -6,-16 M6,-16 Q6,-6 16,-6 M16,6 Q6,6 6,16 M-6,16 Q-6,6 -16,6"/></g>');
+
+ stopClock(D, (q, f) => {
+ const teach = q < S3.me || between(q, S3.tchr, S3.two);
+ const dogCU = between(q, S3.dogCU, S3.me2) || between(q, S3.burp, S3.half2);
+ const meCU = between(q, S3.me, S3.dogCU) || between(q, S3.me2, S3.half);
+ const half = between(q, S3.half, S3.burp) || between(q, S3.half2, S3.tchr), two = q >= S3.two, tight = q >= S3.tight;
+ vis(tcam.root, teach); vis(cam.root, !teach);
+ cam.apply(q, f); tcam.apply(q, f);
+ const A = (...cl) => { const m = lips(q, 'scene3', PRE3, ...cl); return m === 'X' ? 'flat' : m; };
+
+ // the teacher, deadpan: eyes slide to Me on "yours"; "Of course he did" the lids sink a little more; "Detention." a
+ // small drop of the head; then her eyes go down to the dog for "All three of you"
+ const tT = { ...TEACHER, lids: .45, mouth: A('s08', 's10'), shut: blinking(q, [1.3, 3.4, 11.4, 13.1, 15.6]), headR: 0 };
+ if (q < S3.me) Object.assign(tT, { look: -.55 * span(q, .35, .6), eyeX: q > .4 ? -1 : 0, headR: -2 * span(q, .35, .6) });
+ else {
+ Object.assign(tT, { look: -.55, eyeX: -1, headR: -2 });
+ if (q > 9.7) tT.lids = .55;
+ if (q >= 12.2) { tT.headR = -2 - 2.5 * span(q, 12.2, 12.35); tT.lids = .6; } // "Detention."
+ if (q >= S3.look) Object.assign(tT, { eyeY: .8 * span(q, S3.look, S3.look + .2), headR: -4, lids: .55, look: -.4 });
+ }
+ tc.t.pose(tT, f);
+
+ /* Me: the lips tremble, the eyes dart and fall on the dog; then "The dog ate it." (brow > 0 is worried) */
+ const me = { ...c.ME, sit: true, look: .7, eyeX: .8, lids: 0, brow: .3, mouth: 'flat', armL: -50, armR: -70, // hands kept in front, under the desk's edge
+ shut: blinking(q, [2.05, 2.75, 4.35, 5.5, 8.6, 13.7, 22.4]) };
+ if (between(q, S3.me, S3.dogCU)) { // silence: wide eyes, trembling mouth, a drift of the eyes, then he looks down at the dog
+ const g = span(q, 2.95, 3.15);
+ Object.assign(me, { look: 0, eyeX: q < 2.3 ? 0 : q < 2.7 ? -.5 : q < 2.95 ? .3 : 1, eyeY: q > 2.3 && q < 2.7 ? .3 : g * .5, lids: q > 2.2 && q < 2.4 ? .3 : 0, brow: .5 + .2 * Math.sin(q * 7),
+ headR: 1.2 * Math.sin(q * 9) + 3 * g, mouth: 'wobble', squash: q > 2.6 && q < 2.8 ? .02 : 0 });
+ } else if (meCU) { // he looks back at the camera, braces, and says it
+ Object.assign(me, { look: 0, eyeX: q < 4.5 ? -.2 : 0, lids: q < 4.5 ? .25 : 0, brow: q < 4.6 ? .3 : .75, headR: q > 4.6 ? 2 : 0,
+ mouth: q > 4.5 && q < 5.8 ? A('s09') : 'wobble', armR: -70 });
+ if (q >= 5.8) Object.assign(me, { mouth: 'flat', lids: .2, brow: .6, eyeX: .3 });
+ } else if (half) { // the whole class stares: he looks along the row, then down
+ Object.assign(me, { look: q < 7.1 ? .5 * Math.sin(q * 2) : 0, eyeX: q < 6.9 ? .8 : q < 7.5 ? -.8 : 0, eyeY: .3, lids: .1, mouth: 'wobble', brow: .5, headR: 1.2 * Math.sin(q * 8) });
+ }
+ if (q >= S3.tchr) Object.assign(me, { look: .6, eyeX: .8, lids: .25, brow: .5, mouth: 'flat' });
+ if (two) {
+ const talk = A('s11b'), yell = q >= S3.yell, k = span(q, S3.two, S3.two + .5);
+ if (q < S3.tight) Object.assign(me, { look: 0, eyeX: 0, eyeY: .8 * k, lids: .35, brow: .6, headR: 5 * k, mouth: 'frown', squash: .03 * k }); // "All three of you": his head drops
+ else Object.assign(me, { look: .2, eyeX: 0, eyeY: 0, lids: .4, brow: .5, headR: 0, mouth: 'frown', squash: 0 }); // mortified, staring ahead
+ if (q >= 20.4 && q < S3.yell) Object.assign(me, { look: .7 * span(q, 20.4, 20.8), eyeX: .8, lids: .3, brow: -.4, mouth: 'flat' }); // slowly turns on Bo
+ if (yell) { // his hair hides his brows, so the anger is in the narrowed eyes, the lean toward Bo and the wide mouth
+ const sh = talk !== 'flat', wide = talk === 'A' ? 'G' : onTwos(q) > 0 ? 'grin' : 'G', k = span(q, S3.yell - .1, S3.yell + .15);
+ Object.assign(me, { x: me.x + 22 * k, look: .8, eyeX: 1, lids: .3, brow: -.9, mouth: sh ? wide : 'frown', headR: 4 * k + 2.5 * onTwos(q), armR: sh ? 30 : 18, armL: sh ? 50 : -50, squash: sh ? .03 : 0 });
+ }
+ if (q >= 22.6) Object.assign(me, { x: me.x + 22 * (1 - span(q, 22.6, 23)), lids: .4, brow: -.3, mouth: 'flat', headR: 2, armR: 10, armL: -50, squash: 0 });
+ }
+ const shout = between(q, S3.yell, 22.6);
+ vis(mark, shout); if (shout) tf(mark, `translate(${(me.x + 112).toFixed(0)},474) scale(${(1.5 + .25 * onTwos(q)).toFixed(2)})`);
+ vis(c.me.g, !teach); c.me.pose(me, f);
+
+ /* Bo: stands (scene 2 left him up), sits as the class stares, rolls his eyes at "All three", whispers to Me */
+ const sit = q >= S3.bosit + .22, down = span(q, S3.bosit, S3.bosit + .22);
+ const bo = { ...(sit ? c.BO : { ...c.BO_UP, y: c.BO_UP.y + 64 * down }), sit, look: 0, eyeX: 0, lids: .15, brow: .2, shut: blinking(q, [.9, 4.1, 9.3, 12.8, 15.2, 18.9, 20.3]) };
+ if (half && !sit) Object.assign(bo, { look: -.5, eyeX: -.8, mouth: between(q, 6.3, 6.75) || between(q, 7.3, 7.8) ? 'O' : q > 6.75 && q < 7.3 ? 'frown' : 'flat', brow: .4, shut: blinking(q, [6.8, 7.0]) });
+ if (sit) Object.assign(bo, { lids: .3, mouth: 'flat', look: -.2, eyeX: -.5 });
+ if (two) {
+ const w = A('s11'), k = span(q, S3.two, S3.two + .5);
+ if (q < S3.tight) Object.assign(bo, { look: 0, eyeX: 0, eyeY: -.9 * Math.min(1, k * 2) * (q < 15.5 ? 1 : 0), lids: .5, mouth: 'flat', brow: 0, headR: 3 * k }); // eyes roll up
+ else Object.assign(bo, { look: -.7, eyeX: -1, eyeY: 0, lids: .2, mouth: w, headR: -3 * span(q, S3.tight, S3.tight + .4), brow: w !== 'flat' ? .3 : 0 });
+ if (q > 20.5 && q < S3.yell) Object.assign(bo, { mouth: 'flat', lids: .2, look: -.7, brow: .3 });
+ if (q >= S3.yell) { const k = span(q, S3.yell, S3.yell + .2); Object.assign(bo, { x: bo.x + 16 * k, look: -.6, eyeX: -1, lids: 0, brow: .8, mouth: 'O', headR: 4 * k, squash: .02 * k }); } // flinches back, eyes on Me // taken aback by the shout
+ if (q >= 22.7) Object.assign(bo, { x: bo.x + 16 * (1 - span(q, 22.7, 23.1)), look: -.1, eyeX: .2, eyeY: .7, lids: .35, brow: .2, headR: 0, mouth: 'flat', squash: 0 }); // eyes down at the dog
+ }
+ vis(c.bo.g, !teach && !meCU); c.bo.pose(bo, f);
+
+ // the class turns to look at Me (a staggered snap)
+ for (const m of c.mates) vis(m.p.g, half || two);
+ if (half || two) for (const m of c.mates) { // each pupil blinks on their own rhythm (0.17 s, never stuck) and glances about; in the half-wide they turn to Me
+ const per = 2.7 + (m.k % 5) * .45, shut = ((q + m.k * 1.13) % per) < .17, own = (q * .23 + m.k * .37) % 1;
+ let look = own < .12 ? (m.k % 2 ? .5 : -.5) : 0, eyeX = look;
+ if (half && q >= S3.turn + (m.k % 4) * .09) { look = Math.max(-1, Math.min(1, (680 - m.x) / 400)); eyeX = Math.sign(680 - m.x); }
+ m.p.pose({ x: m.x, y: m.y, s: m.s, sit: true, look, eyeX, shut }, f);
+ }
+
+ /* the dog: stands on the desk facing Me with a scrap at its mouth, licking; burps; sits sheepish; at "All three of you" its
+ ears fall and it lies down; the shout makes it sit up, and it licks its lips */
+ vis(dog.g, dogCU || half || two);
+ const burpU = span(q, S3.burp, S3.burp + .7), burp = between(q, S3.burp, S3.burp + .7), lick = q >= S3.lick && (between(q, S3.lick, S3.lick + .6) || q >= S3.lick2 && q < S3.lick2 + .6);
+ // sit and lie ease (0…1); the shout throws it upright with a hop
+ const lieV = ease(span(q, 15.2, 15.65)) * (1 - ease(span(q, S3.yell - .1, S3.yell + .12)));
+ const sitV = ease(span(q, 7.75, 8.1)) * (1 - lieV), hop = 16 * Math.sin(Math.PI * span(q, S3.yell - .1, S3.yell + .3));
+ const d = { ...DOG_DESK, x: DOGX + 22 * ease(span(q, S3.yell - .1, S3.yell + .2)), y: DOG_DESK.y - hop, dir: -1, bob: .8 * Math.sin(q * 3.1), tail: 10 + 30 * sitV + 60 * lieV, wag: q > 2 && q < 6.6, ear: 3 * Math.sin(q * 1.7),
+ shut: blinking(q, [1.2, 5.5, 8.9, 17.5, 20.1]), hold: q < 6.7 ? 'scrap' : q < 6.95 ? 'scrap2' : null, eyeX: .5, sit: sitV, lie: lieV > .999 ? 'awake' : lieV };
+ if (dogCU && q < S3.me2) Object.assign(d, { tongue: onTwos(q) > 0 && q % 1 > .3, jaw: .12 + .06 * onTwos(q), headR: 5 + 2 * Math.sin((q - S3.dogCU) * 6), lids: .25, ear: 8 + 3 * onTwos(q), tail: 14, wag: true, eyeX: -.5,
+ shut: false, bob: 1.2 * Math.sin(q * 5) }); // chewing the scrap, pleased with itself
+ if (half && q < S3.burp) Object.assign(d, { jaw: .1 * (onTwos(q) > 0 && q < 6.95), tail: 12, wag: false }); // chews the last of it
+ if (q >= 6.95 && q < S3.burp) Object.assign(d, { bob: 3 * span(q, 6.95, S3.burp), headR: -3 * span(q, 6.95, S3.burp) }); // gulps it down, then air
+ if (burp) Object.assign(d, { headR: 14 * Math.sin(Math.PI * burpU), jaw: .55 * (q < S3.burp + .5), bob: -4 * Math.sin(Math.PI * span(q, S3.burp, S3.burp + .5)), lids: .45, wag: false, tail: 12 });
+ if (q >= S3.half2) Object.assign(d, { wag: false, eyeX: -.5, lids: .3 });
+ if (two) { // ears fall, then it lies down (awake: sulking)
+ const k = span(q, S3.two, S3.two + .6);
+ Object.assign(d, { ear: -16 * k, headR: -10 * k * (1 - lieV), lids: .55, wag: false, shut: lieV > .999 ? false : blinking(q, [17.5]), bob: .6 * Math.sin(q * 2) });
+ }
+ if (q >= S3.yell - .1) Object.assign(d, { shut: false, lids: 0, ear: 16 * span(q, S3.yell - .1, S3.yell + .1) * (q < S3.yell + .8 ? 1 : 0), headR: 5 * span(q, S3.yell - .1, S3.yell + .1), tail: 20, eyeX: .3 }); // startled
+ if (q >= 22.5) Object.assign(d, { ear: 2, lids: .3, headR: 4, tail: 36, wag: q > 24.4 });
+ if (lick) Object.assign(d, { tongue: true, jaw: .12 + .1 * (onTwos(q) > 0), headR: 7, lids: .3 });
+ dog.pose(d, f);
+ });
+}
diff --git a/site/joke-collection/ch04/scene4.js b/site/joke-collection/ch04/scene4.js
new file mode 100644
index 0000000..26fc8dc
--- /dev/null
+++ b/site/joke-collection/ch04/scene4.js
@@ -0,0 +1,136 @@
+/* scene4.js — 合, what we learned. Detention at dusk (wide, the clock, in silence), Me's sincere speech turned to Bo
+ (slow push-in, a dog insert, Bo's welling eyes, "Dude. That's beautiful."), then the next-morning tag: the teacher
+ asks with empty hands, the dog already sits between the boys in glasses with a pencil, Bo hands the sheet over, an
+ insert of the perfect homework, "Bo… it's perfect.", "The dog did it." and a snap push-in to the dog, title card.
+ Speech starts PRE4 s in (3 s of silent detention). */
+'use strict';
+const PRE4 = 3.0;
+const S4 = {
+ clock: 1.0, two0: 2.1, // wide, insert of the clock, then the two-shot
+ me: PRE4, // Me close-up, speech starts (first word at 3.1)
+ dogIn: 6.45, meBack: 7.55, // insert of the dog on "dog", then Me again, turned to Bo
+ bo: 11.05, // Bo close-up, listening (Me's speech ends 11.03)
+ tagT: 16.4, // next morning: the teacher asks (music off from here)
+ give: 18.35, // the two-shot: Bo hands the sheet over
+ holds: 19.5, ins: 20.1, cu: 21.5, // the teacher holds it, insert of the sheet, her close-up for "It's perfect"
+ two: 24.6, dog: 25.97, card: 28.4, // the two-shot again; snap push to the dog; title card
+};
+window.MUSIC_OFF = { ...(window.MUSIC_OFF || {}), scene4: t => t < PRE4 + .05 || t >= S4.tagT }; // silent clock-ticks, music from Me's first word, off again for the tag
+for (let t = .4; t < PRE4 - .2; t++) sfx('scene4', t, 'tick', .6);
+sfx('scene4', S4.dog - .08, 'whoosh');
+sfx('scene4', S4.card, 'sting');
+
+const s4tearSVG = '<g filter="url(#paper)"><path d="M0,-12 Q10,4 0,10 Q-10,4 0,-12 Z" fill="#8fc6f0" stroke="#4f8fc4" stroke-width="2"/></g>';
+// title card: cut-paper letters on construction paper (same as episode 1's)
+function s4cardSVG() {
+ const cols = ['#f4e9c8', '#f2c14e', '#e8715a', '#7cc08a', '#6aa6d8'], lines = [['The Dog', 150], ['Ate My', 150], ['Homework', 150]];
+ let n = 0, out = '<g filter="url(#paper)"><rect width="1600" height="900" fill="#2e3b5a"/></g>' +
+ '<g filter="url(#paper)" transform="rotate(-1.2 800 450)"><rect x="140" y="90" width="1320" height="720" rx="14" fill="#e9b872"/><rect x="170" y="120" width="1260" height="660" rx="8" fill="#f3d79f"/></g>';
+ const ys = [320, 500, 700], sizes = [170, 170, 190];
+ lines.forEach(([txt], li) => {
+ // each letter's width, so wide letters (m, w) don't crowd and narrow ones (r) don't leave gaps
+ const sz = sizes[li], wid = ch => sz * ({ m: .86, w: .86, M: .86, W: .9, r: .46, t: .46, ' ': .4 }[ch] || .62);
+ const xs = []; let acc = 0; for (const ch of txt) { xs.push(acc + wid(ch) / 2); acc += wid(ch); }
+ const x0 = 800 - acc / 2;
+ [...txt].forEach((ch, i) => {
+ if (ch === ' ') { n++; return; }
+ const rot = ((n * 37) % 11 - 5) * 1.3, dy = ((n * 53) % 7 - 3) * 4, c = cols[n % cols.length]; n++;
+ const x = x0 + xs[i], y = ys[li] + dy;
+ out += `<g filter="url(#paper)" transform="translate(${x},${y}) rotate(${rot})"><text text-anchor="middle" font-family="Arial Black, Impact, Helvetica, sans-serif" font-weight="900" font-size="${sz}" fill="${c}" stroke="#3a2a1c" stroke-width="9" stroke-linejoin="round" paint-order="stroke">${ch}</text></g>`;
+ });
+ });
+ return out;
+}
+const s4blinks = (a, gap, to) => { const o = []; for (let t = a; t < to; t += gap) o.push(+t.toFixed(2)); return o; };
+
+
+// the perfect sheet as the teacher holds it: her glove grips the bottom edge, in front of the paper
+const s4hold = hwSVG({ perfect: true, paw: true }) + '<g filter="url(#paper)"><circle cx="0" cy="-6" r="17" fill="#f2efe6"/><ellipse cx="-13" cy="-16" rx="7" ry="10" fill="#f2efe6"/></g>';
+const s4give = hwSVG({ perfect: true, paw: true, name: 'Bo' }) + '<g filter="url(#paper)"><circle cx="0" cy="-5" r="14" fill="#f2efe6"/></g>';
+
+function scene4(p, D) {
+ const room = classroom(p, { hw: s4give }), cam = room.cam, { me, bo, mates } = room;
+ const dog = dogPuppet(cam.stage, { holds: { pencil: pencilSVG } });
+ const tr = teacherSet(p, { hw: s4hold }), tcam = tr.cam, teacher = tr.t;
+ const WIDE = { x: 800, y: 450, z: 1 }, ME_CU = { x: 680, y: 575, z: 2.8 }, BO_CU = { x: 920, y: 548, z: 3 }, DOG_CU = { x: DOG_DESK.x - 50, y: 640, z: 3.4 };
+ const TW = { x: 1200, y: 520, z: 1.9 }; // the teacher, bun and all
+ // the sheet in her hand: where the camera goes for the insert (hand of the right arm, the sheet standing above it)
+ const T_ARM = 25, tHand = [TEACHER.x + teacher.S.sx + 72 * -Math.sin((-24 - T_ARM) * Math.PI / 180), TEACHER.y + teacher.S.sy + 72 * Math.cos((-24 - T_ARM) * Math.PI / 180)];
+ // classroom: wide / two-shot at dusk; Me close-up pushing in, the dog insert, Me again; Bo close-up;
+ // morning two-shot, then snap push to the dog
+ cam.cut(WIDE, 0).cut(TWO, S4.two0).cut(ME_CU, S4.me).soft(S4.me, true).to({ z: 3.0 }, S4.me, S4.dogIn - S4.me)
+ .cut({ ...DOG_CU, y: 660, z: 3.3 }, S4.dogIn).to({ z: 3.5 }, S4.dogIn, S4.meBack - S4.dogIn)
+ .cut({ ...ME_CU, z: 3.0 }, S4.meBack).to({ z: 3.25 }, S4.meBack, S4.bo - S4.meBack)
+ .cut(BO_CU, S4.bo).to({ z: 3.15 }, S4.bo, S4.tagT - S4.bo)
+ .cut(TWO, S4.give).soft(S4.give, false).cut(TWO, S4.two).to(DOG_CU, S4.dog, .15).soft(S4.dog, true).to({ z: 3.6 }, S4.dog + .2, 2.2);
+ // the teacher camera: the clock, then her wide, the sheet in her hand, the insert, her close-up
+ tcam.cut({ x: 800, y: 170, z: 3 }, 0).cut(TW, S4.tagT).cut(TW, S4.holds)
+ .cut({ x: tHand[0] - 14, y: tHand[1] - 56, z: 5.0 }, S4.ins).to({ z: 5.5 }, S4.ins, S4.cu - S4.ins).soft(S4.ins, true).cut(TEACH_CU, S4.cu).soft(S4.cu, true);
+ // the clock's hands at half past four (the set's clock has none)
+ prop(tcam.stage, '<g filter="url(#paper)"><path d="M800,170 L832,202" stroke="#2a2a2a" stroke-width="11" stroke-linecap="round"/><path d="M800,170 L800,236" stroke="#2a2a2a" stroke-width="7" stroke-linecap="round"/><circle cx="800" cy="170" r="9" fill="#c94a3c"/></g>');
+ const tear = prop(cam.stage, s4tearSVG);
+ const card = mk('g', {}, p); prop(card, s4cardSVG());
+ const cardHw = prop(card, hwSVG({ bite: 2 }));
+ // dusk: the kit's wash plus a stronger evening tint and two slanting bands of low orange sun
+ const dk = dusk(p);
+ mk('rect', { width: 1600, height: 900, fill: '#b8461a', opacity: .22, style: 'mix-blend-mode: multiply' }, dk);
+ const bands = mk('g', {}, dk); // sun bands only in the wide shots, never across a close-up face
+ mk('polygon', { points: '260,0 520,0 1180,900 820,900', fill: '#ffb050', opacity: .1, style: 'mix-blend-mode: screen' }, bands);
+ mk('polygon', { points: '700,0 900,0 1500,900 1260,900', fill: '#ffb050', opacity: .07, style: 'mix-blend-mode: screen' }, bands);
+
+ const meBlink = [.9, 4.0, 7.0, 9.6, 12.2], boBlink = [1.6, 5.2, 8.9, 13.4, 15.3, 17.9, 21.0, 25.4],
+ dogBlink = [.7, 2.9, 3.6, 8.1, 18.6, 21.9, 25.2, 26.6, 27.6], tBlink = [S4.tagT + .9, 19.9, 21.1, 23.2, 24.2];
+ const A = (q, ...cl) => lips(q, 'scene4', PRE4, ...cl);
+ stopClock(D, (q, f) => {
+ const clockShot = between(q, S4.clock, S4.two0), tag = between(q, S4.tagT, S4.give) || between(q, S4.holds, S4.two), inRoom = !tag && !clockShot && q < S4.card, inCard = q >= S4.card;
+ vis(cam.root, inRoom); vis(tcam.root, clockShot || tag); vis(card, inCard); vis(dk, q < S4.tagT); vis(bands, q < S4.me);
+ if (inCard) {
+ const k = Math.floor((q - S4.card) * FPS / 2) % 2; // the half-eaten sheet bounces on twos, clear of the title
+ tf(cardHw, `translate(1368,${k ? 650 : 678}) scale(1.4) rotate(${k ? -6 : 5})`);
+ tf(card, `translate(${(jit(f, 5) * .8).toFixed(1)},${(jit(f, 6) * .8).toFixed(1)})`);
+ return;
+ }
+ if (clockShot || tag) {
+ tcam.apply(q, f);
+ // the teacher: asks with an open empty hand; later holds the sheet in her glove, reads it, stunned
+ const has = q >= S4.holds, t3 = lips(q, 'scene4', PRE4, 's13', 's13b'), stun = span(q, 21.95, 22.35), reading = has && q < 22.2;
+ const boOpen = q >= 20.8 && q < 21.04; // "Bo.": the lip-sync's closed B lands ~0.15 s after the sound, so open at the onset
+ const perfectEnd = clipAt('scene4', PRE4, 's13b', 20.65 - 16.426);
+ teacher.pose({ ...TEACHER, mouth: boOpen ? 'B' : t3 !== 'X' ? t3 : (q > perfectEnd && q < S4.two ? (Math.floor(q * 2.5) % 2 ? 'E' : 'F') : 'X'), lids: .45 - .45 * stun, hold: has ? 'hw' : null,
+ armR: has ? T_ARM + (between(q, S4.ins, S4.cu) ? 3 * Math.sin((q - S4.ins) * 4.5) : 0) : 50 - 4 * onTwos(q), armL: 0, look: 0, eyeX: 0, eyeY: reading ? .7 : 0, headR: has ? (reading ? -2 : -1 * stun) : 0,
+ brow: .55 * stun, shut: blinking(q, tBlink), bob: has ? 0 : .6 * Math.sin(q * 1.3) }, f);
+ return;
+ }
+ cam.apply(q, f);
+ const detent = q < S4.tagT, meClose = between(q, S4.me, S4.dogIn) || between(q, S4.meBack, S4.bo), boClose = between(q, S4.bo, S4.tagT),
+ dogShot = q >= S4.dog, dogIns = between(q, S4.dogIn, S4.meBack), morning = q >= S4.give;
+ for (const m of mates) vis(m.p.g, morning); // the class is gone for detention, back in the morning
+ if (morning) room.matesPose(q, f);
+ vis(me.g, !boClose); vis(bo.g, !meClose); vis(dog.g, !(meClose || boClose));
+ const br = 1.4 * Math.sin(q * 1.3), glance = between(q, 2.2, 2.9) ? 1 : 0;
+ // Me (left): stares ahead in the silence, glances at the dog, the sincere speech to camera, then turned to Bo for the last line
+ const sp = between(q, S4.me, S4.bo), toBo = q >= S4.meBack - .1 && q < S4.bo + .3, hand = span(q, 9.2, 9.5) * (1 - span(q, 10.5, 10.9));
+ me.pose({ ...room.ME, sit: true, look: toBo ? .7 : 0, eyeX: toBo ? 1 : glance * .8, lids: sp ? .1 : (morning ? .5 : .42),
+ headR: sp ? 2.5 * Math.sin(q * 1.1) + 3 * span(q, S4.meBack - .1, S4.meBack + .4) : 0, brow: sp ? .3 * Math.sin(q * .9) + .2 : 0,
+ mouth: A(q, 's12'), armL: -130 * hand, eyeY: 0, bob: sp ? 0 : br * .3, shut: blinking(q, meBlink) }, f);
+ // Bo (right): listens (eyes on Me, welling, chin trembling); "Dude. That's beautiful."; in the morning deadpan, hands the sheet over
+ const saying = between(q, clipAt('scene4', PRE4, 's12b') - .05, clipAt('scene4', PRE4, 's12b') + 2.9), gv = span(q, S4.give, S4.give + .35) * (1 - span(q, 19.0, 19.3));
+ bo.pose({ ...room.BO, sit: true, look: boClose ? -.6 : 0, eyeX: boClose ? -1 : (morning ? 0 : -.6 * glance), lids: boClose ? .05 : (morning ? .4 : .5), brow: boClose ? .7 : 0,
+ headR: boClose ? 2 * Math.sin(q * 1.7) : 0, eyeY: boClose ? .2 : 0, hold: q >= S4.give && q < 19.3 ? 'hw' : null, armR: 50 * gv + 30 * span(q, 18.95, 19.2),
+ mouth: boClose ? (saying ? lips(q, 'scene4', PRE4, 's12b') : 'wobble') : (morning ? lips(q, 'scene4', PRE4, 's13c') : 'X'),
+ bob: boClose ? 0 : br * .3, shut: blinking(q, boBlink) }, f);
+ // the tear wells at the eye corner, then rolls
+ const grow = span(q, 11.6, 12.4), roll = span(q, 13.4, 15.2), step = Math.floor(roll * 10) / 10;
+ tf(tear, `translate(${(950 + step * 4).toFixed(1)},${(578 + step * 70).toFixed(1)}) scale(${(.3 + .7 * grow).toFixed(2)})`);
+ vis(tear, boClose && q > 11.6);
+ // the dog on the desk between them, sitting, facing Me: breathes, blinks, ears and tail; tilts its head on "dog";
+ // in the morning already in glasses with a pencil, chewing it; at the snap push it chews, the pencil bobs, it wags
+ const twitch = between(q, 2.4, 2.55) || between(q, 4.4, 4.55) ? 14 : 0, pencil = morning;
+ const d = { ...DOG_DESK, sit: true, dir: -1, ear: pencil ? 3 * Math.sin(q * 2.3) + (between(q, 21.2, 21.4) ? 10 : 0) : twitch, bob: .8 * Math.sin(q * 2.2), shut: blinking(q, dogBlink), lids: .2,
+ glasses: pencil, hold: pencil ? 'pencil' : null, eyeX: pencil ? 0 : (glance ? -1 : 0), tail: 6, wag: q > S4.two + .5 };
+ if (dogIns) Object.assign(d, { headR: 14 * span(q, S4.dogIn, S4.dogIn + .25) - 3 * span(q, S4.dogIn + .6, S4.dogIn + .9), eyeX: -1, lids: 0, ear: 6, tail: 14, wag: true });
+ if (pencil) Object.assign(d, { jaw: .18 * (onTwos(q) > 0 ? 1 : 0) * (q > S4.two - 1 ? 1 : 0), headR: q > S4.dog ? 3 * Math.sin((q - S4.dog) * 7) : 1.5 * Math.sin(q * 1.5), lids: .1 });
+ if (dogShot) Object.assign(d, { tail: 10, wag: true, eyeX: 1, ear: 4 * Math.sin(q * 9) });
+ dog.pose(d, f);
+ });
+}
diff --git a/site/joke-collection/img/puppets/0286ac75.webp b/site/joke-collection/img/puppets/0286ac75.webp
new file mode 100644
index 0000000..e7cf3eb
Binary files /dev/null and b/site/joke-collection/img/puppets/0286ac75.webp differ
diff --git a/site/joke-collection/img/puppets/08572f45.webp b/site/joke-collection/img/puppets/08572f45.webp
new file mode 100644
index 0000000..09a938d
Binary files /dev/null and b/site/joke-collection/img/puppets/08572f45.webp differ
diff --git a/site/joke-collection/img/puppets/117274d2.webp b/site/joke-collection/img/puppets/117274d2.webp
new file mode 100644
index 0000000..8d5e81a
Binary files /dev/null and b/site/joke-collection/img/puppets/117274d2.webp differ
diff --git a/site/joke-collection/img/puppets/129b62f0.webp b/site/joke-collection/img/puppets/129b62f0.webp
new file mode 100644
index 0000000..462ae0a
Binary files /dev/null and b/site/joke-collection/img/puppets/129b62f0.webp differ
diff --git a/site/joke-collection/img/puppets/1abcffee.webp b/site/joke-collection/img/puppets/1abcffee.webp
new file mode 100644
index 0000000..3f60ee5
Binary files /dev/null and b/site/joke-collection/img/puppets/1abcffee.webp differ
diff --git a/site/joke-collection/img/puppets/1ea0db12.webp b/site/joke-collection/img/puppets/1ea0db12.webp
new file mode 100644
index 0000000..34fa578
Binary files /dev/null and b/site/joke-collection/img/puppets/1ea0db12.webp differ
diff --git a/site/joke-collection/img/puppets/23240ff2.webp b/site/joke-collection/img/puppets/23240ff2.webp
new file mode 100644
index 0000000..5163515
Binary files /dev/null and b/site/joke-collection/img/puppets/23240ff2.webp differ
diff --git a/site/joke-collection/img/puppets/2c3542f4.webp b/site/joke-collection/img/puppets/2c3542f4.webp
new file mode 100644
index 0000000..fa39fff
Binary files /dev/null and b/site/joke-collection/img/puppets/2c3542f4.webp differ
diff --git a/site/joke-collection/img/puppets/2e9dd179.webp b/site/joke-collection/img/puppets/2e9dd179.webp
new file mode 100644
index 0000000..5f89334
Binary files /dev/null and b/site/joke-collection/img/puppets/2e9dd179.webp differ
diff --git a/site/joke-collection/img/puppets/3bac069a.webp b/site/joke-collection/img/puppets/3bac069a.webp
new file mode 100644
index 0000000..5f2cd4e
Binary files /dev/null and b/site/joke-collection/img/puppets/3bac069a.webp differ
diff --git a/site/joke-collection/img/puppets/4492dd7d.webp b/site/joke-collection/img/puppets/4492dd7d.webp
new file mode 100644
index 0000000..763e0ef
Binary files /dev/null and b/site/joke-collection/img/puppets/4492dd7d.webp differ
diff --git a/site/joke-collection/img/puppets/44e93b94.webp b/site/joke-collection/img/puppets/44e93b94.webp
new file mode 100644
index 0000000..0c69157
Binary files /dev/null and b/site/joke-collection/img/puppets/44e93b94.webp differ
diff --git a/site/joke-collection/img/puppets/48128e44.webp b/site/joke-collection/img/puppets/48128e44.webp
new file mode 100644
index 0000000..8d89c98
Binary files /dev/null and b/site/joke-collection/img/puppets/48128e44.webp differ
diff --git a/site/joke-collection/img/puppets/56fb2456.webp b/site/joke-collection/img/puppets/56fb2456.webp
new file mode 100644
index 0000000..feff8e9
Binary files /dev/null and b/site/joke-collection/img/puppets/56fb2456.webp differ
diff --git a/site/joke-collection/img/puppets/596baa7d.webp b/site/joke-collection/img/puppets/596baa7d.webp
new file mode 100644
index 0000000..3661fea
Binary files /dev/null and b/site/joke-collection/img/puppets/596baa7d.webp differ
diff --git a/site/joke-collection/img/puppets/5b80513f.webp b/site/joke-collection/img/puppets/5b80513f.webp
new file mode 100644
index 0000000..79f2404
Binary files /dev/null and b/site/joke-collection/img/puppets/5b80513f.webp differ
diff --git a/site/joke-collection/img/puppets/648c7874.webp b/site/joke-collection/img/puppets/648c7874.webp
new file mode 100644
index 0000000..4ebe223
Binary files /dev/null and b/site/joke-collection/img/puppets/648c7874.webp differ
diff --git a/site/joke-collection/img/puppets/66aeb1cb.webp b/site/joke-collection/img/puppets/66aeb1cb.webp
new file mode 100644
index 0000000..f5b19fc
Binary files /dev/null and b/site/joke-collection/img/puppets/66aeb1cb.webp differ
diff --git a/site/joke-collection/img/puppets/7860beb3.webp b/site/joke-collection/img/puppets/7860beb3.webp
new file mode 100644
index 0000000..fb8f5e5
Binary files /dev/null and b/site/joke-collection/img/puppets/7860beb3.webp differ
diff --git a/site/joke-collection/img/puppets/7a6b6779.webp b/site/joke-collection/img/puppets/7a6b6779.webp
new file mode 100644
index 0000000..6d0106f
Binary files /dev/null and b/site/joke-collection/img/puppets/7a6b6779.webp differ
diff --git a/site/joke-collection/img/puppets/7e2f650b.webp b/site/joke-collection/img/puppets/7e2f650b.webp
new file mode 100644
index 0000000..813d6e2
Binary files /dev/null and b/site/joke-collection/img/puppets/7e2f650b.webp differ
diff --git a/site/joke-collection/img/puppets/83661e80.webp b/site/joke-collection/img/puppets/83661e80.webp
new file mode 100644
index 0000000..2767cc8
Binary files /dev/null and b/site/joke-collection/img/puppets/83661e80.webp differ
diff --git a/site/joke-collection/img/puppets/836ff762.webp b/site/joke-collection/img/puppets/836ff762.webp
new file mode 100644
index 0000000..53b155b
Binary files /dev/null and b/site/joke-collection/img/puppets/836ff762.webp differ
diff --git a/site/joke-collection/img/puppets/880975f2.webp b/site/joke-collection/img/puppets/880975f2.webp
new file mode 100644
index 0000000..8f4e195
Binary files /dev/null and b/site/joke-collection/img/puppets/880975f2.webp differ
diff --git a/site/joke-collection/img/puppets/88816e54.webp b/site/joke-collection/img/puppets/88816e54.webp
new file mode 100644
index 0000000..dfcc7f7
Binary files /dev/null and b/site/joke-collection/img/puppets/88816e54.webp differ
diff --git a/site/joke-collection/img/puppets/89dcd688.webp b/site/joke-collection/img/puppets/89dcd688.webp
new file mode 100644
index 0000000..589e682
Binary files /dev/null and b/site/joke-collection/img/puppets/89dcd688.webp differ
diff --git a/site/joke-collection/img/puppets/8e53c786.webp b/site/joke-collection/img/puppets/8e53c786.webp
new file mode 100644
index 0000000..063e943
Binary files /dev/null and b/site/joke-collection/img/puppets/8e53c786.webp differ
diff --git a/site/joke-collection/img/puppets/911eca8e.webp b/site/joke-collection/img/puppets/911eca8e.webp
new file mode 100644
index 0000000..3792680
Binary files /dev/null and b/site/joke-collection/img/puppets/911eca8e.webp differ
diff --git a/site/joke-collection/img/puppets/92a80549.webp b/site/joke-collection/img/puppets/92a80549.webp
new file mode 100644
index 0000000..f4b3b6d
Binary files /dev/null and b/site/joke-collection/img/puppets/92a80549.webp differ
diff --git a/site/joke-collection/img/puppets/94bbe1c2.webp b/site/joke-collection/img/puppets/94bbe1c2.webp
new file mode 100644
index 0000000..e009fa6
Binary files /dev/null and b/site/joke-collection/img/puppets/94bbe1c2.webp differ
diff --git a/site/joke-collection/img/puppets/9a0ee38e.webp b/site/joke-collection/img/puppets/9a0ee38e.webp
new file mode 100644
index 0000000..c731356
Binary files /dev/null and b/site/joke-collection/img/puppets/9a0ee38e.webp differ
diff --git a/site/joke-collection/img/puppets/a0c1131a.webp b/site/joke-collection/img/puppets/a0c1131a.webp
new file mode 100644
index 0000000..c95a1a7
Binary files /dev/null and b/site/joke-collection/img/puppets/a0c1131a.webp differ
diff --git a/site/joke-collection/img/puppets/a25d5db4.webp b/site/joke-collection/img/puppets/a25d5db4.webp
new file mode 100644
index 0000000..0f4b843
Binary files /dev/null and b/site/joke-collection/img/puppets/a25d5db4.webp differ
diff --git a/site/joke-collection/img/puppets/a83414ca.webp b/site/joke-collection/img/puppets/a83414ca.webp
new file mode 100644
index 0000000..0341ded
Binary files /dev/null and b/site/joke-collection/img/puppets/a83414ca.webp differ
diff --git a/site/joke-collection/img/puppets/a9ec29bd.webp b/site/joke-collection/img/puppets/a9ec29bd.webp
new file mode 100644
index 0000000..3799fbe
Binary files /dev/null and b/site/joke-collection/img/puppets/a9ec29bd.webp differ
diff --git a/site/joke-collection/img/puppets/b07d7f39.webp b/site/joke-collection/img/puppets/b07d7f39.webp
new file mode 100644
index 0000000..f0770fa
Binary files /dev/null and b/site/joke-collection/img/puppets/b07d7f39.webp differ
diff --git a/site/joke-collection/img/puppets/b4976cb3.webp b/site/joke-collection/img/puppets/b4976cb3.webp
new file mode 100644
index 0000000..65f6c72
Binary files /dev/null and b/site/joke-collection/img/puppets/b4976cb3.webp differ
diff --git a/site/joke-collection/img/puppets/b761ed8e.webp b/site/joke-collection/img/puppets/b761ed8e.webp
new file mode 100644
index 0000000..ade71a4
Binary files /dev/null and b/site/joke-collection/img/puppets/b761ed8e.webp differ
diff --git a/site/joke-collection/img/puppets/b7aff701.webp b/site/joke-collection/img/puppets/b7aff701.webp
new file mode 100644
index 0000000..8aeef3a
Binary files /dev/null and b/site/joke-collection/img/puppets/b7aff701.webp differ
diff --git a/site/joke-collection/img/puppets/b8bdd67c.webp b/site/joke-collection/img/puppets/b8bdd67c.webp
new file mode 100644
index 0000000..c6dca59
Binary files /dev/null and b/site/joke-collection/img/puppets/b8bdd67c.webp differ
diff --git a/site/joke-collection/img/puppets/baked.js b/site/joke-collection/img/puppets/baked.js
index b66112d..23e90d3 100644
--- a/site/joke-collection/img/puppets/baked.js
+++ b/site/joke-collection/img/puppets/baked.js
@@ -1 +1 @@
-window.BAKED = {"f0e2b031": "f0e2b031.webp", "124b5f31": "124b5f31.webp", "0d6134f9": "0d6134f9.webp", "a457f521": "a457f521.webp", "d28ec985": "d28ec985.webp", "03c68b5a": "03c68b5a.webp", "ebb471fa": "ebb471fa.webp", "6aa2c9f0": "6aa2c9f0.webp", "7727d770": "7727d770.webp", "b1bba1ca": "b1bba1ca.webp", "b15d03b3": "b15d03b3.webp", "46d33b12": "46d33b12.webp", "ebc38456": "ebc38456.webp", "69e4ff32": "69e4ff32.webp", "a45377e3": "a45377e3.webp", "a3e8b09b": "a3e8b09b.webp", "94308d71": "94308d71.webp", "6aa24676": "6aa24676.webp", "c26aa82e": "c26aa82e.webp", "5814fc79": "5814fc79.webp", "f692b475": "f692b475.webp", "b1676e6c": "b1676e6c.webp", "1a5c60bb": "1a5c60bb.webp", "b445b18f": "b445b18f.webp", "52999469": "52999469.webp", "42025885": "42025885.webp", "5d270884": "5d270884.webp", "abee4c66": "abee4c66.webp", "a3c3fd04": "a3c3fd04.webp", "e9388cee": "e9388cee.webp", "b8df4825": "b8df4825.webp", "5e6a1ad9": "5e6a1ad9.webp", "99012789": "99012789.webp", "13be1416": "13be1416.webp", "0350b307": "0350b307.webp", "1acc237c": "1acc237c.webp", "2dbe309c": "2dbe309c.webp", "b7a25c1a": "b7a25c1a.webp", "f039a696": "f039a696.webp", "0c1d51d0": "0c1d51d0.webp", "5a381261": "5a381261.webp", "5b8192de": "5b8192de.webp", "a8a1631f": "a8a1631f.webp", "c867c2bc": "c867c2bc.webp", "60dc68f7": "60dc68f7.webp", "419ba86b": "419ba86b.webp", "d2f420e7": "d2f420e7.webp", "e1f413c7": "e1f413c7.webp", "ab40532c": "ab40532c.webp", "fb885bbf": "fb885bbf.webp", "85c7ab4d": "85c7ab4d.webp", "c4c607a6": "c4c607a6.webp", "8aba41ce": "8aba41ce.webp", "2f966492": "2f966492.webp", "f0fa69c1": "f0fa69c1.webp", "57f5857f": "57f5857f.webp", "17f77aa8": "17f77aa8.webp", "fc38e90e": "fc38e90e.webp", "bbcbf5cf": "bbcbf5cf.webp", "4c7beb8d": "4c7beb8d.webp", "3efa3000": "3efa3000.webp", "2905b9e3": "2905b9e3.webp", "2f5d3cf3": "2f5d3cf3.webp", "0104ccb2": "0104ccb2.webp", "8fc29343": "8fc29343.webp", "9a4f7476": "9a4f7476.webp", "2c8bb592": "2c8bb592.webp", "d4fbb7e0": "d4fbb7e0.webp", "670aff5c": "670aff5c.webp", "31da6bc7": "31da6bc7.webp", "60d9342c": "60d9342c.webp", "1741e580": "1741e580.webp", "429b48d1": "429b48d1.webp", "96cfe19e": "96cfe19e.webp", "62b75d9c": "62b75d9c.webp", "666f08a0": "666f08a0.webp", "7ffe606e": "7ffe606e.webp", "5622e8b6": "5622e8b6.webp", "7a172edc": "7a172edc.webp", "523ca076": "523ca076.webp", "4d0ca735": "4d0ca735.webp", "d0c32627": "d0c32627.webp", "eacc874b": "eacc874b.webp", "98c1d29b": "98c1d29b.webp", "bdc7df1e": "bdc7df1e.webp", "d820935e": "d820935e.webp", "101c8d3e": "101c8d3e.webp", "4c43f571": "4c43f571.webp", "bd535b5d": "bd535b5d.webp", "ccad6309": "ccad6309.webp", "fe16e4fb": "fe16e4fb.webp", "21e90356": "21e90356.webp", "38ce736c": "38ce736c.webp", "ab2a4457": "ab2a4457.webp", "96b31089": "96b31089.webp", "a8faa710": "a8faa710.webp", "da33b9dd": "da33b9dd.webp", "f892d758": "f892d758.webp", "9b806969": "9b806969.webp", "c5b07bc1": "c5b07bc1.webp", "fed95569": "fed95569.webp", "dc192ce9": "dc192ce9.webp", "8619dfee": "8619dfee.webp", "517198da": "517198da.webp", "a46a1837": "a46a1837.webp", "8700eb94": "8700eb94.webp", "b970efff": "b970efff.webp", "4a50ee8c": "4a50ee8c.webp", "d2ce2072": "d2ce2072.webp", "83d8688f": "83d8688f.webp", "5ac6e9b8": "5ac6e9b8.webp", "61f7188a": "61f7188a.webp", "6342691e": "6342691e.webp", "8e1d92b1": "8e1d92b1.webp", "6863b6d6": "6863b6d6.webp", "8e119cca": "8e119cca.webp", "3b87b70c": "3b87b70c.webp", "76afd053": "76afd053.webp", "c1195262": "c1195262.webp", "4b18dc04": "4b18dc04.webp", "96c9c2e5": "96c9c2e5.webp", "faa47c6e": "faa47c6e.webp", "86dfe479": "86dfe479.webp", "457bac26": "457bac26.webp", "0be490bd": "0be490bd.webp", "2a8fcb2f": "2a8fcb2f.webp", "2b65ee19": "2b65ee19.webp", "8ac27d82": "8ac27d82.webp", "a5b509dd": "a5b509dd.webp", "c37bd40c": "c37bd40c.webp", "db8bd465": "db8bd465.webp", "0d075977": "0d075977.webp", "0b325be5": "0b325be5.webp", "d0358b33": "d0358b33.webp", "fad2fad4": "fad2fad4.webp", "b9eb5366": "b9eb5366.webp", "7b636f93": "7b636f93.webp", "35f370ad": "35f370ad.webp", "ef50fa69": "ef50fa69.webp", "77eca2a4": "77eca2a4.webp", "a76d2da6": "a76d2da6.webp", "481a24b9": "481a24b9.webp", "9516ff56": "9516ff56.webp", "47b17ae4": "47b17ae4.webp", "2107f680": "2107f680.webp", "5a8050ac": "5a8050ac.webp", "66cba9aa": "66cba9aa.webp", "f8ce0638": "f8ce0638.webp", "7c5f2261": "7c5f2261.webp", "ef8c8b3f": "ef8c8b3f.webp", "b1655c07": "b1655c07.webp", "2faf6f05": "2faf6f05.webp", "719512d0": "719512d0.webp", "da6cb2b1": "da6cb2b1.webp", "87552bfd": "87552bfd.webp"};
+window.BAKED = {"f0e2b031": "f0e2b031.webp", "124b5f31": "124b5f31.webp", "0d6134f9": "0d6134f9.webp", "a457f521": "a457f521.webp", "d28ec985": "d28ec985.webp", "03c68b5a": "03c68b5a.webp", "ebb471fa": "ebb471fa.webp", "6aa2c9f0": "6aa2c9f0.webp", "7727d770": "7727d770.webp", "b1bba1ca": "b1bba1ca.webp", "b15d03b3": "b15d03b3.webp", "46d33b12": "46d33b12.webp", "ebc38456": "ebc38456.webp", "69e4ff32": "69e4ff32.webp", "a45377e3": "a45377e3.webp", "a3e8b09b": "a3e8b09b.webp", "94308d71": "94308d71.webp", "6aa24676": "6aa24676.webp", "c26aa82e": "c26aa82e.webp", "5814fc79": "5814fc79.webp", "f692b475": "f692b475.webp", "b1676e6c": "b1676e6c.webp", "1a5c60bb": "1a5c60bb.webp", "b445b18f": "b445b18f.webp", "52999469": "52999469.webp", "42025885": "42025885.webp", "5d270884": "5d270884.webp", "abee4c66": "abee4c66.webp", "a3c3fd04": "a3c3fd04.webp", "e9388cee": "e9388cee.webp", "b8df4825": "b8df4825.webp", "5e6a1ad9": "5e6a1ad9.webp", "99012789": "99012789.webp", "13be1416": "13be1416.webp", "0350b307": "0350b307.webp", "1acc237c": "1acc237c.webp", "2dbe309c": "2dbe309c.webp", "b7a25c1a": "b7a25c1a.webp", "f039a696": "f039a696.webp", "0c1d51d0": "0c1d51d0.webp", "5a381261": "5a381261.webp", "5b8192de": "5b8192de.webp", "a8a1631f": "a8a1631f.webp", "c867c2bc": "c867c2bc.webp", "60dc68f7": "60dc68f7.webp", "419ba86b": "419ba86b.webp", "d2f420e7": "d2f420e7.webp", "e1f413c7": "e1f413c7.webp", "ab40532c": "ab40532c.webp", "fb885bbf": "fb885bbf.webp", "85c7ab4d": "85c7ab4d.webp", "c4c607a6": "c4c607a6.webp", "8aba41ce": "8aba41ce.webp", "2f966492": "2f966492.webp", "f0fa69c1": "f0fa69c1.webp", "57f5857f": "57f5857f.webp", "17f77aa8": "17f77aa8.webp", "fc38e90e": "fc38e90e.webp", "bbcbf5cf": "bbcbf5cf.webp", "4c7beb8d": "4c7beb8d.webp", "3efa3000": "3efa3000.webp", "2905b9e3": "2905b9e3.webp", "2f5d3cf3": "2f5d3cf3.webp", "0104ccb2": "0104ccb2.webp", "8fc29343": "8fc29343.webp", "9a4f7476": "9a4f7476.webp", "2c8bb592": "2c8bb592.webp", "d4fbb7e0": "d4fbb7e0.webp", "670aff5c": "670aff5c.webp", "31da6bc7": "31da6bc7.webp", "60d9342c": "60d9342c.webp", "1741e580": "1741e580.webp", "429b48d1": "429b48d1.webp", "96cfe19e": "96cfe19e.webp", "62b75d9c": "62b75d9c.webp", "666f08a0": "666f08a0.webp", "7ffe606e": "7ffe606e.webp", "5622e8b6": "5622e8b6.webp", "7a172edc": "7a172edc.webp", "523ca076": "523ca076.webp", "4d0ca735": "4d0ca735.webp", "d0c32627": "d0c32627.webp", "eacc874b": "eacc874b.webp", "98c1d29b": "98c1d29b.webp", "bdc7df1e": "bdc7df1e.webp", "d820935e": "d820935e.webp", "101c8d3e": "101c8d3e.webp", "4c43f571": "4c43f571.webp", "bd535b5d": "bd535b5d.webp", "ccad6309": "ccad6309.webp", "fe16e4fb": "fe16e4fb.webp", "21e90356": "21e90356.webp", "38ce736c": "38ce736c.webp", "ab2a4457": "ab2a4457.webp", "96b31089": "96b31089.webp", "a8faa710": "a8faa710.webp", "da33b9dd": "da33b9dd.webp", "f892d758": "f892d758.webp", "9b806969": "9b806969.webp", "c5b07bc1": "c5b07bc1.webp", "fed95569": "fed95569.webp", "dc192ce9": "dc192ce9.webp", "8619dfee": "8619dfee.webp", "517198da": "517198da.webp", "a46a1837": "a46a1837.webp", "8700eb94": "8700eb94.webp", "b970efff": "b970efff.webp", "4a50ee8c": "4a50ee8c.webp", "d2ce2072": "d2ce2072.webp", "83d8688f": "83d8688f.webp", "5ac6e9b8": "5ac6e9b8.webp", "61f7188a": "61f7188a.webp", "6342691e": "6342691e.webp", "8e1d92b1": "8e1d92b1.webp", "6863b6d6": "6863b6d6.webp", "8e119cca": "8e119cca.webp", "3b87b70c": "3b87b70c.webp", "76afd053": "76afd053.webp", "c1195262": "c1195262.webp", "4b18dc04": "4b18dc04.webp", "96c9c2e5": "96c9c2e5.webp", "faa47c6e": "faa47c6e.webp", "86dfe479": "86dfe479.webp", "457bac26": "457bac26.webp", "0be490bd": "0be490bd.webp", "2a8fcb2f": "2a8fcb2f.webp", "2b65ee19": "2b65ee19.webp", "8ac27d82": "8ac27d82.webp", "a5b509dd": "a5b509dd.webp", "c37bd40c": "c37bd40c.webp", "db8bd465": "db8bd465.webp", "0d075977": "0d075977.webp", "0b325be5": "0b325be5.webp", "d0358b33": "d0358b33.webp", "fad2fad4": "fad2fad4.webp", "b9eb5366": "b9eb5366.webp", "7b636f93": "7b636f93.webp", "35f370ad": "35f370ad.webp", "ef50fa69": "ef50fa69.webp", "77eca2a4": "77eca2a4.webp", "a76d2da6": "a76d2da6.webp", "481a24b9": "481a24b9.webp", "9516ff56": "9516ff56.webp", "47b17ae4": "47b17ae4.webp", "2107f680": "2107f680.webp", "5a8050ac": "5a8050ac.webp", "66cba9aa": "66cba9aa.webp", "f8ce0638": "f8ce0638.webp", "7c5f2261": "7c5f2261.webp", "ef8c8b3f": "ef8c8b3f.webp", "b1655c07": "b1655c07.webp", "2faf6f05": "2faf6f05.webp", "719512d0": "719512d0.webp", "da6cb2b1": "da6cb2b1.webp", "87552bfd": "87552bfd.webp", "bcd778e8": "bcd778e8.webp", "23240ff2": "23240ff2.webp", "d1d73c37": "d1d73c37.webp", "880975f2": "880975f2.webp", "48128e44": "48128e44.webp", "66aeb1cb": "66aeb1cb.webp", "94bbe1c2": "94bbe1c2.webp", "5b80513f": "5b80513f.webp", "a25d5db4": "a25d5db4.webp", "a0c1131a": "a0c1131a.webp", "83661e80": "83661e80.webp", "b07d7f39": "b07d7f39.webp", "ca2512b4": "ca2512b4.webp", "f264b060": "f264b060.webp", "2e9dd179": "2e9dd179.webp", "a9ec29bd": "a9ec29bd.webp", "f7c9e08a": "f7c9e08a.webp", "cad407e6": "cad407e6.webp", "fbcb25a2": "fbcb25a2.webp", "1abcffee": "1abcffee.webp", "b761ed8e": "b761ed8e.webp", "596baa7d": "596baa7d.webp", "b7aff701": "b7aff701.webp", "fc588798": "fc588798.webp", "d59ca44c": "d59ca44c.webp", "117274d2": "117274d2.webp", "b8bdd67c": "b8bdd67c.webp", "648c7874": "648c7874.webp", "7e2f650b": "7e2f650b.webp", "9a0ee38e": "9a0ee38e.webp", "b4976cb3": "b4976cb3.webp", "92a80549": "92a80549.webp", "e7f49f0f": "e7f49f0f.webp", "08572f45": "08572f45.webp", "4492dd7d": "4492dd7d.webp", "89dcd688": "89dcd688.webp", "911eca8e": "911eca8e.webp", "56fb2456": "56fb2456.webp", "8e53c786": "8e53c786.webp", "2c3542f4": "2c3542f4.webp", "fee8308c": "fee8308c.webp", "d26d2397": "d26d2397.webp", "eae29045": "eae29045.webp", "f48681dd": "f48681dd.webp", "836ff762": "836ff762.webp", "7860beb3": "7860beb3.webp", "d898b982": "d898b982.webp", "1ea0db12": "1ea0db12.webp", "129b62f0": "129b62f0.webp", "f58938d3": "f58938d3.webp", "0286ac75": "0286ac75.webp", "44e93b94": "44e93b94.webp", "88816e54": "88816e54.webp", "3bac069a": "3bac069a.webp", "a83414ca": "a83414ca.webp", "eaf50ec1": "eaf50ec1.webp", "7a6b6779": "7a6b6779.webp"};
diff --git a/site/joke-collection/img/puppets/bcd778e8.webp b/site/joke-collection/img/puppets/bcd778e8.webp
new file mode 100644
index 0000000..8a065fc
Binary files /dev/null and b/site/joke-collection/img/puppets/bcd778e8.webp differ
diff --git a/site/joke-collection/img/puppets/ca2512b4.webp b/site/joke-collection/img/puppets/ca2512b4.webp
new file mode 100644
index 0000000..475edc3
Binary files /dev/null and b/site/joke-collection/img/puppets/ca2512b4.webp differ
diff --git a/site/joke-collection/img/puppets/cad407e6.webp b/site/joke-collection/img/puppets/cad407e6.webp
new file mode 100644
index 0000000..d5c303f
Binary files /dev/null and b/site/joke-collection/img/puppets/cad407e6.webp differ
diff --git a/site/joke-collection/img/puppets/d1d73c37.webp b/site/joke-collection/img/puppets/d1d73c37.webp
new file mode 100644
index 0000000..fd9b3a3
Binary files /dev/null and b/site/joke-collection/img/puppets/d1d73c37.webp differ
diff --git a/site/joke-collection/img/puppets/d26d2397.webp b/site/joke-collection/img/puppets/d26d2397.webp
new file mode 100644
index 0000000..535aaa5
Binary files /dev/null and b/site/joke-collection/img/puppets/d26d2397.webp differ
diff --git a/site/joke-collection/img/puppets/d59ca44c.webp b/site/joke-collection/img/puppets/d59ca44c.webp
new file mode 100644
index 0000000..a016787
Binary files /dev/null and b/site/joke-collection/img/puppets/d59ca44c.webp differ
diff --git a/site/joke-collection/img/puppets/d898b982.webp b/site/joke-collection/img/puppets/d898b982.webp
new file mode 100644
index 0000000..eeb78d5
Binary files /dev/null and b/site/joke-collection/img/puppets/d898b982.webp differ
diff --git a/site/joke-collection/img/puppets/e7f49f0f.webp b/site/joke-collection/img/puppets/e7f49f0f.webp
new file mode 100644
index 0000000..5ad75dc
Binary files /dev/null and b/site/joke-collection/img/puppets/e7f49f0f.webp differ
diff --git a/site/joke-collection/img/puppets/eae29045.webp b/site/joke-collection/img/puppets/eae29045.webp
new file mode 100644
index 0000000..d1316d2
Binary files /dev/null and b/site/joke-collection/img/puppets/eae29045.webp differ
diff --git a/site/joke-collection/img/puppets/eaf50ec1.webp b/site/joke-collection/img/puppets/eaf50ec1.webp
new file mode 100644
index 0000000..443b5fd
Binary files /dev/null and b/site/joke-collection/img/puppets/eaf50ec1.webp differ
diff --git a/site/joke-collection/img/puppets/f264b060.webp b/site/joke-collection/img/puppets/f264b060.webp
new file mode 100644
index 0000000..c1a8f04
Binary files /dev/null and b/site/joke-collection/img/puppets/f264b060.webp differ
diff --git a/site/joke-collection/img/puppets/f48681dd.webp b/site/joke-collection/img/puppets/f48681dd.webp
new file mode 100644
index 0000000..7a34269
Binary files /dev/null and b/site/joke-collection/img/puppets/f48681dd.webp differ
diff --git a/site/joke-collection/img/puppets/f58938d3.webp b/site/joke-collection/img/puppets/f58938d3.webp
new file mode 100644
index 0000000..1648a71
Binary files /dev/null and b/site/joke-collection/img/puppets/f58938d3.webp differ
diff --git a/site/joke-collection/img/puppets/f7c9e08a.webp b/site/joke-collection/img/puppets/f7c9e08a.webp
new file mode 100644
index 0000000..f880949
Binary files /dev/null and b/site/joke-collection/img/puppets/f7c9e08a.webp differ
diff --git a/site/joke-collection/img/puppets/fbcb25a2.webp b/site/joke-collection/img/puppets/fbcb25a2.webp
new file mode 100644
index 0000000..176df6b
Binary files /dev/null and b/site/joke-collection/img/puppets/fbcb25a2.webp differ
diff --git a/site/joke-collection/img/puppets/fc588798.webp b/site/joke-collection/img/puppets/fc588798.webp
new file mode 100644
index 0000000..35f69ae
Binary files /dev/null and b/site/joke-collection/img/puppets/fc588798.webp differ
diff --git a/site/joke-collection/img/puppets/fee8308c.webp b/site/joke-collection/img/puppets/fee8308c.webp
new file mode 100644
index 0000000..aa4cf70
Binary files /dev/null and b/site/joke-collection/img/puppets/fee8308c.webp differ
diff --git a/site/joke-collection/index.html b/site/joke-collection/index.html
index 7716cca..7281e1c 100644
--- a/site/joke-collection/index.html
+++ b/site/joke-collection/index.html
@@ -65,6 +65,7 @@
<li><a href="ch01/"><span class="thumb"><img src="making/still-stall.webp" width="800" height="450" alt="Me and Bo at the bun stall."></span><small>Episode 1 · 2 minutes</small><b>Breakfast in the Bathroom</b><span>Seventh grade. My deskmate had two questions for me, and one morning he asked them both at once. A true story.</span></a></li>
<li><a href="ch02/"><span class="thumb"><img src="making/ep2-veggie.webp" width="800" height="450" alt="The customer hears “reji” as “veggie”."></span><small>Episode 2 · 2 minutes</small><b>Do You Need a Bag?</b><span>A convenience store in Fukuoka. A clerk who speaks no English, a customer who speaks no Japanese, and me in line behind them with a hundred-yen coffee. Also true.</span></a></li>
<li><a href="ch03/"><span class="thumb"><img src="making/ep3-hay.webp" width="800" height="450" alt="The cow walks after hay hung from a rod on its own back."></span><small>Episode 3 · 2 minutes</small><b>How to Move a Cow</b><span>A Chinese man, an Indian man and an American are stuck behind a cow that won’t budge. Each has his own way to make it walk. An old joke, with a newer ending.</span></a></li>
+ <li><a href="ch04/"><span class="thumb"><img src="making/ep4-glasses.webp" width="800" height="450" alt="The dog on the desk between Me and Bo, in glasses, a pencil in its mouth."></span><small>Episode 4 · 2 minutes</small><b>The Dog Ate My Homework</b><span>My deskmate Bo never did his homework, but he always had an excuse. Then he rented a dog to prove one. I did my homework every morning, at breakfast.</span></a></li>
</ul>
<p class="soon">More jokes coming.</p>
@@ -78,6 +79,9 @@
<img src="making/ep2-exchange.webp" width="800" height="450" alt="Episode 2: the clerk wonders if she wants to change dollars into yen." loading="lazy">
<img src="making/ep3-road.webp" width="800" height="450" alt="Episode 3: three men and a cow that won't move, on a country road." loading="lazy">
<img src="making/ep3-flat.webp" width="800" height="450" alt="Episode 3: the cow gives up and lies flat in the road." loading="lazy">
+ <img src="making/ep4-exhibit.webp" width="800" height="450" alt="Episode 4: Exhibit A, the dog, on the desk in class." loading="lazy">
+ <img src="making/ep4-bites.webp" width="800" height="450" alt="Episode 4: the dog takes a bite out of the wrong homework." loading="lazy">
+ <img src="making/ep4-detention.webp" width="800" height="450" alt="Episode 4: detention in the evening light, two boys and a dog." loading="lazy">
</div>
<h2>Two ways, then a third</h2>
@@ -109,9 +113,12 @@
<h3>Episode 3, made with the Skill</h3>
<p>The third joke was the test of the Papermorph Skill itself. A new session started from nothing but the Skill and the joke, asked a few questions (which language each man speaks, whether English viewers need "lying flat" explained), wrote the script, painted two country roads and a bundle of hay, built a cow and three new puppets, and checked its own work. Each man speaks his own language, Mandarin, Hindi and English, with English subtitles. Its painting cost $0.07.</p>
+ <h3>Episode 4, filmed twice</h3>
+ <p>The fourth joke was cut right after the first one, then shelved: the story worked, the filming didn't. Every object the jokes hang on (an oil drop, a blank sheet, three bites) was a few pixels in a wide shot, and the main gag played in one locked frame. A review compared it shot by shot with the episodes above, and four agents filmed each scene again: the main scene went from 6 shots to 22, with a close-up for every object a joke needs and a reaction for every joke. Same script, same voices, no new paintings.</p>
+
<h2>The numbers</h2>
<div class="numbers">
- <div><b>3</b><span>episodes, about 2 minutes each</span></div>
+ <div><b>4</b><span>episodes, about 2 minutes each</span></div>
<div><b>~30</b><span>painted pictures</span></div>
<div><b>$0.60</b><span>for all the painting</span></div>
<div><b>9</b><span>painted sets</span></div>
@@ -120,6 +127,6 @@
<p><b>Why we're keeping this one.</b> The paintings carry the look, the puppets carry the acting, and neither has to do the other's job. The sets and props carry over to the next joke. This is the method we're building the Papermorph Skill's picture books on.</p>
</div>
</main>
-<footer>Both episodes are true stories, retold. Sets and props painted with OpenAI's gpt-image; puppets, weather and animation drawn in code; voices with Microsoft Edge text-to-speech; music from Google Lyria (made for The Three Little Pigs); sound effects synthesized. Part of <a href="../">Papermorph</a>.</footer>
+<footer>Episodes 1 and 2 are true stories, retold. Sets and props painted with OpenAI's gpt-image; puppets, weather and animation drawn in code; voices with Microsoft Edge text-to-speech; music from Google Lyria (made for The Three Little Pigs); sound effects synthesized. Part of <a href="../">Papermorph</a>.</footer>
</body>
</html>
diff --git a/site/joke-collection/lib/cast.js b/site/joke-collection/lib/cast.js
index 87d0972..c759221 100644
--- a/site/joke-collection/lib/cast.js
+++ b/site/joke-collection/lib/cast.js
@@ -142,11 +142,12 @@ const teacherPuppet = (p, o) => spKid(p, 'teacher', { coat: '#8c2f45', stripe: '
/* The bun seller's dog (episode 2), side-on as the show draws its dogs. Built at its feet (0, 0) facing right, about
190 long and 170 tall at s = 1. pose(o, f): x, y, s, dir (1 faces right, -1 left), headR (+ looks up), jaw (0 shut …
1 open), tail (degrees, + up), wag (the tail swings on twos), ear (degrees), shut, lids, eyeX (-1 … 1 along its look),
- sit (on its haunches), lie (flat on the ground, asleep), walk (legs scissor on twos), bob, glasses, tongue,
+ sit (on its haunches; 0…1 or true, ease it over ~0.3 s), lie (flat on the ground, front paws out, 0…1 or true; asleep
+ unless lie is 'awake'), walk (legs scissor on twos), bob, glasses, tongue, sniff (the nose twitches),
hold (prop key, carried crosswise in its mouth). */
const DOG = { coat: '#ece5d6', dark: '#6b5444', far: '#cdc3b1', muzzle: '#fbf8f0' };
const REST_DOG = { x: 0, y: 0, s: 1, dir: 1, headR: 0, jaw: 0, tail: 0, wag: false, ear: 0, shut: false, lids: 0, eyeX: 0,
- sit: false, lie: false, walk: false, bob: 0, glasses: false, tongue: false, hold: null };
+ sit: false, lie: false, walk: false, bob: 0, glasses: false, tongue: false, sniff: false, hold: null };
function dogPuppet(parent, { holds = {} } = {}) {
const g = mk('g', {}, parent), id = 'dogc' + (++spClip), C = DOG;
const leg = (k, col) => `<g data-p="leg${k}"><g filter="url(#paper)"><rect x="-11" y="0" width="22" height="58" rx="8" fill="${col}"/><ellipse cx="6" cy="56" rx="13" ry="7" fill="${C.dark}"/></g></g>`;
@@ -161,14 +162,14 @@ function dogPuppet(parent, { holds = {} } = {}) {
<circle cx="94" cy="-132" r="38" fill="${C.coat}"/><ellipse cx="128" cy="-106" rx="24" ry="9" fill="#4a1a14"/></g>
<g data-p="jaw"><g filter="url(#paper)"><path d="M100,-108 Q150,-106 150,-98 Q132,-86 100,-96 Z" fill="${C.muzzle}"/></g>
<ellipse data-p="tongue" cx="138" cy="-90" rx="9" ry="12" fill="#e06f7a"/></g>
- <g filter="url(#paper)"><ellipse cx="128" cy="-116" rx="28" ry="15" fill="${C.muzzle}"/><ellipse cx="154" cy="-122" rx="8.5" ry="6.5" fill="${SP_INK}"/></g>
+ <g filter="url(#paper)"><ellipse cx="128" cy="-116" rx="28" ry="15" fill="${C.muzzle}"/></g><g data-p="nose"><g filter="url(#paper)"><ellipse cx="154" cy="-122" rx="8.5" ry="6.5" fill="${SP_INK}"/></g></g>
<clipPath id="${id}">${eye}/></clipPath>
<g data-p="whites" filter="url(#paper)">${eye} fill="#fff"/></g>
<circle data-p="pupil" cx="102" cy="-142" r="4.8" fill="${SP_INK}"/>
<g clip-path="url(#${id})"><g data-p="lids"><rect x="86" y="-182" width="28" height="26" fill="${C.coat}"/><path d="M86,-155 H114" stroke="${SP_INK}" stroke-width="3"/></g></g>
${eye} fill="none" stroke="${SP_INK}" stroke-width="2"/>
<g data-p="ear"><g filter="url(#paper)"><path d="M0,0 C-22,4 -26,40 -12,62 C-2,52 10,28 8,0 Z" fill="${C.dark}"/></g></g>
- <g data-p="glasses" fill="none" stroke="${SP_INK}" stroke-width="3.5"><circle cx="101" cy="-142" r="16"/><path d="M85,-144 L64,-150"/></g>
+ <g data-p="glasses" fill="none" stroke="${SP_INK}" stroke-width="3.5"><circle cx="101" cy="-142" r="16"/><path d="M85,-144 L64,-150 M117,-145 Q122,-149 127,-146"/><ellipse cx="135" cy="-143" rx="7" ry="13"/></g>
${Object.entries(holds).map(([k, s]) => `<g data-p="hold_${k}" transform="translate(134,-100)">${s}</g>`).join('')}
</g></g>${leg('B1', C.coat)}${leg('F1', C.coat)}</g>`;
bakeAll(g);
@@ -179,20 +180,24 @@ function dogPuppet(parent, { holds = {} } = {}) {
o = { ...REST_DOG, ...o };
const j = k => .35 * jit(f >> 1, k), k2 = Math.floor(f / 2) % 2 ? 1 : -1;
tf(g, `translate(${(o.x + j(1) * .8).toFixed(1)},${(o.y + j(2) * .6).toFixed(1)}) scale(${(o.s * o.dir).toFixed(3)},${o.s})`);
- tf(P.all, `translate(0,${(o.bob + (o.lie ? 50 : 0)).toFixed(1)})`);
- const a = o.sit ? -16 : 0;
+ const L = o.lie === true || o.lie === 'awake' ? 1 : +o.lie || 0, S = o.sit === true ? 1 : +o.sit || 0;
+ tf(P.all, `translate(0,${(o.bob + 50 * L).toFixed(1)})`);
+ const a = -16 * S;
tf(P.torso, `rotate(${(a + j(3) * .4).toFixed(2)},-50,-56)`);
- vis(P.haunch, o.sit); vis(P.legB1, !o.sit && !o.lie); vis(P.legB2, !o.sit && !o.lie); vis(P.legF1, !o.lie); vis(P.legF2, !o.lie);
- const sw = o.walk ? 18 * k2 : 0, [fx, fy] = turn(o.sit ? 30 : 46, -60, a), fl = (-fy) / 60; // front legs reach the ground from the shoulder
- tf(P.legB1, `translate(-50,-60) rotate(${(sw + j(4) * .5).toFixed(2)})`); tf(P.legB2, `translate(-34,-60) rotate(${(-sw + j(5) * .5).toFixed(2)})`);
- tf(P.legF1, `translate(${fx.toFixed(1)},${fy.toFixed(1)}) rotate(${(-sw + j(6) * .5).toFixed(2)}) scale(1,${fl.toFixed(3)})`);
- tf(P.legF2, `translate(${(fx + 14).toFixed(1)},${fy.toFixed(1)}) rotate(${(sw + j(7) * .5).toFixed(2)}) scale(1,${fl.toFixed(3)})`);
+ // sitting folds the back legs under the haunch; lying shortens the back legs away and swings the front paws forward
+ vis(P.haunch, S > .4); vis(P.legB1, S <= .4 && L < .95); vis(P.legB2, S <= .4 && L < .95);
+ const sw = o.walk ? 18 * k2 : 0, [fx, fy] = turn(30 + 16 * (1 - S), -60, a), fl = (-fy) / 60, bl = 1 - L; // front legs reach the ground from the shoulder
+ tf(P.legB1, `translate(-50,-60) rotate(${(sw + j(4) * .5).toFixed(2)}) scale(1,${bl.toFixed(3)})`); tf(P.legB2, `translate(-34,-60) rotate(${(-sw + j(5) * .5).toFixed(2)}) scale(1,${bl.toFixed(3)})`);
+ const fr = -90 * L, fs = fl * (1 - .3 * L);
+ tf(P.legF1, `translate(${fx.toFixed(1)},${fy.toFixed(1)}) rotate(${(-sw + fr + j(6) * .5).toFixed(2)}) scale(1,${fs.toFixed(3)})`);
+ tf(P.legF2, `translate(${(fx + 14).toFixed(1)},${fy.toFixed(1)}) rotate(${(sw + fr + j(7) * .5).toFixed(2)}) scale(1,${fs.toFixed(3)})`);
tf(P.tail, `translate(-78,-92) rotate(${(-o.tail - (o.wag ? 16 * k2 : 0) + j(8)).toFixed(2)})`);
tf(P.head, `rotate(${(-o.headR - a + j(9) * .6).toFixed(2)},62,-104)`);
tf(P.jaw, `rotate(${(o.jaw * 30).toFixed(1)},100,-102)`);
tf(P.ear, `translate(80,-158) rotate(${(o.ear + j(10) * 2).toFixed(2)})`);
tf(P.pupil, `translate(${(o.eyeX * 5).toFixed(1)},0)`);
- tf(P.lids, `translate(0,${((o.shut || o.lie ? 1 : o.lids) * 26).toFixed(1)})`);
+ tf(P.lids, `translate(0,${((o.shut || (L > .5 && o.lie !== 'awake') ? 1 : o.lids) * 26).toFixed(1)})`);
+ tf(P.nose, o.sniff ? `translate(154,-122) scale(${(1 + .18 * (f % 2)).toFixed(2)}) translate(-154,-122)` : ''); // sniffing: the nose twitches every frame
vis(P.glasses, o.glasses); vis(P.tongue, o.tongue);
for (const k of holdKeys) vis(P[`hold_${k}`], o.hold === k);
} };
diff --git a/site/joke-collection/lib/shared.js b/site/joke-collection/lib/shared.js
index 16a01c3..6221bff 100644
--- a/site/joke-collection/lib/shared.js
+++ b/site/joke-collection/lib/shared.js
@@ -93,17 +93,24 @@ function classroom(p, holds = {}) {
/* ---------- episode 2: the homework, the teacher, the dog ---------- */
// A sheet of homework held up by its bottom edge (the hand at (0, 0)). grease: the oil stain from a bun; bite 0–2: how
// much of it a dog has eaten from the top; blank: nothing written; perfect: a red 100 in the corner.
-function hwSVG({ grease = false, bite = 0, blank = false, perfect = false } = {}) {
+// name: 'Bo' written at the top (so a blank one reads as blank); grease: true or 'big' (for an insert); paw: a muddy
+// paw print in the corner (the dog signed it).
+function hwSVG({ grease = false, bite = 0, blank = false, perfect = false, name = '', paw = false } = {}) {
const top = [-92, -92, -50][bite];
const sheet = ['M-34,-92 H34 V-4 H-34 Z', 'M-34,-92 H2 a14,14 0 0 0 16,14 a12,12 0 0 0 16,10 V-4 H-34 Z',
'M-34,-50 a12,12 0 0 0 18,-6 a14,14 0 0 0 22,4 a14,14 0 0 0 28,-6 V-4 H-34 Z'][bite];
const lines = blank ? '' : [-78, -66, -54, -42, -30, -18].filter(y => y > top + 6)
.map((y, i) => `<path d="M-26,${y} q6,-4 12,0 t12,0 t12,0 ${i % 2 ? 't12,0' : 't12,0 t8,0'}" fill="none" stroke="#3a4f86" stroke-width="2.2"/>`).join('');
return `<g filter="url(#paper)"><path d="${sheet}" fill="#fbfaf4"/><path d="M-34,${top + 2} V-4" stroke="#e89a9a" stroke-width="2"/>${lines}
- ${grease ? '<ellipse cx="10" cy="-34" rx="15" ry="11" fill="#e0b25a" opacity=".55"/>' : ''}
+ ${grease === 'big' ? '<path d="M-6,-48 q14,-10 30,-2 q12,8 4,22 q-8,14 -26,10 q-18,-4 -16,-16 q0,-8 8,-14 Z" fill="#c98f2e" opacity=".7"/><ellipse cx="10" cy="-36" rx="9" ry="6" fill="#f3d79a" opacity=".6"/>'
+ : grease ? '<ellipse cx="10" cy="-34" rx="15" ry="11" fill="#e0b25a" opacity=".55"/>' : ''}
+ ${name && top < -80 ? `<text x="-24" y="-80" font-family="Chalkboard, Comic Sans MS, sans-serif" font-size="12" font-weight="700" fill="#3a4f86">${name}</text>` : ''}
+ ${paw ? '<g fill="#7a5a3c" opacity=".85"><ellipse cx="18" cy="-18" rx="7" ry="6"/><circle cx="10" cy="-27" r="2.6"/><circle cx="15" cy="-30" r="2.6"/><circle cx="21" cy="-30" r="2.6"/><circle cx="26" cy="-26" r="2.6"/></g>' : ''}
${perfect ? '<text x="16" y="-70" font-family="Chalkboard, Comic Sans MS, sans-serif" font-size="22" font-weight="700" fill="#d8322c" text-anchor="middle">100</text><ellipse cx="16" cy="-77" rx="19" ry="13" fill="none" stroke="#d8322c" stroke-width="2.5"/>' : ''}</g>`;
}
// A pencil, centred, lying crosswise (as the dog carries it).
+// A torn scrap of a homework sheet (in the dog's mouth corner after the bites), centred.
+const scrapSVG = `<g filter="url(#paper)"><path d="M-9,-7 L8,-9 L10,-2 L6,1 L9,7 L-7,8 L-10,2 Z" fill="#fbfaf4"/><path d="M-6,-2 q4,-3 8,0 t6,0" fill="none" stroke="#3a4f86" stroke-width="1.6"/></g>`;
const pencilSVG = `<g filter="url(#paper)"><rect x="-34" y="-5" width="60" height="10" fill="#f2c230"/><path d="M26,-5 L40,0 L26,5 Z" fill="#e8c9a0"/><path d="M36,-1.5 L40,0 L36,1.5 Z" fill="#3a3430"/><rect x="-42" y="-5" width="9" height="10" rx="2" fill="#e88a9a"/></g>`;
/* The front of the classroom, seen by the pupils: the teacher behind her desk on the right of the blackboard, only
@@ -119,7 +126,9 @@ function teacherSet(p, holds = {}) {
// mirror it (x 1600 - 860).
const DOG_DESK = { x: 860, y: 724, s: .7 };
// Late afternoon light for the detention: a warm wash over the whole frame (draw it last, over the camera).
-const dusk = p => mk('rect', { width: 1600, height: 900, fill: '#ff9a3c', opacity: .2, 'pointer-events': 'none' }, p);
+const dusk = p => { const g = mk('g', { 'pointer-events': 'none' }, p);
+ mk('rect', { width: 1600, height: 900, fill: '#c2501e', opacity: .2, style: 'mix-blend-mode: multiply' }, g);
+ mk('rect', { width: 1600, height: 900, fill: '#ffa040', opacity: .18 }, g); return g; };
/* ---------- sound effects ----------
sfx(beat, at, name, vol): play audio/sfx/<name>.mp3 when the clock of beat `beat` passes `at` in normal playback
@@ -135,7 +144,8 @@ function sfxTick() {
if (!same) while (sfxOn.length) sfxOn.pop().pause();
if (on && same)
for (const e of SFX) if (e.beat === id && e.at > sfxLast.t && e.at <= P.t) {
- const a = new Audio(`audio/sfx/${e.name}.mp3`); a.volume = .5 * e.vol * +(document.getElementById('volume')?.value ?? 1); // effects sit under the voices a.playbackRate = P.rate || 1;
+ const a = new Audio(`audio/sfx/${e.name}.mp3`); a.volume = .5 * e.vol * +(document.getElementById('volume')?.value ?? 1); // effects sit under the voices
+ a.playbackRate = P.rate || 1;
a.play().catch(() => {}); sfxOn.push(a); a.onended = () => sfxOn.splice(sfxOn.indexOf(a), 1);
}
for (const a of sfxOn) if (on === a.paused) on ? a.play().catch(() => {}) : a.pause(); // a pause holds them, play resumes
diff --git a/site/joke-collection/making/ep4-bites.webp b/site/joke-collection/making/ep4-bites.webp
new file mode 100644
index 0000000..f746a7b
Binary files /dev/null and b/site/joke-collection/making/ep4-bites.webp differ
diff --git a/site/joke-collection/making/ep4-detention.webp b/site/joke-collection/making/ep4-detention.webp
new file mode 100644
index 0000000..dc619f3
Binary files /dev/null and b/site/joke-collection/making/ep4-detention.webp differ
diff --git a/site/joke-collection/making/ep4-exhibit.webp b/site/joke-collection/making/ep4-exhibit.webp
new file mode 100644
index 0000000..f05e3fa
Binary files /dev/null and b/site/joke-collection/making/ep4-exhibit.webp differ
diff --git a/site/joke-collection/making/ep4-glasses.webp b/site/joke-collection/making/ep4-glasses.webp
new file mode 100644
index 0000000..827bfb4
Binary files /dev/null and b/site/joke-collection/making/ep4-glasses.webp differ