Skip to main content

Crate oxframe_components

Crate oxframe_components 

Source
Expand description

Blocks for explainer videos. Each one is added like any other node, takes its look from the project theme, and speaks three words: enter, next and exit.

ⓘ
let steps = view.add(BulletList::new(["Take the middle", "Compare", "Drop half"]));
steps.enter().await;
for _ in 0..3 { steps.next().await; }

Structs§

Axes
A plotting area: a box with ranges, a grid, axes with arrows, ticks and labels. Derefs to Node, so it moves and fades like any node.
AxesBuilder
Builder for Axes.
Bars
Bars from Axes::bars.
BulletList
Items appear one per next, after enter shows the stack.
BulletListBuilder
Builder for BulletList.
Callout
A caption above target, with an arrow pointing down at it. next reveals the caption; the arrow comes in with enter.
CalloutBuilder
Builder for Callout.
ChapterMarker
A short label pinned to the top safe area.
ChapterMarkerBuilder
Builder for ChapterMarker.
CodeExplainer
Code with a caption. enter shows the code. Each next focuses one step and sets the caption.
CodeExplainerBuilder
Builder for CodeExplainer.
EndCard
Closing card. next reveals the note.
EndCardBuilder
Builder for EndCard.
FlowDiagram
Nodes and arrows. The diagram places itself: left to right, or top to bottom after down. next highlights the next node.
FlowDiagramBuilder
Builder for FlowDiagram.
Interval
A data range, min to max. Animates with .to(-10.0..10.0, 1.0).
LowerThird
Name and role pinned to the bottom safe area. next reveals the role.
LowerThirdBuilder
Builder for LowerThird.
Mat2
A 2 × 2 matrix, row by row: Mat2([[a, b], [c, d]]) maps (x, y) to (a x + b y, c x + d y). Animates entry by entry, as Manim does.
Matrix
Values in a grid between square brackets. Each cell is a Txt, so cell(1, 0).text().set("7") changes it and .fill() colors it. row_frame and column_frame give outlines that fade in to point at a row or a column.
MatrixBuilder
Builder for Matrix.
NumberLine
A single horizontal axis with ticks, labels and an arrow.
Plot
A function plot. Derefs to its Path, so .draw_on(), .stroke() and .line_width() work as on any path.
Series
A line through data points; see Axes::line_series.
Table
A header and rows. The rows are a list you can change while the scene runs: insert_row, remove_row and sort_by_column move the other rows into place.
TableBuilder
Builder for Table.
TableRow
One row of a Table: a group with a background, its cells and a rule under it. Derefs to Node.
TitleCard
A centered title. enter shows the card and the title, next shows the subtitle.
TitleCardBuilder
Builder for TitleCard.
Vector
An arrow on Axes from the origin to a data point. Derefs to its Line, so .stroke(), .draw_on() and .fade_out() work.