diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-05 21:15:51 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-05 21:15:51 +0100 |
| commit | 6bd01cd5d4c731871b433dc209147817f7e71be6 (patch) | |
| tree | 266beb7baa2b1821817d4b51ea136cbe08abb6fc | |
| parent | a794102f59e8baf654b8807cf74fdc014830fb6f (diff) | |
docs(timeline-editor): Reference SEQUENCE.md and add priority editing task
Documentation improvements:
1. Added reference to doc/SEQUENCE.md in README
2. Added comment in parser pointing to format spec
3. Updated README with complete format examples including:
- Priority modifiers (+, =, -)
- Time notation (beats vs seconds)
- Optional sequence names
- BPM declaration
New feature task (Phase 1):
Task 1.2b: Priority Editing UI (HIGH PRIORITY, 6-8h)
- Edit sequence priority (0-9 for scene, 10+ for post-processing)
- Toggle effect priority modifiers (+/=/-)
- Visual priority indicators and z-order visualization
- Computed priority display
- Priority conflict warnings
Implementation details:
- Radio buttons for priority modifiers
- Up/down buttons for sequence priority
- Color-coded priority levels
- Priority badges on timeline items
- Automatic priority recalculation
Rationale:
Priority control is essential for proper render order and z-stacking.
Currently, priorities are shown but not easily editable. This task
makes priority a first-class editable property.
Updated effort estimates:
- Phase 1: 28-36 hours (was 22-28)
- Total: ~117-161 hours for full feature set
| -rw-r--r-- | tools/timeline_editor/README.md | 33 | ||||
| -rw-r--r-- | tools/timeline_editor/ROADMAP.md | 153 | ||||
| -rw-r--r-- | tools/timeline_editor/index.html | 1 |
3 files changed, 174 insertions, 13 deletions
diff --git a/tools/timeline_editor/README.md b/tools/timeline_editor/README.md index aed140e..1c73c53 100644 --- a/tools/timeline_editor/README.md +++ b/tools/timeline_editor/README.md @@ -50,22 +50,39 @@ Interactive web-based editor for `demo.seq` timeline files. ## File Format +⚠️ **For complete format specification, see:** `doc/SEQUENCE.md` + The editor parses and generates `.seq` files with this format: ``` -SEQUENCE <start_time> <priority> - EFFECT <ClassName> <start_time> <end_time> <priority> [args...] - EFFECT <ClassName> <start_time> <end_time> <priority> [args...] +# BPM 120 +SEQUENCE <start_time> <priority> ["optional_name"] [optional_end] + EFFECT <+|=|-> <ClassName> <start_time> <end_time> [args...] + EFFECT <+|=|-> <ClassName> <start_time> <end_time> [args...] ``` +**Priority Modifiers:** +- `+` = Increment priority (normal effects) +- `=` = Keep same priority as previous +- `-` = Decrement priority (background layers) + +**Time Notation:** +- `0b`, `4b`, `64b` = Beats (converted using BPM) +- `0.0`, `2.0`, `32.0` = Seconds +- Integer without 'b': treated as beats +- Decimal point: treated as seconds + Example: ``` -SEQUENCE 0.0 0 - EFFECT FlashEffect 0.0 1.0 0 - EFFECT FadeEffect 0.5 2.0 1 +# BPM 120 +SEQUENCE 0b 0 "Opening Scene" + EFFECT - FlashCubeEffect .2 3 # Background (priority -1) + EFFECT + FlashEffect 0.0 1.0 # Foreground (priority 0) + EFFECT + FadeEffect 0.5 2.0 # Overlay (priority 1) -SEQUENCE 3.0 1 - EFFECT HeptagonEffect 0.0 0.5 0 +SEQUENCE 4b 1 "Beat Drop" + EFFECT + HeptagonEffect 0.0 0.5 # Priority 0 + EFFECT = ParticlesEffect 0.0 2.0 # Priority 0 (same layer) ``` ## Color Coding diff --git a/tools/timeline_editor/ROADMAP.md b/tools/timeline_editor/ROADMAP.md index b1fb69f..4a9d171 100644 --- a/tools/timeline_editor/ROADMAP.md +++ b/tools/timeline_editor/ROADMAP.md @@ -115,6 +115,148 @@ function createEffect() { --- +### 1.2b Priority Editing UI ⭐ Priority: HIGH +**Goal:** Enable visual editing of sequence and effect priorities. + +**Features:** +- **Sequence Priority**: Edit absolute priority (0-9 for scene, 10+ for post-processing) +- **Effect Priority Modifier**: Toggle between `+`, `=`, `-` modifiers +- **Visual Priority Indicators**: Color-code or label items by priority level +- **Z-order visualization**: Show stacking order visually + +**UI Design:** + +**For Sequences:** +``` +Properties Panel: +┌─────────────────────────────┐ +│ Sequence Priority │ +│ ┌─────────────────────────┐ │ +│ │ Priority: [0] ▲▼ │ │ +│ └─────────────────────────┘ │ +│ (0-9: Scene, 10+: Post-FX) │ +└─────────────────────────────┘ + +Visual indicator on timeline: +[0] Sequence 1 (dark blue) +[1] Sequence 2 (medium blue) +[5] Sequence 3 (light blue) +``` + +**For Effects:** +``` +Properties Panel: +┌─────────────────────────────┐ +│ Effect Priority Modifier │ +│ ┌─────────────────────────┐ │ +│ │ ○ + Increment (normal) │ │ +│ │ ○ = Same as previous │ │ +│ │ ● - Decrement (bg) │ │ +│ └─────────────────────────┘ │ +│ Computed priority: -1 │ +└─────────────────────────────┘ + +Visual indicator on timeline: +[-1] FlashCubeEffect (darker gray, background) +[0] FlashEffect (normal gray) +[1] FadeEffect (lighter gray) +``` + +**Implementation:** +```javascript +// Sequence priority editor +function renderSequencePriorityEditor(seq) { + return ` + <div class="property-group"> + <label>Sequence Priority</label> + <div class="priority-control"> + <input type="number" id="seqPriority" value="${seq.priority}" + min="0" max="20" step="1"> + <button onclick="adjustPriority(-1)">▼</button> + <button onclick="adjustPriority(+1)">▲</button> + </div> + <small>0-9: Scene effects | 10+: Post-processing</small> + </div> + `; +} + +// Effect priority modifier editor +function renderEffectPriorityEditor(effect) { + return ` + <div class="property-group"> + <label>Priority Modifier</label> + <div class="priority-modifier-group"> + <label> + <input type="radio" name="priorityMod" value="+" + ${effect.priorityModifier === '+' ? 'checked' : ''}> + + Increment (normal) + </label> + <label> + <input type="radio" name="priorityMod" value="=" + ${effect.priorityModifier === '=' ? 'checked' : ''}> + = Same as previous + </label> + <label> + <input type="radio" name="priorityMod" value="-" + ${effect.priorityModifier === '-' ? 'checked' : ''}> + - Decrement (background) + </label> + </div> + <small>Computed priority: ${effect.priority}</small> + </div> + `; +} + +// Recalculate effect priorities after modifier change +function recalculatePriorities(sequence) { + let currentPriority = -1; + for (const effect of sequence.effects) { + if (effect.priorityModifier === '+') currentPriority++; + else if (effect.priorityModifier === '-') currentPriority--; + // '=' keeps current priority + effect.priority = currentPriority; + } +} +``` + +**Visual Priority Indicators (CSS):** +```css +/* Sequence priority colors */ +.sequence[data-priority="0"] { border-color: #264f78; } /* Dark blue */ +.sequence[data-priority="1"] { border-color: #0e639c; } /* Medium blue */ +.sequence[data-priority="2"] { border-color: #1177bb; } /* Light blue */ + +/* Effect priority badge */ +.effect::before { + content: "[" attr(data-priority) "]"; + position: absolute; + top: 2px; + left: 2px; + font-size: 10px; + background: rgba(0,0,0,0.5); + padding: 2px 4px; + border-radius: 2px; +} + +/* Background effects (negative priority) */ +.effect[data-priority^="-"] { + opacity: 0.7; + background: #2d2d30; +} +``` + +**Validation:** +- Warn if sequence priorities conflict (same time + same priority) +- Show warning if effect priority order doesn't match visual stacking +- Suggest reordering effects if priority sequence is non-contiguous + +**Effort:** 6-8 hours +**Priority:** HIGH (essential for proper z-order control) +**Dependencies:** None +**Impact:** Enables precise control over render order + +--- + ### 1.3 Overlap Detection & Warnings ⭐ Priority: MEDIUM **Goal:** Visualize and warn about timeline conflicts. @@ -373,11 +515,12 @@ function detectOverlaps() { **Immediate (Next 1-2 weeks):** 1. ✅ Snap-to-Beat (4-6h) - Makes editing much easier 2. ✅ Create New Effects (6-8h) - Essential for productivity +3. ✅ Priority Editing UI (6-8h) - Essential for z-order control **Short-term (Next 1-2 months):** -3. ✅ Overlap Detection (8-10h) - Prevents bugs -4. ✅ Undo/Redo (10-12h) - Safety net for experimentation -5. ✅ Copy/Paste (6-8h) - Common workflow +4. ✅ Overlap Detection (8-10h) - Prevents bugs +5. ✅ Undo/Redo (10-12h) - Safety net for experimentation +6. ✅ Copy/Paste (6-8h) - Common workflow **Medium-term (Next 3-6 months):** 6. Multi-Select (12-15h) @@ -395,11 +538,11 @@ function detectOverlaps() { ## Total Effort Estimates -**Phase 1 (Core):** 22-28 hours +**Phase 1 (Core):** 28-36 hours (was 22-28, added priority editing) **Phase 2 (Productivity):** 38-51 hours **Phase 3 (Advanced):** 51-74 hours -**Total:** ~110-150 hours for full feature set +**Total:** ~117-161 hours for full feature set --- diff --git a/tools/timeline_editor/index.html b/tools/timeline_editor/index.html index 293a03f..96c2b17 100644 --- a/tools/timeline_editor/index.html +++ b/tools/timeline_editor/index.html @@ -281,6 +281,7 @@ const stats = document.getElementById('stats'); // Parser: demo.seq → JavaScript objects + // Format specification: doc/SEQUENCE.md function parseSeqFile(content) { const sequences = []; const lines = content.split('\n'); |
