Document the motion pass and tuning points
This commit is contained in:
1 parent
fb7cf66a30
commit
ece51f3f06
2 files changed
+73
No files matched your search
@@ -0,0 +1,67 @@
|
||||
# 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 radial-gradient discs, 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:5px` (total travel, i.e. ±2.5px) and
|
||||
`--bob-speed:7s`; `@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 now 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).
|
||||
- Reduced motion: fill 100%, every stage gets `.lit`, and the global
|
||||
reduced-motion rule stops all animations.
|
||||
|
||||
## Tuning
|
||||
|
||||
- Peacock travel: `.hero-peacock { --bob: 5px; }` in `global.css` (total px,
|
||||
split half above and half below the resting position).
|
||||
- Peacock tempo: `.hero-peacock { --bob-speed: 7s; }`.
|
||||
- Backdrop drift: the `animation` duration and `@keyframes aura-*` translate /
|
||||
scale values for `.aura.a1/.a2/.a3`.
|
||||
|
||||
## Verified (headless Chromium via CDP, dev server)
|
||||
|
||||
- Auras report their own `aura-*` animations and their transform matrices change
|
||||
over time.
|
||||
- Peacock `animation-name: peacock-bob`, duration 7s, `--bob: 5px`; sampled
|
||||
range 3.65px over a partial cycle (the full cycle is 5px).
|
||||
- Scrolling the path lit nodes in order (`0000 → 1000 → 1100 → 1110 → 1111`)
|
||||
while the spine fill advanced 0→100%.
|
||||
- Reduced motion: peacock/aura animations `none`, all four nodes lit, fill 100%.
|
||||
- 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 intentionally stay lit after the fill passes them; scrolling up shrinks
|
||||
the line but does not erase completed stages.
|
||||
- Screenshots and verification scripts live in `/tmp/opencode` and are not
|
||||
committed.
|
||||
Reference in new issue
Block a user