
Parallax Hero Images
// components/ui/parallax-hero-images.tsx "use client"; import React, { useEffect, useState, useMemo, useCallback, memo } from "react"; import { motion, useMotionValue, useSpring, useTransform, MotionValue, } from "motion/react"; import { cn } from "@/lib/utils"; type ImagePosition = { src: string; position: | "top-left" | "top-right" | "mid-left" | "mid-right" | "bottom-left" | "bottom-right" | "far-left" | "far-right"; depth: number; delay: number; }; const positionStyles: Record< ImagePosition["position"], { top: string; left?: string; right?: string } > = { "top-left": { top: "8%", left: "4%" }, "top-right": { top: "8%", right: "4%" }, "mid-left": { top: "38%", left: "6%" }, "mid-right": { top: "38%", right: "6%" }, "bottom-left": { top: "68%", left: "4%" }, "bottom-right": { top: "68%", right: "4%" }, "far-left": { top: "52%", left: "2%" }, "far-right": { top: "52%", right: "2%" },…
提示语
// components/ui/parallax-hero-images.tsx "use client"; import React, { useEffect, useState, useMemo, useCallback, memo } from "react"; import { motion, useMotionValue, useSpring, useTransform, MotionValue, } from "motion/react"; import { …

