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
TL7c: the manual's raea/editor page lists captionLines, heard, Said and LineRules (each Said field documented)
shinyobjectzdc148cd3f7be
diff --git a/docs/manual/reference/sdk/editor.md b/docs/manual/reference/sdk/editor.mdindex 401bb549..9375b4a0 100644--- a/docs/manual/reference/sdk/editor.md+++ b/docs/manual/reference/sdk/editor.md@@ -21,7 +21,7 @@ built, edited and undone.import { ahead, apply, applyAll, bezier } from "raea/editor"```-`raea/editor` exports 50 functions, 14 values, 31 types. Bevy's counterpart: `raea's own; Bevy has no timeline editor`. Source: [sdk/raea/src/editor.ts](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/src/editor.ts).+`raea/editor` exports 52 functions, 14 values, 33 types. Bevy's counterpart: `raea's own; Bevy has no timeline editor`. Source: [sdk/raea/src/editor.ts](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/src/editor.ts).## Functions@@ -61,6 +61,15 @@ slope is too flat for them. The handles' x are kept in 0..1 so the curve is a fufunction bezier(x1: number, y1: number, x2: number, y2: number): (x: number) => number```+### `captionLines`++The words gathered into caption lines: a line ends after a sentence does, at a pause, or once it holds as many+words or characters as it may. Each line runs from its first word to its last and ends by the next line's start.++```ts+function captionLines(words: Said[], fps: number, o?: LineRules): Said[]+```+### `changed`The frames whose picture or sound differ between two states of a timeline: wherever what is drawn over a frame@@ -205,6 +214,16 @@ The frames a snap grid marks in a timeline `length` frames long (none for a gridfunction gridFrames(grid: SnapGrid, fps: number, length: number): number[]```+### `heard`++The words as the edited timeline says them. `words` are in the film's own frames (where its transcript has them);+each is said where a main-track clip plays that part of the film, at that clip's speed. A word in a scene taken out+is gone, a scene duplicated says its words twice, and a clip curved, reversed or frozen says none.++```ts+function heard(t: Timeline, words: Said[]): Said[]+```+### `joined`Ranges in order, touching and overlapping ones joined, empty ones dropped.@@ -631,6 +650,16 @@ A property's value at a frame of its clip (frames from the clip's start), and ho| `value` (required) | `Value` | the property's value there: a number, a list of them (a colour, a point) or a string || `ease` | `Ease` | how the value travels to the next key (linear when unset) |+### `LineRules`++How words are gathered into lines.++| Field | Type | What it is |+| --- | --- | --- |+| `words` | `number` | the most words on a line (7) |+| `chars` | `number` | the most characters on a line, spaces counted (42) |+| `gap` | `Frames` | a pause at least this long starts a new line (0.6 s) |+### `Marker`A mark at a frame: a beat, a comment's time or one put there by hand.@@ -664,6 +693,16 @@ A tool a plugin adds: one press sets these on every picked clip, as one edit eactype Range = [from: Frames, to: Frames]```+### `Said`++A word, or a line of them: its text, its first frame and the frame after it ends.++| Field | Type | What it is |+| --- | --- | --- |+| `text` (required) | `string` | what is said: a word, or a line's words with a space between |+| `start` (required) | `Frames` | its first frame |+| `end` (required) | `Frames` | the frame after it ends |+### `SeqEdit`The host's edit to a sequence: its new span, a split, a delete.diff --git a/docs/manual/reference/sdk/index.md b/docs/manual/reference/sdk/index.mdindex da06ec04..1125c842 100644--- a/docs/manual/reference/sdk/index.md+++ b/docs/manual/reference/sdk/index.md@@ -61,7 +61,7 @@ Footage, pictures, sound, words and colour, and the timeline they are edited on.| [`raea/image`](image.md) | Pictures on the page and in the world, and texture atlases packed from them. | 3 components, 1 class, 5 types || [`raea/asset`](asset.md) | 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`](color.md) | Bevy's colour types: Srgba, LinearRgba, Hsla, Oklab, Oklch and the rest, with their conversions. | 2 functions, 7 classes |-| [`raea/editor`](editor.md) | 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. | 50 functions, 14 values, 31 types |+| [`raea/editor`](editor.md) | 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. | 52 functions, 14 values, 33 types |## 3Ddiff --git a/sdk/timeline/src/captions.ts b/sdk/timeline/src/captions.tsindex 25512b31..069eb895 100644--- a/sdk/timeline/src/captions.ts+++ b/sdk/timeline/src/captions.ts@@ -5,8 +5,11 @@ import { type Clip, end, type Frames, speedOf, type Timeline } from "./model"/** A word, or a line of them: its text, its first frame and the frame after it ends. */export interface Said {+ /** what is said: a word, or a line's words with a space between */text: string+ /** its first frame */start: Frames+ /** the frame after it ends */end: Frames}