Repository navigation
Add multi-SVG frame sequence support to plot prep tool - #32
Merged
Merged
Conversation
The prep tool now accepts a list of same-size SVGs, a folder, or the studio's frame-sequence zip (SVGs in the root or an svg/ subfolder) — geared to the video export. Frames are laid out as a centered grid with per-frame margin, adjustable gap and page-edge clearance, across as many pages as needed, with a paged preview. - mixed frame sizes are rejected with a clear message - matching layers of all frames are merged into one layer per label, so color/layer selection in saxi stays as simple as for a single SVG - each frame carries its number in plottable Hershey simplex digits, on a frame-labels layer - paper outline gained a style select (full rectangle, corners, crosses) — around each frame cell in multi mode, and available for single SVGs too - export downloads a zip with one decorated page SVG per sheet New prep modules: zipRead (stored + deflate reader), hershey (public domain simplex digits), multi (grid math, name utils, layer merge), outline (mark styles) — pure parts unit-tested. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GJsUC1mnuqLosvcYYg27js
The label keeps (margin − height)/2 below its baseline; use the same inset from the cell's left edge instead of the full frame margin. Trim the Hershey glyphs' left side bearing so the ink starts exactly at the inset — digit 1 carries a wide built-in bearing that would otherwise push it visibly right. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GJsUC1mnuqLosvcYYg27js
New 'number offset' slider under frame layout sets the number's distance from its cell's bottom-left corner, and a 'frame numbers' toggle under output layers turns the layer off entirely (hiding the slider with it). The number's cap height is a fixed 2.5 mm now instead of following the margin. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GJsUC1mnuqLosvcYYg27js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Extends the plot prep tool to handle multiple same-size SVGs as a frame sequence, laying them out in a grid across multiple pages. This enables batch processing of animation frames or studio video exports directly in the prep tool.
Key Changes
Frame sequence input: Accept multiple SVGs, folders, or ZIP archives (including the studio's frame-sequence format) via drag-and-drop or file picker
svg/subfolder supportGrid layout system (
src/lib/prep/multi.ts):fitsflag when frames exceed usable areaFrame numbering: Renders frame numbers as single-stroke Hershey digits (
src/lib/prep/hershey.ts)Paper outline styles (
src/lib/prep/outline.ts):Layer merging (
src/lib/prep/multi.ts):Multi-frame export:
ZIP reading (
src/lib/prep/zipRead.ts):UI enhancements:
Implementation Details
https://claude.ai/code/session_01GJsUC1mnuqLosvcYYg27js