- Fix repeat-city travel placement: use stop indices instead of global city name matching so Follow Team trips with repeat cities show travel correctly - Add TravelPlacement helper and regression tests (7 tests) - Add alternate app icons for each theme, auto-switch on theme change - Fix index-out-of-range crash in AnimatedSportsBackground (19 configs, was iterating 20) - Add marketing video configs, engine, and new video components - Add docs and data exports Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
44 lines
1.1 KiB
TypeScript
44 lines
1.1 KiB
TypeScript
import React from "react";
|
|
import { AbsoluteFill, useCurrentFrame } from "remotion";
|
|
|
|
/**
|
|
* Subtle film grain overlay that makes videos feel organic/real.
|
|
* Uses deterministic noise per frame for reproducible renders.
|
|
*/
|
|
export const FilmGrain: React.FC<{ opacity?: number }> = ({
|
|
opacity = 0.04,
|
|
}) => {
|
|
const frame = useCurrentFrame();
|
|
// Shift the noise pattern each frame using a CSS trick
|
|
const offsetX = ((frame * 73) % 200) - 100;
|
|
const offsetY = ((frame * 47) % 200) - 100;
|
|
|
|
return (
|
|
<AbsoluteFill
|
|
style={{
|
|
pointerEvents: "none",
|
|
mixBlendMode: "overlay",
|
|
opacity,
|
|
}}
|
|
>
|
|
<svg width="100%" height="100%">
|
|
<filter id={`grain-${frame % 10}`}>
|
|
<feTurbulence
|
|
type="fractalNoise"
|
|
baseFrequency="0.65"
|
|
numOctaves="3"
|
|
seed={frame}
|
|
stitchTiles="stitch"
|
|
/>
|
|
</filter>
|
|
<rect
|
|
width="100%"
|
|
height="100%"
|
|
filter={`url(#grain-${frame % 10})`}
|
|
transform={`translate(${offsetX}, ${offsetY})`}
|
|
/>
|
|
</svg>
|
|
</AbsoluteFill>
|
|
);
|
|
};
|