import React from 'react'; import {spring, SpringConfig, useCurrentFrame, useVideoConfig} from 'remotion'; const size = 200; export const Tile: React.FC<{ readonly index: number; }> = ({index}) => { const videoConfig = useVideoConfig(); const frame = useCurrentFrame(); const springConfig: SpringConfig = { damping: 100, mass: 0.5, stiffness: 10, overshootClamping: true, }; const scale = spring({ config: springConfig, fps: videoConfig.fps, frame, from: 0, to: 1, }); const rotate = spring({ config: springConfig, fps: videoConfig.fps, from: 0, frame, to: 1, }); return (
); };