Skip to main content

Crate alpha2_eval

Crate alpha2_eval 

Source
Expand description

Pure, deterministic timeline evaluation.

Modules§

curves
What an editor needs of a keyed number besides its value: control points to draw, speed, range, and edits that keep the curve it already shows.
edit
The edit operations remove_ranges, split_at and bake, which apply data to a project once.

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 transitions, composition time for composition steps).
ActiveIndex
A precomputed interval index for a validated project snapshot.
ActiveTransition
A transition evaluated at one timeline timestamp.
AudioSpan
The clips of one span, read from an AudioSpanScratch without copying.
AudioSpanDesc
Audio activity over one half-open timeline span.
AudioSpanScratch
Reusable working memory for evaluate_audio_in.
ClipTimes
A clip’s time map with its stretches worked out, for asking where it shows source times.
CompositionPlan
A composition’s output, drawn by steps in dependency order.
Correction
A similarity of a clip’s picture, sampled from a correction’s data set.
DataIndex
Data sets and clips by id, with each set’s displayed picture size.
EffectParamValue
One effect parameter’s value at a timeline timestamp.
EvaluatedLayout
A layout tree with every value sampled.
EvaluatedNode
One box with 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.
FrameShutter
The shutter of one frame: the project’s, the frame it is measured in, and how many samples a runtime lets it average.
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.
NodePaint
What a box draws under its content.
NodeVisual
How a box and its subtree are drawn after layout.
SampleContext
What a sampled value reads data through, the project’s data sets and the clock of its place.
SampledAnimator
An animator’s selector and properties at one time.
SampledReveal
A text reveal at one time.
ShapesPlan
A content tree with its static parts evaluated once.
Sides
A length on each side of a box, as a fraction of the picture’s shorter side.
SourceRead
One reader of a source over an export range (ActiveIndex::source_reads).
SpeedPoint
A playback speed at a timeline time.
Step
One node of a composition, with its inputs resolved to earlier steps.
StepLayer
One layer of a StepOp::Merge.
Stretch
A span of a clip’s timeline over which the shown source time moves one way.
TimeControlSegment
One segment of a time curve in (timeline ticks, source ticks): its two ends and, for a Bezier kind, its two control points.
TimeCurve
The keyframes of a TimeMap::Curve and what it does outside them.
TimeCurveSample
A clip’s time map at one timeline time.
TimePiece
A span of a time curve over which the source time moves along one key segment of one pass.

Enums§

Direction
Which way the shown source time moves over a Stretch.
EvalError
An evaluator failure.
GeneratorPlan
A shapes or layout generator’s tree, planned once. Other generators need none.
NodeContent
A box’s content.
PieceMotion
How the source time moves over a TimePiece.
PlanError
Why a composition’s output cannot be drawn.
SampledSelector
A selector at one time.
StepOp
The operation of a Step. Inputs are indices of earlier steps.
TimeCurveError
Why time_curve_from_speeds made no curve.

Constants§

MAX_PLAN_BYTES
Most bytes all compiled composition plans of one project may hold together, estimated per Step (node path plus settings heap). Past this none draws (PlanError::TooLarge).

Functions§

advance_headroom
The largest factor any cluster’s advance can be widened by under animators over a text of runs: per animator whose advance follows its scale, 1 + w (s - 1) with s its largest horizontal scale and w its largest selection, at least 1; their product, at most the largest animator scale, which also bounds a cluster’s. 1 when none pushes.
bound_kind
The kind of the data set binding follows, if it exists.
bound_scalar
A scalar binding’s value at time, remapped; None without a value.
bound_vec2
A two-component binding’s value at time, a point in its space plus its offset or a scalar in both components. None without a value.
caption_cues
The cues a caption track shows, its own or its from_words words grouped in timeline time.
clip_stretches
The spans of a clip’s timeline over which its picture’s source time moves one way, in timeline order; together they cover the clip. Pictures are mirrored by project frames at frame_rate. None for a time beyond ticks or more stretches than a valid clip has.
contained_picture
The displayed picture’s size as a fraction of a canvas-shaped layer it is contain-fitted into, as the renderer centres it.
correction_at
clip’s correction at timeline time, if it has one with a value there.
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 mask’s outline or a content tree’s geometry at time; context resolves mask bindings.
evaluate_item
One item at time. Opacities, trims and roundness clamp to 0..=1 and lengths to >= 0, since an overshooting curve can carry them past.
evaluate_items
A whole content tree at time, without a plan.
frame_needs
Describes all source frames needed at a timestamp.
hash_sampled_animators
Feeds every value of animators to hash.
insert_time_key
Adds a keyframe at time, inside the keyed range, to a time curve. The segment it falls in is cut as crate::curves::insert_key cuts a number’s, and the new keyframe holds the source tick the curve shows at time. Between the keyframes the curve then names source times within one tick of those it named, since a keyframe holds a whole tick; handles are f32 offsets, whole ticks up to 2^24 of them. A time with a keyframe changes nothing.
next_data_change
The first tick after after at which a timeline-time binding can read another sample: a sample time passing under the reader’s time map, a loop pass starting or, for a linear binding read through a time curve, a keyframe of the curve, a turn of the shown time or a jump of a steps segment. Between two such ticks a hold binding is constant and a linear one changes linearly with timeline time, except inside a segment of a time curve that bends. None when the value never changes again.
next_knot
The first tick after ticks at which a number may step or turn: a keyframe, a repeated copy of one, a wrap of repeat, a jump of steps, a change of bound data. None when from there on it only holds or keeps one slope.
path_angle
The clockwise angle in degrees of a position’s path where the position is at time, measured from the positive x axis in a space aspect wide per unit high: the direction of its spatial curve between keyframes, or of the path of a path position. 0 for a position with no path.
picture_source_time
The source instant a clip’s picture shows at timeline time, mirroring by project frames at frame_rate exactly as evaluation draws it.
plan_composition
Compiles composition’s output into steps as a clip’s composition, where clip nodes draw the clip’s picture. compositions resolves group nodes and sources resolves media nodes.
plan_source_composition
Compiles composition as a composition source. Like plan_composition, but clip nodes and group inputs are errors because nothing feeds them.
sample_channel
The value of channel at time, arity numbers, with the data rules: hold takes the sample at or before time, linear interpolates between two known neighbours, a lost sample holds the last known value, and times outside the samples clamp. None when the channel has no known value.
sample_effect_param
Samples one effect parameter with the project’s keyframe semantics.
sample_hold
Samples a non-interpolating value: the last keyframe at or before time, else the first. Outside the keyframes time is first mapped by the value’s before and after.
sample_insets
Samples per-side lengths like sample_size.
sample_length
Samples a layout length. Mismatched keyframe kinds keep the left kind.
sample_paint
Samples an animated paint. Colors interpolate premultiplied; gradient geometry and stop offsets interpolate numerically, then offsets are kept ordered in 0..=1 and radii positive. Mismatched keyframes hold the left paint.
sample_path
Samples an animated path, interpolating points and tangents linearly in f64. Mismatched keyframe structures hold the left path.
sample_point
Samples a position that may move along spatial curves.
sample_rgba
Samples an animated color, interpolated premultiplied.
sample_scalar
Samples one animated scalar with the project’s keyframe semantics.
sample_shutter
The transform at each of count shutter samples of the frame at time, into out.
sample_text_animators
animators sampled at time, in order.
sample_time_curve
The source time and speed of a clip of the two ranges under time_map at each of times, with pictures mirrored by project frames at frame_rate.
sample_vec2
Samples an animated 2D value like sample_scalar. Use sample_point for positions that may follow spatial curves.
sample_visual
Evaluates visual properties at a timestamp. aspect is the canvas width over height, used to measure motion along spatial curves; context resolves data bindings.
source_instant_to_timeline
The timeline times at which a clip’s picture reaches source time instant: per stretch over which the shown time moves one way, the first tick at which it has reached instant in that stretch’s direction, if the stretch passes it. A freeze passes nothing.
source_range_to_timeline
The timeline ranges of a clip at which its picture shows a source time in [range_start, range_end), the full preimage of picture_source_time.
time_auto_tangents
Writes value-curve handles, in ticks of source time, at the chosen keyframes of a time curve (every keyframe when keys is None) from their neighbours, as crate::curves::auto_tangents does for a number. AutoTangent::Monotone keeps a run of rising keyframes rising and a falling run falling. Other time maps are left alone.
time_curve_from_speeds
The time curve of a speed that is linear between points, playing source_start at the first point’s time, and the least and greatest source time it names between its points.
time_curve_segments
The segments between keys, for drawing a time curve and its handles.