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.

View as Markdown

The timeline the feed edits a film, a scene or a sound on, as data. A Timeline holds tracks of clips in whole frames, with keys, markers and transitions; apply and applyAll make an edit and hand back its inverse, so every change can be undone; the main track's magnet, snapping and linkage behave as the feed's timeline does. A film's scenes are read in with fromRender and its cut read back out with segmentsOf, as a composition's edit={{ segments }} takes it; a composition's sequences are read in with fromSequences, and seqEdits says what an operation does to them. Easings, speed curves, snapping, the frame store's keys and what a plugin adds are here too. 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. See the example for a timeline built, edited and undone.

TS
import { ADJUST_KINDS, ADJUST_PROP_LIST, ADJUST_PROPS, adjustError } from "raea/editor"

raea/editor exports 63 functions, 28 values, 45 types. Bevy's counterpart: raea's own; Bevy has no timeline editor. Source: sdk/raea/src/editor.ts.

Functions

adjustError

What is wrong with a clip's adjustment props as they stand, or undefined: a value out of its range.

TS
function adjustError(props?: Props): string | undefined

adjustLook

How the editor's preview draws a clip's adjustment on its picture, as draws it: its SVG filter's id and steps (to put beside the picture), and its vignette's background (a layer over the picture). A wrong one draws nothing rather than throwing in the editor.

TS
function adjustLook(props: Props | undefined, seed?: number): { filter?: { id: string; steps: FilterStep[]; } | undefined; vignette?: string; }

adjustOf

A clip's adjustment read from its props: the kinds that aren't 0.

TS
function adjustOf(props?: Props): Partial<Record<"saturation" | "fade" | "brightness" | "contrast" | "exposure" | "sharpen" | "highlights" | "shadows" | "temperature" | "tint" | "vignette" | "grain", number>>

adjustProps

An adjustment as a clip's props, to three places: every kind, 0 for what it hasn't got, so a set puts it whole.

TS
function adjustProps(a: Partial<Record<"saturation" | "fade" | "brightness" | "contrast" | "exposure" | "sharpen" | "highlights" | "shadows" | "temperature" | "tint" | "vignette" | "grain", number>>): Props

ahead

The ranges to draw next while there is time: what isn't kept from the playhead on, nearest first, each at most chunk frames, then what is before it.

TS
function ahead(length: number, kept: Range[], playhead: number, chunk: number): Range[]

animStyle

The clip's style into frames from its start: coming in by its In, going out by its Out (each over no more of it than it has) and moving by its Combo, one of combos (a plugin's among them). Empty when none plays there.

TS
function animStyle(c: Clip, into: number, combos?: ComboKind[]): EdgeStyle

apply

The operation applied, or why it can't be.

TS
function apply(t: Timeline, op: Op): Applied

applyAll

Operations in order, stopping at the first refused: the timeline they give, and each one's inverse (last first).

TS
function applyAll(t: Timeline, ops: Op[]): { timeline: Timeline; inverse: Op[]; refused?: { op: Op; why: string; } | undefined; }

Used in: manual: edits.

bezier

y at x on the cubic bezier (0,0) (x1,y1) (x2,y2) (1,1): x is solved by Newton's steps, then bisection where the slope is too flat for them. The handles' x are kept in 0..1 so the curve is a function of time.

TS
function 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 isn't what was. Moving a clip from 2:00-2:05 to 2:10-2:15 gives those two ranges and nothing else; a split of footage gives none.

TS
function changed(before: Timeline, after: Timeline): Range[]

clipEdits

The file clips that differ between the timeline as it was read and as it stands, each with its span before and after: what a sound's hand edit carries (its clips). A clip that was removed or made here isn't one of these.

TS
function clipEdits(read: Timeline, now: Timeline): { id: string; src: string; from: ClipSpan; to: ClipSpan; }[]

clips

TS
function clips(t: Timeline): Clip[]

cut

The keys either side of a cut at frame (TL3d: a split clip's keys stay at their frames): the left clip's, and the right clip's in its own frames. A cut between two keys puts a key of the value there on both sides, so each half moves as the whole did up to the cut.

TS
function cut(keys: Key[], frame: number): [Key[], Key[]]

cutoutError

What is wrong with a clip's cutout props as they stand, or undefined: a mask kind or blend it hasn't got, a value out of range, a grey key.

TS
function cutoutError(props?: Props): string | undefined

cutoutLook

How the editor's preview draws a clip's cutout on its picture, as draws it in a composition: CSS for the picture, and the SVG filter its key needs (an feColorMatrix's values under id, to put beside the picture).

TS
function cutoutLook(props: Props | undefined, width: number, height: number): { style: Record<string, string>; key?: { id: string; matrix: string; } | undefined; }

cutoutOf

A clip's cutout read from its props: a mask when its kind is one, a blend other than normal, a key when it has a colour.

TS
function cutoutOf(props?: Props): Cutout

cutoutProps

A cutout as a clip's props: every one of them, what it hasn't got at its plain value, so a set takes off the rest. Values to five places.

TS
function cutoutProps(c: Cutout): Props

eased

How far along (0..1, or past it for a handle that overshoots) a value is at p of the way between two keys.

TS
function eased(ease: Ease | undefined, p: number): number

effectFilter

The CSS filter of kind at amount (0 to 1, clamped); undefined for a kind raea doesn't draw.

TS
function effectFilter(kind: string, amount?: number): string | undefined

effectParts

An effect clip's parts, kept in its props as JSON: read back when they are well formed.

TS
function effectParts(v: unknown): EffectPart[] | undefined

empty

TS
function empty(fps?: number): Timeline

Used in: manual: edits.

end

TS
function end(c: Clip): number

Used in: manual: edits.

evict

The keys to drop so the store is at most limit bytes: stale ones first, then the least recently played. What is under the playhead (hold) stays while anything else can go.

TS
function evict(kept: Kept[], limit: number, hold?: Set<string>): string[]

find

TS
function find(t: Timeline, id: string): { track: Track; clip: Clip; } | undefined

fits

Whether c has room on the track (it overlaps none of the others).

TS
function fits(track: Track, c: Pick<Clip, "start" | "length" | "id">): boolean

frameOf

The timeline frame at which clip id shows source frame source, when it does (a constant-speed clip).

TS
function frameOf(t: Timeline, id: string, source: number): number | undefined

fromRender

A film with no composition behind it: its scenes as clips of one main track (cut where the picture cuts). Each clip is the film's picture and its sound together, as footage is until its sound is extracted, so a cut, a move or a speed takes both. Its magnet is on: a scene removed closes up, as a cut of footage does.

TS
function fromRender(o: { frames: number; fps: number; cuts?: number[]; captions?: { text: string; start: number; end: number; }[] | undefined; }): Timeline

fromSequences

The composition's sequences as a timeline: a track a lane, the first lane on top as the strip draws it. The first lane is the main track, its magnet on, only when its clips already run from frame 0 with no gap: a composition's sequences are where its code puts them, and nothing here moves one that wasn't dragged.

TS
function fromSequences(rows: SeqRow[], fps: number): Timeline

fromTracks

A sound's tracks as a timeline: a sound track each, by its bus; a clip of a file keeps its place in the file (its offset) and its level. Notes and lines are clips too, locked here: they are edited where they are written (the roll, the words). No magnet: a mix's clips are where they were put.

TS
function fromTracks(tracks: SoundTrack[], fps: number): Timeline

gridFrames

The frames a snap grid marks in a timeline length frames long (none for a grid finer than a frame, or of more than 5,000 marks).

TS
function 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.

TS
function joined(ranges: Range[]): Range[]

keyOf

What a range of kept frames is kept under: everything that draws it. Two states of a timeline that draw the range the same give the same key, so frames drawn before an edit elsewhere (or before an undo) are found again.

TS
function keyOf(t: Timeline, [from, to]: Range, media?: (clip: Clip) => string): string

length

The timeline's length: its last clip's end.

TS
function length(t: Timeline): number

Used in: manual: edits.

maskPlain

A mask's values when a kind is chosen: in the middle, half the frame's shorter side across, so a circle is round on any frame; a mirror a band a fifth of the frame's height.

TS
function maskPlain(kind: "circle" | "line" | "rect" | "mirror" | "heart" | "star", width: number, height: number): Required<Mask>

next

Where the player goes when what it is playing ends at timeline frame frame: the next clip's first frame (at or after it), or undefined at the film's end.

TS
function next(t: Timeline, frame: number): number | undefined

palette

Everything offered: raea's own, then each plugin's in order (a name a plugin before it took stays that one's).

TS
function palette(plugins?: Adds[]): { eases: Record<string, Ease>; curves: Record<string, SpeedPoint[]>; transitions: TransitionKind[]; combos: ComboKind[]; tracks: TrackKindInfo[]; effects: EffectInfo[]; texts: TextStyle[]; tools: Preset[]; snaps: SnapGrid[]; }

partsFilter

The CSS filter of an effect given as parts, at amount (0 to 1, clamped).

TS
function partsFilter(parts: EffectPart[], amount?: number): string

played

How many frames source frames of source take to play under the curve.

TS
function played(curve: SpeedPoint[], source: number): number

playLength

The timeline's length as it plays: its main track's end.

TS
function playLength(t: Timeline): number

points

The curve as points from 0 to 1 in order, each speed in range.

TS
function points(curve: SpeedPoint[]): SpeedPoint[]

presetError

Why p isn't a preset, or undefined when it is.

TS
function presetError(p: unknown): string | undefined

profile

The speed at each of n places along the clip's own time (the line drawn over the clip, TL6b).

TS
function profile(curve: SpeedPoint[], source: number, n: number): number[]

propsAt

A clip's props as they stand frame frames from its start: each keyed one at its value there, the rest as set (what a mask's, a key's or a crop's look is drawn from while its numbers are keyed, TL5a).

TS
function propsAt(clip: { props?: Record<string, boolean | Value> | undefined; keys?: Record<string, Key[]> | undefined; }, frame: number): Record<string, boolean | Value>

readAdds

A plugin's additions as written in its manifest, checked: what is well formed, and why the rest isn't.

TS
function readAdds(raw: unknown): { adds: Adds; errors: string[]; }

readTimeline

A timeline as an agent wrote it on a feed item or a controller's field (its own data: a schedule, a set list, a shot plan), checked and made whole: what is well formed, and why the rest isn't. Frames are rounded to whole ones; a track with no kind is an overlay; ids must be there and not repeat.

TS
function readTimeline(raw: unknown): { timeline?: Timeline; errors: string[]; }

ready

The timeline ranges that are ready to play, given the source ranges that are (frames of the file the player has buffered): each main-track clip's part whose source is in one of them.

TS
function ready(t: Timeline, source: Range[]): Range[]

segmentsOf

A render's cut, as the frames of the source played in order (the hand edit's segments): what a film's main track is after its scenes were moved, trimmed, split and removed.

TS
function segmentsOf(t: Timeline): [number, number][]

seqEdits

What the host is asked to do to the composition's sequences for op on timeline t (read from them), in order; or why this operation isn't one the sequences can take yet. Each edit names sequences as they are before it.

TS
function seqEdits(t: Timeline, op: Op): SeqEdit[] | { why: string; }

showing

What shows at timeline frame frame: the main-track clip over it, the source frame, and the rate. Undefined in a gap or past the end.

TS
function showing(t: Timeline, frame: number): Showing | undefined

slot

Where a track of this kind goes among the others: after the last of its own kind, else in ORDER's place.

TS
function slot(tracks: Track[], kind: TrackKind): number

snap

frame moved to the nearest target within within frames (8 px at the strip's zoom), and what it snapped to.

TS
function snap(frame: number, to: Target[], within: number): { frame: number; to?: Target; }

snapMove

A moved clip (its start and length) snapped by whichever of its edges is nearer a target: how far it moves.

TS
function snapMove(start: number, len: number, to: Target[], within: number): { by: number; to?: Target; }

sorted

The keys in time order (two at one frame: the later one written wins).

TS
function sorted(keys: Key[]): Key[]

sourceAt

The source frame showing time frames into the clip, under the curve over source frames of source.

TS
function sourceAt(curve: SpeedPoint[], source: number, time: number): number

speedOf

A clip's speed where it is constant.

TS
function speedOf(c: Clip): number

targets

Every frame an edge can snap to, leaving out the clips being moved (not).

TS
function targets(t: Timeline, o?: { not?: string[]; playhead?: number; beats?: number[]; }): Target[]

textStyleError

Why t isn't a text style, or undefined when it is.

TS
function textStyleError(t: unknown): string | undefined

textStyleOf

A text clip's style, kept in its props as JSON: read back when it is well formed.

TS
function textStyleOf(v: unknown): TextStyle | undefined

timecode

mm:ss:ff, drawn from frames.

TS
function timecode(frames: number, fps: number): string

valueAt

The property's value at frame (frames from its clip's start), or undefined with no keys.

TS
function valueAt(keys: Key[] | undefined, frame: number): Value | undefined

Used in: manual: edits.

without

ranges with cut taken out of them.

TS
function without(ranges: Range[], cut: Range[]): Range[]

Values

ADJUST_KINDS

ADJUST_PROP_LIST

The clip props an adjustment is held in.

ADJUST_PROPS

Each adjustment as a clip's prop: brightness is adjustBrightness.

ADJUSTS

CapCut's Adjust, in its order: each from -1 to 1 (0 as shot), but sharpen, fade, vignette and grain, from 0.

BLEND_KINDS

BLENDS

How a part is drawn over what is under it: CapCut's Blend modes that CSS has (Add is plus-lighter), in its order, then difference and exclusion.

CODE_KINDS

The transitions a composition's draws (sdk/video edges.ts).

COMBO_KINDS

COMBOS

raea's own Combos: the kinds draws. A plugin adds its own as data the same way.

CURVES

CapCut's curve presets, as points over the source; a plugin adds its own.

CUTOUT_PROPS

Every prop a clip's cutout is held in.

EASES

The easing presets raea registers; a plugin adds its own beside them.

EFFECTS

FASTEST

KEY_NAMES

What a sequence's can key, as a clip's prop and its name: the placement, and the numbers inside its mask, its chroma key and its crop ("mask.x" for maskX).

KEY_PROPS

A chroma key's values as a clip's props.

KEYABLE

The clip props a sequence keys.

KEYED

A sequence's placement, as still values and as keys (sdk/video nudge.tsx).

MASK_KINDS

A mask's shapes, in CapCut's order: a line (what is above it is kept), a mirror (a band), a circle, a rectangle, a heart and a star.

MASK_PROPS

A mask's values as a clip's props.

ORDER

PRESET_PROPS

The props a preset may set: a clip's placement (what the editor's own tools set).

SLOWEST

TEXT_PROPS

The CSS a text style may set: type and colour, nothing that lays the frame out.

TEXTS

raea's own text styles. Sizes are the composition's pixels (a 1080-line frame).

TRACKS

raea's own kinds of track, in the order they stack.

TRANSITIONS

raea's own transitions: the kinds its draws (sdk/video transition.tsx). Two parts that only touch have no frames of each other to mix, so there is no dissolve: a fade goes through black.

under

Kinds a plugin said stack under the picture, with the sound (registry.ts sets them).

Types

Adds

What one plugin adds.

FieldTypeWhat it is
easesRecord<string, Ease>easings of its own, by name
curvesRecord<string, SpeedPoint[]>speed curves of its own, by name
transitionsTransitionKind[]transitions of its own
combosComboKind[]Combos of its own: how a clip moves over one cycle, as data the timeline's preview draws
tracksTrackKindInfo[]kinds of track of its own: a clip posted or added on one is drawn and edited like any other
effectsEffectInfo[]effects of its own (TL7b, TL11a), each drawn by its parts: CSS filter functions from amount 0 to amount 1
textsTextStyle[]text styles of its own (TL7c, TL11a)
toolsPreset[]tools of its own: presets put on the picked clips
snapsSnapGrid[]marks edges snap to: grids in seconds

Adjust

A part's adjustments, each 0 (or left out) as shot: brightness, contrast, saturation, exposure, highlights, shadows, temperature (warm above 0) and tint (magenta above 0) from -1 to 1; sharpen, fade, vignette and grain from 0 to 1.

TS
type Adjust = Partial<Record<AdjustKind, number>>

AdjustKind

TS
type AdjustKind = (typeof ADJUSTS)[number]["kind"]

Anim

How a clip comes in or goes out on its own: a transition's kind over its own first or last frames.

FieldTypeWhat it is
kind (required)stringfade, slide, wipe, zoom or a plugin's (TRANSITIONS)
length (required)Frameshow many of the clip's frames it takes

Applied

TS
type Applied = { ok: true; timeline: Timeline; inverse: Op } | { ok: false; why: string }

Blend

TS
type Blend = (typeof BLENDS)[number]["kind"]

ChromaKey

A chroma key: the colour taken out (a green or blue screen), how much of what is near it goes, and how softly.

FieldTypeWhat it is
color (required)stringthe key colour, #rrggbb or #rgb
strengthnumberhow far from the key colour is still taken out, 0 (only it) to 1 (most of its hue); 0.5 when not said
shadownumberhow much of the screen's shadows (its darker, duller parts, nearer grey than the key) is let through half seen rather than kept whole, 0 (none) to 1; it softens the edge too. 0.2 when not said

Clip

A span of something on a track: footage, a sound, words, a composition's sequence, an effect.

FieldTypeWhat it is
id (required)stringits own id, unique on the timeline
kind (required)stringwhat it is: "video", "audio", "text", "sequence", "component", "effect", a plugin's own
namestringwhat its head says (its file's or its sequence's name when unset)
start (required)Frameswhere it starts on the timeline
length (required)Frameshow long it lasts on the timeline
inFramesmedia: the first source frame it shows
sourceFramesmedia: how many frames the source has (unset: no end to trim against)
speednumbera constant speed (1 when unset, TL6a)
curveSpeedPoint[]a speed curve, which wins over speed
showsFramesunder a curve: how many source frames the clip shows (its length is the time the curve takes over them)
reversebooleanfootage played backward: its last source frame first
freezebooleana still: the source frame in held for the clip's whole length
offbooleanturned off: drawn dimmed, left out of the picture and the sound
mutedbooleanfootage whose own sound was taken out onto a sound track: its picture plays silent
lockedstringit can't be changed here, and why ("set in code", TL0c)
groupstringclips with one group pick and move as one
propsRecord<string, Value | boolean>its still values by property (x, y, scale, rotate, opacity, text, a plugin's): a keyed one is ignored
keysRecord<string, Key[]>its keys by property, in frame order
volumenumbersound: its level, 1 as recorded
fadeInFramessound: how long it fades in from its start
fadeOutFramessound: how long it fades out to its end
enterAnimthe picture or words: how it comes in over its first frames (TL7d, CapCut's In animation)
exitAnimthe picture or words: how it goes out over its last frames (TL7d, CapCut's Out animation)
comboAnimthe picture or words: how it moves over its whole length (TL7e, CapCut's Combo and its text Loop), a cycle every length frames from its first; its own length plays it once
atstringits element in the code
markersMarker[]markers on the clip itself, in frames from its start
inside{ kind: TrackKind; clip: Clip }[]a compound clip: the clips it holds, each with the kind of track it came from, their starts in frames from this clip's own start

ClipSpan

A clip's span and level, in seconds and dB: what the host writes back for a clip that was moved, trimmed or turned up or down (raea-feed host/clips.ts).

FieldTypeWhat it is
start (required)numberwhere it starts, in seconds of the render
end (required)numberwhere it ends, in seconds of the render
offset (required)numberwhere in its file it starts playing, in seconds
gainDb (required)numberits level change, in dB (0 as recorded)

ComboKind

A kind of Combo: its name, what the person sees, and its wave.

FieldTypeWhat it is
kind (required)stringits name, as code writes it
title (required)stringwhat the person sees
wave (required)ComboWavehow it moves over one cycle
linearbooleanstraight from value to value, not eased: a spin that keeps turning

ComboWave

How a part moves over one cycle of a Combo: each property's values, evenly spaced over the cycle and eased between, the cycle starting again where it ends. x and y move it by a share of its own size in percent, rotate turns it in degrees, scale sizes it, opacity fades it. A wave that ends where it starts plays once over the part as CapCut's Combo does, and loops seamlessly as its text Loop does.

FieldTypeWhat it is
xnumber[]across, in percent of its width
ynumber[]down, in percent of its height
scalenumber[]its size, 1 as it is
rotatenumber[]turned, in degrees
opacitynumber[]how much of it shows, 0 to 1

Cutout

A clip's mask, blend and key, each there only when it has one.

FieldTypeWhat it is
maskMaskwhat of it is seen: a shape in shares of the frame
blendBlendhow it is drawn over what is under it
chromaChromaKeya colour taken out of it

Ease

How a value travels from one key to the next: a straight line, no travel (it holds, then jumps), or a cubic bezier's two handles [x1, y1, x2, y2] as CSS writes them.

TS
type Ease = "linear" | "hold" | [number, number, number, number]

EdgeStyle

What an edge does to the part at a frame: a move, a fade and a cut-away, as CSS writes them.

FieldTypeWhat it is
transformstringa move or a scale
opacitynumberhow much of it shows, 0 to 1
clipPathstringhow much of it is covered

EffectInfo

An effect the palette offers: raea's own by its kind, a plugin's with the parts that draw it.

FieldTypeWhat it is
kind (required)stringits kind, as takes it
title (required)stringwhat the bar and the clip's head say
partsEffectPart[]a plugin's: the CSS filter functions that draw it, each from amount 0 to amount 1

EffectKind

FieldTypeWhat it is
kind (required)stringits name in the composition's code:
title (required)stringwhat the person sees
filter (required)(amount: number) => stringthe CSS filter at amount

EffectPart

An effect as data: each part one CSS filter function, its value going from from (amount 0, where it changes nothing) to to (amount 1), with its unit: ["blur", 0, 6, "px"].

TS
type EffectPart = [fn: string, from: number, to: number, unit?: string]

FilterStep

One step of an SVG filter: its tag and its attributes, so React and the DOM can each make it.

FieldTypeWhat it is
tag (required)"feComponentTransfer" | "feFuncR" | "feFuncG" | "feFuncB" | "feColorMatrix" | "feConvol…the SVG filter primitive (or a component transfer's function) it is
attrs (required)Record<string, string>its attributes as SVG writes them (in, in2, result, values,...)
childrenFilterStep[]a component transfer's functions

Frames

A count of frames, always whole.

TS
type Frames = number

Kept

A drawn range in the store, as the clearing reads it.

FieldTypeWhat it is
key (required)stringthe range's key (rangeKey): what it is drawn from
bytes (required)numberwhat it takes on disk
used (required)numberwhen it was last played (ms)
stalebooleanit belongs to a version that was closed or discarded: it goes at once

Key

A property's value at a frame of its clip (frames from the clip's start), and how it leaves for the next key.

FieldTypeWhat it is
at (required)Framesthe frame it is at, counted from its clip's start
value (required)Valuethe property's value there: a number, a list of them (a colour, a point) or a string
easeEasehow the value travels to the next key (linear when unset)

LineRules

How words are gathered into lines.

FieldTypeWhat it is
wordsnumberthe most words on a line (7)
charsnumberthe most characters on a line, spaces counted (42)
gapFramesa 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.

FieldTypeWhat it is
id (required)stringits own id, unique on the timeline
at (required)Framesits frame on the timeline (on a clip: from the clip's start)
namestringwhat it says, shown on hover
colorstringits colour, any CSS colour

Mask

A mask, in shares of the part's frame.

FieldTypeWhat it is
kind (required)MaskKindits shape: line, mirror, circle, rect, heart or star
xnumberits centre, a share of the frame's width from the left (0.5 the middle)
ynumberits centre, a share of the frame's height from the top
wnumberits width, a share of the frame's (a line has none)
hnumberits height, a share of the frame's (a mirror's band is this thick)
rotatenumbera turn, in degrees
feathernumberhow soft its edge is, 0 sharp to 1 (a blur a twentieth of the frame's shorter side)
roundnumbera rectangle's corners, 0 square to 1 as round as its shorter side allows
invertbooleankeeps what is outside it instead

MaskKind

TS
type MaskKind = (typeof MASK_KINDS)[number]

Op

TS
type Op = | { op: "move"; ids: string[]; by: Frames; track?: string } /** a clip's start or end dragged to the timeline frame `to` */ | { op: "trim"; id: string; edge: "start" | "end"; to: Frames } /** the clips `ids` split at `at`; with none named, every clip under it (Cmd+B, Cmd+Shift+B: TL3d) */ | { op:…

Preset

A tool a plugin adds: one press sets these on every picked clip, as one edit each.

FieldTypeWhat it is
id (required)stringits id: lowercase letters, digits and dashes
title (required)stringwhat the bar says
set (required){ props?: Record<string, number | boolean>; speed?: number; volume?: number }what it sets on each picked clip: placement props (PRESET_PROPS), a speed, a level

Range

TS
type Range = [from: Frames, to: Frames]

Said

A word, or a line of them: its text, its first frame and the frame after it ends.

FieldTypeWhat it is
text (required)stringwhat is said: a word, or a line's words with a space between
start (required)Framesits first frame
end (required)Framesthe frame after it ends

SeqEdit

The host's edit to a sequence: its new span, a split, a delete.

TS
type SeqEdit = | { op: "move"; i: number; from: number; to: number } | { op: "split"; i: number; at: number } | { op: "delete"; i: number } /** the sequence's keyed properties as they now stand: written as its <Nudge keys>, one a property (TL5d) */ | { op: "keys"; i: number; keys: Record<string, [number, number…

SeqLook

A sequence's still placement: its 's props (sdk/video nudge.tsx). crop is left, top, right, bottom.

FieldTypeWhat it is
xnumbermoved right, in px of the composition
ynumbermoved down, in px of the composition
scalenumbertimes its size (1 as it is)
rotatenumberturned clockwise, in degrees
opacitynumberfrom 0 (gone) to 1 (as it is)
mirrorbooleanflipped left to right
crop[number, number, number, number]cut in from each edge, in % of its size: left, top, right, bottom
maskMaskwhat of it is seen: a shape in shares of the frame
blendBlendhow it is drawn over what is under it, normal when not said
chromaChromaKeya colour taken out of it
adjustAdjustits own Adjust, each kind not 0

SeqRow

A as the host lists it: its place among the file's elements, its span in the composition's frames, the lane it sits on (nested ones below their parent, overlapping ones apart), and why it can't be rewritten.

FieldTypeWhat it is
i (required)numberits place among the file's elements, in source order: what an edit names it by
name (required)stringits name prop, or what the host calls it when it has none
labelstringwhat its clip's head says, when it isn't the name
from (required)numberits first frame in the composition
to (required)numberthe frame after its last
lane (required)numberthe lane it sits on: 0 the top, nested ones below their parent, overlapping ones apart
lockedstringwhy it can't be rewritten (a span from a variable, a loop), when it can't
keysRecord<string, [number, number, Ease?][]>the keys its holds, each [frame of the sequence, value, ease?]
speednumberhow fast the footage it holds plays (its media's playbackRate), when it holds footage at one rate
curve[number, number][]its footage's speed as a curve, each [place 0 to 1, speed] (its media's speedCurve), over shows source frames
showsnumberunder curve: how many source frames it shows
lookSeqLookhow it is placed, as its says without keys: moved, scaled, turned, faded, mirrored, cropped
textstringthe words it shows, when words are all it shows: a text clip, its words changed by renaming it
effect{ kind: string; amount: number; /** a plugin's: the parts that draw it */ parts?: Effec…the effect it puts on the picture under it, when an is all it holds: an effect clip
in{ kind: string; frames: number }how it comes in and goes out: its 's in and out
out{ kind: string; frames: number }how it goes out: its 's out
combo{ kind: string; frames: number }how it moves throughout: its 's combo, a cycle every frames
media"video" | "audio"a
startFromnumberits media's first frame used, in frames of its file
volumenumberits media's level, 1 as recorded
mutedbooleana
filestringits media's file, a path in the composition's media folder (where its src is staticFile("…"))
heard{ of: string; denoise?: boolean; voice?: string }what it plays is a copy of of with its noise reduced or its voice changed (an
steady{ of: string; level: string }what it plays is a copy of of held steady at level (a
retouch{ of: string; smooth?: number; brighten?: number; slim?: number; eyes?: number }what it plays is a copy of of with its faces retouched, each amount 0 to 1 (a
cutoutCutoutMatte & { kind: string; at?: number; strokes?: string }it wears a cutout's mattes (a

Showing

What the player shows at a frame of the edited timeline.

FieldTypeWhat it is
clip (required)Clipthe main track's clip there
source (required)numberthe source frame to show
rate (required)numberhow fast the source runs there (the player's rate)

SnapGrid

Marks edges snap to that a plugin adds: a grid, one mark every every seconds from the start.

FieldTypeWhat it is
id (required)stringits id: lowercase letters, digits and dashes
title (required)stringwhat the snap menu says
every (required)numberseconds between its marks, from 0.01 to 600

SoundTrack

A track of a sound in the feed as its host lists it (raea-feed host/sounds.ts), in seconds of the render.

FieldTypeWhat it is
id (required)stringits id in the sound's file
name (required)stringwhat its head says
kind (required)"notes" | "clips" | "lines"what it holds: notes (a part played from notes), clips (files placed in time) or lines (words sung or said)
bus (required)stringthe bus it plays through
clips (required){ id: string; from: number; to: number; label: string; src?: string; offset?: number; g…its clips, each with its span in seconds, what it is, its file, where in the file it starts and its level in dB

SpeedPoint

A point of a speed curve: how fast the source plays at a place in it (0 its first frame shown, 1 its last).

FieldTypeWhat it is
at (required)numberwhere in the source, from 0 (its first frame shown) to 1 (its last)
speed (required)numberhow fast it plays there: 1 as recorded, 2 twice as fast, 0.5 half

Target

A frame an edge snaps to.

FieldTypeWhat it is
at (required)Framesits frame on the timeline
what (required)"clip" | "playhead" | "marker" | "beat" | "start"what is there, for the line drawn where it snapped

TextStyle

A way words are put on the picture: where they stand, and how they are drawn (CSS, as React writes it).

FieldTypeWhat it is
kind (required)stringits kind, kept in a text clip's props
title (required)stringwhat the bar says
place (required)"top" | "center" | "bottom"where the words stand on the picture
style (required)Record<string, string | number>how they are drawn: type and colour, as React writes CSS (TEXT_PROPS lists what it may set)

Timeline

A whole timeline: its tracks top to bottom, its marks, its transitions and its three switches.

FieldTypeWhat it is
fps (required)numberframes a second, which every Frames value counts in
tracks (required)Track[]its tracks, top to bottom
markers (required)Marker[]marks on the ruler
transitions (required)Transition[]transitions on cuts
magnet (required)booleanthe main track holds no gap (P, TL4a)
snapping (required)booleanedges snap to cuts, the playhead, marks and beats (N, TL4b)
linkage (required)booleanwhat sits over a main clip moves with it (~, TL4c)

Track

A row of clips that don't overlap, with its head's switches.

FieldTypeWhat it is
id (required)stringits own id, unique on the timeline
kind (required)TrackKindwhat it holds, which places it in the stack
namestringwhat its head says (its kind's title when unset)
lockedbooleanits clips can't be picked or changed
hiddenbooleanleft out of the picture
mutedbooleanleft out of the sound
heightnumberdrawn this tall, in px
clips (required)Clip[]its clips, in start order

TrackKind

A track's kind, in the order they stack from the top: effect, text, overlay, main, sound. A plugin adds its own; an unknown kind sorts with the overlays.

TS
type TrackKind = "effect" | "text" | "overlay" | "main" | "sound" | (string & {})

TrackKindInfo

A kind of track: what its head says, and where it stacks (with the tracks over the picture, or with the sound under it). A clip on it is of that kind.

FieldTypeWhat it is
kind (required)stringits kind, as a Track's kind names it
title (required)stringwhat its head says
underbooleanit stacks with the sound, under the main track

Transition

A transition on the cut between two clips that touch on one track: the cut is the end of clip after, so it follows that cut wherever an edit moves it.

FieldTypeWhat it is
id (required)stringits own id, unique on the timeline
kind (required)stringits kind: fade, slide, wipe, zoom or a plugin's (TRANSITIONS)
after (required)stringthe clip whose end is the cut it sits on
length (required)Frameshow long it takes, centred on the cut

TransitionKind

FieldTypeWhat it is
kind (required)stringthe component's name in the composition's code
title (required)stringwhat the cut's menu says

Value

A property's value: a number, a list of numbers (a colour, a point) or a string.

TS
type Value = number | number[] | string