Repository navigation
[2/3] feat: add the foreground blur, falling leaves and water reflection - #119
Merged
Merged
Conversation
The foliage layer gets a WebGL blur; leaves drift at foreground parallax, falling when clean and rising in the anomaly state; the water mirrors layers 1-6 about its waterline, drawn once into a texture and rippled in strips. Dev builds open a test chunk with F10.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
3 tasks
arudaev
marked this pull request as ready for review
October 23, 2026 21:38
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 and why
The atmosphere layers from docs/04 (layers 4, 7 and 8), as three helpers for any stage chunk:
blurForeground(layer): a WebGL blur on the scroll 1.15–1.2 layer (no-op on Canvas).addLeaves(scene, state): autumn leaves at foreground parallax; they fall and drift left when clean and rise in the anomaly state. The view starts already full of leaves.addReflection(water, layers): finds the waterline from the water layer's alpha, mirrors the given layers about it once into a texture, masks it to the water and ripples it in 4 px strips.Only the ripple strips and the leaves move per frame; the mirror and the blur are built once. The geometry (waterline, mirror placement, ripple, leaf drift) is pure and tested in
fx/atmosphereLayout.ts.Test chunk: in dev builds, F10 (from the HUD) opens
AtmosphereTest, the whole first Rusty Creek chunk: V toggles the atmosphere, A switches clean / anomaly leaves, arrows pan, Esc closes. Dev-only, like the #37 test chunk.Note: the creek art already has reflections painted into the water, so the game's reflection is subtle there (alpha 0.4); it will matter more on the Hidden Garden pond.
Verification
npm run typecheck,npm test(22 passing, 4 new),npm run build; production bundle has neither test scene.Issue
Closes #36 (stacked PR – linked by hand under Development).
Stack
Merge bottom up.