SDK

Every raea import path: what it is for, and each component, hook, function, class and type it exports.

View as Markdown

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, plan and controller.

Start here

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

ImportWhat it's forExports
raeaThe main entry: compositions, sequences, time, interpolation, springs, footage, sound and words.20 components, 8 hooks, 62 functions, 11 values, 98 types
raea/appThe App, its plugins and schedules, and the registry a video's compositions are kept in.1 component, 4 functions, 3 classes, 17 values, 8 types
raea/briefThe specs an agent writes as data: brief, script, taste, plan and controller, checked against raea's schemas.6 functions, 32 types
raea/noteA 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.

ImportWhat it's forExports
raea/timeThe frame being drawn and the composition's time: useCurrentFrame, useVideoConfig and the Clock.1 component, 3 hooks, 7 types
raea/animationDeclared animation: named moves, staggers, sequences and timelines, and a model's own clips.2 components, 1 hook, 27 functions, 2 values, 18 types
raea/mathNumbers through time: interpolation, easing, springs, curves and the vector types Bevy uses.7 functions, 3 values, 7 types
raea/stateState 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/inputThe frame's input: keys, pointer, wheel and gamepads, the same live and in a scripted render.1 hook, 2 functions, 2 types
raea/holdHolding 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.

ImportWhat it's forExports
raea/videoFootage and time-shifted sequences: Video, Sequence, Series, Loop and Freeze.5 components, 8 types
raea/audioSound: 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/textText in the 3D world, fonts, and time anchored to the words said.3 components, 1 hook, 3 functions, 6 types
raea/imagePictures on the page and in the world, and texture atlases packed from them.3 components, 1 class, 5 types
raea/assetFiles the project holds and assets made for it: staticFile, generated sound and music, and glTF bytes.9 functions, 1 value, 8 types
raea/colorBevy's colour types: Srgba, LinearRgba, Hsla, Oklab, Oklch and the rest, with their conversions.2 functions, 7 classes
raea/editorThe 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.

ImportWhat it's forExports
raea/3draea'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/cameraCameras and the views they make: Camera3d, the Canvas3D a 2D scene draws in, HDR and matchmoved cameras.5 components, 1 hook, 3 functions, 9 types
raea/lightBevy's lights in Bevy's units, environments, skies and daylight.15 components, 9 functions, 2 values, 15 types
raea/pbrMaterials and volumes: StandardMaterial, extended and toon materials, custom shaders, decals, fog and fire.22 components, 1 function, 1 value, 35 types
raea/meshShapes and solids: Mesh3d and Mesh2d, Bevy's primitives, buffer meshes, instancing and exact solids.14 components, 1 function, 2 classes, 10 values, 24 types
raea/transformWhere things are: Bevy's Transform and Quat, and nesting.2 functions, 2 values, 4 types
raea/post_processWhat's done to the frame after it's drawn: tone mapping, bloom, depth of field, motion blur, grading and outlines.12 components, 14 types
raea/pickingWhat the pointer is over: the nearest part under it, and the ray it casts.2 functions, 3 types
raea/gizmosLines 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.

ImportWhat it's forExports
raea/sprite2D pictures and flat shapes, drawn by Bevy's 2D renderer inside a Canvas3D.17 components, 1 class, 20 types
raea/uibevy_ui: Node and its layout fields, Text, images, scrolling, gradients and units.20 components, 1 hook, 12 functions, 30 values, 37 types
raea/feathersBevy'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.

ImportWhat it's forExports
raea/checkA check written as a system over a composition's world: what raea check runs for a rule a controller holds.8 functions, 1 class, 38 types
raea/fingerprintA 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_toolsChecks and lints you can run from code: a motion performance's lint report.2 functions, 3 types
raea/remoteA headless Bevy App you open, step and query from TypeScript, through Bevy's remote protocol.1 class, 1 type