Skip to main content

Crate alpha2_eval

Crate alpha2_eval 

Source
Expand description

Pure, deterministic timeline evaluation.

Structs§

ActiveAudioClip
One audio clip overlapping an evaluated timeline span.
ActiveCaption
The cue one caption track shows at a timestamp.
ActiveClip
A visible or audible clip mapped to its source timestamp.
ActiveComposition
A clip’s composition at one timeline timestamp.
ActiveEffect
One effect invocation at one timestamp: timeline time for a timeline transition, composition time for a composition step.
ActiveIndex
A precomputed interval index for a validated project snapshot.
ActiveTransition
A transition evaluated at one timeline timestamp.
AudioSpan
The clips of one span, as evaluate_audio reports them, held in an AudioSpanScratch and read back without copying.
AudioSpanDesc
Audio activity over one half-open timeline span.
AudioSpanScratch
Reusable working memory for evaluate_audio_in.
CompositionPlan
A composition’s output, drawn by steps in dependency order.
EffectParamValue
One effect parameter’s value at a timeline timestamp.
EvaluatedLayout
A layout tree with every value sampled.
EvaluatedNode
One box, its values sampled. Lengths are fractions of the picture’s shorter side.
EvaluatedText
A text node’s sampled text and the style it inherits.
EvaluatedVisual
Visual properties evaluated at one timeline timestamp.
FrameDesc
A timestamp-specific composition description with no GPU handles.
FrameNeed
A source-frame request emitted for host prefetch and decode scheduling.
LayoutPlan
A layout tree, evaluated once when it does not animate.
NodeLayout
A box’s sampled box-model, flex and grid values. Lengths are fractions or percents, never pixels.
NodePaint
What a box draws under its content.
NodeVisual
How a box and its subtree are drawn after layout.
ShapesPlan
A content tree, its parts that do not animate evaluated once.
Sides
A length on each side of a box, as a fraction of the picture’s shorter side.
Step
One node of a composition, with its inputs resolved to earlier steps.
StepLayer
One layer of a StepOp::Merge.

Enums§

EvalError
An evaluator failure.
GeneratorPlan
A generator’s tree, planned once: what a shapes or layout generator evaluates each frame from. Other generators need none.
NodeContent
A box’s content.
PlanError
Why a composition’s output cannot be drawn.
StepOp
The operation of a Step. Inputs are indices of earlier steps.

Constants§

MAX_PLAN_BYTES
Most bytes the compiled composition plans of one project hold together, as Steps estimate them: each step, its node path, and the heap its settings use (keyframes, parameter and resource names, masks, layers, gradient stops). A project’s plans are those of every composition a clip or composition source shows; past this, none of them is drawn (PlanError::TooLarge). The steps are what validation counts, at most MAX_INLINED_NODES; this bounds how large each may be, which inlining multiplies.

Functions§

evaluate
Evaluates visual and audio clip descriptions at one timeline timestamp.
evaluate_audio
Evaluates every audible clip overlapping a half-open timeline span.
evaluate_audio_in
Evaluates the same clips as evaluate_audio into reusable memory.
evaluate_geometry
A geometry at time: a mask’s outline, or a content tree’s.
evaluate_item
One item at time. Opacities, trims, and roundness are clamped to 0..=1 and lengths to zero or more, as an overshooting curve could carry them past.
evaluate_items
A whole content tree at time, without a plan.
frame_needs
Describes all source frames needed at a timestamp.
picture_source_time
The source instant a clip’s picture shows at timeline time: its time map read with the reverse and ping-pong mirror of one project frame at frame_rate, exactly as evaluation draws it.
plan_composition
Compiles composition’s output into steps, as a clip’s composition: its clip nodes draw the clip’s picture. compositions resolves group nodes and sources media nodes, which may name generated or composition sources.
plan_source_composition
Compiles composition as a composition source draws it: like plan_composition, but a clip node or group input is an error, since no clip or group node feeds it.
sample_effect_param
Samples one effect parameter with the project’s keyframe semantics.
sample_hold
Samples a value that does not interpolate: the last keyframe at or before time, else the first.
sample_insets
Samples per-side lengths, each side as [sample_size] samples one.
sample_length
Samples a layout length. Validation makes every keyframe one kind (a plan’s lengths are fractions or percents); were they not, the left keyframe’s kind is kept.
sample_paint
Samples an animated paint. Colors interpolate premultiplied, as effect colors do, and gradient points, radii, angles, and stop offsets numerically; offsets are then kept in order within 0..=1 and a radius positive, as an overshooting curve could carry them past. Validation keeps the keyframes alike in kind, stops, and spread; were they not, the left keyframe’s paint is held.
sample_path
Samples an animated path: every point and tangent moves along a straight line between keyframes, in f64. Validation keeps the keyframes alike in structure; were they not, the left keyframe’s path is held.
sample_point
Samples a position that may move along spatial curves.
sample_scalar
Samples one animated scalar with the project’s keyframe semantics.
sample_vec2
Samples one animated two-dimensional value with the project’s keyframe semantics; see sample_scalar. A position that may follow spatial curves is sampled with sample_point.
sample_visual
Evaluates visual properties at a timestamp: a clip’s at timeline time, a transform node’s at composition time. aspect is the width over the height of the space the position is normalized in (the canvas), in which a position moving along a spatial curve is measured.