Skip to main content

Module spec

Module spec 

Source
Expand description

The compose spec: a video described by intent, which crate::compile turns into a project document.

Times are seconds, rounded to the nearest tick (1/120 000 s). Lengths are canvas pixels. Colors are CSS hex strings or the project’s {red, green, blue, alpha} object. Nodes are tagged by type, and a node with an id can be named by another (a music bed ducks under it).

Structs§

Audio
A sound file.
CaptionedVideo
A video under its captions.
Captions
Timed text.
ColorFill
An area painted one color.
ComparisonGrid
Clips in a labeled grid.
Counter
A number counting from start to end, shown as text that changes on the frame grid.
Cue
Text over an interval.
CustomCanvas
A canvas by its parts.
EndCard
A closing card.
Grid
Children in grid cells.
Layout
A layout generator.
Logo
A picture in a corner.
LowerThird
A name and role in the lower left.
Media
A video or still file.
Motion
An entrance or exit, timed from the node’s own start or back from its own end.
MusicBed
Music under the video.
NumberFormat
How a counter writes its number.
Raw
Part of a project at its own times.
Reframe
A video over a blurred copy of itself.
Reveal
A text revealed a unit at a time. Each unit moves at a constant rate over duration.
Sequence
Children one after another.
Slideshow
Stills or clips in turn.
SpeakerLook
How one speaker’s captions look.
Stack
Children over each other.
Text
Text in one of the theme’s styles.
Theme
How text, panels and timings look. Parts left out come from the base theme. Sizes are fractions of the canvas’s shorter side, so a theme looks the same on wide and tall canvases.
Title
A title and subtitle.
Transition
The transition between two neighbours of a sequence.
VideoSpec
A whole video: a body, what is drawn over it, and what plays under it.

Enums§

Align
A point of an area: its center, an edge’s middle or a corner.
Canvas
The canvas: a preset name, or its parts.
CaptionStyle
How captions look.
Direction
A direction of travel on the canvas.
EasingChoice
A timing curve: linear, a CSS name (ease, ease-in, ease-out, ease-in-out) or a project easing object.
FileKind
What a media file holds, when its extension does not say.
Fit
How a picture fills its area.
FrameRateChoice
A frame rate, as a number or exactly.
GridLength
How long a grid of clips of different lengths lasts.
Inset
Space kept clear inside an area.
Loudness
The loudness an export normalizes to: a target, or a target and a ceiling.
MediaItem
A file given by its path alone, or a media node.
MotionKind
What an entrance or exit moves.
Node
One part of a video.
RevealKind
How a revealed unit appears.
RevealUnit
The unit a text is revealed by.
TextRole
A theme text style.
ThemeChoice
A theme by name, or one built on a named theme.
TransitionChoice
A sequence’s transitions: none, the theme’s, or one given.

Constants§

COMPOSE_VERSION
The newest compose spec version this build reads.