{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "frosted-glass-wipe", "title": "Frosted Glass Wipe", "description": "Elegant scene transition through a sliding pane of frosted glass.", "dependencies": [ "remotion" ], "files": [ { "path": "registry/remocn/frosted-glass-wipe/index.tsx", "content": "\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport { Easing, interpolate, useCurrentFrame, useVideoConfig } from \"remotion\";\n\nexport interface FrostedGlassWipeProps {\n from?: ReactNode;\n to?: ReactNode;\n transitionStart?: number;\n transitionDuration?: number;\n glassBlur?: number;\n speed?: number;\n className?: string;\n}\n\nconst FONT_FAMILY =\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\";\n\nfunction DefaultPanel({ label, color }: { label: string; color: string }) {\n return (\n \n {label}\n \n );\n}\n\nexport function FrostedGlassWipe({\n from,\n to,\n transitionStart,\n transitionDuration = 30,\n glassBlur = 24,\n speed = 1,\n className,\n}: FrostedGlassWipeProps) {\n const frame = useCurrentFrame() * speed;\n const { durationInFrames } = useVideoConfig();\n\n const start =\n typeof transitionStart === \"number\"\n ? transitionStart\n : Math.floor(durationInFrames * 0.4);\n\n const progress = interpolate(\n frame,\n [start, start + transitionDuration],\n [0, 1],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.bezier(0.6, 0, 0.2, 1),\n },\n );\n\n const glassX = interpolate(progress, [0, 1], [-110, 110]);\n const showB = progress >= 0.5 ? 1 : 0;\n\n const fromContent = from ?? ;\n const toContent = to ?? ;\n\n return (\n \n \n {fromContent}\n \n \n {toContent}\n \n \n \n );\n}\n", "type": "registry:component", "target": "components/remocn/frosted-glass-wipe.tsx" } ], "type": "registry:component" }