Repository navigation
Add an Animation tab for the Watch Pro 2's animated image (0x82, type 2) - #120
Closed
hassan-software-dev wants to merge 1 commit into
Closed
hassan-software-dev wants to merge 1 commit into
hassan-software-dev wants to merge 1 commit into
Conversation
The editor kept these layers byte for byte but treated them as plain images. Decode the 0x5c body into a typed view (duration, start/end angle; the fields whose meaning isn't known stay raw, named by offset) with an encoder that reproduces the stock bytes, and edit it through a pure withAnim edit. - Animation tab in the right panel: the layer list, a timeline that plays or scrubs on its own clock, and the effect fields. - Preview: one geometry function (render/anim.ts) places the image by value and replays the wake sweep; the simulator can wake the screen, and a time, sunrise or sunset change replays it too. - "Animated layer" in the add menu, seeded with Sun Circle's exact body. - Selecting a layer no longer leaves the Animation tab. compat.ts and assertWatchCompat are untouched; types 0..3 were already allowed on a Pro 2. The geometry is a model that fits Sun Circle, to be checked on a watch. Sun Circle AOD is added as a round-trip fixture. 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
The Watch Pro 2 (stock 1.0.0.73) already plays the animated image widget
(tag 0x82, type 2), but the editor treated types 0..3 as plain images and
only kept their bytes. This adds editing and preview for it.
proc.ts): duration, start/end angle,and the fields whose meaning isn't known, kept raw and named by offset
(
raw4..raw18,flags,tail).encodeAnimreproduces the stock bytes.scrubs on its own clock, the effect fields). Selecting a layer no longer
leaves this tab.
render/anim.ts): one function places the image by value andreplays the wake sweep. The simulator can wake the screen; changing the
time, sunrise or sunset replays it.
compat.tsandassertWatchCompatare untouched: types 0..3 are alreadyallowed on a Pro 2.
What is and isn't known
Confirmed on a watch: the sun/moon sweep in on wake over about 2 s and their
stop position follows daylight % / night %, bottom to top. From the firmware
(parser at 0x100DB1B4): the s16s at body 12/14 are normalised into +-3600,
read here as tenths of a degree.
Not known: what body offsets 4..11, 16, 18 and 20 do. They are labelled raw
in the UI and kept as found. The preview geometry (angle clockwise from up,
raw16as a pixel radius, art undisplaced at 270 degrees) is a model thatfits Sun Circle's art, not a verified one. Tests that change one field each
(duration, angles, offsets, radius) are planned on a real watch.
Testing
tests/doc-anim.test.ts: the stock body round-trips, edits change only thefield named, the factory layer equals the stock layer, geometry checks.
pnpm checkandpnpm lintclean; unit tests pass apart fromtests/typography.test.ts, which fails on Windows because its allowlistuses
/paths (unrelated to this change).CI will run them.
time, add layer); nothing was flashed to a watch.
🤖 Generated with Claude Code