import React from "react";
import {
AbsoluteFill,
interpolate,
Sequence,
spring,
useCurrentFrame,
useVideoConfig,
} from "remotion";
import { palette } from "./contract";
const FONT = "Archivo";
const clamp = {
extrapolateLeft: "clamp" as const,
extrapolateRight: "clamp" as const,
};
const io = (frame: number, from: number, to: number) =>
interpolate(frame, [from, to], [0, 1], clamp);
const Glow: React.FC<{ color: string; size: number; x: string; y: string }> = ({
color,
size,
x,
y,
}) => (
);
const Intro: React.FC = () => {
const frame = useCurrentFrame();
const { fps } = useVideoConfig();
const pop = spring({ frame, fps, config: { damping: 200, mass: 0.7 } });
const bar = io(frame, 22, 58);
const sub = io(frame, 32, 58);
const out = io(frame, 76, 90);
return (
Relay
Make room for focused work
);
};
const TILES = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14];
const TILE_W = 155;
const TILE_H = 84;
const GAP = 12;
const Panel: React.FC = () => {
const frame = useCurrentFrame();
const win = io(frame, 0, 18);
const focus = io(frame, 68, 92);
const progress = io(frame, 128, 166);
return (
{[palette.muted, palette.muted, palette.muted].map((c, i) => (
))}
WEEK 32
{TILES.map((i) => {
const a = io(frame, 8 + i * 3, 24 + i * 3);
const col = i % 5;
const row = Math.floor(i / 5);
return (
);
})}
Progress
{Math.round(progress * 72)}%
);
};
const Feature: React.FC<{
title: string;
color: string;
frame: number;
start: number;
}> = ({ title, color, frame, start }) => {
const a = io(frame, start, start + 18);
return (
);
};
const Product: React.FC = () => {
const frame = useCurrentFrame();
const { fps } = useVideoConfig();
const enter = spring({ frame, fps, config: { damping: 200 } });
return (
);
};
const Outro: React.FC = () => {
const frame = useCurrentFrame();
const title = io(frame, 0, 24);
const bar = io(frame, 16, 44);
return (
Start your next week with{" "}
Relay
);
};
export const BenchmarkVideo: React.FC = () => {
return (
);
};