Skip to content

Soften cursor wind and improve rain rendering with weather presets - #57

Merged
loeck merged 4 commits into
mainfrom
t3/fix-rain-distribution
Nov 8, 2026
Merged

loeck merged 4 commits into
mainfrom
t3/fix-rain-distribution

Conversation

@loeck

@loeck loeck commented Nov 8, 2026 •

Copy link
Copy Markdown
Owner

Summary

Mouse movement now bends trees and grass smoothly in proportion to cursor velocity, with momentum through starts, stops and reversals. A shared local wind field replaces abrupt traveling gusts and rapid cursor-driven foliage vibration.

Rain impacts remain visible farther across the lake, while drops near the camera fade out and their projected streak geometry stays bounded so they cannot stretch across the viewport. Use ?weather=rain&startTime=12:00 to inspect the rainy scene without waiting for live weather.

Changes

  • Drive a critically damped local wind patch from screen velocity, projecting the stroke at a single contact depth to avoid false pushes at tree silhouettes. Trees, grass and falling leaves share the field; reduced motion clears it.
  • Filter water impacts radially and progressively fade unresolved detail. Fade near-camera streaks, guard the perspective divide, and cap motion length and width while keeping direction normalized.
  • Add the weather URL parameter: clear, partly-cloudy, cloudy, overcast, rain and thunderstorm. Valid presets bypass the API, survive reloads and omit live-data attribution; missing or unknown values retain automatic weather.
  • Cover smooth wind response and shared leaf behavior, GPU impact distribution and close-range streaks, plus URL presets and reloads. Document the resulting behavior.

Validation

  • pnpm check passed: types, lint, formatting, 541 unit tests, production build and bundle budget. Existing lint and bundle-size warnings remain.
  • Essential browser suite passed: 13 tests, including mobile emulation (1.9 minutes).
  • Latest native GPU checks passed for active rain, WebGPU/WebGL water and rain readbacks, and the complete WebGPU scene. One scene launch selected the host's intermittent WebGL fallback; the focused native rerun passed.
  • Rain readbacks reproduce both regressions: close drops were visible before the near fade, and an incorrectly normalized capped streak spanned 124 pixels at a 1024-pixel viewport. Both backends now hide the near volume, retain distant drops and keep the visible span below 48 pixels.
  • Weather override coverage passed 6 extended browser tests in the preceding change, including reload without API requests and invalid-value fallback.
  • Exercised cursor sweeps, reversals and stopping in a rainy portrait scene through WebGL without browser errors, and inspected rendered frames. Physical-phone performance was not measured.
  • Review fixed the streak direction normalization bypassing its cap, synchronized a weather test's first navigation, and replaced stale compositor screenshots with canvas pixel capture. Removed obsolete packet gust helpers; no remaining actionable or dismissed findings after review and simplification.

@vercel

vercel Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
dotme Ready Ready Preview Nov 8, 2026 7:02pm UTC

@loeck loeck changed the title Keep rain impacts visible across the lake Fix rain coverage and add URL weather presets Nov 8, 2026
@loeck loeck changed the title Fix rain coverage and add URL weather presets Soften cursor wind and improve rain rendering with weather presets Nov 8, 2026
@loeck
loeck merged commit 60c08a9 into main Nov 8, 2026
3 checks passed

This branch was successfully deployed

1 active deployment
Preview — d70d8c98 Deployed Nov 8, 2026 by vercel[bot]
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