Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions components/university/premium-animated-boy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ export const PremiumAnimatedBoy = ({
}) => {
const [stride, setStride] = useState(0);

// eslint-disable-next-line @typescript-eslint/no-explicit-any
const t: any = {
const t: import("framer-motion").Transition = {
duration: isJumping && jumpType === "running" ? 0.6 : 0.45,
ease:
isJumping && jumpType === "running" ? "easeInOut" : [0.25, 1, 0.35, 1],
isJumping && jumpType === "running"
? "easeInOut"
: ([0.25, 1, 0.35, 1] as const),
};
const ht = {
repeat: Infinity,
Expand All @@ -27,8 +28,10 @@ export const PremiumAnimatedBoy = ({
ease: "easeInOut" as const,
};

// eslint-disable-next-line @typescript-eslint/no-explicit-any
const sideToFrontVars = (sideVal: number, frontVal: number): any => ({
const sideToFrontVars = (
sideVal: number,
frontVal: number
): import("framer-motion").Variants => ({
run_a: { x: sideVal, transition: t },
run_b: { x: sideVal, transition: t },
standing_jump: { x: sideVal, transition: t },
Expand Down Expand Up @@ -102,8 +105,7 @@ export const PremiumAnimatedBoy = ({
k_h: number[],
L1: number,
L2: number
// eslint-disable-next-line @typescript-eslint/no-explicit-any
): any => ({
): import("framer-motion").Variants => ({
run_a: { d: getLimbPath(h_ra, k_ra, L1, L2), transition: t },
run_b: { d: getLimbPath(h_rb, k_rb, L1, L2), transition: t },
standing_jump: { d: getLimbPath(h_j, k_j, L1, L2), transition: t },
Expand Down Expand Up @@ -136,8 +138,7 @@ export const PremiumAnimatedBoy = ({
a_h: number[] | null,
L1: number,
L2: number
// eslint-disable-next-line @typescript-eslint/no-explicit-any
): any => ({
): import("framer-motion").Variants => ({
run_a: {
...getEndObj(h_ra, k_ra, L1, L2),
rotate: h_ra.map((h, i) => h + k_ra[i] + (a_ra?.[i] || 0)),
Expand Down
136 changes: 109 additions & 27 deletions components/university/university-flow-banner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,114 @@ export default function UniversityFlowBanner() {
jumpType={jumpGap === 0 ? "standing" : "running"}
/>

{/* Premium Minimal Wind Waves */}
<AnimatePresence>
{isJumping && (
<motion.div
className="absolute top-[40%] right-[50%] mr-[12px] pointer-events-none z-[-1]"
initial={{ opacity: 0, x: 10 }}
animate={{ opacity: 1, x: 0 }}
exit={{
opacity: 0,
x: -10,
transition: { duration: 0.3 },
}}
>
<svg
viewBox="0 0 70 40"
fill="none"
className="w-[45px] sm:w-[70px] h-auto opacity-90"
>
<defs>
<linearGradient
id="wind-wave"
x1="0%"
y1="100%"
x2="100%"
y2="0%"
>
<stop
offset="0%"
stopColor="#60a5fa"
stopOpacity="0"
/>
<stop
offset="50%"
stopColor="#93c5fd"
stopOpacity="0.5"
/>
<stop
offset="100%"
stopColor="#ffffff"
stopOpacity="0.9"
/>
</linearGradient>
<filter
id="soft-wind-glow"
x="-50%"
y="-50%"
width="200%"
height="200%"
>
<feGaussianBlur
stdDeviation="1.5"
result="blur"
/>
<feMerge>
<feMergeNode in="blur" />
<feMergeNode in="SourceGraphic" />
</feMerge>
</filter>
</defs>

{/* Wind Line 1 (Main) */}
<motion.path
d="M 70 10 Q 40 10 0 30"
stroke="url(#wind-wave)"
strokeWidth="2"
strokeLinecap="round"
filter="url(#soft-wind-glow)"
initial={{ pathLength: 0 }}
animate={{ pathLength: 1 }}
transition={{ duration: 0.3, ease: "easeOut" }}
/>

{/* Wind Line 2 (Lower, thinner) */}
<motion.path
d="M 60 20 Q 30 15 5 40"
stroke="url(#wind-wave)"
strokeWidth="1.5"
strokeLinecap="round"
filter="url(#soft-wind-glow)"
initial={{ pathLength: 0 }}
animate={{ pathLength: 1 }}
transition={{
duration: 0.4,
delay: 0.05,
ease: "easeOut",
}}
/>

{/* Wind Line 3 (Highest, shortest) */}
<motion.path
d="M 65 2 Q 40 5 15 15"
stroke="url(#wind-wave)"
strokeWidth="1.5"
strokeLinecap="round"
filter="url(#soft-wind-glow)"
initial={{ pathLength: 0 }}
animate={{ pathLength: 1 }}
transition={{
duration: 0.25,
delay: 0.1,
ease: "easeOut",
}}
/>
</svg>
</motion.div>
)}
</AnimatePresence>

{activeStep === steps.length - 1 && !isJumping && (
<>
{/* Minimal Radial Burst */}
Expand Down Expand Up @@ -305,34 +413,8 @@ export default function UniversityFlowBanner() {
{index < steps.length - 1 && (
<div className="flex-1 relative h-[70px] -mt-[35px] mx-[8px] z-0 pointer-events-none">
<AnimatePresence>
{jumpGap === index && (
<svg
className="absolute inset-0 h-full w-full overflow-visible pointer-events-none"
preserveAspectRatio="none"
viewBox="0 0 100 100"
>
<motion.path
d="M 0 100 Q 50 -20 100 100"
fill="none"
stroke="currentColor"
strokeWidth="3"
strokeDasharray="6 6"
vectorEffect="non-scaling-stroke"
className="text-blue-400/80"
initial={{ pathLength: 0 }}
animate={{ pathLength: 1 }}
exit={{
opacity: 0,
transition: { duration: 0.1 },
}}
transition={{ duration: 0.5, ease: "linear" }}
/>
</svg>
)}
{/* The ground arc is removed in favor of the cartoon wave on his back */}
</AnimatePresence>

{/* Mobile Separator */}
<div className="sm:hidden absolute top-[35px] w-full border-t-2 border-dashed border-slate-300" />
</div>
)}
</React.Fragment>
Expand Down
Loading