Skip to content

Latest commit

 

History

History
42 lines (31 loc) · 1.12 KB

File metadata and controls

42 lines (31 loc) · 1.12 KB

egui-snow

Latest version Documentation MIT

A lightweight, performant snowfall effect widget for egui.

It renders particles on top of your UI (or behind it) without affecting layout allocation. Ideally suited for festive themes or atmospheric effects.

Run Web Demo

Demo GIF

Usage

Add to Cargo.toml:

[dependencies]
egui = "0.33"
egui-snow = "0.33"

In your update loop:

use egui_snow::Snow;

fn update(ctx: &egui::Context, ...) {
    // Render your UI...
    egui::CentralPanel::default().show(ctx, |ui| {
        ui.label("Hello, Winter!");
    });

    // Render snow on top
    Snow::new("snow_effect")
        .color(egui::Color32::from_white_alpha(200))
        .speed(40.0..=100.0)
        .size(0.5..=3.0)
        .show(ctx);
}