From fad3223af3d3776e6050993108e46a692858d0ac Mon Sep 17 00:00:00 2001 From: jwinterm Date: Sat, 6 Jun 2026 17:31:43 -0400 Subject: [PATCH] Restore tuned nebula; make splash logo static for stable mobile LCP - Revert the nebula density/parallax change that disturbed the carefully tuned streamer convergence (it gave no perf benefit; the nebula is behind the splash and not in the load trace). - Logo is now fully static (no float/breath) so it's a stable LCP candidate on mobile; the rings, glow pulse, and staged button fade-ins still carry the motion. (Desktop TBT win from the framer->CSS conversion is retained.) --- .../src/components/landing/hero-splash.tsx | 5 ++--- packages/ui/src/procedural/nebula-field.tsx | 22 ++++++++++++------- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/apps/web/src/components/landing/hero-splash.tsx b/apps/web/src/components/landing/hero-splash.tsx index ff18473..7a3143a 100644 --- a/apps/web/src/components/landing/hero-splash.tsx +++ b/apps/web/src/components/landing/hero-splash.tsx @@ -49,8 +49,8 @@ function SuchMark({ animate }: { animate: boolean }) { /> )} - {/* letters with a gentle breath */} - + {/* letters: static so they're a stable LCP candidate */} + {/* S */} {/* U */} @@ -137,7 +137,6 @@ export function HeroSplash({ onEnter, sectionRef }: { onEnter: () => void; secti style={{ animationDuration: "4.5s" }} /> { ); }; -export const NebulaField = ({ className, density = 4, themeMode = 'dark', position }: NebulaProps) => { +export const NebulaField = ({ className, density = 8, themeMode = 'dark', position }: NebulaProps) => { // === ALL HOOKS MUST BE CALLED BEFORE ANY CONDITIONAL RETURNS === const monitorControls = useAnimation(); const [monitorColor, setMonitorColor] = useState(themeMode === 'light' ? "text-sky-500" : "text-cyan-400/70"); const [prefersReducedMotion, setPrefersReducedMotion] = useState(false); + // Parallax Scroll hooks (called unconditionally) + const { scrollY } = useScroll(); + const yRange = useTransform(scrollY, [0, 1000], [0, 250]); + // Position calculations const computerX = position?.x ?? 18; const computerY = position?.y ?? 18; @@ -187,7 +191,7 @@ export const NebulaField = ({ className, density = 4, themeMode = 'dark', positi {/* Slowly-pulsing Cherenkov "reactor pool" bloom */} @@ -217,10 +222,11 @@ export const NebulaField = ({ className, density = 4, themeMode = 'dark', positi - {paths.map((d: string, i: number) => ( ))} - + ); };