Skip to main content

build

Function build 

Source
pub fn build(
    geometry: &mut DrawGeometry,
    runtime: Option<&mut MilkRuntime>,
    out: &FrameOutputs,
    waveform: &[f32; 512],
    _time: f32,
    dt: f32,
    aspect: f32,
)
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 nothing here, and that is the contract (Plan 0109 Phase 2): every figure this layer builds is a pure function of the trace and the frame outputs. The parameter stays in the signature because the scene has the value and because time-independence is a claim worth being able to testdraw_layer.rs calls this twice at well-separated times and compares the geometry. A future mode that legitimately animates would rename it back, and would owe that test a reason.