Skip to content

Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.

fix(website): take the time and cut readouts off the timeline

Etienne Lescot3f42c118c120
diff --git a/website/src/components/Recreation/driver.ts b/website/src/components/Recreation/driver.ts
index 1be643f2a..9c850b364 100644
--- a/website/src/components/Recreation/driver.ts
+++ b/website/src/components/Recreation/driver.ts
@@ -42,8 +42,6 @@ export interface DriverRefs {
cam: HTMLVideoElement;
padValue: HTMLElement;
sizeValue: HTMLElement;
- timeValue: HTMLElement;
- cutsValue: HTMLElement;
flow: HTMLElement;
}
@@ -108,13 +106,6 @@ const WRITTEN = [
"--k",
];
-const fmtSec = (sec: number) => {
- const s = Math.max(0, sec);
- const m = Math.floor(s / 60);
- const r = s - m * 60;
- return `${m}:${Math.floor(r).toString().padStart(2, "0")}.${Math.floor((r % 1) * 10)}`;
-};
-
/** Piecewise-linear read of `[[t, ...values]]`, clamped at both ends. */
function kf(t: number, pts: number[][]): number[] {
if (t <= pts[0][0]) return pts[0].slice(1);
@@ -186,7 +177,7 @@ export function attachDriver(refs: DriverRefs, cls: DriverClasses): () => void {
};
}
- const { band, root, cam, padValue, sizeValue, timeValue, cutsValue, flow } = refs;
+ const { band, root, cam, padValue, sizeValue, flow } = refs;
let raf = 0;
/* ── the target cache ─────────────────────────────────────────────────── */
@@ -573,8 +564,6 @@ export function attachDriver(refs: DriverRefs, cls: DriverClasses): () => void {
let lastBeat: string | null | undefined;
let lastPad = "";
let lastSize = "";
- let lastTime = "";
- let lastCuts = "";
let lastArt = "";
let lastTheme = -1;
const struck = new Set<number>();
@@ -667,11 +656,6 @@ export function attachDriver(refs: DriverRefs, cls: DriverClasses): () => void {
// and no unit, unlike every other slider on the panel.
const size = f.cursorSize.toFixed(1);
if (size !== lastSize) sizeValue.textContent = lastSize = size;
- const time = fmtSec(f.tf);
- if (time !== lastTime) timeValue.textContent = lastTime = time;
- const cuts = f.cutCount ? `−${f.cutCount} · −${f.saved.toFixed(1)}s` : "";
- if (cuts !== lastCuts) cutsValue.textContent = lastCuts = cuts;
-
// Only the five removable entries can ever change, so the other forty
// nodes in the transcript are never touched.
for (const i of CUT_INDEX) {
diff --git a/website/src/components/Recreation/index.tsx b/website/src/components/Recreation/index.tsx
index 308b3c0d0..53dbc524f 100644
--- a/website/src/components/Recreation/index.tsx
+++ b/website/src/components/Recreation/index.tsx
@@ -130,8 +130,6 @@ export default function Recreation() {
const cam = useRef<HTMLVideoElement | null>(null);
const padValue = useRef<HTMLSpanElement | null>(null);
const sizeValue = useRef<HTMLSpanElement | null>(null);
- const timeValue = useRef<HTMLSpanElement | null>(null);
- const cutsValue = useRef<HTMLSpanElement | null>(null);
const flow = useRef<HTMLParagraphElement | null>(null);
useEffect(() => {
@@ -141,8 +139,6 @@ export default function Recreation() {
cam: cam.current,
padValue: padValue.current,
sizeValue: sizeValue.current,
- timeValue: timeValue.current,
- cutsValue: cutsValue.current,
flow: flow.current,
};
if (Object.values(refs).some((el) => el === null)) return;
@@ -693,13 +689,6 @@ export default function Recreation() {
<span className={styles.playhead} style={{ left: `${PLAYHEAD * 100}%` }}>
<span className={styles.playheadHead} />
</span>
-
- <div className={styles.transport}>
- <span className={styles.time} ref={timeValue}>
- 0:00.0
- </span>
- <span className={styles.cuts} ref={cutsValue} />
- </div>
</div>
{/* The reader's pointer, over the editor. */}
diff --git a/website/src/components/Recreation/scene.ts b/website/src/components/Recreation/scene.ts
index d09b43b56..298625bb4 100644
--- a/website/src/components/Recreation/scene.ts
+++ b/website/src/components/Recreation/scene.ts
@@ -326,7 +326,7 @@ export function trims(t: number): Placed[] {
* It is not the scene clock. While the playhead crosses the speed region the
* recording runs at 2.2x, and after it the footage is permanently 2.4s ahead —
* which is exactly what a speed ramp does to everything downstream of it, and
- * the reason the transport's remaining time is not the scene time.
+ * the reason the picture and the rail cannot share one number.
*/
export const footageTime = (t: number) =>
t < SPEED.from
@@ -521,9 +521,6 @@ export interface Frame {
palette: number;
wand: number;
comment: number;
- /** Transport readouts. */
- cutCount: number;
- saved: number;
}
export function frameAt(p: number): Frame {
@@ -571,11 +568,6 @@ export function frameAt(p: number): Frame {
const [pageY] = kf(tf, PAGE_PATH);
const placedTrims = trims(t);
- const cutCount = placedTrims.filter((c) => c.placed).length;
- const saved = CUT_INDEX.reduce(
- (sum, i) => sum + (t >= strikeOf(i) ? (TOKENS[i].cut ?? 0) : 0),
- 0,
- );
const strikeIndex = CUT_INDEX.find((i) => t >= strikeOf(i) - 0.5 && t < strikeOf(i) + 0.35) ?? -1;
@@ -628,8 +620,6 @@ export function frameAt(p: number): Frame {
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,
- cutCount,
- saved,
};
}
diff --git a/website/src/components/Recreation/styles.module.css b/website/src/components/Recreation/styles.module.css
index 538548e8b..5c98ba0bb 100644
--- a/website/src/components/Recreation/styles.module.css
+++ b/website/src/components/Recreation/styles.module.css
@@ -1624,25 +1624,6 @@
clip-path: polygon(0 0, 100% 0, 100% 68%, 50% 100%, 0 68%);
}
-.transport {
- position: absolute;
- left: 16px;
- top: 12px;
- z-index: 10;
- display: flex;
- align-items: center;
- gap: 10px;
- font-family: var(--ost-font-mono);
- font-size: 11px;
- color: var(--ost-fg);
- font-variant-numeric: tabular-nums;
-}
-
-.cuts {
- color: var(--ost-danger);
- font-weight: 600;
-}
-
/* ═══ THE READER'S POINTER ═════════════════════════════════════════════════
Positioned in vw/vh, which the driver's percentages of the stage match. */