Let path nodes dim as the spine retreats
Node state now mirrors the fill in both directions with a small deadband, so scrolling back up visibly unlights the stages instead of leaving them stuck on.
This commit is contained in:
1 parent
23a55ea711
commit
a4e9bbc1ea
2 files changed
+14
-10
No files matched your search
@@ -33,8 +33,9 @@ Date: 2026-11-01
|
||||
- `src/scripts/site.js`
|
||||
- The spine handler computes the fill tip against the spine's real top (10px)
|
||||
and height (wrap height − 20px), then compares each node's centre against
|
||||
it. A node gets `.lit` when the fill reaches it and stays lit (completed
|
||||
milestones, no flicker on small scroll jitter).
|
||||
it. Nodes mirror the fill in both directions: they light when it reaches
|
||||
them and dim when it retreats above them, with a 6px deadband so small
|
||||
scroll jitter cannot flicker the state.
|
||||
- The same scroll-linked logic runs under reduced motion, so nodes still
|
||||
respond; only the CSS animation/transitions are stopped. The previous
|
||||
reduce branch force-lit every node and filled the spine to 100%, which made
|
||||
@@ -58,7 +59,8 @@ Date: 2026-11-01
|
||||
- Peacock `animation-name: peacock-bob`, duration 6s, `--bob: 6px`; sampled
|
||||
range 4.88px over a partial cycle (the full cycle is 6px).
|
||||
- Scrolling the path lit nodes in order (`0000 → 1000 → 1100 → 1110 → 1111`)
|
||||
while the spine fill advanced 0→100%, in both normal and reduced-motion mode.
|
||||
while the spine fill advanced 0→100%, and scrolling back up dimmed them in
|
||||
reverse. Verified in both normal and reduced-motion mode.
|
||||
- Reduced motion: peacock/aura animations `none` and the fill starts at 0%; nodes
|
||||
stay unlit until scrolling reaches them. This is what the user saw as
|
||||
"peacock stays still / nodes lit by default".
|
||||
@@ -69,8 +71,8 @@ Date: 2026-11-01
|
||||
|
||||
## Notes
|
||||
|
||||
- Nodes intentionally stay lit after the fill passes them; scrolling up shrinks
|
||||
the line but does not erase completed stages.
|
||||
- Nodes track the line both ways, so the path reads as a live progress trail
|
||||
rather than a one-way checklist.
|
||||
- The peacock/aura motion is intentionally off when the visitor (or the
|
||||
developer's machine) has `prefers-reduced-motion: reduce`. If the bob looks
|
||||
frozen, check that setting first.
|
||||
|
||||
Reference in new issue
Block a user