Awesome
<!-- PROJECT BADGES --> <!-- *** I'm using markdown "reference style" links for readability. *** Reference links are enclosed in brackets [ ] instead of parentheses ( ). *** See the bottom of this document for the declaration of the reference variables *** for contributors-url, forks-url, etc. This is an optional, concise syntax you may use. *** https://www.markdownguide.org/basic-syntax/#reference-style-links --> <!-- PROJECT LOGO --> <br /> <p align="center"> <!-- a href="https://github.com/razaekel/noise-rs"> <img src="images/logo.png" alt="Logo" width="80" height="80"> </a--> <h1 align="center">Noise-rs</h1> <p align="center"> Procedural Noise Generation library <i>for Rust</i> <br /> <a href="https://docs.rs/noise"><strong>Explore the docs »</strong></a> <br /> <br /> <!--a href="https://github.com/razaekel/noise-rs">View Demo</a> ·--> <a href="https://github.com/razaekel/noise-rs/issues">Report Bug</a> · <a href="https://github.com/razaekel/noise-rs/issues">Request Feature</a> </p> </p>[dependencies]
noise = "0.8"
<!-- ABOUT THE PROJECT -->
About The Project
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.
Planetary Surface Example
Gradient Noise
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.
Noise Functions
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.
<!-- USAGE EXAMPLES -->Usage
use noise::Fbm;
use noise::utils::{NoiseMapBuilder, PlaneMapBuilder};
fn main() {
let fbm = Fbm::new();
PlaneMapBuilder::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
<!-- ROADMAP -->Roadmap
See the open issues for a list of proposed features (and known issues).
<!-- CONTRIBUTING -->Contributing
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
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.
<!-- LICENSE -->License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
<!-- CONTACT -->Contact
Project Link: https://github.com/razaekel/noise-rs
<!-- MARKDOWN LINKS & IMAGES --> <!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->