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 '