// mask-wipe 元素遮罩擦除(轮 D)——真实项目卡(card4-hires)放大成 // 全屏窗口,projects 全景从窗内长出接管:"点开一张卡进入它的世界"。 // 节拍:0–40 全景 hold → 40–85 卡放大成窗(窗内新景反向补偿)→ 85–120 hold。 import { AbsoluteFill, Img, interpolate, staticFile, useCurrentFrame, Easing } from 'remotion'; import layout from '../../_textures/live-layout.json'; export const MASKWIPE_DUR = 120; const C4 = layout.projects.cards[3]; // 页面空间 x=781,y=616,w=357,h=312 const VIEW_Y = 180; // 全景观察窗:页面 y=180 起 export const MaskWipeReal: React.FC = () => { const frame = useCurrentFrame(); const t = interpolate(frame, [40, 85], [0, 1], { extrapolateLeft: 'clamp', extrapolateRight: 'clamp', easing: Easing.bezier(0.5, 0, 0.2, 1), }); // 卡在屏幕空间的初始 geometry(全景视口下) const g0 = { x: C4.x, y: C4.y - VIEW_Y, w: C4.w, h: C4.h, r: 12 }; const x = interpolate(t, [0, 1], [g0.x, 0]); const y = interpolate(t, [0, 1], [g0.y, 0]); const w = interpolate(t, [0, 1], [g0.w, 1920]); const h = interpolate(t, [0, 1], [g0.h, 1080]); const r = interpolate(t, [0, 1], [g0.r, 0]); // 窗内新景(detail 视角用 papers 页顶部模拟):从 0.42 缩放反向长到 1 const innerScale = interpolate(t, [0, 1], [0.42, 1]); return ( {/* 背景:projects 全景 */} {/* 卡片即窗口 */}
0 && t < 1 ? '0 16px 56px rgba(31,28,23,0.25)' : 'none', }} > {/* 窗内新景:projects 页深部(detail 语义),反向补偿铺满 */}
{/* 卡片脸:随放大渐隐露出窗内景 */}
); };