Repository navigation
morpho: build from scratch, timing, layout notes, video and fit - #21
Merged
Merged
Conversation
From making a poster with nothing but morpho, the gaps were: adding things, seeing when things move, judging layout, exporting video, and matching a reference without guessing. Now: - new / add (text, shape, line, path, modifier, group, font, image) / remove / duplicate / arrange, with presets, recipes and placement; Layer.preset= and Layer.recipe= work in any assignment - align: lines layers up by what they draw, not their anchors - timing: entrances, exits, loops and keyframes as bars on the clock, with notes on rhythm (all at once, dead air, cut off by the clock) - layout, and in check: boxes and margins, near-miss edges, nearly centred, crowded edges, no clear lead, visual weight and palette - video: MP4, WebM, GIF or PNG frames, drawn frame by frame and piped to ffmpeg (a 4 s loop exports in about 3 s) - fit: tunes settings until the design matches a reference picture Fixes found on the way: a new loop or entrance kind takes its own default amount (spin was 16 turns); motion pops are judged against the frames either side, so fast smooth moves aren't flagged; loop seams against the frame before; embedded fonts survive reloads; weight is measured from pixel centres. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Stacked on #20 (base
ai-tools). Merge #20 first, then retarget this tomain.I made a poster with nothing but morpho and fixed each place I got stuck. The first round could tweak a design but not make one, couldn't show timing, didn't judge layout, and had no video export.
New commands
new--canvas 1080x1350or a preset name,--bgas a colour, gradient or preset,--duration.add--name --at --size --font --color --materialor--preset,--recipe, and--above,--belowor--intofor placement. Alsoadd modifier <kind> --to L [--fields],add group A B [--merge],add font f.ttf(embeds it and prints the id for--font), andadd image p.png [--to L].remove,duplicate,arrangeduplicategives the copy new ids and moves its modifier keyframes to the new uids.set Layer.preset="…",Layer.recipe=…aligntiminglayoutvideofitNew layout notes, in
checkandlayout:Fixes found by using it
The poster, made with the tools
docs/AGENT-TOOLS.mdhas the full sequence; it runs as written.checksaid the title was 10% off both edges and that the loop jumped, because the entrance replayed.set(smaller title, fade out at 3.3 s) andalign,checkreported no problems and a smooth loop join.videothen exported a 120-frame MP4 in 2.6 s.Tests
npx tsc --noEmit -p ui,npx vitest runandnpm run build && npm run test:e2epass locally. I ran the e2e test withCHROMIUM_PATHset to Chrome.🤖 Generated with Claude Code