summaryrefslogtreecommitdiff
path: root/tools/timeline_editor/README.md
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-02-05 21:06:20 +0100
committerskal <pascal.massimino@gmail.com>2026-02-05 21:06:20 +0100
commit0957b138af0bb1c217aeab90171e36e9fc2f54e9 (patch)
treeed256f88fdf4ad2b819dba3d61edd8e9d4cf7600 /tools/timeline_editor/README.md
parent2818c0136c14d0bcb824342d379090642db777b5 (diff)
feat(tools): Implement Task #57 - Interactive Timeline Editor
Created a functional web-based timeline editor for demo.seq files. Features implemented: ✅ Load/save demo.seq files via browser file API ✅ Visual Gantt-style timeline with time markers ✅ Drag & drop sequences and effects along timeline ✅ Properties panel for editing timing, priorities, arguments ✅ Zoom controls (10% - 200%) ✅ Add/delete sequences and effects ✅ Real-time statistics (sequence count, effect count, duration) ✅ Dark theme matching VSCode aesthetic ✅ Color-coded items (sequences blue, effects gray) ✅ Selection highlighting Technical details: - Pure HTML/CSS/JavaScript (no dependencies, no build step) - ~600 lines in single self-contained HTML file - Works offline, no backend needed - Parser converts demo.seq text → JavaScript objects - Serializer converts JavaScript objects → demo.seq text Usage: 1. Open tools/timeline_editor/index.html in browser 2. Load assets/demo.seq 3. Drag items, edit properties 4. Save modified file 5. Copy to assets/demo.seq and rebuild Limitations (acceptable for v1): - No undo/redo yet - No effect creation UI (must use properties panel) - No overlap detection warnings - No snap-to-grid - No preview rendering (intentional - editor only) This provides a quick way to experiment with demo timing without recompiling, and better visualization of sequence/effect relationships. Size: ~25KB (HTML + embedded JS/CSS) Status: Task #57 basic implementation complete
Diffstat (limited to 'tools/timeline_editor/README.md')
-rw-r--r--tools/timeline_editor/README.md119
1 files changed, 119 insertions, 0 deletions
diff --git a/tools/timeline_editor/README.md b/tools/timeline_editor/README.md
new file mode 100644
index 0000000..aed140e
--- /dev/null
+++ b/tools/timeline_editor/README.md
@@ -0,0 +1,119 @@
+# Timeline Editor
+
+Interactive web-based editor for `demo.seq` timeline files.
+
+## Features
+
+✅ **Implemented:**
+- 📂 Load/save `demo.seq` files
+- 📊 Visual Gantt-style timeline
+- 🎯 Drag & drop sequences along timeline
+- 🎯 Drag & drop effects along timeline
+- ⏱️ Edit timing (start/end times)
+- ⚙️ Edit priorities
+- ⚙️ Edit effect class names and constructor arguments
+- 🔍 Zoom in/out (10% - 200%)
+- 📋 Real-time statistics
+- 🗑️ Delete sequences/effects
+- ➕ Add new sequences
+
+## Usage
+
+1. **Open the editor:**
+ ```bash
+ open tools/timeline_editor/index.html
+ ```
+ Or double-click `index.html` in Finder.
+
+2. **Load a timeline:**
+ - Click "📂 Load demo.seq"
+ - Select your `assets/demo.seq` file
+
+3. **Edit the timeline:**
+ - **Drag sequences/effects** to move them along the timeline
+ - **Click an item** to select it and view properties
+ - **Edit properties** in the panel below
+ - **Click "Apply"** to save property changes
+
+4. **Save your changes:**
+ - Click "💾 Save demo.seq"
+ - Choose where to save the modified file
+
+5. **Zoom controls:**
+ - Use the zoom slider to adjust timeline scale
+ - Higher zoom = more pixels per second
+
+## Keyboard Shortcuts
+
+- **Delete key**: Delete selected item (when implemented)
+- **Escape**: Deselect current item
+
+## File Format
+
+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...]
+```
+
+Example:
+```
+SEQUENCE 0.0 0
+ EFFECT FlashEffect 0.0 1.0 0
+ EFFECT FadeEffect 0.5 2.0 1
+
+SEQUENCE 3.0 1
+ EFFECT HeptagonEffect 0.0 0.5 0
+```
+
+## Color Coding
+
+- **Blue boxes**: Sequences (container for effects)
+- **Gray boxes**: Effects (visual elements)
+- **Green highlight**: Selected sequence
+- **Orange highlight**: Selected effect
+
+## Tips
+
+- **Sequences** have absolute start times
+- **Effects** have start/end times **relative to their sequence**
+- Priority determines rendering order (higher = rendered later = on top)
+- Effect constructor arguments are passed as-is to the C++ code
+
+## Limitations
+
+- No preview rendering (this is intentional - it's just a timeline editor)
+- No automatic overlap detection yet
+- No undo/redo (coming soon)
+- Cannot add effects to sequences (manually edit properties for now)
+
+## Future Enhancements
+
+- [ ] Undo/redo functionality
+- [ ] Add effect button
+- [ ] Overlap detection warnings
+- [ ] Snap-to-grid
+- [ ] Timeline playback indicator
+- [ ] Multiple file comparison
+- [ ] Export to different formats
+
+## Technical Details
+
+- Pure HTML/CSS/JavaScript (no dependencies)
+- No backend required
+- Works offline
+- All processing happens in the browser
+- Files are saved via browser download API
+
+## Integration
+
+After editing in the timeline editor:
+
+1. Save the modified `demo.seq`
+2. Copy it to `assets/demo.seq`
+3. Rebuild the project: `cmake --build build`
+4. The new timeline will be compiled into the demo
+
+No code changes needed - the `seq_compiler` automatically processes the updated file.