Skip to content

feat(themes): particle swing and blur, manifest version 10 - #338

Merged
jherforth merged 4 commits into
jherforth:mainfrom
adamecker:feature/particle-sway-blur
Oct 27, 2026
Merged

jherforth merged 4 commits into
jherforth:mainfrom
adamecker:feature/particle-sway-blur

Conversation

@adamecker

@adamecker adamecker commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Adds particle swing and blur to the theme engine, and moves the manifest version to 10 — the engine side of the Harvest theme's falling leaves. Particles gain swing (px, over swingSeconds) and blur (px): the swing runs on a wrapper so it never fights the vertical fall/rise transform. Client and server manifest versions move 9 to 10 together (a server test holds them equal), and validation refuses swing or blur below version 10, so an older core rejects a version 10 theme plainly instead of half-applying it. Docs updated. No theme data ships here.

Why a separate PR: swing and blur first went out bundled with the eight themes in #335, which was closed because themes belong in the themes repo. This is the engine on its own, so a version 10 Harvest can land in HomeGlowThemes once this merges.

Testing:

  • Client suite: 788/788, build clean.
  • Server themeStore tests: 10/10, including the client/server manifest-version equality check.
  • New validation test: swing and blur need manifest version 10, pass at 10.
  • Live behavior verified: a version 10 Harvest theme (three leaf shapes, swinging 24–56px over 3.5–6.5s, blurred 0.4–0.8px) renders as expected, and the fixed dock, screensaver and theme scene are unaffected by the shift work in feat(appearance): optional pixel shift against image persistence #337.

Generated with Muse AI 🤖

Particles gain sway (px, over swaySeconds), swaySeconds and blur (px): the sway runs on a wrapper so it never fights the vertical fall/rise transform. Client and server MANIFEST_VERSION move 9 to 10, and validation refuses sway or blur below version 10. Docs updated. No theme data ships here; a version 10 theme such as Harvest exercises it.
@mrramam

mrramam commented Oct 25, 2026

Copy link
Copy Markdown
Collaborator

Nice. Read through it, not run.

  1. Existing particle layers reshuffle. The default swaySeconds: [3, 6] is a range, so draw calls random() for every particle even when a theme sets no sway, and it comes before the color pick. Every existing particle layer (bubbles, snow, stars) is laid out differently after this PR, which is what the per-layer seeds in AmbienceLayer are there to avoid. Drawing sway, swaySeconds and blur only when sway or blur is set (or after color) keeps them as they were.

  2. Naming. sway already means rotation in degrees for sprites (motion: 'sway' with angle, and the sway keyframe). Particle sway is a sideways distance in px. Something like swing would keep the guide unambiguous.

Small: the no-sway branch repeats the inner element's sx; building it once and adding the position would drop the copy.

Sway/swaySeconds/blur are now drawn after the color pick, and only
when the theme sets sway or blur: the swaySeconds [3, 6] default was
consuming a draw for every particle even on themes with no sway,
reshuffling the seeded color/layout of existing layers (bubbles, snow,
stars). The no-sway branch now reuses the inner element's sx instead
of repeating it. Addresses mrramam's review on jherforth#338; the sway/swing
naming question is left open for Adam since Harvest 1.1.0 already
uses sway.
@adamecker

Copy link
Copy Markdown
Contributor Author

Thanks — points 1 and 3 addressed in 329f08c:

  1. Reshuffle fixed. sway, swaySeconds and blur are now drawn after the color pick, and only when the theme sets sway or blur. Verified a sway-less layer now draws the identical seeded stream as before this PR, so existing bubbles/snow/stars layers keep their layouts.
  2. Naming held, not ignored. Renaming particle sway to swing would also mean updating Harvest 1.1.0, which already uses sway/swaySeconds in three layers — leaving that call to Adam rather than renaming unilaterally.
  3. Small fixed. The no-sway branch now reuses the inner element's sx plus positioning instead of repeating it.

@adamecker

adamecker commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor Author

Demo of what this engine enables: Harvest 1.1.0's three leaf shapes (copper, gold, red maple) falling with swing and blur, recorded from the test theme. The dashboard in the clip shows only a clock and Seattle weather, so nothing personal is in frame.

harvest-leaves.mp4

Particle sway is a sideways distance in px, while sway already means rotation in degrees for sprites (motion: 'sway' with angle, and the sway keyframe). Renaming the particle fields to swing and swingSeconds keeps the guide unambiguous. Sprite and flex sway are untouched. Client suite 788/788, build clean.
adamecker pushed a commit to adamecker/HomeGlowThemes that referenced this pull request Oct 26, 2026
Matches the engine rename (jherforth/HomeGlow#338): particle sway is a sideways distance in px, while sway already means sprite rotation in degrees. Sprite and flex sway are untouched.
@adamecker adamecker changed the title feat(themes): particle sway and blur, manifest version 10 feat(themes): particle swing and blur, manifest version 10 Oct 26, 2026
@adamecker

Copy link
Copy Markdown
Contributor Author

Renamed in 046d444: particle sway/swaySeconds are now swing/swingSeconds across the engine, validation, tests and guide. Sprite motion: 'sway' and flex kind: 'sway' are untouched — those keep their existing rotation/lean meaning, which is what the rename disambiguates from. Harvest 1.1.0 is updated to match.

@jherforth jherforth added the enhancement New feature or request label Oct 26, 2026
@jherforth jherforth added this to the 1.11 milestone Oct 26, 2026
@jherforth

Copy link
Copy Markdown
Owner

Thanks, this holds up. I rendered bubbles, snow and stars layers with the same seed on main and on this branch, and the markup is byte-for-byte identical, so existing themes are untouched. With today's main merged locally, client tests and the build pass. I added one commit (0465a3e): version 10 in the guide's manifestVersion list, which stopped at 9. CI passes.

@jherforth
jherforth merged commit 97e4567 into jherforth:main Oct 27, 2026
3 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in HomeGlow Kanban Oct 27, 2026
jherforth pushed a commit to jherforth/HomeGlowThemes that referenced this pull request Oct 27, 2026
…ents

Harvest 1.1.0 moves to manifest version 10 so its leaves can sway and blur: three falling leaf layers (copper asymmetric, gold round, red maple, all stem-up), swaying 24-56px over 3.5-6.5s with a soft 0.4-0.8px blur, replacing the single straight-falling layer. The leaf corner ornaments are gone: at 20px they read as brown blobs straddling the frame, and the copper double-rule frame stands on its own. Requires jherforth/HomeGlow#338 (particle sway/blur engine) — core version 9 refuses version 10 themes until that merges.
adamecker pushed a commit to adamecker/HomeGlow that referenced this pull request Oct 27, 2026
… themes jherforth#338, chore card jherforth#341

Upstream rewrites taken as-is (new AdminPanel/AdminRows/AdminShell,
particle swing + blur, chore edge fade). Adam's Google Tasks UI
re-inserted into the new AdminRow user controls; custom emoji input
and schema 34 migration registration preserved.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants