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.
4.0 KiB
4.0 KiB
Motion pass: drifting backdrop, lighting nodes, bobbing peacock
Date: 2026-11-01
Request
- The backdrop was two static gradient blobs; make it dynamic.
- The four nodes on the path spine were static; light each one as its stage is reached.
- The hero peacock was static; bob it up and down 4–6px, ease-in-out, and expose the amount for the user to tweak.
- Apply the
--iridgradient to the "Project" half of the footer wordmark.
Changes
src/layouts/Base.astro.ambientnow 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). Onlytransformchanges, so the backdrop stays on the compositor. - Hero peacock gets
--bob:6px(total travel, i.e. ±3px) and--bob-speed:6s;@keyframes peacock-bobrunstranslate3dbetweencalc(var(--bob) * -.5)andcalc(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-pingring. The old.stage.in .noderule was replaced by.stage.lit .nodeso lighting follows the spine, not text reveal. - Footer
.ft .roller .b("Project") usesbackground:var(--irid)withbackground-clip:textand transparent text fill.
- Auras are individual, two-lobe radial gradients, heavily blurred
(
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
loadand viaResizeObserveras 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; }inglobal.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 tworadial-gradientlayers 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; computedfilterisblur(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
noneand 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-imageis the iridescentlinear-gradient(120deg, …),background-clip: text, text fill transparent. npm run buildpasses (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/opencodeand are not committed.