The VS Code of video editing, built for agents.
TypeScript
Update examples and documentation to include width and height properties for video and text elements
konstantin-paulusd7e6414b5ba3
diff --git a/examples/01-basics.tsx b/examples/01-basics.tsxindex b82724a5..ae756f76 100644--- a/examples/01-basics.tsx+++ b/examples/01-basics.tsx@@ -26,6 +26,8 @@ const TITLES: { text: string; start: Time; end: Time }[] = [function Title(props: { text: string; start: Time; end: Time }) {return (<text+ width={1920}+ height={1080}textAlign="center"textBaseline="middle"fontFamily="Inter"diff --git a/examples/02-genai.tsx b/examples/02-genai.tsxindex ef4b55e0..d817c2db 100644--- a/examples/02-genai.tsx+++ b/examples/02-genai.tsx@@ -57,8 +57,8 @@ export default function GenAi() {return (<scene key="example-genai" name="GenAI" width={1920} height={1080} fill="black"><sequence name="Generated shots">- <video src={shot1} start={0} end={5} transition={{}} />- <video src={shot2} start={5} end={10} />+ <video src={shot1} width={1920} height={1080} start={0} end={5} transition={{}} />+ <video src={shot2} width={1920} height={1080} start={5} end={10} /></sequence><audio name="Voiceover" src={voiceover} start={1} />diff --git a/examples/03-ticker.tsx b/examples/03-ticker.tsxindex 44e186a2..2c3deb6b 100644--- a/examples/03-ticker.tsx+++ b/examples/03-ticker.tsx@@ -58,7 +58,7 @@ export default function Ticker() {fill={`hsl(${hue()} 90% 60%)`}/>- <text x={80} y={64} fontSize={44} fontFamily="Inter">+ <text x={80} y={64} width={1200} height={60} fontSize={44} fontFamily="Inter">t = {time().toFixed(2)}s / frame {frame()} / loop {Math.round(progress() * 100)}%</text></scene>diff --git a/reference/jsx/README.md b/reference/jsx/README.mdindex 7858dcbc..c0401de0 100644--- a/reference/jsx/README.md+++ b/reference/jsx/README.md@@ -86,8 +86,8 @@ export default function Project() {return (<scene key="my-first-scene" name="MyFirstScene" fill="black" width={1920} height={1080}><sequence>- <video src={heroMotion} start={0} end={5} transition={{ type: "dissolve" }} />- <video src="/Movies/video.mp4" start={5} end={10} sourceIn={12} />+ <video src={heroMotion} width={1920} height={1080} start={0} end={5} transition={{ type: "dissolve" }} />+ <video src="/Movies/video.mp4" width={1920} height={1080} start={5} end={10} sourceIn={12} /></sequence><image src={hero} x={40} y={40} width={200} height={112} />diff --git a/reference/jsx/animations.md b/reference/jsx/animations.mdindex 97fdd000..73afcc7a 100644--- a/reference/jsx/animations.md+++ b/reference/jsx/animations.md@@ -5,6 +5,7 @@```tsx<videosrc="/Movies/intro.mp4"+ width={1920} height={1080}start={0} end={8}animations={[{ type: "fade", duration: "15f" },diff --git a/reference/jsx/audio-sync.md b/reference/jsx/audio-sync.mdindex b5b3a2ef..3c3eb5b0 100644--- a/reference/jsx/audio-sync.md+++ b/reference/jsx/audio-sync.md@@ -4,7 +4,7 @@```tsx<scene key="talk" width={1920} height={1080}>- <video key="camera" src="/Movies/take-3.mp4" sourceOut={45} muted />+ <video key="camera" src="/Movies/take-3.mp4" width={1920} height={1080} sourceOut={45} muted /><audio src="/Movies/lav.wav" syncTo="camera" /></scene>```diff --git a/reference/jsx/generate.md b/reference/jsx/generate.mdindex febe3c00..801bbd56 100644--- a/reference/jsx/generate.md+++ b/reference/jsx/generate.md@@ -23,7 +23,7 @@ const heroMotion = generate.video({export default function Project() {return (<scene key="intro" name="Intro" width={1920} height={1080}>- <video src={heroMotion} start={0} end={5} />+ <video src={heroMotion} width={1920} height={1080} start={0} end={5} /><image src={hero} x={40} y={40} width={200} height={112} /></scene>);diff --git a/reference/jsx/lifecycle.md b/reference/jsx/lifecycle.mdindex 69f7ff57..0edee56a 100644--- a/reference/jsx/lifecycle.md+++ b/reference/jsx/lifecycle.md@@ -19,7 +19,7 @@ export default function Project() {const { time, frame } = useTicker();return (<scene key="hud" width={1920} height={1080}>- <text fontSize={80}>{`frame ${frame()}`}</text>+ <text width={600} height={100} fontSize={80}>{`frame ${frame()}`}</text><rect x={860 + Math.sin(time() * 4) * 200} y={490} width={100} height={100} fill="#f43" /></scene>);diff --git a/reference/jsx/sequences.md b/reference/jsx/sequences.mdindex 1ef441da..059f178e 100644--- a/reference/jsx/sequences.md+++ b/reference/jsx/sequences.md@@ -4,9 +4,12 @@```tsx<sequence>- <video src="/Movies/intro.mp4" start={0} end={12} /> {/* timeline 0–12 */}- <video src="/Movies/main.mp4" start={12} end="02:30" sourceIn={5} /> {/* timeline 12–2:30, source from 5 s */}- <video src="/Movies/outro.mp4" start="02:30" /> {/* from 2:30, plays to its natural end */}+ {/* timeline 0–12 */}+ <video src="/Movies/intro.mp4" width={1920} height={1080} start={0} end={12} />+ {/* timeline 12–2:30, source from 5 s */}+ <video src="/Movies/main.mp4" width={1920} height={1080} start={12} end="02:30" sourceIn={5} />+ {/* from 2:30, plays to its natural end */}+ <video src="/Movies/outro.mp4" width={1920} height={1080} start="02:30" /></sequence>```diff --git a/reference/jsx/timing.md b/reference/jsx/timing.mdindex de47d2d7..83cdef9f 100644--- a/reference/jsx/timing.md+++ b/reference/jsx/timing.md@@ -18,7 +18,7 @@ Timing splits the two independent questions a clip answers: **where it sits on t- If timing is omitted, a media node fits its natural duration at `start` 0, and a group auto-fits its children. A [`<sequence>`](./sequences.md) does not position its children for you: give each an explicit `start` (the next clip's `start` is the previous clip's end).> Examples:-> - `<rect start={2} end={5} fill="red" />` — a rectangle on screen from timeline second 2 to 5.+> - `<rect start={2} end={5} width={200} height={120} fill="red" />` — a rectangle on screen from timeline second 2 to 5.> - `<video start={5} sourceIn={10} sourceOut={20} />` — plays source seconds 10–20 (a 10-second clip) beginning at timeline second 5.> - `<video start={2} end={5} sourceIn={10} />` — the same source starting at 10 s, stretched to fill the timeline window 2–5 (so it plays source 10–13).> - `<video start={0} sourceIn={1} />` — trims the first second off the head and places the clip at the top of the timeline.diff --git a/reference/jsx/transitions.md b/reference/jsx/transitions.mdindex 1017929e..0b008390 100644--- a/reference/jsx/transitions.md+++ b/reference/jsx/transitions.md@@ -4,9 +4,9 @@```tsx<sequence>- <video src="/Movies/intro.mp4" start={0} end={12} transition={{ type: "fadeToBlack", duration: "20f" }} />- <video src="/Movies/main.mp4" start={12} end={24} transition={{}} /> {/* dissolve, 1s */}- <video src="/Movies/outro.mp4" start={24} end={30} />+ <video src="/Movies/intro.mp4" width={1920} height={1080} start={0} end={12} transition={{ type: "fadeToBlack", duration: "20f" }} />+ <video src="/Movies/main.mp4" width={1920} height={1080} start={12} end={24} transition={{}} /> {/* dissolve, 1s */}+ <video src="/Movies/outro.mp4" width={1920} height={1080} start={24} end={30} /></sequence>```diff --git a/reference/jsx/video.md b/reference/jsx/video.mdindex 2b7e26f9..aecee581 100644--- a/reference/jsx/video.md+++ b/reference/jsx/video.md@@ -3,7 +3,7 @@A video clip. `src` resolves to a video asset (see [media.md](./media.md)); when timing is omitted, the node fits its natural duration (see [timing.md](./timing.md)).```tsx-<video src="/Movies/main.mp4" start={0} sourceIn={1} sourceOut={13} volume={-3} />+<video src="/Movies/main.mp4" width={1920} height={1080} start={0} sourceIn={1} sourceOut={13} volume={-3} />```## Props