Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.
TypeScript cross-platformelectronffmpegopen-sourceproduct-demorustscreen-capturescreen-recorderscreen-recordingscreen-studioscreencastspeech-to-texttypescriptvideo-editingvideo-editorwaylandwgpuwhisper
fix(website): bring the title in with the panel it announces
Etienne Lescot56c407ad70f9
diff --git a/website/src/components/Recreation/driver.ts b/website/src/components/Recreation/driver.tsindex b5ad10ac9..a345ba228 100644--- a/website/src/components/Recreation/driver.ts+++ b/website/src/components/Recreation/driver.ts@@ -90,6 +90,7 @@ const WRITTEN = ["--zooms-placed","--speed-placed","--panel",+ "--intro","--palette","--wand","--comment",@@ -453,6 +454,8 @@ export function attachDriver(refs: DriverRefs, cls: DriverClasses): () => void {num("--zooms-placed", f.zoomsPlaced, 0);num("--speed-placed", f.speedPlaced, 0);num("--panel", f.panel, 0);+ // A switch, so no decimals to lose — unlike --tl, which is a ramp.+ num("--intro", f.intro, 0);num("--palette", f.palette, 0);num("--wand", f.wand, 0);num("--comment", f.comment, 0);diff --git a/website/src/components/Recreation/scene.ts b/website/src/components/Recreation/scene.tsindex 7b3e90e7b..40ec089a5 100644--- a/website/src/components/Recreation/scene.ts+++ b/website/src/components/Recreation/scene.ts@@ -92,6 +92,13 @@ export type BeatId = (typeof BEATS)[number]["id"];/** The floor arrives here — inside the cursor beat, so the acts change under a* caption that is still up rather than across an empty stage. */const TL_IN = 14.65;+/** When the interface arrives over the picture — the inspector and the captions+ * together. They used to disagree: the caption turned on with its beat, which+ * now opens the scene at 0, while the panel waited for this threshold, so the+ * title faded up a fifth of a second of scroll before the panel it belongs to.+ * One number, read by both. */+const UI_IN = 0.35;+/** The inspector is up for every beat except the two the palette owns. */const PANEL_OFF = [14.45, 19.6] as const;@@ -473,6 +480,9 @@ export interface Frame {/** Index of the entry the pointer is striking, or -1. */strikeIndex: number;panel: number;+ /** The captions' gate, so they arrive with the inspector rather than before+ * it. A switch, not a ramp — the fade is the CSS transition under it. */+ intro: number;palette: number;wand: number;comment: number;@@ -535,7 +545,7 @@ export function frameAt(p: number): Frame {const strikeIndex = CUT_INDEX.find((i) => t >= strikeOf(i) - 0.5 && t < strikeOf(i) + 0.35) ?? -1;- const panelOn = t >= 0.35 && !(t >= PANEL_OFF[0] && t < PANEL_OFF[1]);+ const panelOn = t >= UI_IN && !(t >= PANEL_OFF[0] && t < PANEL_OFF[1]);const paletteOn = t >= 14.75 && t < 19.45;return {@@ -569,6 +579,7 @@ export function frameAt(p: number): Frame {trims: placedTrims,strikeIndex,panel: panelOn ? 1 : 0,+ intro: t >= UI_IN ? 1 : 0,palette: paletteOn ? 1 : 0,wand: t >= 15.0 && t < 17.0 && t >= 15.0 + (17.0 - 15.0) * 0.54 ? 1 : 0,comment: t >= 17.3 && t < 19.2 && t >= 17.3 + (19.2 - 17.3) * 0.5 ? 1 : 0,diff --git a/website/src/components/Recreation/styles.module.css b/website/src/components/Recreation/styles.module.cssindex 2728aa9b4..8df42d200 100644--- a/website/src/components/Recreation/styles.module.css+++ b/website/src/components/Recreation/styles.module.css@@ -92,6 +92,10 @@--t: 26;--tf: 28.4;--tl: 1;+ /* The resting frame has the interface up, so a reader who never gets a+ driver — no JS, reduced motion — sees the captions rather than an+ invalid declaration falling back to whatever opacity happens to be. */+ --intro: 1;--bg: 3;--fit: 0.88;--pad-pct: 30;@@ -181,6 +185,11 @@width: calc(var(--pnl-w) - 8px);z-index: 11;pointer-events: none;+ /* Gated with the inspector, on the inspector's own threshold and the+ inspector's own timing, so the title does not announce a panel that is not+ there yet. The per-beat cross-fade inside carries on independently. */+ opacity: var(--intro);+ transition: opacity 0.45s var(--ease);}.cap {