From e359067b143824394d0a33fbce9aa1bf6d96c145 Mon Sep 17 00:00:00 2001 From: gator Date: Tue, 22 Sep 2026 22:27:36 +0000 Subject: [PATCH] Storyboard: opening picture from the previous shot's first or last frame --- trailer.html | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/trailer.html b/trailer.html index 354fea7..4df48fd 100644 --- a/trailer.html +++ b/trailer.html @@ -1474,6 +1474,25 @@ return out; } + // THE OPENING PICTURE of a shot can be the previous shot's first frame, or + // its last frame once it is filmed - so "catching up with the bouncing + // ball" starts with the ball, the dog and Dorothy exactly where the last + // clip left them. + function prevShot(s) { + var all = (PKG.shots || []).slice().sort(function (a, b) { return String(a.id).localeCompare(String(b.id)); }); + var i = all.findIndex(function (x) { return x.id === s.id; }); + return i > 0 ? all[i - 1] : null; + } + function openingHtml(s) { + var p = prevShot(s); + if (!p) return ""; + var from = s.opening_from ? ' now: the ' + esc(s.opening_from.frame) + ' frame of shot ' + esc(s.opening_from.shot) + '' : (s.opening_url ? ' now: drawn for this shot' : ''); + return '
Opening picture' + + '' + + '' + + from + '
'; + } + function shotHtml(s, voice) { if (s.writing) { return '
' + esc(s.id) + '
' @@ -1508,9 +1527,9 @@ + '
'; }).join(""); - var media = backgroundHtml(s); + var media = backgroundHtml(s) + openingHtml(s); if (s.clip_url) { - media = '
the filmed shot' + (s.clip_seconds ? ' · ' + Number(s.clip_seconds).toFixed(1) + 's' : '') + (s.clip_stale ? ' · filmed from an older picture — film it again' : '') @@ -1519,7 +1538,7 @@ + '" src="' + esc(s.opening_url) + '" alt="">
filmed from this frame
' : '') + '
'; } else if (s.opening_url || s.closing_url) { - media = '
' + media += '
' + (s.opening_url ? '
opens on
' : '') + (s.closing_url ? '