Repository navigation
feat(kit): livelier html films with arc and breathe helpers - #24
Merged
Merged
Conversation
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
Makes html films move about as much as Motion's. In the side-by-side review on #17, the html path matched Motion on layout and consistency, but its motion was sparser. This adds the authoring rules and two player helpers that close most of that gap, and adjusts the layout check so it keeps working with gently moving elements.
Part of #19 (authoring guidance). Part of #16.
Result
The WIF film was rebuilt from the same script, narration and BGM. Share of time in which something on screen moves (30 fps MP4, frame-difference measure):
The reviewer judged the rebuilt film good enough to publish.
The first rebuild with rules 1–6 only reached 26%. The remaining gap in
impersonateandconditionwas in the story beats, not in how single elements move: Motion carried the access token back to the job and showed a token passing the condition before the rejected one. Rule 7 covers that.Changes
references/html-film.md, new section "動きを豊かにする" (seven rules):scaleX), not faded in<span>.checkmeasures an element with direct text by its text, so an icon or underline outside the text is reported as sticking out.kit/player.js:film.arc(tl, what, target, at, { dur, lift, dx, dy })andfilm.breathe(tl, what, id, at, amount).breatheruns an even number of half-cycles, so the element ends at its own size when the scene ends.scripts/layout.ts: a box may shift up to 3 px (was 1 px) between samples and still count as still. A push-in or a breathing card moves 1–2 px per sample; a chip in flight moves tens of px.Test plan
make check: lint, typecheck, format, knip, quality gate (no new violations)vitest run --coverage: 91 tests pass (layout.ts100% lines)film.arcrises above the straight line and lands on the target; a breathing box still gets its overlap reported; a box drifting 2 px per sample counts as stillkit→check(layout: ok) →stills→sfx→buildproduced a 57.3 s 1920x1080 MP4 with 23 sound effects; the new effects sit 0–2 dB below narration and BGMFound on the way and filed separately: #23 (
checkdoes not report a stop shorter than 0.4 s).