RavenRS · Rust GUI

RuleOfThirdsGrid

Edit and run the RuleOfThirdsGrid RavenRS example in your browser. Explore its Rust code and download a Cargo project for desktop and WebAssembly.

One declarative Rust interface, GPU rendering, reactive state and semantic design tokens. Free and open source under MIT OR Apache-2.0.

Rust source

fn rule_of_thirds_grid() -> impl View {
    let picture = Canvas::new(|frame, scene| {
        // ravenrs-lint: allow(raw_color) the sky of the stand-in photograph the grid is laid over
        let sky = LinearGradient::vertical(Color::rgb(0.3, 0.45, 0.7), Color::rgb(0.85, 0.6, 0.45));
        scene.push_quad(Quad::new(frame, sky));
    })
    .size(300.0, 170.0);
    RuleOfThirdsGrid::new().guide(CompositionGuide::GoldenRatio).stage(picture)
}

The interactive preview loads when JavaScript and WebGPU or WebGL2 are available. You can read the guide and examples here at any time.

More examples