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);
}
}
- 1.0.2 released 2 years ago
- jordan4ibanez/fast_noise
- MIT
- Copyright © 2022, jordan4ibanez
- Authors:
- 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 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
4 downloads this month
-
291 downloads total
-
- Score:
- 0.8
- Short URL:
- fast_noise.dub.pm