fast_noise 1.0.1

A Fast Portable Noise Library


To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:

fastnoised

Fast Portable Noise Library. Translated to D.

You can see the original C file here: https://github.com/Auburn/FastNoiseLite/blob/master/C/FastNoiseLite.h

A small example on how to use the library:

import std.stdio;
import std.random;
import fast_noise;

void main() {
    // This is an example on how to use the library
    FNLState noise = fnlCreateState();
    noise.seed = unpredictableSeed();
    noise.noise_type = FNLNoiseType.FNL_NOISE_PERLIN;
    writeln("Begin perlin noise:");
    for (float i = 0; i < 100; i++) {
        float test = fnlGetNoise3D(&noise, 0,i,0);
        writeln("noise: ", test);
    }

    // You can also initialize it with a seed
    FNLState moreNoise = fnlCreateState(unpredictableSeed());
    moreNoise.noise_type = FNLNoiseType.FNL_NOISE_OPENSIMPLEX2;
    writeln("Begin OpenSimplex2 noise:");
    for (float i = 0; i < 100; i++) {
        float test = fnlGetNoise3D(&moreNoise, 0,i,0);
        writeln("noise: ", test);
    }

}
Authors:
  • jordan4ibanez
Dependencies:
none
Versions:
1.0.5 2022-Aug-20
1.0.4 2022-Aug-20
1.0.3 2022-Aug-03
1.0.2 2022-Aug-03
1.0.1 2022-Aug-03
Show all 7 versions
Download Stats:
  • 1 downloads today

  • 4 downloads this week

  • 5 downloads this month

  • 268 downloads total

Score:
0.8
Short URL:
fast_noise.dub.pm