-
Notifications
You must be signed in to change notification settings - Fork 0
feat(ui): original AmbientGradient shader + act-2 sync cue (ADR 0013) #204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
kilbot
wants to merge
4
commits into
main
Choose a base branch
from
scroll-story-shader-polish
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
2d4b96d
feat(ui): original AmbientGradient shader + act-2 sync pulse (ADR 0013)
kilbot 2e91f20
style(ui): calm blue backdrop palette
kilbot f0466b5
fix: address scroll story shader review feedback
fa7f3a1
style(ui): brighter blue/pink/yellow palette + digital shader character
kilbot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| # 0013 — Site motion language and the ambient gradient | ||
|
|
||
| Date: 2026-07-02 | ||
| Status: accepted | ||
|
|
||
| ## Context | ||
|
|
||
| The scroll-story homepage (ADR 0012) established that motion is central to | ||
| the site's character. The owner's direction, after evaluating dark vs light | ||
| prototypes: light pages, one continuous animated brand gradient tying | ||
| sections together, and — borrowing Stripe's philosophy, not their pixels — | ||
| "restraint, but nearly every element has movement." | ||
|
|
||
| ## Decision | ||
|
|
||
| **Motion rules (site-wide):** | ||
|
|
||
| 1. Animate only `transform` and `opacity` in loops; canvas/WebGL for the two | ||
| signature elements (ambient gradient, dot orbit) with rAF gated by | ||
| IntersectionObserver and `visibilitychange`. | ||
| 2. Everything honours `prefers-reduced-motion` (static frame or no | ||
| animation; the homepage swaps to `StoryStatic`). | ||
| 3. Ambient loops are slow (≥9s periods); interaction feedback is fast | ||
| (<500ms). Nothing autoplays sound, blocks input, or shifts layout. | ||
| 4. Backgrounds may drift; **pinned foreground objects hold still**. | ||
| 5. Every section-level animation must illustrate the copy's point, not | ||
| decorate it (hardware carousel = "anything works"; arc pulses = sync; | ||
| synchronized Charge buttons = "same store, same data"). | ||
|
|
||
| **The ambient gradient** (`src/components/ui/ambient-gradient.tsx`) is an | ||
| original ~180-line WebGL fragment shader: domain-warped value noise through | ||
| the backdrop palette (blue-led with pink/yellow splashes — bright but calm; warm red/orange washes ruled out, brand red lives only in small accents) with a digital character: terraced contour lines and a bright filament through the noise field, not soft cloud inside a | ||
| bottom-left→top-right diagonal band that fades to warm white where copy | ||
| sits, with slow upward drift (echoing the homepage's coffee steam). It is | ||
| deliberately *not* Stripe's minigl or any recreation of it — inspired-by, | ||
| clean-room. Static CSS-gradient fallback on missing WebGL or context loss; | ||
| single-frame render under reduced motion; DPR capped at 1.5. | ||
|
|
||
| It is a reusable primitive: pricing/pro/downloads heroes adopt it as the | ||
| follow-up to this ADR. | ||
|
|
||
| ## Consequences | ||
|
|
||
| - One GPU surface per page for the signature background; everything else is | ||
| compositor-only CSS. Old-hardware cost stays bounded. | ||
| - The homepage's per-act drifting patterns were removed in favour of | ||
| foreground act animations (rule 5). | ||
| - A `Reveal` scroll-into-view primitive (IntersectionObserver + <500ms | ||
| transform/opacity) is the next building block for non-homepage pages. | ||
| - **Interactive kit direction:** the site standardises on two libraries and | ||
| pushes them hard — `motion` (scroll, springs, gestures, SVG pathLength) | ||
| and `three` + `@react-three/fiber` (lazy-loaded, component-scale 3D | ||
| centerpieces such as a pointer-reactive spike burst). Custom canvas/WebGL | ||
| (DotOrbit, AmbientGradient) stays for cases smaller than a three scene. | ||
| Kit lives in `src/components/motion/`; every piece is IO/visibility gated | ||
| and reduced-motion aware. First deployments: downloads "how it fits | ||
| together" hub pulses, about-us timeline draw-on-scroll. |
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.