Skip to content

Computer science kit

Cargo featurefeatures = ["cs"]

The computer science kit is the cs feature of fframes-kit (fframes-kit = { .., features = ["cs"] }). It brings one crate, rust-sugiyama, for the layered graph layout of layout::layered. It builds for wasm32, so every figure here also runs in the editor. Every entry names its scene in the components gallery (cargo run --release -p components-gallery -- strip <Scene> -n 8).

  • Recorded once. An algorithm runs once, in a constructor or a OnceLock, and records its steps. The figures sample the steps by time (delay, then one step every step_time seconds), so nothing runs again per frame, and every frame is a pure function of the steps.
  • Placement. A figure is placed in units of ui.space (Manim’s frame: 8 units tall, y up, the origin in the middle). Its sizes are in pixels: cell sizes, gaps, bar areas.
  • No jumps. A change of state blends over a fraction of the step: colours, the dimming of cells out of range, pointers sliding to their next cell and notes fading from one to the next.