procedural-generation

Crates.ioprocedural-generation
lib.rsprocedural-generation
version0.3.1
sourcesrc
created_at2020-10-01 19:06:29.977882
updated_at2020-10-03 20:27:56.559971
descriptionProcedurally generate maps elegantly
homepage
repositoryhttps://gitlab.com/knarkzel/procedural-generation
max_upload_size
id295135
size13,850
Odd-Harald Lillestø Myhren (Knarkzel)

documentation

https://docs.rs/procedural-generation/

README

Procedural Generation

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!):

map

Commit count: 0

cargo fmt