matrix update

This commit is contained in:
2026-04-30 17:31:30 +07:00
parent 6d87ddf674
commit f836da06d5
5 changed files with 78 additions and 119 deletions
@@ -1,69 +0,0 @@
import { useSettings } from "@/hooks/SettingsContext";
import { motion } from "framer-motion";
export function AnimatedBackground() {
const { reduceMotion } = useSettings();
if (reduceMotion) {
return <div className="fixed inset-0 w-full h-full bg-background -z-10" />;
}
return (
// pointer-events-none важен, чтобы клики не перехватывались фоном
<div className="fixed inset-0 w-full h-full overflow-hidden pointer-events-none -z-10 bg-background">
<div
className="relative w-full h-full"
style={{
// Используем CSS blur вместо SVG. Это лучше оптимизировано в WebKit.
filter: "blur(60px)",
WebkitFilter: "blur(60px)",
// Форсируем создание отдельного слоя в GPU
transform: "translate3d(0,0,0)",
willChange: "transform",
}}
>
<motion.div
className="absolute top-[-10%] left-[-10%] w-[60%] h-[60%] rounded-full bg-chart-1/20"
animate={{
x: [0, 100, 0],
y: [0, 50, 0],
rotate: [0, 90, 0],
}}
style={{ backfaceVisibility: "hidden" }}
transition={{ duration: 20, repeat: Infinity, ease: "easeInOut" }}
/>
<motion.div
className="absolute bottom-[-10%] right-[-10%] w-[50%] h-[50%] rounded-full bg-chart-2/20"
animate={{
x: [0, -50, 0],
y: [0, 100, 0],
rotate: [0, -45, 0],
}}
style={{ backfaceVisibility: "hidden" }}
transition={{ duration: 15, repeat: Infinity, ease: "easeInOut" }}
/>
<motion.div
className="absolute top-[20%] right-[10%] w-[40%] h-[40%] rounded-full bg-chart-3/20"
animate={{
scale: [1, 1.2, 1],
opacity: [0.3, 0.6, 0.3],
}}
style={{ backfaceVisibility: "hidden" }}
transition={{ duration: 10, repeat: Infinity, ease: "easeInOut" }}
/>
<motion.div
className="absolute bottom-[20%] left-[20%] w-[30%] h-[30%] rounded-full bg-chart-3/20"
animate={{
x: [0, 30, 0],
y: [0, -30, 0],
}}
style={{ backfaceVisibility: "hidden" }}
transition={{ duration: 8, repeat: Infinity, ease: "easeInOut" }}
/>
</div>
</div>
);
}