nav新增动画,修复潜在的性能和bug,优化动画流畅度

This commit is contained in:
2026-01-29 09:48:05 +08:00
parent 0a1bd07492
commit 2377e2dda2
6 changed files with 34 additions and 27 deletions

View File

@@ -7,9 +7,9 @@ interface ShatterTransitionProps {
onComplete: () => void;
}
// 增加网格密度以获得更细腻的破碎感
const GRID_COLS = 10;
const GRID_ROWS = 10;
// 优化性能:减少碎片数量
const GRID_COLS = 7;
const GRID_ROWS = 7;
export default function ShatterTransition({ isActive, onComplete }: ShatterTransitionProps) {
const [isAnimating, setIsAnimating] = useState(false);