Commit Graph

348 Commits

Author SHA1 Message Date
Skyler Lehmkuhl 6b8679fa87 fix pane split/join menu 2025-10-24 00:28:24 -04:00
Skyler Lehmkuhl 4b1d9dc851 Fix UI selection when dragging pane borders 2025-10-23 23:25:22 -04:00
Skyler Lehmkuhl 976b41cb83 Add piano roll track editing 2025-10-23 23:10:56 -04:00
Skyler Lehmkuhl 3de1b05fb3 Add custom layouts, piano pane, midi file import 2025-10-23 21:15:17 -04:00
Skyler Lehmkuhl c46c28c9bb Add timestamp window 2025-10-23 06:21:02 -04:00
Skyler Lehmkuhl 9649fe173b Rename views to keyframe, curve and segment and update defaults 2025-10-23 05:38:10 -04:00
Skyler Lehmkuhl 5e1a30d812 add timeline markings 2025-10-23 05:00:13 -04:00
Skyler Lehmkuhl 8be10b8213 send playback events from backend to use as time reference 2025-10-23 04:30:52 -04:00
Skyler Lehmkuhl d2fa167179 use tauri events instead of polling to fix race condition in recording stop 2025-10-23 03:59:01 -04:00
Skyler Lehmkuhl 20c3b820a3 Record audio tracks 2025-10-23 01:08:45 -04:00
Skyler Lehmkuhl 9699e1e1ea Migrate from frame-centric to AnimationData system
Replaces legacy Frame-based object positioning and shape management with
AnimationData curves throughout the codebase. This enables time-based
animation instead of discrete frame indices, providing smoother playback
and more flexible keyframe editing.

Key changes:
- Remove currentFrame getter and frame.keys lookups
- Replace setFrameNum() with setTime() for continuous time navigation
- Add Layer.addShape()/removeShape() with AnimationData integration
- Migrate actions (move, group, delete, z-order) to use animation curves
- Update keyboard shortcuts and drag operations to modify curves directly
- Leave "holes" in shapeIndex values for proper undo/redo support

Rendering now fully driven by AnimationData curves (exists, zOrder,
shapeIndex for shapes; x, y, rotation, scale for objects).
2025-10-20 01:56:53 -04:00
Skyler Lehmkuhl 97b9ff71b7 Fix curve issues 2025-10-19 18:45:17 -04:00
Skyler Lehmkuhl f9e2d36f3a add metatracks 2025-10-18 22:56:38 -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
Skyler Lehmkuhl 7bade4517c Move frames to animation curves 2025-10-13 22:41:08 -04:00
Skyler Lehmkuhl 9f338ba6dc Start refactoring 2025-10-05 23:08:31 -04:00
Skyler Lehmkuhl ff76b93b9d improve detection 2025-01-31 07:12:12 -05:00
Skyler Lehmkuhl 18fad499c5 Automatically resize audio buffer to prevent overruns 2025-01-31 06:44:03 -05:00
Skyler Lehmkuhl 749caa14a5 Add RecordedAudioTrack 2025-01-29 04:41:59 -05:00
Skyler Lehmkuhl e12c2e8877 Require user interaction to start audio 2025-01-25 18:48:34 -05:00
Skyler Lehmkuhl cdd1ff2cbf sound is playing! 2025-01-25 05:39:57 -05:00
Skyler Lehmkuhl 065e6eb99e Show wait cursor while loading a file 2025-01-23 16:41:00 -05:00
Skyler Lehmkuhl ca69813a5c Make moving frames undoable 2025-01-23 16:30:45 -05:00
Skyler Lehmkuhl 1bfacd6b11 Fix "frame deleting" issue 2025-01-23 16:30:45 -05:00
Skyler Lehmkuhl e13c92f661 Fix clicking on layers bug 2025-01-23 16:30:24 -05:00
Skyler Lehmkuhl 139aedd5de fix a few errors 2025-01-23 05:23:26 -05:00
Skyler Lehmkuhl f88c1f1408 Cache line highlight pattern to improve performance 2025-01-23 05:09:49 -05:00
Skyler Lehmkuhl 2de03ff7f7 restore finishEncoding function 2025-01-23 04:55:46 -05:00
Skyler Lehmkuhl c79476e7a9 Cache icon rendering to improve performance 2025-01-23 04:55:18 -05:00
Skyler Lehmkuhl babd2ebbdc remove text/plain MIME type 2025-01-18 03:44:00 -05:00
Skyler Lehmkuhl 268790943f Add option to reopen file from last session 2025-01-18 03:32:53 -05:00
Skyler Lehmkuhl 666db06b78 Fix new file dialog 2025-01-18 03:17:54 -05:00
Skyler Lehmkuhl 7b6dbf21c2 fix opening files on macOS 2025-01-18 03:13:15 -05:00
Skyler Lehmkuhl c7151d6796 Fix objects not showing up when imported multiple times 2025-01-18 00:25:36 -05:00
Skyler Lehmkuhl c76cc75337 store parents in json 2025-01-17 23:44:41 -05:00
Skyler Lehmkuhl 871793115f Fix crash when object deleted from frame 2025-01-17 23:19:24 -05:00
Skyler Lehmkuhl f642fa8e4d Make file opening work properly 2025-01-17 21:27:15 -05:00
Skyler Lehmkuhl 6e4f3d670f work on opening files 2025-01-17 21:09:45 -05:00
Skyler Lehmkuhl 62ad2e35f2 cleanup 2025-01-17 20:13:38 -05:00
Skyler Lehmkuhl 2d355a13b9 Add 'New Window' command 2025-01-16 21:48:39 -05:00
Skyler Lehmkuhl b76dcc7a7e work on converting timeline to widgets 2025-01-16 21:40:05 -05:00
Skyler Lehmkuhl 33896c693d Fix audio layers going offscreen 2025-01-16 20:12:44 -05:00
Skyler Lehmkuhl e321b2bfcc Fix duplicate objects showing up after grouping 2025-01-16 19:36:02 -05:00
Skyler Lehmkuhl 49a7e3f75f Fix audio 2025-01-15 21:15:05 -05:00
Skyler Lehmkuhl 7b28257d3f Fix line colors 2025-01-15 21:14:51 -05:00
Skyler Lehmkuhl b3a05944e9 Play from beginning if on last frame 2025-01-15 18:36:32 -05:00
Skyler Lehmkuhl 9058ed4989 Use pointer events instead of mouse events 2025-01-15 00:33:37 -05:00
Skyler Lehmkuhl fd39350d7a Fix undoing group sent shapes to 0,0 2025-01-14 23:39:31 -05:00
Skyler Lehmkuhl 14f14d03c8 fix deleting objects 2025-01-14 23:36:54 -05:00
Skyler Lehmkuhl df3e2832bf Make polyfilled save dialog consistent with other dialogs 2025-01-14 22:03:20 -05:00
Skyler Lehmkuhl 2ab0df9835 Fix polyfill 2025-01-14 20:34:55 -05:00
Skyler Lehmkuhl 542892cb7b Fix polyfill 2025-01-14 20:31:25 -05:00
Skyler Lehmkuhl 17fe5299dc Enable fast open for files which support it 2025-01-14 19:57:10 -05:00
Skyler Lehmkuhl f0a3930ed7 use correct libav 2025-01-14 19:50:12 -05:00
Skyler Lehmkuhl 2979fdfd6b Make video resolution match stage dimensions for now 2025-01-14 19:48:16 -05:00
Skyler Lehmkuhl 2a0a1f6a92 Delete dead code 2025-01-14 19:46:07 -05:00
Skyler Lehmkuhl e19421aa37 Refactor webm and mp4 export to share logic 2025-01-14 19:44:29 -05:00
Skyler Lehmkuhl 29f1b8cda2 Add proper mp4 encoding 2025-01-14 19:34:05 -05:00
Skyler Lehmkuhl 4bb27e5e8c Restore frame number after exporting 2025-01-14 17:36:35 -05:00
Skyler Lehmkuhl 3134c8d8a5 Add webm export 2025-01-14 07:10:36 -05:00
Skyler Lehmkuhl 62daaf9e42 technically a new file version 2025-01-14 02:10:39 -05:00
Skyler Lehmkuhl bbaac4ebc3 Fix animations in imported clips not playing grouped object movements correctly 2025-01-14 02:09:55 -05:00
Skyler Lehmkuhl eceadb0a27 Fix mp4 export on macOS 2025-01-14 00:19:37 -05:00
Skyler Lehmkuhl 5aeab780ab hack to fix pink squares in some files 2025-01-13 22:32:29 -05:00
Skyler Lehmkuhl 7eaae15ff3 Fix pasting multiple times 2025-01-13 20:08:58 -05:00
Skyler Lehmkuhl 1f10ec5bcb Better errors for failing to open 2025-01-13 17:35:25 -05:00
Skyler Lehmkuhl 74809acd2d Handle missing textures better (and export them properly) 2025-01-13 17:34:16 -05:00
Skyler Lehmkuhl 8a3beaa9f8 Fix errors when files refer to now nonexistant frames 2025-01-12 23:25:11 -05:00
Skyler Lehmkuhl 8c2e5011bb Fix timeline collapse on import 2025-01-12 14:39:07 -05:00
Skyler Lehmkuhl 9dff8d7bee Fix import issue 2025-01-12 13:40:08 -05:00
Skyler Lehmkuhl d4cb0513ca Add Recenter View menu option 2025-01-12 02:54:58 -05:00
Skyler Lehmkuhl 4eb30c5cb4 Fix import error 2025-01-12 02:37:38 -05:00
Skyler Lehmkuhl 87a3e0abc3 very hacky mp4 export 2025-01-12 01:01:35 -05:00
Skyler Lehmkuhl a9af6028c0 make keyframe shortcuts consistent with Flash 8 2025-01-11 17:24:07 -05:00
Skyler Lehmkuhl f4c5b9b996 fix layer visibility toggle 2025-01-11 17:23:35 -05:00
Skyler Lehmkuhl 1b65cc08ea Make keyframe shortcuts configurable 2025-01-10 20:39:47 -05:00
Skyler Lehmkuhl e85f7d4011 Add accelerator for New Keyframe menu option 2025-01-10 20:38:06 -05:00
Skyler Lehmkuhl fe2b1cce57 Use new frame api to enable/disable motion and shape tween menu items 2025-01-10 20:33:11 -05:00
Skyler Lehmkuhl ab6f5829b6 Fix importing from other files 2025-01-10 20:10:46 -05:00
Skyler Lehmkuhl 3b6faa0464 Add "duplicate keyframe" menu item 2025-01-10 20:05:39 -05:00
Skyler Lehmkuhl 2ce75df4d0 Fix selection on later frames 2025-01-10 19:22:14 -05:00
Skyler Lehmkuhl 4b3c89d919 Prevent right-click menu from showing up 2025-01-10 18:48:15 -05:00
Skyler Lehmkuhl e22bafdeeb remove unnecessary logs 2025-01-10 18:47:43 -05:00
Skyler Lehmkuhl cf90cc183c Make flood fill use shape bounds to instead of stage 2025-01-10 18:28:21 -05:00
Skyler Lehmkuhl 596dd9501c Move growBoundingBox to utils.js 2025-01-10 18:27:10 -05:00
Skyler Lehmkuhl 112de7ed1a Fix paint bucket coordinates inside objects 2025-01-10 18:26:13 -05:00
Skyler Lehmkuhl 9205205ecd Add line numbers back to web console 2025-01-10 18:25:39 -05:00
Skyler Lehmkuhl b4d8a9a10a fix play from frame 2025-01-10 03:11:16 -05:00
Skyler Lehmkuhl 94f887efb1 Fix bounding box issues 2025-01-10 01:33:15 -05:00
Skyler Lehmkuhl 3819988d5e initial refactoring work 2025-01-10 00:11:55 -05:00
Skyler Lehmkuhl 6eef61c5c7 Prevent errors during rendering from flooding the log 2025-01-08 05:00:54 -05:00
Skyler Lehmkuhl 0715abdf74 fix mouse clicks in wrong position in color selection or outliner when zoomed in or out 2025-01-08 04:36:37 -05:00
Skyler Lehmkuhl a577541b54 Add logging 2025-01-08 04:03:03 -05:00
Skyler Lehmkuhl 28f17a6b6e Fix grouped groups not being copy-pastable 2025-01-06 19:20:48 -05:00
Skyler Lehmkuhl 97ff909559 Initial work on player 2025-01-06 16:40:49 -05:00
Skyler Lehmkuhl 6d6b7a2154 Fix being unable to select imported objects 2025-01-06 16:27:28 -05:00
Skyler Lehmkuhl b1be503de9 Fix errors in goToFrame 2025-01-06 16:01:25 -05:00