Repository navigation
Add more effects to the Animation tab, and keep the tab out of production for now - #124
Closed
hassan-software-dev wants to merge 2 commits into
Closed
hassan-software-dev wants to merge 2 commits into
hassan-software-dev wants to merge 2 commits into
Conversation
The gallery grows from ten effects to twenty-eight: quick and nudge slides, big and top-quarter arcs, a Repeat group that sets the loop bit, and a Side group of left and right glides, including two nearly straight slides (radius 8000, a drop of a few pixels over the whole slide). A sideways path rides R px from where the layer sits, so choosing an effect now moves the layer to keep the motion centred where it was, as one undoable edit (withAnimPreset, refused on a locked layer, whole pixels, exact round trip; Rise and Set never shift it). The preview adds the layer position to the motion; that the firmware does the same is not verified on a watch, and the panel says so. All new effects are marked as not yet tried on a Watch Pro 2. compat.ts and assertWatchCompat are untouched; every preset is checked against animIssues and passed through assertWatchCompat in the tests. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Choosing an effect moves the layer, and an object that is moved afterwards does not play as the preview shows it, so the tab stays a development-only tool until a watch agrees with the preview. One flag, ANIMATION_TAB (import.meta.env.DEV), drops the tab from the right panel and the phone's panel buttons, and rightPanelSet refuses it in a production build. Faces with animated layers still open, edit and install as before; compat.ts is untouched. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.
What
Follow-up to #122. The Animation tab's gallery grows from ten effects to
twenty-eight, and the tab itself is left out of production builds until a
watch agrees with the preview.
Repeat group (sets the loop bit), and a Side group of left and right
glides, including two nearly straight slides (radius 8000: a drop of a few
pixels over about 290 px of travel, enforced by a test). A sideways path
runs along a circle and rides R px off the layer, so it is a piece of a
circle, not an exact line.
the difference between the two motions' middles (
keepCentre, wholepixels), as one undoable edit (
withAnimPreset, refused on a lockedlayer). Going from one effect to another and back leaves the layer where
it started, and Rise <-> Set never moves it. Both are tested.
ANIMATION_TAB(import.meta.env.DEV)drops the tab from the right panel and from the phone's panel buttons, and
rightPanelSetrefuses it in a production build. Faces with animatedlayers still open, edit and install as before. The reason: the effects move
the layer, and an object that is moved afterwards does not play as the
preview shows it. Drop the flag once a watch agrees with the preview.
What is known, and what is not
Only Rise and Set are bytes known to play on a Watch Pro 2 (Sun Circle's sun
and moon). Every other effect changes only values the firmware reads (angles,
radius, base x, duration, the loop bit); they follow the firmware math ported
in #122, but none has been tried on a watch, and the panel labels them so.
Still unverified, and noted in the code: the preview adds the layer's
position to the motion. That the firmware does the same has not been checked
on a watch, which is what the layer shift above relies on. If it does not, an
effect would play somewhere other than the preview shows (a misplaced image,
not a different widget type).
Safety
compat.tsandassertWatchCompatare untouched. The widget type word isalways written as 2, so no edit reaches the types a Watch Pro 2 boot-loops
on. Every preset is checked against
animIssuesand passed throughassertWatchCompatin the tests, and 200 random sets of field values do thesame.
Testing
tests/doc-anim.test.ts: preset bytes (the proven ones equal the stock sunand moon), the arcs' and slides' positions against the firmware formulas,
the side and straight shapes, the layer-shift round trip.
tests/anim-tab.test.ts: a development build opens the tab, a productionbuild refuses it and the other tabs still open (
DEVstubbed).pnpm check,pnpm lint(nothing in the changed files; one existingwarning in
editor.svelte) and the formatter are clean on the changedfiles. Unit tests pass apart from
tests/typography.test.ts, which fails onWindows because its allowlist uses
/paths (unrelated).🤖 Generated with Claude Code