Noisex.Utils (Noisex v0.1.1) View Source

Utilitary functions for working with noise maps.

Link to this section Summary

Functions

Shows the given noise map on the stdout using ANSI color codes.

Writes the given noise map to a file. filename requires an extension (.png is recommended).

Link to this section Functions

Specs

show_noisemap(Noisex.Noise.noisemap()) :: :ok

Shows the given noise map on the stdout using ANSI color codes.

This won't work if your terminal doesn't support ANSI color codes.

Link to this function

write_to_file(noisemap, filename)

View Source

Specs

write_to_file(Noisex.Noise.noisemap(), String.t()) ::
  {:ok, :wrote} | {:error, String.t()}

Writes the given noise map to a file. filename requires an extension (.png is recommended).