Crates.io | procedural-generation |
lib.rs | procedural-generation |
version | 0.3.1 |
source | src |
created_at | 2020-10-01 19:06:29.977882 |
updated_at | 2020-10-03 20:27:56.559971 |
description | Procedurally generate maps elegantly |
homepage | |
repository | https://gitlab.com/knarkzel/procedural-generation |
max_upload_size | |
id | 295135 |
size | 13,850 |
This is a crate for for procedurally generating maps written in Rust. It's very elegant to use and creates nice results, see the example below:
use procedural_generation::Generator;
fn main() {
Generator::new()
.with_size(40, 10)
.spawn_perlin(|value| {
if value > 0.66 {
2
} else if value > 0.33 {
1
} else {
0
}
})
.show();
}
Produces the following (prints with colors in terminal!):