Skip to content

LaVashikk/egui-snow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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);
}

About

A lightweight, zero-layout-impact snowfall effect widget for egui

Topics

Resources

License

Stars

Watchers

Forks