fast_noise 1.0.2

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:

fast_noise D

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.3 2022-Aug-03
1.0.2 2022-Aug-03
1.0.1 2022-Aug-03
1.0.0 2022-Aug-03
~main 2022-Aug-03
Show all 5 versions
Download Stats:
  • 1 downloads today

  • 5 downloads this week

  • 5 downloads this month

  • 5 downloads total

Score:
0.4
Short URL:
fast_noise.dub.pm