Crate ds_heightmap

Source
Expand description

§ds-heightmap

Latest version Documentation MIT

§Build

§Build for Web

Install wasm-pack and build:

wasm-pack build --release

§Usage

use ds_heightmap::Runner;

fn main() {
    let mut runner = Runner::new();
    let output = runner.ds();

    println!("data: {:?}", output.data);
    println!("max: {}", output.max);
    println!("min: {}", output.min);
}

If you would like to supply a random number generator:

use ds_heightmap::Runner;
use rand_chacha::{rand_core::SeedableRng, ChaCha8Rng};

fn main() {
    let mut rng = ChaCha8Rng::from_entropy();

    let mut runner = Runner::new();
    let output = runner.ds_with_rng(&mut rng);

    println!("data: {:?}", output.data);
    println!("max: {}", output.max);
    println!("min: {}", output.min);
}

Structs§

Output
The output of the algorithm.
Runner
A runner to run the algorithm.