🎥 Make videos programmatically with React
Internal testbed: Add WhatsNew video composition
Jonny Burger0ed6cf8a6913
diff --git a/packages/example/src/Root.tsx b/packages/example/src/Root.tsxindex 0638f665a5..e80d5d4500 100644--- a/packages/example/src/Root.tsx+++ b/packages/example/src/Root.tsx@@ -167,8 +167,8 @@ import {import {TriggerCalculateMetadata} from './StudioApis/TriggerCalculateMetadata';import {WriteStaticFile} from './StudioApis/WriteStaticFile';import {SubtitleArtifact} from './SubtitleArtifact/SubtitleArtifact';-import './style.css';import {SvgFilter} from './SvgFilter';+import './style.css';import {Tailwind} from './Tailwind';import {TenFrameTester} from './TenFrameTester';import {TextStroke} from './TextStroke';@@ -195,6 +195,7 @@ import {VisualMode3D} from './VisualMode3D';import {WarpDemoOuter} from './WarpText';import {WarpDemo2} from './WarpText/demo2';import {WatchStaticDemo} from './watch-static';+import {WhatsNewRoot} from './WhatsNew/Root';import {ZodV4SchemaTest, zodV4Schema} from './ZodV4SchemaTest';// @ts-expect-error no typesimport styles from './styles.module.scss';@@ -463,6 +464,9 @@ export const Index: React.FC = () => {return (<>+ <Folder name="WhatsNew">+ <WhatsNewRoot />+ </Folder><Compositionid="AnimatedBarChart"component={BarChart}diff --git a/packages/example/src/WhatsNew/Root.tsx b/packages/example/src/WhatsNew/Root.tsxnew file mode 100644index 0000000000..0d3e84046b--- /dev/null+++ b/packages/example/src/WhatsNew/Root.tsx@@ -0,0 +1,117 @@+import './fonts';+import {Composition, Folder, Still} from 'remotion';+import {AgentsScene} from './scenes/Agents';+import {BundlingScene} from './scenes/Bundling';+import {ClientSideScene} from './scenes/ClientSide';+import {IntroScene} from './scenes/Intro';+import {LightLeaksScene} from './scenes/LightLeaks';+import {OutroScene} from './scenes/Outro';+import {SkillsScene} from './scenes/Skills';+import {SneakPeekScene} from './scenes/SneakPeek';+import {SoundEffectsScene} from './scenes/SoundEffects';+import {VercelScene} from './scenes/Vercel';+import {Thumbnail} from './Thumbnail';+import {WhatsNew} from './WhatsNew';++export const WhatsNewRoot: React.FC = () => {+ return (+ <>+ <Composition+ id="WhatsNew"+ component={WhatsNew}+ durationInFrames={7328}+ fps={30}+ width={1920}+ height={1080}+ />+ <Still+ id="WhatsNew-Thumbnail"+ component={Thumbnail}+ width={1280}+ height={720}+ />+ <Folder name="WhatsNew-Scenes">+ <Composition+ id="WhatsNew-Intro"+ component={IntroScene}+ durationInFrames={208}+ fps={30}+ width={1920}+ height={1080}+ />+ <Composition+ id="WhatsNew-LightLeaks"+ component={LightLeaksScene}+ durationInFrames={720}+ fps={30}+ width={1920}+ height={1080}+ />+ <Composition+ id="WhatsNew-SoundEffects"+ component={SoundEffectsScene}+ durationInFrames={1152}+ fps={30}+ width={1920}+ height={1080}+ />+ <Composition+ id="WhatsNew-Vercel"+ component={VercelScene}+ durationInFrames={1040}+ fps={30}+ width={1920}+ height={1080}+ />+ <Composition+ id="WhatsNew-Skills"+ component={SkillsScene}+ durationInFrames={608}+ fps={30}+ width={1920}+ height={1080}+ />+ <Composition+ id="WhatsNew-ClientSide"+ component={ClientSideScene}+ durationInFrames={832}+ fps={30}+ width={1920}+ height={1080}+ />+ <Composition+ id="WhatsNew-Agents"+ component={AgentsScene}+ durationInFrames={976}+ fps={30}+ width={1920}+ height={1080}+ />+ <Composition+ id="WhatsNew-Bundling"+ component={BundlingScene}+ durationInFrames={720}+ fps={30}+ width={1920}+ height={1080}+ />+ <Composition+ id="WhatsNew-SneakPeek"+ component={SneakPeekScene}+ durationInFrames={912}+ fps={30}+ width={1920}+ height={1080}+ />+ <Composition+ id="WhatsNew-Outro"+ component={OutroScene}+ durationInFrames={160}+ fps={30}+ width={1920}+ height={1080}+ />+ </Folder>+ </>+ );+};diff --git a/packages/example/src/WhatsNew/Thumbnail.tsx b/packages/example/src/WhatsNew/Thumbnail.tsxnew file mode 100644index 0000000000..9388de4d11--- /dev/null+++ b/packages/example/src/WhatsNew/Thumbnail.tsx@@ -0,0 +1,115 @@+import {lightLeak} from '@remotion/effects/light-leak';+import React from 'react';+import {AbsoluteFill, Img, Solid} from 'remotion';+import {+ BoltIcon,+ EyeIcon,+ SparkIcon,+ SpeakerIcon,+ TriangleIcon,+} from './components/icons';+import {RemotionLogo} from './components/Logo';+import {display} from './fonts';+import {accents, colors} from './theme';++const tiles = [+ {color: accents.lightLeaks, icon: <SparkIcon size={44} color="#fff" />},+ {color: accents.soundEffects, icon: <SpeakerIcon size={44} color="#fff" />},+ {color: '#FFFFFF', icon: <TriangleIcon size={38} color="#000" />},+ {color: accents.bundling, icon: <BoltIcon size={44} color={colors.ink} />},+ {color: '#2A1F4D', icon: <EyeIcon size={44} color={accents.sneakPeek} />},+];++export const Thumbnail: React.FC = () => {+ return (+ <AbsoluteFill style={{backgroundColor: '#06080E', overflow: 'hidden'}}>+ <Img+ src={+ 'https://remotion.media/announcements/whats-new-in-remotion/cursor/thumbnail/face.jpg'+ }+ style={{+ position: 'absolute',+ left: -160,+ top: -150,+ width: 2016,+ height: 1134,+ maxWidth: 'none',+ filter: 'contrast(1.1) saturate(1.15) brightness(1.02)',+ }}+ />+ <Solid+ width={1280}+ height={720}+ style={{position: 'absolute', mixBlendMode: 'screen', opacity: 0.7}}+ effects={[lightLeak({seed: 9, hueShift: 0, progress: 0.22})]}+ />+ <AbsoluteFill+ style={{+ background:+ 'linear-gradient(90deg, rgba(6,8,14,0.94) 0%, rgba(6,8,14,0.8) 34%, rgba(6,8,14,0) 60%)',+ }}+ />+ <div+ style={{+ position: 'absolute',+ left: 64,+ top: 70,+ display: 'flex',+ flexDirection: 'column',+ gap: 16,+ }}+ >+ <div style={{display: 'flex', alignItems: 'center', gap: 16}}>+ <RemotionLogo size={62} />+ <div+ style={{+ fontFamily: display,+ fontWeight: 700,+ fontSize: 44,+ color: colors.paper,+ letterSpacing: '-0.02em',+ }}+ >+ Remotion+ </div>+ </div>+ <div+ style={{+ fontFamily: display,+ fontWeight: 700,+ fontSize: 150,+ lineHeight: 0.88,+ letterSpacing: '-0.045em',+ color: colors.paper,+ textTransform: 'uppercase',+ textShadow: '0 8px 30px rgba(0,0,0,0.5)',+ }}+ >+ What's+ <br />+ <span style={{color: colors.blue}}>new</span>+ </div>+ <div style={{display: 'flex', gap: 14, marginTop: 26}}>+ {tiles.map((tile, i) => (+ <div+ key={i}+ style={{+ width: 86,+ height: 86,+ borderRadius: 24,+ backgroundColor: tile.color,+ display: 'flex',+ alignItems: 'center',+ justifyContent: 'center',+ boxShadow: '0 12px 30px rgba(0,0,0,0.45)',+ rotate: `${i % 2 === 0 ? -4 : 4}deg`,+ }}+ >+ {tile.icon}+ </div>+ ))}+ </div>+ </div>+ </AbsoluteFill>+ );+};diff --git a/packages/example/src/WhatsNew/WhatsNew.tsx b/packages/example/src/WhatsNew/WhatsNew.tsxnew file mode 100644index 0000000000..8641593405--- /dev/null+++ b/packages/example/src/WhatsNew/WhatsNew.tsx@@ -0,0 +1,134 @@+import {Audio} from '@remotion/media';+import {TransitionSeries} from '@remotion/transitions';+import React from 'react';+import {AbsoluteFill, interpolate, useCurrentFrame} from 'remotion';+import {LightLeakFx} from './components/LightLeakFx';+import {AgentsScene} from './scenes/Agents';+import {BundlingScene} from './scenes/Bundling';+import {ClientSideScene} from './scenes/ClientSide';+import {IntroScene} from './scenes/Intro';+import {LightLeaksScene} from './scenes/LightLeaks';+import {OutroScene} from './scenes/Outro';+import {SkillsScene} from './scenes/Skills';+import {SneakPeekScene} from './scenes/SneakPeek';+import {SoundEffectsScene} from './scenes/SoundEffects';+import {VercelScene} from './scenes/Vercel';++// Every scene is a whole number of beats (16 frames at 112.5 BPM), so each+// chapter starts on a downbeat of the score.+export const WhatsNew: React.FC = () => {+ const frame = useCurrentFrame();++ return (+ <AbsoluteFill style={{backgroundColor: '#000'}}>+ <TransitionSeries name="Chapters">+ <TransitionSeries.Sequence+ name="Intro"+ durationInFrames={208}+ premountFor={60}+ >+ <IntroScene />+ </TransitionSeries.Sequence>+ <TransitionSeries.Overlay durationInFrames={32}>+ <LightLeakFx seed={1} hueShift={0} />+ </TransitionSeries.Overlay>+ <TransitionSeries.Sequence+ name="Light leaks"+ durationInFrames={720}+ premountFor={60}+ >+ <LightLeaksScene />+ </TransitionSeries.Sequence>+ <TransitionSeries.Overlay durationInFrames={32}>+ <LightLeakFx seed={4} hueShift={135} />+ </TransitionSeries.Overlay>+ <TransitionSeries.Sequence+ name="Sound effects"+ durationInFrames={1152}+ premountFor={60}+ >+ <SoundEffectsScene />+ </TransitionSeries.Sequence>+ <TransitionSeries.Overlay durationInFrames={32}>+ <LightLeakFx seed={7} hueShift={20} />+ </TransitionSeries.Overlay>+ <TransitionSeries.Sequence+ name="Render on Vercel"+ durationInFrames={1040}+ premountFor={60}+ >+ <VercelScene />+ </TransitionSeries.Sequence>+ <TransitionSeries.Overlay durationInFrames={32}>+ <LightLeakFx seed={10} hueShift={245} />+ </TransitionSeries.Overlay>+ <TransitionSeries.Sequence+ name="New skills"+ durationInFrames={608}+ premountFor={60}+ >+ <SkillsScene />+ </TransitionSeries.Sequence>+ <TransitionSeries.Overlay durationInFrames={32}>+ <LightLeakFx seed={13} hueShift={185} />+ </TransitionSeries.Overlay>+ <TransitionSeries.Sequence+ name="Client-side rendering"+ durationInFrames={832}+ premountFor={60}+ >+ <ClientSideScene />+ </TransitionSeries.Sequence>+ <TransitionSeries.Overlay durationInFrames={32}>+ <LightLeakFx seed={16} hueShift={45} />+ </TransitionSeries.Overlay>+ <TransitionSeries.Sequence+ name="Better with agents"+ durationInFrames={976}+ premountFor={60}+ >+ <AgentsScene />+ </TransitionSeries.Sequence>+ <TransitionSeries.Overlay durationInFrames={32}>+ <LightLeakFx seed={19} hueShift={345} />+ </TransitionSeries.Overlay>+ <TransitionSeries.Sequence+ name="Faster bundling"+ durationInFrames={720}+ premountFor={60}+ >+ <BundlingScene />+ </TransitionSeries.Sequence>+ <TransitionSeries.Overlay durationInFrames={32}>+ <LightLeakFx seed={22} hueShift={120} />+ </TransitionSeries.Overlay>+ <TransitionSeries.Sequence+ name="Sneak peek"+ durationInFrames={912}+ premountFor={60}+ >+ <SneakPeekScene />+ </TransitionSeries.Sequence>+ <TransitionSeries.Overlay durationInFrames={32}>+ <LightLeakFx seed={25} hueShift={180} />+ </TransitionSeries.Overlay>+ <TransitionSeries.Sequence name="Outro" durationInFrames={160}>+ <OutroScene />+ </TransitionSeries.Sequence>+ </TransitionSeries>++ <Audio+ name="Score"+ src={+ 'https://remotion.media/announcements/whats-new-in-remotion/cursor/music/score.wav'+ }+ volume={interpolate(+ frame,+ [0, 16, 106, 114, 204, 226, 6250, 6280, 7160, 7172, 7296, 7328],+ [0, 0.3, 0.3, 0.55, 0.55, 0.13, 0.13, 0.17, 0.17, 0.7, 0.7, 0],+ {extrapolateLeft: 'clamp', extrapolateRight: 'clamp'},+ )}+ />+ </AbsoluteFill>+ );+};diff --git a/packages/example/src/WhatsNew/anim.ts b/packages/example/src/WhatsNew/anim.tsnew file mode 100644index 0000000000..0f41869158--- /dev/null+++ b/packages/example/src/WhatsNew/anim.ts@@ -0,0 +1,43 @@+import {Easing, interpolate, spring} from 'remotion';++export const FPS = 30;++export const easeOut = Easing.bezier(0.16, 1, 0.3, 1);+export const easeInOut = Easing.bezier(0.65, 0, 0.35, 1);++const clamp = {+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+} as const;++// Bouncy entrance, 0 -> 1 (slightly overshooting).+export const pop = (frame: number, delay = 0, damping = 12) =>+ spring({+ frame: frame - delay,+ fps: FPS,+ config: {damping, stiffness: 180, mass: 0.7},+ });++// Smooth entrance without overshoot, 0 -> 1.+export const rise = (frame: number, delay = 0, duration = 18) =>+ interpolate(frame, [delay, delay + duration], [0, 1], {+ ...clamp,+ easing: easeOut,+ });++// 1 -> 0 over the last `duration` frames before `end`.+export const exit = (frame: number, end: number, duration = 10) =>+ interpolate(frame, [end - duration, end], [1, 0], {+ ...clamp,+ easing: Easing.bezier(0.7, 0, 0.84, 0),+ });++export const lerp = (a: number, b: number, t: number) => a + (b - a) * t;++// Number of characters of `text` revealed by a typewriter starting at `delay`.+export const typed = (+ frame: number,+ text: string,+ delay = 0,+ charsPerFrame = 1.2,+) => text.slice(0, Math.max(0, Math.floor((frame - delay) * charsPerFrame)));diff --git a/packages/example/src/WhatsNew/components/Background.tsx b/packages/example/src/WhatsNew/components/Background.tsxnew file mode 100644index 0000000000..3a1f8f7bba--- /dev/null+++ b/packages/example/src/WhatsNew/components/Background.tsx@@ -0,0 +1,52 @@+import React from 'react';+import {AbsoluteFill, useCurrentFrame} from 'remotion';+import {colors} from '../theme';++// Soft brand backdrop that is visible whenever the talking head is not full+// frame. Two slow color fields drift over a dot grid.+export const Backdrop: React.FC<{+ readonly accent: string;+ readonly dark?: boolean;+}> = ({accent, dark = false}) => {+ const frame = useCurrentFrame();+ const t = frame / 30;++ return (+ <AbsoluteFill+ style={{+ backgroundColor: dark ? '#06080E' : colors.mist,+ overflow: 'hidden',+ }}+ >+ <div+ style={{+ position: 'absolute',+ left: -260 + 90 * Math.sin(t * 0.21),+ top: -300 + 70 * Math.cos(t * 0.17),+ width: 1300,+ height: 1300,+ borderRadius: '50%',+ background: `radial-gradient(circle, ${accent}${dark ? '55' : '3a'} 0%, ${accent}00 62%)`,+ }}+ />+ <div+ style={{+ position: 'absolute',+ left: 700 + 110 * Math.cos(t * 0.13),+ top: 260 + 80 * Math.sin(t * 0.19),+ width: 1500,+ height: 1500,+ borderRadius: '50%',+ background: `radial-gradient(circle, ${colors.blue}${dark ? '40' : '2e'} 0%, ${colors.blue}00 60%)`,+ }}+ />+ <AbsoluteFill+ style={{+ backgroundImage: `radial-gradient(${dark ? 'rgba(255,255,255,0.10)' : 'rgba(11,15,25,0.10)'} 1.7px, transparent 1.8px)`,+ backgroundSize: '38px 38px',+ backgroundPosition: `${(frame * 0.35) % 38}px ${(frame * 0.2) % 38}px`,+ }}+ />+ </AbsoluteFill>+ );+};diff --git a/packages/example/src/WhatsNew/components/Captions.tsx b/packages/example/src/WhatsNew/components/Captions.tsxnew file mode 100644index 0000000000..b27d35f5c8--- /dev/null+++ b/packages/example/src/WhatsNew/components/Captions.tsx@@ -0,0 +1,194 @@+import type {Caption, TikTokPage} from '@remotion/captions';+import {createTikTokStyleCaptions} from '@remotion/captions';+import React, {useMemo} from 'react';+import {+ Interactive,+ interpolate,+ spring,+ useCurrentFrame,+ useVideoConfig,+ type InteractiveTransformProps,+ type InteractivitySchema,+ type SequenceProps,+} from 'remotion';+import {display} from '../fonts';+import {colors} from '../theme';++type PunchyCaptionsProps = InteractiveTransformProps &+ Pick<SequenceProps, 'width'> & {+ readonly captions: Caption[];+ readonly combineTokensWithinMilliseconds?: number;+ readonly fontSize?: number;+ readonly keywords?: string[];+ readonly keywordColor?: string;+ };++const punchyCaptionsSchema = {+ ...Interactive.captionsSchema,+ width: {+ type: 'number',+ min: 1,+ step: 1,+ default: undefined,+ description: 'Caption area width',+ hiddenFromList: false,+ },+ fontSize: {+ type: 'number',+ min: 10,+ step: 1,+ default: 60,+ description: 'Font size',+ hiddenFromList: false,+ },+ combineTokensWithinMilliseconds: {+ type: 'number',+ min: 0,+ step: 50,+ default: 1500,+ description: 'Time between caption pages',+ hiddenFromList: false,+ },+} as const satisfies InteractivitySchema;++const normalize = (word: string) =>+ word+ .trim()+ .toLowerCase()+ .replace(/[.,!?;:]/g, '');++const CaptionPage: React.FC<{+ readonly page: TikTokPage;+ readonly timeMs: number;+ readonly fontSize: number;+ readonly keywords: Set<string>;+ readonly keywordColor: string;+}> = ({page, timeMs, fontSize, keywords, keywordColor}) => {+ const {fps} = useVideoConfig();+ const pageFrame = ((timeMs - page.startMs) / 1000) * fps;+ const enter = spring({+ frame: pageFrame,+ fps,+ config: {damping: 200},+ durationInFrames: 7,+ });++ return (+ <div+ style={{+ fontFamily: display,+ fontWeight: 700,+ fontSize,+ lineHeight: 1.22,+ letterSpacing: '-0.01em',+ textAlign: 'center',+ textWrap: 'balance',+ color: colors.paper,+ opacity: enter,+ translate: `0px ${(1 - enter) * 14}px`,+ textShadow: '0 2px 3px rgba(0,0,0,0.55), 0 6px 22px rgba(0,0,0,0.45)',+ }}+ >+ {page.tokens.map((token, i) => {+ const visible = token.text.trim();+ const leading = token.text.slice(0, token.text.indexOf(visible));+ const active = timeMs >= token.fromMs && timeMs < token.toMs;+ const spoken = timeMs >= token.toMs;+ const tokenFrame = ((timeMs - token.fromMs) / 1000) * fps;+ const popIn = active+ ? spring({+ frame: tokenFrame,+ fps,+ config: {damping: 14, stiffness: 220},+ durationInFrames: 8,+ })+ : 0;+ const isKeyword = keywords.has(normalize(visible));+ return (+ <React.Fragment key={`${token.fromMs}-${i}`}>+ {leading}+ <span+ style={{+ display: 'inline-block',+ whiteSpace: 'pre',+ padding: '0.02em 0.16em 0.06em',+ margin: '0 -0.06em',+ borderRadius: '0.22em',+ backgroundColor: active ? colors.blue : 'rgba(11,132,243,0)',+ color: active+ ? colors.paper+ : isKeyword+ ? keywordColor+ : colors.paper,+ opacity: active || spoken ? 1 : 0.62,+ scale: active ? interpolate(popIn, [0, 1], [0.92, 1.06]) : 1,+ boxShadow: active ? '0 8px 24px rgba(11,132,243,0.45)' : 'none',+ textShadow: active ? 'none' : undefined,+ }}+ >+ {visible}+ </span>+ </React.Fragment>+ );+ })}+ </div>+ );+};++const PunchyCaptionsContent: React.FC<PunchyCaptionsProps> = ({+ captions,+ combineTokensWithinMilliseconds = 1500,+ fontSize = 60,+ keywords = [],+ keywordColor = '#FFD34D',+ style,+ width = 1300,+}) => {+ const frame = useCurrentFrame();+ const {fps} = useVideoConfig();+ const pages = useMemo(+ () =>+ createTikTokStyleCaptions({captions, combineTokensWithinMilliseconds})+ .pages,+ [captions, combineTokensWithinMilliseconds],+ );+ const keywordSet = useMemo(+ () => new Set(keywords.map(normalize)),+ [keywords],+ );+ const timeMs = (frame / fps) * 1000;+ const page = pages.find(+ (p) => timeMs >= p.startMs && timeMs < p.startMs + p.durationMs,+ );++ return (+ <div+ style={{+ position: 'absolute',+ width,+ display: 'flex',+ justifyContent: 'center',+ alignItems: 'flex-end',+ ...style,+ }}+ >+ {page ? (+ <CaptionPage+ key={page.startMs}+ page={page}+ timeMs={timeMs}+ fontSize={fontSize}+ keywords={keywordSet}+ keywordColor={keywordColor}+ />+ ) : null}+ </div>+ );+};++export const PunchyCaptions = Interactive.withSchema({+ Component: PunchyCaptionsContent,+ componentName: '<PunchyCaptions>',+ schema: punchyCaptionsSchema,+ wrapInSequence: true,+});diff --git a/packages/example/src/WhatsNew/components/LightLeakFx.tsx b/packages/example/src/WhatsNew/components/LightLeakFx.tsxnew file mode 100644index 0000000000..b40a06758e--- /dev/null+++ b/packages/example/src/WhatsNew/components/LightLeakFx.tsx@@ -0,0 +1,30 @@+import {lightLeak} from '@remotion/effects/light-leak';+import React from 'react';+import {interpolate, Solid, useCurrentFrame, useVideoConfig} from 'remotion';++// A full-frame light leak that blooms and retracts over the sequence length.+export const LightLeakFx: React.FC<{+ readonly seed?: number;+ readonly hueShift?: number;+}> = ({seed = 0, hueShift = 0}) => {+ const frame = useCurrentFrame();+ const {durationInFrames, width, height} = useVideoConfig();++ return (+ <Solid+ width={width}+ height={height}+ style={{mixBlendMode: 'screen'}}+ effects={[+ lightLeak({+ seed,+ hueShift,+ progress: interpolate(frame, [0, durationInFrames - 1], [0, 1], {+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ }),+ }),+ ]}+ />+ );+};diff --git a/packages/example/src/WhatsNew/components/Logo.tsx b/packages/example/src/WhatsNew/components/Logo.tsxnew file mode 100644index 0000000000..378aca3b3b--- /dev/null+++ b/packages/example/src/WhatsNew/components/Logo.tsx@@ -0,0 +1,31 @@+import React from 'react';++// The Remotion mark from the brand package (three nested rounded triangles).+export const RemotionLogo: React.FC<{+ readonly size?: number;+ readonly color?: string;+ readonly style?: React.CSSProperties;+}> = ({size = 120, color = '#0B84F3', style}) => (+ <svg+ width={size}+ height={(size * 425) / 410}+ viewBox="0 0 410 425"+ fill="none"+ style={style}+ >+ <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={color}+ fillOpacity="0.2"+ />+ <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={color}+ fillOpacity="0.1"+ />+ <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={color}+ />+ </svg>+);diff --git a/packages/example/src/WhatsNew/components/Stage.tsx b/packages/example/src/WhatsNew/components/Stage.tsxnew file mode 100644index 0000000000..9e64987b1c--- /dev/null+++ b/packages/example/src/WhatsNew/components/Stage.tsx@@ -0,0 +1,186 @@+import React from 'react';+import {AbsoluteFill, interpolate, useCurrentFrame} from 'remotion';+import {easeInOut, lerp} from '../anim';+import {FACE} from '../theme';++export type LayoutName = 'full' | 'split' | 'pip';++export type LayoutKeyframe = {+ readonly at: number;+ readonly layout: LayoutName;+ // Transition length in frames. 1 makes it a hard cut.+ readonly duration?: number;+};++type LayoutState = {+ // The visible card, in composition pixels.+ x: number;+ y: number;+ w: number;+ h: number;+ r: number;+ // Where the 1920x1080 footage is placed and how much it is scaled.+ vx: number;+ vy: number;+ s: number;+ // 0 = edge-to-edge footage, 1 = floating card with border and shadow.+ card: number;+};++const LAYOUTS: Record<LayoutName, LayoutState> = {+ full: {x: 0, y: 0, w: 1920, h: 1080, r: 0, vx: 0, vy: 0, s: 1, card: 0},+ split: {+ x: 1000,+ y: 70,+ w: 840,+ h: 940,+ r: 44,+ vx: 520,+ vy: 63,+ s: 0.9,+ card: 1,+ },+ pip: {+ x: 1540,+ y: 640,+ w: 320,+ h: 360,+ r: 160,+ vx: 1150,+ vy: 560,+ s: 0.55,+ card: 1,+ },+};++export const LAYOUT_TRANSITION = 22;++const mix = (a: LayoutState, b: LayoutState, t: number): LayoutState => ({+ x: lerp(a.x, b.x, t),+ y: lerp(a.y, b.y, t),+ w: lerp(a.w, b.w, t),+ h: lerp(a.h, b.h, t),+ r: lerp(a.r, b.r, t),+ vx: lerp(a.vx, b.vx, t),+ vy: lerp(a.vy, b.vy, t),+ s: lerp(a.s, b.s, t),+ card: lerp(a.card, b.card, t),+});++export const getLayout = (+ frame: number,+ keyframes: readonly LayoutKeyframe[],+): LayoutState => {+ let state = LAYOUTS[keyframes[0].layout];+ for (const keyframe of keyframes.slice(1)) {+ if (frame < keyframe.at) {+ break;+ }+ const t = interpolate(+ frame,+ [keyframe.at, keyframe.at + (keyframe.duration ?? LAYOUT_TRANSITION)],+ [0, 1],+ {+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ easing: easeInOut,+ },+ );+ state = mix(state, LAYOUTS[keyframe.layout], t);+ }+ return state;+};++// Where captions sit for a given layout: under the face, inside the card.+export const getCaptionPlacement = (+ frame: number,+ keyframes: readonly LayoutKeyframe[],+) => {+ const l = getLayout(frame, keyframes);+ const pipness = interpolate(l.w, [320, 840], [1, 0], {+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ });+ const width = lerp(Math.min(l.w - 80, 1320), 1100, pipness);+ const centerX = lerp(l.x + l.w / 2, 960, pipness);+ const baseline = lerp(l.y + l.h - lerp(70, 64, l.card), 1030, pipness);+ const fontSize = lerp(lerp(60, 46, l.card), 44, pipness);+ return {+ width,+ fontSize,+ pipness,+ style: {left: centerX - width / 2, bottom: 1080 - baseline},+ };+};++export const Stage: React.FC<{+ readonly keyframes: readonly LayoutKeyframe[];+ readonly children: React.ReactNode;+}> = ({keyframes, children}) => {+ const frame = useCurrentFrame();+ const l = getLayout(frame, keyframes);++ return (+ <AbsoluteFill>+ <div+ style={{+ position: 'absolute',+ left: l.x,+ top: l.y,+ width: l.w,+ height: l.h,+ borderRadius: l.r,+ overflow: 'hidden',+ backgroundColor: '#111',+ boxShadow: `0 ${34 * l.card}px ${90 * l.card}px rgba(16, 24, 48, ${0.32 * l.card})`,+ }}+ >+ <div+ style={{+ position: 'absolute',+ left: l.vx - l.x,+ top: l.vy - l.y,+ width: 1920,+ height: 1080,+ scale: l.s,+ transformOrigin: '0 0',+ filter: 'contrast(1.07) saturate(1.12) brightness(0.99)',+ }}+ >+ {children}+ <AbsoluteFill+ style={{+ background:+ 'radial-gradient(ellipse 75% 80% at 52% 42%, rgba(0,0,0,0) 55%, rgba(8,12,24,0.34) 100%)',+ }}+ />+ </div>+ <AbsoluteFill+ style={{+ borderRadius: l.r,+ boxShadow: `inset 0 0 0 ${7 * l.card}px rgba(255,255,255,0.96)`,+ }}+ />+ </div>+ </AbsoluteFill>+ );+};++// Punch-in framing for a single shot. Every cut switches framing, which hides+// the jump and gives the talking head rhythm. A slow drift keeps it alive.+export const Punch: React.FC<{+ readonly zoom?: number;+ readonly children: React.ReactNode;+}> = ({zoom = 1, children}) => {+ const frame = useCurrentFrame();+ return (+ <AbsoluteFill+ style={{+ scale: zoom * (1 + frame * 0.00012),+ transformOrigin: `${FACE.x}px ${FACE.y}px`,+ }}+ >+ {children}+ </AbsoluteFill>+ );+};diff --git a/packages/example/src/WhatsNew/components/StudioMock.tsx b/packages/example/src/WhatsNew/components/StudioMock.tsxnew file mode 100644index 0000000000..5da0614859--- /dev/null+++ b/packages/example/src/WhatsNew/components/StudioMock.tsx@@ -0,0 +1,460 @@+import React from 'react';+import {interpolate, useCurrentFrame} from 'remotion';+import {easeInOut, pop, rise} from '../anim';+import {display, mono} from '../fonts';+import {colors} from '../theme';+import {CursorIcon} from './icons';+import {syntax} from './ui';++// Frames are relative to the start of the mock's sequence.+const T = {+ toggle: 34,+ select: 100,+ dragStart: 150,+ dragEnd: 205,+ scaleStart: 220,+ scaleEnd: 246,+ rotateStart: 252,+ rotateEnd: 272,+ color: 280,+ saved: 300,+};++const clamp = {extrapolateLeft: 'clamp', extrapolateRight: 'clamp'} as const;++// Vertical positions of the inspector rows, in mock coordinates.+const ROW_Y = [214, 260, 306, 352, 398];++const CANVAS_W = 800;+const CANVAS_H = 450;+const CANVAS_X = 50;+const CANVAS_Y = 81;+const TO_COMPOSITION = 1920 / CANVAS_W;++const Changed: React.FC<{+ readonly at: number;+ readonly children: React.ReactNode;+}> = ({at, children}) => {+ const frame = useCurrentFrame();+ const glow = interpolate(frame, [at, at + 4, at + 40], [0, 1, 0], clamp);+ return (+ <span+ style={{+ backgroundColor: `rgba(255, 211, 77, ${0.35 * glow})`,+ borderRadius: 6,+ boxShadow: `0 0 0 4px rgba(255, 211, 77, ${0.35 * glow})`,+ }}+ >+ {children}+ </span>+ );+};++export const StudioMock: React.FC = () => {+ const frame = useCurrentFrame();++ const drag = interpolate(frame, [T.dragStart, T.dragEnd], [0, 1], {+ ...clamp,+ easing: easeInOut,+ });+ const offsetX = 154 * drag;+ const offsetY = 51 * drag;+ const scale = interpolate(frame, [T.scaleStart, T.scaleEnd], [1, 1.2], {+ ...clamp,+ easing: easeInOut,+ });+ const rotate = interpolate(frame, [T.rotateStart, T.rotateEnd], [0, -4], {+ ...clamp,+ easing: easeInOut,+ });+ const recolored = frame >= T.color;+ const selected = frame >= T.select;+ const visualMode = frame >= T.toggle;+ const saved = rise(frame, T.saved, 10);++ const titleX = CANVAS_X + CANVAS_W / 2 + offsetX;+ const titleY = CANVAS_Y + CANVAS_H / 2 + offsetY;++ // Cursor path in mock coordinates. While dragging it sticks to what it drags.+ const waypoints: [number, number, number][] = [+ [60, 1180, 720],+ [96, 450, 306],+ [T.dragStart, 450, 306],+ [T.dragEnd, 604, 357],+ [T.scaleStart, 808, 413],+ [T.scaleEnd, 849, 424],+ [T.rotateStart, 1330, ROW_Y[2] + 14],+ [T.rotateEnd, 1290, ROW_Y[2] + 14],+ [T.color - 2, 1352, ROW_Y[4] + 14],+ [T.color + 4, 1352, ROW_Y[4] + 14],+ [330, 1360, 640],+ ];+ const along = (index: 1 | 2) =>+ interpolate(+ frame,+ waypoints.map((w) => w[0]),+ waypoints.map((w) => w[index]),+ {...clamp, easing: easeInOut},+ );+ const dragging = frame >= T.dragStart && frame <= T.dragEnd;+ const scaling = frame >= T.scaleStart && frame <= T.scaleEnd;+ const cursorX = dragging ? titleX : scaling ? titleX + 204 * scale : along(1);+ const cursorY = dragging ? titleY : scaling ? titleY + 56 * scale : along(2);+ const cursorOpacity = interpolate(+ frame,+ [56, 64, 324, 336],+ [0, 1, 1, 0],+ clamp,+ );+ const pressed =+ (frame >= T.select - 3 && frame <= T.select + 2) ||+ (frame >= T.dragStart && frame <= T.dragEnd) ||+ (frame >= T.scaleStart && frame <= T.scaleEnd) ||+ (frame >= T.rotateStart && frame <= T.rotateEnd) ||+ (frame >= T.color - 2 && frame <= T.color + 2);++ const translateValue = `"${Math.round(offsetX * TO_COMPOSITION)}px ${Math.round(offsetY * TO_COMPOSITION)}px"`;+ const titleColor = recolored ? '#FFD34D' : '#FFFFFF';++ const inspectorRows: {label: string; value: string; at: number}[] = [+ {+ label: 'Offset',+ value: `${Math.round(offsetX * TO_COMPOSITION)}px ${Math.round(offsetY * TO_COMPOSITION)}px`,+ at: T.dragStart,+ },+ {label: 'Scale', value: scale.toFixed(2), at: T.scaleStart},+ {label: 'Rotation', value: `${rotate.toFixed(0)}°`, at: T.rotateStart},+ {label: 'Opacity', value: '1.00', at: 99999},+ ];++ return (+ <div+ style={{+ width: 1400,+ height: 840,+ borderRadius: 30,+ overflow: 'hidden',+ backgroundColor: '#16181D',+ boxShadow:+ '0 40px 120px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.08)',+ position: 'relative',+ fontFamily: display,+ }}+ >+ {/* Title bar */}+ <div+ style={{+ height: 56,+ display: 'flex',+ alignItems: 'center',+ padding: '0 22px',+ gap: 10,+ backgroundColor: '#1F2126',+ borderBottom: '1px solid #2C2F36',+ }}+ >+ {['#FF5F57', '#FEBC2E', '#28C840'].map((c) => (+ <div+ key={c}+ style={{width: 14, height: 14, borderRadius: 7, backgroundColor: c}}+ />+ ))}+ <div+ style={{+ marginLeft: 18,+ color: '#C9CDD4',+ fontSize: 22,+ fontWeight: 500,+ }}+ >+ Remotion Studio+ </div>+ <div style={{flex: 1}} />+ <div+ style={{+ color: visualMode ? colors.paper : '#8A8F98',+ fontSize: 22,+ fontWeight: 700,+ }}+ >+ Visual mode+ </div>+ <div+ style={{+ width: 58,+ height: 32,+ borderRadius: 16,+ backgroundColor: visualMode ? colors.blue : '#3A3E46',+ position: 'relative',+ }}+ >+ <div+ style={{+ position: 'absolute',+ top: 4,+ left: visualMode ? 30 : 4,+ width: 24,+ height: 24,+ borderRadius: 12,+ backgroundColor: colors.paper,+ }}+ />+ </div>+ </div>++ {/* Canvas area */}+ <div+ style={{+ position: 'absolute',+ left: 0,+ top: 56,+ width: 900,+ height: 500,+ backgroundColor: '#111317',+ }}+ />+ <div+ style={{+ position: 'absolute',+ left: CANVAS_X,+ top: CANVAS_Y,+ width: CANVAS_W,+ height: CANVAS_H,+ overflow: 'hidden',+ background: 'linear-gradient(135deg, #0B84F3 0%, #5B3CFF 100%)',+ boxShadow: '0 10px 30px rgba(0,0,0,0.5)',+ }}+ >+ <div+ style={{+ position: 'absolute',+ left: CANVAS_W / 2 + offsetX,+ top: CANVAS_H / 2 + offsetY,+ translate: '-50% -50%',+ scale,+ rotate: `${rotate}deg`,+ fontWeight: 700,+ fontSize: 76,+ letterSpacing: '-0.03em',+ color: titleColor,+ whiteSpace: 'nowrap',+ outline: selected ? `3px solid ${colors.paper}` : 'none',+ outlineOffset: 14,+ }}+ >+ Launch day+ {selected ? (+ <>+ {/* Corner handles sit on the outline, which is offset by 14px. */}+ {[+ [0, 0],+ [100, 0],+ [0, 100],+ [100, 100],+ ].map(([x, y]) => (+ <div+ key={`${x}-${y}`}+ style={{+ position: 'absolute',+ left: `calc(${x}% ${x === 0 ? '-' : '+'} 14px - 9px)`,+ top: `calc(${y}% ${y === 0 ? '-' : '+'} 14px - 9px)`,+ width: 14,+ height: 14,+ backgroundColor: colors.paper,+ border: `3px solid ${colors.blue}`,+ borderRadius: 3,+ }}+ />+ ))}+ </>+ ) : null}+ </div>+ </div>++ {/* Inspector */}+ <div+ style={{+ position: 'absolute',+ left: 900,+ top: 56,+ width: 500,+ height: 500,+ backgroundColor: '#1F2126',+ borderLeft: '1px solid #2C2F36',+ padding: '22px 30px',+ boxSizing: 'border-box',+ }}+ >+ <div+ style={{+ display: 'flex',+ gap: 26,+ borderBottom: '1px solid #2C2F36',+ paddingBottom: 14,+ }}+ >+ <div+ style={{+ color: colors.paper,+ fontSize: 24,+ fontWeight: 700,+ borderBottom: `3px solid ${colors.blue}`,+ paddingBottom: 10,+ }}+ >+ Inspector+ </div>+ <div style={{color: '#8A8F98', fontSize: 24, fontWeight: 500}}>+ Renders+ </div>+ </div>+ <div+ style={{+ marginTop: 18,+ fontFamily: mono,+ fontSize: 22,+ color: selected ? colors.paper : '#6B7280',+ }}+ >+ {selected ? '<Title> MyVideo.tsx:14' : 'Nothing selected'}+ </div>+ </div>+ {[...inspectorRows, {label: 'Color', value: '', at: T.color}].map(+ (row, i) => (+ <div+ key={row.label}+ style={{+ position: 'absolute',+ left: 930,+ width: 440,+ top: ROW_Y[i],+ height: 30,+ display: 'flex',+ justifyContent: 'space-between',+ alignItems: 'center',+ fontSize: 24,+ opacity: selected ? 1 : 0.3,+ }}+ >+ <span style={{color: '#C9CDD4', fontWeight: 500}}>+ ◆ {row.label}+ </span>+ {row.label === 'Color' ? (+ <span+ style={{+ width: 40,+ height: 28,+ borderRadius: 6,+ backgroundColor: titleColor,+ boxShadow: '0 0 0 2px #3A3E46',+ }}+ />+ ) : (+ <span style={{color: '#4DA3FF', fontFamily: mono}}>+ <Changed at={row.at}>{row.value}</Changed>+ </span>+ )}+ </div>+ ),+ )}++ {/* Code */}+ <div+ style={{+ position: 'absolute',+ left: 0,+ top: 556,+ width: 1400,+ height: 284,+ backgroundColor: colors.code,+ borderTop: '1px solid #2C2F36',+ padding: '16px 30px',+ boxSizing: 'border-box',+ fontFamily: mono,+ fontSize: 23,+ lineHeight: 1.36,+ color: syntax.plain,+ }}+ >+ <div style={{color: '#6C7892', fontSize: 19, marginBottom: 4}}>+ MyVideo.tsx+ </div>+ <div>+ <span style={{color: syntax.punct}}>{'<'}</span>+ <span style={{color: syntax.tag}}>Title</span>+ </div>+ <div>+ <span style={{color: syntax.attr}}>{' style'}</span>+ <span style={{color: syntax.punct}}>{'={{'}</span>+ </div>+ <div>+ {' translate: '}+ <Changed at={T.dragStart}>+ <span style={{color: syntax.string}}>{translateValue}</span>+ </Changed>+ <span style={{color: syntax.punct}}>,</span>+ </div>+ <div>+ {' scale: '}+ <Changed at={T.scaleStart}>+ <span style={{color: syntax.number}}>{scale.toFixed(2)}</span>+ </Changed>+ <span style={{color: syntax.punct}}>,</span>+ </div>+ <div>+ {' rotate: '}+ <Changed at={T.rotateStart}>+ <span+ style={{color: syntax.string}}+ >{`"${rotate.toFixed(0)}deg"`}</span>+ </Changed>+ <span style={{color: syntax.punct}}>,</span>+ </div>+ <div>+ {' color: '}+ <Changed at={T.color}>+ <span style={{color: syntax.string}}>{`"${titleColor}"`}</span>+ </Changed>+ <span style={{color: syntax.punct}}>,</span>+ </div>+ <div style={{color: syntax.punct}}>{' }}>Launch day</Title>'}</div>+ <div+ style={{+ position: 'absolute',+ right: 30,+ bottom: 24,+ display: 'flex',+ alignItems: 'center',+ gap: 12,+ padding: '12px 20px',+ borderRadius: 14,+ backgroundColor: colors.success,+ color: colors.paper,+ fontFamily: display,+ fontWeight: 700,+ fontSize: 26,+ opacity: saved,+ translate: `0px ${(1 - saved) * 16}px`,+ scale: 0.9 + 0.1 * pop(frame, T.saved, 10),+ }}+ >+ ✓ Written back to MyVideo.tsx+ </div>+ </div>++ {/* Cursor */}+ <div+ style={{+ position: 'absolute',+ left: cursorX,+ top: cursorY,+ opacity: cursorOpacity,+ scale: pressed ? 0.86 : 1,+ transformOrigin: '0 0',+ }}+ >+ <CursorIcon size={46} />+ </div>+ </div>+ );+};diff --git a/packages/example/src/WhatsNew/components/fx.tsx b/packages/example/src/WhatsNew/components/fx.tsxnew file mode 100644index 0000000000..a86a22d302--- /dev/null+++ b/packages/example/src/WhatsNew/components/fx.tsx@@ -0,0 +1,182 @@+import React from 'react';+import {+ AbsoluteFill,+ interpolate,+ random,+ useCurrentFrame,+ useVideoConfig,+} from 'remotion';+import {easeOut} from '../anim';++// Radial speed streaks around a focus point.+export const SpeedLines: React.FC<{+ readonly color?: string;+ readonly cx?: number;+ readonly cy?: number;+}> = ({color = 'rgba(255,255,255,0.85)', cx = 1000, cy = 430}) => {+ const frame = useCurrentFrame();+ const {durationInFrames} = useVideoConfig();+ const fade = interpolate(+ frame,+ [0, 4, durationInFrames - 8, durationInFrames],+ [0, 1, 1, 0],+ {extrapolateLeft: 'clamp', extrapolateRight: 'clamp'},+ );+ return (+ <AbsoluteFill style={{opacity: fade}}>+ <svg width={1920} height={1080}>+ {new Array(46).fill(true).map((_, i) => {+ const angle = random(`angle-${i}`) * Math.PI * 2;+ const speed = 0.6 + random(`speed-${i}`) * 0.8;+ const travel =+ ((frame * 38 * speed + random(`offset-${i}`) * 900) % 900) + 380;+ const length = 120 + random(`len-${i}`) * 260;+ const x1 = cx + Math.cos(angle) * travel;+ const y1 = cy + Math.sin(angle) * travel;+ const x2 = cx + Math.cos(angle) * (travel + length);+ const y2 = cy + Math.sin(angle) * (travel + length);+ return (+ <line+ key={i}+ x1={x1}+ y1={y1}+ x2={x2}+ y2={y2}+ stroke={color}+ strokeWidth={3 + random(`w-${i}`) * 6}+ strokeLinecap="round"+ opacity={0.35 + random(`o-${i}`) * 0.5}+ />+ );+ })}+ </svg>+ </AbsoluteFill>+ );+};++// Cinematic bars that slide in from top and bottom.+export const Letterbox: React.FC<{readonly height?: number}> = ({+ height = 104,+}) => {+ const frame = useCurrentFrame();+ const {durationInFrames} = useVideoConfig();+ const p = interpolate(+ frame,+ [0, 18, durationInFrames - 18, durationInFrames],+ [0, 1, 1, 0],+ {+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ easing: easeOut,+ },+ );+ return (+ <AbsoluteFill>+ <div+ style={{+ position: 'absolute',+ left: 0,+ right: 0,+ top: 0,+ height: height * p,+ backgroundColor: '#000',+ }}+ />+ <div+ style={{+ position: 'absolute',+ left: 0,+ right: 0,+ bottom: 0,+ height: height * p,+ backgroundColor: '#000',+ }}+ />+ </AbsoluteFill>+ );+};++// A one-shot burst of confetti dots from a point.+export const Burst: React.FC<{+ readonly x: number;+ readonly y: number;+ readonly colors: readonly string[];+ readonly count?: number;+}> = ({x, y, colors, count = 28}) => {+ const frame = useCurrentFrame();+ return (+ <AbsoluteFill>+ {new Array(count).fill(true).map((_, i) => {+ const angle = random(`b-a-${i}`) * Math.PI * 2;+ const distance = 140 + random(`b-d-${i}`) * 260;+ const t = interpolate(frame, [0, 26], [0, 1], {+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ easing: easeOut,+ });+ const fall = Math.max(0, frame - 10) * 2.2;+ const size = 12 + random(`b-s-${i}`) * 16;+ return (+ <div+ key={i}+ style={{+ position: 'absolute',+ left: x + Math.cos(angle) * distance * t - size / 2,+ top: y + Math.sin(angle) * distance * t + fall - size / 2,+ width: size,+ height: size * (random(`b-r-${i}`) > 0.5 ? 1 : 0.45),+ borderRadius: random(`b-c-${i}`) > 0.5 ? size : 3,+ backgroundColor: colors[i % colors.length],+ rotate: `${frame * 12 * (random(`b-rot-${i}`) - 0.5)}deg`,+ opacity: interpolate(frame, [22, 40], [1, 0], {+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ }),+ }}+ />+ );+ })}+ </AbsoluteFill>+ );+};++// Decorative waveform bars, deterministic per seed.+export const WaveBars: React.FC<{+ readonly seed: string;+ readonly bars?: number;+ readonly height?: number;+ readonly color: string;+ readonly level?: number;+ readonly live?: boolean;+}> = ({seed, bars = 24, height = 60, color, level = 1, live = false}) => {+ const frame = useCurrentFrame();+ return (+ <div+ style={{+ display: 'flex',+ alignItems: 'center',+ gap: 4,+ height,+ }}+ >+ {new Array(bars).fill(true).map((_, i) => {+ const envelope = Math.sin((i / (bars - 1)) * Math.PI) * 0.7 + 0.3;+ const jitter = live+ ? 0.55 ++ 0.45 * Math.sin(frame / 3 + i * 1.7 + random(`${seed}-${i}`) * 6)+ : 0.35 + random(`${seed}-${i}`) * 0.65;+ return (+ <div+ key={i}+ style={{+ width: 6,+ borderRadius: 3,+ height: Math.max(6, height * envelope * jitter * level),+ backgroundColor: color,+ }}+ />+ );+ })}+ </div>+ );+};diff --git a/packages/example/src/WhatsNew/components/icons.tsx b/packages/example/src/WhatsNew/components/icons.tsxnew file mode 100644index 0000000000..4c7237afd5--- /dev/null+++ b/packages/example/src/WhatsNew/components/icons.tsx@@ -0,0 +1,164 @@+import React from 'react';++type IconProps = {+ readonly size?: number;+ readonly color?: string;+ readonly strokeWidth?: number;+};++const Svg: React.FC<IconProps & {readonly children: React.ReactNode}> = ({+ size = 48,+ color = 'currentColor',+ strokeWidth = 2.2,+ children,+}) => (+ <svg+ width={size}+ height={size}+ viewBox="0 0 24 24"+ fill="none"+ stroke={color}+ strokeWidth={strokeWidth}+ strokeLinecap="round"+ strokeLinejoin="round"+ >+ {children}+ </svg>+);++export const SparkIcon: React.FC<IconProps> = (p) => (+ <Svg {...p}>+ <path d="M12 3l1.9 5.6L19.5 10.5l-5.6 1.9L12 18l-1.9-5.6L4.5 10.5l5.6-1.9z" />+ <path d="M19 3v4M21 5h-4" />+ </Svg>+);++export const BoltIcon: React.FC<IconProps> = (p) => (+ <Svg {...p}>+ <path d="M13 2L4.5 13.5H11L10 22l8.5-11.5H12z" />+ </Svg>+);++export const CheckIcon: React.FC<IconProps> = (p) => (+ <Svg {...p}>+ <path d="M4.5 12.5l5 5 10-11" />+ </Svg>+);++export const XIcon: React.FC<IconProps> = (p) => (+ <Svg {...p}>+ <path d="M6 6l12 12M18 6L6 18" />+ </Svg>+);++export const SpeakerIcon: React.FC<IconProps> = (p) => (+ <Svg {...p}>+ <path d="M4 9.5h3.5L12 5.5v13l-4.5-4H4z" />+ <path d="M15.5 9a4 4 0 010 6M18 6.5a7.5 7.5 0 010 11" />+ </Svg>+);++export const TriangleIcon: React.FC<IconProps> = ({+ size = 48,+ color = '#000',+}) => (+ <svg width={size} height={size} viewBox="0 0 24 24">+ <path d="M12 3L22.5 21H1.5z" fill={color} />+ </svg>+);++export const MicIcon: React.FC<IconProps> = (p) => (+ <Svg {...p}>+ <rect x="9" y="3" width="6" height="11" rx="3" />+ <path d="M5.5 11a6.5 6.5 0 0013 0M12 17.5V21" />+ </Svg>+);++export const ScissorsIcon: React.FC<IconProps> = (p) => (+ <Svg {...p}>+ <circle cx="6" cy="6" r="2.6" />+ <circle cx="6" cy="18" r="2.6" />+ <path d="M8.2 7.6L20 18M8.2 16.4L20 6" />+ </Svg>+);++export const BarsIcon: React.FC<IconProps> = (p) => (+ <Svg {...p}>+ <path d="M5 20v-6M9.5 20V8M14 20v-9M18.5 20V4" />+ </Svg>+);++export const LayersIcon: React.FC<IconProps> = (p) => (+ <Svg {...p}>+ <path d="M12 3l9 5-9 5-9-5z" />+ <path d="M3 13l9 5 9-5" />+ </Svg>+);++export const BrowserIcon: React.FC<IconProps> = (p) => (+ <Svg {...p}>+ <rect x="3" y="4.5" width="18" height="15" rx="2.5" />+ <path d="M3 9h18M6.5 6.8h.01M9 6.8h.01" />+ </Svg>+);++export const RobotIcon: React.FC<IconProps> = (p) => (+ <Svg {...p}>+ <rect x="4.5" y="8" width="15" height="11" rx="3" />+ <path d="M12 4.5V8M9 13h.01M15 13h.01M9.5 16.5h5" />+ <circle cx="12" cy="3.8" r="1" />+ </Svg>+);++export const EyeIcon: React.FC<IconProps> = (p) => (+ <Svg {...p}>+ <path d="M2.5 12S6 5.5 12 5.5 21.5 12 21.5 12 18 18.5 12 18.5 2.5 12 2.5 12z" />+ <circle cx="12" cy="12" r="3" />+ </Svg>+);++export const BoxIcon: React.FC<IconProps> = (p) => (+ <Svg {...p}>+ <path d="M3.5 7.5L12 3l8.5 4.5v9L12 21l-8.5-4.5z" />+ <path d="M3.5 7.5L12 12l8.5-4.5M12 12v9" />+ </Svg>+);++export const BellIcon: React.FC<IconProps> = (p) => (+ <Svg {...p}>+ <path d="M6 16.5V11a6 6 0 0112 0v5.5l1.5 2h-15z" />+ <path d="M10 20.5a2 2 0 004 0" />+ </Svg>+);++export const ChatIcon: React.FC<IconProps> = (p) => (+ <Svg {...p}>+ <path d="M4 5.5h16v10H9l-5 4z" />+ </Svg>+);++export const FileIcon: React.FC<IconProps> = (p) => (+ <Svg {...p}>+ <path d="M6 3h8l5 5v13H6z" />+ <path d="M14 3v5h5" />+ </Svg>+);++export const WandIcon: React.FC<IconProps> = (p) => (+ <Svg {...p}>+ <path d="M4 20L15 9M13 7l4 4" />+ <path d="M18 2.5v3M16.5 4h3M20.5 8.5v2M19.5 9.5h2M9 2.5v2M8 3.5h2" />+ </Svg>+);++export const CursorIcon: React.FC<{readonly size?: number}> = ({size = 44}) => (+ <svg width={size} height={size} viewBox="0 0 24 24">+ <path+ d="M5 3l14 7.5-6.2 1.6L9.6 18z"+ fill="#0B0F19"+ stroke="#fff"+ strokeWidth={1.6}+ strokeLinejoin="round"+ />+ </svg>+);diff --git a/packages/example/src/WhatsNew/components/ui.tsx b/packages/example/src/WhatsNew/components/ui.tsxnew file mode 100644index 0000000000..d4d858b361--- /dev/null+++ b/packages/example/src/WhatsNew/components/ui.tsx@@ -0,0 +1,493 @@+import React from 'react';+import {interpolate, useCurrentFrame, useVideoConfig} from 'remotion';+import {exit, pop, rise} from '../anim';+import {display, mono} from '../fonts';+import {colors} from '../theme';++// Pops its children in at `delay` and fades them out at the end of the+// surrounding sequence.+export const Pop: React.FC<{+ readonly delay?: number;+ readonly rotate?: number;+ readonly from?: 'scale' | 'up' | 'left' | 'right';+ readonly exitDuration?: number;+ readonly style?: React.CSSProperties;+ readonly children: React.ReactNode;+}> = ({+ delay = 0,+ rotate = 0,+ from = 'scale',+ exitDuration = 9,+ style,+ children,+}) => {+ const frame = useCurrentFrame();+ const {durationInFrames} = useVideoConfig();+ const p = pop(frame, delay);+ const out = exit(frame, durationInFrames, exitDuration);+ const offset = (1 - p) * 60;+ const translate =+ from === 'up'+ ? `0px ${offset}px`+ : from === 'left'+ ? `${-offset}px 0px`+ : from === 'right'+ ? `${offset}px 0px`+ : '0px 0px';+ return (+ <div+ style={{+ opacity: Math.min(1, p * 1.6) * out,+ scale: (from === 'scale' ? 0.55 + 0.45 * p : 1) * (0.92 + 0.08 * out),+ rotate: `${rotate * (2 - p)}deg`,+ translate,+ ...style,+ }}+ >+ {children}+ </div>+ );+};++// The free area to the left of the talking head in the split layout.+export const Panel: React.FC<{+ readonly children: React.ReactNode;+ readonly style?: React.CSSProperties;+}> = ({children, style}) => (+ <div+ style={{+ position: 'absolute',+ left: 80,+ top: 70,+ width: 840,+ height: 940,+ display: 'flex',+ flexDirection: 'column',+ justifyContent: 'center',+ alignItems: 'center',+ gap: 30,+ ...style,+ }}+ >+ {children}+ </div>+);++export const ChapterSticker: React.FC<{+ readonly index: React.ReactNode;+ readonly title: string;+ readonly accent: string;+ readonly accentText?: string;+ readonly overline?: string;+ readonly style?: React.CSSProperties;+}> = ({+ index,+ title,+ accent,+ accentText = colors.paper,+ overline = "What's new",+ style,+}) => {+ const frame = useCurrentFrame();+ const {durationInFrames} = useVideoConfig();+ const p = pop(frame, 0, 11);+ const out = exit(frame, durationInFrames, 10);+ const underline = rise(frame, 8, 16);++ return (+ <div+ style={{+ position: 'absolute',+ left: 72,+ top: 340,+ transformOrigin: '0% 50%',+ opacity: Math.min(1, p * 2) * out,+ scale: (0.4 + 0.6 * p) * (0.9 + 0.1 * out),+ rotate: `${-3 - 6 * (1 - p)}deg`,+ translate: `0px ${(1 - out) * -30}px`,+ ...style,+ }}+ >+ <div+ style={{+ display: 'flex',+ alignItems: 'center',+ gap: 28,+ padding: '24px 46px 26px 24px',+ backgroundColor: colors.paper,+ borderRadius: 36,+ boxShadow:+ '0 28px 70px rgba(10, 16, 32, 0.34), 0 4px 12px rgba(10,16,32,0.18)',+ }}+ >+ <div+ style={{+ width: 104,+ height: 104,+ borderRadius: 26,+ flexShrink: 0,+ backgroundColor: accent,+ color: accentText,+ display: 'flex',+ alignItems: 'center',+ justifyContent: 'center',+ fontFamily: display,+ fontWeight: 700,+ fontSize: 50,+ letterSpacing: '-0.02em',+ }}+ >+ {index}+ </div>+ <div style={{display: 'flex', flexDirection: 'column', gap: 2}}>+ <div+ style={{+ fontFamily: display,+ fontWeight: 500,+ fontSize: 26,+ letterSpacing: '0.16em',+ textTransform: 'uppercase',+ color: colors.muted,+ }}+ >+ {overline}+ </div>+ <div+ style={{+ fontFamily: display,+ fontWeight: 700,+ fontSize: 72,+ lineHeight: 1,+ letterSpacing: '-0.03em',+ color: colors.ink,+ position: 'relative',+ maxWidth: 560,+ textWrap: 'balance',+ }}+ >+ {title}+ <div+ style={{+ position: 'absolute',+ left: 0,+ bottom: -12,+ height: 8,+ borderRadius: 4,+ width: `${underline * 100}%`,+ backgroundColor: accent,+ }}+ />+ </div>+ </div>+ </div>+ </div>+ );+};++export type Tok = readonly [string, string?];++export const syntax = {+ plain: '#E6EDF3',+ keyword: '#FF7AC6',+ fn: '#7CC4FF',+ string: '#A6E3A1',+ number: '#FAB387',+ punct: '#8B95A7',+ tag: '#7CC4FF',+ attr: '#F9E2AF',+ comment: '#6C7892',+ prompt: '#34D399',+};++// Renders syntax-colored lines, revealing characters like a typewriter.+export const CodeLines: React.FC<{+ readonly lines: readonly (readonly Tok[])[];+ readonly start?: number;+ readonly speed?: number;+ readonly cursor?: boolean;+ readonly highlightLine?: number;+ readonly highlightFrom?: number;+}> = ({+ lines,+ start = 0,+ speed = 1.4,+ cursor = true,+ highlightLine,+ highlightFrom = 0,+}) => {+ const frame = useCurrentFrame();+ let budget = Math.max(0, Math.floor((frame - start) * speed));+ const total = lines.reduce(+ (acc, line) => acc + line.reduce((a, [t]) => a + t.length, 0) + 1,+ 0,+ );+ const done = budget >= total;+ const highlight = rise(frame, highlightFrom, 12);++ return (+ <div>+ {lines.map((line, li) => {+ const lineLength = line.reduce((a, [t]) => a + t.length, 0);+ const visibleChars = Math.min(lineLength, budget);+ const showCursor =+ cursor && !done && budget >= 0 && budget <= lineLength;+ budget -= lineLength + 1;+ let remaining = visibleChars;+ const isHighlighted = highlightLine === li;+ return (+ <div+ key={li}+ style={{+ minHeight: '1.55em',+ whiteSpace: 'pre',+ margin: '0 -32px',+ padding: '0 32px',+ backgroundColor: isHighlighted+ ? `rgba(11,132,243,${0.28 * highlight})`+ : 'transparent',+ boxShadow: isHighlighted+ ? `inset 5px 0 0 rgba(11,132,243,${highlight})`+ : 'none',+ }}+ >+ {line.map(([text, color], ti) => {+ const shown = text.slice(0, Math.max(0, remaining));+ remaining -= text.length;+ return (+ <span key={ti} style={{color: color ?? syntax.plain}}>+ {shown}+ </span>+ );+ })}+ {showCursor ? (+ <span+ style={{+ display: 'inline-block',+ width: '0.55em',+ height: '1.1em',+ translate: '0 0.18em',+ backgroundColor: colors.blue,+ opacity: Math.floor(frame / 8) % 2 === 0 ? 1 : 0.35,+ }}+ />+ ) : null}+ </div>+ );+ })}+ </div>+ );+};++export const Window: React.FC<{+ readonly title?: string;+ readonly width?: number;+ readonly fontSize?: number;+ readonly light?: boolean;+ readonly style?: React.CSSProperties;+ readonly children: React.ReactNode;+}> = ({title, width = 820, fontSize = 29, light = false, style, children}) => (+ <div+ style={{+ width,+ borderRadius: 26,+ overflow: 'hidden',+ backgroundColor: light ? colors.paper : colors.code,+ boxShadow:+ '0 30px 80px rgba(10, 16, 32, 0.35), 0 0 0 1px rgba(255,255,255,0.06)',+ ...style,+ }}+ >+ <div+ style={{+ height: 58,+ display: 'flex',+ alignItems: 'center',+ padding: '0 22px',+ gap: 10,+ backgroundColor: light ? '#F4F6FA' : '#151B2B',+ borderBottom: light ? `1px solid ${colors.line}` : '1px solid #222B40',+ position: 'relative',+ }}+ >+ {['#FF5F57', '#FEBC2E', '#28C840'].map((c) => (+ <div+ key={c}+ style={{width: 15, height: 15, borderRadius: 8, backgroundColor: c}}+ />+ ))}+ {title ? (+ <div+ style={{+ position: 'absolute',+ left: 0,+ right: 0,+ textAlign: 'center',+ fontFamily: mono,+ fontSize: 21,+ color: light ? colors.muted : '#8B95A7',+ }}+ >+ {title}+ </div>+ ) : null}+ </div>+ <div+ style={{+ padding: '26px 32px 30px',+ fontFamily: mono,+ fontSize,+ lineHeight: 1.55,+ color: light ? colors.ink : syntax.plain,+ }}+ >+ {children}+ </div>+ </div>+);++export const Chip: React.FC<{+ readonly children: React.ReactNode;+ readonly color?: string;+ readonly background?: string;+ readonly icon?: React.ReactNode;+ readonly fontSize?: number;+ readonly style?: React.CSSProperties;+}> = ({+ children,+ color = colors.ink,+ background = colors.paper,+ icon,+ fontSize = 34,+ style,+}) => (+ <div+ style={{+ display: 'inline-flex',+ alignItems: 'center',+ gap: 14,+ padding: '14px 28px 16px',+ borderRadius: 999,+ backgroundColor: background,+ color,+ fontFamily: display,+ fontWeight: 700,+ fontSize,+ letterSpacing: '-0.01em',+ boxShadow: '0 14px 34px rgba(10, 16, 32, 0.16)',+ whiteSpace: 'nowrap',+ ...style,+ }}+ >+ {icon}+ {children}+ </div>+);++// A rubber stamp that slams in from large to its resting size.+export const Stamp: React.FC<{+ readonly children: React.ReactNode;+ readonly color: string;+ readonly rotate?: number;+ readonly fontSize?: number;+ readonly delay?: number;+ readonly style?: React.CSSProperties;+}> = ({children, color, rotate = -8, fontSize = 60, delay = 0, style}) => {+ const frame = useCurrentFrame();+ const {durationInFrames} = useVideoConfig();+ const slam = interpolate(frame - delay, [0, 7], [0, 1], {+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ });+ const settle = pop(frame, delay + 5, 9);+ const out = exit(frame, durationInFrames, 8);+ return (+ <div+ style={{+ display: 'inline-block',+ padding: '10px 30px 14px',+ border: `7px solid ${color}`,+ borderRadius: 22,+ color,+ backgroundColor: 'rgba(255,255,255,0.92)',+ fontFamily: display,+ fontWeight: 700,+ fontSize,+ letterSpacing: '0.02em',+ textTransform: 'uppercase',+ whiteSpace: 'nowrap',+ opacity: slam * out,+ rotate: `${rotate}deg`,+ scale:+ interpolate(slam, [0, 1], [2.4, 1]) *+ (1 + 0.04 * Math.sin(settle * Math.PI)),+ boxShadow: '0 18px 40px rgba(10,16,32,0.18)',+ ...style,+ }}+ >+ {children}+ </div>+ );+};++export const CheckBadge: React.FC<{+ readonly delay?: number;+ readonly size?: number;+ readonly color?: string;+}> = ({delay = 0, size = 64, color = colors.success}) => {+ const frame = useCurrentFrame();+ const p = pop(frame, delay, 10);+ const draw = rise(frame, delay + 3, 12);+ return (+ <div+ style={{+ width: size,+ height: size,+ borderRadius: size / 2,+ backgroundColor: color,+ display: 'flex',+ alignItems: 'center',+ justifyContent: 'center',+ scale: p,+ flexShrink: 0,+ boxShadow: `0 10px 24px ${color}66`,+ }}+ >+ <svg+ width={size * 0.6}+ height={size * 0.6}+ viewBox="0 0 24 24"+ fill="none"+ >+ <path+ d="M4.5 12.5l5 5 10-11"+ stroke="#fff"+ strokeWidth={3.2}+ strokeLinecap="round"+ strokeLinejoin="round"+ strokeDasharray={24}+ strokeDashoffset={24 * (1 - draw)}+ />+ </svg>+ </div>+ );+};++export const Label: React.FC<{+ readonly children: React.ReactNode;+ readonly color?: string;+ readonly style?: React.CSSProperties;+}> = ({children, color = colors.muted, style}) => (+ <div+ style={{+ fontFamily: display,+ fontWeight: 500,+ fontSize: 26,+ letterSpacing: '0.14em',+ textTransform: 'uppercase',+ color,+ ...style,+ }}+ >+ {children}+ </div>+);diff --git a/packages/example/src/WhatsNew/effects/leak-grid.ts b/packages/example/src/WhatsNew/effects/leak-grid.tsnew file mode 100644index 0000000000..8815f11a79--- /dev/null+++ b/packages/example/src/WhatsNew/effects/leak-grid.ts@@ -0,0 +1,313 @@+import {createEffect, type InteractivitySchema} from 'remotion';++// A grid of light leaks drawn in a single WebGL pass. Chrome keeps at most 16+// WebGL contexts alive and every effect chain uses two, so nine separate+// lightLeak() tiles would force-lose contexts. The pattern and hue math are+// ported from @remotion/effects/light-leak.++export type LeakGridParams = {+ readonly cols?: number;+ readonly rows?: number;+ readonly gap?: number;+ readonly radius?: number;+ readonly inset?: number;+ readonly seed?: number;+ readonly seedOffset?: number;+ readonly hueShift?: number;+ readonly hueSpread?: number;+ readonly progress?: number;+ readonly progressWobble?: number;+ readonly phase?: number;+ // Per-tile entrance, 0 (hidden) to 1 (fully shown). Up to 16 tiles.+ readonly appear?: readonly number[];+};++type Resolved = Required<Omit<LeakGridParams, 'appear'>> & {+ appear: number[];+};++const resolve = (p: LeakGridParams): Resolved => ({+ cols: p.cols ?? 3,+ rows: p.rows ?? 3,+ gap: p.gap ?? 18,+ radius: p.radius ?? 20,+ inset: p.inset ?? 20,+ seed: p.seed ?? 1,+ seedOffset: p.seedOffset ?? 0,+ hueShift: p.hueShift ?? 0,+ hueSpread: p.hueSpread ?? 0,+ progress: p.progress ?? 0.45,+ progressWobble: p.progressWobble ?? 0.18,+ phase: p.phase ?? 0,+ appear: Array.from({length: 16}, (_, i) => p.appear?.[i] ?? 1),+});++const schema = {+ seed: {+ type: 'number',+ default: 1,+ description: 'Seed',+ hiddenFromList: false,+ },+ hueShift: {+ type: 'number',+ min: 0,+ max: 360,+ default: 0,+ description: 'Hue Shift',+ hiddenFromList: false,+ },+ progress: {+ type: 'number',+ min: 0,+ max: 1,+ step: 0.01,+ default: 0.45,+ description: 'Progress',+ hiddenFromList: false,+ },+} as const satisfies InteractivitySchema;++const VS = /* glsl */ `#version 300 es+in vec2 aPos;+void main() {+ gl_Position = vec4(aPos, 0.0, 1.0);+}+`;++const FS = /* glsl */ `#version 300 es+precision highp float;+out vec4 fragColor;++uniform vec2 resolution;+uniform vec2 grid;+uniform float gap;+uniform float radius;+uniform float inset;+uniform float seed;+uniform float seedOffset;+uniform float hueShift;+uniform float hueSpread;+uniform float progress;+uniform float progressWobble;+uniform float phase;+uniform float appear[16];++const float Pi = 3.14159;++vec3 computePattern(vec2 uv, float s, float t) {+ vec2 p = uv * 0.8;+ p += vec2(sin(s * 1.61803) * 5.0, cos(s * 2.71828) * 5.0);+ for (int i = 1; i < 5; i++) {+ vec2 newp = p;+ float fi = float(i);+ float ph = s * 0.7 * fi;+ newp.x += 0.6 / fi * cos(fi * p.y + t * 0.7 + 0.3 * fi + ph) + 20.0;+ newp.y += 0.6 / fi * cos(fi * p.x + t * 0.7 + 0.3 * float(i + 10) + ph) - 20.0 + 15.0;+ p = newp;+ }+ float v1 = 0.5 * sin(2.0 * p.x) + 0.5;+ float v2 = 0.5 * sin(2.0 * p.y) + 0.5;+ float blend = sin(p.x + p.y) * 0.5 + 0.5;+ float brightness = v1 * 0.5 + v2 * 0.5;+ return vec3(brightness, blend, brightness * 0.6 + blend * 0.4);+}++vec3 hueRotate(vec3 col, float degrees) {+ float angle = degrees * Pi / 180.0;+ float cosA = cos(angle);+ float sinA = sin(angle);+ mat3 hueRot = mat3(+ cosA + (1.0 - cosA) / 3.0,+ (1.0 - cosA) / 3.0 - sinA * 0.57735,+ (1.0 - cosA) / 3.0 + sinA * 0.57735,+ (1.0 - cosA) / 3.0 + sinA * 0.57735,+ cosA + (1.0 - cosA) / 3.0,+ (1.0 - cosA) / 3.0 - sinA * 0.57735,+ (1.0 - cosA) / 3.0 - sinA * 0.57735,+ (1.0 - cosA) / 3.0 + sinA * 0.57735,+ cosA + (1.0 - cosA) / 3.0+ );+ return clamp(hueRot * col, 0.0, 1.0);+}++float roundedBox(vec2 p, vec2 halfSize, float r) {+ vec2 q = abs(p) - halfSize + r;+ return length(max(q, 0.0)) + min(max(q.x, q.y), 0.0) - r;+}++vec4 leak(vec2 uv, vec2 maxUv, float s, float prog, float hue) {+ float evolve = min(1.0, prog * 2.0);+ float retract = max(0.0, prog * 2.0 - 1.0);+ vec3 patA = computePattern(uv, s, evolve * Pi);+ float threshA = 1.0 - evolve;+ float reveal = smoothstep(threshA, threshA + 0.3, patA.z);+ vec2 retractUv = maxUv - uv;+ vec3 patB = computePattern(retractUv, s + 42.0, retract * Pi);+ float threshB = 1.0 - retract;+ float erase = smoothstep(threshB, threshB + 0.3, patB.z);+ vec3 col = mix(vec3(1.0, 0.85, 0.2), vec3(1.0, 0.5, 0.05), patA.y);+ col *= 0.6 + 0.6 * patA.x;+ return vec4(hueRotate(col, hue), reveal * (1.0 - erase));+}++void main() {+ // Top-left origin in pixels.+ vec2 px = vec2(gl_FragCoord.x, resolution.y - gl_FragCoord.y);+ vec2 area = resolution - 2.0 * inset;+ vec2 tile = (area - gap * (grid - 1.0)) / grid;+ vec2 local = px - inset;+ vec2 cell = floor(local / (tile + gap));+ cell = clamp(cell, vec2(0.0), grid - 1.0);+ vec2 center = inset + cell * (tile + gap) + tile * 0.5;+ int index = int(cell.y * grid.x + cell.x);+ float a = appear[index];+ vec2 halfSize = tile * 0.5 * (0.55 + 0.45 * a);++ float d = roundedBox(px - center, halfSize, radius);+ float inside = 1.0 - smoothstep(-0.75, 0.75, d);+ float shadowD = roundedBox(px - center - vec2(0.0, 10.0), halfSize, radius);+ float shadow = 0.2 * (1.0 - smoothstep(-6.0, 26.0, shadowD));+ float visible = min(1.0, a * 1.6);++ float fi = float(index);+ vec2 uvTile = (px - center + halfSize) / (2.0 * halfSize);+ vec2 maxUv = vec2(1.92, 1.92 * tile.y / tile.x);+ vec2 uv = vec2(uvTile.x, 1.0 - uvTile.y) * maxUv;+ float tileProgress = progress + progressWobble * sin(phase + fi * 0.93);+ vec4 l = leak(uv, maxUv, seed + fi * 11.0 + seedOffset, clamp(tileProgress, 0.0, 1.0), mod(hueShift + fi * hueSpread, 360.0));++ vec3 base = vec3(0.078, 0.059, 0.043);+ vec3 col = mix(base, l.rgb, l.a);+ float alphaTile = inside * visible;+ float alphaShadow = shadow * visible * (1.0 - inside);+ // Premultiplied output.+ fragColor = vec4(col * alphaTile, alphaTile + alphaShadow);+}+`;++type State = {+ gl: WebGL2RenderingContext;+ program: WebGLProgram;+ vao: WebGLVertexArrayObject;+ vbo: WebGLBuffer;+ u: Record<string, WebGLUniformLocation | null>;+};++const compile = (gl: WebGL2RenderingContext, type: number, source: string) => {+ const shader = gl.createShader(type);+ if (!shader) {+ throw new Error('Failed to create shader for leakGrid()');+ }+ gl.shaderSource(shader, source);+ gl.compileShader(shader);+ if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {+ throw new Error(`leakGrid() shader: ${gl.getShaderInfoLog(shader)}`);+ }+ return shader;+};++export const leakGrid = createEffect<LeakGridParams, State>({+ type: 'dev.remotion.whatsnew.leakGrid',+ label: 'leakGrid()',+ documentationLink: null,+ backend: 'webgl2',+ calculateKey: (params) => `leak-grid-${JSON.stringify(resolve(params))}`,+ setup: (target) => {+ const gl = target.getContext('webgl2', {+ premultipliedAlpha: true,+ alpha: true,+ preserveDrawingBuffer: true,+ });+ if (!gl) {+ throw new Error('Could not get a WebGL2 context for leakGrid().');+ }+ const program = gl.createProgram();+ if (!program) {+ throw new Error('Failed to create program for leakGrid()');+ }+ const vs = compile(gl, gl.VERTEX_SHADER, VS);+ const fs = compile(gl, gl.FRAGMENT_SHADER, FS);+ gl.attachShader(program, vs);+ gl.attachShader(program, fs);+ gl.linkProgram(program);+ gl.deleteShader(vs);+ gl.deleteShader(fs);+ if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {+ throw new Error(`leakGrid() link: ${gl.getProgramInfoLog(program)}`);+ }+ const vao = gl.createVertexArray();+ const vbo = gl.createBuffer();+ if (!vao || !vbo) {+ throw new Error('Failed to create buffers for leakGrid()');+ }+ gl.bindVertexArray(vao);+ gl.bindBuffer(gl.ARRAY_BUFFER, vbo);+ gl.bufferData(+ gl.ARRAY_BUFFER,+ new Float32Array([-1, -1, 1, -1, -1, 1, 1, 1]),+ gl.STATIC_DRAW,+ );+ const aPos = gl.getAttribLocation(program, 'aPos');+ gl.enableVertexAttribArray(aPos);+ gl.vertexAttribPointer(aPos, 2, gl.FLOAT, false, 8, 0);+ gl.bindVertexArray(null);++ const names = [+ 'resolution',+ 'grid',+ 'gap',+ 'radius',+ 'inset',+ 'seed',+ 'seedOffset',+ 'hueShift',+ 'hueSpread',+ 'progress',+ 'progressWobble',+ 'phase',+ 'appear',+ ];+ const u = Object.fromEntries(+ names.map((n) => [n, gl.getUniformLocation(program, n)]),+ );+ return {gl, program, vao, vbo, u};+ },+ apply: ({width, height, params, state}) => {+ const r = resolve(params);+ const {gl, program, vao, u} = 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.uniform2f(u.resolution, width, height);+ gl.uniform2f(u.grid, r.cols, r.rows);+ gl.uniform1f(u.gap, r.gap);+ gl.uniform1f(u.radius, r.radius);+ gl.uniform1f(u.inset, r.inset);+ gl.uniform1f(u.seed, r.seed);+ gl.uniform1f(u.seedOffset, r.seedOffset);+ gl.uniform1f(u.hueShift, r.hueShift);+ gl.uniform1f(u.hueSpread, r.hueSpread);+ gl.uniform1f(u.progress, r.progress);+ gl.uniform1f(u.progressWobble, r.progressWobble);+ gl.uniform1f(u.phase, r.phase);+ gl.uniform1fv(u.appear, new Float32Array(r.appear));+ gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);+ gl.bindVertexArray(null);+ gl.useProgram(null);+ },+ cleanup: ({gl, program, vao, vbo}) => {+ gl.deleteBuffer(vbo);+ gl.deleteVertexArray(vao);+ gl.deleteProgram(program);+ },+ schema,+ validateParams: (params) => {+ const r = resolve(params);+ if (r.cols * r.rows > 16) {+ throw new TypeError('leakGrid() supports at most 16 tiles');+ }+ },+});diff --git a/packages/example/src/WhatsNew/fonts.ts b/packages/example/src/WhatsNew/fonts.tsnew file mode 100644index 0000000000..785d79bb6a--- /dev/null+++ b/packages/example/src/WhatsNew/fonts.ts@@ -0,0 +1,20 @@+import {loadFont} from '@remotion/fonts';+import {loadFont as loadGeistMono} from '@remotion/google-fonts/GeistMono';++export const display = 'GT Planar';++loadFont({+ family: display,+ url: 'https://remotion.media/announcements/whats-new-in-remotion/cursor/fonts/GT-Planar-Medium.woff2',+ weight: '500',+});+loadFont({+ family: display,+ url: 'https://remotion.media/announcements/whats-new-in-remotion/cursor/fonts/GT-Planar-Bold.woff2',+ weight: '700',+});++export const {fontFamily: mono} = loadGeistMono('normal', {+ weights: ['400', '600'],+ subsets: ['latin'],+});diff --git a/packages/example/src/WhatsNew/scenes/Agents.tsx b/packages/example/src/WhatsNew/scenes/Agents.tsxnew file mode 100644index 0000000000..12848d5040--- /dev/null+++ b/packages/example/src/WhatsNew/scenes/Agents.tsx@@ -0,0 +1,1212 @@+import {Audio, Video} from '@remotion/media';+import React from 'react';+import {+ AbsoluteFill,+ interpolate,+ Sequence,+ Series,+ useCurrentFrame,+} from 'remotion';+import {easeInOut, pop, rise} from '../anim';+import {Backdrop} from '../components/Background';+import {PunchyCaptions} from '../components/Captions';+import {Burst} from '../components/fx';+import {ChatIcon, CheckIcon} from '../components/icons';+import {+ getCaptionPlacement,+ Punch,+ Stage,+ type LayoutKeyframe,+} from '../components/Stage';+import {+ ChapterSticker,+ Chip,+ CodeLines,+ Label,+ Panel,+ Pop,+ Stamp,+ syntax,+ Window,+} from '../components/ui';+import {display, mono} from '../fonts';+import {accents, colors} from '../theme';++const layout: LayoutKeyframe[] = [+ {at: 0, layout: 'full'},+ {at: 94, layout: 'split'},+ {at: 904, layout: 'full'},+];++const VibeCoding: React.FC = () => {+ const frame = useCurrentFrame();+ // Sequence starts at scene frame 98.+ const rough = rise(frame, 172, 10);+ const fixed = rise(frame, 262, 12);+ const shake = frame > 172 && frame < 200 ? Math.sin(frame * 2.2) * 6 : 0;+ return (+ <Panel style={{gap: 28}}>+ <Pop from="up" delay={2}>+ <Window title="agent — my-video" width={820} fontSize={28}>+ <CodeLines+ start={10}+ speed={1.8}+ cursor={false}+ lines={[+ [+ ['> ', syntax.prompt],+ ['Make a launch video with Remotion', syntax.plain],+ ],+ [],+ [+ ['⏺ ', accents.agents],+ ['Scaffolding the project…', syntax.comment],+ ],+ [+ ['⏺ ', accents.agents],+ ['Writing src/Launch.tsx', syntax.comment],+ ],+ [+ ['⏺ ', accents.agents],+ ['Starting the Studio…', syntax.comment],+ ],+ ]}+ />+ </Window>+ </Pop>+ <div+ style={{+ display: 'flex',+ alignItems: 'center',+ gap: 18,+ opacity: rough,+ translate: `${shake}px ${(1 - rough) * 30}px`,+ }}+ >+ <Chip+ background={fixed > 0.5 ? colors.success : colors.danger}+ color={colors.paper}+ icon={+ fixed > 0.5 ? (+ <CheckIcon size={34} color={colors.paper} strokeWidth={3} />+ ) : (+ <span style={{fontSize: 34}}>⚠</span>+ )+ }+ >+ {fixed > 0.5 ? 'Smoothing out rough edges' : 'Rough edges'}+ </Chip>+ </div>+ </Panel>+ );+};++const AlreadyRunning: React.FC = () => {+ const frame = useCurrentFrame();+ // Sequence starts at scene frame 382.+ const livePulse = 0.6 + 0.4 * Math.sin(frame / 5);+ return (+ <Panel style={{gap: 26}}>+ <Pop from="up" delay={26}>+ <div+ style={{+ display: 'flex',+ alignItems: 'center',+ gap: 16,+ padding: '18px 30px',+ borderRadius: 999,+ backgroundColor: colors.paper,+ boxShadow: '0 14px 34px rgba(10,16,32,0.14)',+ fontFamily: display,+ fontWeight: 700,+ fontSize: 34,+ color: colors.ink,+ }}+ >+ <div+ style={{+ width: 20,+ height: 20,+ borderRadius: 10,+ backgroundColor: colors.success,+ boxShadow: `0 0 0 ${8 * livePulse}px rgba(18,183,106,0.25)`,+ }}+ />+ Remotion Studio · localhost:3000+ </div>+ </Pop>+ <Pop from="up" delay={82}>+ <Window title="agent — my-video" width={820} fontSize={28}>+ <CodeLines+ start={92}+ speed={1.3}+ lines={[+ [+ ['$ ', syntax.prompt],+ ['npx remotion studio', syntax.plain],+ ],+ ]}+ />+ {frame >= 140 ? (+ <div style={{color: syntax.prompt, marginTop: 6}}>+ Already running at http://localhost:3000+ </div>+ ) : null}+ </Window>+ </Pop>+ <Pop delay={178} from="up">+ <Chip+ background={colors.ink}+ color={colors.paper}+ icon={<CheckIcon size={34} color={colors.success} strokeWidth={3} />}+ >+ No duplicate Studio instances+ </Chip>+ </Pop>+ </Panel>+ );+};++const LockfileError: React.FC = () => {+ const frame = useCurrentFrame();+ // Sequence starts at scene frame 592; "gone" is spoken at local 133.+ const gone = interpolate(frame, [130, 146], [0, 1], {+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ easing: easeInOut,+ });+ const strike = rise(frame, 118, 12);+ const files = ['package-lock.json', 'yarn.lock', 'pnpm-lock.yaml'];+ return (+ <Panel>+ <Pop from="up" delay={6}>+ <div+ style={{+ width: 800,+ borderRadius: 28,+ backgroundColor: '#2A0E0E',+ border: `3px solid ${colors.danger}`,+ padding: '30px 36px',+ boxSizing: 'border-box',+ boxShadow: '0 30px 70px rgba(240,68,56,0.3)',+ fontFamily: mono,+ fontSize: 30,+ color: '#FFD7D4',+ position: 'relative',+ opacity: 1 - gone,+ scale: 1 - gone * 0.25,+ rotate: `${gone * -6}deg`,+ filter: `blur(${gone * 10}px)`,+ }}+ >+ <div style={{color: '#FF8A80', fontWeight: 600, marginBottom: 14}}>+ ✕ Error: Multiple lockfiles detected+ </div>+ {files.map((f, i) => (+ <div+ key={f}+ style={{+ opacity: rise(frame, 30 + i * 9, 8),+ }}+ >+ {' '}- {f}+ </div>+ ))}+ <div+ style={{+ position: 'absolute',+ left: 30,+ right: 30,+ top: '50%',+ height: 10,+ borderRadius: 5,+ backgroundColor: colors.paper,+ transformOrigin: '0% 50%',+ scale: `${strike} 1`,+ rotate: '-8deg',+ boxShadow: '0 4px 14px rgba(0,0,0,0.4)',+ }}+ />+ </div>+ </Pop>+ <div style={{position: 'absolute', top: 560}}>+ <Stamp color={colors.success} delay={134} rotate={-6} fontSize={80}>+ Gone+ </Stamp>+ </div>+ </Panel>+ );+};++const ZodDiamond: React.FC<{readonly size: number}> = ({size}) => (+ <svg width={size} height={size} viewBox="0 0 100 100">+ <defs>+ <linearGradient id="zod-gradient" x1="0" y1="0" x2="1" y2="1">+ <stop offset="0%" stopColor="#3E67B1" />+ <stop offset="100%" stopColor="#274D82" />+ </linearGradient>+ </defs>+ <path d="M22 14h56l18 22-46 52L4 36z" fill="url(#zod-gradient)" />+ <path d="M22 14h56l18 22H4z" fill="#FFFFFF" opacity={0.18} />+ </svg>+);++const Zod4: React.FC = () => {+ const frame = useCurrentFrame();+ // Sequence starts at scene frame 750.+ const four = pop(frame, 124, 9);+ return (+ <Panel style={{gap: 26}}>+ <Pop from="up" delay={4}>+ <div+ style={{+ width: 780,+ borderRadius: 36,+ backgroundColor: colors.paper,+ boxShadow: '0 26px 60px rgba(10,16,32,0.18)',+ padding: '40px 44px',+ boxSizing: 'border-box',+ display: 'flex',+ alignItems: 'center',+ gap: 38,+ }}+ >+ <div style={{position: 'relative'}}>+ <ZodDiamond size={190} />+ <div+ style={{+ position: 'absolute',+ right: -24,+ bottom: -14,+ width: 104,+ height: 104,+ borderRadius: 52,+ backgroundColor: colors.blue,+ color: colors.paper,+ display: 'flex',+ alignItems: 'center',+ justifyContent: 'center',+ fontFamily: display,+ fontWeight: 700,+ fontSize: 70,+ boxShadow: '0 0 0 8px #fff',+ scale: four,+ }}+ >+ 4+ </div>+ </div>+ <div>+ <Label>Now supported</Label>+ <div+ style={{+ fontFamily: display,+ fontWeight: 700,+ fontSize: 82,+ letterSpacing: '-0.03em',+ color: colors.ink,+ }}+ >+ Zod 4+ </div>+ </div>+ </div>+ </Pop>+ <Pop from="up" delay={30}>+ <Window title="package.json" width={780} fontSize={30}>+ <CodeLines+ start={36}+ speed={1.4}+ cursor={false}+ lines={[+ [+ ['"dependencies"', syntax.attr],+ [': {', syntax.punct],+ ],+ [+ [' "zod"', syntax.attr],+ [': ', syntax.punct],+ ['"^4.0.0"', syntax.string],+ ],+ [['}', syntax.punct]],+ ]}+ />+ </Window>+ </Pop>+ <div style={{position: 'absolute', top: 40, right: 30}}>+ <Stamp color={accents.agents} delay={76} rotate={10} fontSize={64}>+ Finally+ </Stamp>+ </div>+ {frame >= 124 ? (+ <Sequence from={124} layout="none">+ <Burst+ x={250}+ y={260}+ colors={[+ colors.blue,+ accents.agents,+ accents.bundling,+ colors.success,+ ]}+ />+ </Sequence>+ ) : null}+ </Panel>+ );+};++const LetUsKnow: React.FC = () => (+ <div style={{position: 'absolute', left: 76, top: 300}}>+ <Pop rotate={-4}>+ <div+ style={{+ display: 'flex',+ alignItems: 'center',+ gap: 26,+ padding: '30px 44px 32px 30px',+ borderRadius: 38,+ backgroundColor: colors.paper,+ boxShadow: '0 28px 70px rgba(10,16,32,0.34)',+ }}+ >+ <div+ style={{+ width: 104,+ height: 104,+ borderRadius: 28,+ backgroundColor: accents.agents,+ display: 'flex',+ alignItems: 'center',+ justifyContent: 'center',+ }}+ >+ <ChatIcon size={60} color={colors.paper} />+ </div>+ <div style={{maxWidth: 470}}>+ <div+ style={{+ fontFamily: display,+ fontWeight: 700,+ fontSize: 60,+ lineHeight: 1,+ letterSpacing: '-0.03em',+ color: colors.ink,+ marginBottom: 8,+ }}+ >+ What should we improve?+ </div>+ <div+ style={{+ fontFamily: display,+ fontWeight: 700,+ fontSize: 40,+ color: accents.agents,+ }}+ >+ Let us know!+ </div>+ </div>+ </div>+ </Pop>+ </div>+);++export const AgentsScene: React.FC = () => {+ const frame = useCurrentFrame();+ const captions = getCaptionPlacement(frame, layout);++ return (+ <AbsoluteFill>+ <Backdrop accent={accents.agents} />+ <Stage keyframes={layout}>+ <Series>+ <Series.Sequence+ name="Better with agents"+ durationInFrames={94}+ premountFor={30}+ >+ <Punch zoom={1}>+ <Video+ src={+ 'https://remotion.media/announcements/whats-new-in-remotion/cursor/footage/whats7.mp4'+ }+ trimBefore={122}+ />+ </Punch>+ </Series.Sequence>+ <Series.Sequence+ name="Rough edges"+ durationInFrames={288}+ premountFor={30}+ >+ <Punch zoom={1.12}>+ <Video+ src={+ 'https://remotion.media/announcements/whats-new-in-remotion/cursor/footage/whats7.mp4'+ }+ trimBefore={233}+ />+ </Punch>+ </Series.Sequence>+ <Series.Sequence+ name="Studio already running"+ durationInFrames={163}+ premountFor={30}+ >+ <Punch zoom={1.02}>+ <Video+ src={+ 'https://remotion.media/announcements/whats-new-in-remotion/cursor/footage/whats7.mp4'+ }+ trimBefore={537}+ />+ </Punch>+ </Series.Sequence>+ <Series.Sequence+ name="We prevent that"+ durationInFrames={47}+ premountFor={30}+ >+ <Punch zoom={1.18}>+ <Video+ src={+ 'https://remotion.media/announcements/whats-new-in-remotion/cursor/footage/whats7.mp4'+ }+ trimBefore={711}+ />+ </Punch>+ </Series.Sequence>+ <Series.Sequence+ name="Lockfiles and Zod"+ durationInFrames={314}+ premountFor={30}+ >+ <Punch zoom={1.02}>+ <Video+ src={+ 'https://remotion.media/announcements/whats-new-in-remotion/cursor/footage/whats7.mp4'+ }+ trimBefore={777}+ />+ </Punch>+ </Series.Sequence>+ <Series.Sequence+ name="Let us know"+ durationInFrames={70}+ premountFor={30}+ >+ <Punch zoom={1.16}>+ <Video+ src={+ 'https://remotion.media/announcements/whats-new-in-remotion/cursor/footage/whats7.mp4'+ }+ trimBefore={1111}+ />+ </Punch>+ </Series.Sequence>+ </Series>+ </Stage>++ <Sequence name="Chapter sticker" from={3} durationInFrames={96}>+ <ChapterSticker+ index="06"+ title="Better with agents"+ accent={accents.agents}+ />+ </Sequence>+ <Sequence name="Vibe coding" from={98} durationInFrames={284}>+ <VibeCoding />+ </Sequence>+ <Sequence name="Already running" from={382} durationInFrames={210}>+ <AlreadyRunning />+ </Sequence>+ <Sequence name="Lockfile error" from={592} durationInFrames={158}>+ <LockfileError />+ </Sequence>+ <Sequence name="Zod 4" from={750} durationInFrames={156}>+ <Zod4 />+ </Sequence>+ <Sequence name="Let us know" from={908} durationInFrames={68}>+ <LetUsKnow />+ </Sequence>++ <PunchyCaptions+ width={captions.width}+ fontSize={captions.fontSize}+ style={captions.style}+ keywords={[+ 'agents.',+ 'claude code',+ 'rough',+ 'edges',+ 'lockfile',+ 'gone',+ 'zod 4.',+ ]}+ captions={[+ // @captions whats7+ {+ text: 'Make',+ startMs: 144,+ endMs: 639,+ timestampMs: 392,+ confidence: null,+ },+ {+ text: ' Remotion',+ startMs: 639,+ endMs: 1323,+ timestampMs: 981,+ confidence: null,+ },+ {+ text: ' work',+ startMs: 1323,+ endMs: 1818,+ timestampMs: 1571,+ confidence: null,+ },+ {+ text: ' better',+ startMs: 1818,+ endMs: 2336,+ timestampMs: 2077,+ confidence: null,+ },+ {+ text: ' with',+ startMs: 2336,+ endMs: 2973,+ timestampMs: 2655,+ confidence: null,+ },+ {+ text: ' agents.',+ startMs: 2973,+ endMs: 3033,+ timestampMs: 3003,+ confidence: null,+ pageBreakAfter: true,+ },+ {+ text: ' If',+ startMs: 3223,+ endMs: 3426,+ timestampMs: 3325,+ confidence: null,+ },+ {+ text: ' you',+ startMs: 3426,+ endMs: 3742,+ timestampMs: 3584,+ confidence: null,+ },+ {+ text: ' use',+ startMs: 3742,+ endMs: 4171,+ timestampMs: 3957,+ confidence: null,+ },+ {+ text: ' Claude Code',+ startMs: 4171,+ endMs: 4713,+ timestampMs: 4442,+ confidence: null,+ },+ {+ text: ' or',+ startMs: 4713,+ endMs: 5119,+ timestampMs: 4916,+ confidence: null,+ },+ {+ text: ' similar',+ startMs: 5119,+ endMs: 5638,+ timestampMs: 5379,+ confidence: null,+ },+ {+ text: ' to',+ startMs: 5638,+ endMs: 6089,+ timestampMs: 5864,+ confidence: null,+ },+ {+ text: ' vibe',+ startMs: 6089,+ endMs: 6360,+ timestampMs: 6225,+ confidence: null,+ },+ {+ text: ' code',+ startMs: 6360,+ endMs: 6586,+ timestampMs: 6473,+ confidence: null,+ },+ {+ text: ' a',+ startMs: 6586,+ endMs: 6947,+ timestampMs: 6767,+ confidence: null,+ },+ {+ text: ' video',+ startMs: 6947,+ endMs: 7308,+ timestampMs: 7128,+ confidence: null,+ },+ {+ text: ' with',+ startMs: 7308,+ endMs: 7692,+ timestampMs: 7500,+ confidence: null,+ },+ {+ text: ' Remotion,',+ startMs: 7692,+ endMs: 7752,+ timestampMs: 7722,+ confidence: null,+ pageBreakAfter: true,+ },+ {+ text: ' there',+ startMs: 8146,+ endMs: 8399,+ timestampMs: 8273,+ confidence: null,+ },+ {+ text: ' just',+ startMs: 8399,+ endMs: 8718,+ timestampMs: 8559,+ confidence: null,+ },+ {+ text: ' are',+ startMs: 8718,+ endMs: 8920,+ timestampMs: 8819,+ confidence: null,+ },+ {+ text: ' some',+ startMs: 8920,+ endMs: 9156,+ timestampMs: 9038,+ confidence: null,+ },+ {+ text: ' rough',+ startMs: 9156,+ endMs: 9543,+ timestampMs: 9350,+ confidence: null,+ },+ {+ text: ' edges',+ startMs: 9543,+ endMs: 9964,+ timestampMs: 9754,+ confidence: null,+ },+ {+ text: ' and',+ startMs: 10165,+ endMs: 10434,+ timestampMs: 10300,+ confidence: null,+ },+ {+ text: ' we',+ startMs: 10798,+ endMs: 10903,+ timestampMs: 10851,+ confidence: null,+ },+ {+ text: ' are',+ startMs: 10903,+ endMs: 11113,+ timestampMs: 11008,+ confidence: null,+ },+ {+ text: ' trying',+ startMs: 11113,+ endMs: 11429,+ timestampMs: 11271,+ confidence: null,+ },+ {+ text: ' to',+ startMs: 11429,+ endMs: 11760,+ timestampMs: 11595,+ confidence: null,+ },+ {+ text: ' fix',+ startMs: 12038,+ endMs: 12148,+ timestampMs: 12093,+ confidence: null,+ },+ {+ text: ' them.',+ startMs: 12331,+ endMs: 12575,+ timestampMs: 12453,+ confidence: null,+ pageBreakAfter: true,+ },+ {+ text: ' For',+ startMs: 12802,+ endMs: 13189,+ timestampMs: 12996,+ confidence: null,+ },+ {+ text: ' example,',+ startMs: 13189,+ endMs: 13249,+ timestampMs: 13219,+ confidence: null,+ pageBreakAfter: true,+ },+ {+ text: ' if',+ startMs: 13433,+ endMs: 13575,+ timestampMs: 13504,+ confidence: null,+ },+ {+ text: ' the',+ startMs: 13575,+ endMs: 13759,+ timestampMs: 13667,+ confidence: null,+ },+ {+ text: ' Remotion',+ startMs: 13759,+ endMs: 14247,+ timestampMs: 14003,+ confidence: null,+ },+ {+ text: ' Studio',+ startMs: 14247,+ endMs: 14451,+ timestampMs: 14349,+ confidence: null,+ },+ {+ text: ' is',+ startMs: 14451,+ endMs: 14777,+ timestampMs: 14614,+ confidence: null,+ },+ {+ text: ' already',+ startMs: 14777,+ endMs: 14837,+ timestampMs: 14807,+ confidence: null,+ },+ {+ text: ' running',+ startMs: 15143,+ endMs: 15203,+ timestampMs: 15173,+ confidence: null,+ },+ {+ text: ' and',+ startMs: 15428,+ endMs: 15652,+ timestampMs: 15540,+ confidence: null,+ },+ {+ text: ' the',+ startMs: 15652,+ endMs: 15896,+ timestampMs: 15774,+ confidence: null,+ },+ {+ text: ' AI',+ startMs: 15896,+ endMs: 16181,+ timestampMs: 16039,+ confidence: null,+ },+ {+ text: ' is',+ startMs: 16181,+ endMs: 16446,+ timestampMs: 16314,+ confidence: null,+ },+ {+ text: ' trying',+ startMs: 16446,+ endMs: 16751,+ timestampMs: 16599,+ confidence: null,+ },+ {+ text: ' to',+ startMs: 16751,+ endMs: 17138,+ timestampMs: 16945,+ confidence: null,+ },+ {+ text: ' start',+ startMs: 17138,+ endMs: 17484,+ timestampMs: 17311,+ confidence: null,+ },+ {+ text: ' another',+ startMs: 17484,+ endMs: 17831,+ timestampMs: 17658,+ confidence: null,+ },+ {+ text: ' instance,',+ startMs: 18054,+ endMs: 18114,+ timestampMs: 18084,+ confidence: null,+ pageBreakAfter: true,+ },+ {+ text: ' we',+ startMs: 18261,+ endMs: 18459,+ timestampMs: 18360,+ confidence: null,+ },+ {+ text: ' now',+ startMs: 18459,+ endMs: 18757,+ timestampMs: 18608,+ confidence: null,+ },+ {+ text: ' prevent',+ startMs: 18757,+ endMs: 19126,+ timestampMs: 18942,+ confidence: null,+ },+ {+ text: ' that.',+ startMs: 19126,+ endMs: 19579,+ timestampMs: 19353,+ confidence: null,+ pageBreakAfter: true,+ },+ {+ text: ' The',+ startMs: 19800,+ endMs: 20262,+ timestampMs: 20031,+ confidence: null,+ },+ {+ text: ' daunting',+ startMs: 20262,+ endMs: 20852,+ timestampMs: 20557,+ confidence: null,+ },+ {+ text: ' multiple',+ startMs: 21171,+ endMs: 21443,+ timestampMs: 21307,+ confidence: null,+ },+ {+ text: ' lockfile',+ startMs: 21443,+ endMs: 22026,+ timestampMs: 21735,+ confidence: null,+ },+ {+ text: ' error',+ startMs: 22026,+ endMs: 22512,+ timestampMs: 22269,+ confidence: null,+ },+ {+ text: ' message',+ startMs: 22512,+ endMs: 22959,+ timestampMs: 22736,+ confidence: null,+ },+ {+ text: ' is',+ startMs: 22959,+ endMs: 23367,+ timestampMs: 23163,+ confidence: null,+ },+ {+ text: ' now',+ startMs: 23367,+ endMs: 23931,+ timestampMs: 23649,+ confidence: null,+ },+ {+ text: ' gone',+ startMs: 24156,+ endMs: 24564,+ timestampMs: 24360,+ confidence: null,+ },+ {+ text: ' and',+ startMs: 25021,+ endMs: 25297,+ timestampMs: 25159,+ confidence: null,+ },+ {+ text: ' also',+ startMs: 25297,+ endMs: 25556,+ timestampMs: 25427,+ confidence: null,+ },+ {+ text: ' we',+ startMs: 25556,+ endMs: 25954,+ timestampMs: 25755,+ confidence: null,+ },+ {+ text: ' removed',+ startMs: 25954,+ endMs: 26092,+ timestampMs: 26023,+ confidence: null,+ },+ {+ text: ' a',+ startMs: 26092,+ endMs: 26195,+ timestampMs: 26144,+ confidence: null,+ },+ {+ text: ' lot',+ startMs: 26195,+ endMs: 26264,+ timestampMs: 26230,+ confidence: null,+ },+ {+ text: ' of',+ startMs: 26299,+ endMs: 26359,+ timestampMs: 26329,+ confidence: null,+ },+ {+ text: ' friction',+ startMs: 26627,+ endMs: 26869,+ timestampMs: 26748,+ confidence: null,+ },+ {+ text: ' by',+ startMs: 26869,+ endMs: 27232,+ timestampMs: 27051,+ confidence: null,+ },+ {+ text: ' now',+ startMs: 27232,+ endMs: 27594,+ timestampMs: 27413,+ confidence: null,+ },+ {+ text: ' finally',+ startMs: 27594,+ endMs: 28268,+ timestampMs: 27931,+ confidence: null,+ },+ {+ text: ' supporting',+ startMs: 28268,+ endMs: 28872,+ timestampMs: 28570,+ confidence: null,+ },+ {+ text: ' Zod 4.',+ startMs: 29245,+ endMs: 30033,+ timestampMs: 29639,+ confidence: null,+ pageBreakAfter: true,+ },+ {+ text: ' What',+ startMs: 30289,+ endMs: 30460,+ timestampMs: 30375,+ confidence: null,+ },+ {+ text: ' else',+ startMs: 30460,+ endMs: 30650,+ timestampMs: 30555,+ confidence: null,+ },+ {+ text: ' can',+ startMs: 30650,+ endMs: 30783,+ timestampMs: 30717,+ confidence: null,+ },+ {+ text: ' we',+ startMs: 30783,+ endMs: 31164,+ timestampMs: 30974,+ confidence: null,+ },+ {+ text: ' improve?',+ startMs: 31164,+ endMs: 31316,+ timestampMs: 31240,+ confidence: null,+ pageBreakAfter: true,+ },+ {+ text: ' Let',+ startMs: 31567,+ endMs: 31627,+ timestampMs: 31597,+ confidence: null,+ },+ {+ text: ' us',+ startMs: 31624,+ endMs: 31738,+ timestampMs: 31681,+ confidence: null,+ },+ {+ text: ' know.',+ startMs: 31738,+ endMs: 32173,+ timestampMs: 31956,+ confidence: null,+ pageBreakAfter: true,+ },+ ]}+ />++ <Audio+ name="Sticker whoosh"+ src="https://remotion.media/whoosh.wav"+ from={1}+ volume={0.3}+ />+ <Audio+ name="Split whip"+ src="https://remotion.media/whip.wav"+ from={92}+ volume={0.16}+ />+ <Audio+ name="Rough edges"+ src="https://remotion.media/windows-xp-error.wav"+ from={272}+ volume={0.16}+ />+ <Audio+ name="Fixed"+ src="https://remotion.media/ding.wav"+ from={362}+ volume={0.2}+ />+ <Audio+ name="Studio running"+ src="https://remotion.media/mouse-click.wav"+ from={408}+ volume={0.3}+ />+ <Audio+ name="Prevented"+ src="https://remotion.media/switch.wav"+ from={562}+ volume={0.24}+ />+ <Audio+ name="Error gone"+ src="https://remotion.media/whoosh.wav"+ from={720}+ volume={0.32}+ />+ <Audio+ name="Finally stamp"+ src="https://remotion.media/shutter-modern.wav"+ from={826}+ volume={0.22}+ />+ <Audio+ name="Zod 4"+ src="https://remotion.media/yippee.wav"+ from={874}+ volume={0.14}+ />+ <Audio+ name="Let us know"+ src="https://remotion.media/mouse-click.wav"+ from={906}+ volume={0.3}+ />+ </AbsoluteFill>+ );+};diff --git a/packages/example/src/WhatsNew/scenes/Bundling.tsx b/packages/example/src/WhatsNew/scenes/Bundling.tsxnew file mode 100644index 0000000000..09590b7cfe--- /dev/null+++ b/packages/example/src/WhatsNew/scenes/Bundling.tsx@@ -0,0 +1,1055 @@+import {Audio, Video} from '@remotion/media';+import React from 'react';+import {+ AbsoluteFill,+ interpolate,+ interpolateColors,+ Sequence,+ Series,+ useCurrentFrame,+} from 'remotion';+import {easeInOut, pop, rise} from '../anim';+import {Backdrop} from '../components/Background';+import {PunchyCaptions} from '../components/Captions';+import {SpeedLines} from '../components/fx';+import {BoltIcon} from '../components/icons';+import {+ getCaptionPlacement,+ Punch,+ Stage,+ type LayoutKeyframe,+} from '../components/Stage';+import {+ ChapterSticker,+ Chip,+ CodeLines,+ Label,+ Panel,+ Pop,+ syntax,+ Window,+} from '../components/ui';+import {display, mono} from '../fonts';+import {accents, colors} from '../theme';++const layout: LayoutKeyframe[] = [+ {at: 0, layout: 'full'},+ {at: 42, layout: 'split'},+ {at: 200, layout: 'full', duration: 1},+ {at: 243, layout: 'split'},+];++const RspackConfig: React.FC = () => (+ <Panel style={{gap: 30}}>+ <Pop from="up" delay={4}>+ <Window title="remotion.config.ts" width={820} fontSize={30}>+ <CodeLines+ start={14}+ speed={2.2}+ highlightLine={2}+ highlightFrom={50}+ lines={[+ [+ ['import', syntax.keyword],+ [' {Config} ', syntax.plain],+ ['from', syntax.keyword],+ [" '@remotion/cli/config'", syntax.string],+ [';', syntax.punct],+ ],+ [],+ [+ ['Config', syntax.plain],+ ['.', syntax.punct],+ ['setRspack', syntax.fn],+ ['(', syntax.punct],+ ['true', syntax.number],+ [');', syntax.punct],+ ],+ ]}+ />+ </Window>+ </Pop>+ <div style={{display: 'flex', gap: 18}}>+ <Pop delay={86} from="up">+ <Chip background={colors.ink} color={colors.paper}>+ Rspack experiment+ </Chip>+ </Pop>+ <Pop delay={126} from="up">+ <Chip+ background={accents.bundling}+ icon={<BoltIcon size={34} color={colors.ink} />}+ >+ One purpose: speed+ </Chip>+ </Pop>+ </div>+ </Panel>+);++const FasterSlam: React.FC = () => {+ const frame = useCurrentFrame();+ const p = pop(frame, 12, 8);+ return (+ <AbsoluteFill>+ <SpeedLines color="rgba(255,196,0,0.9)" />+ <div+ style={{+ position: 'absolute',+ left: 90,+ top: 300,+ display: 'flex',+ alignItems: 'center',+ gap: 20,+ padding: '20px 44px 26px 30px',+ borderRadius: 40,+ backgroundColor: accents.bundling,+ opacity: Math.min(1, p * 2),+ scale: 0.3 + 0.7 * p,+ rotate: `${-6 + (1 - p) * -20}deg`,+ boxShadow: '0 30px 80px rgba(0,0,0,0.4)',+ }}+ >+ <BoltIcon size={120} color={colors.ink} strokeWidth={2.6} />+ <div+ style={{+ fontFamily: display,+ fontWeight: 700,+ fontSize: 150,+ lineHeight: 1,+ letterSpacing: '-0.04em',+ color: colors.ink,+ }}+ >+ Faster+ </div>+ </div>+ </AbsoluteFill>+ );+};++const Race: React.FC = () => {+ const frame = useCurrentFrame();+ // Sequence starts at scene frame 245; "twice as fast" is at local 100.+ const rspack = interpolate(frame, [14, 58], [0, 1], {+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ easing: easeInOut,+ });+ const webpack = interpolate(frame, [14, 102], [0, 1], {+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ easing: easeInOut,+ });+ const twice = pop(frame, 100, 8);+ const rows = [+ {label: 'webpack', value: webpack, color: '#8DA2C0'},+ {label: 'Rspack', value: rspack, color: accents.bundling},+ ];+ return (+ <Panel style={{gap: 34}}>+ <Pop from="up">+ <div+ style={{+ fontFamily: display,+ fontWeight: 700,+ fontSize: 60,+ letterSpacing: '-0.03em',+ color: colors.ink,+ }}+ >+ Bundling stage+ </div>+ </Pop>+ <div+ style={{+ width: 800,+ borderRadius: 34,+ backgroundColor: colors.paper,+ padding: '40px 40px',+ boxSizing: 'border-box',+ boxShadow: '0 24px 60px rgba(10,16,32,0.16)',+ display: 'flex',+ flexDirection: 'column',+ gap: 34,+ }}+ >+ {rows.map((row) => (+ <div key={row.label}>+ <div+ style={{+ display: 'flex',+ justifyContent: 'space-between',+ fontFamily: mono,+ fontWeight: 600,+ fontSize: 32,+ color: colors.ink,+ marginBottom: 12,+ }}+ >+ <span>{row.label}</span>+ <span+ style={{color: row.value >= 1 ? colors.success : colors.muted}}+ >+ {row.value >= 1+ ? '✓ bundled'+ : `${Math.round(row.value * 100)}%`}+ </span>+ </div>+ <div+ style={{+ height: 34,+ borderRadius: 17,+ backgroundColor: colors.mist,+ overflow: 'hidden',+ }}+ >+ <div+ style={{+ height: '100%',+ width: `${row.value * 100}%`,+ borderRadius: 17,+ backgroundColor: row.color,+ }}+ />+ </div>+ </div>+ ))}+ </div>+ <div+ style={{+ fontFamily: display,+ fontWeight: 700,+ fontSize: 170,+ lineHeight: 1,+ letterSpacing: '-0.05em',+ color: colors.ink,+ opacity: Math.min(1, twice * 2),+ scale: 0.3 + 0.7 * twice,+ textShadow: `0 10px 0 ${accents.bundling}`,+ }}+ >+ up to 2×+ </div>+ </Panel>+ );+};++const FastRefresh: React.FC = () => {+ const frame = useCurrentFrame();+ // Sequence starts at scene frame 384; "reflected on the canvas" is at local 90.+ const edit = interpolate(frame, [70, 86], [0, 1], {+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ });+ const color = interpolateColors(edit, [0, 1], [colors.blue, accents.agents]);+ const flash = interpolate(frame, [88, 92, 110], [0, 1, 0], {+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ });+ const hex = edit < 0.5 ? '#0B84F3' : '#FF5A36';+ return (+ <Panel style={{gap: 24}}>+ <Pop from="up" delay={2}>+ <Window title="MyVideo.tsx" width={820} fontSize={30}>+ <div>+ <span style={{color: syntax.punct}}>{'<'}</span>+ <span style={{color: syntax.tag}}>AbsoluteFill</span>+ </div>+ <div+ style={{+ margin: '0 -32px',+ padding: '0 32px',+ backgroundColor: `rgba(255,196,0,${0.22 * rise(frame, 66, 8)})`,+ }}+ >+ <span style={{color: syntax.attr}}>{' style'}</span>+ <span style={{color: syntax.punct}}>{'={{backgroundColor: '}</span>+ <span style={{color: syntax.string}}>{`"${hex}"`}</span>+ <span style={{color: syntax.punct}}>{'}}'}</span>+ </div>+ <div style={{color: syntax.punct}}>{'/>'}</div>+ </Window>+ </Pop>+ <Pop from="up" delay={10}>+ <div+ style={{+ width: 820,+ height: 380,+ borderRadius: 30,+ backgroundColor: '#1F2126',+ padding: 26,+ boxSizing: 'border-box',+ position: 'relative',+ boxShadow: '0 24px 60px rgba(10,16,32,0.3)',+ }}+ >+ <Label color="#8A8F98" style={{fontSize: 22}}>+ Canvas+ </Label>+ <div+ style={{+ marginTop: 14,+ height: 280,+ borderRadius: 18,+ backgroundColor: color,+ display: 'flex',+ alignItems: 'center',+ justifyContent: 'center',+ boxShadow: `0 0 ${80 * flash}px ${accents.bundling}`,+ }}+ >+ <BoltIcon+ size={120}+ color={`rgba(255,255,255,${0.35 + 0.65 * flash})`}+ />+ </div>+ </div>+ </Pop>+ <Pop delay={124} from="up">+ <Chip+ background={accents.bundling}+ icon={<BoltIcon size={34} color={colors.ink} />}+ >+ Changes show up much faster+ </Chip>+ </Pop>+ </Panel>+ );+};++const Roadmap: React.FC = () => {+ const frame = useCurrentFrame();+ // Sequence starts at scene frame 548; "default" is at local 77.+ const line = interpolate(frame, [50, 80], [0, 1], {+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ easing: easeInOut,+ });+ const steps = [+ {title: 'Today', body: 'Opt in', delay: 36, color: accents.bundling},+ {+ title: 'Future version',+ body: 'On by default',+ delay: 76,+ color: colors.blue,+ },+ ];+ return (+ <Panel style={{gap: 0}}>+ <div style={{position: 'relative', width: 760, height: 520}}>+ <div+ style={{+ position: 'absolute',+ left: 58,+ top: 110,+ width: 8,+ height: 300 * line,+ borderRadius: 4,+ backgroundColor: colors.line,+ }}+ />+ {steps.map((s, i) => {+ const p = pop(frame, s.delay, 11);+ return (+ <div+ key={s.title}+ style={{+ position: 'absolute',+ left: 0,+ top: i * 300,+ display: 'flex',+ alignItems: 'center',+ gap: 30,+ opacity: Math.min(1, p * 2),+ translate: `${(1 - p) * -40}px 0px`,+ }}+ >+ <div+ style={{+ width: 124,+ height: 124,+ borderRadius: 62,+ backgroundColor: s.color,+ display: 'flex',+ alignItems: 'center',+ justifyContent: 'center',+ boxShadow: '0 18px 40px rgba(10,16,32,0.2)',+ scale: 0.6 + 0.4 * p,+ }}+ >+ <BoltIcon+ size={62}+ color={i === 0 ? colors.ink : colors.paper}+ />+ </div>+ <div+ style={{+ backgroundColor: colors.paper,+ borderRadius: 30,+ padding: '24px 34px',+ boxShadow: '0 18px 44px rgba(10,16,32,0.14)',+ }}+ >+ <Label>{s.title}</Label>+ <div+ style={{+ fontFamily: display,+ fontWeight: 700,+ fontSize: 58,+ letterSpacing: '-0.02em',+ color: colors.ink,+ }}+ >+ {s.body}+ </div>+ </div>+ </div>+ );+ })}+ </div>+ </Panel>+ );+};++export const BundlingScene: React.FC = () => {+ const frame = useCurrentFrame();+ const captions = getCaptionPlacement(frame, layout);++ return (+ <AbsoluteFill>+ <Backdrop accent={accents.bundling} />+ <Stage keyframes={layout}>+ <Series>+ <Series.Sequence+ name="Faster bundling"+ durationInFrames={42}+ premountFor={30}+ >+ <Punch zoom={1}>+ <Video+ src={+ 'https://remotion.media/announcements/whats-new-in-remotion/cursor/footage/whats8.mp4'+ }+ trimBefore={78}+ />+ </Punch>+ </Series.Sequence>+ <Series.Sequence+ name="Rspack experiment"+ durationInFrames={158}+ premountFor={30}+ >+ <Punch zoom={1.12}>+ <Video+ src={+ 'https://remotion.media/announcements/whats-new-in-remotion/cursor/footage/whats8.mp4'+ }+ trimBefore={137}+ />+ </Punch>+ </Series.Sequence>+ <Series.Sequence+ name="To make things faster"+ durationInFrames={43}+ premountFor={30}+ >+ <Punch zoom={1.34}>+ <Video+ src={+ 'https://remotion.media/announcements/whats-new-in-remotion/cursor/footage/whats8.mp4'+ }+ trimBefore={304}+ />+ </Punch>+ </Series.Sequence>+ <Series.Sequence+ name="Twice as fast"+ durationInFrames={139}+ premountFor={30}+ >+ <Punch zoom={1.02}>+ <Video+ src={+ 'https://remotion.media/announcements/whats-new-in-remotion/cursor/footage/whats8.mp4'+ }+ trimBefore={363}+ />+ </Punch>+ </Series.Sequence>+ <Series.Sequence+ name="Canvas updates"+ durationInFrames={166}+ premountFor={30}+ >+ <Punch zoom={1.16}>+ <Video+ src={+ 'https://remotion.media/announcements/whats-new-in-remotion/cursor/footage/whats8.mp4'+ }+ trimBefore={514}+ />+ </Punch>+ </Series.Sequence>+ <Series.Sequence+ name="Opt in today"+ durationInFrames={172}+ premountFor={30}+ >+ <Punch zoom={1.02}>+ <Video+ src={+ 'https://remotion.media/announcements/whats-new-in-remotion/cursor/footage/whats8.mp4'+ }+ trimBefore={699}+ />+ </Punch>+ </Series.Sequence>+ </Series>+ </Stage>++ <Sequence name="Chapter sticker" from={2} durationInFrames={46}>+ <ChapterSticker+ index="07"+ title="Faster bundling"+ accent={accents.bundling}+ accentText={colors.ink}+ />+ </Sequence>+ <Sequence name="Rspack config" from={48} durationInFrames={152}>+ <RspackConfig />+ </Sequence>+ <Sequence name="Faster slam" from={200} durationInFrames={43}>+ <FasterSlam />+ </Sequence>+ <Sequence name="Race" from={245} durationInFrames={139}>+ <Race />+ </Sequence>+ <Sequence name="Fast refresh" from={384} durationInFrames={164}>+ <FastRefresh />+ </Sequence>+ <Sequence name="Roadmap" from={548} durationInFrames={172}>+ <Roadmap />+ </Sequence>++ <PunchyCaptions+ width={captions.width}+ fontSize={captions.fontSize}+ style={captions.style}+ keywords={['rspack', 'faster.', 'twice', 'fast', 'default']}+ captions={[+ // @captions whats8+ {+ text: 'Faster',+ startMs: 134,+ endMs: 394,+ timestampMs: 264,+ confidence: null,+ },+ {+ text: ' bundling.',+ startMs: 394,+ endMs: 1250,+ timestampMs: 822,+ confidence: null,+ pageBreakAfter: true,+ },+ {+ text: ' You',+ startMs: 1478,+ endMs: 1651,+ timestampMs: 1565,+ confidence: null,+ },+ {+ text: ' can',+ startMs: 1651,+ endMs: 1862,+ timestampMs: 1757,+ confidence: null,+ },+ {+ text: ' now',+ startMs: 1862,+ endMs: 2111,+ timestampMs: 1987,+ confidence: null,+ },+ {+ text: ' opt',+ startMs: 2111,+ endMs: 2399,+ timestampMs: 2255,+ confidence: null,+ },+ {+ text: ' into',+ startMs: 2399,+ endMs: 2629,+ timestampMs: 2514,+ confidence: null,+ },+ {+ text: ' the',+ startMs: 2847,+ endMs: 3229,+ timestampMs: 3038,+ confidence: null,+ },+ {+ text: ' Rspack',+ startMs: 3229,+ endMs: 4378,+ timestampMs: 3804,+ confidence: null,+ },+ {+ text: ' experiment',+ startMs: 4378,+ endMs: 4870,+ timestampMs: 4624,+ confidence: null,+ },+ {+ text: ' which',+ startMs: 4870,+ endMs: 5125,+ timestampMs: 4998,+ confidence: null,+ },+ {+ text: ' just',+ startMs: 5125,+ endMs: 5326,+ timestampMs: 5226,+ confidence: null,+ },+ {+ text: ' has',+ startMs: 5326,+ endMs: 5690,+ timestampMs: 5508,+ confidence: null,+ },+ {+ text: ' one',+ startMs: 5690,+ endMs: 6128,+ timestampMs: 5909,+ confidence: null,+ },+ {+ text: ' purpose.',+ startMs: 6128,+ endMs: 6492,+ timestampMs: 6310,+ confidence: null,+ pageBreakAfter: true,+ },+ {+ text: ' To',+ startMs: 6734,+ endMs: 6909,+ timestampMs: 6822,+ confidence: null,+ },+ {+ text: ' make',+ startMs: 6909,+ endMs: 7112,+ timestampMs: 7011,+ confidence: null,+ },+ {+ text: ' things',+ startMs: 7112,+ endMs: 7476,+ timestampMs: 7294,+ confidence: null,+ },+ {+ text: ' faster.',+ startMs: 7476,+ endMs: 7936,+ timestampMs: 7706,+ confidence: null,+ pageBreakAfter: true,+ },+ {+ text: ' When',+ startMs: 8182,+ endMs: 8563,+ timestampMs: 8373,+ confidence: null,+ },+ {+ text: ' rendering',+ startMs: 8563,+ endMs: 8867,+ timestampMs: 8715,+ confidence: null,+ },+ {+ text: ' the',+ startMs: 8867,+ endMs: 9229,+ timestampMs: 9048,+ confidence: null,+ },+ {+ text: ' video',+ startMs: 9229,+ endMs: 9610,+ timestampMs: 9420,+ confidence: null,+ },+ {+ text: ' the',+ startMs: 9610,+ endMs: 9801,+ timestampMs: 9706,+ confidence: null,+ },+ {+ text: ' bundling',+ startMs: 9801,+ endMs: 10334,+ timestampMs: 10068,+ confidence: null,+ },+ {+ text: ' stage',+ startMs: 10334,+ endMs: 10620,+ timestampMs: 10477,+ confidence: null,+ },+ {+ text: ' is',+ startMs: 10620,+ endMs: 10830,+ timestampMs: 10725,+ confidence: null,+ },+ {+ text: ' up',+ startMs: 10830,+ endMs: 11115,+ timestampMs: 10973,+ confidence: null,+ },+ {+ text: ' to',+ startMs: 11115,+ endMs: 11496,+ timestampMs: 11306,+ confidence: null,+ },+ {+ text: ' twice',+ startMs: 11496,+ endMs: 11877,+ timestampMs: 11687,+ confidence: null,+ },+ {+ text: ' as',+ startMs: 11877,+ endMs: 12335,+ timestampMs: 12106,+ confidence: null,+ },+ {+ text: ' fast',+ startMs: 12335,+ endMs: 12639,+ timestampMs: 12487,+ confidence: null,+ },+ {+ text: ' and',+ startMs: 12811,+ endMs: 13169,+ timestampMs: 12990,+ confidence: null,+ },+ {+ text: ' changes',+ startMs: 13169,+ endMs: 13542,+ timestampMs: 13356,+ confidence: null,+ },+ {+ text: ' made',+ startMs: 13542,+ endMs: 13706,+ timestampMs: 13624,+ confidence: null,+ },+ {+ text: ' to',+ startMs: 13706,+ endMs: 13825,+ timestampMs: 13766,+ confidence: null,+ },+ {+ text: ' your',+ startMs: 13825,+ endMs: 14124,+ timestampMs: 13975,+ confidence: null,+ },+ {+ text: ' code',+ startMs: 14124,+ endMs: 14661,+ timestampMs: 14393,+ confidence: null,+ },+ {+ text: ' will',+ startMs: 15145,+ endMs: 15294,+ timestampMs: 15220,+ confidence: null,+ },+ {+ text: ' be',+ startMs: 15294,+ endMs: 15796,+ timestampMs: 15545,+ confidence: null,+ },+ {+ text: ' reflected',+ startMs: 15796,+ endMs: 16167,+ timestampMs: 15982,+ confidence: null,+ },+ {+ text: ' on',+ startMs: 16167,+ endMs: 16390,+ timestampMs: 16279,+ confidence: null,+ },+ {+ text: ' the',+ startMs: 16390,+ endMs: 16632,+ timestampMs: 16511,+ confidence: null,+ },+ {+ text: ' canvas',+ startMs: 16632,+ endMs: 17115,+ timestampMs: 16874,+ confidence: null,+ },+ {+ text: ' much',+ startMs: 17115,+ endMs: 17617,+ timestampMs: 17366,+ confidence: null,+ },+ {+ text: ' faster.',+ startMs: 17617,+ endMs: 18100,+ timestampMs: 17859,+ confidence: null,+ pageBreakAfter: true,+ },+ {+ text: ' You',+ startMs: 18335,+ endMs: 18520,+ timestampMs: 18428,+ confidence: null,+ },+ {+ text: ' can',+ startMs: 18520,+ endMs: 18705,+ timestampMs: 18613,+ confidence: null,+ },+ {+ text: ' opt',+ startMs: 18705,+ endMs: 19045,+ timestampMs: 18875,+ confidence: null,+ },+ {+ text: ' into',+ startMs: 19045,+ endMs: 19260,+ timestampMs: 19153,+ confidence: null,+ },+ {+ text: ' this',+ startMs: 19260,+ endMs: 19600,+ timestampMs: 19430,+ confidence: null,+ },+ {+ text: ' today',+ startMs: 19615,+ endMs: 19877,+ timestampMs: 19746,+ confidence: null,+ },+ {+ text: ' and',+ startMs: 19877,+ endMs: 19985,+ timestampMs: 19931,+ confidence: null,+ },+ {+ text: ' we',+ startMs: 19985,+ endMs: 20108,+ timestampMs: 20047,+ confidence: null,+ },+ {+ text: ' will',+ startMs: 20108,+ endMs: 20216,+ timestampMs: 20162,+ confidence: null,+ },+ {+ text: ' make',+ startMs: 20247,+ endMs: 20307,+ timestampMs: 20277,+ confidence: null,+ },+ {+ text: ' it',+ startMs: 20386,+ endMs: 20525,+ timestampMs: 20456,+ confidence: null,+ },+ {+ text: ' the',+ startMs: 20525,+ endMs: 20849,+ timestampMs: 20687,+ confidence: null,+ },+ {+ text: ' default',+ startMs: 20849,+ endMs: 21034,+ timestampMs: 20942,+ confidence: null,+ },+ {+ text: ' in',+ startMs: 21034,+ endMs: 21142,+ timestampMs: 21088,+ confidence: null,+ },+ {+ text: ' a',+ startMs: 21142,+ endMs: 21357,+ timestampMs: 21250,+ confidence: null,+ },+ {+ text: ' future',+ startMs: 21357,+ endMs: 21635,+ timestampMs: 21496,+ confidence: null,+ },+ {+ text: ' version',+ startMs: 21635,+ endMs: 21820,+ timestampMs: 21728,+ confidence: null,+ },+ {+ text: ' of',+ startMs: 21820,+ endMs: 21974,+ timestampMs: 21897,+ confidence: null,+ },+ {+ text: ' Remotion.',+ startMs: 21974,+ endMs: 23438,+ timestampMs: 22706,+ confidence: null,+ pageBreakAfter: true,+ },+ ]}+ />++ <Audio+ name="Sticker whoosh"+ src="https://remotion.media/whoosh.wav"+ from={0}+ volume={0.3}+ />+ <Audio+ name="Split whip"+ src="https://remotion.media/whip.wav"+ from={40}+ volume={0.16}+ />+ <Audio+ name="Faster whip"+ src="https://remotion.media/whip.wav"+ from={210}+ volume={0.4}+ />+ <Audio+ name="Race whoosh"+ src="https://remotion.media/whoosh.wav"+ from={258}+ volume={0.24}+ />+ <Audio+ name="Twice ding"+ src="https://remotion.media/ding.wav"+ from={345}+ volume={0.22}+ />+ <Audio+ name="Canvas switch"+ src="https://remotion.media/switch.wav"+ from={472}+ volume={0.26}+ />+ <Audio+ name="Today click"+ src="https://remotion.media/mouse-click.wav"+ from={584}+ volume={0.3}+ />+ <Audio+ name="Default click"+ src="https://remotion.media/mouse-click.wav"+ from={624}+ volume={0.3}+ />+ </AbsoluteFill>+ );+};diff --git a/packages/example/src/WhatsNew/scenes/ClientSide.tsx b/packages/example/src/WhatsNew/scenes/ClientSide.tsxnew file mode 100644index 0000000000..1b1cec07ab--- /dev/null+++ b/packages/example/src/WhatsNew/scenes/ClientSide.tsx@@ -0,0 +1,1135 @@+import {Audio, Video} from '@remotion/media';+import React from 'react';+import {+ AbsoluteFill,+ interpolate,+ Sequence,+ Series,+ useCurrentFrame,+} from 'remotion';+import {pop} from '../anim';+import {Backdrop} from '../components/Background';+import {PunchyCaptions} from '../components/Captions';+import {BrowserIcon, CheckIcon} from '../components/icons';+import {RemotionLogo} from '../components/Logo';+import {+ getCaptionPlacement,+ Punch,+ Stage,+ type LayoutKeyframe,+} from '../components/Stage';+import {+ ChapterSticker,+ CheckBadge,+ Chip,+ Label,+ Panel,+ Pop,+ Stamp,+} from '../components/ui';+import {display, mono} from '../fonts';+import {accents, colors} from '../theme';++const layout: LayoutKeyframe[] = [+ {at: 0, layout: 'full'},+ {at: 98, layout: 'split'},+ {at: 664, layout: 'full'},+];++const BrowserRender: React.FC = () => {+ const frame = useCurrentFrame();+ const progress = interpolate(frame, [40, 190], [0, 1], {+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ });+ const done = progress >= 1;+ const bounce = Math.abs(Math.sin(frame / 9));+ return (+ <Panel style={{gap: 28}}>+ <Pop from="up" delay={4}>+ <div+ style={{+ width: 800,+ borderRadius: 26,+ overflow: 'hidden',+ backgroundColor: colors.paper,+ boxShadow: '0 30px 70px rgba(10,16,32,0.2)',+ }}+ >+ <div+ style={{+ height: 62,+ backgroundColor: '#F1F4F9',+ display: 'flex',+ alignItems: 'center',+ gap: 10,+ padding: '0 22px',+ borderBottom: `1px solid ${colors.line}`,+ }}+ >+ {['#FF5F57', '#FEBC2E', '#28C840'].map((c) => (+ <div+ key={c}+ style={{+ width: 15,+ height: 15,+ borderRadius: 8,+ backgroundColor: c,+ }}+ />+ ))}+ <div+ style={{+ marginLeft: 20,+ flex: 1,+ height: 38,+ borderRadius: 19,+ backgroundColor: colors.paper,+ border: `1px solid ${colors.line}`,+ display: 'flex',+ alignItems: 'center',+ padding: '0 18px',+ fontFamily: mono,+ fontSize: 20,+ color: colors.muted,+ }}+ >+ localhost:3000+ </div>+ </div>+ <div+ style={{+ height: 300,+ background: 'linear-gradient(135deg, #EAF4FF, #F6F0FF)',+ display: 'flex',+ alignItems: 'center',+ justifyContent: 'center',+ position: 'relative',+ }}+ >+ <RemotionLogo+ size={130}+ style={{translate: `0px ${-40 * bounce}px`}}+ />+ <div+ style={{+ position: 'absolute',+ bottom: 40,+ width: 120 - 40 * bounce,+ height: 14,+ borderRadius: 7,+ backgroundColor: 'rgba(11,15,25,0.12)',+ }}+ />+ </div>+ <div style={{padding: '22px 28px 26px'}}>+ <div+ style={{+ display: 'flex',+ justifyContent: 'space-between',+ fontFamily: display,+ fontWeight: 700,+ fontSize: 30,+ color: colors.ink,+ marginBottom: 14,+ }}+ >+ <span>+ {done+ ? 'Rendered in your browser'+ : 'Rendering in your browser…'}+ </span>+ <span+ style={{+ fontFamily: mono,+ color: done ? colors.success : colors.blue,+ }}+ >+ {Math.round(progress * 100)}%+ </span>+ </div>+ <div+ style={{+ height: 16,+ borderRadius: 8,+ backgroundColor: colors.mist,+ overflow: 'hidden',+ }}+ >+ <div+ style={{+ height: '100%',+ width: `${progress * 100}%`,+ borderRadius: 8,+ backgroundColor: done ? colors.success : colors.blue,+ }}+ />+ </div>+ </div>+ </div>+ </Pop>+ <div style={{display: 'flex', gap: 20, alignItems: 'center'}}>+ <Pop delay={82} from="up">+ <Chip icon={<BrowserIcon size={34} color={colors.blue} />}>+ No server needed+ </Chip>+ </Pop>+ <Stamp color={accents.agents} delay={192} rotate={6} fontSize={40}>+ Experimental+ </Stamp>+ </div>+ </Panel>+ );+};++const renders = [+ {name: 'WhatsNew.mp4', start: 12, speed: 40},+ {name: 'Teaser.webm', start: 34, speed: 110},+ {name: 'Voiceover.wav', start: 58, speed: 150},+];++const RenderQueue: React.FC = () => {+ const frame = useCurrentFrame();+ return (+ <Panel>+ <Pop from="up">+ <div+ style={{+ width: 800,+ borderRadius: 28,+ overflow: 'hidden',+ backgroundColor: '#1F2126',+ boxShadow: '0 30px 70px rgba(10,16,32,0.35)',+ }}+ >+ <div+ style={{+ display: 'flex',+ height: 70,+ borderBottom: '1px solid #33363D',+ }}+ >+ {['Inspector', 'Renders'].map((tab) => (+ <div+ key={tab}+ style={{+ flex: 1,+ display: 'flex',+ alignItems: 'center',+ padding: '0 28px',+ fontFamily: display,+ fontWeight: 500,+ fontSize: 28,+ color: tab === 'Renders' ? colors.paper : '#8A8F98',+ borderTop:+ tab === 'Renders'+ ? `4px solid ${colors.blue}`+ : '4px solid transparent',+ backgroundColor: tab === 'Renders' ? '#1F2126' : '#2A2D33',+ }}+ >+ {tab}+ </div>+ ))}+ </div>+ <div+ style={{+ padding: '18px 26px 26px',+ display: 'flex',+ flexDirection: 'column',+ gap: 16,+ }}+ >+ {renders.map((r) => {+ const p = pop(frame, r.start, 12);+ const progress = interpolate(+ frame,+ [r.start + 16, r.start + 16 + r.speed],+ [0, 1],+ {+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ },+ );+ const queued = frame < r.start + 16;+ const done = progress >= 1;+ return (+ <div+ key={r.name}+ style={{+ display: 'flex',+ alignItems: 'center',+ gap: 20,+ padding: '18px 20px',+ borderRadius: 18,+ backgroundColor: '#2A2D33',+ opacity: Math.min(1, p * 2),+ translate: `${(1 - p) * 50}px 0px`,+ }}+ >+ <div style={{flex: 1}}>+ <div+ style={{+ fontFamily: mono,+ fontWeight: 600,+ fontSize: 28,+ color: colors.paper,+ }}+ >+ {r.name}+ </div>+ <div+ style={{+ marginTop: 10,+ height: 10,+ borderRadius: 5,+ backgroundColor: '#3A3E46',+ overflow: 'hidden',+ }}+ >+ <div+ style={{+ height: '100%',+ width: `${progress * 100}%`,+ backgroundColor: done ? colors.success : colors.blue,+ }}+ />+ </div>+ </div>+ <div+ style={{+ width: 130,+ textAlign: 'right',+ fontFamily: mono,+ fontSize: 24,+ color: done+ ? colors.success+ : queued+ ? '#8A8F98'+ : colors.paper,+ }}+ >+ {done+ ? '✓ Done'+ : queued+ ? 'Queued'+ : `${Math.round(progress * 100)}%`}+ </div>+ </div>+ );+ })}+ </div>+ </div>+ </Pop>+ <Pop delay={100} from="up">+ <Chip+ icon={<CheckIcon size={34} color={colors.success} strokeWidth={3} />}+ >+ Queue & track in the Studio+ </Chip>+ </Pop>+ </Panel>+ );+};++const FormatChip: React.FC<{+ readonly label: string;+ readonly isNew: boolean;+ readonly delay: number;+ readonly audio?: boolean;+}> = ({label, isNew, delay, audio}) => {+ const frame = useCurrentFrame();+ const p = pop(frame, delay, 11);+ return (+ <div+ style={{+ width: 180,+ height: 120,+ borderRadius: 24,+ backgroundColor: isNew+ ? audio+ ? accents.soundEffects+ : colors.blue+ : colors.paper,+ color: isNew ? colors.paper : colors.muted,+ display: 'flex',+ flexDirection: 'column',+ alignItems: 'center',+ justifyContent: 'center',+ fontFamily: display,+ fontWeight: 700,+ fontSize: 40,+ boxShadow: isNew+ ? '0 18px 40px rgba(11,132,243,0.3)'+ : '0 10px 24px rgba(10,16,32,0.1)',+ opacity: Math.min(1, p * 2),+ scale: 0.6 + 0.4 * p,+ position: 'relative',+ }}+ >+ .{label.toLowerCase()}+ {isNew ? (+ <div+ style={{+ position: 'absolute',+ top: -14,+ right: -10,+ backgroundColor: colors.ink,+ color: colors.paper,+ fontSize: 18,+ letterSpacing: '0.1em',+ padding: '5px 10px',+ borderRadius: 8,+ }}+ >+ NEW+ </div>+ ) : null}+ </div>+ );+};++const Formats: React.FC = () => (+ <Panel style={{gap: 26}}>+ <Pop from="up">+ <div+ style={{+ fontFamily: display,+ fontWeight: 700,+ fontSize: 60,+ letterSpacing: '-0.03em',+ color: colors.ink,+ }}+ >+ New export formats+ </div>+ </Pop>+ <Label style={{alignSelf: 'flex-start', marginLeft: 22}}>Video</Label>+ <div style={{display: 'flex', gap: 18}}>+ <FormatChip label="MP4" isNew={false} delay={6} />+ <FormatChip label="WebM" isNew={false} delay={10} />+ <FormatChip label="MKV" isNew delay={60} />+ <FormatChip label="MOV" isNew delay={66} />+ </div>+ <Label style={{alignSelf: 'flex-start', marginLeft: 22, opacity: 1}}>+ Audio only+ </Label>+ <div style={{display: 'flex', gap: 18}}>+ <FormatChip label="WAV" isNew audio delay={138} />+ <FormatChip label="MP3" isNew audio delay={144} />+ <FormatChip label="AAC" isNew audio delay={150} />+ <FormatChip label="OGG" isNew audio delay={156} />+ </div>+ </Panel>+);++// Each property is rendered using the property it names.+const cssProperties: {label: string; style: React.CSSProperties}[] = [+ {+ label: 'text-shadow',+ style: {textShadow: '0 6px 0 #0B84F3, 0 12px 20px rgba(11,132,243,0.4)'},+ },+ {+ label: '-webkit-text-stroke',+ style: {WebkitTextStroke: '3px #0B0F19', color: '#FFFFFF'},+ },+ {+ label: 'paint-order',+ style: {+ WebkitTextStroke: '8px #0B84F3',+ paintOrder: 'stroke fill',+ color: '#FFFFFF',+ },+ },+ {label: 'font-style', style: {fontStyle: 'italic'}},+ {+ label: 'filter',+ style: {filter: 'hue-rotate(160deg) saturate(2)', color: '#FF5A36'},+ },+];++const CssProperties: React.FC = () => {+ const frame = useCurrentFrame();+ return (+ <div+ style={{+ position: 'absolute',+ right: 70,+ top: 150,+ display: 'flex',+ flexDirection: 'column',+ alignItems: 'flex-end',+ gap: 18,+ }}+ >+ <Pop from="right">+ <Label+ color={colors.paper}+ style={{textShadow: '0 2px 10px rgba(0,0,0,0.5)'}}+ >+ Newly supported CSS+ </Label>+ </Pop>+ {cssProperties.map((prop, i) => {+ const p = pop(frame, 8 + i * 12, 11);+ const checkAt = 118 + i * 3;+ return (+ <div+ key={prop.label}+ style={{+ display: 'flex',+ alignItems: 'center',+ gap: 16,+ padding: '16px 26px 18px',+ borderRadius: 24,+ backgroundColor: colors.paper,+ boxShadow: '0 18px 40px rgba(10,16,32,0.3)',+ opacity: Math.min(1, p * 2),+ translate: `${(1 - p) * -260}px ${(1 - p) * 40}px`,+ scale: 0.6 + 0.4 * p,+ transformOrigin: '100% 50%',+ }}+ >+ <div+ style={{+ fontFamily: mono,+ fontWeight: 600,+ fontSize: 38,+ color: colors.ink,+ ...prop.style,+ }}+ >+ {prop.label}+ </div>+ {frame >= checkAt ? <CheckBadge delay={checkAt} size={48} /> : null}+ </div>+ );+ })}+ </div>+ );+};++export const ClientSideScene: React.FC = () => {+ const frame = useCurrentFrame();+ const captions = getCaptionPlacement(frame, layout);++ return (+ <AbsoluteFill>+ <Backdrop accent={accents.clientSide} />+ <Stage keyframes={layout}>+ <Series>+ <Series.Sequence+ name="Client-side rendering"+ durationInFrames={71}+ premountFor={30}+ >+ <Punch zoom={1}>+ <Video+ src={+ 'https://remotion.media/announcements/whats-new-in-remotion/cursor/footage/whats6.mp4'+ }+ trimBefore={65}+ />+ </Punch>+ </Series.Sequence>+ <Series.Sequence+ name="In the browser"+ durationInFrames={258}+ premountFor={30}+ >+ <Punch zoom={1.14}>+ <Video+ src={+ 'https://remotion.media/announcements/whats-new-in-remotion/cursor/footage/whats6.mp4'+ }+ trimBefore={160}+ />+ </Punch>+ </Series.Sequence>+ <Series.Sequence+ name="Render queue"+ durationInFrames={160}+ premountFor={30}+ >+ <Punch zoom={1.02}>+ <Video+ src={+ 'https://remotion.media/announcements/whats-new-in-remotion/cursor/footage/whats6.mp4'+ }+ trimBefore={429}+ />+ </Punch>+ </Series.Sequence>+ <Series.Sequence+ name="New formats"+ durationInFrames={107}+ premountFor={30}+ >+ <Punch zoom={1.16}>+ <Video+ src={+ 'https://remotion.media/announcements/whats-new-in-remotion/cursor/footage/whats6.mp4'+ }+ trimBefore={600}+ />+ </Punch>+ </Series.Sequence>+ <Series.Sequence+ name="Audio formats"+ durationInFrames={71}+ premountFor={30}+ >+ <Punch zoom={1.04}>+ <Video+ src={+ 'https://remotion.media/announcements/whats-new-in-remotion/cursor/footage/whats6.mp4'+ }+ trimBefore={718}+ />+ </Punch>+ </Series.Sequence>+ <Series.Sequence+ name="CSS properties"+ durationInFrames={165}+ premountFor={30}+ >+ <Punch zoom={1}>+ <Video+ src={+ 'https://remotion.media/announcements/whats-new-in-remotion/cursor/footage/whats6.mp4'+ }+ trimBefore={800}+ />+ </Punch>+ </Series.Sequence>+ </Series>+ </Stage>++ <Sequence name="Chapter sticker" from={3} durationInFrames={98}>+ <ChapterSticker+ index="05"+ title="Client-side rendering"+ accent={accents.clientSide}+ />+ </Sequence>+ <Sequence name="Browser render" from={104} durationInFrames={225}>+ <BrowserRender />+ </Sequence>+ <Sequence name="Render queue" from={329} durationInFrames={160}>+ <RenderQueue />+ </Sequence>+ <Sequence name="Formats" from={489} durationInFrames={178}>+ <Formats />+ </Sequence>+ <Sequence name="CSS properties" from={684} durationInFrames={148}>+ <CssProperties />+ </Sequence>++ <PunchyCaptions+ width={captions.width}+ fontSize={captions.fontSize}+ style={captions.style}+ keywords={[+ 'browser',+ 'experimental',+ 'queue',+ 'multiple',+ 'formats,',+ 'audio',+ 'css',+ ]}+ captions={[+ // @captions whats6+ {+ text: 'Client-side',+ startMs: 151,+ endMs: 945,+ timestampMs: 548,+ confidence: null,+ },+ {+ text: ' rendering',+ startMs: 945,+ endMs: 1415,+ timestampMs: 1180,+ confidence: null,+ },+ {+ text: ' progress.',+ startMs: 1415,+ endMs: 2209,+ timestampMs: 1812,+ confidence: null,+ pageBreakAfter: true,+ },+ {+ text: ' We',+ startMs: 2436,+ endMs: 2546,+ timestampMs: 2491,+ confidence: null,+ },+ {+ text: ' are',+ startMs: 2546,+ endMs: 2751,+ timestampMs: 2649,+ confidence: null,+ },+ {+ text: ' trying',+ startMs: 2751,+ endMs: 2909,+ timestampMs: 2830,+ confidence: null,+ },+ {+ text: ' to',+ startMs: 2909,+ endMs: 3035,+ timestampMs: 2972,+ confidence: null,+ },+ {+ text: ' make',+ startMs: 3035,+ endMs: 3177,+ timestampMs: 3106,+ confidence: null,+ },+ {+ text: ' it',+ startMs: 3177,+ endMs: 3461,+ timestampMs: 3319,+ confidence: null,+ },+ {+ text: ' possible',+ startMs: 3461,+ endMs: 3697,+ timestampMs: 3579,+ confidence: null,+ },+ {+ text: ' to',+ startMs: 3697,+ endMs: 3981,+ timestampMs: 3839,+ confidence: null,+ },+ {+ text: ' render',+ startMs: 3981,+ endMs: 4454,+ timestampMs: 4218,+ confidence: null,+ },+ {+ text: ' videos',+ startMs: 4454,+ endMs: 5053,+ timestampMs: 4754,+ confidence: null,+ },+ {+ text: ' purely',+ startMs: 5344,+ endMs: 5404,+ timestampMs: 5374,+ confidence: null,+ },+ {+ text: ' in',+ startMs: 5720,+ endMs: 5898,+ timestampMs: 5809,+ confidence: null,+ },+ {+ text: ' the',+ startMs: 5898,+ endMs: 6194,+ timestampMs: 6046,+ confidence: null,+ },+ {+ text: ' browser',+ startMs: 6194,+ endMs: 6650,+ timestampMs: 6422,+ confidence: null,+ },+ {+ text: ' and',+ startMs: 6650,+ endMs: 6808,+ timestampMs: 6729,+ confidence: null,+ },+ {+ text: " we've",+ startMs: 6808,+ endMs: 7065,+ timestampMs: 6937,+ confidence: null,+ },+ {+ text: ' made',+ startMs: 7065,+ endMs: 7224,+ timestampMs: 7145,+ confidence: null,+ },+ {+ text: ' some',+ startMs: 7224,+ endMs: 7441,+ timestampMs: 7333,+ confidence: null,+ },+ {+ text: ' good',+ startMs: 7441,+ endMs: 7956,+ timestampMs: 7699,+ confidence: null,+ },+ {+ text: ' progress',+ startMs: 7956,+ endMs: 8530,+ timestampMs: 8243,+ confidence: null,+ },+ {+ text: ' with',+ startMs: 8910,+ endMs: 9143,+ timestampMs: 9027,+ confidence: null,+ },+ {+ text: ' this',+ startMs: 9143,+ endMs: 9824,+ timestampMs: 9484,+ confidence: null,+ },+ {+ text: ' experimental',+ startMs: 9824,+ endMs: 10256,+ timestampMs: 10040,+ confidence: null,+ },+ {+ text: ' feature.',+ startMs: 10256,+ endMs: 10805,+ timestampMs: 10531,+ confidence: null,+ pageBreakAfter: true,+ },+ {+ text: ' It',+ startMs: 11063,+ endMs: 11138,+ timestampMs: 11101,+ confidence: null,+ },+ {+ text: ' is',+ startMs: 11138,+ endMs: 11198,+ timestampMs: 11168,+ confidence: null,+ },+ {+ text: ' now',+ startMs: 11346,+ endMs: 11406,+ timestampMs: 11376,+ confidence: null,+ },+ {+ text: ' possible',+ startMs: 11704,+ endMs: 11987,+ timestampMs: 11846,+ confidence: null,+ },+ {+ text: ' to',+ startMs: 11987,+ endMs: 12157,+ timestampMs: 12072,+ confidence: null,+ },+ {+ text: ' queue',+ startMs: 12157,+ endMs: 12383,+ timestampMs: 12270,+ confidence: null,+ },+ {+ text: ' and',+ startMs: 12383,+ endMs: 12742,+ timestampMs: 12563,+ confidence: null,+ },+ {+ text: ' track',+ startMs: 12742,+ endMs: 13459,+ timestampMs: 13101,+ confidence: null,+ },+ {+ text: ' multiple',+ startMs: 13459,+ endMs: 13874,+ timestampMs: 13667,+ confidence: null,+ },+ {+ text: ' renders',+ startMs: 13874,+ endMs: 14345,+ timestampMs: 14110,+ confidence: null,+ },+ {+ text: ' in',+ startMs: 14345,+ endMs: 14553,+ timestampMs: 14449,+ confidence: null,+ },+ {+ text: ' the',+ startMs: 14553,+ endMs: 14779,+ timestampMs: 14666,+ confidence: null,+ },+ {+ text: ' Remotion',+ startMs: 14779,+ endMs: 15704,+ timestampMs: 15242,+ confidence: null,+ },+ {+ text: ' Studio,',+ startMs: 15704,+ endMs: 16194,+ timestampMs: 15949,+ confidence: null,+ pageBreakAfter: true,+ },+ {+ text: ' we',+ startMs: 16372,+ endMs: 16553,+ timestampMs: 16463,+ confidence: null,+ },+ {+ text: ' added',+ startMs: 16553,+ endMs: 16866,+ timestampMs: 16710,+ confidence: null,+ },+ {+ text: ' support',+ startMs: 16916,+ endMs: 16982,+ timestampMs: 16949,+ confidence: null,+ },+ {+ text: ' for',+ startMs: 17080,+ endMs: 17707,+ timestampMs: 17394,+ confidence: null,+ },+ {+ text: ' exporting',+ startMs: 17707,+ endMs: 18119,+ timestampMs: 17913,+ confidence: null,+ },+ {+ text: ' in',+ startMs: 18119,+ endMs: 18399,+ timestampMs: 18259,+ confidence: null,+ },+ {+ text: ' new',+ startMs: 18399,+ endMs: 19025,+ timestampMs: 18712,+ confidence: null,+ },+ {+ text: ' formats,',+ startMs: 19233,+ endMs: 19768,+ timestampMs: 19501,+ confidence: null,+ pageBreakAfter: true,+ },+ {+ text: ' including',+ startMs: 19931,+ endMs: 20347,+ timestampMs: 20139,+ confidence: null,+ },+ {+ text: ' now',+ startMs: 20347,+ endMs: 20895,+ timestampMs: 20621,+ confidence: null,+ },+ {+ text: ' audio',+ startMs: 21109,+ endMs: 22146,+ timestampMs: 21628,+ confidence: null,+ },+ {+ text: ' formats',+ startMs: 22146,+ endMs: 22206,+ timestampMs: 22176,+ confidence: null,+ },+ {+ text: ' and',+ startMs: 22298,+ endMs: 22598,+ timestampMs: 22448,+ confidence: null,+ },+ {+ text: ' also',+ startMs: 22598,+ endMs: 23055,+ timestampMs: 22827,+ confidence: null,+ },+ {+ text: ' these',+ startMs: 23404,+ endMs: 23744,+ timestampMs: 23574,+ confidence: null,+ },+ {+ text: ' new',+ startMs: 23744,+ endMs: 24334,+ timestampMs: 24039,+ confidence: null,+ },+ {+ text: ' CSS',+ startMs: 24334,+ endMs: 24888,+ timestampMs: 24611,+ confidence: null,+ },+ {+ text: ' properties',+ startMs: 24888,+ endMs: 25568,+ timestampMs: 25228,+ confidence: null,+ },+ {+ text: ' are',+ startMs: 26044,+ endMs: 26208,+ timestampMs: 26126,+ confidence: null,+ },+ {+ text: ' now',+ startMs: 26208,+ endMs: 26517,+ timestampMs: 26363,+ confidence: null,+ },+ {+ text: ' supported.',+ startMs: 26726,+ endMs: 27204,+ timestampMs: 26965,+ confidence: null,+ pageBreakAfter: true,+ },+ ]}+ />++ <Audio+ name="Sticker whoosh"+ src="https://remotion.media/whoosh.wav"+ from={1}+ volume={0.3}+ />+ <Audio+ name="Split whip"+ src="https://remotion.media/whip.wav"+ from={96}+ volume={0.16}+ />+ <Audio+ name="Rendered ding"+ src="https://remotion.media/ding.wav"+ from={294}+ volume={0.2}+ />+ <Audio+ name="Queue click"+ src="https://remotion.media/mouse-click.wav"+ from={341}+ volume={0.3}+ />+ <Audio+ name="Formats switch"+ src="https://remotion.media/switch.wav"+ from={549}+ volume={0.22}+ />+ <Audio+ name="Audio formats switch"+ src="https://remotion.media/switch.wav"+ from={627}+ volume={0.22}+ />+ <Audio+ name="CSS whoosh"+ src="https://remotion.media/whoosh.wav"+ from={688}+ volume={0.28}+ />+ <Audio+ name="Supported ding"+ src="https://remotion.media/ding.wav"+ from={802}+ volume={0.2}+ />+ </AbsoluteFill>+ );+};diff --git a/packages/example/src/WhatsNew/scenes/Intro.tsx b/packages/example/src/WhatsNew/scenes/Intro.tsxnew file mode 100644index 0000000000..f7a56774e6--- /dev/null+++ b/packages/example/src/WhatsNew/scenes/Intro.tsx@@ -0,0 +1,456 @@+import {Audio, Video} from '@remotion/media';+import React from 'react';+import {+ AbsoluteFill,+ Easing,+ interpolate,+ Sequence,+ Series,+ useCurrentFrame,+} from 'remotion';+import {easeInOut, pop, rise} from '../anim';+import {Backdrop} from '../components/Background';+import {PunchyCaptions} from '../components/Captions';+import {+ BoltIcon,+ BrowserIcon,+ EyeIcon,+ FileIcon,+ RobotIcon,+ SparkIcon,+ SpeakerIcon,+ TriangleIcon,+} from '../components/icons';+import {RemotionLogo} from '../components/Logo';+import {+ getCaptionPlacement,+ Punch,+ Stage,+ type LayoutKeyframe,+} from '../components/Stage';+import {display} from '../fonts';+import {accents, colors} from '../theme';++const layout: LayoutKeyframe[] = [{at: 0, layout: 'full'}];++const TitleCard: React.FC = () => {+ const frame = useCurrentFrame();+ const p = pop(frame, 0, 11);+ const logoSpin = interpolate(frame, [72, 92], [0, 360], {+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ easing: easeInOut,+ });+ const sub = rise(frame, 60, 16);+ return (+ <div+ style={{+ position: 'absolute',+ left: 70,+ top: 300,+ transformOrigin: '0% 50%',+ opacity: Math.min(1, p * 2),+ scale: 0.45 + 0.55 * p,+ rotate: `${-3 - 7 * (1 - p)}deg`,+ display: 'flex',+ alignItems: 'center',+ gap: 28,+ padding: '28px 46px 32px 30px',+ backgroundColor: colors.paper,+ borderRadius: 40,+ boxShadow: '0 30px 80px rgba(10,16,32,0.35)',+ }}+ >+ <RemotionLogo size={112} style={{rotate: `${logoSpin}deg`}} />+ <div>+ <div+ style={{+ fontFamily: display,+ fontWeight: 700,+ fontSize: 88,+ lineHeight: 0.95,+ letterSpacing: '-0.035em',+ color: colors.ink,+ }}+ >+ What's new+ </div>+ <div+ style={{+ fontFamily: display,+ fontWeight: 700,+ fontSize: 52,+ letterSpacing: '-0.02em',+ color: colors.blue,+ marginTop: 8,+ opacity: sub,+ translate: `${(1 - sub) * -24}px 0px`,+ }}+ >+ in Remotion+ </div>+ </div>+ </div>+ );+};++type Topic = {+ readonly title: string;+ readonly accent: string;+ readonly text: string;+ readonly icon: React.ReactNode;+};++const topics: Topic[] = [+ {+ title: 'Light leaks',+ accent: accents.lightLeaks,+ text: colors.paper,+ icon: <SparkIcon size={64} color={colors.paper} />,+ },+ {+ title: 'Sound effects',+ accent: accents.soundEffects,+ text: colors.paper,+ icon: <SpeakerIcon size={64} color={colors.paper} />,+ },+ {+ title: 'Render on Vercel',+ accent: colors.paper,+ text: colors.ink,+ icon: <TriangleIcon size={58} color={colors.ink} />,+ },+ {+ title: 'New skills',+ accent: accents.skills,+ text: colors.paper,+ icon: <FileIcon size={64} color={colors.paper} />,+ },+ {+ title: 'Client-side rendering',+ accent: accents.clientSide,+ text: colors.paper,+ icon: <BrowserIcon size={64} color={colors.paper} />,+ },+ {+ title: 'Better with agents',+ accent: accents.agents,+ text: colors.paper,+ icon: <RobotIcon size={64} color={colors.paper} />,+ },+ {+ title: 'Faster bundling',+ accent: accents.bundling,+ text: colors.ink,+ icon: <BoltIcon size={64} color={colors.ink} />,+ },+ {+ title: 'Sneak peek',+ accent: '#2A1F4D',+ text: colors.paper,+ icon: <EyeIcon size={64} color={accents.sneakPeek} />,+ },+];++const TILE_W = 390;+const TILE_H = 250;+const GAP = 28;+const GRID_LEFT = (1920 - (TILE_W * 4 + GAP * 3)) / 2;+const GRID_TOP = 356;++// Eight topics slam in on eighth notes, then the board zooms into the first.+const TopicBoard: React.FC = () => {+ const frame = useCurrentFrame();+ const zoom = interpolate(frame, [70, 96], [0, 1], {+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ easing: Easing.bezier(0.76, 0, 0.24, 1),+ });+ const firstCenterX = GRID_LEFT + TILE_W / 2;+ const firstCenterY = GRID_TOP + TILE_H / 2;+ const header = rise(frame, 0, 12);++ return (+ <AbsoluteFill>+ <Backdrop accent={accents.sneakPeek} dark />+ <AbsoluteFill+ style={{+ transformOrigin: `${firstCenterX}px ${firstCenterY}px`,+ scale: 1 + zoom * 5.2,+ translate: `${(960 - firstCenterX) * zoom}px ${(540 - firstCenterY) * zoom}px`,+ }}+ >+ <div+ style={{+ position: 'absolute',+ top: 150,+ width: 1920,+ textAlign: 'center',+ fontFamily: display,+ fontWeight: 700,+ fontSize: 96,+ letterSpacing: '-0.035em',+ color: colors.paper,+ opacity: header * (1 - zoom),+ translate: `0px ${(1 - header) * 30}px`,+ }}+ >+ What's new in <span style={{color: colors.blue}}>Remotion</span>+ </div>+ {topics.map((topic, i) => {+ const col = i % 4;+ const row = Math.floor(i / 4);+ const p = pop(frame, 4 + i * 8, 10);+ return (+ <div+ key={topic.title}+ style={{+ position: 'absolute',+ left: GRID_LEFT + col * (TILE_W + GAP),+ top: GRID_TOP + row * (TILE_H + GAP),+ width: TILE_W,+ height: TILE_H,+ borderRadius: 32,+ backgroundColor: topic.accent,+ color: topic.text,+ padding: '30px 32px',+ boxSizing: 'border-box',+ display: 'flex',+ flexDirection: 'column',+ justifyContent: 'space-between',+ opacity: Math.min(1, p * 2) * (i === 0 ? 1 : 1 - zoom),+ scale: 0.5 + 0.5 * p,+ rotate: `${(1 - p) * (i % 2 === 0 ? -8 : 8)}deg`,+ boxShadow: '0 24px 60px rgba(0,0,0,0.45)',+ }}+ >+ <div+ style={{+ display: 'flex',+ justifyContent: 'space-between',+ alignItems: 'flex-start',+ }}+ >+ {topic.icon}+ <div+ style={{+ fontFamily: display,+ fontWeight: 700,+ fontSize: 34,+ opacity: 0.7,+ }}+ >+ {i === 7 ? '👀' : `0${i + 1}`}+ </div>+ </div>+ <div+ style={{+ fontFamily: display,+ fontWeight: 700,+ fontSize: 44,+ lineHeight: 1.02,+ letterSpacing: '-0.02em',+ }}+ >+ {topic.title}+ </div>+ </div>+ );+ })}+ </AbsoluteFill>+ </AbsoluteFill>+ );+};++export const IntroScene: React.FC = () => {+ const frame = useCurrentFrame();+ const captions = getCaptionPlacement(frame, layout);++ return (+ <AbsoluteFill>+ <Stage keyframes={layout}>+ <Series>+ <Series.Sequence+ name="Opening line"+ durationInFrames={112}+ premountFor={30}+ >+ <Punch zoom={1.1}>+ <Video+ src={+ 'https://remotion.media/announcements/whats-new-in-remotion/cursor/footage/whats1.mp4'+ }+ trimBefore={35}+ />+ </Punch>+ </Series.Sequence>+ </Series>+ </Stage>++ <Sequence name="Title card" from={2} durationInFrames={110}>+ <TitleCard />+ </Sequence>++ <PunchyCaptions+ width={captions.width}+ fontSize={captions.fontSize}+ style={captions.style}+ durationInFrames={112}+ keywords={['improved', 'remotion']}+ captions={[+ // @captions whats1+ {+ text: 'Here',+ startMs: 158,+ endMs: 340,+ timestampMs: 249,+ confidence: null,+ },+ {+ text: ' are',+ startMs: 340,+ endMs: 523,+ timestampMs: 432,+ confidence: null,+ },+ {+ text: ' some',+ startMs: 523,+ endMs: 650,+ timestampMs: 587,+ confidence: null,+ },+ {+ text: ' of',+ startMs: 650,+ endMs: 778,+ timestampMs: 714,+ confidence: null,+ },+ {+ text: ' the',+ startMs: 778,+ endMs: 960,+ timestampMs: 869,+ confidence: null,+ },+ {+ text: ' things',+ startMs: 960,+ endMs: 1142,+ timestampMs: 1051,+ confidence: null,+ },+ {+ text: ' that',+ startMs: 1142,+ endMs: 1288,+ timestampMs: 1215,+ confidence: null,+ },+ {+ text: ' we',+ startMs: 1288,+ endMs: 1707,+ timestampMs: 1498,+ confidence: null,+ },+ {+ text: ' recently',+ startMs: 1707,+ endMs: 2181,+ timestampMs: 1944,+ confidence: null,+ },+ {+ text: ' improved',+ startMs: 2181,+ endMs: 2418,+ timestampMs: 2300,+ confidence: null,+ },+ {+ text: ' in',+ startMs: 2418,+ endMs: 2637,+ timestampMs: 2528,+ confidence: null,+ },+ {+ text: ' Remotion.',+ startMs: 2637,+ endMs: 3402,+ timestampMs: 3020,+ confidence: null,+ pageBreakAfter: true,+ },+ ]}+ />++ <Sequence name="Topic board" from={112} durationInFrames={96}>+ <TopicBoard />+ </Sequence>++ <Audio+ name="Title whoosh"+ src="https://remotion.media/whoosh.wav"+ from={0}+ volume={0.3}+ />+ <Audio+ name="Tile 1"+ src="https://remotion.media/switch.wav"+ from={116}+ volume={0.2}+ />+ <Audio+ name="Tile 2"+ src="https://remotion.media/switch.wav"+ from={124}+ volume={0.2}+ />+ <Audio+ name="Tile 3"+ src="https://remotion.media/switch.wav"+ from={132}+ volume={0.2}+ />+ <Audio+ name="Tile 4"+ src="https://remotion.media/switch.wav"+ from={140}+ volume={0.2}+ />+ <Audio+ name="Tile 5"+ src="https://remotion.media/switch.wav"+ from={148}+ volume={0.2}+ />+ <Audio+ name="Tile 6"+ src="https://remotion.media/switch.wav"+ from={156}+ volume={0.2}+ />+ <Audio+ name="Tile 7"+ src="https://remotion.media/switch.wav"+ from={164}+ volume={0.2}+ />+ <Audio+ name="Tile 8"+ src="https://remotion.media/switch.wav"+ from={172}+ volume={0.2}+ />+ <Audio+ name="Zoom whoosh"+ src="https://remotion.media/whoosh.wav"+ from={180}+ volume={0.34}+ />+ </AbsoluteFill>+ );+};diff --git a/packages/example/src/WhatsNew/scenes/LightLeaks.tsx b/packages/example/src/WhatsNew/scenes/LightLeaks.tsxnew file mode 100644index 0000000000..cb58cd30ff--- /dev/null+++ b/packages/example/src/WhatsNew/scenes/LightLeaks.tsx@@ -0,0 +1,943 @@+import {lightLeak} from '@remotion/effects/light-leak';+import {Audio, Video} from '@remotion/media';+import React from 'react';+import {+ AbsoluteFill,+ interpolate,+ Sequence,+ Series,+ Solid,+ useCurrentFrame,+} from 'remotion';+import {pop, rise} from '../anim';+import {Backdrop} from '../components/Background';+import {PunchyCaptions} from '../components/Captions';+import {FileIcon, SparkIcon} from '../components/icons';+import {LightLeakFx} from '../components/LightLeakFx';+import {+ getCaptionPlacement,+ Punch,+ Stage,+ type LayoutKeyframe,+} from '../components/Stage';+import {+ ChapterSticker,+ Chip,+ CodeLines,+ Label,+ Panel,+ Pop,+ syntax,+ Window,+} from '../components/ui';+import {leakGrid} from '../effects/leak-grid';+import {display, mono} from '../fonts';+import {accents, colors} from '../theme';++const layout: LayoutKeyframe[] = [+ {at: 0, layout: 'full'},+ {at: 132, layout: 'split'},+];++const LeakTile: React.FC<{+ readonly seed: number;+ readonly width: number;+ readonly height: number;+ readonly hueShift: number;+ readonly progress: number;+}> = ({seed, width, height, hueShift, progress}) => (+ <div+ style={{+ width,+ height,+ borderRadius: 20,+ overflow: 'hidden',+ backgroundColor: '#140F0B',+ boxShadow: '0 14px 34px rgba(10,16,32,0.22)',+ }}+ >+ <Solid+ width={width}+ height={height}+ effects={[lightLeak({seed, hueShift, progress})]}+ />+ </div>+);++const NativeComponent: React.FC = () => {+ const frame = useCurrentFrame();+ return (+ <Panel>+ <Pop from="up">+ <LeakTile+ seed={3}+ width={800}+ height={300}+ hueShift={20}+ progress={interpolate(frame, [0, 90], [0.15, 0.7])}+ />+ </Pop>+ <Pop from="up" delay={6}>+ <Window title="MyVideo.tsx" width={800} fontSize={30}>+ <CodeLines+ start={10}+ speed={1.6}+ lines={[+ [+ ['<', syntax.punct],+ ['Solid', syntax.tag],+ ],+ [+ [' effects', syntax.attr],+ ['={[', syntax.punct],+ ],+ [+ [' lightLeak', syntax.fn],+ ['({', syntax.punct],+ [' seed', syntax.plain],+ [': ', syntax.punct],+ ['3', syntax.number],+ [', ', syntax.punct],+ ['hueShift', syntax.plain],+ [': ', syntax.punct],+ ['20', syntax.number],+ [' })', syntax.punct],+ ],+ [[' ]}', syntax.punct]],+ [['/>', syntax.punct]],+ ]}+ />+ </Window>+ </Pop>+ </Panel>+ );+};++const Variations: React.FC = () => {+ const frame = useCurrentFrame();+ // Word timings relative to this sequence (starts at scene frame 226).+ const hueShift = interpolate(frame, [150, 222], [0, 360], {+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ });+ const seedCounter = Math.floor(+ interpolate(frame, [80, 124], [8, 9999], {+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ }),+ );+ const hueBar = rise(frame, 140, 14);++ return (+ <Panel style={{gap: 26}}>+ <Solid+ width={838}+ height={586}+ style={{margin: '-20px 0'}}+ effects={[+ leakGrid({+ seed: 1,+ seedOffset: frame > 80 && frame < 124 ? frame : 0,+ hueShift,+ hueSpread: 40 * (hueShift / 360),+ progress: 0.45,+ progressWobble: 0.18,+ phase: frame / 14,+ appear: new Array(9).fill(0).map((_, i) => pop(frame, 14 + i * 4)),+ }),+ ]}+ />+ <div style={{display: 'flex', gap: 18, alignItems: 'center'}}>+ <Pop delay={40}>+ <Chip+ fontSize={30}+ background={colors.ink}+ color={colors.paper}+ icon={<SparkIcon size={32} color={accents.lightLeaks} />}+ >+ Procedurally generated+ </Chip>+ </Pop>+ <Pop delay={72}>+ <Chip fontSize={30} style={{fontFamily: mono, fontWeight: 600}}>+ seed: {frame < 80 ? 8 : seedCounter}+ {frame >= 124 ? '…∞' : ''}+ </Chip>+ </Pop>+ </div>+ <div+ style={{+ width: 790,+ opacity: hueBar,+ translate: `0px ${(1 - hueBar) * 20}px`,+ }}+ >+ <div+ style={{+ height: 22,+ borderRadius: 11,+ background:+ 'linear-gradient(90deg, #ff8a00, #ffe600, #37ff5b, #00e5ff, #3a6bff, #c63bff, #ff3b8d, #ff8a00)',+ position: 'relative',+ }}+ >+ <div+ style={{+ position: 'absolute',+ left: (hueShift / 360) * 790 - 20,+ top: -9,+ width: 40,+ height: 40,+ borderRadius: 20,+ backgroundColor: colors.paper,+ boxShadow: '0 6px 16px rgba(0,0,0,0.3)',+ }}+ />+ </div>+ <div+ style={{+ marginTop: 20,+ fontFamily: mono,+ fontWeight: 600,+ fontSize: 30,+ color: colors.ink,+ textAlign: 'center',+ }}+ >+ hueShift: {Math.round(hueShift)}+ </div>+ </div>+ </Panel>+ );+};++const DirectOrSkill: React.FC = () => (+ <Panel style={{gap: 34, alignItems: 'stretch', padding: '0 20px'}}>+ <Pop from="left" delay={6}>+ <div+ style={{+ backgroundColor: colors.paper,+ borderRadius: 30,+ padding: '30px 36px',+ boxShadow: '0 24px 60px rgba(10,16,32,0.18)',+ }}+ >+ <Label>Use it directly</Label>+ <div+ style={{+ marginTop: 14,+ fontFamily: mono,+ fontWeight: 600,+ fontSize: 44,+ color: colors.ink,+ }}+ >+ <span style={{color: accents.lightLeaks}}>lightLeak</span>()+ </div>+ <div+ style={{+ marginTop: 8,+ fontFamily: mono,+ fontSize: 26,+ color: colors.muted,+ }}+ >+ @remotion/effects/light-leak+ </div>+ </div>+ </Pop>+ <Pop+ delay={72}+ style={{+ fontFamily: display,+ fontWeight: 700,+ fontSize: 40,+ color: colors.muted,+ textAlign: 'center',+ }}+ >+ — or —+ </Pop>+ <Pop from="left" delay={80}>+ <div+ style={{+ backgroundColor: colors.ink,+ borderRadius: 30,+ padding: '30px 36px',+ boxShadow: '0 24px 60px rgba(10,16,32,0.3)',+ display: 'flex',+ alignItems: 'center',+ gap: 28,+ }}+ >+ <div+ style={{+ width: 96,+ height: 96,+ borderRadius: 24,+ backgroundColor: accents.lightLeaks,+ display: 'flex',+ alignItems: 'center',+ justifyContent: 'center',+ }}+ >+ <FileIcon size={54} color={colors.paper} />+ </div>+ <div>+ <Label color="#9AA4B8">New agent skill</Label>+ <div+ style={{+ marginTop: 8,+ fontFamily: mono,+ fontWeight: 600,+ fontSize: 40,+ color: colors.paper,+ }}+ >+ light-leaks.md+ </div>+ </div>+ </div>+ </Pop>+ </Panel>+);++// Scene A -> light leak -> Scene B, played inside the panel.+const TransitionDemo: React.FC = () => {+ const frame = useCurrentFrame();+ const showB = frame >= 34;+ return (+ <Panel>+ <Pop from="up">+ <div+ style={{+ width: 800,+ height: 450,+ borderRadius: 30,+ overflow: 'hidden',+ position: 'relative',+ boxShadow: '0 30px 70px rgba(10,16,32,0.3)',+ }}+ >+ <AbsoluteFill+ style={{+ background: showB+ ? 'linear-gradient(135deg, #FF5F6D, #FFC371)'+ : 'linear-gradient(135deg, #0B84F3, #5B3CFF)',+ justifyContent: 'center',+ alignItems: 'center',+ fontFamily: display,+ fontWeight: 700,+ fontSize: 110,+ color: colors.paper,+ letterSpacing: '-0.03em',+ }}+ >+ {showB ? 'Scene B' : 'Scene A'}+ </AbsoluteFill>+ <Sequence from={10} durationInFrames={48} layout="none">+ <TileLeak />+ </Sequence>+ </div>+ </Pop>+ <Pop delay={4}>+ <Chip+ fontSize={32}+ background={colors.ink}+ color={colors.paper}+ icon={<SparkIcon size={32} color={accents.lightLeaks} />}+ >+ Stylish scene transitions+ </Chip>+ </Pop>+ </Panel>+ );+};++const TileLeak: React.FC = () => {+ const frame = useCurrentFrame();+ return (+ <Solid+ width={800}+ height={450}+ style={{position: 'absolute', left: 0, top: 0, mixBlendMode: 'screen'}}+ effects={[+ lightLeak({+ seed: 5,+ hueShift: 65,+ progress: interpolate(frame, [0, 47], [0, 1], {+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ }),+ }),+ ]}+ />+ );+};++export const LightLeaksScene: React.FC = () => {+ const frame = useCurrentFrame();+ const captions = getCaptionPlacement(frame, layout);++ return (+ <AbsoluteFill>+ <Backdrop accent={accents.lightLeaks} />+ <Stage keyframes={layout}>+ <Series>+ <Series.Sequence+ name="Intro line"+ durationInFrames={224}+ premountFor={30}+ >+ <Punch zoom={1}>+ <Video+ src={+ 'https://remotion.media/announcements/whats-new-in-remotion/cursor/footage/whats2.mp4'+ }+ trimBefore={191}+ />+ </Punch>+ </Series.Sequence>+ <Series.Sequence+ name="Procedurally generated"+ durationInFrames={226}+ premountFor={30}+ >+ <Punch zoom={1.14}>+ <Video+ src={+ 'https://remotion.media/announcements/whats-new-in-remotion/cursor/footage/whats2.mp4'+ }+ trimBefore={435}+ />+ </Punch>+ </Series.Sequence>+ <Series.Sequence+ name="Components or skill"+ durationInFrames={270}+ premountFor={30}+ >+ <Punch zoom={1.02}>+ <Video+ src={+ 'https://remotion.media/announcements/whats-new-in-remotion/cursor/footage/whats2.mp4'+ }+ trimBefore={671}+ />+ </Punch>+ </Series.Sequence>+ </Series>+ </Stage>++ <Sequence name="Light leak over footage" from={24} durationInFrames={72}>+ <LightLeakFx seed={2} hueShift={0} />+ </Sequence>+ <Sequence name="Chapter sticker" from={6} durationInFrames={118}>+ <ChapterSticker+ index="01"+ title="Light leaks"+ accent={accents.lightLeaks}+ />+ </Sequence>+ <Sequence name="Native component" from={146} durationInFrames={80}>+ <NativeComponent />+ </Sequence>+ <Sequence name="Variations" from={226} durationInFrames={226}>+ <Variations />+ </Sequence>+ <Sequence name="Direct or skill" from={452} durationInFrames={184}>+ <DirectOrSkill />+ </Sequence>+ <Sequence name="Transition demo" from={636} durationInFrames={84}>+ <TransitionDemo />+ </Sequence>++ <PunchyCaptions+ width={captions.width}+ fontSize={captions.fontSize}+ style={captions.style}+ keywords={['light', 'leaks', 'leak', 'infinite', 'color', 'skill']}+ captions={[+ // @captions whats2+ {+ text: 'First',+ startMs: 154,+ endMs: 491,+ timestampMs: 323,+ confidence: null,+ },+ {+ text: ' up,',+ startMs: 491,+ endMs: 772,+ timestampMs: 632,+ confidence: null,+ pageBreakAfter: true,+ },+ {+ text: ' light',+ startMs: 959,+ endMs: 1333,+ timestampMs: 1146,+ confidence: null,+ },+ {+ text: ' leaks.',+ startMs: 1333,+ endMs: 1633,+ timestampMs: 1483,+ confidence: null,+ pageBreakAfter: true,+ },+ {+ text: ' They',+ startMs: 1633,+ endMs: 1913,+ timestampMs: 1773,+ confidence: null,+ },+ {+ text: ' are',+ startMs: 1913,+ endMs: 2157,+ timestampMs: 2035,+ confidence: null,+ },+ {+ text: ' a',+ startMs: 2157,+ endMs: 2418,+ timestampMs: 2288,+ confidence: null,+ },+ {+ text: ' common',+ startMs: 2418,+ endMs: 2680,+ timestampMs: 2549,+ confidence: null,+ },+ {+ text: ' effect',+ startMs: 2680,+ endMs: 2980,+ timestampMs: 2830,+ confidence: null,+ },+ {+ text: ' in',+ startMs: 2980,+ endMs: 3298,+ timestampMs: 3139,+ confidence: null,+ },+ {+ text: ' video',+ startMs: 3298,+ endMs: 3635,+ timestampMs: 3467,+ confidence: null,+ },+ {+ text: ' editing',+ startMs: 3635,+ endMs: 3915,+ timestampMs: 3775,+ confidence: null,+ },+ {+ text: ' and',+ startMs: 3915,+ endMs: 4252,+ timestampMs: 4084,+ confidence: null,+ },+ {+ text: ' now',+ startMs: 4252,+ endMs: 4757,+ timestampMs: 4505,+ confidence: null,+ },+ {+ text: ' we',+ startMs: 5185,+ endMs: 5418,+ timestampMs: 5302,+ confidence: null,+ },+ {+ text: ' have',+ startMs: 5418,+ endMs: 5670,+ timestampMs: 5544,+ confidence: null,+ },+ {+ text: ' a',+ startMs: 5670,+ endMs: 6064,+ timestampMs: 5867,+ confidence: null,+ },+ {+ text: ' native',+ startMs: 6064,+ endMs: 6602,+ timestampMs: 6333,+ confidence: null,+ },+ {+ text: ' component',+ startMs: 6602,+ endMs: 6907,+ timestampMs: 6755,+ confidence: null,+ },+ {+ text: ' for',+ startMs: 6907,+ endMs: 7158,+ timestampMs: 7033,+ confidence: null,+ },+ {+ text: ' it.',+ startMs: 7158,+ endMs: 7302,+ timestampMs: 7230,+ confidence: null,+ pageBreakAfter: true,+ },+ {+ text: ' They',+ startMs: 7550,+ endMs: 7785,+ timestampMs: 7668,+ confidence: null,+ },+ {+ text: ' are',+ startMs: 7785,+ endMs: 8056,+ timestampMs: 7921,+ confidence: null,+ },+ {+ text: ' procedurally',+ startMs: 8056,+ endMs: 8779,+ timestampMs: 8418,+ confidence: null,+ },+ {+ text: ' generated',+ startMs: 8779,+ endMs: 8995,+ timestampMs: 8887,+ confidence: null,+ },+ {+ text: ' so',+ startMs: 8995,+ endMs: 9194,+ timestampMs: 9095,+ confidence: null,+ },+ {+ text: ' there',+ startMs: 9194,+ endMs: 9519,+ timestampMs: 9357,+ confidence: null,+ },+ {+ text: ' are',+ startMs: 9519,+ endMs: 9808,+ timestampMs: 9664,+ confidence: null,+ },+ {+ text: ' an',+ startMs: 9808,+ endMs: 10206,+ timestampMs: 10007,+ confidence: null,+ },+ {+ text: ' infinite',+ startMs: 10206,+ endMs: 10531,+ timestampMs: 10369,+ confidence: null,+ },+ {+ text: ' amount',+ startMs: 10531,+ endMs: 10747,+ timestampMs: 10639,+ confidence: null,+ },+ {+ text: ' of',+ startMs: 10747,+ endMs: 11163,+ timestampMs: 10955,+ confidence: null,+ },+ {+ text: ' variations',+ startMs: 11163,+ endMs: 11470,+ timestampMs: 11317,+ confidence: null,+ },+ {+ text: ' for',+ startMs: 11470,+ endMs: 11614,+ timestampMs: 11542,+ confidence: null,+ },+ {+ text: ' it',+ startMs: 11614,+ endMs: 11795,+ timestampMs: 11705,+ confidence: null,+ },+ {+ text: ' and',+ startMs: 11795,+ endMs: 12102,+ timestampMs: 11949,+ confidence: null,+ },+ {+ text: ' also',+ startMs: 12102,+ endMs: 12319,+ timestampMs: 12211,+ confidence: null,+ },+ {+ text: ' they',+ startMs: 12319,+ endMs: 12481,+ timestampMs: 12400,+ confidence: null,+ },+ {+ text: ' can',+ startMs: 12481,+ endMs: 12897,+ timestampMs: 12689,+ confidence: null,+ },+ {+ text: ' assume',+ startMs: 12897,+ endMs: 13637,+ timestampMs: 13267,+ confidence: null,+ },+ {+ text: ' any',+ startMs: 14120,+ endMs: 14620,+ timestampMs: 14370,+ confidence: null,+ },+ {+ text: ' color.',+ startMs: 14620,+ endMs: 14845,+ timestampMs: 14733,+ confidence: null,+ pageBreakAfter: true,+ },+ {+ text: ' You',+ startMs: 15081,+ endMs: 15191,+ timestampMs: 15136,+ confidence: null,+ },+ {+ text: ' can',+ startMs: 15191,+ endMs: 15317,+ timestampMs: 15254,+ confidence: null,+ },+ {+ text: ' use',+ startMs: 15317,+ endMs: 15475,+ timestampMs: 15396,+ confidence: null,+ },+ {+ text: ' the',+ startMs: 15475,+ endMs: 15633,+ timestampMs: 15554,+ confidence: null,+ },+ {+ text: ' light',+ startMs: 15633,+ endMs: 15839,+ timestampMs: 15736,+ confidence: null,+ },+ {+ text: ' leak',+ startMs: 15839,+ endMs: 16281,+ timestampMs: 16060,+ confidence: null,+ },+ {+ text: ' components',+ startMs: 16281,+ endMs: 16897,+ timestampMs: 16589,+ confidence: null,+ },+ {+ text: ' directly',+ startMs: 16897,+ endMs: 16957,+ timestampMs: 16927,+ confidence: null,+ },+ {+ text: ' or',+ startMs: 17292,+ endMs: 17529,+ timestampMs: 17411,+ confidence: null,+ },+ {+ text: ' use',+ startMs: 17529,+ endMs: 17655,+ timestampMs: 17592,+ confidence: null,+ },+ {+ text: ' the',+ startMs: 17655,+ endMs: 17971,+ timestampMs: 17813,+ confidence: null,+ },+ {+ text: ' new',+ startMs: 17971,+ endMs: 18713,+ timestampMs: 18342,+ confidence: null,+ },+ {+ text: ' accompanying',+ startMs: 19067,+ endMs: 20819,+ timestampMs: 19943,+ confidence: null,+ },+ {+ text: ' skill',+ startMs: 20819,+ endMs: 20879,+ timestampMs: 20849,+ confidence: null,+ },+ {+ text: ' to',+ startMs: 21316,+ endMs: 21433,+ timestampMs: 21375,+ confidence: null,+ },+ {+ text: ' make',+ startMs: 21433,+ endMs: 21551,+ timestampMs: 21492,+ confidence: null,+ },+ {+ text: ' a',+ startMs: 21551,+ endMs: 21760,+ timestampMs: 21656,+ confidence: null,+ },+ {+ text: ' stylish',+ startMs: 21760,+ endMs: 22153,+ timestampMs: 21957,+ confidence: null,+ },+ {+ text: ' transition',+ startMs: 22153,+ endMs: 22493,+ timestampMs: 22323,+ confidence: null,+ },+ {+ text: ' between',+ startMs: 22493,+ endMs: 22847,+ timestampMs: 22670,+ confidence: null,+ },+ {+ text: ' scenes.',+ startMs: 22847,+ endMs: 23540,+ timestampMs: 23194,+ confidence: null,+ pageBreakAfter: true,+ },+ ]}+ />++ <Audio+ name="Sticker whoosh"+ src="https://remotion.media/whoosh.wav"+ from={4}+ volume={0.32}+ />+ <Audio+ name="Split whip"+ src="https://remotion.media/whip.wav"+ from={130}+ volume={0.18}+ />+ <Audio+ name="Grid click"+ src="https://remotion.media/mouse-click.wav"+ from={240}+ volume={0.3}+ />+ <Audio+ name="Skill switch"+ src="https://remotion.media/switch.wav"+ from={532}+ volume={0.3}+ />+ <Audio+ name="Demo whoosh"+ src="https://remotion.media/whoosh.wav"+ from={660}+ volume={0.26}+ />+ </AbsoluteFill>+ );+};diff --git a/packages/example/src/WhatsNew/scenes/Outro.tsx b/packages/example/src/WhatsNew/scenes/Outro.tsxnew file mode 100644index 0000000000..86b7a4a5ed--- /dev/null+++ b/packages/example/src/WhatsNew/scenes/Outro.tsx@@ -0,0 +1,83 @@+import React from 'react';+import {AbsoluteFill, interpolate, useCurrentFrame} from 'remotion';+import {pop, rise} from '../anim';+import {Backdrop} from '../components/Background';+import {RemotionLogo} from '../components/Logo';+import {display, mono} from '../fonts';+import {colors} from '../theme';++export const OutroScene: React.FC = () => {+ const frame = useCurrentFrame();+ const logo = pop(frame, 0, 10);+ const word = rise(frame, 8, 18);+ const url = rise(frame, 18, 18);+ const tagline = rise(frame, 28, 18);+ const fade = interpolate(frame, [128, 160], [1, 0], {+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ });++ return (+ <AbsoluteFill style={{backgroundColor: '#000'}}>+ <AbsoluteFill style={{opacity: fade}}>+ <Backdrop accent={colors.blue} dark />+ <AbsoluteFill+ style={{+ justifyContent: 'center',+ alignItems: 'center',+ flexDirection: 'column',+ gap: 26,+ }}+ >+ <RemotionLogo+ size={210}+ style={{+ scale: 0.3 + 0.7 * logo,+ opacity: Math.min(1, logo * 2),+ rotate: `${(1 - logo) * -90}deg`,+ filter: 'drop-shadow(0 20px 60px rgba(11,132,243,0.55))',+ }}+ />+ <div+ style={{+ fontFamily: display,+ fontWeight: 700,+ fontSize: 150,+ letterSpacing: '-0.045em',+ lineHeight: 1,+ color: colors.paper,+ opacity: word,+ translate: `0px ${(1 - word) * 40}px`,+ }}+ >+ Remotion+ </div>+ <div+ style={{+ fontFamily: mono,+ fontWeight: 600,+ fontSize: 46,+ color: colors.blue,+ opacity: url,+ translate: `0px ${(1 - url) * 30}px`,+ }}+ >+ remotion.dev+ </div>+ <div+ style={{+ marginTop: 18,+ fontFamily: display,+ fontWeight: 500,+ fontSize: 36,+ color: '#9AA4B8',+ opacity: tagline,+ }}+ >+ Make videos programmatically.+ </div>+ </AbsoluteFill>+ </AbsoluteFill>+ </AbsoluteFill>+ );+};diff --git a/packages/example/src/WhatsNew/scenes/Skills.tsx b/packages/example/src/WhatsNew/scenes/Skills.tsxnew file mode 100644index 0000000000..28a2559d1d--- /dev/null+++ b/packages/example/src/WhatsNew/scenes/Skills.tsx@@ -0,0 +1,812 @@+import {Audio, Video} from '@remotion/media';+import {useWindowedAudioData, visualizeAudio} from '@remotion/media-utils';+import React from 'react';+import {+ AbsoluteFill,+ interpolate,+ Sequence,+ Series,+ useCurrentFrame,+} from 'remotion';+import {easeInOut, pop} from '../anim';+import {Backdrop} from '../components/Background';+import {PunchyCaptions} from '../components/Captions';+import {WaveBars} from '../components/fx';+import {BarsIcon, LayersIcon, MicIcon, ScissorsIcon} from '../components/icons';+import {RemotionLogo} from '../components/Logo';+import {+ getCaptionPlacement,+ Punch,+ Stage,+ type LayoutKeyframe,+} from '../components/Stage';+import {ChapterSticker, CheckBadge, Panel, Pop, Stamp} from '../components/ui';+import {display, mono} from '../fonts';+import {accents, colors} from '../theme';++const layout: LayoutKeyframe[] = [+ {at: 0, layout: 'full'},+ {at: 92, layout: 'split'},+];++// Maps a scene frame to the frame in whats5.mp4 that is audible at that time.+const sourceFrameAt = (sceneFrame: number) =>+ sceneFrame < 502 ? 503 + (sceneFrame - 358) : 663 + (sceneFrame - 502);++const VoiceSpectrum: React.FC<{readonly sourceFrame: number}> = ({+ sourceFrame,+}) => {+ const {audioData, dataOffsetInSeconds} = useWindowedAudioData({+ src: 'https://remotion.media/announcements/whats-new-in-remotion/cursor/footage/whats5.mp4',+ frame: sourceFrame,+ fps: 30,+ windowInSeconds: 10,+ });+ const bars = audioData+ ? visualizeAudio({+ fps: 30,+ frame: sourceFrame,+ audioData,+ numberOfSamples: 64,+ optimizeFor: 'speed',+ dataOffsetInSeconds,+ })+ .slice(1, 19)+ .map((v) =>+ Math.min(1, Math.max(0.04, (20 * Math.log10(v + 1e-6) + 78) / 58)),+ )+ : new Array(18).fill(0.05);++ return (+ <div style={{display: 'flex', alignItems: 'flex-end', gap: 6, height: 120}}>+ {bars.map((v, i) => (+ <div+ key={i}+ style={{+ width: 14,+ height: 120 * v,+ borderRadius: 7,+ background: `linear-gradient(180deg, #7CF0C4, ${accents.skills})`,+ }}+ />+ ))}+ </div>+ );+};++const SilenceCut: React.FC = () => {+ const frame = useCurrentFrame();+ const cut = interpolate(frame, [24, 44], [1, 0], {+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ easing: easeInOut,+ });+ return (+ <div style={{display: 'flex', alignItems: 'center', height: 120}}>+ <WaveBars seed="left" bars={9} height={96} color={accents.skills} />+ <div+ style={{+ width: 110 * cut,+ height: 96,+ margin: `0 ${6 * cut}px`,+ borderRadius: 12,+ border: `3px dashed ${colors.danger}`,+ backgroundColor: 'rgba(240,68,56,0.1)',+ opacity: cut,+ overflow: 'hidden',+ display: 'flex',+ alignItems: 'center',+ justifyContent: 'center',+ }}+ >+ <div+ style={{+ height: 4,+ width: '80%',+ backgroundColor: colors.danger,+ borderRadius: 2,+ }}+ />+ </div>+ <WaveBars seed="right" bars={9} height={96} color={accents.skills} />+ </div>+ );+};++const Checkerboard: React.FC = () => {+ const frame = useCurrentFrame();+ return (+ <div+ style={{+ width: 300,+ height: 120,+ borderRadius: 16,+ background:+ 'repeating-conic-gradient(#D9DEE7 0% 25%, #FFFFFF 0% 50%) 50% / 26px 26px',+ display: 'flex',+ alignItems: 'center',+ justifyContent: 'center',+ }}+ >+ <RemotionLogo+ size={80}+ style={{+ translate: `0px ${Math.sin(frame / 10) * 8}px`,+ rotate: `${Math.sin(frame / 16) * 8}deg`,+ filter: 'drop-shadow(0 10px 12px rgba(0,0,0,0.25))',+ }}+ />+ </div>+ );+};++const SkillCard: React.FC<{+ readonly delay: number;+ readonly checkAt: number;+ readonly title: string;+ readonly tag: string;+ readonly file: string;+ readonly icon: React.ReactNode;+ readonly children: React.ReactNode;+}> = ({delay, checkAt, title, tag, file, icon, children}) => {+ const frame = useCurrentFrame();+ const p = pop(frame, delay, 12);+ const visible = frame >= delay;+ return (+ <div+ style={{+ width: 404,+ height: 372,+ borderRadius: 32,+ backgroundColor: visible ? colors.paper : 'rgba(255,255,255,0.45)',+ border: visible ? 'none' : `3px dashed ${colors.line}`,+ boxSizing: 'border-box',+ padding: '28px 28px 26px',+ display: 'flex',+ flexDirection: 'column',+ justifyContent: 'space-between',+ boxShadow: visible ? '0 22px 50px rgba(10,16,32,0.15)' : 'none',+ scale: visible ? 0.85 + 0.15 * p : 1,+ position: 'relative',+ }}+ >+ {visible ? (+ <>+ <div style={{display: 'flex', alignItems: 'center', gap: 16}}>+ <div+ style={{+ width: 64,+ height: 64,+ borderRadius: 18,+ backgroundColor: accents.skills,+ display: 'flex',+ alignItems: 'center',+ justifyContent: 'center',+ }}+ >+ {icon}+ </div>+ <div+ style={{+ fontFamily: mono,+ fontWeight: 600,+ fontSize: 22,+ color: accents.skills,+ backgroundColor: '#E7F8F1',+ padding: '6px 12px',+ borderRadius: 10,+ }}+ >+ {tag}+ </div>+ </div>+ <div+ style={{+ fontFamily: display,+ fontWeight: 700,+ fontSize: 42,+ lineHeight: 1.02,+ letterSpacing: '-0.02em',+ color: colors.ink,+ }}+ >+ {title}+ </div>+ <div style={{height: 120, display: 'flex', alignItems: 'center'}}>+ <Sequence from={delay} layout="none">+ {children}+ </Sequence>+ </div>+ <div style={{fontFamily: mono, fontSize: 22, color: colors.muted}}>+ {file}+ </div>+ {frame >= checkAt ? (+ <div style={{position: 'absolute', right: -14, top: -14}}>+ <CheckBadge delay={checkAt} size={62} />+ </div>+ ) : null}+ </>+ ) : null}+ </div>+ );+};++const SkillGrid: React.FC = () => {+ const frame = useCurrentFrame();+ // This sequence starts at scene frame 100.+ const sceneFrame = frame + 100;+ return (+ <Panel style={{gap: 22}}>+ <Pop from="up" style={{alignSelf: 'flex-start', marginLeft: 8}}>+ <div+ style={{+ fontFamily: display,+ fontWeight: 700,+ fontSize: 56,+ letterSpacing: '-0.03em',+ color: colors.ink,+ }}+ >+ New agent skills+ </div>+ </Pop>+ <div+ style={{+ display: 'grid',+ gridTemplateColumns: '404px 404px',+ gap: 22,+ }}+ >+ <SkillCard+ delay={66}+ checkAt={427}+ title="Voiceovers"+ tag="ElevenLabs"+ file="voiceover.md"+ icon={<MicIcon size={38} color={colors.paper} />}+ >+ <WaveBars+ seed="voice"+ bars={30}+ height={96}+ color={accents.skills}+ live+ />+ </SkillCard>+ <SkillCard+ delay={188}+ checkAt={434}+ title="Silence detection"+ tag="FFmpeg"+ file="silence-detection.md"+ icon={<ScissorsIcon size={36} color={colors.paper} />}+ >+ <SilenceCut />+ </SkillCard>+ <SkillCard+ delay={271}+ checkAt={445}+ title="Audio visualization"+ tag="media-utils"+ file="audio-visualization.md"+ icon={<BarsIcon size={38} color={colors.paper} />}+ >+ {frame >= 258 ? (+ <VoiceSpectrum sourceFrame={sourceFrameAt(sceneFrame)} />+ ) : null}+ </SkillCard>+ <SkillCard+ delay={347}+ checkAt={460}+ title="Transparent videos"+ tag="ProRes · WebM"+ file="transparent-videos.md"+ icon={<LayersIcon size={38} color={colors.paper} />}+ >+ <Checkerboard />+ </SkillCard>+ </div>+ </Panel>+ );+};++export const SkillsScene: React.FC = () => {+ const frame = useCurrentFrame();+ const captions = getCaptionPlacement(frame, layout);++ return (+ <AbsoluteFill>+ <Backdrop accent={accents.skills} />+ <Stage keyframes={layout}>+ <Series>+ <Series.Sequence+ name="New skills"+ durationInFrames={34}+ premountFor={30}+ >+ <Punch zoom={1}>+ <Video+ src={+ 'https://remotion.media/announcements/whats-new-in-remotion/cursor/footage/whats5.mp4'+ }+ trimBefore={87}+ />+ </Punch>+ </Series.Sequence>+ <Series.Sequence+ name="What did not work"+ durationInFrames={129}+ premountFor={30}+ >+ <Punch zoom={1.14}>+ <Video+ src={+ 'https://remotion.media/announcements/whats-new-in-remotion/cursor/footage/whats5.mp4'+ }+ trimBefore={135}+ />+ </Punch>+ </Series.Sequence>+ <Series.Sequence+ name="Voiceovers"+ durationInFrames={84}+ premountFor={30}+ >+ <Punch zoom={1}>+ <Video+ src={+ 'https://remotion.media/announcements/whats-new-in-remotion/cursor/footage/whats5.mp4'+ }+ trimBefore={275}+ />+ </Punch>+ </Series.Sequence>+ <Series.Sequence+ name="FFmpeg"+ durationInFrames={111}+ premountFor={30}+ >+ <Punch zoom={1.16}>+ <Video+ src={+ 'https://remotion.media/announcements/whats-new-in-remotion/cursor/footage/whats5.mp4'+ }+ trimBefore={372}+ />+ </Punch>+ </Series.Sequence>+ <Series.Sequence+ name="Visualization and transparency"+ durationInFrames={144}+ premountFor={30}+ >+ <Punch zoom={1.02}>+ <Video+ src={+ 'https://remotion.media/announcements/whats-new-in-remotion/cursor/footage/whats5.mp4'+ }+ trimBefore={503}+ />+ </Punch>+ </Series.Sequence>+ <Series.Sequence+ name="Much smoother"+ durationInFrames={106}+ premountFor={30}+ >+ <Punch zoom={1.18}>+ <Video+ src={+ 'https://remotion.media/announcements/whats-new-in-remotion/cursor/footage/whats5.mp4'+ }+ trimBefore={663}+ />+ </Punch>+ </Series.Sequence>+ </Series>+ </Stage>++ <Sequence name="Chapter sticker" from={2} durationInFrames={96}>+ <ChapterSticker index="04" title="New skills" accent={accents.skills} />+ </Sequence>+ <Sequence name="Skill grid" from={100} durationInFrames={508}>+ <SkillGrid />+ </Sequence>+ <Sequence name="Smoother stamp" from={566} durationInFrames={42}>+ <div+ style={{+ position: 'absolute',+ left: 500,+ top: 540,+ translate: '-50% -50%',+ }}+ >+ <Stamp color={accents.skills} rotate={-8} fontSize={80}>+ Much smoother+ </Stamp>+ </div>+ </Sequence>++ <PunchyCaptions+ width={captions.width}+ fontSize={captions.fontSize}+ style={captions.style}+ keywords={[+ 'voiceovers',+ 'elevenlabs,',+ 'ffmpeg',+ 'silence',+ 'visualization',+ 'transparent',+ 'smoother.',+ ]}+ captions={[+ // @captions whats5+ {+ text: 'New',+ startMs: 141,+ endMs: 418,+ timestampMs: 280,+ confidence: null,+ },+ {+ text: ' skills.',+ startMs: 418,+ endMs: 986,+ timestampMs: 702,+ confidence: null,+ pageBreakAfter: true,+ },+ {+ text: ' We',+ startMs: 1222,+ endMs: 1420,+ timestampMs: 1321,+ confidence: null,+ },+ {+ text: ' looked',+ startMs: 1420,+ endMs: 1667,+ timestampMs: 1544,+ confidence: null,+ },+ {+ text: ' at',+ startMs: 1667,+ endMs: 1832,+ timestampMs: 1750,+ confidence: null,+ },+ {+ text: ' what',+ startMs: 1832,+ endMs: 1931,+ timestampMs: 1882,+ confidence: null,+ },+ {+ text: ' is',+ startMs: 1931,+ endMs: 2063,+ timestampMs: 1997,+ confidence: null,+ },+ {+ text: ' not',+ startMs: 2063,+ endMs: 2327,+ timestampMs: 2195,+ confidence: null,+ },+ {+ text: ' working',+ startMs: 2327,+ endMs: 2557,+ timestampMs: 2442,+ confidence: null,+ },+ {+ text: ' so',+ startMs: 2557,+ endMs: 2805,+ timestampMs: 2681,+ confidence: null,+ },+ {+ text: ' well',+ startMs: 2805,+ endMs: 3184,+ timestampMs: 2995,+ confidence: null,+ },+ {+ text: ' and',+ startMs: 3184,+ endMs: 3332,+ timestampMs: 3258,+ confidence: null,+ },+ {+ text: ' we',+ startMs: 3332,+ endMs: 3563,+ timestampMs: 3448,+ confidence: null,+ },+ {+ text: ' wrote',+ startMs: 3563,+ endMs: 3826,+ timestampMs: 3695,+ confidence: null,+ },+ {+ text: ' new',+ startMs: 3826,+ endMs: 4107,+ timestampMs: 3967,+ confidence: null,+ },+ {+ text: ' skills',+ startMs: 4107,+ endMs: 4519,+ timestampMs: 4313,+ confidence: null,+ },+ {+ text: ' for',+ startMs: 4519,+ endMs: 5343,+ timestampMs: 4931,+ confidence: null,+ },+ {+ text: ' generating',+ startMs: 5521,+ endMs: 5863,+ timestampMs: 5692,+ confidence: null,+ },+ {+ text: ' voiceovers',+ startMs: 5863,+ endMs: 6700,+ timestampMs: 6282,+ confidence: null,+ },+ {+ text: ' with',+ startMs: 6700,+ endMs: 7137,+ timestampMs: 6919,+ confidence: null,+ },+ {+ text: ' ElevenLabs,',+ startMs: 7137,+ endMs: 8144,+ timestampMs: 7641,+ confidence: null,+ pageBreakAfter: true,+ },+ {+ text: ' doing',+ startMs: 8304,+ endMs: 8856,+ timestampMs: 8580,+ confidence: null,+ },+ {+ text: ' tasks',+ startMs: 8856,+ endMs: 9163,+ timestampMs: 9010,+ confidence: null,+ },+ {+ text: ' with',+ startMs: 9163,+ endMs: 9592,+ timestampMs: 9378,+ confidence: null,+ },+ {+ text: ' FFmpeg',+ startMs: 9592,+ endMs: 10185,+ timestampMs: 9889,+ confidence: null,+ },+ {+ text: ' such',+ startMs: 10185,+ endMs: 10430,+ timestampMs: 10308,+ confidence: null,+ },+ {+ text: ' as',+ startMs: 10641,+ endMs: 10896,+ timestampMs: 10769,+ confidence: null,+ },+ {+ text: ' silence',+ startMs: 10896,+ endMs: 11279,+ timestampMs: 11088,+ confidence: null,+ },+ {+ text: ' detection,',+ startMs: 11279,+ endMs: 11848,+ timestampMs: 11564,+ confidence: null,+ pageBreakAfter: true,+ },+ {+ text: ' doing',+ startMs: 12009,+ endMs: 12366,+ timestampMs: 12188,+ confidence: null,+ },+ {+ text: ' audio',+ startMs: 12366,+ endMs: 13060,+ timestampMs: 12713,+ confidence: null,+ },+ {+ text: ' visualization',+ startMs: 13060,+ endMs: 13961,+ timestampMs: 13511,+ confidence: null,+ },+ {+ text: ' and',+ startMs: 14312,+ endMs: 14888,+ timestampMs: 14600,+ confidence: null,+ },+ {+ text: ' exporting',+ startMs: 14888,+ endMs: 15629,+ timestampMs: 15259,+ confidence: null,+ },+ {+ text: ' transparent',+ startMs: 15629,+ endMs: 16238,+ timestampMs: 15934,+ confidence: null,+ },+ {+ text: ' videos.',+ startMs: 16238,+ endMs: 16567,+ timestampMs: 16403,+ confidence: null,+ pageBreakAfter: true,+ },+ {+ text: ' All',+ startMs: 16820,+ endMs: 16992,+ timestampMs: 16906,+ confidence: null,+ },+ {+ text: ' of',+ startMs: 16992,+ endMs: 17164,+ timestampMs: 17078,+ confidence: null,+ },+ {+ text: ' these',+ startMs: 17164,+ endMs: 17559,+ timestampMs: 17362,+ confidence: null,+ },+ {+ text: ' tasks',+ startMs: 17559,+ endMs: 17799,+ timestampMs: 17679,+ confidence: null,+ },+ {+ text: ' should',+ startMs: 17799,+ endMs: 18160,+ timestampMs: 17980,+ confidence: null,+ },+ {+ text: ' now',+ startMs: 18160,+ endMs: 18675,+ timestampMs: 18418,+ confidence: null,+ },+ {+ text: ' work',+ startMs: 18675,+ endMs: 18968,+ timestampMs: 18822,+ confidence: null,+ },+ {+ text: ' much',+ startMs: 18968,+ endMs: 19363,+ timestampMs: 19166,+ confidence: null,+ },+ {+ text: ' smoother.',+ startMs: 19363,+ endMs: 19947,+ timestampMs: 19655,+ confidence: null,+ pageBreakAfter: true,+ },+ ]}+ />++ <Audio+ name="Sticker whoosh"+ src="https://remotion.media/whoosh.wav"+ from={0}+ volume={0.3}+ />+ <Audio+ name="Split whip"+ src="https://remotion.media/whip.wav"+ from={90}+ volume={0.16}+ />+ <Audio+ name="Card 1"+ src="https://remotion.media/mouse-click.wav"+ from={166}+ volume={0.3}+ />+ <Audio+ name="Card 2"+ src="https://remotion.media/mouse-click.wav"+ from={288}+ volume={0.3}+ />+ <Audio+ name="Card 3"+ src="https://remotion.media/mouse-click.wav"+ from={371}+ volume={0.3}+ />+ <Audio+ name="Card 4"+ src="https://remotion.media/mouse-click.wav"+ from={447}+ volume={0.3}+ />+ <Audio+ name="All checked"+ src="https://remotion.media/ding.wav"+ from={527}+ volume={0.22}+ />+ </AbsoluteFill>+ );+};diff --git a/packages/example/src/WhatsNew/scenes/SneakPeek.tsx b/packages/example/src/WhatsNew/scenes/SneakPeek.tsxnew file mode 100644index 0000000000..1d72f3eb48--- /dev/null+++ b/packages/example/src/WhatsNew/scenes/SneakPeek.tsx@@ -0,0 +1,1070 @@+import {Audio, Video} from '@remotion/media';+import React from 'react';+import {+ AbsoluteFill,+ interpolate,+ Sequence,+ Series,+ useCurrentFrame,+} from 'remotion';+import {easeInOut, pop, rise} from '../anim';+import {Backdrop} from '../components/Background';+import {PunchyCaptions} from '../components/Captions';+import {Letterbox} from '../components/fx';+import {EyeIcon, WandIcon} from '../components/icons';+import {+ getCaptionPlacement,+ Punch,+ Stage,+ type LayoutKeyframe,+} from '../components/Stage';+import {StudioMock} from '../components/StudioMock';+import {+ ChapterSticker,+ Chip,+ CodeLines,+ Label,+ Panel,+ Pop,+ Stamp,+ syntax,+ Window,+} from '../components/ui';+import {display} from '../fonts';+import {accents, colors} from '../theme';++const layout: LayoutKeyframe[] = [+ {at: 0, layout: 'full'},+ {at: 184, layout: 'split'},+ {at: 518, layout: 'pip', duration: 26},+];++const Spotlight: React.FC = () => {+ const frame = useCurrentFrame();+ const p = interpolate(frame, [0, 20, 150, 184], [0, 1, 1, 0], {+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ });+ return (+ <AbsoluteFill+ style={{+ opacity: p,+ background:+ 'radial-gradient(ellipse 45% 60% at 52% 40%, rgba(20,10,40,0) 40%, rgba(12,6,28,0.72) 100%)',+ }}+ />+ );+};++const requests = [+ {text: 'Can Remotion be easier to use?', at: 13, x: 90, y: 180, rotate: -3},+ {+ text: 'A visual editor would be amazing!',+ at: 37,+ x: 130,+ y: 330,+ rotate: 2,+ },+ {text: 'Make it easier, please!', at: 67, x: 100, y: 480, rotate: -2},+];++const Requests: React.FC = () => {+ const frame = useCurrentFrame();+ return (+ <AbsoluteFill>+ {requests.map((r, i) => {+ const p = pop(frame, r.at, 11);+ return (+ <div+ key={r.text}+ style={{+ position: 'absolute',+ left: r.x,+ top: r.y,+ display: 'flex',+ alignItems: 'center',+ gap: 18,+ padding: '20px 32px 22px 20px',+ borderRadius: '34px 34px 34px 10px',+ backgroundColor: colors.paper,+ boxShadow: '0 22px 50px rgba(0,0,0,0.35)',+ opacity: Math.min(1, p * 2),+ scale: 0.5 + 0.5 * p,+ rotate: `${r.rotate}deg`,+ transformOrigin: '0% 100%',+ }}+ >+ <div+ style={{+ width: 58,+ height: 58,+ borderRadius: 29,+ background: [+ 'linear-gradient(135deg,#FF8A00,#FF3B8D)',+ 'linear-gradient(135deg,#10B981,#0B84F3)',+ 'linear-gradient(135deg,#7C5CFF,#A78BFA)',+ ][i],+ }}+ />+ <div+ style={{+ fontFamily: display,+ fontWeight: 700,+ fontSize: 38,+ color: colors.ink,+ whiteSpace: 'nowrap',+ }}+ >+ {r.text}+ </div>+ </div>+ );+ })}+ </AbsoluteFill>+ );+};++const Tradeoff: React.FC = () => {+ const frame = useCurrentFrame();+ // Sequence starts at scene frame 188.+ const wobble = interpolate(frame, [17, 127], [0, 1], {+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ });+ const settle = interpolate(frame, [127, 147], [0, 1], {+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ easing: easeInOut,+ });+ const knob =+ 0.5 ++ (1 - settle) *+ 0.42 *+ Math.sin(wobble * Math.PI * 4) *+ Math.min(1, frame / 20);+ const both = rise(frame, 130, 14);+ return (+ <Panel style={{gap: 40}}>+ <Pop from="up" delay={2}>+ <div+ style={{+ width: 800,+ borderRadius: 34,+ backgroundColor: '#14111F',+ border: '1px solid rgba(255,255,255,0.08)',+ padding: '34px 38px 40px',+ boxSizing: 'border-box',+ boxShadow: '0 30px 70px rgba(0,0,0,0.45)',+ }}+ >+ <div+ style={{+ display: 'flex',+ justifyContent: 'space-between',+ marginBottom: 26,+ }}+ >+ <div style={{display: 'flex', alignItems: 'center', gap: 12}}>+ <WandIcon size={38} color={accents.sneakPeek} />+ <div+ style={{+ fontFamily: display,+ fontWeight: 700,+ fontSize: 36,+ color: colors.paper,+ }}+ >+ Easy to use+ </div>+ </div>+ <div+ style={{+ fontFamily: display,+ fontWeight: 700,+ fontSize: 36,+ color: colors.paper,+ }}+ >+ {'</>'} Dynamic code+ </div>+ </div>+ <div+ style={{+ height: 18,+ borderRadius: 9,+ background: `linear-gradient(90deg, ${accents.sneakPeek}, ${colors.blue})`,+ position: 'relative',+ }}+ >+ <div+ style={{+ position: 'absolute',+ top: -17,+ left: `calc(${knob * 100}% - 26px)`,+ width: 52,+ height: 52,+ borderRadius: 26,+ backgroundColor: colors.paper,+ boxShadow: `0 0 0 ${10 * both}px rgba(167,139,250,0.35), 0 8px 20px rgba(0,0,0,0.4)`,+ }}+ />+ </div>+ <div+ style={{+ marginTop: 34,+ textAlign: 'center',+ fontFamily: display,+ fontWeight: 700,+ fontSize: 40,+ color: both > 0.5 ? accents.sneakPeek : '#8A8F98',+ }}+ >+ {both > 0.5 ? 'Without compromising either' : 'How do we get both?'}+ </div>+ </div>+ </Pop>+ <Pop from="up" delay={150}>+ <Window title="MyVideo.tsx" width={800} fontSize={29}>+ <CodeLines+ start={156}+ speed={2.4}+ lines={[+ [+ ['const', syntax.keyword],+ [' frame = ', syntax.plain],+ ['useCurrentFrame', syntax.fn],+ ['();', syntax.punct],+ ],+ [+ ['const', syntax.keyword],+ [' scale = ', syntax.plain],+ ['spring', syntax.fn],+ ['({frame, fps});', syntax.punct],+ ],+ [+ ['return', syntax.keyword],+ [' <', syntax.punct],+ ['Title', syntax.tag],+ [' style', syntax.attr],+ ['={{scale}} />', syntax.punct],+ ],+ ]}+ />+ </Window>+ </Pop>+ <Pop from="up" delay={226}>+ <Label color="#B9B2D9">Everything is expressed as code</Label>+ </Pop>+ </Panel>+ );+};++const VisualModeTitle: React.FC = () => (+ <div+ style={{+ position: 'absolute',+ left: 1500,+ top: 150,+ width: 380,+ display: 'flex',+ flexDirection: 'column',+ alignItems: 'center',+ gap: 18,+ }}+ >+ <Pop from="up">+ <Label color={accents.sneakPeek}>Remotion Studio</Label>+ </Pop>+ <Pop from="up" delay={4}>+ <div+ style={{+ fontFamily: display,+ fontWeight: 700,+ fontSize: 76,+ lineHeight: 0.95,+ letterSpacing: '-0.04em',+ color: colors.paper,+ textAlign: 'center',+ }}+ >+ Visual+ <br />+ mode+ </div>+ </Pop>+ <Stamp+ color={accents.sneakPeek}+ delay={16}+ rotate={-6}+ fontSize={34}+ style={{backgroundColor: 'rgba(20,10,40,0.9)'}}+ >+ Prototype+ </Stamp>+ </div>+);++export const SneakPeekScene: React.FC = () => {+ const frame = useCurrentFrame();+ const captions = getCaptionPlacement(frame, layout);++ return (+ <AbsoluteFill>+ <Backdrop accent={accents.sneakPeek} dark />+ <Stage keyframes={layout}>+ <Series>+ <Series.Sequence+ name="Sneak peek"+ durationInFrames={79}+ premountFor={30}+ >+ <Punch zoom={1.06}>+ <Video+ src={+ 'https://remotion.media/announcements/whats-new-in-remotion/cursor/footage/whats9.mp4'+ }+ trimBefore={51}+ />+ </Punch>+ </Series.Sequence>+ <Series.Sequence+ name="Easier to use"+ durationInFrames={405}+ premountFor={30}+ >+ <Punch zoom={1.18}>+ <Video+ src={+ 'https://remotion.media/announcements/whats-new-in-remotion/cursor/footage/whats9.mp4'+ }+ trimBefore={147}+ />+ </Punch>+ </Series.Sequence>+ <Series.Sequence+ name="Visual mode"+ durationInFrames={361}+ premountFor={30}+ >+ <Punch zoom={1.04}>+ <Video+ src={+ 'https://remotion.media/announcements/whats-new-in-remotion/cursor/footage/whats10.mp4'+ }+ trimBefore={51}+ />+ </Punch>+ </Series.Sequence>+ <Series.Sequence+ name="Regular React code"+ durationInFrames={67}+ premountFor={30}+ >+ <Punch zoom={1.16}>+ <Video+ src={+ 'https://remotion.media/announcements/whats-new-in-remotion/cursor/footage/whats10.mp4'+ }+ trimBefore={423}+ />+ </Punch>+ </Series.Sequence>+ </Series>+ </Stage>++ <Sequence name="Spotlight" durationInFrames={184}>+ <Spotlight />+ </Sequence>+ <Sequence name="Letterbox" durationInFrames={190}>+ <Letterbox />+ </Sequence>+ <Sequence name="Sneak peek sticker" from={26} durationInFrames={58}>+ <ChapterSticker+ index={<EyeIcon size={64} color={colors.paper} strokeWidth={2.4} />}+ title="Sneak peek"+ overline="What's next"+ accent={accents.soundEffects}+ />+ </Sequence>+ <Sequence name="Requests" from={79} durationInFrames={104}>+ <Requests />+ </Sequence>+ <Sequence name="Tradeoff" from={188} durationInFrames={300}>+ <Tradeoff />+ </Sequence>+ <Sequence name="Studio mock" from={520} durationInFrames={392}>+ <div style={{position: 'absolute', left: 60, top: 70}}>+ <Pop from="up" exitDuration={1}>+ <StudioMock />+ </Pop>+ </div>+ </Sequence>+ <Sequence name="Visual mode title" from={540} durationInFrames={372}>+ <VisualModeTitle />+ </Sequence>+ <Sequence name="React code chip" from={858} durationInFrames={54}>+ <div+ style={{+ position: 'absolute',+ left: 760,+ top: 600,+ translate: '-50% 0',+ }}+ >+ <Pop from="up">+ <Chip background={colors.blue} color={colors.paper} fontSize={40}>+ {'</>'} Regular React code+ </Chip>+ </Pop>+ </div>+ </Sequence>++ <PunchyCaptions+ durationInFrames={484}+ width={captions.width}+ fontSize={captions.fontSize}+ style={captions.style}+ keywords={['sneak', 'peek', 'easier', 'code.']}+ captions={[+ // @captions whats9+ {+ text: 'And',+ startMs: 149,+ endMs: 402,+ timestampMs: 276,+ confidence: null,+ },+ {+ text: ' now',+ startMs: 402,+ endMs: 587,+ timestampMs: 495,+ confidence: null,+ },+ {+ text: ' a',+ startMs: 587,+ endMs: 756,+ timestampMs: 672,+ confidence: null,+ },+ {+ text: ' little',+ startMs: 756,+ endMs: 1009,+ timestampMs: 883,+ confidence: null,+ },+ {+ text: ' sneak',+ startMs: 1009,+ endMs: 1211,+ timestampMs: 1110,+ confidence: null,+ },+ {+ text: ' peek',+ startMs: 1211,+ endMs: 1447,+ timestampMs: 1329,+ confidence: null,+ },+ {+ text: ' of',+ startMs: 1447,+ endMs: 1650,+ timestampMs: 1549,+ confidence: null,+ },+ {+ text: " what's",+ startMs: 1650,+ endMs: 1852,+ timestampMs: 1751,+ confidence: null,+ },+ {+ text: ' next.',+ startMs: 2004,+ endMs: 2459,+ timestampMs: 2232,+ confidence: null,+ pageBreakAfter: true,+ },+ {+ text: ' We',+ startMs: 2705,+ endMs: 2886,+ timestampMs: 2796,+ confidence: null,+ },+ {+ text: ' hear',+ startMs: 2886,+ endMs: 3106,+ timestampMs: 2996,+ confidence: null,+ },+ {+ text: ' that',+ startMs: 3106,+ endMs: 3267,+ timestampMs: 3187,+ confidence: null,+ },+ {+ text: ' you',+ startMs: 3267,+ endMs: 3487,+ timestampMs: 3377,+ confidence: null,+ },+ {+ text: ' want',+ startMs: 3487,+ endMs: 3748,+ timestampMs: 3618,+ confidence: null,+ },+ {+ text: ' Remotion',+ startMs: 3748,+ endMs: 4089,+ timestampMs: 3919,+ confidence: null,+ },+ {+ text: ' to',+ startMs: 4089,+ endMs: 4389,+ timestampMs: 4239,+ confidence: null,+ },+ {+ text: ' become',+ startMs: 4389,+ endMs: 4851,+ timestampMs: 4620,+ confidence: null,+ },+ {+ text: ' easier',+ startMs: 4851,+ endMs: 5131,+ timestampMs: 4991,+ confidence: null,+ },+ {+ text: ' to',+ startMs: 5131,+ endMs: 5452,+ timestampMs: 5292,+ confidence: null,+ },+ {+ text: ' use.',+ startMs: 5703,+ endMs: 5782,+ timestampMs: 5743,+ confidence: null,+ pageBreakAfter: true,+ },+ {+ text: ' And',+ startMs: 6033,+ endMs: 6159,+ timestampMs: 6096,+ confidence: null,+ },+ {+ text: ' for',+ startMs: 6159,+ endMs: 6332,+ timestampMs: 6246,+ confidence: null,+ },+ {+ text: ' a',+ startMs: 6332,+ endMs: 6426,+ timestampMs: 6379,+ confidence: null,+ },+ {+ text: ' long',+ startMs: 6426,+ endMs: 6662,+ timestampMs: 6544,+ confidence: null,+ },+ {+ text: ' time',+ startMs: 6662,+ endMs: 6835,+ timestampMs: 6749,+ confidence: null,+ },+ {+ text: ' we',+ startMs: 6835,+ endMs: 6945,+ timestampMs: 6890,+ confidence: null,+ },+ {+ text: ' did',+ startMs: 6945,+ endMs: 7149,+ timestampMs: 7047,+ confidence: null,+ },+ {+ text: ' not',+ startMs: 7149,+ endMs: 7511,+ timestampMs: 7330,+ confidence: null,+ },+ {+ text: ' know',+ startMs: 7511,+ endMs: 7872,+ timestampMs: 7692,+ confidence: null,+ },+ {+ text: ' how',+ startMs: 8224,+ endMs: 8359,+ timestampMs: 8292,+ confidence: null,+ },+ {+ text: ' to',+ startMs: 8359,+ endMs: 8522,+ timestampMs: 8441,+ confidence: null,+ },+ {+ text: ' achieve',+ startMs: 8522,+ endMs: 8821,+ timestampMs: 8672,+ confidence: null,+ },+ {+ text: ' that',+ startMs: 8821,+ endMs: 9133,+ timestampMs: 8977,+ confidence: null,+ },+ {+ text: ' without',+ startMs: 9429,+ endMs: 10485,+ timestampMs: 9957,+ confidence: null,+ },+ {+ text: ' compromising',+ startMs: 10485,+ endMs: 10716,+ timestampMs: 10601,+ confidence: null,+ },+ {+ text: ' on',+ startMs: 11051,+ endMs: 11297,+ timestampMs: 11174,+ confidence: null,+ },+ {+ text: ' the',+ startMs: 11297,+ endMs: 11708,+ timestampMs: 11503,+ confidence: null,+ },+ {+ text: ' dynamicness',+ startMs: 11708,+ endMs: 12464,+ timestampMs: 12086,+ confidence: null,+ },+ {+ text: ' that',+ startMs: 12829,+ endMs: 12945,+ timestampMs: 12887,+ confidence: null,+ },+ {+ text: ' you',+ startMs: 12945,+ endMs: 13125,+ timestampMs: 13035,+ confidence: null,+ },+ {+ text: ' get',+ startMs: 13125,+ endMs: 13395,+ timestampMs: 13260,+ confidence: null,+ },+ {+ text: ' when',+ startMs: 13682,+ endMs: 13948,+ timestampMs: 13815,+ confidence: null,+ },+ {+ text: ' everything',+ startMs: 13948,+ endMs: 14159,+ timestampMs: 14054,+ confidence: null,+ },+ {+ text: ' is',+ startMs: 14159,+ endMs: 14447,+ timestampMs: 14303,+ confidence: null,+ },+ {+ text: ' expressed',+ startMs: 14447,+ endMs: 14625,+ timestampMs: 14536,+ confidence: null,+ },+ {+ text: ' as',+ startMs: 14625,+ endMs: 14747,+ timestampMs: 14686,+ confidence: null,+ },+ {+ text: ' code.',+ startMs: 14802,+ endMs: 15684,+ timestampMs: 15243,+ confidence: null,+ pageBreakAfter: true,+ },+ ]}+ />+ <PunchyCaptions+ from={484}+ durationInFrames={428}+ width={captions.width}+ fontSize={captions.fontSize}+ style={captions.style}+ keywords={['visual', 'mode', 'interactively', 'react']}+ captions={[+ // @captions whats10+ {+ text: 'We',+ startMs: 141,+ endMs: 365,+ timestampMs: 253,+ confidence: null,+ },+ {+ text: ' are',+ startMs: 365,+ endMs: 533,+ timestampMs: 449,+ confidence: null,+ },+ {+ text: ' now',+ startMs: 533,+ endMs: 999,+ timestampMs: 766,+ confidence: null,+ },+ {+ text: ' prototyping',+ startMs: 999,+ endMs: 1429,+ timestampMs: 1214,+ confidence: null,+ },+ {+ text: ' a',+ startMs: 1429,+ endMs: 1802,+ timestampMs: 1616,+ confidence: null,+ },+ {+ text: ' new',+ startMs: 1802,+ endMs: 2306,+ timestampMs: 2054,+ confidence: null,+ },+ {+ text: ' visual',+ startMs: 2306,+ endMs: 2866,+ timestampMs: 2586,+ confidence: null,+ },+ {+ text: ' mode',+ startMs: 2866,+ endMs: 3090,+ timestampMs: 2978,+ confidence: null,+ },+ {+ text: ' for',+ startMs: 3090,+ endMs: 3239,+ timestampMs: 3165,+ confidence: null,+ },+ {+ text: ' the',+ startMs: 3239,+ endMs: 3407,+ timestampMs: 3323,+ confidence: null,+ },+ {+ text: ' Remotion',+ startMs: 3407,+ endMs: 4060,+ timestampMs: 3734,+ confidence: null,+ },+ {+ text: ' Studio',+ startMs: 4060,+ endMs: 4714,+ timestampMs: 4387,+ confidence: null,+ },+ {+ text: ' which',+ startMs: 5075,+ endMs: 5236,+ timestampMs: 5156,+ confidence: null,+ },+ {+ text: ' will',+ startMs: 5236,+ endMs: 5413,+ timestampMs: 5325,+ confidence: null,+ },+ {+ text: ' allow',+ startMs: 5413,+ endMs: 5590,+ timestampMs: 5502,+ confidence: null,+ },+ {+ text: ' you',+ startMs: 5590,+ endMs: 5735,+ timestampMs: 5663,+ confidence: null,+ },+ {+ text: ' to',+ startMs: 5735,+ endMs: 5815,+ timestampMs: 5775,+ confidence: null,+ },+ {+ text: ' interactively',+ startMs: 6233,+ endMs: 6957,+ timestampMs: 6595,+ confidence: null,+ },+ {+ text: ' change',+ startMs: 6957,+ endMs: 7584,+ timestampMs: 7271,+ confidence: null,+ },+ {+ text: ' many',+ startMs: 7864,+ endMs: 8168,+ timestampMs: 8016,+ confidence: null,+ },+ {+ text: ' things',+ startMs: 8168,+ endMs: 8472,+ timestampMs: 8320,+ confidence: null,+ },+ {+ text: ' about',+ startMs: 8472,+ endMs: 8718,+ timestampMs: 8595,+ confidence: null,+ },+ {+ text: ' your',+ startMs: 8718,+ endMs: 9098,+ timestampMs: 8908,+ confidence: null,+ },+ {+ text: ' video',+ startMs: 9098,+ endMs: 9648,+ timestampMs: 9373,+ confidence: null,+ },+ {+ text: ' while',+ startMs: 10036,+ endMs: 10287,+ timestampMs: 10162,+ confidence: null,+ },+ {+ text: ' still',+ startMs: 10287,+ endMs: 10749,+ timestampMs: 10518,+ confidence: null,+ },+ {+ text: ' writing',+ startMs: 10749,+ endMs: 11253,+ timestampMs: 11001,+ confidence: null,+ },+ {+ text: ' everything',+ startMs: 11253,+ endMs: 11925,+ timestampMs: 11589,+ confidence: null,+ },+ {+ text: ' back',+ startMs: 11925,+ endMs: 11985,+ timestampMs: 11955,+ confidence: null,+ },+ {+ text: ' as',+ startMs: 12110,+ endMs: 12617,+ timestampMs: 12364,+ confidence: null,+ },+ {+ text: ' regular',+ startMs: 12617,+ endMs: 13189,+ timestampMs: 12903,+ confidence: null,+ },+ {+ text: ' React',+ startMs: 13189,+ endMs: 13630,+ timestampMs: 13410,+ confidence: null,+ },+ {+ text: ' code.',+ startMs: 13630,+ endMs: 13718,+ timestampMs: 13674,+ confidence: null,+ pageBreakAfter: true,+ },+ ]}+ />++ <Audio+ name="Shutter"+ src="https://remotion.media/shutter-old.wav"+ from={28}+ volume={0.3}+ />+ <Audio+ name="Request 1"+ src="https://remotion.media/snapchat-notification.wav"+ from={92}+ volume={0.12}+ />+ <Audio+ name="Request 2"+ src="https://remotion.media/snapchat-notification.wav"+ from={116}+ volume={0.1}+ />+ <Audio+ name="Request 3"+ src="https://remotion.media/snapchat-notification.wav"+ from={146}+ volume={0.1}+ />+ <Audio+ name="Split whoosh"+ src="https://remotion.media/whoosh.wav"+ from={182}+ volume={0.22}+ />+ <Audio+ name="Reveal whoosh"+ src="https://remotion.media/whoosh.wav"+ from={516}+ volume={0.36}+ />+ <Audio+ name="Visual mode toggle"+ src="https://remotion.media/switch.wav"+ from={554}+ volume={0.3}+ />+ <Audio+ name="Select click"+ src="https://remotion.media/mouse-click.wav"+ from={618}+ volume={0.32}+ />+ <Audio+ name="Color click"+ src="https://remotion.media/mouse-click.wav"+ from={798}+ volume={0.3}+ />+ <Audio+ name="Saved ding"+ src="https://remotion.media/ding.wav"+ from={820}+ volume={0.22}+ />+ </AbsoluteFill>+ );+};diff --git a/packages/example/src/WhatsNew/scenes/SoundEffects.tsx b/packages/example/src/WhatsNew/scenes/SoundEffects.tsxnew file mode 100644index 0000000000..90847008cc--- /dev/null+++ b/packages/example/src/WhatsNew/scenes/SoundEffects.tsx@@ -0,0 +1,1475 @@+import {Audio, Video} from '@remotion/media';+import React from 'react';+import {+ AbsoluteFill,+ interpolate,+ Sequence,+ Series,+ useCurrentFrame,+} from 'remotion';+import {easeInOut, pop, rise, typed} from '../anim';+import {Backdrop} from '../components/Background';+import {PunchyCaptions} from '../components/Captions';+import {WaveBars} from '../components/fx';+import {ChatIcon, CheckIcon, SpeakerIcon, XIcon} from '../components/icons';+import {+ getCaptionPlacement,+ Punch,+ Stage,+ type LayoutKeyframe,+} from '../components/Stage';+import {+ ChapterSticker,+ CheckBadge,+ Chip,+ CodeLines,+ Label,+ Panel,+ Pop,+ Stamp,+ syntax,+ Window,+} from '../components/ui';+import {display, mono} from '../fonts';+import {accents, colors} from '../theme';++const layout: LayoutKeyframe[] = [+ {at: 0, layout: 'full'},+ {at: 34, layout: 'split'},+ {at: 724, layout: 'full'},+ {at: 882, layout: 'split'},+];++const library = [+ 'whoosh.wav',+ 'whip.wav',+ 'page-turn.wav',+ 'switch.wav',+ 'mouse-click.wav',+ 'shutter-modern.wav',+ 'shutter-old.wav',+];++const AiSearchFail: React.FC = () => {+ const frame = useCurrentFrame();+ const prompt = 'Find me a free whoosh sound effect';+ const results = [+ {text: 'Sign up to download', note: 'Paywall'},+ {text: 'Attribution required', note: 'License'},+ {text: '404 — link is dead', note: 'Broken'},+ ];+ return (+ <Panel style={{alignItems: 'stretch', padding: '0 30px', gap: 26}}>+ <Pop from="up" style={{alignSelf: 'flex-end'}}>+ <div+ style={{+ backgroundColor: colors.blue,+ color: colors.paper,+ fontFamily: display,+ fontWeight: 700,+ fontSize: 36,+ padding: '22px 30px',+ borderRadius: '30px 30px 8px 30px',+ maxWidth: 640,+ boxShadow: '0 18px 40px rgba(11,132,243,0.35)',+ }}+ >+ {typed(frame, prompt, 4, 1.4)}+ </div>+ </Pop>+ <Pop from="up" delay={30}>+ <div+ style={{+ backgroundColor: colors.paper,+ borderRadius: '30px 30px 30px 8px',+ padding: '26px 30px',+ boxShadow: '0 24px 60px rgba(10,16,32,0.18)',+ display: 'flex',+ flexDirection: 'column',+ gap: 18,+ }}+ >+ <Label>AI assistant</Label>+ {results.map((r, i) => {+ const p = pop(frame, 41 + i * 14, 12);+ return (+ <div+ key={r.text}+ style={{+ display: 'flex',+ alignItems: 'center',+ gap: 20,+ opacity: Math.min(1, p * 2),+ translate: `${(1 - p) * 40}px 0px`,+ }}+ >+ <div+ style={{+ width: 58,+ height: 58,+ borderRadius: 16,+ backgroundColor: '#FDECEC',+ display: 'flex',+ alignItems: 'center',+ justifyContent: 'center',+ }}+ >+ <XIcon size={34} color={colors.danger} strokeWidth={3} />+ </div>+ <div+ style={{+ fontFamily: display,+ fontWeight: 700,+ fontSize: 36,+ color: colors.ink,+ flex: 1,+ }}+ >+ {r.text}+ </div>+ <div+ style={{+ fontFamily: mono,+ fontSize: 24,+ color: colors.danger,+ }}+ >+ {r.note}+ </div>+ </div>+ );+ })}+ </div>+ </Pop>+ <Stamp+ color={colors.danger}+ delay={84}+ rotate={-10}+ style={{alignSelf: 'center', marginTop: 10}}+ >+ Not helpful+ </Stamp>+ </Panel>+ );+};++const Library: React.FC = () => {+ const frame = useCurrentFrame();+ return (+ <Panel style={{gap: 16}}>+ <Pop+ from="up"+ delay={20}+ style={{alignSelf: 'flex-start', marginLeft: 20}}+ >+ <Label>remotion.media</Label>+ <div+ style={{+ fontFamily: display,+ fontWeight: 700,+ fontSize: 64,+ letterSpacing: '-0.03em',+ color: colors.ink,+ }}+ >+ Our own SFX library+ </div>+ </Pop>+ <div+ style={{+ display: 'flex',+ flexDirection: 'column',+ gap: 12,+ position: 'relative',+ }}+ >+ {library.map((name, i) => {+ const p = pop(frame, 36 + i * 5, 12);+ return (+ <div+ key={name}+ style={{+ width: 780,+ height: 80,+ borderRadius: 22,+ backgroundColor: colors.paper,+ boxShadow: '0 10px 26px rgba(10,16,32,0.12)',+ display: 'flex',+ alignItems: 'center',+ padding: '0 26px',+ boxSizing: 'border-box',+ gap: 22,+ opacity: Math.min(1, p * 2),+ translate: `${(1 - p) * -60}px 0px`,+ }}+ >+ <div+ style={{+ width: 50,+ height: 50,+ borderRadius: 25,+ backgroundColor: accents.soundEffects,+ display: 'flex',+ alignItems: 'center',+ justifyContent: 'center',+ }}+ >+ <SpeakerIcon size={30} color={colors.paper} />+ </div>+ <div+ style={{+ fontFamily: mono,+ fontWeight: 600,+ fontSize: 30,+ color: colors.ink,+ flex: 1,+ }}+ >+ {name}+ </div>+ <WaveBars+ seed={name}+ bars={22}+ height={46}+ color={`${accents.soundEffects}AA`}+ />+ </div>+ );+ })}+ <Stamp+ color={colors.success}+ delay={180}+ rotate={12}+ fontSize={72}+ style={{position: 'absolute', right: -30, top: 90}}+ >+ Free+ </Stamp>+ </div>+ <Pop delay={199} from="up">+ <Chip+ background={colors.ink}+ color={colors.paper}+ icon={<CheckIcon size={36} color={colors.success} strokeWidth={3} />}+ >+ No attribution required+ </Chip>+ </Pop>+ </Panel>+ );+};++const Hotlink: React.FC = () => (+ <Panel>+ <Pop from="up" delay={2}>+ <Label style={{textAlign: 'center', marginBottom: 6}}>+ Hosted on our domain+ </Label>+ </Pop>+ <Pop from="up" delay={4}>+ <Window title="MyVideo.tsx" width={820} fontSize={30}>+ <CodeLines+ start={8}+ speed={1.5}+ highlightLine={1}+ highlightFrom={69}+ lines={[+ [+ ['<', syntax.punct],+ ['Audio', syntax.tag],+ ],+ [+ [' src', syntax.attr],+ ['=', syntax.punct],+ ['"https://remotion.media/whoosh.wav"', syntax.string],+ ],+ [['/>', syntax.punct]],+ ]}+ />+ </Window>+ </Pop>+ <Pop delay={68} from="up">+ <Chip+ background={accents.soundEffects}+ color={colors.paper}+ icon={<SpeakerIcon size={34} color={colors.paper} />}+ >+ Just hotlink it+ </Chip>+ </Pop>+ </Panel>+);++const levels = [0.42, 0.95, 0.6, 0.3, 0.78, 0.52, 0.86];++const Loudness: React.FC = () => {+ const frame = useCurrentFrame();+ const normalize = interpolate(frame, [95, 125], [0, 1], {+ extrapolateLeft: 'clamp',+ extrapolateRight: 'clamp',+ easing: easeInOut,+ });+ const line = rise(frame, 110, 14);+ return (+ <Panel style={{gap: 34}}>+ <Pop from="up">+ <div+ style={{+ fontFamily: display,+ fontWeight: 700,+ fontSize: 64,+ letterSpacing: '-0.03em',+ color: colors.ink,+ textAlign: 'center',+ }}+ >+ Same loudness+ </div>+ </Pop>+ <Pop from="up" delay={4}>+ <div+ style={{+ width: 780,+ height: 470,+ borderRadius: 34,+ backgroundColor: colors.paper,+ boxShadow: '0 24px 60px rgba(10,16,32,0.16)',+ position: 'relative',+ display: 'flex',+ alignItems: 'flex-end',+ justifyContent: 'space-between',+ padding: '70px 50px 40px',+ boxSizing: 'border-box',+ }}+ >+ <div+ style={{+ position: 'absolute',+ left: 40,+ right: 40,+ top: 70 + (1 - 0.9) * 360 - 3,+ borderTop: `4px dashed ${colors.success}`,+ opacity: line,+ }}+ />+ <div+ style={{+ position: 'absolute',+ right: 44,+ top: 18,+ fontFamily: mono,+ fontWeight: 600,+ fontSize: 26,+ color: colors.success,+ opacity: line,+ }}+ >+ peak −3 dB+ </div>+ {levels.map((level, i) => {+ const grow = rise(frame, 8 + i * 4, 16);+ const h = interpolate(normalize, [0, 1], [level, 0.9]) * 360 * grow;+ return (+ <div+ key={i}+ style={{+ width: 74,+ height: h,+ borderRadius: 18,+ background: `linear-gradient(180deg, ${accents.soundEffects}, #B7A6FF)`,+ }}+ />+ );+ })}+ </div>+ </Pop>+ <Pop delay={162} from="up">+ <div style={{display: 'flex', alignItems: 'center', gap: 18}}>+ <CheckBadge delay={162} size={60} />+ <div+ style={{+ fontFamily: display,+ fontWeight: 700,+ fontSize: 40,+ color: colors.ink,+ }}+ >+ Standardized+ </div>+ </div>+ </Pop>+ </Panel>+ );+};++const SevenCallout: React.FC = () => {+ const frame = useCurrentFrame();+ const p = pop(frame, 8, 9);+ return (+ <div+ style={{+ position: 'absolute',+ left: 120,+ top: 250,+ display: 'flex',+ flexDirection: 'column',+ alignItems: 'center',+ gap: 18,+ opacity: Math.min(1, p * 2),+ scale: 0.3 + 0.7 * p,+ rotate: `${(1 - p) * -20}deg`,+ }}+ >+ <div+ style={{+ width: 300,+ height: 300,+ borderRadius: 150,+ backgroundColor: accents.soundEffects,+ color: colors.paper,+ display: 'flex',+ alignItems: 'center',+ justifyContent: 'center',+ fontFamily: display,+ fontWeight: 700,+ fontSize: 220,+ lineHeight: 1,+ paddingBottom: 16,+ boxSizing: 'border-box',+ boxShadow:+ '0 30px 70px rgba(124,92,255,0.5), inset 0 0 0 10px rgba(255,255,255,0.9)',+ }}+ >+ 7+ </div>+ <Chip fontSize={34}>sound effects to start</Chip>+ </div>+ );+};++const MoreComing: React.FC = () => (+ <div+ style={{+ position: 'absolute',+ left: 110,+ top: 690,+ display: 'flex',+ gap: 14,+ }}+ >+ {['+ more', '+ more', '+ more'].map((t, i) => (+ <Pop key={i} delay={i * 5} rotate={i % 2 === 0 ? -6 : 6}>+ <Chip background={colors.ink} color={colors.paper} fontSize={32}>+ {t}+ </Chip>+ </Pop>+ ))}+ </div>+);++const CallForSources: React.FC = () => (+ <Panel>+ <Pop from="up" delay={8}>+ <div+ style={{+ width: 760,+ backgroundColor: colors.paper,+ borderRadius: 40,+ padding: '46px 50px',+ boxSizing: 'border-box',+ boxShadow: '0 30px 70px rgba(10,16,32,0.18)',+ display: 'flex',+ flexDirection: 'column',+ gap: 22,+ }}+ >+ <div+ style={{+ width: 96,+ height: 96,+ borderRadius: 28,+ backgroundColor: accents.soundEffects,+ display: 'flex',+ alignItems: 'center',+ justifyContent: 'center',+ }}+ >+ <ChatIcon size={56} color={colors.paper} />+ </div>+ <div+ style={{+ fontFamily: display,+ fontWeight: 700,+ fontSize: 62,+ lineHeight: 1.05,+ letterSpacing: '-0.03em',+ color: colors.ink,+ }}+ >+ Know where to find great free sound effects?+ </div>+ <div style={{fontFamily: mono, fontSize: 28, color: colors.muted}}>+ Freely available to anybody+ </div>+ </div>+ </Pop>+ <Pop delay={216} from="up">+ <Chip+ background={colors.blue}+ color={colors.paper}+ fontSize={40}+ style={{padding: '20px 38px 22px'}}+ >+ Let us know →+ </Chip>+ </Pop>+ </Panel>+);++export const SoundEffectsScene: React.FC = () => {+ const frame = useCurrentFrame();+ const captions = getCaptionPlacement(frame, layout);++ return (+ <AbsoluteFill>+ <Backdrop accent={accents.soundEffects} />+ <Stage keyframes={layout}>+ <Series>+ <Series.Sequence+ name="AI is bad at finding them"+ durationInFrames={154}+ premountFor={30}+ >+ <Punch zoom={1}>+ <Video+ src={+ 'https://remotion.media/announcements/whats-new-in-remotion/cursor/footage/whats3.mp4'+ }+ trimBefore={94}+ />+ </Punch>+ </Series.Sequence>+ <Series.Sequence+ name="Our own library"+ durationInFrames={256}+ premountFor={30}+ >+ <Punch zoom={1.14}>+ <Video+ src={+ 'https://remotion.media/announcements/whats-new-in-remotion/cursor/footage/whats3.mp4'+ }+ trimBefore={256}+ />+ </Punch>+ </Series.Sequence>+ <Series.Sequence+ name="Hotlink"+ durationInFrames={114}+ premountFor={30}+ >+ <Punch zoom={1.02}>+ <Video+ src={+ 'https://remotion.media/announcements/whats-new-in-remotion/cursor/footage/whats3.mp4'+ }+ trimBefore={533}+ />+ </Punch>+ </Series.Sequence>+ <Series.Sequence+ name="Same loudness"+ durationInFrames={136}+ premountFor={30}+ >+ <Punch zoom={1.16}>+ <Video+ src={+ 'https://remotion.media/announcements/whats-new-in-remotion/cursor/footage/whats3.mp4'+ }+ trimBefore={658}+ />+ </Punch>+ </Series.Sequence>+ <Series.Sequence+ name="Standardized"+ durationInFrames={68}+ premountFor={30}+ >+ <Punch zoom={1.04}>+ <Video+ src={+ 'https://remotion.media/announcements/whats-new-in-remotion/cursor/footage/whats3.mp4'+ }+ trimBefore={805}+ />+ </Punch>+ </Series.Sequence>+ <Series.Sequence+ name="Seven to start"+ durationInFrames={373}+ premountFor={30}+ >+ <Punch zoom={1.2}>+ <Video+ src={+ 'https://remotion.media/announcements/whats-new-in-remotion/cursor/footage/whats3.mp4'+ }+ trimBefore={894}+ />+ </Punch>+ </Series.Sequence>+ <Series.Sequence+ name="Let us know"+ durationInFrames={51}+ premountFor={30}+ >+ <Punch zoom={1.04}>+ <Video+ src={+ 'https://remotion.media/announcements/whats-new-in-remotion/cursor/footage/whats3.mp4'+ }+ trimBefore={1279}+ />+ </Punch>+ </Series.Sequence>+ </Series>+ </Stage>++ <Sequence name="Chapter sticker" from={2} durationInFrames={52}>+ <ChapterSticker+ index="02"+ title="Sound effects"+ accent={accents.soundEffects}+ />+ </Sequence>+ <Sequence name="AI search fail" from={40} durationInFrames={114}>+ <AiSearchFail />+ </Sequence>+ <Sequence name="Library" from={154} durationInFrames={256}>+ <Library />+ </Sequence>+ <Sequence name="Hotlink" from={410} durationInFrames={114}>+ <Hotlink />+ </Sequence>+ <Sequence name="Loudness" from={524} durationInFrames={202}>+ <Loudness />+ </Sequence>+ <Sequence name="Seven" from={770} durationInFrames={112}>+ <SevenCallout />+ </Sequence>+ <Sequence name="More coming" from={838} durationInFrames={44}>+ <MoreComing />+ </Sequence>+ <Sequence name="Call for sources" from={884} durationInFrames={268}>+ <CallForSources />+ </Sequence>++ <PunchyCaptions+ width={captions.width}+ fontSize={captions.fontSize}+ style={captions.style}+ keywords={[+ 'free',+ 'attribution',+ 'hotlink',+ 'loudness',+ 'seven',+ 'anybody',+ ]}+ captions={[+ // @captions whats3+ {+ text: 'Sound',+ startMs: 140,+ endMs: 316,+ timestampMs: 228,+ confidence: null,+ },+ {+ text: ' effects.',+ startMs: 316,+ endMs: 1028,+ timestampMs: 672,+ confidence: null,+ pageBreakAfter: true,+ },+ {+ text: ' Unfortunately,',+ startMs: 1310,+ endMs: 1674,+ timestampMs: 1492,+ confidence: null,+ pageBreakAfter: true,+ },+ {+ text: ' AI',+ startMs: 2015,+ endMs: 2425,+ timestampMs: 2220,+ confidence: null,+ },+ {+ text: ' is',+ startMs: 2425,+ endMs: 2698,+ timestampMs: 2562,+ confidence: null,+ },+ {+ text: ' pretty',+ startMs: 2698,+ endMs: 2994,+ timestampMs: 2846,+ confidence: null,+ },+ {+ text: ' bad',+ startMs: 2994,+ endMs: 3245,+ timestampMs: 3120,+ confidence: null,+ },+ {+ text: ' at',+ startMs: 3245,+ endMs: 3677,+ timestampMs: 3461,+ confidence: null,+ },+ {+ text: ' finding',+ startMs: 3677,+ endMs: 4041,+ timestampMs: 3859,+ confidence: null,+ },+ {+ text: ' them',+ startMs: 4041,+ endMs: 4542,+ timestampMs: 4292,+ confidence: null,+ },+ {+ text: ' online,',+ startMs: 4542,+ endMs: 5020,+ timestampMs: 4781,+ confidence: null,+ pageBreakAfter: true,+ },+ {+ text: ' so',+ startMs: 5222,+ endMs: 5622,+ timestampMs: 5422,+ confidence: null,+ },+ {+ text: ' we',+ startMs: 5921,+ endMs: 6025,+ timestampMs: 5973,+ confidence: null,+ },+ {+ text: ' are',+ startMs: 6025,+ endMs: 6336,+ timestampMs: 6181,+ confidence: null,+ },+ {+ text: ' making',+ startMs: 6336,+ endMs: 6612,+ timestampMs: 6474,+ confidence: null,+ },+ {+ text: ' our',+ startMs: 6612,+ endMs: 7043,+ timestampMs: 6828,+ confidence: null,+ },+ {+ text: ' own',+ startMs: 7043,+ endMs: 7492,+ timestampMs: 7268,+ confidence: null,+ },+ {+ text: ' library',+ startMs: 7492,+ endMs: 7768,+ timestampMs: 7630,+ confidence: null,+ },+ {+ text: ' of',+ startMs: 7768,+ endMs: 7992,+ timestampMs: 7880,+ confidence: null,+ },+ {+ text: ' sound',+ startMs: 7992,+ endMs: 8320,+ timestampMs: 8156,+ confidence: null,+ },+ {+ text: ' effects',+ startMs: 8320,+ endMs: 8803,+ timestampMs: 8562,+ confidence: null,+ },+ {+ text: ' that',+ startMs: 9218,+ endMs: 9352,+ timestampMs: 9285,+ confidence: null,+ },+ {+ text: ' anybody',+ startMs: 9559,+ endMs: 9838,+ timestampMs: 9699,+ confidence: null,+ },+ {+ text: ' can',+ startMs: 9838,+ endMs: 10156,+ timestampMs: 9997,+ confidence: null,+ },+ {+ text: ' use',+ startMs: 10156,+ endMs: 10514,+ timestampMs: 10335,+ confidence: null,+ },+ {+ text: ' for',+ startMs: 10777,+ endMs: 11138,+ timestampMs: 10958,+ confidence: null,+ },+ {+ text: ' free',+ startMs: 11138,+ endMs: 11439,+ timestampMs: 11289,+ confidence: null,+ },+ {+ text: ' with',+ startMs: 11439,+ endMs: 11780,+ timestampMs: 11610,+ confidence: null,+ },+ {+ text: ' no',+ startMs: 11780,+ endMs: 12563,+ timestampMs: 12172,+ confidence: null,+ },+ {+ text: ' attribution',+ startMs: 12563,+ endMs: 13326,+ timestampMs: 12945,+ confidence: null,+ },+ {+ text: ' required.',+ startMs: 13326,+ endMs: 13506,+ timestampMs: 13416,+ confidence: null,+ pageBreakAfter: true,+ },+ {+ text: ' We',+ startMs: 13760,+ endMs: 13934,+ timestampMs: 13847,+ confidence: null,+ },+ {+ text: ' host',+ startMs: 13934,+ endMs: 14074,+ timestampMs: 14004,+ confidence: null,+ },+ {+ text: ' them',+ startMs: 14074,+ endMs: 14231,+ timestampMs: 14153,+ confidence: null,+ },+ {+ text: ' on',+ startMs: 14231,+ endMs: 14616,+ timestampMs: 14424,+ confidence: null,+ },+ {+ text: ' our',+ startMs: 14616,+ endMs: 14948,+ timestampMs: 14782,+ confidence: null,+ },+ {+ text: ' domain,',+ startMs: 14948,+ endMs: 15140,+ timestampMs: 15044,+ confidence: null,+ pageBreakAfter: true,+ },+ {+ text: ' you',+ startMs: 15332,+ endMs: 15472,+ timestampMs: 15402,+ confidence: null,+ },+ {+ text: ' can',+ startMs: 15472,+ endMs: 15647,+ timestampMs: 15560,+ confidence: null,+ },+ {+ text: ' just',+ startMs: 15647,+ endMs: 15961,+ timestampMs: 15804,+ confidence: null,+ },+ {+ text: ' hotlink',+ startMs: 15961,+ endMs: 16276,+ timestampMs: 16119,+ confidence: null,+ },+ {+ text: ' the',+ startMs: 16276,+ endMs: 16451,+ timestampMs: 16364,+ confidence: null,+ },+ {+ text: ' sound',+ startMs: 16451,+ endMs: 16818,+ timestampMs: 16635,+ confidence: null,+ },+ {+ text: ' effects',+ startMs: 16818,+ endMs: 17377,+ timestampMs: 17098,+ confidence: null,+ },+ {+ text: ' and',+ startMs: 17545,+ endMs: 17670,+ timestampMs: 17608,+ confidence: null,+ },+ {+ text: ' we',+ startMs: 17670,+ endMs: 17992,+ timestampMs: 17831,+ confidence: null,+ },+ {+ text: ' also',+ startMs: 17992,+ endMs: 18242,+ timestampMs: 18117,+ confidence: null,+ },+ {+ text: ' make',+ startMs: 18242,+ endMs: 18528,+ timestampMs: 18385,+ confidence: null,+ },+ {+ text: ' sure',+ startMs: 18528,+ endMs: 18992,+ timestampMs: 18760,+ confidence: null,+ },+ {+ text: ' that',+ startMs: 18992,+ endMs: 19314,+ timestampMs: 19153,+ confidence: null,+ },+ {+ text: ' all',+ startMs: 19314,+ endMs: 19456,+ timestampMs: 19385,+ confidence: null,+ },+ {+ text: ' the',+ startMs: 19456,+ endMs: 19599,+ timestampMs: 19528,+ confidence: null,+ },+ {+ text: ' sound',+ startMs: 19599,+ endMs: 19849,+ timestampMs: 19724,+ confidence: null,+ },+ {+ text: ' effects',+ startMs: 19849,+ endMs: 20046,+ timestampMs: 19948,+ confidence: null,+ },+ {+ text: ' have',+ startMs: 20046,+ endMs: 20171,+ timestampMs: 20109,+ confidence: null,+ },+ {+ text: ' the',+ startMs: 20224,+ endMs: 20284,+ timestampMs: 20254,+ confidence: null,+ },+ {+ text: ' same',+ startMs: 20635,+ endMs: 21082,+ timestampMs: 20859,+ confidence: null,+ },+ {+ text: ' loudness',+ startMs: 21082,+ endMs: 21903,+ timestampMs: 21493,+ confidence: null,+ },+ {+ text: ' to',+ startMs: 22096,+ endMs: 22220,+ timestampMs: 22158,+ confidence: null,+ },+ {+ text: ' get',+ startMs: 22220,+ endMs: 22353,+ timestampMs: 22287,+ confidence: null,+ },+ {+ text: ' that',+ startMs: 22353,+ endMs: 22628,+ timestampMs: 22491,+ confidence: null,+ },+ {+ text: ' standardized',+ startMs: 22869,+ endMs: 23280,+ timestampMs: 23075,+ confidence: null,+ },+ {+ text: ' as',+ startMs: 23280,+ endMs: 23508,+ timestampMs: 23394,+ confidence: null,+ },+ {+ text: ' well.',+ startMs: 23508,+ endMs: 24102,+ timestampMs: 23805,+ confidence: null,+ pageBreakAfter: true,+ },+ {+ text: ' For',+ startMs: 24345,+ endMs: 24617,+ timestampMs: 24481,+ confidence: null,+ },+ {+ text: ' now',+ startMs: 24617,+ endMs: 24852,+ timestampMs: 24735,+ confidence: null,+ },+ {+ text: ' we',+ startMs: 24852,+ endMs: 25088,+ timestampMs: 24970,+ confidence: null,+ },+ {+ text: ' start',+ startMs: 25088,+ endMs: 25269,+ timestampMs: 25179,+ confidence: null,+ },+ {+ text: ' with',+ startMs: 25269,+ endMs: 25631,+ timestampMs: 25450,+ confidence: null,+ },+ {+ text: ' only',+ startMs: 25631,+ endMs: 26011,+ timestampMs: 25821,+ confidence: null,+ },+ {+ text: ' seven',+ startMs: 26011,+ endMs: 26071,+ timestampMs: 26041,+ confidence: null,+ },+ {+ text: ' sound',+ startMs: 26265,+ endMs: 26537,+ timestampMs: 26401,+ confidence: null,+ },+ {+ text: ' effects',+ startMs: 26537,+ endMs: 26790,+ timestampMs: 26664,+ confidence: null,+ },+ {+ text: ' but',+ startMs: 26790,+ endMs: 26953,+ timestampMs: 26872,+ confidence: null,+ },+ {+ text: ' we',+ startMs: 26953,+ endMs: 27153,+ timestampMs: 27053,+ confidence: null,+ },+ {+ text: ' are',+ startMs: 27153,+ endMs: 27443,+ timestampMs: 27298,+ confidence: null,+ },+ {+ text: ' looking',+ startMs: 27443,+ endMs: 27696,+ timestampMs: 27570,+ confidence: null,+ },+ {+ text: ' to',+ startMs: 27696,+ endMs: 28040,+ timestampMs: 27868,+ confidence: null,+ },+ {+ text: ' add',+ startMs: 28040,+ endMs: 28384,+ timestampMs: 28212,+ confidence: null,+ },+ {+ text: ' more',+ startMs: 28384,+ endMs: 28928,+ timestampMs: 28656,+ confidence: null,+ },+ {+ text: ' so',+ startMs: 29374,+ endMs: 29568,+ timestampMs: 29471,+ confidence: null,+ },+ {+ text: ' if',+ startMs: 29768,+ endMs: 30107,+ timestampMs: 29938,+ confidence: null,+ },+ {+ text: ' you',+ startMs: 30107,+ endMs: 30701,+ timestampMs: 30404,+ confidence: null,+ },+ {+ text: ' know',+ startMs: 30701,+ endMs: 31006,+ timestampMs: 30854,+ confidence: null,+ },+ {+ text: ' how',+ startMs: 31006,+ endMs: 31227,+ timestampMs: 31117,+ confidence: null,+ },+ {+ text: ' to',+ startMs: 31227,+ endMs: 31481,+ timestampMs: 31354,+ confidence: null,+ },+ {+ text: ' source',+ startMs: 31481,+ endMs: 31956,+ timestampMs: 31719,+ confidence: null,+ },+ {+ text: ' good',+ startMs: 32451,+ endMs: 32697,+ timestampMs: 32574,+ confidence: null,+ },+ {+ text: ' sound',+ startMs: 32943,+ endMs: 33327,+ timestampMs: 33135,+ confidence: null,+ },+ {+ text: ' effects',+ startMs: 33327,+ endMs: 33834,+ timestampMs: 33581,+ confidence: null,+ },+ {+ text: ' that',+ startMs: 34297,+ endMs: 34444,+ timestampMs: 34371,+ confidence: null,+ },+ {+ text: ' we',+ startMs: 34444,+ endMs: 34591,+ timestampMs: 34518,+ confidence: null,+ },+ {+ text: ' can',+ startMs: 34591,+ endMs: 34771,+ timestampMs: 34681,+ confidence: null,+ },+ {+ text: ' make',+ startMs: 34771,+ endMs: 35065,+ timestampMs: 34918,+ confidence: null,+ },+ {+ text: ' freely',+ startMs: 35065,+ endMs: 35473,+ timestampMs: 35269,+ confidence: null,+ },+ {+ text: ' available',+ startMs: 35473,+ endMs: 35669,+ timestampMs: 35571,+ confidence: null,+ },+ {+ text: ' to',+ startMs: 35669,+ endMs: 36012,+ timestampMs: 35841,+ confidence: null,+ },+ {+ text: ' anybody',+ startMs: 36012,+ endMs: 36617,+ timestampMs: 36315,+ confidence: null,+ },+ {+ text: ' then',+ startMs: 36769,+ endMs: 36915,+ timestampMs: 36842,+ confidence: null,+ },+ {+ text: ' please',+ startMs: 36915,+ endMs: 37061,+ timestampMs: 36988,+ confidence: null,+ },+ {+ text: ' let',+ startMs: 37061,+ endMs: 37121,+ timestampMs: 37091,+ confidence: null,+ },+ {+ text: ' us',+ startMs: 37112,+ endMs: 37215,+ timestampMs: 37164,+ confidence: null,+ },+ {+ text: ' know.',+ startMs: 37215,+ endMs: 37938,+ timestampMs: 37577,+ confidence: null,+ pageBreakAfter: true,+ },+ ]}+ />++ <Audio+ name="Sticker ding"+ src="https://remotion.media/ding.wav"+ from={2}+ volume={0.22}+ />+ <Audio+ name="Split whip"+ src="https://remotion.media/whip.wav"+ from={32}+ volume={0.16}+ />+ <Audio+ name="Error"+ src="https://remotion.media/windows-xp-error.wav"+ from={124}+ volume={0.2}+ />+ <Audio+ name="Library whoosh"+ src="https://remotion.media/whoosh.wav"+ from={188}+ volume={0.22}+ />+ <Audio+ name="Library page turn"+ src="https://remotion.media/page-turn.wav"+ from={206}+ volume={0.3}+ />+ <Audio+ name="Free stamp"+ src="https://remotion.media/shutter-modern.wav"+ from={334}+ volume={0.22}+ />+ <Audio+ name="Hotlinked whoosh"+ src="https://remotion.media/whoosh.wav"+ from={504}+ volume={0.4}+ />+ <Audio+ name="Standardized ding"+ src="https://remotion.media/ding.wav"+ from={686}+ volume={0.2}+ />+ <Audio+ name="Seven pop"+ src="https://remotion.media/mouse-click.wav"+ from={778}+ volume={0.35}+ />+ <Audio+ name="Back to split"+ src="https://remotion.media/whip.wav"+ from={880}+ volume={0.16}+ />+ </AbsoluteFill>+ );+};diff --git a/packages/example/src/WhatsNew/scenes/Vercel.tsx b/packages/example/src/WhatsNew/scenes/Vercel.tsxnew file mode 100644index 0000000000..718451dccc--- /dev/null+++ b/packages/example/src/WhatsNew/scenes/Vercel.tsx@@ -0,0 +1,1284 @@+import {Audio, Video} from '@remotion/media';+import React from 'react';+import {+ AbsoluteFill,+ interpolate,+ Sequence,+ Series,+ useCurrentFrame,+} from 'remotion';+import {pop, rise} from '../anim';+import {Backdrop} from '../components/Background';+import {PunchyCaptions} from '../components/Captions';+import {BellIcon, BoxIcon, CheckIcon, TriangleIcon} from '../components/icons';+import {RemotionLogo} from '../components/Logo';+import {+ getCaptionPlacement,+ Punch,+ Stage,+ type LayoutKeyframe,+} from '../components/Stage';+import {+ ChapterSticker,+ CheckBadge,+ Chip,+ CodeLines,+ Label,+ Panel,+ Pop,+ Stamp,+ syntax,+ Window,+} from '../components/ui';+import {display, mono} from '../fonts';+import {colors} from '../theme';++const layout: LayoutKeyframe[] = [+ {at: 0, layout: 'full'},+ {at: 56, layout: 'split'},+ {at: 636, layout: 'full'},+ {at: 800, layout: 'split'},+];++const Partnership: React.FC = () => {+ const frame = useCurrentFrame();+ const x = pop(frame, 14, 10);+ return (+ <Panel style={{gap: 44}}>+ <div style={{display: 'flex', alignItems: 'center', gap: 46}}>+ <Pop from="left" delay={2}>+ <div+ style={{+ width: 250,+ height: 250,+ borderRadius: 60,+ backgroundColor: colors.paper,+ display: 'flex',+ alignItems: 'center',+ justifyContent: 'center',+ boxShadow: '0 26px 60px rgba(10,16,32,0.18)',+ }}+ >+ <RemotionLogo size={150} />+ </div>+ </Pop>+ <div+ style={{+ fontFamily: display,+ fontWeight: 700,+ fontSize: 90,+ color: colors.muted,+ scale: x,+ rotate: `${(1 - x) * 90}deg`,+ }}+ >+ ×+ </div>+ <Pop from="right" delay={8}>+ <div+ style={{+ width: 250,+ height: 250,+ borderRadius: 60,+ backgroundColor: colors.vercelBlack,+ display: 'flex',+ alignItems: 'center',+ justifyContent: 'center',+ boxShadow: '0 26px 60px rgba(10,16,32,0.35)',+ }}+ >+ <TriangleIcon size={140} color={colors.paper} />+ </div>+ </Pop>+ </div>+ <Pop from="up" delay={30}>+ <div+ style={{+ fontFamily: display,+ fontWeight: 700,+ fontSize: 64,+ letterSpacing: '-0.03em',+ color: colors.ink,+ textAlign: 'center',+ }}+ >+ Rendering on Vercel+ </div>+ </Pop>+ <Pop from="up" delay={148}>+ <Chip+ background={colors.ink}+ color={colors.paper}+ icon={<CheckIcon size={34} color={colors.success} strokeWidth={3} />}+ >+ Super smooth+ </Chip>+ </Pop>+ </Panel>+ );+};++const Sandbox: React.FC<{readonly index: number; readonly delay: number}> = ({+ index,+ delay,+}) => {+ const frame = useCurrentFrame();+ const progress = interpolate(+ frame,+ [delay + 10, delay + 110 + index * 18],+ [0, 1],+ {extrapolateLeft: 'clamp', extrapolateRight: 'clamp'},+ );+ const done = progress >= 1;+ return (+ <Pop delay={delay} from="up">+ <div+ style={{+ width: 250,+ borderRadius: 24,+ backgroundColor: colors.vercelBlack,+ padding: '22px 22px 24px',+ boxSizing: 'border-box',+ boxShadow: '0 20px 44px rgba(10,16,32,0.3)',+ display: 'flex',+ flexDirection: 'column',+ gap: 14,+ }}+ >+ <div style={{display: 'flex', alignItems: 'center', gap: 10}}>+ <TriangleIcon size={24} color={colors.paper} />+ <div style={{fontFamily: mono, fontSize: 22, color: '#A1A1AA'}}>+ sandbox-{index + 1}+ </div>+ </div>+ <div+ style={{+ height: 12,+ borderRadius: 6,+ backgroundColor: '#27272A',+ overflow: 'hidden',+ }}+ >+ <div+ style={{+ height: '100%',+ width: `${progress * 100}%`,+ backgroundColor: done ? colors.success : colors.blue,+ }}+ />+ </div>+ <div+ style={{+ fontFamily: mono,+ fontWeight: 600,+ fontSize: 24,+ color: done ? colors.success : colors.paper,+ }}+ >+ {done ? '✓ done' : `rendering ${Math.round(progress * 100)}%`}+ </div>+ </div>+ </Pop>+ );+};++const NewPackage: React.FC = () => (+ <Panel style={{gap: 30}}>+ <Pop from="up" delay={2}>+ <Window title="Terminal" width={820} fontSize={32}>+ <CodeLines+ start={14}+ speed={1.1}+ lines={[+ [+ ['$ ', syntax.prompt],+ ['npm i ', syntax.plain],+ ['@remotion/vercel', syntax.fn],+ ],+ ]}+ />+ <Pop delay={62} from="up">+ <div style={{color: syntax.prompt, marginTop: 6}}>+ ✓ added @remotion/vercel+ </div>+ </Pop>+ </Window>+ </Pop>+ <div style={{display: 'flex', gap: 20}}>+ <Sandbox index={0} delay={92} />+ <Sandbox index={1} delay={100} />+ <Sandbox index={2} delay={108} />+ </div>+ <Pop delay={190} from="up">+ <Chip+ background={colors.vercelBlack}+ color={colors.paper}+ icon={<TriangleIcon size={30} color={colors.paper} />}+ >+ Vercel Sandbox+ </Chip>+ </Pop>+ </Panel>+);++const StarterTemplate: React.FC = () => {+ const frame = useCurrentFrame();+ const items = ['Render on demand', 'Store in Vercel Blob', 'Progress UI'];+ return (+ <Panel style={{gap: 28}}>+ <Pop from="up" delay={2}>+ <Window title="Terminal" width={820} fontSize={30}>+ <CodeLines+ start={10}+ speed={1.6}+ lines={[+ [+ ['$ ', syntax.prompt],+ ['npx create-video@latest ', syntax.plain],+ ['--vercel', syntax.attr],+ ],+ ]}+ />+ </Window>+ </Pop>+ <Pop from="up" delay={30}>+ <div+ style={{+ width: 820,+ borderRadius: 34,+ backgroundColor: colors.paper,+ boxShadow: '0 26px 60px rgba(10,16,32,0.16)',+ padding: '32px 38px',+ boxSizing: 'border-box',+ display: 'flex',+ flexDirection: 'column',+ gap: 18,+ }}+ >+ <Label>Starter template</Label>+ <div+ style={{+ fontFamily: display,+ fontWeight: 700,+ fontSize: 50,+ letterSpacing: '-0.02em',+ color: colors.ink,+ }}+ >+ Next.js + Vercel Sandbox+ </div>+ {items.map((item, i) => {+ const p = rise(frame, 88 + i * 8, 12);+ return (+ <div+ key={item}+ style={{+ display: 'flex',+ alignItems: 'center',+ gap: 16,+ opacity: p,+ translate: `${(1 - p) * 30}px 0px`,+ }}+ >+ <CheckBadge delay={88 + i * 8} size={44} />+ <div+ style={{+ fontFamily: display,+ fontWeight: 500,+ fontSize: 36,+ color: colors.ink,+ }}+ >+ {item}+ </div>+ </div>+ );+ })}+ </div>+ </Pop>+ <Pop delay={128} from="up">+ <Chip+ background={colors.ink}+ color={colors.paper}+ icon={<BoxIcon size={34} color={colors.paper} />}+ >+ Set up out of the box+ </Chip>+ </Pop>+ </Panel>+ );+};++const options = [+ {name: 'AWS Lambda', note: '@remotion/lambda', highlight: false},+ {name: 'Google Cloud Run', note: '@remotion/cloudrun', highlight: false},+ {name: 'Vercel', note: '@remotion/vercel', highlight: true},+];++const SsrOptions: React.FC = () => {+ const frame = useCurrentFrame();+ return (+ <Panel style={{gap: 22}}>+ <Pop from="up">+ <div+ style={{+ fontFamily: display,+ fontWeight: 700,+ fontSize: 58,+ letterSpacing: '-0.03em',+ color: colors.ink,+ textAlign: 'center',+ marginBottom: 10,+ }}+ >+ Server-side rendering+ </div>+ </Pop>+ {options.map((o, i) => {+ const p = pop(frame, 6 + i * 7, 12);+ const glow = o.highlight ? rise(frame, 38, 14) : 0;+ return (+ <div+ key={o.name}+ style={{+ width: 780,+ height: 124,+ borderRadius: 30,+ backgroundColor: o.highlight ? colors.vercelBlack : colors.paper,+ color: o.highlight ? colors.paper : colors.ink,+ display: 'flex',+ alignItems: 'center',+ padding: '0 36px',+ boxSizing: 'border-box',+ gap: 24,+ opacity: Math.min(1, p * 2),+ scale: (0.8 + 0.2 * p) * (1 + glow * 0.04),+ boxShadow: o.highlight+ ? `0 0 0 ${6 * glow}px ${colors.blue}, 0 26px 60px rgba(10,16,32,0.35)`+ : '0 14px 34px rgba(10,16,32,0.12)',+ position: 'relative',+ }}+ >+ <div style={{flex: 1}}>+ <div+ style={{+ fontFamily: display,+ fontWeight: 700,+ fontSize: 44,+ }}+ >+ {o.name}+ </div>+ <div+ style={{+ fontFamily: mono,+ fontSize: 24,+ opacity: 0.65,+ }}+ >+ {o.note}+ </div>+ </div>+ {o.highlight ? (+ <Stamp color={colors.blue} delay={38} rotate={-6} fontSize={40}>+ Easiest+ </Stamp>+ ) : (+ <CheckIcon size={44} color={colors.success} strokeWidth={3} />+ )}+ </div>+ );+ })}+ </Panel>+ );+};++const TutorialSoon: React.FC = () => (+ <Panel>+ <Pop from="up" delay={2}>+ <div+ style={{+ width: 780,+ height: 440,+ borderRadius: 36,+ overflow: 'hidden',+ position: 'relative',+ background:+ 'linear-gradient(135deg, #111 0%, #1F2937 55%, #0B84F3 140%)',+ boxShadow: '0 30px 70px rgba(10,16,32,0.35)',+ display: 'flex',+ alignItems: 'center',+ justifyContent: 'center',+ }}+ >+ <div+ style={{+ position: 'absolute',+ left: 40,+ top: 36,+ display: 'flex',+ alignItems: 'center',+ gap: 16,+ }}+ >+ <RemotionLogo size={52} color={colors.paper} />+ <div+ style={{+ fontFamily: display,+ fontWeight: 700,+ fontSize: 34,+ color: colors.paper,+ }}+ >+ ×+ </div>+ <TriangleIcon size={40} color={colors.paper} />+ </div>+ <div+ style={{+ width: 140,+ height: 140,+ borderRadius: 70,+ backgroundColor: colors.paper,+ display: 'flex',+ alignItems: 'center',+ justifyContent: 'center',+ }}+ >+ <svg width={60} height={60} viewBox="0 0 24 24">+ <path d="M8 5v14l11-7z" fill={colors.ink} />+ </svg>+ </div>+ <div+ style={{+ position: 'absolute',+ left: 40,+ bottom: 34,+ fontFamily: display,+ fontWeight: 700,+ fontSize: 46,+ color: colors.paper,+ }}+ >+ Server-side rendering on Vercel+ </div>+ </div>+ </Pop>+ <Pop delay={28} from="up">+ <Chip+ background={colors.blue}+ color={colors.paper}+ icon={<BellIcon size={34} color={colors.paper} />}+ >+ Tutorial coming soon+ </Chip>+ </Pop>+ </Panel>+);++const FirstClass: React.FC = () => (+ <div style={{position: 'absolute', left: 130, top: 330}}>+ <Stamp color={colors.blue} rotate={-8} fontSize={84}>+ First-class+ </Stamp>+ </div>+);++export const VercelScene: React.FC = () => {+ const frame = useCurrentFrame();+ const captions = getCaptionPlacement(frame, layout);++ return (+ <AbsoluteFill>+ <Backdrop accent="#6B7280" />+ <Stage keyframes={layout}>+ <Series>+ <Series.Sequence+ name="Render on Vercel"+ durationInFrames={59}+ premountFor={30}+ >+ <Punch zoom={1}>+ <Video+ src={+ 'https://remotion.media/announcements/whats-new-in-remotion/cursor/footage/whats4.mp4'+ }+ trimBefore={63}+ />+ </Punch>+ </Series.Sequence>+ <Series.Sequence+ name="Working with Vercel"+ durationInFrames={178}+ premountFor={30}+ >+ <Punch zoom={1.12}>+ <Video+ src={+ 'https://remotion.media/announcements/whats-new-in-remotion/cursor/footage/whats4.mp4'+ }+ trimBefore={134}+ />+ </Punch>+ </Series.Sequence>+ <Series.Sequence+ name="New package"+ durationInFrames={246}+ premountFor={30}+ >+ <Punch zoom={1}>+ <Video+ src={+ 'https://remotion.media/announcements/whats-new-in-remotion/cursor/footage/whats4.mp4'+ }+ trimBefore={328}+ />+ </Punch>+ </Series.Sequence>+ <Series.Sequence+ name="Starter template"+ durationInFrames={73}+ premountFor={30}+ >+ <Punch zoom={1.16}>+ <Video+ src={+ 'https://remotion.media/announcements/whats-new-in-remotion/cursor/footage/whats4.mp4'+ }+ trimBefore={585}+ />+ </Punch>+ </Series.Sequence>+ <Series.Sequence+ name="Out of the box"+ durationInFrames={80}+ premountFor={30}+ >+ <Punch zoom={1.03}>+ <Video+ src={+ 'https://remotion.media/announcements/whats-new-in-remotion/cursor/footage/whats4.mp4'+ }+ trimBefore={667}+ />+ </Punch>+ </Series.Sequence>+ <Series.Sequence+ name="First-class SSR"+ durationInFrames={168}+ premountFor={30}+ >+ <Punch zoom={1.18}>+ <Video+ src={+ 'https://remotion.media/announcements/whats-new-in-remotion/cursor/footage/whats4.mp4'+ }+ trimBefore={762}+ />+ </Punch>+ </Series.Sequence>+ <Series.Sequence+ name="Easiest way"+ durationInFrames={236}+ premountFor={30}+ >+ <Punch zoom={1.02}>+ <Video+ src={+ 'https://remotion.media/announcements/whats-new-in-remotion/cursor/footage/whats4.mp4'+ }+ trimBefore={944}+ />+ </Punch>+ </Series.Sequence>+ </Series>+ </Stage>++ <Sequence name="Chapter sticker" from={2} durationInFrames={62}>+ <ChapterSticker+ index="03"+ title="Render on Vercel"+ accent={colors.vercelBlack}+ />+ </Sequence>+ <Sequence name="Partnership" from={62} durationInFrames={175}>+ <Partnership />+ </Sequence>+ <Sequence name="New package" from={237} durationInFrames={246}>+ <NewPackage />+ </Sequence>+ <Sequence name="Starter template" from={483} durationInFrames={153}>+ <StarterTemplate />+ </Sequence>+ <Sequence name="First-class stamp" from={664} durationInFrames={136}>+ <FirstClass />+ </Sequence>+ <Sequence name="SSR options" from={806} durationInFrames={138}>+ <SsrOptions />+ </Sequence>+ <Sequence name="Tutorial soon" from={944} durationInFrames={96}>+ <TutorialSoon />+ </Sequence>++ <PunchyCaptions+ width={captions.width}+ fontSize={captions.fontSize}+ style={captions.style}+ keywords={[+ 'vercel',+ 'vercel.',+ 'sandbox',+ 'template',+ 'first',+ 'easiest',+ 'soon.',+ ]}+ captions={[+ // @captions whats4+ {+ text: 'Render',+ startMs: 141,+ endMs: 566,+ timestampMs: 354,+ confidence: null,+ },+ {+ text: ' videos',+ startMs: 566,+ endMs: 1015,+ timestampMs: 791,+ confidence: null,+ },+ {+ text: ' on',+ startMs: 1015,+ endMs: 1298,+ timestampMs: 1157,+ confidence: null,+ },+ {+ text: ' Vercel.',+ startMs: 1298,+ endMs: 1794,+ timestampMs: 1546,+ confidence: null,+ pageBreakAfter: true,+ },+ {+ text: ' We',+ startMs: 2036,+ endMs: 2230,+ timestampMs: 2133,+ confidence: null,+ },+ {+ text: ' work',+ startMs: 2230,+ endMs: 2529,+ timestampMs: 2380,+ confidence: null,+ },+ {+ text: ' together',+ startMs: 2529,+ endMs: 2863,+ timestampMs: 2696,+ confidence: null,+ },+ {+ text: ' with',+ startMs: 2863,+ endMs: 3251,+ timestampMs: 3057,+ confidence: null,+ },+ {+ text: ' Vercel',+ startMs: 3251,+ endMs: 3515,+ timestampMs: 3383,+ confidence: null,+ },+ {+ text: ' to',+ startMs: 3515,+ endMs: 3779,+ timestampMs: 3647,+ confidence: null,+ },+ {+ text: ' make',+ startMs: 3779,+ endMs: 4166,+ timestampMs: 3973,+ confidence: null,+ },+ {+ text: ' rendering',+ startMs: 4166,+ endMs: 4378,+ timestampMs: 4272,+ confidence: null,+ },+ {+ text: ' on',+ startMs: 4378,+ endMs: 4571,+ timestampMs: 4475,+ confidence: null,+ },+ {+ text: ' their',+ startMs: 4571,+ endMs: 5064,+ timestampMs: 4818,+ confidence: null,+ },+ {+ text: ' platform',+ startMs: 5064,+ endMs: 5769,+ timestampMs: 5417,+ confidence: null,+ },+ {+ text: ' possible',+ startMs: 6000,+ endMs: 6548,+ timestampMs: 6274,+ confidence: null,+ },+ {+ text: ' and',+ startMs: 6548,+ endMs: 6951,+ timestampMs: 6750,+ confidence: null,+ },+ {+ text: ' super',+ startMs: 6951,+ endMs: 7261,+ timestampMs: 7106,+ confidence: null,+ },+ {+ text: ' smooth.',+ startMs: 7261,+ endMs: 7755,+ timestampMs: 7508,+ confidence: null,+ pageBreakAfter: true,+ },+ {+ text: " There's",+ startMs: 7975,+ endMs: 8075,+ timestampMs: 8025,+ confidence: null,+ },+ {+ text: ' a',+ startMs: 8075,+ endMs: 8191,+ timestampMs: 8133,+ confidence: null,+ },+ {+ text: ' new',+ startMs: 8191,+ endMs: 8473,+ timestampMs: 8332,+ confidence: null,+ },+ {+ text: ' package',+ startMs: 8473,+ endMs: 8889,+ timestampMs: 8681,+ confidence: null,+ },+ {+ text: ' called',+ startMs: 8889,+ endMs: 9271,+ timestampMs: 9080,+ confidence: null,+ },+ {+ text: ' @remotion/vercel',+ startMs: 9271,+ endMs: 10135,+ timestampMs: 9703,+ confidence: null,+ },+ {+ text: ' that',+ startMs: 10135,+ endMs: 10351,+ timestampMs: 10243,+ confidence: null,+ },+ {+ text: ' allows',+ startMs: 10351,+ endMs: 10484,+ timestampMs: 10418,+ confidence: null,+ },+ {+ text: ' you',+ startMs: 10484,+ endMs: 10617,+ timestampMs: 10551,+ confidence: null,+ },+ {+ text: ' to',+ startMs: 10617,+ endMs: 10949,+ timestampMs: 10783,+ confidence: null,+ },+ {+ text: ' create',+ startMs: 10949,+ endMs: 11597,+ timestampMs: 11273,+ confidence: null,+ },+ {+ text: ' Remotion',+ startMs: 12074,+ endMs: 12688,+ timestampMs: 12381,+ confidence: null,+ },+ {+ text: ' rendering',+ startMs: 12688,+ endMs: 13376,+ timestampMs: 13032,+ confidence: null,+ },+ {+ text: ' instances',+ startMs: 13376,+ endMs: 13488,+ timestampMs: 13432,+ confidence: null,+ },+ {+ text: ' using',+ startMs: 13897,+ endMs: 14362,+ timestampMs: 14130,+ confidence: null,+ },+ {+ text: ' Vercel',+ startMs: 14362,+ endMs: 15255,+ timestampMs: 14809,+ confidence: null,+ },+ {+ text: ' Sandbox',+ startMs: 15255,+ endMs: 15999,+ timestampMs: 15627,+ confidence: null,+ },+ {+ text: ' and',+ startMs: 16191,+ endMs: 16460,+ timestampMs: 16326,+ confidence: null,+ },+ {+ text: ' also',+ startMs: 16460,+ endMs: 16618,+ timestampMs: 16539,+ confidence: null,+ },+ {+ text: ' we',+ startMs: 16618,+ endMs: 16808,+ timestampMs: 16713,+ confidence: null,+ },+ {+ text: ' have',+ startMs: 16808,+ endMs: 17094,+ timestampMs: 16951,+ confidence: null,+ },+ {+ text: ' a',+ startMs: 17094,+ endMs: 17442,+ timestampMs: 17268,+ confidence: null,+ },+ {+ text: ' starter',+ startMs: 17442,+ endMs: 17870,+ timestampMs: 17656,+ confidence: null,+ },+ {+ text: ' template',+ startMs: 17870,+ endMs: 18424,+ timestampMs: 18147,+ confidence: null,+ },+ {+ text: ' where',+ startMs: 18630,+ endMs: 19039,+ timestampMs: 18835,+ confidence: null,+ },+ {+ text: ' everything',+ startMs: 19039,+ endMs: 19354,+ timestampMs: 19197,+ confidence: null,+ },+ {+ text: ' is',+ startMs: 19354,+ endMs: 19448,+ timestampMs: 19401,+ confidence: null,+ },+ {+ text: ' set',+ startMs: 19448,+ endMs: 19668,+ timestampMs: 19558,+ confidence: null,+ },+ {+ text: ' up',+ startMs: 19668,+ endMs: 20030,+ timestampMs: 19849,+ confidence: null,+ },+ {+ text: ' out',+ startMs: 20442,+ endMs: 20540,+ timestampMs: 20491,+ confidence: null,+ },+ {+ text: ' of',+ startMs: 20540,+ endMs: 20638,+ timestampMs: 20589,+ confidence: null,+ },+ {+ text: ' the',+ startMs: 20638,+ endMs: 20791,+ timestampMs: 20715,+ confidence: null,+ },+ {+ text: ' box.',+ startMs: 20791,+ endMs: 21042,+ timestampMs: 20917,+ confidence: null,+ pageBreakAfter: true,+ },+ {+ text: ' This',+ startMs: 21297,+ endMs: 21388,+ timestampMs: 21343,+ confidence: null,+ },+ {+ text: ' is',+ startMs: 21388,+ endMs: 21642,+ timestampMs: 21515,+ confidence: null,+ },+ {+ text: ' now',+ startMs: 21642,+ endMs: 21915,+ timestampMs: 21779,+ confidence: null,+ },+ {+ text: ' a',+ startMs: 21915,+ endMs: 22297,+ timestampMs: 22106,+ confidence: null,+ },+ {+ text: ' first-class',+ startMs: 22297,+ endMs: 22752,+ timestampMs: 22525,+ confidence: null,+ },+ {+ text: ' server-side',+ startMs: 23152,+ endMs: 23989,+ timestampMs: 23571,+ confidence: null,+ },+ {+ text: ' rendering',+ startMs: 23989,+ endMs: 24662,+ timestampMs: 24326,+ confidence: null,+ },+ {+ text: ' solution',+ startMs: 24662,+ endMs: 25207,+ timestampMs: 24935,+ confidence: null,+ },+ {+ text: ' in',+ startMs: 25435,+ endMs: 25716,+ timestampMs: 25576,+ confidence: null,+ },+ {+ text: ' Remotion',+ startMs: 25716,+ endMs: 26706,+ timestampMs: 26211,+ confidence: null,+ },+ {+ text: ' and',+ startMs: 26872,+ endMs: 27098,+ timestampMs: 26985,+ confidence: null,+ },+ {+ text: ' it',+ startMs: 27098,+ endMs: 27249,+ timestampMs: 27174,+ confidence: null,+ },+ {+ text: ' is',+ startMs: 27249,+ endMs: 27418,+ timestampMs: 27334,+ confidence: null,+ },+ {+ text: ' one',+ startMs: 27418,+ endMs: 27531,+ timestampMs: 27475,+ confidence: null,+ },+ {+ text: ' of',+ startMs: 27531,+ endMs: 27776,+ timestampMs: 27654,+ confidence: null,+ },+ {+ text: ' the',+ startMs: 27776,+ endMs: 28134,+ timestampMs: 27955,+ confidence: null,+ },+ {+ text: ' easiest',+ startMs: 28134,+ endMs: 28398,+ timestampMs: 28266,+ confidence: null,+ },+ {+ text: ' way',+ startMs: 28398,+ endMs: 28567,+ timestampMs: 28483,+ confidence: null,+ },+ {+ text: ' to',+ startMs: 28567,+ endMs: 28755,+ timestampMs: 28661,+ confidence: null,+ },+ {+ text: ' set',+ startMs: 28755,+ endMs: 28815,+ timestampMs: 28785,+ confidence: null,+ },+ {+ text: ' up',+ startMs: 28925,+ endMs: 28985,+ timestampMs: 28955,+ confidence: null,+ },+ {+ text: ' server-side',+ startMs: 29151,+ endMs: 30262,+ timestampMs: 29707,+ confidence: null,+ },+ {+ text: ' rendering.',+ startMs: 30508,+ endMs: 31205,+ timestampMs: 30857,+ confidence: null,+ pageBreakAfter: true,+ },+ {+ text: ' A',+ startMs: 31547,+ endMs: 31713,+ timestampMs: 31630,+ confidence: null,+ },+ {+ text: ' small',+ startMs: 31713,+ endMs: 31905,+ timestampMs: 31809,+ confidence: null,+ },+ {+ text: ' tutorial',+ startMs: 31905,+ endMs: 32122,+ timestampMs: 32014,+ confidence: null,+ },+ {+ text: ' about',+ startMs: 32122,+ endMs: 32353,+ timestampMs: 32238,+ confidence: null,+ },+ {+ text: ' this',+ startMs: 32353,+ endMs: 32493,+ timestampMs: 32423,+ confidence: null,+ },+ {+ text: ' is',+ startMs: 32493,+ endMs: 32660,+ timestampMs: 32577,+ confidence: null,+ },+ {+ text: ' coming',+ startMs: 32660,+ endMs: 32851,+ timestampMs: 32756,+ confidence: null,+ },+ {+ text: ' out',+ startMs: 32851,+ endMs: 33133,+ timestampMs: 32992,+ confidence: null,+ },+ {+ text: ' soon.',+ startMs: 33145,+ endMs: 34133,+ timestampMs: 33639,+ confidence: null,+ pageBreakAfter: true,+ },+ ]}+ />++ <Audio+ name="Sticker whoosh"+ src="https://remotion.media/whoosh.wav"+ from={0}+ volume={0.3}+ />+ <Audio+ name="Logos click"+ src="https://remotion.media/mouse-click.wav"+ from={76}+ volume={0.3}+ />+ <Audio+ name="Typing"+ src="https://remotion.media/switch.wav"+ from={300}+ volume={0.2}+ />+ <Audio+ name="Template page turn"+ src="https://remotion.media/page-turn.wav"+ from={512}+ volume={0.28}+ />+ <Audio+ name="First-class stamp"+ src="https://remotion.media/shutter-modern.wav"+ from={666}+ volume={0.22}+ />+ <Audio+ name="Split whip"+ src="https://remotion.media/whip.wav"+ from={798}+ volume={0.16}+ />+ <Audio+ name="Easiest ding"+ src="https://remotion.media/ding.wav"+ from={846}+ volume={0.2}+ />+ <Audio+ name="Tutorial pop"+ src="https://remotion.media/mouse-click.wav"+ from={972}+ volume={0.3}+ />+ </AbsoluteFill>+ );+};diff --git a/packages/example/src/WhatsNew/theme.ts b/packages/example/src/WhatsNew/theme.tsnew file mode 100644index 0000000000..b957a54c81--- /dev/null+++ b/packages/example/src/WhatsNew/theme.ts@@ -0,0 +1,28 @@+export const colors = {+ blue: '#0B84F3',+ blueDeep: '#0763C8',+ ink: '#0B0F19',+ inkSoft: '#1B2233',+ paper: '#FFFFFF',+ mist: '#EEF2F8',+ muted: '#5B6475',+ line: '#DCE3EE',+ success: '#12B76A',+ danger: '#F04438',+ code: '#0E1320',+ codeLine: '#1C2438',+ vercelBlack: '#000000',+};++export const accents = {+ lightLeaks: '#FF8A00',+ soundEffects: '#7C5CFF',+ vercel: '#000000',+ skills: '#10B981',+ clientSide: '#0B84F3',+ agents: '#FF5A36',+ bundling: '#FFC400',+ sneakPeek: '#A78BFA',+};++export const FACE = {x: 1000, y: 430};