Mystify screensaver for egui.
Renders two bouncing quadrilaterals with colour-cycling trails onto the egui background layer, recreating the classic Windows 3.x Mystify screen saver.
Add the crate to your Cargo.toml:
[dependencies]
egui-screensaver-mystify = "0.1"Then call paint every frame from your eframe::App::update implementation,
before drawing any UI windows:
use egui_screensaver_mystify::MystifyBackground;
struct MyApp {
mystify: MystifyBackground,
}
impl eframe::App for MyApp {
fn update(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) {
self.mystify.paint(ctx);
// … rest of your UI …
}
}Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE)
- MIT License (LICENSE-MIT)
at your option.