Skip to content

armgit / raea

Public Imported from GitHub
0

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.

8.4 KB
Raw Blame

title: "SDK" summary: "Every raea import path: what it is for, and each component, hook, function, class and type it exports." order: 1 sources: ["sdk/raea/src", "tools/manual-ref/sdk.ts"]

A composition, a game, an app or a spec is TypeScript that imports from raea and its sub-paths. Each page here covers one import path: every export with its doc comment, its signature, a component's props with their types, a class's members, the Bevy type it stands for when there is one, and the files that use it. Those files are Bevy's own examples ported to raea, each checked against Bevy pixel for pixel, and the manual's examples, each rendered in CI, so you can copy from them.

The pages are generated from the SDK by the TypeScript compiler, so they say what the code says. Where the SDK mirrors a Bevy type and has no comment of its own, the page shows Bevy's doc for it, marked as Bevy's.

Which path to import from

  • raea holds what nearly every composition needs: Composition, registerRoot, Sequence, AbsoluteFill, useCurrentFrame, interpolate, spring, Video, Audio and the word and song helpers.
  • The sub-paths follow Bevy's crates: raea/camera, raea/light, raea/pbr, raea/mesh, raea/transform, raea/post_process, raea/sprite, raea/ui and the rest, so a Bevy example's imports map onto them.
  • raea/3d holds raea's scene layer: models, physics, splats, matchmoves and custom shader passes.
  • raea/brief holds the specs: brief, script, taste and plan.

Start here

The composition, the app, and the specs and notes an agent writes.

Import What it's for Exports
raea The main entry: compositions, sequences, time, interpolation, springs, footage, sound and words. 21 components, 9 hooks, 65 functions, 11 values, 109 types
raea/app The App, its plugins and schedules, and the registry a video's compositions are kept in. 1 component, 1 hook, 5 functions, 3 classes, 17 values, 18 types
raea/brief The specs an agent writes as data: brief, script, taste and an object's parts, checked against raea's schemas. 10 functions, 42 types
raea/note A person's note as a file in the project: their words kept as written, and the asks the agent restates it as. 1 function, 4 types

Time and motion

Frames, animation, springs, states and input, and holding a frame until it's ready.

Import What it's for Exports
raea/time The frame being drawn and the composition's time: useCurrentFrame, useVideoConfig and the Clock. 1 component, 3 hooks, 7 types
raea/animation Declared animation: named moves, staggers, sequences and timelines, and a model's own clips. 2 components, 1 hook, 27 functions, 2 values, 18 types
raea/math Numbers through time: interpolation, easing, springs, curves and the vector types Bevy uses. 7 functions, 3 values, 7 types
raea/state State machines stepped by frame, for game logic and workflows, typed so a wrong transition doesn't compile. 2 hooks, 6 functions, 1 value, 20 types
raea/input The frame's input: keys, pointer, wheel and gamepads, the same live and in a scripted render. 1 hook, 2 functions, 2 types
raea/hold Holding a frame until it's ready: delayRender, continueRender and cancelRender. 3 functions, 1 value

Video, sound and text

Footage, pictures, sound, words and colour, and the timeline they are edited on.

Import What it's for Exports
raea/video Footage and time-shifted sequences: Video, Sequence, Series, Loop and Freeze. 5 components, 8 types
raea/audio Sound: Audio, the master Mix, speech, sound in 3D space, and a song's energy map. 6 components, 1 hook, 7 functions, 1 value, 25 types
raea/text Text in the 3D world, fonts, and time anchored to the words said. 3 components, 1 hook, 3 functions, 6 types
raea/image Pictures on the page and in the world, and texture atlases packed from them. 3 components, 1 class, 5 types
raea/asset Files the project holds and assets made for it: staticFile, generated sound and music, and glTF bytes. 9 functions, 1 value, 8 types
raea/color Bevy's colour types: Srgba, LinearRgba, Hsla, Oklab, Oklch and the rest, with their conversions. 2 functions, 7 classes
raea/editor The timeline the feed edits a film, a scene or a sound on, as data: tracks, clips, keys and markers, every edit an operation with its inverse, a film's scenes read in (fromRender) and its cut read back out as segments (segmentsOf). No React and no DOM: an agent's script, the app's host and a test use the same model the app's timeline does. 63 functions, 28 values, 45 types

3D

Bevy's 3D: cameras, lights, materials, meshes and the frame after it's drawn.

Import What it's for Exports
raea/3d raea's scene layer: models, physics, splats, matchmoves, instancing, custom shader passes and 3D text. 70 components, 4 hooks, 26 functions, 3 classes, 12 values, 126 types
raea/camera Cameras and the views they make: Camera3d, the Canvas3D a 2D scene draws in, HDR and matchmoved cameras. 6 components, 1 hook, 9 functions, 4 values, 19 types
raea/light Bevy's lights in Bevy's units, environments, skies and daylight. 15 components, 9 functions, 2 values, 15 types
raea/pbr Materials and volumes: StandardMaterial, extended and toon materials, custom shaders, decals, fog and fire. 23 components, 1 function, 1 value, 37 types
raea/mesh Shapes and solids: Mesh3d and Mesh2d, Bevy's primitives, buffer meshes, instancing and exact solids. 16 components, 1 function, 2 classes, 10 values, 26 types
raea/transform Where things are: Bevy's Transform and Quat, and nesting. 2 functions, 2 values, 4 types
raea/post_process What's done to the frame after it's drawn: tone mapping, bloom, depth of field, motion blur, grading and outlines. 12 components, 1 function, 1 value, 15 types
raea/picking What the pointer is over: the nearest part under it, and the ray it casts. 2 functions, 3 types
raea/gizmos Lines drawn for looking: Bevy's gizmos and debug overlays. 2 components, 1 function, 3 types

2D and UI

Sprites and flat shapes, bevy_ui and Bevy's widgets.

Import What it's for Exports
raea/sprite 2D pictures and flat shapes, drawn by Bevy's 2D renderer inside a Canvas3D. 17 components, 1 class, 20 types
raea/ui bevy_ui: Node and its layout fields, Text, images, scrolling, gradients and units. 20 components, 1 hook, 12 functions, 30 values, 37 types
raea/feathers Bevy's feathers widgets: buttons, sliders, checkboxes, menus, inputs and colour pickers, in its dark theme. 33 components, 2 hooks, 24 functions, 11 values, 27 types

Tools

Checks, lints and a headless App you can drive.

Import What it's for Exports
raea/check A check written as a system over a composition's world: what raea check runs for a taste line's rule. 8 functions, 1 class, 38 types
raea/fingerprint A fingerprint (fingerprint.ts, docs/fingerprint.md): a person's or a team's sense of good work as axes, each with a small head over on-device encoders that raea fingerprint trains from their labels. raea fingerprint new NAME writes one with raea's base taxonomy; add an axis, reword one, or remove one, and raea retrains. Rust reads the default export (systems/fingerprint/src/taxonomy.rs), so these types follow its fields. 1 function, 4 types
raea/dev_tools Checks and lints you can run from code: a motion performance's lint report. 2 functions, 3 types
raea/remote A headless Bevy App you open, step and query from TypeScript, through Bevy's remote protocol. 1 class, 1 type
raea/ask Ask about a piece's picture and sound from a script: the same questions, runner and record as raea ask, typed. 2 functions, 1 value, 12 types