Crates.io | svg_face |
lib.rs | svg_face |
version | 0.1.3 |
source | src |
created_at | 2020-05-26 22:30:16.681915 |
updated_at | 2020-12-27 03:36:06.757653 |
description | Generates random SVG faces |
homepage | |
repository | https://github.com/dabreegster/svg_face |
max_upload_size | |
id | 246399 |
size | 30,019 |
This is a straightforward port of https://github.com/anokhee/visual-synthesizer to Rust.
use rand::SeedableRng;
fn main() -> std::io::Result<()> {
let mut rng = rand_xorshift::XorShiftRng::from_entropy();
let mut file = std::fs::File::create("face.svg")?;
svg_face::generate_face(&mut file, &mut rng)
}
To try it yourself, run git clone https://github.com/dabreegster/svg_face && cd svg_face && cargo run --example aface
.