Render Anything Engine: tell your AI what to make. Videos, motion graphics, 3D and games as React and TypeScript, rendered on your own GPU. Rust + Bevy, macOS, Linux and Windows.
TypeScript 3dagent-skillsai-agentsai-videobevyclaude-codegame-enginegpulinuxmacosmotion-designmotion-graphicsreactrusttypescriptvideo-editingvideo-renderingwgpuwindows
Spec: inside a Sequence, useVideoConfig().durationInFrames is the Sequence's length (its own, cut short where its parent's ends; a Loop's children get one pass), as Remotion's public docs for useVideoConfig say, and its conformance test (#126, from #128)
Ragulsundarame3dfcb96d12d
diff --git a/sdk/raea/conformance/timeline.test.tsx b/sdk/raea/conformance/timeline.test.tsxindex 6de06f81..c068d15d 100644--- a/sdk/raea/conformance/timeline.test.tsx+++ b/sdk/raea/conformance/timeline.test.tsx@@ -99,6 +99,17 @@ describe("useVideoConfig and AbsoluteFill", () => {at(0, <Sequence width={540} height={960}><Read /></Sequence>);expect(cfg).toMatchObject({ width: 540, height: 960 });});+ test("inside a Sequence, durationInFrames is the Sequence's", () => {+ const d: Record<string, number> = {};+ function Read({ id }: { id: string }) { d[id] = useVideoConfig().durationInFrames; return null; }+ at(15, <Sequence from={10} durationInFrames={20}><Read id="own" /></Sequence>);+ at(15, <Sequence from={10}><Read id="open" /></Sequence>);+ at(275, <Sequence from={250} durationInFrames={100}><Read id="cut" /></Sequence>);+ at(45, <Sequence from={30} durationInFrames={40}><Sequence from={5}><Read id="nested" /></Sequence></Sequence>);+ at(5, <Loop durationInFrames={12}><Read id="loop" /></Loop>);+ at(5, <Freeze frame={2}><Read id="freeze" /></Freeze>);+ expect(d).toEqual({ own: 20, open: 290, cut: 50, nested: 35, loop: 12, freeze: 300 });+ });test("AbsoluteFill renders its children", () => {at(3, <AbsoluteFill style={{ background: "black" }}><Probe id="a" /></AbsoluteFill>);expect(seen.a).toBe(3);diff --git a/sdk/raea/spec/motion.feature b/sdk/raea/spec/motion.featureindex 53a4f24b..39572af3 100644--- a/sdk/raea/spec/motion.feature+++ b/sdk/raea/spec/motion.feature@@ -21,7 +21,9 @@ Feature: raea, the behaviour of its APIAnd defaultProps are JSON-like values handed to the component as its propsScenario: What a component can askThen `useVideoConfig()` returns {id, width, height, fps, durationInFrames, defaultProps} of the composition it is- rendered in (a Sequence given width and height reports those to its children instead)+ rendered in (a Sequence given width and height reports those to its children instead, and inside a+ Sequence durationInFrames is the Sequence's: its own, cut short where its parent's ends; a Loop's children+ get one pass)And `useCurrentFrame()` returns the frame being rendered, measured from the start of the nearest enclosingSequence (the composition's frame outside any Sequence)Scenario: AbsoluteFill