Skip to content

🎥 Make videos programmatically with React

`@remotion/brand`: Add effects video (#8588)

Jonny Burgerfb80d51913c7
diff --git a/.agents/skills/upload-r2/SKILL.md b/.agents/skills/upload-r2/SKILL.md
new file mode 100644
index 0000000000..aaeb21a7f0
--- /dev/null
+++ b/.agents/skills/upload-r2/SKILL.md
@@ -0,0 +1,41 @@
+---
+name: upload-r2
+description: Upload large Remotion repository assets to the Cloudflare R2 bucket behind remotion.media and replace local public/ assets with hosted URLs. Use when a file is too large for Git or when a PR should avoid committing media binaries by hosting them on remotion.media.
+---
+
+# Upload R2 Asset
+
+Use this for large media assets that should be hosted on `https://remotion.media/` instead of committed to Git.
+
+## Workflow
+
+1. Find the main worktree:
+ ```bash
+ git worktree list --porcelain
+ ```
+ Prefer the worktree on `refs/heads/main`, usually `/Users/jonathanburger/remotion`.
+
+2. Load R2 credentials from the main worktree:
+ ```bash
+ --env-file=/Users/jonathanburger/remotion/packages/remotion-media/.env
+ ```
+ Do not print secret values. The required variables are `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY`.
+
+3. Upload the file to the `parser-media` bucket using Bun's S3-compatible client:
+ ```bash
+ bun --env-file=/Users/jonathanburger/remotion/packages/remotion-media/.env -e "import {S3Client} from 'bun'; const filePath='<local-file>'; const key='<remote-file-name>'; const client=new S3Client({accessKeyId:Bun.env.AWS_ACCESS_KEY_ID, secretAccessKey:Bun.env.AWS_SECRET_ACCESS_KEY, endpoint:'https://2fe488b3b0f4deee223aef7464784c46.r2.cloudflarestorage.com', bucket:'parser-media'}); const file=Bun.file(filePath); if (await client.exists(key)) { const stat=await client.stat(key); if (stat.size===file.size) { console.log('exists-same-size', key, file.size); process.exit(0); } } await client.write(key, file); const stat=await client.stat(key); console.log('uploaded', key, stat.size);"
+ ```
+
+4. Verify the public URL:
+ ```bash
+ curl -I --fail https://remotion.media/<remote-file-name>
+ ```
+
+5. Replace local asset usage with the hosted URL and delete the local binary.
+
+ Do not wrap remote URLs in `staticFile()`: `staticFile()` rejects `http://` and `https://` URLs. Use the URL string directly, for example:
+ ```tsx
+ <Video src="https://remotion.media/example.mp4" />
+ ```
+
+6. Run the focused lint or stylecheck for touched packages, then commit and push.
diff --git a/packages/brand/public/Screenshot 2026-06-17 at 14.40.23.png b/packages/brand/public/Screenshot 2026-06-17 at 14.40.23.png
new file mode 100644
index 0000000000..19faadab6f
Binary files /dev/null and b/packages/brand/public/Screenshot 2026-06-17 at 14.40.23.png differ
diff --git a/packages/brand/public/hoorn.wav b/packages/brand/public/hoorn.wav
new file mode 100644
index 0000000000..6d6cc1c1a1
Binary files /dev/null and b/packages/brand/public/hoorn.wav differ
diff --git a/packages/brand/public/image 1.png b/packages/brand/public/image 1.png
new file mode 100644
index 0000000000..67437058cf
Binary files /dev/null and b/packages/brand/public/image 1.png differ
diff --git a/packages/brand/public/logo/remotion/logo-on-white.svg b/packages/brand/public/logo/remotion/logo-on-white.svg
new file mode 100644
index 0000000000..5ff767fb1d
--- /dev/null
+++ b/packages/brand/public/logo/remotion/logo-on-white.svg
@@ -0,0 +1,5 @@
+<svg width="410" height="425" viewBox="0 0 410 425" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M92.3905 0.603638C83.5124 1.08554 76.358 2.49417 69.1481 5.2373C65.5523 6.59033 59.6583 9.53735 56.4148 11.5762C42.8474 20.0836 32.5051 32.8724 27.1115 47.7558C26.0365 50.7028 23.1266 60.0998 21.2546 66.5684C8.78078 109.81 1.70055 157.092 0.180713 207.135C-0.0602375 215.105 -0.0602375 234.084 0.180713 241.925C1.20012 275.102 4.36954 305.053 10.1153 335.599C12.4506 347.961 16.1946 364.568 18.3632 372.112C22.793 387.44 31.8379 400.488 44.7009 410.052C53.3195 416.465 63.1058 420.765 73.9485 422.878C79.1753 423.897 86.0702 424.361 91.1487 424.027C98.1733 423.564 112.111 421.692 123.436 419.672C174.48 410.571 221.632 394.279 264.392 370.963C291.471 356.19 314.621 340.195 336.955 320.789C359.215 301.476 378.194 280.699 394.894 257.382C398.768 251.989 400.714 248.838 402.66 244.872C407.665 234.64 410.018 224.465 410 213.085C410 202.483 407.998 193.067 403.68 183.429C401.604 178.777 399.62 175.441 395.172 169.102C378.788 145.767 360.605 125.434 338.438 105.676C304.074 75.0573 263.261 49.9428 217.685 31.3526C207.806 27.3306 198.075 23.7905 186.361 19.9538C161.562 11.8542 130.868 4.82956 104.901 1.32651C100.824 0.770477 95.2819 0.455353 92.3905 0.603638Z" fill="#E7F3FE"/>
+<path d="M116.44 45.697C109.454 46.0762 103.824 47.1846 98.1503 49.3432C95.3208 50.4079 90.6828 52.7269 88.1304 54.3313C77.4543 61.0258 69.3159 71.0894 65.0717 82.8011C64.2257 85.1201 61.9359 92.5146 60.4628 97.6048C50.6472 131.631 45.0757 168.838 43.8798 208.217C43.6901 214.488 43.6901 229.423 43.8798 235.593C44.6819 261.7 47.1759 285.269 51.6973 309.305C53.535 319.033 56.4811 332.101 58.1876 338.037C61.6734 350.099 68.7908 360.367 78.9128 367.893C85.6948 372.939 93.3956 376.323 101.928 377.986C106.041 378.788 111.466 379.152 115.463 378.89C120.99 378.525 131.958 377.052 140.87 375.462C181.036 368.301 218.141 355.481 251.788 337.133C273.097 325.509 291.313 312.922 308.888 297.652C326.405 282.454 341.34 266.105 354.481 247.757C357.529 243.512 359.06 241.033 360.592 237.912C364.53 229.861 366.382 221.854 366.367 212.899C366.367 204.556 364.792 197.147 361.394 189.563C359.76 185.902 358.2 183.277 354.699 178.289C341.806 159.926 327.498 143.927 310.055 128.379C283.014 104.285 250.898 84.5221 215.034 69.8934C207.26 66.7285 199.603 63.9427 190.385 60.9237C170.871 54.55 146.718 49.0224 126.285 46.2658C123.076 45.8282 118.715 45.5803 116.44 45.697Z" fill="#BBDDFC"/>
+<path d="M141.332 92.4681C136.307 92.7408 132.259 93.5379 128.179 95.0902C126.144 95.8559 122.809 97.5236 120.973 98.6774C113.295 103.492 107.443 110.729 104.391 119.151C103.782 120.819 102.136 126.137 101.076 129.797C94.0174 154.267 90.0107 181.023 89.1506 209.343C89.0143 213.853 89.0143 224.593 89.1506 229.03C89.7275 247.804 91.5211 264.754 94.7725 282.039C96.0941 289.035 98.2128 298.433 99.44 302.702C101.947 311.376 107.065 318.76 114.344 324.172C119.221 327.801 124.759 330.235 130.895 331.43C133.853 332.007 137.755 332.269 140.629 332.081C144.604 331.818 152.491 330.759 158.9 329.616C187.786 324.466 214.469 315.246 238.666 302.052C253.99 293.692 267.09 284.641 279.729 273.659C292.326 262.73 303.066 250.972 312.516 237.777C314.708 234.725 315.81 232.942 316.911 230.698C319.743 224.908 321.075 219.15 321.064 212.71C321.064 206.71 319.932 201.382 317.488 195.928C316.313 193.295 315.191 191.407 312.674 187.82C303.402 174.615 293.112 163.109 280.568 151.928C261.122 134.601 238.026 120.389 212.235 109.869C206.644 107.593 201.138 105.589 194.509 103.418C180.475 98.8347 163.106 94.8595 148.411 92.8771C146.104 92.5625 142.968 92.3842 141.332 92.4681Z" fill="#0B84F3"/>
+</svg>
diff --git a/packages/brand/public/remotion-studio-canvas-recording.webm b/packages/brand/public/remotion-studio-canvas-recording.webm
new file mode 100644
index 0000000000..0812ca0ad2
Binary files /dev/null and b/packages/brand/public/remotion-studio-canvas-recording.webm differ
diff --git a/packages/brand/src/CanvasCapturePreview.tsx b/packages/brand/src/CanvasCapturePreview.tsx
index 0ea381e32b..f0ba706af2 100644
--- a/packages/brand/src/CanvasCapturePreview.tsx
+++ b/packages/brand/src/CanvasCapturePreview.tsx
@@ -1,6 +1,7 @@
import {Video} from '@remotion/media';
import {ALL_FORMATS, Input, UrlSource} from 'mediabunny';
import React from 'react';
+import type {CalculateMetadataFunction} from 'remotion';
import {
AbsoluteFill,
Img,
@@ -8,7 +9,6 @@ import {
useCurrentFrame,
useVideoConfig,
} from 'remotion';
-import type {CalculateMetadataFunction} from 'remotion';
import {z} from 'zod';
type MouseMovement = {
@@ -58,6 +58,7 @@ type CursorRecording = {
export const canvasCapturePreviewSchema = z.object({
videoFile: z.string(),
cursorScale: z.number(),
+ hidden: z.enum(['cursor', 'screen']).nullable(),
});
export type CanvasCapturePreviewProps = z.infer<
@@ -284,11 +285,12 @@ const CursorImg: React.FC<{
position: 'absolute',
scale: cursorScale,
}}
+ from={-64}
/>
);
};
-const CursorGlyph: React.FC<{
+export const CursorGlyph: React.FC<{
readonly cursor: string;
readonly scale: number;
readonly cursorScale: number;
@@ -425,6 +427,10 @@ export const calculateCanvasCapturePreviewMetadata: CalculateMetadataFunction<
height: dimensions.height,
durationInFrames: Math.ceil(durationInSeconds * fps),
fps,
+ defaultCodec: 'prores',
+ defaultProResProfile: '4444',
+ defaultPixelFormat: 'yuva444p10le',
+ defaultVideoImageFormat: 'png',
props: {
...props,
cursorData,
@@ -440,17 +446,23 @@ export const CanvasCapturePreview: React.FC<CanvasCapturePreviewProps> = ({
videoFile,
width,
height,
+ hidden,
}) => {
+ const showScreen = hidden !== 'screen';
+ const showCursor = hidden !== 'cursor';
+
return (
<AbsoluteFill>
- <Video
- src={videoFile}
- style={{
- width: width!,
- height: height!,
- }}
- />
- {cursorData ? (
+ {showScreen ? (
+ <Video
+ src={videoFile}
+ style={{
+ width: width!,
+ height: height!,
+ }}
+ />
+ ) : null}
+ {showCursor && cursorData ? (
<CursorOverlay cursorData={cursorData} cursorScale={cursorScale} />
) : null}
</AbsoluteFill>
diff --git a/packages/brand/src/LogoHorn/index.tsx b/packages/brand/src/LogoHorn/index.tsx
new file mode 100644
index 0000000000..b1d4227091
--- /dev/null
+++ b/packages/brand/src/LogoHorn/index.tsx
@@ -0,0 +1,148 @@
+import {chromaticAberration} from '@remotion/effects/chromatic-aberration';
+import {Audio} from '@remotion/media';
+import {useWindowedAudioData, visualizeAudio} from '@remotion/media-utils';
+import {ALL_FORMATS, Input, UrlSource} from 'mediabunny';
+import React from 'react';
+import type {CalculateMetadataFunction} from 'remotion';
+import {
+ AbsoluteFill,
+ Img,
+ Solid,
+ staticFile,
+ useCurrentFrame,
+ useVideoConfig,
+} from 'remotion';
+
+import {pixelDissolve} from '@remotion/effects/pixel-dissolve';
+
+const AUDIO_FILE = staticFile('hoorn.wav');
+const LOGO_FILE = staticFile('logo/remotion/logo-on-white.svg');
+const LOGO_SIZE = 200;
+
+const getFrequencies = ({
+ fps,
+ frame,
+ audioData,
+ dataOffsetInSeconds,
+}: {
+ fps: number;
+ frame: number;
+ audioData: NonNullable<ReturnType<typeof useWindowedAudioData>['audioData']>;
+ dataOffsetInSeconds: number;
+}) => {
+ return visualizeAudio({
+ fps,
+ frame,
+ audioData,
+ numberOfSamples: 128,
+ optimizeFor: 'speed',
+ dataOffsetInSeconds,
+ });
+};
+
+const getAverageIntensity = (frequencies: readonly number[]) => {
+ return (
+ frequencies.reduce((sum, value) => sum + value, 0) / frequencies.length
+ );
+};
+
+export const calculateLogoHornMetadata: CalculateMetadataFunction<
+ Record<string, never>
+> = async () => {
+ const fps = 30;
+ const input = new Input({
+ formats: ALL_FORMATS,
+ source: new UrlSource(AUDIO_FILE, {
+ getRetryDelay: () => null,
+ }),
+ });
+
+ const durationInSeconds = await input.computeDuration();
+
+ return {
+ width: 1080,
+ height: 1080,
+ fps,
+ durationInFrames: Math.ceil(durationInSeconds * fps),
+ };
+};
+
+export const LogoHorn: React.FC = () => {
+ const frame = useCurrentFrame();
+ const {fps} = useVideoConfig();
+
+ const {audioData, dataOffsetInSeconds} = useWindowedAudioData({
+ src: AUDIO_FILE,
+ frame,
+ fps,
+ windowInSeconds: 30,
+ });
+
+ const {chromaticAmount, chromaticAngle, dissolveProgress} = (() => {
+ if (!audioData) {
+ return {
+ chromaticAmount: 0,
+ chromaticAngle: 0,
+ dissolveProgress: 0,
+ };
+ }
+
+ const frequencies = getFrequencies({
+ fps,
+ frame,
+ audioData,
+ dataOffsetInSeconds,
+ });
+
+ const bassIntensity = getAverageIntensity(frequencies.slice(0, 32));
+ const highIntensity = getAverageIntensity(frequencies.slice(96));
+
+ return {
+ chromaticAmount: bassIntensity * 400,
+ chromaticAngle: highIntensity * 360 + Math.round(frame / 2) * 50,
+ dissolveProgress: bassIntensity * 7,
+ };
+ })();
+
+ return (
+ <AbsoluteFill>
+ <Solid
+ width={1080}
+ height={1080}
+ color={'#ffffff'}
+ style={{
+ position: 'absolute',
+ }}
+ />
+ <AbsoluteFill
+ style={{
+ justifyContent: 'center',
+ alignItems: 'center',
+ }}
+ >
+ <Img
+ src={LOGO_FILE}
+ width={LOGO_SIZE}
+ height={LOGO_SIZE}
+ style={{
+ objectFit: 'contain',
+ }}
+ effects={[
+ chromaticAberration({
+ amount: chromaticAmount,
+ angle: chromaticAngle,
+ }),
+ pixelDissolve({
+ columns: 18,
+ rows: 114,
+ progress: dissolveProgress,
+ seed: Math.round(frame / 4),
+ feather: 0.49,
+ }),
+ ]}
+ />
+ </AbsoluteFill>
+ <Audio src={AUDIO_FILE} />
+ </AbsoluteFill>
+ );
+};
diff --git a/packages/brand/src/Root.tsx b/packages/brand/src/Root.tsx
index cf25e09bb2..5e925b30b1 100644
--- a/packages/brand/src/Root.tsx
+++ b/packages/brand/src/Root.tsx
@@ -18,11 +18,15 @@ import {
whatIsRemotionSchema,
} from './Compose/WhatIsRemotion';
import {EffectsAnnouncement} from './effects/EffectsAnnouncement';
+import {FxIconComposition} from './effects/FxIconComposition';
+import {Goal} from './effects/Goal';
+import {MetallicSwirl} from './effects/MetallicSwirl';
import {NewsHeadline} from './effects/NewsHeadline';
import {
StarburstEffectShowcase,
starburstEffectShowcaseDurationInFrames,
} from './effects/StarburstEffectShowcase';
+import {Thermometer} from './effects/Thermometer';
import {
ZigzagLinearBlurShowcase,
zigzagLinearBlurShowcaseDurationInFrames,
@@ -31,6 +35,7 @@ import {EmailSignature} from './EmailSignature';
import './index.css';
import {Logo} from './Logo';
import {LogoCollab, logoCollabSchema} from './LogoCollab/LogoCollab';
+import {LogoHorn, calculateLogoHornMetadata} from './LogoHorn';
import NewSticker from './NewSticker';
import {
RulesEnumeration,
@@ -139,7 +144,8 @@ export const RemotionRoot: React.FC = () => {
durationInFrames={120}
defaultProps={{
videoFile: staticFile('remotion-studio-canvas-recording.webm'),
- cursorScale: 5,
+ cursorScale: 2.5,
+ hidden: null,
width: null,
height: null,
}}
@@ -180,6 +186,14 @@ export const RemotionRoot: React.FC = () => {
fps={30}
durationInFrames={200}
/>
+ <Composition
+ id="thermometer"
+ component={EffectsAnnouncement}
+ width={1280}
+ height={720}
+ fps={30}
+ durationInFrames={200}
+ />
<Composition
id="news-headline"
component={NewsHeadline}
@@ -188,6 +202,38 @@ export const RemotionRoot: React.FC = () => {
fps={30}
durationInFrames={200}
/>
+ <Composition
+ id="thermo"
+ component={Thermometer}
+ width={1080}
+ height={1080}
+ fps={30}
+ durationInFrames={200}
+ />
+ <Composition
+ id="goal"
+ component={Goal}
+ width={1280}
+ height={720}
+ fps={30}
+ durationInFrames={120}
+ />
+ <Composition
+ id="metallic-swirl"
+ component={MetallicSwirl}
+ width={1280}
+ height={720}
+ fps={30}
+ durationInFrames={200}
+ />
+ <Composition
+ id="fx-icon"
+ component={FxIconComposition}
+ width={1080}
+ height={1080}
+ fps={30}
+ durationInFrames={90}
+ />
</Folder>
<Folder name="animated-logo">
<Composition
@@ -426,6 +472,15 @@ export const RemotionRoot: React.FC = () => {
/>
</Folder>
<Folder name="brand-assets">
+ <Composition
+ id="logo-horn"
+ component={LogoHorn}
+ width={1080}
+ height={1080}
+ fps={30}
+ durationInFrames={90}
+ calculateMetadata={calculateLogoHornMetadata}
+ />
<Composition
id="LogoCollab"
component={LogoCollab}
diff --git a/packages/brand/src/effects/EffectsAnnouncement.tsx b/packages/brand/src/effects/EffectsAnnouncement.tsx
index 0715e854de..1e00c743b8 100644
--- a/packages/brand/src/effects/EffectsAnnouncement.tsx
+++ b/packages/brand/src/effects/EffectsAnnouncement.tsx
@@ -1,16 +1,9 @@
-import {brightness} from '@remotion/effects/brightness';
import {burlap} from '@remotion/effects/burlap';
-import {colorKey} from '@remotion/effects/color-key';
-import {dropShadow} from '@remotion/effects/drop-shadow';
-import {duotone} from '@remotion/effects/duotone';
-import {noise} from '@remotion/effects/noise';
-import {tint} from '@remotion/effects/tint';
+import {Solid} from 'remotion';
import {Video} from '@remotion/media';
-import React from 'react';
-import {Solid, interpolate, staticFile, useCurrentFrame} from 'remotion';
+import {colorKey} from '@remotion/effects/color-key';
-export const EffectsAnnouncement: React.FC = () => {
- const frame = useCurrentFrame();
+export const EffectsAnnouncement = () => {
return (
<>
<Solid
@@ -19,48 +12,24 @@ export const EffectsAnnouncement: React.FC = () => {
style={{
position: 'absolute',
}}
- color={'#c6b67f'}
- effects={[
- burlap({
- amount: 0.77,
- size: 9,
- seed: interpolate(frame, [2, 199], [12, -19], {
- extrapolateLeft: 'clamp',
- extrapolateRight: 'clamp',
- posterize: 10,
- }),
- }),
- ]}
+ color={'#ffffff'}
+ effects={[burlap({})]}
/>
<Video
- src={staticFile(
- '43776940_caucasian-woman-greenscreen-cut-out-labcoat-scientist_by_bruno135_preview.mp4',
- )}
+ src="https://remotion.media/woman-dancing.mp4"
style={{
position: 'absolute',
- translate: '162.2px 70px',
- scale: 1.419,
- width: 960,
- height: 540,
+ translate: '-242.5px -144.8px',
+ width: 1920,
+ height: 1080,
}}
effects={[
colorKey({
- similarity: 0.45,
- }),
- duotone({}),
- tint({
- color: '#ffe374',
- amount: 0.45,
- }),
- brightness({
- amount: -0.38,
- }),
- dropShadow({
- opacity: 1,
- offsetX: -14,
+ similarity: 0.19,
+ keyColor: '#6ed860',
+ spillSuppression: 0.91,
+ smoothness: 0.01,
}),
- noise({}),
- burlap({}),
]}
/>
</>
diff --git a/packages/brand/src/effects/FxIconComposition.tsx b/packages/brand/src/effects/FxIconComposition.tsx
new file mode 100644
index 0000000000..893f27497a
--- /dev/null
+++ b/packages/brand/src/effects/FxIconComposition.tsx
@@ -0,0 +1,120 @@
+import React from 'react';
+import {
+ AbsoluteFill,
+ Easing,
+ interpolate,
+ useCurrentFrame,
+ useVideoConfig,
+} from 'remotion';
+import {CursorGlyph} from '../CanvasCapturePreview';
+
+const TOGGLE_SIZE = 140;
+const ICON_SIZE = (TOGGLE_SIZE / 36) * 31;
+const CLICK_FRAME = 54;
+const PANEL_BG = '#2a3035';
+const TOP_BG = '#11161c';
+
+export const FxIcon: React.FC<{
+ readonly size: number;
+ readonly opacity?: number;
+}> = ({opacity = 1, size}) => {
+ return (
+ <svg
+ viewBox="0 0 16 16"
+ fill="none"
+ style={{height: size, opacity, width: size}}
+ >
+ <path
+ d="M4.405 4.48C4.575 3.82 4.865 3.325 5.275 2.995C5.695 2.665 6.25 2.5 6.94 2.5H9.235V4.06H7.045C6.555 4.06 6.235 4.3 6.085 4.78L5.83 5.68H7.975V7.255H5.395L3.805 13H2.02L3.625 7.255H1.96V5.68H4.075L4.405 4.48ZM8.57102 9.085L6.87602 5.68H8.79602L9.86102 7.99L11.991 5.68H14.331L10.686 9.415L12.426 13H10.491L9.35102 10.585L7.02602 13H4.68602L8.57102 9.085Z"
+ fill="white"
+ />
+ </svg>
+ );
+};
+
+export const FxIconComposition: React.FC = () => {
+ const frame = useCurrentFrame();
+ const {height, width} = useVideoConfig();
+ const centerX = width / 2;
+ const centerY = height / 2;
+ const cursorProgress = interpolate(frame, [0, 46], [0, 1], {
+ easing: Easing.out(Easing.cubic),
+ extrapolateLeft: 'clamp',
+ extrapolateRight: 'clamp',
+ });
+ const cursorCurveStart = {x: centerX + 230, y: height + 180};
+ const cursorCurveControl = {x: centerX + 80, y: centerY + 360};
+ const cursorCurveEnd = {x: centerX, y: centerY};
+ const inverseCursorProgress = 1 - cursorProgress;
+ const cursorX =
+ inverseCursorProgress * inverseCursorProgress * cursorCurveStart.x +
+ 2 * inverseCursorProgress * cursorProgress * cursorCurveControl.x +
+ cursorProgress * cursorProgress * cursorCurveEnd.x;
+ const cursorY =
+ inverseCursorProgress * inverseCursorProgress * cursorCurveStart.y +
+ 2 * inverseCursorProgress * cursorProgress * cursorCurveControl.y +
+ cursorProgress * cursorProgress * cursorCurveEnd.y;
+ const cursorRotation = interpolate(cursorProgress, [0, 1], [-18, 0]);
+ const cursorClickScale = interpolate(
+ frame,
+ [CLICK_FRAME - 2, CLICK_FRAME, CLICK_FRAME + 6],
+ [1, 0.82, 1],
+ {
+ extrapolateLeft: 'clamp',
+ extrapolateRight: 'clamp',
+ },
+ );
+ const iconOpacity = frame < CLICK_FRAME ? 0 : 1;
+
+ return (
+ <AbsoluteFill
+ style={{
+ alignItems: 'center',
+ backgroundColor: PANEL_BG,
+ justifyContent: 'center',
+ }}
+ >
+ <div
+ style={{
+ alignItems: 'center',
+ backgroundColor: TOP_BG,
+ display: 'flex',
+ height: '100%',
+ justifyContent: 'center',
+ left: 0,
+ position: 'absolute',
+ top: 0,
+ width: '100%',
+ }}
+ />
+ <div
+ style={{
+ alignItems: 'center',
+ backgroundColor: 'rgba(0, 0, 0, 0.4)',
+ borderRadius: (TOGGLE_SIZE / 36) * 4,
+ display: 'flex',
+ height: TOGGLE_SIZE,
+ justifyContent: 'center',
+ position: 'relative',
+ width: TOGGLE_SIZE,
+ }}
+ >
+ <FxIcon opacity={iconOpacity} size={ICON_SIZE} />
+ </div>
+ <div
+ style={{
+ height: 32,
+ left: cursorX,
+ pointerEvents: 'none',
+ position: 'absolute',
+ top: cursorY,
+ transform: `rotate(${cursorRotation}deg) scale(${cursorClickScale})`,
+ transformOrigin: '0 0',
+ width: 32,
+ }}
+ >
+ <CursorGlyph cursor="default" scale={1} cursorScale={3.25} />
+ </div>
+ </AbsoluteFill>
+ );
+};
diff --git a/packages/brand/src/effects/Goal.tsx b/packages/brand/src/effects/Goal.tsx
new file mode 100644
index 0000000000..b6d4b6ea7b
--- /dev/null
+++ b/packages/brand/src/effects/Goal.tsx
@@ -0,0 +1,275 @@
+import {evolve} from '@remotion/effects/evolve';
+import {fisheye} from '@remotion/effects/fisheye';
+import {glow} from '@remotion/effects/glow';
+import {gridlines} from '@remotion/effects/gridlines';
+import {halftoneLinearGradient} from '@remotion/effects/halftone-linear-gradient';
+import {scale} from '@remotion/effects/scale';
+import {loadFont} from '@remotion/fonts';
+import React from 'react';
+import {
+ Easing,
+ HtmlInCanvas,
+ interpolate,
+ Solid,
+ staticFile,
+ useCurrentFrame,
+ useVideoConfig,
+} from 'remotion';
+import {metallicSwirl} from './metallic-swirl-effect';
+
+const fontFamily = 'GTPlanar';
+const ANIMATION_DURATION_FRAMES = 15;
+
+loadFont({
+ family: fontFamily,
+ url: staticFile('GT Planar/GT-Planar-Bold.woff2'),
+ weight: '700',
+});
+
+const textStyle: React.CSSProperties = {
+ fontFamily: `${fontFamily}, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif`,
+ fontSize: 360,
+ fontWeight: 700,
+ lineHeight: 1,
+ letterSpacing: '-0.05em',
+ color: 'white',
+};
+
+const subtitleStyle: React.CSSProperties = {
+ fontFamily: `${fontFamily}, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif`,
+ fontSize: 48,
+ fontWeight: 700,
+ lineHeight: 1,
+ letterSpacing: '0.12em',
+ color: 'white',
+ textTransform: 'uppercase',
+ fontFeatureSettings: "'ss03' 1",
+};
+
+export const Goal: React.FC = () => {
+ const frame = useCurrentFrame();
+ const {fps} = useVideoConfig();
+
+ const progress = interpolate(frame, [0, ANIMATION_DURATION_FRAMES], [0, 1], {
+ extrapolateLeft: 'clamp',
+ extrapolateRight: 'clamp',
+ easing: Easing.out(Easing.cubic),
+ });
+
+ const gap = interpolate(progress, [0, 1], [480, 0]);
+ const goSkew = interpolate(progress, [0, 1], [-22, 0]);
+ const alSkew = interpolate(progress, [0, 1], [22, 0]);
+ const goOffset = interpolate(progress, [0, 1], [-140, 0]);
+ const alOffset = interpolate(progress, [0, 1], [140, 0]);
+
+ return (
+ <>
+ <Solid
+ width={1280}
+ height={720}
+ style={{
+ position: 'absolute',
+ }}
+ color={'#181818'}
+ />
+ <Solid
+ width={1280}
+ height={720}
+ style={{
+ position: 'absolute',
+ }}
+ color={'rgba(24, 24, 24, 0)'}
+ effects={[
+ gridlines({
+ lineColor: 'rgba(255, 255, 255, 0.07)',
+ rotationX: -4,
+ perspective: 23,
+ offsetY: interpolate(frame, [0, 78], [14.2, -182.3], {
+ extrapolateLeft: 'clamp',
+ extrapolateRight: 'clamp',
+ }),
+ }),
+ evolve({
+ feather: 0,
+ direction: 'bottom',
+ progress: 0.86,
+ }),
+ scale({
+ scale: 1.4,
+ }),
+ ]}
+ />
+ <HtmlInCanvas
+ width={1280}
+ height={720}
+ pixelDensity={1.5}
+ effects={[
+ metallicSwirl({
+ time: frame / fps,
+ mode: 'alpha-mask',
+ speed: 0,
+ zoom: 5.4,
+ brightness: 2.56,
+ colorRange: 1.05,
+ colorBias: 0.8,
+ colorA: '#662f2f',
+ colorB: '#00ffc9',
+ backgroundColor: '#000000',
+ colorPhaseR: 3.21,
+ colorPhaseG: -5.03,
+ tangentForce: 1.43,
+ sampleGap: 0.219,
+ gradientForce: 0.34,
+ }),
+ fisheye({
+ fieldOfView: interpolate(frame, [11, 43], [1.67, 2.33], {
+ extrapolateLeft: 'clamp',
+ extrapolateRight: 'clamp',
+ easing: [
+ Easing.spring({
+ damping: 10,
+ mass: 1,
+ stiffness: 269,
+ overshootClamping: false,
+ }),
+ ],
+ }),
+ radius: interpolate(frame, [11, 43], [1.98, 0.79], {
+ extrapolateLeft: 'clamp',
+ extrapolateRight: 'clamp',
+ easing: [
+ Easing.spring({
+ damping: 10,
+ mass: 1,
+ stiffness: 100,
+ overshootClamping: false,
+ }),
+ ],
+ }),
+ zoom: 1.09,
+ }),
+ glow({
+ intensity: interpolate(frame, [11, 43], [0, 1.5], {
+ extrapolateLeft: 'clamp',
+ extrapolateRight: 'clamp',
+ easing: [
+ Easing.spring({
+ damping: 5,
+ mass: 1,
+ stiffness: 120,
+ overshootClamping: false,
+ }),
+ ],
+ }),
+
+ radius: interpolate(frame, [11, 43], [0, 53], {
+ extrapolateLeft: 'clamp',
+ extrapolateRight: 'clamp',
+ easing: [
+ Easing.spring({
+ damping: 5,
+ mass: 1,
+ stiffness: 120,
+ overshootClamping: false,
+ }),
+ ],
+ }),
+
+ threshold: 0.24,
+ disabled: true,
+ }),
+ ]}
+ style={{
+ scale: interpolate(frame, [17, 52], [1, 0.67], {
+ extrapolateLeft: 'clamp',
+ extrapolateRight: 'clamp',
+ easing: [
+ Easing.spring({
+ damping: 5,
+ mass: 1,
+ stiffness: 63,
+ overshootClamping: false,
+ }),
+ ],
+ }),
+ translate: '0px -66.4px',
+ }}
+ >
+ <div
+ style={{
+ position: 'absolute',
+ inset: 0,
+ display: 'flex',
+ justifyContent: 'center',
+ alignItems: 'center',
+ }}
+ >
+ <div
+ style={{
+ display: 'flex',
+ alignItems: 'center',
+ }}
+ >
+ <div
+ style={{
+ ...textStyle,
+ transform: `skewX(${goSkew}deg) translateX(${goOffset}px)`,
+ }}
+ >
+ GO
+ </div>
+ <div style={{width: gap}} />
+ <div
+ style={{
+ ...textStyle,
+ transform: `skewX(${alSkew}deg) translateX(${alOffset}px)`,
+ }}
+ >
+ AL
+ </div>
+ </div>
+ </div>
+ </HtmlInCanvas>
+ <HtmlInCanvas
+ width={1280}
+ height={720}
+ pixelDensity={2}
+ style={{
+ translate: '0px -609.5px',
+ opacity: interpolate(frame, [24, 27], [0, 1], {
+ extrapolateLeft: 'clamp',
+ extrapolateRight: 'clamp',
+ }),
+ scale: interpolate(frame, [24, 27], [0.87, 1], {
+ extrapolateLeft: 'clamp',
+ extrapolateRight: 'clamp',
+ }),
+ }}
+ from={-1}
+ effects={[
+ halftoneLinearGradient({
+ maskToSourceAlpha: true,
+ colorMode: 'source',
+ gridSize: 4,
+ secondStopDotSize: 5,
+ secondStopPosition: [0.706, 0.628],
+ firstStopPosition: [-0.135, 0.787],
+ }),
+ ]}
+ >
+ <div
+ style={{
+ ...subtitleStyle,
+ position: 'absolute',
+ left: 0,
+ right: 0,
+ top: 430,
+ textAlign: 'center',
+ }}
+ >
+ {"27' COMENENCIA"}
+ </div>
+ </HtmlInCanvas>
+ </>
+ );
+};
diff --git a/packages/brand/src/effects/MetallicSwirl.tsx b/packages/brand/src/effects/MetallicSwirl.tsx
new file mode 100644
index 0000000000..52a2d02245
--- /dev/null
+++ b/packages/brand/src/effects/MetallicSwirl.tsx
@@ -0,0 +1,34 @@
+import {AbsoluteFill, Solid, useCurrentFrame, useVideoConfig} from 'remotion';
+import {metallicSwirl} from './metallic-swirl-effect';
+
+export const MetallicSwirl: React.FC = () => {
+ const frame = useCurrentFrame();
+ const {fps, width, height} = useVideoConfig();
+
+ return (
+ <AbsoluteFill>
+ <Solid
+ width={width}
+ height={height}
+ color="#000000"
+ effects={[
+ metallicSwirl({
+ time: frame / fps,
+ speed: 1.15,
+ zoom: 6,
+ iterations: 12,
+ sampleGap: 0.095,
+ tangentForce: 0.75,
+ gradientForce: 0.15,
+ colorRange: 1.05,
+ colorBias: 0.7,
+ colorA: '#ff0038',
+ colorB: '#0047ff',
+ brightness: 1.5,
+ backgroundColor: '#000000',
+ }),
+ ]}
+ />
+ </AbsoluteFill>
+ );
+};
diff --git a/packages/brand/src/effects/NewsHeadline.tsx b/packages/brand/src/effects/NewsHeadline.tsx
index 4610409130..c6fe9675da 100644
--- a/packages/brand/src/effects/NewsHeadline.tsx
+++ b/packages/brand/src/effects/NewsHeadline.tsx
@@ -23,18 +23,7 @@ export const NewsHeadline = () => {
premultiply: true,
}),
linearProgressiveBlur({
- end: interpolate(
- frame,
- [55, 119],
- [
- [0.782, 0.058],
- [0.816, -0.06],
- ],
- {
- extrapolateLeft: 'clamp',
- extrapolateRight: 'clamp',
- },
- ),
+ end: [0.799, -0.014],
start: [0.5, 0.5],
}),
linearProgressiveBlur({
@@ -49,15 +38,10 @@ export const NewsHeadline = () => {
]}
style={{
scale: 1,
- transformOrigin: interpolate(
- frame,
- [81, 104],
- ['18.64% 50%', '50% 50%'],
- {
- extrapolateLeft: 'clamp',
- extrapolateRight: 'clamp',
- },
- ),
+ transformOrigin: interpolate(frame, [81, 104], ['50% 50%', '50% 50%'], {
+ extrapolateLeft: 'clamp',
+ extrapolateRight: 'clamp',
+ }),
}}
>
<Solid
@@ -67,6 +51,7 @@ export const NewsHeadline = () => {
position: 'absolute',
}}
color={'#ffffff'}
+ showInTimeline={false}
/>
<Img
src={staticFile('Screenshot 2026-06-17 at 14.40.23.png')}
@@ -81,6 +66,7 @@ export const NewsHeadline = () => {
}}
width={966}
height={380}
+ showInTimeline={false}
/>
</HtmlInCanvas>
);
diff --git a/packages/brand/src/effects/Thermometer.tsx b/packages/brand/src/effects/Thermometer.tsx
new file mode 100644
index 0000000000..fca1d9a977
--- /dev/null
+++ b/packages/brand/src/effects/Thermometer.tsx
@@ -0,0 +1,116 @@
+import {wave} from '@remotion/effects/wave';
+import {waves} from '@remotion/effects/waves';
+import {loadFont} from '@remotion/fonts';
+import React from 'react';
+import {
+ CanvasImage,
+ HtmlInCanvas,
+ Interactive,
+ interpolate,
+ Solid,
+ staticFile,
+ useCurrentFrame,
+} from 'remotion';
+
+import {chromaticAberration} from '@remotion/effects/chromatic-aberration';
+import {noise} from '@remotion/effects/noise';
+import {shine} from '@remotion/effects/shine';
+
+const fontFamily = 'GTPlanar';
+
+loadFont({
+ family: fontFamily,
+ url: staticFile('GT Planar/GT-Planar-Bold.woff2'),
+ weight: '700',
+});
+
+export const Thermometer: React.FC = () => {
+ const frame = useCurrentFrame();
+ return (
+ <>
+ <Solid
+ width={1080}
+ height={1080}
+ style={{
+ position: 'absolute',
+ }}
+ color={'#ebebeb'}
+ effects={[
+ waves({
+ colors: ['rgba(255, 255, 255, 0.31)', 'rgba(255, 255, 255, 0)'],
+ thickness: 63.9,
+ angle: 131,
+ }),
+ wave({}),
+ ]}
+ />
+ <HtmlInCanvas
+ style={{
+ position: 'absolute',
+ left: 72,
+ top: 96,
+ fontFamily: `${fontFamily}, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif`,
+ fontSize: 112,
+ fontWeight: 700,
+ lineHeight: 0.92,
+ letterSpacing: '-0.04em',
+ color: '#111111',
+ whiteSpace: 'pre-line',
+ transformOrigin: '0% 0%',
+ scale: interpolate(frame, [0, 199], [1.08, 1.17], {
+ extrapolateLeft: 'clamp',
+ extrapolateRight: 'clamp',
+ }),
+ }}
+ width={500}
+ height={220}
+ pixelDensity={2}
+ effects={[
+ noise({
+ amount: 0.23,
+ }),
+ shine({}),
+ ]}
+ >
+ <Interactive.Div
+ style={{
+ scale: 0.892,
+ translate: '-23.7px -23.5px',
+ }}
+ >
+ {'Rufus\nOyemade'}
+ </Interactive.Div>
+ </HtmlInCanvas>
+ <CanvasImage
+ src={staticFile('image 1.png')}
+ style={{
+ position: 'absolute',
+ translate: '527.8px 205.3px',
+ scale: interpolate(frame, [0, 199], [1.15, 1.32], {
+ extrapolateLeft: 'clamp',
+ extrapolateRight: 'clamp',
+ }),
+ transformOrigin: interpolate(
+ frame,
+ [0, 199],
+ ['50% 50%', '50% 50%'],
+ {
+ extrapolateLeft: 'clamp',
+ extrapolateRight: 'clamp',
+ },
+ ),
+ }}
+ width={445}
+ height={819}
+ effects={[
+ chromaticAberration({
+ amount: interpolate(frame, [34, 45, 76], [0, 17, 0], {
+ extrapolateLeft: 'clamp',
+ extrapolateRight: 'clamp',
+ }),
+ }),
+ ]}
+ />
+ </>
+ );
+};
diff --git a/packages/brand/src/effects/metallic-swirl-effect.ts b/packages/brand/src/effects/metallic-swirl-effect.ts
new file mode 100644
index 0000000000..78e0a7f890
--- /dev/null
+++ b/packages/brand/src/effects/metallic-swirl-effect.ts
@@ -0,0 +1,686 @@
+import type {InteractivitySchema} from 'remotion';
+import {Internals} from 'remotion';
+
+const {createEffect, createWebGL2ContextError} = Internals;
+
+const DEFAULT_TIME = 0 as const;
+const DEFAULT_SPEED = 1 as const;
+const DEFAULT_ZOOM = 6 as const;
+const DEFAULT_ITERATIONS = 12 as const;
+const DEFAULT_SAMPLE_GAP = 0.095 as const;
+const DEFAULT_TANGENT_FORCE = 0.75 as const;
+const DEFAULT_GRADIENT_FORCE = 0.15 as const;
+const DEFAULT_COLOR_PHASE = 3.11 as const;
+const DEFAULT_COLOR_RANGE = 0.75 as const;
+const DEFAULT_COLOR_BIAS = 0.5 as const;
+const DEFAULT_COLOR_A = '#ff0038' as const;
+const DEFAULT_COLOR_B = '#0047ff' as const;
+const DEFAULT_BRIGHTNESS = 1 as const;
+const DEFAULT_BACKGROUND_COLOR = '#000000' as const;
+const DEFAULT_OPACITY = 1 as const;
+const DEFAULT_MODE = 'blend' as const;
+
+const MODES = ['blend', 'alpha-mask'] as const;
+
+const metallicSwirlSchema = {
+ time: {
+ type: 'number',
+ step: 0.01,
+ default: DEFAULT_TIME,
+ description: 'Time',
+ hiddenFromList: false,
+ },
+ speed: {
+ type: 'number',
+ min: 0,
+ max: 10,
+ step: 0.01,
+ default: DEFAULT_SPEED,
+ description: 'Speed',
+ hiddenFromList: false,
+ },
+ zoom: {
+ type: 'number',
+ min: 0.01,
+ max: 50,
+ step: 0.01,
+ default: DEFAULT_ZOOM,
+ description: 'Zoom',
+ hiddenFromList: false,
+ },
+ iterations: {
+ type: 'number',
+ min: 1,
+ max: 12,
+ step: 1,
+ default: DEFAULT_ITERATIONS,
+ description: 'Iterations',
+ hiddenFromList: false,
+ },
+ sampleGap: {
+ type: 'number',
+ min: 0.0001,
+ max: 1,
+ step: 0.001,
+ default: DEFAULT_SAMPLE_GAP,
+ description: 'Sample gap',
+ hiddenFromList: false,
+ },
+ tangentForce: {
+ type: 'number',
+ min: -5,
+ max: 5,
+ step: 0.01,
+ default: DEFAULT_TANGENT_FORCE,
+ description: 'Tangent force',
+ hiddenFromList: false,
+ },
+ gradientForce: {
+ type: 'number',
+ min: -5,
+ max: 5,
+ step: 0.01,
+ default: DEFAULT_GRADIENT_FORCE,
+ description: 'Gradient force',
+ hiddenFromList: false,
+ },
+ colorPhaseR: {
+ type: 'number',
+ step: 0.01,
+ default: DEFAULT_COLOR_PHASE,
+ description: 'Color phase R',
+ hiddenFromList: false,
+ },
+ colorPhaseG: {
+ type: 'number',
+ step: 0.01,
+ default: DEFAULT_COLOR_PHASE,
+ description: 'Color phase G',
+ hiddenFromList: false,
+ },
+ colorPhaseB: {
+ type: 'number',
+ step: 0.01,
+ default: DEFAULT_COLOR_PHASE,
+ description: 'Color phase B',
+ hiddenFromList: false,
+ },
+ colorRange: {
+ type: 'number',
+ min: 0,
+ max: 2,
+ step: 0.01,
+ default: DEFAULT_COLOR_RANGE,
+ description: 'Color range',
+ hiddenFromList: false,
+ },
+ colorBias: {
+ type: 'number',
+ min: 0,
+ max: 2,
+ step: 0.01,
+ default: DEFAULT_COLOR_BIAS,
+ description: 'Color bias',
+ hiddenFromList: false,
+ },
+ colorA: {
+ type: 'color',
+ default: DEFAULT_COLOR_A,
+ description: 'Color A',
+ },
+ colorB: {
+ type: 'color',
+ default: DEFAULT_COLOR_B,
+ description: 'Color B',
+ },
+ brightness: {
+ type: 'number',
+ min: 0,
+ max: 5,
+ step: 0.01,
+ default: DEFAULT_BRIGHTNESS,
+ description: 'Brightness',
+ hiddenFromList: false,
+ },
+ backgroundColor: {
+ type: 'color',
+ default: DEFAULT_BACKGROUND_COLOR,
+ description: 'Background color',
+ },
+ opacity: {
+ type: 'number',
+ min: 0,
+ max: 1,
+ step: 0.01,
+ default: DEFAULT_OPACITY,
+ description: 'Opacity',
+ hiddenFromList: false,
+ },
+ mode: {
+ type: 'enum',
+ variants: {
+ blend: {},
+ 'alpha-mask': {},
+ },
+ default: DEFAULT_MODE,
+ description: 'Mode',
+ },
+} as const satisfies InteractivitySchema;
+
+type MetallicSwirlMode = (typeof MODES)[number];
+
+export type MetallicSwirlParams = {
+ readonly time?: number;
+ readonly speed?: number;
+ readonly zoom?: number;
+ readonly iterations?: number;
+ readonly sampleGap?: number;
+ readonly tangentForce?: number;
+ readonly gradientForce?: number;
+ readonly colorPhaseR?: number;
+ readonly colorPhaseG?: number;
+ readonly colorPhaseB?: number;
+ readonly colorRange?: number;
+ readonly colorBias?: number;
+ readonly colorA?: string;
+ readonly colorB?: string;
+ readonly brightness?: number;
+ readonly backgroundColor?: string;
+ readonly opacity?: number;
+ readonly mode?: MetallicSwirlMode;
+};
+
+type MetallicSwirlResolved = {
+ time: number;
+ speed: number;
+ zoom: number;
+ iterations: number;
+ sampleGap: number;
+ tangentForce: number;
+ gradientForce: number;
+ colorPhaseR: number;
+ colorPhaseG: number;
+ colorPhaseB: number;
+ colorRange: number;
+ colorBias: number;
+ colorA: string;
+ colorB: string;
+ brightness: number;
+ backgroundColor: string;
+ opacity: number;
+ mode: MetallicSwirlMode;
+};
+
+type Rgb = readonly [number, number, number];
+
+type MetallicSwirlState = {
+ gl: WebGL2RenderingContext;
+ program: WebGLProgram;
+ vao: WebGLVertexArrayObject;
+ vbo: WebGLBuffer;
+ texture: WebGLTexture;
+ uSource: WebGLUniformLocation | null;
+ uResolution: WebGLUniformLocation | null;
+ uTime: WebGLUniformLocation | null;
+ uSpeed: WebGLUniformLocation | null;
+ uZoom: WebGLUniformLocation | null;
+ uIterations: WebGLUniformLocation | null;
+ uSampleGap: WebGLUniformLocation | null;
+ uTangentForce: WebGLUniformLocation | null;
+ uGradientForce: WebGLUniformLocation | null;
+ uColorPhase: WebGLUniformLocation | null;
+ uColorRange: WebGLUniformLocation | null;
+ uColorBias: WebGLUniformLocation | null;
+ uColorA: WebGLUniformLocation | null;
+ uColorB: WebGLUniformLocation | null;
+ uBrightness: WebGLUniformLocation | null;
+ uBackgroundColor: WebGLUniformLocation | null;
+ uOpacity: WebGLUniformLocation | null;
+ uMode: WebGLUniformLocation | null;
+};
+
+const resolve = (params: MetallicSwirlParams): MetallicSwirlResolved => ({
+ time: params.time ?? DEFAULT_TIME,
+ speed: params.speed ?? DEFAULT_SPEED,
+ zoom: params.zoom ?? DEFAULT_ZOOM,
+ iterations: params.iterations ?? DEFAULT_ITERATIONS,
+ sampleGap: params.sampleGap ?? DEFAULT_SAMPLE_GAP,
+ tangentForce: params.tangentForce ?? DEFAULT_TANGENT_FORCE,
+ gradientForce: params.gradientForce ?? DEFAULT_GRADIENT_FORCE,
+ colorPhaseR: params.colorPhaseR ?? DEFAULT_COLOR_PHASE,
+ colorPhaseG: params.colorPhaseG ?? DEFAULT_COLOR_PHASE,
+ colorPhaseB: params.colorPhaseB ?? DEFAULT_COLOR_PHASE,
+ colorRange: params.colorRange ?? DEFAULT_COLOR_RANGE,
+ colorBias: params.colorBias ?? DEFAULT_COLOR_BIAS,
+ colorA: params.colorA ?? DEFAULT_COLOR_A,
+ colorB: params.colorB ?? DEFAULT_COLOR_B,
+ brightness: params.brightness ?? DEFAULT_BRIGHTNESS,
+ backgroundColor: params.backgroundColor ?? DEFAULT_BACKGROUND_COLOR,
+ opacity: params.opacity ?? DEFAULT_OPACITY,
+ mode: params.mode ?? DEFAULT_MODE,
+});
+
+const assertParamsObject = (
+ params: MetallicSwirlParams,
+ name: string,
+): void => {
+ if (params === null || typeof params !== 'object' || Array.isArray(params)) {
+ throw new TypeError(`${name} params must be an object`);
+ }
+};
+
+const assertOptionalFiniteNumber = (
+ value: unknown,
+ name: keyof MetallicSwirlParams,
+): void => {
+ if (value === undefined) {
+ return;
+ }
+
+ if (typeof value !== 'number' || !Number.isFinite(value)) {
+ throw new TypeError(`"${name}" must be a finite number`);
+ }
+};
+
+const validateRange = (
+ value: number,
+ name: keyof MetallicSwirlParams,
+ min: number,
+ max: number,
+): void => {
+ if (value < min || value > max) {
+ throw new TypeError(`"${name}" must be between ${min} and ${max}`);
+ }
+};
+
+const assertOptionalEnum = <T extends string>(
+ value: unknown,
+ name: keyof MetallicSwirlParams,
+ variants: readonly T[],
+): void => {
+ if (value === undefined) {
+ return;
+ }
+
+ if (typeof value !== 'string' || !variants.includes(value as T)) {
+ throw new TypeError(`"${name}" must be one of ${variants.join(', ')}`);
+ }
+};
+
+const parseHexColor = (hex: string, name: keyof MetallicSwirlParams): Rgb => {
+ const match = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
+ if (!match) {
+ throw new TypeError(`"${name}" must be a hex color such as "#000000"`);
+ }
+
+ return [
+ parseInt(match[1], 16) / 255,
+ parseInt(match[2], 16) / 255,
+ parseInt(match[3], 16) / 255,
+ ];
+};
+
+const validateMetallicSwirlParams = (
+ params: MetallicSwirlParams = {},
+): void => {
+ assertParamsObject(params, 'Metallic swirl');
+ assertOptionalFiniteNumber(params.time, 'time');
+ assertOptionalFiniteNumber(params.speed, 'speed');
+ assertOptionalFiniteNumber(params.zoom, 'zoom');
+ assertOptionalFiniteNumber(params.iterations, 'iterations');
+ assertOptionalFiniteNumber(params.sampleGap, 'sampleGap');
+ assertOptionalFiniteNumber(params.tangentForce, 'tangentForce');
+ assertOptionalFiniteNumber(params.gradientForce, 'gradientForce');
+ assertOptionalFiniteNumber(params.colorPhaseR, 'colorPhaseR');
+ assertOptionalFiniteNumber(params.colorPhaseG, 'colorPhaseG');
+ assertOptionalFiniteNumber(params.colorPhaseB, 'colorPhaseB');
+ assertOptionalFiniteNumber(params.colorRange, 'colorRange');
+ assertOptionalFiniteNumber(params.colorBias, 'colorBias');
+ assertOptionalFiniteNumber(params.brightness, 'brightness');
+ assertOptionalFiniteNumber(params.opacity, 'opacity');
+ assertOptionalEnum(params.mode, 'mode', MODES);
+
+ if (
+ params.backgroundColor !== undefined &&
+ typeof params.backgroundColor !== 'string'
+ ) {
+ throw new TypeError('"backgroundColor" must be a string');
+ }
+
+ if (params.colorA !== undefined && typeof params.colorA !== 'string') {
+ throw new TypeError('"colorA" must be a string');
+ }
+
+ if (params.colorB !== undefined && typeof params.colorB !== 'string') {
+ throw new TypeError('"colorB" must be a string');
+ }
+
+ const resolved = resolve(params);
+ validateRange(resolved.speed, 'speed', 0, 10);
+ validateRange(resolved.zoom, 'zoom', 0.01, 50);
+ validateRange(resolved.iterations, 'iterations', 1, 12);
+ validateRange(resolved.sampleGap, 'sampleGap', 0.0001, 1);
+ validateRange(resolved.colorRange, 'colorRange', 0, 2);
+ validateRange(resolved.colorBias, 'colorBias', 0, 2);
+ validateRange(resolved.brightness, 'brightness', 0, 5);
+ validateRange(resolved.opacity, 'opacity', 0, 1);
+ parseHexColor(resolved.backgroundColor, 'backgroundColor');
+ parseHexColor(resolved.colorA, 'colorA');
+ parseHexColor(resolved.colorB, 'colorB');
+};
+
+const VERTEX_SHADER = /* glsl */ `#version 300 es
+in vec2 aPos;
+in vec2 aUv;
+out vec2 vUv;
+
+void main() {
+ vUv = aUv;
+ gl_Position = vec4(aPos, 0.0, 1.0);
+}
+`;
+
+const FRAGMENT_SHADER = /* glsl */ `#version 300 es
+precision highp float;
+
+in vec2 vUv;
+out vec4 fragColor;
+
+uniform sampler2D uSource;
+uniform vec2 uResolution;
+uniform float uTime;
+uniform float uSpeed;
+uniform float uZoom;
+uniform int uIterations;
+uniform float uSampleGap;
+uniform float uTangentForce;
+uniform float uGradientForce;
+uniform vec3 uColorPhase;
+uniform float uColorRange;
+uniform float uColorBias;
+uniform vec3 uColorA;
+uniform vec3 uColorB;
+uniform float uBrightness;
+uniform vec3 uBackgroundColor;
+uniform float uOpacity;
+uniform int uMode;
+
+float wave(vec2 p, float t) {
+ return sin(p.x + sin(p.y + t * 0.1)) * sin(p.y * p.x * 0.1 + t * 0.2);
+}
+
+void main() {
+ vec4 source = texture(uSource, vUv);
+ vec3 sourceRgb = source.a > 0.001 ? source.rgb / source.a : vec3(0.0);
+
+ vec2 aspect = vec2(uResolution.x / max(uResolution.y, 1.0), 1.0);
+ vec2 p = (vUv - 0.5) * aspect * uZoom;
+ float t = uTime * uSpeed;
+ vec2 ep = vec2(uSampleGap, 0.0);
+ vec2 flow = vec2(0.0);
+
+ for (int i = 0; i < 12; i++) {
+ if (i >= uIterations) {
+ break;
+ }
+
+ float s0 = wave(p, t);
+ float sx = wave(p + ep, t);
+ float sy = wave(p + ep.yx, t);
+ vec2 gradient = vec2(sx - s0, sy - s0) / ep.xx;
+ vec2 tangent = vec2(-gradient.y, gradient.x);
+ p += uTangentForce * tangent + gradient * uGradientForce;
+ flow = tangent;
+ }
+
+ float value = flow.x - flow.y;
+ float paletteMix = sin(value + uColorPhase.r) * 0.5 + 0.5;
+ vec3 color = mix(uColorA, uColorB, paletteMix);
+ color *= sin(uColorPhase + value) * uColorRange + uColorBias;
+ color *= uBrightness;
+
+ float luminance = dot(color, vec3(0.299, 0.587, 0.114));
+ vec3 generated = mix(
+ uBackgroundColor,
+ color,
+ clamp(luminance * 6.0, 0.0, 1.0)
+ );
+ vec3 result = uMode == 1 ? generated : mix(sourceRgb, generated, uOpacity);
+ float alpha = uMode == 1 ? source.a * uOpacity : source.a;
+
+ fragColor = vec4(result * alpha, alpha);
+}
+`;
+
+const compileShader = (
+ gl: WebGL2RenderingContext,
+ type: number,
+ source: string,
+): WebGLShader => {
+ const shader = gl.createShader(type);
+ if (!shader) {
+ throw new Error('Failed to create WebGL shader');
+ }
+
+ gl.shaderSource(shader, source);
+ gl.compileShader(shader);
+ if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {
+ const log = gl.getShaderInfoLog(shader);
+ gl.deleteShader(shader);
+ throw new Error(
+ `Metallic swirl shader compile failed: ${log ?? '(no log)'}`,
+ );
+ }
+
+ return shader;
+};
+
+const linkProgram = (
+ gl: WebGL2RenderingContext,
+ vs: WebGLShader,
+ fs: WebGLShader,
+): WebGLProgram => {
+ const program = gl.createProgram();
+ if (!program) {
+ throw new Error('Failed to create WebGL program');
+ }
+
+ gl.attachShader(program, vs);
+ gl.attachShader(program, fs);
+ gl.linkProgram(program);
+ if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {
+ const log = gl.getProgramInfoLog(program);
+ gl.deleteProgram(program);
+ throw new Error(`Metallic swirl program link failed: ${log ?? '(no log)'}`);
+ }
+
+ return program;
+};
+
+export const metallicSwirl = createEffect<
+ MetallicSwirlParams,
+ MetallicSwirlState
+>({
+ type: 'dev.remotion.brand.metallic-swirl',
+ label: 'metallicSwirl()',
+ documentationLink: null,
+ backend: 'webgl2',
+ calculateKey: (params) => {
+ const r = resolve(params);
+ return [
+ 'metallic-swirl',
+ r.time,
+ r.speed,
+ r.zoom,
+ r.iterations,
+ r.sampleGap,
+ r.tangentForce,
+ r.gradientForce,
+ r.colorPhaseR,
+ r.colorPhaseG,
+ r.colorPhaseB,
+ r.colorRange,
+ r.colorBias,
+ r.colorA,
+ r.colorB,
+ r.brightness,
+ r.backgroundColor,
+ r.opacity,
+ r.mode,
+ ].join('-');
+ },
+ setup: (target) => {
+ const gl = target.getContext('webgl2', {
+ premultipliedAlpha: true,
+ alpha: true,
+ preserveDrawingBuffer: true,
+ });
+ if (!gl) {
+ throw createWebGL2ContextError('metallic swirl effect');
+ }
+
+ gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);
+
+ const vs = compileShader(gl, gl.VERTEX_SHADER, VERTEX_SHADER);
+ const fs = compileShader(gl, gl.FRAGMENT_SHADER, FRAGMENT_SHADER);
+ const program = linkProgram(gl, vs, fs);
+ gl.deleteShader(vs);
+ gl.deleteShader(fs);
+
+ const vao = gl.createVertexArray();
+ if (!vao) {
+ throw new Error('Failed to create WebGL vertex array');
+ }
+
+ gl.bindVertexArray(vao);
+
+ const data = new Float32Array([
+ -1, -1, 0, 0, 1, -1, 1, 0, -1, 1, 0, 1, 1, 1, 1, 1,
+ ]);
+
+ const vbo = gl.createBuffer();
+ if (!vbo) {
+ throw new Error('Failed to create WebGL buffer');
+ }
+
+ gl.bindBuffer(gl.ARRAY_BUFFER, vbo);
+ gl.bufferData(gl.ARRAY_BUFFER, data, gl.STATIC_DRAW);
+
+ const aPos = gl.getAttribLocation(program, 'aPos');
+ const aUv = gl.getAttribLocation(program, 'aUv');
+ gl.enableVertexAttribArray(aPos);
+ gl.vertexAttribPointer(aPos, 2, gl.FLOAT, false, 16, 0);
+ gl.enableVertexAttribArray(aUv);
+ gl.vertexAttribPointer(aUv, 2, gl.FLOAT, false, 16, 8);
+
+ gl.bindVertexArray(null);
+
+ const texture = gl.createTexture();
+ if (!texture) {
+ throw new Error('Failed to create WebGL texture');
+ }
+
+ gl.bindTexture(gl.TEXTURE_2D, texture);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+ gl.bindTexture(gl.TEXTURE_2D, null);
+
+ return {
+ gl,
+ program,
+ vao,
+ vbo,
+ texture,
+ uSource: gl.getUniformLocation(program, 'uSource'),
+ uResolution: gl.getUniformLocation(program, 'uResolution'),
+ uTime: gl.getUniformLocation(program, 'uTime'),
+ uSpeed: gl.getUniformLocation(program, 'uSpeed'),
+ uZoom: gl.getUniformLocation(program, 'uZoom'),
+ uIterations: gl.getUniformLocation(program, 'uIterations'),
+ uSampleGap: gl.getUniformLocation(program, 'uSampleGap'),
+ uTangentForce: gl.getUniformLocation(program, 'uTangentForce'),
+ uGradientForce: gl.getUniformLocation(program, 'uGradientForce'),
+ uColorPhase: gl.getUniformLocation(program, 'uColorPhase'),
+ uColorRange: gl.getUniformLocation(program, 'uColorRange'),
+ uColorBias: gl.getUniformLocation(program, 'uColorBias'),
+ uColorA: gl.getUniformLocation(program, 'uColorA'),
+ uColorB: gl.getUniformLocation(program, 'uColorB'),
+ uBrightness: gl.getUniformLocation(program, 'uBrightness'),
+ uBackgroundColor: gl.getUniformLocation(program, 'uBackgroundColor'),
+ uOpacity: gl.getUniformLocation(program, 'uOpacity'),
+ uMode: gl.getUniformLocation(program, 'uMode'),
+ };
+ },
+ apply: ({source, width, height, params, state, flipSourceY}) => {
+ const r = resolve(params);
+ const [bgR, bgG, bgB] = parseHexColor(r.backgroundColor, 'backgroundColor');
+ const [colorAR, colorAG, colorAB] = parseHexColor(r.colorA, 'colorA');
+ const [colorBR, colorBG, colorBB] = parseHexColor(r.colorB, 'colorB');
+ const {gl, program, vao, texture} = state;
+
+ gl.viewport(0, 0, width, height);
+ gl.clearColor(0, 0, 0, 0);
+ gl.clear(gl.COLOR_BUFFER_BIT);
+
+ gl.useProgram(program);
+ gl.bindVertexArray(vao);
+
+ gl.activeTexture(gl.TEXTURE0);
+ gl.bindTexture(gl.TEXTURE_2D, texture);
+ gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, flipSourceY);
+ gl.texImage2D(
+ gl.TEXTURE_2D,
+ 0,
+ gl.RGBA,
+ gl.RGBA,
+ gl.UNSIGNED_BYTE,
+ source as TexImageSource,
+ );
+
+ if (state.uSource) gl.uniform1i(state.uSource, 0);
+ if (state.uResolution) gl.uniform2f(state.uResolution, width, height);
+ if (state.uTime) gl.uniform1f(state.uTime, r.time);
+ if (state.uSpeed) gl.uniform1f(state.uSpeed, r.speed);
+ if (state.uZoom) gl.uniform1f(state.uZoom, r.zoom);
+ if (state.uIterations)
+ gl.uniform1i(state.uIterations, Math.round(r.iterations));
+ if (state.uSampleGap) gl.uniform1f(state.uSampleGap, r.sampleGap);
+ if (state.uTangentForce) gl.uniform1f(state.uTangentForce, r.tangentForce);
+ if (state.uGradientForce)
+ gl.uniform1f(state.uGradientForce, r.gradientForce);
+ if (state.uColorPhase) {
+ gl.uniform3f(
+ state.uColorPhase,
+ r.colorPhaseR,
+ r.colorPhaseG,
+ r.colorPhaseB,
+ );
+ }
+
+ if (state.uColorRange) gl.uniform1f(state.uColorRange, r.colorRange);
+ if (state.uColorBias) gl.uniform1f(state.uColorBias, r.colorBias);
+ if (state.uColorA) gl.uniform3f(state.uColorA, colorAR, colorAG, colorAB);
+ if (state.uColorB) gl.uniform3f(state.uColorB, colorBR, colorBG, colorBB);
+ if (state.uBrightness) gl.uniform1f(state.uBrightness, r.brightness);
+ if (state.uBackgroundColor)
+ gl.uniform3f(state.uBackgroundColor, bgR, bgG, bgB);
+ if (state.uOpacity) gl.uniform1f(state.uOpacity, r.opacity);
+ if (state.uMode) gl.uniform1i(state.uMode, r.mode === 'alpha-mask' ? 1 : 0);
+
+ gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);
+
+ gl.bindVertexArray(null);
+ gl.bindTexture(gl.TEXTURE_2D, null);
+ gl.useProgram(null);
+ },
+ cleanup: ({gl, program, vao, vbo, texture}) => {
+ gl.deleteBuffer(vbo);
+ gl.deleteProgram(program);
+ gl.deleteVertexArray(vao);
+ gl.deleteTexture(texture);
+ },
+ schema: metallicSwirlSchema,
+ validateParams: validateMetallicSwirlParams,
+});
diff --git a/packages/effects/src/gridlines.ts b/packages/effects/src/gridlines.ts
index 60438a6994..59db4cfd4f 100644
--- a/packages/effects/src/gridlines.ts
+++ b/packages/effects/src/gridlines.ts
@@ -66,7 +66,7 @@ export const gridlinesSchema = {
type: 'rotation-degrees',
min: -180,
max: 180,
- step: 1,
+ step: 0.1,
default: DEFAULT_ROTATION_X,
description: 'Rotation X',
},
@@ -74,7 +74,7 @@ export const gridlinesSchema = {
type: 'rotation-degrees',
min: -180,
max: 180,
- step: 1,
+ step: 0.1,
default: DEFAULT_ROTATION_Y,
description: 'Rotation Y',
},
diff --git a/packages/studio/src/components/Editor.tsx b/packages/studio/src/components/Editor.tsx
index 13d17191e6..c3e716d8e3 100644
--- a/packages/studio/src/components/Editor.tsx
+++ b/packages/studio/src/components/Editor.tsx
@@ -127,7 +127,7 @@ export const Editor: React.FC<{
);
return CANVAS_CAPTURE_ENABLED ? (
- <StudioCanvasCapture density={3}>{editor}</StudioCanvasCapture>
+ <StudioCanvasCapture density={1.5}>{editor}</StudioCanvasCapture>
) : (
editor
);