Skip to content

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
fmctools:mainfrom
hassan-software-dev:feat/pro2-anim-effects
Closed

hassan-software-dev wants to merge 2 commits into
fmctools:mainfrom
hassan-software-dev:feat/pro2-anim-effects

Conversation

@hassan-software-dev

Copy link
Copy Markdown
Contributor

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.

  • More effects: quick and nudge slides, big and top-quarter arcs, a
    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.
  • Effects keep the motion where it was: choosing one moves the layer by
    the difference between the two motions' middles (keepCentre, whole
    pixels), as one undoable edit (withAnimPreset, refused on a locked
    layer). Going from one effect to another and back leaves the layer where
    it started, and Rise <-> Set never moves it. Both are tested.
  • Dev-only tab (second commit): ANIMATION_TAB (import.meta.env.DEV)
    drops the tab from the right panel and from the phone's panel buttons, and
    rightPanelSet refuses it in a production build. Faces with animated
    layers 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.ts and assertWatchCompat are untouched. The widget type word is
always written as 2, so no edit reaches the types a Watch Pro 2 boot-loops
on. Every preset is checked against animIssues and passed through
assertWatchCompat in the tests, and 200 random sets of field values do the
same.

Testing

  • tests/doc-anim.test.ts: preset bytes (the proven ones equal the stock sun
    and 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 production
    build refuses it and the other tabs still open (DEV stubbed).
  • pnpm check, pnpm lint (nothing in the changed files; one existing
    warning in editor.svelte) and the formatter are clean on the changed
    files. Unit tests pass apart from tests/typography.test.ts, which fails on
    Windows because its allowlist uses / paths (unrelated).
  • Browser tests were not run locally; nothing was flashed to a watch.

🤖 Generated with Claude Code

hassan-software-dev and others added 2 commits November 29, 2026 18:43
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant