Skip to content

viniciusmuller/isotope

Repository files navigation

Isotope

CI Status

Isotope is a library that provides Elixir bindings to the bracket-noise crate, which is a rust port of FastNoise Lite.

Installation

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.

Usage

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.

Examples

You can check and run the examples in the examples folder.

mix run examples/<example>.exs

Images

Output of the terrain.exs example script Output of the visualization.exs example script

Releases

No releases published

Packages

No packages published