Files
site/.agent/memories/motion-pass-2026-11-01.md
yigid a4e9bbc1ea 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.
2026-11-01 13:42:57 +03:00

81 lines
4.0 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Motion pass: drifting backdrop, lighting nodes, bobbing peacock
Date: 2026-11-01
## Request
1. The backdrop was two static gradient blobs; make it dynamic.
2. The four nodes on the path spine were static; light each one as its stage
is reached.
3. The hero peacock was static; bob it up and down 4–6px, ease-in-out, and
expose the amount for the user to tweak.
4. Apply the `--irid` gradient to the "Project" half of the footer wordmark.
## Changes
- `src/layouts/Base.astro`
- `.ambient` now holds three `<span class="aura a1/a2/a3">` layers instead of
one element with two background gradients.
- `src/styles/global.css`
- Auras are individual, two-lobe radial gradients, heavily blurred
(`filter:blur(clamp(48px,7vmax,100px))`), each drifting and scaling on its
own clock (46s/58s/72s, negative delays, `alternate` + `ease-in-out`).
Only `transform` changes, so the backdrop stays on the compositor.
- Hero peacock gets `--bob:6px` (total travel, i.e. ±3px) and
`--bob-speed:6s`; `@keyframes peacock-bob` runs `translate3d` between
`calc(var(--bob) * -.5)` and `calc(var(--bob) * .5)`.
- Nodes now have a visible unlit state (dark disc + inset hairline ring) and a
lit state: iridescent fill, teal/blue halo, slight scale, plus a one-shot
`node-ping` ring. The old `.stage.in .node` rule was replaced by
`.stage.lit .node` so lighting follows the spine, not text reveal.
- Footer `.ft .roller .b` ("Project") uses `background:var(--irid)` with
`background-clip:text` and transparent text fill.
- `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. 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
the path look pre-completed.
- Recomputes on `load` and via `ResizeObserver` as well as scroll/resize, so
late font/layout shifts do not leave the fill or nodes out of sync.
## Tuning
- Peacock travel: `.hero-peacock { --bob: 6px; }` in `global.css` (total px,
split half above and half below the resting position).
- Peacock tempo: `.hero-peacock { --bob-speed: 6s; }`.
- Backdrop softness: the `filter:blur(...)` radius on `.aura`, the two
`radial-gradient` layers per aura, and the `@keyframes aura-*` translate /
scale values for `.aura.a1/.a2/.a3`.
## Verified (headless Chromium via CDP, built site)
- Auras report their own `aura-*` animations and their transform matrices change
over time; computed `filter` is `blur(100px)` at 1440px.
- 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%, 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".
- 390px: no horizontal overflow.
- Footer "Project" computed `background-image` is the iridescent
`linear-gradient(120deg, …)`, `background-clip: text`, text fill transparent.
- `npm run build` passes (5 routes); no console/page errors.
## Notes
- 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.
- Screenshots and verification scripts live in `/tmp/opencode` and are not
committed.