Commit Graph

6 Commits

Author SHA1 Message Date
Skyler Lehmkuhl 9649fe173b Rename views to keyframe, curve and segment and update defaults 2025-10-23 05:38:10 -04:00
Skyler Lehmkuhl 20c3b820a3 Record audio tracks 2025-10-23 01:08:45 -04:00
Skyler Lehmkuhl e45659ddfd Work on timeline 2025-10-18 21:32:59 -04:00
Skyler Lehmkuhl 87d2036f07 Complete Phase 5: Timeline curve interaction and nested animation support
Phase 5 adds interactive curve editing, proper interpolation visualization,
and automatic segment keyframe management for nested animations.

Timeline curve interaction features:
- Add keyframe creation by clicking in expanded curve view
- Implement keyframe dragging with snapping support
- Add multi-keyframe selection (Shift/Ctrl modifiers)
- Support constrained dragging (Shift: vertical, Ctrl: horizontal)
- Add keyframe deletion via right-click context menu
- Display hover tooltips showing keyframe values
- Respect interpolation modes in curve visualization:
  * Linear: straight lines
  * Bezier: smooth curves with tangent handles
  * Step/Hold: horizontal hold then vertical jump
  * Zero: jump to zero and back

Nested animation improvements:
- Add bidirectional parent references:
  * Layer.parentObject → GraphicsObject
  * AnimationData.parentLayer → Layer
  * GraphicsObject.parentLayer → Layer
- Auto-update segment keyframes when nested animation duration changes
- Update both time and value of segment end keyframe
- Fix parameter ordering (required before optional) in constructors

Bug fixes:
- Fix nested object rendering offset (transformCanvas applied twice)
- Fix curve visualization ignoring interpolation mode
2025-10-15 19:08:59 -04:00
Skyler Lehmkuhl 1936e91327 Implement Timeline V2 Phase 2: Track hierarchy with selection and scrolling
Phase 2 Implementation:
- Added TrackHierarchy class to build and manage hierarchical track structure
- Track display with expand/collapse triangles for layers and groups
- Hierarchical indentation for visual hierarchy
- Track selection syncs with stage selection (shapes, objects, layers)
- Vertical scrolling for track area when many tracks present
- Horizontal scrolling in ruler area for timeline navigation

Timeline Integration:
- Set TimelineV2 as default timeline on app load
- Timeline automatically updates when shapes added or grouped
- Trigger timeline redraw in renderLayers() for efficient batching

Selection System:
- Clicking tracks selects corresponding objects/shapes on stage
- Selected tracks highlighted in timeline
- Updates context.selection and context.shapeselection arrays
- Stores oldselection/oldshapeselection for undo support
- Calls updateUI() and updateMenu() to sync UI state

Visual Improvements:
- Use predefined colors from styles.js (no hardcoded colors)
- Alternating track background colors for readability
- Selection highlighting with predefined highlight color
- Type indicators for tracks: [L]ayer, [G]roup, [S]hape

Mouse Interactions:
- Click ruler area to move playhead
- Click track expand/collapse triangles to show/hide children
- Click track name to select object/shape
- Scroll wheel in ruler area for horizontal timeline scroll
- Scroll wheel in track area for vertical track list scroll
- Adjusts hit testing for vertical scroll offset
2025-10-15 01:47:37 -04:00
Skyler Lehmkuhl 6c79914ffb Work on moving things to animation curves 2025-10-15 00:41:51 -04:00