feat(04-01): TimelineCanvas class + CSS + app.js wiring
- Create lightsync/frontend/timeline/timeline.js with TimelineCanvas class - Per-device horizontal tracks with track headers and time axis - HiDPI canvas rendering with devicePixelRatio handling - Waveform peaks background layer, beat marks overlay, cue block rendering - Playback cursor synced to audio.currentTime via requestAnimationFrame - Auto-scroll when cursor approaches right edge - Mouse wheel scrolling on timeline canvas - loadTracks(), loadWaveform(), loadBeats() data loading methods - Empty state messages when no devices or audio loaded - Add timeline CSS to style.css (toolbar, canvas, inspector strip, snap button) - Wire timeline into app.js: import, initTimeline(), zoom/beat-offset/snap controls - Remove old animation-grid click listener (element no longer exists in main-area) - Populate animation palette dynamically in sidebar with 7 animation types
This commit is contained in:
@@ -354,3 +354,133 @@ button:hover {
|
||||
|
||||
.text-dim { color: var(--text-dim); }
|
||||
.text-accent { color: var(--text-accent); }
|
||||
|
||||
/* ── Timeline ──────────────────────────────────── */
|
||||
#timeline-canvas {
|
||||
flex: 1;
|
||||
display: block;
|
||||
min-height: 0;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.timeline-toolbar {
|
||||
height: 32px;
|
||||
background: var(--bg-panel-dark);
|
||||
border-bottom: 1px solid var(--border-dim);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
padding: 0 12px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.toolbar-field {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.toolbar-label {
|
||||
font-size: 10px;
|
||||
text-transform: uppercase;
|
||||
color: var(--text-dim);
|
||||
letter-spacing: 0.1em;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.toolbar-unit {
|
||||
font-size: 10px;
|
||||
color: var(--text-dim);
|
||||
}
|
||||
|
||||
.toolbar-sep {
|
||||
width: 1px;
|
||||
height: 20px;
|
||||
background: var(--border-dim);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
#zoom-slider {
|
||||
width: 100px;
|
||||
accent-color: var(--accent);
|
||||
height: 3px;
|
||||
}
|
||||
|
||||
#beat-offset {
|
||||
width: 70px;
|
||||
font-size: 12px;
|
||||
padding: 2px 4px;
|
||||
}
|
||||
|
||||
.snap-btn.active {
|
||||
background: var(--accent);
|
||||
color: var(--bg-primary);
|
||||
border-color: var(--accent);
|
||||
}
|
||||
|
||||
/* ── Block Inspector Strip ─────────────────────── */
|
||||
.block-inspector {
|
||||
height: 40px;
|
||||
background: var(--bg-panel-dark);
|
||||
border-top: 1px solid var(--border-dim);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
padding: 0 12px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.inspector-label {
|
||||
color: var(--text-accent);
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
flex-shrink: 0;
|
||||
min-width: 120px;
|
||||
}
|
||||
|
||||
.inspector-field {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
font-size: 10px;
|
||||
text-transform: uppercase;
|
||||
color: var(--text-dim);
|
||||
letter-spacing: 0.1em;
|
||||
}
|
||||
|
||||
.inspector-field input,
|
||||
.inspector-field select {
|
||||
font-size: 12px;
|
||||
padding: 2px 4px;
|
||||
background: var(--bg-panel);
|
||||
border: 1px solid var(--border-dim);
|
||||
color: var(--text-primary);
|
||||
font-family: var(--font-mono);
|
||||
}
|
||||
|
||||
.inspector-field input[type="number"] {
|
||||
width: 60px;
|
||||
}
|
||||
|
||||
.inspector-color-swatch {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
border: 1px solid var(--border-dim);
|
||||
cursor: pointer;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.inspector-remove {
|
||||
margin-left: auto;
|
||||
background: none;
|
||||
border: none;
|
||||
color: var(--text-dim);
|
||||
font-size: 16px;
|
||||
cursor: pointer;
|
||||
padding: 0 4px;
|
||||
}
|
||||
.inspector-remove:hover {
|
||||
color: #ff3333;
|
||||
border: none;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user