Skip to content

Add a shared wind with gusts that roll across each scene - #10

Merged
vaprdev merged 2 commits into
mainfrom
wind
Oct 10, 2026
Merged

vaprdev merged 2 commits into
mainfrom
wind

Conversation

@vaprdev

@vaprdev vaprdev commented Oct 10, 2026

Copy link
Copy Markdown
Owner

Summary

Every plant rocked on its own sine wave, so scenes never felt like they had weather. A shared wind in src/wind.ts sends a gust across the whole screen, left to right, every minute or so.

+gust(x, t)          0..1 at x; add to petals, snow, dust
-Math.sin(t * rate + phase)
+sway(x, t, phase, rate)   same rocking in calm air, plus a lean as a gust passes
+SwayLayer           bends plants painted once in layout() without redrawing them

Used in every outdoor scene, with mist, heat shimmer and flags that respond to it; ocean motes light up in the light shafts. Exported from the API and documented.

Evidence

Before (main) on the left, after on the right.

wind

wind 2

A gust crossing the farm
farm gust

Verification: bun run typecheck passes; CI's check job runs dev/check.ts (flicker, frame time) on this branch.

Merge Danger

Door: two-way

Blast Radius: visuals

All outdoor wallpapers; gust lean is softened during integration in #1.

Merged together with the other visual improvements in #1; this PR's CI screenshot check fails by design because screenshots are regenerated there.

@vaprdev
vaprdev merged commit 517f3b8 into main Oct 10, 2026
1 of 2 checks passed
@vaprdev
vaprdev deleted the wind branch October 10, 2026 16:42
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