diff --git a/trailer.html b/trailer.html index e30dfc1..801b133 100644 --- a/trailer.html +++ b/trailer.html @@ -444,7 +444,23 @@ // What a take really costs: the engine bills by the second (7 cents), five // seconds at least, and a speaking shot runs its line plus the slate words. - function filmCost(x) { return Math.max(5, Math.ceil((Number(x.edit_seconds) || 5) + 1.5)) * 0.07; } + // rate: dollars a second; min/max: the lengths that camera can film. + var CAMERAS = { "": { name: "the usual camera", rate: 0.07, min: 5, max: 15 }, + "hf-seedance-2.5-480p": { name: "Seedance 2.5 from Higgsfield, standard picture", rate: 0.2056, min: 4, max: 30 }, + "hf-seedance-2.5-720p": { name: "Seedance 2.5 from Higgsfield, sharper picture", rate: 0.4622, min: 4, max: 30 }, + "fal-seedance-2.5-480p": { name: "Seedance 2.5 from fal, standard picture", rate: 0.2205, min: 4, max: 30 }, + "fal-seedance-2.5-720p": { name: "Seedance 2.5 from fal, sharper picture", rate: 0.4730, min: 4, max: 30 } }; + CAMERAS["minimax-h3"] = CAMERAS[""]; + function cameraOf(x) { return CAMERAS[(x && x.engine) || ""] || CAMERAS[""]; } + function filmCost(x) { var c = cameraOf(x); + return Math.min(c.max, Math.max(c.min, Math.ceil((Number(x.edit_seconds) || 5) + 1.5))) * c.rate; } + // "filmed on ... - $1.44 - ready in 95 s", for a shot or one of its takes. + function madeOn(t) { + if (!t || !t.filmed_on) return ""; + return ' · ' + esc((CAMERAS[t.filmed_on] || { name: t.filmed_on }).name) + + (Number(t.film_usd) ? ' · $' + Number(t.film_usd).toFixed(2) : '') + + (Number(t.film_wait) ? ' · ready in ' + Math.round(Number(t.film_wait)) + ' s' : ''); + } function filmCostAll(list) { return list.reduce(function (a, x) { return a + filmCost(x); }, 0); } function partsHtml(draft) { @@ -1299,6 +1315,14 @@ ["native", "The camera makes the sound itself, in step with the action (a horn as the hand presses it, a bark as the mouth opens)"]].map(function (o) { return ''; }).join("") + '') + + '' + ''; } @@ -1614,6 +1638,7 @@ media += '
the filmed shot' + (s.clip_seconds ? ' · ' + Number(s.clip_seconds).toFixed(1) + 's' : '') + + madeOn(s) + (s.clip_stale ? ' · filmed from an older picture — film it again' : '') + '
' + (s.opening_url ? '
' + tk.map(function (t) { return '
' - + (t.replaced_at ? 'replaced ' + esc(String(t.replaced_at).replace("T", " ").slice(0, 16)) : '') + '
'; }).join("") + + (t.replaced_at ? 'replaced ' + esc(String(t.replaced_at).replace("T", " ").slice(0, 16)) : '') + + (t.clip_seconds ? ' · ' + Number(t.clip_seconds).toFixed(1) + 's' : '') + madeOn(t) + + (t.verdict && t.verdict !== "no dialogue" ? ' · words: ' + esc(t.verdict) : '') + '
'; }).join("") + '
'; } else if (s.opening_url || s.closing_url) { media += '
' @@ -1722,7 +1749,7 @@ + ' Cutting room floor' + (s.floor ? '
On the cutting room floor - left out of the film. Untick to put it back.
' : '') + '
' + esc(s.setting || "") + ' · ' - + ' s ' + + ' s ' + '' + '' + '' @@ -2333,6 +2360,15 @@ var el = e.target; if (el.getAttribute && el.getAttribute("data-pagepick")) { PAGE = Number(el.value) || 0; await refresh(); return; } + var esid = el.getAttribute && el.getAttribute("data-engine"); + if (esid) { + var inp3 = document.querySelector('[data-filmnote="' + esid + '"]'); + var r3 = await api("set_film_note", { draft_id: CUR, shot_id: esid, note: inp3 ? inp3.value : "", engine: el.value || "minimax-h3" }); + await refresh(); + if (r3.ok) showMsg("msg", "Saved. The price on the film button is now this camera’s. The take you have stays under Earlier takes when you film again, so the two can be compared.", "ok"); + else showMsg("msg", r3.error || "That camera could not be chosen."); + return; + } var ssid = el.getAttribute && el.getAttribute("data-soundmode"); if (ssid) { var inp2 = document.querySelector('[data-filmnote="' + ssid + '"]');