Isotope is a library that provides Elixir bindings to the bracket-noise crate, which is a rust port of FastNoise Lite.
The package can be installed by adding isotope
to your list of dependencies in mix.exs
:
def deps do
[
{:isotope, "~> 0.2.0"}
]
end
And running mix deps.get, deps.compile
.
opts = %Isotope.Options{
seed: seed,
noise_type: :simplex_fractal,
fractal_options: %Isotope.Options.Fractal{
octaves: 4
}
}
{:ok, noise} = Isotope.Noise.new(opts)
Isotope.Noise.noise_map(noise, {1000, 1000})
For more information, check the documentation here.
You can check and run the examples in the examples
folder.
mix run examples/<example>.exs