Noise Functions
Fast and lightweight noise algorithm implementations.
Check out the live demo!
The implementation of these noise functions are from FastNoiseLite (github/crate).
Base noise functions
Examples of combined noises
Alternatives
Why not noise
?
With noise
, constructing a noise struct like Perlin
creates a permutation table at runtime. So to use the noise efficiently, you need to keep that instance of Perlin
around.
With noise-functions
, Perlin
does not carry any state. So there is no overhead to calling a function like this in a tight loop:
Pros: noise
has more noise functions, more dimensions for noise functions and more noise combinators.
Difference: noise
uses f64
instead of f32
.
Why not fastnoise-lite
?
fastnoise-lite
provides its noise generation via a big struct that you are to mutate to get the noise you want. If you already know what noise you want this api is inconvenient and inefficient. There is the noise-functions-config
crate that provides a similar api if you need it.
Pros: fastnoise-lite
provides more cellular noise variations, the fractal PingPong
type and domain warping built into the config struct.