diff --git a/remotion/Contributions/index.tsx b/remotion/Contributions/index.tsx index df6f9ecd..b5314222 100644 --- a/remotion/Contributions/index.tsx +++ b/remotion/Contributions/index.tsx @@ -13,7 +13,7 @@ import { } from "remotion"; import React, { useMemo } from "react"; -import type { Planet, Rocket } from "../../src/config"; +import { type Planet, type Rocket } from "../../src/config"; import { appearDelays } from "../Contributions/compute-positions"; import { Gradient } from "../Gradients/NativeGradient"; import { IssueNumber } from "../Issues/IssueNumber"; @@ -46,8 +46,7 @@ const GRID_HEIGHT = ROWS * SIZE; const TRANSITION_GLOW = 45; const START_SPREAD = TRANSITION_GLOW + 10; -const FADE_OUT_START = 80; -const FADE_OUT_DURATION = 20; +const TOP_OFFSET = 200; const mapRowToMove: Record = { 0: SIZE * 3, @@ -222,14 +221,16 @@ export const ContributionsScene: React.FC<{ extrapolateRight: "clamp", }); - const numberEnter = spring({ + const constantScale = interpolate(frame, [0, 50], [0.8, 1]); + + const disappear = spring({ fps, frame, config: { damping: 200, }, + delay: 90, }); - const numberTop = interpolate(numberEnter, [0, 1], [250, 0]); return ( @@ -247,92 +248,87 @@ export const ContributionsScene: React.FC<{ - -
- - - -
- {new Array(COUNT).fill(0).map((_, i) => ( - - ))} -
- = FADE_OUT_START && - frame < FADE_OUT_START + FADE_OUT_DURATION - ? (FADE_OUT_DURATION - (frame - FADE_OUT_START)) / - FADE_OUT_DURATION - : frame < FADE_OUT_START - ? 1 - : 0, + justifyContent: "center", + alignItems: "center", + zIndex: 0, }} > - + +
+ +
+
+ - - + > + {new Array(COUNT).fill(0).map((_, i) => ( + + ))} +
+ + +
diff --git a/remotion/IGStory/PullRequests.tsx b/remotion/IGStory/PullRequests.tsx index 5bdfbb14..a3b2282b 100644 --- a/remotion/IGStory/PullRequests.tsx +++ b/remotion/IGStory/PullRequests.tsx @@ -1,5 +1,3 @@ -import { PANE_TEXT_COLOR } from "../TopLanguages/Pane"; - export const PullRequests: React.FC<{ pullRequests: number; }> = ({ pullRequests }) => { @@ -44,7 +42,7 @@ export const PullRequests: React.FC<{ style={{ fontFamily: "Mona Sans", fontWeight: "500", - color: PANE_TEXT_COLOR, + color: "white", fontSize: digits > 2 ? 55 : 65, lineHeight: "65px", }} diff --git a/remotion/Issues/IssueNumber.tsx b/remotion/Issues/IssueNumber.tsx index 9fba2ba3..e368229c 100644 --- a/remotion/Issues/IssueNumber.tsx +++ b/remotion/Issues/IssueNumber.tsx @@ -1,15 +1,14 @@ import React from "react"; -import { AbsoluteFill } from "remotion"; import { SevenSegment } from "../SevenSegment/SevenSegmentNumber"; export const IssueNumber: React.FC<{ - currentNumber: number; - max: number; - label: string; - align: "left" | "right" | "center"; + readonly currentNumber: number; + readonly max: number; + readonly label: string; + readonly align: "left" | "right" | "center"; }> = ({ currentNumber, label, align, max }) => { return ( -
-
+ ); }; diff --git a/remotion/OgImage/PullRequests.tsx b/remotion/OgImage/PullRequests.tsx index 80624930..b258744f 100644 --- a/remotion/OgImage/PullRequests.tsx +++ b/remotion/OgImage/PullRequests.tsx @@ -1,5 +1,3 @@ -import { PANE_TEXT_COLOR } from "../TopLanguages/Pane"; - export const PullRequests: React.FC<{ pullRequests: number; }> = ({ pullRequests }) => { @@ -36,7 +34,7 @@ export const PullRequests: React.FC<{ }} > @@ -44,7 +42,7 @@ export const PullRequests: React.FC<{ style={{ fontFamily: "Mona Sans", fontWeight: "500", - color: PANE_TEXT_COLOR, + color: "white", fontSize: digits > 2 ? 55 : 65, lineHeight: "65px", }} @@ -56,7 +54,7 @@ export const PullRequests: React.FC<{ style={{ fontFamily: "Mona Sans", fontSize: 20, - color: PANE_TEXT_COLOR, + color: "white", fontWeight: 500, }} > diff --git a/remotion/Productivity/Productivity.tsx b/remotion/Productivity/Productivity.tsx index 04684ee3..71427d60 100644 --- a/remotion/Productivity/Productivity.tsx +++ b/remotion/Productivity/Productivity.tsx @@ -8,7 +8,7 @@ import { } from "remotion"; import type { Hour, ProductivityPerHour, Weekday } from "../../src/config"; import { isMobileDevice } from "../Opening/devices"; -import { TABLET_BG } from "./TabletSVG"; +import { PANE_BACKGROUND } from "../TopLanguages/Pane"; import { TopDay } from "./TopDay"; type Props = { @@ -18,9 +18,9 @@ type Props = { }; const Bar = (props: { - productivity: number; - index: number; - mostProductive: boolean; + readonly productivity: number; + readonly index: number; + readonly mostProductive: boolean; }) => { const { fps } = useVideoConfig(); const frame = useCurrentFrame(); @@ -51,9 +51,7 @@ const Bar = (props: { width: "100%", height: `${props.productivity * 100}%`, borderRadius: 4, - backgroundColor: props.mostProductive - ? "rgba(255, 255, 255, 0.7)" - : "#181B28", + backgroundColor: props.mostProductive ? PANE_BACKGROUND : "#181B28", border: "3px solid rgba(255, 255, 255, 0.1)", }} /> @@ -62,8 +60,8 @@ const Bar = (props: { }; const ProductivityGraph = (props: { - productivityPerHour: Array; - style?: React.CSSProperties; + readonly productivityPerHour: Array; + readonly style?: React.CSSProperties; }) => { const maxProductivity = Math.max( ...props.productivityPerHour.map((p) => p.productivity), @@ -128,7 +126,6 @@ export const Productivity: React.FC = ({ graphData, weekday, hour }) => { return ( @@ -152,6 +149,8 @@ export const Productivity: React.FC = ({ graphData, weekday, hour }) => { delay={60} soundDelay={95} /> +
+
= ({ graphData, weekday, hour }) => { if (value === "12") { return "12 pm"; } - + if (value === "0") { return "12 am"; } @@ -200,7 +199,13 @@ export const Productivity: React.FC = ({ graphData, weekday, hour }) => { }} soundDelay={120} /> - +
+
+
+
+
+
+
& { - values: string[]; - radius: number; - renderLabel: (value: string) => React.ReactNode; - delay: number; - soundDelay: number; + readonly values: string[]; + readonly radius: number; + readonly renderLabel: (value: string) => React.ReactNode; + readonly delay: number; + readonly soundDelay: number; } > = ({ value, label, values, radius, renderLabel, delay, soundDelay }) => { const maskImage = `linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 1) 30%, rgba(0, 0, 0, 1) 70%, transparent 100%)`; return ( -
-
{label}
- - - - {label}
+
- - + + + + + + +
-
+ ); };