FastNoise Lite
FastNoise Lite is an extremely portable open source noise generation library with a large selection of noise algorithms. This library focuses on high performance while avoiding platform/language specific features, allowing for easy ports to as many possible languages.
Features
- 2D & 3D
- OpenSimplex2 Noise
- OpenSimplex2S Noise
- Cellular (Voronoi) Noise
- Perlin Noise
- Value Noise
- Value Cubic Noise
- OpenSimplex2-based Domain Warp
- Basic Grid Gradient Domain Warp
- Multiple fractal options for all of the above
- Supports floats and/or doubles
- Switch from
f32tof64position inputs with the"f64"feature flag in yourCargo.toml
- Switch from
Getting Started
Below is an example for creating a 128x128 array of OpenSimplex2 noise.
Additional documentation is available at docs.rs and the project's Getting Started and Documentation pages from its GitHub wiki.
use *;
// Create and configure FastNoise object
let mut noise = new;
noise.SetNoiseType;
const WIDTH: usize = 128;
const HEIGHT: usize = 128;
let mut noise_data = ;
// Gather noise data
for x in 0..WIDTH
// Do something with this data...