diff --git a/src/pages/auth/AuthBranding.tsx b/src/pages/auth/AuthBranding.tsx index 230af424f..468fe173d 100644 --- a/src/pages/auth/AuthBranding.tsx +++ b/src/pages/auth/AuthBranding.tsx @@ -6,6 +6,7 @@ import { motion } from "framer-motion"; import { Package, Factory, SlidersHorizontal, Brain, Rocket } from "lucide-react"; import { AppLogo } from "@/components/layout/AppLogo"; import astronautSvg from "@/assets/astronaut.svg"; +import { StarfieldCanvas } from "@/pages/auth/StarfieldCanvas"; interface RocketData { id: number; left: number; size: number; duration: number; rotation: number; scale: number; } interface PlanetData { id: number; left: number; top: number; size: number; duration: number; type: number; delay: number; } @@ -36,6 +37,11 @@ export const SpaceScene = React.memo(({ isFull = true }: { isFull?: boolean }) = const nextIdRef = useRef(0); const starsRef = useRef([]); + // Etapa 12b: feature flag para rollout gradual do StarfieldCanvas. + // Default: true (canvas ativo). Para reverter ao DOM legacy, setar + // VITE_USE_CANVAS_STARFIELD=false no Vercel. + const useCanvasStarfield = import.meta.env.VITE_USE_CANVAS_STARFIELD !== 'false'; + // Detecta prefers-reduced-motion useEffect(() => { const mediaQuery = window.matchMedia("(prefers-reduced-motion: reduce)"); @@ -197,33 +203,35 @@ export const SpaceScene = React.memo(({ isFull = true }: { isFull?: boolean }) = ))} - {/* Dynamic Stars - Otimizado com camadas de animação separadas */} - {activeStars.map((star) => ( -
+ {/* Dynamic Stars - Etapa 12: canvas único por padrão; DOM legacy via flag */} + {useCanvasStarfield ? ( + + ) : ( + activeStars.map((star) => (
-
- ))} + > +
+
+ )) + )} {/* Planets with zigzag trajectory */} @@ -468,4 +476,4 @@ export function AuthBrandingPanel({ onLogoClick }: { onLogoClick?: () => void })
); -} +} \ No newline at end of file