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 an agent writes.

ImportWhat it's forExports
raeaThe main entry: compositions, sequences, time, interpolation, springs, footage, sound and words.18 components, 8 hooks, 52 functions, 8 values, 91 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.5 functions, 28 types

Time and motion

Frames, animation, springs, states and input.

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

Video, sound and text

Footage, pictures, sound, words and colour.

ImportWhat it's forExports
raea/videoFootage and time-shifted sequences: Video, Sequence, Series, Loop and Freeze.5 components, 7 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

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/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