Crates.io | noise |
lib.rs | noise |
version | 0.9.0 |
source | src |
created_at | 2014-11-21 00:11:57.422565 |
updated_at | 2024-03-23 22:36:20.720175 |
description | Procedural noise generation library. |
homepage | https://github.com/razaekel/noise-rs |
repository | https://github.com/razaekel/noise-rs |
max_upload_size | |
id | 193 |
size | 494,855 |
Procedural Noise Generation library for Rust
Explore the docs »
Report Bug -
Request Feature
[dependencies]
noise = "0.9"
Noise-rs is a Rust library to generate smoothly varying noise for textural use and graphical display.
Noise generators are contained in NoiseFn
modules, and can be combined to make very complex noise results.
Gradient noise produces a smooth, continuous value over space. It's achieved by dividing space into regions, placing a random gradient at each vertex, and then blending between those gradients.
These are the actual noise functions, which just take a coordinate using get()
and return
a value. They can be chained together when declared, creating very complex noise results.
See the individual function pages for their descriptions, and the examples for their usage.
To use the function write_to_file
you have to set the feature "images"
in the Cargo.toml
[dependencies]
noise = { version = "0.9.0", features = ["images"] }
use noise::{Fbm, Perlin};
use noise::utils::{NoiseMapBuilder, PlaneMapBuilder};
fn main() {
let fbm = Fbm::<Perlin>::new(0);
PlaneMapBuilder::<_, 2>::new(&fbm)
.set_size(1000, 1000)
.set_x_bounds(-5.0, 5.0)
.set_y_bounds(-5.0, 5.0)
.build()
.write_to_file("fbm.png");
}
For more examples, refer to the Examples
See the open issues for a list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
git checkout -b feature/AmazingFeature
)git commit -m 'Add some AmazingFeature'
)git push origin feature/AmazingFeature
)Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you shall be dual licensed as below, without any additional terms or conditions.
Licensed under either of
at your option.
Project Link: https://github.com/razaekel/noise-rs