diff --git a/style.css b/style.css
index 21f3e35c3..84c1e20a8 100644
--- a/style.css
+++ b/style.css
@@ -561,6 +561,81 @@ body.track-size-s .clip.selected {
background: #000;
}
+/* ── Keyframe graphs (left gutter of program monitor) ── */
+.kf-graphs {
+ position: absolute;
+ left: 6px;
+ top: 6px;
+ bottom: 6px;
+ width: min(168px, 28%);
+ z-index: 4;
+ display: flex;
+ flex-direction: column;
+ gap: 6px;
+ overflow-x: hidden;
+ overflow-y: auto;
+ pointer-events: none;
+}
+.kf-graphs[hidden] { display: none; }
+.kf-graph {
+ pointer-events: auto;
+ flex: 0 0 auto;
+ background: #000a;
+ border: 1px solid #ffffff18;
+ border-radius: 4px;
+ padding: 4px 5px 3px;
+ user-select: none;
+}
+.kf-graph-head {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 4px;
+ margin-bottom: 2px;
+ font: 700 9px/1 ui-sans-serif, system-ui, sans-serif;
+ letter-spacing: .35px;
+ color: #c8c8d0;
+}
+.kf-graph-head button {
+ margin: 0;
+ padding: 0 3px;
+ border: 0;
+ background: transparent;
+ color: #8b8b93;
+ font: 700 11px/1 ui-sans-serif, system-ui, sans-serif;
+ cursor: pointer;
+ opacity: .75;
+}
+.kf-graph-head button:hover { color: #fff; opacity: 1; }
+.kf-graph canvas {
+ display: block;
+ width: 100%;
+ height: 52px;
+ cursor: crosshair;
+ border-radius: 2px;
+ background: #0a0a0ccc;
+}
+
+.insp-row label.kf-graph-toggle {
+ cursor: pointer;
+ border-radius: 3px;
+ margin: -1px -2px;
+ padding: 1px 2px;
+}
+.insp-row label.kf-graph-toggle:hover {
+ color: #cfc8ff;
+ background: #7b6cff22;
+}
+.insp-row label.kf-graph-toggle.on {
+ color: #b9baff;
+ background: #7b6cff33;
+}
+.insp-row label.kf-graph-toggle.has-kf::after {
+ content: " ◆";
+ font-size: 8px;
+ opacity: .7;
+}
+
.head-select {
background: var(--panel-2);
border: 1px solid var(--border);
From 2dc90ef80fdbbe4227ae5ecf98101a44d26895dc Mon Sep 17 00:00:00 2001
From: = <=>
Date: Sun, 19 Jul 2026 11:28:45 +0300
Subject: [PATCH 2/3] feat: add keyframe markers drawn on clips
Keyframes are drawn over the clip, Ctrl+Left/Right Arrow moves the playhead to the nearest keyframe.
---
app.js | 87 ++++++++++++++++++++++++++++++++++++++++++++++++++++--
index.html | 1 +
style.css | 26 ++++++++++++++++
3 files changed, 112 insertions(+), 2 deletions(-)
diff --git a/app.js b/app.js
index 50559f675..47434674f 100644
--- a/app.js
+++ b/app.js
@@ -1286,6 +1286,37 @@ function transitionMarksHtml(c, trackH) {
wedge(c.transitionOut, "out");
return html;
}
+/* Unique clip-local keyframe times (seconds), sorted. */
+function clipKeyframeLocalTimes(c) {
+ if (!c?.keyframes) return [];
+ const seen = new Set();
+ const out = [];
+ for (const arr of Object.values(c.keyframes)) {
+ if (!Array.isArray(arr)) continue;
+ for (const kf of arr) {
+ const t = +kf.t;
+ if (!Number.isFinite(t)) continue;
+ const key = t.toFixed(4);
+ if (seen.has(key)) continue;
+ seen.add(key);
+ out.push(t);
+ }
+ }
+ out.sort((a, b) => a - b);
+ return out;
+}
+/* Diamond marks on the clip body — one per unique keyframe time (all channels). */
+function clipKeyframesHtml(c) {
+ const times = clipKeyframeLocalTimes(c);
+ if (!times.length || !(c.duration > 0)) return "";
+ let html = `
`;
+}
function rebuildClips() {
const w = contentWidth();
els.tracksContent.style.width = w + "px";
@@ -1307,10 +1338,10 @@ function rebuildClips() {
}
const hasWave = c.kind === "audio" && runtime.wavePeaks.get(c.mediaId) instanceof Float32Array;
if (hasWave) body += `
`;
- const badge = c.keyframes && Object.keys(c.keyframes).length ? "◆ " : "";
body += `
${badge}${c.kind === "text" ? "T · " + (c.props.text || "").split("\n")[0]
+
${c.kind === "text" ? "T · " + (c.props.text || "").split("\n")[0]
: c.kind === "adjust" ? "FX · " + c.name : c.name}
`;
+ body += clipKeyframesHtml(c);
let inner = `
${body}
`;
inner += transitionMarksHtml(c, tr.h);
inner += `
`;
@@ -1468,6 +1499,13 @@ els.tracksContent.addEventListener("pointerdown", (e) => {
}
const c = getClip(clipDiv.dataset.id);
if (!c) return;
+ const kfMark = e.target.closest(".clip-kf");
+ if (kfMark) {
+ e.preventDefault();
+ selectClip(c.id);
+ setTime(c.start + (+kfMark.dataset.t || 0));
+ return;
+ }
const transHandle = e.target.closest(".trans-dur-handle");
if (transHandle) {
const wrap = transHandle.closest(".trans-mark");
@@ -1702,6 +1740,47 @@ function setTime(t) {
seekMediaWhilePaused();
}
+/* Absolute timeline times of every keyframe on the given clips (deduped). */
+function keyframeTimelineTimes(clips) {
+ const seen = new Set();
+ const out = [];
+ for (const c of clips) {
+ for (const local of clipKeyframeLocalTimes(c)) {
+ const t = +(c.start + local).toFixed(4);
+ if (seen.has(t)) continue;
+ seen.add(t);
+ out.push(t);
+ }
+ }
+ out.sort((a, b) => a - b);
+ return out;
+}
+/* Jump playhead to previous (−1) or next (+1) keyframe.
+ Prefers selected clips; falls back to clips under the playhead.
+ Keyboard counterpart to Avid’s Ctrl/Cmd-click snap-to-audio-keyframe. */
+function goToKeyframe(dir) {
+ let clips = state.selIds.size ? selectedClips() : [];
+ if (!clips.some((c) => clipKeyframeLocalTimes(c).length)) {
+ const t = state.time;
+ clips = project.clips.filter((c) =>
+ clipKeyframeLocalTimes(c).length &&
+ t >= c.start - 1e-6 && t <= c.start + c.duration + 1e-6);
+ }
+ const times = keyframeTimelineTimes(clips);
+ if (!times.length) { toast("No keyframes"); return; }
+ const eps = 0.5 / Math.max(1, project.fps || 30);
+ if (dir > 0) {
+ const next = times.find((t) => t > state.time + eps);
+ if (next == null) { toast("No next keyframe"); return; }
+ setTime(next);
+ } else {
+ let prev = null;
+ for (const t of times) if (t < state.time - eps) prev = t;
+ if (prev == null) { toast("No previous keyframe"); return; }
+ setTime(prev);
+ }
+}
+
/* Add a marker at the playhead, or remove one already there (M key).
Works while playing — tap M on the beat to lay down a beat grid. */
function toggleMarker() {
@@ -3842,6 +3921,10 @@ window.addEventListener("keydown", (e) => {
e.shiftKey ? trimToWorkArea() : splitAtWorkArea();
}
else if (k === "Delete" || k === "Backspace") deleteSelected();
+ else if ((e.ctrlKey || e.metaKey) && !e.altKey && (k === "ArrowLeft" || k === "ArrowRight")) {
+ e.preventDefault();
+ goToKeyframe(k === "ArrowRight" ? 1 : -1);
+ }
else if (k === "ArrowLeft") setTime(state.time - (e.shiftKey ? 1 : 1 / project.fps));
else if (k === "ArrowRight") setTime(state.time + (e.shiftKey ? 1 : 1 / project.fps));
else if (k === "Home") gotoHome();
diff --git a/index.html b/index.html
index 297f8925a..86ee522c8 100644
--- a/index.html
+++ b/index.html
@@ -179,6 +179,7 @@
Keyboard shortcuts
| Ctrl+click clip | Add / remove a clip from the selection |
| Ctrl+A / Esc | Select all clips / deselect |
| ← → | Step 1 frame (⇧ = 1 second) |
+
| Ctrl+← / Ctrl+→ | Go to previous / next keyframe (selected clip, or clip under playhead) |
| [ / ] | Trim selected clip's in / out to playhead |
| Home / End | Jump to start / end |
| M | Add / remove marker at playhead (tap on the beat while playing) |
diff --git a/style.css b/style.css
index 84c1e20a8..d4e290d24 100644
--- a/style.css
+++ b/style.css
@@ -1073,6 +1073,32 @@ input[type=range] {
z-index: 3;
}
+/* Keyframe diamonds on the clip — same size/color as ruler beat markers */
+.clip .clip-kfs {
+ position: absolute;
+ left: 0;
+ right: 0;
+ bottom: 1px;
+ height: 8px;
+ pointer-events: none;
+ z-index: 4;
+}
+.clip .clip-kf {
+ position: absolute;
+ top: 0;
+ /* rotated square → ~8×8 tip-to-tip, matching ruler markers */
+ width: 6px;
+ height: 6px;
+ margin-left: -3px;
+ background: #ffd166;
+ transform: rotate(45deg);
+ pointer-events: auto;
+ cursor: pointer;
+}
+.clip .clip-kf:hover {
+ background: #ffe28a;
+}
+
/* transition wedges — width from transition duration × pps (see transitionMarksHtml) */
.clip .trans-mark {
position: absolute;
From f1f1d5044552a58735da0ece3cec27f47568050b Mon Sep 17 00:00:00 2001
From: = <=>
Date: Sun, 19 Jul 2026 11:38:13 +0300
Subject: [PATCH 3/3] feat: display keyframe number per time point
---
README.md | 7 +++++++
app.js | 32 +++++++++++++++++---------------
style.css | 22 ++++++++++++++++++++++
3 files changed, 46 insertions(+), 15 deletions(-)
diff --git a/README.md b/README.md
index 76cd4265a..e1b0a63b0 100644
--- a/README.md
+++ b/README.md
@@ -66,6 +66,13 @@ same time.
**Motion**
- Keyframe animation on ~25 properties with easing
+- **Keyframe markers on clips** — diamonds on the clip body at each unique
+ keyframe time (tooltip lists channels; a count badge when several share a
+ time).
Ctrl/Cmd+← /
Ctrl/Cmd+→ jumps the playhead to
+ the previous / next keyframe (selected clips first, else clips under the
+ playhead)
+- **Keyframe graphs** — toggle a property’s curve in the inspector to show an
+ interpolated value graph beside the program monitor; click the graph to seek
- **Speed ramps** — keyframe `speed` and the engine time-remaps video *and* the
export audio mix (the fast-into-slow-mo reel move)
- **Camera shake** and **RGB-split/chromatic aberration**, both animatable
diff --git a/app.js b/app.js
index 47434674f..7e27fb9fc 100644
--- a/app.js
+++ b/app.js
@@ -1286,34 +1286,36 @@ function transitionMarksHtml(c, trackH) {
wedge(c.transitionOut, "out");
return html;
}
-/* Unique clip-local keyframe times (seconds), sorted. */
-function clipKeyframeLocalTimes(c) {
+/* Group keyframes by clip-local time → [{ t, keys: ["opacity","scale"] }, …]. */
+function clipKeyframeGroups(c) {
if (!c?.keyframes) return [];
- const seen = new Set();
- const out = [];
- for (const arr of Object.values(c.keyframes)) {
+ const byT = new Map();
+ for (const [channel, arr] of Object.entries(c.keyframes)) {
if (!Array.isArray(arr)) continue;
for (const kf of arr) {
const t = +kf.t;
if (!Number.isFinite(t)) continue;
const key = t.toFixed(4);
- if (seen.has(key)) continue;
- seen.add(key);
- out.push(t);
+ let g = byT.get(key);
+ if (!g) { g = { t, keys: [] }; byT.set(key, g); }
+ if (!g.keys.includes(channel)) g.keys.push(channel);
}
}
- out.sort((a, b) => a - b);
- return out;
+ return [...byT.values()].sort((a, b) => a.t - b.t);
}
-/* Diamond marks on the clip body — one per unique keyframe time (all channels). */
+const clipKeyframeLocalTimes = (c) => clipKeyframeGroups(c).map((g) => g.t);
+/* Diamond marks on the clip body — one per unique time; count badge if multi-channel. */
function clipKeyframesHtml(c) {
- const times = clipKeyframeLocalTimes(c);
- if (!times.length || !(c.duration > 0)) return "";
+ const groups = clipKeyframeGroups(c);
+ if (!groups.length || !(c.duration > 0)) return "";
let html = `
`;
- for (const t of times) {
+ for (const { t, keys } of groups) {
if (t < -1e-6 || t > c.duration + 1e-6) continue;
const pct = Math.max(0, Math.min(100, (t / c.duration) * 100));
- html += `
`;
+ const label = keys.join(", ") + " @ " + fmt(c.start + t);
+ const badge = keys.length > 1 ? `
${keys.length}` : "";
+ const multi = keys.length > 1 ? " multi" : "";
+ html += `
${badge}
`;
}
return html + `
`;
}
diff --git a/style.css b/style.css
index d4e290d24..90a6d6251 100644
--- a/style.css
+++ b/style.css
@@ -1098,6 +1098,28 @@ input[type=range] {
.clip .clip-kf:hover {
background: #ffe28a;
}
+/* Count badge when ≥2 channels share this time (diamond stays rotated; numeral counter-rotates) */
+.clip .clip-kf.multi {
+ width: 8px;
+ height: 8px;
+ margin-left: -4px;
+ top: -1px;
+}
+.clip .clip-kf-n {
+ position: absolute;
+ inset: 0;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ transform: rotate(-45deg);
+ font: 700 7px/1 ui-sans-serif, system-ui, sans-serif;
+ color: #1a1a1e;
+ pointer-events: none;
+ user-select: none;
+}
+body.track-size-s .clip .clip-kf-n {
+ font-size: 6px;
+}
/* transition wedges — width from transition duration × pps (see transitionMarksHtml) */
.clip .trans-mark {