Skip to main content

build

Function build 

Source
pub fn build(
    geometry: &mut DrawGeometry,
    runtime: Option<&mut MilkRuntime>,
    out: &FrameOutputs,
    pair: &[[f32; 512]; 2],
    time: f32,
    dt: f32,
    aspect: f32,
    target_width: u32,
)
Expand description

Build the whole draw layer for this frame.

runtime is None for a hand-authored warp_mesh preset, which draws no MilkDrop layer at all — so this whole file costs a native preset one branch. time is read by exactly three of the eight wave_mode figures, and by nothing else in this file: mode 0 turns at 0.2 rad/s (milkdropfs.cpp l.2886-2925), mode 1 at 2.3 (l.2942) and mode 5 at 0.3 (l.3085-3086). Every other figure is a pure function of the trace and the frame outputs, and that narrowed claim is what draw_layer.rs tests — by calling this twice at well-separated times for a mode with no time term, and by asserting each turning mode comes back after exactly one turn at its own rate.